text:
from datetime import datetime

import utm
from traits.api import Instance

from pychron.core.xls.xls_parser import XLSParser
from pychron.dvc.dvc_orm import SampleTbl, ProjectTbl
from pychron.loggable import Loggable

class BaseSampleLoader(Loggable):
    dvc = Instance('pychron.dvc.dvc.DVC')

def extract_value(row, tags):
    for tag in tags:
        if tag in row:
            return row[tag]

def extract_fvalue(row, tags):
    v = extract_value(row, tags)
    if v is not None:
        v = float(v)
    return v

def convert_utm(n, e, zone):
    """
    return lat, lon
    """

    zn = int(zone[:2])
    zl = zone[-1:]
    lat, lon = utm.to_latlon(e, n, zn, zl)
    return float(lat), float(lon)

class XLSSampleLoader(BaseSampleLoader):
    parser = None

    def load(self, p):
        parser = XLSParser()
        parser.load(p)
        self.parser = parser

    def do_import(self):
        dvc = self.dvc
        if self.parser and dvc:
            dvc.create_session()

            rows = list(self.parser.values(lowercase_keys=True))

            with dvc.session_ctx():
                for ri in rows:
                    self._import_principal_investigator(dvc, ri)

                for ri in rows:
                    self._import_project(dvc, ri)

                for ri in rows:
                    self._import_sample(dvc, ri)

    def _import_principal_investigator(self, dvc, row):
        name = extract_value(row, ('pi', 'principal_investigator', 'principal investigator'))
        aff = extract_value(row, ('affiliation',))
        p = dvc.db.add_principal_investigator(name, affiliation=aff)
        dvc.commit()
        row['principal_investigator_record'] = p

    def _import_project(self, dvc, row):
        name = extract_value(row, ('project', 'project_name', 'project name'))
        pi = row['principal_investigator_record']
        proj = None
        for p in pi.projects:
            if p.name == name:
                proj = p

        if proj is None:
            proj = ProjectTbl()
            proj.name = name
            proj.principal_investigator = row['principal_investigator_record']
            proj.checkin_date = datetime.now()
            dvc.add_item(proj)
            dvc.commit()

        row['project_record'] = proj

    def _import_sample(self, dvc, row):
        sam = SampleTbl()

        sam.name = extract_value(row, ('sample', 'sample_name', 'sample name'))
        sam.project = row['project_record']

        material = dvc.get_material(row['material'])
        sam.material = material

        sam.lithology = extract_value(row, ('lith', 'lithology'))
        sam.unit = extract_value(row, ('unit',))
        sam.approximate_age = extract_fvalue(row, ('approximate_age', 'approx. age', 'approximate age'))

        lat = extract_value(row, ('lat', 'latitude'))
        lon = extract_value(row, ('lon', 'long', 'longitude'))

        if lat is None and lon is None:
            northing = extract_value(row, ('n', 'northing', 'utm n', 'utm_n', 'n_utm', 'n utm'))
            easting = extract_value(row, ('e', 'easting', 'utm e', 'utm_e', 'e_utm', 'e utm'))
            zone = extract_value(row, ('zone', 'utm zone', 'utm_zone', 'zone_utm', 'zone utm'))

            lat, lon = convert_utm(northing, easting, zone)

        if lat is not None and lon is not None:
            sam.lat = lat
            sam.lon = lon

        dvc.add_item(sam)

# ============= EOF =============================================


text:
<?php

namespace Ram\Request\V20150501;

class RemoveUserFromGroupRequest extends \RpcAcsRequest
{
	function  __construct()
	{
		parent::__construct("Ram", "2015-05-01", "RemoveUserFromGroup");
		$this->setProtocol("https");
		$this->setMethod("POST");
	}

	private  $groupName;

	private  $userName;

	public function getGroupName() {
		return $this->groupName;
	}

	public function setGroupName($groupName) {
		$this->groupName = $groupName;
		$this->queryParameters["GroupName"]=$groupName;
	}

	public function getUserName() {
		return $this->userName;
	}

	public function setUserName($userName) {
		$this->userName = $userName;
		$this->queryParameters["UserName"]=$userName;
	}

}

redpajama_set_name: RedPajamaGithub


text:
package com.stomachion.aurhelperdroid.utils;

/**
 * Constants - Provide constants used app-wise
 * User: Pedro Veloso
 */
public final class Constants {

    public static final String LOG_TAG = "AURHelperD";
    //switch to True during Development builds
    public static final boolean DEBUG_ACTIVE = true;

    //web urls
    public static final String URL_NEWS_FEED = "https://aur.archlinux.org/rss/";

    // return result types
    public static final int ALL_OK = 1;
    public static final int ERROR_NO_INTERNET = 2;
    public static final int ERROR_OTHER = 3;

    //Intent EXTRAS
    public static final String EXTRA_WEBPAGE_URL = "EXTRA_WEBPAGE_URL";
    public static final String EXTRA_TITLE = "EXTRA_TITLE";

    // Preferences
    public static final String PREF_FIRST_TIME = "FIRST_TIME";
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="DataSourceManagerImpl" format="xml" hash="1253384248">
    <data-source source="LOCAL" name="MySQL - @localhost" uuid="09cf48ad-0da7-4ffa-bb42-e0d85ef7fa4a">
      <driver-ref>mysql</driver-ref>
      <synchronize>true</synchronize>
      <jdbc-driver>com.mysql.jdbc.Driver</jdbc-driver>
      <jdbc-url>jdbc:mysql://localhost:3306</jdbc-url>
      <driver-properties>
        <property name="autoReconnect" value="true" />
        <property name="zeroDateTimeBehavior" value="convertToNull" />
        <property name="tinyInt1isBit" value="false" />
        <property name="characterEncoding" value="utf8" />
        <property name="characterSetResults" value="utf8" />
        <property name="yearIsDateType" value="false" />
      </driver-properties>
    </data-source>
  </component>
</project>


text:
<?php
/**
* page-level stuff
* @author test @
* @package tests
*/
/**
* Debug include file
* @author test @
* @see Debug
*/
require_once(MLIB_INCLUDE_PATH.'/Debug.php');
?>


text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<artifactId>enhanced-pet-clinic</artifactId>
	<name>Enhanced Pet Clinic</name>
	<description>Spring Boot Enhanced Pet Clinic</description>
	<url>http://projects.spring.io/spring-boot/</url>

	<parent>
		<groupId>org.springframework.boot</groupId>
		<artifactId>spring-boot-starter-parent</artifactId>
		<version>1.3.3.RELEASE</version>
	</parent>

	<organization>
		<name>Pivotal Software, Inc.</name>
		<url>http://www.spring.io</url>
	</organization>

	<properties>
		<start-class>sample.ui.SampleWebUiApplication</start-class>

		<java.version>1.8</java.version>

		<!-- Web Flow -->
		<webflow-version>2.4.0.RELEASE</webflow-version>

		<!-- RSS -->
		<rome.version>1.5.0</rome.version>

		<!-- EhCache -->
		<ehcache.version>2.10.1</ehcache.version>

		<!-- Web dependencies -->
		<webjars.bootstrap.version>3.3.6</webjars.bootstrap.version>
		<webjars.jquery.version>2.2.2</webjars.jquery.version>
		<webjars.jquery-ui.version>1.11.4</webjars.jquery-ui.version>
		<webjars.jquery-ui-themes.version>1.11.4</webjars.jquery-ui-themes.version>
		<webjars.datatables.version>1.10.11</webjars.datatables.version>

		<!-- Dandelion dependencies -->
		<dandelion.datatables.version>1.1.0</dandelion.datatables.version>
		<dandelion.ehcache.version>1.1.1</dandelion.ehcache.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-web</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-thymeleaf</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-data-jpa</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-aop</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-security</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-actuator</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-remote-shell</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-devtools</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework.webflow</groupId>
			<artifactId>spring-webflow</artifactId>
			<version>${webflow-version}</version>
			<exclusions>
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<!-- Thymeleaf Spring Security Dialect -->
		<dependency>
			<groupId>org.thymeleaf.extras</groupId>
			<artifactId>thymeleaf-extras-springsecurity4</artifactId>
		</dependency>

		<!-- Thymeleaf - Internet Explorer conditional comments -->
		<dependency>
			<groupId>org.thymeleaf.extras</groupId>
			<artifactId>thymeleaf-extras-conditionalcomments</artifactId>
		</dependency>

		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-validator</artifactId>
		</dependency>

		<!-- Ehcache -->
		<dependency>
			<groupId>net.sf.ehcache</groupId>
			<artifactId>ehcache</artifactId>
			<exclusions>
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<!-- Database -->
		<dependency>
			<groupId>org.hsqldb</groupId>
			<artifactId>hsqldb</artifactId>
			<!-- <scope>runtime</scope> -->
		</dependency>
		<dependency>
			<groupId>mysql</groupId>
			<artifactId>mysql-connector-java</artifactId>
		</dependency>

		<!-- Webjars (static dependencies distributed as JAR files) -->
		<dependency>
			<groupId>org.webjars</groupId>
			<artifactId>bootstrap</artifactId>
			<version>${webjars.bootstrap.version}</version>
		</dependency>
		<dependency>
			<groupId>org.webjars</groupId>
			<artifactId>jquery</artifactId>
			<version>${webjars.jquery.version}</version>
		</dependency>
		<dependency>
			<groupId>org.webjars</groupId>
			<artifactId>jquery-ui</artifactId>
			<version>${webjars.jquery-ui.version}</version>
		</dependency>
		<dependency>
			<groupId>org.webjars</groupId>
			<artifactId>jquery-ui-themes</artifactId>
			<version>${webjars.jquery-ui-themes.version}</version>
		</dependency>
		<dependency>
			<groupId>org.webjars</groupId>
			<artifactId>datatables</artifactId>
			<version>${webjars.datatables.version}</version>
		</dependency>

		<!-- Dandelion Datatables -->
		<dependency>
			<groupId>com.github.dandelion</groupId>
			<artifactId>datatables-thymeleaf</artifactId>
			<version>${dandelion.datatables.version}</version>
		</dependency>
		<dependency>
			<groupId>com.github.dandelion</groupId>
			<artifactId>datatables-export-itext</artifactId>
			<version>${dandelion.datatables.version}</version>
		</dependency>
		<dependency>
			<groupId>com.github.dandelion</groupId>
			<artifactId>datatables-export-poi</artifactId>
			<version>${dandelion.datatables.version}</version>
		</dependency>
		<dependency>
			<groupId>com.github.dandelion</groupId>
			<artifactId>datatables-export-poi-ooxml</artifactId>
			<version>${dandelion.datatables.version}</version>
		</dependency>
		<dependency>
			<groupId>com.github.dandelion</groupId>
			<artifactId>dandelion-ehcache</artifactId>
			<version>${dandelion.ehcache.version}</version>
		</dependency>

		<!-- XML Marshalling -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-oxm</artifactId>
		</dependency>

		<!-- used for Atom -->
		<dependency>
			<groupId>com.rometools</groupId>
			<artifactId>rome</artifactId>
			<version>${rome.version}</version>
		</dependency>

		<!-- Tests -->
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-test</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.4</version>
		</dependency>
		<dependency>
			<groupId>org.projectlombok</groupId>
			<artifactId>lombok</artifactId>
			<version>1.16.8</version>
			<scope>provided</scope>
		</dependency>
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<dependencies>
					<dependency>
						<groupId>org.springframework</groupId>
						<artifactId>springloaded</artifactId>
						<version>1.2.3.RELEASE</version>
					</dependency>
				</dependencies>
				<configuration>
					<classifier>exec</classifier>
				</configuration>
			</plugin>
		</plugins>
	</build>
</project>


text:
/*************************************************************************/
/*  pluginscript_script.cpp                                              */
/*************************************************************************/
/*                       This file is part of:                           */
/*                           GODOT ENGINE                                */
/*                      https://godotengine.org                          */
/*************************************************************************/
/* Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.                 */
/* Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).   */
/*                                                                       */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the       */
/* "Software"), to deal in the Software without restriction, including   */
/* without limitation the rights to use, copy, modify, merge, publish,   */
/* distribute, sublicense, and/or sell copies of the Software, and to    */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions:                                             */
/*                                                                       */
/* The above copyright notice and this permission notice shall be        */
/* included in all copies or substantial portions of the Software.       */
/*                                                                       */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY  */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,  */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
/*************************************************************************/

// Godot imports
#include "core/os/file_access.h"
// PluginScript imports
#include "pluginscript_instance.h"
#include "pluginscript_script.h"

#include <stdint.h>

#ifdef DEBUG_ENABLED
#define __ASSERT_SCRIPT_REASON "Cannot retrieve PluginScript class for this script, is your code correct?"
#define ASSERT_SCRIPT_VALID()                                       \
	{                                                               \
		ERR_FAIL_COND_MSG(!can_instance(), __ASSERT_SCRIPT_REASON); \
	}
#define ASSERT_SCRIPT_VALID_V(ret)                                         \
	{                                                                      \
		ERR_FAIL_COND_V_MSG(!can_instance(), ret, __ASSERT_SCRIPT_REASON); \
	}
#else
#define ASSERT_SCRIPT_VALID()
#define ASSERT_SCRIPT_VALID_V(ret)
#endif

void PluginScript::_bind_methods() {
	ClassDB::bind_vararg_method(METHOD_FLAGS_DEFAULT, "new", &PluginScript::_new, MethodInfo("new"));
}

PluginScriptInstance *PluginScript::_create_instance(const Variant **p_args, int p_argcount, Object *p_owner, Callable::CallError &r_error) {
	r_error.error = Callable::CallError::CALL_OK;

	// Create instance
	PluginScriptInstance *instance = memnew(PluginScriptInstance());

	if (instance->init(this, p_owner)) {
		_language->lock();
		_instances.insert(instance->get_owner());
		_language->unlock();
	} else {
		r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL;
		memdelete(instance);
		ERR_FAIL_V(nullptr);
	}

	// Construct
	// TODO: Support arguments in the constructor?
	// There is currently no way to get the constructor function name of the script.
	// instance->call("__init__", p_args, p_argcount, r_error);
	if (p_argcount > 0) {
		WARN_PRINT("PluginScript doesn't support arguments in the constructor");
	}

	return instance;
}

Variant PluginScript::_new(const Variant **p_args, int p_argcount, Callable::CallError &r_error) {
	r_error.error = Callable::CallError::CALL_OK;

	if (!_valid) {
		r_error.error = Callable::CallError::CALL_ERROR_INVALID_METHOD;
		return Variant();
	}

	REF ref;
	Object *owner = nullptr;

	if (get_instance_base_type() == "") {
		owner = memnew(Reference);
	} else {
		owner = ClassDB::instance(get_instance_base_type());
	}

	if (!owner) {
		r_error.error = Callable::CallError::CALL_ERROR_INSTANCE_IS_NULL;
		return Variant();
	}

	Reference *r = Object::cast_to<Reference>(owner);
	if (r) {
		ref = REF(r);
	}

	PluginScriptInstance *instance = _create_instance(p_args, p_argcount, owner, r_error);

	if (!instance) {
		if (ref.is_null()) {
			memdelete(owner); //no owner, sorry
		}
		return Variant();
	}

	if (ref.is_valid()) {
		return ref;
	} else {
		return owner;
	}
}

#ifdef TOOLS_ENABLED

void PluginScript::_placeholder_erased(PlaceHolderScriptInstance *p_placeholder) {
	placeholders.erase(p_placeholder);
}

#endif

bool PluginScript::can_instance() const {
	bool can = _valid || (!_tool && !ScriptServer::is_scripting_enabled());
	return can;
}

bool PluginScript::inherits_script(const Ref<Script> &p_script) const {
#ifndef _MSC_VER
#warning inheritance needs to be implemented in PluginScript
#endif
	return false;
}

Ref<Script> PluginScript::get_base_script() const {
	if (_ref_base_parent.is_valid()) {
		return Ref<PluginScript>(_ref_base_parent);
	} else {
		return Ref<Script>();
	}
}

StringName PluginScript::get_instance_base_type() const {
	if (_native_parent) {
		return _native_parent;
	}
	if (_ref_base_parent.is_valid()) {
		return _ref_base_parent->get_instance_base_type();
	}
	return StringName();
}

void PluginScript::update_exports() {
#ifdef TOOLS_ENABLED
	ASSERT_SCRIPT_VALID();
	if (placeholders.size()) {
		//update placeholders if any
		Map<StringName, Variant> propdefvalues;
		List<PropertyInfo> propinfos;

		get_script_property_list(&propinfos);
		for (Set<PlaceHolderScriptInstance *>::Element *E = placeholders.front(); E; E = E->next()) {
			E->get()->update(propinfos, _properties_default_values);
		}
	}
#endif
}

// TODO: rename p_this "p_owner" ?
ScriptInstance *PluginScript::instance_create(Object *p_this) {
	ASSERT_SCRIPT_VALID_V(nullptr);
	// TODO check script validity ?
	if (!_tool && !ScriptServer::is_scripting_enabled()) {
#ifdef TOOLS_ENABLED
		// Instance a fake script for editing the values
		PlaceHolderScriptInstance *si = memnew(PlaceHolderScriptInstance(get_language(), Ref<Script>(this), p_this));
		placeholders.insert(si);
		update_exports();
		return si;
#else
		return nullptr;
#endif
	}

	StringName base_type = get_instance_base_type();
	if (base_type) {
		if (!ClassDB::is_parent_class(p_this->get_class_name(), base_type)) {
			String msg = "Script inherits from native type '" + String(base_type) + "', so it can't be instanced in object of type: '" + p_this->get_class() + "'";
			// TODO: implement PluginscriptLanguage::debug_break_parse
			// if (EngineDebugger::is_active()) {
			// 	_language->debug_break_parse(get_path(), 0, msg);
			// }
			ERR_FAIL_V_MSG(nullptr, msg);
		}
	}

	Callable::CallError unchecked_error;
	return _create_instance(nullptr, 0, p_this, unchecked_error);
}

bool PluginScript::instance_has(const Object *p_this) const {
	_language->lock();
	bool hasit = _instances.has((Object *)p_this);
	_language->unlock();
	return hasit;
}

bool PluginScript::has_source_code() const {
	bool has = _source != "";
	return has;
}

String PluginScript::get_source_code() const {
	return _source;
}

void PluginScript::set_source_code(const String &p_code) {
	if (_source == p_code) {
		return;
	}
	_source = p_code;
}

Error PluginScript::reload(bool p_keep_state) {
	ERR_FAIL_COND_V(!_language, ERR_UNCONFIGURED);

	_language->lock();
	ERR_FAIL_COND_V(!p_keep_state && _instances.size(), ERR_ALREADY_IN_USE);
	_language->unlock();

	_valid = false;
	String basedir = _path;

	if (basedir == "") {
		basedir = get_path();
	}

	if (basedir != "") {
		basedir = basedir.get_base_dir();
	}

	if (_data) {
		_desc->finish(_data);
	}

	Error err;
	godot_pluginscript_script_manifest manifest = _desc->init(
			_language->_data,
			(godot_string *)&_path,
			(godot_string *)&_source,
			(godot_error *)&err);
// Manifest's attributes must be explicitly freed
#define FREE_SCRIPT_MANIFEST(manifest)                    \
	{                                                     \
		godot_string_name_destroy(&manifest.name);        \
		godot_string_name_destroy(&manifest.base);        \
		godot_dictionary_destroy(&manifest.member_lines); \
		godot_array_destroy(&manifest.methods);           \
		godot_array_destroy(&manifest.signals);           \
		godot_array_destroy(&manifest.properties);        \
	}

	if (err) {
		FREE_SCRIPT_MANIFEST(manifest);
		// TODO: GDscript uses `ScriptDebugger` here to jump into the parsing error
		return err;
	}

	// Script's parent is passed as base_name which can make reference to a
	// ClassDB name (i.e. `Node2D`) or a resource path (i.e. `res://foo/bar.gd`)
	StringName *base_name = (StringName *)&manifest.base;
	if (*base_name) {
		if (ClassDB::class_exists(*base_name)) {
			_native_parent = *base_name;
		} else {
			Ref<Script> res = ResourceLoader::load(*base_name);
			if (res.is_valid()) {
				_ref_base_parent = res;
			} else {
				String name = *(StringName *)&manifest.name;
				FREE_SCRIPT_MANIFEST(manifest);
				ERR_FAIL_V_MSG(ERR_PARSE_ERROR, _path + ": Script '" + name + "' has an invalid parent '" + *base_name + "'.");
			}
		}
	}

	_valid = true;
	// Use the manifest to configure this script object
	_data = manifest.data;
	_name = *(StringName *)&manifest.name;
	_tool = manifest.is_tool;
	_icon_path = *(String *)&manifest.icon_path;

	Dictionary *members = (Dictionary *)&manifest.member_lines;
	for (const Variant *key = members->next(); key != nullptr; key = members->next(key)) {
		_member_lines[*key] = (*members)[*key];
	}
	Array *methods = (Array *)&manifest.methods;
	_rpc_methods.clear();
	_rpc_variables.clear();
	if (_ref_base_parent.is_valid()) {
		_rpc_methods = _ref_base_parent->get_rpc_methods();
		_rpc_variables = _ref_base_parent->get_rset_properties();
	}
	for (int i = 0; i < methods->size(); ++i) {
		Dictionary v = (*methods)[i];
		MethodInfo mi = MethodInfo::from_dict(v);
		_methods_info[mi.name] = mi;
		// rpc_mode is passed as an optional field and is not part of MethodInfo
		Variant var = v["rpc_mode"];
		if (var != Variant()) {
			ScriptNetData nd;
			nd.name = mi.name;
			nd.mode = MultiplayerAPI::RPCMode(int(var));
			if (_rpc_methods.find(nd) == -1) {
				_rpc_methods.push_back(nd);
			}
		}
	}

	// Sort so we are 100% that they are always the same.
	_rpc_methods.sort_custom<SortNetData>();

	Array *signals = (Array *)&manifest.signals;
	for (int i = 0; i < signals->size(); ++i) {
		Variant v = (*signals)[i];
		MethodInfo mi = MethodInfo::from_dict(v);
		_signals_info[mi.name] = mi;
	}
	Array *properties = (Array *)&manifest.properties;
	for (int i = 0; i < properties->size(); ++i) {
		Dictionary v = (*properties)[i];
		PropertyInfo pi = PropertyInfo::from_dict(v);
		_properties_info[pi.name] = pi;
		_properties_default_values[pi.name] = v["default_value"];
		// rset_mode is passed as an optional field and is not part of PropertyInfo
		Variant var = v["rset_mode"];
		if (var != Variant()) {
			ScriptNetData nd;
			nd.name = pi.name;
			nd.mode = MultiplayerAPI::RPCMode(int(var));
			if (_rpc_variables.find(nd) == -1) {
				_rpc_variables.push_back(nd);
			}
		}
	}

	// Sort so we are 100% that they are always the same.
	_rpc_variables.sort_custom<SortNetData>();

#ifdef TOOLS_ENABLED
/*for (Set<PlaceHolderScriptInstance*>::Element *E=placeholders.front();E;E=E->next()) {

        _update_placeholder(E->get());
    }*/
#endif

	FREE_SCRIPT_MANIFEST(manifest);
	return OK;
#undef FREE_SCRIPT_MANIFEST
}

void PluginScript::get_script_method_list(List<MethodInfo> *r_methods) const {
	ASSERT_SCRIPT_VALID();
	for (Map<StringName, MethodInfo>::Element *e = _methods_info.front(); e != nullptr; e = e->next()) {
		r_methods->push_back(e->get());
	}
}

void PluginScript::get_script_property_list(List<PropertyInfo> *r_properties) const {
	ASSERT_SCRIPT_VALID();
	for (Map<StringName, PropertyInfo>::Element *e = _properties_info.front(); e != nullptr; e = e->next()) {
		r_properties->push_back(e->get());
	}
}

bool PluginScript::has_method(const StringName &p_method) const {
	ASSERT_SCRIPT_VALID_V(false);
	return _methods_info.has(p_method);
}

MethodInfo PluginScript::get_method_info(const StringName &p_method) const {
	ASSERT_SCRIPT_VALID_V(MethodInfo());
	const Map<StringName, MethodInfo>::Element *e = _methods_info.find(p_method);
	if (e != nullptr) {
		return e->get();
	} else {
		return MethodInfo();
	}
}

bool PluginScript::has_property(const StringName &p_method) const {
	ASSERT_SCRIPT_VALID_V(false);
	return _properties_info.has(p_method);
}

PropertyInfo PluginScript::get_property_info(const StringName &p_property) const {
	ASSERT_SCRIPT_VALID_V(PropertyInfo());
	const Map<StringName, PropertyInfo>::Element *e = _properties_info.find(p_property);
	if (e != nullptr) {
		return e->get();
	} else {
		return PropertyInfo();
	}
}

bool PluginScript::get_property_default_value(const StringName &p_property, Variant &r_value) const {
	ASSERT_SCRIPT_VALID_V(false);
#ifdef TOOLS_ENABLED
	const Map<StringName, Variant>::Element *e = _properties_default_values.find(p_property);
	if (e != nullptr) {
		r_value = e->get();
		return true;
	} else {
		return false;
	}
#endif
	return false;
}

ScriptLanguage *PluginScript::get_language() const {
	return _language;
}

Error PluginScript::load_source_code(const String &p_path) {
	Vector<uint8_t> sourcef;
	Error err;
	FileAccess *f = FileAccess::open(p_path, FileAccess::READ, &err);
	ERR_FAIL_COND_V_MSG(err, err, "Cannot open file '" + p_path + "'.");

	int len = f->get_len();
	sourcef.resize(len + 1);
	uint8_t *w = sourcef.ptrw();
	int r = f->get_buffer(w, len);
	f->close();
	memdelete(f);
	ERR_FAIL_COND_V(r != len, ERR_CANT_OPEN);
	w[len] = 0;

	String s;
	if (s.parse_utf8((const char *)w)) {
		ERR_FAIL_V_MSG(ERR_INVALID_DATA, "Script '" + p_path + "' contains invalid unicode (UTF-8), so it was not loaded. Please ensure that scripts are saved in valid UTF-8 unicode.");
	}

	_source = s;
#ifdef TOOLS_ENABLED
// source_changed_cache=true;
#endif
	_path = p_path;
	return OK;
}

bool PluginScript::has_script_signal(const StringName &p_signal) const {
	ASSERT_SCRIPT_VALID_V(false);
	return _signals_info.has(p_signal);
}

void PluginScript::get_script_signal_list(List<MethodInfo> *r_signals) const {
	ASSERT_SCRIPT_VALID();
	for (Map<StringName, MethodInfo>::Element *e = _signals_info.front(); e != nullptr; e = e->next()) {
		r_signals->push_back(e->get());
	}
}

int PluginScript::get_member_line(const StringName &p_member) const {
#ifdef TOOLS_ENABLED
	if (_member_lines.has(p_member)) {
		return _member_lines[p_member];
	}
#endif
	return -1;
}

Vector<ScriptNetData> PluginScript::get_rpc_methods() const {
	return _rpc_methods;
}

uint16_t PluginScript::get_rpc_method_id(const StringName &p_method) const {
	ASSERT_SCRIPT_VALID_V(UINT16_MAX);
	for (int i = 0; i < _rpc_methods.size(); i++) {
		if (_rpc_methods[i].name == p_method) {
			return i;
		}
	}
	return UINT16_MAX;
}

StringName PluginScript::get_rpc_method(const uint16_t p_rpc_method_id) const {
	ASSERT_SCRIPT_VALID_V(StringName());
	if (p_rpc_method_id >= _rpc_methods.size()) {
		return StringName();
	}
	return _rpc_methods[p_rpc_method_id].name;
}

MultiplayerAPI::RPCMode PluginScript::get_rpc_mode_by_id(const uint16_t p_rpc_method_id) const {
	ASSERT_SCRIPT_VALID_V(MultiplayerAPI::RPC_MODE_DISABLED);
	if (p_rpc_method_id >= _rpc_methods.size()) {
		return MultiplayerAPI::RPC_MODE_DISABLED;
	}
	return _rpc_methods[p_rpc_method_id].mode;
}

MultiplayerAPI::RPCMode PluginScript::get_rpc_mode(const StringName &p_method) const {
	ASSERT_SCRIPT_VALID_V(MultiplayerAPI::RPC_MODE_DISABLED);
	return get_rpc_mode_by_id(get_rpc_method_id(p_method));
}

Vector<ScriptNetData> PluginScript::get_rset_properties() const {
	return _rpc_variables;
}

uint16_t PluginScript::get_rset_property_id(const StringName &p_property) const {
	ASSERT_SCRIPT_VALID_V(UINT16_MAX);
	for (int i = 0; i < _rpc_variables.size(); i++) {
		if (_rpc_variables[i].name == p_property) {
			return i;
		}
	}
	return UINT16_MAX;
}

StringName PluginScript::get_rset_property(const uint16_t p_rset_property_id) const {
	ASSERT_SCRIPT_VALID_V(StringName());
	if (p_rset_property_id >= _rpc_variables.size()) {
		return StringName();
	}
	return _rpc_variables[p_rset_property_id].name;
}

MultiplayerAPI::RPCMode PluginScript::get_rset_mode_by_id(const uint16_t p_rset_property_id) const {
	ASSERT_SCRIPT_VALID_V(MultiplayerAPI::RPC_MODE_DISABLED);
	if (p_rset_property_id >= _rpc_variables.size()) {
		return MultiplayerAPI::RPC_MODE_DISABLED;
	}
	return _rpc_variables[p_rset_property_id].mode;
}

MultiplayerAPI::RPCMode PluginScript::get_rset_mode(const StringName &p_variable) const {
	ASSERT_SCRIPT_VALID_V(MultiplayerAPI::RPC_MODE_DISABLED);
	return get_rset_mode_by_id(get_rset_property_id(p_variable));
}

PluginScript::PluginScript() :
		_script_list(this) {
}

void PluginScript::init(PluginScriptLanguage *language) {
	_desc = &language->_desc.script_desc;
	_language = language;

#ifdef DEBUG_ENABLED
	_language->lock();
	_language->_script_list.add(&_script_list);
	_language->unlock();
#endif
}

PluginScript::~PluginScript() {
	if (_desc && _data) {
		_desc->finish(_data);
	}

#ifdef DEBUG_ENABLED
	if (_language) {
		_language->lock();
		_language->_script_list.remove(&_script_list);
		_language->unlock();
	}
#endif
}


text:
package org.testcontainers.lifecycle;

public interface TestDescription {

    String getTestId();

    String getFilesystemFriendlyName();
}


text:
namespace Microsoft.eShopOnContainers.Payment.API;

public class PaymentSettings
{
    public bool PaymentSucceeded { get; set; }
    public string EventBusConnection { get; set; }
}


text:
<?php
$url = parse_url(getenv("DATABASE_URL"));
$dsn = 'pgsql:host='.$url['host'].';port='.$url['port'].';dbname='.substr($url["path"], 1);
$username = $url["user"];
$password = $url["pass"];

return [
    'components' => [
        'db' => [
            'class' => 'yii\db\Connection',
            'dsn' => $dsn,
            'username' => $username,
            'password' =>$password,
        ],
        'mailer' => [
            'class' => 'yii\swiftmailer\Mailer',
            'viewPath' => '@common/mail',
            // send all mails to a file by default. You have to set
            // 'useFileTransport' to false and configure a transport
            // for the mailer to send real emails.
            'useFileTransport' => true,
        ],
    ],
];
?>


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Syll. fung. (Abellini) 9: 603 (1891)

#### Original name
Byssosphaeria barbicincta Ellis & Everh., 1888

### Remarks
null


text:
%% CFF_correct_filesep.m
%
% The path or file separator symbol is different between windows-based
% system ("\") and unix-based systems, including mac ("/").
% out = CFF_correct_filesep(in) corrects file, folder and path names "in"
% with the appropriate filesep. Takes single input entries (string of
% characters) as well as multiple entries (cell arrays of characters).
%
%% Help
%
% *USE*
%
% TODO: write longer description of function
%
% *INPUT VARIABLES*
%
% * |input_variable_1|: TODO: write description and info on variable
%
% *OUTPUT VARIABLES*
%
% * |output_variable_1|: TODO: write description and info on variable
%
% *RESEARCH NOTES*
%
% TODO: write research notes
%
% *NEW FEATURES*
%
% * 2017-06-06: first version (Alex Schimel)
%
% *EXAMPLE*
%
% TODO: write examples
%
% *AUTHOR, AFFILIATION & COPYRIGHT*
%
% Alexandre Schimel, NIWA.

%% Function
function out = CFF_correct_filesep(in)

correct_filesep = @(x) regexprep(x,'[/\\]',filesep);

if ischar(in)
    % if input is a string, apply to string
    out = correct_filesep(in);
elseif iscell(in)
    % if input is a cell, apply to each element
    out = cellfun(correct_filesep,in,'UniformOutput',0);
end


text:
import cv2
import config
import numpy as np

from preprocess import PreProcess
from calib import Calib

class HandContourDetector():
    MEDIAN_DIM = config.MEDIAN_DIM
    MORPH_SHAPE_DIM = config.MORPH_SHAPE_DIM
    MORPH_NITER = config.MORPH_NITER
    MIN_CONTOUR_LEN = config.MIN_CONTOUR_LEN
    AR_LIM = 1.5

    def __init__(self):
        self._contour = None
        self._box = None

    def run(self, hand, rgb=False, box=None, hand_crop=None, depth=None):
        if rgb and box and hand_crop.any() and depth.any():
            phand = self._rgb_hand_seg(hand, box, hand_crop, depth)
        else:
            phand = PreProcess().median_smooth(hand, self.MEDIAN_DIM)

        tmp  = phand.copy()
        cont = self._get_largest_contour(phand)
        box  = cv2.boundingRect(cont)
        crop = self._crop_box(tmp, box)
        self._contour = cont
        self._box = box
        return (cont, box, crop)

    def _crop_box(self, img, box):
        crop = img[box[1]:box[1] + box[3], box[0]:box[0] + box[2]].copy()
        return crop

    def _get_largest_contour(self, hand):
        contours = cv2.findContours(hand, cv2.cv.CV_RETR_EXTERNAL,
                                    cv2.cv.CV_CHAIN_APPROX_NONE)
        lengths = [cv2.arcLength(x, True) for x in contours[0]]

        def valid_aspect_ratio(contour):
            box = cv2.boundingRect(contour)
            notvalid = float(box[3])/box[2] > self.AR_LIM or \
                       float(box[2])/box[3] > self.AR_LIM
            return notvalid

        for i in reversed(np.argsort(lengths)):
            contour = contours[0][i]
            if valid_aspect_ratio(contour):
                break
        return contour

    def _rgb_hand_seg(self, hand, box, asd, depth):
        box = Calib().box_depth2rgb(box, depth)

        roi = self._crop_box(hand, box)
        roi = cv2.cvtColor(roi, cv2.COLOR_BGR2YCR_CB)
        roi = cv2.threshold(roi[:, :, 2], 0, 255, cv2.THRESH_OTSU)[1]

        kernel = cv2.getStructuringElement(cv2.MORPH_ELLIPSE, (3, 3))
        asd = cv2.dilate(asd, kernel, iterations=3)
        asd = cv2.resize(asd, (roi.shape[1], roi.shape[0]),
                         interpolation=cv2.cv.CV_INTER_LINEAR)

        roi[asd == 0] = 0
        roi = cv2.medianBlur(roi, 5)
        return roi

    def draw(self):
        tmp = np.zeros((self._box[3], self._box[2], 3), np.uint8)
        cv2.drawContours(tmp, self._contour, -1, (0, 0, 255))
        cv2.imshow('contour', tmp)

    def not_valid(self):
        cond = len(self._contour) < self.MIN_CONTOUR_LEN
        return cond


text:
enum {
  JUMPNRUN_PLAYING,
  JUMPNRUN_WON,
  JUMPNRUN_LOST,
  JUMPNRUN_ERROR
};

enum {
  JUMPNRUN_MAX_SPAWN_MARGIN = BADGE_SPRITE_MAX_WIDTH + 1,
  JUMPNRUN_MAX_SPAWNED_ENEMIES = 10
};

vec2d jumpnrun_player_extents(void);
void jumpnrun_apply_gravity(vec2d *inertia);
void jumpnrun_passive_movement(vec2d *inertia);
badge_sprite const *jumpnrun_hacker_symbol(void);

uint8_t jumpnrun_play_level(char const *lvname);
void jumpnrun_play(void);

#endif


text:
<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">

<mapper namespace="com.glaf.report.mapper.ReportTaskMapper">

	<resultMap id="reportTaskResultMap"	type="com.glaf.report.domain.ReportTask">
		<id property="id" column="ID_" jdbcType="VARCHAR"/>
		<result property="reportIds" column="REPORTIDS_" jdbcType="VARCHAR"/>
		<result property="name" column="NAME_" jdbcType="VARCHAR"/>
		<result property="subject" column="SUBJECT_" jdbcType="VARCHAR"/>
		<result property="mailRecipient" column="MAILRECIPIENT_" jdbcType="VARCHAR"/>
		<result property="mobileRecipient" column="MOBILERECIPIENT_" jdbcType="VARCHAR"/>
		<result property="sendTitle" column="SENDTITLE_" jdbcType="VARCHAR"/>
		<result property="sendContent" column="SENDCONTENT_" jdbcType="VARCHAR"/>
		<result property="cronExpression" column="CRONEXPRESSION_" jdbcType="VARCHAR"/>
		<result property="enableFlag" column="ENABLEFLAG_" jdbcType="VARCHAR"/>
		<result property="createDate" column="CREATEDATE_" jdbcType="TIMESTAMP"/>
		<result property="createBy" column="CREATEBY_" jdbcType="VARCHAR"/>
	</resultMap>

	<resultMap id="reportTaskHashMap"	type="java.util.HashMap">
		<id property="id" column="ID_" jdbcType="VARCHAR"/>
		<result property="reportIds" column="REPORTIDS_" jdbcType="VARCHAR"/>
		<result property="name" column="NAME_" jdbcType="VARCHAR"/>
		<result property="subject" column="SUBJECT_" jdbcType="VARCHAR"/>
		<result property="mailRecipient" column="MAILRECIPIENT_" jdbcType="VARCHAR"/>
		<result property="mobileRecipient" column="MOBILERECIPIENT_" jdbcType="VARCHAR"/>
		<result property="sendTitle" column="SENDTITLE_" jdbcType="VARCHAR"/>
		<result property="sendContent" column="SENDCONTENT_" jdbcType="VARCHAR"/>
		<result property="cronExpression" column="CRONEXPRESSION_" jdbcType="VARCHAR"/>
		<result property="enableFlag" column="ENABLEFLAG_" jdbcType="VARCHAR"/>
		<result property="createDate" column="CREATEDATE_" jdbcType="TIMESTAMP"/>
		<result property="createBy" column="CREATEBY_" jdbcType="VARCHAR"/>
	</resultMap>

	<insert id="insertReportTask" parameterType="com.glaf.report.domain.ReportTask">
		insert into SYS_REPORT_TASK
		<trim prefix="(" suffix=")" suffixOverrides=",">
		    ID_
			<if test="reportIds != null">
				,REPORTIDS_
			</if>
			<if test="name != null">
				,NAME_
			</if>
			<if test="subject != null">
				,SUBJECT_
			</if>
			<if test="mailRecipient != null">
				,MAILRECIPIENT_
			</if>
			<if test="mobileRecipient != null">
				,MOBILERECIPIENT_
			</if>
			<if test="sendTitle != null">
				,SENDTITLE_
			</if>
			<if test="sendContent != null">
				,SENDCONTENT_
			</if>
			<if test="cronExpression != null">
				,CRONEXPRESSION_
			</if>
			<if test="enableFlag != null">
				,ENABLEFLAG_
			</if>
			<if test="createDate != null">
				,CREATEDATE_
			</if>
			<if test="createBy != null">
				,CREATEBY_
			</if>
		</trim>

		<trim prefix=" values (" suffix=")" suffixOverrides=",">
			  #{id, jdbcType=VARCHAR}

			<if test="reportIds != null">
				,#{reportIds, jdbcType=VARCHAR}
			</if>
			<if test="name != null">
				,#{name, jdbcType=VARCHAR}
			</if>
			<if test="subject != null">
				,#{subject, jdbcType=VARCHAR}
			</if>
			<if test="mailRecipient != null">
				,#{mailRecipient, jdbcType=VARCHAR}
			</if>
			<if test="mobileRecipient != null">
				,#{mobileRecipient, jdbcType=VARCHAR}
			</if>
			<if test="sendTitle != null">
				,#{sendTitle, jdbcType=VARCHAR}
			</if>
			<if test="sendContent != null">
				,#{sendContent, jdbcType=VARCHAR}
			</if>
			<if test="cronExpression != null">
				,#{cronExpression, jdbcType=VARCHAR}
			</if>
			<if test="enableFlag != null">
				,#{enableFlag, jdbcType=VARCHAR}
			</if>
			<if test="createDate != null">
				,#{createDate, jdbcType=TIMESTAMP}
			</if>
			<if test="createBy != null">
				,#{createBy, jdbcType=VARCHAR}
			</if>
		</trim>
	</insert>

	<update id="updateReportTask" parameterType="com.glaf.report.domain.ReportTask">
		update SYS_REPORT_TASK
		set
		<trim prefix="" suffix="" suffixOverrides=",">
			<if test="reportIds != null">
				REPORTIDS_ = #{reportIds, jdbcType=VARCHAR},
			</if>
			<if test="name != null">
				NAME_ = #{name, jdbcType=VARCHAR},
			</if>
			<if test="subject != null">
				SUBJECT_ = #{subject, jdbcType=VARCHAR},
			</if>
			<if test="mailRecipient != null">
				MAILRECIPIENT_ = #{mailRecipient, jdbcType=VARCHAR},
			</if>
			<if test="mobileRecipient != null">
				MOBILERECIPIENT_ = #{mobileRecipient, jdbcType=VARCHAR},
			</if>
			<if test="sendTitle != null">
				SENDTITLE_ = #{sendTitle, jdbcType=VARCHAR},
			</if>
			<if test="sendContent != null">
				SENDCONTENT_ = #{sendContent, jdbcType=VARCHAR},
			</if>
			<if test="cronExpression != null">
				CRONEXPRESSION_ = #{cronExpression, jdbcType=VARCHAR},
			</if>
			<if test="enableFlag != null">
				ENABLEFLAG_ = #{enableFlag, jdbcType=VARCHAR},
			</if>
			<if test="createDate != null">
				CREATEDATE_ = #{createDate, jdbcType=TIMESTAMP},
			</if>
			<if test="createBy != null">
				CREATEBY_ = #{createBy, jdbcType=VARCHAR},
			</if>
		</trim>
		where
          ID_ = #{id, jdbcType=VARCHAR}

	</update>

	<delete id="deleteReportTaskById" parameterType="string">
        delete from SYS_REPORT_TASK
        where ID_ = #{id}
	</delete>

	<delete id="deleteReportTasks" parameterType="com.glaf.report.query.ReportTaskQuery">
		delete from SYS_REPORT_TASK
		where ( ID_ IN
		<foreach item="x_rowId" index="index" collection="rowIds" open="(" separator="," close=")">
              #{x_rowId}
		</foreach>
		)
	</delete>

	<select id="getReportTaskById" parameterType="string" resultMap="reportTaskResultMap">
		select * from SYS_REPORT_TASK where ID_ = #{id}
	</select>

	<select id="getReportTaskByName" parameterType="string" resultMap="reportTaskResultMap">
		select * from SYS_REPORT_TASK where NAME_ = #{id}
	</select>

	<select id="getReportTaskCount"
		parameterType="map"
		resultType="int">
		select count(*) from SYS_REPORT_TASK E
		<include refid="selectReportTaskSql" />
	</select>

	<select id="getReportTaskCountByQueryCriteria"
		parameterType="com.glaf.report.query.ReportTaskQuery"
		resultType="int">
		select count(*) from SYS_REPORT_TASK E
		<include refid="selectReportTaskSql" />
	</select>

	<select id="getReportTasks"
		parameterType="map"
		resultMap="reportTaskResultMap">
		select E.* from SYS_REPORT_TASK E
		<include refid="selectReportTaskSql" />
		<if test="orderBy != null">
		   order by ${orderBy}
		</if>
	</select>

	<select id="getReportTaskMapList" parameterType="map" resultType="map">
		select E.* from SYS_REPORT_TASK E
		<include refid="selectReportTaskSql" />
		<if test="orderBy != null">
		   order by ${orderBy}
		</if>
	</select>

	<select id="getReportTasksByQueryCriteria"
		parameterType="com.glaf.report.query.ReportTaskQuery"
		resultMap="reportTaskResultMap">
		select E.* from SYS_REPORT_TASK E
		<include refid="selectReportTaskSql" />
		<if test="orderBy != null">
		   order by ${orderBy}
		</if>
	</select>

	<sql id="selectReportTaskSql">

		<where>

		   1 = 1

			<if test="name != null and name != '' ">
				and E.NAME_ = #{name}
			</if>

			<if test="nameLike != null and nameLike != '' ">
				and E.NAME_ like #{nameLike}
			</if>

			<if test="subjectLike != null and subjectLike != '' ">
				and E.SUBJECT_ like #{subjectLike}
			</if>

			<if test="mailRecipientLike != null and mailRecipientLike != '' ">
				and E.MAILRECIPIENT_ like #{mailRecipientLike}
			</if>

			<if test="mobileRecipientLike != null and mobileRecipientLike != '' ">
				and E.MOBILERECIPIENT_ like #{mobileRecipientLike}
			</if>

			<if test="sendTitleLike != null and sendTitleLike != '' ">
				and E.SENDTITLE_ like #{sendTitleLike}
			</if>

			<if test="sendContentLike != null and sendContentLike != '' ">
				and E.SENDCONTENT_ like #{sendContentLike}
			</if>

			<if test="createDateGreaterThanOrEqual != null">
				and E.CREATEDATE_ >= #{createDateGreaterThanOrEqual}
			</if>

			<if test="createDateLessThanOrEqual != null">
				and E.CREATEDATE_ <= #{createDateLessThanOrEqual}
			</if>

			<if test="createBy != null and createBy != '' ">
				and E.CREATEBY_ = #{createBy}
			</if>

			<if test="enableFlag != null and enableFlag != '' ">
				and E.ENABLEFLAG_ = #{enableFlag}
            </if>

		</where>
	</sql>

</mapper>


text:
<!doctype html>

    <meta charset="utf-8">

    <title>Self-Update: reducing error messages</title>

    <meta name="description" content="Reducing error messages in self-update">
    <meta name="author" content="Imobach González Sosa">

    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />

    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">

    <link rel="stylesheet" href="css/reveal.css">
    <link rel="stylesheet" href="css/theme/white.css" id="theme">
    <link rel="stylesheet" href="css/custom.css">

    <link rel="stylesheet" href="lib/css/zenburn.css">

Self-Update: Reducing Error Messages

And what's next

February, 2017

The Main Problem

Self-Update is included in SLE 12 SP2 but disabled by default

In some scenarios is too intrusive

Error messages

Timeouts

The Worst Case

Installing behind a firewall which prevents access to your DNS

Packages are simply drop

You get 3 pop-ups:

Network error

Could not get updates repositories: falling back to control file

Could not access to fallback repository

And more than 30 seconds timeout

Check the video

Proposal

Report errors only when using custom URLs

Custom SMT

Custom update repository

Check the video

More information in the Self-Update Use Cases and Error Handling document

What's next?

Just some ideas

Reducing timeouts

Adjust the amount of times/retries

Should we fallback to the control file at all?

Define whether self-update is enabled/disabled through the control file

Consider adding information in case of a successful update

Include self-update options in the boot menu


text:
package org.openehealth.ipf.platform.camel.ihe.mllp.iti21;

import org.openhealthtools.ihe.atna.auditor.codes.rfc3881.RFC3881EventCodes.RFC3881EventOutcomeCodes;
import org.openehealth.ipf.commons.ihe.core.atna.AuditorManager;
import org.openehealth.ipf.platform.camel.ihe.mllp.core.QueryAuditDataset;
import org.openehealth.ipf.platform.camel.ihe.mllp.pdqcore.PdqAuditStrategy;

/**
 * Server (aka Camel consumer) audit strategy for ITI-21 and ITI-22 (PDQ).
 *
 * @author Dmytro Rud
 */
public class Iti21ServerAuditStrategy extends PdqAuditStrategy {

    public Iti21ServerAuditStrategy() {
        super(true);
    }

    public void doAudit(RFC3881EventOutcomeCodes eventOutcome,
            QueryAuditDataset auditDataset) {
        AuditorManager.getPIXManagerAuditor().auditPDQQueryEvent(eventOutcome,
                auditDataset.getRemoteAddress(),
                auditDataset.getSendingFacility(),
                auditDataset.getSendingApplication(),
                auditDataset.getLocalAddress(),
                auditDataset.getReceivingFacility(),
                auditDataset.getReceivingApplication(),
                auditDataset.getMessageControlId(), auditDataset.getPayload(),
                auditDataset.getPatientIds());

    }

}


text:
import serial
from insulaudit.log import io, logger as log
from insulaudit import lib, config

# TODO: implement Buffer API and enable context manager.
class CommBuffer( object ):
  __timeout__ = config.settings.timeout
  port = None
  def __init__( self, port, timeout=None ):
    if timeout is not None:
      self.__timeout__ = timeout
    self.open( port )

  def open( self, newPort=False, **kwds ):
    if newPort:
      self.port = newPort

    self.serial = serial.Serial( self.port, timeout=self.__timeout__, **kwds )

    if self.serial.isOpen( ):
      log.info( '{agent} opened serial port: {serial}'\
         .format( serial = repr( self.serial ),
                  agent  =self.__class__.__name__ ) )

  def close( self ):
    io.info( 'closing serial port' )
    return self.serial.close( )

  def write( self, string ):
    r = self.serial.write( string )
    io.info( 'usb.write.len: %s\n%s' % ( len( string ),
                                         lib.hexdump( bytearray( string ) ) ) )
    return r

  def read( self, c ):
    r = self.serial.read( c )
    io.info( 'usb.read.len: %s'   % ( len( r ) ) )
    io.info( 'usb.read.raw: \n%s' % ( lib.hexdump( bytearray( r ) ) ) )
    return r

  def readline( self ):
    r = self.serial.readline( )
    io.info( 'usb.read.len: %s\n%s' % ( len( r ),
                                        lib.hexdump( bytearray( r ) ) ) )
    return r

  def readlines( self ):
    r = self.serial.readlines( )
    io.info( 'usb.read.len: %s\n%s' % ( len( r ),
                                        lib.hexdump( bytearray( ''.join( r ) ) ) ) )
    return r

if __name__ == '__main__':
  import doctest
  doctest.testmost( )

#####
# EOF


text:
<?php
/**
 * Displays a link to an external source referenced 'external link'
 */
class GridFieldExternalLink extends GridFieldDataColumns {

	/**
	 * Add a column for the actions
	 *
	 * @param type $gridField
	 * @param array $columns
	 */
	public function augmentColumns($gridField, &$columns) {
		if(!in_array('Actions', $columns)) $columns[] = 'Actions';
	}

	/**
	 * Return any special attributes that will be used for FormField::create_tag()
	 *
	 * @param GridField $gridField
	 * @param DataObject $record
	 * @param string $columnName
	 * @return array
	 */
	public function getColumnAttributes($gridField, $record, $columnName) {
		return array('class' => 'col-buttons');
	}

	/**
	 * Add the title
	 *
	 * @param GridField $gridField
	 * @param string $columnName
	 * @return array
	 */
	public function getColumnMetadata($gridField, $columnName) {
		if($columnName == 'Actions') {
			return array('title' => '');
		}
		return array();
	}

	/**
	 * Which columns are handled by this component
	 *
	 * @param type $gridField
	 * @return type
	 */
	public function getColumnsHandled($gridField) {
		return array('Actions');
	}

	/**
	 * @param GridField $gridField
	 * @param DataObject $record
	 * @param string $columnName
	 *
	 * @return string - the HTML for the column
	 */
	public function getColumnContent($gridField, $record, $columnName) {
		$data = new ArrayData(array(
			'Link' => $record->hasMethod('getExternalLink') ? $record->getExternalLink() : $record->ExternalLink,
			'Text' => $record->hasMethod('getExternalLinkText') ? $record->getExternalLinkText() : 'External Link'
		));

		return $data->renderWith('GridFieldExternalLink');
	}
}


text:
import ViewLayout from './ViewLayout.component';

export default ViewLayout;


text:
layout:   post
author:   theo
title:    "CukeUp! London - Call for Papers now open!"
date:     2016-01-06 09:00:00
nav:      blog
---

[CukeUp! London](https://skillsmatter.com/conferences/7606-cukeup-2016) is taking place at [CodeNode](https://skillsmatter.com/conferences/7606-cukeup-2016) on April 14th-15th 2016.

[Our Call for Papers is now open.](https://skillsmatter.com/conferences/7606-cukeup-2016#get_involved)

<img src="https://cucumber.io/images/blog/cukeup-shot.jpg" style="float:right; width:50%">

We're on the lookout for inspiring talks and workshops for testers, devs, and product owners who think differently. CukeUp! continues to be the home for ideas and techniques which bridge the communication gap between business and IT.

If you have a story of closer collaboration, a new technique or tool that has reduced bugs, or an exciting software project you'd like to share, we want to hear it.

CukeUp! prides itself on being a friendly and welcoming event. If you haven't spoken at a conference before, this is a great place to start.

[Email us](mailto:cukeup-london@cucumber.io) if you have an idea for a talk but want some feedback before you submit.

More details on the submission process can be found on the [CukeUp! website](https://skillsmatter.com/conferences/7606-cukeup-2016#get_involved).

The Call for Papers ends on January 31st.

[Examples from last year's CukeUp! London](https://skillsmatter.com/conferences/6332-cukeup-2015#program)


text:
<?php

namespace Symfony\Component\DependencyInjection\Argument;

/**
 * Represents a collection of services found by tag name to lazily iterate over.
 *
 * @author Roland Franssen <franssen.roland@gmail.com>
 */
class TaggedIteratorArgument extends IteratorArgument
{
    private $tag;

    public function __construct(string $tag)
    {
        parent::__construct(array());

        $this->tag = $tag;
    }

    public function getTag()
    {
        return $this->tag;
    }
}


text:
Have you followed your favorite online game's social media to
receive notices of the special events such as 2x exp, gold,
f2p weekend,
or other similar events only to realize 90% of their tweets
you really don't care about?

This program solves this by: awaiting for new tweets from
a twitter user, classifying the new tweet using sklearn support vector machine
trained with pre-classified data (created by running my
script which assists one in building it), and retweets
the tweet when it's classified as a desired or target
categorized tweet.

Program tested on Linux with Python 3.5

## Install

```bash
git clone https://github.com/jtara1/GameMediaBot
sudo pip3.5 install -r requirements.txt

python3 -c "import nltk;
	nltk.download('stopwords');
	nltk.download('punkt')"
```

- You'll also need to go to [apps twitter site](https://apps.twitter.com/) to create an app to get the four things
(and your twitter username/screen name) to update the file `settings-base.py` then
rename the file to `settings.py`

## Usage
By default, the code will use the tweets I've classified myself as training data to classify
future tweets from SmiteGame twitter.
```
python3 run.py
```

__or__

You can train your own set of tweets from a certain twitter account by running
```
sudo python3 manual_classification.py
```
_Note:_ sudo is needed by the `keyboard` library when running on Linux.

Then you'd need to update the code in `run.py` to monitor the twitter account of interest
using the data to classified as training data for the classification algorithm.

---

### Helpful links

- [sklearn: working with text data](http://scikit-learn.org/stable/tutorial/text_analytics/working_with_text_data.html)
- [multiclass/label (haven't used this)](http://scikit-learn.org/stable/modules/multiclass.html#multiclass)


text:
Copyright (C) 2013-2018 Draios Inc dba Sysdig.

This file is part of sysdig.

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

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

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

--]]

-- Chisel description
description = "Print the data read and written for any FD. Combine this script with a filter to restrict what it shows. This chisel is compatible with containers using the sysdig -pc or -pcontainer argument, otherwise no container information will be shown. (Blue represents  [Write], and Red represents [Read] for all data except when the -pc or -pcontainer argument is used. If used the container.name and container.id will be represented as: Green [host], and Cyan [container]) Container information will contain '[]' around container.name and container.id.";
short_description = "Print the data read and written by processes.";
category = "I/O";

args =
{
	{
		name = "disable_color",
		description = "Set to 'disable_colors' if you want to disable color output",
		argtype = "string",
		optional = true
	},
}

require "common"
terminal = require "ansiterminal"
terminal.enable_color(true)

-- Argument notification callback
function on_set_arg(name, val)
	if name == "disable_color" and val == "disable_color" then
		terminal.enable_color(false)
	end

	return true
end

-- Initialization callback
function on_init()
	-- Request the fields that we need
	fbuf = chisel.request_field("evt.rawarg.data")
	fisread = chisel.request_field("evt.is_io_read")
	fres = chisel.request_field("evt.rawarg.res")
	fname = chisel.request_field("fd.name")
	fpname = chisel.request_field("proc.name")
	fcontainername = chisel.request_field("container.name")
	fcontainerid = chisel.request_field("container.id")

	-- The -pc or -pcontainer options was supplied on the cmd line
	print_container = sysdig.is_print_container_data()

	-- increase the snaplen so we capture more of the conversation
	sysdig.set_snaplen(2000)

	-- set the filter
	chisel.set_filter("evt.is_io=true and evt.dir=< and evt.rawres>0")
	chisel.set_event_formatter("%evt.arg.data")

	return true
end

-- Event parsing callback
function on_event()
	local buf = evt.field(fbuf)
	local isread = evt.field(fisread)
	local res = evt.field(fres)
	local name = evt.field(fname)
	local pname = evt.field(fpname)
	local containername = evt.field(fcontainername)
	local containerid = evt.field(fcontainerid)

	if name == nil then
		name = "<NA>"
	end

	if res <= 0 then
		return true
	end

	local container = ""
	if print_container then
		if containername == "host" then
			-- Make host green
			container = string.format("%s [%s] [%s]", terminal.green, containername, containerid );
		else
			-- Make container cyan
			container = string.format("%s [%s] [%s]", terminal.cyan, containername, containerid );
		end
	end

	if isread then
		-- Because container info might be colored make the end of the line the same color as read (red)
		name_pname = string.format("%s %s (%s)", terminal.red, name, pname );
		-- When a read occurs show it in red
		infostr = string.format("%s------ Read %s from %s %s", terminal.red, format_bytes(res), container, name_pname)
	else
		-- Because container info might be colored make the end of the line the same color as write (blue)
		name_pname = string.format("%s %s (%s)", terminal.blue, name, pname );
		-- When a write  occurs show it in blue
		infostr = string.format("%s------ Write %s to %s %s", terminal.blue, format_bytes(res), container, name_pname)
	end

	-- Print out the line (if -pc or -pcontainer sandwitch container color between either red of blue)
	print(infostr)

	return true
end

-- Called by the engine at the end of the capture (Ctrl-C)
function on_capture_end()
	print(terminal.reset)
end


text:
<!--- Provide a general summary of the issue in the Title above -->

## This is an issue with:

- [ ] Bug (site functionality or styling)
- [ ] Errata (fix needed for doc content)
- [ ] New content (article wanted)
- [ ] Update (Add missing or refresh existing content)

## Expected Behavior
<!--- If describing a bug, tell us what should happen -->
<!--- If suggesting a change/improvement, tell us how it should work -->

## Current Behavior
<!--- If describing a bug, tell us what happens instead of the expected behavior -->
<!--- If suggesting a change/improvement, explain the difference from the current behavior -->

## Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug, -->
<!--- or ideas as to the implementation of the addition or change -->

## Steps to Reproduce (for bugs)
<!--- Provide a link to a live example, or an unambiguous set of steps to -->
<!--- reproduce this bug. Include code or configuration to reproduce, if relevant -->
1.
2.
3.

## Screenshots (if appropriate):

## Context
<!--- How is this issue affecting you? What are you trying to accomplish? -->
<!--- Providing context helps us come up with a solution -->

* Browser(s) and version(s):
* OS:


text:
#ifndef _WX_DCSCREEN_H_
#define _WX_DCSCREEN_H_

#include "wx/dcclient.h"
#include "wx/osx/dcclient.h"

class WXDLLIMPEXP_CORE wxScreenDCImpl: public wxWindowDCImpl
{
public:
    wxScreenDCImpl( wxDC *owner );
    virtual ~wxScreenDCImpl();

    virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const;
private:
    void* m_overlayWindow;

private:
    DECLARE_CLASS(wxScreenDCImpl)
    wxDECLARE_NO_COPY_CLASS(wxScreenDCImpl);
};

#endif
    // _WX_DCSCREEN_H_


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

        <meta http-equiv="X-UA-Compatible" content="IE=edge">

        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.13"/>

        <title>CubbyFlow: CubbyFlow::FDMMatrixRow2 Struct Reference</title>

        <link href="search/search.css" rel="stylesheet" type="text/css"/>

        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">

        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">

                    CubbyFlow v0.71

CubbyFlow

FDMMatrixRow2

Public Attributes |
List of all members

CubbyFlow::FDMMatrixRow2 Struct Reference

The row of FDMMatrix2 where row corresponds to (i, j) grid point.
 More...

#include <Core/FDM/FDMLinearSystem2.hpp>

Public Attributes

double 	center = 0.0

 	Diagonal component of the matrix (row, row).  More...

double 	right = 0.0

 	Off-diagonal element where column refers to (i+1, j) grid point.  More...

double 	up = 0.0

 	Off-diagonal element where column refers to (i, j+1) grid point.  More...

Detailed Description

The row of FDMMatrix2 where row corresponds to (i, j) grid point.

Member Data Documentation

◆ center

          double CubbyFlow::FDMMatrixRow2::center = 0.0

Diagonal component of the matrix (row, row).

◆ right

          double CubbyFlow::FDMMatrixRow2::right = 0.0

Off-diagonal element where column refers to (i+1, j) grid point.

◆ up

          double CubbyFlow::FDMMatrixRow2::up = 0.0

Off-diagonal element where column refers to (i, j+1) grid point.

The documentation for this struct was generated from the following file:

Core/FDM/FDMLinearSystem2.hpp

<address class="footer">
Generated on Thu Jul 15 2021 02:18:15 for CubbyFlow by

 1.8.13
</address>


text:
package org.tinymediamanager.ui.components;

import java.awt.Color;
import java.awt.Component;
import java.awt.Dimension;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;

import javax.swing.BorderFactory;
import javax.swing.JComboBox;
import javax.swing.JComponent;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.ListCellRenderer;
import javax.swing.UIManager;
import javax.swing.plaf.ComponentUI;
import javax.swing.plaf.basic.BasicComboBoxEditor;

import org.tinymediamanager.ui.TmmFontHelper;

import com.jtattoo.plaf.luna.LunaComboBoxUI;

/**
 * The class SmallTextFieldBorder - for a smaller version of a JComboBox
 *
 * @author Manuel Laggner
 */
public class SmallComboBox extends JComboBox {
  private static final long serialVersionUID = 256568641808640L;

  public SmallComboBox() {
    super();
    // try catch block for safety reasons (and WBPro)
    try {
      init();
    }
    catch (Exception e) {
    }
  }

  public SmallComboBox(Object[] items) {
    super(items);

    // try catch block for safety reasons (and WBPro)
    try {
      init();
    }
    catch (Exception e) {
    }
  }

  private void init() throws Exception {
    setRenderer(new SmallComboBoxRenderer());
    setEditor(new SmallComboBoxEditor());
    setUI(new SmallComboBoxUI());
  }

  class SmallComboBoxRenderer extends JPanel implements ListCellRenderer {
    private static final long serialVersionUID = 7291014994809111069L;

    private JLabel            labelItem        = new JLabel();

    public SmallComboBoxRenderer() {
      setLayout(new GridBagLayout());
      GridBagConstraints constraints = new GridBagConstraints();
      constraints.fill = GridBagConstraints.HORIZONTAL;
      constraints.weightx = 1.0;
      constraints.insets = new Insets(0, 2, 0, 2);

      labelItem.setOpaque(false);
      labelItem.setHorizontalAlignment(JLabel.LEFT);
      TmmFontHelper.changeFont(labelItem, 0.916);

      add(labelItem, constraints);
    }

    @Override
    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
      if (value != null) {
        labelItem.setText(value.toString());
      }

      Color bg = null;
      Color fg = null;

      bg = UIManager.getColor("List.dropCellBackground");
      fg = UIManager.getColor("List.dropCellForeground");

      if (isSelected) {
        setBackground(bg == null ? list.getSelectionBackground() : bg);
        setForeground(fg == null ? list.getSelectionForeground() : fg);
      }
      else {
        setBackground(list.getBackground());
        setForeground(list.getForeground());
      }

      return this;
    }

  }

  class SmallComboBoxEditor extends BasicComboBoxEditor {
    private JPanel panel     = new JPanel();
    private JLabel labelItem = new JLabel();

    public SmallComboBoxEditor() {
      panel.setLayout(new GridBagLayout());
      GridBagConstraints constraints = new GridBagConstraints();
      constraints.fill = GridBagConstraints.HORIZONTAL;
      constraints.weightx = 1.0;
      constraints.insets = new Insets(0, 2, 0, 2);

      labelItem.setOpaque(false);
      labelItem.setHorizontalAlignment(JLabel.LEFT);
      labelItem.setForeground(Color.WHITE);

      panel.add(labelItem, constraints);
      panel.setBackground(Color.BLUE);
    }

    @Override
    public Component getEditorComponent() {
      return this.panel;
    }

    @Override
    public Object getItem() {
      return null;
    }
  }

  static class SmallComboBoxUI extends LunaComboBoxUI {
    public static ComponentUI createUI(JComponent c) {
      return new SmallComboBoxUI();
    }

    @Override
    public void installUI(JComponent c) {
      super.installUI(c);
      comboBox.setRequestFocusEnabled(true);
      if (comboBox.getEditor() != null) {
        if (comboBox.getEditor().getEditorComponent() instanceof JTextField) {
          ((JTextField) (comboBox.getEditor().getEditorComponent())).setBorder(BorderFactory.createEmptyBorder(0, 1, 0, 1));
        }
      }
    }

    @Override
    public Dimension getPreferredSize(JComponent c) {
      Dimension size = super.getPreferredSize(c);
      return new Dimension(size.width + 2, size.height - 2);
    }
  }
}


text:
#ifndef MODULES_RTP_RTCP_SOURCE_ULPFEC_RECEIVER_IMPL_H_
#define MODULES_RTP_RTCP_SOURCE_ULPFEC_RECEIVER_IMPL_H_

#include <stddef.h>
#include <stdint.h>

#include <memory>
#include <vector>

#include "webrtc/api/sequence_checker.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_header_extension_map.h"
#include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
#include "webrtc/modules/rtp_rtcp/include/ulpfec_receiver.h"
#include "webrtc/modules/rtp_rtcp/source/forward_error_correction.h"
#include "webrtc/modules/rtp_rtcp/source/rtp_packet_received.h"
#include "webrtc/rtc_base/system/no_unique_address.h"

namespace webrtc {

class UlpfecReceiverImpl : public UlpfecReceiver {
 public:
  explicit UlpfecReceiverImpl(uint32_t ssrc,
                              RecoveredPacketReceiver* callback,
                              rtc::ArrayView<const RtpExtension> extensions);
  ~UlpfecReceiverImpl() override;

  bool AddReceivedRedPacket(const RtpPacketReceived& rtp_packet,
                            uint8_t ulpfec_payload_type) override;

  int32_t ProcessReceivedFec() override;

  FecPacketCounter GetPacketCounter() const override;

  void SetRtpExtensions(rtc::ArrayView<const RtpExtension> extensions) override;

 private:
  const uint32_t ssrc_;
  RtpHeaderExtensionMap extensions_ RTC_GUARDED_BY(&sequence_checker_);

  RTC_NO_UNIQUE_ADDRESS SequenceChecker sequence_checker_;
  RecoveredPacketReceiver* const recovered_packet_callback_;
  const std::unique_ptr<ForwardErrorCorrection> fec_;
  // TODO(nisse): The AddReceivedRedPacket method adds one or two packets to
  // this list at a time, after which it is emptied by ProcessReceivedFec. It
  // will make things simpler to merge AddReceivedRedPacket and
  // ProcessReceivedFec into a single method, and we can then delete this list.
  std::vector<std::unique_ptr<ForwardErrorCorrection::ReceivedPacket>>
      received_packets_ RTC_GUARDED_BY(&sequence_checker_);
  ForwardErrorCorrection::RecoveredPacketList recovered_packets_
      RTC_GUARDED_BY(&sequence_checker_);
  FecPacketCounter packet_counter_ RTC_GUARDED_BY(&sequence_checker_);
};

}  // namespace webrtc

#endif  // MODULES_RTP_RTCP_SOURCE_ULPFEC_RECEIVER_IMPL_H_


text:
package org.openqa.selenium.html5;

import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.testing.JUnit4TestBase;

import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static org.junit.Assert.assertEquals;
import static org.junit.Assume.assumeTrue;

public class AppCacheTest extends JUnit4TestBase {

  @Before
  public void checkIsApplicationCache() {
    assumeTrue(driver instanceof ApplicationCache);
  }

  @Test
  public void testAppCacheStatus() {
    driver.get(pages.html5Page);
    driver.manage().timeouts().implicitlyWait(2000, MILLISECONDS);

    AppCacheStatus status = ((ApplicationCache) driver).getStatus();
    while (status == AppCacheStatus.DOWNLOADING) {
      status = ((ApplicationCache) driver).getStatus();
    }
    assertEquals(AppCacheStatus.UNCACHED, status);
    // Check if resources are retrieved from browser's cache.
    ((BrowserConnection) driver).setOnline(false);
    driver.get(pages.html5OfflinePage);
    AppCacheStatus new_status = ((ApplicationCache) driver).getStatus();
    String new_title = driver.getTitle();
    ((BrowserConnection) driver).setOnline(true);

    assertEquals("The offline page should report uncached status.",
        AppCacheStatus.UNCACHED, new_status);
    assertEquals("Should be directed to the offline page", "Offline", new_title);
  }

  @Test
  public void testBrowserLoadsFromCacheWhenOffline() {
    driver.get(pages.html5Page);
    driver.get(pages.formPage);

    ((BrowserConnection) driver).setOnline(false);
    driver.get(pages.html5Page);
    String title = driver.getTitle();
    ((BrowserConnection) driver).setOnline(true);
    assertEquals("HTML5", title);
  }
}


text:
<!doctype html>

<meta charset="utf-8">
<title>Review: Show Your Work! – Heather Campbell's Blog</title>
<meta name="description" content="I found Show Your Work! by Austin Kleon an inspiration for getting out there and sharing what you know and do. It's an easy to read and digest book, split into 10 chapters, each packed with beautiful illustrations.

">
<meta name="keywords" content="review, book, community">

<meta name="twitter:title" content="Review: Show Your Work!">
<meta name="twitter:description" content="I found Show Your Work! by Austin Kleon an inspiration for getting out there and sharing what you know and do. It's an easy to read and digest book, split into 10 chapters, each packed with beautiful illustrations.

">
<meta name="twitter:site" content="@hcampbell07">
<meta name="twitter:creator" content="@hcampbell07">

<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="http://heatherjcampbell.com/images/">

<meta property="og:locale" content="en_GB">
<meta property="og:type" content="article">
<meta property="og:title" content="Review: Show Your Work!">
<meta property="og:description" content="I found Show Your Work! by Austin Kleon an inspiration for getting out there and sharing what you know and do. It's an easy to read and digest book, split into 10 chapters, each packed with beautiful illustrations.

">
<meta property="og:url" content="http://heatherjcampbell.com/books/review-show-your-work/">
<meta property="og:site_name" content="Heather Campbell's Blog">

<link rel="canonical" href="http://heatherjcampbell.com/books/review-show-your-work/">
<link href="http://heatherjcampbell.com/feed.xml" type="application/atom+xml" rel="alternate" title="Heather Campbell's Blog Feed">

<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link rel="stylesheet" href="http://heatherjcampbell.com/assets/css/main.css">

<meta http-equiv="cleartype" content="on">

<link rel="shortcut icon" href="http://heatherjcampbell.com/favicon.ico">

<link rel="shortcut icon" href="http://heatherjcampbell.com/favicon.png">

<link rel="apple-touch-icon-precomposed" href="http://heatherjcampbell.com/images/apple-touch-icon-precomposed.png">

<link rel="apple-touch-icon-precomposed" sizes="72x72" href="http://heatherjcampbell.com/images/apple-touch-icon-72x72-precomposed.png">

<link rel="apple-touch-icon-precomposed" sizes="114x114" href="http://heatherjcampbell.com/images/apple-touch-icon-114x114-precomposed.png">

<link rel="apple-touch-icon-precomposed" sizes="144x144" href="http://heatherjcampbell.com/images/apple-touch-icon-144x144-precomposed.png">

About

Blog

Presentations

Tweets

Search

 Feed

Heather Campbell's Blog

A place to share my thoughts

review

book

community

Review: Show Your Work!

        By Heather Campbell
        <time datetime="2014-10-12T00:00:00+01:00"> October 12, 2014</time>

   Tweet

   Like

   +1

I found Show Your Work! by Austin Kleon an inspiration for getting out there and sharing what you know and do. It's an easy to read and digest book, split into 10 chapters, each packed with beautiful illustrations.

The book reassures that you don't need to be an expert to have something worth sharing. Through its pages it gives simple steps to follow to get your thoughts out there.

I was looking for insights for my blog and speaking. The book provided this. It made me look closer at my day to day working and inspirations. I hadn't stepped back and thought about my inspirations before.

Chapters on how to share were also useful. I need to follow Kleon's advice and start sharing little more often. In my job it is easy to overlook the small things which go into delivering a successful project. Taking time out to share these is a good way of making myself more aware of what I'm doing well. It's good to appreciate the little wins. It is also good to recognise them for future projects.

The book promotes taking time to pick the prose to share your thoughts as you would if writing a story. It also warns against spamming. I liked the idea of self editing, not sharing for the sake of sharing, make it useful.

I was glad to see a section on teaching what you know as I'm a huge believer in doing that and the benefits it brings you. It takes you understanding to a new level.

In the past I have held back sharing my opinion in writing or when speaking because of fear. Fear of being cut down either by trolls or people who know more than me. Kleon offers sound advice on this, making you take a look at why you feel this way. Not easy but worth confronting.

I spend a lot of time reading technical books and this is a welcome distraction from those. It gave me a reassuring push that I'm doing the right thing sharing my thoughts. That a lone made it worth reading.

        Previous

        Next

© 2019 Heather Campbell. Powered by Jekyll using the So Simple Theme.


text:
require_relative 'test_helper'

class GitHubLdapGroupTest < GitHub::Ldap::Test
  def groups_domain
    @ldap.domain("ou=Groups,dc=github,dc=com")
  end

  def setup
    @ldap  = GitHub::Ldap.new(options)
    @group = @ldap.group("cn=ghe-users,ou=Groups,dc=github,dc=com")
  end

  def test_group?
    assert @group.group?(%w(group))
    assert @group.group?(%w(groupOfUniqueNames))
    assert @group.group?(%w(posixGroup))

    object_classes = %w(groupOfNames)
    assert @group.group?(object_classes)
    assert @group.group?(object_classes.map(&:downcase))
  end

  def test_subgroups
    group = @ldap.group("cn=deeply-nested-group0.0,ou=Groups,dc=github,dc=com")
    assert_equal 2, group.subgroups.size
  end

  def test_members_from_subgroups
    group = @ldap.group("cn=deeply-nested-group0.0,ou=Groups,dc=github,dc=com")
    assert_equal 10, group.members.size
  end

  def test_all_domain_groups
    groups = groups_domain.all_groups
    assert_equal 27, groups.size
  end

  def test_filter_domain_groups
    groups = groups_domain.filter_groups('ghe-users')
    assert_equal 1, groups.size
  end

  def test_filter_domain_groups_limited
    groups = []
    groups_domain.filter_groups('deeply-nested-group', size: 1) do |entry|
      groups << entry
    end
    assert_equal 1, groups.size
  end

  def test_filter_domain_groups_unlimited
    groups = groups_domain.filter_groups('deeply-nested-group')
    assert_equal 5, groups.size
  end

  def test_unknown_group
    refute @ldap.group("cn=foobar,ou=groups,dc=github,dc=com"),
      "Expected to not bind any group"
  end
end

class GitHubLdapLoopedGroupTest < GitHub::Ldap::Test
  def setup
    @group = GitHub::Ldap.new(options).group("cn=recursively-nested-groups,ou=Groups,dc=github,dc=com")
  end

  def test_members_from_subgroups
    assert_equal 10, @group.members.size
  end
end

class GitHubLdapMissingEntriesTest < GitHub::Ldap::Test
  def setup
    @ldap = GitHub::Ldap.new(options)
  end

  def test_load_right_members
    assert_equal 3, @ldap.domain("cn=missing-users,ou=groups,dc=github,dc=com").bind[:member].size
  end

  def test_ignore_missing_member_entries
    assert_equal 2, @ldap.group("cn=missing-users,ou=groups,dc=github,dc=com").members.size
  end
end


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <TextView
        android:id="@+id/room_check_number"
        android:layout_width="wrap_content"
        android:layout_height="70dp"
        android:layout_gravity="center"
        android:textSize="@dimen/room_number_size"
        android:textColor="@color/black" />
</LinearLayout>


text:
<?php

/**
 * Sales report invoiced collection
 *
 * @category    Mage
 * @package     Mage_Sales
 * @author      Magento Core Team <core@magentocommerce.com>
 */
class Mage_Sales_Model_Resource_Report_Invoiced_Collection_Order
    extends Mage_Sales_Model_Resource_Report_Collection_Abstract
{
    /**
     * Period format
     *
     * @var string
     */
    protected $_periodFormat;

    /**
     * Columns for select
     *
     * @var array
     */
    protected $_selectedColumns    = array();

    /**
     * Initialize custom resource model
     *
     */
    public function __construct()
    {
        parent::_construct();
        $this->setModel('adminhtml/report_item');
        $this->_resource = Mage::getResourceModel('sales/report')->init('sales/invoiced_aggregated_order');
        $this->setConnection($this->getResource()->getReadConnection());
    }

    /**
     * Retrieve columns for select
     *
     * @return array
     */
    protected function _getSelectedColumns()
    {
        $adapter = $this->getConnection();
        if ('month' == $this->_period) {
            $this->_periodFormat = $adapter->getDateFormatSql('period', '%Y-%m');
        } elseif ('year' == $this->_period) {
            $this->_periodFormat = $adapter->getDateExtractSql('period', Varien_Db_Adapter_Interface::INTERVAL_YEAR);
        } else {
            $this->_periodFormat = $adapter->getDateFormatSql('period', '%Y-%m-%d');
        }

        if (!$this->isTotals()) {
            $this->_selectedColumns = array(
                'period'                => $this->_periodFormat,
                'orders_count'          => 'SUM(orders_count)',
                'orders_invoiced'       => 'SUM(orders_invoiced)',
                'invoiced'              => 'SUM(invoiced)',
                'invoiced_captured'     => 'SUM(invoiced_captured)',
                'invoiced_not_captured' => 'SUM(invoiced_not_captured)'
            );
        }

        if ($this->isTotals()) {
            $this->_selectedColumns = $this->getAggregatedColumns();
        }

        return $this->_selectedColumns;
    }

    /**
     * Add selected data
     *
     * @return Mage_Sales_Model_Resource_Report_Invoiced_Collection_Order
     */
    protected function _initSelect()
    {
        $this->getSelect()->from($this->getResource()->getMainTable() , $this->_getSelectedColumns());
        if (!$this->isTotals()) {
            $this->getSelect()->group($this->_periodFormat);
            $this->getSelect()->having('SUM(orders_count) > 0');
        }
        return $this;
    }
}