text:
Zoek op "partition" en je vindt de WMI klasse "Win32_DiskPartition".
In het tabblad "Associations" vind je de figuur:

Hierin vind je alle antwoorden op de vraag:
"Win32_LogicalDisk"    (DeviceID, FileSystem, Size, FreeSpace, MediaType, Compressed,... )
         \ Dependent
          |  "Win32_LogicalDiskToPartition"
         / Antecedent
"Win32_DiskPartition"  (DeviceID, PrimaryPartition, StartingOffset, ... )
         \ Dependent
          | "Win32_DiskDriveToDiskPartition"
         / Antecedent
"Win32_DiskDrive"    (DeviceID, Model, InterfaceType, TotalCylinders, TracksPerCylinder, SectorsPerTrack, ... )


text:
'use strict';
const test = require('ava');
const path = require('path');
const Loader = require('../lib/loader');
process.env.NODE_ENV = '';

const loader = Loader.create({ env: '' });
const app = loader.getWorker().ensureInited();
const settings = app.units.require('core.settings');

test('gets the absolute path', t => {
  const p = settings.joinPath('lib');
  t.is(p, path.join(process.cwd(), 'lib'));
})

test('fails on require', t => {
  const err = t.throws(() => settings.require('test'));
  t.is(err.message, '\'test\' settings is required');
})

test('applies the settings from the object', t => {
  settings.apply({
    test: 'test'
  })

  t.is(settings.test, 'test');
})

test('does not fails on require', t => {
  const test = settings.require('test');
  t.is(test, 'test');
})

test('fails to apply settings from file', t => {
  const err = t.throws(() => settings.apply('test'));
  t.true(err.message.startsWith('Cannot find module'));
})

test('applies settings from the file', t => {
  settings.apply('index');
  t.pass();
})

redpajama_set_name: RedPajamaGithub


text:
// Dstl (c) Crown Copyright 2017
package uk.gov.dstl.baleen.contentmappers.helpers;

import java.util.Arrays;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;

import org.apache.uima.jcas.tcas.Annotation;

import uk.gov.dstl.baleen.contentmappers.SemanticHtml;

/**
 * Collects annotations within {@link ContentMapper}.
 *
 *
This class is necessary since {@link ContentMapper} do not know the beginning and end offset
 * of the tag in the UIMA text.
 *
 *
Typically a content mapper will simply:
 *
 *

 * collectors.add(new Heading(jCas));
 *

 *
 * See {@link SemanticHtml} for details.
 */
public class AnnotationCollector {
  private List<Annotation> annotations;

  /**
   * Adds the annotations to the collector
   *
   * @param a the a
   */
  public void add(Annotation... a) {
    add(Arrays.asList(a));
  }

  /**
   * Adds annotations to the collector
   *
   * @param collection the collection
   */
  public void add(Collection<Annotation> collection) {
    if (annotations == null) {
      annotations = new LinkedList<>();
    }
    annotations.addAll(collection);
  }

  /**
   * Get annotations within this collector.
   *
   * @return may be null (if no annotations have been added)
   */
  public List<Annotation> getAnnotations() {
    return annotations;
  }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using System.IO;
using System.Web;

namespace SitemapGenerator
{
	class Program
	{
		const string RootString = @"http://slimdx.mdxinfo.com/latestdocs/Default.aspx?topic=";

		static List<string> m_urlList = new List<string>(256);

		static void AddTopic(string rootString, XmlNode parent)
		{
			foreach(XmlNode topic in parent.ChildNodes)
			{
				if(topic.Attributes["file"].Value == string.Empty)
					continue;

				var name = HttpUtility.UrlEncode((string) topic.Attributes["name"].Value);
				m_urlList.Add(rootString + name);

				AddTopic(rootString + name + "/", topic);
			}
		}

		static void WriteSitemap()
		{
			var stream = File.OpenWrite("sitemap.xml");
			var writer = new StreamWriter(stream);

			writer.WriteLine("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
			writer.WriteLine("<urlset xmlns=\"http://www.sitemaps.org/schemas/sitemap/0.9\">");

			foreach(string url in m_urlList)
			{
				writer.WriteLine(string.Format("<url><loc>{0}</loc></url>", url));
			}

			writer.WriteLine("</urlset>");
			writer.Close();
		}

		static void Main(string[] args)
		{
			if (args.Length < 1)
				return;
			if(!File.Exists(args[0]))
				return;

			var contents = new XmlDocument();
			contents.Load(args[0]);
			AddTopic(RootString, contents.SelectSingleNode("topics"));
			WriteSitemap();
		}
	}
}


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
null

#### Original name
Fusicoccum caraganae Danilova

### Remarks
null


text:
def process(self):
    self.edit("HANGZHOU NUMERAL", "hangzhou")

    self.edit("JAPANESE INDUSTRIAL STANDARD SYMBOL", "jis")
    self.edit("CIRCLED POSTAL MARK", "circlepostalmark")
    self.edit("REVERSED DOUBLE PRIME QUOTATION MARK", "quotedblprimereversed")
    self.edit("DOUBLE PRIME QUOTATION MARK", "quotedblprime")
    self.edit("LEFT DOUBLE ANGLE BRACKET", "dblanglebracketleft")
    self.edit("RIGHT DOUBLE ANGLE BRACKET", "dblanglebracketright")
    self.edit("IDEOGRAPHIC NUMBER ZERO", "ideographiczero")
    self.edit("REVERSED", "reversed")
    self.edit("CLOSING MARK", "close")
    self.edit("FULL STOP", "period")
    self.edit("DOUBLE ANGLE", "dblangle")
    self.edit("DOUBLE", "dbl")
    self.edit("LEFT", "left")
    self.edit("RIGHT", "right")
    self.processAs("Helper Digit Names")
    self.lower()
    self.compress()

if __name__ == "__main__":
    from glyphNameFormatter.exporters import printRange
    printRange("CJK Symbols and Punctuation")


text:
namespace iboost {

  //_______________________________________________________________________________
  // Develop one internal operation in a BufferVarWriter class
#define I_BUFFVARWRITER_SELFOP( action )		\
  const char &type = fVar->getType();			\
  auto ptr = fArray.get_data();				\
  I_SWITCH_BY_DATA_TYPE(type, ptr, action, NOOP);

  //_______________________________________________________________________________
  //
  BuffVarWriter::BuffVarWriter( isis::BufferVariable *var,
				const np::ndarray &array ) :
    fVar(var), fArray(array) { }

  //_______________________________________________________________________________
  //
  BuffVarWriter::BuffVarWriter( isis::TreeBuffer &buffer,
				const std::string &name,
				const np::ndarray &array ) :
    fArray(array) {

    const char type = NUMPY_TYPE_CONVERTER.parse_numpy_type(fArray.get_dtype());

    fVar = buffer.createVariable(name, type);
  }

  //_______________________________________________________________________________
  //
  BuffVarWriter::~BuffVarWriter() {  }

  //_______________________________________________________________________________
  //
  void BuffVarWriter::appendToArray( const size_t &idx, const size_t &n ) {

#define I_BUFFVARWRITER_SET_ARRAY_VALUE( type, ptr ) {			\
      type* type ## _ptr = reinterpret_cast<type*>(ptr + n*idx);	\
      type val = 0;							\
      fVar->extractValue(val);						\
      *type ## _ptr = val;						\
    }

    I_BUFFVARWRITER_SELFOP(I_BUFFVARWRITER_SET_ARRAY_VALUE);

#undef I_BUFFVARWRITER_SET_ARRAY_VALUE
  }

  //_______________________________________________________________________________
  //
  void BuffVarWriter::appendToVar( const size_t &idx, const size_t &n ) {

#define I_BUFFVARWRITER_GET_ARRAY_VALUE( type, ptr ) {			\
      type* type ## _ptr = reinterpret_cast<type*>(ptr + n*idx);	\
      fVar->setValue(*type ## _ptr);					\
    }

    I_BUFFVARWRITER_SELFOP(I_BUFFVARWRITER_GET_ARRAY_VALUE);

#undef I_BUFFVARWRITER_GET_ARRAY_VALUE
  }

}


text:
const express = require('express');
const user = require('./user');

const router = express.Router();

router.use('/users', user);

module.exports = router;


text:
namespace async {
namespace detail {

void* aligned_alloc(std::size_t size, std::size_t align)
{
#ifdef _WIN32
	void* ptr = _aligned_malloc(size, align);
	if (!ptr)
		LIBASYNC_THROW(std::bad_alloc());
	return ptr;
#else
	void* result;
	if (posix_memalign(&result, align, size))
		LIBASYNC_THROW(std::bad_alloc());
	else
		return result;
#endif
}

void aligned_free(void* addr) LIBASYNC_NOEXCEPT
{
#ifdef _WIN32
	_aligned_free(addr);
#else
	free(addr);
#endif
}

// Wait for a task to complete (for threads outside thread pool)
static void generic_wait_handler(task_wait_handle wait_task)
{
	// Create an event to wait on
	task_wait_event event;
	event.init();

	// Create a continuation for the task we are waiting for
	wait_task.on_finish([&event] {
		// Just signal the thread event
		event.signal(wait_type::task_finished);
	});

	// Wait for the event to be set
	event.wait();
}

#if defined(EMULATE_PTHREAD_THREAD_LOCAL)
// Wait handler function, per-thread, defaults to generic version
struct pthread_emulation_thread_wait_handler_key_initializer {
	pthread_key_t key;

	pthread_emulation_thread_wait_handler_key_initializer()
	{
		pthread_key_create(&key, nullptr);
	}

	~pthread_emulation_thread_wait_handler_key_initializer()
	{
		pthread_key_delete(key);
	}
};

static pthread_key_t get_thread_wait_handler_key()
{
	static pthread_emulation_thread_wait_handler_key_initializer initializer;
	return initializer.key;
}

#else
static THREAD_LOCAL wait_handler thread_wait_handler = generic_wait_handler;
#endif

static void set_thread_wait_handler(wait_handler handler)
{
#if defined(EMULATE_PTHREAD_THREAD_LOCAL)
	// we need to call this here, because the pthread initializer is lazy,
	// this means the it could be null and we need to set it before trying to
	// get or set it
	pthread_setspecific(get_thread_wait_handler_key(), reinterpret_cast<void*>(handler));
#else
	thread_wait_handler = handler;
#endif
}

static wait_handler get_thread_wait_handler()
{
#if defined(EMULATE_PTHREAD_THREAD_LOCAL)
	// we need to call this here, because the pthread initializer is lazy,
	// this means the it could be null and we need to set it before trying to
	// get or set it
	wait_handler handler = (wait_handler) pthread_getspecific(get_thread_wait_handler_key());
	if(handler == nullptr) {
		return generic_wait_handler;
	}
	return handler;
#else
	return thread_wait_handler;
#endif
}

// Wait for a task to complete
void wait_for_task(task_base* wait_task)
{
	// Dispatch to the current thread's wait handler
	wait_handler thread_wait_handler = get_thread_wait_handler();
	thread_wait_handler(task_wait_handle(wait_task));
}

// The default scheduler is just a thread pool which can be configured
// using environment variables.
class default_scheduler_impl: public threadpool_scheduler {
	static std::size_t get_num_threads()
	{
		// Get the requested number of threads from the environment
		// If that fails, use the number of CPUs in the system.
		std::size_t num_threads;
#ifdef _MSC_VER
		char* s;
# ifdef __cplusplus_winrt
		// Windows store applications do not support environment variables
		s = nullptr;
# else
		// MSVC gives an error when trying to use getenv, work around this
		// by using _dupenv_s instead.
		_dupenv_s(&s, nullptr, "LIBASYNC_NUM_THREADS");
# endif
#else
		const char *s = std::getenv("LIBASYNC_NUM_THREADS");
#endif
		if (s)
			num_threads = std::strtoul(s, nullptr, 10);
		else
			num_threads = hardware_concurrency();

#if defined(_MSC_VER) && !defined(__cplusplus_winrt)
		// Free the string allocated by _dupenv_s
		free(s);
#endif

		// Make sure the thread count is reasonable
		if (num_threads < 1)
			num_threads = 1;
		return num_threads;
	}

public:
	default_scheduler_impl()
		: threadpool_scheduler(get_num_threads()) {}
};

// Thread scheduler implementation
void thread_scheduler_impl::schedule(task_run_handle t)
{
	// A shared_ptr is used here because not all implementations of
	// std::thread support move-only objects.
	std::thread([](const std::shared_ptr<task_run_handle>& t) {
		t->run();
	}, std::make_shared<task_run_handle>(std::move(t))).detach();
}

} // namespace detail

threadpool_scheduler& default_threadpool_scheduler()
{
	return detail::singleton<detail::default_scheduler_impl>::get_instance();
}

// FIFO scheduler implementation
struct fifo_scheduler::internal_data {
	detail::fifo_queue queue;
	std::mutex lock;
};
fifo_scheduler::fifo_scheduler()
	: impl(new internal_data) {}
fifo_scheduler::~fifo_scheduler() {}
void fifo_scheduler::schedule(task_run_handle t)
{
	std::lock_guard<std::mutex> locked(impl->lock);
	impl->queue.push(std::move(t));
}
bool fifo_scheduler::try_run_one_task()
{
	task_run_handle t;
	{
		std::lock_guard<std::mutex> locked(impl->lock);
		t = impl->queue.pop();
	}
	if (t) {
		t.run();
		return true;
	}
	return false;
}
void fifo_scheduler::run_all_tasks()
{
	while (try_run_one_task()) {}
}

std::size_t hardware_concurrency() LIBASYNC_NOEXCEPT
{
	// Cache the value because calculating it may be expensive
	static std::size_t value = std::thread::hardware_concurrency();

	// Always return at least 1 core
	return value == 0 ? 1 : value;
}

wait_handler set_thread_wait_handler(wait_handler handler) LIBASYNC_NOEXCEPT
{
	wait_handler old = detail::get_thread_wait_handler();
	detail::set_thread_wait_handler(handler);
	return old;
}

} // namespace async

#ifndef LIBASYNC_STATIC
#if defined(__GNUC__) && !defined(_WIN32)
# pragma GCC visibility pop
#endif
#endif


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" >

    <Button
        android:id="@+id/manage_character_levels_button"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Manage Character Levels" />

    <Button
        android:id="@+id/adjust_stats_button"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="Adjust Stats" />

</LinearLayout>


text:
Edit article

New article

{{diagnostic}}
<form (ngSubmit)="onSubmit()" #articleForm="ngForm" *ngIf="article">

    Id
    <input type="text" class="form-control" id="articleId" name="articleId" placeholder="Id" readonly="true" [ngModel]="article.articleId" (ngModelChange)="hideAlert($event)">

    Name
    <input type="text" class="form-control" id="name" placeholder="Name" name="name" [(ngModel)]="article.name" [articlename]="article.articleId" #name="ngModel" required (ngModelChange)="hideAlert($event)">

Name is required

This article name is already in use

    Description
    <textarea class="form-control" rows="3"  id="descriptionname" placeholder="Description" name="description" [(ngModel)]="article.description" #description="ngModel" (ngModelChange)="hideAlert($event)"></textarea>

    Price
    <input type="text" class="form-control" id="price" name="price" placeholder="Price" [(ngModel)]="article.price" required pattern="[0-9]+(\.[0-9]{1,2})?" #price="ngModel" (ngModelChange)="hideAlert($event)">

Price is required

Price is not a valid number with 2 decimal places.

    Category
    <combo-box [listData]="categories" [displayField]="'name'" [(ngModel)]="article.category" name="category" #category="ngModel" required (ngModelChange)="hideAlert($event)"> </combo-box>

Category is required

  <button type="submit" class="btn btn-default" [disabled]="!articleForm.form.valid">
    Save

  </button>

Speichern erfolgreich!

</form>


text:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.starcut.bot">

    <uses-feature android:glEsVersion="0x00020000" android:required="true" />

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="@string/google_maps_key" />

        <activity android:name=".RecyclerViewActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".Map.MapsActivity"
            android:label="@string/title_activity_maps" />
        <activity android:name=".FrontPageActivity" />
        <activity android:name=".DetailQuestionActivity" />

    </application>

</manifest>


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>disel: 54 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.10.0 / disel - 2.1

            « Up

              disel

                2.1
                54 s

 (2020-07-16 08:04:26 UTC)

Context

# Packages matching: installed
# Name              # Installed # Synopsis
base-bigarray       base
base-num            base        Num library distributed with the OCaml compiler
base-threads        base
base-unix           base
conf-findutils      1           Virtual package relying on findutils
conf-m4             1           Virtual package relying on m4
coq                 8.10.0      Formal proof management system
num                 0           The Num library for arbitrary-precision integer and rational arithmetic
ocaml               4.05.0      The OCaml compiler (virtual package)
ocaml-base-compiler 4.05.0      Official 4.05.0 release
ocaml-config        1           OCaml Switch Configuration
ocamlfind           1.8.1       A library manager for OCaml
# opam file:
opam-version: "2.0"
maintainer: "palmskog@gmail.com"
homepage: "https://github.com/DistributedComponents/disel"
dev-repo: "git+https://github.com/DistributedComponents/disel.git"
bug-reports: "https://github.com/DistributedComponents/disel/issues"
license: "BSD-2-Clause"
synopsis: "Core framework files for Disel, a separation-style logic for compositional verification of distributed systems in Coq"
description: """
Disel is a framework for implementation and compositional verification of
distributed systems and their clients in Coq. In Disel, users implement
distributed systems using a domain specific language shallowly embedded in Coq
which provides both high-level programming constructs as well as low-level
communication primitives. Components of composite systems are specified in Disel
as protocols, which capture system-specific logic and disentangle system definitions
from implementation details.
"""
build: [make "-j%{jobs}%" "-C" "Core"]
install: [make "-C" "Core" "install"]
depends: [
  "ocaml"
  "coq" {>= "8.7" & < "8.12~"}
  "coq-mathcomp-ssreflect" {>= "1.6.2" & < "1.11~"}
  "coq-fcsl-pcm"
]
tags: [
  "category:Computer Science/Concurrent Systems and Protocols/Theory of concurrent systems"
  "keyword:program verification"
  "keyword:separation logic"
  "keyword:distributed algorithms"
  "date:2019-02-11"
  "logpath:DiSeL"
]
authors: [
  "Ilya Sergey"
  "James R. Wilcox"
]
url {
  src: "https://github.com/DistributedComponents/disel/archive/v2.1.tar.gz"
  checksum: "sha512=8931a36001c2be3aedb0c8872bb13e3dd2932be3e1e8200a7d9de46dbc1185ea1ba5eb4ea9e7523bc2bd326f2fb4486e3eaf63280c4f7021a87cab0f88829f26"
}

Lint

Command

true

Return code

0

Dry install

Dry install with the current Coq version:

Command

opam install -y --show-action coq-disel.2.1 coq.8.10.0

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 2h opam install -y --deps-only coq-disel.2.1 coq.8.10.0

Return code

0

Duration

2 m 5 s

Install

Command

opam list; echo; ulimit -Sv 16000000; timeout 2h opam install -y -v coq-disel.2.1 coq.8.10.0

Return code

0

Duration

54 s

Installation size

Total: 3 M

242 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Domain.vo

234 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Process.vo

211 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Always.vo

200 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Injection.vo

171 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/InductiveInv.vo

144 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Domain.glob

132 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Rely.vo

127 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/HoareTriples.vo

123 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Injection.glob

121 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Actions.vo

111 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/StatePredicates.vo

95 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/NetworkSem.vo

91 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/InductiveInv.glob

81 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Worlds.vo

79 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Protocols.vo

76 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/InferenceRules.vo

69 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Always.glob

63 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Freshness.vo

60 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/State.vo

56 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/NewStatePredicates.vo

55 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/DepMaps.vo

51 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/HoareTriples.glob

49 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Actions.glob

47 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/StatePredicates.glob

43 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/While.vo

37 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Process.glob

37 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Domain.v

34 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/InferenceRules.glob

33 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/EqTypeX.vo

32 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/DiSeLExtraction.vo

31 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Rely.glob

30 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Protocols.glob

27 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/NetworkSem.glob

26 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Worlds.glob

24 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Freshness.glob

20 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Injection.v

20 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/State.glob

18 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/InductiveInv.v

18 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Always.v

16 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/DepMaps.glob

13 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/NewStatePredicates.glob

13 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/HoareTriples.v

11 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Process.v

10 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Actions.v

10 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/StatePredicates.v

9 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Protocols.v

9 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/InferenceRules.v

8 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/State.v

8 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/NetworkSem.v

7 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Rely.v

7 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/While.glob

6 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Worlds.v

4 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/Freshness.v

4 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/EqTypeX.glob

4 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/DepMaps.v

3 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/NewStatePredicates.v

2 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/EqTypeX.v

2 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/While.v

1 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/DiSeLExtraction.v

1 K ../ocaml-base-compiler.4.05.0/lib/coq/user-contrib/DiSeL/DiSeLExtraction.glob

Uninstall

Command

opam remove -y coq-disel.2.1

Return code

0

Missing removes

                none

Wrong removes

                none

          Sources are on GitHub. © Guillaume Claret.


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <title>Picstachio | Find your custom stock photo</title>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

  <link href="/css/bootstrap.css" rel="stylesheet">
  <link href="/css/bootstrap-responsive.css" rel="stylesheet">

  <link href="/css/flat-ui.css" rel="stylesheet">
  <link rel="stylesheet" type="text/css" href="/css/angelhack.css">

  <link rel="shortcut icon" href="images/favicon.ico">

        <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">

        </button>

              Create a campaign

              Sign up

              Login

Purchase photos

            VISA

            MASTERCARD

            CASH

            Pay


text:
package iiit.speech.dialog;

import android.app.Activity;

import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import iiit.speech.domain.DomainDesc;
import iiit.speech.itra.VaidyaActivity;
import iiit.speech.nlu.NLU;

/**
 * Created by brij on 3/9/15.
 */
public class DialogManager {

    private VaidyaActivity app;
    private NLU nlu;
    private DomainDesc domain;
    private Map<String, DialogState> states;
    public String current_state;

    public DialogManager(VaidyaActivity a) {
        app = a;
        try {
            nlu = new NLU(a);
        } catch (IOException e) {

        }
        initStates();
    }

    private void initStates() {
        states = new LinkedHashMap<>();
        GreetState greetState = new GreetState(app, nlu);
        states.put("greet", greetState);
        AskSymptomsState askSymptomsState = new AskSymptomsState(app, nlu);
        states.put("ask_symptoms", askSymptomsState);
        DiagnosisState diagnosisState = new DiagnosisState(app, nlu);
        states.put("diagnosis", diagnosisState);
        DiseaseDetailsState diseaseDetailsState = new DiseaseDetailsState(app, nlu);
        states.put("disease_details", diseaseDetailsState);
        SymptomDetailsState symptomDetailsState = new SymptomDetailsState(app, nlu);
        states.put("symptom_details", symptomDetailsState);
        DiseaseEnquiry diseaseEnquiry = new DiseaseEnquiry(app, nlu);
        states.put("disease_enquiry",diseaseEnquiry);
        FirstAidEnquiry firstAidEnquiry = new FirstAidEnquiry(app, nlu);
        states.put("first_aid",firstAidEnquiry);

        current_state = "greet";

    }

    public String manage(String hyp) {

        DialogState state = states.get(current_state);
        app.state_history.add(current_state);
        if (nlu.isValidString(hyp)) {
            if (!state.entered) {
                state.onEntry();

                // TO surpass the domain detection logic
                if (state.conclude) {
                    current_state = state.next_state;
                    states.get(current_state).domain = state.domain;
                    state = states.get(current_state);
                    //state.conclude = false;
                    state.onEntry();
                }
            }
            else if (!state.conclude) {
                state.onRecognize(hyp);
                if (state.conclude) {
                    state.onExit();
                    System.out.println("Concluded :" + current_state + "; Next state :" + state.next_state);
                    current_state = state.next_state;
                    if (current_state.equals("reset")) {
                        reset();
                    } else {
                        states.get(current_state).domain = state.domain;
                        //manage(null);
                        state = states.get(current_state);
                        state.onEntry();
                        if (state.conclude) {
                            current_state = state.next_state;
                            states.get(current_state).domain = state.domain;
                            state = states.get(current_state);
                            if (state.conclude){
                                state.conclude = false;
                            }
                        }
                    }
                }
            }
        }
        else if (hyp.equals("HARD_RESET")){
            app.speakOut("Dialog has been reset", null);
        }
        else {
            app.speakOut("Please repeat", null);
        }

        System.out.println("Current state ======> " + state.getName());
        System.out.println("Current grammar ======> " + state.current_grammar);

        return state.current_grammar;
    }

    public void reset() {
        initStates();
    }
}


text:
#import <XCTest/XCTest.h>
#import <ccdaparser/ccdaparser.h>
#import "HL7Addr.h"
#import "HL7ElementParser+Additions.h"
#import "HL7Enums_Private.h"
#import "IGXMLReader+Additions.h"
#import "IGXMLReader.h"

@interface useFromStringTests : XCTestCase

@end

@implementation useFromStringTests

- (void)setUp
{
    [super setUp];
}

- (void)tearDown
{
    [super tearDown];
}

- (void)testUseAddressFromString
{
    XCTAssertEqual(HL7UseAddressTypeHome, [HL7Enumerations hl7AddressTypeUseFromString:@"H"]);
    XCTAssertEqual(HL7UseAddressTypePrimaryHome, [HL7Enumerations hl7AddressTypeUseFromString:@"HP"]);
    XCTAssertEqual(HL7UseAddressTypePrimaryVacationHome, [HL7Enumerations hl7AddressTypeUseFromString:@"HV"]);
    XCTAssertEqual(HL7UseAddressTypeWorkPlace, [HL7Enumerations hl7AddressTypeUseFromString:@"WP"]);
    XCTAssertEqual(HL7UseAddressTypeBadAddress, [HL7Enumerations hl7AddressTypeUseFromString:@"BAD"]);
    XCTAssertEqual(HL7UseAddressTypePublic, [HL7Enumerations hl7AddressTypeUseFromString:@"PUB"]);
    XCTAssertEqual(HL7UseAddressTypeDirectWorkPlaceAddress, [HL7Enumerations hl7AddressTypeUseFromString:@"DIR"]);
    XCTAssertEqual(HL7UseAddressTypeUnknown, [HL7Enumerations hl7AddressTypeUseFromString:@"XXX"]);
}

- (void)testUseNameFromString
{
    XCTAssertEqual(HL7UseNameTypeLicense, [HL7Enumerations hl7NameUseFromString:@"C"]);
    XCTAssertEqual(HL7UseNameTypeIndigenous, [HL7Enumerations hl7NameUseFromString:@"I"]);
    XCTAssertEqual(HL7UseNameTypeLegal, [HL7Enumerations hl7NameUseFromString:@"L"]);
    XCTAssertEqual(HL7UseNameTypePseudonym, [HL7Enumerations hl7NameUseFromString:@"P"]);
    XCTAssertEqual(HL7UseNameTypeArtist, [HL7Enumerations hl7NameUseFromString:@"A"]);
    XCTAssertEqual(HL7UseNameTypeReligious, [HL7Enumerations hl7NameUseFromString:@"R"]);
    XCTAssertEqual(HL7UseNameTypeSearch, [HL7Enumerations hl7NameUseFromString:@"SRCH"]);
    XCTAssertEqual(HL7UseNameTypeSearchPhonetic, [HL7Enumerations hl7NameUseFromString:@"PHON"]);
    XCTAssertEqual(HL7UseNameTypeSearchSoundex, [HL7Enumerations hl7NameUseFromString:@"SNDX"]);
    XCTAssertEqual(HL7UseNameTypeAlphabetic, [HL7Enumerations hl7NameUseFromString:@"ABC"]);
    XCTAssertEqual(HL7UseNameTypeSyllabic, [HL7Enumerations hl7NameUseFromString:@"SYL"]);
    XCTAssertEqual(HL7UseNameTypeIdeographic, [HL7Enumerations hl7NameUseFromString:@"IDE"]);
}

- (void)testUseTelecomFromString
{
    XCTAssertEqual(HL7UseTelecomTypeUnknown, [HL7Enumerations hl7TelecomUseFromString:@"XXX"]);
    XCTAssertEqual(HL7UseTelecomTypeHome, [HL7Enumerations hl7TelecomUseFromString:@"H"]);
    XCTAssertEqual(HL7UseTelecomTypeHomePrimary, [HL7Enumerations hl7TelecomUseFromString:@"HP"]);
    XCTAssertEqual(HL7UseTelecomTypeHomeVacation, [HL7Enumerations hl7TelecomUseFromString:@"HV"]);
    XCTAssertEqual(HL7UseTelecomTypeWorkPlace, [HL7Enumerations hl7TelecomUseFromString:@"WP"]);
    XCTAssertEqual(HL7UseTelecomTypeDirect, [HL7Enumerations hl7TelecomUseFromString:@"DIR"]);
    XCTAssertEqual(HL7UseTelecomTypePublic, [HL7Enumerations hl7TelecomUseFromString:@"PUB"]);
    XCTAssertEqual(HL7UseTelecomTypeBad, [HL7Enumerations hl7TelecomUseFromString:@"BAD"]);
    XCTAssertEqual(HL7UseTelecomTypeTemporary, [HL7Enumerations hl7TelecomUseFromString:@"TMP"]);
    XCTAssertEqual(HL7UseTelecomTypeAnsweringMachine, [HL7Enumerations hl7TelecomUseFromString:@"AS"]);
    XCTAssertEqual(HL7UseTelecomTypeEmergencyContact, [HL7Enumerations hl7TelecomUseFromString:@"EC"]);
    XCTAssertEqual(HL7UseTelecomTypeMobileContact, [HL7Enumerations hl7TelecomUseFromString:@"MC"]);
    XCTAssertEqual(HL7UseTelecomTypePager, [HL7Enumerations hl7TelecomUseFromString:@"PG"]);
}
@end


text:
    <?php $this->load->view("admin_header"); ?>

                    ESocial Admin

                            <input id="tw-switch" type="checkbox" hidden="hidden">

                        6

                                    Messages

David Belle

                                                Cum sociis natoque penatibus et magnis dis parturient montes

Jonathan Morris

                                                Nunc quis diam diamurabitur at dolor elementum, dictum turpis vel

Fredric Mitchell Jr.

                                                Phasellus a ante et est ornare accumsan at vel magnauis blandit turpis at augue ultricies

Glenn Jecobs

                                                Ut vitae lacus sem ellentesque maximus, nunc sit amet varius dignissim, dui est consectetur neque

Bill Phillips

                                                Proin laoreet commodo eros id faucibus. Donec ligula quam, imperdiet vel ante placerat

                                View All

                        9

                                    Notification

David Belle

                                                Cum sociis natoque penatibus et magnis dis parturient montes

Jonathan Morris

                                                Nunc quis diam diamurabitur at dolor elementum, dictum turpis vel

Fredric Mitchell Jr.

                                                Phasellus a ante et est ornare accumsan at vel magnauis blandit turpis at augue ultricies

Glenn Jecobs

                                                Ut vitae lacus sem ellentesque maximus, nunc sit amet varius dignissim, dui est consectetur neque

Bill Phillips

                                                Proin laoreet commodo eros id faucibus. Donec ligula quam, imperdiet vel ante placerat

                                View Previous

                        2

                                    Tasks

HTML5 Validation Report

                                                95% Complete (success)

Google Chrome Extension

                                                80% Complete (success)

Social Intranet Projects

                                                20% Complete

Bootstrap Admin Template

                                                60% Complete (warning)

Youtube Client App

                                                80% Complete (danger)

                                View All

                                 Toggle Fullscreen

                                 Clear Local Storage

                                 Privacy Settings

                                 Other Settings

                <input type="text">
                ×

            <?php  $this->load->view("admin_left_sidebar"); ?>

Friends

Online Now

                        <input type="text" class="form-control" placeholder="Search People">

Jonathan Morris

                                        Available

David Belle

                                        Last seen 3 hours ago

Fredric Mitchell Jr.

                                        Availble

Glenn Jecobs

                                        Availble

Bill Phillips

                                        Last seen 3 days ago

Wendy Mitchell

                                        Last seen 2 minutes ago

Teena Bell Ann

                                        Busy

Jonathan Morris

                                        Available

Fredric Mitchell Jr.

                                        Availble

Glenn Jecobs

                                        Availble

Teena Bell Ann

                                        Busy

Typography

                                        Refresh

                                        Manage Widgets

                                        Widgets Settings

Body Copy

                                            You can put anything here

Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor. Duis mollis, est non commodo luctus.

Pellentesque lacinia sagittis libero et feugiat. Etiam volutpat adipiscing tortor non luctus. Vivamus venenatis vitae metus et aliquet. Praesent vitae justo purus. In hendrerit lorem nisl, ac lacinia urna aliquet non. Quisque nisi tellus, rhoncus quis est sit amet, lacinia euismod nunc. Aenean nec nibh velit. Fusce quis ante in nisl molestie fringilla. Nunc vitae ante id magna feugiat condimentum. Maecenas sit amet urna massa.

Integer eu lectus sollicitudin, hendrerit est ac, sollicitudin nisl. Quisque viverra sodales lectus nec ultrices. Fusce elit dolor, dignissim a nunc id, varius suscipit turpis. Cras porttitor turpis vitae leo accumsan molestie. Morbi vitae luctus leo. Sed nec scelerisque magna, et adipiscing est. Proin lobortis lectus eu sem ullamcorper, commodo malesuada quam fringilla. Curabitur ac nunc dui. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Fusce sagittis enim eu est lacinia, ut egestas ligula imperdiet.

Headings

                                            You can put anything here

This is a Heading 1

Suspendisse vel quam malesuada, aliquet sem sit amet, fringilla elit. Morbi tempor tincidunt tempor. Etiam id turpis viverra, vulputate sapien nec, varius sem. Curabitur ullamcorper fringilla eleifend. In ut eros hendrerit est consequat posuere et at velit.

This is a Heading 2

In nec rhoncus eros. Vestibulum eu mattis nisl. Quisque viverra viverra magna nec pulvinar. Maecenas pellentesque porta augue, consectetur facilisis diam porttitor sed. Suspendisse tempor est sodales augue rutrum tincidunt. Quisque a malesuada purus.

This is a Heading 3

Vestibulum auctor tincidunt semper. Phasellus ut vulputate lacus. Suspendisse ultricies mi eros, sit amet tempor nulla varius sed. Proin nisl nisi, feugiat quis bibendum vitae, dapibus in tellus.

This is a Heading 4

Nulla et mattis nunc. Curabitur scelerisque commodo condimentum. Mauris blandit, velit a consectetur egestas, diam arcu fermentum justo, eget ultrices arcu eros vel erat.

This is a Heading 5

Quisque nec turpis at urna dictum luctus. Suspendisse convallis dignissim eros at volutpat. In egestas mattis dui. Aliquam mattis dictum aliquet. Nulla sapien mauris, eleifend et sem ac, commodo dapibus odio. Vivamus pretium nec odio cursus elementum. Suspendisse molestie ullamcorper ornare.

This is a Heading 6

Donec ultricies, lacus id tempor condimentum, orci leo faucibus sem, a molestie libero lectus ac justo. ultricies mi eros, sit amet tempor nulla varius sed. Proin nisl nisi, feugiat quis bibendum vitae, dapibus in tellus.

Inline text elements

                                            You can put anything here

Marked text

For highlighting a run of text due to its relevance in another context, use the 'mark' tag.

                                    This is marked text

Deleted Text

For indicating blocks of text that have been deleted use the 'del' tag.

                                    This is Deleted Text

Strikethrough text

For indicating blocks of text that are no longer relevant use the 's' tag.

                                    <s>This is Deleted Text</s>

Inserted Text

For indicating additions to the document use the 'ins' tag.

                                    This is Inserted Text

Underlined Text

To underline text use the 'u' tag.

                                    This is Underlined Text

Small Text

For de-emphasizing inline or blocks of text, use the 'small' tag.

                                    This is Small Text

Bold Text

For emphasizing a snippet of text with a heavier font-weight.

                                    This is Bold Text

Underline Text

For emphasizing a snippet of text with italics.

                                    This is Underline Text

Helper Classes

                                                    You can put anything here

Alignment Classes

Easily realign text to components with text alignment classes.

Left aligned text.

Center aligned text.

Right aligned text.

Justified text.

No wrap text.

Transformation classes

Transform text in components with text capitalization classes.

Lowercased text.

Uppercased text.

Capitalized text.

Abbreviations

                                                    You can put anything here

Stylized implementation of HTML's 'abbr' element for abbreviations and acronyms to show the expanded version on hover. Abbreviations with a 'title' attribute have a light dotted bottom border and a help cursor on hover, providing additional context on hover and to users of assistive technologies.

Basic abbreviation

An abbreviation of the word attribute is attr.

Initialism

Add Initialism to an abbreviation for a slightly smaller font-size.

Blockquotes

                                            You can put anything here

For quoting blocks of content from another source within your document.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

                                Someone famous in Source Title

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer posuere erat a ante.

                                Someone famous in Source Title

List

                                            You can put anything here

Unordered

Lorem ipsum dolor sit amet

Consectetur adipiscing elit

Integer molestie lorem at massa

Facilisis in pretium nisl aliquet

Nulla volutpat aliquam velit

Phasellus iaculis neque

Purus sodales ultricies

Vestibulum laoreet porttitor sem

Ac tristique libero volutpat at

Faucibus porta lacus fringilla vel

Aenean sit amet erat nunc

Eget porttitor lorem

Ordered

Lorem ipsum dolor sit amet

Consectetur adipiscing elit

Integer molestie lorem at massa

Facilisis in pretium nisl aliquet

Nulla volutpat aliquam velit

Faucibus porta lacus fringilla vel

Aenean sit amet erat nunc

Eget porttitor lorem

Integer molestie lorem at massa

Faucibus porta lacus fringilla vel

Spretium nisl aliquet lorem ipsum

Linking best ttoth bellorem

Ordered - Roman

Lorem ipsum dolor sit amet

Consectetur adipiscing elit

Integer molestie lorem at massa

Facilisis in pretium nisl aliquet

Nulla volutpat aliquam velit

Phasellus iaculis neque

Purus sodales ultricies

Vestibulum laoreet porttitor sem

Ac tristique libero volutpat at

Faucibus porta lacus fringilla vel

Aenean sit amet erat nunc

Eget porttitor lorem

Custom - 1

Lorem ipsum dolor sit amet

Consectetur adipiscing elit

Integer molestie lorem at massa

Facilisis in pretium nisl aliquet

Nulla volutpat aliquam velit

Phasellus iaculis neque

Purus sodales ultricies

Vestibulum laoreet porttitor sem

Ac tristique libero volutpat at

Faucibus porta lacus fringilla vel

Aenean sit amet erat nunc

Eget porttitor lorem

Custom - 2

Lorem ipsum dolor sit amet

Consectetur adipiscing elit

Integer molestie lorem at massa

Facilisis in pretium nisl aliquet

Nulla volutpat aliquam velit

Phasellus iaculis neque

Purus sodales ultricies

Vestibulum laoreet porttitor sem

Ac tristique libero volutpat at

Faucibus porta lacus fringilla vel

Aenean sit amet erat nunc

Eget porttitor lorem

Custom - 3

Lorem ipsum dolor sit amet

Consectetur adipiscing elit

Integer molestie lorem at massa

Facilisis in pretium nisl aliquet

Nulla volutpat aliquam velit

Phasellus iaculis neque

Purus sodales ultricies

Vestibulum laoreet porttitor sem

Ac tristique libero volutpat at

Faucibus porta lacus fringilla vel

Aenean sit amet erat nunc

Eget porttitor lorem

  <?php $this->load->view("admin_footer"); ?>


text:
/* after changing this file run '<%= clientPackageManager %> install' or '<%= clientPackageManager %> run webpack:build' */
/* tslint:disable */
<%_ if (useSass) { _%>
import '../content/scss/vendor.scss';
<%_} else { _%>
import '../content/css/vendor.css';
<%_ } _%>


text:
namespace kudu {
namespace security {

using ca::CaCertRequestGenerator;
using ca::CertSigner;

Status GenerateSelfSignedCAForTests(PrivateKey* ca_key, Cert* ca_cert) {
  static const int64_t kRootCaCertExpirationSeconds = 24 * 60 * 60;
  // Create a key for the self-signed CA.
  //
  // OpenSSL has a concept of "security levels" which, amongst other things,
  // place certain restrictions on key strength. OpenSSL 1.0 defaults to level
  // 0 (no restrictions) while 1.1 defaults to level 1, which requires RSA keys
  // to have at least 1024 bits. For simplicity, we'll just use 1024 bits here,
  // even though shorter keys would decrease test running time.
  //
  // See https://www.openssl.org/docs/man1.1.0/ssl/SSL_CTX_get_security_level.html
  // for more details.
  RETURN_NOT_OK(GeneratePrivateKey(1024, ca_key));

  CaCertRequestGenerator::Config config = { "test-ca-cn" };
  RETURN_NOT_OK(CertSigner::SelfSignCA(*ca_key,
                                       config,
                                       kRootCaCertExpirationSeconds,
                                       ca_cert));
  return Status::OK();
}

std::ostream& operator<<(std::ostream& o, PkiConfig c) {
    switch (c) {
      case PkiConfig::NONE: o << "NONE"; break;
      case PkiConfig::SELF_SIGNED: o << "SELF_SIGNED"; break;
      case PkiConfig::TRUSTED: o << "TRUSTED"; break;
      case PkiConfig::SIGNED: o << "SIGNED"; break;
      case PkiConfig::EXTERNALLY_SIGNED: o << "EXTERNALLY_SIGNED"; break;
    }
    return o;
}

Status ConfigureTlsContext(PkiConfig config,
                           const Cert& ca_cert,
                           const PrivateKey& ca_key,
                           TlsContext* tls_context) {
  switch (config) {
    case PkiConfig::NONE: break;
    case PkiConfig::SELF_SIGNED:
      RETURN_NOT_OK(tls_context->GenerateSelfSignedCertAndKey());
      break;
    case PkiConfig::TRUSTED:
      RETURN_NOT_OK(tls_context->AddTrustedCertificate(ca_cert));
      break;
    case PkiConfig::SIGNED: {
      RETURN_NOT_OK(tls_context->AddTrustedCertificate(ca_cert));
      RETURN_NOT_OK(tls_context->GenerateSelfSignedCertAndKey());
      Cert cert;
      RETURN_NOT_OK(CertSigner(&ca_cert, &ca_key).Sign(*tls_context->GetCsrIfNecessary(), &cert));
      RETURN_NOT_OK(tls_context->AdoptSignedCert(cert));
      break;
    };
    case PkiConfig::EXTERNALLY_SIGNED: {
      std::string cert_path, key_path;
      // Write certificate and private key to file.
      RETURN_NOT_OK(CreateTestSSLCertWithPlainKey(GetTestDataDirectory(), &cert_path, &key_path));
      RETURN_NOT_OK(tls_context->LoadCertificateAndKey(cert_path, key_path));
      RETURN_NOT_OK(tls_context->LoadCertificateAuthority(cert_path));
    };
  }
  return Status::OK();
}

} // namespace security
} // namespace kudu


text:
package org.olat.system.logging.log4j;

import org.apache.log4j.helpers.PatternParser;

/**
 * extended log4j for custom logging pattern: http://www.jajakarta.org/log4j/jakarta-log4j-1.1.3/docs/deepExtension.html Initial Date: 30.09.2011 <br>
 *
 * @author guido
 */
public class CounterPatternParser extends PatternParser {

    public CounterPatternParser(String pattern) {
        super(pattern);
    }

    @Override
    public void finalizeConverter(char c) {
        if (c == '#') {
            addConverter(new LogNumberPatternConverter(formattingInfo));
            currentLiteral.setLength(0);
        } else {
            super.finalizeConverter(c);
        }
    }
}


text:
PRAGMA count_changes=on;
UPDATE OR IGNORE t1 SET a=1000;


text:
require 'google/protobuf'

Google::Protobuf::DescriptorPool.generated_pool.build do
  add_file("google/ads/googleads/v12/errors/campaign_shared_set_error.proto", :syntax => :proto3) do
    add_message "google.ads.googleads.v12.errors.CampaignSharedSetErrorEnum" do
    end
    add_enum "google.ads.googleads.v12.errors.CampaignSharedSetErrorEnum.CampaignSharedSetError" do
      value :UNSPECIFIED, 0
      value :UNKNOWN, 1
      value :SHARED_SET_ACCESS_DENIED, 2
    end
  end
end

module Google
  module Ads
    module GoogleAds
      module V12
        module Errors
          CampaignSharedSetErrorEnum = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v12.errors.CampaignSharedSetErrorEnum").msgclass
          CampaignSharedSetErrorEnum::CampaignSharedSetError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("google.ads.googleads.v12.errors.CampaignSharedSetErrorEnum.CampaignSharedSetError").enummodule
        end
      end
    end
  end
end


text:
//included for the Hi-Tech C compiler
#include <htc.h>

//configuration stuff
__CONFIG( INTIO & WDTDIS & PWRTDIS & MCLREN & BORDIS & UNPROTECT );

////////////////////////////////////////////////////////////////// PollPortA //
// int Pin: integer respresting the pin on PORTA that will be read (0-5)
// This function returns the 8 highest bits of the A to D conversions as a char
///////////////////////////////////////////////////////////////////////////////
char PollPortA(char Pin){
	// if the PIN number is not valid (we only have 7 pins)
	// also not that some PICs don't have A/D on pins > 4
	if(Pin>7){
		return 0;
	}
	TRISA |= 1<<Pin; // enable the pin as input
	ANSEL |= 1<<Pin; // select the pin as an analogue input
	ADCON0 = 0b10000001 | (Pin<<2); // setup the A/D converter

	// begin the A to D conversion & wait for it to finish
	GODONE = 1;
	while(GODONE){};

	// the A to D converter has a resolution of 10 bits
	// we're taking those two "variables" and stuffing them into one as follows:
	//  ADRESH:ADRESL = ------HH:LLLLLLLL = FEDCBA98:76543210
	//  aToD          = ------XX:XXXXXX-- = 98765432
	char aToD;
	aToD = (ADRESH<<6)+(ADRESL>>2);
	return aToD;

	// According to the data sheet: pg 244
	// A/D Acquisition Time + Conversion Time is around 22 us or _delay(22)
	//  or 0.022 ms -> which i think is small enough to ignore
	//    0.00025 ms per clock cycle <- just for reference
	//    0.00100 ms per instruction cycle
}
///////////////////////////////////////////////////////////////////// main ////
///////////////////////////////////////////////////////////////////////////////
void main(void){
    char X;       //temporary variable
    TRISC = 0x00; //set PORTC (leds) as outputs
    while(1){
        //read the POT connected to PORTA pin 0
        X = PollPortA(0);
        //out the highest 4 bits of the A/D conversion
        PORTC = X>>4;
    }
}


text:
<!DOCTYPE validators PUBLIC "-//Apache Struts//XWork Validator 1.0//EN" "http://struts.apache.org/dtds/xwork-validator-1.0.dtd">
<validators>
    <field name="name">
        <field-validator type="required">
            <message key="err.name">You must enter a name.</message>
        </field-validator>
    </field>
</validators>


text:
package com.guslaboo.calcengine.metric;

import org.junit.Assert;
import org.junit.Test;

import java.util.ArrayList;
import java.util.List;

import static org.junit.Assert.*;

public class CreditCardCheckSumTest {
    @Test
    public void calculate(){
        List<Integer> numbers = new ArrayList<Integer>();
        numbers.add(1234567890);
        CreditCardCheckSum c = new CreditCardCheckSum(numbers);
        List<Double> result = c.calculate();

        double expected = (0*2+2*2+4*2+6*2+8*2) + (1+42+3+42+5+42+7+42+9+42);
        Assert.assertEquals(expected, result.get(0),0.001);
    }

    @Test
    public void calculateNegative(){
        List<Integer> numbers = new ArrayList<Integer>();
        CreditCardCheckSum c = new CreditCardCheckSum(numbers);
        List<Double> result = c.calculate();

        Assert.assertEquals(0, result.size());
    }
}


text:
This is an example for a Maven Site using the bottom navigation with the maximum number of menus which are supported.

As Bootstrap divides the view into twelve columns, only up to twelve menus should be used in the bottom navigation.


text:
namespace mash {
namespace wm {

WindowManagerApplication::WindowManagerApplication()
    : connector_(nullptr), window_manager_factory_binding_(this) {}

WindowManagerApplication::~WindowManagerApplication() {
  // AcceleratorRegistrarImpl removes an observer in its destructor. Destroy
  // it early on.
  std::set<AcceleratorRegistrarImpl*> accelerator_registrars(
      accelerator_registrars_);
  for (AcceleratorRegistrarImpl* registrar : accelerator_registrars)
    registrar->Destroy();

  std::set<RootWindowController*> controllers(root_controllers_);
  for (RootWindowController* controller : controllers)
    controller->Destroy();
}

std::set<RootWindowController*> WindowManagerApplication::GetRootControllers() {
  std::set<RootWindowController*> root_controllers;
  for (RootWindowController* controller : root_controllers_) {
    if (controller->root())
      root_controllers.insert(controller);
  }
  return root_controllers;
}

void WindowManagerApplication::OnRootWindowControllerGotRoot(
    RootWindowController* root_controller) {
  if (globals_)
    return;  // |root_controller| is the > 1 root, nothing to do.

  if (connector_)
    aura_init_.reset(new views::AuraInit(connector_, "mash_wm_resources.pak"));

  globals_.reset(new WmGlobalsMus(root_controller->root()->connection()));
  lookup_.reset(new WmLookupMus);
}

void WindowManagerApplication::OnRootWindowControllerDoneInit(
    RootWindowController* root_controller) {
  if (!screen_) {
    std::unique_ptr<views::ScreenMus> screen(new views::ScreenMus(nullptr));
    screen->Init(connector_);
    screen_ = std::move(screen);
  }

  // TODO(msw): figure out if this should be per display, or global.
  user_window_controller_->Initialize(root_controller);
  for (auto& request : user_window_controller_requests_)
    user_window_controller_bindings_.AddBinding(user_window_controller_.get(),
                                                std::move(*request));
  user_window_controller_requests_.clear();

  // TODO(msw): figure out if this should be per display, or global.
  shelf_layout_->Initialize(root_controller);
  for (auto& request : shelf_layout_requests_)
    shelf_layout_bindings_.AddBinding(shelf_layout_.get(), std::move(*request));
  shelf_layout_requests_.clear();

  FOR_EACH_OBSERVER(RootWindowsObserver, root_windows_observers_,
                    OnRootWindowControllerAdded(root_controller));
}

void WindowManagerApplication::OnRootWindowDestroyed(
    RootWindowController* root_controller) {
  root_controllers_.erase(root_controller);
  user_window_controller_.reset(nullptr);
}

void WindowManagerApplication::OnAccelerator(uint32_t id,
                                             const ui::Event& event) {
  for (auto* registrar : accelerator_registrars_) {
    if (registrar->OwnsAccelerator(id)) {
      registrar->ProcessAccelerator(id, mus::mojom::Event::From(event));
      break;
    }
  }
}

void WindowManagerApplication::AddRootWindowsObserver(
    RootWindowsObserver* observer) {
  root_windows_observers_.AddObserver(observer);
}

void WindowManagerApplication::RemoveRootWindowsObserver(
    RootWindowsObserver* observer) {
  root_windows_observers_.RemoveObserver(observer);
}

void WindowManagerApplication::OnAcceleratorRegistrarDestroyed(
    AcceleratorRegistrarImpl* registrar) {
  accelerator_registrars_.erase(registrar);
}

void WindowManagerApplication::AddRootWindowController(
    RootWindowController* root_window_controller) {
  root_controllers_.insert(root_window_controller);
}

void WindowManagerApplication::Initialize(shell::Connector* connector,
                                          const shell::Identity& identity,
                                          uint32_t id) {
  connector_ = connector;
  if (connector) {
    tracing_.Initialize(connector, identity.name());

    mus::mojom::WindowManagerFactoryServicePtr wm_factory_service;
    connector_->ConnectToInterface("mojo:mus", &wm_factory_service);
    wm_factory_service->SetWindowManagerFactory(
        window_manager_factory_binding_.CreateInterfacePtrAndBind());
  }

  shelf_layout_.reset(new ShelfLayoutImpl);
  user_window_controller_.reset(new UserWindowControllerImpl());
}

bool WindowManagerApplication::AcceptConnection(shell::Connection* connection) {
  connection->AddInterface<mojom::ShelfLayout>(this);
  connection->AddInterface<mojom::UserWindowController>(this);
  connection->AddInterface<mus::mojom::AcceleratorRegistrar>(this);
  if (connection->GetRemoteIdentity().name() == "mojo:mash_session")
    connection->GetInterface(&session_);
  return true;
}

void WindowManagerApplication::Create(
    shell::Connection* connection,
    mojo::InterfaceRequest<mojom::ShelfLayout> request) {
  // TODO(msw): Handle multiple shelves (one per display).
  if (!root_controllers_.empty() && (*root_controllers_.begin())->root()) {
    shelf_layout_bindings_.AddBinding(shelf_layout_.get(), std::move(request));
  } else {
    shelf_layout_requests_.push_back(base::WrapUnique(
        new mojo::InterfaceRequest<mojom::ShelfLayout>(std::move(request))));
  }
}

void WindowManagerApplication::Create(
    shell::Connection* connection,
    mojo::InterfaceRequest<mojom::UserWindowController> request) {
  if (!root_controllers_.empty() && (*root_controllers_.begin())->root()) {
    user_window_controller_bindings_.AddBinding(user_window_controller_.get(),
                                                std::move(request));
  } else {
    user_window_controller_requests_.push_back(base::WrapUnique(
        new mojo::InterfaceRequest<mojom::UserWindowController>(
            std::move(request))));
  }
}

void WindowManagerApplication::Create(
    shell::Connection* connection,
    mojo::InterfaceRequest<mus::mojom::AcceleratorRegistrar> request) {
  static int accelerator_registrar_count = 0;
  if (accelerator_registrar_count == std::numeric_limits<int>::max()) {
    // Restart from zero if we have reached the limit. It is technically
    // possible to end up with multiple active registrars with the same
    // namespace, but it is highly unlikely. In the event that multiple
    // registrars have the same namespace, this new registrar will be unable to
    // install accelerators.
    accelerator_registrar_count = 0;
  }
  accelerator_registrars_.insert(new AcceleratorRegistrarImpl(
      this, ++accelerator_registrar_count, std::move(request),
      base::Bind(&WindowManagerApplication::OnAcceleratorRegistrarDestroyed,
                 base::Unretained(this))));
}

void WindowManagerApplication::CreateWindowManager(
    mus::mojom::DisplayPtr display,
    mojo::InterfaceRequest<mus::mojom::WindowTreeClient> client_request) {
  AddRootWindowController(RootWindowController::CreateFromDisplay(
      this, std::move(display), std::move(client_request)));
}

}  // namespace wm
}  // namespace mash


text:
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/browser/media/webrtc_internals.h"

#include "base/path_service.h"
#include "base/strings/string_number_conversions.h"
#include "content/browser/media/webrtc_internals_ui_observer.h"
#include "content/browser/web_contents/web_contents_view.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/power_save_blocker.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/web_contents.h"

using base::ProcessId;
using std::string;

namespace content {

namespace {
// Makes sure that |dict| has a ListValue under path "log".
static base::ListValue* EnsureLogList(base::DictionaryValue* dict) {
  base::ListValue* log = NULL;
  if (!dict->GetList("log", &log)) {
    log = new base::ListValue();
    if (log)
      dict->Set("log", log);
  }
  return log;
}

}  // namespace

WebRTCInternals::WebRTCInternals()
    : aec_dump_enabled_(false) {
  registrar_.Add(this, NOTIFICATION_RENDERER_PROCESS_TERMINATED,
                 NotificationService::AllBrowserContextsAndSources());
// TODO(grunell): Shouldn't all the webrtc_internals* files be excluded from the
// build if WebRTC is disabled?
#if defined(ENABLE_WEBRTC)
  aec_dump_file_path_ =
      GetContentClient()->browser()->GetDefaultDownloadDirectory();
  if (aec_dump_file_path_.empty()) {
    // In this case the default path (|aec_dump_file_path_|) will be empty and
    // the platform default path will be used in the file dialog (with no
    // default file name). See SelectFileDialog::SelectFile. On Android where
    // there's no dialog we'll fail to open the file.
    VLOG(1) << "Could not get the download directory.";
  } else {
    aec_dump_file_path_ =
        aec_dump_file_path_.Append(FILE_PATH_LITERAL("audio.aecdump"));
  }
#endif  // defined(ENABLE_WEBRTC)
}

WebRTCInternals::~WebRTCInternals() {
}

WebRTCInternals* WebRTCInternals::GetInstance() {
  return Singleton<WebRTCInternals>::get();
}

void WebRTCInternals::OnAddPeerConnection(int render_process_id,
                                          ProcessId pid,
                                          int lid,
                                          const string& url,
                                          const string& rtc_configuration,
                                          const string& constraints) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));

  base::DictionaryValue* dict = new base::DictionaryValue();
  if (!dict)
    return;

  dict->SetInteger("rid", render_process_id);
  dict->SetInteger("pid", static_cast<int>(pid));
  dict->SetInteger("lid", lid);
  dict->SetString("rtcConfiguration", rtc_configuration);
  dict->SetString("constraints", constraints);
  dict->SetString("url", url);
  peer_connection_data_.Append(dict);
  CreateOrReleasePowerSaveBlocker();

  if (observers_.might_have_observers())
    SendUpdate("addPeerConnection", dict);
}

void WebRTCInternals::OnRemovePeerConnection(ProcessId pid, int lid) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
  for (size_t i = 0; i < peer_connection_data_.GetSize(); ++i) {
    base::DictionaryValue* dict = NULL;
    peer_connection_data_.GetDictionary(i, &dict);

    int this_pid = 0;
    int this_lid = 0;
    dict->GetInteger("pid", &this_pid);
    dict->GetInteger("lid", &this_lid);

    if (this_pid != static_cast<int>(pid) || this_lid != lid)
      continue;

    peer_connection_data_.Remove(i, NULL);
    CreateOrReleasePowerSaveBlocker();

    if (observers_.might_have_observers()) {
      base::DictionaryValue id;
      id.SetInteger("pid", static_cast<int>(pid));
      id.SetInteger("lid", lid);
      SendUpdate("removePeerConnection", &id);
    }
    break;
  }
}

void WebRTCInternals::OnUpdatePeerConnection(
    ProcessId pid, int lid, const string& type, const string& value) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));

  for (size_t i = 0; i < peer_connection_data_.GetSize(); ++i) {
    base::DictionaryValue* record = NULL;
    peer_connection_data_.GetDictionary(i, &record);

    int this_pid = 0, this_lid = 0;
    record->GetInteger("pid", &this_pid);
    record->GetInteger("lid", &this_lid);

    if (this_pid != static_cast<int>(pid) || this_lid != lid)
      continue;

    // Append the update to the end of the log.
    base::ListValue* log = EnsureLogList(record);
    if (!log)
      return;

    base::DictionaryValue* log_entry = new base::DictionaryValue();
    if (!log_entry)
      return;

    double epoch_time = base::Time::Now().ToJsTime();
    string time = base::DoubleToString(epoch_time);
    log_entry->SetString("time", time);
    log_entry->SetString("type", type);
    log_entry->SetString("value", value);
    log->Append(log_entry);

    if (observers_.might_have_observers()) {
      base::DictionaryValue update;
      update.SetInteger("pid", static_cast<int>(pid));
      update.SetInteger("lid", lid);
      update.MergeDictionary(log_entry);

      SendUpdate("updatePeerConnection", &update);
    }
    return;
  }
}

void WebRTCInternals::OnAddStats(base::ProcessId pid, int lid,
                                 const base::ListValue& value) {
  if (!observers_.might_have_observers())
    return;

  base::DictionaryValue dict;
  dict.SetInteger("pid", static_cast<int>(pid));
  dict.SetInteger("lid", lid);

  base::ListValue* list = value.DeepCopy();
  if (!list)
    return;

  dict.Set("reports", list);

  SendUpdate("addStats", &dict);
}

void WebRTCInternals::OnGetUserMedia(int rid,
                                     base::ProcessId pid,
                                     const std::string& origin,
                                     bool audio,
                                     bool video,
                                     const std::string& audio_constraints,
                                     const std::string& video_constraints) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));

  base::DictionaryValue* dict = new base::DictionaryValue();
  dict->SetInteger("rid", rid);
  dict->SetInteger("pid", static_cast<int>(pid));
  dict->SetString("origin", origin);
  if (audio)
    dict->SetString("audio", audio_constraints);
  if (video)
    dict->SetString("video", video_constraints);

  get_user_media_requests_.Append(dict);

  if (observers_.might_have_observers())
    SendUpdate("addGetUserMedia", dict);
}

void WebRTCInternals::AddObserver(WebRTCInternalsUIObserver *observer) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
  observers_.AddObserver(observer);
}

void WebRTCInternals::RemoveObserver(WebRTCInternalsUIObserver *observer) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
  observers_.RemoveObserver(observer);

  // Disables the AEC recording if it is enabled and the last webrtc-internals
  // page is going away.
  if (aec_dump_enabled_ && !observers_.might_have_observers())
    DisableAecDump();
}

void WebRTCInternals::UpdateObserver(WebRTCInternalsUIObserver* observer) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
  if (peer_connection_data_.GetSize() > 0)
    observer->OnUpdate("updateAllPeerConnections", &peer_connection_data_);

  for (base::ListValue::iterator it = get_user_media_requests_.begin();
       it != get_user_media_requests_.end();
       ++it) {
    observer->OnUpdate("addGetUserMedia", *it);
  }
}

void WebRTCInternals::EnableAecDump(content::WebContents* web_contents) {
#if defined(ENABLE_WEBRTC)
#if defined(OS_ANDROID)
  EnableAecDumpOnAllRenderProcessHosts();
#else
  select_file_dialog_ = ui::SelectFileDialog::Create(this, NULL);
  select_file_dialog_->SelectFile(
      ui::SelectFileDialog::SELECT_SAVEAS_FILE,
      base::string16(),
      aec_dump_file_path_,
      NULL,
      0,
      FILE_PATH_LITERAL(""),
      web_contents->GetTopLevelNativeWindow(),
      NULL);
#endif
#endif
}

void WebRTCInternals::DisableAecDump() {
#if defined(ENABLE_WEBRTC)
  aec_dump_enabled_ = false;

  // Tear down the dialog since the user has unchecked the AEC dump box.
  select_file_dialog_ = NULL;

  for (RenderProcessHost::iterator i(
           content::RenderProcessHost::AllHostsIterator());
       !i.IsAtEnd(); i.Advance()) {
    i.GetCurrentValue()->DisableAecDump();
  }
#endif
}

void WebRTCInternals::ResetForTesting() {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
  observers_.Clear();
  peer_connection_data_.Clear();
  CreateOrReleasePowerSaveBlocker();
  get_user_media_requests_.Clear();
  aec_dump_enabled_ = false;
}

void WebRTCInternals::SendUpdate(const string& command, base::Value* value) {
  DCHECK(observers_.might_have_observers());

  FOR_EACH_OBSERVER(WebRTCInternalsUIObserver,
                    observers_,
                    OnUpdate(command, value));
}

void WebRTCInternals::Observe(int type,
                              const NotificationSource& source,
                              const NotificationDetails& details) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
  DCHECK_EQ(type, NOTIFICATION_RENDERER_PROCESS_TERMINATED);
  OnRendererExit(Source<RenderProcessHost>(source)->GetID());
}

void WebRTCInternals::FileSelected(const base::FilePath& path,
                                   int /* unused_index */,
                                   void* /*unused_params */) {
#if defined(ENABLE_WEBRTC)
  aec_dump_file_path_ = path;
  EnableAecDumpOnAllRenderProcessHosts();
#endif
}

void WebRTCInternals::FileSelectionCanceled(void* params) {
#if defined(ENABLE_WEBRTC)
  SendUpdate("aecRecordingFileSelectionCancelled", NULL);
#endif
}

void WebRTCInternals::OnRendererExit(int render_process_id) {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));

  // Iterates from the end of the list to remove the PeerConnections created
  // by the exitting renderer.
  for (int i = peer_connection_data_.GetSize() - 1; i >= 0; --i) {
    base::DictionaryValue* record = NULL;
    peer_connection_data_.GetDictionary(i, &record);

    int this_rid = 0;
    record->GetInteger("rid", &this_rid);

    if (this_rid == render_process_id) {
      if (observers_.might_have_observers()) {
        int lid = 0, pid = 0;
        record->GetInteger("lid", &lid);
        record->GetInteger("pid", &pid);

        base::DictionaryValue update;
        update.SetInteger("lid", lid);
        update.SetInteger("pid", pid);
        SendUpdate("removePeerConnection", &update);
      }
      peer_connection_data_.Remove(i, NULL);
    }
  }
  CreateOrReleasePowerSaveBlocker();

  bool found_any = false;
  // Iterates from the end of the list to remove the getUserMedia requests
  // created by the exiting renderer.
  for (int i = get_user_media_requests_.GetSize() - 1; i >= 0; --i) {
    base::DictionaryValue* record = NULL;
    get_user_media_requests_.GetDictionary(i, &record);

    int this_rid = 0;
    record->GetInteger("rid", &this_rid);

    if (this_rid == render_process_id) {
      get_user_media_requests_.Remove(i, NULL);
      found_any = true;
    }
  }

  if (found_any && observers_.might_have_observers()) {
    base::DictionaryValue update;
    update.SetInteger("rid", render_process_id);
    SendUpdate("removeGetUserMediaForRenderer", &update);
  }
}

#if defined(ENABLE_WEBRTC)
void WebRTCInternals::EnableAecDumpOnAllRenderProcessHosts() {
  aec_dump_enabled_ = true;
  for (RenderProcessHost::iterator i(
           content::RenderProcessHost::AllHostsIterator());
       !i.IsAtEnd(); i.Advance()) {
    i.GetCurrentValue()->EnableAecDump(aec_dump_file_path_);
  }
}
#endif

void WebRTCInternals::CreateOrReleasePowerSaveBlocker() {
  DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));

  if (peer_connection_data_.empty() && power_save_blocker_) {
    DVLOG(1) << ("Releasing the block on application suspension since no "
                 "PeerConnections are active anymore.");
    power_save_blocker_.reset();
  } else if (!peer_connection_data_.empty() && !power_save_blocker_) {
    DVLOG(1) << ("Preventing the application from being suspended while one or "
                 "more PeerConnections are active.");
    power_save_blocker_ = content::PowerSaveBlocker::Create(
        content::PowerSaveBlocker::kPowerSaveBlockPreventAppSuspension,
        "WebRTC has active PeerConnections.").Pass();
  }
}

}  // namespace content


text:
<?php

namespace app\components;

use Yii;

class Module extends \yii\base\Module
{
//    private $_viewPath;
//    public $defaultApp = 'frontend';
//    public $appName = '';
//    public function init()
//    {
//        $this->appName = \Yii::$app->request->get('app', $this->defaultApp);
//        $this->controllerNamespace = 'app\modules\\'.$this->id.'\controllers\\' . \Yii::$app->request->get('app', $this->defaultApp);
//        if($this->appName == $this->defaultApp)
//        {
//            $this->layoutPath = Yii::$app->params['templateLayout'];
//            $this->layout = 'main.twig';
//        }
//        parent::init(); // TODO: Change the autogenerated stub
//    }
//
//    public function getViewPath()
//    {
//        if($this->appName != $this->defaultApp)
//        {
//            if ($this->_viewPath === null) {
//                $this->_viewPath = $this->getBasePath() . DIRECTORY_SEPARATOR . 'views' . DIRECTORY_SEPARATOR . \Yii::$app->request->get('app', $this->defaultApp);
//            }
//        }
//        else
//        {
//            $this->_viewPath = \Yii::getAlias('@app') . DIRECTORY_SEPARATOR . 'themes';
//        }
//        return $this->_viewPath;
//    }
}


text:
<dc.Html Title="Image Viewer">

	<dc.Body>

			<canvas id="editImageCanvasPresenter" />

			<dc.Link id="panDcwImageViewerClose" Click="onClose" style="position: absolute; top: 24px; right: 24px;">

			</dc.Link>

			<dc.Link id="panDcwImageViewerLeft" Click="onLeft" style="position: absolute; top: 45%; left: 16px; display: none;">

			</dc.Link>
			<dc.Link id="panDcwImageViewerRight" Click="onRight" style="position: absolute; top: 45%; right: 16px; display: none;">

			</dc.Link>

	</dc.Body>
	<dc.Function Name="Load"><![CDATA[
			var entry = this;

			entry.Store.Calc = {
				Hoffset: 0,
				Voffset: 0,
				Zoom: 1.00,
				InitScale: 100,
				Progress: 0
			};

			//TouchEmulator();

			//if (! entry.Params.Path)
			//	entry.Params.Path = '/galleries/care-team/group.v/full.png';

			var view = entry.Store.View = entry.Params.View;

			if (dc.handler && dc.handler.tags && dc.handler.tags.ViewImage && dc.handler.tags.ViewImage.init)
				dc.handler.tags.ViewImage.init(entry, $('#panDcwImageViewer'), entry.Store.View);

			entry.callPageFunc('LoadImage');

			$('#editImageCanvasPresenter').on('vmouseup', function(e) {
				entry.Store.Calc.MouseIsDown = false;
				e.preventDefault();
				return false;
			});

			$('#editImageCanvasPresenter').on('vmouseout', function(e) {
				entry.Store.Calc.MouseIsDown = false;
				e.preventDefault();
				return false;
			});

			$('#editImageCanvasPresenter').on('vmousedown', function(e) {
				var rect = $('#editImageCanvasPresenter').get(0).getBoundingClientRect();

				entry.Store.Calc.StartX = entry.Store.Calc.LastX = e.pageX - rect.left;
				entry.Store.Calc.StartY = entry.Store.Calc.LastY = e.pageY - rect.top;

				if (e.which < 2)
					entry.Store.Calc.MouseIsDown = true;

				e.preventDefault();
				return false;
			});

			$('#editImageCanvasPresenter').on('vmousemove', function(e) {
				if (entry.Store.Calc.Pinching)
					return;

				if (!entry.Store.Calc.MouseIsDown || (e.which > 1))
					return;

				var rect = $('#editImageCanvasPresenter').get(0).getBoundingClientRect();
				var mouseX = e.pageX - rect.left;
				var mouseY = e.pageY - rect.top;

				entry.Store.Calc.Voffset += mouseY - entry.Store.Calc.LastY;
				entry.Store.Calc.Hoffset += mouseX - entry.Store.Calc.LastX;

				entry.Store.Calc.LastX = mouseX;
				entry.Store.Calc.LastY = mouseY;

				dc.pui.Loader.requestFrame();

				e.preventDefault();
				return false;
			});

			var can = document.getElementById('editImageCanvasPresenter');

			/* LAST
			var mc = new Hammer(can);

			mc.get('pinch').set({ enable: true });
			*/

			/*
			mc.get('pan').set({ direction: Hammer.DIRECTION_ALL });

			mc.on("panleft panright panup pandown", function(ev) {
			    //myElement.textContent = ev.type +" gesture detected.";

				entry.Store.Calc.Voffset = ev.deltaY;
				entry.Store.Calc.Hoffset = ev.deltaX;

				dc.pui.Loader.requestFrame();
			});
			*/

			/* LAST
			var phandler = function(ev) {
		        if(ev.type == 'pinchstart')
		            entry.Store.Calc.InitScale = entry.Store.Calc.Zoom * 100;

				entry.Store.Calc.Zoom = entry.Store.Calc.InitScale * ev.scale / 100;

				if (entry.Store.Calc.Zoom > 4)
					entry.Store.Calc.Zoom = 4;

				if (entry.Store.Calc.Zoom < 0.05)
					entry.Store.Calc.Zoom = 0.05;

				entry.callPageFunc('UpdateZoom');
				dc.pui.Loader.requestFrame();
			};

			mc.on("pinchstart pinchmove", phandler);

			entry.Store.Kill = function() {
				mc.off("pinchstart pinchmove", phandler);
				mc.destroy();
				mc = null;
			}

			$('#editImageCanvasPresenter').mousewheel(function(e, delta) {
				if (e.deltaY > 0) {
					entry.Store.Calc.Zoom += 0.05;

					if (entry.Store.Calc.Zoom > 4)
						entry.Store.Calc.Zoom = 4;
				}
				else {
					entry.Store.Calc.Zoom -= 0.05;

					if (entry.Store.Calc.Zoom < 0.05)
						entry.Store.Calc.Zoom = 0.05;
				}

				entry.callPageFunc('UpdateZoom');
				dc.pui.Loader.requestFrame();

				e.preventDefault();
				return false;
			});
			*/

			/*
			$('#editImageZoomRg').change(function(e) {
				entry.Store.Calc.Zoom = this.value / 100;

				entry.callPageFunc('UpdateZoom');
				dc.pui.Loader.requestFrame();

				e.preventDefault();
				return false;
			});
			*/

			this.callPageFunc('SetSizes');
	]]></dc.Function>
	<dc.Function Name="SetSizes"><![CDATA[
			var entry = this;

			var can = $("#editImageCanvasPresenter").get(0);

			can.width = $(window).width();
			can.height = $(window).height();

			if (dc.handler && dc.handler.tags && dc.handler.tags.ViewImage && dc.handler.tags.ViewImage.resize)
				dc.handler.tags.ViewImage.resize(entry, $('#panDcwImageViewer'), entry.Store.View);

			dc.pui.Loader.requestFrame();
	]]></dc.Function>
	<dc.Function Name="DoZoomIn"><![CDATA[
			var entry = this;

			entry.Store.Calc.Zoom += 0.01;

			if (entry.Store.Calc.Zoom > 4)
				entry.Store.Calc.Zoom = 4;

			entry.callPageFunc('UpdateZoom');
			dc.pui.Loader.requestFrame();
	]]></dc.Function>
	<dc.Function Name="DoZoomOut"><![CDATA[
			var entry = this;

			entry.Store.Calc.Zoom -= 0.01;

			if (entry.Store.Calc.Zoom < 0.05)
				entry.Store.Calc.Zoom = 0.05;

			entry.callPageFunc('UpdateZoom');
			dc.pui.Loader.requestFrame();
	]]></dc.Function>
	<dc.Function Name="UpdateZoom"><![CDATA[
			var entry = this;

			if (entry.Store.Calc.Zoom) {
				var z = Math.round(entry.Store.Calc.Zoom * 100);

				/*
				var cz = $('#editImageZoomRg').val();

				// prevent infinite calls, only change once per zoom change
				if (cz != z)
					$('#editImageZoomRg').val(z).slider("refresh");
					*/
			}
	]]></dc.Function>
	<dc.Function Name="LoadImage" Params="idx"><![CDATA[
			var entry = this;

			$('#panDcwImageViewerLeft,#panDcwImageViewerRight').hide();

			entry.Store.SelImg = null;

			var view = entry.Store.View;

			if (dc.handler && dc.handler.tags && dc.handler.tags.ViewImage && dc.handler.tags.ViewImage.switching)
				dc.handler.tags.ViewImage.switching(entry, $('#panDcwImageViewer'), entry.Store.View);

			if (view.StartPos > 0)
				$('#panDcwImageViewerLeft').show();

			if (view.Images.length - 1 > view.StartPos)
				$('#panDcwImageViewerRight').show();

			var vname = view.Variant ? view.Variant : 'full';

			vname += view.Extension ? view.Extension : '.jpg';

			var path = '/galleries' + view.Path + '/' + view.Images[view.StartPos].Alias + '.v/' + vname;

			dc.util.Image.load(path,
				function(img) {
					entry.Store.SelImg = img;
					entry.callPageFunc('PrepImage');
				},
				function(img, amt) {
					entry.Store.Calc.Progress = amt;
					dc.pui.Loader.requestFrame();
				});
	]]></dc.Function>
	<dc.Function Name="onLeft"><![CDATA[
			var entry = this;

			var view = entry.Store.View;

			if (view.StartPos > 0) {
				view.StartPos--;
				entry.callPageFunc('LoadImage');
			}
	]]></dc.Function>
	<dc.Function Name="onRight"><![CDATA[
			var entry = this;

			var view = entry.Store.View;

			if (view.Images.length > view.StartPos) {
				view.StartPos++;
				entry.callPageFunc('LoadImage');
			}
	]]></dc.Function>
	<dc.Function Name="onClose"><![CDATA[
			var entry = this;

			entry.Layer.back();
	]]></dc.Function>
	<dc.Function Name="PrepImage"><![CDATA[
			var entry = this;

			//debugger;

			entry.Store.Calc.imgWidth = entry.Store.SelImg.width;
			entry.Store.Calc.imgHeight = entry.Store.SelImg.height;

			// create a buffered 50% and 25% version of the image
			// this is good for really zoomed out images, as stepping the
			// image allows it to keep higher quality for the final zoom
		    // Draw it at 1/2 size 2 times (step down two times)

		    entry.Store.SelImg50 = document.createElement('canvas');
		    entry.Store.SelImg50.width = entry.Store.Calc.imgWidth / 2;
		    entry.Store.SelImg50.height = entry.Store.Calc.imgHeight / 2;

		    entry.Store.SelImg25 = document.createElement('canvas');
		    entry.Store.SelImg25.width = entry.Store.Calc.imgWidth / 4;
		    entry.Store.SelImg25.height = entry.Store.Calc.imgHeight / 4;

			try {
				var ctx50 = entry.Store.SelImg50.getContext('2d');
				ctx50.drawImage(entry.Store.SelImg, 0, 0, entry.Store.Calc.imgWidth / 2, entry.Store.Calc.imgHeight / 2);

				try {
					var ctx25 = entry.Store.SelImg25.getContext('2d');
					ctx25.drawImage(entry.Store.SelImg50, 0, 0, entry.Store.Calc.imgWidth / 2, entry.Store.Calc.imgHeight / 2, 0, 0, entry.Store.Calc.imgWidth / 4, entry.Store.Calc.imgHeight / 4);
				}
				catch(x) {
					// if IE barfs then just don't get higher render quality
					entry.Store.SelImg25 = null;
				}
			}
			catch(x) {
				// if IE barfs then just don't get higher render quality
				entry.Store.SelImg50 = null;
			}

			entry.callPageFunc('PrepSettings');
	]]></dc.Function>
	<dc.Function Name="PrepSettings"><![CDATA[
			var entry = this;

			entry.Store.Calc.Hoffset = 0;
			entry.Store.Calc.Voffset = 0;
			entry.Store.Calc.Zoom = 1.00;

			var tcan = $("#editImageCanvasPresenter").get(0);

			var z1 = 1.00;
			var z2 = 1.00;

			if (entry.Store.Calc.imgWidth > tcan.width)
				z1 = tcan.width / entry.Store.Calc.imgWidth;

			if (entry.Store.Calc.imgHeight > tcan.height)
				z2 = tcan.height / entry.Store.Calc.imgHeight;

			entry.Store.Calc.Zoom = Math.min(z1, z2);

			var initwidth = entry.Store.Calc.imgWidth * entry.Store.Calc.Zoom;
			var initheight = entry.Store.Calc.imgHeight * entry.Store.Calc.Zoom;

			entry.Store.Calc.imgX = (tcan.width - initwidth) / 2;
			entry.Store.Calc.imgY = (tcan.height - initheight) / 2;

			entry.callPageFunc('UpdateZoom');
			entry.callPageFunc('SetSizes');

			if (dc.handler && dc.handler.tags && dc.handler.tags.ViewImage && dc.handler.tags.ViewImage.switched)
				dc.handler.tags.ViewImage.switched(entry, $('#panDcwImageViewer'), entry.Store.View);
	]]></dc.Function>
	<dc.Function Name="DoClose"><![CDATA[
			window.history.back();
	]]></dc.Function>
	<dc.Function Name="onResize"><![CDATA[
			this.callPageFunc('PrepSettings');
	]]></dc.Function>
	<dc.Function Name="onFrame"><![CDATA[
			var entry = this;

			var tcan = $("#editImageCanvasPresenter").get(0);
			var ctx = tcan.getContext('2d');

			ctx.clearRect(0, 0, tcan.width, tcan.height);

			var src = entry.Store.SelImg;

			if (src) {
				var z = Math.round(entry.Store.Calc.Zoom * 100);

				if (entry.Store.SelImg25 && (z < 25))
					src = entry.Store.SelImg25;
				else if (entry.Store.SelImg50 && (z < 50))
					src = entry.Store.SelImg50;

				if (src) {
					ctx.drawImage(
						src,
						entry.Store.Calc.Hoffset + entry.Store.Calc.imgX,
						entry.Store.Calc.Voffset + entry.Store.Calc.imgY,
						entry.Store.Calc.imgWidth * entry.Store.Calc.Zoom,
						entry.Store.Calc.imgHeight * entry.Store.Calc.Zoom
					);
				}
			}
			else {
				var cx = tcan.width / 2;
				var cy = tcan.height / 2;

				ctx.beginPath();
				ctx.arc(cx, cy, 40, 0, 2 * Math.PI, false);
				ctx.lineWidth = 2;
				ctx.strokeStyle = '#333';
				ctx.stroke();

				var endp = (entry.Store.Calc.Progress * 2 / 100) - 0.5;

				ctx.fillStyle = '#999';
				ctx.beginPath();
				ctx.moveTo(cx,cy);
				ctx.arc(cx, cy, 40, -0.5 * Math.PI, endp * Math.PI, false);
				ctx.lineTo(cx,cy);
				ctx.closePath();
				ctx.fill();
			}
	]]></dc.Function>
	<dc.Function Name="onDestroy"><![CDATA[
			var entry = this;

			//this.callPageFunc('PrepSettings');

			if (entry.Store.Kill) {
				entry.Store.Kill();
				entry.Store.Kill = null;
			}

			entry.Store.SelImg25 = null;
			entry.Store.SelImg50 = null;
			entry.Store.SelImg = null;
	]]></dc.Function>
</dc.Html>


text:
@interface DetailViewController : UIViewController
{
    UIBarButtonItem *listButton;
}
@end


text:
from cardinal.decorators import command, help

from googlesearch import search

DEFAULT_MAX_RESULTS = 3

class GoogleSearch:
    def __init__(self, config):
        config = config if config is not None else {}
        self.max_results = config.get('max_results', DEFAULT_MAX_RESULTS)

    @command(['google', 'lmgtfy', 'g'])
    @help("Returns the URL of the top result for a given search query")
    @help("Syntax: .google <query>")
    def query(self, cardinal, user, channel, msg):
        # gets search string from message, and makes it url safe
        try:
            search_string = msg.split(' ', 1)[1]
        except IndexError:
            return cardinal.sendMsg(channel, 'Syntax: .google <query>')

        urls = []
        counter = self.max_results
        for url in search(search_string):
            urls.append(url)

            counter -= 1
            if counter == 0:
                break

        if not urls:
            cardinal.sendMsg(channel, "No results found")
            return
        elif len(urls) == 1:
            cardinal.sendMsg(channel, "Top result for '{}': {}".format(
                search_string,
                urls[0],
            ))
        else:
            cardinal.sendMsg(channel, "Top results for '{}':".format(
                search_string
            ))

            for url in urls:
                cardinal.sendMsg(channel, "  {}".format(url))

entrypoint = GoogleSearch


text:
<!DOCTYPE html>

    <title>Motivation Blog</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/skeleton/2.0.4/skeleton.css">
    <link rel="stylesheet" type="text/css" href="../styles/main.css">
    <link href='https://fonts.googleapis.com/css?family=Pompiere' rel='stylesheet' type='text/css'>

Steph J Presents ...

Home

Portfolio

About

Contact

Motivation

        Sun 01May16

Pleasure, Passion and Purpose

                Pleasure is fleeting and just leaves you wanting more. Passion/flow is longer lasting and is achieved when the task matches the skill level required. It is a satisfying experience when time flies and everything is aligned. A sense of purpose is what underlays everything else and gives meaning and the will to surmount obstacles. A sense of purpose can provide drive and the longest lasting happiness.

Discovering values and higher purpose

Core Values

                  Do unto others as you would have them do unto you. My core values can be summed up in the teachings of Jesus. I believe we should strive to treat everyone with honesty, compassion and forgiveness. None of us can call ourselves perfect and so we really can't expect it of others.

Stand For

                  Human rights and equality. No one gets the choice of where, when and how they are born. Every life is precious and no one should be made to feel they are worth less than anyone else. The massive difference between poor and rich also really bothers me especially as the gap widens.

Resilience ideas and meditation

                Failure makes me feel like a massive weight has descended onto my shoulders and my guts twist themselves into pretzels. Hugely uncomfortable. I completely understand what they are talking about when they say the bad rises more easily to the surface then the good. I can easily summon all the times I've screwed up but I have to dig deep for the times I've succeeded. And yet I'd still call myself an optimist because I believe that everything will come right in the end. I do need to work on perseverance in the face of adversity. I am too prone to give up and realizing that this is actually just a reaction to my emotions is very interesting and hopefully helpful.

Previous

Index

Next

              © Copyright 2016, Love from NZ!


text:
<!DOCTYPE html>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>BPI - Toffeeapp</title>
    <link href="/css/bootstrap.min.css" rel="stylesheet">
    <link href="/css/style.css" rel="stylesheet">

BPI

CarCam

Download 1.0 (Build 21_2 - 30/03/2017)


text:
var config = require('./config.json');
var page = require('./lib/page.js');

var cons = require('consolidate');
var path = require('path');
var _ = require('underscore');

var express = require('express');
var app = express();

var uploadsDir = 'uploads';
var themesDir = 'theme';

// set up cons and hogan templating
app.engine('html', cons.hogan);
app.set('view engine', 'html');
app.set('views', path.join(__dirname, themesDir, 'templates'));

page.setOptions({pagesDir: path.join(__dirname, 'pages')});

// routes
app.get('/favicon.ico', function(req, res){
	res.sendfile(path.join(__dirname, 'favicon.ico'));
});

function render(res, err, template, model){
	if(err)
		return res.send(err, template);

	res.render(template, model);
}

app.get('/', function(req, res){
	page.pages(0, _.partial(render, res));
});

app.get('/all', function(req, res){
	page.listAll(_.partial(render, res));
});

app.get('/pages/:num', function(req, res){
	page.pages(req.params.num, _.partial(render, res));
});

// get /search?q=term
app.get('/search*', function(req, res){
	res.send('Search for "' + req.query.q + '"');
});

app.get('/rss', function(req, res){
	page.rss(function(err, template, model){
		if(err)
			return res.send(err, template);

		res.type('application/xml');
		res.render(template, model);
	});
});

app.get('/tags', function(req, res){
	page.tags(_.partial(render, res));
});

app.get('/tag/:tag', function(req,res){
	page.tag(req.params.tag, _.partial(render, res));
});

app.get('/uploads/*', function(req, res){
	var file = req.params[0];

	res.sendfile(path.join(__dirname, uploadsDir, file));
}
);
app.get('/static/*', function(req, res){
	var file = req.params[0];

	res.sendfile(path.join(__dirname, themesDir, file));
});

app.get('/:slug', function(req, res){
	page.page('', req.params.slug, _.partial(render, res));
});

// GET /some/long/path/to/file
app.get('/*/:path', function(req, res){
	var path = req.params.path;
	var slug = req.params[0];

	page.page(path, slug, _.partial(render, res));
});

page.populateCache();
page.watchCache();

var port = config.port || 80;
app.listen(port);
console.log('Serving "' + config.site + '" on port ' + port);


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

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
<title>RowMutations xref</title>
<link type="text/css" rel="stylesheet" href="../../../../../stylesheet.css" />

View Javadoc

1
18  package org.apache.hadoop.hbase.client;
19
20  import java.io.DataInput;
21  import java.io.DataOutput;
22  import java.io.IOException;
23  import java.util.ArrayList;
24  import java.util.Arrays;
25  import java.util.Collections;
26  import java.util.List;
27
28  import org.apache.hadoop.hbase.HConstants;
29  import org.apache.hadoop.hbase.io.HbaseObjectWritable;
30  import org.apache.hadoop.hbase.util.Bytes;
31
32  /**
33   * Performs multiple mutations atomically on a single row.
34   * Currently {@link Put} and {@link Delete} are supported.
35   *
36   * The mutations are performed in the order in which they
37   * were added.
38   */
39  public class RowMutations implements Row {
40    private List<Mutation> mutations = new ArrayList<Mutation>();
41    private byte [] row;
42    private static final byte VERSION = (byte)0;
43
44    /** Constructor for Writable. DO NOT USE */
45    public RowMutations() {}
46
47    /**
48     * Create an atomic mutation for the specified row.
49     * @param row row key
50     */
51    public RowMutations(byte [] row) {
52      if(row == null || row.length > HConstants.MAX_ROW_LENGTH) {
53        throw new IllegalArgumentException("Row key is invalid");
54      }
55      this.row = Arrays.copyOf(row, row.length);
56    }
57
58    /**
59     * Add a {@link Put} operation to the list of mutations
60     * @param p The {@link Put} to add
61     * @throws IOException
62     */
63    public void add(Put p) throws IOException {
64      internalAdd(p);
65    }
66
67    /**
68     * Add a {@link Delete} operation to the list of mutations
69     * @param d The {@link Delete} to add
70     * @throws IOException
71     */
72    public void add(Delete d) throws IOException {
73      internalAdd(d);
74    }
75
76    private void internalAdd(Mutation m) throws IOException {
77      int res = Bytes.compareTo(this.row, m.getRow());
78      if(res != 0) {
79        throw new IOException("The row in the recently added Put/Delete " +
80            Bytes.toStringBinary(m.getRow()) + " doesn't match the original one " +
81            Bytes.toStringBinary(this.row));
82      }
83      mutations.add(m);
84    }
85
86    @Override
87    public void readFields(final DataInput in) throws IOException {
88      int version = in.readByte();
89      if (version > VERSION) {
90        throw new IOException("version not supported");
91      }
92      this.row = Bytes.readByteArray(in);
93      int numMutations = in.readInt();
94      mutations.clear();
95      for(int i = 0; i < numMutations; i++) {
96        mutations.add((Mutation) HbaseObjectWritable.readObject(in, null));
97      }
98    }
99
100   @Override
101   public void write(final DataOutput out) throws IOException {
102     out.writeByte(VERSION);
103     Bytes.writeByteArray(out, this.row);
104     out.writeInt(mutations.size());
105     for (Mutation m : mutations) {
106       HbaseObjectWritable.writeObject(out, m, m.getClass(), null);
107     }
108   }
109
110   @Override
111   public int compareTo(Row i) {
112     return Bytes.compareTo(this.getRow(), i.getRow());
113   }
114
115   @Override
116   public byte[] getRow() {
117     return row;
118   }
119
120   /**
121    * @return An unmodifiable list of the current mutations.
122    */
123   public List<Mutation> getMutations() {
124     return Collections.unmodifiableList(mutations);
125   }
126 }

This page was automatically generated by Maven


text:
title: Contact
#recaptchacontact: true
form:
    name: gContactFormTest
    fields:
        - name: name
          label: Name
          placeholder: Enter your name
          autofocus: on
          autocomplete: on
          type: text
          validate:
            required: true

        - name: email
          label: Email
          placeholder: Enter your email address
          type: email
          validate:
            required: true
            rule: email
            message: Please check your email address.

        - name: check
          type: checkboxes
          label: What is your favorite ice cream flavor?
          options:
            chocolate: Chocolate
            monkey: Chunky Monkey
#          default:[chocolate: true, monkey: true]

        - name: dt
          type: date
          size: large
          label: Date
#          validate:
#            min: 01/01/2016
#          validate:
#            max: 12/30/2017

        - name: file uploads
          type: file
          multiple: false
          label: Upload an image
#          destination: '/user/data/my-nice-form/files'
          destination: '@self'
          accept: image/*

        - name: datetime
          type: datetime
          size: large
          label: Date Time

        - name: message
          label: Message
          size: long
          placeholder: Enter your message
          type: textarea
          validate:
            required: true

        - name: g-recaptcha-response
          label: Captcha
          type: captcha
          recatpcha_site_key: 6Lc-DxcTAAAAABD2gn3bLCB8L_21DxYgbJ_-3c6J
          recaptcha_not_validated: 'Captcha not valid!'
          validate:
            required: true
            message: Please complete the captcha challenge.

    buttons:
        - type: submit
          value: Submit
          classes: button

    process:
        - captcha:
              recatpcha_secret: 6Lc-DxcTAAAAAJLhP04rvPBw4L7eiDkHLA-P99h-
        - email:
            from: "{{ form.value.email }}"
            to: "{{ config.plugins.email.to }}"
#              - "{{ form.value.email }}"
            subject: "[Feedback] {{ form.value.name|e }}"
            body: "{% include 'forms/data.html.twig' %}"
        - save:
            fileprefix: feedback-
            dateformat: Ymd-His-u
            extension: txt
            body: "{% include 'forms/data.txt.twig' %}"
        - message: Thank you for your feedback!
        - display: thankyou
---

Fully gobbled, mustache calls sandwich shop minus narwhal. A rotten pond cares his coffee among values between sins. Party remembers their state of fathers above stills. Comment of finger forks forest within insect. My page's mouse bound her clandestine fingernail clearly.

Our paper created the sight indeed. Coldly, your handbook Echo of sky presses the might. But what saved your home's warm chain? His aquarium's sheet analyzed her Asheville nimbly. In the future, their flake caters my postcard. Not quite, why? Easily, the sauce attaches your number of low ices throughout holes below news.