answer stringlengths 15 1.25M |
|---|
from matplotlib import pyplot as plt
from matplotlib import cm
from os import path
import numpy as np
import cv2
import pandas as pd
from math import exp, pi, sqrt
import mahotas as mh
from numbapro import vectorize
def show_images(images,titles=None, scale=1.3):
"""Display a list of images"""
n_ims = len(images)
if titles is None: titles = ['(%d)' % i for i in range(1,n_ims + 1)]
fig = plt.figure()
n = 1
for image,title in zip(images,titles):
a = fig.add_subplot(1,n_ims,n) # Make subplot
if image.ndim == 2: # Is image grayscale?
plt.imshow(image, cmap = cm.Greys_r)
else:
plt.imshow(cv2.cvtColor(image, cv2.COLOR_RGB2BGR))
a.set_title(title)
plt.axis("off")
n += 1
fig.set_size_inches(np.array(fig.get_size_inches(), dtype=np.float) * n_ims / scale)
plt.show()
plt.close()
# Pyramid Down & blurr
# Easy-peesy
def pyr_blurr(image):
return cv2.GaussianBlur(cv2.pyrDown(image), (7, 7), 30.)
def median_blurr(image, size = 7):
return cv2.medianBlur(image, size)
def display_contours(image, contours, color = (255, 0, 0), thickness = -1, title = None):
imShow = image.copy()
for i in range(0, len(contours)):
cv2.drawContours(imShow, contours, i, color, thickness)
show_images([imShow], scale=0.7, titles=title)
def salt_and_peper(im, fraction = 0.01):
assert (0 < fraction <= 1.), "Fraction must be in (0, 1]"
sp = np.zeros(im.shape)
percent = round(fraction * 100 / 2.)
cv2.randu(sp, 0, 100)
# quarter salt quarter pepper
im_sp = im.copy()
im_sp [sp < percent] = 0
im_sp [sp > 100 - percent] = 255
return im_sp
def remove_light_reflex(im, ksize = 5):
kernel = cv2.<API key>(cv2.MORPH_RECT, (ksize, ksize))
return cv2.morphologyEx(im, cv2.MORPH_OPEN, kernel)
def <API key>(L, sigma, t = 3, mf = True):
dim_y = int(L)
dim_x = 2 * int(t * sigma)
arr = np.zeros((dim_y, dim_x), 'f')
ctr_x = dim_x / 2
ctr_y = int(dim_y / 2.)
# an un-natural way to set elements of the array
# to their x coordinate
it = np.nditer(arr, flags=['multi_index'])
while not it.finished:
arr[it.multi_index] = it.multi_index[1] - ctr_x
it.iternext()
two_sigma_sq = 2 * sigma * sigma
sqrt_w_pi_sigma = 1. / (sqrt(2 * pi) * sigma)
if not mf:
sqrt_w_pi_sigma = sqrt_w_pi_sigma / sigma ** 2
@vectorize(['float32(float32)'], target='cpu')
def k_fun(x):
return sqrt_w_pi_sigma * exp(-x * x / two_sigma_sq)
@vectorize(['float32(float32)'], target='cpu')
def k_fun_derivative(x):
return -x * sqrt_w_pi_sigma * exp(-x * x / two_sigma_sq)
if mf:
kernel = k_fun(arr)
kernel = kernel - kernel.mean()
else:
kernel = k_fun_derivative(arr)
# return the correlation kernel for filter2D
return cv2.flip(kernel, -1)
def fdog_filter_kernel(L, sigma, t = 3):
'''
K = - (x/(sqrt(2 * pi) * sigma ^3)) * exp(-x^2/2sigma^2), |y| <= L/2, |x| < s * t
'''
return <API key>(L, sigma, t, False)
def <API key>(L, sigma, t = 3):
'''
K = 1/(sqrt(2 * pi) * sigma ) * exp(-x^2/2sigma^2), |y| <= L/2, |x| < s * t
'''
return <API key>(L, sigma, t, True)
def <API key>(K, n = 12):
'''
Given a kernel, create matched filter bank
'''
rotate = 180 / n
center = (K.shape[1] / 2, K.shape[0] / 2)
cur_rot = 0
kernels = [K]
for i in range(1, n):
cur_rot += rotate
r_mat = cv2.getRotationMatrix2D(center, cur_rot, 1)
k = cv2.warpAffine(K, r_mat, (K.shape[1], K.shape[0]))
kernels.append(k)
return kernels
def applyFilters(im, kernels):
'''
Given a filter bank, apply them and record maximum response
'''
images = np.array([cv2.filter2D(im, -1, k) for k in kernels])
return np.max(images, 0)
def gabor_filters(ksize, sigma = 4.0, lmbda = 10.0, n = 16):
'''
Create a bank of Gabor filters spanning 180 degrees
'''
filters = []
for theta in np.arange(0, np.pi, np.pi / n):
kern = cv2.getGaborKernel((ksize, ksize), sigma, theta, lmbda, 0.5, 0, ktype=cv2.CV_64F)
kern /= 1.5*kern.sum()
filters.append(kern)
return filters
def saturate (v):
return np.array(map(lambda a: min(max(round(a), 0), 255), v))
def calc_hist(images, masks):
channels = map(lambda i: cv2.split(i), images)
imMask = zip(channels, masks)
nonZeros = map(lambda m: cv2.countNonZero(m), masks)
# grab three histograms - one for each channel
histPerChannel = map(lambda (c, mask): \
[cv2.calcHist([cimage], [0], mask, [256], np.array([0, 255])) for cimage in c], imMask)
# compute the cdf's.
# they are normalized & saturated: values over 255 are cut off.
cdfPerChannel = map(lambda (hChan, nz): \
[saturate(np.cumsum(h) * 255.0 / nz) for h in hChan], \
zip(histPerChannel, nonZeros))
return np.array(cdfPerChannel)
# compute color map based on minimal distances beteen cdf values of ref and input images
def getMin (ref, img):
l = [np.argmin(np.abs(ref - i)) for i in img]
return np.array(l)
# compute and apply color map on all channels of the image
def map_image(image, refHist, imageHist):
# each of the arguments contains histograms over 3 channels
mp = np.array([getMin(r, i) for (r, i) in zip(refHist, imageHist)])
channels = np.array(cv2.split(image))
mappedChannels = np.array([mp[i,channels[i]] for i in range(0, 3)])
return cv2.merge(mappedChannels).astype(np.uint8)
# compute the histograms on all three channels for all images
def <API key>(ref, images, masks):
'''
ref - reference image
images - a set of images to have color transferred via histogram specification
masks - masks to apply
'''
cdfs = calc_hist(images, masks)
mapped = [map_image(images[i], ref[0], cdfs[i, :, :]) for i in range(len(images))]
return mapped
def max_labelled_region(labels, Bc = None):
'''
Labelled region of maximal area
'''
return np.argmax(mh.labeled.labeled_size(labels)[1:]) + 1
def saturate (v):
return map(lambda a: min(max(round(a), 0), 255), v)
def plot_hist(hst, color):
fig = plt.figure()
plt.bar(np.arange(256), hst, width=2, color=color, edgecolor='none')
fig.set_size_inches(np.array(fig.get_size_inches(), dtype=np.float) * 2)
plt.show() |
import { moduleForComponent, test } from 'ember-qunit'
import hbs from '<API key>'
moduleForComponent('bs-table-pagination/table-body', 'Integration | Component | bs table pagination/table body', {
integration: true
})
test('it renders', function (assert) {
// Set any properties with this.set('myProperty', 'value');
// Handle any actions with this.on('myAction', function(val) { ... });"
this.render(hbs`{{bs-table-pagination/table-body}}`)
assert.equal(this.$().text().trim(), '')
// Template block usage:"
this.render(hbs`
{{#bs-table-pagination/table-body}}
template block text
{{/bs-table-pagination/table-body}}
`)
assert.equal(this.$().text().trim(), 'template block text')
}) |
import moment from 'moment'
import Users from '~/server/services/users'
import Pages from '~/server/services/pages'
const users = new Users()
const pages = new Pages()
export default {
RootQuery: {
pages(root, args, ctx) {
return []
},
page(root, { slug }, ctx) {
return pages.findBySlug(slug)
},
user(root, { id }, ctx){
return users.find(id)
},
users(root, { limit, offset }, ctx){
return users.paginate(limit, offset)
},
viewer(){},
},
RootMutation: {
signUp(){},
login(){},
saveUser(){},
savePage(){},
},
Date: {
__parseValue(value) {
return new Date(value); // value from the client
},
__serialize(value) {
if(value !== '0000-00-00 00:00:00'){
let time = moment(value, "YYYY-MM-DD HH:mm:ss")
return time.toDate().getTime(); // value sent to the client
}
else {
return 0
}
},
__parseLiteral(ast) {
if (ast.kind === Kind.INT) {
return parseInt(ast.value, 10); // ast value is always in string format
}
return null;
},
},
AuthPayload: {
data(auth, args, ctx) {
return auth.data
}
},
Page: {
publishedAt(page, args, ctx) {
return page.published_at
// return moment(page.created_at, "YYYY-MM-DD HH:mm:ss")
},
createdAt(page, args, ctx) {
return page.created_at
// return moment(page.created_at, "YYYY-MM-DD HH:mm:ss")
},
updatedAt(page, args, ctx) {
return page.updated_at
// return moment(page.updated_at, "YYYY-MM-DD HH:mm:ss")
},
},
User: {
createdAt(user, args, ctx) {
return user.created_at
// return moment(user.created_at, "YYYY-MM-DD HH:mm:ss")
},
updatedAt(user, args, ctx) {
return user.updated_at
// return moment(user.updated_at, "YYYY-MM-DD HH:mm:ss")
},
},
} |
{-# LANGUAGE OverloadedStrings, ScopedTypeVariables #-}
module Lib
( someFunc
) where
import Reflex.Dom
import Data.JSString ()
import GHCJS.Types
import GUI.ChannelDrawer
import GUI.Player
import Data.Monoid
someFunc :: IO ()
someFunc = mainWidget mainUI
-- Needed until Reflex.Dom version 0.4 is released
foreign import javascript unsafe
"$1.withCredentials = true;"
<API key> :: JSVal -> IO ()
tvhBaseUrl :: String
tvhBaseUrl = "http://localhost:9981/"
navBar :: MonadWidget t m => m ()
navBar = do
elClass "nav" "navbar navbar-default navbar-static-top" $ do
divClass "container-fluid" $ do
divClass "navbar-header" $ do
divClass "navbar-brand" $ do
text "Tvheadend frontend"
mainUI :: MonadWidget t m => m ()
mainUI = do
navBar
divClass "container-fluid" $ do
divClass "row" $ do
curChannel <- elAttr "div"
("class" =: "col-lg-2" <>
-- height:90vh to fit the list inside the viewport
-- overflow-y:auto to get vertical scrollbar
-- padding-right:0px to pull scrollbar closer to the list
"style" =: "height:90vh;overflow-y:auto;padding-right:0px") $ do
-- create the channel drawer and react to events fired when a channel is selected
channelDrawer tvhBaseUrl
divClass "col-lg-10" $ do
player tvhBaseUrl curChannel |
"""
Test for single criteria EI example.
"""
import logging
import os.path
import random
import unittest
from numpy import pi
from openmdao.examples.<API key>.single_objective_ei import Analysis
from openmdao.main.api import set_as_top
from pyevolve import Selectors
class <API key>(unittest.TestCase):
"""Test to make sure the EI sample problem works as it should"""
def tearDown(self):
if os.path.exists('adapt.csv'):
os.remove('adapt.csv')
def test_EI(self):
random.seed(0)
# pyevolve does some caching that causes failures during our
# complete unit tests due to stale values in the cache attributes
# below, so reset them here
Selectors.GRankSelector.cachePopID = None
Selectors.GRankSelector.cacheCount = None
Selectors.GRouletteWheel.cachePopID = None
Selectors.GRouletteWheel.cacheWheel = None
analysis = Analysis()
set_as_top(analysis)
# analysis.DOE_trainer.DOEgenerator = FullFactorial(num_levels=10)
analysis.run()
# This test looks for the presence of at least one point close to
# each optimum.
print analysis.ei.EI
print analysis.meta.x
print analysis.meta.y
points = [(-pi, 12.275, .39789), (pi, 2.275, .39789), (9.42478, 2.745, .39789)]
errors = []
for x, y, z in points:
analysis.meta.x = x
analysis.meta.y = y
analysis.meta.execute()
errors.append(abs((analysis.meta.f_xy.mu - z) / z * 100))
avg_error = sum(errors) / float(len(errors))
logging.info('#errors %s, sum(errors) %s, avg_error %s',
len(errors), sum(errors), avg_error)
self.assertTrue(avg_error <= 35)
if __name__ == "__main__": # pragma: no cover
unittest.main() |
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
</head>
<body>
<button id="clickage">Click me!</button>
<ul id="listage">
</ul>
<script type="text/javascript">
var button = document.getElementById('clickage'),
list = document.getElementById('listage');
button.addEventListener('click', function(evt){
var request = new XMLHttpRequest();
request.onload = function(response){
response = JSON.parse(response.target.response).message;
var item = document.createElement('li'),
text = document.createTextNode(response);
item.appendChild(text);
list.appendChild(item);
};
request.open('GET', '/whatever');
request.send();
});
</script>
</body>
</html> |
import {Loadable} from "./loadable";
import Game from "./game";
declare let game: Game;
export class RoomExit extends Loadable {
static EXIT = -999;
static EXIT_SILENT = -998; // same as regular exit, but without the "ride off into the sunset" message
public direction: string;
public room_to: number;
public door_id: number;
public effect_id: number;
private directions: { [key: string]: string; } = {
"n": "north",
"ne": "northeast",
"e": "east",
"se": "southeast",
"s": "south",
"sw": "southwest",
"w": "west",
"nw": "northwest",
"u": "up",
"d": "down"
};
/**
* Check for locked exits.
* @returns boolean
* True if the exit has no door, or if the door is visible and open.
* False if there is a closed door or a hidden embedded door like an undiscovered secret door.
*/
public isOpen(): boolean {
if (this.door_id) {
const door = game.artifacts.get(this.door_id);
return door.is_open && !door.hidden;
} else {
// no door
return true;
}
}
public <API key>(): string {
if (this.directions.hasOwnProperty(this.direction)) {
return this.directions[this.direction];
}
return this.direction;
}
}
export class Room extends Loadable {
public id: number;
public name: string;
public description: string;
public is_markdown: boolean;
public exits: RoomExit[] = [];
public seen = false;
public visited_in_dark = false;
public is_dark: boolean;
public dark_name: string;
public dark_description: string;
public effect: number;
public effect_inline: number;
/**
* A container for custom data used by specific adventures
*/
public data: { [key: string]: any; } = {};
/**
* Loads data from JSON source into the object properties.
* Override of parent method to handle RoomExit objects.
* @param {Object} source an object, e.g., from JSON.
*/
public init(source): void {
for (const prop in source) {
if (prop === "exits") {
for (const i in source[prop]) {
const ex = new RoomExit();
ex.init(source[prop][i]);
this.exits.push(ex);
}
} else {
this[prop] = source[prop];
}
}
}
/**
* Shows the room description and any built-in effects.
*/
public show_description() {
game.history.write(this.description,"normal", this.is_markdown);
if (this.effect != null) {
game.effects.print(this.effect);
}
if (this.effect_inline != null) {
game.effects.print(this.effect_inline, null, true);
}
}
/**
* Shows the dark version of the room description (used when there isn't a light source).
*/
public <API key>() {
game.history.write(this.dark_description, "normal", this.is_markdown);
}
/**
* Gets the visible/known exits from the room.
*
* Excludes zero-connection exits and exits with hidden secret doors.
*/
public getVisibleExits(): RoomExit[] {
return this.exits.filter(r => r.room_to !== 0 &&
(!r.door_id || !game.artifacts.get(r.door_id).hidden)
);
}
/**
* Gets the exit from the room in a given direction
*/
public getExit(direction: string): RoomExit {
for (const i in this.exits) {
// FIXME: this will only work with 'e' not 'east', etc.
if (this.exits[i].direction === direction) {
return this.exits[i];
}
}
return null;
}
/**
* Returns the open exits from the room (used, e.g., when fleeing).
* Excludes any locked/hidden exits and the game exit.
*/
public getGoodExits(): RoomExit[] {
return this.exits.filter(x => x.room_to !== RoomExit.EXIT && x.room_to > 0 && x.isOpen());
}
/**
* Determines whether the room has a good exit (used, e.g., when fleeing)
* Excludes any locked/hidden exits and the game exit.
*/
public hasGoodExits(): boolean {
const exits = this.getGoodExits();
return exits.length > 0;
}
/**
* Monster flees out a random exit
*/
public chooseRandomExit(): RoomExit {
// choose a random exit
const good_exits: RoomExit[] = this.getGoodExits();
if (good_exits.length === 0) {
return null;
} else {
return good_exits[game.diceRoll(1, good_exits.length) - 1];
}
}
/**
* Creates a new exit from the room in a given direction
*/
public addExit(exit: RoomExit): void {
this.exits.push(exit);
}
/**
* Creates a new exit from the room in a given direction (shorthand version)
*/
public createExit(direction: string, room_to: number, door_id: number = null): void {
const new_exit = new RoomExit();
new_exit.direction = direction;
new_exit.room_to = room_to;
new_exit.door_id = door_id;
this.exits.push(new_exit);
}
/**
* Removes the exit in a given direction
*/
public removeExit(direction: string): void {
this.exits = this.exits.filter(x => x.direction !== direction);
}
/**
* Determines whether a given word is in the room name or description
*/
public textMatch(str: string): boolean {
str = str.toLowerCase();
const name = this.name.toLowerCase();
const desc = this.description.toLowerCase();
return (name.indexOf(str) !== -1 || desc.indexOf(str) !== -1);
}
} |
# -*- coding: utf-8 -*-
from stash.tests.stashtest import StashTestCase
class CowsayTests(StashTestCase):
"""tests for cowsay"""
def test_help(self):
"""test help output"""
output = self.run_command("cowsay --help", exitcode=0)
self.assertIn("cowsay", output)
self.assertIn("--help", output)
self.assertIn("usage:", output)
def test_singleline_1(self):
"""test for correct text in output"""
output = self.run_command("cowsay test", exitcode=0)
self.assertIn("test", output)
self.assertNotIn("Hello, World!", output)
self.assertEqual(output.count("<"), 1)
self.assertEqual(output.count(">"), 1)
def test_singleline_1(self):
"""test for correct text in output"""
output = self.run_command("cowsay Hello, World!", exitcode=0)
self.assertIn("Hello, World!", output)
self.assertNotIn("test", output)
self.assertEqual(output.count("<"), 1)
self.assertEqual(output.count(">"), 1)
def test_stdin_read(self):
"""test 'echo test | cowsay' printing 'test'"""
output = self.run_command("echo test | cowsay", exitcode=0)
self.assertIn("test", output)
self.assertNotIn("Hello, World!", output)
def test_stdin_ignore(self):
"""test 'echo test | cowsay Hello, World!' printing 'Hello World!'"""
output = self.run_command("echo test | cowsay Hello, World!", exitcode=0)
self.assertIn("Hello, World!", output)
self.assertNotIn("test", output)
def test_multiline_1(self):
"""test for correct multiline output"""
output = self.run_command("cowsay Hello,\\nWorld!", exitcode=0)
self.assertIn("Hello,", output)
self.assertIn("World!", output)
self.assertNotIn("Hello,\nWorld!", output) # text should be splitted allong the lines
self.assertIn("/", output)
self.assertIn("\\", output)
self.assertNotIn("<", output)
self.assertNotIn(">", output)
def test_multiline_2(self):
"""test for correct multiline output"""
output = self.run_command("cowsay Hello,\\nWorld!\\nPython4Ever", exitcode=0)
self.assertIn("Hello,", output)
self.assertIn("World!", output)
self.assertIn("Python4Ever", output)
self.assertNotIn("Hello,\nWorld!\nPython4Ever", output) # text should be splitted allong the lines
self.assertIn("/", output)
self.assertIn("\\", output)
self.assertIn("|", output)
self.assertNotIn("<", output)
self.assertNotIn(">", output) |
#import <Foundation/Foundation.h>
static inline NSString* documentsDirectory() {
return [<API key>(NSDocumentDirectory, NSUserDomainMask, YES) lastObject];
}
static inline NSString* cachesDirectory() {
return [<API key>(NSCachesDirectory, NSUserDomainMask, YES) lastObject];
}
static inline NSString* tempDirectory() {
return <API key>();
} |
TOOL.Category = "Construction"
TOOL.Name = "#tool.balloon.name"
TOOL.ClientConVar[ "ropelength" ] = "64"
TOOL.ClientConVar[ "force" ] = "500"
TOOL.ClientConVar[ "r" ] = "255"
TOOL.ClientConVar[ "g" ] = "255"
TOOL.ClientConVar[ "b" ] = "0"
TOOL.ClientConVar[ "model" ] = "models/MaxOfS2D/balloon_classic.mdl"
cleanup.Register( "balloons" )
function TOOL:LeftClick( trace, attach )
if ( IsValid( trace.Entity ) && trace.Entity:IsPlayer() ) then return false end
if ( CLIENT ) then return true end
-- Right click calls this with attach = false
if ( attach == nil ) then
attach = true
end
-- If there's no physics object then we can't constraint it!
if ( SERVER && attach && !util.<API key>( trace.Entity, trace.PhysicsBone ) ) then
return false
end
local ply = self:GetOwner()
local length = self:GetClientNumber( "ropelength", 64 )
local material = "cable/rope"
local force = self:GetClientNumber( "force", 500 )
local r = self:GetClientNumber( "r", 255 )
local g = self:GetClientNumber( "g", 0 )
local b = self:GetClientNumber( "b", 0 )
local model = self:GetClientInfo( "model" )
local modeltable = list.Get( "BalloonModels" )[model]
-- Model is a table index on BalloonModels
-- If the model isn't defined then it can't be spawned.
if ( !modeltable ) then return false end
-- The model table can disable colouring for its model
if ( modeltable.nocolor ) then
r = 255
g = 255
b = 255
end
-- Clicked on a balloon - modify the force/color/whatever
if ( IsValid( trace.Entity) && trace.Entity:GetClass() == "gmod_balloon" && trace.Entity.Player == ply )then
local force = self:GetClientNumber( "force", 500 )
trace.Entity:GetPhysicsObject():Wake()
trace.Entity:SetColor( Color( r, g, b, 255 ) )
trace.Entity:SetForce( force )
trace.Entity.force = force
return true
end
-- Hit the balloon limit, bail
if ( !self:GetSWEP():CheckLimit( "balloons" ) ) then return false end
local Pos = trace.HitPos + trace.HitNormal * 10
local balloon = MakeBalloon( ply, r, g, b, force, { Pos = Pos, Model = modeltable.model, Skin = modeltable.skin } )
undo.Create("Balloon")
undo.AddEntity( balloon )
if ( attach ) then
-- The real model should have an attachment!
local attachpoint = Pos + Vector( 0, 0, 0 )
local LPos1 = balloon:WorldToLocal( attachpoint )
local LPos2 = trace.Entity:WorldToLocal( trace.HitPos )
if ( IsValid( trace.Entity) ) then
local phys = trace.Entity:GetPhysicsObjectNum( trace.PhysicsBone )
if ( IsValid( phys ) ) then LPos2 = phys:WorldToLocal( trace.HitPos ) end
end
local constraint, rope = constraint.Rope( balloon, trace.Entity, 0, trace.PhysicsBone, LPos1, LPos2, 0, length, 0, 0.5, material, nil )
undo.AddEntity( rope )
undo.AddEntity( constraint )
ply:AddCleanup( "balloons", rope )
ply:AddCleanup( "balloons", constraint )
end
undo.SetPlayer( ply )
undo.Finish()
ply:AddCleanup( "balloons", balloon )
return true
end
function TOOL:RightClick( trace )
return self:LeftClick( trace, false )
end
function TOOL.BuildCPanel( CPanel )
CPanel:AddControl( "Header", { Text = "#tool.balloon.name", Description = "#tool.balloon.help" } )
CPanel:AddControl( "ComboBox", { Label = "#tool.presets",
MenuButton = 1,
Folder = "balloon",
CVars = { "balloon_ropelength", "balloon_force", "balloon_r", "balloon_g", "balloon_b", "balloon_skin" } } )
CPanel:AddControl( "Slider", { Label = "#tool.balloon.ropelength", Type = "Float", Command = "balloon_ropelength", Min = "5", Max = "1000" } )
CPanel:AddControl( "Slider", { Label = "#tool.balloon.force", Type = "Float", Command = "balloon_force", Min = "-1000", Max = "2000", Help = true } )
CPanel:AddControl( "Color", { Label = "#tool.balloon.color", Red = "balloon_r", Green = "balloon_g", Blue = "balloon_b", ShowAlpha = "0", ShowHSV = "1", ShowRGB = "1" } )
CPanel:AddControl( "PropSelect", { Label = "#tool.balloon.model",
ConVar = "balloon_model",
Height = 4,
ModelsTable = list.Get( "BalloonModels" ) } )
end
function MakeBalloon( pl, r, g, b, force, Data )
if ( IsValid( pl ) && !pl:CheckLimit( "balloons" ) ) then return nil end
local balloon = ents.Create( "gmod_balloon" )
if ( !balloon:IsValid() ) then return end
duplicator.DoGeneric( balloon, Data )
balloon:Spawn()
duplicator.DoGenericPhysics( balloon, pl, Data )
balloon:SetRenderMode( <API key> )
balloon:SetColor( Color( r, g, b, 255 ) )
balloon:SetForce( force )
balloon:SetPlayer( pl )
balloon:SetMaterial( skin )
balloon.Player = pl
balloon.r = r
balloon.g = g
balloon.b = b
balloon.force = force
if ( IsValid( pl ) ) then
pl:AddCount( "balloons", balloon )
end
return balloon
end
duplicator.RegisterEntityClass( "gmod_balloon", MakeBalloon, "r", "g", "b", "force", "Data" )
list.Set( "BalloonModels", "normal",
{
model = "models/MaxOfS2D/balloon_classic.mdl",
skin = 0,
})
list.Set( "BalloonModels", "normal_skin1",
{
model = "models/MaxOfS2D/balloon_classic.mdl",
skin = 1,
})
list.Set( "BalloonModels", "normal_skin2",
{
model = "models/MaxOfS2D/balloon_classic.mdl",
skin = 2,
})
list.Set( "BalloonModels", "normal_skin3",
{
model = "models/MaxOfS2D/balloon_classic.mdl",
skin = 3,
})
list.Set( "BalloonModels", "gman",
{
model = "models/MaxOfS2D/balloon_gman.mdl",
nocolor = true,
})
list.Set( "BalloonModels", "mossman",
{
model = "models/MaxOfS2D/balloon_mossman.mdl",
nocolor = true,
})
list.Set( "BalloonModels", "dog",
{
model = "models/balloons/balloon_dog.mdl"
})
list.Set( "BalloonModels", "heart",
{
model = "models/balloons/<API key>.mdl"
})
list.Set( "BalloonModels", "star",
{
model = "models/balloons/balloon_star.mdl"
}) |
// file: bwipp/code11.js
// This code was automatically generated from:
// Barcode Writer in Pure PostScript - Version 2015-08-10
// BEGIN code11
if (!BWIPJS.bwipp["raiseerror"] && BWIPJS.increfs("code11", "raiseerror")) {
BWIPJS.load("bwipp/raiseerror.js");
}
if (!BWIPJS.bwipp["renlinear"] && BWIPJS.increfs("code11", "renlinear")) {
BWIPJS.load("bwipp/renlinear.js");
}
BWIPJS.bwipp["code11"]=function() {
function $f0(){
return -1;
}
function $f1(){
var t=this.stk[this.ptr-2]; this.stk[this.ptr-2]=this.stk[this.ptr-1]; this.stk[this.ptr-1]=t;
this.ptr
var t=this.stk[this.ptr-2]; this.stk[this.ptr-2]=this.stk[this.ptr-1]; this.stk[this.ptr-1]=t;
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
}
function $f2(){
this.stk[this.ptr++]=true;
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
}
function $f3(){
var a=/^\s*([^\s]+)(\s+.*)?$/.exec(this.stk[this.ptr-1]);
if (a) {
this.stk[this.ptr-1]=BWIPJS.psstring(a[2]===undefined?"":a[2]);
this.stk[this.ptr++]=BWIPJS.psstring(a[1]);
this.stk[this.ptr++]=true;
} else {
this.stk[this.ptr-1]=false;
}
this.stk[this.ptr++]=false;
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring)
this.stk[this.ptr-2]=this.stk[this.ptr-2].toString()==this.stk[this.ptr-1];
else this.stk[this.ptr-2]=this.stk[this.ptr-2]==this.stk[this.ptr-1];
this.ptr
this.stk[this.ptr++]=$f0;
var t0=this.stk[--this.ptr];
if (this.stk[--this.ptr]) {
if (t0.call(this)==-1) return -1;
}
this.stk[this.ptr]=this.stk[this.ptr-1]; this.ptr++;
if (typeof(this.stk[this.ptr-1].length)!=="number") throw "length: invalid: " + BWIPJS.pstype(this.stk[this.ptr-1]);
this.stk[this.ptr-1]=this.stk[this.ptr-1].length;
this.stk[this.ptr-1]=BWIPJS.psstring(this.stk[this.ptr-1]);
var t=this.stk[this.ptr-2].toString();
this.stk[this.ptr-1].assign(0,t);
this.stk[this.ptr-2]=this.stk[this.ptr-1].subset(0,t.length);
this.ptr
this.stk[this.ptr++]=BWIPJS.psstring("=");
var h=this.stk[this.ptr-2];
var t=h.indexOf(this.stk[this.ptr-1]);
if (t==-1) {
this.stk[this.ptr-1]=false;
} else {
this.stk[this.ptr-2]=h.subset(t+this.stk[this.ptr-1].length);
this.stk[this.ptr-1]=h.subset(t,this.stk[this.ptr-1].length);
this.stk[this.ptr++]=h.subset(0,t);
this.stk[this.ptr++]=true;
}
this.stk[this.ptr++]=true;
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring)
this.stk[this.ptr-2]=this.stk[this.ptr-2].toString()==this.stk[this.ptr-1];
else this.stk[this.ptr-2]=this.stk[this.ptr-2]==this.stk[this.ptr-1];
this.ptr
this.stk[this.ptr++]=$f1;
this.stk[this.ptr++]=$f2;
var t1=this.stk[--this.ptr];
var t2=this.stk[--this.ptr];
if (this.stk[--this.ptr]) {
if (t2.call(this)==-1) return -1;
} else {
if (t1.call(this)==-1) return -1;
}
}
function $f4(){
this.stk[this.ptr++]=1;
this.stk[this.ptr-1]={};
this.dict=this.stk[--this.ptr]; this.dstk.push(this.dict);
var t=this.dstk.get("options");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=$f3;
var t3=this.stk[--this.ptr];
while (true) {
if (t3.call(this)==-1) break;
}
this.stk[this.ptr++]=this.dict;
this.dstk.pop(); this.dict=this.dstk[this.dstk.length-1];
this.stk[this.ptr++]="options";
var t=this.stk[this.ptr-2]; this.stk[this.ptr-2]=this.stk[this.ptr-1]; this.stk[this.ptr-1]=t;
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
}
function $f5(){
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
}
function $f6(){
var t=this.dstk.get("charvals");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.stk[this.ptr-2]; this.stk[this.ptr-2]=this.stk[this.ptr-1]; this.stk[this.ptr-1]=t;
this.stk[this.ptr]=this.stk[this.ptr-1]; this.ptr++;
var t=this.dstk.get("barchars");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.stk[this.ptr-2]; this.stk[this.ptr-2]=this.stk[this.ptr-1]; this.stk[this.ptr-1]=t;
this.stk[this.ptr++]=1;
this.stk[this.ptr-3]=this.stk[this.ptr-3].subset(this.stk[this.ptr-2],this.stk[this.ptr-1]); this.ptr-=2;
var t=this.stk[this.ptr-2]; this.stk[this.ptr-2]=this.stk[this.ptr-1]; this.stk[this.ptr-1]=t;
if (this.stk[this.ptr-3] instanceof BWIPJS.psstring || this.stk[this.ptr-3] instanceof BWIPJS.psarray)
this.stk[this.ptr-3].set(this.stk[this.ptr-2], this.stk[this.ptr-1]);
else this.stk[this.ptr-3][this.stk[this.ptr-2].toString()]=this.stk[this.ptr-1];
this.ptr-=3;
}
function $f7(){
this.stk[this.ptr++]="bwipp.code11badCharacter";
this.stk[this.ptr++]=BWIPJS.psstring("Code 11 must contain only digits and dashes");
var t=this.dstk.get("raiseerror");
this.stk[this.ptr++]=t;
var t=this.stk[--this.ptr];
if (t instanceof Function) t.call(this); else this.eval(t);
}
function $f8(){
var t=this.dstk.get("barcode");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.stk[this.ptr-2]; this.stk[this.ptr-2]=this.stk[this.ptr-1]; this.stk[this.ptr-1]=t;
this.stk[this.ptr++]=1;
this.stk[this.ptr-3]=this.stk[this.ptr-3].subset(this.stk[this.ptr-2],this.stk[this.ptr-1]); this.ptr-=2;
var t=this.dstk.get("charvals");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.stk[this.ptr-2]; this.stk[this.ptr-2]=this.stk[this.ptr-1]; this.stk[this.ptr-1]=t;
this.stk[this.ptr-2]=this.stk[this.ptr-2][this.stk[this.ptr-1]]!==undefined; this.ptr
if (typeof(this.stk[this.ptr-1])=="boolean") this.stk[this.ptr-1]=!this.stk[this.ptr-1];
else this.stk[this.ptr-1]=~this.stk[this.ptr-1];
this.stk[this.ptr++]=$f7;
var t13=this.stk[--this.ptr];
if (this.stk[--this.ptr]) {
if (t13.call(this)==-1) return -1;
}
}
function $f9(){
this.stk[this.ptr++]="bwipp.code11badLength";
this.stk[this.ptr++]=BWIPJS.psstring("Code 11 cannot be 11 characters using check digits");
var t=this.dstk.get("raiseerror");
this.stk[this.ptr++]=t;
var t=this.stk[--this.ptr];
if (t instanceof Function) t.call(this); else this.eval(t);
}
function $f10(){
this.stk[this.ptr++]=1;
}
function $f11(){
this.stk[this.ptr++]=2;
}
function $f12(){
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=11;
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring)
this.stk[this.ptr-2]=this.stk[this.ptr-2].toString()==this.stk[this.ptr-1];
else this.stk[this.ptr-2]=this.stk[this.ptr-2]==this.stk[this.ptr-1];
this.ptr
this.stk[this.ptr++]=$f9;
var t19=this.stk[--this.ptr];
if (this.stk[--this.ptr]) {
if (t19.call(this)==-1) return -1;
}
this.stk[this.ptr++]="barlen";
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=10;
this.stk[this.ptr-2]=this.stk[this.ptr-2]<=this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=$f10;
this.stk[this.ptr++]=$f11;
var t20=this.stk[--this.ptr];
var t21=this.stk[--this.ptr];
if (this.stk[--this.ptr]) {
if (t21.call(this)==-1) return -1;
} else {
if (t20.call(this)==-1) return -1;
}
this.stk[this.ptr-2]=this.stk[this.ptr-2]-this.stk[this.ptr-1]; this.ptr
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
}
function $f13(){
this.stk[this.ptr++]=2;
}
function $f14(){
this.stk[this.ptr++]=1;
}
function $f15(){
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=10;
this.stk[this.ptr-2]=this.stk[this.ptr-2]>=this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=$f13;
this.stk[this.ptr++]=$f14;
var t23=this.stk[--this.ptr];
var t24=this.stk[--this.ptr];
if (this.stk[--this.ptr]) {
if (t24.call(this)==-1) return -1;
} else {
if (t23.call(this)==-1) return -1;
}
}
function $f16(){
this.stk[this.ptr++]=0;
}
function $f17(){
this.stk[this.ptr++]="i";
var t=this.stk[this.ptr-2]; this.stk[this.ptr-2]=this.stk[this.ptr-1]; this.stk[this.ptr-1]=t;
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="indx";
var t=this.dstk.get("charvals");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("barcode");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("i");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=1;
this.stk[this.ptr-3]=this.stk[this.ptr-3].subset(this.stk[this.ptr-2],this.stk[this.ptr-1]); this.ptr-=2;
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring || this.stk[this.ptr-2] instanceof BWIPJS.psarray)
this.stk[this.ptr-2]=this.stk[this.ptr-2].get(this.stk[this.ptr-1]);
else this.stk[this.ptr-2]=this.stk[this.ptr-2][this.stk[this.ptr-1].toString()];
this.ptr
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="checksum1";
var t=this.dstk.get("checksum1");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("i");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr-2]=this.stk[this.ptr-2]-this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=1;
this.stk[this.ptr-2]=this.stk[this.ptr-2]-this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=10;
this.stk[this.ptr-2]=this.stk[this.ptr-2]%this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=1;
this.stk[this.ptr-2]=this.stk[this.ptr-2]+this.stk[this.ptr-1]; this.ptr
var t=this.dstk.get("indx");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr-2]=this.stk[this.ptr-2]*this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr-2]=this.stk[this.ptr-2]+this.stk[this.ptr-1]; this.ptr
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="checksum2";
var t=this.dstk.get("checksum2");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("i");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr-2]=this.stk[this.ptr-2]-this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=9;
this.stk[this.ptr-2]=this.stk[this.ptr-2]%this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=1;
this.stk[this.ptr-2]=this.stk[this.ptr-2]+this.stk[this.ptr-1]; this.ptr
var t=this.dstk.get("indx");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr-2]=this.stk[this.ptr-2]*this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr-2]=this.stk[this.ptr-2]+this.stk[this.ptr-1]; this.ptr
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
}
function $f18(){
this.stk[this.ptr++]="bwipp.code11badCheckDigit";
this.stk[this.ptr++]=BWIPJS.psstring("Incorrect Code 11 check digit provided");
var t=this.dstk.get("raiseerror");
this.stk[this.ptr++]=t;
var t=this.stk[--this.ptr];
if (t instanceof Function) t.call(this); else this.eval(t);
}
function $f19(){
var t=this.dstk.get("barcode");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring || this.stk[this.ptr-2] instanceof BWIPJS.psarray)
this.stk[this.ptr-2]=this.stk[this.ptr-2].get(this.stk[this.ptr-1]);
else this.stk[this.ptr-2]=this.stk[this.ptr-2][this.stk[this.ptr-1].toString()];
this.ptr
var t=this.dstk.get("barchars");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("checksum1");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring || this.stk[this.ptr-2] instanceof BWIPJS.psarray)
this.stk[this.ptr-2]=this.stk[this.ptr-2].get(this.stk[this.ptr-1]);
else this.stk[this.ptr-2]=this.stk[this.ptr-2][this.stk[this.ptr-1].toString()];
this.ptr
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring)
this.stk[this.ptr-2]=this.stk[this.ptr-2].toString()!=this.stk[this.ptr-1];
else this.stk[this.ptr-2]=this.stk[this.ptr-2]!=this.stk[this.ptr-1];
this.ptr
this.stk[this.ptr++]=$f18;
var t32=this.stk[--this.ptr];
if (this.stk[--this.ptr]) {
if (t32.call(this)==-1) return -1;
}
}
function $f20(){
this.stk[this.ptr++]="bwipp.<API key>";
this.stk[this.ptr++]=BWIPJS.psstring("Incorrect Code 11 check digits provided");
var t=this.dstk.get("raiseerror");
this.stk[this.ptr++]=t;
var t=this.stk[--this.ptr];
if (t instanceof Function) t.call(this); else this.eval(t);
}
function $f21(){
var t=this.dstk.get("barcode");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring || this.stk[this.ptr-2] instanceof BWIPJS.psarray)
this.stk[this.ptr-2]=this.stk[this.ptr-2].get(this.stk[this.ptr-1]);
else this.stk[this.ptr-2]=this.stk[this.ptr-2][this.stk[this.ptr-1].toString()];
this.ptr
var t=this.dstk.get("barchars");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("checksum1");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring || this.stk[this.ptr-2] instanceof BWIPJS.psarray)
this.stk[this.ptr-2]=this.stk[this.ptr-2].get(this.stk[this.ptr-1]);
else this.stk[this.ptr-2]=this.stk[this.ptr-2][this.stk[this.ptr-1].toString()];
this.ptr
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring)
this.stk[this.ptr-2]=this.stk[this.ptr-2].toString()!=this.stk[this.ptr-1];
else this.stk[this.ptr-2]=this.stk[this.ptr-2]!=this.stk[this.ptr-1];
this.ptr
var t=this.dstk.get("barcode");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=1;
this.stk[this.ptr-2]=this.stk[this.ptr-2]+this.stk[this.ptr-1]; this.ptr
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring || this.stk[this.ptr-2] instanceof BWIPJS.psarray)
this.stk[this.ptr-2]=this.stk[this.ptr-2].get(this.stk[this.ptr-1]);
else this.stk[this.ptr-2]=this.stk[this.ptr-2][this.stk[this.ptr-1].toString()];
this.ptr
var t=this.dstk.get("barchars");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("checksum2");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring || this.stk[this.ptr-2] instanceof BWIPJS.psarray)
this.stk[this.ptr-2]=this.stk[this.ptr-2].get(this.stk[this.ptr-1]);
else this.stk[this.ptr-2]=this.stk[this.ptr-2][this.stk[this.ptr-1].toString()];
this.ptr
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring)
this.stk[this.ptr-2]=this.stk[this.ptr-2].toString()!=this.stk[this.ptr-1];
else this.stk[this.ptr-2]=this.stk[this.ptr-2]!=this.stk[this.ptr-1];
this.ptr
if (typeof(this.stk[this.ptr-1])=="boolean") this.stk[this.ptr-2]=this.stk[this.ptr-2]||this.stk[this.ptr-1];
else this.stk[this.ptr-2]=this.stk[this.ptr-2]|this.stk[this.ptr-1];
this.ptr
this.stk[this.ptr++]=$f20;
var t33=this.stk[--this.ptr];
if (this.stk[--this.ptr]) {
if (t33.call(this)==-1) return -1;
}
}
function $f22(){
var t=this.dstk.get("numchecks");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=1;
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring)
this.stk[this.ptr-2]=this.stk[this.ptr-2].toString()==this.stk[this.ptr-1];
else this.stk[this.ptr-2]=this.stk[this.ptr-2]==this.stk[this.ptr-1];
this.ptr
this.stk[this.ptr++]=$f19;
this.stk[this.ptr++]=$f21;
var t34=this.stk[--this.ptr];
var t35=this.stk[--this.ptr];
if (this.stk[--this.ptr]) {
if (t35.call(this)==-1) return -1;
} else {
if (t34.call(this)==-1) return -1;
}
this.stk[this.ptr++]="barcode";
var t=this.dstk.get("barcode");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=0;
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr-3]=this.stk[this.ptr-3].subset(this.stk[this.ptr-2],this.stk[this.ptr-1]); this.ptr-=2;
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="includecheck";
this.stk[this.ptr++]=true;
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
}
function $f23(){
this.stk[this.ptr++]="xpos";
var t=this.stk[this.ptr-2]; this.stk[this.ptr-2]=this.stk[this.ptr-1]; this.stk[this.ptr-1]=t;
var t=this.dstk.get("enc");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.stk[this.ptr-2]; this.stk[this.ptr-2]=this.stk[this.ptr-1]; this.stk[this.ptr-1]=t;
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring || this.stk[this.ptr-2] instanceof BWIPJS.psarray)
this.stk[this.ptr-2]=this.stk[this.ptr-2].get(this.stk[this.ptr-1]);
else this.stk[this.ptr-2]=this.stk[this.ptr-2][this.stk[this.ptr-1].toString()];
this.ptr
this.stk[this.ptr++]=48;
this.stk[this.ptr-2]=this.stk[this.ptr-2]-this.stk[this.ptr-1]; this.ptr
var t=this.dstk.get("xpos");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr-2]=this.stk[this.ptr-2]+this.stk[this.ptr-1]; this.ptr
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
}
function $f24(){
this.stk[this.ptr++]="i";
var t=this.stk[this.ptr-2]; this.stk[this.ptr-2]=this.stk[this.ptr-1]; this.stk[this.ptr-1]=t;
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="indx";
var t=this.dstk.get("charvals");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("barcode");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("i");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=1;
this.stk[this.ptr-3]=this.stk[this.ptr-3].subset(this.stk[this.ptr-2],this.stk[this.ptr-1]); this.ptr-=2;
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring || this.stk[this.ptr-2] instanceof BWIPJS.psarray)
this.stk[this.ptr-2]=this.stk[this.ptr-2].get(this.stk[this.ptr-1]);
else this.stk[this.ptr-2]=this.stk[this.ptr-2][this.stk[this.ptr-1].toString()];
this.ptr
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="enc";
var t=this.dstk.get("encs");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("indx");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring || this.stk[this.ptr-2] instanceof BWIPJS.psarray)
this.stk[this.ptr-2]=this.stk[this.ptr-2].get(this.stk[this.ptr-1]);
else this.stk[this.ptr-2]=this.stk[this.ptr-2][this.stk[this.ptr-1].toString()];
this.ptr
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
var t=this.dstk.get("sbs");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("i");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=6;
this.stk[this.ptr-2]=this.stk[this.ptr-2]*this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=6;
this.stk[this.ptr-2]=this.stk[this.ptr-2]+this.stk[this.ptr-1]; this.ptr
var t=this.dstk.get("enc");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr-3].assign(this.stk[this.ptr-2],this.stk[this.ptr-1]); this.ptr-=3;
var t=this.dstk.get("txt");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("i");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=Infinity;
var t=this.dstk.get("barcode");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("i");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=1;
this.stk[this.ptr-3]=this.stk[this.ptr-3].subset(this.stk[this.ptr-2],this.stk[this.ptr-1]); this.ptr-=2;
var t=this.dstk.get("xpos");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("textyoffset");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("textfont");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("textsize");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
for (var i = this.ptr-1; i >= 0 && this.stk[i] !== Infinity; i
if (i < 0) throw "array: underflow";
var t = this.stk.splice(i+1, this.ptr-1-i);
this.ptr = i;
this.stk[this.ptr++]=BWIPJS.psarray(t);
if (this.stk[this.ptr-3] instanceof BWIPJS.psstring || this.stk[this.ptr-3] instanceof BWIPJS.psarray)
this.stk[this.ptr-3].set(this.stk[this.ptr-2], this.stk[this.ptr-1]);
else this.stk[this.ptr-3][this.stk[this.ptr-2].toString()]=this.stk[this.ptr-1];
this.ptr-=3;
this.stk[this.ptr++]=0;
this.stk[this.ptr++]=1;
this.stk[this.ptr++]=5;
this.stk[this.ptr++]=$f23;
var t41=this.stk[--this.ptr];
var t39=this.stk[--this.ptr];
var t38=this.stk[--this.ptr];
var t37=this.stk[--this.ptr];
for (var t40=t37; t38<0 ? t40>=t39 : t40<=t39; t40+=t38) {
this.stk[this.ptr++]=t40;
if (t41.call(this)==-1) break;
}
}
function $f25(){
this.stk[this.ptr++]="xpos";
var t=this.stk[this.ptr-2]; this.stk[this.ptr-2]=this.stk[this.ptr-1]; this.stk[this.ptr-1]=t;
var t=this.dstk.get("enc");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.stk[this.ptr-2]; this.stk[this.ptr-2]=this.stk[this.ptr-1]; this.stk[this.ptr-1]=t;
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring || this.stk[this.ptr-2] instanceof BWIPJS.psarray)
this.stk[this.ptr-2]=this.stk[this.ptr-2].get(this.stk[this.ptr-1]);
else this.stk[this.ptr-2]=this.stk[this.ptr-2][this.stk[this.ptr-1].toString()];
this.ptr
this.stk[this.ptr++]=48;
this.stk[this.ptr-2]=this.stk[this.ptr-2]-this.stk[this.ptr-1]; this.ptr
var t=this.dstk.get("xpos");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr-2]=this.stk[this.ptr-2]+this.stk[this.ptr-1]; this.ptr
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
}
function $f26(){
var t=this.dstk.get("txt");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=Infinity;
var t=this.dstk.get("barchars");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("checksum1");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=1;
this.stk[this.ptr-3]=this.stk[this.ptr-3].subset(this.stk[this.ptr-2],this.stk[this.ptr-1]); this.ptr-=2;
var t=this.dstk.get("xpos");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("textyoffset");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("textfont");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("textsize");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
for (var i = this.ptr-1; i >= 0 && this.stk[i] !== Infinity; i
if (i < 0) throw "array: underflow";
var t = this.stk.splice(i+1, this.ptr-1-i);
this.ptr = i;
this.stk[this.ptr++]=BWIPJS.psarray(t);
if (this.stk[this.ptr-3] instanceof BWIPJS.psstring || this.stk[this.ptr-3] instanceof BWIPJS.psarray)
this.stk[this.ptr-3].set(this.stk[this.ptr-2], this.stk[this.ptr-1]);
else this.stk[this.ptr-3][this.stk[this.ptr-2].toString()]=this.stk[this.ptr-1];
this.ptr-=3;
this.stk[this.ptr++]="enc";
var t=this.dstk.get("encs");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("checksum1");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring || this.stk[this.ptr-2] instanceof BWIPJS.psarray)
this.stk[this.ptr-2]=this.stk[this.ptr-2].get(this.stk[this.ptr-1]);
else this.stk[this.ptr-2]=this.stk[this.ptr-2][this.stk[this.ptr-1].toString()];
this.ptr
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]=0;
this.stk[this.ptr++]=1;
this.stk[this.ptr++]=5;
this.stk[this.ptr++]=$f25;
var t51=this.stk[--this.ptr];
var t49=this.stk[--this.ptr];
var t48=this.stk[--this.ptr];
var t47=this.stk[--this.ptr];
for (var t50=t47; t48<0 ? t50>=t49 : t50<=t49; t50+=t48) {
this.stk[this.ptr++]=t50;
if (t51.call(this)==-1) break;
}
var t=this.dstk.get("txt");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=1;
this.stk[this.ptr-2]=this.stk[this.ptr-2]+this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=Infinity;
var t=this.dstk.get("barchars");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("checksum2");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=1;
this.stk[this.ptr-3]=this.stk[this.ptr-3].subset(this.stk[this.ptr-2],this.stk[this.ptr-1]); this.ptr-=2;
var t=this.dstk.get("xpos");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("textyoffset");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("textfont");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("textsize");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
for (var i = this.ptr-1; i >= 0 && this.stk[i] !== Infinity; i
if (i < 0) throw "array: underflow";
var t = this.stk.splice(i+1, this.ptr-1-i);
this.ptr = i;
this.stk[this.ptr++]=BWIPJS.psarray(t);
if (this.stk[this.ptr-3] instanceof BWIPJS.psstring || this.stk[this.ptr-3] instanceof BWIPJS.psarray)
this.stk[this.ptr-3].set(this.stk[this.ptr-2], this.stk[this.ptr-1]);
else this.stk[this.ptr-3][this.stk[this.ptr-2].toString()]=this.stk[this.ptr-1];
this.ptr-=3;
}
function $f27(){
var t=this.dstk.get("txt");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=Infinity;
this.stk[this.ptr++]=BWIPJS.psstring("");
var t=this.dstk.get("xpos");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("textyoffset");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("textfont");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("textsize");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
for (var i = this.ptr-1; i >= 0 && this.stk[i] !== Infinity; i
if (i < 0) throw "array: underflow";
var t = this.stk.splice(i+1, this.ptr-1-i);
this.ptr = i;
this.stk[this.ptr++]=BWIPJS.psarray(t);
if (this.stk[this.ptr-3] instanceof BWIPJS.psstring || this.stk[this.ptr-3] instanceof BWIPJS.psarray)
this.stk[this.ptr-3].set(this.stk[this.ptr-2], this.stk[this.ptr-1]);
else this.stk[this.ptr-3][this.stk[this.ptr-2].toString()]=this.stk[this.ptr-1];
this.ptr-=3;
var t=this.dstk.get("txt");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=1;
this.stk[this.ptr-2]=this.stk[this.ptr-2]+this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=Infinity;
this.stk[this.ptr++]=BWIPJS.psstring("");
var t=this.dstk.get("xpos");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("textyoffset");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("textfont");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("textsize");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
for (var i = this.ptr-1; i >= 0 && this.stk[i] !== Infinity; i
if (i < 0) throw "array: underflow";
var t = this.stk.splice(i+1, this.ptr-1-i);
this.ptr = i;
this.stk[this.ptr++]=BWIPJS.psarray(t);
if (this.stk[this.ptr-3] instanceof BWIPJS.psstring || this.stk[this.ptr-3] instanceof BWIPJS.psarray)
this.stk[this.ptr-3].set(this.stk[this.ptr-2], this.stk[this.ptr-1]);
else this.stk[this.ptr-3][this.stk[this.ptr-2].toString()]=this.stk[this.ptr-1];
this.ptr-=3;
}
function $f28(){
var t=this.dstk.get("sbs");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=6;
this.stk[this.ptr-2]=this.stk[this.ptr-2]*this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=6;
this.stk[this.ptr-2]=this.stk[this.ptr-2]+this.stk[this.ptr-1]; this.ptr
var t=this.dstk.get("encs");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("checksum1");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring || this.stk[this.ptr-2] instanceof BWIPJS.psarray)
this.stk[this.ptr-2]=this.stk[this.ptr-2].get(this.stk[this.ptr-1]);
else this.stk[this.ptr-2]=this.stk[this.ptr-2][this.stk[this.ptr-1].toString()];
this.ptr
this.stk[this.ptr-3].assign(this.stk[this.ptr-2],this.stk[this.ptr-1]); this.ptr-=3;
var t=this.dstk.get("sbs");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=6;
this.stk[this.ptr-2]=this.stk[this.ptr-2]*this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=12;
this.stk[this.ptr-2]=this.stk[this.ptr-2]+this.stk[this.ptr-1]; this.ptr
var t=this.dstk.get("encs");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("checksum2");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring || this.stk[this.ptr-2] instanceof BWIPJS.psarray)
this.stk[this.ptr-2]=this.stk[this.ptr-2].get(this.stk[this.ptr-1]);
else this.stk[this.ptr-2]=this.stk[this.ptr-2][this.stk[this.ptr-1].toString()];
this.ptr
this.stk[this.ptr-3].assign(this.stk[this.ptr-2],this.stk[this.ptr-1]); this.ptr-=3;
var t=this.dstk.get("includecheckintext");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=$f26;
this.stk[this.ptr++]=$f27;
var t52=this.stk[--this.ptr];
var t53=this.stk[--this.ptr];
if (this.stk[--this.ptr]) {
if (t53.call(this)==-1) return -1;
} else {
if (t52.call(this)==-1) return -1;
}
var t=this.dstk.get("sbs");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=6;
this.stk[this.ptr-2]=this.stk[this.ptr-2]*this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=18;
this.stk[this.ptr-2]=this.stk[this.ptr-2]+this.stk[this.ptr-1]; this.ptr
var t=this.dstk.get("encs");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=11;
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring || this.stk[this.ptr-2] instanceof BWIPJS.psarray)
this.stk[this.ptr-2]=this.stk[this.ptr-2].get(this.stk[this.ptr-1]);
else this.stk[this.ptr-2]=this.stk[this.ptr-2][this.stk[this.ptr-1].toString()];
this.ptr
this.stk[this.ptr-3].assign(this.stk[this.ptr-2],this.stk[this.ptr-1]); this.ptr-=3;
}
function $f29(){
var t=this.dstk.get("txt");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=Infinity;
var t=this.dstk.get("barchars");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("checksum1");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=1;
this.stk[this.ptr-3]=this.stk[this.ptr-3].subset(this.stk[this.ptr-2],this.stk[this.ptr-1]); this.ptr-=2;
var t=this.dstk.get("xpos");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("textyoffset");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("textfont");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("textsize");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
for (var i = this.ptr-1; i >= 0 && this.stk[i] !== Infinity; i
if (i < 0) throw "array: underflow";
var t = this.stk.splice(i+1, this.ptr-1-i);
this.ptr = i;
this.stk[this.ptr++]=BWIPJS.psarray(t);
if (this.stk[this.ptr-3] instanceof BWIPJS.psstring || this.stk[this.ptr-3] instanceof BWIPJS.psarray)
this.stk[this.ptr-3].set(this.stk[this.ptr-2], this.stk[this.ptr-1]);
else this.stk[this.ptr-3][this.stk[this.ptr-2].toString()]=this.stk[this.ptr-1];
this.ptr-=3;
}
function $f30(){
var t=this.dstk.get("txt");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=Infinity;
this.stk[this.ptr++]=BWIPJS.psstring("");
var t=this.dstk.get("xpos");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("textyoffset");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("textfont");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("textsize");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
for (var i = this.ptr-1; i >= 0 && this.stk[i] !== Infinity; i
if (i < 0) throw "array: underflow";
var t = this.stk.splice(i+1, this.ptr-1-i);
this.ptr = i;
this.stk[this.ptr++]=BWIPJS.psarray(t);
if (this.stk[this.ptr-3] instanceof BWIPJS.psstring || this.stk[this.ptr-3] instanceof BWIPJS.psarray)
this.stk[this.ptr-3].set(this.stk[this.ptr-2], this.stk[this.ptr-1]);
else this.stk[this.ptr-3][this.stk[this.ptr-2].toString()]=this.stk[this.ptr-1];
this.ptr-=3;
}
function $f31(){
var t=this.dstk.get("sbs");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=6;
this.stk[this.ptr-2]=this.stk[this.ptr-2]*this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=6;
this.stk[this.ptr-2]=this.stk[this.ptr-2]+this.stk[this.ptr-1]; this.ptr
var t=this.dstk.get("encs");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("checksum1");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring || this.stk[this.ptr-2] instanceof BWIPJS.psarray)
this.stk[this.ptr-2]=this.stk[this.ptr-2].get(this.stk[this.ptr-1]);
else this.stk[this.ptr-2]=this.stk[this.ptr-2][this.stk[this.ptr-1].toString()];
this.ptr
this.stk[this.ptr-3].assign(this.stk[this.ptr-2],this.stk[this.ptr-1]); this.ptr-=3;
var t=this.dstk.get("includecheckintext");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=$f29;
this.stk[this.ptr++]=$f30;
var t54=this.stk[--this.ptr];
var t55=this.stk[--this.ptr];
if (this.stk[--this.ptr]) {
if (t55.call(this)==-1) return -1;
} else {
if (t54.call(this)==-1) return -1;
}
var t=this.dstk.get("sbs");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=6;
this.stk[this.ptr-2]=this.stk[this.ptr-2]*this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=12;
this.stk[this.ptr-2]=this.stk[this.ptr-2]+this.stk[this.ptr-1]; this.ptr
var t=this.dstk.get("encs");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=11;
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring || this.stk[this.ptr-2] instanceof BWIPJS.psarray)
this.stk[this.ptr-2]=this.stk[this.ptr-2].get(this.stk[this.ptr-1]);
else this.stk[this.ptr-2]=this.stk[this.ptr-2][this.stk[this.ptr-1].toString()];
this.ptr
this.stk[this.ptr-3].assign(this.stk[this.ptr-2],this.stk[this.ptr-1]); this.ptr-=3;
}
function $f32(){
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=10;
this.stk[this.ptr-2]=this.stk[this.ptr-2]>=this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=$f28;
this.stk[this.ptr++]=$f31;
var t56=this.stk[--this.ptr];
var t57=this.stk[--this.ptr];
if (this.stk[--this.ptr]) {
if (t57.call(this)==-1) return -1;
} else {
if (t56.call(this)==-1) return -1;
}
}
function $f33(){
var t=this.dstk.get("sbs");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=6;
this.stk[this.ptr-2]=this.stk[this.ptr-2]*this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=6;
this.stk[this.ptr-2]=this.stk[this.ptr-2]+this.stk[this.ptr-1]; this.ptr
var t=this.dstk.get("encs");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=11;
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring || this.stk[this.ptr-2] instanceof BWIPJS.psarray)
this.stk[this.ptr-2]=this.stk[this.ptr-2].get(this.stk[this.ptr-1]);
else this.stk[this.ptr-2]=this.stk[this.ptr-2][this.stk[this.ptr-1].toString()];
this.ptr
this.stk[this.ptr-3].assign(this.stk[this.ptr-2],this.stk[this.ptr-1]); this.ptr-=3;
}
function $f34(){
this.stk[this.ptr++]=48;
this.stk[this.ptr-2]=this.stk[this.ptr-2]-this.stk[this.ptr-1]; this.ptr
}
function $f35(){
var t=this.dstk.get("height");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
}
function $f36(){
this.stk[this.ptr++]=0;
}
function $f37(){
this.stk[this.ptr++]="txt";
var t=this.dstk.get("txt");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
}
this.stk[this.ptr++]=20;
this.stk[this.ptr-1]={};
this.dict=this.stk[--this.ptr]; this.dstk.push(this.dict);
this.stk[this.ptr++]="options";
var t=this.stk[this.ptr-2]; this.stk[this.ptr-2]=this.stk[this.ptr-1]; this.stk[this.ptr-1]=t;
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="barcode";
var t=this.stk[this.ptr-2]; this.stk[this.ptr-2]=this.stk[this.ptr-1]; this.stk[this.ptr-1]=t;
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="dontdraw";
this.stk[this.ptr++]=false;
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="includecheck";
this.stk[this.ptr++]=false;
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="validatecheck";
this.stk[this.ptr++]=false;
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="includetext";
this.stk[this.ptr++]=false;
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="includecheckintext";
this.stk[this.ptr++]=false;
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="textfont";
this.stk[this.ptr++]="Courier";
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="textsize";
this.stk[this.ptr++]=10;
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="textyoffset";
this.stk[this.ptr++]=-8.5;
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="height";
this.stk[this.ptr++]=1;
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
var t=this.dstk.get("options");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr-1]=BWIPJS.pstype(this.stk[this.ptr-1]);
this.stk[this.ptr++]="stringtype";
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring)
this.stk[this.ptr-2]=this.stk[this.ptr-2].toString()==this.stk[this.ptr-1];
else this.stk[this.ptr-2]=this.stk[this.ptr-2]==this.stk[this.ptr-1];
this.ptr
this.stk[this.ptr++]=$f4;
var t4=this.stk[--this.ptr];
if (this.stk[--this.ptr]) {
if (t4.call(this)==-1) return -1;
}
var t=this.dstk.get("options");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=$f5;
var t7=this.stk[--this.ptr];
var t6=this.stk[--this.ptr];
for (t5 in t6) {
if (t6 instanceof BWIPJS.psstring || t6 instanceof BWIPJS.psarray) {
if (t5.charCodeAt(0) > 57) continue;
this.stk[this.ptr++]=t6.get(t5);
} else {
this.stk[this.ptr++]=t5;
this.stk[this.ptr++]=t6[t5];
}
if (t7.call(this)==-1) break;
}
this.stk[this.ptr++]="textfont";
var t=this.dstk.get("textfont");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="textsize";
var t=this.dstk.get("textsize");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr-1]=parseFloat(this.stk[this.ptr-1]);
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="textyoffset";
var t=this.dstk.get("textyoffset");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr-1]=parseFloat(this.stk[this.ptr-1]);
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="height";
var t=this.dstk.get("height");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr-1]=parseFloat(this.stk[this.ptr-1]);
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="encs";
this.stk[this.ptr++]=BWIPJS.psarray([BWIPJS.psstring("111131"),BWIPJS.psstring("311131"),BWIPJS.psstring("131131"),BWIPJS.psstring("331111"),BWIPJS.psstring("113131"),BWIPJS.psstring("313111"),BWIPJS.psstring("133111"),BWIPJS.psstring("111331"),BWIPJS.psstring("311311"),BWIPJS.psstring("311111"),BWIPJS.psstring("113111"),BWIPJS.psstring("113311")]);
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="barchars";
this.stk[this.ptr++]=BWIPJS.psstring("0123456789-");
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="charvals";
this.stk[this.ptr++]=11;
this.stk[this.ptr-1]={};
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]=0;
this.stk[this.ptr++]=1;
this.stk[this.ptr++]=10;
this.stk[this.ptr++]=$f6;
var t12=this.stk[--this.ptr];
var t10=this.stk[--this.ptr];
var t9=this.stk[--this.ptr];
var t8=this.stk[--this.ptr];
for (var t11=t8; t9<0 ? t11>=t10 : t11<=t10; t11+=t9) {
this.stk[this.ptr++]=t11;
if (t12.call(this)==-1) break;
}
this.stk[this.ptr++]=0;
this.stk[this.ptr++]=1;
var t=this.dstk.get("barcode");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
if (typeof(this.stk[this.ptr-1].length)!=="number") throw "length: invalid: " + BWIPJS.pstype(this.stk[this.ptr-1]);
this.stk[this.ptr-1]=this.stk[this.ptr-1].length;
this.stk[this.ptr++]=1;
this.stk[this.ptr-2]=this.stk[this.ptr-2]-this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=$f8;
var t18=this.stk[--this.ptr];
var t16=this.stk[--this.ptr];
var t15=this.stk[--this.ptr];
var t14=this.stk[--this.ptr];
for (var t17=t14; t15<0 ? t17>=t16 : t17<=t16; t17+=t15) {
this.stk[this.ptr++]=t17;
if (t18.call(this)==-1) break;
}
this.stk[this.ptr++]="barlen";
var t=this.dstk.get("barcode");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
if (typeof(this.stk[this.ptr-1].length)!=="number") throw "length: invalid: " + BWIPJS.pstype(this.stk[this.ptr-1]);
this.stk[this.ptr-1]=this.stk[this.ptr-1].length;
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
var t=this.dstk.get("validatecheck");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=$f12;
var t22=this.stk[--this.ptr];
if (this.stk[--this.ptr]) {
if (t22.call(this)==-1) return -1;
}
this.stk[this.ptr++]="numchecks";
var t=this.dstk.get("includecheck");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("validatecheck");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
if (typeof(this.stk[this.ptr-1])=="boolean") this.stk[this.ptr-2]=this.stk[this.ptr-2]||this.stk[this.ptr-1];
else this.stk[this.ptr-2]=this.stk[this.ptr-2]|this.stk[this.ptr-1];
this.ptr
this.stk[this.ptr++]=$f15;
this.stk[this.ptr++]=$f16;
var t25=this.stk[--this.ptr];
var t26=this.stk[--this.ptr];
if (this.stk[--this.ptr]) {
if (t26.call(this)==-1) return -1;
} else {
if (t25.call(this)==-1) return -1;
}
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="checksum1";
this.stk[this.ptr++]=0;
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="checksum2";
this.stk[this.ptr++]=0;
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]=0;
this.stk[this.ptr++]=1;
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=1;
this.stk[this.ptr-2]=this.stk[this.ptr-2]-this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=$f17;
var t31=this.stk[--this.ptr];
var t29=this.stk[--this.ptr];
var t28=this.stk[--this.ptr];
var t27=this.stk[--this.ptr];
for (var t30=t27; t28<0 ? t30>=t29 : t30<=t29; t30+=t28) {
this.stk[this.ptr++]=t30;
if (t31.call(this)==-1) break;
}
this.stk[this.ptr++]="checksum1";
var t=this.dstk.get("checksum1");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=11;
this.stk[this.ptr-2]=this.stk[this.ptr-2]%this.stk[this.ptr-1]; this.ptr
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="checksum2";
var t=this.dstk.get("checksum2");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("checksum1");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr-2]=this.stk[this.ptr-2]+this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=11;
this.stk[this.ptr-2]=this.stk[this.ptr-2]%this.stk[this.ptr-1]; this.ptr
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
var t=this.dstk.get("validatecheck");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=$f22;
var t36=this.stk[--this.ptr];
if (this.stk[--this.ptr]) {
if (t36.call(this)==-1) return -1;
}
this.stk[this.ptr++]="sbs";
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("numchecks");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr-2]=this.stk[this.ptr-2]+this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=6;
this.stk[this.ptr-2]=this.stk[this.ptr-2]*this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=12;
this.stk[this.ptr-2]=this.stk[this.ptr-2]+this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr-1]=BWIPJS.psstring(this.stk[this.ptr-1]);
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]="txt";
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t=this.dstk.get("numchecks");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr-2]=this.stk[this.ptr-2]+this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr-1]=BWIPJS.psarray(this.stk[this.ptr-1]);
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
var t=this.dstk.get("sbs");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=0;
var t=this.dstk.get("encs");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=11;
if (this.stk[this.ptr-2] instanceof BWIPJS.psstring || this.stk[this.ptr-2] instanceof BWIPJS.psarray)
this.stk[this.ptr-2]=this.stk[this.ptr-2].get(this.stk[this.ptr-1]);
else this.stk[this.ptr-2]=this.stk[this.ptr-2][this.stk[this.ptr-1].toString()];
this.ptr
this.stk[this.ptr-3].assign(this.stk[this.ptr-2],this.stk[this.ptr-1]); this.ptr-=3;
this.stk[this.ptr++]="xpos";
this.stk[this.ptr++]=8;
this.dict[this.stk[this.ptr-2]]=this.stk[this.ptr-1]; this.ptr-=2;
this.stk[this.ptr++]=0;
this.stk[this.ptr++]=1;
var t=this.dstk.get("barlen");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=1;
this.stk[this.ptr-2]=this.stk[this.ptr-2]-this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=$f24;
var t46=this.stk[--this.ptr];
var t44=this.stk[--this.ptr];
var t43=this.stk[--this.ptr];
var t42=this.stk[--this.ptr];
for (var t45=t42; t43<0 ? t45>=t44 : t45<=t44; t45+=t43) {
this.stk[this.ptr++]=t45;
if (t46.call(this)==-1) break;
}
var t=this.dstk.get("includecheck");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=$f32;
this.stk[this.ptr++]=$f33;
var t58=this.stk[--this.ptr];
var t59=this.stk[--this.ptr];
if (this.stk[--this.ptr]) {
if (t59.call(this)==-1) return -1;
} else {
if (t58.call(this)==-1) return -1;
}
this.stk[this.ptr++]=Infinity;
this.stk[this.ptr++]="ren";
var t=this.dstk.get("renlinear");
this.stk[this.ptr++]=t;
this.stk[this.ptr++]="sbs";
this.stk[this.ptr++]=Infinity;
var t=this.dstk.get("sbs");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=$f34;
var t62=this.stk[--this.ptr];
var t61=this.stk[--this.ptr];
for (t60 in t61) {
if (t61 instanceof BWIPJS.psstring || t61 instanceof BWIPJS.psarray) {
if (t60.charCodeAt(0) > 57) continue;
this.stk[this.ptr++]=t61.get(t60);
} else {
this.stk[this.ptr++]=t60;
this.stk[this.ptr++]=t61[t60];
}
if (t62.call(this)==-1) break;
}
for (var i = this.ptr-1; i >= 0 && this.stk[i] !== Infinity; i
if (i < 0) throw "array: underflow";
var t = this.stk.splice(i+1, this.ptr-1-i);
this.ptr = i;
this.stk[this.ptr++]=BWIPJS.psarray(t);
this.stk[this.ptr++]="bhs";
this.stk[this.ptr++]=Infinity;
var t=this.dstk.get("sbs");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
if (typeof(this.stk[this.ptr-1].length)!=="number") throw "length: invalid: " + BWIPJS.pstype(this.stk[this.ptr-1]);
this.stk[this.ptr-1]=this.stk[this.ptr-1].length;
this.stk[this.ptr++]=1;
this.stk[this.ptr-2]=this.stk[this.ptr-2]+this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=2;
this.stk[this.ptr-2]=Math.floor(this.stk[this.ptr-2]/this.stk[this.ptr-1]); this.ptr
this.stk[this.ptr++]=$f35;
var t65=this.stk[--this.ptr];
var t63=this.stk[--this.ptr];
for (var t64=0; t64<t63; t64++) {
if (t65.call(this)==-1) break;
}
for (var i = this.ptr-1; i >= 0 && this.stk[i] !== Infinity; i
if (i < 0) throw "array: underflow";
var t = this.stk.splice(i+1, this.ptr-1-i);
this.ptr = i;
this.stk[this.ptr++]=BWIPJS.psarray(t);
this.stk[this.ptr++]="bbs";
this.stk[this.ptr++]=Infinity;
var t=this.dstk.get("sbs");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
if (typeof(this.stk[this.ptr-1].length)!=="number") throw "length: invalid: " + BWIPJS.pstype(this.stk[this.ptr-1]);
this.stk[this.ptr-1]=this.stk[this.ptr-1].length;
this.stk[this.ptr++]=1;
this.stk[this.ptr-2]=this.stk[this.ptr-2]+this.stk[this.ptr-1]; this.ptr
this.stk[this.ptr++]=2;
this.stk[this.ptr-2]=Math.floor(this.stk[this.ptr-2]/this.stk[this.ptr-1]); this.ptr
this.stk[this.ptr++]=$f36;
var t68=this.stk[--this.ptr];
var t66=this.stk[--this.ptr];
for (var t67=0; t67<t66; t67++) {
if (t68.call(this)==-1) break;
}
for (var i = this.ptr-1; i >= 0 && this.stk[i] !== Infinity; i
if (i < 0) throw "array: underflow";
var t = this.stk.splice(i+1, this.ptr-1-i);
this.ptr = i;
this.stk[this.ptr++]=BWIPJS.psarray(t);
var t=this.dstk.get("includetext");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
this.stk[this.ptr++]=$f37;
var t69=this.stk[--this.ptr];
if (this.stk[--this.ptr]) {
if (t69.call(this)==-1) return -1;
}
this.stk[this.ptr++]="opt";
var t=this.dstk.get("options");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
var t = {};
for (var i = this.ptr-1; i >= 1 && this.stk[i] !== Infinity; i-=2) {
if (this.stk[i-1] === Infinity) throw "dict: malformed stack";
t[this.stk[i-1]]=this.stk[i];
}
if (i < 0 || this.stk[i]!==Infinity) throw "dict: underflow";
this.ptr = i;
this.stk[this.ptr++]=t;
var t=this.dstk.get("dontdraw");
if (t instanceof Function) t.call(this); else this.stk[this.ptr++]=t;
if (typeof(this.stk[this.ptr-1])=="boolean") this.stk[this.ptr-1]=!this.stk[this.ptr-1];
else this.stk[this.ptr-1]=~this.stk[this.ptr-1];
var t=this.dstk.get("renlinear");
this.stk[this.ptr++]=t;
var t70=this.stk[--this.ptr];
if (this.stk[--this.ptr]) {
if (t70.call(this)==-1) return -1;
}
this.dstk.pop(); this.dict=this.dstk[this.dstk.length-1];
psstptr = this.ptr;
}
BWIPJS.decrefs("code11");
// END OF code11 |
#ifndef <API key>
#define <API key>
static const char *grammars =
"
"# Meta settings\n"
"
":desc ::= 'Strict JSON Grammar'\n"
":default ::= action => ::shift fallback-encoding => UTF-8 discard-is-fallback => 1\n"
"\n"
"
"# Discard unsignificant whitespaces, Perl comment C++ comment\n"
"
":discard ::= /[\\x{9}\\x{A}\\x{D}\\x{20}]+|#[^\\n]*|\\/\\/[^\\n]*|\\/\\*(?:(?:[^\\*]+|\\*(?!\\/))*)\\*\\//u\n"
"\n"
"
"
"# Terminal events\n"
"
":symbol ::= '\"' pause => after event => :discard[switch]\n"
"\n"
"
"# JSON value\n"
"
"value ::= object\n"
" | array\n"
" | string\n"
" | constant\n"
" | number\n"
"\n"
"
"# Separator\n"
"
"comma ::= ','\n"
"commas ::= comma+\n"
"
"# JSON object\n"
"
"object ::= (-'{'-) members (-'}'-)\n"
"members ::= member* action => ::lua->members\n"
" separator => commas\n"
" proper => 0\n"
" hide-separator => 1\n"
"member ::= string (-':'-) value action => ::row\n"
"\n"
"
"# JSON Array\n"
"
"array ::= (-'['-) elements (-']'-)\n"
"elements ::= value* action => ::row\n"
" separator => commas\n"
" proper => 0\n"
" hide-separator => 1\n"
"\n"
"
"# JSON String\n"
"
"string ::= (-'\"'-) string_parts (-'\"'-)\n"
"string_parts ::= string_part* action => ::concat\n"
"string_part ::= string_ascii_part\n"
" | string_escape_part \n"
" | string_unicode_part \n"
"string_ascii_part ::= /[^\"\\\\]+/u\n"
"string_escape_part ::= /(?:\\\\[\"\\\\\\/bfnrt])+/u action => ::lua->string_escape_part\n"
"string_unicode_part ::= /(?:\\\\u[[:xdigit:]]{4})+/u action => ::lua->string_unicode_part\n"
"\n"
"\n"
"
"# JSON constant\n"
"
"constant ::= 'true':i action => ::true\n"
" | 'false':i action => ::false\n"
" | 'null':i action => ::undef\n"
" \n"
"\n"
"
"# JSON number\n"
"
"number ::= /(?:[+-]?(?:[0-9]+)(?:\\.[0-9]+)?(?:E[+-]?[0-9]+)?)|(?:\\+?Inf(?:inity)?)|(?:-?Inf(?:inity)?)|(?:\\+?NaN)|(?:-?NaN)/i action => ::lua->number\n"
"\n"
"<luascript>\n"
"local NAN = 0.0 / 0.0\n"
"local NINF = -math.huge\n"
"local PINF = math.huge\n"
"function members(...)\n"
" local output = niledtablekv()\n"
" if arg ~= nil then\n"
" for n=1,select('#',...) do\n"
" local member = select(n, ...)\n"
" output[member[1]] = member[2]\n"
" end\n"
" end\n"
" return output\n"
"end\n"
"\n"
"function string_escape_part(input)\n"
" local c = input:sub(2, 2) -- get second character\n"
" if c == '\"' then return c\n"
" elseif c == '\\\\' then return c\n"
" elseif c == '/' then return c\n"
" elseif c == 'b' then return '\\b'\n"
" elseif c == 'f' then return '\\f'\n"
" elseif c == 'n' then return '\\n'\n"
" elseif c == 'r' then return '\\r'\n"
" elseif c == 't' then return '\\t'\n"
" else error('Unsupported escaped character '..c)\n"
" end\n"
"end\n"
"\n"
"function string_unicode_part(input)\n"
" local stringtable = {}\n"
" local uint32 = {}\n"
" local p = 1\n"
" local pmax = input:len()\n"
" while p <= pmax do\n"
" local u = input:sub(p+2, p + 5)\n"
" uint32[#uint32+1] = tonumber('0x'..u)\n"
" p = p + 6\n"
" end\n"
" local j = 2\n"
" for i = 1, #uint32 do\n"
" local u = uint32[i]\n"
" if ((j <= #uint32) and (u >= 0xD800) and (u <= 0xDBFF) and (uint32[j] >= 0xDC00) and (uint32[j] <= 0xDFFF)) then\n"
" -- Surrogate UTF-16 pair\n"
" u = 0x10000 + ((u & 0x3FF) << 10) + (uint32[j] & 0x3FF)\n"
" i = i + 1\n"
" j = j + 1\n"
" end\n"
" if ((u >= 0xD800) and (u <= 0xDFFF)) then\n"
" u = 0xFFFD -- Replacement character\n"
" end\n"
" c = utf8.char(u)\n"
" stringtable[#stringtable + 1] = c\n"
" end\n"
" return table.concat(stringtable)\n"
"end\n"
"function number(input)\n"
" local neg = false\n"
" local c = input:sub(1, 1) -- get first character\n"
" if c == '-' then\n"
" neg = true\n"
" c = input:sub(2, 2) -- get second character\n"
" end\n"
" if c == 'i' or c == 'I' then\n"
" if neg then\n"
" output = NINF\n"
" else\n"
" output = PINF\n"
" end\n"
" elseif c == 'n' or c == 'N' then output = NAN\n"
" else output = tonumber(input)\n"
" end\n"
" return output\n"
"end\n"
"\n"
"</luascript>\n"
;
#endif /* <API key> */ |
__history = [{"date":"Mon, 06 Jul 2015 01:38:05 GMT","sloc":91,"lloc":51,"functions":6,"deliveredBugs":0.5510202611869238,"maintainability":65.8369760038691,"lintErrors":[],"difficulty":12.727272727272727}] |
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Twilio Contact Center: Administration</title>
<link rel="stylesheet" href="/styles/bootstrap.min.css" type="text/css" />
<link rel="stylesheet" href="/styles/default.css" type="text/css" />
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css"
type="text/css" rel="stylesheet" />
</head>
<body ng-app="<API key>" ng-controller="<API key>">
<div ng-show="UI.warning" class="panel panel-default ui-warning" ng-cloak>{{UI.warning | json}}</div>
<div class="container" style="width:900px">
<section class="row" ng-init="init()" ng-cloak>
<h2 class="page-header">Twilio Contact Center: Administration<a href="/" class="header-home-link">Back Home</a></h2>
<ul class="nav nav-tabs">
<li role="presentation" ng-click="showTab('agents')" ng-class="{active: UI.tab == 'agents'}"><a href="#">Call Agents</a></li>
<li role="presentation" ng-click="showTab('ivr')" ng-class="{active: UI.tab == 'ivr'}"><a href="#">IVR Menu</a></li>
</ul>
<div class="tab-content">
<div class="tab-pane" ng-class="{active: UI.tab == 'agents'}" id="home" style="margin-bottom:10px">
<table class="table table-striped table-hover" style="width:100%">
<thead>
<tr >
<th>Name</th>
<th>Status</th>
<th>Channel(s)</th>
<th>Team</th>
<th> </th>
</tr>
</thead>
<tbody>
<tr ng-repeat="worker in workers track by worker.sid">
<td>{{worker.friendlyName}}</td>
<td>{{worker.activityName}}</td>
<td>{{worker.attributes.channels | ChannelListFilter:channels}}</td>
<td>{{worker.attributes.team | TeamName:configuration}}</td>
<td style="text-align:right"><button class="btn btn-danger btn-xs" ng-click="deleteAgent(worker)" ng-show="worker.activityName == 'Offline'">remove</button></td>
</tr>
</tbody>
</table>
<button style="margin-left:8px" class="btn btn-primary" ng-show="!UI.showForm" ng-click="showAgentForm()">Create Agent</button>
<div ng-show="UI.showForm" class="panel panel-default" style="margin-bottom:0px; margin-left:10px; margin-right:10px">
<div class="panel-heading">Create Agent</div>
<div class="panel-body">
<form name="agentForm" class="form-inline">
<div class="form-group">
<label><b>Name </b></label>
<input ng-model="agent.friendlyName" name="friendlyName" type="text" class="form-control" client-name required>
</div>
<div class="form-group">
<label class="checkbox-inline" ng-repeat="channel in channels" style="margin-right: 5px">
<input type="checkbox" checklist-model="agent.channels" checklist-value="channel.id">{{channel.friendlyName}}
</label>
</div>
<div class="btn-group">
<label class="checkbox-inline"><b>Team </b></label>
<select ng-model="agent.team" class="form-control" required>
<option ng-repeat="option in configuration.ivr.options" value="{{option.id}}">{{option.friendlyName}}</option>
</select>
</div>
<button style="margin-left:10px" class="btn btn-primary" ng-disabled="agentForm.$invalid || agentForm.$pristine || UI.isSaving" ng-click="createAgent()"><span style="margin-right: 10px;" ng-show="UI.isSaving == true"><i class="fa fa-refresh fa-spin"></i></span>Save</button>
<div class="alert alert-danger" style="margin-top:10px; margin-bottom:0px" role="alert" ng-show="agentForm.friendlyName.$error.invalidCharacter">Name must be an alphanumeric string</div>
</form>
</div>
</div>
</div>
<div class="tab-pane" ng-class="{active: UI.tab == 'ivr'}" id="profile">
<div style="padding:8px">
<h4>Text-to-Speech</h4>
<form name="ivrForm" >
<textarea class="form-control" rows="5" name="text" ng-model="configuration.ivr.text" style="resize:none" required></textarea>
<div class="panel panel-default" style="margin-top:10px">
<div class="panel-heading">Teams</div>
<ul class="list-group">
<li ng-repeat="option in configuration.ivr.options track by $index" class="list-group-item">
<div class="form-inline">
<div class="form-group">
<input ng-model="option.friendlyName" class="form-control" name="friendlyName" /> </div>
<div class="form-group">
<label>IVR Option </label>
<select ng-model="option.digit" class="form-control" convert-to-number>
<option value="1" ng-selected="option.digit == 1">1</option>
<option value="2" ng-selected="option.digit == 2">2</option>
<option value="3" ng-selected="option.digit == 3">3</option>
<option value="4" ng-selected="option.digit == 4">4</option>
<option value="5" ng-selected="option.digit == 5">5</option>
</select>
</div>
<button class="btn btn-danger" ng-click="removeIvrOption(option, $index)">delete</button>
</div>
</li>
<li class="list-group-item">
<button class="btn btn-default" ng-click="createIvrOption()">add</button>
</li>
</ul>
</div>
<button ng-disabled="ivrForm.$invalid || UI.isSaving" class="btn btn-primary" ng-click="saveIvr()"><span style="margin-right: 10px;" ng-show="UI.isSaving == true"><i class="fa fa-refresh fa-spin"></i></span>Save IVR</button>
</form>
</div>
</div>
</div>
</section>
</div>
<script src="/scripts/angular.min.js"></script>
<script src="/scripts/checklist-model.js"></script>
<script src="/scripts/directives/ClientNameDirective.js"></script>
<script src="/scripts/directives/<API key>.js"></script>
<script src="<API key>.js"></script>
<script src="/scripts/directives/TeamNameFilter.js"></script>
<script src="/scripts/directives/ChannelListFilter.js"></script>
</body>
</html> |
## (Skill and salary levels)
* ,Webapp
* , ,
* , , ,
*
* ,
* , HTML/css/javascript
* Angular, Bootstrap, Jquery, Vue.js
* ,
* ,
* , ,
* ,,
* ,
* Node.Js, Fis3/Gulp/Grunt
* web,
* Github,
level and salary
level|name|salary
|
|T1||4-6k/|
|T2||7-10k/|
|T3||11-20k/|
|T4||20-50k/|
|T5||
* Github,
* , github star100
* webappserver,
* ,
* HTML/css/javascript
* ****
* ,
* , HTML/css/javascript
* **Angular, Bootstrap, Jquery, Vue.js, react **
* ,Webapp
* ,,
*
* , ,
* , , ,
* ,,
*
* ,
* **, **
* **Node.Js, Gulp/webpack/shell **
*
*
* **Node.Js, nodewebrestful API**
* **, , **
* **, , **
* ****
*
* ,,
* |
import React from 'react';
import ReactDOM from 'react-dom';
import <API key> from '<API key>';
import Recommendation from './components/Recommendation.jsx';
import '../../../scss/index.scss';
// Needed for onTouchTap
<API key>();
ReactDOM.render(<Recommendation />, document.getElementById('recommendation')); |
Meteor.publish('<API key>', function (namespace) {
check(namespace, String);
return BrewCount.find({
namespace: namespace
});
});
Meteor.publish('<API key>', function (namespaces) {
check(namespaces, [String]);
return BrewCount.find({
namespace: {
$in: namespaces
}
});
}); |
<?php
namespace Spatie\Varnish\Middleware;
use Closure;
class CacheWithVarnish
{
public function handle($request, Closure $next, int $cacheTimeInMinutes = null)
{
$response = $next($request);
return $response->withHeaders([
config('varnish.<API key>') => '1',
'Cache-Control' => 'public, s-maxage='. 60 * ($cacheTimeInMinutes ?? config('varnish.<API key>')),
]);
}
} |
#import "UIViewController.h"
@class <API key>, NSString, UIPopoverController, _UIAsyncInvocation;
@interface <API key> : UIViewController
{
_UIAsyncInvocation *_cancelRequest;
id _modalContext;
<API key> *<API key>;
_Bool <API key>;
_Bool _showsCloudItems;
UIPopoverController *_containingPopover;
unsigned long long _mediaTypes;
id <<API key>> _delegate;
NSString *_prompt;
}
+ (void)preheatMediaPicker;
@property(copy, nonatomic) NSString *prompt; // @synthesize prompt=_prompt;
@property(nonatomic) __weak id <<API key>> delegate; // @synthesize delegate=_delegate;
@property(readonly, nonatomic) unsigned long long mediaTypes; // @synthesize mediaTypes=_mediaTypes;
- (void).cxx_destruct;
- (id)<API key>;
- (void)<API key>;
- (void)<API key>;
- (void)<API key>;
- (void)_forceDismissal;
- (void)_pickerDidPickItems:(id)arg1;
- (void)_pickerDidCancel;
- (_Bool)_hasAddedRemoteView;
- (void)_addRemoteView;
@property(nonatomic) _Bool showsCloudItems;
@property(nonatomic) _Bool <API key>;
- (void)<API key>;
- (void)<API key>:(id)arg1;
- (void)viewWillDisappear:(_Bool)arg1;
- (void)viewWillAppear:(_Bool)arg1;
- (void)viewDidAppear:(_Bool)arg1;
- (void)loadView;
- (void)<API key>:(id)arg1;
- (void)dealloc;
- (id)initWithMediaTypes:(unsigned long long)arg1;
- (id)init;
@end |
exports = module.exports = function(db, settings, logger) {
return function connection(done) {
var config = settings.get('opentsdb') || {};
if (!config.host) { throw new Error('Invalid configuration of OpenTSDB: missing host'); }
config.port = config.port || 4242;
db.on('connect', function() {
logger.debug('Connected to OpenTSDB %s:%d', config.host, config.port);
return done();
});
db.on('close', function(error) {
logger.error('OpenTSDB connection closed');
process.exit(-1);
});
db.on('error', function(error) {
logger.error('Unexpected error from OpenTSDB: %s', error.message);
logger.error(error.stack);
throw error;
});
logger.info('Connecting to OpenTSDB %s:%d', config.host, config.port);
db.connect(config.port, config.host);
}
};
exports['@singleton'] = true;
exports['@require'] = ['../database', 'settings', 'logger']; |
<!DOCTYPE html>
<HTML><head><TITLE>Manpage of IPC</TITLE>
<meta charset="utf-8">
<link rel="stylesheet" href="/css/main.css" type="text/css">
</head>
<body>
<header class="site-header">
<div class="wrap"> <div class="site-title"><a href="/manpages/index.html">linux manpages</a></div>
<div class="site-description">{"type":"documentation"}</div>
</div>
</header>
<div class="page-content"><div class="wrap">
<H1>IPC</H1>
Section: Linux Programmer's Manual (2)<BR>Updated: 2007-06-28<BR><A HREF="#index">Index</A>
<A HREF="/manpages/index.html">Return to Main Contents</A><HR>
<A NAME="lbAB"> </A>
<H2>NAME</H2>
ipc - System V IPC system calls
<A NAME="lbAC"> </A>
<H2>SYNOPSIS</H2>
<PRE>
<B>int ipc(unsigned int </B><I>call</I><B>, int </B><I>first</I><B>, int </B><I>second</I><B>, int </B><I>third</I><B>,</B>
<B> void *</B><I>ptr</I><B>, long </B><I>fifth</I><B>);</B>
</PRE>
<A NAME="lbAD"> </A>
<H2>DESCRIPTION</H2>
<B>ipc</B>()
is a common kernel entry point for the System V IPC calls
for messages, semaphores, and shared memory.
<I>call</I>
determines which IPC function to invoke;
the other arguments are passed through to the appropriate call.
<P>
User programs should call the appropriate functions by their usual names.
Only standard library implementors and kernel hackers need to know about
<B>ipc</B>().
<A NAME="lbAE"> </A>
<H2>CONFORMING TO</H2>
<B>ipc</B>()
is Linux-specific, and should not be used in programs
intended to be portable.
<A NAME="lbAF"> </A>
<H2>NOTES</H2>
On a few architectures, for example ia64, there is no
<B>ipc</B>()
system call; instead
<B><A HREF="/manpages/index.html?2+msgctl">msgctl</A></B>(2),
<B><A HREF="/manpages/index.html?2+semctl">semctl</A></B>(2),
<B><A HREF="/manpages/index.html?2+shmctl">shmctl</A></B>(2),
and so on really are implemented as separate system calls.
<A NAME="lbAG"> </A>
<H2>SEE ALSO</H2>
<B><A HREF="/manpages/index.html?2+msgctl">msgctl</A></B>(2),
<B><A HREF="/manpages/index.html?2+msgget">msgget</A></B>(2),
<B><A HREF="/manpages/index.html?2+msgrcv">msgrcv</A></B>(2),
<B><A HREF="/manpages/index.html?2+msgsnd">msgsnd</A></B>(2),
<B><A HREF="/manpages/index.html?2+semctl">semctl</A></B>(2),
<B><A HREF="/manpages/index.html?2+semget">semget</A></B>(2),
<B><A HREF="/manpages/index.html?2+semop">semop</A></B>(2),
<B><A HREF="/manpages/index.html?2+semtimedop">semtimedop</A></B>(2),
<B><A HREF="/manpages/index.html?2+shmat">shmat</A></B>(2),
<B><A HREF="/manpages/index.html?2+shmctl">shmctl</A></B>(2),
<B><A HREF="/manpages/index.html?2+shmdt">shmdt</A></B>(2),
<B><A HREF="/manpages/index.html?2+shmget">shmget</A></B>(2)
<A NAME="lbAH"> </A>
<H2>COLOPHON</H2>
This page is part of release 3.22 of the Linux
<I>man-pages</I>
project.
A description of the project,
and information about reporting bugs,
can be found at
<A HREF="http:
<P>
<HR>
<A NAME="index"> </A><H2>Index</H2>
<DL>
<DT><A HREF="#lbAB">NAME</A><DD>
<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT><A HREF="#lbAE">CONFORMING TO</A><DD>
<DT><A HREF="#lbAF">NOTES</A><DD>
<DT><A HREF="#lbAG">SEE ALSO</A><DD>
<DT><A HREF="#lbAH">COLOPHON</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/manpages/index.html">man2html</A>,
using the manual pages.<BR>
Time: 05:33:04 GMT, December 24, 2015
</div></div>
</body>
</HTML> |
from toee import *
import tpactions
def GetActionName():
return "Divine Spell Power"
def <API key>():
return D20ADF_None
def <API key>():
return D20TC_Target0
def GetActionCostType():
return D20ACT_NULL
def AddToSequence(d20action, action_seq, tb_status):
action_seq.add_action(d20action)
return AEC_OK |
"use strict"
const messages = require("..").messages
const ruleName = require("..").ruleName
const rules = require("../../../rules")
const rule = rules[ruleName]
testRule(rule, {
ruleName,
config: ["always"],
accept: [ {
code: "@media ( max-width: 300px ) {}",
}, {
code: "@mEdIa ( max-width: 300px ) {}",
}, {
code: "@MEDIA ( max-width: 300px ) {}",
}, {
code: "@media screen and ( color ), projection and ( color ) {}",
}, {
code: "@media ( grid ) and ( max-width: 15em ) {}",
}, {
code: "@media ( max-width: /*comment*/ ) {}",
} ],
reject: [ {
code: "@media (max-width: 300px ) {}",
message: messages.expectedOpening,
line: 1,
column: 9,
}, {
code: "@mEdIa (max-width: 300px ) {}",
message: messages.expectedOpening,
line: 1,
column: 9,
}, {
code: "@MEDIA (max-width: /*comment*/ ) {}",
message: messages.expectedOpening,
line: 1,
column: 9,
}, {
code: "@MEDIA (max-width: 300px ) {}",
message: messages.expectedOpening,
line: 1,
column: 9,
}, {
code: "@media ( max-width: 300px) {}",
message: messages.expectedClosing,
line: 1,
column: 25,
}, {
code: "@media ( max-width: /*comment*/) {}",
message: messages.expectedClosing,
line: 1,
column: 31,
}, {
code: "@media screen and (color ), projection and ( color ) {}",
message: messages.expectedOpening,
line: 1,
column: 20,
}, {
code: "@media screen and ( color), projection and ( color ) {}",
message: messages.expectedClosing,
line: 1,
column: 25,
}, {
code: "@media screen and ( color ), projection and (color ) {}",
message: messages.expectedOpening,
line: 1,
column: 46,
}, {
code: "@media screen and ( color ), projection and ( color) {}",
message: messages.expectedClosing,
line: 1,
column: 51,
}, {
code: "@media ( grid ) and (max-width: 15em ) {}",
message: messages.expectedOpening,
line: 1,
column: 22,
} ],
})
testRule(rule, {
ruleName,
config: ["never"],
accept: [ {
code: "@media (max-width: 300px) {}",
}, {
code: "@mEdIa (max-width: 300px) {}",
}, {
code: "@MEDIA (max-width: 300px) {}",
}, {
code: "@MEDIA (max-width: /*comment*/) {}",
}, {
code: "@media screen and (color), projection and (color) {}",
}, {
code: "@media (grid) and (max-width: 15em) {}",
} ],
reject: [ {
code: "@media (max-width: 300px ) {}",
message: messages.rejectedClosing,
line: 1,
column: 25,
}, {
code: "@mEdIa (max-width: 300px ) {}",
message: messages.rejectedClosing,
line: 1,
column: 25,
}, {
code: "@MEDIA (max-width: /*comment*/ ) {}",
message: messages.rejectedClosing,
line: 1,
column: 31,
}, {
code: "@MEDIA (max-width: 300px ) {}",
message: messages.rejectedClosing,
line: 1,
column: 25,
}, {
code: "@media ( max-width: 300px) {}",
message: messages.rejectedOpening,
line: 1,
column: 9,
}, {
code: "@media ( max-width: /*comment*/) {}",
message: messages.rejectedOpening,
line: 1,
column: 9,
}, {
code: "@media screen and (color ), projection and (color) {}",
message: messages.rejectedClosing,
line: 1,
column: 25,
}, {
code: "@media screen and ( color), projection and (color) {}",
message: messages.rejectedOpening,
line: 1,
column: 20,
}, {
code: "@media screen and (color), projection and (color ) {}",
message: messages.rejectedClosing,
line: 1,
column: 49,
}, {
code: "@media screen and (color), projection and ( color) {}",
message: messages.rejectedOpening,
line: 1,
column: 44,
}, {
code: "@media (grid) and (max-width: 15em ) {}",
message: messages.rejectedClosing,
line: 1,
column: 35,
} ],
}) |
module ApplicationHelper
def dat_markdown(text)
options = {
:autolink => true,
:space_after_headers => true,
:no_intra_emphasis => true
}
markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, options)
markdown.render(text).html_safe
end
end |
require 'resourceful'
require 'redis'
require 'json'
require 'digest/md5'
require 'hitimes'
require 'uuidtools'
module Resourceful
class RedisCacheManager
attr_reader :db
def initialize(options)
@logger = options[:logger]
@db = Redis.new(options)
end
def lookup(request)
response = nil
total_timer = Hitimes::TimedMetric.now("Total cache lookup")
fetch_timer = Hitimes::TimedMetric.new("Fetching from redis")
if metadata = fetch_timer.measure { db.list_range(request.uri.to_s, 0, -1) }
metadata.detect { |meta|
json = Marshal.load(meta)
if valid_for?(request, json[:vary_header_values])
key = json[:key]
text = fetch_timer.measure { db.get(key) }
response = Marshal.load(text)
total_timer.stop
@logger.debug(" [Redis] cache read: %0.4fs (%0.1f%%) fetching, %0.4f total" %
[fetch_timer.sum, fetch_timer.sum / total_timer.sum * 100, total_timer.sum ])
true
else
@logger.debug("[Redis] cache miss")
end
}
end
response
end
def store(request, response)
@logger.info("Storing in cache")
key = UUIDTools::UUID.random_create
response.header['Cache-Control'].match(/max-age=(\d+)/) if response.header['Cache-Control']
expires = $1
db.set(key, Marshal.dump(response), expires)
values = vary_header_values(request, response)
values = {:vary_header_values => values, :key => key}
text = Marshal.dump(values)
db.push_tail(request.uri.to_s, text)
end
def invalidate(url)
db.delete(url)
end
protected
def vary_header_values(request, response)
values = {}
response.header['Vary'].each do |name|
values[name] = request.header[name]
end if response.header['Vary']
values
end
def valid_for?(request, vary_header_values)
vary_header_values.all? do |name, value|
request.header[name] == value
end
end
end
end |
<?php
namespace Exen\Konfig\Exception;
class Exception extends \Exception
{
// Nothing to put here!
}
// END OF ./src/Exception/Exception.php FILE |
package com.shapps.mintubeapp.service;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;
public interface SuggestionService {
@GET("search")
Call<String> getSuggestions (@Query("client") String client,
@Query("client") String clientType,
@Query("ds") String ds,
@Query("q") String query
);
} |
<p>This is a paragraph of text.</p>
<div>
This is a block
of raw html.
</div>
<p>This is the last paragraph.</p> |
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
export default class NavLoggedInMobile extends Component {
constructor(props){
super(props);
this.handleClick = this.handleClick.bind(this);
this.state = {
isOpen: false
}
}
handleClick(e){
e.stopPropagation();
console.log('clicky');
this.setState({
isOpen : !this.state.isOpen
})
}
render(){
if (!this.state.isOpen){
return (
<div className="secondary-nav">
<div className="sec-left">
<div className="sec-nav-title"><Link to="/">Pollster</Link></div>
</div>
<div className="sec-right"> Options <i className="fa fa-caret-down" aria-hidden="true"></i>
<div className="sec-right-menu">
<div className="sec-username">{this.props.username}</div>
<div className="sec-polls"><div className="overlay"><Link to="/dashboard"><div onClick={this.handleClick} className="div-anchor">Polls</div></Link></div></div>
<div className="sec-nav-new-poll"><div className="overlay"><Link to="/new"><div onClick={this.handleClick} className="div-anchor">New Poll</div></Link></div></div>
<div className="sec-logout"><div className="overlay"><div onClick={this.props.handleLogout} className="div-anchor">Logout</div></div></div>
</div>
</div>
</div>
)
} else {
return (
<div className="secondary-nav">
<div className="sec-left">
<div className="sec-nav-title"><Link to="/">Pollster</Link></div>
</div>
<div className="sec-right"> Options <i className="fa fa-caret-down" aria-hidden="true"></i>
<div style={{"display":"none"}} className="sec-right-menu">
<div className="sec-username">{this.props.username}</div>
<div className="sec-polls"><div className="overlay"><Link to="/dashboard"><div onClick={this.handleClick} className="div-anchor">Polls</div></Link></div></div>
<div className="sec-nav-new-poll"><div className="overlay"><Link to="/new"><div onClick={this.handleClick} className="div-anchor">New Poll</div></Link></div></div>
<div className="sec-logout"><div className="overlay"><div onClick={this.props.handleLogout} className="div-anchor">Logout</div></div></div>
</div>
</div>
</div>
)
}
}
} |
// SF API version v50.0
// Custom fields included: False
// Relationship objects included: True
using System;
using NetCoreForce.Client.Models;
using NetCoreForce.Client.Attributes;
using Newtonsoft.Json;
namespace NetCoreForce.Models
{
<summary>
User Record Access
<para>SObject Name: UserRecordAccess</para>
<para>Custom Object: False</para>
</summary>
public class SfUserRecordAccess : SObject
{
[JsonIgnore]
public static string SObjectTypeName
{
get { return "UserRecordAccess"; }
}
<summary>
User Record Access ID
<para>Name: Id</para>
<para>SF Type: id</para>
<para>Nillable: False</para>
</summary>
[JsonProperty(PropertyName = "id")]
[Updateable(false), Createable(false)]
public string Id { get; set; }
<summary>
User ID
<para>Name: UserId</para>
<para>SF Type: reference</para>
<para>Nillable: False</para>
</summary>
[JsonProperty(PropertyName = "userId")]
[Updateable(false), Createable(false)]
public string UserId { get; set; }
<summary>
Record ID
<para>Name: RecordId</para>
<para>SF Type: picklist</para>
<para>Nillable: False</para>
</summary>
[JsonProperty(PropertyName = "recordId")]
[Updateable(false), Createable(false)]
public string RecordId { get; set; }
<summary>
Has Read Access
<para>Name: HasReadAccess</para>
<para>SF Type: boolean</para>
<para>Nillable: False</para>
</summary>
[JsonProperty(PropertyName = "hasReadAccess")]
[Updateable(false), Createable(false)]
public bool? HasReadAccess { get; set; }
<summary>
Has Edit Access
<para>Name: HasEditAccess</para>
<para>SF Type: boolean</para>
<para>Nillable: False</para>
</summary>
[JsonProperty(PropertyName = "hasEditAccess")]
[Updateable(false), Createable(false)]
public bool? HasEditAccess { get; set; }
<summary>
Has Delete Access
<para>Name: HasDeleteAccess</para>
<para>SF Type: boolean</para>
<para>Nillable: False</para>
</summary>
[JsonProperty(PropertyName = "hasDeleteAccess")]
[Updateable(false), Createable(false)]
public bool? HasDeleteAccess { get; set; }
<summary>
Has Transfer Access
<para>Name: HasTransferAccess</para>
<para>SF Type: boolean</para>
<para>Nillable: False</para>
</summary>
[JsonProperty(PropertyName = "hasTransferAccess")]
[Updateable(false), Createable(false)]
public bool? HasTransferAccess { get; set; }
<summary>
Has All Access
<para>Name: HasAllAccess</para>
<para>SF Type: boolean</para>
<para>Nillable: False</para>
</summary>
[JsonProperty(PropertyName = "hasAllAccess")]
[Updateable(false), Createable(false)]
public bool? HasAllAccess { get; set; }
<summary>
Maximum Access Level
<para>Name: MaxAccessLevel</para>
<para>SF Type: picklist</para>
<para>Nillable: True</para>
</summary>
[JsonProperty(PropertyName = "maxAccessLevel")]
[Updateable(false), Createable(false)]
public string MaxAccessLevel { get; set; }
}
} |
# encoding: utf-8
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
module Azure::Web::Mgmt::V2020_09_01
module Models
# Application logs to file system configuration.
class <API key>
include MsRestAzure
# @return [LogLevel] Log level. Possible values include: 'Off',
# 'Verbose', 'Information', 'Warning', 'Error'. Default value: 'Off' .
attr_accessor :level
# Mapper for <API key> class as Ruby Hash.
# This will be used for serialization/deserialization.
def self.mapper()
{
<API key>: true,
required: false,
serialized_name: '<API key>',
type: {
name: 'Composite',
class_name: '<API key>',
model_properties: {
level: {
<API key>: true,
required: false,
serialized_name: 'level',
default_value: 'Off',
type: {
name: 'Enum',
module: 'LogLevel'
}
}
}
}
}
end
end
end
end |
'use strict';
var app = angular.module('myApp.users.controller', []);
app.controller('UsersShowController', ['$rootScope', '$window', '$scope', '$routeParams', 'User', '$location', 'Auth', 'STRIPE_KEY', '$route', 'locationHelper', 'AUTH_URL', 'menu', '$cookies', 'gettextCatalog',
function($rootScope, $window, $scope, $routeParams, User, $location, Auth, STRIPE_KEY, $route, locationHelper, AUTH_URL, menu, $cookies, gettextCatalog) {
$scope.loading = true;
function isOpen(section) {
return menu.isSectionSelected(section);
}
var id;
var path = $location.path();
path = path.split('/');
if ((path && path[1] === 'me') || Auth.currentUser().slug === $routeParams.id) {
id = Auth.currentUser().slug;
} else {
id = $routeParams.id;
}
menu.isOpen = isOpen;
menu.hideBurger = false;
var isActive = function(path) {
var split = $location.path().split('/');
if (split.length >= 4) {
return ($location.path().split('/')[3] === path);
} else if (path === 'dashboard') {
return true;
}
};
menu.header = undefined;
menu.sectionName = Auth.currentUser().username;
menu.sections = [{
name: gettextCatalog.getString('Profile'),
type: 'link',
link: '/#/users/' + id,
icon: 'face',
active: isActive('dashboard')
}];
if (Auth.currentUser() && !Auth.currentUser().guest) {
menu.sections.push({
name: gettextCatalog.getString('Billing'),
type: 'link',
link: '/#/users/' + id + '/billing',
icon: 'credit_card',
active: isActive('billing')
});
menu.sections.push({
name: gettextCatalog.getString('Invoices'),
type: 'link',
link: '/#/users/' + id + '/invoices',
icon: 'picture_as_pdf',
active: isActive('invoices')
});
}
// menu.sections.push({
// name: gettextCatalog.getString('Integrations'),
// type: 'link',
// link: '/#/users/' + id + '/integrations',
// icon: 'widgets',
// active: isActive('integrations')
menu.sections.push({
name: gettextCatalog.getString('Notifications'),
type: 'link',
link: '/#/users/' + id + '/alerts',
icon: 'email',
active: isActive('alerts')
});
// if (Auth.currentUser() && !Auth.currentUser().guest) {
// menu.sections.push({
// name: gettextCatalog.getString('Branding'),
// type: 'link',
// link: '/#/users/' + id + '/branding',
// icon: 'perm_identity',
// active: isActive('branding')
// menu.sections.push({
// name: gettextCatalog.getString('Locations'),
// type: 'link',
// link: '/#/users/' + id + '/locations',
// icon: 'business'
menu.sections.push({
name: gettextCatalog.getString('History'),
type: 'link',
link: '/#/users/' + id + '/history',
icon: 'change_history',
active: isActive('history')
});
menu.sections.push({
name: gettextCatalog.getString('Access'),
type: 'link',
link: '/#/users/' + id + '/sessions',
icon: 'pan_tool',
active: isActive('sessions')
});
menu.sections.push({
name: gettextCatalog.getString('Inventory'),
type: 'link',
link: '/#/users/' + id + '/inventory',
icon: 'track_changes',
active: isActive('inventory')
});
menu.sections.push({
name: gettextCatalog.getString('Quotas'),
type: 'link',
link: '/#/users/' + id + '/quotas',
icon: 'book',
active: isActive('quotas')
});
}
]);
app.controller('<API key>', ['Integration', '$scope', '$routeParams', 'User', '$location', 'Auth', '$pusher',
function(Integration, $scope, $routeParams, User, $location, Auth, $pusher) {
function parse(val) {
var result, tmp = [];
location.search
.substr(1)
.split('&')
.forEach(function (item) {
tmp = item.split('=');
if (tmp[0] === val) {
result = decodeURIComponent(tmp[1]);
}
});
return result;
}
var code = $routeParams.code || parse('code');
var type;
if (($routeParams.id === 'slacker' || $routeParams.id === 'slacker') && code ) {
type = 'slack';
}
else if ($routeParams.id === 'mailchimp' && code ) {
type = 'mailchimp';
}
else if ($routeParams.id === 'twillio' && code ) {
type = 'twillio';
}
if ($routeParams.error) {
$location.path('/users/' + Auth.currentUser().slug + '/integrations');
$location.search({success: false, error: $routeParams.error});
} else if (type) {
Integration.create({integration: { code: code, type: type }}).$promise.then(function(results) {
$location.path('/users/' + Auth.currentUser().slug + '/integrations');
$location.search({success: true, type: type});
}, function(err) {
$location.path('/users/' + Auth.currentUser().slug + '/integrations');
$location.search({success: false, type: type});
});
} else {
$location.path('/users/' + Auth.currentUser().slug + '/integrations');
$location.search({success: false, type: type});
}
}
]); |
<?php
namespace Icicle\Loop\Structures;
use SplObjectStorage;
/**
* Extends SplObjectStorage to allow some objects in the storage to be unreferenced, that is, not count toward the total
* number of objects in the storage.
*/
class ObjectStorage extends SplObjectStorage
{
/**
* @var \SplObjectStorage
*/
private $unreferenced;
public function __construct()
{
$this->unreferenced = new SplObjectStorage();
}
/**
* @param object $object
*/
public function detach($object)
{
parent::detach($object);
$this->unreferenced->detach($object);
}
/**
* @param object $object
*/
public function offsetUnset($object)
{
parent::offsetUnset($object);
$this->unreferenced->detach($object);
}
/**
* @param object $object
*/
public function unreference($object)
{
if ($this->contains($object)) {
$this->unreferenced->attach($object);
}
}
/**
* @param object $object
*/
public function reference($object)
{
$this->unreferenced->detach($object);
}
/**
* @param object $object
*
* @return bool
*/
public function referenced($object)
{
return $this->contains($object) && !$this->unreferenced->contains($object);
}
/**
* @param \SplObjectStorage $storage
*/
public function addAll($storage)
{
parent::addAll($storage);
if ($storage instanceof self) {
$this->unreferenced->addAll($storage->unreferenced);
}
}
/**
* @param \SplObjectStorage $storage
*/
public function removeAll($storage)
{
parent::removeAll($storage);
$this->unreferenced->removeAll($storage);
}
/**
* @param \SplObjectStorage $storage
*/
public function removeAllExcept($storage)
{
parent::removeAllExcept($storage);
$this->unreferenced->removeAllExcept($storage);
}
/**
* Returns the number of referenced objects in the storage.
*
* @return int
*/
public function count(): int
{
return parent::count() - $this->unreferenced->count();
}
/**
* Returns the total number of objects in the storage (including unreferenced objects).
*
* @return int
*/
public function total(): int
{
return parent::count();
}
/**
* Determines if the object storage is empty, including any unreferenced objects.
* Use count() to determine if there are any referenced objects in the storage.
*
* @return bool
*/
public function isEmpty(): bool
{
return 0 === parent::count();
}
} |
package edu.uh.findtheroot;
import android.app.Activity;
import android.os.Bundle;
import android.text.Html;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TextView;
import org.w3c.dom.Text;
import java.lang.reflect.Array;
import java.util.ArrayList;
public class <API key> extends Activity {
TextView eqTextView;
ArrayList<Double> coefficients;
ArrayList<Integer> exponents;
private final static String TAG = "NewtonRaphson";
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.<API key>);
eqTextView = (TextView) findViewById(R.id.textViewEquation);
final EditText guess = (EditText) findViewById(R.id.editTextGuess);
final EditText tolerance = (EditText) findViewById(R.id.editTextTolerance);
final EditText iterations = (EditText) findViewById(R.id.editTextIterations);
final TextView <API key> = (TextView) findViewById(R.id.<API key>);
coefficients = (ArrayList<Double>) getIntent().<API key>("coefficients");
exponents = getIntent().<API key>("exponents");
String eq = getIntent().getStringExtra("equation");
eqTextView.setText(Html.fromHtml(eq));
Button btnSolve = (Button) findViewById(R.id.buttonSolve);
btnSolve.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// compute the answer
EquationBuilder equationBuilder = new EquationBuilder(coefficients, exponents);
NewtonRaphson newtonRaphson = new NewtonRaphson(equationBuilder);
double computedValue = newtonRaphson.compute(
Helper.getDoubleFromString(guess.getText().toString()),
Helper.getDoubleFromString(tolerance.getText().toString()),
Helper.getDoubleFromString(iterations.getText().toString())
);
Log.d(TAG, "value: " + computedValue);
<API key>.setText(""+computedValue);
}
});
}
} |
package server
import (
"encoding/json"
"fmt"
"net/http"
"github.com/ehazlett/steamwire/types"
"github.com/sirupsen/logrus"
)
const (
baseURL = "http://api.steampowered.com/ISteamNews/GetNewsForApp/v0002/?appid=%s&count=%d&maxlength=%d&format=json"
)
func buildURL(appID string, count int, maxLength int) string {
return fmt.Sprintf(baseURL, appID, count, maxLength)
}
// getNews gets the latest news for the specified application
// This is limited to a single item as well as 1024 characters in the content
func (s *Server) getNews(appID string) (*types.AppNews, error) {
u := buildURL(appID, 1, 1024)
resp, err := http.Get(u)
if err != nil {
return nil, err
}
app := &types.App{}
if err := json.NewDecoder(resp.Body).Decode(&app); err != nil {
logrus.Errorf("error decoding: %s", err)
return nil, err
}
return app.AppNews, nil
} |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
constexpr const ll MOD = 1e9 + 7;
void tarjan(vector<unordered_set<int>> &graph, vector<int> &order,
vector<int> &ancestor, stack<int> &subtree,
vector<bool> &in_subtree, vector<int> &scc, const int node) {
static int accumulate = 0;
order[node] = ancestor[node] = ++accumulate;
in_subtree[node] = true;
subtree.push(node);
for (const auto &x : graph[node]) {
if (!order[x]) { // new node
tarjan(graph, order, ancestor, subtree, in_subtree, scc, x);
ancestor[node] =
ancestor[x] < ancestor[node] ? ancestor[x] : ancestor[node];
} else if (in_subtree[x]) { // not cross edge
ancestor[node] = order[x] < ancestor[node] ? order[x] : ancestor[node];
}
}
if (order[node] == ancestor[node]) { // first point of SCC
while (!subtree.empty() && order[subtree.top()] >= order[node]) {
scc[subtree.top()] = order[node];
in_subtree[subtree.top()] = false;
subtree.pop();
}
}
}
void solve(vector<unordered_set<int>> &graph, vector<int> &costs) {
// for (int i = 0; i < graph.size(); ++i) {
// cerr << i << ":";
// for (const auto &x: graph[i]) {
// cerr << " " << x ;
// cerr << "\n";
vector<int> order(graph.size()), ancestor(graph.size()), scc(graph.size());
stack<int> subtree;
vector<bool> in_subtree(graph.size());
for (int i = 0; i < graph.size(); ++i)
if (!order[i]) tarjan(graph, order, ancestor, subtree, in_subtree, scc, i);
unordered_map<int, pair<int, int>> SCC;
// for (const auto &x: order ) cerr << x << " ";
// cerr << "\n";
// for (const auto &x: scc ) cerr << x << " ";
// cerr << "\n";
for (int i = 0; i < scc.size(); ++i) {
const auto [_, success] = SCC.insert({scc[i], {costs[i], 1}});
if (!success) {
if (costs[i] < SCC[scc[i]].first)
SCC[scc[i]] = {costs[i], 1};
else if (costs[i] == SCC[scc[i]].first)
++SCC[scc[i]].second;
}
}
ll total = 0, combinations = 1;
for (const auto &[_, x] : SCC) {
total += x.first;
combinations = (combinations * x.second) % MOD;
}
cout << total << " " << combinations << "\n";
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int city_cnt;
cin >> city_cnt;
vector<int> costs(city_cnt);
for (auto &x : costs) cin >> x;
int edge_cnt;
cin >> edge_cnt;
vector<unordered_set<int>> graph(city_cnt);
int from, to;
while (edge_cnt
cin >> from >> to;
graph[from - 1].insert(to - 1);
}
solve(graph, costs);
return 0;
} |
<!DOCTYPE html>
<!--[if IE]><![endif]-->
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Struct Children<T>
</title>
<meta name="viewport" content="width=device-width">
<meta name="title" content="Struct Children<T>
">
<meta name="generator" content="docfx 2.37.2.0">
<link rel="shortcut icon" href="../favicon.ico">
<link rel="stylesheet" href="../styles/docfx.vendor.css">
<link rel="stylesheet" href="../styles/docfx.css">
<link rel="stylesheet" href="../styles/main.css">
<meta property="docfx:navrel" content="../toc.html">
<meta property="docfx:tocrel" content="toc.html">
</head>
<body data-spy="scroll" data-target="#affix" data-offset="120">
<div id="wrapper">
<header>
<nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html">
<img id="logo" class="svg" src="../logo.svg" alt="">
</a>
</div>
<div class="collapse navbar-collapse" id="navbar">
<form class="navbar-form navbar-right" role="search" id="search">
<div class="form-group">
<input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
</div>
</form>
</div>
</div>
</nav>
<div class="subnav navbar navbar-default">
<div class="container hide-when-search" id="breadcrumb">
<ul class="breadcrumb">
<li></li>
</ul>
</div>
</div>
</header>
<div role="main" class="container body-content hide-when-search">
<div class="sidenav hide-when-search">
<a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
<div class="sidetoggle collapse" id="sidetoggle">
<div id="sidetoc"></div>
</div>
</div>
<div class="article row grid-right">
<div class="col-md-10">
<article class="content wrap" id="_content" data-uid="Sawmill.Children`1">
<h1 id="Sawmill_Children_1" data-uid="Sawmill.Children`1" class="text-break">Struct Children<T>
</h1>
<div class="markdown level0 summary"><p>An enumerable type representing the children of a node of type <code <API key>="typeparamref" class="typeparamref">T</code>.</p>
</div>
<div class="markdown level0 conceptual"></div>
<div classs="implements">
<h5>Implements</h5>
<div><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.immutable.iimmutablelist-1">IImmutableList</a><T></div>
<div><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1">IReadOnlyList</a><T></div>
<div><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.<API key>">IReadOnlyCollection</a><T></div>
<div><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a><T></div>
<div><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.ienumerable">IEnumerable</a></div>
</div>
<div class="inheritedMembers">
<h5>Inherited Members</h5>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.valuetype.equals#<API key>">ValueType.Equals(Object)</a>
</div>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.valuetype.gethashcode#<API key>">ValueType.GetHashCode()</a>
</div>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.valuetype.tostring#<API key>">ValueType.ToString()</a>
</div>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.equals#<API key>">Object.Equals(Object, Object)</a>
</div>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.gettype#<API key>">Object.GetType()</a>
</div>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.object.referenceequals#<API key>">Object.ReferenceEquals(Object, Object)</a>
</div>
</div>
<h6><strong>Namespace</strong>: <a class="xref" href="Sawmill.html">Sawmill</a></h6>
<h6><strong>Assembly</strong>: Sawmill.dll</h6>
<h5 id="<API key>">Syntax</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public struct Children<T> : IImmutableList<T>, IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable</code></pre>
</div>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="parametername">T</span></td>
<td><p>The type of the rewritable object.</p>
</td>
</tr>
</tbody>
</table>
<h5 id="<API key>"><strong>Remarks</strong></h5>
<div class="markdown level0 remarks"><p>Why not just use <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable<T></a>? <a class="xref" href="Sawmill.Children-1.html">Children<T></a> is a value type,
whereas <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable<T></a> is a reference type.
In cases where a node has a small, fixed number of children (fewer than three),
it's much more efficient to pass those children around on the stack,
rather than storing an enumerable on the heap which will quickly become garbage.</p>
</div>
<h3 id="properties">Properties
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L143">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.Count*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.Count">Count</h4>
<div class="markdown level1 summary"><p>Gets the number of values in the <a class="xref" href="Sawmill.Children-1.html">Children<T></a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int Count { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
<td><p>The number of values in the <a class="xref" href="Sawmill.Children-1.html">Children<T></a>.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L83">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.First*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.First">First</h4>
<div class="markdown level1 summary"><p>Gets the first element, if <a class="xref" href="Sawmill.Children-1.html#<API key>">NumberOfChildren</a> is
<a class="xref" href="Sawmill.NumberOfChildren.html#<API key>">One</a> or <a class="xref" href="Sawmill.NumberOfChildren.html#<API key>">Two</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public T First { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><p>The first element, if <a class="xref" href="Sawmill.Children-1.html#<API key>">NumberOfChildren</a> is
<a class="xref" href="Sawmill.NumberOfChildren.html#<API key>">One</a> or <a class="xref" href="Sawmill.NumberOfChildren.html#<API key>">Two</a>.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.<API key>"><API key></a></td>
<td><p>Thrown when <a class="xref" href="Sawmill.Children-1.html#<API key>">NumberOfChildren</a> is not
<a class="xref" href="Sawmill.NumberOfChildren.html#<API key>">One</a> or <a class="xref" href="Sawmill.NumberOfChildren.html#<API key>">Two</a></p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L169">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.Item*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.Item(System.Int32)">Item[Int32]</h4>
<div class="markdown level1 summary"><p>Returns the element of the <a class="xref" href="Sawmill.Children-1.html">Children<T></a> at index <code <API key>="paramref" class="paramref">index</code>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public T this[int index] { get; }</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
<td><span class="parametername">index</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><p>The element of the <a class="xref" href="Sawmill.Children-1.html">Children<T></a> at index <code <API key>="paramref" class="paramref">index</code>.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L127">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.Many*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.Many">Many</h4>
<div class="markdown level1 summary"><p>Gets an enumerable containing the elements, if <a class="xref" href="Sawmill.Children-1.html#<API key>">NumberOfChildren</a> is <a class="xref" href="Sawmill.NumberOfChildren.html#<API key>">Many</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public ImmutableList<T> Many { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.immutable.immutablelist-1">ImmutableList</a><T></td>
<td><p>An enumerable containing the elements, if if <a class="xref" href="Sawmill.Children-1.html#<API key>">NumberOfChildren</a> is <a class="xref" href="Sawmill.NumberOfChildren.html#<API key>">Many</a>.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.<API key>"><API key></a></td>
<td><p>Thrown when <a class="xref" href="Sawmill.Children-1.html#<API key>">NumberOfChildren</a> is not <a class="xref" href="Sawmill.NumberOfChildren.html#<API key>">Many</a></p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L68">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.NumberOfChildren*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.NumberOfChildren">NumberOfChildren</h4>
<div class="markdown level1 summary"><p>The number of children the instance contains.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public NumberOfChildren NumberOfChildren { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sawmill.NumberOfChildren.html">NumberOfChildren</a></td>
<td><p>The number of children the instance contains.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L105">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.Second*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.Second">Second</h4>
<div class="markdown level1 summary"><p>Gets the second element, if <a class="xref" href="Sawmill.Children-1.html#<API key>">NumberOfChildren</a> is <a class="xref" href="Sawmill.NumberOfChildren.html#<API key>">Two</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public T Second { get; }</code></pre>
</div>
<h5 class="propertyValue">Property Value</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><p>The second element, if <a class="xref" href="Sawmill.Children-1.html#<API key>">NumberOfChildren</a> is <a class="xref" href="Sawmill.NumberOfChildren.html#<API key>">Two</a>.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Condition</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.<API key>"><API key></a></td>
<td><p>Thrown when <a class="xref" href="Sawmill.Children-1.html#<API key>">NumberOfChildren</a> is not <a class="xref" href="Sawmill.NumberOfChildren.html#<API key>">Two</a></p>
</td>
</tr>
</tbody>
</table>
<h3 id="methods">Methods
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L329">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.Add*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.Add(`0)">Add(T)</h4>
<div class="markdown level1 summary"><p>Adds <code <API key>="paramref" class="paramref">value</code> to the end of this <a class="xref" href="Sawmill.Children-1.html">Children<T></a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Children<T> Add(T value)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">value</span></td>
<td><p>The value to add</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sawmill.Children-1.html">Children</a><T></td>
<td><p>A copy of this <a class="xref" href="Sawmill.Children-1.html">Children<T></a> with <code <API key>="paramref" class="paramref">value</code> added at the end.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L351">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.AddRange*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.AddRange(System.Collections.Generic.IEnumerable{`0})">AddRange(IEnumerable<T>)</h4>
<div class="markdown level1 summary"><p>Adds <code <API key>="paramref" class="paramref">items</code> to the end of this <a class="xref" href="Sawmill.Children-1.html">Children<T></a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Children<T> AddRange(IEnumerable<T> items)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a><T></td>
<td><span class="parametername">items</span></td>
<td><p>The items to add</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sawmill.Children-1.html">Children</a><T></td>
<td><p>A copy of this <a class="xref" href="Sawmill.Children-1.html">Children<T></a> with <code <API key>="paramref" class="paramref">items</code> added at the end.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L321">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.Clear*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.Clear">Clear()</h4>
<div class="markdown level1 summary"><p>Returns an empty <a class="xref" href="Sawmill.Children-1.html">Children<T></a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Children<T> Clear()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sawmill.Children-1.html">Children</a><T></td>
<td><p>An empty <a class="xref" href="Sawmill.Children-1.html">Children<T></a>.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L550">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.GetEnumerator*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.GetEnumerator">GetEnumerator()</h4>
<div class="markdown level1 summary"><p>Returns an implementation of <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.ienumerator-1">IEnumerator<T></a> which yields the elements of the current instance.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Children<T>.Enumerator GetEnumerator()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sawmill.Children-1.Enumerator.html">Children.Enumerator</a><></td>
<td><p>An implementation of <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.ienumerator-1">IEnumerator<T></a> which yields the elements of the current instance.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L272">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.IndexOf*"></a>
<h4 id="Sawmill_Children_1_IndexOf__0_System_Int32_System_Int32_System_Collections_Generic_IEqualityComparer__0__" data-uid="Sawmill.Children`1.IndexOf(`0,System.Int32,System.Int32,System.Collections.Generic.IEqualityComparer{`0})">IndexOf(T, Int32, Int32, IEqualityComparer<T>)</h4>
<div class="markdown level1 summary"><p>Finds the first occurence of <code <API key>="paramref" class="paramref">item</code> in the <code <API key>="paramref" class="paramref">count</code> items starting from <code <API key>="paramref" class="paramref">index</code> using the specified <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.iequalitycomparer-1">IEqualityComparer<T></a>.
Returns the index of the item, if found; otherwise, -1.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int IndexOf(T item, int index, int count, IEqualityComparer<T> equalityComparer)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">item</span></td>
<td><p>The item to search for</p>
</td>
</tr>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
<td><span class="parametername">index</span></td>
<td><p>The index at which to start the search</p>
</td>
</tr>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
<td><span class="parametername">count</span></td>
<td><p>The number of items from <code <API key>="paramref" class="paramref">index</code> to search</p>
</td>
</tr>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.iequalitycomparer-1">IEqualityComparer</a><T></td>
<td><span class="parametername">equalityComparer</span></td>
<td><p>The equality comparer</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
<td><p>The index of the item, if found; otherwise, -1.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L361">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.Insert*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.Insert(System.Int32,`0)">Insert(Int32, T)</h4>
<div class="markdown level1 summary"><p>Inserts <code <API key>="paramref" class="paramref">element</code> into this <a class="xref" href="Sawmill.Children-1.html">Children<T></a> at <code <API key>="paramref" class="paramref">index</code>, moving later items rightward.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Children<T> Insert(int index, T element)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
<td><span class="parametername">index</span></td>
<td><p>The index at which to insert <code <API key>="paramref" class="paramref">element</code></p>
</td>
</tr>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">element</span></td>
<td><p>The element to insert</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sawmill.Children-1.html">Children</a><T></td>
<td><p>A copy of this <a class="xref" href="Sawmill.Children-1.html">Children<T></a> with <code <API key>="paramref" class="paramref">element</code> inserted at <code <API key>="paramref" class="paramref">index</code>.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L386">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.InsertRange*"></a>
<h4 id="Sawmill_Children_1_InsertRange_System_Int32_System_Collections_Generic_IEnumerable__0__" data-uid="Sawmill.Children`1.InsertRange(System.Int32,System.Collections.Generic.IEnumerable{`0})">InsertRange(Int32, IEnumerable<T>)</h4>
<div class="markdown level1 summary"><p>Inserts <code <API key>="paramref" class="paramref">items</code> into this <a class="xref" href="Sawmill.Children-1.html">Children<T></a> at <code <API key>="paramref" class="paramref">index</code>, moving later items rightward.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Children<T> InsertRange(int index, IEnumerable<T> items)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
<td><span class="parametername">index</span></td>
<td><p>The index at which to insert <code <API key>="paramref" class="paramref">items</code></p>
</td>
</tr>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a><T></td>
<td><span class="parametername">items</span></td>
<td><p>The items to insert</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sawmill.Children-1.html">Children</a><T></td>
<td><p>A copy of this <a class="xref" href="Sawmill.Children-1.html">Children<T></a> with <code <API key>="paramref" class="paramref">items</code> inserted at <code <API key>="paramref" class="paramref">index</code>.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L299">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.LastIndexOf*"></a>
<h4 id="Sawmill_Children_1_LastIndexOf__0_System_Int32_System_Int32_System_Collections_Generic_IEqualityComparer__0__" data-uid="Sawmill.Children`1.LastIndexOf(`0,System.Int32,System.Int32,System.Collections.Generic.IEqualityComparer{`0})">LastIndexOf(T, Int32, Int32, IEqualityComparer<T>)</h4>
<div class="markdown level1 summary"><p>Finds the last occurence of <code <API key>="paramref" class="paramref">item</code> in the <code <API key>="paramref" class="paramref">count</code> items ending at <code <API key>="paramref" class="paramref">index</code> using the specified <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.iequalitycomparer-1">IEqualityComparer<T></a>.
Returns the index of the item, if found; otherwise, -1.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public int LastIndexOf(T item, int index, int count, IEqualityComparer<T> equalityComparer)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">item</span></td>
<td><p>The item to search for</p>
</td>
</tr>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
<td><span class="parametername">index</span></td>
<td><p>The index at which to start the search</p>
</td>
</tr>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
<td><span class="parametername">count</span></td>
<td><p>The number of items before <code <API key>="paramref" class="paramref">index</code> to search</p>
</td>
</tr>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.iequalitycomparer-1">IEqualityComparer</a><T></td>
<td><span class="parametername">equalityComparer</span></td>
<td><p>The equality comparer</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
<td><p>The index of the item, if found; otherwise, -1.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L395">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.Remove*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.Remove(`0)">Remove(T)</h4>
<div class="markdown level1 summary"><p>Removes the first occurence of <code <API key>="paramref" class="paramref">value</code> from this <a class="xref" href="Sawmill.Children-1.html">Children<T></a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Children<T> Remove(T value)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">value</span></td>
<td><p>The value to remove</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sawmill.Children-1.html">Children</a><T></td>
<td><p>A copy of this <a class="xref" href="Sawmill.Children-1.html">Children<T></a> with the first occurence of <code <API key>="paramref" class="paramref">value</code> removed.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L402">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.Remove*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.Remove(`0,System.Collections.Generic.IEqualityComparer{`0})">Remove(T, IEqualityComparer<T>)</h4>
<div class="markdown level1 summary"><p>Removes the first occurence of <code <API key>="paramref" class="paramref">value</code> from this <a class="xref" href="Sawmill.Children-1.html">Children<T></a>, using the specified <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.iequalitycomparer-1">IEqualityComparer<T></a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Children<T> Remove(T value, IEqualityComparer<T> equalityComparer)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">value</span></td>
<td><p>The value to remove</p>
</td>
</tr>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.iequalitycomparer-1">IEqualityComparer</a><T></td>
<td><span class="parametername">equalityComparer</span></td>
<td><p>The equality comparer</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sawmill.Children-1.html">Children</a><T></td>
<td><p>A copy of this <a class="xref" href="Sawmill.Children-1.html">Children<T></a> with the first occurence of <code <API key>="paramref" class="paramref">value</code> removed.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L424">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.RemoveAll*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.RemoveAll(System.Predicate{`0})">RemoveAll(Predicate<T>)</h4>
<div class="markdown level1 summary"><p>Removes all the items for which <code <API key>="paramref" class="paramref">match</code> returns true.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Children<T> RemoveAll(Predicate<T> match)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.predicate-1">Predicate</a><T></td>
<td><span class="parametername">match</span></td>
<td><p>A predicate to apply to each item in the <a class="xref" href="Sawmill.Children-1.html">Children<T></a></p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sawmill.Children-1.html">Children</a><T></td>
<td><p>A copy of the <a class="xref" href="Sawmill.Children-1.html">Children<T></a> with all the matching items removed.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L483">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.RemoveAt*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.RemoveAt(System.Int32)">RemoveAt(Int32)</h4>
<div class="markdown level1 summary"><p>Removes the item at <code <API key>="paramref" class="paramref">index</code></p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Children<T> RemoveAt(int index)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
<td><span class="parametername">index</span></td>
<td><p>The index of the item to remove</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sawmill.Children-1.html">Children</a><T></td>
<td><p>A copy of the <a class="xref" href="Sawmill.Children-1.html">Children<T></a> with the item at <code <API key>="paramref" class="paramref">index</code> removed.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L447">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.RemoveRange*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.RemoveRange(System.Collections.Generic.IEnumerable{`0})">RemoveRange(IEnumerable<T>)</h4>
<div class="markdown level1 summary"><p>Remove the first occurence of each item in <code <API key>="paramref" class="paramref">items</code></p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Children<T> RemoveRange(IEnumerable<T> items)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a><T></td>
<td><span class="parametername">items</span></td>
<td><p>The items to remove</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sawmill.Children-1.html">Children</a><T></td>
<td><p>A copy of this <a class="xref" href="Sawmill.Children-1.html">Children<T></a> with <code <API key>="paramref" class="paramref">items</code> removed.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L455">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.RemoveRange*"></a>
<h4 id="Sawmill_Children_1_RemoveRange_System_Collections_Generic_IEnumerable__0__System_Collections_Generic_IEqualityComparer__0__" data-uid="Sawmill.Children`1.RemoveRange(System.Collections.Generic.IEnumerable{`0},System.Collections.Generic.IEqualityComparer{`0})">RemoveRange(IEnumerable<T>, IEqualityComparer<T>)</h4>
<div class="markdown level1 summary"><p>Remove the first occurence of each item in <code <API key>="paramref" class="paramref">items</code>, using the specified using the specified <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.iequalitycomparer-1">IEqualityComparer<T></a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Children<T> RemoveRange(IEnumerable<T> items, IEqualityComparer<T> equalityComparer)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a><T></td>
<td><span class="parametername">items</span></td>
<td><p>The items to remove</p>
</td>
</tr>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.iequalitycomparer-1">IEqualityComparer</a><T></td>
<td><span class="parametername">equalityComparer</span></td>
<td><p>The equality comparer</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sawmill.Children-1.html">Children</a><T></td>
<td><p>A copy of this <a class="xref" href="Sawmill.Children-1.html">Children<T></a> with <code <API key>="paramref" class="paramref">items</code> removed.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L473">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.RemoveRange*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.RemoveRange(System.Int32,System.Int32)">RemoveRange(Int32, Int32)</h4>
<div class="markdown level1 summary"><p>Removes the <code <API key>="paramref" class="paramref">count</code> items starting at <code <API key>="paramref" class="paramref">index</code></p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Children<T> RemoveRange(int index, int count)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
<td><span class="parametername">index</span></td>
<td><p>The starting index</p>
</td>
</tr>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
<td><span class="parametername">count</span></td>
<td><p>The number of items to remove</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sawmill.Children-1.html">Children</a><T></td>
<td><p>A copy of the <a class="xref" href="Sawmill.Children-1.html">Children<T></a> with the <code <API key>="paramref" class="paramref">count</code> items starting at <code <API key>="paramref" class="paramref">index</code> removed.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L518">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.Replace*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.Replace(`0,`0)">Replace(T, T)</h4>
<div class="markdown level1 summary"><p>Replaced the first occurence of <code <API key>="paramref" class="paramref">oldValue</code> with <code <API key>="paramref" class="paramref">newValue</code></p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Children<T> Replace(T oldValue, T newValue)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">oldValue</span></td>
<td><p>The value to search for</p>
</td>
</tr>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">newValue</span></td>
<td><p>The value with which to replace <code <API key>="paramref" class="paramref">oldValue</code></p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sawmill.Children-1.html">Children</a><T></td>
<td><p>A copy of the <a class="xref" href="Sawmill.Children-1.html">Children<T></a> with the first occurence of <code <API key>="paramref" class="paramref">oldValue</code> replaced with <code <API key>="paramref" class="paramref">newValue</code>.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L527">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.Replace*"></a>
<h4 id="Sawmill_Children_1_Replace__0__0_System_Collections_Generic_IEqualityComparer__0__" data-uid="Sawmill.Children`1.Replace(`0,`0,System.Collections.Generic.IEqualityComparer{`0})">Replace(T, T, IEqualityComparer<T>)</h4>
<div class="markdown level1 summary"><p>Replaced the first occurence of <code <API key>="paramref" class="paramref">oldValue</code> with <code <API key>="paramref" class="paramref">newValue</code>, using the specified <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.iequalitycomparer-1">IEqualityComparer<T></a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Children<T> Replace(T oldValue, T newValue, IEqualityComparer<T> equalityComparer)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">oldValue</span></td>
<td><p>The value to search for</p>
</td>
</tr>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">newValue</span></td>
<td><p>The value with which to replace <code <API key>="paramref" class="paramref">oldValue</code></p>
</td>
</tr>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.iequalitycomparer-1">IEqualityComparer</a><T></td>
<td><span class="parametername">equalityComparer</span></td>
<td><p>The equality comparer</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sawmill.Children-1.html">Children</a><T></td>
<td><p>A copy of the <a class="xref" href="Sawmill.Children-1.html">Children<T></a> with the first occurence of <code <API key>="paramref" class="paramref">oldValue</code> replaced with <code <API key>="paramref" class="paramref">newValue</code>.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L202">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.Select*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.Select``1(System.Func{`0,``0})">Select<U>(Func<T, U>)</h4>
<div class="markdown level1 summary"><p>Returns a new <a class="xref" href="Sawmill.Children-1.html">Children<T></a> containing the result of applying a transformation function to the elements of the current instance.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Children<U> Select<U>(Func<T, U> func)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.func-2">Func</a><T, U></td>
<td><span class="parametername">func</span></td>
<td><p>A transformation function to apply to the elements of the current instance</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sawmill.Children-1.html">Children</a><U></td>
<td><p>A new <a class="xref" href="Sawmill.Children-1.html">Children<T></a> containing the result of applying a transformation function to the elements of the current instance.</p>
</td>
</tr>
</tbody>
</table>
<h5 class="typeParameters">Type Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="parametername">U</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L494">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.SetItem*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.SetItem(System.Int32,`0)">SetItem(Int32, T)</h4>
<div class="markdown level1 summary"><p>Replaces the item at <code <API key>="paramref" class="paramref">index</code></p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public Children<T> SetItem(int index, T value)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
<td><span class="parametername">index</span></td>
<td><p>The index of the item to replace with <code <API key>="paramref" class="paramref">value</code></p>
</td>
</tr>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">value</span></td>
<td><p>The value with which to replace the item at <code <API key>="paramref" class="paramref">index</code></p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sawmill.Children-1.html">Children</a><T></td>
<td><p>A copy of the <a class="xref" href="Sawmill.Children-1.html">Children<T></a> with the item at <code <API key>="paramref" class="paramref">index</code> replaced with <code <API key>="paramref" class="paramref">value</code>.</p>
</td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L226">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.ToImmutableList*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.ToImmutableList">ToImmutableList()</h4>
<div class="markdown level1 summary"><p>Returns an <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.immutable.immutablelist-1">ImmutableList<T></a> containing the elements of this <a class="xref" href="Sawmill.Children-1.html">Children<T></a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public ImmutableList<T> ToImmutableList()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.immutable.immutablelist-1">ImmutableList</a><T></td>
<td><p>An <a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.immutable.immutablelist-1">ImmutableList<T></a> containing the elements of this <a class="xref" href="Sawmill.Children-1.html">Children<T></a>.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="operators">Operators
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L246">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.op_Implicit*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.op_Implicit(`0)~Sawmill.Children{`0}">Implicit(T to Children<T>)</h4>
<div class="markdown level1 summary"><p>Equivalent to <code>Children.One(item)</code></p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static implicit operator Children<T>(T item)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">item</span></td>
<td><p>The child</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sawmill.Children-1.html">Children</a><T></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L260">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.op_Implicit*"></a>
<h4 id="Sawmill_Children_1_op_Implicit_System_Collections_Immutable_ImmutableList__0___Sawmill_Children__0_" data-uid="Sawmill.Children`1.op_Implicit(System.Collections.Immutable.ImmutableList{`0})~Sawmill.Children{`0}">Implicit(ImmutableList<T> to Children<T>)</h4>
<div class="markdown level1 summary"><p>Equivalent to <code>Children.Many(list)</code>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static implicit operator Children<T>(ImmutableList<T> list)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.immutable.immutablelist-1">ImmutableList</a><T></td>
<td><span class="parametername">list</span></td>
<td><p>The children</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sawmill.Children-1.html">Children</a><T></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L253">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.op_Implicit*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.op_Implicit(System.ValueTuple{`0,`0})~Sawmill.Children{`0}">Implicit( to Children<T>)</h4>
<div class="markdown level1 summary"><p>Equivalent to <code>Children.Two(children.Item1, children.Item2)</code></p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">public static implicit operator Children<T>(children)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">System.</span></td>
<td><span class="parametername">children</span></td>
<td><p>The children</p>
</td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="Sawmill.Children-1.html">Children</a><T></td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="eii">Explicit Interface Implementations
</h3>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L553">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.System#Collections#Generic#IEnumerable{T}#GetEnumerator*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.System#Collections#Generic#IEnumerable{T}#GetEnumerator">IEnumerable<T>.GetEnumerator()</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">IEnumerator<T> IEnumerable<T>.GetEnumerator()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.ienumerator-1">IEnumerator</a><T></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L162">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.System#Collections#Generic#IReadOnlyCollection{T}#Count*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.System#Collections#Generic#IReadOnlyCollection{T}#Count">IReadOnlyCollection<T>.Count</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">int IReadOnlyCollection<T>.Count { get; }</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L186">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.System#Collections#Generic#IReadOnlyList{T}#Item*"></a>
<h4 id="Sawmill_Children_1_System_Collections_Generic_IReadOnlyList_T__Item_System_Int32_" data-uid="Sawmill.Children`1.System#Collections#Generic#IReadOnlyList{T}#Item(System.Int32)">IReadOnlyList<T>.Item[Int32]</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">T IReadOnlyList<T>.this[int index] { get; }</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
<td><span class="parametername">index</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L563">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.System#Collections#IEnumerable#GetEnumerator*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.System#Collections#IEnumerable#GetEnumerator">IEnumerable.GetEnumerator()</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">IEnumerator IEnumerable.GetEnumerator()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.ienumerator">IEnumerator</a></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L344">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#Add*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#Add(`0)">IImmutableList<T>.Add(T)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">IImmutableList<T> IImmutableList<T>.Add(T value)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">value</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.immutable.iimmutablelist-1">IImmutableList</a><T></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L353">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#AddRange*"></a>
<h4 id="Sawmill_Children_1_System_Collections_Immutable_IImmutableList_T__AddRange_System_Collections_Generic_IEnumerable__0__" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#AddRange(System.Collections.Generic.IEnumerable{`0})">IImmutableList<T>.AddRange(IEnumerable<T>)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">IImmutableList<T> IImmutableList<T>.AddRange(IEnumerable<T> items)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a><T></td>
<td><span class="parametername">items</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.immutable.iimmutablelist-1">IImmutableList</a><T></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L322">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#Clear*"></a>
<h4 id="<API key>" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#Clear">IImmutableList<T>.Clear()</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">IImmutableList<T> IImmutableList<T>.Clear()</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.immutable.iimmutablelist-1">IImmutableList</a><T></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L378">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#Insert*"></a>
<h4 id="Sawmill_Children_1_System_Collections_Immutable_IImmutableList_T__Insert_System_Int32__0_" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#Insert(System.Int32,`0)">IImmutableList<T>.Insert(Int32, T)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">IImmutableList<T> IImmutableList<T>.Insert(int index, T element)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
<td><span class="parametername">index</span></td>
<td></td>
</tr>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">element</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.immutable.iimmutablelist-1">IImmutableList</a><T></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L388">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#InsertRange*"></a>
<h4 id="Sawmill_Children_1_System_Collections_Immutable_IImmutableList_T__InsertRange_System_Int32_System_Collections_Generic_IEnumerable__0__" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#InsertRange(System.Int32,System.Collections.Generic.IEnumerable{`0})">IImmutableList<T>.InsertRange(Int32, IEnumerable<T>)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">IImmutableList<T> IImmutableList<T>.InsertRange(int index, IEnumerable<T> items)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
<td><span class="parametername">index</span></td>
<td></td>
</tr>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a><T></td>
<td><span class="parametername">items</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.immutable.iimmutablelist-1">IImmutableList</a><T></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L417">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#Remove*"></a>
<h4 id="Sawmill_Children_1_System_Collections_Immutable_IImmutableList_T__Remove__0_System_Collections_Generic_IEqualityComparer__0__" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#Remove(`0,System.Collections.Generic.IEqualityComparer{`0})">IImmutableList<T>.Remove(T, IEqualityComparer<T>)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">IImmutableList<T> IImmutableList<T>.Remove(T value, IEqualityComparer<T> equalityComparer)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">value</span></td>
<td></td>
</tr>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.iequalitycomparer-1">IEqualityComparer</a><T></td>
<td><span class="parametername">equalityComparer</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.immutable.iimmutablelist-1">IImmutableList</a><T></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L440">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#RemoveAll*"></a>
<h4 id="Sawmill_Children_1_System_Collections_Immutable_IImmutableList_T__RemoveAll_System_Predicate__0__" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#RemoveAll(System.Predicate{`0})">IImmutableList<T>.RemoveAll(Predicate<T>)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">IImmutableList<T> IImmutableList<T>.RemoveAll(Predicate<T> match)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.predicate-1">Predicate</a><T></td>
<td><span class="parametername">match</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.immutable.iimmutablelist-1">IImmutableList</a><T></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L485">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#RemoveAt*"></a>
<h4 id="Sawmill_Children_1_System_Collections_Immutable_IImmutableList_T__RemoveAt_System_Int32_" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#RemoveAt(System.Int32)">IImmutableList<T>.RemoveAt(Int32)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">IImmutableList<T> IImmutableList<T>.RemoveAt(int index)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
<td><span class="parametername">index</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.immutable.iimmutablelist-1">IImmutableList</a><T></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L464">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#RemoveRange*"></a>
<h4 id="Sawmill_Children_1_System_Collections_Immutable_IImmutableList_T__RemoveRange_System_Collections_Generic_IEnumerable__0__System_Collections_Generic_IEqualityComparer__0__" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#RemoveRange(System.Collections.Generic.IEnumerable{`0},System.Collections.Generic.IEqualityComparer{`0})">IImmutableList<T>.RemoveRange(IEnumerable<T>, IEqualityComparer<T>)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">IImmutableList<T> IImmutableList<T>.RemoveRange(IEnumerable<T> items, IEqualityComparer<T> equalityComparer)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">IEnumerable</a><T></td>
<td><span class="parametername">items</span></td>
<td></td>
</tr>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.iequalitycomparer-1">IEqualityComparer</a><T></td>
<td><span class="parametername">equalityComparer</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.immutable.iimmutablelist-1">IImmutableList</a><T></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L475">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#RemoveRange*"></a>
<h4 id="Sawmill_Children_1_System_Collections_Immutable_IImmutableList_T__RemoveRange_System_Int32_System_Int32_" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#RemoveRange(System.Int32,System.Int32)">IImmutableList<T>.RemoveRange(Int32, Int32)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">IImmutableList<T> IImmutableList<T>.RemoveRange(int index, int count)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
<td><span class="parametername">index</span></td>
<td></td>
</tr>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
<td><span class="parametername">count</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.immutable.iimmutablelist-1">IImmutableList</a><T></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L542">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#Replace*"></a>
<h4 id="Sawmill_Children_1_System_Collections_Immutable_IImmutableList_T__Replace__0__0_System_Collections_Generic_IEqualityComparer__0__" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#Replace(`0,`0,System.Collections.Generic.IEqualityComparer{`0})">IImmutableList<T>.Replace(T, T, IEqualityComparer<T>)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">IImmutableList<T> IImmutableList<T>.Replace(T oldValue, T newValue, IEqualityComparer<T> equalityComparer)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">oldValue</span></td>
<td></td>
</tr>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">newValue</span></td>
<td></td>
</tr>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.iequalitycomparer-1">IEqualityComparer</a><T></td>
<td><span class="parametername">equalityComparer</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.immutable.iimmutablelist-1">IImmutableList</a><T></td>
<td></td>
</tr>
</tbody>
</table>
<span class="small pull-right mobile-hide">
<span class="divider">|</span>
<a href="https:
</span>
<span class="small pull-right mobile-hide">
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L509">View Source</a>
</span>
<a id="<API key>" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#SetItem*"></a>
<h4 id="Sawmill_Children_1_System_Collections_Immutable_IImmutableList_T__SetItem_System_Int32__0_" data-uid="Sawmill.Children`1.System#Collections#Immutable#IImmutableList{T}#SetItem(System.Int32,`0)">IImmutableList<T>.SetItem(Int32, T)</h4>
<div class="markdown level1 summary"></div>
<div class="markdown level1 conceptual"></div>
<h5 class="decalaration">Declaration</h5>
<div class="codewrapper">
<pre><code class="lang-csharp hljs">IImmutableList<T> IImmutableList<T>.SetItem(int index, T value)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Name</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.int32">Int32</a></td>
<td><span class="parametername">index</span></td>
<td></td>
</tr>
<tr>
<td><span class="xref">T</span></td>
<td><span class="parametername">value</span></td>
<td></td>
</tr>
</tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-striped table-condensed">
<thead>
<tr>
<th>Type</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td><a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.immutable.iimmutablelist-1">IImmutableList</a><T></td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="implements">Implements</h3>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.immutable.iimmutablelist-1">System.Collections.Immutable.IImmutableList<T></a>
</div>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.ireadonlylist-1">System.Collections.Generic.IReadOnlyList<T></a>
</div>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.<API key>">System.Collections.Generic.IReadOnlyCollection<T></a>
</div>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1">System.Collections.Generic.IEnumerable<T></a>
</div>
<div>
<a class="xref" href="https://docs.microsoft.com/dotnet/api/system.collections.ienumerable">System.Collections.IEnumerable</a>
</div>
</article>
</div>
<div class="hidden-sm col-md-2" role="complementary">
<div class="sideaffix">
<div class="contribution">
<ul class="nav">
<li>
<a href="https:
</li>
<li>
<a href="https://github.com/benjamin-hodgson/Sawmill/blob/v2.2.0/Sawmill/Children.cs/#L61" class="contribution-link">View Source</a>
</li>
</ul>
</div>
<nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
<!-- <p><a class="back-to-top" href="#top">Back to top</a><p> -->
</nav>
</div>
</div>
</div>
</div>
<footer>
<div class="grad-bottom"></div>
<div class="footer">
<div class="container">
<span class="pull-right">
<a href="#top">Back to top</a>
</span>
<span>Generated by <strong>DocFX</strong></span>
</div>
</div>
</footer>
</div>
<script type="text/javascript" src="../styles/docfx.vendor.js"></script>
<script type="text/javascript" src="../styles/docfx.js"></script>
<script type="text/javascript" src="../styles/main.js"></script>
</body>
</html> |
package com.ibm.wala.ipa.callgraph.propagation;
import com.ibm.wala.ipa.callgraph.CGNode;
/**
* A pointer key which provides a unique set for each local in each call graph node.
*/
public class LocalPointerKey extends <API key> {
private final CGNode node;
private final int valueNumber;
public LocalPointerKey(CGNode node, int valueNumber) {
super();
this.node = node;
this.valueNumber = valueNumber;
if (valueNumber <= 0) {
throw new <API key>("illegal valueNumber: " + valueNumber);
}
if (node == null) {
throw new <API key>("null node");
}
}
@Override
public final boolean equals(Object obj) {
if (obj instanceof LocalPointerKey) {
LocalPointerKey other = (LocalPointerKey) obj;
return node.equals(other.node) && valueNumber == other.valueNumber;
} else {
return false;
}
}
@Override
public final int hashCode() {
return node.hashCode() * 23 + valueNumber;
}
@Override
public String toString() {
return "[" + node + ", v" + valueNumber + "]";
}
@Override
public final CGNode getNode() {
return node;
}
public final int getValueNumber() {
return valueNumber;
}
public final boolean isParameter() {
return valueNumber <= node.getMethod().<API key>();
}
} |
define([
'app/canvas',
'app/geom',
'app/colors',
'lib/gl-matrix',
'lib/lodash',
],
function (canvas, geom, colors, matrix, _) {
var render = {};
render.axes = {x: 150, y: 150, z: 0, sx: 100, sy: 100, sz: 100, r: 0, rx: 0, ry: 0, rz: 0, q: quat4.identity()};
render.rots = [];
render.lastRotAxis = '';
render.bounds = {};
render.init = function () {
canvas.init();
render.axes.q = quat4.identity();
};
render.addRotAxis = function (deg, axis) {
var rotObj = {
r: deg * (Math.PI / 180),
rx: 0,
ry: 0,
rz: 0
};
rotObj[axis] = 1;
quat4.multiply(render.axes.q, quat4.fromAngleAxis(
rotObj.r,
[
rotObj.rx,
rotObj.ry,
rotObj.rz
]
));
}
// Render
render.blok = function () {
var size = 64,
pxsize = 2;
if (window.devicePixelRatio) {
size *= window.devicePixelRatio;
pxsize *= window.devicePixelRatio;
}
// Outline
var dims = {
x: 0,
y: 0,
width: size,
height: size,
pxsize: pxsize,
offsetXY: 0,
clear: false
};
canvas.drawPoly(geom.pointsToHex([1, 2, 3, 4, 5, 6, 1], size), dims, [0, 0, 0, 255]);
// Inlay
canvas.drawPoly(geom.pointsToHex([6, 0, 2], size), dims, [0, 0, 0, 255]);
canvas.drawPoly(geom.pointsToHex([0, 4], size), dims, [0, 0, 0, 255]);
};
render.cubeVerts = [
// Front face
[
[-1.0, -1.0, 1.0],
[ 1.0, -1.0, 1.0],
[ 1.0, 1.0, 1.0],
[-1.0, 1.0, 1.0]
],
// Back face
[
[-1.0, -1.0, -1.0],
[-1.0, 1.0, -1.0],
[ 1.0, 1.0, -1.0],
[ 1.0, -1.0, -1.0]
],
// Top face
[
[-1.0, 1.0, -1.0],
[-1.0, 1.0, 1.0],
[ 1.0, 1.0, 1.0],
[ 1.0, 1.0, -1.0]
],
// Bottom face
[
[-1.0, -1.0, -1.0],
[ 1.0, -1.0, -1.0],
[ 1.0, -1.0, 1.0],
[-1.0, -1.0, 1.0]
],
// Right face
[
[ 1.0, -1.0, -1.0],
[ 1.0, 1.0, -1.0],
[ 1.0, 1.0, 1.0],
[ 1.0, -1.0, 1.0]
],
// Left face
[
[-1.0, -1.0, -1.0],
[-1.0, -1.0, 1.0],
[-1.0, 1.0, 1.0],
[-1.0, 1.0, -1.0]
]
];
render.test2 = function () {
var modelView = mat4.create(),
modelVerts = render.cubeVerts;
size = 128,
pxsize = 2,
points = [],
dims = {
x: 0,
y: 0,
width: 512,
height: 512,
pxsize: pxsize,
clear: false,
offset: 1,
bounds: {bx0: canvas.width, by0: canvas.height, bx1: -1, by1: -1}
},
gons = [],
trigons = [],
fillColors = [
[53, 249, 0, 255],
[38, 215, 0, 255],
[28, 186, 0, 255]
];
if (window.devicePixelRatio) {
size *= window.devicePixelRatio;
pxsize *= window.devicePixelRatio;
}
if (debug)
console.log(render.axes, [
render.axes.sx + render.axes.x,
render.axes.sy + render.axes.y,
render.axes.sz + render.axes.z
], modelView);
modelView = render.viewMatrix(render.axes);
/* Apply transformation matrix to polygons */
for (var m = 0, mm = modelVerts.length; m < mm; m++) {
points = [];
trigons = [];
canvas.lineBuffer = [],
normal = [];
normalDot = 0.0;
// Push each vector as a point, using the x/y values of that vector.
for (var v = 0, vv = modelVerts[m].length; v < vv; v++) {
var dest = vec3.create();
mat4.multiplyVec3(modelView, modelVerts[m][v], dest);
points.push(dest[0], dest[1]);
trigons.push([dest[0], dest[1], dest[2]]);
// Calculate bounding box.
if (dest[0] < dims.bounds.bx0)
dims.bounds.bx0 = Math.floor(dest[0]);
if (dest[0] > dims.bounds.bx1)
dims.bounds.bx1 = Math.ceil(dest[0]);
if (dest[1] < dims.bounds.by0)
dims.bounds.by0 = Math.floor(dest[1]);
if (dest[1] > dims.bounds.by1)
dims.bounds.by1 = Math.ceil(dest[1]);
}
// Backface culling
normal = render.surfaceNormal(trigons);
normalDot = vec3.dot([0, 0, -1], normal);
if (debug)
console.log(normal, normalDot);
if (normalDot > 0.0)
gons.push(points);
}
// Debug Bounds
if (debug)
gons.push([
dims.bounds.bx0, dims.bounds.by0,
dims.bounds.bx1, dims.bounds.by0,
dims.bounds.bx1, dims.bounds.by1,
dims.bounds.bx0, dims.bounds.by1
]);
render.bounds = dims.bounds;
/* Rasterization */
canvas.clear();
render.instructions();
// Faces
/*for (var fg = 0, fgg = gons.length; fg < fgg; fg++) {
canvas.fillPoly(gons[fg], fillColors[fg] || [0, 0, 0, 0]); // Top
}*/
// Lines
canvas.drawPolygons(gons, dims, [0, 0, 0, 255], fillColors);
// For testing purposes only
if (debug)
window.location.hash = JSON.stringify(render.axes);
}
render.generatePolygons = function (pos, view) {
var gons = [];
/* Apply transformation matrix to polygons */
for (var m = 0, mm = render.cubeVerts.length; m < mm; m++) {
var points = [],
trixels = [],
normal = [],
normalDot = 0.0;
// TODO make this work with multiple polygons
canvas.lineBuffer = [];
// Push each vector as a point, using the x/y values of that vector.
for (var v = 0, vv = render.cubeVerts[m].length; v < vv; v++) {
var vert = render.cubeVerts[m][v];
vec3.add(vert, pos);
var dest = vec3.create();
mat4.multiplyVec3(view, vert, dest);
// Pixel points
points.push(dest[0], dest[1]);
// For normals
trixels.push([dest[0], dest[1], dest[2]]);
// Calculate bounding box.
var bounds = render.dims.bounds;
if (dest[0] < bounds.bx0)
bounds.bx0 = Math.floor(dest[0]);
if (dest[0] > bounds.bx1)
bounds.bx1 = Math.ceil(dest[0]);
if (dest[1] < bounds.by0)
bounds.by0 = Math.floor(dest[1]);
if (dest[1] > bounds.by1)
bounds.by1 = Math.ceil(dest[1]);
render.dims.bounds = bounds;
}
// Backface culling
normal = render.surfaceNormal(trixels);
normalDot = vec3.dot([0, 0, -1], normal);
if (normalDot > 0.0)
gons.push(points);
else
console.log('points rejected');
}
return gons;
}
render.drawVoxels = function (voxels, view) {
var vox = [],
gons = [],
fillColors = [];
for (var v = 0, vv = 5; v < vv; v++) { //voxels.length
var vox = voxels[v];
console.log('voxel', vox);
gons.push(render.generatePolygons([vox[0], vox[1], vox[2]], view));
console.log('polygons', gons);
fillColors.push(colors.swatch[vox[3]].push(255));
}
console.log('bounds', render.dims.bounds, gons);
/* Rasterization */
canvas.clear();
for (var g = 0, gg = gons.length; g < gg; g++) {
canvas.drawPolygons(gons[g], render.dims, [0, 0, 0, 255], fillColors);
}
}
render.viewMatrix = function (axes) {
var modelView = mat4.create();
mat4.<API key>(axes.q, [
axes.sx + axes.x,
axes.sy + axes.y,
axes.sz + axes.z
], modelView);
mat4.scale(modelView,
[
axes.sx,
axes.sy,
axes.sz
]
);
return modelView;
}
// Newell's method
render.surfaceNormal = function (polygon) {
var normal = [0, 0, 0],
currentVertex = [0, 0, 0],
nextVertex = [0, 0, 0];
for (var v = 0, vv = polygon.length; v < vv; v++) {
currentVertex = polygon[v];
nextVertex = polygon[(v + 1) % polygon.length];
normal[0] += (currentVertex[1] - nextVertex[1]) * (currentVertex[2] + nextVertex[2]);
normal[1] += (currentVertex[2] - nextVertex[2]) * (currentVertex[0] + nextVertex[0]);
normal[2] += (currentVertex[0] - nextVertex[0]) * (currentVertex[1] + nextVertex[1]);
}
return vec3.normalize(normal);
}
render.dot = function (a, b) {
return(a[0]*b[0] + a[1]*b[1] + a[2]*b[2]);
}
render.instructions = function () {
var ctx = canvas.ctx[0];
ctx.fillStyle = '#000';
ctx.font = 12 * (window.devicePixelRatio || 1) + 'px monospace';
ctx.fillText('KEYS -- Rotate X: W/S, Y: A/D, Z: Q/E, Translate: Arrows, Scale: +/-', 10 * (window.devicePixelRatio || 1), 15 * (window.devicePixelRatio || 1));
}
return render;
}); |
import { createSelector } from 'reselect';
function sortByOrder(a,b) {
return a.order > b.order ? 1 : (a.order < b.order ? -1 : 0);
}
const getMessages = (state) => state.app.messages;
const sortMessages = messages => messages.sort(sortByOrder);
export const <API key> = () => {
return createSelector(
[ getMessages ],
(messages) => sortMessages(messages)
);
}; |
<API key>=function(){
this.list=[];
this.register=function(fnc){
if (typeof fnc !== "function")
throw new ilModelException("<API key>.register","fnc is not a function",{theFnc:fnc});
this.list.push(fnc);
};
this.send=function(event){
var newList=[];
for (var x=0; x<this.list.length; x++){
var fnc=this.list[x];
if (fnc(event)!==false)
newList.push(fnc);
}
this.list=newList;
};
this.length=function(){
return this.list.length;
};
}; |
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [sip.js](./sip.js.md) > [<API key>](./sip.js.<API key>.md) > [progress](./sip.js.<API key>.progress.md)
## <API key>.progress() method
13.3.1.1 Progress If the UAS is not able to answer the invitation immediately, it can choose to indicate some kind of progress to the UAC (for example, an indication that a phone is ringing). This is accomplished with a provisional response between 101 and 199. These provisional responses establish early dialogs and therefore follow the procedures of Section 12.1.1 in addition to those of Section 8.2.6. A UAS MAY send as many provisional responses as it likes. Each of these MUST indicate the same dialog ID. However, these will not be delivered reliably.
If the UAS desires an extended period of time to answer the INVITE, it will need to ask for an "extension" in order to prevent proxies from canceling the transaction. A proxy has the option of canceling a transaction when there is a gap of 3 minutes between responses in a transaction. To prevent cancellation, the UAS MUST send a non-100 provisional response at every minute, to handle the possibility of lost provisional responses. https://tools.ietf.org/html/rfc3261\#section-13.3.1.1
<b>Signature:</b>
typescript
progress(options?: ResponseOptions): <API key>;
## Parameters
| Parameter | Type | Description |
|
| options | <code>ResponseOptions</code> | Progress options bucket. |
<b>Returns:</b>
`<API key>` |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
namespace SampleMvc1.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
var model = new PageCommon () { Title = "Test Title", Message = "Test Message" };
return View (model: model);
}
/*
public ActionResult Details(int id)
{
return View ();
}
public ActionResult Create()
{
return View ();
}
[HttpPost]
public ActionResult Create(FormCollection collection)
{
try {
return RedirectToAction ("Index");
} catch {
return View ();
}
}
public ActionResult Edit(int id)
{
return View ();
}
[HttpPost]
public ActionResult Edit(int id, FormCollection collection)
{
try {
return RedirectToAction ("Index");
} catch {
return View ();
}
}
public ActionResult Delete(int id)
{
return View ();
}
[HttpPost]
public ActionResult Delete(int id, FormCollection collection)
{
try {
return RedirectToAction ("Index");
} catch {
return View ();
}
} */
}
} |
use std::collections::HashMap;
use std::net::SocketAddr;
use mioco;
use mioco::udp::UdpSocket;
use mioco::sync::mpsc::{channel, Receiver, Sender};
use sodiumoxide::crypto::secretbox as crypto_secretbox;
use ::Result;
use identity::{Identity, Extension};
use packet::*;
use keys::*;
use boxes::*;
use nonces::*;
use super::PacketProcessor;
pub struct ServerSocket {
recv_rx: Receiver<Vec<u8>>,
rem_addr: SocketAddr,
client_extension: Extension,
my_extension: Extension,
precomputed_key: PrecomputedKey,
next_send_nonce: Nonce8,
sock: UdpSocket,
internal_tx: Sender<()>,
}
impl ServerSocket {
pub fn recv(&mut self) -> Result<Vec<u8>> {
self.recv_rx.recv().or(Err("Couldnt read from recv channel".into()))
}
pub fn send(&mut self, msg: &[u8]) -> Result<usize> {
let server_msg_packet: Packet = ServerMessagePacket {
client_extension: self.client_extension.clone(),
server_extension: self.my_extension.clone(),
payload_box: ServerMessageBox::seal_precomputed(msg, &self.next_send_nonce, &self.precomputed_key),
}.into();
self.next_send_nonce.increment();
let sent = try!(server_msg_packet.send(&mut self.sock, &self.rem_addr));
if sent >= <API key> {
Ok(sent - <API key>)
} else {
Err("Header trimmed".into())
}
}
}
impl Drop for ServerSocket {
fn drop(&mut self) {
self.internal_tx.send(()).unwrap();
}
}
struct ListenerInternal {
my_extension: Extension,
my_long_term_sk: server_long_term::SecretKey,
minute_key: crypto_secretbox::Key,
last_minute_key: crypto_secretbox::Key,
conns: HashMap<(Extension, client_short_term::PublicKey), ServerConnection>,
accept_tx: Sender<ServerSocket>,
sock: UdpSocket,
internal_rx: Receiver<()>,
count: u32,
internal_tx: Sender<()>,
}
pub struct Listener {
accept_rx: Receiver<ServerSocket>,
internal_tx: Sender<()>,
}
impl Listener {
pub fn new(my_id: Identity, sock: UdpSocket) -> Listener {
let (_, my_long_term_sk, my_extension) = my_id.as_server();
let (accept_tx, accept_rx) = channel();
let (internal_tx, internal_rx) = channel();
let mut listener_internal = ListenerInternal {
my_extension: my_extension,
my_long_term_sk: my_long_term_sk,
minute_key: crypto_secretbox::gen_key(),
last_minute_key: crypto_secretbox::gen_key(),
conns: HashMap::new(),
accept_tx: accept_tx,
sock: sock,
internal_rx: internal_rx,
count: 1,
internal_tx: internal_tx.clone(),
};
mioco::spawn(move || -> Result<()> {
loop {
select!(
r:listener_internal.internal_rx => {
let _read = try!(listener_internal.internal_rx.recv()
.or(Err("Couldn't empty internal_chan stack")));
listener_internal.count = listener_internal.count.saturating_sub(1);
if listener_internal.count == 0 {
break;
}
},
r:listener_internal.sock => {
let (packet, rem_addr) = try!(Packet::recv(&mut listener_internal.sock));
try!(listener_internal.process_packet(packet, rem_addr));
}
);
}
Ok(())
});
Listener {
accept_rx: accept_rx,
internal_tx: internal_tx,
}
}
pub fn accept_sock(&mut self) -> Result<ServerSocket> {
self.accept_rx.recv().or(Err("Couldnt read accept channel".into()))
}
}
impl Drop for Listener {
fn drop(&mut self) {
self.internal_tx.send(()).unwrap();
}
}
impl ListenerInternal {
fn process_hello(&mut self, hello_packet: HelloPacket, rem_addr: SocketAddr) -> Result<()> {
let <API key> = hello_packet.<API key>;
let conn_key = (hello_packet.client_extension.clone(), <API key>.clone());
if self.conns.contains_key(&conn_key) {
debug!("Hello packet received on open connection");
return Ok(());
}
hello_packet.hello_box.open(&<API key>, &self.my_long_term_sk).unwrap();
let (<API key>, <API key>) = server_short_term::gen_keypair();
let cookie_packet: Packet = CookiePacket {
client_extension: hello_packet.client_extension.clone(),
server_extension: self.my_extension.clone(),
cookie_box: PlainCookieBox {
<API key>: <API key>,
server_cookie: PlainCookie {
<API key>: <API key>.clone(),
<API key>: <API key>.clone(),
}.seal(&CookieNonce::new_random(), &self.minute_key),
}.seal(&Nonce16::new_random(), &<API key>, &self.my_long_term_sk),
}.into();
try!(cookie_packet.send(&mut self.sock, &rem_addr));
Ok(())
}
fn process_initiate(&mut self, initiate_packet: InitiatePacket, rem_addr: SocketAddr) -> Result<()> {
let conn_key = (initiate_packet.client_extension.clone(), initiate_packet.<API key>.clone());
if self.conns.contains_key(&conn_key) {
debug!("Recv'd INITIATE on already initiated connection");
return Ok(());
}
let cookie = initiate_packet.server_cookie.open(&self.minute_key, &self.last_minute_key).unwrap();
let precomputed_key = PrecomputedKey::<API key>(&initiate_packet.<API key>, &cookie.<API key>);
let (initiate_box, payload) = initiate_packet.initiate_box.<API key>(&precomputed_key).unwrap();
let client_long_term_pk = initiate_box.client_long_term_pk;
let vouch = initiate_box.vouch.open(&client_long_term_pk, &self.my_long_term_sk).unwrap();
if vouch.<API key> != initiate_packet.<API key> {
return try!(Err("Invalid vouch"));
}
//TODO: Check if client_long_term_pk is accepted
let (recv_tx, recv_rx) = channel();
if let Some(msg) = payload {
recv_tx.send(msg).unwrap();
}
let new_conn = ServerConnection {
precomputed_key: precomputed_key.clone(),
recv_tx: recv_tx,
last_recv_nonce: initiate_packet.initiate_box.nonce.clone(),
};
self.conns.insert(conn_key, new_conn);
info!("\"{}\" accepting connection \"{}\"@{}", &self.my_extension, &initiate_packet.client_extension, &rem_addr);
let new_sock = ServerSocket {
recv_rx: recv_rx,
sock: self.sock.try_clone().unwrap(),
rem_addr: rem_addr,
client_extension: initiate_packet.client_extension.clone(),
my_extension: self.my_extension.clone(),
precomputed_key: precomputed_key,
next_send_nonce: Nonce8::new_low(),
internal_tx: self.internal_tx.clone(),
};
self.count = self.count.checked_add(1).unwrap();
self.accept_tx.send(new_sock).or(Err("Couldnt read accept channel".into()))
}
fn process_client_msg(&mut self, client_msg_packet: ClientMessagePacket, _rem_addr: SocketAddr) -> Result<()> {
let conn_key = (client_msg_packet.client_extension.clone(),
client_msg_packet.<API key>.clone());
if let Some(server_conn) = self.conns.get_mut(&conn_key) {
try!(server_conn.process_packet(client_msg_packet));
}
Ok(())
}
}
impl PacketProcessor for ListenerInternal {
fn process_packet(&mut self, packet: Packet, rem_addr: SocketAddr) -> Result<()> {
match packet {
Packet::ClientMessage(client_msg_packet) => {
try!(self.process_client_msg(client_msg_packet, rem_addr));
},
Packet::Initiate(initiate_packet) => {
try!(self.process_initiate(initiate_packet, rem_addr));
},
Packet::Hello(hello_packet) => {
try!(self.process_hello(hello_packet, rem_addr));
},
_ => {
debug!("Unvalid packet type");
}
}
Ok(())
}
}
struct ServerConnection {
precomputed_key: PrecomputedKey,
recv_tx: Sender<Vec<u8>>,
last_recv_nonce: Nonce8,
}
impl ServerConnection {
pub fn process_packet(&mut self, client_msg_packet: ClientMessagePacket) -> Result<()> {
if client_msg_packet.payload_box.nonce <= self.last_recv_nonce {
return Err("Bad nonce".into()); // TODO: Rework to allow some packet reordering
}
let msg = try!(client_msg_packet.payload_box.open_precomputed(&self.precomputed_key)
.or(Err("Bad encrypted message")));
self.last_recv_nonce = client_msg_packet.payload_box.nonce;
try!(self.recv_tx.send(msg).or(Err("Couldnt write to recv channel")));
Ok(())
}
} |
// Select list of users, starting by pattern (or exact match)
'use strict';
function escapeRegexp(source) {
return String(source).replace(/([.?*+^$[\]\\(){}|-])/g, '\\$1');
}
// - nick - first letters of nick
// - strict - exact match when true
module.exports = function (N, apiPath) {
N.validate(apiPath, {
nick: { type: 'string', required: true },
strict: { type: 'boolean', required: true }
});
N.wire.on(apiPath, async function moderator_find_user(env) {
if (env.params.nick.length < 3 && !env.params.strict) {
env.res = [];
return;
}
var query = N.models.users.User.find();
if (env.params.strict) {
query.where('nick').equals(env.params.nick);
} else {
query.where('nick_normalized_lc').regex(new RegExp('^' + escapeRegexp(env.params.nick.toLowerCase())));
}
env.res = await query.limit(10)
.select('_id name nick')
.sort('nick')
.lean(true);
});
}; |
from lxml import etree
from healthvaultlib.utils.xmlutils import XmlUtils
from healthvaultlib.itemtypes.healthrecorditem import HealthRecordItem
class Medication(HealthRecordItem):
def __init__(self, thing_xml=None):
super(Medication, self).__init__()
self.type_id = '<API key>'
if thing_xml is not None:
self.thing_xml = thing_xml
self.parse_thing()
def __str__(self):
return 'Medication'
def parse_thing(self):
super(Medication, self).parse_thing()
xmlutils = XmlUtils(self.thing_xml)
def write_xml(self):
thing = super(Medication, self).write_xml()
data_xml = etree.Element('data-xml')
medication = etree.Element('medication')
data_xml.append(medication)
thing.append(data_xml)
return thing |
import { connect } from 'react-redux'
import { enumSubFolders, enumItems } from '../actions/index'
import { Folder, AppState } from '../RendererTypes'
import { Explorer, StateByProps, DispatchByProps } from '../components/Explorer'
const mapStateToProps = (state: AppState): StateByProps => ({
folders: state.folders,
currentFolder: state.currentFolder
})
const mapDispatchToProps = (dispatch: any): DispatchByProps => ({
enumSubFolders: (folderPath: string) => {
dispatch(enumSubFolders(folderPath))
},
enumItems: (folder: Folder) => {
dispatch(enumItems(folder))
}
})
export const Container = connect(mapStateToProps, mapDispatchToProps)(Explorer) |
package CIM.IEC61968.PaymentMetering;
import org.eclipse.emf.common.util.EList;
public interface VendorShift extends Shift {
/**
* Returns the value of the '<em><b>Receipts</b></em>' reference list.
* The list contents are of type {@link CIM.IEC61968.PaymentMetering.Receipt}.
* It is bidirectional and its opposite is '{@link CIM.IEC61968.PaymentMetering.Receipt#getVendorShift <em>Vendor Shift</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Receipts</em>' reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Receipts</em>' reference list.
* @see CIM.IEC61968.PaymentMetering.<API key>#<API key>()
* @see CIM.IEC61968.PaymentMetering.Receipt#getVendorShift
* @model opposite="VendorShift"
* @generated
*/
EList<Receipt> getReceipts();
float <API key>();
/**
* Sets the value of the '{@link CIM.IEC61968.PaymentMetering.VendorShift#<API key> <em>Merchant Debit Amount</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Merchant Debit Amount</em>' attribute.
* @see #<API key>()
* @generated
*/
void <API key>(float value);
Vendor getVendor();
/**
* Sets the value of the '{@link CIM.IEC61968.PaymentMetering.VendorShift#getVendor <em>Vendor</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Vendor</em>' reference.
* @see #getVendor()
* @generated
*/
void setVendor(Vendor value);
/**
* Returns the value of the '<em><b>Transactions</b></em>' reference list.
* The list contents are of type {@link CIM.IEC61968.PaymentMetering.Transaction}.
* It is bidirectional and its opposite is '{@link CIM.IEC61968.PaymentMetering.Transaction#getVendorShift <em>Vendor Shift</em>}'.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Transactions</em>' reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Transactions</em>' reference list.
* @see CIM.IEC61968.PaymentMetering.<API key>#<API key>()
* @see CIM.IEC61968.PaymentMetering.Transaction#getVendorShift
* @model opposite="VendorShift"
* @generated
*/
EList<Transaction> getTransactions();
MerchantAccount getMerchantAccount();
/**
* Sets the value of the '{@link CIM.IEC61968.PaymentMetering.VendorShift#getMerchantAccount <em>Merchant Account</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Merchant Account</em>' reference.
* @see #getMerchantAccount()
* @generated
*/
void setMerchantAccount(MerchantAccount value);
boolean isPosted();
/**
* Sets the value of the '{@link CIM.IEC61968.PaymentMetering.VendorShift#isPosted <em>Posted</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Posted</em>' attribute.
* @see #isPosted()
* @generated
*/
void setPosted(boolean value);
} // VendorShift |
# XPath/XQuery Course Catalog Extra Exercises Answers
This is the seemingly correct answers to the XPath/XQuery Course Catalog Extra
exercises from [Prof. J. Widom][2] (infamous :) db class.
The `XML` data is located [here][1].
Return the course number of the course that is cross-listed as `LING180`.
xquery
let $cat_ref := doc("courses.xml")/Course_Catalog
return data($cat_ref//Course[contains(data(Description), 'LING180')]/@Number)
Return course numbers of courses that have the same title as some other course.
Hint: You might want to use the `preceding` and `following` navigation axes for
this query, which were not covered in the video or our demo script; they match
any preceding or following node, not just siblings.
xquery
let $cat_ref := doc("courses.xml")/Course_Catalog
return data($cat_ref//Course[
(./following::Course/Title = ./Title) or
(./preceding::Course/Title = ./Title)]/@Number)
Return course numbers of courses taught by an instructor with first
name `Daphne` or `Julie`.
xquery
let $cat_ref := doc("courses.xml")/Course_Catalog
return data($cat_ref//Course/Instructors/(Lecturer | Professor)[
./First_Name = 'Daphne' or
./First_Name = 'Julie'
]/parent::*/parent::Course/@Number)
Return the number (`count`) of courses that have no lecturers as instructors.
xquery
let $cat_ref := doc("courses.xml")/Course_Catalog
return count($cat_ref//Course/Instructors[count(Lecturer) = 0])
Return titles of courses taught by the chair of a department. For this question, you
may assume that all professors have distinct last names.
xquery
let $cat_ref := doc("courses.xml")/Course_Catalog
return $cat_ref//Course/Instructors/Professor[./Last_Name =
./parent::Instructors/parent::Course/parent::Department/Chair/Professor/Last_Name
]/parent::Instructors/parent::Course/Title
Return titles of courses that have both a lecturer and a professor as instructors.
Return each title only once.
xquery
let $cat_ref := doc("courses.xml")/Course_Catalog
let $courses := distinct-values($cat_ref//Course/Instructors[
count(Lecturer) > 0 and count(Professor) > 0
]/parent::Course/Title)
return
(for $c in $courses
return <Title>{$c}</Title>)
Return titles of courses taught by a professor with the last name `Ng` but not
by a professor with the last name `Thrun`.
xquery
let $c_ref := doc("courses.xml")/Course_Catalog//Course
return $c_ref/Instructors/Professor[./Last_Name = 'Ng' and
not(./following-sibling::*/Last_Name = 'Thrun') and
not(./preceding-sibling::*/Last_Name = 'Thrun')]/parent::*/parent::*/Title
Return course numbers of courses that have a course taught by Eric Roberts
as a prerequisite.
xquery
let $cat_ref := doc("courses.xml")/Course_Catalog
let $er_c := data($cat_ref//Course/Instructors/Professor[
./Last_Name = 'Roberts' and ./First_Name = 'Eric'
]/parent::*/parent::*/@Number)
let $c_num := (for $pre in $cat_ref//Prereq
for $num in $er_c
where $num = $pre
return data($pre/parent::*/parent::*/@Number))
return $c_num
Create a summary of CS classes: List all CS department courses in
order of enrollment. For each course include only its Enrollment
(as an attribute) and its Title (as a sub-element).
xquery
let $cat_ref := doc("courses.xml")/Course_Catalog
let $courses := (for $c in $cat_ref//Course[
./parent::Department/@Code = 'CS' and ./@Enrollment > 0]
order by xs:int($c/@Enrollment)
return
<Course Enrollment="{$c/@Enrollment}">
{$c/Title}
</Course>
)
return <Summary>{$courses}</Summary>
## Q10
Return a `Professors` element that contains as sub-elements a listing of all professors in all
departments, sorted by last name with each professor appearing once. The `Professor`
sub-elements should have the same structure as in the original data. For this question,
you may assume that all professors have distinct last names. Watch out -- the presence/absence
of middle initials may require some special handling.
This problem is quite challenging; congratulations if you get it right.
xquery
let $cat_ref := doc("courses.xml")/Course_Catalog
let $p_last_names := distinct-values($cat_ref//Professor/Last_Name)
return <Professors>
{for $lname in $p_last_names
let $c_p := ($cat_ref//Professor[./Last_Name = $lname])[1]
order by $lname
return $c_p}
</Professors>
## Q11
Expanding on the previous question (**Q10**), create an inverted course listing: Return an
`<API key>` element that contains as sub-elements professors together with
the courses they teach, sorted by last name. You may still assume that all professors have
distinct last names. The `Professor` sub-elements should have the same structure as in the
original data, with an additional single `Courses` sub-element under `Professor`, containing
a further `Course` sub-element for each course number taught by that professor. `Professors`
who do not teach any courses should have no `Courses` sub-element at all.
This problem is very challenging; extra congratulations if you get it right.
xquery
let $cat_ref := doc("courses.xml")/Course_Catalog
let $p_last_names := distinct-values($cat_ref//Professor/Last_Name)
let $prof :=
(for $lname in $p_last_names
let $c_p := ($cat_ref//Professor[./Last_Name = $lname])[1]
let $p_course :=
(for $c_p in $cat_ref//Course[./Instructors/Professor/Last_Name = $lname]
return <Course>{data($c_p/@Number)}</Course>)
order by $lname
return
<Professor>
{$c_p/First_Name}
{$c_p/Middle_Initial}
{$c_p/Last_Name}
{
if(count($p_course) > 0)
then <Courses>{$p_course}</Courses>
else ()}
</Professor>)
return
<<API key>>
{$prof}
</<API key>>
[1]: xml-data/courses-noID.xml
[2]: http://cs.stanford.edu/people/widom/ |
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="generator" content="Source Themes Academic 4.4.0">
<meta name="author" content="Lorena Pantano">
<meta name="description" content="Senior Computational Biologist">
<link rel="alternate" hreflang="en-us" href="http://lpantano.github.io/tags/small-rnaseq/">
<meta name="theme-color" content="#2962ff">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/academicons/1.8.6/css/academicons.min.css" integrity="<API key>+<API key>=" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.0/css/all.css" integrity="<API key>+h" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.2.5/jquery.fancybox.min.css" integrity="<API key>+U5S2idbLtxs=" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/styles/github.min.css" crossorigin="anonymous" title="hl-light">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/styles/dracula.min.css" crossorigin="anonymous" title="hl-dark" disabled>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Montserrat:400,700|Roboto:400,400italic,700|Roboto+Mono&display=swap">
<link rel="stylesheet" href="/css/academic.min.<API key>.css">
<link rel="alternate" href="/tags/small-rnaseq/index.xml" type="application/rss+xml" title="My BioBits">
<link rel="manifest" href="/site.webmanifest">
<link rel="icon" type="image/png" href="/img/icon.png">
<link rel="apple-touch-icon" type="image/png" href="/img/icon-192.png">
<link rel="canonical" href="http://lpantano.github.io/tags/small-rnaseq/">
<meta property="twitter:card" content="summary">
<meta property="twitter:site" content="@lopantano">
<meta property="twitter:creator" content="@lopantano">
<meta property="og:site_name" content="My BioBits">
<meta property="og:url" content="http://lpantano.github.io/tags/small-rnaseq/">
<meta property="og:title" content="small RNAseq | My BioBits">
<meta property="og:description" content="Senior Computational Biologist"><meta property="og:image" content="http://lpantano.github.io/img/icon-192.png">
<meta property="twitter:image" content="http://lpantano.github.io/img/icon-192.png"><meta property="og:locale" content="en-us">
<meta property="og:updated_time" content="2017-03-20T17:50:01-04:00">
<title>small RNAseq | My BioBits</title>
</head>
<body id="top" data-spy="scroll" data-offset="70" data-target="#TableOfContents" >
<aside class="search-results" id="search">
<div class="container">
<section class="search-header">
<div class="row no-gutters <API key> mb-3">
<div class="col-6">
<h1>Search</h1>
</div>
<div class="col-6 col-search-close">
<a class="js-search" href="#"><i class="fas fa-times-circle text-muted" aria-hidden="true"></i></a>
</div>
</div>
<div id="search-box">
<input name="q" id="search-query" placeholder="Search..." autocapitalize="off"
autocomplete="off" autocorrect="off" spellcheck="false" type="search">
</div>
</section>
<section class="<API key>">
<div id="search-hits">
</div>
</section>
</div>
</aside>
<nav class="navbar navbar-light fixed-top navbar-expand-lg py-0 <API key>" id="navbar-main">
<div class="container">
<a class="navbar-brand" href="/">My BioBits</a>
<button type="button" class="navbar-toggler" data-toggle="collapse"
data-target="#navbar" aria-controls="navbar" aria-expanded="false" aria-label="Toggle navigation">
<span><i class="fas fa-bars"></i></span>
</button>
<div class="collapse navbar-collapse" id="navbar">
<ul class="navbar-nav mr-auto">
<li class="nav-item">
<a class="nav-link " href="/#about"><span>Home</span></a>
</li>
<li class="nav-item">
<a class="nav-link " href="/#posts"><span>Posts</span></a>
</li>
<li class="nav-item">
<a class="nav-link " href="/#featured"><span>Publications</span></a>
</li>
<li class="nav-item">
<a class="nav-link " href="/#talks"><span>Talks</span></a>
</li>
<li class="nav-item">
<a class="nav-link " href="/#contact"><span>Contact</span></a>
</li>
</ul>
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link js-search" href="#"><i class="fas fa-search" aria-hidden="true"></i></a>
</li>
<li class="nav-item">
<a class="nav-link js-dark-toggle" href="#"><i class="fas fa-moon" aria-hidden="true"></i></a>
</li>
</ul>
</div>
</div>
</nav>
<div class="universal-wrapper pt-3">
<h1 itemprop="name">small RNAseq</h1>
</div>
<div class="universal-wrapper">
<div>
<h2><a href="/post/legacy/<API key>/">DEGreport to plot nice RNA-seq figures</a></h2>
<div class="article-style">
Differentially gene expression analysis with RNA-seq data is quite common nowadays, and there are pretty good Bioconductor packages for that: limma::voom, DESeq2 …
The code for that part is quite simple, being super quick to get a list of de-regulated genes. However, downstream analyses vary a lot depending on the project itself. But I found myself doing the same plots and analyses many times for different project, so I put together a bunch of plots and analyses using code from my colleagues at work (@HSPH bioinformatics core) and myself.
</div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js" integrity="<API key>=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.imagesloaded/4.1.4/imagesloaded.pkgd.min.js" integrity="<API key>/<API key>=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.isotope/3.0.6/isotope.pkgd.min.js" integrity="<API key>/iI=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fancybox/3.2.5/jquery.fancybox.min.js" integrity="sha256-X5PoE3KU5l+JcX+w09p/<API key>=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.15.6/highlight.min.js" integrity="<API key>/1c8s1dgkYPQ8=" crossorigin="anonymous"></script>
<script>hljs.<API key>();</script>
<script>
const <API key> = "/index.json";
const i18n = {
'placeholder': "Search...",
'results': "results found",
'no_results': "No results found"
};
const content_type = {
'post': "Posts",
'project': "Projects",
'publication' : "Publications",
'talk' : "Talks"
};
</script>
<script id="<API key>" type="text/x-template">
<div class="search-hit" id="summary-{{key}}">
<div class="search-hit-content">
<div class="search-hit-name">
<a href="{{relpermalink}}">{{title}}</a>
<div class="article-metadata search-hit-type">{{type}}</div>
<p class="<API key>">{{snippet}}</p>
</div>
</div>
</div>
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fuse.js/3.2.1/fuse.min.js" integrity="<API key>+<API key>=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/mark.js/8.11.1/jquery.mark.min.js" integrity="<API key>=" crossorigin="anonymous"></script>
<script src="/js/academic.min.<API key>.js"></script>
<div class="container">
<footer class="site-footer">
<p class="powered-by">
Powered by the
<a href="https://sourcethemes.com/academic/" target="_blank" rel="noopener">Academic theme</a> for
<a href="https://gohugo.io" target="_blank" rel="noopener">Hugo</a>.
<span class="float-right" aria-hidden="true">
<a href="#" id="back_to_top">
<span class="button_icon">
<i class="fas fa-chevron-up fa-2x"></i>
</span>
</a>
</span>
</p>
</footer>
</div>
<div id="modal" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">Cite</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<pre><code class="tex hljs"></code></pre>
</div>
<div class="modal-footer">
<a class="btn btn-outline-primary my-1 js-copy-cite" href="#" target="_blank">
<i class="fas fa-copy"></i> Copy
</a>
<a class="btn btn-outline-primary my-1 js-download-cite" href="#" target="_blank">
<i class="fas fa-download"></i> Download
</a>
<div id="modal-error"></div>
</div>
</div>
</div>
</div>
</body>
</html> |
#!/bin/sh
# CYBERWATCH SAS - 2017
# Security fix for RHSA-2016:0617
# Operating System: Red Hat 6
# Architecture: x86_64
# - kernel.x86_64:2.6.32-504.46.1.el6
# - kernel-debug.x86_64:2.6.32-504.46.1.el6
# - <API key>.i686:2.6.32-504.46.1.el6
# - <API key>.x86_64:2.6.32-504.46.1.el6
# - kernel-debug-devel.i686:2.6.32-504.46.1.el6
# - kernel-debug-devel.x86_64:2.6.32-504.46.1.el6
# - kernel-debuginfo.i686:2.6.32-504.46.1.el6
# - kernel-debuginfo.x86_64:2.6.32-504.46.1.el6
# - <API key>.i686:2.6.32-504.46.1.el6
# - <API key>.x86_64:2.6.32-504.46.1.el6
# - kernel-devel.x86_64:2.6.32-504.46.1.el6
# - kernel-headers.x86_64:2.6.32-504.46.1.el6
# - perf.x86_64:2.6.32-504.46.1.el6
# - perf-debuginfo.i686:2.6.32-504.46.1.el6
# - perf-debuginfo.x86_64:2.6.32-504.46.1.el6
# - <API key>.i686:2.6.32-504.46.1.el6
# - <API key>.x86_64:2.6.32-504.46.1.el6
# - python-perf.x86_64:2.6.32-504.46.1.el6
# Last versions recommanded by security team:
# - kernel.x86_64:2.6.32-220.69.1.el6
# - kernel-debug.x86_64:2.6.32-220.69.1.el6
# - <API key>.i686:2.6.32-642.13.1.el6
# - <API key>.x86_64:2.6.32-220.69.1.el6
# - kernel-debug-devel.i686:2.6.32-642.13.1.el6
# - kernel-debug-devel.x86_64:2.6.32-220.69.1.el6
# - kernel-debuginfo.i686:2.6.32-642.13.1.el6
# - kernel-debuginfo.x86_64:2.6.32-220.69.1.el6
# - <API key>.i686:2.6.32-642.13.1.el6
# - <API key>.x86_64:2.6.32-220.69.1.el6
# - kernel-devel.x86_64:2.6.32-220.69.1.el6
# - kernel-headers.x86_64:2.6.32-220.69.1.el6
# - perf.x86_64:2.6.32-220.69.1.el6
# - perf-debuginfo.i686:2.6.32-642.13.1.el6
# - perf-debuginfo.x86_64:2.6.32-220.69.1.el6
# - <API key>.i686:2.6.32-642.13.1.el6
# - <API key>.x86_64:2.6.32-220.69.1.el6
# - python-perf.x86_64:2.6.32-220.69.1.el6
# CVE List:
# - CVE-2016-0774
# - CVE-2015-1805
# More details:
sudo yum install kernel.x86_64-2.6.32 -y
sudo yum install kernel-debug.x86_64-2.6.32 -y
sudo yum install <API key>.i686-2.6.32 -y
sudo yum install <API key>.x86_64-2.6.32 -y
sudo yum install kernel-debug-devel.i686-2.6.32 -y
sudo yum install kernel-debug-devel.x86_64-2.6.32 -y
sudo yum install kernel-debuginfo.i686-2.6.32 -y
sudo yum install kernel-debuginfo.x86_64-2.6.32 -y
sudo yum install <API key>.i686-2.6.32 -y
sudo yum install <API key>.x86_64-2.6.32 -y
sudo yum install kernel-devel.x86_64-2.6.32 -y
sudo yum install kernel-headers.x86_64-2.6.32 -y
sudo yum install perf.x86_64-2.6.32 -y
sudo yum install perf-debuginfo.i686-2.6.32 -y
sudo yum install perf-debuginfo.x86_64-2.6.32 -y
sudo yum install <API key>.i686-2.6.32 -y
sudo yum install <API key>.x86_64-2.6.32 -y
sudo yum install python-perf.x86_64-2.6.32 -y |
package com.breadwallet.crypto;
import com.google.common.base.Optional;
import com.google.common.primitives.UnsignedLong;
import java.util.Date;
import java.util.concurrent.TimeUnit;
public final class <API key> {
private final UnsignedLong blockNumber;
private final UnsignedLong transactionIndex;
private final Date timestamp;
private final Optional<Amount> fee;
public <API key>(UnsignedLong blockNumber, UnsignedLong transactionIndex, UnsignedLong timestamp, Optional<Amount> fee) {
this.blockNumber = blockNumber;
this.transactionIndex = transactionIndex;
this.timestamp = new Date(TimeUnit.SECONDS.toMillis(timestamp.longValue()));
this.fee = fee;
}
public UnsignedLong getBlockNumber() {
return blockNumber;
}
public UnsignedLong getTransactionIndex() {
return transactionIndex;
}
public Date getConfirmationTime() {
return timestamp;
}
public Optional<Amount> getFee() {
return fee;
}
} |
# bluetooth-keyboard
This PXT package allows the micro:bit to act as a Keyboard peripheral.
## Usage
Place a ``||bluetooth start keyboard service||`` block in your program to enable Bluetooth LE Keyboard.
With this block, the `micro:bit` starts advertise BLE packets as a Keyboard peripheral.
blocks
bluetooth.<API key>();
**TBD**
To Send `Hello World!` to the paired host, place block like this:
blocks
bluetooth.keyboardSendText("Hello World!");
## Supported Platforms
Currently, tested with `micro:bit` and `Android` host only.
Mac OS X can connect with `micro:bit`, but it can't receive Keyboard message.
## Supported targets
* for PXT/microbit
(The metadata above is needed for package search.)
MIT
package
bluetooth
bluetooth-keyboard=github:kshoji/<API key> |
namespace OzekiDemoSoftphone.PM.Data
{
<summary>
TODO
</summary>
public class DSPInfo
{
}
} |
$(function () {
var kitty = new ComputeModel({
name: 'ToobSox',
weight: 12,
sassLevel: 'notSassy',
isFatAndSassy: function (weight, sassLevel) {
return weight > 14 && ['quiteSassy', 'ludicrouslySassy'].indexOf(sassLevel) >= 0;
}.computed('weight', 'sassLevel'),
description: function (name, isFatAndSassy) {
return name + (isFatAndSassy ? ', Jedi Cat' : ', Padawan Learner Kitten');
}.computed('name', 'isFatAndSassy')
});
var template = Handlebars.compile($('#my-template').html());
function render() {
$('#content').html(template({
name: kitty.get('name'),
description: kitty.get('description')
}));
}
kitty.<API key>(render);
render();
// Set up input handlers
$('#name').keyup(function (event) {
kitty.set('name', $(event.target).val());
});
$('#weight').keyup(function (event) {
kitty.set('weight', +$(event.target).val());
});
$('input[type="radio"]').click(function (event) {
kitty.set('sassLevel', $(event.target).val());
});
}); |
require 'thor'
module Pug
module Worker
class CLI < Thor
desc 'start', 'Starts worker application'
method_option :pool_size, type: :numeric
method_option :pid_path, type: :string
method_option :daemonize, type: :boolean
def start
configure
run
end
private
def configure
Pug::Worker.configuration = Configuration.new method_options
end
def run
Daemon.new(Application.new).run
end
def method_options
@method_options ||= Utils.symbolize_keys options
end
end
end
end |
<!DOCTYPE html PUBLIC "-
<html xmlns="http:
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>V8 API Reference Guide for node.js v0.9.10: v8::RetainedObjectInfo Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">V8 API Reference Guide for node.js v0.9.10
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class List</span></a></li>
<li><a href="classes.html"><span>Class Index</span></a></li>
<li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="<API key>">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespacev8.html">v8</a></li><li class="navelem"><a class="el" href="<API key>.html">RetainedObjectInfo</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="<API key>.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">v8::RetainedObjectInfo Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header
<div class="contents">
<p><code>#include <<a class="el" href="<API key>.html">v8-profiler.h</a>></code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">virtual void </td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>">Dispose</a> ()=0</td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">virtual bool </td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>">IsEquivalent</a> (<a class="el" href="<API key>.html">RetainedObjectInfo</a> *other)=0</td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">virtual intptr_t </td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>">GetHash</a> ()=0</td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">virtual const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>">GetLabel</a> ()=0</td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">virtual const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>">GetGroupLabel</a> ()</td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">virtual intptr_t </td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>">GetElementCount</a> ()</td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:<API key>"><td class="memItemLeft" align="right" valign="top">virtual intptr_t </td><td class="memItemRight" valign="bottom"><a class="el" href="<API key>.html#<API key>">GetSizeInBytes</a> ()</td></tr>
<tr class="separator:<API key>"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Interface for providing information about embedder's objects held by global handles. This information is reported in two ways:</p>
<ol type="1">
<li>When calling AddObjectGroup, an embedder may pass <a class="el" href="<API key>.html">RetainedObjectInfo</a> instance describing the group. To collect this information while taking a heap snapshot, <a class="el" href="classv8_1_1_v8.html">V8</a> calls GC prologue and epilogue callbacks.</li>
<li>When a heap snapshot is collected, <a class="el" href="classv8_1_1_v8.html">V8</a> additionally requests RetainedObjectInfos for persistent handles that were not previously reported via AddObjectGroup.</li>
</ol>
<p>Thus, if an embedder wants to provide information about native objects for heap snapshots, he can do it in a GC prologue handler, and / or by assigning wrapper class ids in the following way:</p>
<ol type="1">
<li>Bind a callback to class id by calling DefineWrapperClass.</li>
<li>Call SetWrapperClassId on certain persistent handles.</li>
</ol>
<p><a class="el" href="classv8_1_1_v8.html">V8</a> takes ownership of <a class="el" href="<API key>.html">RetainedObjectInfo</a> instances passed to it and keeps them alive only during snapshot collection. Afterwards, they are freed by calling the Dispose class function. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="<API key>"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void v8::RetainedObjectInfo::Dispose </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Called by <a class="el" href="classv8_1_1_v8.html">V8</a> when it no longer needs an instance. </p>
</div>
</div>
<a class="anchor" id="<API key>"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual intptr_t v8::RetainedObjectInfo::GetElementCount </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns element count in case if a global handle retains a subgraph by holding one of its nodes. </p>
</div>
</div>
<a class="anchor" id="<API key>"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual const char* v8::RetainedObjectInfo::GetGroupLabel </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns human-readable group label. It must be a null-terminated UTF-8 encoded string. <a class="el" href="classv8_1_1_v8.html">V8</a> copies its contents during a call to GetGroupLabel. Heap snapshot generator will collect all the group names, create top level entries with these names and attach the objects to the corresponding top level group objects. There is a default implementation which is required because embedders don't have their own implementation yet. </p>
</div>
</div>
<a class="anchor" id="<API key>"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual intptr_t v8::RetainedObjectInfo::GetHash </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns hash value for the instance. Equivalent instances must have the same hash value. </p>
</div>
</div>
<a class="anchor" id="<API key>"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual const char* v8::RetainedObjectInfo::GetLabel </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns human-readable label. It must be a null-terminated UTF-8 encoded string. <a class="el" href="classv8_1_1_v8.html">V8</a> copies its contents during a call to GetLabel. </p>
</div>
</div>
<a class="anchor" id="<API key>"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual intptr_t v8::RetainedObjectInfo::GetSizeInBytes </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns embedder's object size in bytes. </p>
</div>
</div>
<a class="anchor" id="<API key>"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual bool v8::RetainedObjectInfo::IsEquivalent </td>
<td>(</td>
<td class="paramtype"><a class="el" href="<API key>.html">RetainedObjectInfo</a> * </td>
<td class="paramname"><em>other</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns whether two instances are equivalent. </p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>deps/v8/include/<a class="el" href="<API key>.html">v8-profiler.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Aug 11 2015 23:48:48 for V8 API Reference Guide for node.js v0.9.10 by &
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.9.1
</small></address>
</body>
</html> |
<!DOCTYPE html>
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<!-- three.js library -->
<script src='vendor/three.js/build/three.js'></script>
<script src="vendor/three.js/examples/js/libs/stats.min.js"></script>
<!-- jsartookit -->
<script src="../vendor/jsartoolkit5/build/artoolkit.min.js"></script>
<script src="../vendor/jsartoolkit5/js/artoolkit.api.js"></script>
<!-- include threex.artoolkit -->
<script src="../src/threex/<API key>.js"></script>
<script src="../src/threex/<API key>.js"></script>
<script src="../src/threex/<API key>.js"></script>
<script src="../src/threex/<API key>.js"></script>
<script src="../src/threex/<API key>.js"></script>
<script>THREEx.ArToolkitContext.baseURL = '../'</script>
<body style='margin : 0px; overflow: hidden; font-family: Monospace;'><div style='position: absolute; top: 10px; width:100%; text-align: center;z-index:1';>
<a href="https://github.com/jeromeetienne/AR.js/" target="_blank">AR.js</a> - developement playground
<br/>
Contact me any time at <a href='https://twitter.com/jerome_etienne' target='_blank'>@jerome_etienne</a>
</div>
<div style='position: absolute;bottom: 0;right: 0;background-color: rgba(255,255,255,0.4); padding: 1em; z-index: 1;'>
<label title='Select the profile you like'>Profile :
<select id='artoolkitProfile'>
<option value="desktop-fast">desktop-fast</option>
<option value="desktop-normal">desktop-normal</option>
<option value="phone-normal">phone-normal</option>
<option value="phone-slow">phone-slow</option>
<option value="dynamic" selected>dynamic</option>
</select>
</label>
</div>
<script>
// Init
// init renderer
var renderer = new THREE.WebGLRenderer({
// antialias : true,
alpha: true
});
renderer.setClearColor(new THREE.Color('lightgrey'), 0)
// renderer.setPixelRatio( 2 );
renderer.setSize( window.innerWidth, window.innerHeight );
renderer.domElement.style.position = 'absolute'
renderer.domElement.style.top = '0px'
renderer.domElement.style.left = '0px'
document.body.appendChild( renderer.domElement );
// array of functions for the rendering loop
var onRenderFcts= [];
// init scene and camera
var scene = new THREE.Scene();
var ambient = new THREE.AmbientLight( 0x666666 );
scene.add( ambient );
var directionalLight = new THREE.DirectionalLight( 0x887766 );
directionalLight.position.set( -1, 1, 1 ).normalize();
scene.add( directionalLight );
// Initialize a basic camera
// Create a camera
var camera = new THREE.Camera();
scene.add(camera);
// handle profile ui
if( localStorage.getItem('<API key>') !== null ){
var domElement = document.querySelector('#artoolkitProfile')
domElement.value = localStorage.getItem('<API key>')
}
document.querySelector('#artoolkitProfile').addEventListener('change', function(){
var domElement = document.querySelector('#artoolkitProfile')
localStorage.setItem('<API key>', domElement.value);
location.reload();
})
// handle ArToolkitProfile
var artoolkitProfile = new THREEx.ArToolkitProfile()
artoolkitProfile.sourceWebcam()
// artoolkitProfile.sourceVideo(THREEx.ArToolkitContext.baseURL + '../data/videos/headtracking.mp4').kanjiMarker();
// artoolkitProfile.sourceImage(THREEx.ArToolkitContext.baseURL + '../data/images/img.jpg').hiroMarker()
// artoolkitProfile.performance('desktop-fast')
if( localStorage.getItem('<API key>') !== null ){
var label = localStorage.getItem('<API key>')
console.log('Using stored profile', label)
artoolkitProfile.performance(label)
}
// handle arToolkitSource
var arToolkitSource = new THREEx.ArToolkitSource(artoolkitProfile.sourceParameters)
arToolkitSource.init(function onReady(){
onResize()
})
// handle resize
window.addEventListener('resize', function(){
onResize()
})
function onResize(){
arToolkitSource.onResizeElement()
arToolkitSource.copyElementSizeTo(renderer.domElement)
if( arToolkitContext.arController !== null ){
arToolkitSource.copyElementSizeTo(arToolkitContext.arController.canvas)
}
}
// initialize arToolkitContext
// create atToolkitContext
var arToolkitContext = new THREEx.ArToolkitContext(artoolkitProfile.contextParameters)
// initialize it
arToolkitContext.init(function onCompleted(){
// copy projection matrix to camera
camera.projectionMatrix.copy( arToolkitContext.getProjectionMatrix() );
})
// update artoolkit on every frame
onRenderFcts.push(function(){
if( arToolkitSource.ready === false ) return
arToolkitContext.update( arToolkitSource.domElement )
})
// Create a ArMarkerControls
var markerRoot = new THREE.Group
scene.add(markerRoot)
var artoolkitMarker = new THREEx.ArMarkerControls(arToolkitContext, markerRoot, artoolkitProfile.<API key>)
// add an object in the scene
// add a torus knot
var geometry = new THREE.CubeGeometry(1,1,1);
var material = new THREE.MeshNormalMaterial({
transparent : true,
opacity: 0.5,
side: THREE.DoubleSide
});
var mesh = new THREE.Mesh( geometry, material );
mesh.position.y = geometry.parameters.height/2
markerRoot.add( mesh );
var geometry = new THREE.TorusKnotGeometry(0.3,0.1,64,16);
var material = new THREE.MeshNormalMaterial();
var mesh = new THREE.Mesh( geometry, material );
mesh.position.y = 0.5
markerRoot.add( mesh );
onRenderFcts.push(function(){
mesh.rotation.x += 0.1
})
// render the whole thing on the page
var stats = new Stats();
document.body.appendChild( stats.dom );
// render the scene
onRenderFcts.push(function(){
renderer.render( scene, camera );
stats.update();
})
// run the rendering loop
var lastTimeMsec= null
<API key>(function animate(nowMsec){
// keep looping
<API key>( animate );
// measure time
lastTimeMsec = lastTimeMsec || nowMsec-1000/60
var deltaMsec = Math.min(200, nowMsec - lastTimeMsec)
lastTimeMsec = nowMsec
// call each update function
onRenderFcts.forEach(function(onRenderFct){
onRenderFct(deltaMsec/1000, nowMsec/1000)
})
})
</script></body> |
require 'require_relative'
require 'ripper'
require_relative '/../classes/s_exp'
class MethodTrails
module Parser
# Parses +text+. Returns a +SExp+.
def <API key>(text)
r = Ripper.sexp(text)
r.to_s_exp(true) # disable capturing atoms
end
end
end |
require 'rails_helper'
describe 'Instructor users', type: :feature, js: true do
before do
include Devise::TestHelpers, type: :feature
Capybara.current_driver = :selenium
page.current_window.resize_to(1920, 1080)
end
before :each do
instructor = create(:user,
id: 100,
wiki_id: 'Professor Sage',
wiki_token: 'foo',
wiki_secret: 'bar')
create(:user,
id: 101,
wiki_id: 'Student A')
create(:user,
id: 102,
wiki_id: 'Student B')
create(:course,
id: 10001,
title: 'My Active Course',
school: 'University',
term: 'Term',
slug: 'University/Course_(Term)',
submitted: 1,
listed: true,
passcode: 'passcode',
start: '2015-01-01'.to_date,
end: '2020-01-01'.to_date)
create(:courses_user,
id: 1,
user_id: 100,
course_id: 10001,
role: 1)
create(:courses_user,
id: 2,
user_id: 101,
course_id: 10001,
role: 0)
create(:courses_user,
id: 3,
user_id: 102,
course_id: 10001,
role: 0)
create(:cohort,
id: 1,
title: 'Fall 2015')
create(:cohorts_course,
cohort_id: 1,
course_id: 10001)
login_as(instructor, scope: :user)
stub_oauth_edit
stub_raw_action
end
describe 'visiting the students page' do
let(:week) { create(:week, course_id: Course.first.id) }
let(:tm) { TrainingModule.all.first }
let!(:block) do
create(:block, week_id: week.id, training_module_ids: [tm.id], due_date: Date.today)
end
before do
<API key>.destroy_all
Timecop.travel(1.year.from_now)
end
after do
Timecop.return
end
it 'should be able to add students' do
allow(WikiApi).to receive(:get_user_id).and_return(123)
visit "/courses/#{Course.first.slug}/students"
sleep 1
click_button 'Enrollment'
within('#users') { all('input')[1].set('Risker') }
page.accept_confirm do
page.accept_confirm do
click_button 'Enroll'
end
end
expect(page).to have_content 'Risker'
end
it 'should not be able to add nonexistent users as students' do
allow(WikiApi).to receive(:get_user_id).and_return(nil)
visit "/courses/#{Course.first.slug}/students"
sleep 1
click_button 'Enrollment'
within('#users') { all('input')[1].set('NotARealUser') }
page.accept_confirm do
page.accept_confirm do
click_button 'Enroll'
end
end
expect(page).not_to have_content 'NotARealUser'
end
it 'should be able to remove students' do
visit "/courses/#{Course.first.slug}/students"
sleep 1
# Click the Enrollment button
click_button 'Enrollment'
sleep 1
# Remove a user
page.accept_confirm do
page.all('button.border.plus')[1].click
end
sleep 1
visit "/courses/#{Course.first.slug}/students"
expect(page).to have_content 'Student A'
expect(page).not_to have_content 'Student B'
end
it 'should be able to assign articles' do
visit "/courses/#{Course.first.slug}/students"
sleep 1
# Assign an article
click_button 'Assign Articles'
sleep 1
page.all('button.border')[0].click
within('#users') { first('input').set('Article 1') }
page.accept_confirm do
click_button 'Assign'
end
sleep 1
page.first('button.border.dark.plus').click
sleep 1
# Assign a review
page.all('button.border')[1].click
within('#users') { first('input').set('Article 2') }
page.accept_confirm do
click_button 'Assign'
end
sleep 1
page.all('button.border.dark.plus')[0].click
sleep 1
# Save these assignments
click_button 'Save'
expect(page).to have_content 'Article 1'
expect(page).to have_content 'Article 2'
# Delete an assignments
click_button 'Assign Articles'
page.first('button.border.plus').click
page.accept_confirm do
click_button '-'
end
sleep 1
click_button 'Save'
expect(page).not_to have_content 'Article 1'
end
it 'should be able to remove students from the course' do
visit "/courses/#{Course.first.slug}/students"
click_button 'Enrollment'
page.accept_confirm do
page.first('button.border.plus').click
end
sleep 1
expect(page).not_to have_content 'Student A'
end
it 'should be able to notify users with overdue training' do
visit "/courses/#{Course.first.slug}/students"
sleep 1
# Notify users with overdue training
page.accept_confirm do
page.first('button.notify_overdue').click
end
sleep 1
end
it 'should be able to view their own deleted course' do
pending 'fixing the intermittent failures on travis-ci'
Course.first.update_attributes(listed: false)
visit "/courses/#{Course.first.slug}"
expect(page).to have_content 'My Active Course'
puts 'PASSED'
fail 'this test passed — this time'
end
it 'should not be able to view other deleted courses' do
# Allow routing error to resolve to 404 page
method = Rails.application.method(:env_config)
expect(Rails.application).to receive(:env_config).with(no_args) do
method.call.merge(
'action_dispatch.show_exceptions' => true,
'action_dispatch.<API key>' => false
)
end
Course.first.update_attributes(listed: false)
CoursesUsers.find(1).destroy
visit "/courses/#{Course.first.slug}"
expect(page).to have_content 'Page not found'
end
end
after do
logout
Capybara.use_default_driver
end
end |
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.ApplicationModel;
using Windows.ApplicationModel.Activation;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
namespace helloShades
{
<summary>
Provides <API key> behavior to supplement the default Application class.
</summary>
sealed partial class App : Application
{
<summary>
Initializes the singleton application object. This is the first line of authored code
executed, and as such is the logical equivalent of main() or WinMain().
</summary>
public App()
{
this.InitializeComponent();
this.Suspending += OnSuspending;
}
<summary>
Invoked when the application is launched normally by the end user. Other entry points
will be used such as when the application is launched to open a specific file.
</summary>
<param name="e">Details about the launch request and process.</param>
protected override async void OnLaunched(<API key> e)
{
var storageFile = await Windows.Storage.StorageFile.<API key>(new Uri("ms-appx:///<API key>.xml"));
await Windows.ApplicationModel.VoiceCommands.<API key>.<API key>(storageFile);
Frame rootFrame = Window.Current.Content as Frame;
// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
if (rootFrame == null)
{
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();
rootFrame.NavigationFailed += OnNavigationFailed;
if (e.<API key> == <API key>.Terminated)
{
//TODO: Load state from previously suspended application
}
// Place the frame in the current Window
Window.Current.Content = rootFrame;
}
if (rootFrame.Content == null)
{
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
rootFrame.Navigate(typeof(MainPage), e.Arguments);
}
// Ensure the current window is active
Window.Current.Activate();
}
<summary>
Invoked when Navigation to a certain page fails
</summary>
<param name="sender">The Frame which failed navigation</param>
<param name="e">Details about the navigation failure</param>
void OnNavigationFailed(object sender, <API key> e)
{
throw new Exception("Failed to load Page " + e.SourcePageType.FullName);
}
<summary>
Invoked when application execution is being suspended. Application state is saved
without knowing whether the application will be terminated or resumed with the contents
of memory still intact.
</summary>
<param name="sender">The source of the suspend request.</param>
<param name="e">Details about the suspend request.</param>
private void OnSuspending(object sender, SuspendingEventArgs e)
{
var deferral = e.SuspendingOperation.GetDeferral();
//TODO: Save application state and stop any background activity
deferral.Complete();
}
}
} |
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Storedetails_model extends MY_Model
{
protected $_table="<API key>";
protected $primary_key="seller_store_id";
protected $soft_delete = FALSE;
public $before_create = array( 'created_at', 'updated_at' );
public $before_update = array( 'updated_at' );
public function __construct()
{
parent::__construct();
}
public function insertseller_store($data)
{
$this->db->insert('<API key>',$data);
return $insert_id = $this->db->insert_id();
}
public function insertFiles($images){
$sid= $this->session->userdata('seller_id');
for($i=0; $i<count($images); $i++)
{
$data=array('seller_id'=>$sid,'file_name'=>$images[$i]);
$this->db->insert('kyc_reports',$data);
}
return true;
}
} |
System.config({
baseURL: "/",
defaultJSExtensions: true,
transpiler: "babel",
babelOptions: {
"optional": [
"runtime",
"optimisation.modules.system",
]
},
paths: { |
namespace 'cuketagger' do
desc 'Check documentation with YARD'
task :check_documentation do
puts Rainbow('Checking inline code documentation...').cyan
output = `yard stats --list-undoc`
puts output
# YARD does not do exit codes, so we have to check the output ourselves.
raise Rainbow('Parts of the gem are undocumented').red unless output =~ /100.00% documented/
puts Rainbow('All code documented').green
end
end |
//Remit Collection object for use on nodejs scripts
var Collection = require('./src/collection');
module.exports = Collection; |
{% load i18n %}
<p>
{% trans "Click on the primary key value to access the individual Author's page." %}
</p>
<table class='table table-bordered table-striped'>
<thead>
<tr>
<th>
id
</th>
<th>
created_at
</th>
<th>
updated_at
</th>
</tr>
</thead>
<tbody>
{% for object in object_list %}
<tr>
<td>
<a href='{{ object.get_absolute_url }}'>
{{ object.id|stringformat:".3d" }}
</a>
</td>
<td>{{ object.created_at }}</td>
<td>{{ object.updated_at }}</td>
</tr>
{% endfor %}
</tbody>
</table> |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace <API key>
{
class Program
{
static void Main(string[] args)
{
var consoledate = Console.ReadLine();
var format = "dd-MM-yyyy";
var result = DateTime.ParseExact(consoledate, format, null);
DateTime answer = result.AddDays(999);
Console.WriteLine(answer.ToString("dd-MM-yyyy"));
}
}
} |
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (12.0.1) on Sun May 24 23:39:58 EDT 2020 -->
<title>Uses of Class com.ensoftcorp.open.android.essentials.subsystems.advertisements.<API key></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="dc.created" content="2020-05-24">
<link rel="stylesheet" type="text/css" href="../../../../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]
<script type="text/javascript" src="../../../../../../../../jquery/jquery-3.3.1.js"></script>
<script type="text/javascript" src="../../../../../../../../jquery/jquery-migrate-3.0.1.js"></script>
<script type="text/javascript" src="../../../../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class com.ensoftcorp.open.android.essentials.subsystems.advertisements.<API key>";
}
}
catch(err) {
}
var pathtoroot = "../../../../../../../../";
var <API key> = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<div class="topNav"><a id="navbar.top">
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../../index.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../<API key>.html" title="class in com.ensoftcorp.open.android.essentials.subsystems.advertisements">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
</div>
<a id="skip.navbar.top">
</a>
</div>
<div class="navPadding"> </div>
<script type="text/javascript"><!
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
</script>
</nav>
</header>
<main role="main">
<div class="header">
<h2 title="Uses of Class com.ensoftcorp.open.android.essentials.subsystems.advertisements.<API key>" class="title">Uses of Class<br>com.ensoftcorp.open.android.essentials.subsystems.advertisements.<API key></h2>
</div>
<div class="classUseContainer">No usage of com.ensoftcorp.open.android.essentials.subsystems.advertisements.<API key></div>
</main>
<footer role="contentinfo">
<nav role="navigation">
<div class="bottomNav"><a id="navbar.bottom">
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../../index.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../<API key>.html" title="class in com.ensoftcorp.open.android.essentials.subsystems.advertisements">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
</a>
</nav>
</footer>
</body>
</html> |
id: 742
title: ' – monit'
date: 2016-11-06T21:54:52+00:00
layout: post
permalink: /2016/11/06/monit/
description:
Monit
categories:
-
tags:
-
-
Monit
{% include <API key>.html %}
WebPC
Web
<img class="alignnone size-full wp-image-749" src="https://i0.wp.com/simple-it-life.com/wp-content/uploads/2016/11/hoge.png?resize=465%2C195&
* Web
*
<table border="1">
<tr>
<th>
<strong></strong>
</th>
<th>
<strong></strong>
</th>
</tr>
<tr align="left">
<th>
</th>
<th>
</th>
</tr>
<tr align="left">
<th>
</th>
<th>
CPU
</th>
</tr>
<tr align="left">
<th>
</th>
<th>
Apache
</th>
</tr>
<tr align="left">
<th>
</th>
<th>
</th>
</tr>
</table>
## passiveactive
Web()(※①)
<img class="alignnone size-full wp-image-750" src="https:
<div style="border: blue 1px dashed; background-color: azure; width: 500px; font-size: 12px; padding-left: 10px;">
<p>
</p>
<ul>
<li>
monitoring nodemnode
</li>
<li>
Webservice nodesnode
</li>
</ul>
</div>
passiveactive (※①)
<div style="border: green 1px dashed; background-color: honeydew; width: 500px; font-size: 12px; padding-left: 10px;">
<ul>
<li>
mnodesnodeactive check <ul>
<li>
</li>
</ul>
</li>
<li>
snodemnodepassive check <ul>
<li>
</li>
<li>
</li>
</ul>
</li>
</ul>
</div>
②mnode1
1
Nagios, Zabbix, Hinemos
## Monit
Monit
<pre class="brush: bash; title: ; notranslate" title="">$ cat /etc/redhat-release
CentOS release 6.8 (Final)
</pre>
Monit
<pre class="brush: bash; title: ; notranslate" title="">$ sudo yum -y install monit
</pre>
<pre class="brush: bash; title: ; notranslate" title="">
$ sudo cp -p /etc/monit.conf{,.`date +%Y%m%d`}
$ sudo vim /etc/monit.conf
$ sudo vim /etc/monit.conf
set httpd port 2812 and
# use address localhost #
allow localhost # allow localhost to connect to the server and
allow (ip)/255.255.255.0
allow admin:monit
$ sudo /etc/init.d/monit restart
$ sudo chkconfig monit on
</pre>
http://(ip):2812/
<img class="alignnone size-full wp-image-752" src="https:
PostfixGmail
<blockquote class="wp-embedded-content" data-secret="Bdt5qxwyHz">
<p>
<a href="/2016/10/16/postfix/">PostfixGmail</a>
</p>
</blockquote>
MonitPostfixGmail
<pre class="brush: bash; title: ; notranslate" title="">
$ cat /etc/monit.d/check_cpu.conf
set mailserver localhost
#not on {INSTANCE}Monit instance changed
set alert hoge@yahoo.co.jp not on {INSTANCE}
set mail-format {
from: monit@$HOST
subject: monit alert -- $EVENT $SERVICE
message: $EVENT Service $SERVICE
Date: $DATE
Action: $ACTION
Host: $HOST
Description: $DESCRIPTION
Your faithful employee,
Monit
}
# cpu
check system localhost
if memory usage > 1% then alert
</pre>
<pre class="brush: bash; title: ; notranslate" title="">// conf
$ sudo monit -t
Control file syntax OK
$ sudo /etc/init.d/monit restart
</pre>
<img class="alignnone size-full wp-image-753" src="https:
<img class="alignnone size-full wp-image-755" src="https:
Monit
<div style="font-size: 0px; height: 0px; line-height: 0px; margin: 0; padding: 0; clear: both;">
</div> |
describe("Game.resources", function() {
var gr = Game.resources;
var gb = Game.buildings;
describe("update", function() {
var b;
beforeEach(function() {
b = {
"name": "test",
}
Game.data.buildings.push(b);
spyOn(gb, "can_consume");
});
describe("when building is not unlocked", function() {
it("should not check for production/consumption", function() {
gr.update();
expect(gb.can_consume).not.<API key>(b);
});
});
describe("when building is unlocked", function() {
it("should check for production/consumption", function() {
Game.data.buildings_unlocked[b.name]=1;
gr.update();
expect(gb.can_consume).<API key>(b);
});
});
});
}); |
jQuery(document).ready(function ($) {
var <API key> = [
//Fade in L
{$Duration: 1200, x: 0.3, $During: { $Left: [0.3, 0.7] }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
//Fade out R
, { $Duration: 1200, x: -0.3, $SlideOut: true, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
//Fade in R
, { $Duration: 1200, x: -0.3, $During: { $Left: [0.3, 0.7] }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
//Fade out L
, { $Duration: 1200, x: 0.3, $SlideOut: true, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
//Fade in T
, { $Duration: 1200, y: 0.3, $During: { $Top: [0.3, 0.7] }, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Outside: true }
//Fade out B
, { $Duration: 1200, y: -0.3, $SlideOut: true, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Outside: true }
//Fade in B
, { $Duration: 1200, y: -0.3, $During: { $Top: [0.3, 0.7] }, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
//Fade out T
, { $Duration: 1200, y: 0.3, $SlideOut: true, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
//Fade in LR
, { $Duration: 1200, x: 0.3, $Cols: 2, $During: { $Left: [0.3, 0.7] }, $ChessMode: { $Column: 3 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Outside: true }
//Fade out LR
, { $Duration: 1200, x: 0.3, $Cols: 2, $SlideOut: true, $ChessMode: { $Column: 3 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Outside: true }
//Fade in TB
, { $Duration: 1200, y: 0.3, $Rows: 2, $During: { $Top: [0.3, 0.7] }, $ChessMode: { $Row: 12 }, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
//Fade out TB
, { $Duration: 1200, y: 0.3, $Rows: 2, $SlideOut: true, $ChessMode: { $Row: 12 }, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
//Fade in LR Chess
, { $Duration: 1200, y: 0.3, $Cols: 2, $During: { $Top: [0.3, 0.7] }, $ChessMode: { $Column: 12 }, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Outside: true }
//Fade out LR Chess
, { $Duration: 1200, y: -0.3, $Cols: 2, $SlideOut: true, $ChessMode: { $Column: 12 }, $Easing: { $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
//Fade in TB Chess
, { $Duration: 1200, x: 0.3, $Rows: 2, $During: { $Left: [0.3, 0.7] }, $ChessMode: { $Row: 3 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Outside: true }
//Fade out TB Chess
, { $Duration: 1200, x: -0.3, $Rows: 2, $SlideOut: true, $ChessMode: { $Row: 3 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
//Fade in Corners
, { $Duration: 1200, x: 0.3, y: 0.3, $Cols: 2, $Rows: 2, $During: { $Left: [0.3, 0.7], $Top: [0.3, 0.7] }, $ChessMode: { $Column: 3, $Row: 12 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Outside: true }
//Fade out Corners
, { $Duration: 1200, x: 0.3, y: 0.3, $Cols: 2, $Rows: 2, $During: { $Left: [0.3, 0.7], $Top: [0.3, 0.7] }, $SlideOut: true, $ChessMode: { $Column: 3, $Row: 12 }, $Easing: { $Left: $JssorEasing$.$EaseInCubic, $Top: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2, $Outside: true }
//Fade Clip in H
, { $Duration: 1200, $Delay: 20, $Clip: 3, $Assembly: 260, $Easing: { $Clip: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
//Fade Clip out H
, { $Duration: 1200, $Delay: 20, $Clip: 3, $SlideOut: true, $Assembly: 260, $Easing: { $Clip: $JssorEasing$.$EaseOutCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
//Fade Clip in V
, { $Duration: 1200, $Delay: 20, $Clip: 12, $Assembly: 260, $Easing: { $Clip: $JssorEasing$.$EaseInCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
//Fade Clip out V
, { $Duration: 1200, $Delay: 20, $Clip: 12, $SlideOut: true, $Assembly: 260, $Easing: { $Clip: $JssorEasing$.$EaseOutCubic, $Opacity: $JssorEasing$.$EaseLinear }, $Opacity: 2 }
];
var options = {
$AutoPlay: true, //[Optional] Whether to auto play, to enable slideshow, this option must be set to true, default value is false
$AutoPlayInterval: 1500, //[Optional] Interval (in milliseconds) to go for next slide since the previous stopped if the slider is auto playing, default value is 3000
$PauseOnHover: 1, //[Optional] Whether to pause when mouse over if a slider is auto playing, 0 no pause, 1 pause for desktop, 2 pause for touch device, 3 pause for desktop and touch device, 4 freeze for desktop, 8 freeze for touch device, 12 freeze for desktop and touch device, default value is 1
$DragOrientation: 3, //[Optional] Orientation to drag slide, 0 no drag, 1 horizental, 2 vertical, 3 either, default value is 1 (Note that the $DragOrientation should be the same as $PlayOrientation when $DisplayPieces is greater than 1, or parking position is not 0)
$ArrowKeyNavigation: true, //[Optional] Allows keyboard (arrow key) navigation or not, default value is false
$SlideDuration: 800, //Specifies default duration (swipe) for slide in milliseconds
$SlideshowOptions: { //[Optional] Options to specify and enable slideshow or not
$Class: $<API key>$, //[Required] Class to create instance of slideshow
$Transitions: <API key>, //[Required] An array of slideshow transitions to play slideshow
$TransitionsOrder: 1, //[Optional] The way to choose transition to play slide, 1 Sequence, 0 Random
$ShowLink: true //[Optional] Whether to bring slide link on top of the slider when slideshow is running, default value is false
},
$<API key>: { //[Optional] Options to specify and enable arrow navigator or not
$Class: $JssorArrowNavigator$, //[Requried] Class to create arrow navigator instance
$ChanceToShow: 1 //[Required] 0 Never, 1 Mouse Over, 2 Always
},
$<API key>: { //[Optional] Options to specify and enable thumbnail navigator or not
$Class: $<API key>$, //[Required] Class to create thumbnail navigator instance
$ChanceToShow: 2, //[Required] 0 Never, 1 Mouse Over, 2 Always
$ActionMode: 1, //[Optional] 0 None, 1 act by click, 2 act by mouse hover, 3 both, default value is 1
$SpacingX: 8, //[Optional] Horizontal space between each thumbnail in pixel, default value is 0
$DisplayPieces: 10, //[Optional] Number of pieces to display, default value is 1
$ParkingPosition: 360 //[Optional] The offset position to park thumbnail
}
};
var jssor_slider1 = new $JssorSlider$("slider1_container", options);
//responsive code begin
//you can remove responsive code if you don't want the slider scales while window resizes
function ScaleSlider() {
var parentWidth = jssor_slider1.$Elmt.parentNode.clientWidth;
if (parentWidth)
jssor_slider1.$ScaleWidth(Math.max(Math.min(parentWidth, 800), 300));
else
window.setTimeout(ScaleSlider, 30);
}
ScaleSlider();
$(window).bind("load", ScaleSlider);
$(window).bind("resize", ScaleSlider);
$(window).bind("orientationchange", ScaleSlider);
//responsive code end
}); |
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
// Any modifications to this file will be lost upon recompilation of the source schema.
// Generated on: 2012.06.29 at 10:15:17 AM BST
package org.w3._1999.xhtml;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.<API key>;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "")
@XmlRootElement(name = "sub")
public class Sub
extends Inline
{
@XmlAttribute
protected String onclick;
@XmlAttribute
protected String ondblclick;
@XmlAttribute
protected String onmousedown;
@XmlAttribute
protected String onmouseup;
@XmlAttribute
protected String onmouseover;
@XmlAttribute
protected String onmousemove;
@XmlAttribute
protected String onmouseout;
@XmlAttribute
protected String onkeypress;
@XmlAttribute
protected String onkeydown;
@XmlAttribute
protected String onkeyup;
@XmlAttribute(name = "lang")
@XmlJavaTypeAdapter(<API key>.class)
protected String langCode;
@XmlAttribute(namespace = "http:
protected String lang;
@XmlAttribute
@XmlJavaTypeAdapter(<API key>.class)
protected String dir;
@XmlAttribute
@XmlJavaTypeAdapter(<API key>.class)
@XmlID
@XmlSchemaType(name = "ID")
protected String id;
@XmlAttribute(name = "class")
@XmlSchemaType(name = "NMTOKENS")
protected List<String> clazz;
@XmlAttribute
protected String style;
@XmlAttribute
protected String title;
/**
* Gets the value of the onclick property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getOnclick() {
return onclick;
}
/**
* Sets the value of the onclick property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setOnclick(String value) {
this.onclick = value;
}
/**
* Gets the value of the ondblclick property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getOndblclick() {
return ondblclick;
}
/**
* Sets the value of the ondblclick property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setOndblclick(String value) {
this.ondblclick = value;
}
/**
* Gets the value of the onmousedown property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getOnmousedown() {
return onmousedown;
}
/**
* Sets the value of the onmousedown property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setOnmousedown(String value) {
this.onmousedown = value;
}
/**
* Gets the value of the onmouseup property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getOnmouseup() {
return onmouseup;
}
/**
* Sets the value of the onmouseup property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setOnmouseup(String value) {
this.onmouseup = value;
}
/**
* Gets the value of the onmouseover property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getOnmouseover() {
return onmouseover;
}
/**
* Sets the value of the onmouseover property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setOnmouseover(String value) {
this.onmouseover = value;
}
/**
* Gets the value of the onmousemove property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getOnmousemove() {
return onmousemove;
}
/**
* Sets the value of the onmousemove property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setOnmousemove(String value) {
this.onmousemove = value;
}
/**
* Gets the value of the onmouseout property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getOnmouseout() {
return onmouseout;
}
/**
* Sets the value of the onmouseout property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setOnmouseout(String value) {
this.onmouseout = value;
}
/**
* Gets the value of the onkeypress property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getOnkeypress() {
return onkeypress;
}
/**
* Sets the value of the onkeypress property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setOnkeypress(String value) {
this.onkeypress = value;
}
/**
* Gets the value of the onkeydown property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getOnkeydown() {
return onkeydown;
}
/**
* Sets the value of the onkeydown property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setOnkeydown(String value) {
this.onkeydown = value;
}
/**
* Gets the value of the onkeyup property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getOnkeyup() {
return onkeyup;
}
/**
* Sets the value of the onkeyup property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setOnkeyup(String value) {
this.onkeyup = value;
}
/**
* Gets the value of the langCode property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLangCode() {
return langCode;
}
/**
* Sets the value of the langCode property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLangCode(String value) {
this.langCode = value;
}
/**
* Gets the value of the lang property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getLang() {
return lang;
}
/**
* Sets the value of the lang property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setLang(String value) {
this.lang = value;
}
/**
* Gets the value of the dir property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getDir() {
return dir;
}
/**
* Sets the value of the dir property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setDir(String value) {
this.dir = value;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
/**
* Gets the value of the clazz property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the clazz property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getClazz().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link String }
*
*
*/
public List<String> getClazz() {
if (clazz == null) {
clazz = new ArrayList<String>();
}
return this.clazz;
}
/**
* Gets the value of the style property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getStyle() {
return style;
}
/**
* Sets the value of the style property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setStyle(String value) {
this.style = value;
}
/**
* Gets the value of the title property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTitle() {
return title;
}
/**
* Sets the value of the title property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTitle(String value) {
this.title = value;
}
} |
<!DOCTYPE html>
<html lang="ja" ng-app="psMaze">
<head>
<meta charset="utf-8">
<meta name="x-ua-compatible" content="IE=Edge">
<meta name="viewport" content="width=960">
<title>Prosemaze</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap-theme.min.css">
<link rel="stylesheet" href="css/app.css">
</head>
<body id="psmaze" ng-controller="psMazeConfigCtrl">
<header class="title" style="display:none;"><h1>{{title}}</h1></header>
<article class="main psmaze" style="width:{{width}};" ng-cloak>
<div ng-view></div>
<section id="page_nav" class="page_nav btn-toolbar" role="toolbar" ng-controller="psMazeNavCtrl">
<div class="btn-group" ng-if="navTitle || navPage">
<button type="button" class="btn btn-default page" ng-click="changePage('');" ng-if="navTitle">TITLE</button>
<button type="button" class="btn btn-default page" ng-repeat="pg in pages" ng-click="changePage(pg);" ng-class="{active:pageNumber==pg}">{{pg}}</button>
</div>
</section>
</article>
<!-- In production use:
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script>
<script src="lib/angular/angular.js"></script>
<script src="lib/angular/angular-route.js"></script>
<script src="lib/angular/angular-animate.js"></script>
<script src="lib/angular/angular-resource.js"></script>
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="lib/bootstrap.min.js"></script>
<script src="js/prosemaze.min.js"></script>
</body>
</html> |
package com.fionapet.business.service;
import com.fionapet.business.entity.PetSmallRace;
import org.dubbo.x.repository.DaoBase;
import org.dubbo.x.service.CURDServiceBase;
import com.fionapet.business.repository.PetSmallRaceDao;
import org.springframework.beans.factory.annotation.Autowired;
public class <API key> extends CURDServiceBase<PetSmallRace> implements PetSmallRaceService {
@Autowired
private PetSmallRaceDao petSmallRaceDao;
@Override
public DaoBase<PetSmallRace> getDao() {
return petSmallRaceDao;
}
} |
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Algorithms.RobertSedgewick.Fundamentals.DataStructures;
using Xunit;
namespace UnitTests.RobertSedgewick.DataStructures
{
public sealed class <API key>
{
[Fact]
public void PathTo()
{
Graph graph = Create(@"DataStore\tinyCG.txt");
var path = new DepthFirstPaths(graph, 0);
IEnumerable<int> actual = path.PathTo(4);
Assert.Equal(new[] { 0, 5, 3, 2, 4 }, actual);
}
private static Graph Create(string filePath)
{
int vertexCount = int.Parse(File.ReadLines(filePath).First());
var result = new Graph(vertexCount);
foreach (string line in File.ReadLines(filePath).Skip(2))
{
string[] vertexes = line.Split(null);
result.AddEdge(int.Parse(vertexes[0]), int.Parse(vertexes[1]));
}
return result;
}
}
} |
layout: post
title: Some wonderful javascript tutorials
Tutorial format: description on the left, explaining the code on the right.
## example.js
> A brief high-level description
npm - download the library for use
tutorial - explaining how the code works.
github repository - in case you want to contribute!
## kmeans.js
> Groups data into clusters, calculates the center of the cluster, and then reclusters the data based upon least distance from each newly computed center. Repeat until it converges (centers barely move).
npm - [https:
tutorial - [http:
github - [https:
## pagerank.js
> This algorithm is used by google to determine the prestige of pages. This algorithm can be used for determining areas of influence in a graph. Such as determining the person who is most influential in a social media network. Like Kmeans, this algorithm relies of values converging.
npm - [https:
tutorial - [http:
github - [https:
## ignore the following
{% highlight js %}
// Example can be run directly in your JavaScript console
// Create a function that takes two arguments and returns the sum of those arguments
var adder = new Function("a", "b", "return a + b");
// Call the function
adder(2, 6);
{% endhighlight %} |
package redempt.inputscripter.gui.indicator;
import java.awt.Color;
import java.util.ArrayList;
import java.util.List;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.border.LineBorder;
public class Indicator extends JDialog {
private static List<Indicator> indicators = new ArrayList<>();
public Indicator(String text) {
super();
this.setUndecorated(true);
JLabel label = new JLabel(text);
int width = label.getFontMetrics(label.getFont()).stringWidth(text);
this.setSize(0, 0);
label.setSize(width + 30, 30);
label.<API key>(JLabel.CENTER);
label.setBackground(Color.GREEN);
label.setForeground(Color.BLACK);
label.setOpaque(true);
label.setBorder(new LineBorder(Color.BLACK));
this.setSize(width + 30, 30);
label.setSize(500, 500);
label.setVisible(true);
this.add(label);
this.setLocation(0, indicators.size() * 30);
this.setAlwaysOnTop(true);
this.setFocusable(false);
indicators.add(this);
}
public void showIndicator() {
this.setVisible(true);
repaint();
}
public void hideIndicator() {
this.dispose();
indicators.remove(this);
refresh();
}
public static void refresh() {
int y = 0;
for (Indicator indicator : indicators) {
indicator.setLocation(0, y * 30);
y++;
}
}
} |
a, a * { cursor:pointer; }
html { margin:0; overflow-x:auto; }
body {
overflow-x:hidden;
min-width:1030px;
margin:0;
font: 13pt Helvetica,Arial,sans-serif;
background:#152534 url("/images/bg.png") no-repeat fixed center top; }
pre { color: #F5F5F5;}
pre, pre * { cursor:text; }
pre .Comment { color:#6D6D6D; font-style:italic; }
pre .Keyword { color:#43A8CF; font-weight:bold; }
pre .Type { color:#128B7D; font-weight:bold; }
pre .Operator { font-weight: bold; }
pre .atr { color:#128B7D; font-weight:bold; font-style:italic; }
pre .def { color:#CAD6E4; font-weight:bold; font-style:italic; }
pre .StringLit { color:#854D6A; font-weight:bold; }
pre .DecNumber, pre .FloatNumber { color:#8AB647; }
pre .tab { border-left:1px dotted rgba(67,168,207,0.4); }
pre .end { background:url("/images/tabEnd.png") no-repeat left bottom; }
pre .EscapeSequence
{
color: #C08D12;
}
.tall { height:100%; }
.pre { padding:0 5px; font: 11pt "DejaVu Sans Mono",monospace; background:rgba(255,255,255,.30); border-radius:3px; }
.page-layout { margin:0 auto; width:1000px; }
.docs-layout { margin:0 40px; }
.talk-layout { margin:0 40px; }
.wide-layout { margin:0 auto; }
#head {
height:100px;
margin-bottom: 40px;
background:url("/images/head.png") repeat-x bottom; }
#head.docs { margin-left:280px; background:rgba(0,0,0,.25) url("/images/head-fade.png") no-repeat right top; }
#head > div { position:relative }
#head-logo {
position:absolute;
left:-390px;
top:0;
width:917px;
height:268px;
pointer-events:none;
background:url("/images/logo.png") no-repeat; }
#head.docs #head-logo { left:-381px; position:fixed; }
#head.forum #head-logo { left:-370px; }
#head-logo-link {
position:absolute;
display:block;
top:10px;
left:10px;
width:236px;
height:85px; }
#head.docs #head-logo-link { left:-260px; }
#head.forum #head-logo-link { left:30px; }
#head-links { position:absolute; right:0; bottom:13px; }
#head.docs #head-links,
#head.forum #head-links { right:20px; }
#head-links > a {
display:block;
float:left;
padding:10px 25px 25px 25px;
color:rgba(255,255,255,.5);
font-size:14pt;
text-decoration:none;
letter-spacing:1px;
background:url("/images/head-link.png") no-repeat center bottom;
transition:
color 0.3s ease-in-out,
text-shadow 0.4s ease-in-out; }
#head-links > a:hover,
#head-links > a.active {
position: relative;
color:#1cb3ec;
text-shadow:0 0 4px rgba(28,179,236,.8);
background-image:url("/images/head-link_hover.png"); }
#head-links > a.active:after {
display: block;
content: "";
width: 771px;
background: url("/images/glow-arrow.png") no-repeat left;
height: 41px;
position: absolute;
left: 50%;
bottom: -49px;
transform: translateX(-618px); }
#head-banner { width:200px; height:100px; background:#000; }
#glow-line-vert {
position:fixed;
top:100px;
left:280px;
width:3px;
height:844px;
background:url("/images/glow-line-vert.png") no-repeat; }
#body { z-index:1; position:relative; background:rgba(220,231,248,.6); }
#body.docs { margin:0 40px 20px 320px; }
#body.forum { margin:0 40px 20px 40px; min-height: 700px; }
#body-border {
position:absolute;
top:-25px;
left:0;
right:0;
height:35px;
background:rgba(0,0,0,.25); }
#body-border-left {
position:absolute;
left:-25px;
top:-25px;
bottom:-25px;
width:35px;
background:rgba(0,0,0,.25); }
#body-border-right {
position:absolute;
right:-25px;
top:-25px;
bottom:-25px;
width:35px;
background:rgba(0,0,0,.25); }
#body-border-bottom {
position:absolute;
left:10px;
right:10px;
bottom:-25px;
height:35px;
background:rgba(0,0,0,.25); }
#body.docs #body-border,
#body.forum #body-border { left:10px; right:10px; }
#glow-line {
position:absolute;
top:-27px;
left:100px;
right:-25px;
height:3px;
background:url("/images/glow-line.png") no-repeat left; }
#glow-line-bottom {
position:absolute;
bottom:-27px;
left:-25px;
right:100px;
height:3px;
background:url("/images/glow-line2.png") no-repeat right; }
#content { padding:40px 0; }
#content.page { width:680px; min-height:800px; padding-left:20px; }
#content h1 { font-size:20pt; letter-spacing:1px; color:rgba(0,0,0,.75); }
#content h2 { font-size:16pt; letter-spacing:1px; color:rgba(0,0,0,.7); margin-top:40px; }
#content p { color: #1D1D1D; margin: 5pt 0pt; }
#content a { color:#CEDAE9; text-decoration:none; }
#content a:hover { color:#fff; }
#content ul { padding-left:20px; }
#content li { margin-bottom:10px; text-align:justify; }
#talk-heads { overflow:auto; margin:0 8px 0 8px; }
#talk-heads > div { float:left; font-size:120%; font-weight:bold; }
#talk-heads > .topic { width:45%; }
#talk-heads > .detail { width:15%; }
#talk-heads > .activity { width:25%; }
#talk-heads > .users { width:15%; }
#talk-heads > div > div { margin:0 10px 10px 10px; padding:0 10px 10px 10px; border-bottom:1px dashed rgba(0,0,0,0.4); }
#talk-heads > .topic > div { margin-left:0; }
#talk-heads > .activity > div { margin-right:0; }
#talk-thread > div {
background-color: rgba(255, 255, 255, 0.5);
}
#talk-thread > div,
#talk-threads > div {
position:relative;
margin:5px 0;
overflow:auto;
border-radius:3px;
border:8px solid rgba(0,0,0,.8);
border-top:none;
border-bottom:none;
}
#talk-threads > div
{
line-height: 150%;
background:rgba(0,0,0,0.1);
}
#talk-threads > div:nth-child(odd) { background:rgba(0,0,0,0.2); }
#talk-thread > div > div,
#talk-threads > div > div
{
float:left;
text-overflow: ellipsis;
overflow: hidden;
font-size: 13pt;
}
#talk-threads > div > div > div { margin: 5px 10px; }
#talk-thread > div > div > div { margin: 15px 10px; }
#talk-thread > div > .topic
{
margin-top: 15pt;
white-space: normal;
}
#talk-thread > div > .topic > div
{
margin-left: 15px;
}
#talk-thread > div > .topic > div > span.date
{
position: absolute;
top: 5px;
right: 10pt;
border-bottom: 1px dashed;
color: #3D3D3D;
}
#talk-threads > div > .topic { width:45%; }
#talk-threads > div > .users { width:15%; overflow:hidden; height: 30px; }
#talk-threads > div > .users > div > img
{
margin-bottom: -4pt;
cursor: help;
width: 20px;
}
#talk-threads > div > .detail { width:16%; overflow:hidden; }
#talk-thread > div > .author,
#talk-threads > div > .activity {
overflow:hidden;
background:rgba(0,0,0,0.8);
color: white;
}
#talk-thread > div > .author {
width: 15%;
}
#talk-threads > div > .activity {
width:24%;
font-size: 9pt;
}
#talk-threads > div > .activity a
{
color: #1CB3EC;
}
#talk-threads > div > .activity a:hover
{
color: #ffffff;
}
#talk-thread > div > .author {
height: 100%;
position: absolute;
}
#talk-thread > div > .author a,
#talk-threads > div > .author a { color:#1cb3ec !important; }
#talk-thread > div > .author a:hover,
#talk-threads > div > .author a:hover { color:#fff !important; }
#talk-threads > div > .topic .pages { float:right; }
#talk-threads > div > .topic .pages > a
{
margin-right: 5pt;
}
#talk-threads > div > .topic > div > a
{
font-weight:bold;
white-space: nowrap;
}
#talk-threads > div > .topic > div > a:visited { color: #1a1a1a; }
#talk-threads > div > .detail > div { float:left; margin:0; }
#talk-threads > div > .detail > div > div { margin-left:15px; padding: 5px 5px 5px 22px; }
#talk-threads > div > .detail > div { width:50%; }
#talk-threads > div > .detail > div:first-child > div { background:url("/images/forum-views.png") no-repeat left; cursor: help; }
#talk-threads > div > .detail > div:last-child > div { background:url("/images/forum-posts.png") no-repeat left; cursor: help; }
#talk-thread > div { margin:20px 0; min-height:160px; padding-bottom: 10pt; }
#talk-thread > div > .author > div > .avatar { margin-top:20px; }
#talk-thread > div > .author > div > .name { }
#talk-thread > div > .author > div > .date { font-size: 8pt; color: white; }
#talk-thread > div > .topic { width:85%; padding-bottom:10px; margin-left: 15%; }
#talk-thread > div > .topic pre, #markhelp pre.listing {
overflow:auto;
margin:0;
padding:15px 10px;
font-size:10pt;
font-style:normal;
line-height:14pt;
background:rgba(0,0,0,.75);
border-left:8px solid rgba(0,0,0,.3);
margin-bottom: 10pt;
font-family: "DejaVu Sans Mono", monospace;
}
#talk-thread > div > .topic a, #talk-thread > div > .topic a:visited,
#markhelp a, #markhelp a:visited
{
color: #3680C9;
text-decoration: none;
}
#talk-thread > div > .topic a:hover
{
text-decoration: underline;
}
#talk-head,
#talk-info {
overflow:auto;
border-radius:3px;
border:8px solid rgba(0,0,0,.2);
border-top:none;
border-bottom:none;
background:rgba(0,0,0,0.1); }
#talk-head { margin-bottom:20px; }
#talk-info { margin-top:20px; }
#talk-head > div,
#talk-info > div { float:left; }
#talk-head > .info,
#talk-info > .info { width:80%; }
#talk-head > .info-post,
#talk-info > .info-post { width: 85%; }
#talk-head > .user,
#talk-info > .user { width:20%; background:rgba(0,0,0,.2); }
#talk-head > .user-post,
#talk-info > .user-post { width: 15%; background:rgba(0,0,0,.2); }
#talk-info > .user-post .reply { font-weight:bold; padding-left:22px; background:url("/images/forum-reply.png") no-repeat left; }
#talk-info > .user-post a span
{
color: #CEDAE9 !important;
}
#talk-info > .user-post > a > div:hover > span
{
color: #fff !important;
}
#talk-head > div > div,
#talk-info > div > div,
#talk-info > div > a > div { padding:5px 20px; color: #1a1a1a; }
#talk-head > div > div { color: #353535; }
#talk-head > .detail > div { float:left; margin:0; }
#talk-head > .detail > div > div { padding-left:22px; }
#talk-head > .detail > div:first-child > div { background:url("/images/forum-views.png") no-repeat left; }
#talk-head > .detail > div:last-child > div { background:url("/images/forum-posts.png") no-repeat left; }
#talk-nav { margin:20px 8px 0 8px; padding-top:10px; border-top:1px dashed rgba(0,0,0,0.4); text-align:center; }
#talk-nav > a.active { text-decoration:underline !important; }
#talk-nav > a, #talk-nav > span, #talk-info > .info-post > div > a,
#talk-info > .info-post > div > span { margin-left: 5pt; }
.standout {
padding:5px 30px;
margin-bottom:20px;
border:8px solid rgba(0,0,0,.8);
border-right-width:16px;
border-top-width:0;
border-bottom-width:0;
border-radius:3px;
background:rgba(0,0,0,0.1);
box-shadow:1px 3px 12px rgba(0,0,0,.4); }
.standout h3 { margin-bottom:10px; padding-bottom:10px; border-bottom:1px dashed rgba(0,0,0,.8); }
.standout li { margin:0 !important; padding-top:10px; border-top:1px dashed rgba(0,0,0,.2); }
.standout ul { padding-bottom:5px; }
.standout ul.tools { list-style:url("/images/docs-tools.png"); }
.standout ul.library { list-style:url("/images/docs-library.png"); }
.standout ul.internal { list-style:url("/images/docs-internal.png"); }
.standout ul.tutorial { list-style:url("/images/docs-tutorial.png"); }
.standout ul.example { list-style:url("/images/docs-example.png"); }
.standout li:first-child { padding-top:0; border-top:none; }
.standout li p { margin:0 0 10px 0 !important; line-height:130%; }
.standout li > a { font-weight:bold; }
.forum-user-info,
.forum-user-info * { cursor:help }
#foot { height:150px; position:relative; top:-10px; letter-spacing:1px; }
#foot.home { background:url("/images/foot.png") repeat-x top; height:200px; }
#foot.docs { margin-left:320px; margin-right:40px; }
#foot.forum { margin-left:40px; margin-right:40px; }
#foot > div { position:relative; }
#foot.home > div { width:960px; }
#foot h4 { font-size:11pt; color:rgba(255,255,255,.4); margin:40px 0 6px 0; }
#foot a:hover { color:#fff; }
#foot-links { float:left; }
#foot-links > div { float:left; padding:0 40px 0 0; line-height:120%; }
#foot-links a { display:block; font-size:10pt; color:rgba(255,255,255,.3); text-decoration:none; }
#mascot {
z-index:2;
position:absolute;
top:-340px;
right:25px;
width:202px;
height:319px;
background:url("/images/mascot.png") no-repeat; }
article#content
{
width: 80%;
display: inline-block;
}
div#sidebar
{
background-color: rgba(255, 255, 255, 0.1);
border-left: 8px solid rgba(0, 0, 0, 0.8);
border-right: 8px solid rgba(0, 0, 0, 0.8);
border-bottom: 8px solid rgba(0, 0, 0, 0.8);
border-radius: 3px;
width: 15%;
margin-top: 40px;
display: inline-block;
float: right;
color: #FFF;
}
div#sidebar .title
{
background-color: rgba(0, 0, 0, 0.8);
color: #FFF;
text-align: center;
padding: 10pt;
}
div#sidebar .content
{
padding: 12pt;
overflow: auto;
}
div#sidebar .content .button
{
background-color: rgba(0,0,0,0.2);
text-decoration: none;
color: #FFF;
padding: 4pt;
float: right;
border-bottom: 2px solid rgba(0,0,0,0.24);
font-size: 11pt;
margin-top: 5pt;
}
div#sidebar .content .button:hover
{
border-bottom: 2px solid rgba(0,0,0,0.5);
}
div#sidebar .content input
{
width: 99%;
margin-bottom: 10pt;
margin-top: 2pt;
border: 1px solid #6D6D6D;
font-size: 12pt;
}
div#sidebar .content a.avatar img
{
float: left;
margin-top: 5pt;
}
div#sidebar .content a.user
{
background-color: rgba(0, 0, 0, 0.8);
color: #1cb3ec;
padding: 5pt;
width: 93%;
display: block;
text-align: center;
text-decoration: none;
}
div#sidebar .content a.user:hover
{
color: #FFF;
}
div#sidebar .user .button
{
float: left;
margin-top: 5pt;
width: 52.5%;
}
div#sidebar .user .logout
{
clear: left;
width: 52pt;
text-align: center;
margin-left: 0pt;
}
div#sidebar .user .avatar > img
{
margin-right: 5pt;
}
div#sidebar .content .search
{
text-align: center;
margin: auto;
display: block;
width: 95%;
}
div#sidebar .content a#passreset {
color: #CEDAE9;
font-size: 9pt;
display: block;
text-decoration: none;
margin-top: -4pt;
}
div#sidebar .content a#passreset:hover {
color: #fff;
}
span.error
{
float: left;
width: 100%;
color: #FF4848;
text-align: center;
font-size: 10pt;
background-color: rgba(0,0,0,0.8);
padding: 5pt 0pt;
font-weight: bold;
}
section#body #content span.error
{
width: 25%;
margin-top: 5px;
margin-bottom: 5px;
}
article#content form
{
border-right: 8px solid rgba(0, 0, 0, 0.2);
background-color: rgba(255, 255, 255, 0.1);
padding: 10pt 20pt;
}
article#content form > input, article#content form > textarea
{
border: 1px solid #6D6D6D;
}
article#content form > input[type=text]
{
width: 70%;
min-width: 500px;
}
article#content form > textarea
{
width: 100%;
height: 200px;
}
article#content form > input:focus, article#content form > textarea:focus
{
border: 1px solid #1cb3ec;
}
hr
{
border: 1px solid #3D3D3D;
}
.activity .isoDate
{
display: none;
}
/* highlighting current post */
div:target {
background: rgba(139, 218, 255, 0.25) !important;
}
/* full-text search */
.searchResults h4 b,
.searchResults h5 b {
border-bottom: 1px dotted #ffffff;
}
.titleHeader {
margin-right: 1em;
color: #121212;
font-weight: bold;
}
.postTitle b {
border-bottom: 1px solid #D7300C;
}
.postTitle a:hover {
text-decoration: none !important;
border-bottom: 1px solid #D7300C;
}
.searchForm {
margin-top: 0px;
margin-right: 1em;
margin-bottom: 0px;
margin-left: 1em;
}
.searchHelp {
color: #000000 !important;
float: right;
font-size: 11px;
left: -17px;
top: 3px;
position: relative;
text-decoration: none;
text-shadow: #FFFF00 1px 1px 2px;
cursor: help;
}
#talk-thread.searchResults > div > div > div {
margin: 15px 8px;
}
form.searchNav {
display: inline;
border: none !important;
background: transparent !important;
}
.searchNav input {
background: #858C97;
color: #000000;
border: 1px solid #333;
}
.clear {
clear: both;
height: 1px;
}
img.smiley {
width: 20px;
height: 20px;
vertical-align: middle;
margin: 0;
}
img.rssfeed {
width: 16px;
float: right;
margin-top: 10px;
}
#markhelp {
width: 80%;
background-color: #cbcfd6;
padding: 2pt 10pt;
margin-top: 10pt;
}
#markhelp .markheading {
background-color: #6fa1ff;
text-align: center;
}
#markhelp table.rst {
width: 100%;
margin: 10px 0px;
font-size: 12pt;
border-collapse: collapse;
}
#markhelp table tr, #markhelp table td {
width: 50%;
border: 1px solid #7d7d7d;
}
#markhelp table td {
padding:4px 9px;
}
blockquote {
padding: 0px 8px;
margin: 10px 0px;
border-left: 2px solid rgb(61, 61, 61);
color: rgb(109, 109, 109);
}
blockquote p {
color: rgb(109, 109, 109) !important;
} |
// This file is automatically generated.
package adila.db;
/*
* Alcatel ONE TOUCH 922
*
* DEVICE: one_touch_922_gsm
* MODEL: ALCATEL ONE TOUCH 922
*/
final class <API key> {
public static final String DATA = "Alcatel|ONE TOUCH 922|";
} |
#include "CCAtlasNode.h"
#include "CCTextureAtlas.h"
#include "CCTextureCache.h"
#include "CCDirector.h"
#include "CCGLProgram.h"
#include "CCShaderCache.h"
#include "ccGLStateCache.h"
#include "CCDirector.h"
#include "TransformUtils.h"
#include "renderer/CCRenderer.h"
#include "renderer/CCQuadCommand.h"
// external
#include "kazmath/GL/matrix.h"
NS_CC_BEGIN
// implementation AtlasNode
// AtlasNode - Creation & Init
AtlasNode::AtlasNode()
: _itemsPerRow(0)
, _itemsPerColumn(0)
, _itemWidth(0)
, _itemHeight(0)
, _textureAtlas(nullptr)
, _isOpacityModifyRGB(false)
, _quadsToDraw(0)
, _uniformColor(0)
, <API key>(false)
{
}
AtlasNode::~AtlasNode()
{
CC_SAFE_RELEASE(_textureAtlas);
}
AtlasNode * AtlasNode::create(const std::string& tile, int tileWidth, int tileHeight, int itemsToRender)
{
AtlasNode * ret = new AtlasNode();
if (ret->initWithTileFile(tile, tileWidth, tileHeight, itemsToRender))
{
ret->autorelease();
return ret;
}
CC_SAFE_DELETE(ret);
return nullptr;
}
bool AtlasNode::initWithTileFile(const std::string& tile, int tileWidth, int tileHeight, int itemsToRender)
{
CCASSERT(tile.size() > 0, "file size should not be empty");
Texture2D *texture = Director::getInstance()->getTextureCache()->addImage(tile);
return initWithTexture(texture, tileWidth, tileHeight, itemsToRender);
}
bool AtlasNode::initWithTexture(Texture2D* texture, int tileWidth, int tileHeight, int itemsToRender)
{
_itemWidth = tileWidth;
_itemHeight = tileHeight;
_colorUnmodified = Color3B::WHITE;
_isOpacityModifyRGB = true;
_blendFunc = BlendFunc::ALPHA_PREMULTIPLIED;
_textureAtlas = new TextureAtlas();
_textureAtlas->initWithTexture(texture, itemsToRender);
if (! _textureAtlas)
{
CCLOG("cocos2d: Could not initialize AtlasNode. Invalid Texture.");
return false;
}
this->updateBlendFunc();
this-><API key>();
this->calculateMaxItems();
_quadsToDraw = itemsToRender;
// shader stuff
setShaderProgram(ShaderCache::getInstance()->getProgram(GLProgram::<API key>));
_uniformColor = <API key>( getShaderProgram()->getProgram(), "u_color");
return true;
}
// AtlasNode - Atlas generation
void AtlasNode::calculateMaxItems()
{
Size s = _textureAtlas->getTexture()->getContentSize();
if (<API key>)
{
s = _textureAtlas->getTexture()-><API key>();
}
_itemsPerColumn = (int)(s.height / _itemHeight);
_itemsPerRow = (int)(s.width / _itemWidth);
}
void AtlasNode::updateAtlasValues()
{
CCASSERT(false, "CCAtlasNode:Abstract updateAtlasValue not overridden");
}
// AtlasNode - draw
void AtlasNode::draw(void)
{
// CC_NODE_DRAW_SETUP();
// GL::blendFunc( _blendFunc.src, _blendFunc.dst );
// GLfloat colors[4] = {_displayedColor.r / 255.0f, _displayedColor.g / 255.0f, _displayedColor.b / 255.0f, _displayedOpacity / 255.0f};
// getShaderProgram()-><API key>(_uniformColor, colors, 1);
// _textureAtlas->drawNumberOfQuads(_quadsToDraw, 0);
auto shader = ShaderCache::getInstance()->getProgram(GLProgram::<API key>);
_quadCommand.init(0,
_vertexZ,
_textureAtlas->getTexture()->getName(),
shader,
_blendFunc,
_textureAtlas->getQuads(),
_quadsToDraw,
_modelViewTransform);
Director::getInstance()->getRenderer()->addCommand(&_quadCommand);
}
// AtlasNode - RGBA protocol
const Color3B& AtlasNode::getColor() const
{
if(_isOpacityModifyRGB)
{
return _colorUnmodified;
}
return Node::getColor();
}
void AtlasNode::setColor(const Color3B& color3)
{
Color3B tmp = color3;
_colorUnmodified = color3;
if( _isOpacityModifyRGB )
{
tmp.r = tmp.r * _displayedOpacity/255;
tmp.g = tmp.g * _displayedOpacity/255;
tmp.b = tmp.b * _displayedOpacity/255;
}
Node::setColor(tmp);
}
void AtlasNode::setOpacity(GLubyte opacity)
{
Node::setOpacity(opacity);
// special opacity for premultiplied textures
if( _isOpacityModifyRGB )
this->setColor(_colorUnmodified);
}
void AtlasNode::setOpacityModifyRGB(bool value)
{
Color3B oldColor = this->getColor();
_isOpacityModifyRGB = value;
this->setColor(oldColor);
}
bool AtlasNode::isOpacityModifyRGB() const
{
return _isOpacityModifyRGB;
}
void AtlasNode::<API key>()
{
_isOpacityModifyRGB = _textureAtlas->getTexture()-><API key>();
}
void AtlasNode::<API key>(bool <API key>)
{
<API key> = <API key>;
}
// AtlasNode - CocosNodeTexture protocol
const BlendFunc& AtlasNode::getBlendFunc() const
{
return _blendFunc;
}
void AtlasNode::setBlendFunc(const BlendFunc &blendFunc)
{
_blendFunc = blendFunc;
}
void AtlasNode::updateBlendFunc()
{
if( ! _textureAtlas->getTexture()-><API key>() )
_blendFunc = BlendFunc::<API key>;
}
void AtlasNode::setTexture(Texture2D *texture)
{
_textureAtlas->setTexture(texture);
this->updateBlendFunc();
this-><API key>();
}
Texture2D * AtlasNode::getTexture() const
{
return _textureAtlas->getTexture();
}
void AtlasNode::setTextureAtlas(TextureAtlas* textureAtlas)
{
CC_SAFE_RETAIN(textureAtlas);
CC_SAFE_RELEASE(_textureAtlas);
_textureAtlas = textureAtlas;
}
TextureAtlas * AtlasNode::getTextureAtlas() const
{
return _textureAtlas;
}
ssize_t AtlasNode::getQuadsToDraw() const
{
return _quadsToDraw;
}
void AtlasNode::setQuadsToDraw(ssize_t quadsToDraw)
{
_quadsToDraw = quadsToDraw;
}
NS_CC_END |
<?php
class <API key> extends CI_Model
{
function __construct()
{
parent::__construct();
$this->sess_id = $this->session->userdata('userid');
}
function load_xls($type,$excelreader,$filename) {
//read-file
$objReader = $excelreader->createReader($type);
$objPHPExcel = $objReader ->load('./files/uploads/'.$filename);
return $objPHPExcel;
}
function report1($su_id,$filename) {
$array = explode('.', $filename);
$extension = end($array);
$this->load->library('excelReader');
if ($extension == "xls") {
$objPHPExcel = $this->load_xls('Excel5',$this->excelreader,$filename);
} else if ($extension == "xlsx") {
$objPHPExcel = $this->load_xls('Excel2007',$this->excelreader,$filename);
} else {
return "nok";
}
$worksheet = $objPHPExcel->getSheet(0);
$lastRow = $worksheet->getHighestRow();
//cek-value-db
/*$query = $this->db->query('SELECT * FROM SMY_PTKP_401 ORDER BY POTENSI DESC LIMIT 1');
$result = $query->result();
foreach ($result as $key) {
$this->db->where('WPP_ID',$key->WPP_ID);
$this->db->where('KOMODITI_ID',$key->KOMODITI_ID);
$this->db->where('POTENSI',$key->POTENSI);
$this->db->where('JTB',$key->JTB);
$this->db->where('PEMANFAATAN',$key->PEMANFAATAN);
}
$q = $this->db->get('SMY_PTKP_401');
$cek = $q->num_rows();
//echo $this->db->last_query();
die();
if ($cek > 0) {
$this->session->set_flashdata('msg','<div class="alert alert-warning alert-dismissible fade show" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>Data Sudah Ada!</div>');
redirect('administrator/source_upload/add');
}else{*/
//<API key>
//value-tahun
$tahun = array();
$s = 'A'; //kondisi mulai abjad A
while($s != 'F'){
$s = chr(ord($s) + 1);
$a = $worksheet->getCell($s.'8')->getValue();
$tahun[] = (str_replace('2016*', '2016',$a));
}
//jenis_budidaya
$komod = array('Udang Windu');
//Tambak
//value-komoditas
$prov = array();
for ($i = 10; $i <= 24; $i++) {
$prov[] = $worksheet->getCell("A".$i)->getValue();
}
//value-Total_units
$tot_unit1 = array();
for ($i = 10; $i <= 24; $i++) {
$tot_unit1[] = $worksheet->getCell("B".$i)->getValue();
}
$cek = $this->db->query('SELECT DISTINCT PROVINSI FROM SMY_PBD_520_539 WHERE KOMODITAS="Udang Windu"');
$Tocek = $cek->result();
//input_db_1
for ($i=0; $i < count($prov); $i++) {
# code...
$data = array(
'TOTAL_AMOUNT'=>$tot_unit1[$i]
);
$this->db->where('TAHUN',$tahun[0]);
$this->db->where('PROVINSI',$Tocek[$i]->PROVINSI);
$this->db->where('KOMODITAS','Udang Windu');
$this->db->update('SMY_PBD_520_539',$data);
}
//value-Total_units
$tot_unit2 = array();
for ($i = 10; $i <= 24; $i++) {
$tot_unit2[] = $worksheet->getCell("C".$i)->getValue();
}
//input_db_2
for ($i=0; $i < count($prov); $i++) {
# code...
$data = array(
'TOTAL_AMOUNT'=>$tot_unit2[$i]
);
$this->db->where('TAHUN',$tahun[1]);
$this->db->where('PROVINSI',$Tocek[$i]->PROVINSI);
$this->db->where('KOMODITAS','Udang Windu');
$this->db->update('SMY_PBD_520_539',$data);
}
//value-Total_units
$tot_unit3 = array();
for ($i = 10; $i <= 24; $i++) {
$tot_unit3[] = $worksheet->getCell("D".$i)->getValue();
}
//input_db_3
for ($i=0; $i < count($prov); $i++) {
# code...
$data = array(
'TOTAL_AMOUNT'=>$tot_unit3[$i]
);
$this->db->where('TAHUN',$tahun[2]);
$this->db->where('PROVINSI',$Tocek[$i]->PROVINSI);
$this->db->where('KOMODITAS','Udang Windu');
$this->db->update('SMY_PBD_520_539',$data);
}
//value-Total_units
$tot_unit4 = array();
for ($i = 10; $i <= 24; $i++) {
$tot_unit4[] = $worksheet->getCell("E".$i)->getValue();
}
//input_db_4
for ($i=0; $i < count($prov); $i++) {
# code...
$data = array(
'TOTAL_AMOUNT'=>$tot_unit4[$i]
);
$this->db->where('TAHUN',$tahun[3]);
$this->db->where('PROVINSI',$Tocek[$i]->PROVINSI);
$this->db->where('KOMODITAS','Udang Windu');
$this->db->update('SMY_PBD_520_539',$data);
}
//value-Total_units
$tot_unit5 = array();
for ($i = 10; $i <= 24; $i++) {
$tot_unit5[] = $worksheet->getCell("F".$i)->getValue();
}
//input_db_5
for ($i=0; $i < count($prov); $i++) {
# code...
$data = array(
'TOTAL_AMOUNT'=>$tot_unit5[$i]
);
$this->db->where('TAHUN',$tahun[4]);
$this->db->where('PROVINSI',$Tocek[$i]->PROVINSI);
$this->db->where('KOMODITAS','Udang Windu');
$this->db->update('SMY_PBD_520_539',$data);
}
$this->session->set_flashdata('msg','<div class="alert alert-warning alert-dismissible fade show" role="alert"><button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>Data Tersimpan</div>');
redirect('administrator/source_upload/add');
die();
}
} |
package freenet.support.CPUInformation;
/**
* An interface for classes that provide lowlevel information about CPU's
*
* @author Iakin
*/
public interface CPUInfo
{
/**
* @return A string indicating the vendor of the CPU.
*/
public String getVendor();
/**
* @return A string detailing what type of CPU that is present in the machine. I.e. 'Pentium IV' etc.
* @throws UnknownCPUException If for any reason the retrieval of the requested information
* failed. The message encapsulated in the execption indicates the
* cause of the failure.
*/
public String getCPUModelString() throws UnknownCPUException;
/**
* @return true iff the CPU support the MMX instruction set.
*/
public boolean hasMMX();
/**
* @return true iff the CPU support the SSE instruction set.
*/
public boolean hasSSE();
/**
* @return true iff the CPU support the SSE2 instruction set.
*/
public boolean hasSSE2();
/**
* @return true iff the CPU support the SSE3 instruction set.
*/
public boolean hasSSE3();
/**
* @return true iff the CPU support the SSE4.1 instruction set.
*/
public boolean hasSSE41();
/**
* @return true iff the CPU support the SSE4.2 instruction set.
*/
public boolean hasSSE42();
/**
* @return true iff the CPU support the SSE4A instruction set.
*/
public boolean hasSSE4A();
/**
* @return true iff the CPU supports the AES-NI instruction set.
* @since 0.9.14
*/
public boolean hasAES();
} |
package desenvolvimento.com.garfo.Model;
import android.view.Menu;
import java.util.HashMap;
import java.util.List;
public class MenuItem {
private String name;
private String description;
private String price;
private String preparationTime;
private HashMap<String, String> ingredients;
public MenuItem(
String name,
String description,
String price,
String preparationTime,
HashMap<String, String> ingredients) {
this.name = name;
this.description = description;
this.price = price;
this.preparationTime = preparationTime;
this.ingredients = ingredients;
}
public MenuItem() {}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getPrice() {
return price;
}
public void setPrice(String price) {
this.price = price;
}
public String getPreparationTime() {
return preparationTime;
}
public void setPreparationTime(String preparationTime) {
this.preparationTime = preparationTime;
}
public HashMap<String, String> getIngredients() {
return ingredients;
}
public void setIngredients(HashMap<String, String> ingredients) {
this.ingredients = ingredients;
}
} |
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<title>Rheinpark Spielplatz</title>
<link href="css/style.css" rel="stylesheet">
</head>
<body>
<header>
<h1>Rheinpark Spielplatz</h1>
<p>Sachsenbergstrasse 1<br>
50679 Köln</p>
<ul>
<li><a href="eintragen.htm">Spielplatz eintragen</a></li>
<li><a href="#bewertungen">Bewertungen anzeigen</a></li>
<li><a href="http://facebook.de/spielplatztreff">Facebookseite</a></li>
</ul>
</header>
<main>
<section>
<div>
<h2>Beschreibung</h2>
<p>Ein riesengroßer, toller Spielplatz mit den vielfältigsten Spielmöglichkeiten. Die riesigen Rutschen und die neue Seil-Kletteranlage gehören wohl zu den beliebtesten Spielgeräten. <br><br>Hier kommen Kinder, die gerne klettern, unbedingt auf ihre Kosten. Die Wiese rund um den Spielplatz bietet genügend Platz zum Toben und Verweilen. Eine Kleinbahn fährt auf einer Rundstrecke durch den Rheinpark, auch am Spielplatz vorbei. Ist ganz nett. Der Spielplatz ist meistens ziemlich voll und damit etwas unübersichtlich. Aber wenn die Kinder schon so groß sind, dass man sie nicht mehr ununterbrochen im Auge haben muss, ist das ein sehr schöner Ort, um auch mal einen ganzen Tag dort zu verbringen.
</p>
</div>
<div>
<h2>Spielgeräte</h2>
<p>Kletterwand, Reckstange, Seilbahn, Aktivburg, Balancier-Element, Hängematte, Hangelgerät, Wackelbrücke, Kletterelement, Kletterspinne, Reifenschaukel, Röhrenrutsche, Klettergerät mit Rutsche, Sandfläche, Schaukel</p>
</div>
<div>
<h2>Ausstattungen</h2>
<p>Gastronomie / Kiosk, Toiletten, Eingezäunt, Sitzbänke, Schatten</p>
</div>
</section>
<section>
<h2 id="bewertungen">Bewertungen</h2>
<p>Insgesamt 6 Bewertungen</p>
<div>
<h3>Echt cool</h3>
<ul>
<li>von: DonnieB</li>
<li>am: 08.05.2013</li>
</ul>
<p>Ich krieg zwar jedesmal Herzklabaster wenn mein kurzer da uff die Rutschen klettert … aber es ist einfach ein schöner Spielplatz der zum Klettern, Rutschen und Buddeln einlädt. Vor allem ist er schön übersichtlich</p>
</div>
<div>
<h3>Wahnsinn!</h3>
<ul>
<li>von: sylvia</li>
<li>am: 15.01.2012</li>
</ul>
<p>Tolles Ausflugziel !</p>
</div>
<div>
<h3>Super Sache</h3>
<ul>
<li>von: dinemaus</li>
<li>am: 24.08.2011</li>
</ul>
<p>Schöner Spielplatz für alle.</p>
</div>
<div>
<h3>Grandios! Weiter machen!</h3>
<ul>
<li>von: Anas</li>
<li>am: 19.06.2011Anas</li>
</ul>
</div>
</section>
<section>
<h2>Bilder</h2>
<p><a href="/add-image.htm">Eigene Fotos hinzufügen</a></p>
<figure>
<img src="images/DSC_0004.JPG" alt="Klettertürme mit Brücke">
<figcaption>Klettertürme mit Brücke</figcaption>
</figure>
<figure>
<img src="images/DSC_0015.JPG" alt="Kletterseile" >
<figcaption>Kletterseile</figcaption>
</figure>
<figure>
<img src="images/DSC_0024.JPG" alt="Übersicht über deb Spielplatz">
<figcaption>Übersicht über deb Spielplatz</figcaption>
</figure>
<figure>
<img src="images/DSC_9996.JPG" alt="Park">
<figcaption>Der Rheinpark</figcaption>
</figure>
</section>
</main>
<aside>
<div>
<h2>Eingetragen von Bettina aus Köln</h2>
<p>Bettina hat:</p>
<ul>
<li>38 Spielplätze eingetragen</li>
<li>535 Fotos hochgeladen</li>
<li>68 Bewertungen abgegeben</li>
<li>5 Favoriten</li>
</ul>
</div>
<div>
<!
********************
<table>
<caption>Spielplätze in der Nähe</caption>
<thead>
<tr>
<th>Vorschaubild</th>
<th>Spielplatz</th>
<th>Entfernung in km</th>
</tr>
</thead>
<tbody>
<tr>
<td><img src="https:
<td>Familienpark unter der Zoobrücke</td>
<td>0.65</td>
</tr>
<tr>
<td><img src="https:
<td>Barmer Platz</td>
<td>0.92</td>
</tr>
<tr>
<td><img src="https:
<td>Theodor-Heuss-Ring Nord</td>
<td>1.06</td>
</tr>
<tr>
<td><img src="https:
<td>Kleiner Spielplatz im Kölner Zoo</td>
<td>1.14</td>
</tr>
<tr>
<td><img src="https:
<td>Theodor-Heuss-Ring Süd</td>
<td>1.21</td>
</tr>
<tr>
<td><img src="https:
<td>Flora</td>
<td>1.28</td>
</tr>
<tr>
<td><img src="https:
<td>An St. Kunibert</td>
<td>1.34</td>
</tr>
<tr>
<td><img src="https:
<td>Reischplatz</td>
<td>1.43</td>
</tr>
<tr>
<td><img src="https:
<td>Arminiusstraße</td>
<td>1.50</td>
</tr>
<tr>
<td><img src="https:
<td>Fort X</td>
<td>1.57</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="2">Spielplätze im Umkreis von</td>
<td>2</td>
</tr>
</tfoot>
</table>
<!
********************
</div>
<div>
<h2>Spielplätze in Köln</h2>
<ul>
<li>5 Abenteuerspielplätze</li>
<li>10 barrierefreie Spielplätze</li>
<li>44 Bolzplätze</li>
<li>4 Indoorspielplätze</li>
<li>3 Kletterwälder</li>
<li>9 Mehrgenerationenspielplätze</li>
<li>8 Skateranlagen</li>
<li>16 Wasserspielplätze</li>
<li>3 Erlebnis- /Tierparks</li>
<li>2 Spielpunkte</li>
<li>2 Waldspielplätze</li>
</ul>
</div>
</aside>
<!
********************
<section>
<h2>Spielplatz eintragen</h2>
<form action="
<fieldset>
<legend>Spielplatz</legend>
<section>
<div>
<label for="bezeichnung">Bezeichnung</label>
<input type="text" id="bezeichnung" name="bezeichnung">
</div>
<div>
<label for="strasse">Straße</label>
<input type="text" id="strasse" name="strasse">
</div>
<div>
<label for="postleitzahl">Postleitzahl</label>
<input type="text" id="postleitzahl" name="postleitzahl">
</div>
<div>
<label for="ort">Ort</label>
<input type="text" id="ort" name="ort">
</div>
<div>
<label for="beschreibung">Beschreibung</label>
<textarea id="beschreibung" name="beschreibung"></textarea>
</div>
</section>
<section>
<p>Alter</p>
<div>
<input type="checkbox" name="alter" id="0-3" value="0-3">
<label for="0-3">0 - 3 Jahre</label>
</div>
<div>
<input type="checkbox" name="alter" id="4-6" value="4-6">
<label for="4-6">4 - 6 Jahre</label>
</div>
<div>
<input type="checkbox" name="alter" id="7-12" value="7-12">
<label for="7-12">7 - 12 Jahre</label>
</div>
<div>
<input type="checkbox" name="alter" id="13-16" value="13-16">
<label for="13-16">13 - 16 Jahre</label>
</div>
<div>
<input type="checkbox" name="alter" id="16plus" value="16+">
<label for="16plus">16+ Jahre</label>
</div>
</section>
<section>
<label for="photo">Foto hochladen</label>
<input type="file" name="photo" id="photo">
</section>
<section>
<p>Bewertung</p>
<div>
<input type="radio" name="bewertung" id="1-star" value="1-star">
<label for="1-star">1 Stern</label>
</div>
<div>
<input type="radio" name="bewertung" id="2-star" value="2-star">
<label for="2-star">2 Sterne</label>
</div>
<div>
<input type="radio" name="bewertung" id="3-star" value="3-star">
<label for="3-star">3 Sterne</label>
</div>
<div>
<input type="radio" name="bewertung" id="4-star" value="4-star">
<label for="4-star">4 Sterne</label>
</div>
<div>
<input type="radio" name="bewertung" id="5-star" value="5-star">
<label for="5-star">5 Sterne</label>
</div>
</section>
</fieldset>
<fieldset>
<legend>Ansprechpartner</legend>
<div>
<label for="name">Name</label>
<input type="text" name="name" id="name" placeholder="Name">
</div>
<div>
<label for="email">E-Mail-Adresse</label>
<input type="email" name="email" id="email" placeholder="max@mustermann.de">
</div>
<div>
<label for="phone">Telefonnummer</label>
<input type="tel" name="phone" id="phone" placeholder="+4902261333333">
</div>
</fieldset>
<input type="submit" value="Spielplatz eintragen">
</form>
</section>
<!
********************
</body>
</html> |
'use strict'
const Bcrypt = require('bcrypt')
const Boom = require('@hapi/boom')
const Config = require('getconfig')
const JWT = require('jsonwebtoken')
const Joi = require('@hapi/joi')
module.exports = {
description: 'Sign up',
tags: ['api', 'user'],
handler: async function (request, h) {
const invite = await this.db.invites.findOne({
token: request.payload.invite,
claimed_by: null
})
if (!invite) {
throw Boom.notFound('Invalid invite')
}
const hash = await Bcrypt.hash(request.payload.password, Config.saltRounds)
await this.db.tx(async (tx) => {
const user = await tx.users.insert({
name: request.payload.name,
email: request.payload.email,
hash
})
for (let i = 0; i < Config.invites.count; ++i) {
await tx.invites.insert({ user_id: user.id })
}
await tx.invites.update(
{ token: request.payload.invite },
{ claimed_by: user.id }
)
})
const user = await this.db.users.active(request.payload.email)
user.timestamp = new Date()
return h
.response({
token: JWT.sign({ ...user }, Config.auth.secret, Config.auth.options)
})
.code(201)
},
validate: {
payload: Joi.object().keys({
invite: Joi.string()
.guid()
.required(),
name: Joi.string().required(),
email: Joi.string()
.email()
.required(),
password: Joi.string()
.min(8, 'utf-8')
.required(),
passwordConfirm: Joi.any()
.valid(Joi.ref('password'))
.strip()
})
},
auth: false
} |
layout: post
title: "Jekyll + DigitalOcean: That's how I roll"
date: 2015-09-01
categories: blog
tags: workflow dicas
language: en
featured: false
image: /assets/images/posts/2015_jekyll_do.png
comments: true
permalink: thats-how-i-roll
est-read-time: 6
excerpt: A quick guide about a simple stack that will help you to publish your blog and use GitHub Pages as a staging environment.
[Jekyll](http://jekyllrb.com) is a static site generator written in Ruby, this way you need to have Ruby and Ruby Gems installed in your pc to use it.
Jekyll itself recommends a Unix based system for development and although Windows is not supported they have a [tutorial](http://jekyllrb.com/docs/windows/#installation) about how to make it work.
## Getting started with Jekyll
Use Jekyll is super easy. It's a CLI tool, the basic commands are:
`gem install jekyll`
> Use it to install Jekyll globally on your computer.
`jekyll new my-site`
> Use it to create a new Jekyll site inside `my-site` folder.
`jekyll serve`
> Use it to generate all the assets and watch for changes. It can also be used as: `jekyll s`
And that's it for our basic Jekyll tutorial. Let's move on.
## Configuring Jekyll
The most common way to configure your Jekyll site is to use a `_config.yml` file in the root of the project. Let's take a look at a basic `_config.yml` file to see how it looks:
title: Cassio Cardoso | Web Developer
email: me@cassio.rocks
description: Lorem ipsum dolor
sass:
sass_dir: _sass
style: :compressed
markdown: kramdown
highlighter: rouge
You can use the `_config.yml` file to define a handful of options. Besides the common page title, author, description, you can use it for more ellaborate stuff like creating lists of links, defining plugins (gems) to use, and setting some custom globals.
## Basic structure
When you run the command `jekyll new` it provides a basic structure for your project. Let's take a look at the most important parts of it.
`_config.yml`
As mentioned before this file is created at the root of the project and it's used to define configuration variables.
`/_layouts`
As the name may suggest this folder will hold all the different page layouts used accross the site. You're given a couple of basic layouts like `default.html` and `post.html`. The default layout is used in every single page, and the post layout is a wrapper for blog posts. You can also create your own layouts as needed.
`/_includes`
This folder is used to store small components used in your layouts. It's a nice way to split the full page layouts into the `_layouts` folder and the components in the `_includes` folder. Common components are the header, footer, and some snippets like Google Analytics, Disqus, etc.
`/_sass`
Here is part of where magic happens. You can set up the front matter to allow Jekyll to compile everything inside the `_sass` folder to a unique file for production. It's a nice way to make your CSS more modular and easy to maintain. You just need a `main.scss` file at the root of your project importing all the files you want (similar to the way Bootstrap does).
`/_posts`
In this folder you'll put all the posts you have. People tend to create a `_drafts` folder to serve as a prequel for the `_posts` but it's optional. The posts are written in Markdown and you should name it in the following formt: `<API key>.md` so Jekyll can compile it correctly with the metadata it needs.
`/_site`
This folder is auto generated each time you run Jekyll. That's why it normally doesn't go to versioning systems (a.k.a put it on `.gitignore`).
## My setup
I decided to go with Jekyll because it's very simple, fast and I'm able to maintain a blog without any of the _stress_ required to configure a lot of stuff, set server up and verything else. Also, being able to write posts directly in Markdown is a **huge** plus.
Host
For the hosting I'm using [Digital Ocean](https:
If you want to try Digital Ocean, click [here](https:
CDN
I'm giving CloudFlare a try. For a long time I wnated to test some tool, so I decided to go with CloudFlare. I'm currently using the free plan to evaluate the service. They offer a lot of options so I'm testing them to see how it affects the site. So far so good.
Well, this was an introduction to Jekyll and how I set it up using Digital Ocean and CloudFlare. Hope you all enjoy. |
from . import views
def register_in(router):
router.register(r'openstack', views.<API key>, base_name='openstack')
router.register(r'openstack-images', views.ImageViewSet, base_name='openstack-image')
router.register(r'openstack-flavors', views.FlavorViewSet, base_name='openstack-flavor')
router.register(r'openstack-tenants', views.TenantViewSet, base_name='openstack-tenant')
router.register(r'<API key>', views.<API key>, base_name='openstack-spl')
router.register(r'<API key>', views.<API key>, base_name='openstack-sgp')
router.register(r'<API key>', views.FloatingIPViewSet, base_name='openstack-fip')
router.register(r'openstack-networks', views.NetworkViewSet, base_name='openstack-network')
router.register(r'openstack-subnets', views.SubNetViewSet, base_name='openstack-subnet') |
#!/usr/bin/env python
# grab audio from bag
import rosbag, rospy, numpy as np
import struct
import sys, os, cv2, glob
from itertools import izip, repeat
from subprocess import call
import subprocess
import argparse
depth_to_string = {16 : 'int16', 32: 'int32', None: 'int32'}
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Extract audio from bag files.')
parser.add_argument('--start', '-s', action='store', default=rospy.Time(0), type=rospy.Time,
help='Rostime representing where to start in the bag.')
parser.add_argument('--end', '-e', action='store', default=rospy.Time(sys.maxint), type=rospy.Time,
help='Rostime representing where to stop in the bag.')
parser.add_argument('--depth', '-d', action='store', default=None, type=int,
help='force depth in bits (16 or 32) of audio samples.')
parser.add_argument('topic')
parser.add_argument('bagfile')
args = parser.parse_args()
out_file_name = "audio.raw"
wav_file_name = "audio.wav"
plot_file_name = "audio.dat"
sample_list = []
tot_num_samples = 0
num_samples = 0 # does not include first packet
num_packets = 0 # does not include first packet
t1 = 0
t = 0
t_start = 0 # start time of bag
t_last = 0
drop_packets = 5
packet_cnt = 0
outfile = open(out_file_name, 'w')
print "reading bag file..."
depth = depth_to_string[args.depth]
channels = 2
rate = 48000
for bagfile in glob.glob(args.bagfile):
bag = rosbag.Bag(bagfile, 'r')
t_start = bag.get_start_time()
iterator = bag.read_messages(topics=args.topic, start_time=args.start, end_time=args.end)
for (topic, msg, time) in iterator:
if msg._type == 'audio_common_msgs/AudioDataStamped':
if packet_cnt < drop_packets:
packet_cnt += 1
continue
data = np.asarray(msg.data)
outfile.write(data)
channels = msg.format.channels
rate = msg.format.rate
if not args.depth:
depth = depth_to_string[msg.format.depth]
arr = np.reshape(np.fromstring(msg.data, dtype=depth),(-1, channels))
sample_list.append(arr)
nsamples = arr.shape[0]
tot_num_samples += nsamples
t_record = time.to_sec()
t = msg.header.stamp.to_sec()
if t1 == 0:
# not counting the first packet!
t1 = t
else:
num_samples += nsamples
num_packets += 1
t_last = t
outfile.close()
print "channels: %d, depth: %s" % (channels, depth)
dt = (t - t1) / num_samples
print "num samples: %d estimated rate: %f, recorded rate: %f" % (num_samples, (1.0/dt), rate)
samples = np.zeros((tot_num_samples,channels), dtype=int)
print samples.shape
idx = 0
for s in sample_list:
samples[idx:(idx+s.shape[0]),:] = s
idx = idx + s.shape[0]
avg_packet_size = num_samples / num_packets
t0 = t1 - avg_packet_size * dt # shift to account for first packet lag
print "writing to file ", plot_file_name
outfile = open(plot_file_name, 'wb')
outfile.write(struct.pack('i', 0)) # file format version #
outfile.write(depth)
outfile.write(struct.pack('i', tot_num_samples))
outfile.write(struct.pack('i', channels)) #args.channels))
# ros sample time ts = t0 + sample_number * dt
# relative time = ts - t_start
outfile.write(struct.pack('f'*5, *(rate, t_start, t0, t1, dt)))
#perm = [3,6,7,5,4,0,1,2] # XXX permutation rearrange mic's in right order
#s_perm = samples[:,perm]
s_perm = samples
s_perm.astype(depth).tofile(outfile)
outfile.close()
print "wrote raw data to %s" % out_file_name
enc = 's16le' if depth == 'int16' else 's32le'
bashCommand = "ffmpeg -y -f %s -ar %f -ac %d -i %s %s" % (enc, float(rate), channels, out_file_name, wav_file_name)
print bashCommand
process = subprocess.Popen(bashCommand.split(), stdout=subprocess.PIPE)
output, error = process.communicate() |
**NOTE**
This repository is not maintained. Please use [binch-go](https://github.com/tunz/binch-go) instead. I just rewrote this in Go since python is slow and keystone python library is not maintained well.
# a light BINary patCH tool
A light ELF binary patch tool in python urwid. It helps to patch a ELF binary in a few steps.

Now, it only supports x86, x86_64, and ARM(experimental).
## Usage
$ ./binch [binary name]
# Shortcuts
g: Go to a specific address. (if not exists, jump to nearest address)
d: Remove a current line. (Fill with nop)
q: Quit.
s: Save a modified binary to a file.
enter: Modify a current line.
h: Modify hex bytes of a current line.
f: follow the address of jmp or call instructions. |
package gnu.kawa.lispexpr;
import gnu.expr.*;
import gnu.mapping.*;
import gnu.lists.*;
import gnu.bytecode.*;
import gnu.mapping.EnvironmentKey;
import gnu.kawa.io.InPort;
import gnu.kawa.io.TtyInPort;
import gnu.kawa.reflect.StaticFieldLocation;
import gnu.text.Lexer;
import gnu.text.SourceMessages;
import java.util.HashMap;
import kawa.lang.Translator; // FIXME
import kawa.lang.Syntax; // FIXME
/** Language sub-class for Lisp-like languages (including Scheme). */
public abstract class LispLanguage extends Language
{
static public final String quote_str = "quote";
static public final String unquote_str = "unquote";
static public final String unquotesplicing_str = "unquote-splicing";
static public final String quasiquote_str = "quasiquote";
public static final Symbol quasiquote_sym =
Namespace.EmptyNamespace.getSymbol(quasiquote_str);
public static final SimpleSymbol dots3_sym = Symbol.valueOf("...");
static public final String splice_str = "$splice$";
static public final Symbol splice_sym = Namespace.EmptyNamespace.getSymbol(splice_str);
/** Used for Kawa infix ':' operator. */
static public final Symbol lookup_sym = Namespace.EmptyNamespace.getSymbol("$lookup$");
// FUTURE: Used for: [ e1 e2 ... ]
// for future sequence/list constructors.
static public final Symbol bracket_list_sym = Namespace.EmptyNamespace.getSymbol("$bracket-list$");
// FUTURE: Used for: name[ e1 e2 ... ]
// Needed for array types - e.g. Object[]
// and (possible future) parameterized types - e.g. java.util.List[integer]
static public final Symbol bracket_apply_sym = Namespace.EmptyNamespace.getSymbol("$bracket-apply$");
public static StaticFieldLocation <API key> =
new StaticFieldLocation("gnu.kawa.functions.GetNamedPart", "getNamedPart");
static { <API key>.setProcedure(); }
/**
* The unit namespace contains the bindings for symbols such as `cm',
* `s', etc.
*/
public static final Namespace unitNamespace =
Namespace.valueOf("http://kawa.gnu.org/unit", "unit");
public static final Namespace constructNamespace =
Namespace.valueOf("http://kawa.gnu.org/construct", "$construct$");
public static final Namespace entityNamespace =
Namespace.valueOf("http://kawa.gnu.org/entity", "$entity$");
/** The default <code>ReadTable</code> for this language. */
protected ReadTable defaultReadTable;
/** Create a fresh <code>ReadTable</code> appropriate for this language. */
public abstract ReadTable createReadTable ();
public LispReader getLexer(InPort inp, SourceMessages messages)
{
return new LispReader(inp, messages);
}
public String getCompilationClass () { return "kawa.lang.Translator"; }
public boolean parse (Compilation comp, int options)
throws java.io.IOException, gnu.text.SyntaxException
{
kawa.lang.Translator tr = (kawa.lang.Translator) comp;
Lexer lexer = tr.lexer;
ModuleExp mexp = tr.getModule();
LispReader reader = (LispReader) lexer;
Compilation saveComp = Compilation.setSaveCurrent(tr);
InPort in = reader == null ? null : reader.getPort();
if (in instanceof TtyInPort)
((TtyInPort) in).resetAndKeep();
try
{
if (tr.pendingForm != null)
{
tr.scanForm(tr.pendingForm, mexp);
tr.pendingForm = null;
}
for (;;)
{
if (reader == null)
break;
Object sexp = reader.readCommand();
// A literal unquoted #!eof
if (Translator.listLength(sexp) == 2
&& Translator.safeCar(sexp) == kawa.standard.begin.begin
&& Translator.safeCar(Translator.safeCdr(sexp)) == Sequence.eofValue
&& (options & (PARSE_ONE_LINE|<API key>)) != 0) {
return false;
}
if (sexp == Sequence.eofValue)
{
if ((options & PARSE_ONE_LINE) != 0)
return false; // FIXME
break;
}
int ch;
do { ch = lexer.read(); }
while (ch == ' ' || ch == '\t'|| ch == '\r');
if (ch == ')')
lexer.fatal("An unexpected close paren was read.");
if (ch != '\n')
lexer.unread(ch);
tr.scanForm(sexp, mexp);
if ((options & PARSE_ONE_LINE) != 0)
{
// In a REPL we want to read all the forms until EOL.
// One reason is in case an expression reads from stdin,
// in which case we want to separate that.
// Another reason to be consistent when a UI gives
// a multi-line block.
if (ch < 0 || ch == '\n' || ! lexer.isInteractive())
break;
}
else if ((options & PARSE_PROLOG) != 0
&& tr.getState() >= Compilation.PROLOG_PARSED)
{
return true;
}
}
// Must be done before any other module imports this module.
tr.finishModule(mexp);
tr.setState(Compilation.BODY_PARSED);
}
finally
{
if (in instanceof TtyInPort)
((TtyInPort) in).setKeepAll(false);
Compilation.restoreCurrent(saveComp);
}
return true;
}
/** Resolve names and other post-parsing processing. */
public void resolve (Compilation comp)
{
Translator tr = (Translator) comp;
ModuleExp mexp = tr.getModule();
tr.resolveModule(mexp);
if (tr.subModuleMap != null) {
String mainName = tr.mainClass.getName();
ModuleInfo subinfo = tr.subModuleMap.get(mainName);
if (subinfo != null
&& ! (mexp.body == QuoteExp.voidExp && mexp.firstDecl() == null)) {
ModuleExp submodule = subinfo.getModuleExpRaw();
tr.error('e', "module has both statements and a submodule with the same name: "+tr.mainClass.getName(),
submodule != null ? submodule : mexp);
}
}
}
public Declaration declFromField (ModuleExp mod, Object fvalue, Field fld)
{
Declaration fdecl = super.declFromField(mod, fvalue, fld);
boolean isFinal = (fld.getModifiers() & Access.FINAL) != 0;
if (isFinal && fvalue instanceof Syntax) // FIXME - should check type? not value?
fdecl.setSyntax();
return fdecl;
}
/** Declare in the current Environment a Syntax bound to a static field.
* @param name the procedure's source-level name.
* @param cname the name of the class containing the field.
* @param fname the name of the field, which should be a static
* final field whose type extends kawa.lang.Syntax.
*/
protected void defSntxStFld(String name, String cname, String fname)
{
Object property
= <API key>() ? EnvironmentKey.FUNCTION : null;
StaticFieldLocation loc =
StaticFieldLocation.define(environ, environ.getSymbol(name), property,
cname, fname);
loc.setSyntax();
}
protected void defSntxStFld(String name, String cname)
{
defSntxStFld(name, cname, mangleNameIfNeeded(name));
}
/**
* Are keywords self-evaluating?
* True in CommonLisp. Used to be true for Scheme also, but now
* in Scheme literal keywords should only be used for keyword arguments;
* if you want a Keyword value if should be quoted.
* @return true if we should treat keywords as self-evaluating.
*/
public boolean <API key>() { return true; }
public boolean <API key> (Object obj)
{
// FUTURE: return <API key>() && obj instanceof Keyword;
return obj instanceof Keyword;
}
/** Convert the Language's idea of a symbol to a gnu.mapping.Symbol. */
public static Symbol langSymbolToSymbol (Object sym)
{
return ((LispLanguage) Language.getDefaultLanguage()).fromLangSymbol(sym);
}
protected Symbol fromLangSymbol (Object sym)
{
if (sym instanceof String)
return getSymbol((String) sym);
return (Symbol) sym;
}
/** The types common to Lisp-like languages. */
private HashMap<String,Type> types;
/** The string representations of Lisp-like types. */
private HashMap<Type,String> typeToStringMap;
protected synchronized HashMap<String, Type> getTypeMap () {
if (types == null) {
types = new HashMap<String, Type>(64); // Plently of space.
types.put("void", LangPrimType.voidType);
types.put("int", LangPrimType.intType);
types.put("char", LangPrimType.charType);
types.put("character", LangPrimType.characterType);
types.put("character-or-eof", LangPrimType.characterOrEofType);
types.put("byte", LangPrimType.byteType);
types.put("short", LangPrimType.shortType);
types.put("long", LangPrimType.longType);
types.put("float", LangPrimType.floatType);
types.put("double", LangPrimType.doubleType);
types.put("ubyte", LangPrimType.unsignedByteType);
types.put("ushort", LangPrimType.unsignedShortType);
types.put("uint", LangPrimType.unsignedIntType);
types.put("ulong", LangPrimType.unsignedLongType);
types.put("never-returns", Type.neverReturnsType);
types.put("dynamic", LangObjType.dynamicType);
types.put("Object", Type.objectType);
types.put("String", Type.toStringType);
types.put("object", Type.objectType);
types.put("number", LangObjType.numericType);
types.put("quantity", ClassType.make("gnu.math.Quantity"));
types.put("complex", ClassType.make("gnu.math.Complex"));
types.put("real", LangObjType.realType);
types.put("rational", LangObjType.rationalType);
types.put("integer", LangObjType.integerType);
types.put("symbol", ClassType.make("gnu.mapping.Symbol"));
types.put("simple-symbol", ClassType.make("gnu.mapping.SimpleSymbol"));
types.put("namespace", ClassType.make("gnu.mapping.Namespace"));
types.put("keyword", ClassType.make("gnu.expr.Keyword"));
types.put("pair", ClassType.make("gnu.lists.Pair"));
types.put("pair-with-position",
ClassType.make("gnu.lists.PairWithPosition"));
types.put("constant-string", ClassType.make("java.lang.String"));
types.put("abstract-string", ClassType.make("gnu.lists.CharSeq"));
types.put("vector", LangObjType.vectorType);
types.put("string", LangObjType.stringType);
types.put("empty-list", ClassType.make("gnu.lists.EmptyList"));
types.put("sequence", LangObjType.sequenceType);
types.put("list", LangObjType.listType);
types.put("function", ClassType.make("gnu.mapping.Procedure"));
types.put("procedure", LangObjType.procedureType);
types.put("input-port", ClassType.make("gnu.kawa.io.InPort"));
types.put("output-port", ClassType.make("gnu.kawa.io.OutPort"));
types.put("string-output-port",
ClassType.make("gnu.kawa.io.CharArrayOutPort"));
types.put("string-input-port",
ClassType.make("gnu.kawa.io.CharArrayInPort"));
types.put("record", ClassType.make("kawa.lang.Record"));
types.put("type", LangObjType.typeType);
types.put("class-type", LangObjType.typeClassType);
types.put("class", LangObjType.typeClass);
types.put("promise", LangObjType.promiseType);
types.put("document", ClassType.make("gnu.kawa.xml.KDocument"));
types.put("readtable",
ClassType.make("gnu.kawa.lispexpr.ReadTable"));
types.put("string-cursor", LangPrimType.stringCursorType);
}
return types;
}
/**
* Try to get a type of the form lang:type.
*
* E.g. elisp:buffer.
*
* @param name The package-style type name as a string.
* @return null if no such type could be found, or the corresponding
* {@code Type}.
*/
public Type getPackageStyleType(String name) {
int colon = name.indexOf(':');
if (colon > 0) {
String lang = name.substring(0, colon);
Language interp = Language.getInstance(lang);
if (interp == null)
throw new RuntimeException("unknown type '" + name
+ "' - unknown language '" + lang + '\'');
Type type = interp.getNamedType(name.substring(colon + 1));
if (type != null)
types.put(name, type);
return type;
}
return null;
}
@Override
// FIXME: getNamedType is over-specialised....
public Type getNamedType (String name) {
// Initialise the type map if necessary.
Type type = getTypeMap().get(name);
return (type != null) ? type : getPackageStyleType(name);
}
// FIXME: Would be better and little fuss to use a perfect hash
// function for this.
public Type getTypeFor(Class clas) {
String name = clas.getName();
if (clas.isPrimitive())
return getNamedType(name);
/* #ifdef JAVA7 */
; // FIXME - FUTURE: Use a switch with string keys.
/* #endif */
if ("java.lang.String".equals(name))
return Type.toStringType;
Type t = LangObjType.<API key>(name);
if (t != null)
return t;
return super.getTypeFor(clas);
}
@Override
public String getPrimaryPrompt() { return "#|kawa:%N|# "; }
@Override
public String getSecondaryPrompt() { return "
} |
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json')
});
grunt.loadTasks('grunt');
grunt.registerTask('default', ['eslint']);
}; |
# Get it started.
In this chapter we are going to talk about the most common task: purchase of a product using [Klarna Checkout](https://developers.klarna.com/en/klarna-checkout).
Unfortunately, You cannot use Payum's order to purchase stuff. Only klarna specific format is supported.
## Installation
The preferred way to install the library is using [composer](http://getcomposer.org/).
Run composer require to add dependencies to _composer.json_:
bash
php composer.phar require payum/klarna-checkout php-http/guzzle6-adapter
## config.php
We have to only add the gateway factory. All the rest remain the same:
php
<?php
//config.php
use Payum\Core\PayumBuilder;
use Payum\Core\Payum;
/** @var Payum $payum */
$payum = (new PayumBuilder())
->addDefaultStorages()
->addGateway('klarna', [
'factory' => 'klarna_checkout'
'merchant_id' => 'EDIT IT',
'secret' => 'EDIT IT',
])
->getPayum()
;
An initial configuration for Payum basically wants to ensure we have things ready to be stored such as
a token, or a payment details. We also would like to have a registry of various gateways supported and the place where they can store their information (e.g. payment details).
_**Note**: Consider using something other than `FilesystemStorage` in production. `DoctrineStorage` may be a good alternative._
First we have modify `config.php` a bit.
We need to add gateway factory and payment details storage.
## prepare.php
php
<?php
// prepare.php
use Payum\Core\Model\ArrayObject;
include 'config.php';
$storage = $this->getPayum()->getStorage(ArrayObject::class);
$details = $storage->create();
$details['purchase_country'] = 'SE';
$details['purchase_currency'] = 'SEK';
$details['locale'] = 'sv-se';
$storage->update($details);
$authorizeToken = $payum->getTokenFactory()-><API key>('klarna', $details, 'done.php');
$notifyToken = $payum->tokenFactory()->createNotifyToken('klarna', $details);
$details['merchant'] = array(
'terms_uri' => 'http://example.com/terms',
'checkout_uri' => $authorizeToken->getTargetUrl(),
'confirmation_uri' => $authorizeToken->getTargetUrl(),
'push_uri' => $notifyToken->getTargetUrl()
);
$details['cart'] = array(
'items' => array(
array(
'reference' => '123456789',
'name' => 'Klarna t-shirt',
'quantity' => 2,
'unit_price' => 12300,
'discount_rate' => 1000,
'tax_rate' => 2500
),
array(
'type' => 'shipping_fee',
'reference' => 'SHIPPING',
'name' => 'Shipping Fee',
'quantity' => 1,
'unit_price' => 4900,
'tax_rate' => 2500
)
)
);
$storage->update($details);
header("Location: ".$authorizeToken->getTargetUrl());
That's it. As you see we configured Klarna Checkout `config.php` and set details `prepare.php`.
[capture.php](https:
## Next
* [Core's Get it started](https://github.com/Payum/Core/blob/master/Resources/docs/get-it-started.md).
* [The architecture](https://github.com/Payum/Core/blob/master/Resources/docs/the-architecture.md).
* [Supported gateways](https://github.com/Payum/Core/blob/master/Resources/docs/supported-gateways.md).
* [Storages](https://github.com/Payum/Core/blob/master/Resources/docs/storages.md).
Back to [index](index.md). |
using System;
using System.Linq;
using log4net;
using PostSharp.Aspects;
namespace FP.Spartakiade2015.<API key>.DAL
{
[Serializable]
[AttributeUsage(AttributeTargets.Assembly| AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property, Inherited = true)]
public class <API key> : OnExceptionAspect
{
[<API key>]
private static ILog Logger = LogManager.GetLogger(typeof(<API key>));
public override void OnException(MethodExecutionArgs args)
{
Logger.Error(string.Format("DAL error in method {0} Arguments {1}", args.Method.Name,
string.Join(";", args.Arguments.Select(x => x.ToString()).ToArray())), args.Exception);
throw new DALException(args.Method.Name, args.Exception,args.Arguments.ToArray());
}
}
} |
<?php
/**
* @file
* @author Lightly Salted Software Ltd
* @date 6 March 2015
*/
namespace LSS\Schema;
use LSS\Schema\Table\Column\StringColumn;
use LSS\Schema\Table\Index;
class TableTest extends \PHPUnit\Framework\TestCase
{
public function testConstructor()
{
$subject = new Table($name = 'abc', $desc = 'def');
$this->assertEquals($name, $subject->getName());
$this->assertEquals($desc, $subject->getDescription());
$this->assertEquals(0, $subject->getColumnCount());
$this->assertEquals(0, $subject->getIndexCount());
}
public function testAddColumn()
{
$subject = new Table($name = 'abc', $desc = 'def');
$column = new StringColumn($colName = 'ghi', $colDesc = 'jkl');
$result = $subject->addColumn($column);
$this->assertEquals($result, $subject, 'to allow fluent adding of many columns');
$this->assertEquals($column, $subject->getColumnByName($colName));
$this->assertEquals($column, $subject->getColumnNumber(0));
$this->assertEquals(1, $subject->getColumnCount());
$this->assertTrue($subject->hasColumn($colName));
$this->assertFalse($subject->hasColumn('non_existent_column'));
$column2 = new StringColumn($colName2 = 'ghi2', $colDesc2 = 'jkl2');
$subject->addColumn($column2);
$this->assertEquals($column2, $subject->getColumnByName($colName2));
$this->assertEquals($column2, $subject->getColumnNumber(1));
$this->assertEquals(2, $subject->getColumnCount());
// re-adding the same column should not change the count
$subject->addColumn($column2);
$this->assertEquals(2, $subject->getColumnCount());
}
public function testAddIndex()
{
$subject = new Table($name = 'abc', $desc = 'def');
$index = new Index($indexName = 'ghi');
$result = $subject->addIndex($index);
$this->assertEquals($result, $subject, 'to allow fluent adding of many indexes');
$this->assertEquals($index, $subject->getIndexByName($indexName));
$this->assertEquals(1, $subject->getIndexCount());
}
} |
namespace TraktApiSharp.Objects.Get.Syncs.Activities.Json.Writer
{
using Extensions;
using Newtonsoft.Json;
using Objects.Json;
using System;
using System.Threading;
using System.Threading.Tasks;
internal class <API key> : AObjectJsonWriter<<API key>>
{
public override async Task WriteObjectAsync(JsonTextWriter jsonWriter, <API key> obj, Cancellation<API key> = default)
{
if (jsonWriter == null)
throw new <API key>(nameof(jsonWriter));
await jsonWriter.<API key>(cancellationToken).ConfigureAwait(false);
if (obj.All.HasValue)
{
await jsonWriter.<API key>(JsonProperties.<API key>, cancellationToken).ConfigureAwait(false);
await jsonWriter.WriteValueAsync(obj.All.Value.<API key>(), cancellationToken).ConfigureAwait(false);
}
if (obj.Movies != null)
{
var <API key> = new <API key>();
await jsonWriter.<API key>(JsonProperties.<API key>, cancellationToken).ConfigureAwait(false);
await <API key>.WriteObjectAsync(jsonWriter, obj.Movies, cancellationToken).ConfigureAwait(false);
}
if (obj.Shows != null)
{
var <API key> = new <API key>();
await jsonWriter.<API key>(JsonProperties.<API key>, cancellationToken).ConfigureAwait(false);
await <API key>.WriteObjectAsync(jsonWriter, obj.Shows, cancellationToken).ConfigureAwait(false);
}
if (obj.Seasons != null)
{
var <API key> = new <API key>();
await jsonWriter.<API key>(JsonProperties.<API key>, cancellationToken).ConfigureAwait(false);
await <API key>.WriteObjectAsync(jsonWriter, obj.Seasons, cancellationToken).ConfigureAwait(false);
}
if (obj.Episodes != null)
{
var <API key> = new <API key>();
await jsonWriter.<API key>(JsonProperties.<API key>, cancellationToken).ConfigureAwait(false);
await <API key>.WriteObjectAsync(jsonWriter, obj.Episodes, cancellationToken).ConfigureAwait(false);
}
if (obj.Comments != null)
{
var <API key> = new <API key>();
await jsonWriter.<API key>(JsonProperties.<API key>, cancellationToken).ConfigureAwait(false);
await <API key>.WriteObjectAsync(jsonWriter, obj.Comments, cancellationToken).ConfigureAwait(false);
}
if (obj.Lists != null)
{
var <API key> = new <API key>();
await jsonWriter.<API key>(JsonProperties.<API key>, cancellationToken).ConfigureAwait(false);
await <API key>.WriteObjectAsync(jsonWriter, obj.Lists, cancellationToken).ConfigureAwait(false);
}
await jsonWriter.WriteEndObjectAsync(cancellationToken).ConfigureAwait(false);
}
}
} |
<?php
use GameOfLife\Board;
use Output\JPEGOutput;
use PHPUnit\Framework\TestCase;
require_once __DIR__ . "/../Outputs/BaseOutput.php";
require_once __DIR__ . "/../utilities/ImageCreator.php";
require_once __DIR__ . "/../Outputs/JPEGOutput.php";
require_once __DIR__ . "/../Board.php";
require_once "GetOptMock.php";
/**
* Tests that the class JPEGOutput works as expected.
*/
class JPEGOutputTest extends TestCase
{
function testStartOutput()
{
$options = new GetOptMock();
$JPEGOutput = new JPEGOutput();
$JPEGOutput->startOutput($options->createOpt());
$this->expectOutputString("JPEG Dateien werden erzeugt. Bitte warten...\n");
$this->assertNotEmpty($JPEGOutput);
}
function testOutputBoard()
{
$this->assertTrue(true);
$board = new Board(20, 20);
$board->initEmpty();
$options = new GetOptMock();
$JPEGOutput = new JPEGOutput();
$JPEGOutput->startOutput($options->createOpt());
$JPEGOutput->outputBoard($board, $options->createOpt());
$this->expectOutputString("JPEG Dateien werden erzeugt. Bitte warten...\n\rAktuelle Generation: 1");
$this->assertFileExists($JPEGOutput->path . "\\1.jpeg");
}
function testFinishOutput()
{
$JPEGOutput = new JPEGOutput();
$options = new GetOptMock();
$JPEGOutput->finishOutput($options->createOpt());
$this->expectOutputString("\nJPEG Dateien wurden erzeugt.\n");
}
function testAddOptions()
{
$JPEGOutput = new JPEGOutput();
$options = new GetOptMock();
$JPEGOutput->addOptions($options->createOpt());
$this->assertNotEmpty($JPEGOutput);
}
} |
// ProgDlg.h : header file
// CG: This file was added by the Progress Dialog component
// CProgressDlg dialog
#ifndef __PROGDLG_H__
#define __PROGDLG_H__
#include "Resource.h"
class CProgressDlg : public CDialog
{
// Construction / Destruction
public:
CProgressDlg(UINT nCaptionID = 0); // standard constructor
~CProgressDlg();
BOOL Create(CWnd *pParent=NULL);
// Progress Dialog manipulation
void SetRange(int nLower,int nUpper);
int SetStep(int nStep);
int SetPos(int nPos);
int OffsetPos(int nPos);
int StepIt();
// Dialog Data
//{{AFX_DATA(CProgressDlg)
enum { IDD = CG_IDD_PROGRESS };
CProgressCtrl m_Progress;
//}}AFX_DATA
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CProgressDlg)
public:
virtual BOOL DestroyWindow();
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
UINT m_nCaptionID;
int m_nLower;
int m_nUpper;
int m_nStep;
BOOL m_bParentDisabled;
void ReEnableParent();
virtual void OnCancel();
virtual void OnOK() {};
void UpdatePercent(int nCurrent);
void PumpMessages();
// Generated message map functions
//{{AFX_MSG(CProgressDlg)
virtual BOOL OnInitDialog();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif // __PROGDLG_H__ |
const express = require('express');
const app = express();
const bodyParser = require('body-parser');
const morgan = require('morgan');
const errorHandler = require('./utils/error-handler');
const auth = require('./routes/auth');
const experiences = require('./routes/experiences');
const agg = require('./routes/agg');
app.use(express.static('public'));
app.use(morgan('dev'));
app.use(express.static('./public'));
app.use(bodyParser.json());
const countries = require('./routes/countries');
app.use('/api/countries', countries);
const users = require('./routes/users');
app.use('/api/users', users);
app.get('/', (req, res) => res.send('hello country lovers'));
app.use('/api/auth', auth);
app.use('/api/experiences', experiences);
app.use('/api/agg', agg);
app.use(errorHandler());
module.exports = app; |
// FGViewPool.h
// exibitour
#import <Foundation/Foundation.h>
#import "FGTypes.h"
typedef id<FGWithReuseId> (^<API key>) (id<FGWithReuseId> reuseItem);
@interface FGReuseItemPool : NSObject
- (instancetype)initWithArray:(NSArray *) array;
@property (nonatomic, strong, readonly) NSArray * items;
- (void) prepareUpdateItems;
- (id<FGWithReuseId>) updateItem: (NSString *) reuseId initBlock:(<API key>)initBlock outputIsNewView: (BOOL *)isNewView;
- (void) finishUpdateItems: (void(^)(id<FGWithReuseId>)) needAdd needRemove: (void(^)(id<FGWithReuseId>)) needRemove;
@end |
#region Usings
using System;
using System.Globalization;
using JetBrains.Annotations;
#endregion
namespace Extend
{
public static partial class StringEx
{
<summary>
Tries to create a new <see cref="CultureInfo" /> with the given name.
</summary>
<param name="name">The name of the culture.</param>
<returns>Returns the <see cref="CultureInfo" /> with the given name, or null if the culture is not supported.</returns>
[Pure]
[PublicAPI]
public static CultureInfo SafeToCultureInfo( [NotNull] this String name )
{
try
{
return new CultureInfo( name );
}
catch
{
return null;
}
}
<summary>
Tries to create a new <see cref="CultureInfo" /> with the given name.
</summary>
<param name="name">The name of the culture.</param>
<param name="fallbackCulture">The culture returned if the culture with the given name is not supported.</param>
<returns>Returns the <see cref="CultureInfo" /> with the given name, or <paramref name="fallbackCulture" />.</returns>
[NotNull]
[Pure]
[PublicAPI]
public static CultureInfo SafeToCultureInfo( [NotNull] this String name, CultureInfo fallbackCulture )
{
try
{
return new CultureInfo( name );
}
catch
{
return fallbackCulture;
}
}
}
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.