text:
La direttiva `@extend` è una funzione spesso mal interpretata. Giusto per ricordarlo, con questa direttiva possiamo dire a Sass di stilare un elemento `A` esattamente come se corrispondesse ad un selettore `B`. Inutile dire che rappresenta un ottimo alleato quando c'è da scrivere del CSS modulare.

Tuttavia il vero scopo di `@extend` è quello di mantenere le relazioni (i vincoli) tra set di regole all'interno di selettori estesi. Cosa vuol dire tutto ciò esattamente?

- I selettori hanno *vincoli* (`.bar` in `.foo > .bar` deve avere un padre `.foo`)
- Questi vincoli sono *trasportati* al selettore estendente (`.baz { @extend .bar; }` produrrà `.foo > .bar, .foo > .baz`);
- Le dichiarazioni del selettore esteso saranno condivise con il selettore estendente.

Detto questo, è chiaro che estendere selettori con vincoli blandi possa portare a risultati non voluti. Se `.baz .qux` estende `.foo .bar`, il risultato sarà `.foo .baz .qux` e `.baz .foo .qux` ed entrambi `.foo` e `.baz` sono _ancestor selector_ generici. Potrebbero essere padri, nonni, ecc...

Bisogna sempre cercare di definire le relazioni per mezzo dei placeholder e non attraverso i selettori reali. Questo vi darà la libertà di usare (e cambiare) qualsiasi convenzione dei nomi abbiate per i vostri selettori e, visto che le relazioni sono definite solo una volta e dentro i _placeholder_, sarete in grado di evitare selettori inintenzionali.

Per ereditare gli stili, usate `@extend` solo se la `.class` o il `%placeholder` che estende  _è dello stesso tipo_ del selettore esteso. Per esempio: un `.error` è un tipo di `.warning`, quindi `.error` può fare `@extend .warning`.

{% include snippets/extend/01/index.html %}

Ci sono condizioni dove estendere un selettore può essere d'aiuto e può valerne la pena. C'è da tenere in mente queste regole, così da evitare qualche guaio:

* Estendi un `%placeholder` non un selettore reale, quando possibile.
* Se estendi una classe, estendi un selettore di classe solo con un altro selettore di classe, non farlo _mai_ con un [selettore complesso](https://www.w3.org/TR/selectors4/#syntax).
* Estendi direttamente un `%placeholder` il meno possibile.
* Evitate di estendere selettori discendenti generici (`.foo .bar`) selettori adiacenti generici (es: `.foo ~ .bar`). Questo è solitamente quello che provoca l'esplosione di un selettore.

Spesso si dice che @extend aiuta a tenere piccola la grandezza dei file css, in quanto combina diversi selettori piuttosto che duplicare le proprietà. Questo è vero, ma la differenza è davvero minima quando si attiva la compressione Gzip.

Detto questo, se non si può usare Gzip (o qualsiasi equivalente) allora passare ad un approccio che usa @extend può non essere così male, soprattutto se il peso dei vostri fogli di stile è un vostro collo di bottiglia alle performance.

#### Extend e media query

Dovreste estendere i selettori solo all'interno della stessa _mediaquery_ (la direttiva `@media`). Pensate alla _mediaquery_ come ad un altro vincolo.

{% include snippets/extend/02/index.html %}

Ci sono diverse opinioni riguardo i benefici e i problemi di `@extend` al punto che molti sviluppatori, incluso me, raccomandano di non usarlo affatto. Potete leggere di più sull'argomento in questi articoli:

* [What Nobody Told you About Sass Extend](https://www.sitepoint.com/sass-extend-nobody-told-you/)
* [Why You Should Avoid Extend](https://www.sitepoint.com/avoid-sass-extend/)
* [Don't Over Extend Yourself](https://pressupinc.com/blog/2014/11/dont-overextend-yourself-in-sass/)

Per riassumere: consiglio di usare `@extend` solo per mantenere le relazioni tra selettori. Se due selettori hanno funzionalità simili, è il caso perfetto per usare `@extend`. Se invece condividono delle regole non correlate tra loro, un `@mixin` potrebbe fare al caso vostro.

Un grazie a David Khourshid per il suo aiuto ed esperienza in questa parte.


text:
using Extensions;
using Roku.Declare;
using Roku.Manager;
using System.Linq;

namespace Roku.Compiler;

public static partial class Typing
{
    public static bool TypeInference(StructBody body)
    {
        var resolved = StructBodyInference(body);
        SpecializationNumericDecide(body);
        _ = StructBodyInference(body);

        VariableValue self;
        if (body.LexicalScope.ContainsKey("$self"))
        {
            self = body.LexicalScope["$self"].Cast<VariableValue>();
        }
        else
        {
            self = new VariableValue() { Name = "$self" };
            body.LexicalScope.Add(self.Name, self);
        }

        foreach (var mapper in body.SpecializationMapper.Values)
        {
            if (!mapper.ContainsKey(self)) mapper[self] = CreateVariableDetail(self.Name, new StructSpecialization(body, Lookup.TypeMapperToGenericsMapper(mapper)), VariableType.Argument, 0);

            body.Members.Values.Each(x =>
            {
                if (mapper.ContainsKey(x))
                {
                    var d = mapper[x];
                    d.Type = VariableType.Property;
                    d.Reciever = self;
                    d.Index = 0;
                }
            });
        }
        return resolved;
    }

    public static bool StructBodyInference(StructBody body)
    {
        var resolved = false;
        var keys = body.SpecializationMapper.Keys.ToArray();
        for (var i = 0; i < keys.Length; i++)
        {
            var m = body.SpecializationMapper[keys[i]];
            body.Body.Each(x => resolved = OperandTypeInference(body.Namespace, m, x) || resolved);
        }
        return resolved;
    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace App\Http\Controllers;

trait ErogamescapePortal
{
	protected function searchEroge($params) {
		if(sizeof($params)) {
			if(!isset($params['game_id']) && !isset($params['search_query'])) {
				return 0;
			}
			$query_to_retrieve = $this->parseParamToQuery($params);
			$html_content = $this->retrievePageContent($query_to_retrieve);
			$this->writeHtmlToDisk($html_content, storage_path('/app/egs-sql-html-log/'), 'egs_sql_');
			$data = $this->extractEssenceFromHtml($html_content);
			return $data;
		}
	}

	protected function retrievePageContent($query) {
		$fields = array(
			'sql' => $query
		);
		$postvars = '';
		$sep = ' ';
		foreach ($fields as $key => $value) {
			$postvars = $sep . urlencode($key) . '=' .urlencode($value);
			$sep = '&';
		}

		$ch = curl_init();
		$agent = 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:10.0) Gecko/20100101 Firefox/10.0';
		$egs_sql_url = 'https://erogamescape.dyndns.org/~ap2/ero/toukei_kaiseki/sql_for_erogamer_form.php';

		curl_setopt($ch, CURLOPT_URL, $egs_sql_url);
		curl_setopt($ch, CURLOPT_USERAGENT, $agent);
		curl_setopt($ch, CURLOPT_HEADER, 1);
		curl_setopt($ch, CURLOPT_POST,1);
		curl_setopt($ch, CURLOPT_POSTFIELDS, $postvars);
		curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

		$result = curl_exec($ch);

		$http_code = curl_getinfo($ch, CURLINFO_HTTP_CODE);

		return $result;
	}

	protected function parseParamToQuery($params, $target_table = null) {

		$sql = 'SELECT ';
		$sql = $sql . 'gamelist.* ';
		$sql = $sql . ', brandlist.brandname, brandlist.brandfurigana, brandlist.makername, brandlist.makerfurigana, brandlist.url as brandlist_url, brandlist.checked as brandlist_checked, brandlist.kind as brandlist_kind, brandlist.lost as brandlist_lost, brandlist.directlink as brandlist_directlink, brandlist.median as brandlist_median, brandlist.http_response_code as brandlist_http_response, brandlist.twitter as brandlist_twitter, brandlist.twitter_data_widget_id as brandlist_twitter_data_widget_id, brandlist.notes as brandlist_notes, brandlist.erogetrailers as brandlist_erogetrailers ';
		$sql = $sql . 'FROM ';
		switch ($target_table) {
			case 'game':
				$sql = $sql . 'gamelist ';
				break;
			case 'developer':
				$sql = $sql . 'brandlist ';
				break;
			default:
				$sql = $sql . 'gamelist ';
				break;
		}

		if($target_table == null || $target_table == 'game') {
			$sql = $sql . 'LEFT JOIN brandlist ON gamelist.brandname = brandlist.id ';
		}

		if(isset($params['game_id'])) {
			$sql = $sql . 'WHERE gamelist.id = \'' . $params['game_id'] . '\' ';
		}
		else if(isset($params['search_query'])) {
			$sql = $sql . "WHERE gamelist.id > '0' AND (gamelist.gamename LIKE '%" . $params['search_query'] . "%' ";
			$search_keywords = explode(' ', $params['search_query']);
			foreach ($search_keywords as $word) {
				$sql = $sql . "OR gamelist.gamename LIKE '%" . $word . "%' ";
				$sql = $sql . "OR gamelist.furigana LIKE '%" . $word . "%' ";
				$sql = $sql . "OR brandlist.brandname LIKE '%" . $word . "%' ";
			}
			$sql = $sql . ') ';
		}
		return $sql;
	}

	protected function extractEssenceFromHtml($html) {
		$html = preg_replace('/\s+/S', " ", $html);
		$essence = array();

		$dom = new \DOMDocument();
		libxml_use_internal_errors(true);
		$dom->preserveWhiteSpace = false;
		$dom->formatOutput = true;
		// Converting broken UTF-8 into its proper encoding
		$html = mb_convert_encoding($html , 'HTML-ENTITIES', 'UTF-8');
		$dom->loadHTML($html);

		$sql_result_key = array();
		// $sql_result_value = array();
		$sql_result_complete = array();

		// Parse element of div with id=query_result_main
		$element_of_queryresultmain = $dom->getElementById('query_result_main');
		$innerhtml_of_queryresultmain = $dom->saveHtml($element_of_queryresultmain);
		// Parse element of table
		$element_of_table = $element_of_queryresultmain->getElementsByTagName('tr');

		// If null, return null
		if($element_of_table->length <= 0) {
			return null;
		}

		// Assign each value in th tag into array
		$element_of_th = $element_of_table[0]->getElementsByTagName('th');
		foreach ($element_of_th as $th_object) {
			$sql_result_key[] = $th_object->nodeValue;
		}
		// Assign each value in td tag for each row into array
		$i = 0;
		foreach ($element_of_table as $key => $tr_element) {
			if($i > 0) {
				$sql_result_value = array();
				$element_of_td = $tr_element->getElementsByTagName('td');
				foreach ($element_of_td as $key => $td_object) {
					$sql_result_value[] = $td_object->nodeValue;
				}
				$sql_result_complete[] = array_combine($sql_result_key, $sql_result_value);
			}
			$i++;
		}

		if($only_one_row = false == true) {
			$element_of_td = $element_of_table[1]->getElementsByTagName('td');
			foreach ($element_of_td as $td_object) {
				$sql_result_value[] = $td_object->nodeValue;
			}
			$sql_result_complete = array_combine($sql_result_key, $sql_result_value);
		}

		return $sql_result_complete;
	}

	protected function writeHtmlToDisk($content, $directory, $prefix = null) {
		$date = date('YmdHis');
		$this->prepareDirectory($directory);
		$path = $directory . '/';
		if($prefix) {
		 $path = $path . $prefix;
		}
		$path = $path . $date . '.html';
		$file = fopen($path, 'w');
		fwrite($file, $content);
		fclose($file);
		return true;
	}

	protected function prepareDirectory($directory) {
		try {
			if(!is_dir($directory)) {
				mkdir($directory, 0777, true);
			}
		}
		catch(\Exception $e) {
			throw new \Symfony\Component\HttpKernel\Exception\HttpException('Directory preparation failed!');
		}

		return true;
	}
}


text:
/**
 * socket io communication class for getting host information from server
 */
var GetRemoteHostListSocket = (function () {
    /**
     * create new instance
     * @param socket socket io instance
     */
    function GetRemoteHostListSocket(socket) {
        this.socket = socket;
    }
    /**
     * Adds a listener for connect event that will be invoked a single time before being automatically removed
     * @param callback The function to call when we get the event
     */
    GetRemoteHostListSocket.prototype.onConnect = function (callback) {
        var _this = this;
        this.callback = callback;
        this.socket
            .on('connect', function () {
            _this.emit(callback);
        });
    };
    /**
     * Adds a listener for this event that will be invoked a single time before being automatically removed
     * @param callback The function to call when we get the event
     */
    GetRemoteHostListSocket.prototype.onEvent = function (callback) {
        if (callback == null) {
            callback = this.callback;
        }
        this.socket.once(GetRemoteHostListSocket.eventName, function (hostInfos) {
            callback(hostInfos);
        });
    };
    /**
     * emit to server for getting host information
     * @param callback The function to call when we get the event
     */
    GetRemoteHostListSocket.prototype.emit = function (callback) {
        this.onEvent(callback);
        this.socket.emit(GetRemoteHostListSocket.eventName);
    };
    return GetRemoteHostListSocket;
}());
/**
 * event name
 */
GetRemoteHostListSocket.eventName = 'onGetRemoteHostList';
//# sourceMappingURL=getRemoteHostListSocket.js.map


text:
```tut:silent
import eu.timepit.refined.api.Refined
import eu.timepit.refined.auto._
import eu.timepit.refined.numeric.Greater
import eu.timepit.refined.string.StartsWith
```

Scala's path dependent types makes it possible to express refinements
that depend other statically known values:

```tut
def foo(a: String)(b: String Refined StartsWith[a.type]) = a + b
```

```tut
foo("ab")("abcd")
```

```tut:fail
foo("cd")("abcd")
```

Unfortunately Scala currently does not allow to use singleton types of
`AnyVal`s, see [section 3.2.1][spec-3.2.1] of the Scala Language
Specification:

```tut:fail
def bar(i: Int)(j: Int Refined Greater[i.type]) = j - i
```

But fortunately this restriction will be lifted with the implementation
of [SIP-23][SIP-23] in a future Scala version.

[spec-3.2.1]: http://www.scala-lang.org/files/archive/spec/2.11/03-types.html#singleton-types
[SIP-23]: http://docs.scala-lang.org/sips/42.type.html


text:
package com.appeligo.search.actions.network;

import java.util.Collection;
import java.util.Date;
import java.util.List;
import java.util.Set;

import com.appeligo.search.actions.BaseAction;
import com.appeligo.search.entity.Friend;
import com.appeligo.search.entity.FriendStatus;
import com.appeligo.search.entity.User;

public class FriendsAction extends BaseAction {

	/**
	 *
	 */
	private static final long serialVersionUID = 3755065431422605492L;
	private Collection<Friend> existingFriends;
	private List<Friend> networkRequests;
	private String inviteAction;
	private Long id;
	private Friend activeFriend;
	private String firstName;
	private String lastName;
	private boolean canEditNames;

	public String execute()  {
		User user = getUser();
		existingFriends = Friend.findFriends(user);
		networkRequests = Friend.findInvites(user);
		return SUCCESS;
	}

	public String respondToInvitation() {
		User user = getUser();
		Friend friend = Friend.findByInvitee(id, user);
		//Did the Friend object already exist?
		if (friend != null ) {
			if (friend.isDeleted()) {
				addActionError("The invitation has been deleted.  You can send your own invitation if you wish.");
				return ERROR;
			}
			try {
				FriendStatus status = FriendStatus.valueOf(inviteAction);
				switch (status) {
					case ACCEPTED: {
						friend.setStatus(status);
						if (friend.getFriendUser() == null) {
							friend.setFriendUser(user);
						}
						//Since we accepted, automatically add them to our friend network.
						//First check to see if we already have a Friend for them
						Friend existing = Friend.findByUser(user, friend.getUser());
						if (existing != null) {
							if (existing.isDeleted()) {
								existing.setDeleted(false);
							}
							existing.setStatus(FriendStatus.ACCEPTED);
						} else {
							existing = new Friend();
							//We don't know the email, but that should be ok.
							existing.setUser(user);
							existing.setCreated(new Date());
							existing.setStatus(FriendStatus.ACCEPTED);
							//The friend already is a registered user, so set the user object.
							existing.setFriendUser(friend.getUser());
							user.addFriend(existing);
						}
						break;
					}
					case DECLINED: {
						//If we decline, and have an existing invite (why we declined is beyond me)
						//Then delete our invite to them.  It is a bydirection friendship.
						friend.setStatus(FriendStatus.DECLINED);
						//PENDING(CE): We should have to do 2 queries here. This is bad.
						Friend existing = Friend.findByEmail(user, friend.getUser().getPrimaryEmail());
						if (existing == null) {
							existing = Friend.findByUser(user, friend.getUser());
						}
						if (existing != null) {
							existing.setDeleted(true);
						}
						break;
					}
					case BLOCKED: {
						//If we block, and have an existing invite (why we blocked is beyond me)
						//Then delete our invite to them.  It is a bydirection friendship.
						friend.setStatus(FriendStatus.BLOCKED);
						//PENDING(CE): We should have to do 2 queries here. This is bad.
						Friend existing = Friend.findByEmail(user, friend.getUser().getPrimaryEmail());
						if (existing == null) {
							existing = Friend.findByUser(user, friend.getUser());
						}
						if (existing != null) {
							existing.setDeleted(true);
						}
						break;
					}
				}
			} catch (IllegalArgumentException e) {
				//Not a valid status
				addActionError("Unable to process the request.  Please try again.");
				return ERROR;
			}
		}

		existingFriends = user.getFriends();
		networkRequests = Friend.findInvites(user);

		return SUCCESS;
	}

	public String editFriend() {
		User user = getUser();
		activeFriend = Friend.findByInviter(id, user);
		canEditNames = true;
		if (activeFriend != null) {
			if (activeFriend.getFriendUser() != null) {
				String firstName = activeFriend.getFriendUser().getFirstName();
				String lastName = activeFriend.getFriendUser().getLastName();
				if ((firstName != null && firstName.length() > 0) || (lastName != null && lastName.length() >0)) {
					canEditNames = false;
				}
			}
			return SUCCESS;
		} else {
			existingFriends = user.getFriends();
			networkRequests = Friend.findInvites(user);
			addActionError("Unable to determine the friend to edit. Please try again.");
			return ERROR;
		}
	}

	public String saveFriend() {
		User user = getUser();
		activeFriend = Friend.findByInviter(id, user);
		if (activeFriend != null) {
			activeFriend.setFirstName(firstName);
			activeFriend.setLastName(lastName);
			existingFriends = user.getFriends();
			networkRequests = Friend.findInvites(user);
			return SUCCESS;
		} else {
			addActionError("Unable to save the changes. Please try again.");
			return INPUT;
		}
	}

	public String deleteFriend() {
		User user = getUser();
		Friend friend = Friend.findByInviter(id, user);
		//Did the Friend object exist?
		if (friend != null ) {
			friend.setDeleted(true);
			User friendUser = friend.getFriendUser();
			if (friendUser != null) {
				Friend inverse = Friend.findByUser(friendUser, user);
				if (inverse != null) {
					inverse.setStatus(FriendStatus.DECLINED);
				}
			}
		}
		existingFriends = Friend.findFriends(user);
		networkRequests = Friend.findInvites(user);
		return SUCCESS;

	}
	/**
	 * @return Returns the inviteAction.
	 */
	public String getInviteAction() {
		return inviteAction;
	}

	/**
	 * @param inviteAction The inviteAction to set.
	 */
	public void setInviteAction(String action) {
		this.inviteAction = action;
	}

	/**
	 * @return Returns the requests.
	 */
	public List<Friend> getNetworkRequests() {
		return networkRequests;
	}

	/**
	 * @param requests The requests to set.
	 */
	public void setNetworkRequests(List<Friend> networkRequests) {
		this.networkRequests = networkRequests;
	}

	/**
	 * @return Returns the id.
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @param id The id to set.
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @return Returns the existingFriends.
	 */
	public Collection<Friend> getExistingFriends() {
		return existingFriends;
	}

	/**
	 * @param existingFriends The existingFriends to set.
	 */
	public void setExistingFriends(Collection<Friend> existingFriends) {
		this.existingFriends = existingFriends;
	}

	/**
	 * @return Returns the activeFriend.
	 */
	public Friend getActiveFriend() {
		return activeFriend;
	}

	/**
	 * @param activeFriend The activeFriend to set.
	 */
	public void setActiveFriend(Friend activeFriend) {
		this.activeFriend = activeFriend;
	}

	/**
	 * @return Returns the canEditNames.
	 */
	public boolean isCanEditNames() {
		return canEditNames;
	}

	/**
	 * @param canEditNames The canEditNames to set.
	 */
	public void setCanEditNames(boolean canEditNames) {
		this.canEditNames = canEditNames;
	}

	/**
	 * @return Returns the firstName.
	 */
	public String getFirstName() {
		return firstName;
	}

	/**
	 * @param firstName The firstName to set.
	 */
	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	/**
	 * @return Returns the lastName.
	 */
	public String getLastName() {
		return lastName;
	}

	/**
	 * @param lastName The lastName to set.
	 */
	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

}


text:
import { VscrollPort } from './vscroll.port';
import { VscrollBox } from './vscroll.box';
import { isNumber } from '@qgrid/core/utility/kit';

export class VscrollLink {
	private box = new VscrollBox();
	private ticking = false;

	constructor(private port: VscrollPort) {
		const { view, layout } = port;
		const { settings, container } = this;

		if (settings.placeholderHeight > 0 || settings.placeholderWidth > 0) {
			const width = settings.placeholderWidth || (isNumber(settings.columnWidth) && settings.columnWidth as number);
			const height = settings.placeholderHeight || (isNumber(settings.rowHeight) && settings.rowHeight as number);
			view.drawPlaceholder(width, height);
		}

		view.scrollEvent.subscribe(() => this.update(false));

		view.resetEvent.subscribe(e => {
			if (e.handled) {
				return;
			}

			e.handled = settings.resetTriggers.indexOf(e.source) < 0;
			container.resetEvent.emit(e);
		});

		container.resetEvent.subscribe(e => {
			if (e.handled) {
				return;
			}

			container.cursor = layout.reset();
			port.reset();
		});

		container.updateEvent.subscribe(() => this.update(true));
	}

	tick(force: boolean) {
		this.ticking = false;

		const { port, container, box } = this;
		const count = container.count;
		const position = port.layout.recycle(count, box, force);
		if (position) {
			const draw = () => {
				container.cursor = port.layout.invalidate(position);
				container.drawEvent.emit({
					position: container.cursor
				});
			};

			const emit = f => port.emit(f);
			container.apply(draw, emit);
		}
	}

	update(force: boolean) {
		const { container, port, box } = this;
		const { view } = port;
		this.container.read(() => {
			const element = view.element;
			const newBox = {
				scrollWidth: element.scrollWidth,
				scrollHeight: element.scrollHeight,
				scrollTop: element.scrollTop,
				scrollLeft: element.scrollLeft,
				portWidth: element.clientWidth,
				portHeight: element.clientHeight
			};

			if (force || port.hasChanges(newBox, box)) {
				this.box = newBox;
				if (container.count && !this.ticking) {
					this.ticking = true;
					container.tick(() => this.tick(force));
				}
			}
		});
	}

	private get settings() {
		return this.port.context.settings;
	}

	private get container() {
		return this.port.context.container;
	}
}


text:
Cordova webOS
=====================================================
Cordova webOS is a skeleton HP webOS application, along with JavaScript wrapper libraries, which allow a developer to build an application for an HP webOS device using web technologies. This same code can be built for iPhone, BlackBerry, Symbian, and more to come ...

Pre-requisites
-----------------------------------------------------
You should have VirtualBox (virtual machine software which runs the Palm emulator) and the webOS SDK installed. Both of these can be found at [Palm's Developer Site](https://developer.palm.com/content/resources/develop/sdk_pdk_download.html).

Set up your environment and install the skeleton app
-----------------------------------------------------
Open a terminal, and navigate to the root Cordova webOS folder (where this readme.md file is located). A Makefile resides here; running make here will package your application, and install it to either the emulator, or the device. Or you can run make on individual target tasks:

   - `make js` - builds Cordova.js from source javascript files to libs/Cordova.js
   - `make copy_js` - copies libs/Cordova.js to framework/Cordova.js - modify this path if you want Cordova.js in another location
   - `make package` - builds the webOS app (located in framework/) into an webOS .ipk installer package in the Cordova_root/palm/ folder
   - `make deploy` - installs the .ipk package to a device if detected, otherwise the emulator if its running

If a connected webOS device is detected, the application will be installed to the device. If not, and the emulator is running, the application will be installed to the emulator. To run the emulator, search for Palm Emulator.app in the finder, and run it.

Build your Cordova app
-----------------------------------------------------
Navigate to `Cordova_root/webOS_new/framework/`; this is where your application will reside. If you have already built a Cordova application on another platform, drop your html,js, css and assets into this folder (starting with the required index.html). Don't forget Cordova.js!

Just open framework/ in your favourite editor, build your web app, and run the appropriate make command indicated above. Edit appinfo.json to set your app id (see Notes below), version, etc.

Cordova-webOS doesn't need to do any native initialization, but it does fire a `deviceready` that guarantees all the Cordova APIs are in place. You can run your code at `deviceready` like so:

    document.addEventListener('deviceready', function() {
        // do cool Cordova things
    }, false);

To enable a javascript debug console, open a new terminal window and type:
    Cordova-log app_id
Where the app id is your app id as set in `appinfo.json`
This will tail your log file; it will default to the device if detected, otherwise it will read logs from the emulator.
To log from your JS code, use `console.log`

Notes & Caveats
-----------------------------------------------------
 - In order to use the vibration API on palm, your application needs to have a "com.palm.*" namespace, as vibration on webOS is a private API. The caveat of doing this is that you are essentially indicating that your app should pretend to be a "Palm app" (rather than a Nitobi app, for example) ... and as a result your app will be denied from the Palm app catalog.
 - Currently the map.show function can only accept one position, as Palm uses google maps as its native maps application, and it only can take one marker as a parameter.
 - Touch event not supported, natively. Cordova now includes event handlers for mouse & touch events - please see the example app bundled with Cordova-webOS
 - If using Lawnchair, the only supported adaptor is webkitsqlite.
 - html select boxes are implemented by Cordova, not supported natively (believe it or not). only the most basic functionality is implemented, so be aware using this control could cause problems.
 - To enable verbose logging, add the file framework_config.json to your framework/www/ folder, containing the following json content: { "logLevel": 99 }

Helpful Links
-----------------------------------------------------
  - Cordova Wiki: 				[wiki.apache.org/cordova](http://wiki.apache.org/cordova/)
  - Palm webOS developer site: 	[developer.palm.com](http://developer.palm.com)


text:
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: load.proto

package com.grpc.load;

public interface RequestOrBuilder extends
    // @@protoc_insertion_point(interface_extends:load.Request)
    com.google.protobuf.MessageLiteOrBuilder {

  /**
   * optional int32 batchSize = 1;
   */
  int getBatchSize();

  /**
   * optional int32 total = 2;
   */
  int getTotal();
}


text:
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')

describe FreeMart do
  before do
    FreeMart.clear
  end

  it "should work" do
    FreeMart.register 'key', 'value'
    FreeMart.request('key').should == 'value'
  end

  it "block should work" do
    FreeMart.register('key'){ 'value' }
    FreeMart.request('key').should == 'value'
  end

  it "parameters are passed to block" do
    FreeMart.register('key'){|_, *args| args }
    FreeMart.request('key', 'a', 'b').should == ['a', 'b']
  end

  it "block with arguments should work" do
    FreeMart.register('key') do |_, arg1, arg2|
      "#{arg1} value #{arg2}"
    end
    FreeMart.request('key', 'before', 'after').should == 'before value after'
  end

  it "#register should return a provider that can be 'call'ed" do
    provider = FreeMart.register 'key', 'value'
    provider.call.should == 'value'
  end

  it "#register can take regular expression" do
    FreeMart.register /key/, 'value'
    FreeMart.request('key1').should == 'value'
  end

  it "#register can take an array of regular expressions and strings" do
    FreeMart.register [/first/, 'second'] do |options|
      options[:key]
    end
    FreeMart.request('first').should == 'first'
    FreeMart.request('second').should == 'second'
  end

  it "requested key is passed to callback" do
    FreeMart.register /key/ do |options|
      options[:key]
    end
    FreeMart.request('key1').should == 'key1'
    FreeMart.request('key2').should == 'key2'
  end

  it "provider registered later overwrite previous provider with same key" do
    FreeMart.register 'key', 'value'
    FreeMart.register 'key', 'value1'
    FreeMart.request('key').should == 'value1'
  end

  it "provider registered later can call request to get value from previous provider" do
    FreeMart.register 'key', 'value'
    FreeMart.register 'key' do |options|
      FreeMart.request options[:key]
    end
    FreeMart.request('key').should == 'value'
  end

  #it "#request should raise error if not found" do
  #  lambda { FreeMart.request('key') }.should raise_error(FreeMart::NotFoundError)
  #end

  #it "should raise no provider error if no provider exists for the key" do
  #  lambda { FreeMart.request('key') }.should raise_error(FreeMart::NoProviderError)
  #end

  #it "#request_no_error should return NOT_FOUND if not found" do
  #  FreeMart.request_no_error('key').should == FreeMart::NOT_FOUND
  #end

  #it "#deregister should work" do
  #  provider = FreeMart.register 'key', 'value'
  #  FreeMart.request('key').should == 'value'
  #  FreeMart.deregister 'key', provider
  #  lambda { FreeMart.request('key') }.should raise_error
  #end

  it "#request should work inside a callback" do
    FreeMart.register 'key', 'value'
    FreeMart.request('key').should == 'value'

    FreeMart.register 'key' do |_, *args|
      old_result = FreeMart.request 'key', *args
      if old_result == FreeMart::NOT_FOUND
        FreeMart::NOT_FOUND
      else
        "#{old_result} #{args.join(' ')}"
      end
    end
    FreeMart.request('key', 'a', 'b').should == 'value a b'
  end

  #it "#reregister and #request_no_error should return NOT_FOUND if not found" do
  #  FreeMart.register('key'){ FreeMart::NOT_FOUND }
  #  FreeMart.reregister 'key' do |*args|
  #    FreeMart.request_no_error 'key', *args
  #  end
  #  FreeMart.request_no_error('key').should == FreeMart::NOT_FOUND
  #end

  #it "#deregister and #reregister should work together" do
  #  old_provider = FreeMart.register 'key', 'old'
  #  new_provider = FreeMart.reregister 'key', 'new'
  #  FreeMart.request('key').should == 'new'
  #  FreeMart.deregister 'key', new_provider
  #  FreeMart.request('key').should == 'old'
  #end

  #it "#clear should work" do
  #  FreeMart.register 'key', 'value'
  #  FreeMart.clear
  #  lambda { FreeMart.request('key') }.should raise_error
  #end

  #it "#clear can take list of keys" do
  #  FreeMart.register 'a', 'aa'
  #  FreeMart.register 'b', 'bb'
  #  FreeMart.register 'c', 'cc'
  #  FreeMart.clear 'a', 'b'
  #  lambda { FreeMart.request('a') }.should raise_error
  #  lambda { FreeMart.request('b') }.should raise_error
  #  FreeMart.request('c').should == 'cc'
  #end

  #it "should support multiple providers for same key" do
  #  FreeMart.register('key') do |index|
  #    if index == 1
  #      'first'
  #    else
  #      FreeMart.not_found
  #    end
  #  end
  #  FreeMart.register('key') do |index|
  #    if index == 2
  #      'second'
  #    else
  #      FreeMart.not_found
  #    end
  #  end
  #  FreeMart.request('key', 1).should == 'first'
  #  FreeMart.request('key', 2).should == 'second'
  #  lambda { FreeMart.request('key', 3) }.should raise_error
  #end

  #it "collect results from multiple providers should work" do
  #  FreeMart.register 'key', 'a'
  #  FreeMart.register 'key', 'b'
  #  FreeMart.reregister 'key' do
  #    providers = FreeMart.providers['key']
  #    combined = []
  #    providers.each do |provider|
  #      result = provider.call
  #      if result != FreeMart::NOT_FOUND
  #        combined << result
  #      end
  #    end
  #    combined
  #  end
  #  FreeMart.request('key').should == ['a', 'b']
  #end

  #it "merge hashes from multiple providers should work" do
  #  FreeMart.register 'key', a: 'aa'
  #  FreeMart.register 'key', b: 'bb'
  #  FreeMart.reregister 'key' do
  #    providers = FreeMart.providers['key']
  #    combined = {}
  #    providers.each do |provider|
  #      result = provider.call
  #      if result != FreeMart::NOT_FOUND
  #        combined.merge! result
  #      end
  #    end
  #    combined
  #  end
  #  FreeMart.request('key').should == {a: 'aa', b: 'bb'}
  #end

  it "key arg can be symbol but is converted to string" do
    FreeMart.register :a, 'aa'
    FreeMart.request(:a).should  == 'aa'
    FreeMart.request('a').should == 'aa'
    FreeMart.register 'b', 'bb'
    FreeMart.request(:b).should  == 'bb'
    FreeMart.request('b').should == 'bb'
  end

  it "#accept? should work" do
    FreeMart.accept?(:a).should be_false
    FreeMart.register :b, 'bb'
    FreeMart.accept?(:b).should be_true
  end

  #it "#providers should work" do
  #  FreeMart.register :a, 'aa'
  #  FreeMart.providers.size.should == 1
  #  FreeMart.providers.should have_key 'a'
  #end

  #it "#provider_for should work" do
  #  FreeMart.provider_for(:a).should be_nil
  #  FreeMart.register :b, 'bb'
  #  FreeMart.provider_for(:b).should_not be_nil
  #end

  it "#requestMulti should work" do
    FreeMart.register 'key1', 'value1'
    FreeMart.register 'key2', 'value2'
    FreeMart.requestMulti('key1', 'key2').should == ['value1', 'value2']
  end

  it "#requestMulti should work if extra args are passed" do
    FreeMart.register('key1') {|_, *args| "value1 #{args.join(' ')}"}
    FreeMart.register 'key2', 'value2'
    FreeMart.requestMulti(['key1', 'a', 'b'], 'key2').should == ['value1 a b', 'value2']
  end

  it "#requestAll should work" do
    FreeMart.register 'key', 'first'
    FreeMart.register 'key', 'second'
    FreeMart.requestAll('key').should == ['first', 'second']
  end

end


text:
permalink: /events/2014/05/15/office-hours/
category: events
layout: events
title: Office Hours (May 15, 2014)
head: Office Hours
subhead: May 15, 2014
description: Code for BTV holds regular Office Hours during which elected officials, government staff, individuals, and civic hackers can participate in free and open dialogue about our community's challenges and opportunities.
tags: ["office hours"]
archived: true
time:
 - dtstart: 2014-05-15 17:30:00
   dtend: 2014-05-15 19:00:00
venue:
 - text: Burlington City Hall
   link: http://www.burlingtonvt.gov/
 - text: Conference Room 12
 - text: 149 Church Street
 - text: Burlington, VT 05401
venue_note:  The venue is handicapped accessible.
---

City of Burlington, Meet Your Civic Hackers

{{ page.description }}

We ask participants to follow the Chatham House Rule: "When a meeting, or part thereof, is held under the Chatham House Rule, participants are free to use the information received, but neither the identity nor the affiliation of the speaker(s), nor that of any other participant, may be revealed."

There is no need to register or RSVP to attend.

Learn more about Office Hours


text:
(function () {
  let { canvas, context } = kontra.init('snake-game');

  kontra.initKeys();
  var arrows = [37, 38, 39, 40];
  canvas.addEventListener(
    'keydown',
    function (e) {
      if (arrows.indexOf(e.which) !== -1) {
        e.preventDefault();
      }
    },
    true
  );
  var grid = 15;
  var numRows = canvas.height / grid;
  var numCols = canvas.width / grid;
  var snake = kontra.Sprite();
  var apple = kontra.Sprite();

  // keep track of which cells of the game are open so the apple doesn't spawn on
  // top of the snake
  var freeCells = [];
  for (var row = 0; row < numRows; row++) {
    for (var col = 0; col < numCols; col++) {
      freeCells.push(row * numCols + col);
    }
  }

  /**
   * Get a random integer between min (inclusive) and max (exclusive)
   * @see https://stackoverflow.com/a/1527820/2124254
   */
  function getRandomInt(min, max) {
    return Math.floor(Math.random() * (max - min)) + min;
  }

  /**
   * Get a random open cell for the apple
   */
  function getApplePos() {
    var cell = getRandomInt(0, freeCells.length - 1);
    return {
      x: (cell % numCols) * grid,
      y: ((cell / numCols) | 0) * grid
    };
  }

  /**
   * Reset the snake and apple position
   */
  function reset() {
    snake.init({
      x: 10 * grid,
      y: 5 * grid,
      dx: grid,
      color: 'green',
      cells: [],
      maxCells: 4,
      update: function () {
        this.advance();

        // wrap snake position on edge of screen
        if (this.x < 0) {
          this.x = canvas.width - grid;
        } else if (this.x >= canvas.width) {
          this.x = 0;
        }
        if (this.y < 0) {
          this.y = canvas.height - grid;
        } else if (this.y >= canvas.height) {
          this.y = 0;
        }

        // keep track of where snake has been. front of the array is always the head
        this.cells.unshift({ x: this.x, y: this.y });
        var cellIndex = freeCells.indexOf((this.y / grid) * numCols + this.x / grid);
        freeCells.splice(cellIndex, 1);

        // remove cells as we move away from them
        if (this.cells.length > this.maxCells) {
          var cell = this.cells.pop();
          freeCells.push((cell.y / grid) * numCols + cell.x / grid);
        }

        // check for collision with apple or body
        this.cells.forEach(
          function (cell, index) {
            // snake ate apple, only the front of the snake can eat an apple
            if (index === 0 && cell.x === apple.x && cell.y === apple.y) {
              this.maxCells++;
              var pos = getApplePos();
              apple.x = pos.x;
              apple.y = pos.y;
            }

            // check collision with all cells after this one (modified bubble sort)
            for (var i = index + 1; i < this.cells.length; i++) {
              // collision, reset game
              if (cell.x === this.cells[i].x && cell.y === this.cells[i].y) {
                reset();
              }
            }
          }.bind(this)
        );
      },
      render: function () {
        this.context.fillStyle = this.color;

        this.cells.forEach(
          function (cell) {
            this.context.fillRect(cell.x - this.x, cell.y - this.y, grid - 1, grid - 1);
          }.bind(this)
        );
      }
    });

    var pos = getApplePos();
    apple.init({
      x: pos.x,
      y: pos.y,
      color: 'red',
      width: grid - 1,
      height: grid - 1
    });
  }

  // we don't want the controls to update at 15fps so we'll update the movement
  // outside the game loop for more tight feeling controls
  kontra.onKey('arrowleft', function () {
    // prevent snake from backtracking on itself
    if (snake.dx === 0) {
      snake.dx = -grid;
      snake.dy = 0;
    }
  });
  kontra.onKey('arrowup', function () {
    if (snake.dy === 0) {
      snake.dy = -grid;
      snake.dx = 0;
    }
  });
  kontra.onKey('arrowright', function () {
    if (snake.dx === 0) {
      snake.dx = grid;
      snake.dy = 0;
    }
  });
  kontra.onKey('arrowdown', function () {
    if (snake.dy === 0) {
      snake.dy = grid;
      snake.dx = 0;
    }
  });

  var loop = kontra.GameLoop({
    fps: 15, // snake plays great at 15fps
    update: function () {
      snake.update();
    },
    render: function () {
      apple.render();
      snake.render();
    }
  });

  reset();
  loop.start();
})();


text:
<?php
	/**
 * An page to display the sourcecode.
 */
   // Include the essential config-file which also creates the $alpha variable with its defaults.
//    include(__DIR__.'/config.php');
include ("config.php");

   //Add the style sheet
   $alpha['stylesheets'][] = 'css/tables.css';
   $alpha['stylesheets'][] = 'css/style.css';

   // Connect to a MySQL database using PHP PDO
   $db = new CDatabase($alpha['database']);
   //instantiate blog
   $blog = new CBlog($db);
   //instantiate user
   $user = new CUser($db);
   //instantiate text filter
   $filter = new CTextFilter();
   //instantiate content class for pagination
   $content = new CContent($db);

   // Get parameters
   $id     = isset($_POST['id'])    ? strip_tags($_POST['id']) : (isset($_GET['id']) ? strip_tags($_GET['id']) : null);
   $save   = isset($_POST['save'])  ? true : false;
   // Get parameters
   $password = isset($_POST['password']) ? $_POST['password'] : null;
   $acronym = isset($_SESSION['user']) ? $_SESSION['user']->acronym : null;
   $newacronym  = isset($_POST['acronym']) ? strip_tags($_POST['acronym']) : null;
   $logedUser = isset($_SESSION['user']) ? $_SESSION['user']->acronym : null;
   $name = isset($_POST['name']) ? strip_tags($_POST['name'])  : null;
   $img_path  = isset($_POST['image_path'])  ? strip_tags($_POST['price'])  : null;
   $img_name  = isset($_POST['img_name']) ? strip_tags($_POST['img_name']) : null;
   $showall = isset($_POST['showall']) ? $_POST['showall'] : null;

   if($showall){
      header('Location: user_admin.php');
   }

   if(isset($_POST['logout'])):
   $user->logoutUser();
   header('Location: login.php');
   endif;

   // Check that incoming parameters are valid
   isset($acronym) or die('Check: You must login to edit.');
   is_numeric($id) or die('Check: Id must be numeric.');

   $logedInUser = $user -> selectUserID($id);

   // echo $logedInUser->acronym;
   // echo $acronym. " now logged in ";

   $output = null;
   // Check if form was submitted
   if($save){

      $acronym = $newacronym;

      //provide access only for admin or the user in question
      if(($_SESSION['user']->acronym  == $logedInUser->acronym) || ($_SESSION['user']->acronym  == "admin") ){

         $output = $user-> updateUser($acronym,  $name, $password, $id);

      }else{
         $output = "

Unable to proceed with your request you are signed in as:
" . $_SESSION['user']->acronym;
         $output .= " logout and re-log in with  appropriate user name" . '<form method=post>

<input type="submit" name="logout" value="Logout"/>

		</form>';

         //output user info
         //output user info
         //$myuser = $user -> selectUserID($id);
         //header('Location: user_admin.php');
      }

      //header('Location: user_admin.php');
   }else {
      //output user info
      $myuser = $user -> selectUserID($id);

      // Sanitize content before using it.
      $id  = htmlentities($myuser->id, null, 'UTF-8');
      $acronym   = htmlentities($myuser->acronym, null, 'UTF-8');
      $name    = htmlentities($myuser->name, null, 'UTF-8');
      $password   = htmlentities($myuser->password, null, 'UTF-8');

   }

	// Create the data array which is to be used in the template file.
	$alpha ['title'] = "Edit User";
	$alpha ['meta_description'] = "this is the homepage";
	$alpha ['main'] = <<<EOD

{$alpha['title']}

      <form method=post>
        <fieldset>
        <legend>Update user data</legend>
        <input type='hidden' name='id' value='{$id}'/>

Acronym:
<input type='text' name='acronym' value='{$acronym}'/>

Name:
<input type='text' name='name' value='{$name}'/>

Password:
<input type='password' name='password' value='{$password}'/>

<input type='submit' name='save' value='Save' class= 'button'/> <input type='reset' value='Reset' class= 'button'/>

<input type='submit' name='showall' value='Show all' class= 'button'/>

<output>{$output}</output>

        </fieldset>
      </form>
EOD;

$alpha['footer3'] = <<<EOD

EOD;

	// Hand over to the template engine.
	include (__DIR__ . "/theme/template.php");


text:
<?php

namespace Park\ThroughBundle;

use Symfony\Component\HttpKernel\Bundle\Bundle;

class ParkThroughBundle extends Bundle
{
}


text:
#include "include/pybind11/pybind11.h"
#include "include/pybind11/pytypes.h"
#include "tensorflow/lite/testing/string_util.h"
#include "tensorflow/python/lib/core/pybind11_lib.h"

namespace py = pybind11;

PYBIND11_MODULE(_pywrap_string_util, m) {
  m.doc() = R"pbdoc(
    _pywrap_string_util
    -----
  )pbdoc";
  m.def(
      "SerializeAsHexString",
      [](py::handle& string_tensor) {
        return tensorflow::pyo_or_throw(
            tflite::testing::python::SerializeAsHexString(string_tensor.ptr()));
      },
      R"pbdoc(
      Serializes TF Lite dynamic buffer format as a HexString.
    )pbdoc");
}


text:
<?php
/**
 * CMB text_date field type
 *
 * @since  2.2.2
 *
 * @category  WordPress_Plugin
 * @package   CMB2
 * @author    WebDevStudios
 * @license   GPL-2.0+
 * @link      http://webdevstudios.com
 */
class CMB2_Type_Text_Date extends CMB2_Type_Picker_Base {

	public function render() {
		$args = $this->parse_args( 'text_date', array(
			'class'           => 'cmb2-text-small cmb2-datepicker',
			'value'           => $this->field->get_timestamp_format(),
			'desc'            => $this->_desc(),
			'js_dependencies' => array( 'jquery-ui-core', 'jquery-ui-datepicker' ),
		) );

		if ( false === strpos( $args['class'], 'timepicker' ) ) {
			$this->parse_picker_options( 'date' );
		}

		return parent::render( $args );
	}

}


text:
import {
	DRAFT_STATE,
	DRAFTABLE,
	hasSet,
	Objectish,
	Drafted,
	AnyObject,
	AnyMap,
	AnySet,
	ImmerState,
	hasMap,
	Archtype,
	die
} from "../internal"

/** Returns true if the given value is an Immer draft */
/*#__PURE__*/
export function isDraft(value: any): boolean {
	return !!value && !!value[DRAFT_STATE]
}

/** Returns true if the given value can be drafted by Immer */
/*#__PURE__*/
export function isDraftable(value: any): boolean {
	if (!value) return false
	return (
		isPlainObject(value) ||
		Array.isArray(value) ||
		!!value[DRAFTABLE] ||
		!!value.constructor[DRAFTABLE] ||
		isMap(value) ||
		isSet(value)
	)
}

const objectCtorString = Object.prototype.constructor.toString()
/*#__PURE__*/
export function isPlainObject(value: any): boolean {
	if (!value || typeof value !== "object") return false
	const proto = Object.getPrototypeOf(value)
	if (proto === null) {
		return true
	}
	const Ctor =
		Object.hasOwnProperty.call(proto, "constructor") && proto.constructor

	if (Ctor === Object) return true

	return (
		typeof Ctor == "function" &&
		Function.toString.call(Ctor) === objectCtorString
	)
}

/** Get the underlying object that is represented by the given draft */
/*#__PURE__*/
export function original<T>(value: T): T | undefined
export function original(value: Drafted<any>): any {
	if (!isDraft(value)) die(23, value)
	return value[DRAFT_STATE].base_
}

/*#__PURE__*/
export const ownKeys: (target: AnyObject) => PropertyKey[] =
	typeof Reflect !== "undefined" && Reflect.ownKeys
		? Reflect.ownKeys
		: typeof Object.getOwnPropertySymbols !== "undefined"
		? obj =>
				Object.getOwnPropertyNames(obj).concat(
					Object.getOwnPropertySymbols(obj) as any
				)
		: /* istanbul ignore next */ Object.getOwnPropertyNames

export const getOwnPropertyDescriptors =
	Object.getOwnPropertyDescriptors ||
	function getOwnPropertyDescriptors(target: any) {
		// Polyfill needed for Hermes and IE, see https://github.com/facebook/hermes/issues/274
		const res: any = {}
		ownKeys(target).forEach(key => {
			res[key] = Object.getOwnPropertyDescriptor(target, key)
		})
		return res
	}

export function each<T extends Objectish>(
	obj: T,
	iter: (key: string | number, value: any, source: T) => void,
	enumerableOnly?: boolean
): void
export function each(obj: any, iter: any, enumerableOnly = false) {
	if (getArchtype(obj) === Archtype.Object) {
		;(enumerableOnly ? Object.keys : ownKeys)(obj).forEach(key => {
			if (!enumerableOnly || typeof key !== "symbol") iter(key, obj[key], obj)
		})
	} else {
		obj.forEach((entry: any, index: any) => iter(index, entry, obj))
	}
}

/*#__PURE__*/
export function getArchtype(thing: any): Archtype {
	/* istanbul ignore next */
	const state: undefined | ImmerState = thing[DRAFT_STATE]
	return state
		? state.type_ > 3
			? state.type_ - 4 // cause Object and Array map back from 4 and 5
			: (state.type_ as any) // others are the same
		: Array.isArray(thing)
		? Archtype.Array
		: isMap(thing)
		? Archtype.Map
		: isSet(thing)
		? Archtype.Set
		: Archtype.Object
}

/*#__PURE__*/
export function has(thing: any, prop: PropertyKey): boolean {
	return getArchtype(thing) === Archtype.Map
		? thing.has(prop)
		: Object.prototype.hasOwnProperty.call(thing, prop)
}

/*#__PURE__*/
export function get(thing: AnyMap | AnyObject, prop: PropertyKey): any {
	// @ts-ignore
	return getArchtype(thing) === Archtype.Map ? thing.get(prop) : thing[prop]
}

/*#__PURE__*/
export function set(thing: any, propOrOldValue: PropertyKey, value: any) {
	const t = getArchtype(thing)
	if (t === Archtype.Map) thing.set(propOrOldValue, value)
	else if (t === Archtype.Set) {
		thing.delete(propOrOldValue)
		thing.add(value)
	} else thing[propOrOldValue] = value
}

/*#__PURE__*/
export function is(x: any, y: any): boolean {
	// From: https://github.com/facebook/fbjs/blob/c69904a511b900266935168223063dd8772dfc40/packages/fbjs/src/core/shallowEqual.js
	if (x === y) {
		return x !== 0 || 1 / x === 1 / y
	} else {
		return x !== x && y !== y
	}
}

/*#__PURE__*/
export function isMap(target: any): target is AnyMap {
	return hasMap && target instanceof Map
}

/*#__PURE__*/
export function isSet(target: any): target is AnySet {
	return hasSet && target instanceof Set
}
/*#__PURE__*/
export function latest(state: ImmerState): any {
	return state.copy_ || state.base_
}

/*#__PURE__*/
export function shallowCopy(base: any) {
	if (Array.isArray(base)) return Array.prototype.slice.call(base)
	const descriptors = getOwnPropertyDescriptors(base)
	delete descriptors[DRAFT_STATE as any]
	let keys = ownKeys(descriptors)
	for (let i = 0; i < keys.length; i++) {
		const key: any = keys[i]
		const desc = descriptors[key]
		if (desc.writable === false) {
			desc.writable = true
			desc.configurable = true
		}
		// like object.assign, we will read any _own_, get/set accessors. This helps in dealing
		// with libraries that trap values, like mobx or vue
		// unlike object.assign, non-enumerables will be copied as well
		if (desc.get || desc.set)
			descriptors[key] = {
				configurable: true,
				writable: true, // could live with !!desc.set as well here...
				enumerable: desc.enumerable,
				value: base[key]
			}
	}
	return Object.create(Object.getPrototypeOf(base), descriptors)
}

/**
 * Freezes draftable objects. Returns the original object.
 * By default freezes shallowly, but if the second argument is `true` it will freeze recursively.
 *
 * @param obj
 * @param deep
 */
export function freeze<T>(obj: T, deep?: boolean): T
export function freeze<T>(obj: any, deep: boolean = false): T {
	if (isFrozen(obj) || isDraft(obj) || !isDraftable(obj)) return obj
	if (getArchtype(obj) > 1 /* Map or Set */) {
		obj.set = obj.add = obj.clear = obj.delete = dontMutateFrozenCollections as any
	}
	Object.freeze(obj)
	if (deep) each(obj, (key, value) => freeze(value, true), true)
	return obj
}

function dontMutateFrozenCollections() {
	die(2)
}

export function isFrozen(obj: any): boolean {
	if (obj == null || typeof obj !== "object") return true
	// See #600, IE dies on non-objects in Object.isFrozen
	return Object.isFrozen(obj)
}


text:
using System;
using System.Threading.Tasks;

namespace Dependinator.Common.Installation
{
    internal interface ILatestVersionService
    {
        event EventHandler OnNewVersionAvailable;

        void StartCheckForLatestVersion();
        Task CheckLatestVersionAsync();
    }
}


text:
layout: "page"
header_img:
  url: "assets/img/taxonomy.jpg"
  author: "Manuele Sangalli"

generator: "taxonomy"
max_page: 5
taxonomy_attribute: "categories"
permalink: "/:name"
---

{{ page.term|capitalize}} category posts

{% for post in page.pagination.items %}

            {{ post.title }}

        {% if post.subtitle %}

            {{ post.subtitle }}

        {% endif %}

Posted by {{ post.author }} on {{ post.date | date('F jS \\a\\t g:ia') }}

        {% for category in post.categories %}
            [{{ category }}]
        {% endfor %}

{% endfor %}

{% include "paginator.html" %}


text:
<!DOCTYPE html>

        <meta charset="utf-8" />
        <meta name="format-detection" content="telephone=no" />
        <meta name="msapplication-tap-highlight" content="no" />

        <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
        <link rel="stylesheet" type="text/css" href="css/index.css" />
        <title>ToDo</title>

ToDo App

Connecting to Device

Device is Ready


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>relation-algebra: 7 m 13 s 🏆</title>
    <link rel="shortcut icon" type="image/png" href="../../../../../favicon.png" />
    <link href="../../../../../bootstrap.min.css" rel="stylesheet">
    <link href="../../../../../bootstrap-custom.css" rel="stylesheet">
    <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet">

             Coq bench

clean / released

8.4.6 / relation-algebra - 1.3

            « Up

              relation-algebra

                1.3
                7 m 13 s 🏆

📅  (2022-07-19 13:15:27 UTC)

Context

# Packages matching: installed
# Name              # Installed # Synopsis
base-bigarray       base
base-num            base        Num library distributed with the OCaml compiler
base-ocamlbuild     base        OCamlbuild binary and libraries distributed with the OCaml compiler
base-threads        base
base-unix           base
camlp5              7.14        Preprocessor-pretty-printer of OCaml
conf-findutils      1           Virtual package relying on findutils
conf-perl           2           Virtual package relying on perl
coq                 8.4.6       Formal proof management system.
num                 0           The Num library for arbitrary-precision integer and rational arithmetic
ocaml               4.02.3      The OCaml compiler (virtual package)
ocaml-base-compiler 4.02.3      Official 4.02.3 release
ocaml-config        1           OCaml Switch Configuration
ocamlbuild          0           Build system distributed with the OCaml compiler since OCaml 3.10.0
# opam file:
opam-version: "2.0"
maintainer: "Damien Pous <Damien.Pous@ens-lyon.fr>"
homepage: "http://perso.ens-lyon.fr/damien.pous/ra/"
license: "LGPL"
build: [
  ["coq_makefile" "-f" "Make" "-o" "Makefile"]
# No "-j%{jobs}%" option.
  [make]
]
install: [make "install"]
depends: [
  "ocaml"
  "coq" {>= "8.4" & < "8.5~" & != "8.4.6~camlp4"}
]
tags: [
  "keyword:relation algebra"
  "keyword:Kleene algebra with tests"
  "keyword:KAT"
  "keyword:allegories"
  "keyword:residuated structures"
  "keyword:automata"
  "keyword:regular expressions"
  "keyword:matrices"
  "category:Mathematics/Algebra"
  "logpath:RelationAlgebra"
]
authors: [ "Damien Pous <Damien.Pous@ens-lyon.fr>" ]
synopsis: "Relation Algebra and KAT"
description:
  "A modular library about relation algebra, from idempotent semirings to residuated Kleene allegories, including a decision tactic for Kleene algebra with Tests (KAT)."
url {
  src: "http://perso.ens-lyon.fr/damien.pous/ra/RelationAlgebra-1.3.tar.gz"
  checksum: "md5=dca5ff29d70a70e62d233b742561bd87"
}

Lint

Command

true

Return code

0

Dry install 🏜

Dry install with the current Coq version:

Command

opam install -y --show-action coq-relation-algebra.1.3 coq.8.4.6

Return code

0

Dry install without Coq/switch base, to test if the problem was incompatibility with the current Coq/OCaml version:

Command

true

Return code

0

Install dependencies

Command

opam list; echo; ulimit -Sv 4000000; timeout 4h opam install -y --deps-only coq-relation-algebra.1.3 coq.8.4.6

Return code

0

Duration

11 s

Install 🚀

Command

opam list; echo; ulimit -Sv 16000000; timeout 4h opam install -y -v coq-relation-algebra.1.3 coq.8.4.6

Return code

0

Duration

7 m 13 s

Installation size

Total: 8 M

1022 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/paterson.vo

1003 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/kat_completeness.vo

695 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/compiler_opts.vo

457 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/normalisation.vo

448 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/untyping.vo

340 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/monoid.vo

255 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/matrix.vo

223 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/regex.vo

207 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/rmx.vo

195 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/traces.vo

172 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/syntax.vo

166 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/lattice.vo

166 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/imp.vo

154 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/kat_reification.cmxs

137 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/matrix_ext.vo

135 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/ugregex_dec.vo

133 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/ra_common.cmxs

115 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/ka_completeness.vo

103 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/move.vo

102 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/ra_fold.cmxs

85 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/nfa.vo

82 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/kleene.vo

82 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/kat_tac.vo

78 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/gregex.vo

68 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/ra_reification.cmxs

66 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/ordinal.vo

65 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/kat_reification.vo

61 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/sups.vo

60 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/ugregex.vo

55 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/mrewrite.cmxs

53 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/comparisons.vo

52 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/level.vo

49 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/atoms.vo

47 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/lang.vo

38 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/lsyntax.vo

38 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/dfa.vo

35 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/rewriting.vo

34 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/kat_reification.cma

33 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/bmx.vo

31 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/glang.vo

31 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/kat.vo

30 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/rel.vo

28 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/boolean.vo

28 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/lset.vo

27 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/pair.vo

24 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/ra_fold.cmo

23 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/ra_common.cmi

23 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/kat_untyping.vo

21 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/factors.vo

18 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/ra_common.cmo

15 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/positives.vo

14 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/ra_reification.cmo

13 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/common.vo

13 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/denum.vo

12 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/mrewrite.cmo

11 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/powerfix.vo

11 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/kat_reification.cmi

9 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/sums.vo

6 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/mrewrite.cmi

6 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/ra_reification.cmi

6 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/prop.vo

5 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/ra_fold.cmi

2 K ../ocaml-base-compiler.4.02.3/lib/coq/user-contrib/RelationAlgebra/kat_dec.cmi

Uninstall 🧹

Command

opam remove -y coq-relation-algebra.1.3

Return code

0

Missing removes

                none

Wrong removes

                none

          Sources are on GitHub © Guillaume Claret 🐣


text:
package dtls

import "github.com/pion/dtls/v2/pkg/protocol/recordlayer"

type packet struct {
	record                   *recordlayer.RecordLayer
	shouldEncrypt            bool
	resetLocalSequenceNumber bool
}


text:
class RenameMediaSortResteToNuesse < ActiveRecord::Migration[5.2]
  def change
    Medium.where(sort: 'Reste').each do |m|
      m.update(sort: 'Nuesse')
    end
  end
end


text:
using System;

/// <summary>
/// IsPositiveInfinity(System.Double)
/// </summary>

public class DoubleIsPositiveInfinity
{
    #region Public Methods
    public bool RunTests()
    {
        bool retVal = true;

        TestLibrary.TestFramework.LogInformation("[Positive]");
        retVal = PosTest1() && retVal;
        retVal = PosTest2() && retVal;
        retVal = PosTest3() && retVal;

        return retVal;
    }

    #region Positive Test Cases
    public bool PosTest1()
    {
        bool retVal = true;

        // Add your scenario description here
        TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Method IsPositiveInfinity when Double is Positive value.");

        try
        {
            Double d;
            do
                d = TestLibrary.Generator.GetDouble(-55);
            while (d == 0);

            if (!Double.IsPositiveInfinity(d / 0))
            {
                TestLibrary.TestFramework.LogError("001.1", "Method IsPositiveInfinity(System.Double) Err.");
                retVal = false;
            }

        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("001.2", "Unexpected exception: " + e);
            TestLibrary.TestFramework.LogInformation(e.StackTrace);
            retVal = false;
        }

        return retVal;
    }

    public bool PosTest2()
    {
        bool retVal = true;

        // Add your scenario description here
        TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Method IsPositiveInfinity when Double is Negative value.");

        try
        {
            Double d;
            do
                d = -TestLibrary.Generator.GetDouble(-55);
            while (d == 0);

            if (Double.IsPositiveInfinity(d / 0))
            {
                TestLibrary.TestFramework.LogError("002.1", "Method IsPositiveInfinity(System.Double) Err.");
                retVal = false;
            }

        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("002.2", "Unexpected exception: " + e);
            TestLibrary.TestFramework.LogInformation(e.StackTrace);
            retVal = false;
        }

        return retVal;
    }

    public bool PosTest3()
    {
        bool retVal = true;

        // Add your scenario description here
        TestLibrary.TestFramework.BeginScenario("PosTest1: Verify Method IsPositiveInfinity when Double is zero value.");

        try
        {
            Double d = 0.00D;

            if (Double.IsPositiveInfinity(d / 0))
            {
                TestLibrary.TestFramework.LogError("003.1", "Method IsPositiveInfinity(System.Double) Err.");
                retVal = false;
            }

        }
        catch (Exception e)
        {
            TestLibrary.TestFramework.LogError("003.2", "Unexpected exception: " + e);
            TestLibrary.TestFramework.LogInformation(e.StackTrace);
            retVal = false;
        }

        return retVal;
    }
    #endregion

    #region Nagetive Test Cases
    //public bool NegTest1()
    //{
    //    bool retVal = true;

    //    TestLibrary.TestFramework.BeginScenario("NegTest1: ");

    //    try
    //    {
    //          //
    //          // Add your test logic here
    //          //
    //    }
    //    catch (Exception e)
    //    {
    //        TestLibrary.TestFramework.LogError("101", "Unexpected exception: " + e);
    //        TestLibrary.TestFramework.LogInformation(e.StackTrace);
    //        retVal = false;
    //    }

    //    return retVal;
    //}
    #endregion
    #endregion

    public static int Main()
    {
        DoubleIsPositiveInfinity test = new DoubleIsPositiveInfinity();

        TestLibrary.TestFramework.BeginTestCase("DoubleIsPositiveInfinity");

        if (test.RunTests())
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("PASS");
            return 100;
        }
        else
        {
            TestLibrary.TestFramework.EndTestCase();
            TestLibrary.TestFramework.LogInformation("FAIL");
            return 0;
        }
    }
}


text:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:paddingLeft="@dimen/activity_horizontal_margin"
              android:paddingRight="@dimen/activity_horizontal_margin"
              android:paddingTop="@dimen/activity_vertical_margin"
              android:paddingBottom="@dimen/activity_vertical_margin"
              android:gravity="center_vertical|center_horizontal">
    <Button
        android:layout_width="@dimen/content_button_width"
        android:layout_height="wrap_content"
        android:text="@string/sign_out_button_text"
        android:id="@+id/logoutButton"
        android:layout_gravity="center_horizontal"/>

    <Button
        android:layout_width="@dimen/content_button_width"
        android:layout_height="wrap_content"
        android:text="@string/change_creds_button_text"
        android:id="@+id/changeCredsButton"
        android:layout_gravity="center_horizontal" />

</LinearLayout>


text:
from templates.SAMBRO.controllers import index, subscriptions, user_info, alert_hub_cop

class alert_map(index):
    pass

class index(alert_hub_cop):
    pass


text:
define(function(require, exports, module) {

var objectToString = Object.prototype.toString;

/**
 * Return true if it is a String
 */
exports.isString = function(it) {
    return it && objectToString.call(it) === "[object String]";
};

/**
 * Returns true if it is a Boolean.
 */
exports.isBoolean = function(it) {
    return it && objectToString.call(it) === "[object Boolean]";
};

/**
 * Returns true if it is a Number.
 */
exports.isNumber = function(it) {
    return it && objectToString.call(it) === "[object Number]" && isFinite(it);
};

/**
 * Hack copied from dojo.
 */
exports.isObject = function(it) {
    return it !== undefined &&
        (it === null || typeof it == "object" ||
        Array.isArray(it) || exports.isFunction(it));
};

/**
 * Is the passed object a function?
 * From dojo.isFunction()
 */
exports.isFunction = function(it) {
    return it && objectToString.call(it) === "[object Function]";
};

});


text:
<?php

declare(strict_types=1);

namespace RabbitEvents\Listener\Message;

use Illuminate\Contracts\Events\Dispatcher as EventsDispatcher;
use RabbitEvents\Foundation\Message;
use RabbitEvents\Listener\Events\ListenerHandlerExceptionOccurred;
use RabbitEvents\Listener\Events\ListenerHandleFailed;
use RabbitEvents\Listener\Events\ListenerHandled;
use RabbitEvents\Listener\Events\ListenerHandling;
use RabbitEvents\Listener\Exceptions\FailedException;
use RabbitEvents\Listener\Facades\RabbitEvents;
use Throwable;

class Processor
{
    public function __construct(private HandlerFactory $handlerFactory, private EventsDispatcher $events)
    {
    }

    /**
     * Fire an event and call the listeners.
     *
     * @throws Throwable
     */
    public function process(Message $message, ProcessingOptions $options): void
    {
        foreach (RabbitEvents::getListeners($message->event()) as $listener) {
            [$class, $callback] = $listener;

            $response = $this->runHandler(
                $this->handlerFactory->make($message, $callback, $class),
                $options
            );

            // If a boolean false is returned from a listener, we will stop propagating
            // the event to any further listeners down in the chain, else we keep on
            // looping through the listeners and run every one in our sequence.
            if ($response === false) {
                break;
            }
        }
    }

    /**
     * Process concrete listener
     *
     * @param Handler $handler
     * @param ProcessingOptions $options
     * @return mixed
     * @throws Throwable
     */
    public function runHandler(Handler $handler, ProcessingOptions $options): mixed
    {
        try {
            $this->raiseBeforeEvent($handler);

            $response = $handler->handle();

            $this->raiseAfterEvent($handler);

            return $response;
        } catch (Throwable $e) {
            $this->handleException($handler, $options, $e);
        }
    }

    /**
     * Handle an exception that occurred while the job was running.
     *
     * @param Handler $handler
     * @param ProcessingOptions $options
     * @param Throwable $exception
     * @return void
     *
     * @throws Throwable
     */
    protected function handleException(Handler $handler, ProcessingOptions $options, Throwable $exception): void
    {
        try {
            if ($exception instanceof FailedException) {
                $this->handleFail($handler, $exception);
            }

            // First, we will go ahead and mark the job as failed if it will exceed the maximum
            // attempts it is allowed to run the next time we process it. If so we will just
            // go ahead and mark it as failed now, so we do not have to release this again.
            if (!$handler->hasFailed()) {
                $this->markAsFailedIfWillExceedMaxAttempts($handler, $options->maxTries, $exception);
            }

            $this->raiseExceptionOccurredEvent($handler, $exception);
        } finally {
            // If we catch an exception, we will attempt to release the job back onto the queue
            // so it is not lost entirely. This'll let the job be retried at a later time by
            // another listener (or this same one). We will re-throw this exception after.
            if ($this->couldBeReleased($handler)) {
                $handler->release($options->sleep);
            }
        }

        throw $exception;
    }

    protected function couldBeReleased(Handler $handler)
    {
        return !$handler->isReleased() && !$handler->hasFailed();
    }

    /**
     * Mark the given job as failed if it has exceeded the maximum allowed attempts.
     *
     * @param Handler $handler
     * @param int $maxTries
     * @param Throwable $exception
     * @return void
     */
    protected function markAsFailedIfWillExceedMaxAttempts(Handler $handler, int $maxTries, Throwable $exception): void
    {
        if ($maxTries > 0 && $handler->attempts() >= $maxTries) {
            $this->handleFail($handler, $exception);
        }
    }

    protected function handleFail(Handler $handler, Throwable $exception): void
    {
        try {
            $handler->fail($exception);
        } finally {
            $this->raiseFailedHandleEvent($handler, $exception);
        }
    }

    /**
     * Raise the before queue job event.
     */
    protected function raiseBeforeEvent(Handler $handler): void
    {
        $this->events->dispatch(new ListenerHandling($handler));
    }

    /**
     * Raise the after queue job event.
     */
    protected function raiseAfterEvent(Handler $handler): void
    {
        $this->events->dispatch(new ListenerHandled($handler));
    }

    /**
     * Raise the exception occurred queue job event.
     *
     * @param Handler $handler
     * @param Throwable $exception
     * @return void
     */
    protected function raiseExceptionOccurredEvent(Handler $handler, Throwable $exception): void
    {
        $this->events->dispatch(new ListenerHandlerExceptionOccurred($handler, $exception));
    }

    /**
     * Raise the failed queue job event.
     */
    protected function raiseFailedHandleEvent(Handler $handler, Throwable $exception): void
    {
        $this->events->dispatch(new ListenerHandleFailed($handler, $exception));
    }
}


text:
Building
===============

Basics
------

UaRoads uses [Gradle](http://gradle.org) to build the project and to maintain
dependencies.  However, you needn't install it yourself; the
"gradle wrapper" `gradlew`, mentioned below, will do that for you.

Building UaRoads
---------------

The following steps should help you (re)build UaRoads from the command line.

1. Checkout the UaRoads-Android project source with the command:

        git clone https://github.com/stfalcon-studio/uaroads_android.git

2. Make sure you have the [Android SDK](https://developer.android.com/sdk/index.html) installed.
3. Ensure that the following packages are installed from the Android SDK manager:
    * Android SDK Build Tools (see buildToolsVersion in build.gradle)
    * SDK Platform (API level 22)
    * Android Support Repository
    * Google Repository
4. Create a local.properties file at the root of your source checkout and add an sdk.dir entry to it.  For example:

        sdk.dir=/Application/android-sdk-macosx

5. Execute Gradle:

        ./gradlew build

Setting up a development environment
------------------------------------

[Android Studio](https://developer.android.com/sdk/installing/studio.html) is the recommended development environment.

1. Install Android Studio.
2. Open Android Studio. On a new installation, the Quickstart panel will appear. If you have open projects, close them using "File > Close Project" to see the Quickstart panel.
3. From the Quickstart panel, choose "Configure" then "SDK Manager".
4. In the SDK Tools tab of the SDK Manager, make sure that the "Android Support Repository" is installed, and that the latest "Android SDK build-tools" are installed. Click "OK" to return to the Quickstart panel.
5. From the Quickstart panel, choose "Checkout from Version Control" then "git".
6. Paste the URL for the Signal-Android project when prompted (https://github.com/stfalcon-studio/uaroads_android.git).
7. Android studio should detect the presence of a project file and ask you whether to open it. Click "yes".
9. Default config options should be good enough.
9. Project initialisation and build should proceed.

Contributing code
-----------------

Code contributions should be sent via github as pull requests, from feature branches [as explained here](https://help.github.com/articles/using-pull-requests).


text:
'use strict';

const DS2482 = require('ds2482');
const ReadableStream = require('readable-stream');
const cmds = require('./commands');
const utils = require('./utils');

const FAMILY = 0x28;
const SCRATCHPAD_SIZE = 9;
const DEFAULT_POLL_RATE = 30; // seconds

class DS18B20 extends ReadableStream {
  constructor(options) {
    super({objectMode: true});

    // eslint-disable-next-line no-param-reassign
    options = options || {};

    this.wire = options.wire || new DS2482(options);
    this.units = /^f/i.test(options.units) ? 'F' : 'C';

    this.sensors = [];

    this._read = utils.asyncThrottle(() => {
      if (this._destroyed) return Promise.reject();

      return Promise.resolve(this.sensors.length || this.search())
      .then(() => this.readTemperatures())
      .then(values => {
        if (!this._destroyed) {
          for (let i = 0; i < values.length; i += 1) {
            if (!this.push(values[i])) break;
          }
        }
      })
      .catch(err => {
        this.emit('error', err);
      });
    }, (options.pollRate || DEFAULT_POLL_RATE) * 1000);
  }

  destroy() {
    if (!this._destroyed) {
      this._destroyed = true;
      this._read.cancel();
      this.emit('close');
    }
  }

  init() {
    return this.wire.init();
  }

  search() {
    return this.wire.searchByFamily(FAMILY)
    .then(resp => {
      this.sensors = resp.map(rom => new DS18B20.Sensor(rom, {
        wire: this.wire,
        units: this.units,
      }));

      return this.sensors;
    });
  }

  readTemperatures() {
    const sensors = this.sensors.slice();
    const values = [];

    if (!sensors.length) {
      return Promise.resolve(values);
    }

    const readNextSensor = () => {
      const sensor = sensors[values.length];

      return sensor.readScratchpad()
      .then(resp => {
        values.push({
          rom: sensor.rom,
          value: utils.convertUnits(resp.temperature, this.units),
          units: this.units,
        });

        if (values.length < sensors.length) {
          return readNextSensor();
        }

        return values;
      });
    };

    return this.startConversion()
    .then(() => readNextSensor());
  }

  startConversion(rom) {
    return DS18B20.startConversion(this.wire, rom);
  }

  getPowerMode(rom) {
    return DS18B20.getPowerMode(this.wire, rom);
  }

  writeScratchpad(rom, scratchpad) {
    return DS18B20.writeScratchpad(this.wire, rom, scratchpad);
  }

  readScratchpad(rom) {
    return DS18B20.readScratchpad(this.wire, rom);
  }

  static startConversion(wire, rom) {
    return wire.sendCommand(cmds.CONVERT_TEMP, rom);
  }

  static getPowerMode(wire, rom) {
    return wire.sendCommand(cmds.READ_POWER_SUPPLY, rom)
    .then(() => wire.bit());
  }

  static writeScratchpad(wire, rom, scratchpad) {
    const buffer = Buffer.from([
      scratchpad.alarmHigh || 0,
      scratchpad.alarmLow || 0,
      scratchpad.config || 0,
    ]);

    return wire.sendCommand(cmds.WRITE_SCRATCHPAD, rom)
    .then(() => wire.writeData(buffer));
  }

  static readScratchpad(wire, rom) {
    return wire.sendCommand(cmds.READ_SCRATCHPAD, rom)
    .then(() => wire.readData(SCRATCHPAD_SIZE))
    .then(buffer => {
      if (!DS2482.checkCRC(buffer)) {
        throw new Error('CRC mismatch');
      }

      return {
        temperature: buffer.readInt16LE(0) / 16,
        alarmHigh: buffer.readUInt8(2),
        alarmLow: buffer.readUInt8(3),
        config: buffer.readUInt8(4),
      };
    });
  }
}

class Sensor extends ReadableStream {
  constructor(rom, options) {
    super({objectMode: true});

    // eslint-disable-next-line no-param-reassign
    options = options || {};

    this.rom = rom;

    this.wire = options.wire || new DS2482(options);
    this.units = /^f/i.test(options.units) ? 'F' : 'C';

    this._read = utils.asyncThrottle(() => {
      if (this._destroyed) return Promise.reject();

      return this.readTemperature()
      .then(value => {
        if (!this._destroyed) {
          this.push(value);
        }
      })
      .catch(err => {
        this.emit('error', err);
      });
    }, (options.pollRate || DEFAULT_POLL_RATE) * 1000);
  }

  destroy() {
    if (!this._destroyed) {
      this._destroyed = true;
      this._read.cancel();
      this.emit('close');
    }
  }

  readTemperature() {
    return this.startConversion()
    .then(() => this.readScratchpad())
    .then(resp => (
      utils.convertUnits(resp.temperature, this.units)
    ));
  }

  startConversion() {
    return DS18B20.startConversion(this.wire, this.rom);
  }

  getPowerMode() {
    return DS18B20.getPowerMode(this.wire, this.rom);
  }

  writeScratchpad(scratchpad) {
    return DS18B20.writeScratchpad(this.wire, this.rom, scratchpad);
  }

  readScratchpad() {
    return DS18B20.readScratchpad(this.wire, this.rom);
  }
}

Object.assign(DS18B20, {
  FAMILY,
  SCRATCHPAD_SIZE,
  Sensor,
});

module.exports = DS18B20;


text:
package com.ys.tvnews.views;

import android.content.Context;
import android.os.Handler;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.widget.ScrollView;

public class PersonalScrollView extends ScrollView {

	private OnScrollListener onScrollListener;
	/**
	 * 主要是用在用户手指离开MyScrollView,MyScrollView还在继续滑动,我们用来保存Y的距离,然后做比较
	 */
	private int lastScrollY;

	public PersonalScrollView(Context context) {
		this(context, null);
	}

	public PersonalScrollView(Context context, AttributeSet attrs) {
		this(context, attrs, 0);
	}

	public PersonalScrollView(Context context, AttributeSet attrs, int defStyle) {
		super(context, attrs, defStyle);
	}

	/**
	 * 设置滚动接口
	 *
	 * @param onScrollListener
	 */
	public void setOnScrollListener(OnScrollListener onScrollListener) {
		this.onScrollListener = onScrollListener;
	}

	/**
	 * 用于用户手指离开MyScrollView的时候获取MyScrollView滚动的Y距离,然后回调给onScroll方法中
	 */
	private Handler handler = new Handler() {

		public void handleMessage(android.os.Message msg) {
			int scrollY = PersonalScrollView.this.getScrollY();

			// 此时的距离和记录下的距离不相等,在隔5毫秒给handler发送消息
			if (lastScrollY != scrollY) {
				lastScrollY = scrollY;
				handler.sendMessageDelayed(handler.obtainMessage(), 5);
			}
			if (onScrollListener != null) {
				onScrollListener.onScroll(scrollY);
			}

		};

	};

	/**
	 * 重写onTouchEvent, 当用户的手在MyScrollView上面的时候,
	 * 直接将MyScrollView滑动的Y方向距离回调给onScroll方法中,当用户抬起手的时候,
	 * MyScrollView可能还在滑动,所以当用户抬起手我们隔5毫秒给handler发送消息,在handler处理
	 * MyScrollView滑动的距离
	 */
	@Override
	public boolean onTouchEvent(MotionEvent ev) {
		if (onScrollListener != null) {
			onScrollListener.onScroll(lastScrollY = this.getScrollY());
		}
		switch (ev.getAction()) {
			case MotionEvent.ACTION_UP:
				handler.sendMessageDelayed(handler.obtainMessage(), 5);
				break;
		}
		return super.onTouchEvent(ev);
	}

	/**
	 *
	 * 滚动的回调接口
	 *
	 * @author xiaanming
	 *
	 */
	public interface OnScrollListener {
		/**
		 * 回调方法, 返回MyScrollView滑动的Y方向距离
		 *
		 * @param scrollY
		 *            、
		 */
		public void onScroll(int scrollY);
	}
}


text:
class Bdm < User

  # Effectively only admins are considered BDM's
  default_scope :order => 'name asc', :conditions => [ 'email LIKE ?', "%@compnow.com.au" ]

end


text:
package org.semanticweb.drew.rl.sparql;

import static org.junit.Assert.*;

import java.util.List;

import org.junit.Test;
import org.semanticweb.drew.dlprogram.format.DLProgramStorer;
import org.semanticweb.drew.dlprogram.format.DLProgramStorerImpl;
import org.semanticweb.drew.dlprogram.format.RLProgramStorerImpl;
import org.semanticweb.drew.dlprogram.model.Clause;
import org.semanticweb.drew.el.reasoner.DReWELManager;
import org.semanticweb.drew.el.reasoner.NamingStrategy;
import org.semanticweb.drew.ldlp.reasoner.LDLPQueryCompiler;
import org.semanticweb.drew.rl.sparql.SparqlCompiler;

import com.hp.hpl.jena.query.Query;
import com.hp.hpl.jena.query.QueryFactory;
import com.hp.hpl.jena.query.Syntax;
import com.hp.hpl.jena.sparql.expr.ExprAggregator;

public class SparqlCompilerTest {

	@Test
	public void test() {
		String prefixRDF = "PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> ";
		String queryText = prefixRDF + "PREFIX : <#>" + "SELECT ?X ?Y "
				+ "WHERE {"
				+ "?X rdf:type :preOnt1____ORDERS_LineItemQuantity ."
				+ "?X :preOnt1____hasValue ?Y " + "}";

		Query query = QueryFactory.create(queryText, Syntax.syntaxARQ);
		SparqlCompiler sparqlCompiler = new SparqlCompiler();

		Clause drewQuery = sparqlCompiler.compileQuery(query);
		LDLPQueryCompiler queryCompiler = new LDLPQueryCompiler();
		Clause drewRLQuery = queryCompiler.compileQuery(drewQuery);
		DLProgramStorer storer = new RLProgramStorerImpl();
		storer.store(drewQuery, System.out);
		storer.store(drewRLQuery, System.out);
	}

	@Test
	public void testAggregation() {
		String queryText = "PREFIX ex: <http://example.org/> SELECT (Count(?Item) AS ?C) WHERE { ?Item ex:price ?Pr }";

		Query query = QueryFactory.create(queryText, Syntax.syntaxARQ);

		List<ExprAggregator> aggregators = query.getAggregators();

		for(ExprAggregator agg: aggregators){
			System.out.println(agg);
		}

		SparqlCompiler sparqlCompiler = new SparqlCompiler();
		Clause drewQuery = sparqlCompiler.compileQuery(query);
		LDLPQueryCompiler queryCompiler = new LDLPQueryCompiler();
		Clause drewRLQuery = queryCompiler.compileQuery(drewQuery);
		DLProgramStorer storer = new RLProgramStorerImpl();
		storer.store(drewQuery, System.out);
		storer.store(drewRLQuery, System.out);
	}

}


text:
const char *argp_program_version = "yopaat 0.1.3-a";
const char *argp_program_bug_address = "<https://github.com/ijm7/yopaat/issues>";
static char doc[] = "Tool for parsing inline HTML styles into CSS classes.";
static char args_doc[] = "[INPUT] [OUTPUT]";
static struct argp_option options[] =
{
    { "default", 'd', 0, 0, "Default operation."},
    { 0 }
};
struct arguments
{
    enum { DEFAULT } mode;
    char *args[2];
};

int main(int argc, char* argv[]);
static error_t parse_opt(int key, char *arg, struct argp_state *state);
int validate_args(struct arguments *arguments);
FILE* open_file(char* file_dir);
int close_file(FILE* file);

#endif


text:
<?xml version="1.0" encoding="UTF-8"?>
<extension id="publish_tabs" status="released" xmlns="http://symphony-cms.com/schemas/extension/1.0">
	<name>Publish Tabs</name>
	<description>Add tabs grouped to entry forms</description>
	<repo type="github">https://github.com/symphonists/publish_tabs</repo>
	<url type="discuss">http://symphony-cms.com/discuss/thread/49946/</url>
	<types>
		<type>Interface</type>
	</types>
	<authors>
		<author>
			<name github="symphonists" symphony="community">Symphony Community</name>
		</author>
		<author>
			<name github="nickdunn" symphony="nickdunn">Nick Dunn</name>
			<website>http://nick-dunn.co.uk</website>
		</author>
	</authors>
	<media>
		<item type="image" url="http://symphonyextensions.com/nickdunn/publish_tabs/media/publish_tabs.png">Publish Tabs: Add tab groups to entry create/edit forms</item>
	</media>
	<releases>
		<release version="1.1.2" date="2012-05-17" min="2.3.x" />
		<release version="1.1.1" date="2012-03-26" min="2.3.x" />
		<release version="1.0.2" date="2011-12-11" min="2.2" max="2.2.x" />
		<release version="1.0.1" date="2011-02-07" min="2.2" />
	</releases>
</extension>


text:
//
//  UADDBGetItemRequest.m
//  AWS iOS SDK
//
//  Copyright © Unsigned Apps 2014. See License file.
//  Created by Rob Amos.
//
//

#import "UADDBGetItemRequest.h"
#import "UAAWSAdditionalAccessors.h"
#import "UADDBGetItemResponse.h"

@interface UADDBGetItemRequest ()

@property (nonatomic, copy) NSString *xAmzTarget;

@end

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wincomplete-implementation"

@implementation UADDBGetItemRequest

@synthesize xAmzTarget=_xAmzTarget, tableName=_tableName, key=_key, attributesToGet=_attributesToGet, consistentRead=_consistentRead, returnConsumedCapacity=_returnConsumedCapacity;

- (id)init
{
	if (self = [super init])
	{
		[self setXAmzTarget:@"DynamoDB_20120810.GetItem"];

		[self UA_addDDBKeyValueAdditionalAccessorForSelector:@selector(keyValueForAttributeName:) propertyName:@"key"];
		[self UA_addAtIndexAdditionalAccessorForSelector:@selector(attributeToGetAtIndex:) propertyName:@"attributesToGet"];
		[self UA_addAddObjectAdditionalAccessorForSelector:@selector(addAttributeToGet:) propertyName:@"attributesToGet"];
		[self UA_addSetObjectForKeyAdditionalAccessorForSelector:@selector(setKeyValue:forAttributeName:) propertyName:@"key"];
	}
	return self;
}

- (Class)UA_ResponseClass
{
	return [UADDBGetItemResponse class];
}

+ (NSDictionary *)JSONKeyPathsByPropertyKey
{
    // Start with super's key paths (if there are any)
    NSMutableDictionary *keyPaths = [[UADDBRequest JSONKeyPathsByPropertyKey] mutableCopy];

    [keyPaths addEntriesFromDictionary:
    @{
        @"xAmzTarget": [NSNull null],
        @"tableName": @"TableName",
        @"key": @"Key",
        @"attributesToGet": @"AttributesToGet/AttributesToGet",
        @"consistentRead": @"ConsistentRead",
        @"returnConsumedCapacity": @"ReturnConsumedCapacity"
    }];
    return [keyPaths copy];
}

+ (NSValueTransformer *)keyJSONTransformer
{
    return [NSValueTransformer UA_JSONDynamoDBDictionaryTransformer];
}

+ (NSValueTransformer *)returnConsumedCapacityJSONTransformer
{
    return [NSValueTransformer UA_ENUMTransformerWithValues:@[ @(UADDBReturnConsumedCapacityTypeIndexes), @(UADDBReturnConsumedCapacityTypeTotal), @(UADDBReturnConsumedCapacityTypeNone) ]
                                               stringValues:@[ @"INDEXES", @"TOTAL", @"NONE" ]
                                               unknownValue:@(UADDBReturnConsumedCapacityTypeUnknown)];
}

/*#pragma mark - Invocation

- (void)invokeWithOwner:(id)owner completionBlock:(UADDBGetItemRequestCompletionBlock)completionBlock
{
    [self setUA_Owner:owner];
    [self setUA_RequestCompletionBlock:completionBlock];
    [self invoke];
}

- (void)waitWithOwner:(id)owner shouldContinueWaitingBlock:(UADDBGetItemRequestShouldContinueWaitingBlock)shouldContinueWaitingBlock completionBlock:(UADDBGetItemRequestCompletionBlock)completionBlock
{
    [self setUA_Owner:owner];
    [self setUA_ShouldContinueWaiting:shouldContinueWaitingBlock];
    [self setUA_RequestCompletionBlock:completionBlock];
    [self invoke];
}

- (void)waitWithOwner:(id)owner untilValueAtKeyPath:(NSString *)keyPath isInArray:(NSArray *)array completionBlock:(UADDBGetItemRequestCompletionBlock)completionBlock
{
    [self setUA_Owner:self];
    [self setUA_ShouldContinueWaiting:[UAAWSRequest UA_ShouldContinueWaitingBlockUntilValueAtKeyPath:keyPath isInArray:array]];
    [self setUA_RequestCompletionBlock:completionBlock];
    [self invoke];
}
*/
@end

#pragma clang diagnostic pop


text:
/**Rappresenta il Begin Program
 *
 * @author  Marco Speranza
 * @version 0.1
 */

package org.logo.viewer;

/** Visualizzatore LOGO */
public class VisualizzatoreLogo {

	/** Aggregazione con la classe logoManager */
	LogoManager logoManager;

	/** Creates a new instance of Main */
	public VisualizzatoreLogo() {
		logoManager = new LogoManager();
	}

	public static void main(String[] args) {
		new VisualizzatoreLogo();
	}

}


text:
package jet.bpm.engine.handlers;

import java.util.UUID;
import jet.bpm.engine.api.ExecutionException;
import jet.bpm.engine.AbstractEngine;
import jet.bpm.engine.DefaultExecution;
import jet.bpm.engine.FlowUtils;
import jet.bpm.engine.commands.ProcessElementCommand;
import jet.bpm.engine.commands.ProcessEventMappingCommand;

public class EventBasedGatewayHandler extends AbstractElementHandler {

    public EventBasedGatewayHandler(AbstractEngine engine) {
        super(engine);
    }

    @Override
    public void handle(DefaultExecution s, ProcessElementCommand c) throws ExecutionException {
        s.pop();

        // add the process suspension command to the stack. It is expected that
        // it will be called when all outgoing sequence flows of this gateway
        // is done.
        s.push(new ProcessEventMappingCommand());

        UUID groupId = getEngine().getUuidGenerator().generate();

        // add all elements of outgoing flows of this gateway to the stack
        // and mark them with the 'exclusiveness' flag (this way only one flow
        // can be completed)
        FlowUtils.followFlows(getEngine(), s, c, groupId, true);
    }
}


text:
@doc """
`path = finddir(depname)` find the (versioned) path for a particular
dependency specified by `depname`.  `depname` might be a string, e.g.,
`arpack-ng`, or a tuple representing a subdirectory, e.g.,
`("SuiteSparse","CHOLMOD")`. On output, `path` is the full pathname to
the most recent version of the dependency.
""" ->
finddir(depsdir, depname::Tuple) = joinpath(finddir(depsdir, depname[1]), depname[2:end]...)

function finddir(depsdir, topdir::AbstractString)
    depsnames = readdir(depsdir)
    names = filter(x->isdir(joinpath(depsdir, x)), filter(x->startswith(x, topdir), depsnames))
    versions = map(x->Base.VersionNumber(x[length(topdir)+2:end]), names)
    ind = indmax(versions)
    names[ind]
end


text:
using System;

using System.Collections.Generic;

using System.Text;

using System.Threading;

#endregion

namespace UnregisterWaitNativeBug
{
    class Program
    {
        private int ret = 0;
        private RegisteredWaitHandle[] regWait;
        private readonly AutoResetEvent expectedWaitsCompleted = new AutoResetEvent(false);

        static int Main(string[] args)
        {
            Program p = new Program();
            p.Run();
            Console.WriteLine(100 == p.ret ? "Test Passed" : "Test Failed");
            return p.ret;
        }

        public void Run()
        {
            int size = 100;
            AutoResetEvent[] are = new AutoResetEvent[size];
            regWait = new RegisteredWaitHandle[size];

            for (int i = 0; i < size; i++)
            {
                are[i] = new AutoResetEvent(false);
                regWait[i] = ThreadPool.RegisterWaitForSingleObject((WaitHandle)are[i], new WaitOrTimerCallback(TheCallBack), are[i], -1, false);
            }

            for (int i = 0; i < size; i++)
            {
                are[i].Set();
                are[i] = null;
            }

            if (expectedWaitsCompleted.WaitOne(30_000))
            {
                // Wait a bit longer to verify that there are not any additional wait completions
                Thread.Sleep(50);
            }

            for (int i = 0; i < size; i++)
            {
                regWait[i].Unregister(are[i]);
            }
        }

        public void TheCallBack(object foo, bool state)
        {
            if (Interlocked.Increment(ref ret) == 100)
            {
                expectedWaitsCompleted.Set();
            }
        }
    }
}


text:
These are your webapp deployment testing settings

		The fields below are only needed if you wish to test deploy your webapp.
		If specified, then any push or merge to the configured repository
		will trigger a pull and deployment on the test server.

		You need to configure a webhook in your repository settings,
		pointing at the https://deployer.jlparry.com/please
		endpoint. This would be for both pushes and pulls, and you should specify JSON as the data
		format.

		Your webapp will be accessible through https://xxx.jlparry.com, where 'xxx'
		is your group name.

	<form role="form" action="/vault/update" method="post">
		{forg}
		{frepo}
		{fbranch}

		{fwebsite}
		<input type="submit" class="btn btn-lg btn-success btn-block" value="Update my settings"/>
	</form>


text:
<?php

require '../autoloader.php';

/*
$request = Yampee_Http_Request::createFromGlobals();

throw new Yampee_Http_Exception_AccessDenied();
throw new Yampee_Http_Exception_NotFound();
throw new Yampee_Http_Exception_MethodNotAllowed(array('get', 'post'));
throw new Yampee_Http_Exception_General(500);

$response = new Yampee_Http_Response('content', 200, array());
$response->send();
*/

$session = new Yampee_Http_Session();
$session->set('test', 'value');
$session->setFlash('test', 'value');
$session->get('test');
$session->getFlash('test');
$session->has('test');
$session->hasFlash('test');
$session->remove('test');
$session->removeFlash('test');
$session->all();
$session->allFlashes();