answer
stringlengths 15
1.25M
|
|---|
<!DOCTYPE html>
<!
| Setting the 4 different border widths for 4 directions. border-top-width
| would be default width.
| https://www.w3.org/TR/css3-background/#border-width
<html>
<head>
<style>
div {
border: solid;
border-color: blue;
border-left-width: 20px;
border-bottom-width: .8em;
border-right-width: 10px;
background: #ff6363;
height: 100px;
width: 100px;
}
</style>
</head>
<body>
<div></div>
</body>
</html>
|
package straightedge.geom.vision;
import straightedge.geom.*;
public class CollinearOverlap{
public KPolygon polygon;
public int pointIndex;
public int nextPointIndex;
public KPolygon polygon2;
public int point2Index;
public CollinearOverlap(KPolygon polygon, int pointIndex, int nextPointIndex, KPolygon polygon2, int point2Index){
this.polygon = polygon;
this.pointIndex = pointIndex;
this.nextPointIndex = nextPointIndex;
this.polygon2 = polygon2;
this.point2Index = point2Index;
}
public KPolygon getPolygon() {
return polygon;
}
public int getPointIndex() {
return pointIndex;
}
public int getNextPointIndex() {
return nextPointIndex;
}
public KPolygon getPolygon2() {
return polygon2;
}
public int getPoint2Index() {
return point2Index;
}
}
|
<?php
return array(
'router' => array(
'routes' => array(
'home' => array(
'type' => 'Zend\Mvc\Router\Http\Literal',
'options' => array(
'route' => '/',
'defaults' => array(
'controller' => 'Application\Controller\Index',
'action' => 'index',
),
),
),
// The following is a route to simplify getting started creating
// new controllers and actions without needing to create a new
// module. Simply drop new controllers in, and you can access them
// using the path /application/:controller/:action
'application' => array(
'type' => 'Literal',
'options' => array(
'route' => '/application',
'defaults' => array(
'__NAMESPACE__' => 'Application\Controller',
'controller' => 'Index',
'action' => 'index',
),
),
'may_terminate' => true,
'child_routes' => array(
'default' => array(
'type' => 'Segment',
'options' => array(
'route' => '/[:controller[/:action[/:id[/:id2]]]]',
'constraints' => array(
//en realidad solo funcionan las minusculas.
'controller' => '[a-zA-Z][a-zA-Z0-9_-]*',
'action' => '[a-zA-Z][a-zA-Z0-9_-]*',
'id' => '[0-9-a-z]*',
'id2' => '[0-9-a-z]*'
),
'defaults' => array(
// '__NAMESPACE__' => 'Application\Controller',
// 'controller' => 'Index',
// 'action' => 'index',
),
),
),
),
),
),
),
'service_manager' => array(
'factories' => array(
'translator' => 'Zend\I18n\Translator\<API key>',
),
),
'translator' => array(
'locale' => 'en_US',
'<API key>' => array(
array(
'type' => 'gettext',
'base_dir' => __DIR__ . '/../language',
'pattern' => '%s.mo',
),
),
),
'controllers' => array(
'invokables' => array(
'Application\Controller\Index' => 'Application\Controller\IndexController',
'Application\Controller\Trabajo' => 'Application\Controller\TrabajoController'
),
),
'view_manager' => array(
'<API key>' => true,
'display_exceptions' => true,
'doctype' => 'HTML5',
'not_found_template' => 'error/404',
'exception_template' => 'error/index',
'template_map' => array(
'layout/layout' => __DIR__ . '/../view/layout/layout.phtml',
'application/index/index' => __DIR__ . '/../view/application/index/index.phtml',
'error/404' => __DIR__ . '/../view/error/404.phtml',
'error/index' => __DIR__ . '/../view/error/index.phtml',
),
'template_path_stack' => array(
__DIR__ . '/../view',
),
),
);
|
// This file was generated by RobotBuilder. It contains sections of
// code that are automatically generated and assigned by robotbuilder.
// These sections will be updated in the future when you export to
// Java from RobotBuilder. Do not put any code or make any change in
// the blocks indicating autogenerated code or it will be lost on an
// update. Deleting the comments indicating the section will prevent
// it from being updated in the future.
package org.usfirst.frc157.ProtoBot2017;
import org.usfirst.frc157.ProtoBot2017.AnalogSelectSwitch;
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=IMPORTS
import com.ctre.CANTalon;
import edu.wpi.first.wpilibj.Relay;
import edu.wpi.first.wpilibj.RobotDrive;
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=IMPORTS
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
/**
* The RobotMap is a mapping from the ports sensors and actuators are wired into
* to a variable name. This provides flexibility changing wiring, makes checking
* the wiring easier and significantly reduces the number of magic numbers
* floating around.
*/
public class RobotMap {
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS
public static CANTalon driveFL_Motor;
public static CANTalon driveFR_Motor;
public static CANTalon driveRL_Motor;
public static CANTalon driveRR_Motor;
public static RobotDrive driveMechDrive;
public static CANTalon gearMotorLeft;
public static CANTalon gearMotorRight;
public static CANTalon collectMotor;
public static CANTalon helixMotorRight;
public static CANTalon helixMotorLeft;
public static CANTalon shootMotor;
public static CANTalon climbMotor;
public static Relay leftGateRelay;
public static Relay rightGateRelay;
public final static int <API key> = 3;
public static AnalogSelectSwitch modeSelect;
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=DECLARATIONS
public static void init() {
// BEGIN AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
modeSelect = new AnalogSelectSwitch(0); // Analog Port 0
driveFL_Motor = new CANTalon(5); // CAN ID 5
LiveWindow.addActuator("Drive", "FL_Motor", driveFL_Motor);
driveFR_Motor = new CANTalon(4); // CAN ID 4
LiveWindow.addActuator("Drive", "FR_Motor", driveFR_Motor);
driveRL_Motor = new CANTalon(7); // CAN ID 7
LiveWindow.addActuator("Drive", "RL_Motor", driveRL_Motor);
driveRR_Motor = new CANTalon(6) ; // CAN ID 6
LiveWindow.addActuator("Drive", "RR_Motor", driveRR_Motor);
driveMechDrive = new RobotDrive(driveFL_Motor, driveRL_Motor,
driveFR_Motor, driveRR_Motor);
driveMechDrive.setSafetyEnabled(true);
driveMechDrive.setExpiration(0.5);
driveMechDrive.setSensitivity(0.5);
driveMechDrive.setMaxOutput(1.0);
gearMotorRight = new CANTalon(14); // CAN ID 14
LiveWindow.addActuator("Gear", "gearMotor", gearMotorRight);
gearMotorLeft = new CANTalon(12);
LiveWindow.addActuator("Gear", "gearMotor", gearMotorLeft);
collectMotor = new CANTalon(13); // CAN ID 13
LiveWindow.addActuator("Collect", "collectMotor", collectMotor);
helixMotorRight = new CANTalon(9); // CAN ID 9
helixMotorLeft = new CANTalon(8); // CAN ID 8
shootMotor = new CANTalon(11); // CAN ID 11
climbMotor = new CANTalon(10); // CAN ID 10
rightGateRelay = new Relay(0); // Relay Port 0
leftGateRelay = new Relay(1); // Relay Port 1
// END AUTOGENERATED CODE, SOURCE=ROBOTBUILDER ID=CONSTRUCTORS
}
}
|
# -*- encoding : utf-8 -*-
require 'test_helper'
class Cuenta::<API key> < ActionController::TestCase
test "<API key>" do
u = User.find(1)
sym_login 1
competitions = []
[League, Tournament, Ladder].each { |cls| competitions<< cls.find(:first, :conditions => 'state = 0', :order => 'RANDOM() ASC') }
[League, Tournament, Ladder].each { |cls| competitions<< cls.find(:first, :conditions => 'state = 1', :order => 'RANDOM() ASC') }
[League, Tournament, Ladder].each { |cls| competitions<< cls.find(:first, :conditions => 'state = 2', :order => 'RANDOM() ASC') }
[League, Tournament, Ladder].each { |cls| competitions<< cls.find(:first, :conditions => 'state = 3', :order => 'RANDOM() ASC') }
competitions.each do |c|
c.add_admin(u)
u.last_competition_id = c.id
u.save
get :configuracion
assert_response :success
end
end
test "<API key>" do
# TODO
end
test "<API key>" do
# TODO
end
test "add_participants" do
<API key>
# post :add_participants, { :participants_count => 1}
assert_response :redirect
end
test "recreate_matches" do
# TODO
# <API key>
# get :recreate_matches
# assert_response :redirect
end
test "<API key>" do
<API key>
assert User.find(1).update_attributes(:<API key> => true)
get :index
assert_response :success
end
test "<API key>" do
<API key>
get :<API key>
assert_response :redirect
end
test "reselect_maps" do
<API key>
get :reselect_maps
assert_response :redirect
end
test "<API key>" do
# TODO
end
test "<API key>" do
# TODO
end
test "previous_stage" do
<API key>
get :previous_stage
assert_response :redirect
end
test "general" do
<API key>
get :general
assert_response :success
end
test "avanzada" do
# TODO
end
test "<API key>" do
# TODO
end
test "configuracion" do
<API key>
get :configuracion
assert_response :success
end
test "admins" do
<API key>
get :admins
assert_response :success
end
test "partidas" do
<API key>
get :partidas
assert_response :success
end
test "participantes" do
<API key>
get :participantes
assert_response :success
end
test "<API key>" do
# TODO
end
test "crear_admin" do
<API key>
post :crear_admin, :login => 'panzer'
assert_response :redirect
assert @c.user_is_admin(User.find_by_login('panzer').id)
end
test "eliminar_admin" do
test_crear_admin
post :eliminar_admin, :user_id => User.find_by_login('panzer').id
assert_response :redirect
assert !@c.user_is_admin(User.find_by_login('panzer').id)
end
test "crear_supervisor" do
<API key>
post :crear_supervisor, :login => 'panzer'
assert_response :redirect
assert @c.user_is_supervisor(User.find_by_login('panzer').id)
end
test "eliminar_supervisor" do
<API key>
post :eliminar_supervisor, :user_id => User.find_by_login('panzer').id
assert_response :redirect
assert !@c.user_is_supervisor(User.find_by_login('panzer').id)
end
test "cambiar" do
sym_login 1
get :cambiar
assert_response :success
end
test "mis_partidas" do
# TODO
end
test "list" do
sym_login 1
get :list
assert_response :success
end
test "new" do
sym_login 1
get :new
assert_response :success
end
test "create" do
sym_login 1
<API key>(Competition) do
post :create, :competition => { :type => 'Ladder', :name => 'mi ladder', :game_id => 1, :<API key> => 1, :<API key> => {}, :timetable_options => {}}
end
@c = Competition.find(:first, :order => 'id desc')
assert_equal @c.id, User.find(1).last_competition_id
end
test "update" do
test_create
post :update, { :id => @c.id, :competition => {:description => 'test_update'} }
assert_response :redirect
@c.reload
assert_equal 'test_update', @c.description
end
test "destroy" do
<API key>
post :destroy
assert_response :redirect
assert_nil User.find(1).last_competition_id
assert_nil Competition.find_by_id(@c.id)
end
test "change_state" do
# TODO
end
test "<API key>" do
@c = Competition.find(1)
@c.add_admin(User.find(1))
@c.pro = true
assert @c.save
sym_login 1
post :<API key>, :id => 1
assert_response :redirect
assert_equal 1, User.find(1).last_competition_id
end
test "<API key>" do
<API key>
get :sponsors
assert_response :success
end
test "<API key>" do
<API key>
get :sponsors_new
assert_response :success
end
test "<API key>" do
<API key>
<API key>(CompetitionsSponsor) do
post :sponsors_create, { :<API key> => { :name => 'el nombre', :image => fixture_file_upload('files/buddha.jpg', 'image/jpeg')}}
end
assert_response :redirect
@fl = CompetitionsSponsor.find(:first, :order => 'id desc')
end
test "<API key>" do
<API key>
get :sponsors_edit, :id => CompetitionsSponsor.find(:first, :order => 'id desc').id
assert_response :success
end
test "<API key>" do
<API key>
assert_not_equal 'succubus', @fl.name
post :sponsors_update, :id => @fl.id, :<API key> => {:name => 'dm-tower', :image => fixture_file_upload('files/babe.jpg', 'image/jpeg')}
assert_response :redirect
@fl.reload
assert_equal 'dm-tower', @fl.name
end
test "sponsors_destroy" do
<API key>
<API key>(CompetitionsSponsor) do
post :sponsors_destroy, :id => @fl.id
end
end
end
|
# This file is part of Metasm, the Ruby assembly manipulation suite
# Licence is LGPL, see LICENCE in the top-level directory
require 'metasm/main'
require 'metasm/ia32'
module Metasm
# The x86_64, 64-bit extension of the x86 CPU (x64, em64t, amd64...)
class X86_64 < Ia32
# SegReg, Farptr unchanged
# no more floating point registers (use sse*)
FpReg = nil
# Simd extended to 16 regs, xmm only (mmx gone with 80387)
class SimdReg < Ia32::SimdReg
double_map 128 => (0..15).map { |n| "xmm
end
# general purpose registers, all sizes
# 8 new gprs (r8..r15), set bit R in the REX prefix to reference them (or X/B if in ModRM)
# <API key> with 8bit subreg: with no rex prefix, refers to ah ch dh bh (as usual)
# but whenever the prefix is present, those become unavailable and encodie spl..dil (low byte of rsp/rdi)
class Reg < Ia32::Reg
double_map 8 => %w{ al cl dl bl spl bpl sil dil r8b r9b r10b r11b r12b r13b r14b r15b ah ch dh bh},
16 => %w{ ax cx dx bx sp bp si di r8w r9w r10w r11w r12w r13w r14w r15w},
32 => %w{eax ecx edx ebx esp ebp esi edi r8d r9d r10d r11d r12d r13d r14d r15d eip},
64 => %w{rax rcx rdx rbx rsp rbp rsi rdi r8 r9 r10 r11 r12 r13 r14 r15 rip}
Sym = @i_to_s[64].map { |s| s.to_sym }
# returns a symbolic representation of the register:
# cx => :rcx & 0xffff
# ah => (:rax >> 8) & 0xff
# XXX in x64, 32bits operations are zero-extended to 64bits (eg mov rax, 0x1234_ffff_ffff ; add eax, 1 => rax == 0
def symbolic(di=nil)
s = Sym[@val]
s = di.next_addr if s == :rip and di
if @sz == 8 and to_s[-1] == ?h
Expression[[Sym[@val-16], :>>, 8], :&, 0xff]
elsif @sz == 8
Expression[s, :&, 0xff]
elsif @sz == 16
Expression[s, :&, 0xffff]
elsif @sz == 32
Expression[s, :&, 0xffffffff]
else
s
end
end
# checks if two registers have bits in common
def share?(other)
raise 'TODO'
# XXX TODO wtf does formula this do ?
other.val % (other.sz >> 1) == @val % (@sz >> 1) and (other.sz != @sz or @sz != 8 or other.val == @val)
end
# returns the part of @val to encode in an instruction field
def val_enc
if @sz == 8 and @val >= 16; @val-12 # ah, bh, ch, dh
elsif @val >= 16 # rip
else @val & 7 # others
end
end
# returns the part of @val to encode in an instruction's rex prefix
def val_rex
if @sz == 8 and @val >= 16 # ah, bh, ch, dh: rex forbidden
elsif @val >= 16 # rip
else @val >> 3 # others
end
end
end
# ModRM represents indirections (eg dword ptr [eax+4*ebx+12h])
# 16bit mode unavailable in x64
# opcodes use 64bit addressing by default, use adsz override (67h) prefix to switch to 32
# immediate values are encoded as :i32 sign-extended to 64bits
class ModRM < Ia32::ModRM
# mod 0/1/2 m 4 => sib
# mod 0 m 5 => rip+imm
# sib: i 4 => no index, b 5 => no base
end
class DbgReg < Ia32::DbgReg
simple_map((0..15).map { |i| [i, "dr
end
class CtrlReg < Ia32::CtrlReg
simple_map((0..15).map { |i| [i, "cr
end
# Create a new instance of an X86 cpu
# arguments (any order)
# - instruction set (386, 486, sse2...) [latest]
# - endianness [:little]
def initialize(*a)
super(:latest)
@size = 64
a.delete @size
@endianness = (a & [:big, :little]).first || :little
a.delete @endianness
@family = a.pop || :latest
raise "Invalid arguments #{a.inspect}" if not a.empty?
raise "Invalid X86_64 family #{@family.inspect}" if not respond_to?("init_#@family")
end
# defines some preprocessor macros to say who we are:
# TODO
def tune_prepro(pp)
super(pp, :itsmeX64) # ask Ia32's to just call super()
pp.define_weak('_M_AMD64')
pp.define_weak('_M_X64')
pp.define_weak('__amd64__')
pp.define_weak('__x86_64__')
end
def str_to_reg(str)
# X86_64::Reg != Ia32::Reg
Reg.from_str(str) if Reg.s_to_i.has_key? str
end
def shortname
"x64#{'_be' if @endianness == :big}"
end
end
X64 = X86_64
AMD64 = X86_64
end
|
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains the computed version number.
# This file is released into the public domain. Generated by
"""Git implementation of _version.py."""
import errno
import os
import re
import subprocess
import sys
def get_keywords():
"""Get the keywords needed to look up the version information."""
# these strings will be replaced by git during git-archive.
# setup.py/versioneer.py will grep for the variable names, so they must
# each be defined on a line of their own. _version.py will just call
# get_keywords().
git_refnames = "$Format:%d$"
git_full = "$Format:%H$"
git_date = "$Format:%ci$"
keywords = {"refnames": git_refnames, "full": git_full, "date": git_date}
return keywords
class VersioneerConfig:
"""Container for Versioneer configuration parameters."""
def get_config():
"""Create, populate and return the VersioneerConfig() object."""
# these strings are filled in when 'setup.py versioneer' creates
# _version.py
cfg = VersioneerConfig()
cfg.VCS = "git"
cfg.style = "pep440"
cfg.tag_prefix = "v"
cfg.parentdir_prefix = ""
cfg.versionfile_source = "jxl2txt/_version.py"
cfg.verbose = False
return cfg
class NotThisMethod(Exception):
"""Exception raised if a method is not valid for the current scenario."""
LONG_VERSION_PY = {}
HANDLERS = {}
def <API key>(vcs, method): # decorator
"""Create decorator to mark a method as the handler of a VCS."""
def decorate(f):
"""Store f in HANDLERS[vcs][method]."""
if vcs not in HANDLERS:
HANDLERS[vcs] = {}
HANDLERS[vcs][method] = f
return f
return decorate
def run_command(commands, args, cwd=None, verbose=False, hide_stderr=False,
env=None):
"""Call the given command(s)."""
assert isinstance(commands, list)
p = None
for c in commands:
try:
dispcmd = str([c] + args)
# remember shell=False, so use git.cmd on windows, not just git
p = subprocess.Popen([c] + args, cwd=cwd, env=env,
stdout=subprocess.PIPE,
stderr=(subprocess.PIPE if hide_stderr
else None))
break
except EnvironmentError:
e = sys.exc_info()[1]
if e.errno == errno.ENOENT:
continue
if verbose:
print("unable to run %s" % dispcmd)
print(e)
return None, None
else:
if verbose:
print("unable to find command, tried %s" % (commands,))
return None, None
stdout = p.communicate()[0].strip().decode()
if p.returncode != 0:
if verbose:
print("unable to run %s (error)" % dispcmd)
print("stdout was %s" % stdout)
return None, p.returncode
return stdout, p.returncode
def <API key>(parentdir_prefix, root, verbose):
"""Try to determine the version from the parent directory name.
Source tarballs conventionally unpack into a directory that includes both
the project name and a version string. We will also support searching up
two directory levels for an appropriately named parent directory
"""
rootdirs = []
for i in range(3):
dirname = os.path.basename(root)
if dirname.startswith(parentdir_prefix):
return {"version": dirname[len(parentdir_prefix):],
"full-revisionid": None,
"dirty": False, "error": None, "date": None}
else:
rootdirs.append(root)
root = os.path.dirname(root) # up a level
if verbose:
print("Tried directories %s but none started with prefix %s" %
(str(rootdirs), parentdir_prefix))
raise NotThisMethod("rootdir doesn't start with parentdir_prefix")
@<API key>("git", "get_keywords")
def git_get_keywords(versionfile_abs):
"""Extract version information from the given file."""
# the code embedded in _version.py can just fetch the value of these
# keywords. When used from setup.py, we don't want to import _version.py,
# so we do it with a regexp instead. This function is not used from
# _version.py.
keywords = {}
try:
f = open(versionfile_abs, "r")
for line in f.readlines():
if line.strip().startswith("git_refnames ="):
mo = re.search(r'=\s*"(.*)"', line)
if mo:
keywords["refnames"] = mo.group(1)
if line.strip().startswith("git_full ="):
mo = re.search(r'=\s*"(.*)"', line)
if mo:
keywords["full"] = mo.group(1)
if line.strip().startswith("git_date ="):
mo = re.search(r'=\s*"(.*)"', line)
if mo:
keywords["date"] = mo.group(1)
f.close()
except EnvironmentError:
pass
return keywords
@<API key>("git", "keywords")
def <API key>(keywords, tag_prefix, verbose):
"""Get version information from git keywords."""
if not keywords:
raise NotThisMethod("no keywords at all, weird")
date = keywords.get("date")
if date is not None:
# Use only the last line. Previous lines may contain GPG signature
# information.
date = date.splitlines()[-1]
# git-2.2.0 added "%cI", which expands to an ISO-8601 -compliant
# datestamp. However we prefer "%ci" (which expands to an "ISO-8601
# -like" string, which we must then edit to make compliant), because
# it's been around since git-1.5.3, and it's too difficult to
# discover which version we're using, or to work around using an
# older one.
date = date.strip().replace(" ", "T", 1).replace(" ", "", 1)
refnames = keywords["refnames"].strip()
if refnames.startswith("$Format"):
if verbose:
print("keywords are unexpanded, not using")
raise NotThisMethod("unexpanded keywords, not a git-archive tarball")
refs = set([r.strip() for r in refnames.strip("()").split(",")])
# starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of
# just "foo-1.0". If we see a "tag: " prefix, prefer those.
TAG = "tag: "
tags = set([r[len(TAG):] for r in refs if r.startswith(TAG)])
if not tags:
# Either we're using git < 1.8.3, or there really are no tags. We use
# a heuristic: assume all version tags have a digit. The old git %d
# expansion behaves like git log --decorate=short and strips out the
# refs/heads/ and refs/tags/ prefixes that would let us distinguish
# between branches and tags. By ignoring refnames without digits, we
# filter out many common branch names like "release" and
# "stabilization", as well as "HEAD" and "master".
tags = set([r for r in refs if re.search(r'\d', r)])
if verbose:
print("discarding '%s', no digits" % ",".join(refs - tags))
if verbose:
print("likely tags: %s" % ",".join(sorted(tags)))
for ref in sorted(tags):
# sorting will prefer e.g. "2.0" over "2.0rc1"
if ref.startswith(tag_prefix):
r = ref[len(tag_prefix):]
if verbose:
print("picking %s" % r)
return {"version": r,
"full-revisionid": keywords["full"].strip(),
"dirty": False, "error": None,
"date": date}
# no suitable tags, so version is "0+unknown", but full hex is still there
if verbose:
print("no suitable tags, using unknown + full revision id")
return {"version": "0+unknown",
"full-revisionid": keywords["full"].strip(),
"dirty": False, "error": "no suitable tags", "date": None}
@<API key>("git", "pieces_from_vcs")
def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
"""Get version from 'git describe' in the root of the source tree.
This only gets called if the git-archive 'subst' keywords were *not*
expanded, and _version.py hasn't already been rewritten with a short
version string, meaning we're inside a checked out source tree.
"""
GITS = ["git"]
if sys.platform == "win32":
GITS = ["git.cmd", "git.exe"]
out, rc = run_command(GITS, ["rev-parse", "--git-dir"], cwd=root,
hide_stderr=True)
if rc != 0:
if verbose:
print("Directory %s not under git control" % root)
raise NotThisMethod("'git rev-parse --git-dir' returned error")
# if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty]
# if there isn't one, this yields HEX[-dirty] (no NUM)
describe_out, rc = run_command(GITS, ["describe", "--tags", "--dirty",
"--always", "--long",
"--match", "%s*" % tag_prefix],
cwd=root)
# --long was added in git-1.5.5
if describe_out is None:
raise NotThisMethod("'git describe' failed")
describe_out = describe_out.strip()
full_out, rc = run_command(GITS, ["rev-parse", "HEAD"], cwd=root)
if full_out is None:
raise NotThisMethod("'git rev-parse' failed")
full_out = full_out.strip()
pieces = {}
pieces["long"] = full_out
pieces["short"] = full_out[:7] # maybe improved later
pieces["error"] = None
# parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty]
# TAG might have hyphens.
git_describe = describe_out
# look for -dirty suffix
dirty = git_describe.endswith("-dirty")
pieces["dirty"] = dirty
if dirty:
git_describe = git_describe[:git_describe.rindex("-dirty")]
# now we have TAG-NUM-gHEX or HEX
if "-" in git_describe:
# TAG-NUM-gHEX
mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe)
if not mo:
# unparseable. Maybe git-describe is misbehaving?
pieces["error"] = ("unable to parse git-describe output: '%s'"
% describe_out)
return pieces
# tag
full_tag = mo.group(1)
if not full_tag.startswith(tag_prefix):
if verbose:
fmt = "tag '%s' doesn't start with prefix '%s'"
print(fmt % (full_tag, tag_prefix))
pieces["error"] = ("tag '%s' doesn't start with prefix '%s'"
% (full_tag, tag_prefix))
return pieces
pieces["closest-tag"] = full_tag[len(tag_prefix):]
# distance: number of commits since tag
pieces["distance"] = int(mo.group(2))
# commit: short hex revision ID
pieces["short"] = mo.group(3)
else:
# HEX: no tags
pieces["closest-tag"] = None
count_out, rc = run_command(GITS, ["rev-list", "HEAD", "--count"],
cwd=root)
pieces["distance"] = int(count_out) # total number of commits
date = run_command(GITS, ["show", "-s", "--format=%ci", "HEAD"],
cwd=root)[0].strip()
# Use only the last line. Previous lines may contain GPG signature
# information.
date = date.splitlines()[-1]
pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1)
return pieces
def plus_or_dot(pieces):
"""Return a + if we don't already have one, else return a ."""
if "+" in pieces.get("closest-tag", ""):
return "."
return "+"
def render_pep440(pieces):
"""Build up version string, with post-release "local version identifier".
Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you
get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty
Exceptions:
1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty]
"""
if pieces["closest-tag"]:
rendered = pieces["closest-tag"]
if pieces["distance"] or pieces["dirty"]:
rendered += plus_or_dot(pieces)
rendered += "%d.g%s" % (pieces["distance"], pieces["short"])
if pieces["dirty"]:
rendered += ".dirty"
else:
# exception #1
rendered = "0+untagged.%d.g%s" % (pieces["distance"],
pieces["short"])
if pieces["dirty"]:
rendered += ".dirty"
return rendered
def render_pep440_pre(pieces):
"""TAG[.post0.devDISTANCE] -- No -dirty.
Exceptions:
1: no tags. 0.post0.devDISTANCE
"""
if pieces["closest-tag"]:
rendered = pieces["closest-tag"]
if pieces["distance"]:
rendered += ".post0.dev%d" % pieces["distance"]
else:
# exception #1
rendered = "0.post0.dev%d" % pieces["distance"]
return rendered
def render_pep440_post(pieces):
"""TAG[.postDISTANCE[.dev0]+gHEX] .
The ".dev0" means dirty. Note that .dev0 sorts backwards
(a dirty tree will appear "older" than the corresponding clean one),
but you shouldn't be releasing software with -dirty anyways.
Exceptions:
1: no tags. 0.postDISTANCE[.dev0]
"""
if pieces["closest-tag"]:
rendered = pieces["closest-tag"]
if pieces["distance"] or pieces["dirty"]:
rendered += ".post%d" % pieces["distance"]
if pieces["dirty"]:
rendered += ".dev0"
rendered += plus_or_dot(pieces)
rendered += "g%s" % pieces["short"]
else:
# exception #1
rendered = "0.post%d" % pieces["distance"]
if pieces["dirty"]:
rendered += ".dev0"
rendered += "+g%s" % pieces["short"]
return rendered
def render_pep440_old(pieces):
"""TAG[.postDISTANCE[.dev0]] .
The ".dev0" means dirty.
Exceptions:
1: no tags. 0.postDISTANCE[.dev0]
"""
if pieces["closest-tag"]:
rendered = pieces["closest-tag"]
if pieces["distance"] or pieces["dirty"]:
rendered += ".post%d" % pieces["distance"]
if pieces["dirty"]:
rendered += ".dev0"
else:
# exception #1
rendered = "0.post%d" % pieces["distance"]
if pieces["dirty"]:
rendered += ".dev0"
return rendered
def render_git_describe(pieces):
"""TAG[-DISTANCE-gHEX][-dirty].
Like 'git describe --tags --dirty --always'.
Exceptions:
1: no tags. HEX[-dirty] (note: no 'g' prefix)
"""
if pieces["closest-tag"]:
rendered = pieces["closest-tag"]
if pieces["distance"]:
rendered += "-%d-g%s" % (pieces["distance"], pieces["short"])
else:
# exception #1
rendered = pieces["short"]
if pieces["dirty"]:
rendered += "-dirty"
return rendered
def <API key>(pieces):
"""TAG-DISTANCE-gHEX[-dirty].
Like 'git describe --tags --dirty --always -long'.
The distance/hash is unconditional.
Exceptions:
1: no tags. HEX[-dirty] (note: no 'g' prefix)
"""
if pieces["closest-tag"]:
rendered = pieces["closest-tag"]
rendered += "-%d-g%s" % (pieces["distance"], pieces["short"])
else:
# exception #1
rendered = pieces["short"]
if pieces["dirty"]:
rendered += "-dirty"
return rendered
def render(pieces, style):
"""Render the given version pieces into the requested style."""
if pieces["error"]:
return {"version": "unknown",
"full-revisionid": pieces.get("long"),
"dirty": None,
"error": pieces["error"],
"date": None}
if not style or style == "default":
style = "pep440" # the default
if style == "pep440":
rendered = render_pep440(pieces)
elif style == "pep440-pre":
rendered = render_pep440_pre(pieces)
elif style == "pep440-post":
rendered = render_pep440_post(pieces)
elif style == "pep440-old":
rendered = render_pep440_old(pieces)
elif style == "git-describe":
rendered = render_git_describe(pieces)
elif style == "git-describe-long":
rendered = <API key>(pieces)
else:
raise ValueError("unknown style '%s'" % style)
return {"version": rendered, "full-revisionid": pieces["long"],
"dirty": pieces["dirty"], "error": None,
"date": pieces.get("date")}
def get_versions():
"""Get version information or return default if unable to do so."""
# I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have
# __file__, we can work backwards from there to the root. Some
# py2exe/bbfreeze/non-CPython implementations don't do __file__, in which
# case we can only use expanded keywords.
cfg = get_config()
verbose = cfg.verbose
try:
return <API key>(get_keywords(), cfg.tag_prefix,
verbose)
except NotThisMethod:
pass
try:
root = os.path.realpath(__file__)
# versionfile_source is the relative path from the top of the source
# tree (where the .git directory might live) to this file. Invert
# this to find the root from __file__.
for i in cfg.versionfile_source.split('/'):
root = os.path.dirname(root)
except NameError:
return {"version": "0+unknown", "full-revisionid": None,
"dirty": None,
"error": "unable to find root of source tree",
"date": None}
try:
pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose)
return render(pieces, cfg.style)
except NotThisMethod:
pass
try:
if cfg.parentdir_prefix:
return <API key>(cfg.parentdir_prefix, root, verbose)
except NotThisMethod:
pass
return {"version": "0+unknown", "full-revisionid": None,
"dirty": None,
"error": "unable to compute version", "date": None}
|
<?php
/**
* RSSAggregatingPage lets a CMS Authors aggregate and filter a number of RSS feed.
*/
class RSSAggregatingPage extends Page {
static $db = array (
"NumberOfItems" => "Int"
);
static $has_many = array(
"SourceFeeds" => "RSSAggSource",
"Entries" => "RSSAggEntry"
);
private static $moderation_required = false;
function getCMSFields() {
$fields = parent::getCMSFields();
if(!isset($_REQUEST['executeForm'])) $this->updateRSS();
$fields->addFieldToTab("Root.Content.Sources", new TableField("SourceFeeds", "RSSAggSource",
array(
"RSSFeed" => "RSS Feed URL",
"Title" => "Feed Title"
),
array(
"RSSFeed" => "TextField",
"Title" => "ReadonlyField",
), "PageID", round($this->ID), true, "RSSFeed"
));
global $<API key>;
// Insert Items as the first tab
$fields->addFieldToTab("Root.Content", new Tab("Items"), "Main");
if ( !self::<API key>() ) {
$fields->addFieldToTab("Root.Content.Items", new DropdownField('NumberOfItems','Number Of Items', $<API key>));
}
$fields->addFieldToTab("Root.Content.Items", $entries = new TableField("Entries", "RSSAggEntry",
array(
"Displayed" => "Show",
"DateNice" => "Date",
"SourceNice" => "Source",
"Title" => "Title",
),
array(
"Displayed" => "CheckboxField",
"DateNice" => "ReadonlyField",
"SourceNice" => "ReadonlyField",
"Title" => "ReadonlyField",
), "PageID", round($this->ID), true, "Date DESC"
));
$entries->setPermissions(array("edit"));
return $fields;
}
/**
* Use SimplePie to get all the RSS feeds and agregate them into Entries
*/
function updateRSS() {
require_once(Director::baseFolder() . '/rssaggregator/thirdparty/simplepie/simplepie.inc');
if(!is_numeric($this->ID)) return;
$goodSourceIDs = array();
foreach($this->SourceFeeds() as $sourceFeed) {
$goodSourceIDs[] = $sourceFeed->ID;
if(isset($_REQUEST['flush']) || strtotime($sourceFeed->LastChecked) < time() - 3600) {
$simplePie = new SimplePie($sourceFeed->RSSFeed);
/*$simplePie->enable_caching(false);
$simplePie->enable_xmldump(true);*/
$simplePie->init();
$sourceFeed->Title = $simplePie->get_title();
$sourceFeed->LastChecked = date('Y-m-d H:i:s');
$sourceFeed->write();
$idClause = '';
$goodIDs = array();
$items = $simplePie->get_items();
//if(!$items) user_error("RSS Error: $simplePie->error", E_USER_WARNING);
if($items) foreach($items as $item) {
$entry = new RSSAggEntry();
$entry->Permalink = $item->get_permalink();
$entry->Date = $item->get_date('Y-m-d H:i:s');
$entry->Title = Convert::xml2raw($item->get_title());
$entry->Title = str_replace(array(
' ',
'‘',
'’',
'“',
'”',
'&',
'''
), array(
' ',
"'",
"'",
'"',
'"',
'&',
'`'
), $entry->Title);
$entry->Content = str_replace(array(
' ',
'‘',
'’',
'“',
'”',
'&',
'''
), array(
' ',
"'",
"'",
'"',
'"',
'&',
'`'
), $item->get_description());
$entry->PageID = $this->ID;
$entry->SourceID = $sourceFeed->ID;
if($enclosure = $item->get_enclosure()) {
$entry->EnclosureURL = $enclosure->get_link();
}
$SQL_permalink = Convert::raw2sql($entry->Permalink);
$existingID = DB::query("SELECT \"ID\" FROM \"RSSAggEntry\" WHERE \"Permalink\" = '$SQL_permalink' AND \"SourceID\" = $entry->SourceID AND \"PageID\" = $entry->PageID")->value();
if($existingID) $entry->ID = $existingID;
$entry->write();
$goodIDs[] = $entry->ID;
}
if($goodIDs) {
$list_goodIDs = implode(', ', $goodIDs);
$idClause = "AND \"ID\" NOT IN ($list_goodIDs)";
}
DB::query("DELETE FROM \"RSSAggEntry\" WHERE \"SourceID\" = $sourceFeed->ID AND \"PageID\" = $this->ID $idClause");
}
}
if($goodSourceIDs) {
$list_goodSourceIDs = implode(', ', $goodSourceIDs);
$sourceIDClause = " AND \"SourceID\" NOT IN ($list_goodSourceIDs)";
} else {
$sourceIDClause = '';
}
DB::query("DELETE FROM \"RSSAggEntry\" WHERE \"PageID\" = $this->ID $sourceIDClause");
}
function Children() {
$this->updateRSS();
// Tack the RSS feed children to the end of the children provided by the RSS feed
$c1 = DataObject::get("SiteTree", "\"ParentID\" = '$this->ID'");
$c2 = DataObject::get("RSSAggEntry", "\"PageID\" = $this->ID AND \"Displayed\" = 1", "\"Date\" ASC");
if($c1) {
if($c2) $c1->merge($c2);
return $c1;
} else {
return $c2;
}
}
/*
* Set moderation mode
* On (true) admin manually controls which items to display
* Off (false) new imported feed item is set to display automatically
* @param boolean
*/
static function <API key>($required) {
self::$moderation_required = $required;
}
/*
* Get feed moderation mode
* @return boolean
*/
static function <API key>() {
return self::$moderation_required;
}
}
class <API key> extends Page_Controller {
}
?>
|
from . import Cl, conformalize
layout_orig, blades_orig = Cl(3)
layout, blades, stuff = conformalize(layout_orig)
locals().update(blades)
locals().update(stuff)
# for shorter reprs
layout.__name__ = 'layout'
layout.__module__ = __name__
|
using System;
using Renci.SshNet.Messages.Connection;
namespace Renci.SshNet.Channels
{
internal abstract class ServerChannel : Channel
{
internal void Initialize(Session session, uint localWindowSize, uint localPacketSize, uint remoteChannelNumber, uint remoteWindowSize, uint remotePacketSize)
{
Initialize(session, localWindowSize, localPacketSize);
<API key>(remoteChannelNumber, remoteWindowSize, remotePacketSize);
//Session.ChannelOpenReceived += OnChannelOpen;
}
//private void OnChannelOpen(object sender, MessageEventArgs<ChannelOpenMessage> e)
// var channelOpenMessage = e.Message;
// if (channelOpenMessage.LocalChannelNumber == LocalChannelNumber)
// <API key> = channelOpenMessage.LocalChannelNumber;
// RemoteWindowSize = channelOpenMessage.InitialWindowSize;
// _remotePacketSize = channelOpenMessage.MaximumPacketSize;
// OnOpen(e.Message.Info);
protected void SendMessage(<API key> message)
{
// No need to check whether channel is open when trying to open a channel
Session.SendMessage(message);
// When we act as server, consider the channel open when we've sent the
// confirmation message to the peer
IsOpen = true;
}
// <summary>
// Called when channel need to be open on the client.
// </summary>
// <param name="info">Channel open information.</param>
//protected virtual void OnOpen(ChannelOpenInfo info)
protected override void Dispose(bool disposing)
{
if (disposing)
{
var session = Session;
if (session != null)
{
//session.ChannelOpenReceived -= OnChannelOpen;
}
}
base.Dispose(disposing);
}
}
}
|
<!DOCTYPE html>
<html xmlns="http:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>mne.find_events — MNE 0.15 documentation</title>
<link rel="stylesheet" href="../_static/bootstrap-sphinx.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/gallery.css" type="text/css" />
<script type="text/javascript">
var <API key> = {
URL_ROOT: '../',
VERSION: '0.15',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=<API key>"></script>
<script type="text/javascript" src="../_static/js/jquery-1.11.0.min.js"></script>
<script type="text/javascript" src="../_static/js/jquery-fix.js"></script>
<script type="text/javascript" src="../_static/bootstrap-3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../_static/bootstrap-sphinx.js"></script>
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<script type="text/javascript" src="../_static/copybutton.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-37225609-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https:
var s = document.<API key>('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<link rel="stylesheet" href="../_static/style.css " type="text/css" />
<link rel="stylesheet" href="../_static/font-awesome.css" type="text/css" />
<link rel="stylesheet" href="../_static/flag-icon.css" type="text/css" />
<script type="text/javascript">
!function(d,s,id){var js,fjs=d.<API key>(s)[0];if(!d.getElementById(id)){js=d.createElement(s);
js.id=id;js.src="https://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");
</script>
<script type="text/javascript">
(function() {
var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
po.src = 'https://apis.google.com/js/plusone.js';
var s = document.<API key>('script')[0]; s.parentNode.insertBefore(po, s);
})();
</script>
<link rel="canonical" href="https://mne.tools/stable/index.html" />
</head>
<body>
<div id="navbar" class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<!-- .btn-navbar is used as the toggle for collapsed navbar content -->
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="../index.html"><span><img src="../_static/mne_logo_small.png"></span>
</a>
<span class="navbar-text navbar-version pull-left"><b>0.15</b></span>
</div>
<div class="collapse navbar-collapse nav-collapse">
<ul class="nav navbar-nav">
<li><a href="../getting_started.html">Install</a></li>
<li><a href="../documentation.html">Documentation</a></li>
<li><a href="../python_reference.html">API</a></li>
<li><a href="../auto_examples/index.html">Examples</a></li>
<li><a href="../contributing.html">Contribute</a></li>
<li class="dropdown globaltoc-container">
<a role="button"
id="dLabelGlobalToc"
data-toggle="dropdown"
data-target="
href="../index.html">Site <b class="caret"></b></a>
<ul class="dropdown-menu globaltoc"
role="menu"
aria-labelledby="dLabelGlobalToc"></ul>
</li>
<li class="hidden-sm"></li>
</ul>
<div class="navbar-form navbar-right navbar-btn dropdown btn-group-sm" style="margin-left: 20px; margin-top: 5px; margin-bottom: 5px">
<button type="button" class="btn btn-primary navbar-btn dropdown-toggle" id="dropdownMenu1" data-toggle="dropdown">
v0.15
<span class="caret"></span>
</button>
<ul class="dropdown-menu" aria-labelledby="dropdownMenu1">
<li><a href="https://mne-tools.github.io/dev/index.html">Development</a></li>
<li><a href="https://mne-tools.github.io/stable/index.html">v0.15 (stable)</a></li>
<li><a href="https://mne-tools.github.io/0.14/index.html">v0.14</a></li>
<li><a href="https://mne-tools.github.io/0.13/index.html">v0.13</a></li>
<li><a href="https://mne-tools.github.io/0.12/index.html">v0.12</a></li>
<li><a href="https://mne-tools.github.io/0.11/index.html">v0.11</a></li>
</ul>
</div>
<form class="navbar-form navbar-right" action="../search.html" method="get">
<div class="form-group">
<input type="text" name="q" class="form-control" placeholder="Search" />
</div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="<API key>">
<p class="logo"><a href="../index.html">
<img class="logo" src="../_static/mne_logo_small.png" alt="Logo"/>
</a></p><ul>
<li><a class="reference internal" href="#">mne.find_events</a><ul>
<li><a class="reference internal" href="#<API key>">Examples using <code class="docutils literal"><span class="pre">mne.find_events</span></code></a></li>
</ul>
</li>
</ul>
<form action="../search.html" method="get">
<div class="form-group">
<input type="text" name="q" class="form-control" placeholder="Search" />
</div>
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="col-md-12 content">
<div class="section" id="mne-find-events">
<h1>mne.find_events<a class="headerlink" href="
<dl class="function">
<dt id="mne.find_events">
<code class="descclassname">mne.</code><code class="descname">find_events</code><span class="sig-paren">(</span><em>raw</em>, <em>stim_channel=None</em>, <em>output='onset'</em>, <em>consecutive='increasing'</em>, <em>min_duration=0</em>, <em>shortest_event=2</em>, <em>mask=None</em>, <em>uint_cast=False</em>, <em>mask_type=None</em>, <em>verbose=None</em><span class="sig-paren">)</span><a class="reference external" href="http://github.com/mne-tools/mne-python/blob/maint/0.15/mne/event.py"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="
<dd><p>Find events from raw file.</p>
<p>See <a class="reference internal" href="../auto_tutorials/<API key>.html#<API key>"><span class="std std-ref">Epoching and averaging (ERP/ERF)</span></a> as well as <a class="reference internal" href="../auto_examples/io/plot_read_events.html#ex-read-events"><span class="std std-ref">Reading an event file</span></a>
for more information about events.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><p class="first"><strong>raw</strong> : Raw object</p>
<blockquote>
<div><p>The raw data.</p>
</div></blockquote>
<p><strong>stim_channel</strong> : None | string | list of string</p>
<blockquote>
<div><p>Name of the stim channel or all the stim channels
affected by triggers. If None, the config variables
‘MNE_STIM_CHANNEL’, ‘MNE_STIM_CHANNEL_1’, ‘MNE_STIM_CHANNEL_2’,
etc. are read. If these are not found, it will fall back to
‘STI 014’ if present, then fall back to the first channel of type
‘stim’, if present. If multiple channels are provided
then the returned events are the union of all the events
extracted from individual stim channels.</p>
</div></blockquote>
<p><strong>output</strong> : ‘onset’ | ‘offset’ | ‘step’</p>
<blockquote>
<div><p>Whether to report when events start, when events end, or both.</p>
</div></blockquote>
<p><strong>consecutive</strong> : bool | ‘increasing’</p>
<blockquote>
<div><p>If True, consider instances where the value of the events
channel changes without first returning to zero as multiple
events. If False, report only instances where the value of the
events channel changes from/to zero. If ‘increasing’, report
adjacent events only when the second event code is greater than
the first.</p>
</div></blockquote>
<p><strong>min_duration</strong> : float</p>
<blockquote>
<div><p>The minimum duration of a change in the events channel required
to consider it as an event (in seconds).</p>
</div></blockquote>
<p><strong>shortest_event</strong> : int</p>
<blockquote>
<div><p>Minimum number of samples an event must last (default is 2). If the
duration is less than this an exception will be raised.</p>
</div></blockquote>
<p><strong>mask</strong> : int | None</p>
<blockquote>
<div><p>The value of the digital mask to apply to the stim channel values.
If None (default), no masking is performed.</p>
</div></blockquote>
<p><strong>uint_cast</strong> : bool</p>
<blockquote>
<div><p>If True (default False), do a cast to <code class="docutils literal"><span class="pre">uint16</span></code> on the channel
data. This can be used to fix a bug with STI101 and STI014 in
Neuromag acquisition setups that use channel STI016 (channel 16
turns data into e.g. -32768), similar to <code class="docutils literal"><span class="pre">mne_fix_stim14</span> <span class="pre">--32</span></code>
in MNE-C.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.12.</span></p>
</div>
</div></blockquote>
<p><strong>mask_type: ‘and’ | ‘not_and’</strong></p>
<blockquote>
<div><p>The type of operation between the mask and the trigger.
Choose ‘and’ for MNE-C masking behavior. The default (‘not_and’)
will change to ‘and’ in 0.16.</p>
<div class="versionadded">
<p><span class="versionmodified">New in version 0.13.</span></p>
</div>
</div></blockquote>
<p><strong>verbose</strong> : bool, str, int, or None</p>
<blockquote>
<div><p>If not None, override default verbose level (see <a class="reference internal" href="mne.verbose.html#mne.verbose" title="mne.verbose"><code class="xref py py-func docutils literal"><span class="pre">mne.verbose()</span></code></a>
and <a class="reference internal" href="../auto_tutorials/plot_configuration.html#tut-logging"><span class="std std-ref">Logging documentation</span></a> for more).</p>
</div></blockquote>
</td>
</tr>
<tr class="field-even field"><th class="field-name">Returns:</th><td class="field-body"><p class="first"><strong>events</strong> : array, shape = (n_events, 3)</p>
<blockquote class="last">
<div><p>All events that were found. The first column contains the event time
in samples and the third column contains the event id. For output =
‘onset’ or ‘step’, the second column contains the value of the stim
channel immediately before the event/step. For output = ‘offset’,
the second column contains the value of the stim channel after the
event offset.</p>
</div></blockquote>
</td>
</tr>
</tbody>
</table>
<div class="admonition seealso">
<p class="first admonition-title">See also</p>
<dl class="last docutils">
<dt><a class="reference internal" href="mne.find_stim_steps.html#mne.find_stim_steps" title="mne.find_stim_steps"><code class="xref py py-obj docutils literal"><span class="pre">find_stim_steps</span></code></a></dt>
<dd>Find all the steps in the stim channel.</dd>
<dt><a class="reference internal" href="mne.read_events.html#mne.read_events" title="mne.read_events"><code class="xref py py-obj docutils literal"><span class="pre">read_events</span></code></a></dt>
<dd>Read events from disk.</dd>
<dt><a class="reference internal" href="mne.write_events.html#mne.write_events" title="mne.write_events"><code class="xref py py-obj docutils literal"><span class="pre">write_events</span></code></a></dt>
<dd>Write events to disk.</dd>
</dl>
</div>
<p class="rubric">Notes</p>
<div class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">If you are working with downsampled data, events computed
before decimation are no longer valid. Please recompute
your events after decimation, but note this reduces the
precision of event timing.</p>
</div>
<p class="rubric">Examples</p>
<p>Consider data with a stim channel that looks like:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="p">[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">32</span><span class="p">,</span> <span class="mi">32</span><span class="p">,</span> <span class="mi">33</span><span class="p">,</span> <span class="mi">32</span><span class="p">,</span> <span class="mi">0</span><span class="p">]</span>
</pre></div>
</div>
<p>By default, find_events returns all samples at which the value of the
stim channel increases:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="nb">print</span><span class="p">(</span><span class="n">find_events</span><span class="p">(</span><span class="n">raw</span><span class="p">))</span>
<span class="go">[[ 1 0 32]</span>
<span class="go"> [ 3 32 33]]</span>
</pre></div>
</div>
<p>If consecutive is False, find_events only returns the samples at which
the stim channel changes from zero to a non-zero value:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="nb">print</span><span class="p">(</span><span class="n">find_events</span><span class="p">(</span><span class="n">raw</span><span class="p">,</span> <span class="n">consecutive</span><span class="o">=</span><span class="kc">False</span><span class="p">))</span>
<span class="go">[[ 1 0 32]]</span>
</pre></div>
</div>
<p>If consecutive is True, find_events returns samples at which the
event changes, regardless of whether it first returns to zero:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="nb">print</span><span class="p">(</span><span class="n">find_events</span><span class="p">(</span><span class="n">raw</span><span class="p">,</span> <span class="n">consecutive</span><span class="o">=</span><span class="kc">True</span><span class="p">))</span>
<span class="go">[[ 1 0 32]</span>
<span class="go"> [ 3 32 33]</span>
<span class="go"> [ 4 33 32]]</span>
</pre></div>
</div>
<p>If output is ‘offset’, find_events returns the last sample of each event
instead of the first one:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="nb">print</span><span class="p">(</span><span class="n">find_events</span><span class="p">(</span><span class="n">raw</span><span class="p">,</span> <span class="n">consecutive</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="gp">... </span> <span class="n">output</span><span class="o">=</span><span class="s1">'offset'</span><span class="p">))</span>
<span class="go">[[ 2 33 32]</span>
<span class="go"> [ 3 32 33]</span>
<span class="go"> [ 4 0 32]]</span>
</pre></div>
</div>
<p>If output is ‘step’, find_events returns the samples at which an event
starts or ends:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="nb">print</span><span class="p">(</span><span class="n">find_events</span><span class="p">(</span><span class="n">raw</span><span class="p">,</span> <span class="n">consecutive</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="gp">... </span> <span class="n">output</span><span class="o">=</span><span class="s1">'step'</span><span class="p">))</span>
<span class="go">[[ 1 0 32]</span>
<span class="go"> [ 3 32 33]</span>
<span class="go"> [ 4 33 32]</span>
<span class="go"> [ 5 32 0]]</span>
</pre></div>
</div>
<p>To ignore spurious events, it is also possible to specify a minimum
event duration. Assuming our events channel has a sample rate of
1000 Hz:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="nb">print</span><span class="p">(</span><span class="n">find_events</span><span class="p">(</span><span class="n">raw</span><span class="p">,</span> <span class="n">consecutive</span><span class="o">=</span><span class="kc">True</span><span class="p">,</span>
<span class="gp">... </span> <span class="n">min_duration</span><span class="o">=</span><span class="mf">0.002</span><span class="p">))</span>
<span class="go">[[ 1 0 32]]</span>
</pre></div>
</div>
<p>For the digital mask, if mask_type is set to ‘and’ it will take the
binary representation of the digital mask, e.g. 5 -> ‘00000101’, and will
allow the values to pass where mask is one, e.g.:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span> <span class="mi">7</span> <span class="s1">'0000111'</span> <span class="o"><-</span> <span class="n">trigger</span> <span class="n">value</span>
<span class="mi">37</span> <span class="s1">'0100101'</span> <span class="o"><-</span> <span class="n">mask</span>
<span class="o">
<span class="mi">5</span> <span class="s1">'0000101'</span>
</pre></div>
</div>
<p>For the digital mask, if mask_type is set to ‘not_and’ it will take the
binary representation of the digital mask, e.g. 5 -> ‘00000101’, and will
block the values where mask is one, e.g.:</p>
<div class="highlight-default"><div class="highlight"><pre><span></span> <span class="mi">7</span> <span class="s1">'0000111'</span> <span class="o"><-</span> <span class="n">trigger</span> <span class="n">value</span>
<span class="mi">37</span> <span class="s1">'0100101'</span> <span class="o"><-</span> <span class="n">mask</span>
<span class="o">
<span class="mi">2</span> <span class="s1">'0000010'</span>
</pre></div>
</div>
</dd></dl>
<div class="section" id="<API key>">
<h2>Examples using <code class="docutils literal"><span class="pre">mne.find_events</span></code><a class="headerlink" href="
<div class="<API key>" tooltip="The MEGSIM consists of experimental and simulated MEG data which can be useful for reproducing ..."><div class="figure" id="id1">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_examples/datasets/plot_megsim_data.html#<API key>"><span class="std std-ref">MEGSIM experimental and simulation datasets</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="Here we compute the evoked from raw for the Brainstorm tutorial dataset. For comparison, see [1..."><div class="figure" id="id2">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_examples/datasets/<API key>.html#<API key>"><span class="std std-ref">Brainstorm tutorial datasets</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="Runs a full pipeline using MNE-Python:"><div class="figure" id="id3">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_examples/datasets/<API key>.html#<API key>"><span class="std std-ref">From raw data to dSPM on SPM Faces dataset</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="Representational Similarity Analysis is used to perform summary statistics on supervised classi..."><div class="figure" id="id4">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_examples/decoding/decoding_rsa.html#<API key>"><span class="std std-ref">Representational Similarity Analysis</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="Decoding of motor imagery applied to EEG data decomposed using CSP. Here the classifier is appl..."><div class="figure" id="id5">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_examples/decoding/<API key>.html#<API key>"><span class="std std-ref">Motor imagery decoding from EEG data using the Common Spatial Pattern (CSP)</span></a></span></p>
</div>
</div><div class="<API key>" tooltip=" The time-frequency decomposition is estimated by iterating over raw data that has been band-pa..."><div class="figure" id="id6">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_examples/decoding/<API key>.html#<API key>"><span class="std std-ref">Decoding in time-frequency space data using the Common Spatial Pattern (CSP)</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="This example demonstrates the relationship between the noise covariance estimate and the MNE / ..."><div class="figure" id="id7">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_examples/inverse/<API key>.html#<API key>"><span class="std std-ref">Demonstrate impact of whitening on source estimates</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="ICA is fit to MEG raw data. We assume that the non-stationary EOG artifacts have already been r..."><div class="figure" id="id8">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_examples/preprocessing/plot_run_ica.html#<API key>"><span class="std std-ref">Compute ICA components on epochs</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="Compute the distribution of timing for EOG artifacts."><div class="figure" id="id9">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_examples/preprocessing/<API key>.html#<API key>"><span class="std std-ref">Show EOG artifact timing</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="Demonstrate movement compensation on simulated data. The simulated data contains bilateral acti..."><div class="figure" id="id10">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_examples/preprocessing/<API key>.html#<API key>"><span class="std std-ref">Maxwell filter data with movement compensation</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="When performing experiments where timing is critical, a signal with a high sampling rate is des..."><div class="figure" id="id11">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_examples/preprocessing/plot_resample.html#<API key>"><span class="std std-ref">Resampling data</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="This example generates raw data by repeating a desired source activation multiple times."><div class="figure" id="id12">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_examples/simulation/<API key>.html#<API key>"><span class="std std-ref">Generate simulated raw data</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="This demonstrates how rER[P/F]s - regressing the continuous data - is a generalisation of tradi..."><div class="figure" id="id13">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_examples/stats/<API key>.html#<API key>"><span class="std std-ref">Regression on continuous data (rER[P/F])</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="Returns an STC file containing the PSD (in dB) of each of the sources."><div class="figure" id="id14">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_examples/time_frequency/<API key>.html#<API key>"><span class="std std-ref">Compute power spectrum densities of the sources with dSPM</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="Returns STC files ie source estimates of induced power for different bands in the source space...."><div class="figure" id="id15">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_examples/time_frequency/<API key>.html#<API key>"><span class="std std-ref">Compute induced power in the source space with dSPM</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="The objective is to show you how to explore spectrally localized effects. For this purpose we a..."><div class="figure" id="id16">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_examples/time_frequency/<API key>.html#<API key>"><span class="std std-ref">Explore event-related dynamics for specific frequency bands</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="Compute time-frequency maps of power and phase lock in the source space. The inverse method is ..."><div class="figure" id="id17">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_examples/time_frequency/<API key>.html#<API key>"><span class="std std-ref">Compute power and phase lock in label of the source space</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="This example calculates and displays ERDS maps of event-related EEG data. ERDS (sometimes also ..."><div class="figure" id="id18">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_examples/time_frequency/<API key>.html#<API key>"><span class="std std-ref">Compute and visualize ERDS maps</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="This will produce what is sometimes called an event related potential / field (ERP/ERF) image."><div class="figure" id="id19">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_examples/visualization/<API key>.html#<API key>"><span class="std std-ref">Plot single trial activity, grouped by ROI and sorted by RT</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="This tutorial shows how to clean MEG data with Maxwell filtering."><div class="figure" id="id20">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_tutorials/<API key>.html#<API key>"><span class="std std-ref">Artifact correction with Maxwell filter</span></a></span></p>
</div>
</div><div class="<API key>" tooltip=""><div class="figure" id="id21">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_tutorials/<API key>.html#<API key>"><span class="std std-ref">Artifact Correction with SSP</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="Many methods in MNE, including e.g. source estimation and some classification algorithms, requi..."><div class="figure" id="id22">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_tutorials/<API key>.html#<API key>"><span class="std std-ref">Computing covariance matrix</span></a></span></p>
</div>
</div><div class="<API key>" tooltip=""><div class="figure" id="id23">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_tutorials/<API key>.html#<API key>"><span class="std std-ref">Epoching and averaging (ERP/ERF)</span></a></span></p>
</div>
</div><div class="<API key>" tooltip=""><div class="figure" id="id24">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_tutorials/<API key>.html#<API key>"><span class="std std-ref">Rejecting bad data (channels and segments)</span></a></span></p>
</div>
</div><div class="<API key>" tooltip=":class:`Epochs <mne.Epochs>` objects are a way of representing continuous data as a collection ..."><div class="figure" id="id25">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_tutorials/plot_object_epochs.html#<API key>"><span class="std std-ref">The Epochs data structure: epoched data</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="The objective is to show you how to explore the spectral content of your data (frequency and ti..."><div class="figure" id="id26">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_tutorials/<API key>.html#<API key>"><span class="std std-ref">Frequency and time-frequency sensors analysis</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="This script shows how to estimate significant clusters in time-frequency power estimates. It us..."><div class="figure" id="id27">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_tutorials/<API key>.html#<API key>"><span class="std std-ref">Non-parametric 1 sample cluster statistic on single trial power</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="Here we compute the evoked from raw for the Brainstorm Elekta phantom tutorial dataset. For com..."><div class="figure" id="id28">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_tutorials/<API key>.html#<API key>"><span class="std std-ref">Brainstorm Elekta phantom tutorial dataset</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="The aim of this tutorial is to teach you how to compute and apply a linear inverse method such ..."><div class="figure" id="id29">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_tutorials/<API key>.html#<API key>"><span class="std std-ref">Source localization with MNE/dSPM/sLORETA</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="The aim of this tutorial is to demonstrate how to put a known signal at a desired location(s) i..."><div class="figure" id="id30">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_tutorials/plot_point_spread.html#<API key>"><span class="std std-ref">Corrupt known signal with point spread</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="Decoding, a.k.a MVPA or supervised machine learning applied to MEG data in sensor space. Here t..."><div class="figure" id="id31">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_tutorials/<API key>.html#<API key>"><span class="std std-ref">Decoding sensor space data (MVPA)</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="MNE-Python reimplements most of MNE-C's (the original MNE command line utils) functionality and..."><div class="figure" id="id32">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_tutorials/plot_introduction.html#<API key>"><span class="std std-ref">Basic MEG and EEG data processing</span></a></span></p>
</div>
</div><div class="<API key>" tooltip="Here we compute the evoked from raw for the auditory Brainstorm tutorial dataset. For compariso..."><div class="figure" id="id33">
<img alt="../_images/<API key>.png" src="../_images/<API key>.png" />
<p class="caption"><span class="caption-text"><a class="reference internal" href="../auto_tutorials/<API key>.html#<API key>"><span class="std std-ref">Brainstorm auditory tutorial dataset</span></a></span></p>
</div>
</div><div style='clear:both'></div></div>
</div>
</div>
</div>
</div>
<footer class="footer">
<div class="container"><img src="../_static/institutions.png" alt="Institutions"></div>
<div class="container">
<ul class="list-inline">
<li><a href="https://github.com/mne-tools/mne-python">GitHub</a></li>
<li>·</li>
<li><a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis">Mailing list</a></li>
<li>·</li>
<li><a href="https://gitter.im/mne-tools/mne-python">Gitter</a></li>
<li>·</li>
<li><a href="whats_new.html">What's new</a></li>
<li>·</li>
<li><a href="faq.html#cite">Cite MNE</a></li>
<li class="pull-right"><a href="#">Back to top</a></li>
</ul>
<p>© Copyright 2012-2017, MNE Developers. Last updated on 2017-10-31.</p>
</div>
</footer>
<script src="https://mne.tools/versionwarning.js"></script>
</body>
</html>
|
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model app\models\ShopGoodsCategory */
$this->title = Yii::t('app', 'Create Shop Goods Category');
$this->params['breadcrumbs'][] = ['label' => Yii::t('app', 'Shop Goods Categories'), 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="<API key>">
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
|
#include "chrome/browser/chromeos/login/login_utils.h"
#include <algorithm>
#include <set>
#include <vector>
#include "base/bind.h"
#include "base/command_line.h"
#include "base/compiler_specific.h"
#include "base/file_util.h"
#include "base/files/file_path.h"
#include "base/location.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h"
#include "base/memory/weak_ptr.h"
#include "base/path_service.h"
#include "base/prefs/pref_member.h"
#include "base/prefs/<API key>.h"
#include "base/prefs/pref_service.h"
#include "base/strings/string_util.h"
#include "base/strings/<API key>.h"
#include "base/synchronization/lock.h"
#include "base/sys_info.h"
#include "base/task_runner_util.h"
#include "base/threading/worker_pool.h"
#include "base/time/time.h"
#include "chrome/browser/about_flags.h"
#include "chrome/browser/app_mode/app_mode_utils.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_shutdown.h"
#include "chrome/browser/<API key>.h"
#include "chrome/browser/chromeos/boot_times_loader.h"
#include "chrome/browser/chromeos/input_method/input_method_util.h"
#include "chrome/browser/chromeos/login/<API key>.h"
#include "chrome/browser/chromeos/login/demo_mode/demo_app_launcher.h"
#include "chrome/browser/chromeos/login/<API key>.h"
#include "chrome/browser/chromeos/login/login_display_host.h"
#include "chrome/browser/chromeos/login/<API key>.h"
#include "chrome/browser/chromeos/login/o<API key>.h"
#include "chrome/browser/chromeos/login/<API key>.h"
#include "chrome/browser/chromeos/login/profile_auth_data.h"
#include "chrome/browser/chromeos/login/saml/<API key>.h"
#include "chrome/browser/chromeos/login/saml/<API key>.h"
#include "chrome/browser/chromeos/login/screen_locker.h"
#include "chrome/browser/chromeos/login/startup_utils.h"
#include "chrome/browser/chromeos/login/<API key>.h"
#include "chrome/browser/chromeos/login/user.h"
#include "chrome/browser/chromeos/login/user_manager.h"
#include "chrome/browser/chromeos/settings/cros_settings.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/first_run/first_run.h"
#include "chrome/browser/google/<API key>.h"
#include "chrome/browser/lifetime/<API key>.h"
#include "chrome/browser/<API key>.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/rlz/rlz.h"
#include "chrome/browser/signin/signin_manager.h"
#include "chrome/browser/signin/<API key>.h"
#include "chrome/browser/sync/<API key>.h"
#include "chrome/browser/sync/<API key>.h"
#include "chrome/browser/ui/app_list/start_page_service.h"
#include "chrome/browser/ui/startup/<API key>.h"
#include "chrome/common/chrome_paths.h"
#include "chrome/common/chrome_switches.h"
#include "chrome/common/logging_chrome.h"
#include "chrome/common/pref_names.h"
#include "chromeos/chromeos_switches.h"
#include "chromeos/cryptohome/cryptohome_util.h"
#include "chromeos/dbus/cryptohome_client.h"
#include "chromeos/dbus/<API key>.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/dbus/<API key>.h"
#include "chromeos/ime/<API key>.h"
#include "chromeos/settings/cros_settings_names.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/<API key>.h"
#include "google_apis/gaia/gaia_auth_consumer.h"
#include "net/base/<API key>.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/<API key>.h"
#include "url/gurl.h"
using content::BrowserThread;
namespace chromeos {
namespace {
#if defined(ENABLE_RLZ)
// Flag file that disables RLZ tracking, when present.
const base::FilePath::CharType <API key>[] =
FILE_PATH_LITERAL(".rlz_disabled");
base::FilePath <API key>() {
return base::GetHomeDir().Append(<API key>);
}
#endif
} // namespace
struct <API key>;
class LoginUtilsImpl
: public LoginUtils,
public OAuth2LoginManager::Observer,
public net::<API key>::<API key>,
public base::SupportsWeakPtr<LoginUtilsImpl> {
public:
LoginUtilsImpl()
: <API key>(false),
delegate_(NULL),
<API key>(false),
<API key>(
OAuth2LoginManager::<API key>) {
net::<API key>::<API key>(this);
}
virtual ~LoginUtilsImpl() {
net::<API key>::<API key>(this);
}
// LoginUtils implementation:
virtual void DoBrowserLaunch(Profile* profile,
LoginDisplayHost* login_host) OVERRIDE;
virtual void PrepareProfile(
const UserContext& user_context,
const std::string& display_email,
bool has_cookies,
bool has_active_session,
LoginUtils::Delegate* delegate) OVERRIDE;
virtual void DelegateDeleted(LoginUtils::Delegate* delegate) OVERRIDE;
virtual void <API key>(const GURL& start_url) OVERRIDE;
virtual void SetFirstLoginPrefs(PrefService* prefs) OVERRIDE;
virtual scoped_refptr<Authenticator> CreateAuthenticator(
LoginStatusConsumer* consumer) OVERRIDE;
virtual void Restore<API key>(Profile* profile) OVERRIDE;
virtual void InitRlzDelayed(Profile* user_profile) OVERRIDE;
// OAuth2LoginManager::Observer overrides.
virtual void <API key>(
Profile* user_profile,
OAuth2LoginManager::SessionRestoreState state) OVERRIDE;
virtual void <API key>(Profile* user_profile) OVERRIDE;
// net::<API key>::<API key> overrides.
virtual void <API key>(
net::<API key>::ConnectionType type) OVERRIDE;
private:
typedef std::set<std::string> <API key>;
// DoBrowserLaunch is split into two parts.
// This one is called after anynchronous locale switch.
void <API key>(Profile* profile,
LoginDisplayHost* login_host);
// Callback for locale_util::SwitchLanguage().
static void <API key>(
scoped_ptr<<API key>> context,
const std::string& locale,
const std::string& loaded_locale,
const bool success);
// Restarts OAuth session authentication check.
void <API key>(Profile* profile);
// Callback for Profile::<API key> profile state.
// Initializes basic preferences for newly created profile. Any other
// early profile initialization that needs to happen before
// ProfileManager::DoFinalInit() gets called is done here.
void <API key>(Profile* user_profile,
const std::string& email);
// Callback for asynchronous profile creation.
void OnProfileCreated(const std::string& email,
Profile* profile,
Profile::CreateStatus status);
// Callback for asynchronous off the record profile creation.
void OnOTRProfileCreated(const std::string& email,
Profile* profile,
Profile::CreateStatus status);
// Callback for Profile::<API key> profile state.
// Profile is created, extensions and promo resources are initialized.
void <API key>(Profile* user_profile);
// Callback for Profile::<API key> profile state for an OTR
// login.
void <API key>(Profile* user_profile);
// Callback to resume profile creation after transferring auth data from
// the authentication profile.
void <API key>(Profile* user_profile);
// Finalized profile preparation.
void <API key>(Profile* user_profile);
// Initializes member variables needed for session restore process via
// OAuthLoginManager.
void <API key>();
// Restores GAIA auth cookies for the created user profile from OAuth2 token.
void RestoreAuthSession(Profile* user_profile,
bool <API key>);
// Initializes RLZ. If |disabled| is true, RLZ pings are disabled.
void InitRlz(Profile* user_profile, bool disabled);
// Attempts restarting the browser process and esures that this does
// not happen while we are still fetching new OAuth refresh tokens.
void AttemptRestart(Profile* profile);
UserContext user_context_;
// True if the authentication profile's cookie jar should contain
// authentication cookies from the authentication extension log in flow.
bool <API key>;
// Has to be scoped_refptr, see comment for CreateAuthenticator(...).
scoped_refptr<Authenticator> authenticator_;
// Delegate to be fired when the profile will be prepared.
LoginUtils::Delegate* delegate_;
// Set of user_id for those users that we should restore authentication
// session when notified about online state change.
<API key> <API key>;
// True if we should restart chrome right after session restore.
bool <API key>;
// Sesion restore strategy.
OAuth2LoginManager::<API key> <API key>;
// OAuth2 refresh token for session restore.
std::string o<API key>;
<API key>(LoginUtilsImpl);
};
class LoginUtilsWrapper {
public:
static LoginUtilsWrapper* GetInstance() {
return Singleton<LoginUtilsWrapper>::get();
}
LoginUtils* get() {
base::AutoLock create(create_lock_);
if (!ptr_.get())
reset(new LoginUtilsImpl);
return ptr_.get();
}
void reset(LoginUtils* ptr) {
ptr_.reset(ptr);
}
private:
friend struct <API key><LoginUtilsWrapper>;
LoginUtilsWrapper() {}
base::Lock create_lock_;
scoped_ptr<LoginUtils> ptr_;
<API key>(LoginUtilsWrapper);
};
struct <API key> {
<API key>(LoginUtilsImpl* login_utils_impl,
Profile* profile,
LoginDisplayHost* display_host)
: login_utils_impl(login_utils_impl),
profile(profile),
display_host(display_host) {}
LoginUtilsImpl* login_utils_impl;
Profile* profile;
chromeos::LoginDisplayHost* display_host;
// Block UI events untill ResourceBundle is reloaded.
InputEventsBlocker <API key>;
};
// static
void LoginUtilsImpl::<API key>(
scoped_ptr<<API key>> context,
const std::string& /* locale */,
const std::string& /* loaded_locale */,
const bool /* success */) {
context->login_utils_impl-><API key>(
context->profile, context->display_host);
}
// Called from DoBrowserLaunch() or from
// <API key>() depending on
// if locale switch was needed.
void LoginUtilsImpl::<API key>(
Profile* profile,
LoginDisplayHost* login_host) {
if (!UserManager::Get()->GetCurrentUserFlow()->ShouldLaunchBrowser()) {
UserManager::Get()->GetCurrentUserFlow()->LaunchExtraSteps(profile);
return;
}
CommandLine user_flags(CommandLine::NO_PROGRAM);
about_flags::<API key> flags_storage_(profile->GetPrefs());
about_flags::<API key>(&flags_storage_, &user_flags,
about_flags::kAddSentinels);
// Only restart if needed and if not going into managed mode.
// Don't restart browser if it is not first profile in session.
if (UserManager::Get()->GetLoggedInUsers().size() == 1 &&
!UserManager::Get()-><API key>() &&
!about_flags::<API key>(
user_flags, *CommandLine::ForCurrentProcess())) {
CommandLine::StringVector flags;
// argv[0] is the program name |CommandLine::NO_PROGRAM|.
flags.assign(user_flags.argv().begin() + 1, user_flags.argv().end());
VLOG(1) << "Restarting to apply per-session flags...";
DBusThreadManager::Get()-><API key>()->SetFlagsForUser(
UserManager::Get()->GetActiveUser()->email(), flags);
AttemptRestart(profile);
return;
}
if (login_host) {
login_host-><API key>(true);
login_host->BeforeSessionStart();
}
BootTimesLoader::Get()->AddLoginTimeMarker("BrowserLaunched", false);
VLOG(1) << "Launching browser...";
<API key> browser_creator;
int return_code;
chrome::startup::IsFirstRun first_run = first_run::IsChromeFirstRun() ?
chrome::startup::IS_FIRST_RUN : chrome::startup::IS_NOT_FIRST_RUN;
browser_creator.LaunchBrowser(*CommandLine::ForCurrentProcess(),
profile,
base::FilePath(),
chrome::startup::IS_PROCESS_STARTUP,
first_run,
&return_code);
// Triggers app launcher start page service to load start page web contents.
app_list::StartPageService::Get(profile);
// Mark login host for deletion after browser starts. This
// guarantees that the message loop will be referenced by the
// browser before it is dereferenced by the login host.
if (login_host)
login_host->Finalize();
UserManager::Get()->SessionStarted();
}
void LoginUtilsImpl::DoBrowserLaunch(Profile* profile,
LoginDisplayHost* login_host) {
if (browser_shutdown::IsTryingToQuit())
return;
User* const user = UserManager::Get()->GetUserByProfile(profile);
scoped_ptr<<API key>> data(
new <API key>(this, profile, login_host));
scoped_ptr<locale_util::<API key>> callback(
new locale_util::<API key>(
base::Bind(&LoginUtilsImpl::<API key>,
base::Passed(data.Pass()))));
if (!UserManager::Get()->
<API key>(profile, user, callback.Pass())) {
<API key>(profile, login_host);
}
}
void LoginUtilsImpl::PrepareProfile(
const UserContext& user_context,
const std::string& display_email,
bool has_cookies,
bool has_active_session,
LoginUtils::Delegate* delegate) {
BootTimesLoader* btl = BootTimesLoader::Get();
VLOG(1) << "Completing login for " << user_context.username;
if (!has_active_session) {
btl->AddLoginTimeMarker("StartSession-Start", false);
DBusThreadManager::Get()-><API key>()->StartSession(
user_context.username);
btl->AddLoginTimeMarker("StartSession-End", false);
}
btl->AddLoginTimeMarker("UserLoggedIn-Start", false);
UserManager* user_manager = UserManager::Get();
user_manager->UserLoggedIn(user_context.username,
user_context.username_hash,
false);
btl->AddLoginTimeMarker("UserLoggedIn-End", false);
// Switch log file as soon as possible.
if (base::SysInfo::IsRunningOnChromeOS())
logging::<API key>(*(CommandLine::ForCurrentProcess()));
// Update user's displayed email.
if (!display_email.empty())
user_manager-><API key>(user_context.username, display_email);
user_context_ = user_context;
<API key> = has_cookies;
delegate_ = delegate;
<API key>();
if (DemoAppLauncher::IsDemoAppSession(user_context.username)) {
g_browser_process->profile_manager()->CreateProfileAsync(
user_manager->GetUserProfileDir(user_context.username),
base::Bind(&LoginUtilsImpl::OnOTRProfileCreated, AsWeakPtr(),
user_context.username),
base::string16(), base::string16(), std::string());
} else {
// Can't use display_email because it is empty when existing user logs in
// using sing-in pod on login screen (i.e. user didn't type email).
g_browser_process->profile_manager()->CreateProfileAsync(
user_manager->GetUserProfileDir(user_context.username),
base::Bind(&LoginUtilsImpl::OnProfileCreated, AsWeakPtr(),
user_context.username),
base::string16(), base::string16(), std::string());
}
}
void LoginUtilsImpl::DelegateDeleted(LoginUtils::Delegate* delegate) {
if (delegate_ == delegate)
delegate_ = NULL;
}
void LoginUtilsImpl::<API key>(Profile* user_profile,
const std::string& user_id) {
if (UserManager::Get()->IsCurrentUserNew())
SetFirstLoginPrefs(user_profile->GetPrefs());
if (UserManager::Get()-><API key>()) {
User* active_user = UserManager::Get()->GetActiveUser();
std::string <API key> =
UserManager::Get()-><API key>()->
GetUserSyncId(active_user->email());
// TODO(ibraaaa): Remove that when 97% of our users are using M31.
if (<API key>.empty())
<API key> = "DUMMY_ID";
user_profile->GetPrefs()->SetString(prefs::kManagedUserId,
<API key>);
} else {
// Make sure that the google service username is properly set (we do this
// on every sign in, not just the first login, to deal with existing
// profiles that might not have it set yet).
SigninManagerBase* signin_manager =
<API key>::GetForProfile(user_profile);
signin_manager->Set<API key>(user_id);
}
}
void LoginUtilsImpl::<API key>() {
CommandLine* command_line = CommandLine::ForCurrentProcess();
bool in_app_mode = chrome::<API key>();
// Are we in kiosk app mode?
if (in_app_mode) {
if (command_line->HasSwitch(::switches::kAppModeOAuth2Token)) {
o<API key> = command_line->GetSwitchValueASCII(
::switches::kAppModeOAuth2Token);
}
if (command_line->HasSwitch(::switches::kAppModeAuthCode)) {
user_context_.auth_code = command_line->GetSwitchValueASCII(
::switches::kAppModeAuthCode);
}
DCHECK(!<API key>);
if (!user_context_.auth_code.empty()) {
<API key> = OAuth2LoginManager::<API key>;
} else if (!o<API key>.empty()) {
<API key> =
OAuth2LoginManager::<API key>;
} else {
<API key> =
OAuth2LoginManager::<API key>;
}
return;
}
if (<API key>) {
<API key> = OAuth2LoginManager::<API key>;
} else if (!user_context_.auth_code.empty()) {
<API key> = OAuth2LoginManager::<API key>;
} else {
<API key> =
OAuth2LoginManager::<API key>;
}
}
void LoginUtilsImpl::OnProfileCreated(
const std::string& user_id,
Profile* user_profile,
Profile::CreateStatus status) {
CHECK(user_profile);
switch (status) {
case Profile::<API key>:
<API key>(user_profile, user_id);
break;
case Profile::<API key>:
<API key>(user_profile);
break;
case Profile::<API key>:
case Profile::<API key>:
case Profile::<API key>:
case Profile::MAX_CREATE_STATUS:
NOTREACHED();
break;
}
}
void LoginUtilsImpl::OnOTRProfileCreated(
const std::string& user_id,
Profile* user_profile,
Profile::CreateStatus status) {
CHECK(user_profile);
switch (status) {
case Profile::<API key>:
<API key>(user_profile, user_id);
break;
case Profile::<API key>:
<API key>(user_profile);
break;
case Profile::<API key>:
case Profile::<API key>:
case Profile::<API key>:
case Profile::MAX_CREATE_STATUS:
NOTREACHED();
break;
}
}
void LoginUtilsImpl::<API key>(Profile* user_profile) {
BootTimesLoader* btl = BootTimesLoader::Get();
btl->AddLoginTimeMarker("UserProfileGotten", false);
if (user_context_.using_oauth) {
// Transfer proxy authentication cache, cookies (optionally) and server
// bound certs from the profile that was used for authentication. This
// profile contains cookies that auth extension should have already put in
// place that will ensure that the newly created session is authenticated
// for the websites that work with the used authentication schema.
ProfileAuthData::Transfer(authenticator_-><API key>(),
user_profile,
<API key>, // transfer_cookies
base::Bind(
&LoginUtilsImpl::<API key>,
AsWeakPtr(),
user_profile));
return;
}
<API key>(user_profile);
}
void LoginUtilsImpl::<API key>(Profile* user_profile) {
user_profile->OnLogin();
// Send the notification before creating the browser so additional objects
// that need the profile (e.g. the launcher) can be created first.
content::NotificationService::current()->Notify(
chrome::<API key>,
content::NotificationService::AllSources(),
content::Details<Profile>(user_profile));
if (delegate_)
delegate_->OnProfilePrepared(user_profile);
}
void LoginUtilsImpl::<API key>(Profile* user_profile) {
RestoreAuthSession(user_profile, <API key>);
<API key>(user_profile);
}
void LoginUtilsImpl::RestoreAuthSession(Profile* user_profile,
bool <API key>) {
CHECK((authenticator_.get() && authenticator_-><API key>()) ||
!<API key>);
if (chrome::<API key>() ||
CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kOobeSkipPostLogin)) {
return;
}
<API key> = false;
// Remove legacy OAuth1 token if we have one. If it's valid, we should already
// have OAuth2 refresh token in OAuth2TokenService that could be used to
// retrieve all other tokens and user_context.
OAuth2LoginManager* login_manager =
O<API key>::GetInstance()->GetForProfile(user_profile);
login_manager->AddObserver(this);
login_manager->RestoreSession(
authenticator_.get() && authenticator_-><API key>()
? authenticator_-><API key>()->GetRequestContext()
: NULL,
<API key>,
o<API key>,
user_context_.auth_code);
}
void LoginUtilsImpl::<API key>(Profile* user_profile) {
BootTimesLoader* btl = BootTimesLoader::Get();
// Own TPM device if, for any reason, it has not been done in EULA
// wizard screen.
CryptohomeClient* client = DBusThreadManager::Get()->GetCryptohomeClient();
btl->AddLoginTimeMarker("TPMOwn-Start", false);
if (cryptohome_util::TpmIsEnabled() && !cryptohome_util::TpmIsBeingOwned()) {
if (cryptohome_util::TpmIsOwned()) {
client-><API key>();
} else {
client-><API key>(<API key>());
}
}
btl->AddLoginTimeMarker("TPMOwn-End", false);
if (UserManager::Get()-><API key>()) {
<API key>* <API key> =
<API key>::GetForProfile(user_profile);
if (<API key>)
<API key>->SignedIn(user_context_.auth_flow);
}
user_profile->OnLogin();
// Send the notification before creating the browser so additional objects
// that need the profile (e.g. the launcher) can be created first.
content::NotificationService::current()->Notify(
chrome::<API key>,
content::NotificationService::AllSources(),
content::Details<Profile>(user_profile));
// Initialize RLZ only for primary user.
if (UserManager::Get()->GetPrimaryUser() ==
UserManager::Get()->GetUserByProfile(user_profile)) {
InitRlzDelayed(user_profile);
}
// TODO(altimofeev): This pointer should probably never be NULL, but it looks
// like LoginUtilsImpl::OnProfileCreated() may be getting called before
// LoginUtilsImpl::PrepareProfile() has set |delegate_| when Chrome is killed
// 'if' statement with a CHECK(delegate_) once the underlying issue is
// resolved.
if (delegate_)
delegate_->OnProfilePrepared(user_profile);
}
void LoginUtilsImpl::InitRlzDelayed(Profile* user_profile) {
#if defined(ENABLE_RLZ)
if (!g_browser_process->local_state()->HasPrefPath(prefs::kRLZBrand)) {
// Read brand code asynchronously from an OEM data and repost ourselves.
google_util::chromeos::InitBrand(
base::Bind(&LoginUtilsImpl::InitRlzDelayed, AsWeakPtr(), user_profile));
return;
}
base::<API key>(
base::WorkerPool::GetTaskRunner(false),
FROM_HERE,
base::Bind(&base::PathExists, <API key>()),
base::Bind(&LoginUtilsImpl::InitRlz, AsWeakPtr(), user_profile));
#endif
}
void LoginUtilsImpl::InitRlz(Profile* user_profile, bool disabled) {
#if defined(ENABLE_RLZ)
PrefService* local_state = g_browser_process->local_state();
if (disabled) {
// Empty brand code means an organic install (no RLZ pings are sent).
google_util::chromeos::<API key>();
}
if (disabled != local_state->GetBoolean(prefs::kRLZDisabled)) {
// When switching to RLZ enabled/disabled state, clear all recorded events.
RLZTracker::ClearRlzState();
local_state->SetBoolean(prefs::kRLZDisabled, disabled);
}
// Init the RLZ library.
int ping_delay = user_profile->GetPrefs()->GetInteger(
first_run::<API key>().c_str());
// Negative ping delay means to send ping immediately after a first search is
// recorded.
RLZTracker::<API key>(
user_profile, UserManager::Get()->IsCurrentUserNew(),
ping_delay < 0, base::TimeDelta::FromMilliseconds(abs(ping_delay)));
if (delegate_)
delegate_->OnRlzInitialized(user_profile);
#endif
}
void LoginUtilsImpl::<API key>(const GURL& start_url) {
VLOG(1) << "Completing incognito login";
// For guest session we ask session manager to restart Chrome with --bwsi
// flag. We keep only some of the arguments of this process.
const CommandLine& <API key> = *CommandLine::ForCurrentProcess();
CommandLine command_line(<API key>.GetProgram());
std::string cmd_line_str =
<API key>(start_url,
StartupUtils::IsOobeCompleted(),
<API key>,
&command_line);
RestartChrome(cmd_line_str);
}
void LoginUtilsImpl::SetFirstLoginPrefs(PrefService* prefs) {
VLOG(1) << "Setting first login prefs";
BootTimesLoader* btl = BootTimesLoader::Get();
std::string locale = g_browser_process-><API key>();
// First, we'll set <API key>.
input_method::InputMethodManager* manager =
input_method::InputMethodManager::Get();
std::vector<std::string> input_method_ids;
manager->GetInputMethodUtil()-><API key>(
locale, manager-><API key>(), &input_method_ids);
// Save the input methods in the user's preferences.
StringPrefMember <API key>;
<API key>.Init(prefs::<API key>,
prefs);
<API key>.SetValue(JoinString(input_method_ids, ','));
btl->AddLoginTimeMarker("IMEStarted", false);
// Second, we'll set <API key>.
std::vector<std::string> language_codes;
// The current locale should be on the top.
language_codes.push_back(locale);
// Add input method IDs based on the input methods, as there may be
// input methods that are unrelated to the current locale. Example: the
// hardware keyboard layout xkb:us::eng is used for logging in, but the
// UI language is set to French. In this case, we should set "fr,en"
// to the preferred languages preference.
std::vector<std::string> candidates;
manager->GetInputMethodUtil()-><API key>(
input_method_ids, &candidates);
for (size_t i = 0; i < candidates.size(); ++i) {
const std::string& candidate = candidates[i];
// Skip if it's already in language_codes.
if (std::count(language_codes.begin(), language_codes.end(),
candidate) == 0) {
language_codes.push_back(candidate);
}
}
// Save the preferred languages in the user's preferences.
StringPrefMember <API key>;
<API key>.Init(prefs::<API key>,
prefs);
<API key>.SetValue(JoinString(language_codes, ','));
}
scoped_refptr<Authenticator> LoginUtilsImpl::CreateAuthenticator(
LoginStatusConsumer* consumer) {
// Screen locker needs new Authenticator instance each time.
if (ScreenLocker::<API key>()) {
if (authenticator_.get())
authenticator_->SetConsumer(NULL);
authenticator_ = NULL;
}
if (authenticator_.get() == NULL) {
authenticator_ = new <API key>(consumer);
} else {
// TODO(nkostylev): Fix this hack by improving Authenticator dependencies.
authenticator_->SetConsumer(consumer);
}
return authenticator_;
}
void LoginUtilsImpl::Restore<API key>(Profile* user_profile) {
UserManager* user_manager = UserManager::Get();
// We don't need to restore session for demo/guest/stub/public account users.
if (!user_manager->IsUserLoggedIn() ||
user_manager->IsLoggedInAsGuest() ||
user_manager-><API key>() ||
user_manager-><API key>() ||
user_manager->IsLoggedInAsStub()) {
return;
}
User* user = user_manager->GetUserByProfile(user_profile);
DCHECK(user);
if (!net::<API key>::IsOffline()) {
<API key>.erase(user->email());
RestoreAuthSession(user_profile, false);
} else {
// Even if we're online we should wait till initial
// <API key>() call. Otherwise starting fetchers too early may
// end up canceling all request when initial network connection type is
<API key>.insert(user->email());
}
}
void LoginUtilsImpl::<API key>(
Profile* user_profile,
OAuth2LoginManager::SessionRestoreState state) {
User::OAuthTokenStatus user_status = User::O<API key>;
OAuth2LoginManager* login_manager =
O<API key>::GetInstance()->GetForProfile(user_profile);
bool connection_error = false;
switch (state) {
case OAuth2LoginManager::<API key>:
user_status = User::O<API key>;
break;
case OAuth2LoginManager::<API key>:
user_status = User::O<API key>;
break;
case OAuth2LoginManager::<API key>:
connection_error = true;
break;
case OAuth2LoginManager::<API key>:
case OAuth2LoginManager::<API key>:
case OAuth2LoginManager::<API key>:
return;
}
// We should not be clearing existing token state if that was a connection
if (!connection_error) {
// We are in one of "done" states here.
UserManager::Get()->SaveUserOAuthStatus(
UserManager::Get()->GetLoggedInUser()->email(),
user_status);
}
login_manager->RemoveObserver(this);
}
void LoginUtilsImpl::<API key>(Profile* user_profile) {
// Check if we were waiting to restart chrome.
if (!<API key>)
return;
OAuth2LoginManager* login_manager =
O<API key>::GetInstance()->GetForProfile(user_profile);
login_manager->RemoveObserver(this);
// Mark user auth token status as valid.
UserManager::Get()->SaveUserOAuthStatus(
UserManager::Get()->GetLoggedInUser()->email(),
User::O<API key>);
LOG(WARNING) << "Exiting after new refresh token fetched";
// We need to restart cleanly in this case to make sure OAuth2 RT is actually
// saved.
chrome::AttemptRestart();
}
void LoginUtilsImpl::<API key>(
net::<API key>::ConnectionType type) {
UserManager* user_manager = UserManager::Get();
if (type == net::<API key>::CONNECTION_NONE ||
user_manager->IsLoggedInAsGuest() || !user_manager->IsUserLoggedIn()) {
return;
}
// Need to iterate over all users and their OAuth2 session state.
const UserList& users = user_manager->GetLoggedInUsers();
for (UserList::const_iterator it = users.begin(); it != users.end(); ++it) {
Profile* user_profile = user_manager->GetProfileByUser(*it);
bool <API key> =
<API key>.find((*it)->email()) !=
<API key>.end();
OAuth2LoginManager* login_manager =
O<API key>::GetInstance()->GetForProfile(user_profile);
if (login_manager->state() ==
OAuth2LoginManager::<API key>) {
// If we come online for the first time after successful offline login,
// we need to kick off OAuth token verification process again.
login_manager-><API key>();
} else if (<API key>) {
<API key>.erase((*it)->email());
RestoreAuthSession(user_profile, <API key>);
}
}
}
void LoginUtilsImpl::AttemptRestart(Profile* profile) {
if (<API key> !=
OAuth2LoginManager::<API key>) {
chrome::AttemptRestart();
return;
}
// We can't really quit if the session restore process that mints new
// refresh token is still in progress.
OAuth2LoginManager* login_manager =
O<API key>::GetInstance()->GetForProfile(profile);
if (login_manager->state() !=
OAuth2LoginManager::<API key> &&
login_manager->state() !=
OAuth2LoginManager::<API key>) {
chrome::AttemptRestart();
return;
}
LOG(WARNING) << "Attempting browser restart during session restore.";
<API key> = true;
}
// static
void LoginUtils::RegisterPrefs(PrefRegistrySimple* registry) {
registry->RegisterBooleanPref(prefs::<API key>, false);
registry->RegisterBooleanPref(prefs::kRollbackRequested, false);
registry->RegisterStringPref(prefs::kRLZBrand, std::string());
registry->RegisterBooleanPref(prefs::kRLZDisabled, false);
}
// static
LoginUtils* LoginUtils::Get() {
return LoginUtilsWrapper::GetInstance()->get();
}
// static
void LoginUtils::Set(LoginUtils* mock) {
LoginUtilsWrapper::GetInstance()->reset(mock);
}
// static
bool LoginUtils::IsWhitelisted(const std::string& username,
bool* wildcard_match) {
// Skip whitelist check for tests.
if (CommandLine::ForCurrentProcess()->HasSwitch(
chromeos::switches::kOobeSkipPostLogin)) {
return true;
}
CrosSettings* cros_settings = CrosSettings::Get();
bool allow_new_user = false;
cros_settings->GetBoolean(<API key>, &allow_new_user);
if (allow_new_user)
return true;
return cros_settings->FindEmailInList(
kAccountsPrefUsers, username, wildcard_match);
}
} // namespace chromeos
|
package edu.ucdenver.ccp.datasource.fileparsers.snomed;
import edu.ucdenver.ccp.datasource.fileparsers.<API key>;
import lombok.Getter;
/**
* @author Center for Computational Pharmacology, UC Denver; ccpsupport@ucdenver.edu
*
*/
@Getter
public class <API key> extends <API key> {
public enum DescriptionType {
<API key>("900000000000003001"),
SYNONYM("900000000000013009");
private final String typeId;
private DescriptionType(String typeId) {
this.typeId = typeId;
}
public String typeId() {
return typeId;
}
public static DescriptionType getType(String typeId) {
for (DescriptionType type : values()) {
if (type.typeId().equals(typeId)) {
return type;
}
}
throw new <API key>("Invalid SnoMed description type id: " + typeId);
}
}
/*
* id effectiveTime active moduleId conceptId languageCode typeId term caseSignificanceId
*/
private final String descriptionId;
private final String effectiveTime;
private final boolean active;
private final String moduleId;
private final String conceptId;
private final String languageCode;
private final DescriptionType type;
private final String term;
private final String caseSignificanceId;
/**
* @param byteOffset
* @param lineNumber
* @param definitionId
* @param effectiveTime
* @param active
* @param moduleId
* @param conceptId
* @param languageCode
* @param typeId
* @param term
* @param caseSignificanceId
*/
public <API key>(String descriptionId, String effectiveTime, boolean active, String moduleId,
String conceptId, String languageCode, DescriptionType type, String term, String caseSignificanceId,
long byteOffset, long lineNumber) {
super(byteOffset, lineNumber);
this.descriptionId = descriptionId;
this.effectiveTime = effectiveTime;
this.active = active;
this.moduleId = moduleId;
this.conceptId = conceptId;
this.languageCode = languageCode;
this.type = type;
this.term = term;
this.caseSignificanceId = caseSignificanceId;
}
}
|
"""
Unit tests to ensure that we can call reset_traits/delete on a
property trait (regression tests for Github issue #67).
"""
from traits import _py2to3
from traits.api import Any, HasTraits, Int, Property, TraitError
from traits.testing.unittest_tools import unittest
class E(HasTraits):
a = Property(Any)
b = Property(Int)
class TestPropertyDelete(unittest.TestCase):
def <API key>(self):
e = E()
with self.assertRaises(TraitError):
del e.a
with self.assertRaises(TraitError):
del e.b
def <API key>(self):
e = E()
unresetable = e.reset_traits()
_py2to3.assertCountEqual(self, unresetable, ['a', 'b'])
|
<?php
namespace app\controllers;
use app\models\ContactForm;
use app\models\LoginForm;
use Yii;
use yii\filters\AccessControl;
use yii\filters\VerbFilter;
use yii\web\Controller;
class SiteController extends Controller
{
public function behaviors()
{
return [
'access' => [
'class' => AccessControl::className(),
'only' => ['logout'],
'rules' => [
[
'actions' => ['logout'],
'allow' => true,
'roles' => ['@'],
],
],
],
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'logout' => ['post'],
],
],
];
}
public function actions()
{
return [
'error' => [
'class' => 'yii\web\ErrorAction',
],
'captcha' => [
'class' => 'yii\captcha\CaptchaAction',
'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : null,
],
];
}
public function actionIndex()
{
return $this->render('index');
}
public function actionLogin()
{
if (!\Yii::$app->user->isGuest) {
return $this->goHome();
}
$model = new LoginForm();
if ($model->load(Yii::$app->request->post()) && $model->login()) {
return $this->goBack();
}
return $this->render('login', [
'model' => $model,
]);
}
public function actionLogout()
{
Yii::$app->user->logout();
return $this->goHome();
}
public function actionContact()
{
$model = new ContactForm();
if ($model->load(Yii::$app->request->post()) && $model->contact(Yii::$app->params['adminEmail'])) {
Yii::$app->session->setFlash('<API key>');
return $this->refresh();
}
return $this->render('contact', [
'model' => $model,
]);
}
public function actionAbout()
{
return $this->render('about');
}
public function actionLayout()
{
$this->layout = 'frontEnd';
return $this->render('index');
// return $this->render('//order/step1');
}
}
|
#include "f2c.h"
#include "blaswrap.h"
/* Subroutine */ int dlar1v_(integer *n, integer *b1, integer *bn, doublereal
*lambda, doublereal *d__, doublereal *l, doublereal *ld, doublereal *
lld, doublereal *pivmin, doublereal *gaptol, doublereal *z__, logical
*wantnc, integer *negcnt, doublereal *ztz, doublereal *mingma,
integer *r__, integer *isuppz, doublereal *nrminv, doublereal *resid,
doublereal *rqcorr, doublereal *work)
{
/* System generated locals */
integer i__1;
doublereal d__1, d__2, d__3;
/* Local variables */
integer i__;
doublereal s;
integer r1, r2;
doublereal eps, tmp;
integer neg1, neg2, indp, inds;
doublereal dplus;
integer indlpl, indumn;
doublereal dminus;
logical sawnan1, sawnan2;
/* -- LAPACK auxiliary routine (version 3.2) -- */
/* November 2006 */
/* Purpose */
/* DLAR1V computes the (scaled) r-th column of the inverse of */
/* the sumbmatrix in rows B1 through BN of the tridiagonal matrix */
/* L D L^T - sigma I. When sigma is close to an eigenvalue, the */
/* computed vector is an accurate eigenvector. Usually, r corresponds */
/* to the index where the eigenvector is largest in magnitude. */
/* The following steps accomplish this computation : */
/* (a) Stationary qd transform, L D L^T - sigma I = L(+) D(+) L(+)^T, */
/* (b) Progressive qd transform, L D L^T - sigma I = U(-) D(-) U(-)^T, */
/* L D L^T - sigma I by combining the above transforms, and choosing */
/* r as the index where the diagonal of the inverse is (one of the) */
/* largest in magnitude. */
/* (d) Computation of the (scaled) r-th column of the inverse using the */
/* twisted factorization obtained by combining the top part of the */
/* the stationary and the bottom part of the progressive transform. */
/* Arguments */
/* N (input) INTEGER */
/* The order of the matrix L D L^T. */
/* B1 (input) INTEGER */
/* First index of the submatrix of L D L^T. */
/* BN (input) INTEGER */
/* Last index of the submatrix of L D L^T. */
/* LAMBDA (input) DOUBLE PRECISION */
/* The shift. In order to compute an accurate eigenvector, */
/* LAMBDA should be a good approximation to an eigenvalue */
/* of L D L^T. */
/* L (input) DOUBLE PRECISION array, dimension (N-1) */
/* The (n-1) subdiagonal elements of the unit bidiagonal matrix */
/* L, in elements 1 to N-1. */
/* D (input) DOUBLE PRECISION array, dimension (N) */
/* The n diagonal elements of the diagonal matrix D. */
/* LD (input) DOUBLE PRECISION array, dimension (N-1) */
/* The n-1 elements L(i)*D(i). */
/* LLD (input) DOUBLE PRECISION array, dimension (N-1) */
/* The n-1 elements L(i)*L(i)*D(i). */
/* PIVMIN (input) DOUBLE PRECISION */
/* The minimum pivot in the Sturm sequence. */
/* GAPTOL (input) DOUBLE PRECISION */
/* Tolerance that indicates when eigenvector entries are negligible */
/* w.r.t. their contribution to the residual. */
/* Z (input/output) DOUBLE PRECISION array, dimension (N) */
/* On input, all entries of Z must be set to 0. */
/* On output, Z contains the (scaled) r-th column of the */
/* inverse. The scaling is such that Z(R) equals 1. */
/* WANTNC (input) LOGICAL */
/* Specifies whether NEGCNT has to be computed. */
/* NEGCNT (output) INTEGER */
/* If WANTNC is .TRUE. then NEGCNT = the number of pivots < pivmin */
/* in the matrix factorization L D L^T, and NEGCNT = -1 otherwise. */
/* ZTZ (output) DOUBLE PRECISION */
/* The square of the 2-norm of Z. */
/* MINGMA (output) DOUBLE PRECISION */
/* The reciprocal of the largest (in magnitude) diagonal */
/* element of the inverse of L D L^T - sigma I. */
/* R (input/output) INTEGER */
/* The twist index for the twisted factorization used to */
/* compute Z. */
/* On input, 0 <= R <= N. If R is input as 0, R is set to */
/* the index where (L D L^T - sigma I)^{-1} is largest */
/* in magnitude. If 1 <= R <= N, R is unchanged. */
/* On output, R contains the twist index used to compute Z. */
/* Ideally, R designates the position of the maximum entry in the */
/* eigenvector. */
/* ISUPPZ (output) INTEGER array, dimension (2) */
/* The support of the vector in Z, i.e., the vector Z is */
/* nonzero only in elements ISUPPZ(1) through ISUPPZ( 2 ). */
/* NRMINV (output) DOUBLE PRECISION */
/* NRMINV = 1/SQRT( ZTZ ) */
/* RESID (output) DOUBLE PRECISION */
/* The residual of the FP vector. */
/* RESID = ABS( MINGMA )/SQRT( ZTZ ) */
/* RQCORR (output) DOUBLE PRECISION */
/* The Rayleigh Quotient correction to LAMBDA. */
/* RQCORR = MINGMA*TMP */
/* WORK (workspace) DOUBLE PRECISION array, dimension (4*N) */
/* Further Details */
/* Based on contributions by */
/* Beresford Parlett, University of California, Berkeley, USA */
/* Jim Demmel, University of California, Berkeley, USA */
/* Inderjit Dhillon, University of Texas, Austin, USA */
/* Osni Marques, LBNL/NERSC, USA */
/* Christof Voemel, University of California, Berkeley, USA */
/* Parameter adjustments */
--work;
--isuppz;
--z__;
--lld;
--ld;
--l;
--d__;
/* Function Body */
eps = dlamch_("Precision");
if (*r__ == 0) {
r1 = *b1;
r2 = *bn;
} else {
r1 = *r__;
r2 = *r__;
}
/* Storage for LPLUS */
indlpl = 0;
/* Storage for UMINUS */
indumn = *n;
inds = (*n << 1) + 1;
indp = *n * 3 + 1;
if (*b1 == 1) {
work[inds] = 0.;
} else {
work[inds + *b1 - 1] = lld[*b1 - 1];
}
/* Compute the stationary transform (using the differential form) */
/* until the index R2. */
sawnan1 = FALSE_;
neg1 = 0;
s = work[inds + *b1 - 1] - *lambda;
i__1 = r1 - 1;
for (i__ = *b1; i__ <= i__1; ++i__) {
dplus = d__[i__] + s;
work[indlpl + i__] = ld[i__] / dplus;
if (dplus < 0.) {
++neg1;
}
work[inds + i__] = s * work[indlpl + i__] * l[i__];
s = work[inds + i__] - *lambda;
}
sawnan1 = disnan_(&s);
if (sawnan1) {
goto L60;
}
i__1 = r2 - 1;
for (i__ = r1; i__ <= i__1; ++i__) {
dplus = d__[i__] + s;
work[indlpl + i__] = ld[i__] / dplus;
work[inds + i__] = s * work[indlpl + i__] * l[i__];
s = work[inds + i__] - *lambda;
}
sawnan1 = disnan_(&s);
L60:
if (sawnan1) {
/* Runs a slower version of the above loop if a NaN is detected */
neg1 = 0;
s = work[inds + *b1 - 1] - *lambda;
i__1 = r1 - 1;
for (i__ = *b1; i__ <= i__1; ++i__) {
dplus = d__[i__] + s;
if (abs(dplus) < *pivmin) {
dplus = -(*pivmin);
}
work[indlpl + i__] = ld[i__] / dplus;
if (dplus < 0.) {
++neg1;
}
work[inds + i__] = s * work[indlpl + i__] * l[i__];
if (work[indlpl + i__] == 0.) {
work[inds + i__] = lld[i__];
}
s = work[inds + i__] - *lambda;
}
i__1 = r2 - 1;
for (i__ = r1; i__ <= i__1; ++i__) {
dplus = d__[i__] + s;
if (abs(dplus) < *pivmin) {
dplus = -(*pivmin);
}
work[indlpl + i__] = ld[i__] / dplus;
work[inds + i__] = s * work[indlpl + i__] * l[i__];
if (work[indlpl + i__] == 0.) {
work[inds + i__] = lld[i__];
}
s = work[inds + i__] - *lambda;
}
}
/* Compute the progressive transform (using the differential form) */
/* until the index R1 */
sawnan2 = FALSE_;
neg2 = 0;
work[indp + *bn - 1] = d__[*bn] - *lambda;
i__1 = r1;
for (i__ = *bn - 1; i__ >= i__1; --i__) {
dminus = lld[i__] + work[indp + i__];
tmp = d__[i__] / dminus;
if (dminus < 0.) {
++neg2;
}
work[indumn + i__] = l[i__] * tmp;
work[indp + i__ - 1] = work[indp + i__] * tmp - *lambda;
}
tmp = work[indp + r1 - 1];
sawnan2 = disnan_(&tmp);
if (sawnan2) {
/* Runs a slower version of the above loop if a NaN is detected */
neg2 = 0;
i__1 = r1;
for (i__ = *bn - 1; i__ >= i__1; --i__) {
dminus = lld[i__] + work[indp + i__];
if (abs(dminus) < *pivmin) {
dminus = -(*pivmin);
}
tmp = d__[i__] / dminus;
if (dminus < 0.) {
++neg2;
}
work[indumn + i__] = l[i__] * tmp;
work[indp + i__ - 1] = work[indp + i__] * tmp - *lambda;
if (tmp == 0.) {
work[indp + i__ - 1] = d__[i__] - *lambda;
}
}
}
/* Find the index (from R1 to R2) of the largest (in magnitude) */
/* diagonal element of the inverse */
*mingma = work[inds + r1 - 1] + work[indp + r1 - 1];
if (*mingma < 0.) {
++neg1;
}
if (*wantnc) {
*negcnt = neg1 + neg2;
} else {
*negcnt = -1;
}
if (abs(*mingma) == 0.) {
*mingma = eps * work[inds + r1 - 1];
}
*r__ = r1;
i__1 = r2 - 1;
for (i__ = r1; i__ <= i__1; ++i__) {
tmp = work[inds + i__] + work[indp + i__];
if (tmp == 0.) {
tmp = eps * work[inds + i__];
}
if (abs(tmp) <= abs(*mingma)) {
*mingma = tmp;
*r__ = i__ + 1;
}
}
/* Compute the FP vector: solve N^T v = e_r */
isuppz[1] = *b1;
isuppz[2] = *bn;
z__[*r__] = 1.;
*ztz = 1.;
/* Compute the FP vector upwards from R */
if (! sawnan1 && ! sawnan2) {
i__1 = *b1;
for (i__ = *r__ - 1; i__ >= i__1; --i__) {
z__[i__] = -(work[indlpl + i__] * z__[i__ + 1]);
if (((d__1 = z__[i__], abs(d__1)) + (d__2 = z__[i__ + 1], abs(
d__2))) * (d__3 = ld[i__], abs(d__3)) < *gaptol) {
z__[i__] = 0.;
isuppz[1] = i__ + 1;
goto L220;
}
*ztz += z__[i__] * z__[i__];
}
L220:
;
} else {
/* Run slower loop if NaN occurred. */
i__1 = *b1;
for (i__ = *r__ - 1; i__ >= i__1; --i__) {
if (z__[i__ + 1] == 0.) {
z__[i__] = -(ld[i__ + 1] / ld[i__]) * z__[i__ + 2];
} else {
z__[i__] = -(work[indlpl + i__] * z__[i__ + 1]);
}
if (((d__1 = z__[i__], abs(d__1)) + (d__2 = z__[i__ + 1], abs(
d__2))) * (d__3 = ld[i__], abs(d__3)) < *gaptol) {
z__[i__] = 0.;
isuppz[1] = i__ + 1;
goto L240;
}
*ztz += z__[i__] * z__[i__];
}
L240:
;
}
/* Compute the FP vector downwards from R in blocks of size BLKSIZ */
if (! sawnan1 && ! sawnan2) {
i__1 = *bn - 1;
for (i__ = *r__; i__ <= i__1; ++i__) {
z__[i__ + 1] = -(work[indumn + i__] * z__[i__]);
if (((d__1 = z__[i__], abs(d__1)) + (d__2 = z__[i__ + 1], abs(
d__2))) * (d__3 = ld[i__], abs(d__3)) < *gaptol) {
z__[i__ + 1] = 0.;
isuppz[2] = i__;
goto L260;
}
*ztz += z__[i__ + 1] * z__[i__ + 1];
}
L260:
;
} else {
/* Run slower loop if NaN occurred. */
i__1 = *bn - 1;
for (i__ = *r__; i__ <= i__1; ++i__) {
if (z__[i__] == 0.) {
z__[i__ + 1] = -(ld[i__ - 1] / ld[i__]) * z__[i__ - 1];
} else {
z__[i__ + 1] = -(work[indumn + i__] * z__[i__]);
}
if (((d__1 = z__[i__], abs(d__1)) + (d__2 = z__[i__ + 1], abs(
d__2))) * (d__3 = ld[i__], abs(d__3)) < *gaptol) {
z__[i__ + 1] = 0.;
isuppz[2] = i__;
goto L280;
}
*ztz += z__[i__ + 1] * z__[i__ + 1];
}
L280:
;
}
/* Compute quantities for convergence test */
tmp = 1. / *ztz;
*nrminv = sqrt(tmp);
*resid = abs(*mingma) * *nrminv;
*rqcorr = *mingma * tmp;
return 0;
/* End of DLAR1V */
} /* dlar1v_ */
|
<?php
namespace elisdn\gii\fixture\tests;
use yii\db\ActiveRecord;
class Post extends ActiveRecord
{
public static function tableName()
{
return 'post';
}
}
|
package com.mattunderscore.trees.base;
import static org.junit.Assert.*;
import static org.mockito.Mockito.verify;
import static org.mockito.MockitoAnnotations.initMocks;
import java.util.Iterator;
import java.util.<API key>;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;
import com.mattunderscore.iterators.SingletonIterator;
import com.mattunderscore.trees.mutable.MutableNode;
import com.mattunderscore.trees.tree.Node;
/**
* Unit tests for {@link <API key>}.
*
* @author Matt Champion on 29/08/2015
*/
public final class <API key> {
@Mock
private MutableNode<String> parent;
@Mock
private MutableNode<String> child;
private Iterator<? extends MutableNode<String>> iterator;
@Before
public void setUp() {
initMocks(this);
iterator = new SingletonIterator<>(child);
}
@Test
public void hasNext() {
final <API key><String, MutableNode<String>> mutableIterator = new <API key><>(parent, iterator);
assertTrue(mutableIterator.hasNext());
mutableIterator.next();
assertFalse(mutableIterator.hasNext());
}
@Test(expected = <API key>.class)
public void next() {
final <API key><String, MutableNode<String>> mutableIterator = new <API key><>(parent, iterator);
final MutableNode<String> node = mutableIterator.next();
assertSame(child, node);
mutableIterator.next();
}
@Test
public void remove() {
final <API key><String, MutableNode<String>> mutableIterator = new <API key><>(parent, iterator);
mutableIterator.next();
mutableIterator.remove();
verify(parent).removeChild(child);
}
}
|
#include <vector>
#include <string>
#include <osquery/core.h>
#include <osquery/logger.h>
#include <osquery/tables.h>
#include "osquery/events/linux/udev.h"
namespace osquery {
namespace tables {
/**
* @brief Track udev events in Linux
*/
class <API key> : public EventSubscriber {
<API key>(<API key>, UdevEventPublisher);
DECLARE_CALLBACK(Callback, UdevEventContext);
public:
void init();
Status Callback(const UdevEventContextRef ec);
};
<API key>(<API key>);
void <API key>::init() {
auto subscription = UdevEventPublisher::<API key>();
subscription->action = <API key>;
BIND_CALLBACK(Callback, subscription);
}
Status <API key>::Callback(const UdevEventContextRef ec) {
Row r;
if (ec->devtype.empty()) {
// Superfluous hardware event.
return Status(0, "Missing type.");
} else if (ec->devnode.empty() && ec->driver.empty()) {
return Status(0, "Missing node and driver.");
}
struct udev_device *device = ec->device;
r["action"] = ec->action_string;
r["path"] = ec->devnode;
r["type"] = ec->devtype;
r["driver"] = ec->driver;
// UDEV properties.
r["model"] = UdevEventPublisher::getValue(device, "<API key>");
if (r["path"].empty() && r["model"].empty()) {
// Don't emit mising path/model combos.
return Status(0, "Missing path and model.");
}
r["model_id"] = INTEGER(UdevEventPublisher::getValue(device, "ID_MODEL_ID"));
r["vendor"] = UdevEventPublisher::getValue(device, "<API key>");
r["vendor_id"] =
INTEGER(UdevEventPublisher::getValue(device, "ID_VENDOR_ID"));
r["serial"] =
INTEGER(UdevEventPublisher::getValue(device, "ID_SERIAL_SHORT"));
r["revision"] = INTEGER(UdevEventPublisher::getValue(device, "ID_REVISION"));
r["time"] = INTEGER(ec->time);
add(r, ec->time);
return Status(0, "OK");
}
}
}
|
#ifndef <API key><API key>
#define <API key><API key>
#include <memory>
#include <string>
#include "chrome/browser/ui/webauthn/<API key>.h"
#include "chrome/browser/ui/webauthn/<API key>.h"
#include "chrome/browser/webauthn/<API key>.h"
#include "device/fido/pin.h"
namespace gfx {
struct VectorIcon;
}
namespace ui {
class MenuModel;
}
class <API key>;
// Base class for sheets, implementing the shared behavior used on most sheets,
// as well as maintaining a weak pointer to the dialog model.
class <API key>
: public <API key>,
public <API key>::Observer {
public:
explicit <API key>(
<API key>* dialog_model);
<API key>(const <API key>&) = delete;
<API key>& operator=(const <API key>&) =
delete;
~<API key>() override;
<API key>* dialog_model() const {
return dialog_model_;
}
// Returns a string containing the RP ID, styled as an origin, truncated to a
// reasonable width.
static std::u16string <API key>(
const <API key>* dialog_model);
protected:
// <API key>:
bool <API key>() const override;
bool IsBackButtonVisible() const override;
bool <API key>() const override;
std::u16string <API key>() const override;
bool <API key>() const override;
bool <API key>() const override;
std::u16string <API key>() const override;
void OnBack() override;
void OnAccept() override;
void OnCancel() override;
// <API key>::Observer:
void OnModelDestroyed(<API key>* model) override;
private:
<API key>* dialog_model_;
};
// The sheet shown for selecting the transport over which the security key
// should be accessed.
class <API key>
: public <API key> {
public:
using <API key>::<API key>;
private:
// <API key>:
bool IsBackButtonVisible() const override;
const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override;
std::u16string GetStepTitle() const override;
std::u16string GetStepDescription() const override;
};
class <API key>
: public <API key> {
public:
explicit <API key>(
<API key>* dialog_model);
~<API key>() override;
private:
// <API key>:
bool <API key>() const override;
const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override;
std::u16string GetStepTitle() const override;
std::u16string GetStepDescription() const override;
std::u16string <API key>() const override;
ui::MenuModel* <API key>() override;
std::unique_ptr<<API key>> <API key>;
};
class <API key> : public <API key> {
public:
using <API key>::<API key>;
private:
// <API key>:
bool IsBackButtonVisible() const override;
std::u16string <API key>() const override;
const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override;
std::u16string GetStepTitle() const override;
std::u16string GetStepDescription() const override;
};
class <API key>
: public <API key> {
public:
using <API key>::<API key>;
private:
// <API key>:
bool IsBackButtonVisible() const override;
std::u16string <API key>() const override;
const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override;
std::u16string GetStepTitle() const override;
std::u16string GetStepDescription() const override;
};
class <API key>
: public <API key> {
public:
using <API key>::<API key>;
private:
// <API key>:
bool IsBackButtonVisible() const override;
std::u16string <API key>() const override;
bool <API key>() const override;
bool <API key>() const override;
std::u16string <API key>() const override;
const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override;
std::u16string GetStepTitle() const override;
std::u16string GetStepDescription() const override;
void OnAccept() override;
};
class <API key>
: public <API key> {
public:
using <API key>::<API key>;
private:
// <API key>:
bool IsBackButtonVisible() const override;
std::u16string <API key>() const override;
bool <API key>() const override;
bool <API key>() const override;
std::u16string <API key>() const override;
const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override;
std::u16string GetStepTitle() const override;
std::u16string GetStepDescription() const override;
void OnAccept() override;
};
class <API key>
: public <API key> {
public:
using <API key>::<API key>;
private:
// <API key>:
bool IsBackButtonVisible() const override;
bool <API key>() const override;
bool <API key>() const override;
std::u16string <API key>() const override;
const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override;
std::u16string GetStepTitle() const override;
std::u16string GetStepDescription() const override;
void OnAccept() override;
};
class <API key>
: public <API key> {
public:
using <API key>::<API key>;
private:
// <API key>:
const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override;
std::u16string GetStepTitle() const override;
std::u16string GetStepDescription() const override;
bool <API key>() const override;
bool <API key>() const override;
std::u16string <API key>() const override;
void OnAccept() override;
// <API key>::Observer:
void <API key>() override;
};
class <API key>
: public <API key> {
public:
using <API key>::<API key>;
private:
// <API key>:
bool <API key>() const override;
const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override;
std::u16string GetStepTitle() const override;
std::u16string GetStepDescription() const override;
bool <API key>() const override;
bool <API key>() const override;
std::u16string <API key>() const override;
void OnAccept() override;
bool <API key> = false;
};
class <API key>
: public <API key> {
public:
explicit <API key>(
<API key>* dialog_model);
~<API key>() override;
private:
// <API key>:
const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override;
std::u16string GetStepTitle() const override;
std::u16string GetStepDescription() const override;
ui::MenuModel* <API key>() override;
bool <API key>() const override;
bool <API key>() const override;
std::u16string <API key>() const override;
std::u16string <API key>() const override;
void OnAccept() override;
std::unique_ptr<<API key>> <API key>;
};
class <API key> : public <API key> {
public:
explicit <API key>(
<API key>* dialog_model);
~<API key>() override;
private:
// <API key>:
bool IsBackButtonVisible() const override;
bool <API key>() const override;
const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override;
std::u16string GetStepTitle() const override;
std::u16string GetStepDescription() const override;
ui::MenuModel* <API key>() override;
std::unique_ptr<<API key>> <API key>;
};
class <API key>
: public <API key> {
public:
explicit <API key>(
<API key>* dialog_model);
~<API key>() override;
private:
// <API key>:
bool IsBackButtonVisible() const override;
bool <API key>() const override;
const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override;
std::u16string GetStepTitle() const override;
std::u16string GetStepDescription() const override;
ui::MenuModel* <API key>() override;
std::unique_ptr<<API key>> <API key>;
};
class <API key>
: public <API key> {
public:
// Indicates whether the view should accommodate changing an existing PIN,
// setting up a new PIN or entering an existing one.
enum class Mode { kPinChange, kPinEntry, kPinSetup };
<API key>(
<API key>* dialog_model,
Mode mode,
device::pin::PINEntryError error);
~<API key>() override;
using <API key>::<API key>;
void SetPinCode(std::u16string pin_code);
void SetPinConfirmation(std::u16string pin_confirmation);
Mode mode() const { return mode_; }
private:
// <API key>:
const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override;
std::u16string GetStepTitle() const override;
std::u16string GetStepDescription() const override;
std::u16string GetError() const override;
bool <API key>() const override;
bool <API key>() const override;
std::u16string <API key>() const override;
void OnAccept() override;
std::u16string pin_code_;
std::u16string pin_confirmation_;
std::u16string error_;
const Mode mode_;
};
class <API key>
: public <API key> {
public:
explicit <API key>(
<API key>* dialog_model);
~<API key>() override;
private:
// <API key>:
bool <API key>() const override;
const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override;
std::u16string GetStepTitle() const override;
std::u16string GetStepDescription() const override;
std::u16string <API key>() const override;
};
class <API key>
: public <API key> {
public:
explicit <API key>(
<API key>* dialog_model);
~<API key>() override;
int max_bio_samples() {
return dialog_model()->max_bio_samples().value_or(1);
}
int <API key>() {
return dialog_model()-><API key>().value_or(1);
}
private:
// <API key>:
bool <API key>() const override;
const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override;
std::u16string GetStepTitle() const override;
std::u16string GetStepDescription() const override;
bool <API key>() const override;
bool <API key>() const override;
std::u16string <API key>() const override;
bool <API key>() const override;
std::u16string <API key>() const override;
void OnAccept() override;
void OnCancel() override;
};
class <API key> : public <API key> {
public:
explicit <API key>(
<API key>* dialog_model);
~<API key>() override;
private:
// <API key>:
bool <API key>() const override;
const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override;
std::u16string GetStepTitle() const override;
std::u16string GetStepDescription() const override;
std::u16string GetError() const override;
};
// Generic error dialog that allows starting the request over.
class <API key> : public <API key> {
public:
static std::unique_ptr<<API key>>
<API key>(<API key>* dialog_model);
static std::unique_ptr<<API key>>
<API key>(<API key>* dialog_model);
static std::unique_ptr<<API key>>
ForClientPinError<API key>(
<API key>* dialog_model);
static std::unique_ptr<<API key>>
<API key>(<API key>* dialog_model);
static std::unique_ptr<<API key>> ForStorageFull(
<API key>* dialog_model);
private:
<API key>(
<API key>* dialog_model,
std::u16string title,
std::u16string description);
// <API key>:
bool <API key>() const override;
bool <API key>() const override;
std::u16string <API key>() const override;
bool IsBackButtonVisible() const override;
std::u16string <API key>() const override;
const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override;
std::u16string GetStepTitle() const override;
std::u16string GetStepDescription() const override;
void OnAccept() override;
std::u16string title_;
std::u16string description_;
};
class <API key>
: public <API key> {
public:
explicit <API key>(
<API key>* dialog_model);
~<API key>() override;
private:
// <API key>:
const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override;
bool IsBackButtonVisible() const override;
bool <API key>() const override;
bool <API key>() const override;
std::u16string <API key>() const override;
std::u16string GetStepTitle() const override;
std::u16string GetStepDescription() const override;
void OnAccept() override;
};
// The sheet shown when the user needs to select an account.
class <API key>
: public <API key> {
public:
explicit <API key>(
<API key>* dialog_model);
~<API key>() override;
// Set the index of the currently selected row.
void SetCurrentSelection(int selected);
// <API key>:
void OnAccept() override;
private:
// <API key>:
const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override;
std::u16string GetStepTitle() const override;
std::u16string GetStepDescription() const override;
bool <API key>() const override;
bool <API key>() const override;
std::u16string <API key>() const override;
size_t selected_ = 0;
};
class <API key>
: public <API key> {
public:
explicit <API key>(
<API key>* dialog_model);
~<API key>() override;
// <API key>:
void OnAccept() override;
void OnCancel() override;
private:
// <API key>:
const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override;
std::u16string GetStepTitle() const override;
std::u16string GetStepDescription() const override;
bool IsBackButtonVisible() const override;
bool <API key>() const override;
bool <API key>() const override;
std::u16string <API key>() const override;
bool <API key>() const override;
std::u16string <API key>() const override;
};
class <API key>
: public <API key> {
public:
explicit <API key>(
<API key>* dialog_model);
private:
// <API key>:
std::u16string GetStepTitle() const override;
std::u16string GetStepDescription() const override;
};
class <API key> : public <API key> {
public:
explicit <API key>(
<API key>* dialog_model);
~<API key>() override;
private:
// <API key>:
const gfx::VectorIcon& GetStepIllustration(
ImageColorScheme color_scheme) const override;
std::u16string GetStepTitle() const override;
std::u16string GetStepDescription() const override;
};
#endif // <API key><API key>
|
package com.spm.store;
import java.io.Serializable;
import java.util.List;
import android.content.Context;
/**
*
* @author Agustin Sgarlata
* @param <T>
*/
public class DbProvider<T extends Serializable> extends Db4oHelper {
public Class<T> persistentClass;
public DbProvider(Class<T> persistentClass, Context ctx) {
super(ctx);
this.persistentClass = persistentClass;
}
public void store(T obj) {
db().store(obj);
db().commit();
}
public void delete(T obj) {
db().delete(obj);
db().commit();
}
public List<T> findAll() {
return db().query(persistentClass);
}
public List<T> get(T obj) {
return db().queryByExample(obj);
}
}
|
package main
import (
"actor"
"entity"
"math/rand"
"os"
"runtime"
"time"
"glutil"
"util"
"world"
"github.com/go-gl/gl"
"github.com/ianremmler/ode"
"github.com/rhencke/glut"
)
var renderQueue util.RenderQueue = util.NewEmptyRenderQueue()
//var currentCamera = <API key>()
var my_world = world.NewWorld()
var player = actor.NewPlayer(&my_world, glutil.Point3D{0, 0, 0}, 5)
var light actor.OrbitActor
var currentMouse = glutil.CreateMouseState()
// Normal order:
//Translate -> Rotate -> Scale
// Creates the display function
func DisplayFunc() {
gl.Clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT)
gl.Enable(gl.DEPTH_TEST)
gl.LoadIdentity()
// currentCamera.PositionSelf()
player.PositionSelf()
my_world.Tick()
renderQueue.RenderAll()
gl.Disable(gl.DEPTH_TEST)
gl.Disable(gl.LIGHTING)
gl.Color3f(.9, .9, .9)
glutil.Print2d(5, 35, "Keys: W,S,A,D : Move Around | Q / E : Move Light left/right | L : Toggle light rotation")
glutil.Print2d(5, 20, "Click and Drag: Rotate | Arrow keys: Rotate")
glutil.Print2d(5, 5, "%s", player.ToString())
gl.Flush()
glut.SwapBuffers()
}
// Creates the key handler function
func KeyDownFunc(ch byte, x int, y int) {
switch ch {
case 27:
os.Exit(0)
break
case 's':
player.Translate(-2.5, 0.0, 0.0)
break
case 'w':
player.Translate(2.5, 0.0, 0.0)
break
case 'd':
player.Translate(0.0, 0.0, -2.5)
break
case 'a':
player.Translate(0.0, 0.0, 2.5)
break
case 'q':
light.AdjustAngle(-5)
break
case 'e':
light.AdjustAngle(5)
break
case 'l':
light.Toggle()
break
}
glut.PostRedisplay()
}
// Creates the special key handler function
func SpecialFunc(key int, x int, y int) {
// Phi: Elevation, Theta: Azimuth
if key == glut.KEY_RIGHT {
player.Rotate(10, 0)
} else if key == glut.KEY_LEFT {
player.Rotate(-10, 0)
} else if key == glut.KEY_UP {
player.Rotate(0, 10)
} else if key == glut.KEY_DOWN {
player.Rotate(0, -10)
}
// Tell GLUT it is necessary to redisplay the scene
glut.PostRedisplay()
}
func MouseMotion(x, y int) {
if currentMouse.LeftDown {
horiz_delta := currentMouse.X - x
vert_delta := currentMouse.Y - y
player.Rotate(int32(horiz_delta)/-5, int32(vert_delta)/5)
player.ImmediateLook()
}
currentMouse.X, currentMouse.Y = x, y
}
func MouseDown(button, state, x, y int) {
currentMouse.X, currentMouse.Y = x, y
switch button {
case glut.LEFT_BUTTON:
currentMouse.LeftDown = (state == glut.DOWN)
break
case glut.MIDDLE_BUTTON:
currentMouse.MiddleDown = (state == glut.DOWN)
break
case glut.RIGHT_BUTTON:
currentMouse.RightDown = (state == glut.DOWN)
break
}
}
/*
* GLUT calls this routine when the window is resized
*/
func Reshape(width int, height int) {
asp := float64(1)
// Ratio of the width to the height of the window
if height > 0 {
asp = float64(width) / float64(height)
}
// Set the viewport to the entire window
gl.Viewport(0, 0, width, height)
player.GetProjection().AspectRatio = asp
player.GetProjection().SetProjectionMatrix()
}
// Idler function. Called whenever GLUT is idle.
func IdleFunc() {
s_time := glut.Get(glut.ELAPSED_TIME)
glut.PostRedisplay()
e_time := glut.Get(glut.ELAPSED_TIME) - s_time
if e_time < 33 {
time.Sleep(time.Duration(33-e_time) * time.Millisecond)
}
}
func setup() {
lightsource := actor.NewBallLight(&my_world, glutil.Point3D{15, 15, 15})
renderQueue.AddNamed(&lightsource, "light")
light = actor.NewOrbitActor(&my_world, &lightsource, glutil.Point3D{0, 15, 0}, 50)
my_world.AddActor(&light)
rand.Seed(0x12345 + 8)
my_world.AddActor(&player)
block := actor.NewBlock(&my_world, glutil.Point3D{22, 0, 0}, glutil.Point3D{10, 20.5, 20}, glutil.Color4D{.5, .3, .1, 1})
my_world.AddActor(&block)
renderQueue.Add(&block)
tmpList := []actor.OrbitActor{}
for i := 0; i < 250; i++ {
speed := rand.Intn(3)
//radius := rand.Intn(50) + 125
radius := 100
x, y, z := float64(rand.Intn(10)-5), float64(rand.Intn(10)-5), float64(rand.Intn(150)-75)
angle := float64(rand.Intn(360))
//cylinder := NewCylinder(&my_world, glutil.Point3D{x, y + 30, z}, 1, 4)
cylinder := actor.NewBlock(&my_world, glutil.Point3D{x, y + 30, z}, glutil.Point3D{.1, .1, .1}, glutil.Color4D{.8, .8, .8, .05})
tmpList = append(tmpList, actor.NewOrbitActor(&my_world, &cylinder, glutil.Point3D{x, y + 0, z}, float64(radius)))
tmpList[i].SetSpeed(int32(speed))
tmpList[i].SetAngle(int32(angle))
tmpList[i].SetAxis(glutil.Point3D{0, 0, 1})
renderQueue.Add(&cylinder)
my_world.AddActor(&tmpList[i])
}
// Create castle
//myCastle := NewCastle()
//renderQueue.AddNamed(&myCastle, "castle")
// Create ground
ground := entity.NewXYPlane(glutil.Point3D{100, 0, 100}, glutil.Point3D{-100, 0, -100}, 0)
ground.SetColor(glutil.Color4D{0.4313725490 * .7, 0.24705882 * .7, 0.098039215 * .7, 1})
ground.SetPolygonOffset(1.0)
renderQueue.Add(&ground)
my_world.AddEntity(&ground.Box)
stairs := actor.NewStairs(&my_world, glutil.Point3D{0, 0, 0})
renderQueue.Add(&stairs)
scale := float64(200)
for i := 0; i < 100; i++ {
x := (rand.Float64() * scale) - (scale / 2)
z := (rand.Float64() * scale) - (scale / 2)
x_scale, z_scale := (rand.Float64()/2)+.75, (rand.Float64()/2)+.75
y_scale := (rand.Float64() * 1) + .75
if (x < -5 || x > 20) && (z < -5 || z > 20) {
tree1 := entity.NewTree(glutil.Point3D{x, 0, z}, x_scale, y_scale, z_scale)
renderQueue.Add(&tree1)
}
}
// Put camera somewhere
//currentCamera.Translate(5, -5, 28)
player.Translate(10, 0, -20)
player.ImmediateJump() // Skip interpolation
player.Rotate(-120, 0)
player.ImmediateLook() // Skip interpolation
}
func main() {
// Let go use 2 threads
runtime.GOMAXPROCS(2)
// Init
glut.InitDisplayMode(glut.RGB | glut.DOUBLE | glut.DEPTH)
glut.InitWindowSize(750, 750)
glut.CreateWindow("Zach Anders - Assignment 5")
setup()
// Display Callbacks
glut.DisplayFunc(DisplayFunc)
glut.IdleFunc(IdleFunc)
glut.ReshapeFunc(Reshape)
// Input Callbacks
glut.SpecialFunc(SpecialFunc)
glut.KeyboardFunc(KeyDownFunc)
glut.MotionFunc(MouseMotion)
glut.MouseFunc(MouseDown)
glut.MainLoop()
}
|
from django import forms
from ncdjango.interfaces.arcgis.form_fields import SrField
class PointForm(forms.Form):
x = forms.FloatField()
y = forms.FloatField()
projection = SrField()
|
<?
$this->title = Yii::t("UserModule.user", 'Create profile field');
$this->breadcrumbs=array(
Yii::t("UserModule.user", 'Profile fields')=>array('admin'),
Yii::t("UserModule.user", 'Create'));
?>
<?php echo $this->renderPartial('_form', array('model'=>$model)); ?>
|
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_45) on Mon Jul 12 18:25:20 IDT 2021 -->
<title>com.exlibris.repository.persistence.sip</title>
<meta name="date" content="2021-07-12">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../script.js"></script>
</head>
<body>
<h1 class="bar"><a href="../../../../../com/exlibris/repository/persistence/sip/package-summary.html" target="classFrame">com.exlibris.repository.persistence.sip</a></h1>
<div class="indexContainer">
<h2 title="Classes">Classes</h2>
<ul title="Classes">
<li><a href="SIPStatusInfo.html" title="class in com.exlibris.repository.persistence.sip" target="classFrame">SIPStatusInfo</a></li>
</ul>
</div>
</body>
</html>
|
#ifndef <API key>
#define <API key>
#include "KitParameters.h"
#include "KitManager.h"
#include "../../Sound/SoundBank/SoundBank.h"
#include "../Instruments/Instrument.h"
#include "../Triggers/Triggers/Trigger.h"
#include <string>
#include <vector>
namespace DrumKit
{
class Kit
{
public:
Kit(const KitParameters& params, std::vector<TriggerPtr> const& trigs, std::shared_ptr<Sound::SoundBank> sb);
virtual ~Kit();
void Enable();
void Disable();
void Save() const { KitManager::SaveKit(parameters.configFilePath, parameters);}
void SetInstrumentVolume(size_t id, float volume);
std::string GetConfigFilePath() const noexcept { return parameters.configFilePath; }
float GetInstrumentVolume(int id) const { return instruments[id]->GetVolume(); }
std::string GetInstrumentName(std::size_t id) const;
std::string GetName() const noexcept { return parameters.kitName; }
int GetNumInstruments() const { return (int)parameters.<API key>.size(); }
const std::vector<InstrumentPtr>& GetInstruments() const { return instruments; }
private:
void CreateInstruments();
KitParameters parameters;
const std::vector<TriggerPtr>& triggers;
std::shared_ptr<Sound::SoundBank> soundBank;
std::vector<InstrumentPtr> instruments;
};
} /* namespace DrumKit */
#endif /* <API key> */
|
# -*- coding: utf-8 -*-
# modification, are permitted provided that the following conditions are met:
# documentation and/or other materials provided with the distribution.
# may be used to endorse or promote products derived from this software without
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from .fetchers import <API key>
from .fetchers import NUMetadatasFetcher
from .fetchers import <API key>
from bambou import NURESTObject
class NUAvatar(NURESTObject):
""" Represents a Avatar in the VSD
Notes:
Avatar
"""
__rest_name__ = "avatar"
__resource_name__ = "avatars"
## Constants
<API key> = "GLOBAL"
<API key> = "ENTERPRISE"
def __init__(self, **kwargs):
""" Initializes a Avatar instance
Notes:
You can specify all parameters while calling this methods.
A special argument named `data` will enable you to load the
object from a Python dictionary
Examples:
avatar = NUAvatar(id=u'xxxx-xxx-xxx-xxx', name=u'Avatar')
avatar = NUAvatar(data=my_dict)
"""
super(NUAvatar, self).__init__()
# Read/Write Attributes
self._last_updated_by = None
self._last_updated_date = None
self._embedded_metadata = None
self._entity_scope = None
self._creation_date = None
self._owner = None
self._external_id = None
self._type = None
self.expose_attribute(local_name="last_updated_by", remote_name="lastUpdatedBy", attribute_type=str, is_required=False, is_unique=False)
self.expose_attribute(local_name="last_updated_date", remote_name="lastUpdatedDate", attribute_type=str, is_required=False, is_unique=False)
self.expose_attribute(local_name="embedded_metadata", remote_name="embeddedMetadata", attribute_type=list, is_required=False, is_unique=False)
self.expose_attribute(local_name="entity_scope", remote_name="entityScope", attribute_type=str, is_required=False, is_unique=False, choices=[u'ENTERPRISE', u'GLOBAL'])
self.expose_attribute(local_name="creation_date", remote_name="creationDate", attribute_type=str, is_required=False, is_unique=False)
self.expose_attribute(local_name="owner", remote_name="owner", attribute_type=str, is_required=False, is_unique=False)
self.expose_attribute(local_name="external_id", remote_name="externalID", attribute_type=str, is_required=False, is_unique=True)
self.expose_attribute(local_name="type", remote_name="type", attribute_type=str, is_required=False, is_unique=False)
# Fetchers
self.permissions = <API key>.fetcher_with_object(parent_object=self, relationship="child")
self.metadatas = NUMetadatasFetcher.fetcher_with_object(parent_object=self, relationship="child")
self.global_metadatas = <API key>.fetcher_with_object(parent_object=self, relationship="child")
self._compute_args(**kwargs)
# Properties
@property
def last_updated_by(self):
""" Get last_updated_by value.
Notes:
ID of the user who last updated the object.
This attribute is named `lastUpdatedBy` in VSD API.
"""
return self._last_updated_by
@last_updated_by.setter
def last_updated_by(self, value):
""" Set last_updated_by value.
Notes:
ID of the user who last updated the object.
This attribute is named `lastUpdatedBy` in VSD API.
"""
self._last_updated_by = value
@property
def last_updated_date(self):
""" Get last_updated_date value.
Notes:
Time stamp when this object was last updated.
This attribute is named `lastUpdatedDate` in VSD API.
"""
return self._last_updated_date
@last_updated_date.setter
def last_updated_date(self, value):
""" Set last_updated_date value.
Notes:
Time stamp when this object was last updated.
This attribute is named `lastUpdatedDate` in VSD API.
"""
self._last_updated_date = value
@property
def embedded_metadata(self):
""" Get embedded_metadata value.
Notes:
Metadata objects associated with this entity. This will contain a list of Metadata objects if the API request is made using the special flag to enable the embedded Metadata feature. Only a maximum of Metadata objects is returned based on the value set in the system configuration.
This attribute is named `embeddedMetadata` in VSD API.
"""
return self._embedded_metadata
@embedded_metadata.setter
def embedded_metadata(self, value):
""" Set embedded_metadata value.
Notes:
Metadata objects associated with this entity. This will contain a list of Metadata objects if the API request is made using the special flag to enable the embedded Metadata feature. Only a maximum of Metadata objects is returned based on the value set in the system configuration.
This attribute is named `embeddedMetadata` in VSD API.
"""
self._embedded_metadata = value
@property
def entity_scope(self):
""" Get entity_scope value.
Notes:
Specify if scope of entity is Data center or Enterprise level
This attribute is named `entityScope` in VSD API.
"""
return self._entity_scope
@entity_scope.setter
def entity_scope(self, value):
""" Set entity_scope value.
Notes:
Specify if scope of entity is Data center or Enterprise level
This attribute is named `entityScope` in VSD API.
"""
self._entity_scope = value
@property
def creation_date(self):
""" Get creation_date value.
Notes:
Time stamp when this object was created.
This attribute is named `creationDate` in VSD API.
"""
return self._creation_date
@creation_date.setter
def creation_date(self, value):
""" Set creation_date value.
Notes:
Time stamp when this object was created.
This attribute is named `creationDate` in VSD API.
"""
self._creation_date = value
@property
def owner(self):
""" Get owner value.
Notes:
Identifies the user that has created this object.
"""
return self._owner
@owner.setter
def owner(self, value):
""" Set owner value.
Notes:
Identifies the user that has created this object.
"""
self._owner = value
@property
def external_id(self):
""" Get external_id value.
Notes:
External object ID. Used for integration with third party systems
This attribute is named `externalID` in VSD API.
"""
return self._external_id
@external_id.setter
def external_id(self, value):
""" Set external_id value.
Notes:
External object ID. Used for integration with third party systems
This attribute is named `externalID` in VSD API.
"""
self._external_id = value
@property
def type(self):
""" Get type value.
Notes:
The image type
"""
return self._type
@type.setter
def type(self, value):
""" Set type value.
Notes:
The image type
"""
self._type = value
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http:
<html xmlns="http:
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Zend_Session - Zend Framework Manual</title>
</head>
<body>
<table width="100%">
<tr valign="top">
<td width="85%">
<table width="100%">
<tr>
<td width="25%" style="text-align: left;">
<a href="zend.service.yahoo.html">Zend_Service_Yahoo</a>
</td>
<td width="50%" style="text-align: center;">
<div class="up"><span class="up"><a href="reference.html">Zend Framework Reference</a></span><br />
<span class="home"><a href="manual.html">Programmer's Reference Guide</a></span></div>
</td>
<td width="25%" style="text-align: right;">
<div class="next" style="text-align: right; float: right;"><a href="zend.session.introduction.html">Einführung</a></div>
</td>
</tr>
</table>
<hr />
<div id="zend.session" class="chapter"><div class="info"><h1>Zend_Session</h1><strong>Table of Contents</strong><ul class="chunklist chunklist_title">
<li><a href="zend.session.introduction.html">Einführung</a></li>
<li><a href="zend.session.basic_usage.html">Grundsätzliche Verwendung</a></li>
<li><a href="zend.session.advanced_usage.html">Fortgeschrittene Benutzung</a></li>
<li><a href="zend.session.<API key>.html">Globales Session Management</a></li>
<li><a href="zend.session.savehandler.dbtable.html"><API key></a></li>
</ul>
</div>
</div>
<hr />
<table width="100%">
<tr>
<td width="25%" style="text-align: left;">
<a href="zend.service.yahoo.html">Zend_Service_Yahoo</a>
</td>
<td width="50%" style="text-align: center;">
<div class="up"><span class="up"><a href="reference.html">Zend Framework Reference</a></span><br />
<span class="home"><a href="manual.html">Programmer's Reference Guide</a></span></div>
</td>
<td width="25%" style="text-align: right;">
<div class="next" style="text-align: right; float: right;"><a href="zend.session.introduction.html">Einführung</a></div>
</td>
</tr>
</table>
</td>
<td style="font-size: smaller;" width="15%"> <style type="text/css">
#leftbar {
float: left;
width: 186px;
padding: 5px;
font-size: smaller;
}
ul.toc {
margin: 0px 5px 5px 5px;
padding: 0px;
}
ul.toc li {
font-size: 85%;
margin: 1px 0 1px 1px;
padding: 1px 0 1px 11px;
list-style-type: none;
background-repeat: no-repeat;
background-position: center left;
}
ul.toc li.header {
font-size: 115%;
padding: 5px 0px 5px 11px;
border-bottom: 1px solid #cccccc;
margin-bottom: 5px;
}
ul.toc li.active {
font-weight: bold;
}
ul.toc li a {
text-decoration: none;
}
ul.toc li a:hover {
text-decoration: underline;
}
</style>
<ul class="toc">
<li class="header home"><a href="manual.html">Programmer's Reference Guide</a></li>
<li class="header up"><a href="manual.html">Programmer's Reference Guide</a></li>
<li class="header up"><a href="reference.html">Zend Framework Reference</a></li>
<li><a href="zend.acl.html">Zend_Acl</a></li>
<li><a href="zend.amf.html">Zend_Amf</a></li>
<li><a href="zend.application.html">Zend_Application</a></li>
<li><a href="zend.auth.html">Zend_Auth</a></li>
<li><a href="zend.barcode.html">Zend_Barcode</a></li>
<li><a href="zend.cache.html">Zend_Cache</a></li>
<li><a href="zend.captcha.html">Zend_Captcha</a></li>
<li><a href="zend.cloud.html">SimpleCloud API: Zend_Cloud</a></li>
<li><a href="zend.codegenerator.html">Zend_CodeGenerator</a></li>
<li><a href="zend.config.html">Zend_Config</a></li>
<li><a href="zend.config.writer.html">Zend_Config_Writer</a></li>
<li><a href="zend.console.getopt.html">Zend_Console_Getopt</a></li>
<li><a href="zend.controller.html">Zend_Controller</a></li>
<li><a href="zend.currency.html">Zend_Currency</a></li>
<li><a href="zend.date.html">Zend_Date</a></li>
<li><a href="zend.db.html">Zend_Db</a></li>
<li><a href="zend.debug.html">Zend_Debug</a></li>
<li><a href="zend.dojo.html">Zend_Dojo</a></li>
<li><a href="zend.dom.html">Zend_Dom</a></li>
<li><a href="zend.exception.html">Zend_Exception</a></li>
<li><a href="zend.feed.html">Zend_Feed</a></li>
<li><a href="zend.file.html">Zend_File</a></li>
<li><a href="zend.filter.html">Zend_Filter</a></li>
<li><a href="zend.form.html">Zend_Form</a></li>
<li><a href="zend.gdata.html">Zend_Gdata</a></li>
<li><a href="zend.http.html">Zend_Http</a></li>
<li><a href="zend.infocard.html">Zend_InfoCard</a></li>
<li><a href="zend.json.html">Zend_Json</a></li>
<li><a href="zend.layout.html">Zend_Layout</a></li>
<li><a href="zend.ldap.html">Zend_Ldap</a></li>
<li><a href="zend.loader.html">Zend_Loader</a></li>
<li><a href="zend.locale.html">Zend_Locale</a></li>
<li><a href="zend.log.html">Zend_Log</a></li>
<li><a href="zend.mail.html">Zend_Mail</a></li>
<li><a href="zend.markup.html">Zend_Markup</a></li>
<li><a href="zend.measure.html">Zend_Measure</a></li>
<li><a href="zend.memory.html">Zend_Memory</a></li>
<li><a href="zend.mime.html">Zend_Mime</a></li>
<li><a href="zend.navigation.html">Zend_Navigation</a></li>
<li><a href="zend.oauth.html">Zend_Oauth</a></li>
<li><a href="zend.openid.html">Zend_OpenId</a></li>
<li><a href="zend.paginator.html">Zend_Paginator</a></li>
<li><a href="zend.pdf.html">Zend_Pdf</a></li>
<li><a href="zend.progressbar.html">Zend_ProgressBar</a></li>
<li><a href="zend.queue.html">Zend_Queue</a></li>
<li><a href="zend.reflection.html">Zend_Reflection</a></li>
<li><a href="zend.registry.html">Zend_Registry</a></li>
<li><a href="zend.rest.html">Zend_Rest</a></li>
<li><a href="zend.search.lucene.html">Zend_Search_Lucene</a></li>
<li><a href="zend.serializer.html">Zend_Serializer</a></li>
<li><a href="zend.server.html">Zend_Server</a></li>
<li><a href="zend.service.html">Zend_Service</a></li>
<li class="active"><a href="zend.session.html">Zend_Session</a></li>
<li><a href="zend.soap.html">Zend_Soap</a></li>
<li><a href="zend.tag.html">Zend_Tag</a></li>
<li><a href="zend.test.html">Zend_Test</a></li>
<li><a href="zend.text.html">Zend_Text</a></li>
<li><a href="zend.timesync.html">Zend_TimeSync</a></li>
<li><a href="zend.tool.html">Zend_Tool</a></li>
<li><a href="zend.tool.framework.html">Zend_Tool_Framework</a></li>
<li><a href="zend.tool.project.html">Zend_Tool_Project</a></li>
<li><a href="zend.translate.html">Zend_Translate</a></li>
<li><a href="zend.uri.html">Zend_Uri</a></li>
<li><a href="zend.validate.html">Zend_Validate</a></li>
<li><a href="zend.version.html">Zend_Version</a></li>
<li><a href="zend.view.html">Zend_View</a></li>
<li><a href="zend.wildfire.html">Zend_Wildfire</a></li>
<li><a href="zend.xmlrpc.html">Zend_XmlRpc</a></li>
<li><a href="zendx.console.process.unix.html"><API key></a></li>
<li><a href="zendx.jquery.html">ZendX_JQuery</a></li>
</ul>
</td>
</tr>
</table>
</body>
</html>
|
#include "utils/includes.h"
#include "utils/common.h"
#include "utils/eloop.h"
#include "common/ieee802_11_defs.h"
#include "common/wpa_ctrl.h"
#include "common/hw_features_common.h"
#include "radius/radius_client.h"
#include "radius/radius_das.h"
#include "eap_server/tncs.h"
#include "eapol_auth/eapol_auth_sm.h"
#include "eapol_auth/eapol_auth_sm_i.h"
#include "fst/fst.h"
#include "hostapd.h"
#include "authsrv.h"
#include "sta_info.h"
#include "accounting.h"
#include "ap_list.h"
#include "beacon.h"
#include "iapp.h"
#include "ieee802_1x.h"
#include "ieee802_11_auth.h"
#include "vlan_init.h"
#include "wpa_auth.h"
#include "wps_hostapd.h"
#include "hw_features.h"
#include "wpa_auth_glue.h"
#include "ap_drv_ops.h"
#include "ap_config.h"
#include "p2p_hostapd.h"
#include "gas_serv.h"
#include "dfs.h"
#include "ieee802_11.h"
#include "bss_load.h"
#include "x_snoop.h"
#include "dhcp_snoop.h"
#include "ndisc_snoop.h"
#include "neighbor_db.h"
#include "rrm.h"
#ifdef CONFIG_KARMA_ATTACK
#include "karma_handlers.h"
#endif
static int <API key>(struct hostapd_data *hapd, u16 reason);
static int <API key>(char *iface, struct hostapd_data *hapd);
static int <API key>(struct hostapd_data *hapd);
static int setup_interface2(struct hostapd_iface *iface);
static void <API key>(void *eloop_ctx, void *timeout_ctx);
#ifdef CONFIG_KARMA_ATTACK
struct hostapd_data *g_hapd_data;
#endif
int <API key>(struct hapd_interfaces *interfaces,
int (*cb)(struct hostapd_iface *iface,
void *ctx), void *ctx)
{
size_t i;
int ret;
for (i = 0; i < interfaces->count; i++) {
ret = cb(interfaces->iface[i], ctx);
if (ret)
return ret;
}
return 0;
}
static void hostapd_reload_bss(struct hostapd_data *hapd)
{
struct hostapd_ssid *ssid;
#ifndef CONFIG_NO_RADIUS
<API key>(hapd->radius, hapd->conf->radius);
#endif /* CONFIG_NO_RADIUS */
ssid = &hapd->conf->ssid;
if (!ssid->wpa_psk_set && ssid->wpa_psk && !ssid->wpa_psk->next &&
ssid->wpa_passphrase_set && ssid->wpa_passphrase) {
/*
* Force PSK to be derived again since SSID or passphrase may
* have changed.
*/
<API key>(&hapd->conf->ssid.wpa_psk);
}
if (<API key>(hapd->conf)) {
wpa_printf(MSG_ERROR, "Failed to re-configure WPA PSK "
"after reloading configuration");
}
if (hapd->conf->ieee802_1x || hapd->conf->wpa)
<API key>(hapd, hapd->conf->iface, 1);
else
<API key>(hapd, hapd->conf->iface, 0);
if ((hapd->conf->wpa || hapd->conf->osen) && hapd->wpa_auth == NULL) {
hostapd_setup_wpa(hapd);
if (hapd->wpa_auth)
wpa_init_keys(hapd->wpa_auth);
} else if (hapd->conf->wpa) {
const u8 *wpa_ie;
size_t wpa_ie_len;
<API key>(hapd);
wpa_ie = wpa_auth_get_wpa_ie(hapd->wpa_auth, &wpa_ie_len);
if (<API key>(hapd, wpa_ie, wpa_ie_len))
wpa_printf(MSG_ERROR, "Failed to configure WPA IE for "
"the kernel driver.");
} else if (hapd->wpa_auth) {
wpa_deinit(hapd->wpa_auth);
hapd->wpa_auth = NULL;
hostapd_set_privacy(hapd, 0);
<API key>(hapd->conf->iface, hapd);
<API key>(hapd, (u8 *) "", 0);
}
<API key>(hapd);
hostapd_update_wps(hapd);
if (hapd->conf->ssid.ssid_set &&
hostapd_set_ssid(hapd, hapd->conf->ssid.ssid,
hapd->conf->ssid.ssid_len)) {
wpa_printf(MSG_ERROR, "Could not set SSID for kernel driver");
/* try to continue */
}
wpa_printf(MSG_DEBUG, "Reconfigured interface %s", hapd->conf->iface);
}
static void hostapd_clear_old(struct hostapd_iface *iface)
{
size_t j;
/*
* Deauthenticate all stations since the new configuration may not
* allow them to use the BSS anymore.
*/
for (j = 0; j < iface->num_bss; j++) {
<API key>(iface->bss[j],
<API key>);
<API key>(iface->bss[j]);
#ifndef CONFIG_NO_RADIUS
/* TODO: update dynamic data based on changed configuration
* items (e.g., open/close sockets, etc.) */
radius_client_flush(iface->bss[j]->radius, 0);
#endif /* CONFIG_NO_RADIUS */
}
}
int <API key>(struct hostapd_iface *iface)
{
struct hostapd_data *hapd = iface->bss[0];
struct hostapd_config *newconf, *oldconf;
size_t j;
if (iface->config_fname == NULL) {
/* Only in-memory config in use - assume it has been updated */
hostapd_clear_old(iface);
for (j = 0; j < iface->num_bss; j++)
hostapd_reload_bss(iface->bss[j]);
return 0;
}
if (iface->interfaces == NULL ||
iface->interfaces->config_read_cb == NULL)
return -1;
newconf = iface->interfaces->config_read_cb(iface->config_fname);
if (newconf == NULL)
return -1;
hostapd_clear_old(iface);
oldconf = hapd->iconf;
iface->conf = newconf;
for (j = 0; j < iface->num_bss; j++) {
hapd = iface->bss[j];
hapd->iconf = newconf;
hapd->iconf->channel = oldconf->channel;
hapd->iconf->acs = oldconf->acs;
hapd->iconf->secondary_channel = oldconf->secondary_channel;
hapd->iconf->ieee80211n = oldconf->ieee80211n;
hapd->iconf->ieee80211ac = oldconf->ieee80211ac;
hapd->iconf->ht_capab = oldconf->ht_capab;
hapd->iconf->vht_capab = oldconf->vht_capab;
hapd->iconf->vht_oper_chwidth = oldconf->vht_oper_chwidth;
hapd->iconf-><API key> =
oldconf-><API key>;
hapd->iconf-><API key> =
oldconf-><API key>;
hapd->conf = newconf->bss[j];
hostapd_reload_bss(hapd);
}
hostapd_config_free(oldconf);
return 0;
}
static void <API key>(struct hostapd_data *hapd,
const char *ifname)
{
int i;
if (!ifname)
return;
for (i = 0; i < NUM_WEP_KEYS; i++) {
if (hostapd_drv_set_key(ifname, hapd, WPA_ALG_NONE, NULL, i,
0, NULL, 0, NULL, 0)) {
wpa_printf(MSG_DEBUG, "Failed to clear default "
"encryption keys (ifname=%s keyidx=%d)",
ifname, i);
}
}
#ifdef CONFIG_IEEE80211W
if (hapd->conf->ieee80211w) {
for (i = NUM_WEP_KEYS; i < NUM_WEP_KEYS + 2; i++) {
if (hostapd_drv_set_key(ifname, hapd, WPA_ALG_NONE,
NULL, i, 0, NULL,
0, NULL, 0)) {
wpa_printf(MSG_DEBUG, "Failed to clear "
"default mgmt encryption keys "
"(ifname=%s keyidx=%d)", ifname, i);
}
}
}
#endif /* CONFIG_IEEE80211W */
}
static int <API key>(struct hostapd_data *hapd)
{
<API key>(hapd, hapd->conf->iface);
return 0;
}
static int <API key>(struct hostapd_data *hapd)
{
int errors = 0, idx;
struct hostapd_ssid *ssid = &hapd->conf->ssid;
idx = ssid->wep.idx;
if (ssid->wep.default_len &&
hostapd_drv_set_key(hapd->conf->iface,
hapd, WPA_ALG_WEP, <API key>, idx,
1, NULL, 0, ssid->wep.key[idx],
ssid->wep.len[idx])) {
wpa_printf(MSG_WARNING, "Could not set WEP encryption.");
errors++;
}
return errors;
}
static void <API key>(struct hostapd_data *hapd)
{
os_free(hapd->probereq_cb);
hapd->probereq_cb = NULL;
hapd->num_probereq_cb = 0;
#ifdef CONFIG_P2P
wpabuf_free(hapd->p2p_beacon_ie);
hapd->p2p_beacon_ie = NULL;
wpabuf_free(hapd->p2p_probe_resp_ie);
hapd->p2p_probe_resp_ie = NULL;
#endif /* CONFIG_P2P */
if (!hapd->started) {
wpa_printf(MSG_ERROR, "%s: Interface %s wasn't started",
__func__, hapd->conf->iface);
return;
}
hapd->started = 0;
wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface);
iapp_deinit(hapd->iapp);
hapd->iapp = NULL;
accounting_deinit(hapd);
hostapd_deinit_wpa(hapd);
vlan_deinit(hapd);
hostapd_acl_deinit(hapd);
#ifndef CONFIG_NO_RADIUS
<API key>(hapd->radius);
hapd->radius = NULL;
radius_das_deinit(hapd->radius_das);
hapd->radius_das = NULL;
#endif /* CONFIG_NO_RADIUS */
hostapd_deinit_wps(hapd);
authsrv_deinit(hapd);
if (hapd->interface_added) {
hapd->interface_added = 0;
if (hostapd_if_remove(hapd, WPA_IF_AP_BSS, hapd->conf->iface)) {
wpa_printf(MSG_WARNING,
"Failed to remove BSS interface %s",
hapd->conf->iface);
hapd->interface_added = 1;
} else {
/*
* Since this was a dynamically added interface, the
* driver wrapper may have removed its internal instance
* and hapd->drv_priv is not valid anymore.
*/
hapd->drv_priv = NULL;
}
}
wpabuf_free(hapd->time_adv);
#ifdef CONFIG_INTERWORKING
gas_serv_deinit(hapd);
#endif /* CONFIG_INTERWORKING */
<API key>(hapd);
ndisc_snoop_deinit(hapd);
dhcp_snoop_deinit(hapd);
x_snoop_deinit(hapd);
#ifdef CONFIG_SQLITE
bin_clear_free(hapd->tmp_eap_user.identity,
hapd->tmp_eap_user.identity_len);
bin_clear_free(hapd->tmp_eap_user.password,
hapd->tmp_eap_user.password_len);
#endif /* CONFIG_SQLITE */
#ifdef CONFIG_MESH
wpabuf_free(hapd->mesh_pending_auth);
hapd->mesh_pending_auth = NULL;
#endif /* CONFIG_MESH */
hostapd_clean_rrm(hapd);
}
/**
* hostapd_cleanup - Per-BSS cleanup (deinitialization)
* @hapd: Pointer to BSS data
*
* This function is used to free all per-BSS data structures and resources.
* Most of the modules that are initialized in hostapd_setup_bss() are
* deinitialized here.
*/
static void hostapd_cleanup(struct hostapd_data *hapd)
{
wpa_printf(MSG_DEBUG, "%s(hapd=%p (%s))", __func__, hapd,
hapd->conf->iface);
if (hapd->iface->interfaces &&
hapd->iface->interfaces->ctrl_iface_deinit)
hapd->iface->interfaces->ctrl_iface_deinit(hapd);
<API key>(hapd);
}
static void sta_track_deinit(struct hostapd_iface *iface)
{
struct hostapd_sta_info *info;
if (!iface->num_sta_seen)
return;
while ((info = dl_list_first(&iface->sta_seen, struct hostapd_sta_info,
list))) {
dl_list_del(&info->list);
iface->num_sta_seen
sta_track_del(info);
}
}
static void <API key>(struct hostapd_iface *iface)
{
wpa_printf(MSG_DEBUG, "%s(%p)", __func__, iface);
#ifdef CONFIG_IEEE80211N
#ifdef NEED_AP_MLME
<API key>(iface);
#endif /* NEED_AP_MLME */
#endif /* CONFIG_IEEE80211N */
<API key>(iface->hw_features, iface->num_hw_features);
iface->hw_features = NULL;
os_free(iface->current_rates);
iface->current_rates = NULL;
os_free(iface->basic_rates);
iface->basic_rates = NULL;
ap_list_deinit(iface);
sta_track_deinit(iface);
}
/**
* <API key> - Complete per-interface cleanup
* @iface: Pointer to interface data
*
* This function is called after per-BSS data structures are deinitialized
* with hostapd_cleanup().
*/
static void <API key>(struct hostapd_iface *iface)
{
wpa_printf(MSG_DEBUG, "%s(%p)", __func__, iface);
<API key>(<API key>, iface, NULL);
<API key>(iface);
hostapd_config_free(iface->conf);
iface->conf = NULL;
os_free(iface->config_fname);
os_free(iface->bss);
wpa_printf(MSG_DEBUG, "%s: free iface=%p", __func__, iface);
os_free(iface);
}
static void hostapd_clear_wep(struct hostapd_data *hapd)
{
if (hapd->drv_priv && !hapd->iface->driver_ap_teardown) {
hostapd_set_privacy(hapd, 0);
<API key>(hapd);
}
}
static int <API key>(char *iface, struct hostapd_data *hapd)
{
int i;
<API key>(hapd);
if (hapd->conf->ssid.wep.default_len) {
hostapd_set_privacy(hapd, 1);
return 0;
}
/*
* When IEEE 802.1X is not enabled, the driver may need to know how to
* set authentication algorithms for static WEP.
*/
<API key>(hapd, hapd->conf->auth_algs);
for (i = 0; i < 4; i++) {
if (hapd->conf->ssid.wep.key[i] &&
hostapd_drv_set_key(iface, hapd, WPA_ALG_WEP, NULL, i,
i == hapd->conf->ssid.wep.idx, NULL, 0,
hapd->conf->ssid.wep.key[i],
hapd->conf->ssid.wep.len[i])) {
wpa_printf(MSG_WARNING, "Could not set WEP "
"encryption.");
return -1;
}
if (hapd->conf->ssid.wep.key[i] &&
i == hapd->conf->ssid.wep.idx)
hostapd_set_privacy(hapd, 1);
}
return 0;
}
static int <API key>(struct hostapd_data *hapd, u16 reason)
{
int ret = 0;
u8 addr[ETH_ALEN];
if (hostapd_drv_none(hapd) || hapd->drv_priv == NULL)
return 0;
if (!hapd->iface->driver_ap_teardown) {
wpa_dbg(hapd->msg_ctx, MSG_DEBUG,
"Flushing old station entries");
if (hostapd_flush(hapd)) {
wpa_msg(hapd->msg_ctx, MSG_WARNING,
"Could not connect to kernel driver");
ret = -1;
}
}
wpa_dbg(hapd->msg_ctx, MSG_DEBUG, "Deauthenticate all stations");
os_memset(addr, 0xff, ETH_ALEN);
<API key>(hapd, addr, reason);
hostapd_free_stas(hapd);
return ret;
}
static void <API key>(struct hostapd_data *hapd)
{
#ifdef CONFIG_KARMA_ATTACK
free_all_karma_data(hapd);
#endif
hostapd_free_stas(hapd);
<API key>(hapd, <API key>);
hostapd_clear_wep(hapd);
}
/**
* <API key> - Validate BSSID configuration
* @iface: Pointer to interface data
* Returns: 0 on success, -1 on failure
*
* This function is used to validate that the configured BSSIDs are valid.
*/
static int <API key>(struct hostapd_iface *iface)
{
u8 mask[ETH_ALEN] = { 0 };
struct hostapd_data *hapd = iface->bss[0];
unsigned int i = iface->conf->num_bss, bits = 0, j;
int auto_addr = 0;
if (hostapd_drv_none(hapd))
return 0;
if (iface->conf-><API key>)
return 0;
/* Generate BSSID mask that is large enough to cover the BSSIDs. */
/* Determine the bits necessary to cover the number of BSSIDs. */
for (i--; i; i >>= 1)
bits++;
/* Determine the bits necessary to any configured BSSIDs,
if they are higher than the number of BSSIDs. */
for (j = 0; j < iface->conf->num_bss; j++) {
if (is_zero_ether_addr(iface->conf->bss[j]->bssid)) {
if (j)
auto_addr++;
continue;
}
for (i = 0; i < ETH_ALEN; i++) {
mask[i] |=
iface->conf->bss[j]->bssid[i] ^
hapd->own_addr[i];
}
}
if (!auto_addr)
goto skip_mask_ext;
for (i = 0; i < ETH_ALEN && mask[i] == 0; i++)
;
j = 0;
if (i < ETH_ALEN) {
j = (5 - i) * 8;
while (mask[i] != 0) {
mask[i] >>= 1;
j++;
}
}
if (bits < j)
bits = j;
if (bits > 40) {
wpa_printf(MSG_ERROR, "Too many bits in the BSSID mask (%u)",
bits);
return -1;
}
os_memset(mask, 0xff, ETH_ALEN);
j = bits / 8;
for (i = 5; i > 5 - j; i
mask[i] = 0;
j = bits % 8;
while (j
mask[i] <<= 1;
skip_mask_ext:
wpa_printf(MSG_DEBUG, "BSS count %lu, BSSID mask " MACSTR " (%d bits)",
(unsigned long) iface->conf->num_bss, MAC2STR(mask), bits);
if (!auto_addr)
return 0;
for (i = 0; i < ETH_ALEN; i++) {
if ((hapd->own_addr[i] & mask[i]) != hapd->own_addr[i]) {
wpa_printf(MSG_ERROR, "Invalid BSSID mask " MACSTR
" for start address " MACSTR ".",
MAC2STR(mask), MAC2STR(hapd->own_addr));
wpa_printf(MSG_ERROR, "Start address must be the "
"first address in the block (i.e., addr "
"AND mask == addr).");
return -1;
}
}
return 0;
}
static int mac_in_conf(struct hostapd_config *conf, const void *a)
{
size_t i;
for (i = 0; i < conf->num_bss; i++) {
if (hostapd_mac_comp(conf->bss[i]->bssid, a) == 0) {
return 1;
}
}
return 0;
}
#ifndef CONFIG_NO_RADIUS
static int <API key>(struct hostapd_data *hapd,
struct radius_das_attrs *attr)
{
if (attr->nas_identifier &&
(!hapd->conf->nas_identifier ||
os_strlen(hapd->conf->nas_identifier) !=
attr->nas_identifier_len ||
os_memcmp(hapd->conf->nas_identifier, attr->nas_identifier,
attr->nas_identifier_len) != 0)) {
wpa_printf(MSG_DEBUG, "RADIUS DAS: NAS-Identifier mismatch");
return 1;
}
if (attr->nas_ip_addr &&
(hapd->conf->own_ip_addr.af != AF_INET ||
os_memcmp(&hapd->conf->own_ip_addr.u.v4, attr->nas_ip_addr, 4) !=
0)) {
wpa_printf(MSG_DEBUG, "RADIUS DAS: NAS-IP-Address mismatch");
return 1;
}
#ifdef CONFIG_IPV6
if (attr->nas_ipv6_addr &&
(hapd->conf->own_ip_addr.af != AF_INET6 ||
os_memcmp(&hapd->conf->own_ip_addr.u.v6, attr->nas_ipv6_addr, 16)
!= 0)) {
wpa_printf(MSG_DEBUG, "RADIUS DAS: NAS-IPv6-Address mismatch");
return 1;
}
#endif /* CONFIG_IPV6 */
return 0;
}
static struct sta_info * <API key>(struct hostapd_data *hapd,
struct radius_das_attrs *attr,
int *multi)
{
struct sta_info *selected, *sta;
char buf[128];
int num_attr = 0;
int count;
*multi = 0;
for (sta = hapd->sta_list; sta; sta = sta->next)
sta->radius_das_match = 1;
if (attr->sta_addr) {
num_attr++;
sta = ap_get_sta(hapd, attr->sta_addr);
if (!sta) {
wpa_printf(MSG_DEBUG,
"RADIUS DAS: No Calling-Station-Id match");
return NULL;
}
selected = sta;
for (sta = hapd->sta_list; sta; sta = sta->next) {
if (sta != selected)
sta->radius_das_match = 0;
}
wpa_printf(MSG_DEBUG, "RADIUS DAS: Calling-Station-Id match");
}
if (attr->acct_session_id) {
num_attr++;
if (attr->acct_session_id_len != 16) {
wpa_printf(MSG_DEBUG,
"RADIUS DAS: Acct-Session-Id cannot match");
return NULL;
}
count = 0;
for (sta = hapd->sta_list; sta; sta = sta->next) {
if (!sta->radius_das_match)
continue;
os_snprintf(buf, sizeof(buf), "%016llX",
(unsigned long long) sta->acct_session_id);
if (os_memcmp(attr->acct_session_id, buf, 16) != 0)
sta->radius_das_match = 0;
else
count++;
}
if (count == 0) {
wpa_printf(MSG_DEBUG,
"RADIUS DAS: No matches remaining after Acct-Session-Id check");
return NULL;
}
wpa_printf(MSG_DEBUG, "RADIUS DAS: Acct-Session-Id match");
}
if (attr-><API key>) {
num_attr++;
if (attr-><API key> != 16) {
wpa_printf(MSG_DEBUG,
"RADIUS DAS: <API key> cannot match");
return NULL;
}
count = 0;
for (sta = hapd->sta_list; sta; sta = sta->next) {
if (!sta->radius_das_match)
continue;
if (!sta->eapol_sm ||
!sta->eapol_sm-><API key>) {
sta->radius_das_match = 0;
continue;
}
os_snprintf(buf, sizeof(buf), "%016llX",
(unsigned long long)
sta->eapol_sm-><API key>);
if (os_memcmp(attr-><API key>, buf, 16) !=
0)
sta->radius_das_match = 0;
else
count++;
}
if (count == 0) {
wpa_printf(MSG_DEBUG,
"RADIUS DAS: No matches remaining after <API key> check");
return NULL;
}
wpa_printf(MSG_DEBUG,
"RADIUS DAS: <API key> match");
}
if (attr->cui) {
num_attr++;
count = 0;
for (sta = hapd->sta_list; sta; sta = sta->next) {
struct wpabuf *cui;
if (!sta->radius_das_match)
continue;
cui = <API key>(sta->eapol_sm);
if (!cui || wpabuf_len(cui) != attr->cui_len ||
os_memcmp(wpabuf_head(cui), attr->cui,
attr->cui_len) != 0)
sta->radius_das_match = 0;
else
count++;
}
if (count == 0) {
wpa_printf(MSG_DEBUG,
"RADIUS DAS: No matches remaining after <API key> check");
return NULL;
}
wpa_printf(MSG_DEBUG,
"RADIUS DAS: <API key> match");
}
if (attr->user_name) {
num_attr++;
count = 0;
for (sta = hapd->sta_list; sta; sta = sta->next) {
u8 *identity;
size_t identity_len;
if (!sta->radius_das_match)
continue;
identity = <API key>(sta->eapol_sm,
&identity_len);
if (!identity ||
identity_len != attr->user_name_len ||
os_memcmp(identity, attr->user_name, identity_len)
!= 0)
sta->radius_das_match = 0;
else
count++;
}
if (count == 0) {
wpa_printf(MSG_DEBUG,
"RADIUS DAS: No matches remaining after User-Name check");
return NULL;
}
wpa_printf(MSG_DEBUG,
"RADIUS DAS: User-Name match");
}
if (num_attr == 0) {
/*
* In theory, we could match all current associations, but it
* seems safer to just reject requests that do not include any
* session identification attributes.
*/
wpa_printf(MSG_DEBUG,
"RADIUS DAS: No session identification attributes included");
return NULL;
}
selected = NULL;
for (sta = hapd->sta_list; sta; sta = sta->next) {
if (sta->radius_das_match) {
if (selected) {
*multi = 1;
return NULL;
}
selected = sta;
}
}
return selected;
}
static int <API key>(struct hostapd_data *hapd,
struct radius_das_attrs *attr)
{
if (!hapd->wpa_auth)
return -1;
return wpa_<API key>(hapd->wpa_auth, attr);
}
static enum radius_das_res
<API key>(void *ctx, struct radius_das_attrs *attr)
{
struct hostapd_data *hapd = ctx;
struct sta_info *sta;
int multi;
if (<API key>(hapd, attr))
return <API key>;
sta = <API key>(hapd, attr, &multi);
if (sta == NULL) {
if (multi) {
wpa_printf(MSG_DEBUG,
"RADIUS DAS: Multiple sessions match - not supported");
return <API key>;
}
if (<API key>(hapd, attr) == 0) {
wpa_printf(MSG_DEBUG,
"RADIUS DAS: PMKSA cache entry matched");
return RADIUS_DAS_SUCCESS;
}
wpa_printf(MSG_DEBUG, "RADIUS DAS: No matching session found");
return <API key>;
}
wpa_printf(MSG_DEBUG, "RADIUS DAS: Found a matching session " MACSTR
" - disconnecting", MAC2STR(sta->addr));
<API key>(hapd->wpa_auth, sta->addr);
<API key>(hapd, sta->addr,
<API key>);
<API key>(hapd, sta, <API key>);
return RADIUS_DAS_SUCCESS;
}
#endif /* CONFIG_NO_RADIUS */
/**
* hostapd_setup_bss - Per-BSS setup (initialization)
* @hapd: Pointer to BSS data
* @first: Whether this BSS is the first BSS of an interface; -1 = not first,
* but interface may exist
*
* This function is used to initialize all per-BSS data structures and
* resources. This gets called in a loop for each BSS when an interface is
* initialized. Most of the modules that are initialized here will be
* deinitialized in hostapd_cleanup().
*/
static int hostapd_setup_bss(struct hostapd_data *hapd, int first)
{
struct hostapd_bss_config *conf = hapd->conf;
u8 ssid[SSID_MAX_LEN + 1];
int ssid_len, set_ssid;
char force_ifname[IFNAMSIZ];
u8 if_addr[ETH_ALEN];
int flush_old_stations = 1;
wpa_printf(MSG_DEBUG, "%s(hapd=%p (%s), first=%d)",
__func__, hapd, conf->iface, first);
#ifdef EAP_SERVER_TNC
if (conf->tnc && tncs_global_init() < 0) {
wpa_printf(MSG_ERROR, "Failed to initialize TNCS");
return -1;
}
#endif /* EAP_SERVER_TNC */
if (hapd->started) {
wpa_printf(MSG_ERROR, "%s: Interface %s was already started",
__func__, conf->iface);
return -1;
}
hapd->started = 1;
if (!first || first == -1) {
u8 *addr = hapd->own_addr;
if (!is_zero_ether_addr(conf->bssid)) {
/* Allocate the configured BSSID. */
os_memcpy(hapd->own_addr, conf->bssid, ETH_ALEN);
if (hostapd_mac_comp(hapd->own_addr,
hapd->iface->bss[0]->own_addr) ==
0) {
wpa_printf(MSG_ERROR, "BSS '%s' may not have "
"BSSID set to the MAC address of "
"the radio", conf->iface);
return -1;
}
} else if (hapd->iconf-><API key>) {
addr = NULL;
} else {
/* Allocate the next available BSSID. */
do {
inc_byte_array(hapd->own_addr, ETH_ALEN);
} while (mac_in_conf(hapd->iconf, hapd->own_addr));
}
hapd->interface_added = 1;
if (hostapd_if_add(hapd->iface->bss[0], WPA_IF_AP_BSS,
conf->iface, addr, hapd,
&hapd->drv_priv, force_ifname, if_addr,
conf->bridge[0] ? conf->bridge : NULL,
first == -1)) {
wpa_printf(MSG_ERROR, "Failed to add BSS (BSSID="
MACSTR ")", MAC2STR(hapd->own_addr));
hapd->interface_added = 0;
return -1;
}
if (!addr)
os_memcpy(hapd->own_addr, if_addr, ETH_ALEN);
}
if (conf->wmm_enabled < 0)
conf->wmm_enabled = hapd->iconf->ieee80211n;
#ifdef CONFIG_IEEE80211R
if (is_zero_ether_addr(conf->r1_key_holder))
os_memcpy(conf->r1_key_holder, hapd->own_addr, ETH_ALEN);
#endif /* CONFIG_IEEE80211R */
#ifdef CONFIG_MESH
if (hapd->iface->mconf == NULL)
flush_old_stations = 0;
#endif /* CONFIG_MESH */
if (flush_old_stations)
<API key>(hapd,
<API key>);
hostapd_set_privacy(hapd, 0);
<API key>(hapd);
if (<API key>(conf->iface, hapd))
return -1;
/*
* Fetch the SSID from the system and use it or,
* if one was specified in the config file, verify they
* match.
*/
ssid_len = hostapd_get_ssid(hapd, ssid, sizeof(ssid));
if (ssid_len < 0) {
wpa_printf(MSG_ERROR, "Could not read SSID from system");
return -1;
}
if (conf->ssid.ssid_set) {
/*
* If SSID is specified in the config file and it differs
* from what is being used then force installation of the
* new SSID.
*/
set_ssid = (conf->ssid.ssid_len != (size_t) ssid_len ||
os_memcmp(conf->ssid.ssid, ssid, ssid_len) != 0);
} else {
/*
* No SSID in the config file; just use the one we got
* from the system.
*/
set_ssid = 0;
conf->ssid.ssid_len = ssid_len;
os_memcpy(conf->ssid.ssid, ssid, conf->ssid.ssid_len);
}
if (!hostapd_drv_none(hapd)) {
wpa_printf(MSG_ERROR, "Using interface %s with hwaddr " MACSTR
" and ssid \"%s\"",
conf->iface, MAC2STR(hapd->own_addr),
wpa_ssid_txt(conf->ssid.ssid, conf->ssid.ssid_len));
}
if (<API key>(conf)) {
wpa_printf(MSG_ERROR, "WPA-PSK setup failed.");
return -1;
}
/* Set SSID for the kernel driver (to be used in beacon and probe
* response frames) */
if (set_ssid && hostapd_set_ssid(hapd, conf->ssid.ssid,
conf->ssid.ssid_len)) {
wpa_printf(MSG_ERROR, "Could not set SSID for kernel driver");
return -1;
}
if (wpa_debug_level <= MSG_MSGDUMP)
conf->radius->msg_dumps = 1;
#ifndef CONFIG_NO_RADIUS
hapd->radius = radius_client_init(hapd, conf->radius);
if (hapd->radius == NULL) {
wpa_printf(MSG_ERROR, "RADIUS client initialization failed.");
return -1;
}
if (conf->radius_das_port) {
struct radius_das_conf das_conf;
os_memset(&das_conf, 0, sizeof(das_conf));
das_conf.port = conf->radius_das_port;
das_conf.shared_secret = conf-><API key>;
das_conf.shared_secret_len =
conf-><API key>;
das_conf.client_addr = &conf-><API key>;
das_conf.time_window = conf-><API key>;
das_conf.<API key> =
conf-><API key>;
das_conf.<API key> =
conf-><API key>;
das_conf.ctx = hapd;
das_conf.disconnect = <API key>;
hapd->radius_das = radius_das_init(&das_conf);
if (hapd->radius_das == NULL) {
wpa_printf(MSG_ERROR, "RADIUS DAS initialization "
"failed.");
return -1;
}
}
#endif /* CONFIG_NO_RADIUS */
if (hostapd_acl_init(hapd)) {
wpa_printf(MSG_ERROR, "ACL initialization failed.");
return -1;
}
if (hostapd_init_wps(hapd, conf))
return -1;
if (authsrv_init(hapd) < 0)
return -1;
if (ieee802_1x_init(hapd)) {
wpa_printf(MSG_ERROR, "IEEE 802.1X initialization failed.");
return -1;
}
if ((conf->wpa || conf->osen) && hostapd_setup_wpa(hapd))
return -1;
if (accounting_init(hapd)) {
wpa_printf(MSG_ERROR, "Accounting initialization failed.");
return -1;
}
if (conf->ieee802_11f &&
(hapd->iapp = iapp_init(hapd, conf->iapp_iface)) == NULL) {
wpa_printf(MSG_ERROR, "IEEE 802.11F (IAPP) initialization "
"failed.");
return -1;
}
#ifdef CONFIG_INTERWORKING
if (gas_serv_init(hapd)) {
wpa_printf(MSG_ERROR, "GAS server initialization failed");
return -1;
}
if (conf->qos_map_set_len &&
<API key>(hapd, conf->qos_map_set,
conf->qos_map_set_len)) {
wpa_printf(MSG_ERROR, "Failed to initialize QoS Map");
return -1;
}
#endif /* CONFIG_INTERWORKING */
if (conf-><API key> && <API key>(hapd)) {
wpa_printf(MSG_ERROR, "BSS Load initialization failed");
return -1;
}
if (conf->proxy_arp) {
if (x_snoop_init(hapd)) {
wpa_printf(MSG_ERROR,
"Generic snooping infrastructure initialization failed");
return -1;
}
if (dhcp_snoop_init(hapd)) {
wpa_printf(MSG_ERROR,
"DHCP snooping initialization failed");
return -1;
}
if (ndisc_snoop_init(hapd)) {
wpa_printf(MSG_ERROR,
"Neighbor Discovery snooping initialization failed");
return -1;
}
}
if (!hostapd_drv_none(hapd) && vlan_init(hapd)) {
wpa_printf(MSG_ERROR, "VLAN initialization failed.");
return -1;
}
if (!conf->start_disabled && <API key>(hapd) < 0)
return -1;
if (hapd->wpa_auth && wpa_init_keys(hapd->wpa_auth) < 0)
return -1;
if (hapd->driver && hapd->driver->set_operstate)
hapd->driver->set_operstate(hapd->drv_priv, 1);
return 0;
}
static void <API key>(struct hostapd_iface *iface)
{
struct hostapd_data *hapd = iface->bss[0];
int i;
struct <API key> *p;
#ifdef CONFIG_MESH
if (iface->mconf == NULL)
return;
#endif /* CONFIG_MESH */
for (i = 0; i < NUM_TX_QUEUES; i++) {
p = &iface->conf->tx_queue[i];
if (<API key>(hapd, i, p->aifs, p->cwmin,
p->cwmax, p->burst)) {
wpa_printf(MSG_DEBUG, "Failed to set TX queue "
"parameters for queue %d.", i);
/* Continue anyway */
}
}
}
static int <API key>(struct hostapd_data *hapd,
struct mac_acl_entry *mac_acl,
int n_entries, u8 accept_acl)
{
struct hostapd_acl_params *acl_params;
int i, err;
acl_params = os_zalloc(sizeof(*acl_params) +
(n_entries * sizeof(acl_params->mac_acl[0])));
if (!acl_params)
return -ENOMEM;
for (i = 0; i < n_entries; i++)
os_memcpy(acl_params->mac_acl[i].addr, mac_acl[i].addr,
ETH_ALEN);
acl_params->acl_policy = accept_acl;
acl_params->num_mac_acl = n_entries;
err = hostapd_drv_set_acl(hapd, acl_params);
os_free(acl_params);
return err;
}
static void hostapd_set_acl(struct hostapd_data *hapd)
{
struct hostapd_config *conf = hapd->iconf;
int err;
u8 accept_acl;
if (hapd->iface-><API key> == 0)
return;
if (conf->bss[0]->macaddr_acl == <API key>) {
accept_acl = 1;
err = <API key>(hapd, conf->bss[0]->accept_mac,
conf->bss[0]->num_accept_mac,
accept_acl);
if (err) {
wpa_printf(MSG_DEBUG, "Failed to set accept acl");
return;
}
} else if (conf->bss[0]->macaddr_acl == <API key>) {
accept_acl = 0;
err = <API key>(hapd, conf->bss[0]->deny_mac,
conf->bss[0]->num_deny_mac,
accept_acl);
if (err) {
wpa_printf(MSG_DEBUG, "Failed to set deny acl");
return;
}
}
}
static int <API key>(struct hostapd_data *hapd)
{
if (!hapd->iface->interfaces ||
!hapd->iface->interfaces->ctrl_iface_init)
return 0;
if (hapd->iface->interfaces->ctrl_iface_init(hapd)) {
wpa_printf(MSG_ERROR,
"Failed to setup control interface for %s",
hapd->conf->iface);
return -1;
}
return 0;
}
static int start_ctrl_iface(struct hostapd_iface *iface)
{
size_t i;
if (!iface->interfaces || !iface->interfaces->ctrl_iface_init)
return 0;
for (i = 0; i < iface->num_bss; i++) {
struct hostapd_data *hapd = iface->bss[i];
if (iface->interfaces->ctrl_iface_init(hapd)) {
wpa_printf(MSG_ERROR,
"Failed to setup control interface for %s",
hapd->conf->iface);
return -1;
}
}
return 0;
}
static void <API key>(void *eloop_ctx, void *timeout_ctx)
{
struct hostapd_iface *iface = eloop_ctx;
if (!iface->wait_channel_update) {
wpa_printf(MSG_INFO, "Channel list update timeout, but interface was not waiting for it");
return;
}
/*
* It is possible that the existing channel list is acceptable, so try
* to proceed.
*/
wpa_printf(MSG_DEBUG, "Channel list update timeout - try to continue anyway");
setup_interface2(iface);
}
void <API key>(struct hostapd_iface *iface, int initiator)
{
if (!iface->wait_channel_update || initiator != REGDOM_SET_BY_USER)
return;
wpa_printf(MSG_DEBUG, "Channel list updated - continue setup");
<API key>(<API key>, iface, NULL);
setup_interface2(iface);
}
static int setup_interface(struct hostapd_iface *iface)
{
struct hostapd_data *hapd = iface->bss[0];
size_t i;
/*
* It is possible that setup_interface() is called after the interface
* was disabled etc., in which case driver_ap_teardown is possibly set
* to 1. Clear it here so any other key/station deletion, which is not
* part of a teardown flow, would also call the relevant driver
* callbacks.
*/
iface->driver_ap_teardown = 0;
if (!iface->phy[0]) {
const char *phy = <API key>(hapd);
if (phy) {
wpa_printf(MSG_DEBUG, "phy: %s", phy);
os_strlcpy(iface->phy, phy, sizeof(iface->phy));
}
}
/*
* Make sure that all BSSes get configured with a pointer to the same
* driver interface.
*/
for (i = 1; i < iface->num_bss; i++) {
iface->bss[i]->driver = hapd->driver;
iface->bss[i]->drv_priv = hapd->drv_priv;
}
if (<API key>(iface))
return -1;
/*
* Initialize control interfaces early to allow external monitoring of
* channel setup operations that may take considerable amount of time
* especially for DFS cases.
*/
if (start_ctrl_iface(iface))
return -1;
if (hapd->iconf->country[0] && hapd->iconf->country[1]) {
char country[4], previous_country[4];
hostapd_set_state(iface, <API key>);
if (hostapd_get_country(hapd, previous_country) < 0)
previous_country[0] = '\0';
os_memcpy(country, hapd->iconf->country, 3);
country[3] = '\0';
if (hostapd_set_country(hapd, country) < 0) {
wpa_printf(MSG_ERROR, "Failed to set country code");
return -1;
}
wpa_printf(MSG_DEBUG, "Previous country code %s, new country code %s",
previous_country, country);
if (os_strncmp(previous_country, country, 2) != 0) {
wpa_printf(MSG_DEBUG, "Continue interface setup after channel list update");
iface->wait_channel_update = 1;
<API key>(5, 0,
<API key>,
iface, NULL);
return 0;
}
}
return setup_interface2(iface);
}
static int setup_interface2(struct hostapd_iface *iface)
{
iface->wait_channel_update = 0;
if (<API key>(iface)) {
/* Not all drivers support this yet, so continue without hw
* feature data. */
} else {
int ret = <API key>(iface);
if (ret < 0) {
wpa_printf(MSG_ERROR, "Could not select hw_mode and "
"channel. (%d)", ret);
goto fail;
}
if (ret == 1) {
wpa_printf(MSG_DEBUG, "Interface initialization will be completed in a callback (ACS)");
return 0;
}
ret = <API key>(iface);
if (ret < 0)
goto fail;
if (ret == 1) {
wpa_printf(MSG_DEBUG, "Interface initialization will "
"be completed in a callback");
return 0;
}
if (iface->conf->ieee80211h)
wpa_printf(MSG_DEBUG, "DFS support is enabled");
}
return <API key>(iface, 0);
fail:
hostapd_set_state(iface, HAPD_IFACE_DISABLED);
wpa_msg(iface->bss[0]->msg_ctx, MSG_INFO, AP_EVENT_DISABLED);
if (iface->interfaces && iface->interfaces->terminate_on_error)
eloop_terminate();
return -1;
}
#ifdef CONFIG_FST
static const u8 * <API key>(void *ctx)
{
struct hostapd_data *hapd = ctx;
return hapd->own_addr;
}
static void <API key>(void *ctx,
enum hostapd_hw_mode *hw_mode,
u8 *channel)
{
struct hostapd_data *hapd = ctx;
*hw_mode = <API key>(hapd->iface->freq, channel);
}
static void <API key>(void *ctx, const struct wpabuf *fst_ies)
{
struct hostapd_data *hapd = ctx;
if (hapd->iface->fst_ies != fst_ies) {
hapd->iface->fst_ies = fst_ies;
if (<API key>(hapd))
wpa_printf(MSG_WARNING, "FST: Cannot set beacon");
}
}
static int <API key>(void *ctx, const u8 *da,
struct wpabuf *buf)
{
struct hostapd_data *hapd = ctx;
return <API key>(hapd, hapd->iface->freq, 0, da,
wpabuf_head(buf), wpabuf_len(buf));
}
static const struct wpabuf * <API key>(void *ctx, const u8 *addr)
{
struct hostapd_data *hapd = ctx;
struct sta_info *sta = ap_get_sta(hapd, addr);
return sta ? sta->mb_ies : NULL;
}
static void <API key>(void *ctx, const u8 *addr,
const u8 *buf, size_t size)
{
struct hostapd_data *hapd = ctx;
struct sta_info *sta = ap_get_sta(hapd, addr);
if (sta) {
struct mb_ies_info info;
if (!mb_ies_info_by_ies(&info, buf, size)) {
wpabuf_free(sta->mb_ies);
sta->mb_ies = mb_ies_by_info(&info);
}
}
}
static const u8 * fst_hostapd_get_sta(struct fst_get_peer_ctx **get_ctx,
Boolean mb_only)
{
struct sta_info *s = (struct sta_info *) *get_ctx;
if (mb_only) {
for (; s && !s->mb_ies; s = s->next)
;
}
if (s) {
*get_ctx = (struct fst_get_peer_ctx *) s->next;
return s->addr;
}
*get_ctx = NULL;
return NULL;
}
static const u8 * <API key>(void *ctx,
struct fst_get_peer_ctx **get_ctx,
Boolean mb_only)
{
struct hostapd_data *hapd = ctx;
*get_ctx = (struct fst_get_peer_ctx *) hapd->sta_list;
return fst_hostapd_get_sta(get_ctx, mb_only);
}
static const u8 * <API key>(void *ctx,
struct fst_get_peer_ctx **get_ctx,
Boolean mb_only)
{
return fst_hostapd_get_sta(get_ctx, mb_only);
}
void <API key>(struct hostapd_data *hapd,
struct fst_wpa_obj *iface_obj)
{
iface_obj->ctx = hapd;
iface_obj->get_bssid = <API key>;
iface_obj->get_channel_info = <API key>;
iface_obj->set_ies = <API key>;
iface_obj->send_action = <API key>;
iface_obj->get_mb_ie = <API key>;
iface_obj->update_mb_ie = <API key>;
iface_obj->get_peer_first = <API key>;
iface_obj->get_peer_next = <API key>;
}
#endif /* CONFIG_FST */
#ifdef NEED_AP_MLME
static enum nr_chan_width <API key>(struct hostapd_data *hapd,
int ht, int vht)
{
if (!ht && !vht)
return NR_CHAN_WIDTH_20;
if (!hapd->iconf->secondary_channel)
return NR_CHAN_WIDTH_20;
if (!vht || hapd->iconf->vht_oper_chwidth == <API key>)
return NR_CHAN_WIDTH_40;
if (hapd->iconf->vht_oper_chwidth == VHT_CHANWIDTH_80MHZ)
return NR_CHAN_WIDTH_80;
if (hapd->iconf->vht_oper_chwidth == <API key>)
return NR_CHAN_WIDTH_160;
if (hapd->iconf->vht_oper_chwidth == <API key>)
return NR_CHAN_WIDTH_80P80;
return NR_CHAN_WIDTH_20;
}
#endif /* NEED_AP_MLME */
static void <API key>(struct hostapd_data *hapd)
{
#ifdef NEED_AP_MLME
u16 capab = <API key>(hapd);
int ht = hapd->iconf->ieee80211n && !hapd->conf->disable_11n;
int vht = hapd->iconf->ieee80211ac && !hapd->conf->disable_11ac;
struct wpa_ssid_value ssid;
u8 channel, op_class;
int center_freq1 = 0, center_freq2 = 0;
enum nr_chan_width width;
u32 bssid_info;
struct wpabuf *nr;
if (!(hapd->conf->radio_measurements[0] &
<API key>))
return;
bssid_info = 3; /* AP is reachable */
bssid_info |= <API key>; /* "same as the AP" */
bssid_info |= <API key>; /* "same as the AP" */
if (capab & <API key>)
bssid_info |= <API key>;
bssid_info |= <API key>; /* RRM is supported */
if (hapd->conf->wmm_enabled) {
bssid_info |= <API key>;
if (hapd->conf->wmm_uapsd &&
(hapd->iface->drv_flags & <API key>))
bssid_info |= <API key>;
}
if (ht) {
bssid_info |= <API key> |
<API key>;
/* VHT bit added in IEEE P802.11-REVmc/D4.3 */
if (vht)
bssid_info |= <API key>;
}
/* TODO: Set <API key> if MDE is set */
<API key>(hapd->iface->freq,
hapd->iconf->secondary_channel,
hapd->iconf->vht_oper_chwidth,
&op_class, &channel);
width = <API key>(hapd, ht, vht);
if (vht) {
center_freq1 = <API key>(
NULL, op_class,
hapd->iconf-><API key>);
if (width == NR_CHAN_WIDTH_80P80)
center_freq2 = <API key>(
NULL, op_class,
hapd->iconf-><API key>);
} else if (ht) {
center_freq1 = hapd->iface->freq +
10 * hapd->iconf->secondary_channel;
}
ssid.ssid_len = hapd->conf->ssid.ssid_len;
os_memcpy(ssid.ssid, hapd->conf->ssid.ssid, ssid.ssid_len);
/*
* Neighbor Report element size = BSSID + BSSID info + op_class + chan +
* phy type + wide bandwidth channel subelement.
*/
nr = wpabuf_alloc(ETH_ALEN + 4 + 1 + 1 + 1 + 5);
if (!nr)
return;
wpabuf_put_data(nr, hapd->own_addr, ETH_ALEN);
wpabuf_put_le32(nr, bssid_info);
wpabuf_put_u8(nr, op_class);
wpabuf_put_u8(nr, channel);
wpabuf_put_u8(nr, <API key>(hapd->iface->freq, ht, vht));
/*
* Wide Bandwidth Channel subelement may be needed to allow the
* receiving STA to send packets to the AP. See IEEE P802.11-REVmc/D5.0
* Figure 9-301.
*/
wpabuf_put_u8(nr, <API key>);
wpabuf_put_u8(nr, 3);
wpabuf_put_u8(nr, width);
wpabuf_put_u8(nr, center_freq1);
wpabuf_put_u8(nr, center_freq2);
<API key>(hapd, hapd->own_addr, &ssid, nr, hapd->iconf->lci,
hapd->iconf->civic);
wpabuf_free(nr);
#endif /* NEED_AP_MLME */
}
static int <API key>(struct hostapd_iface *iface,
int err)
{
struct hostapd_data *hapd = iface->bss[0];
size_t j;
u8 *prev_addr;
int delay_apply_cfg = 0;
int res_dfs_offload = 0;
if (err)
goto fail;
wpa_printf(MSG_DEBUG, "Completing interface initialization");
if (iface->conf->channel) {
#ifdef NEED_AP_MLME
int res;
#endif /* NEED_AP_MLME */
iface->freq = hostapd_hw_get_freq(hapd, iface->conf->channel);
wpa_printf(MSG_DEBUG, "Mode: %s Channel: %d "
"Frequency: %d MHz",
hostapd_hw_mode_txt(iface->conf->hw_mode),
iface->conf->channel, iface->freq);
#ifdef NEED_AP_MLME
/* Handle DFS only if it is not offloaded to the driver */
if (!(iface->drv_flags & <API key>)) {
/* Check DFS */
res = hostapd_handle_dfs(iface);
if (res <= 0) {
if (res < 0)
goto fail;
return res;
}
} else {
/* If DFS is offloaded to the driver */
res_dfs_offload = <API key>(iface);
if (res_dfs_offload <= 0) {
if (res_dfs_offload < 0)
goto fail;
} else {
wpa_printf(MSG_DEBUG,
"Proceed with AP/channel setup");
/*
* If this is a DFS channel, move to completing
* AP setup.
*/
if (res_dfs_offload == 1)
goto dfs_offload;
/* Otherwise fall through. */
}
}
#endif /* NEED_AP_MLME */
#ifdef CONFIG_MESH
if (iface->mconf != NULL) {
wpa_printf(MSG_DEBUG,
"%s: Mesh configuration will be applied while joining the mesh network",
iface->bss[0]->conf->iface);
delay_apply_cfg = 1;
}
#endif /* CONFIG_MESH */
if (!delay_apply_cfg &&
hostapd_set_freq(hapd, hapd->iconf->hw_mode, iface->freq,
hapd->iconf->channel,
hapd->iconf->ieee80211n,
hapd->iconf->ieee80211ac,
hapd->iconf->secondary_channel,
hapd->iconf->vht_oper_chwidth,
hapd->iconf-><API key>,
hapd->iconf-><API key>)) {
wpa_printf(MSG_ERROR, "Could not set channel for "
"kernel driver");
goto fail;
}
}
if (iface->current_mode) {
if (<API key>(iface, iface->current_mode)) {
wpa_printf(MSG_ERROR, "Failed to prepare rates "
"table.");
hostapd_logger(hapd, NULL, <API key>,
<API key>,
"Failed to prepare rates table.");
goto fail;
}
}
if (hapd->iconf->rts_threshold > -1 &&
hostapd_set_rts(hapd, hapd->iconf->rts_threshold)) {
wpa_printf(MSG_ERROR, "Could not set RTS threshold for "
"kernel driver");
goto fail;
}
if (hapd->iconf->fragm_threshold > -1 &&
hostapd_set_frag(hapd, hapd->iconf->fragm_threshold)) {
wpa_printf(MSG_ERROR, "Could not set fragmentation threshold "
"for kernel driver");
goto fail;
}
prev_addr = hapd->own_addr;
for (j = 0; j < iface->num_bss; j++) {
hapd = iface->bss[j];
if (j)
os_memcpy(hapd->own_addr, prev_addr, ETH_ALEN);
if (hostapd_setup_bss(hapd, j == 0)) {
do {
hapd = iface->bss[j];
<API key>(hapd);
<API key>(hapd);
} while (j
goto fail;
}
if (is_zero_ether_addr(hapd->conf->bssid))
prev_addr = hapd->own_addr;
}
hapd = iface->bss[0];
<API key>(iface);
ap_list_init(iface);
hostapd_set_acl(hapd);
if (<API key>(hapd) < 0) {
wpa_printf(MSG_ERROR, "%s: Failed to commit driver "
"configuration", __func__);
goto fail;
}
/*
* WPS UPnP module can be initialized only when the "upnp_iface" is up.
* If "interface" and "upnp_iface" are the same (e.g., non-bridge
* mode), the interface is up only after driver_commit, so initialize
* WPS after driver_commit.
*/
for (j = 0; j < iface->num_bss; j++) {
if (<API key>(iface->bss[j]))
goto fail;
}
if ((iface->drv_flags & <API key>) &&
!res_dfs_offload) {
/*
* If freq is DFS, and DFS is offloaded to the driver, then wait
* for CAC to complete.
*/
wpa_printf(MSG_DEBUG, "%s: Wait for CAC to complete", __func__);
return res_dfs_offload;
}
#ifdef NEED_AP_MLME
dfs_offload:
#endif /* NEED_AP_MLME */
#ifdef CONFIG_FST
if (hapd->iconf->fst_cfg.group_id[0]) {
struct fst_wpa_obj iface_obj;
<API key>(hapd, &iface_obj);
iface->fst = fst_attach(hapd->conf->iface, hapd->own_addr,
&iface_obj, &hapd->iconf->fst_cfg);
if (!iface->fst) {
wpa_printf(MSG_ERROR, "Could not attach to FST %s",
hapd->iconf->fst_cfg.group_id);
goto fail;
}
}
#endif /* CONFIG_FST */
hostapd_set_state(iface, HAPD_IFACE_ENABLED);
wpa_msg(iface->bss[0]->msg_ctx, MSG_INFO, AP_EVENT_ENABLED);
if (hapd->setup_complete_cb)
hapd->setup_complete_cb(hapd-><API key>);
wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
iface->bss[0]->conf->iface);
if (iface->interfaces && iface->interfaces->terminate_on_error > 0)
iface->interfaces->terminate_on_error
for (j = 0; j < iface->num_bss; j++)
<API key>(iface->bss[j]);
return 0;
fail:
wpa_printf(MSG_ERROR, "Interface initialization failed");
hostapd_set_state(iface, HAPD_IFACE_DISABLED);
wpa_msg(hapd->msg_ctx, MSG_INFO, AP_EVENT_DISABLED);
#ifdef CONFIG_FST
if (iface->fst) {
fst_detach(iface->fst);
iface->fst = NULL;
}
#endif /* CONFIG_FST */
if (iface->interfaces && iface->interfaces->terminate_on_error)
eloop_terminate();
return -1;
}
/**
* <API key> - Complete interface setup
*
* This function is called when previous steps in the interface setup has been
* completed. This can also start operations, e.g., DFS, that will require
* additional processing before interface is ready to be enabled. Such
* operations will call this function from eloop callbacks when finished.
*/
int <API key>(struct hostapd_iface *iface, int err)
{
struct hapd_interfaces *interfaces = iface->interfaces;
struct hostapd_data *hapd = iface->bss[0];
unsigned int i;
int <API key> = 0;
if (!iface-><API key>)
return <API key>(iface, err);
if (err) {
wpa_printf(MSG_ERROR, "Interface initialization failed");
hostapd_set_state(iface, HAPD_IFACE_DISABLED);
iface-><API key> = 0;
wpa_msg(hapd->msg_ctx, MSG_INFO, AP_EVENT_DISABLED);
if (interfaces && interfaces->terminate_on_error)
eloop_terminate();
return -1;
}
if (iface-><API key>) {
/* Already in ready and waiting. should never happpen */
return 0;
}
for (i = 0; i < interfaces->count; i++) {
if (interfaces->iface[i]-><API key> &&
!interfaces->iface[i]-><API key>)
<API key>++;
}
/*
* Check if this is the last interface, if yes then start all the other
* waiting interfaces. If not, add this interface to the waiting list.
*/
if (<API key> > 1 && iface->state == HAPD_IFACE_DFS) {
/*
* If this interface went through CAC, do not synchronize, just
* start immediately.
*/
iface-><API key> = 0;
wpa_printf(MSG_INFO,
"%s: Finished CAC - bypass sync and start interface",
iface->bss[0]->conf->iface);
return <API key>(iface, err);
}
if (<API key> > 1) {
/* need to wait as there are other interfaces still coming up */
iface-><API key> = 1;
wpa_printf(MSG_INFO,
"%s: Interface waiting to sync with other interfaces",
iface->bss[0]->conf->iface);
return 0;
}
wpa_printf(MSG_INFO,
"%s: Last interface to sync - starting all interfaces",
iface->bss[0]->conf->iface);
iface-><API key> = 0;
<API key>(iface, err);
for (i = 0; i < interfaces->count; i++) {
if (interfaces->iface[i]-><API key> &&
interfaces->iface[i]-><API key>) {
<API key>(
interfaces->iface[i], 0);
/* Only once the interfaces are sync started */
interfaces->iface[i]-><API key> = 0;
}
}
return 0;
}
/**
* <API key> - Setup of an interface
* @iface: Pointer to interface data.
* Returns: 0 on success, -1 on failure
*
* Initializes the driver interface, validates the configuration,
* and sets driver parameters based on the configuration.
* Flushes old stations, sets the channel, encryption,
* beacons, and WDS links based on the configuration.
*
* If interface setup requires more time, e.g., to perform HT co-ex scans, ACS,
* or DFS operations, this function returns 0 before such operations have been
* completed. The pending operations are registered into eloop and will be
* completed from eloop callbacks. Those callbacks end up calling
* <API key>() once setup has been completed.
*/
int <API key>(struct hostapd_iface *iface)
{
int ret;
ret = setup_interface(iface);
if (ret) {
wpa_printf(MSG_ERROR, "%s: Unable to setup interface.",
iface->bss[0]->conf->iface);
return -1;
}
return 0;
}
/**
* <API key> - Allocate and initialize per-BSS data
* @hapd_iface: Pointer to interface data
* @conf: Pointer to per-interface configuration
* @bss: Pointer to per-BSS configuration for this BSS
* Returns: Pointer to allocated BSS data
*
* This function is used to allocate per-BSS data structure. This data will be
* freed after hostapd_cleanup() is called for it during interface
* deinitialization.
*/
struct hostapd_data *
<API key>(struct hostapd_iface *hapd_iface,
struct hostapd_config *conf,
struct hostapd_bss_config *bss)
{
struct hostapd_data *hapd;
hapd = os_zalloc(sizeof(*hapd));
if (hapd == NULL)
return NULL;
hapd->new_assoc_sta_cb = <API key>;
hapd->iconf = conf;
hapd->conf = bss;
hapd->iface = hapd_iface;
hapd->driver = hapd->iconf->driver;
hapd->ctrl_sock = -1;
dl_list_init(&hapd->ctrl_dst);
dl_list_init(&hapd->nr_db);
return hapd;
}
static void hostapd_bss_deinit(struct hostapd_data *hapd)
{
if (!hapd)
return;
wpa_printf(MSG_DEBUG, "%s: deinit bss %s", __func__,
hapd->conf->iface);
<API key>(hapd);
wpa_msg(hapd->msg_ctx, MSG_INFO, AP_EVENT_DISABLED);
hostapd_cleanup(hapd);
}
void <API key>(struct hostapd_iface *iface)
{
int j;
wpa_printf(MSG_DEBUG, "%s(%p)", __func__, iface);
if (iface == NULL)
return;
hostapd_set_state(iface, HAPD_IFACE_DISABLED);
#ifdef CONFIG_IEEE80211N
#ifdef NEED_AP_MLME
<API key>(iface);
<API key>(ap_ht2040_timeout, iface, NULL);
#endif /* NEED_AP_MLME */
#endif /* CONFIG_IEEE80211N */
<API key>(<API key>, iface, NULL);
iface->wait_channel_update = 0;
#ifdef CONFIG_FST
if (iface->fst) {
fst_detach(iface->fst);
iface->fst = NULL;
}
#endif /* CONFIG_FST */
for (j = iface->num_bss - 1; j >= 0; j
if (!iface->bss)
break;
hostapd_bss_deinit(iface->bss[j]);
}
}
void <API key>(struct hostapd_iface *iface)
{
size_t j;
wpa_printf(MSG_DEBUG, "%s(%p)", __func__, iface);
for (j = 0; j < iface->num_bss; j++) {
if (!iface->bss)
break;
wpa_printf(MSG_DEBUG, "%s: free hapd %p",
__func__, iface->bss[j]);
os_free(iface->bss[j]);
}
<API key>(iface);
}
struct hostapd_iface * hostapd_alloc_iface(void)
{
struct hostapd_iface *hapd_iface;
hapd_iface = os_zalloc(sizeof(*hapd_iface));
if (!hapd_iface)
return NULL;
dl_list_init(&hapd_iface->sta_seen);
return hapd_iface;
}
/**
* hostapd_init - Allocate and initialize per-interface data
* @config_file: Path to the configuration file
* Returns: Pointer to the allocated interface data or %NULL on failure
*
* This function is used to allocate main data structures for per-interface
* data. The allocated data buffer will be freed by calling
* <API key>().
*/
struct hostapd_iface * hostapd_init(struct hapd_interfaces *interfaces,
const char *config_file)
{
struct hostapd_iface *hapd_iface = NULL;
struct hostapd_config *conf = NULL;
struct hostapd_data *hapd;
size_t i;
hapd_iface = hostapd_alloc_iface();
if (hapd_iface == NULL)
goto fail;
hapd_iface->config_fname = os_strdup(config_file);
if (hapd_iface->config_fname == NULL)
goto fail;
conf = interfaces->config_read_cb(hapd_iface->config_fname);
if (conf == NULL)
goto fail;
hapd_iface->conf = conf;
hapd_iface->num_bss = conf->num_bss;
hapd_iface->bss = os_calloc(conf->num_bss,
sizeof(struct hostapd_data *));
if (hapd_iface->bss == NULL)
goto fail;
for (i = 0; i < conf->num_bss; i++) {
hapd = hapd_iface->bss[i] =
<API key>(hapd_iface, conf,
conf->bss[i]);
if (hapd == NULL)
goto fail;
hapd->msg_ctx = hapd;
}
#ifdef CONFIG_KARMA_ATTACK
g_hapd_data = hapd_iface->bss[0];
#endif
return hapd_iface;
fail:
wpa_printf(MSG_ERROR, "Failed to set up interface with %s",
config_file);
if (conf)
hostapd_config_free(conf);
if (hapd_iface) {
os_free(hapd_iface->config_fname);
os_free(hapd_iface->bss);
wpa_printf(MSG_DEBUG, "%s: free iface %p",
__func__, hapd_iface);
os_free(hapd_iface);
}
return NULL;
}
static int ifname_in_use(struct hapd_interfaces *interfaces, const char *ifname)
{
size_t i, j;
for (i = 0; i < interfaces->count; i++) {
struct hostapd_iface *iface = interfaces->iface[i];
for (j = 0; j < iface->num_bss; j++) {
struct hostapd_data *hapd = iface->bss[j];
if (os_strcmp(ifname, hapd->conf->iface) == 0)
return 1;
}
}
return 0;
}
/**
* <API key> - Read configuration file and init BSS data
*
* This function is used to parse configuration file for a BSS. This BSS is
* added to an existing interface sharing the same radio (if any) or a new
* interface is created if this is the first interface on a radio. This
* allocate memory for the BSS. No actual driver operations are started.
*
* This is similar to <API key>(), but for a case where the
* configuration is used to add a single BSS instead of all BSSes for a radio.
*/
struct hostapd_iface *
<API key>(struct hapd_interfaces *interfaces, const char *phy,
const char *config_fname, int debug)
{
struct hostapd_iface *new_iface = NULL, *iface = NULL;
struct hostapd_data *hapd;
int k;
size_t i, bss_idx;
if (!phy || !*phy)
return NULL;
for (i = 0; i < interfaces->count; i++) {
if (os_strcmp(interfaces->iface[i]->phy, phy) == 0) {
iface = interfaces->iface[i];
break;
}
}
wpa_printf(MSG_INFO, "Configuration file: %s (phy %s)%s",
config_fname, phy, iface ? "" : " --> new PHY");
if (iface) {
struct hostapd_config *conf;
struct hostapd_bss_config **tmp_conf;
struct hostapd_data **tmp_bss;
struct hostapd_bss_config *bss;
const char *ifname;
/* Add new BSS to existing iface */
conf = interfaces->config_read_cb(config_fname);
if (conf == NULL)
return NULL;
if (conf->num_bss > 1) {
wpa_printf(MSG_ERROR, "Multiple BSSes specified in BSS-config");
hostapd_config_free(conf);
return NULL;
}
ifname = conf->bss[0]->iface;
if (ifname[0] != '\0' && ifname_in_use(interfaces, ifname)) {
wpa_printf(MSG_ERROR,
"Interface name %s already in use", ifname);
hostapd_config_free(conf);
return NULL;
}
tmp_conf = os_realloc_array(
iface->conf->bss, iface->conf->num_bss + 1,
sizeof(struct hostapd_bss_config *));
tmp_bss = os_realloc_array(iface->bss, iface->num_bss + 1,
sizeof(struct hostapd_data *));
if (tmp_bss)
iface->bss = tmp_bss;
if (tmp_conf) {
iface->conf->bss = tmp_conf;
iface->conf->last_bss = tmp_conf[0];
}
if (tmp_bss == NULL || tmp_conf == NULL) {
hostapd_config_free(conf);
return NULL;
}
bss = iface->conf->bss[iface->conf->num_bss] = conf->bss[0];
iface->conf->num_bss++;
hapd = <API key>(iface, iface->conf, bss);
if (hapd == NULL) {
iface->conf->num_bss
hostapd_config_free(conf);
return NULL;
}
iface->conf->last_bss = bss;
iface->bss[iface->num_bss] = hapd;
hapd->msg_ctx = hapd;
bss_idx = iface->num_bss++;
conf->num_bss
conf->bss[0] = NULL;
hostapd_config_free(conf);
} else {
/* Add a new iface with the first BSS */
new_iface = iface = hostapd_init(interfaces, config_fname);
if (!iface)
return NULL;
os_strlcpy(iface->phy, phy, sizeof(iface->phy));
iface->interfaces = interfaces;
bss_idx = 0;
}
for (k = 0; k < debug; k++) {
if (iface->bss[bss_idx]->conf->logger_stdout_level > 0)
iface->bss[bss_idx]->conf->logger_stdout_level
}
if (iface->conf->bss[bss_idx]->iface[0] == '\0' &&
!hostapd_drv_none(iface->bss[bss_idx])) {
wpa_printf(MSG_ERROR, "Interface name not specified in %s",
config_fname);
if (new_iface)
<API key>(new_iface);
return NULL;
}
return iface;
}
void <API key>(struct hostapd_iface *iface)
{
const struct wpa_driver_ops *driver;
void *drv_priv;
wpa_printf(MSG_DEBUG, "%s(%p)", __func__, iface);
if (iface == NULL)
return;
wpa_printf(MSG_DEBUG, "%s: num_bss=%u conf->num_bss=%u",
__func__, (unsigned int) iface->num_bss,
(unsigned int) iface->conf->num_bss);
driver = iface->bss[0]->driver;
drv_priv = iface->bss[0]->drv_priv;
<API key>(iface);
wpa_printf(MSG_DEBUG, "%s: driver=%p drv_priv=%p -> hapd_deinit",
__func__, driver, drv_priv);
if (driver && driver->hapd_deinit && drv_priv) {
driver->hapd_deinit(drv_priv);
iface->bss[0]->drv_priv = NULL;
}
<API key>(iface);
}
static void <API key>(const struct wpa_driver_ops *driver,
void *drv_priv,
struct hostapd_iface *hapd_iface)
{
size_t j;
wpa_printf(MSG_DEBUG, "%s: driver=%p drv_priv=%p -> hapd_deinit",
__func__, driver, drv_priv);
if (driver && driver->hapd_deinit && drv_priv) {
driver->hapd_deinit(drv_priv);
for (j = 0; j < hapd_iface->num_bss; j++) {
wpa_printf(MSG_DEBUG, "%s:bss[%d]->drv_priv=%p",
__func__, (int) j,
hapd_iface->bss[j]->drv_priv);
if (hapd_iface->bss[j]->drv_priv == drv_priv)
hapd_iface->bss[j]->drv_priv = NULL;
}
}
}
int <API key>(struct hostapd_iface *hapd_iface)
{
size_t j;
if (hapd_iface->bss[0]->drv_priv != NULL) {
wpa_printf(MSG_ERROR, "Interface %s already enabled",
hapd_iface->conf->bss[0]->iface);
return -1;
}
wpa_printf(MSG_DEBUG, "Enable interface %s",
hapd_iface->conf->bss[0]->iface);
for (j = 0; j < hapd_iface->num_bss; j++)
<API key>(hapd_iface->conf->bss[j], 1);
if (<API key>(hapd_iface->conf, 1) < 0) {
wpa_printf(MSG_INFO, "Invalid configuration - cannot enable");
return -1;
}
if (hapd_iface->interfaces == NULL ||
hapd_iface->interfaces->driver_init == NULL ||
hapd_iface->interfaces->driver_init(hapd_iface))
return -1;
if (<API key>(hapd_iface)) {
<API key>(hapd_iface->bss[0]->driver,
hapd_iface->bss[0]->drv_priv,
hapd_iface);
return -1;
}
return 0;
}
int <API key>(struct hostapd_iface *hapd_iface)
{
size_t j;
wpa_printf(MSG_DEBUG, "Reload interface %s",
hapd_iface->conf->bss[0]->iface);
for (j = 0; j < hapd_iface->num_bss; j++)
<API key>(hapd_iface->conf->bss[j], 1);
if (<API key>(hapd_iface->conf, 1) < 0) {
wpa_printf(MSG_ERROR, "Updated configuration is invalid");
return -1;
}
hostapd_clear_old(hapd_iface);
for (j = 0; j < hapd_iface->num_bss; j++)
hostapd_reload_bss(hapd_iface->bss[j]);
return 0;
}
int <API key>(struct hostapd_iface *hapd_iface)
{
size_t j;
const struct wpa_driver_ops *driver;
void *drv_priv;
if (hapd_iface == NULL)
return -1;
if (hapd_iface->bss[0]->drv_priv == NULL) {
wpa_printf(MSG_INFO, "Interface %s already disabled",
hapd_iface->conf->bss[0]->iface);
return -1;
}
wpa_msg(hapd_iface->bss[0]->msg_ctx, MSG_INFO, AP_EVENT_DISABLED);
driver = hapd_iface->bss[0]->driver;
drv_priv = hapd_iface->bss[0]->drv_priv;
hapd_iface->driver_ap_teardown =
!!(hapd_iface->drv_flags &
<API key>);
/* same as <API key> without deinitializing ctrl-iface */
for (j = 0; j < hapd_iface->num_bss; j++) {
struct hostapd_data *hapd = hapd_iface->bss[j];
<API key>(hapd);
<API key>(hapd);
}
<API key>(driver, drv_priv, hapd_iface);
/* From <API key>: These were initialized in
* <API key> and <API key>
*/
<API key>(hapd_iface);
wpa_printf(MSG_DEBUG, "Interface %s disabled",
hapd_iface->bss[0]->conf->iface);
hostapd_set_state(hapd_iface, HAPD_IFACE_DISABLED);
return 0;
}
static struct hostapd_iface *
hostapd_iface_alloc(struct hapd_interfaces *interfaces)
{
struct hostapd_iface **iface, *hapd_iface;
iface = os_realloc_array(interfaces->iface, interfaces->count + 1,
sizeof(struct hostapd_iface *));
if (iface == NULL)
return NULL;
interfaces->iface = iface;
hapd_iface = interfaces->iface[interfaces->count] =
hostapd_alloc_iface();
if (hapd_iface == NULL) {
wpa_printf(MSG_ERROR, "%s: Failed to allocate memory for "
"the interface", __func__);
return NULL;
}
interfaces->count++;
hapd_iface->interfaces = interfaces;
return hapd_iface;
}
static struct hostapd_config *
<API key>(struct hapd_interfaces *interfaces, const char *ifname,
const char *ctrl_iface, const char *driver)
{
struct hostapd_bss_config *bss;
struct hostapd_config *conf;
/* Allocates memory for bss and conf */
conf = <API key>();
if (conf == NULL) {
wpa_printf(MSG_ERROR, "%s: Failed to allocate memory for "
"configuration", __func__);
return NULL;
}
if (driver) {
int j;
for (j = 0; wpa_drivers[j]; j++) {
if (os_strcmp(driver, wpa_drivers[j]->name) == 0) {
conf->driver = wpa_drivers[j];
goto skip;
}
}
wpa_printf(MSG_ERROR,
"Invalid/unknown driver '%s' - registering the default driver",
driver);
}
conf->driver = wpa_drivers[0];
if (conf->driver == NULL) {
wpa_printf(MSG_ERROR, "No driver wrappers registered!");
hostapd_config_free(conf);
return NULL;
}
skip:
bss = conf->last_bss = conf->bss[0];
os_strlcpy(bss->iface, ifname, sizeof(bss->iface));
bss->ctrl_interface = os_strdup(ctrl_iface);
if (bss->ctrl_interface == NULL) {
hostapd_config_free(conf);
return NULL;
}
/* Reading configuration file skipped, will be done in SET!
* From reading the configuration till the end has to be done in
* SET
*/
return conf;
}
static int hostapd_data_alloc(struct hostapd_iface *hapd_iface,
struct hostapd_config *conf)
{
size_t i;
struct hostapd_data *hapd;
hapd_iface->bss = os_calloc(conf->num_bss,
sizeof(struct hostapd_data *));
if (hapd_iface->bss == NULL)
return -1;
for (i = 0; i < conf->num_bss; i++) {
hapd = hapd_iface->bss[i] =
<API key>(hapd_iface, conf, conf->bss[i]);
if (hapd == NULL) {
while (i > 0) {
i
os_free(hapd_iface->bss[i]);
hapd_iface->bss[i] = NULL;
}
os_free(hapd_iface->bss);
hapd_iface->bss = NULL;
return -1;
}
hapd->msg_ctx = hapd;
}
hapd_iface->conf = conf;
hapd_iface->num_bss = conf->num_bss;
return 0;
}
int hostapd_add_iface(struct hapd_interfaces *interfaces, char *buf)
{
struct hostapd_config *conf = NULL;
struct hostapd_iface *hapd_iface = NULL, *new_iface = NULL;
struct hostapd_data *hapd;
char *ptr;
size_t i, j;
const char *conf_file = NULL, *phy_name = NULL;
if (os_strncmp(buf, "bss_config=", 11) == 0) {
char *pos;
phy_name = buf + 11;
pos = os_strchr(phy_name, ':');
if (!pos)
return -1;
*pos++ = '\0';
conf_file = pos;
if (!os_strlen(conf_file))
return -1;
hapd_iface = <API key>(interfaces, phy_name,
conf_file, 0);
if (!hapd_iface)
return -1;
for (j = 0; j < interfaces->count; j++) {
if (interfaces->iface[j] == hapd_iface)
break;
}
if (j == interfaces->count) {
struct hostapd_iface **tmp;
tmp = os_realloc_array(interfaces->iface,
interfaces->count + 1,
sizeof(struct hostapd_iface *));
if (!tmp) {
<API key>(hapd_iface);
return -1;
}
interfaces->iface = tmp;
interfaces->iface[interfaces->count++] = hapd_iface;
new_iface = hapd_iface;
}
if (new_iface) {
if (interfaces->driver_init(hapd_iface))
goto fail;
if (<API key>(hapd_iface)) {
<API key>(
hapd_iface->bss[0]->driver,
hapd_iface->bss[0]->drv_priv,
hapd_iface);
goto fail;
}
} else {
/* Assign new BSS with bss[0]'s driver info */
hapd = hapd_iface->bss[hapd_iface->num_bss - 1];
hapd->driver = hapd_iface->bss[0]->driver;
hapd->drv_priv = hapd_iface->bss[0]->drv_priv;
os_memcpy(hapd->own_addr, hapd_iface->bss[0]->own_addr,
ETH_ALEN);
if (<API key>(hapd) < 0 ||
(hapd_iface->state == HAPD_IFACE_ENABLED &&
hostapd_setup_bss(hapd, -1))) {
hostapd_cleanup(hapd);
hapd_iface->bss[hapd_iface->num_bss - 1] = NULL;
hapd_iface->conf->num_bss
hapd_iface->num_bss
wpa_printf(MSG_DEBUG, "%s: free hapd %p %s",
__func__, hapd, hapd->conf->iface);
<API key>(hapd->conf);
hapd->conf = NULL;
os_free(hapd);
return -1;
}
}
return 0;
}
ptr = os_strchr(buf, ' ');
if (ptr == NULL)
return -1;
*ptr++ = '\0';
if (os_strncmp(ptr, "config=", 7) == 0)
conf_file = ptr + 7;
for (i = 0; i < interfaces->count; i++) {
if (!os_strcmp(interfaces->iface[i]->conf->bss[0]->iface,
buf)) {
wpa_printf(MSG_INFO, "Cannot add interface - it "
"already exists");
return -1;
}
}
hapd_iface = hostapd_iface_alloc(interfaces);
if (hapd_iface == NULL) {
wpa_printf(MSG_ERROR, "%s: Failed to allocate memory "
"for interface", __func__);
goto fail;
}
new_iface = hapd_iface;
if (conf_file && interfaces->config_read_cb) {
conf = interfaces->config_read_cb(conf_file);
if (conf && conf->bss)
os_strlcpy(conf->bss[0]->iface, buf,
sizeof(conf->bss[0]->iface));
} else {
char *driver = os_strchr(ptr, ' ');
if (driver)
*driver++ = '\0';
conf = <API key>(interfaces, buf, ptr, driver);
}
if (conf == NULL || conf->bss == NULL) {
wpa_printf(MSG_ERROR, "%s: Failed to allocate memory "
"for configuration", __func__);
goto fail;
}
if (hostapd_data_alloc(hapd_iface, conf) < 0) {
wpa_printf(MSG_ERROR, "%s: Failed to allocate memory "
"for hostapd", __func__);
goto fail;
}
conf = NULL;
if (start_ctrl_iface(hapd_iface) < 0)
goto fail;
wpa_printf(MSG_INFO, "Add interface '%s'",
hapd_iface->conf->bss[0]->iface);
return 0;
fail:
if (conf)
hostapd_config_free(conf);
if (hapd_iface) {
if (hapd_iface->bss) {
for (i = 0; i < hapd_iface->num_bss; i++) {
hapd = hapd_iface->bss[i];
if (!hapd)
continue;
if (hapd_iface->interfaces &&
hapd_iface->interfaces->ctrl_iface_deinit)
hapd_iface->interfaces->
ctrl_iface_deinit(hapd);
wpa_printf(MSG_DEBUG, "%s: free hapd %p (%s)",
__func__, hapd_iface->bss[i],
hapd->conf->iface);
hostapd_cleanup(hapd);
os_free(hapd);
hapd_iface->bss[i] = NULL;
}
os_free(hapd_iface->bss);
hapd_iface->bss = NULL;
}
if (new_iface) {
interfaces->count
interfaces->iface[interfaces->count] = NULL;
}
<API key>(hapd_iface);
}
return -1;
}
static int hostapd_remove_bss(struct hostapd_iface *iface, unsigned int idx)
{
size_t i;
wpa_printf(MSG_INFO, "Remove BSS '%s'", iface->conf->bss[idx]->iface);
/* Remove hostapd_data only if it has already been initialized */
if (idx < iface->num_bss) {
struct hostapd_data *hapd = iface->bss[idx];
hostapd_bss_deinit(hapd);
wpa_printf(MSG_DEBUG, "%s: free hapd %p (%s)",
__func__, hapd, hapd->conf->iface);
<API key>(hapd->conf);
hapd->conf = NULL;
os_free(hapd);
iface->num_bss
for (i = idx; i < iface->num_bss; i++)
iface->bss[i] = iface->bss[i + 1];
} else {
<API key>(iface->conf->bss[idx]);
iface->conf->bss[idx] = NULL;
}
iface->conf->num_bss
for (i = idx; i < iface->conf->num_bss; i++)
iface->conf->bss[i] = iface->conf->bss[i + 1];
return 0;
}
int <API key>(struct hapd_interfaces *interfaces, char *buf)
{
struct hostapd_iface *hapd_iface;
size_t i, j, k = 0;
for (i = 0; i < interfaces->count; i++) {
hapd_iface = interfaces->iface[i];
if (hapd_iface == NULL)
return -1;
if (!os_strcmp(hapd_iface->conf->bss[0]->iface, buf)) {
wpa_printf(MSG_INFO, "Remove interface '%s'", buf);
hapd_iface->driver_ap_teardown =
!!(hapd_iface->drv_flags &
<API key>);
<API key>(hapd_iface);
k = i;
while (k < (interfaces->count - 1)) {
interfaces->iface[k] =
interfaces->iface[k + 1];
k++;
}
interfaces->count
return 0;
}
for (j = 0; j < hapd_iface->conf->num_bss; j++) {
if (!os_strcmp(hapd_iface->conf->bss[j]->iface, buf)) {
hapd_iface->driver_ap_teardown =
!(hapd_iface->drv_flags &
<API key>);
return hostapd_remove_bss(hapd_iface, j);
}
}
}
return -1;
}
/**
* <API key> - Notify that a new station associated with the AP
* @hapd: Pointer to BSS data
* @sta: Pointer to the associated STA data
* @reassoc: 1 to indicate this was a re-association; 0 = first association
*
* This function will be called whenever a station associates with the AP. It
* can be called from ieee802_11.c for drivers that export MLME to hostapd and
* from drv_callbacks.c based on driver events for drivers that take care of
* management frames (IEEE 802.11 authentication and association) internally.
*/
void <API key>(struct hostapd_data *hapd, struct sta_info *sta,
int reassoc)
{
if (hapd-><API key>) {
<API key>(hapd, sta->addr,
<API key>);
return;
}
<API key>(hapd, sta->addr);
<API key>(hapd, sta);
/* IEEE 802.11F (IAPP) */
if (hapd->conf->ieee802_11f)
iapp_new_station(hapd->iapp, sta);
#ifdef CONFIG_P2P
if (sta->p2p_ie == NULL && !sta->no_p2p_set) {
sta->no_p2p_set = 1;
hapd->num_sta_no_p2p++;
if (hapd->num_sta_no_p2p == 1)
<API key>(hapd);
}
#endif /* CONFIG_P2P */
/* Start accounting here, if IEEE 802.1X and WPA are not used.
* IEEE 802.1X/WPA code will start accounting after the station has
* been authorized. */
if (!hapd->conf->ieee802_1x && !hapd->conf->wpa && !hapd->conf->osen) {
<API key>(hapd, sta, 1);
os_get_reltime(&sta->connected_time);
<API key>(hapd, sta);
}
/* Start IEEE 802.1X authentication process for new stations */
<API key>(hapd, sta);
if (reassoc) {
if (sta->auth_alg != WLAN_AUTH_FT &&
!(sta->flags & (WLAN_STA_WPS | WLAN_STA_MAYBE_WPS)))
wpa_auth_sm_event(sta->wpa_sm, WPA_REAUTH);
} else
<API key>(hapd->wpa_auth, sta->wpa_sm);
if (!(hapd->iface->drv_flags & <API key>)) {
wpa_printf(MSG_DEBUG,
"%s: %s: reschedule ap_handle_timer timeout for "
MACSTR " (%d seconds - ap_max_inactivity)",
hapd->conf->iface, __func__, MAC2STR(sta->addr),
hapd->conf->ap_max_inactivity);
<API key>(ap_handle_timer, hapd, sta);
<API key>(hapd->conf->ap_max_inactivity, 0,
ap_handle_timer, hapd, sta);
}
}
const char * hostapd_state_text(enum hostapd_iface_state s)
{
switch (s) {
case <API key>:
return "UNINITIALIZED";
case HAPD_IFACE_DISABLED:
return "DISABLED";
case <API key>:
return "COUNTRY_UPDATE";
case HAPD_IFACE_ACS:
return "ACS";
case HAPD_IFACE_HT_SCAN:
return "HT_SCAN";
case HAPD_IFACE_DFS:
return "DFS";
case HAPD_IFACE_ENABLED:
return "ENABLED";
}
return "UNKNOWN";
}
void hostapd_set_state(struct hostapd_iface *iface, enum hostapd_iface_state s)
{
wpa_printf(MSG_INFO, "%s: interface state %s->%s",
iface->conf ? iface->conf->bss[0]->iface : "N/A",
hostapd_state_text(iface->state), hostapd_state_text(s));
iface->state = s;
}
int <API key>(struct hostapd_iface *iface)
{
unsigned int i;
for (i = 0; i < iface->num_bss; i++)
if (iface->bss[i]->csa_in_progress)
return 1;
return 0;
}
#ifdef NEED_AP_MLME
static void free_beacon_data(struct beacon_data *beacon)
{
os_free(beacon->head);
beacon->head = NULL;
os_free(beacon->tail);
beacon->tail = NULL;
os_free(beacon->probe_resp);
beacon->probe_resp = NULL;
os_free(beacon->beacon_ies);
beacon->beacon_ies = NULL;
os_free(beacon->proberesp_ies);
beacon->proberesp_ies = NULL;
os_free(beacon->assocresp_ies);
beacon->assocresp_ies = NULL;
}
static int <API key>(struct hostapd_data *hapd,
struct beacon_data *beacon)
{
struct wpabuf *beacon_extra, *proberesp_extra, *assocresp_extra;
struct <API key> params;
int ret;
os_memset(beacon, 0, sizeof(*beacon));
ret = <API key>(hapd, ¶ms);
if (ret < 0)
return ret;
ret = <API key>(hapd, &beacon_extra,
&proberesp_extra,
&assocresp_extra);
if (ret)
goto free_ap_params;
ret = -1;
beacon->head = os_malloc(params.head_len);
if (!beacon->head)
goto free_ap_extra_ies;
os_memcpy(beacon->head, params.head, params.head_len);
beacon->head_len = params.head_len;
beacon->tail = os_malloc(params.tail_len);
if (!beacon->tail)
goto free_beacon;
os_memcpy(beacon->tail, params.tail, params.tail_len);
beacon->tail_len = params.tail_len;
if (params.proberesp != NULL) {
beacon->probe_resp = os_malloc(params.proberesp_len);
if (!beacon->probe_resp)
goto free_beacon;
os_memcpy(beacon->probe_resp, params.proberesp,
params.proberesp_len);
beacon->probe_resp_len = params.proberesp_len;
}
/* copy the extra ies */
if (beacon_extra) {
beacon->beacon_ies = os_malloc(wpabuf_len(beacon_extra));
if (!beacon->beacon_ies)
goto free_beacon;
os_memcpy(beacon->beacon_ies,
beacon_extra->buf, wpabuf_len(beacon_extra));
beacon->beacon_ies_len = wpabuf_len(beacon_extra);
}
if (proberesp_extra) {
beacon->proberesp_ies =
os_malloc(wpabuf_len(proberesp_extra));
if (!beacon->proberesp_ies)
goto free_beacon;
os_memcpy(beacon->proberesp_ies, proberesp_extra->buf,
wpabuf_len(proberesp_extra));
beacon->proberesp_ies_len = wpabuf_len(proberesp_extra);
}
if (assocresp_extra) {
beacon->assocresp_ies =
os_malloc(wpabuf_len(assocresp_extra));
if (!beacon->assocresp_ies)
goto free_beacon;
os_memcpy(beacon->assocresp_ies, assocresp_extra->buf,
wpabuf_len(assocresp_extra));
beacon->assocresp_ies_len = wpabuf_len(assocresp_extra);
}
ret = 0;
free_beacon:
/* if the function fails, the caller should not free beacon data */
if (ret)
free_beacon_data(beacon);
free_ap_extra_ies:
<API key>(hapd, beacon_extra, proberesp_extra,
assocresp_extra);
free_ap_params:
<API key>(¶ms);
return ret;
}
/*
* TODO: This flow currently supports only changing channel and width within
* the same hw_mode. Any other changes to MAC parameters or provided settings
* are not supported.
*/
static int <API key>(struct hostapd_data *hapd,
struct hostapd_config *conf,
struct hostapd_freq_params *params,
struct hostapd_freq_params *old_params)
{
int channel;
if (!params->channel) {
/* check if the new channel is supported by hw */
params->channel = <API key>(hapd, params->freq);
}
channel = params->channel;
if (!channel)
return -1;
/* if a pointer to old_params is provided we save previous state */
if (old_params &&
<API key>(old_params, conf->hw_mode,
hostapd_hw_get_freq(hapd, conf->channel),
conf->channel, conf->ieee80211n,
conf->ieee80211ac,
conf->secondary_channel,
conf->vht_oper_chwidth,
conf-><API key>,
conf-><API key>,
conf->vht_capab))
return -1;
switch (params->bandwidth) {
case 0:
case 20:
case 40:
conf->vht_oper_chwidth = <API key>;
break;
case 80:
if (params->center_freq2)
conf->vht_oper_chwidth = <API key>;
else
conf->vht_oper_chwidth = VHT_CHANWIDTH_80MHZ;
break;
case 160:
conf->vht_oper_chwidth = <API key>;
break;
default:
return -1;
}
conf->channel = channel;
conf->ieee80211n = params->ht_enabled;
conf->secondary_channel = params->sec_channel_offset;
<API key>(params->center_freq1,
&conf-><API key>);
<API key>(params->center_freq2,
&conf-><API key>);
/* TODO: maybe call here <API key> here? */
return 0;
}
static int <API key>(struct hostapd_data *hapd,
struct csa_settings *settings)
{
struct hostapd_iface *iface = hapd->iface;
struct hostapd_freq_params old_freq;
int ret;
u8 chan, vht_bandwidth;
os_memset(&old_freq, 0, sizeof(old_freq));
if (!iface || !iface->freq || hapd->csa_in_progress)
return -1;
switch (settings->freq_params.bandwidth) {
case 80:
if (settings->freq_params.center_freq2)
vht_bandwidth = <API key>;
else
vht_bandwidth = VHT_CHANWIDTH_80MHZ;
break;
case 160:
vht_bandwidth = <API key>;
break;
default:
vht_bandwidth = <API key>;
break;
}
if (<API key>(
settings->freq_params.freq,
settings->freq_params.sec_channel_offset,
vht_bandwidth,
&hapd->iface->cs_oper_class,
&chan) == NUM_HOSTAPD_MODES) {
wpa_printf(MSG_DEBUG,
"invalid frequency for channel switch (freq=%d, sec_channel_offset=%d, vht_enabled=%d)",
settings->freq_params.freq,
settings->freq_params.sec_channel_offset,
settings->freq_params.vht_enabled);
return -1;
}
settings->freq_params.channel = chan;
ret = <API key>(iface->bss[0], iface->conf,
&settings->freq_params,
&old_freq);
if (ret)
return ret;
ret = <API key>(hapd, &settings->beacon_after);
/* change back the configuration */
<API key>(iface->bss[0], iface->conf,
&old_freq, NULL);
if (ret)
return ret;
/* set channel switch parameters for csa ie */
hapd->cs_freq_params = settings->freq_params;
hapd->cs_count = settings->cs_count;
hapd->cs_block_tx = settings->block_tx;
ret = <API key>(hapd, &settings->beacon_csa);
if (ret) {
free_beacon_data(&settings->beacon_after);
return ret;
}
settings-><API key>[0] = hapd->cs_c_off_beacon;
settings-><API key>[0] = hapd->cs_c_off_proberesp;
settings-><API key>[1] = hapd-><API key>;
settings-><API key>[1] = hapd-><API key>;
return 0;
}
void <API key>(struct hostapd_data *hapd)
{
os_memset(&hapd->cs_freq_params, 0, sizeof(hapd->cs_freq_params));
hapd->cs_count = 0;
hapd->cs_block_tx = 0;
hapd->cs_c_off_beacon = 0;
hapd->cs_c_off_proberesp = 0;
hapd->csa_in_progress = 0;
hapd-><API key> = 0;
hapd-><API key> = 0;
}
int <API key>(struct hostapd_data *hapd,
struct csa_settings *settings)
{
int ret;
if (!(hapd->iface->drv_flags & <API key>)) {
wpa_printf(MSG_INFO, "CSA is not supported");
return -1;
}
ret = <API key>(hapd, settings);
if (ret)
return ret;
ret = <API key>(hapd, settings);
free_beacon_data(&settings->beacon_csa);
free_beacon_data(&settings->beacon_after);
if (ret) {
/* if we failed, clean cs parameters */
<API key>(hapd);
return ret;
}
hapd->csa_in_progress = 1;
return 0;
}
void
<API key>(struct hostapd_iface *iface,
const struct hostapd_freq_params *freq_params)
{
int vht_seg0_idx = 0, vht_seg1_idx = 0, vht_bw = <API key>;
unsigned int i;
wpa_printf(MSG_DEBUG, "Restarting all CSA-related BSSes");
if (freq_params->center_freq1)
vht_seg0_idx = 36 + (freq_params->center_freq1 - 5180) / 5;
if (freq_params->center_freq2)
vht_seg1_idx = 36 + (freq_params->center_freq2 - 5180) / 5;
switch (freq_params->bandwidth) {
case 0:
case 20:
case 40:
vht_bw = <API key>;
break;
case 80:
if (freq_params->center_freq2)
vht_bw = <API key>;
else
vht_bw = VHT_CHANWIDTH_80MHZ;
break;
case 160:
vht_bw = <API key>;
break;
default:
wpa_printf(MSG_WARNING, "Unknown CSA bandwidth: %d",
freq_params->bandwidth);
break;
}
iface->freq = freq_params->freq;
iface->conf->channel = freq_params->channel;
iface->conf->secondary_channel = freq_params->sec_channel_offset;
iface->conf-><API key> = vht_seg0_idx;
iface->conf-><API key> = vht_seg1_idx;
iface->conf->vht_oper_chwidth = vht_bw;
iface->conf->ieee80211n = freq_params->ht_enabled;
iface->conf->ieee80211ac = freq_params->vht_enabled;
/*
* cs_params must not be cleared earlier because the freq_params
* argument may actually point to one of these.
*/
for (i = 0; i < iface->num_bss; i++)
<API key>(iface->bss[i]);
<API key>(iface);
<API key>(iface);
}
#endif /* NEED_AP_MLME */
struct hostapd_data * hostapd_get_iface(struct hapd_interfaces *interfaces,
const char *ifname)
{
size_t i, j;
for (i = 0; i < interfaces->count; i++) {
struct hostapd_iface *iface = interfaces->iface[i];
for (j = 0; j < iface->num_bss; j++) {
struct hostapd_data *hapd = iface->bss[j];
if (os_strcmp(ifname, hapd->conf->iface) == 0)
return hapd;
}
}
return NULL;
}
void <API key>(struct hostapd_iface *iface)
{
size_t i;
ap_list_timer(iface);
for (i = 0; i < iface->num_bss; i++) {
struct hostapd_data *hapd = iface->bss[i];
if (!hapd->started)
continue;
#ifndef CONFIG_NO_RADIUS
hostapd_acl_expire(hapd);
#endif /* CONFIG_NO_RADIUS */
}
}
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: <API key>.c
Label Definition File: <API key>.label.xml
Template File: sources-sinks-45.tmpl.c
*/
/*
* @description
* CWE: 191 Integer Underflow
* BadSource: listen_socket Read data using a listen socket (server side)
* GoodSource: Set data to a small, non-zero number (negative two)
* Sinks: decrement
* GoodSink: Ensure there will not be an underflow before decrementing data
* BadSink : Decrement data, which can cause an Underflow
* Flow Variant: 45 Data flow: data passed as a static global variable from one function to another in the same source file
*
* */
#include "std_testcase.h"
#ifdef _WIN32
#include <winsock2.h>
#include <windows.h>
#include <direct.h>
#pragma comment(lib, "ws2_32") /* include ws2_32.lib when linking */
#define CLOSE_SOCKET closesocket
#else
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <unistd.h>
#define INVALID_SOCKET -1
#define SOCKET_ERROR -1
#define CLOSE_SOCKET close
#define SOCKET int
#endif
#define TCP_PORT 27015
#define LISTEN_BACKLOG 5
#define CHAR_ARRAY_SIZE (3 * sizeof(data) + 2)
static int <API key>;
static int <API key>;
static int <API key>;
#ifndef OMITBAD
static void badSink()
{
int data = <API key>;
{
/* POTENTIAL FLAW: Decrementing data could cause an underflow */
data
int result = data;
printIntLine(result);
}
}
void <API key>()
{
int data;
/* Initialize data */
data = 0;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
<API key> = data;
badSink();
}
#endif /* OMITBAD */
#ifndef OMITGOOD
/* goodG2B() uses the GoodSource with the BadSink */
static void goodG2BSink()
{
int data = <API key>;
{
/* POTENTIAL FLAW: Decrementing data could cause an underflow */
data
int result = data;
printIntLine(result);
}
}
static void goodG2B()
{
int data;
/* Initialize data */
data = 0;
/* FIX: Use a small, non-zero value that will not cause an integer underflow in the sinks */
data = -2;
<API key> = data;
goodG2BSink();
}
/* goodB2G() uses the BadSource with the GoodSink */
static void goodB2GSink()
{
int data = <API key>;
/* FIX: Add a check to prevent an underflow from occurring */
if (data > INT_MIN)
{
data
int result = data;
printIntLine(result);
}
else
{
printLine("data value is too large to perform arithmetic safely.");
}
}
static void goodB2G()
{
int data;
/* Initialize data */
data = 0;
{
#ifdef _WIN32
WSADATA wsaData;
int wsaDataInit = 0;
#endif
int recvResult;
struct sockaddr_in service;
SOCKET listenSocket = INVALID_SOCKET;
SOCKET acceptSocket = INVALID_SOCKET;
char inputBuffer[CHAR_ARRAY_SIZE];
do
{
#ifdef _WIN32
if (WSAStartup(MAKEWORD(2,2), &wsaData) != NO_ERROR)
{
break;
}
wsaDataInit = 1;
#endif
/* POTENTIAL FLAW: Read data using a listen socket */
listenSocket = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (listenSocket == INVALID_SOCKET)
{
break;
}
memset(&service, 0, sizeof(service));
service.sin_family = AF_INET;
service.sin_addr.s_addr = INADDR_ANY;
service.sin_port = htons(TCP_PORT);
if (bind(listenSocket, (struct sockaddr*)&service, sizeof(service)) == SOCKET_ERROR)
{
break;
}
if (listen(listenSocket, LISTEN_BACKLOG) == SOCKET_ERROR)
{
break;
}
acceptSocket = accept(listenSocket, NULL, NULL);
if (acceptSocket == SOCKET_ERROR)
{
break;
}
/* Abort on error or the connection was closed */
recvResult = recv(acceptSocket, inputBuffer, CHAR_ARRAY_SIZE - 1, 0);
if (recvResult == SOCKET_ERROR || recvResult == 0)
{
break;
}
/* NUL-terminate the string */
inputBuffer[recvResult] = '\0';
/* Convert to int */
data = atoi(inputBuffer);
}
while (0);
if (listenSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(listenSocket);
}
if (acceptSocket != INVALID_SOCKET)
{
CLOSE_SOCKET(acceptSocket);
}
#ifdef _WIN32
if (wsaDataInit)
{
WSACleanup();
}
#endif
}
<API key> = data;
goodB2GSink();
}
void <API key>()
{
goodG2B();
goodB2G();
}
#endif /* OMITGOOD */
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
#ifdef INCLUDEMAIN
int main(int argc, char * argv[])
{
/* seed randomness */
srand( (unsigned)time(NULL) );
#ifndef OMITGOOD
printLine("Calling good()...");
<API key>();
printLine("Finished good()");
#endif /* OMITGOOD */
#ifndef OMITBAD
printLine("Calling bad()...");
<API key>();
printLine("Finished bad()");
#endif /* OMITBAD */
return 0;
}
#endif
|
// Description of the life cycle of a instance of MetricsService.
// OVERVIEW
// A MetricsService instance is typically created at application startup. It is
// the central controller for the acquisition of log data, and the automatic
// transmission of that log data to an external server. Its major job is to
// manage logs, grouping them for transmission, and transmitting them. As part
// of its grouping, MS finalizes logs by including some just-in-time gathered
// memory statistics, snapshotting the current stats of numerous histograms,
// closing the logs, translating to protocol buffer format, and compressing the
// results for transmission. Transmission includes submitting a compressed log
// as data in a URL-post, and retransmitting (or retaining at process
// termination) if the attempted transmission failed. Retention across process
// terminations is done using the the PrefServices facilities. The retained logs
// (the ones that never got transmitted) are compressed and base64-encoded
// before being persisted.
// Logs fall into one of two categories: "initial logs," and "ongoing logs."
// There is at most one initial log sent for each complete run of Chrome (from
// startup, to browser shutdown). An initial log is generally transmitted some
// short time (1 minute?) after startup, and includes stats such as recent crash
// info, the number and types of plugins, etc. The external server's response
// to the initial log conceptually tells this MS if it should continue
// transmitting logs (during this session). The server response can actually be
// much more detailed, and always includes (at a minimum) how often additional
// ongoing logs should be sent.
// After the above initial log, a series of ongoing logs will be transmitted.
// The first ongoing log actually begins to accumulate information stating when
// the MS was first constructed. Note that even though the initial log is
// commonly sent a full minute after startup, the initial log does not include
// much in the way of user stats. The most common interlog period (delay)
// is 30 minutes. That time period starts when the first user action causes a
// logging event. This means that if there is no user action, there may be long
// periods without any (ongoing) log transmissions. Ongoing logs typically
// contain very detailed records of user activities (ex: opened tab, closed
// tab, fetched URL, maximized window, etc.) In addition, just before an
// ongoing log is closed out, a call is made to gather memory statistics. Those
// memory statistics are deposited into a histogram, and the log finalization
// code is then called. In the finalization, a call to a Histogram server
// acquires a list of all local histograms that have been flagged for upload
// to the UMA server. The finalization also acquires the most recent number
// of page loads, along with any counts of renderer or plugin crashes.
// When the browser shuts down, there will typically be a fragment of an ongoing
// log that has not yet been transmitted. At shutdown time, that fragment is
// closed (including snapshotting histograms), and persisted, for potential
// transmission during a future run of the product.
// There are two slightly abnormal shutdown conditions. There is a
// "disconnected scenario," and a "really fast startup and shutdown" scenario.
// In the "never connected" situation, the user has (during the running of the
// process) never established an internet connection. As a result, attempts to
// transmit the initial log have failed, and a lot(?) of data has accumulated in
// the ongoing log (which didn't yet get closed, because there was never even a
// contemplation of sending it). There is also a kindred "lost connection"
// situation, where a loss of connection prevented an ongoing log from being
// transmitted, and a (still open) log was stuck accumulating a lot(?) of data,
// while the earlier log retried its transmission. In both of these
// disconnected situations, two logs need to be, and are, persistently stored
// for future transmission.
// The other unusual shutdown condition, termed "really fast startup and
// shutdown," involves the deliberate user termination of the process before
// the initial log is even formed or transmitted. In that situation, no logging
// is done, but the historical crash statistics remain (unlogged) for inclusion
// in a future run's initial log. (i.e., we don't lose crash stats).
// With the above overview, we can now describe the state machine's various
// states, based on the State enum specified in the state_ member. Those states
// are:
// INITIALIZED, // Constructor was called.
// INIT_TASK_SCHEDULED, // Waiting for deferred init tasks to finish.
// INIT_TASK_DONE, // Waiting for timer to send initial log.
// SENDING_LOGS, // Sending logs and creating new ones when we run out.
// In more detail, we have:
// INITIALIZED, // Constructor was called.
// The MS has been constructed, but has taken no actions to compose the
// initial log.
// INIT_TASK_SCHEDULED, // Waiting for deferred init tasks to finish.
// Typically about 30 seconds after startup, a task is sent to a second thread
// (the file thread) to perform deferred (lower priority and slower)
// initialization steps such as getting the list of plugins. That task will
// (when complete) make an async callback (via a Task) to indicate the
// completion.
// INIT_TASK_DONE, // Waiting for timer to send initial log.
// The callback has arrived, and it is now possible for an initial log to be
// created. This callback typically arrives back less than one second after
// the deferred init task is dispatched.
// SENDING_LOGS, // Sending logs an creating new ones when we run out.
// Logs from previous sessions have been loaded, and initial logs have been
// created (an optional stability log and the first metrics log). We will
// send all of these logs, and when run out, we will start cutting new logs
// to send. We will also cut a new log if we expect a shutdown.
// The progression through the above states is simple, and sequential.
// States proceed from INITIAL to SENDING_LOGS, and remain in the latter until
// shutdown.
// Also note that whenever we successfully send a log, we mirror the list
// of logs into the PrefService. This ensures that IF we crash, we won't start
// up and retransmit our old logs again.
// Due to race conditions, it is always possible that a log file could be sent
// twice. For example, if a log file is sent, but not yet acknowledged by
// the external server, and the user shuts down, then a copy of the log may be
// saved for re-transmission. These duplicates could be filtered out server
// side, but are not expected to be a significant problem.
#include "components/metrics/metrics_service.h"
#include <algorithm>
#include "base/bind.h"
#include "base/callback.h"
#include "base/metrics/histogram.h"
#include "base/metrics/histogram_base.h"
#include "base/metrics/histogram_samples.h"
#include "base/metrics/sparse_histogram.h"
#include "base/metrics/statistics_recorder.h"
#include "base/prefs/<API key>.h"
#include "base/prefs/pref_service.h"
#include "base/strings/<API key>.h"
#include "base/strings/<API key>.h"
#include "base/threading/platform_thread.h"
#include "base/threading/thread.h"
#include "base/threading/thread_restrictions.h"
#include "base/time/time.h"
#include "base/tracked_objects.h"
#include "base/values.h"
#include "components/metrics/metrics_log.h"
#include "components/metrics/metrics_log_manager.h"
#include "components/metrics/<API key>.h"
#include "components/metrics/metrics_pref_names.h"
#include "components/metrics/<API key>.h"
#include "components/metrics/<API key>.h"
#include "components/metrics/<API key>.h"
#include "components/variations/entropy_provider.h"
namespace metrics {
namespace {
// Check to see that we're being called on only one thread.
bool IsSingleThreaded() {
static base::PlatformThreadId thread_id = 0;
if (!thread_id)
thread_id = base::PlatformThread::CurrentId();
return base::PlatformThread::CurrentId() == thread_id;
}
// The delay, in seconds, after starting recording before doing expensive
// initialization work.
#if defined(OS_ANDROID) || defined(OS_IOS)
// On mobile devices, a significant portion of sessions last less than a minute.
// Use a shorter timer on these platforms to avoid losing data.
// TODO(dfalcantara): To avoid delaying startup, tighten up initialization so
// that it occurs after the user gets their initial page.
const int <API key> = 5;
#else
const int <API key> = 30;
#endif
// The maximum number of events in a log uploaded to the UMA server.
const int kEventLimit = 2400;
// If an upload fails, and the transmission was over this byte count, then we
// will discard the log, and not try to retransmit it. We also don't persist
// the log to the prefs for transmission during the next chrome session if this
// limit is exceeded.
const size_t <API key> = 100 * 1024;
// Interval, in minutes, between state saves.
const int <API key> = 5;
enum ResponseStatus {
UNKNOWN_FAILURE,
SUCCESS,
BAD_REQUEST, // Invalid syntax or log too large.
NO_RESPONSE,
<API key>
};
ResponseStatus <API key>(int response_code) {
switch (response_code) {
case -1:
return NO_RESPONSE;
case 200:
return SUCCESS;
case 400:
return BAD_REQUEST;
default:
return UNKNOWN_FAILURE;
}
}
#if defined(OS_ANDROID) || defined(OS_IOS)
void <API key>(CleanExitBeacon* clean_exit_beacon,
PrefService* local_state) {
clean_exit_beacon->WriteBeaconValue(true);
local_state->SetInteger(prefs::<API key>,
MetricsService::SHUTDOWN_COMPLETE);
// Start writing right away (write happens on a different thread).
local_state->CommitPendingWrite();
}
#endif // defined(OS_ANDROID) || defined(OS_IOS)
} // namespace
SyntheticTrialGroup::SyntheticTrialGroup(uint32 trial, uint32 group) {
id.name = trial;
id.group = group;
}
SyntheticTrialGroup::~SyntheticTrialGroup() {
}
// static
MetricsService::ShutdownCleanliness MetricsService::<API key> =
MetricsService::CLEANLY_SHUTDOWN;
MetricsService::ExecutionPhase MetricsService::execution_phase_ =
MetricsService::UNINITIALIZED_PHASE;
// static
void MetricsService::RegisterPrefs(PrefRegistrySimple* registry) {
DCHECK(IsSingleThreaded());
MetricsStateManager::RegisterPrefs(registry);
MetricsLog::RegisterPrefs(registry);
registry->RegisterInt64Pref(prefs::kInstallDate, 0);
registry->RegisterInt64Pref(prefs::<API key>, 0);
registry->RegisterInt64Pref(prefs::<API key>, 0);
registry->RegisterStringPref(prefs::<API key>, std::string());
registry->RegisterInt64Pref(prefs::<API key>, 0);
registry->RegisterBooleanPref(prefs::<API key>, true);
registry->RegisterIntegerPref(prefs::<API key>,
UNINITIALIZED_PHASE);
registry->RegisterBooleanPref(prefs::<API key>, true);
registry->RegisterIntegerPref(prefs::kMetricsSessionID, -1);
registry->RegisterListPref(prefs::kMetricsInitialLogs);
registry->RegisterListPref(prefs::kMetricsOngoingLogs);
registry->RegisterInt64Pref(prefs::<API key>, 0);
registry->RegisterInt64Pref(prefs::<API key>, 0);
}
MetricsService::MetricsService(MetricsStateManager* state_manager,
<API key>* client,
PrefService* local_state)
: log_manager_(local_state, <API key>),
<API key>(this),
state_manager_(state_manager),
client_(client),
local_state_(local_state),
clean_exit_beacon_(client-><API key>(), local_state),
recording_active_(false),
reporting_active_(false),
test_mode_active_(false),
state_(INITIALIZED),
<API key>(false),
<API key>(false),
session_id_(-1),
self_ptr_factory_(this),
<API key>(this) {
DCHECK(IsSingleThreaded());
DCHECK(state_manager_);
DCHECK(client_);
DCHECK(local_state_);
// Set the install date if this is our first run.
int64 install_date = local_state_->GetInt64(prefs::kInstallDate);
if (install_date == 0)
local_state_->SetInt64(prefs::kInstallDate, base::Time::Now().ToTimeT());
}
MetricsService::~MetricsService() {
DisableRecording();
}
void MetricsService::<API key>() {
<API key>();
base::Closure upload_callback =
base::Bind(&MetricsService::<API key>,
self_ptr_factory_.GetWeakPtr());
scheduler_.reset(
new <API key>(
upload_callback,
// <API key> outlives MetricsService, and
// <API key> is tied to the lifetime of |this|.
base::Bind(&<API key>::<API key>,
base::Unretained(client_))));
}
void MetricsService::Start() {
<API key>(false);
EnableRecording();
EnableReporting();
}
bool MetricsService::<API key>() {
const bool enabled = state_manager_-><API key>();
if (enabled)
Start();
return enabled;
}
void MetricsService::<API key>() {
test_mode_active_ = true;
EnableRecording();
DisableReporting();
}
void MetricsService::Stop() {
<API key>(false);
DisableReporting();
DisableRecording();
}
void MetricsService::EnableReporting() {
if (reporting_active_)
return;
reporting_active_ = true;
<API key>();
}
void MetricsService::DisableReporting() {
reporting_active_ = false;
}
std::string MetricsService::GetClientId() {
return state_manager_->client_id();
}
int64 MetricsService::GetInstallDate() {
return local_state_->GetInt64(prefs::kInstallDate);
}
int64 MetricsService::<API key>() {
return local_state_->GetInt64(prefs::<API key>);
}
scoped_ptr<const base::FieldTrial::EntropyProvider>
MetricsService::<API key>() {
// TODO(asvitkine): Refactor the code so that MetricsService does not expose
// this method.
return state_manager_-><API key>();
}
void MetricsService::EnableRecording() {
DCHECK(IsSingleThreaded());
if (recording_active_)
return;
recording_active_ = true;
state_manager_-><API key>();
client_->SetMetricsClientId(state_manager_->client_id());
if (!log_manager_.current_log())
OpenNewLog();
for (size_t i = 0; i < metrics_providers_.size(); ++i)
metrics_providers_[i]->OnRecordingEnabled();
base::<API key>(action_callback_);
action_callback_ = base::Bind(&MetricsService::OnUserAction,
base::Unretained(this));
base::AddActionCallback(action_callback_);
}
void MetricsService::DisableRecording() {
DCHECK(IsSingleThreaded());
if (!recording_active_)
return;
recording_active_ = false;
client_->OnRecordingDisabled();
base::<API key>(action_callback_);
for (size_t i = 0; i < metrics_providers_.size(); ++i)
metrics_providers_[i]->OnRecordingDisabled();
<API key>();
}
bool MetricsService::recording_active() const {
DCHECK(IsSingleThreaded());
return recording_active_;
}
bool MetricsService::reporting_active() const {
DCHECK(IsSingleThreaded());
return reporting_active_;
}
void MetricsService::RecordDelta(const base::HistogramBase& histogram,
const base::HistogramSamples& snapshot) {
log_manager_.current_log()-><API key>(histogram.histogram_name(),
snapshot);
}
void MetricsService::<API key>(
base::HistogramBase::Inconsistency problem) {
<API key>("Histogram.<API key>",
problem, base::HistogramBase::<API key>);
}
void MetricsService::<API key>(
base::HistogramBase::Inconsistency problem) {
<API key>("Histogram.<API key>",
problem, base::HistogramBase::<API key>);
}
void MetricsService::<API key>(int amount) {
<API key>("Histogram.<API key>",
std::abs(amount));
}
void MetricsService::<API key>(bool in_idle) {
// If there wasn't a lot of action, maybe the computer was asleep, in which
// case, the log transmissions should have stopped. Here we start them up
// again.
if (!in_idle && <API key>)
<API key>();
<API key> = in_idle;
}
void MetricsService::<API key>() {
if (recording_active_)
<API key>(false);
}
void MetricsService::<API key>() {
LogCleanShutdown();
<API key>(prefs::<API key>, false);
}
void MetricsService::<API key>() {
LogCleanShutdown();
<API key>(prefs::<API key>, true);
}
#if defined(OS_ANDROID) || defined(OS_IOS)
void MetricsService::<API key>() {
scheduler_->Stop();
<API key>(&clean_exit_beacon_, local_state_);
// At this point, there's no way of knowing when the process will be
// killed, so this has to be treated similar to a shutdown, closing and
// persisting all logs. Unlinke a shutdown, the state is primed to be ready
// to continue logging and uploading if the process does return.
if (recording_active() && state_ >= SENDING_LOGS) {
<API key>();
// Persisting logs closes the current log, so start recording a new log
// immediately to capture any background work that might be done before the
// process is killed.
OpenNewLog();
}
}
void MetricsService::<API key>() {
clean_exit_beacon_.WriteBeaconValue(false);
<API key>();
}
#else
void MetricsService::<API key>() {
clean_exit_beacon_.WriteBeaconValue(false);
// Redundant setting to be sure we call for a clean shutdown.
<API key> = NEED_TO_SHUTDOWN;
}
#endif // defined(OS_ANDROID) || defined(OS_IOS)
// static
void MetricsService::SetExecutionPhase(ExecutionPhase execution_phase,
PrefService* local_state) {
execution_phase_ = execution_phase;
local_state->SetInteger(prefs::<API key>, execution_phase_);
}
void MetricsService::<API key>(bool success) {
if (!success)
IncrementPrefValue(prefs::<API key>);
else
IncrementPrefValue(prefs::<API key>);
}
void MetricsService::<API key>(bool has_debugger) {
if (!has_debugger)
IncrementPrefValue(prefs::<API key>);
else
IncrementPrefValue(prefs::<API key>);
}
void MetricsService::<API key>() {
for (size_t i = 0; i < metrics_providers_.size(); ++i)
metrics_providers_[i]-><API key>();
// Reset the prefs that are managed by MetricsService/MetricsLog directly.
local_state_->SetInteger(prefs::<API key>, 0);
local_state_->SetInteger(prefs::<API key>,
UNINITIALIZED_PHASE);
local_state_->SetInteger(prefs::<API key>, 0);
local_state_->SetInteger(prefs::<API key>, 0);
local_state_->SetBoolean(prefs::<API key>, true);
}
void MetricsService::PushExternalLog(const std::string& log) {
log_manager_.StoreLog(log, MetricsLog::ONGOING_LOG);
}
// private methods
// Initialization methods
void MetricsService::<API key>() {
const int64 buildtime = MetricsLog::GetBuildTime();
const std::string version = client_->GetVersionString();
bool version_changed = false;
if (local_state_->GetInt64(prefs::<API key>) != buildtime ||
local_state_->GetString(prefs::<API key>) != version) {
local_state_->SetString(prefs::<API key>, version);
local_state_->SetInt64(prefs::<API key>, buildtime);
version_changed = true;
}
log_manager_.<API key>();
session_id_ = local_state_->GetInteger(prefs::kMetricsSessionID);
if (!clean_exit_beacon_.exited_cleanly()) {
IncrementPrefValue(prefs::<API key>);
// Reset flag, and wait until we call <API key>() before
// monitoring.
clean_exit_beacon_.WriteBeaconValue(true);
}
bool <API key> = false;
if (!clean_exit_beacon_.exited_cleanly() || <API key>()) {
// TODO(rtenneti): On windows, consider saving/getting execution_phase from
// the registry.
int execution_phase =
local_state_->GetInteger(prefs::<API key>);
<API key>("Chrome.Browser.<API key>",
execution_phase);
// If the previous session didn't exit cleanly, or if any provider
// explicitly requests it, prepare an initial stability log -
// provided UMA is enabled.
if (state_manager_-><API key>())
<API key> = <API key>();
}
// If no initial stability log was generated and there was a version upgrade,
// clear the stability stats from the previous version (so that they don't get
// attributed to the current version). This could otherwise happen due to a
// number of different edge cases, such as if the last version crashed before
// it could save off a system profile or if UMA reporting is disabled (which
// normally results in stats being accumulated).
if (!<API key> && version_changed)
<API key>();
// Update session ID.
++session_id_;
local_state_->SetInteger(prefs::kMetricsSessionID, session_id_);
// Stability bookkeeping
IncrementPrefValue(prefs::<API key>);
DCHECK_EQ(UNINITIALIZED_PHASE, execution_phase_);
SetExecutionPhase(<API key>, local_state_);
if (!local_state_->GetBoolean(prefs::<API key>)) {
IncrementPrefValue(prefs::<API key>);
// This is marked false when we get a WM_ENDSESSION.
local_state_->SetBoolean(prefs::<API key>, true);
}
// Call GetUptimes() for the first time, thus allowing all later calls
// to record incremental uptimes accurately.
base::TimeDelta <API key>;
base::TimeDelta startup_uptime;
GetUptimes(local_state_, &startup_uptime, &<API key>);
DCHECK_EQ(0, startup_uptime.InMicroseconds());
// For backwards compatibility, leave this intact in case Omaha is checking
// them. prefs::<API key> may also be useless now.
// TODO(jar): Delete these if they have no uses.
local_state_->SetInt64(prefs::<API key>,
base::Time::Now().ToTimeT());
// Bookkeeping for the uninstall metrics.
<API key>(prefs::<API key>);
// Kick off the process of saving the state (so the uptime numbers keep
// getting updated) every n minutes.
<API key>();
}
void MetricsService::OnUserAction(const std::string& action) {
if (!ShouldLogEvents())
return;
log_manager_.current_log()->RecordUserAction(action);
<API key>(false);
}
void MetricsService::<API key>() {
DCHECK_EQ(INIT_TASK_SCHEDULED, state_);
state_ = INIT_TASK_DONE;
// Create the initial log.
if (!<API key>.get()) {
<API key> = CreateLog(MetricsLog::ONGOING_LOG);
<API key>();
}
scheduler_->InitTaskComplete();
}
void MetricsService::GetUptimes(PrefService* pref,
base::TimeDelta* incremental_uptime,
base::TimeDelta* uptime) {
base::TimeTicks now = base::TimeTicks::Now();
// If this is the first call, init |first_updated_time_| and
// |last_updated_time_|.
if (last_updated_time_.is_null()) {
first_updated_time_ = now;
last_updated_time_ = now;
}
*incremental_uptime = now - last_updated_time_;
*uptime = now - first_updated_time_;
last_updated_time_ = now;
const int64 <API key> = incremental_uptime->InSeconds();
if (<API key> > 0) {
int64 metrics_uptime = pref->GetInt64(prefs::<API key>);
metrics_uptime += <API key>;
pref->SetInt64(prefs::<API key>, metrics_uptime);
}
}
void MetricsService::<API key>() {
DCHECK(IsSingleThreaded());
for (size_t i = 0; i < metrics_providers_.size(); ++i)
metrics_providers_[i]-><API key>();
}
// State save methods
void MetricsService::<API key>() {
<API key>.InvalidateWeakPtrs();
base::MessageLoop::current()->PostDelayedTask(FROM_HERE,
base::Bind(&MetricsService::SaveLocalState,
<API key>.GetWeakPtr()),
base::TimeDelta::FromMinutes(<API key>));
}
void MetricsService::SaveLocalState() {
RecordCurrentState(local_state_);
// TODO(jar):110021 Does this run down the batteries????
<API key>();
}
// Recording control methods
void MetricsService::OpenNewLog() {
DCHECK(!log_manager_.current_log());
log_manager_.BeginLoggingWithLog(CreateLog(MetricsLog::ONGOING_LOG));
<API key>();
if (state_ == INITIALIZED) {
// We only need to schedule that run once.
state_ = INIT_TASK_SCHEDULED;
base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&MetricsService::<API key>,
self_ptr_factory_.GetWeakPtr()),
base::TimeDelta::FromSeconds(<API key>));
}
}
void MetricsService::<API key>() {
client_-><API key>(
base::Bind(&MetricsService::<API key>,
self_ptr_factory_.GetWeakPtr()));
}
void MetricsService::CloseCurrentLog() {
if (!log_manager_.current_log())
return;
// TODO(jar): Integrate bounds on log recording more consistently, so that we
// can stop recording logs that are too big much sooner.
if (log_manager_.current_log()->num_events() > kEventLimit) {
<API key>("UMA.Discarded Log Events",
log_manager_.current_log()->num_events());
log_manager_.DiscardCurrentLog();
OpenNewLog(); // Start trivial log to hold our histograms.
}
// Put incremental data (histogram deltas, and realtime stats deltas) at the
// end of all log transmissions (initial log handles this separately).
// <API key> only exists on the derived
// MetricsLog class.
MetricsLog* current_log = log_manager_.current_log();
DCHECK(current_log);
<API key>(current_log);
base::TimeDelta incremental_uptime;
base::TimeDelta uptime;
GetUptimes(local_state_, &incremental_uptime, &uptime);
current_log-><API key>(metrics_providers_.get(),
incremental_uptime, uptime);
current_log-><API key>(metrics_providers_.get());
<API key>();
log_manager_.FinishCurrentLog();
}
void MetricsService::<API key>() {
if (state_ < SENDING_LOGS)
return; // We didn't and still don't have time to get plugin list etc.
CloseCurrentLog();
log_manager_.PersistUnsentLogs();
}
// Transmission of logs methods
void MetricsService::<API key>() {
// Never schedule cutting or uploading of logs in test mode.
if (test_mode_active_)
return;
// Even if reporting is disabled, the scheduler is needed to trigger the
// creation of the initial log, which must be done in order for any logs to be
// persisted on shutdown or backgrounding.
if (recording_active() &&
(reporting_active() || state_ < SENDING_LOGS)) {
scheduler_->Start();
}
}
void MetricsService::<API key>() {
DCHECK(state_ >= INIT_TASK_DONE);
// If we're getting no notifications, then the log won't have much in it, and
// it's possible the computer is about to go to sleep, so don't upload and
// stop the scheduler.
// If recording has been turned off, the scheduler doesn't need to run.
// If reporting is off, proceed if the initial log hasn't been created, since
// that has to happen in order for logs to be cut and stored when persisting.
// TODO(stuartmorgan): Call Stop() on the scheduler when reporting and/or
// recording are turned off instead of letting it fire and then aborting.
if (<API key> ||
!recording_active() ||
(!reporting_active() && state_ >= SENDING_LOGS)) {
scheduler_->Stop();
scheduler_->UploadCancelled();
return;
}
// If there are unsent logs, send the next one. If not, start the asynchronous
// process of finalizing the current log for upload.
if (state_ == SENDING_LOGS && log_manager_.has_unsent_logs()) {
SendNextLog();
} else {
// There are no logs left to send, so start creating a new one.
client_->CollectFinalMetrics(
base::Bind(&MetricsService::<API key>,
self_ptr_factory_.GetWeakPtr()));
}
}
void MetricsService::<API key>() {
// If somehow there is a log upload in progress, we return and hope things
// work out. The scheduler isn't informed since if this happens, the scheduler
// will get a response from the upload.
DCHECK(!<API key>);
if (<API key>)
return;
// Abort if metrics were turned off during the final info gathering.
if (!recording_active()) {
scheduler_->Stop();
scheduler_->UploadCancelled();
return;
}
if (state_ == INIT_TASK_DONE) {
<API key>();
} else {
DCHECK_EQ(SENDING_LOGS, state_);
CloseCurrentLog();
OpenNewLog();
}
SendNextLog();
}
void MetricsService::SendNextLog() {
DCHECK_EQ(SENDING_LOGS, state_);
if (!reporting_active()) {
scheduler_->Stop();
scheduler_->UploadCancelled();
return;
}
if (!log_manager_.has_unsent_logs()) {
// Should only get here if serializing the log failed somehow.
// Just tell the scheduler it was uploaded and wait for the next log
// interval.
scheduler_->UploadFinished(true, log_manager_.has_unsent_logs());
return;
}
if (!log_manager_.has_staged_log())
log_manager_.<API key>();
SendStagedLog();
}
bool MetricsService::<API key>() {
// Check whether any metrics provider has stability metrics.
for (size_t i = 0; i < metrics_providers_.size(); ++i) {
if (metrics_providers_[i]->HasStabilityMetrics())
return true;
}
return false;
}
bool MetricsService::<API key>() {
DCHECK_EQ(INITIALIZED, state_);
scoped_ptr<MetricsLog> <API key>(
CreateLog(MetricsLog::<API key>));
// Do not call <API key> here because the stability
// log describes stats from the _previous_ session.
if (!<API key>-><API key>())
return false;
log_manager_.PauseCurrentLog();
log_manager_.BeginLoggingWithLog(<API key>.Pass());
// Note: Some stability providers may record stability stats via histograms,
// so this call has to be after BeginLoggingWithLog().
log_manager_.current_log()-><API key>(
metrics_providers_.get(), base::TimeDelta(), base::TimeDelta());
<API key>();
// Note: <API key>() intentionally not called since this log is for
// stability stats from a previous session only.
log_manager_.FinishCurrentLog();
log_manager_.ResumePausedLog();
// Store unsent logs, including the stability log that was just saved, so
// that they're not lost in case of a crash before upload time.
log_manager_.PersistUnsentLogs();
return true;
}
void MetricsService::<API key>() {
DCHECK_EQ(INIT_TASK_DONE, state_);
<API key>(<API key>.get());
base::TimeDelta incremental_uptime;
base::TimeDelta uptime;
GetUptimes(local_state_, &incremental_uptime, &uptime);
// Histograms only get written to the current log, so make the new log current
// before writing them.
log_manager_.PauseCurrentLog();
log_manager_.BeginLoggingWithLog(<API key>.Pass());
// Note: Some stability providers may record stability stats via histograms,
// so this call has to be after BeginLoggingWithLog().
MetricsLog* current_log = log_manager_.current_log();
current_log-><API key>(metrics_providers_.get(),
base::TimeDelta(), base::TimeDelta());
current_log-><API key>(metrics_providers_.get());
<API key>();
log_manager_.FinishCurrentLog();
log_manager_.ResumePausedLog();
// Store unsent logs, including the initial log that was just saved, so
// that they're not lost in case of a crash before upload time.
log_manager_.PersistUnsentLogs();
state_ = SENDING_LOGS;
}
void MetricsService::SendStagedLog() {
DCHECK(log_manager_.has_staged_log());
if (!log_manager_.has_staged_log())
return;
DCHECK(!<API key>);
<API key> = true;
if (!log_uploader_) {
log_uploader_ = client_->CreateUploader(
base::Bind(&MetricsService::OnLogUploadComplete,
self_ptr_factory_.GetWeakPtr()));
}
const std::string hash =
base::HexEncode(log_manager_.staged_log_hash().data(),
log_manager_.staged_log_hash().size());
bool success = log_uploader_->UploadLog(log_manager_.staged_log(), hash);
<API key>("UMA.UploadCreation", success);
if (!success) {
// Skip this upload and hope things work out next time.
log_manager_.DiscardStagedLog();
scheduler_->UploadCancelled();
<API key> = false;
return;
}
<API key>(true);
}
void MetricsService::OnLogUploadComplete(int response_code) {
DCHECK_EQ(SENDING_LOGS, state_);
DCHECK(<API key>);
<API key> = false;
// Log a histogram to track response success vs. failure rates.
<API key>("UMA.<API key>.Protobuf",
<API key>(response_code),
<API key>);
bool upload_succeeded = response_code == 200;
// Provide boolean for error recovery (allow us to ignore response_code).
bool discard_log = false;
const size_t log_size = log_manager_.staged_log().length();
if (upload_succeeded) {
<API key>("UMA.LogSize.OnSuccess", log_size / 1024);
} else if (log_size > <API key>) {
<API key>("UMA.Large Rejected Log was Discarded",
static_cast<int>(log_size));
discard_log = true;
} else if (response_code == 400) {
// Bad syntax. Retransmission won't work.
discard_log = true;
}
if (upload_succeeded || discard_log) {
log_manager_.DiscardStagedLog();
// Store the updated list to disk now that the removed log is uploaded.
log_manager_.PersistUnsentLogs();
}
// Error 400 indicates a problem with the log, not with the server, so
// don't consider that a sign that the server is in trouble.
bool server_is_healthy = upload_succeeded || response_code == 400;
scheduler_->UploadFinished(server_is_healthy, log_manager_.has_unsent_logs());
if (server_is_healthy)
client_->OnLogUploadComplete();
}
void MetricsService::IncrementPrefValue(const char* path) {
int value = local_state_->GetInteger(path);
local_state_->SetInteger(path, value + 1);
}
void MetricsService::<API key>(const char* path) {
int64 value = local_state_->GetInt64(path);
local_state_->SetInt64(path, value + 1);
}
bool MetricsService::<API key>() {
CHECK(<API key> == CLEANLY_SHUTDOWN ||
<API key> == NEED_TO_SHUTDOWN);
return <API key> == CLEANLY_SHUTDOWN;
}
void MetricsService::<API key>(
<API key>* observer) {
<API key>.AddObserver(observer);
if (!<API key>.empty())
observer-><API key>(<API key>);
}
void MetricsService::<API key>(
<API key>* observer) {
<API key>.RemoveObserver(observer);
}
void MetricsService::<API key>(
const SyntheticTrialGroup& trial) {
for (size_t i = 0; i < <API key>.size(); ++i) {
if (<API key>[i].id.name == trial.id.name) {
if (<API key>[i].id.group != trial.id.group) {
<API key>[i].id.group = trial.id.group;
<API key>[i].start_time = base::TimeTicks::Now();
<API key>();
}
return;
}
}
SyntheticTrialGroup trial_group = trial;
trial_group.start_time = base::TimeTicks::Now();
<API key>.push_back(trial_group);
<API key>();
}
void MetricsService::<API key>(
scoped_ptr<MetricsProvider> provider) {
DCHECK_EQ(INITIALIZED, state_);
metrics_providers_.push_back(provider.release());
}
void MetricsService::<API key>(
scoped_refptr<base::<API key>> task_runner) {
state_manager_-><API key>(task_runner);
}
void MetricsService::<API key>() {
FOR_EACH_OBSERVER(<API key>, <API key>,
<API key>(<API key>));
}
void MetricsService::<API key>(
std::vector<variations::ActiveGroupId>* synthetic_trials) {
DCHECK(synthetic_trials);
synthetic_trials->clear();
const MetricsLog* current_log = log_manager_.current_log();
for (size_t i = 0; i < <API key>.size(); ++i) {
if (<API key>[i].start_time <= current_log->creation_time())
synthetic_trials->push_back(<API key>[i].id);
}
}
scoped_ptr<MetricsLog> MetricsService::CreateLog(MetricsLog::LogType log_type) {
return make_scoped_ptr(new MetricsLog(state_manager_->client_id(),
session_id_,
log_type,
client_,
local_state_));
}
void MetricsService::<API key>(MetricsLog* log) {
std::vector<variations::ActiveGroupId> synthetic_trials;
<API key>(&synthetic_trials);
log->RecordEnvironment(metrics_providers_.get(), synthetic_trials,
GetInstallDate(), <API key>());
<API key>("UMA.SyntheticTrials.Count",
synthetic_trials.size());
}
void MetricsService::<API key>() {
DCHECK(log_manager_.current_log());
<API key>.PrepareDeltas(
base::Histogram::kNoFlags, base::Histogram::<API key>);
}
void MetricsService::<API key>() {
DCHECK(log_manager_.current_log());
<API key>.PrepareDeltas(
base::Histogram::kNoFlags, base::Histogram::<API key>);
}
void MetricsService::LogCleanShutdown() {
// Redundant setting to assure that we always reset this value at shutdown
// (and that we don't use some alternate path, and not call LogCleanShutdown).
<API key> = CLEANLY_SHUTDOWN;
clean_exit_beacon_.WriteBeaconValue(true);
RecordCurrentState(local_state_);
local_state_->SetInteger(prefs::<API key>,
MetricsService::SHUTDOWN_COMPLETE);
}
bool MetricsService::ShouldLogEvents() {
// We simply don't log events to UMA if there is a single incognito
// session visible. The problem is that we always notify using the orginal
// profile in order to simplify notification processing.
return !client_-><API key>();
}
void MetricsService::<API key>(const char* path, bool value) {
DCHECK(IsSingleThreaded());
local_state_->SetBoolean(path, value);
RecordCurrentState(local_state_);
}
void MetricsService::RecordCurrentState(PrefService* pref) {
pref->SetInt64(prefs::<API key>,
base::Time::Now().ToTimeT());
}
} // namespace metrics
|
using System;
using System.Reflection;
using Atomixilc.Machine;
using Atomixilc.Attributes;
using Atomixilc.Machine.x86;
namespace Atomixilc.IL
{
[ILImpl(ILCode.Cgt)]
internal class Cgt_il : MSIL
{
public Cgt_il()
: base(ILCode.Cgt)
{
}
internal override void Execute(Options Config, OpCodeType xOp, MethodBase method, Optimizer Optimizer)
{
if (Optimizer.vStack.Count < 2)
throw new Exception("Internal Compiler Error: vStack.Count < 2");
var itemA = Optimizer.vStack.Pop();
var itemB = Optimizer.vStack.Pop();
var xCurrentLabel = Helper.GetLabel(xOp.Position);
var xNextLabel = Helper.GetLabel(xOp.NextPosition);
var size = Math.Max(Helper.GetTypeSize(itemA.OperandType, Config.TargetPlatform),
Helper.GetTypeSize(itemB.OperandType, Config.TargetPlatform));
/* The stack transitional behavior, in sequential order, is:
* value1 is pushed onto the stack.
* value2 is pushed onto the stack.
* value2 and value1 are popped from the stack; cgt tests if value1 is greater than value2.
* If value1 is greater than value2, 1 is pushed onto the stack; otherwise 0 is pushed onto the stack.
*/
switch (Config.TargetPlatform)
{
case Architecture.x86:
{
if (itemA.IsFloat || itemB.IsFloat || size > 4)
throw new Exception(string.Format("UnImplemented '{0}'", msIL));
if (!itemA.SystemStack || !itemB.SystemStack)
throw new Exception(string.Format("<API key> '{0}'", msIL));
new Pop { DestinationReg = Register.EAX };
new Pop { DestinationReg = Register.EDX };
new Cmp { DestinationReg = Register.EDX, SourceReg = Register.EAX };
new Setg { DestinationReg = Register.AL };
new Movzx { DestinationReg = Register.EAX, SourceReg = Register.AL, Size = 8 };
new Push { DestinationReg = Register.EAX };
Optimizer.vStack.Push(new StackItem(typeof(bool)));
Optimizer.SaveStack(xOp.NextPosition);
}
break;
default:
throw new Exception(string.Format("Unsupported target platform '{0}' for MSIL '{1}'", Config.TargetPlatform, msIL));
}
}
}
}
|
{{ define "footer" }}
<div class="ui inverted footer vertical segment">
<div class="ui stackable center aligned page grid">
<!
<div class="ten wide column">
<div class="ui three column center aligned stackable grid">
<div class="column">
<h5 class="ui inverted header">Courses</h5>
<div class="ui inverted link list">
<a class="item">Registration</a>
<a class="item">Course Calendar</a>
<a class="item">Professors</a>
</div>
</div>
<div class="column">
<h5 class="ui inverted header">Library</h5>
<div class="ui inverted link list">
<a class="item">A-Z</a>
<a class="item">Most Popular</a>
<a class="item">Recently Changed</a>
</div>
</div>
<div class="column">
<h5 class="ui inverted header">Community</h5>
<div class="ui inverted link list">
<a class="item">BBS</a>
<a class="item">Careers</a>
<a class="item">Privacy Policy</a>
</div>
</div>
</div>
</div>
<div class="six wide column">
<h5 class="ui inverted header">Contact Us</h5>
<addr>
22 Acacia Avenue <br>
Chiswick, London <br>
</addr>
<p>(44) 123-4567</p>
</div>
</div>
</div>
{{ end }}
|
package com.github.koraktor.steamcondenser.steam.community;
import static com.github.koraktor.steamcondenser.steam.community.XMLUtil.loadXml;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.powermock.api.mockito.PowerMockito.mockStatic;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.<API key>;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import com.github.koraktor.steamcondenser.steam.community.portal2.Portal2Stats;
/**
* @author Guto Maia
*/
@RunWith(PowerMockRunner.class)
@PrepareForTest({ <API key>.class, DocumentBuilder.class })
public class Portal2StatsTest extends StatsTestCase<Portal2Stats>{
public Portal2StatsTest() {
super("gutomaia", "portal2");
}
@Test
public void getPortal2Stats() throws Exception {
assertEquals("Portal 2", stats.getGameName());
assertEquals("Portal2", stats.getGameFriendlyName());
assertEquals(620, stats.getAppId());
assertEquals("0", stats.getHoursPlayed());
assertEquals(76561197985077150l, stats.getSteamId64());
}
@Test
public void achievements() throws Exception {
assertEquals(17, stats.getAchievementsDone());
}
}
|
package com.atlassian.pageobjects.components.aui;
import com.atlassian.pageobjects.PageBinder;
import com.atlassian.pageobjects.binder.Init;
import com.atlassian.pageobjects.binder.<API key>;
import com.atlassian.pageobjects.components.TabbedComponent;
import com.atlassian.pageobjects.elements.PageElement;
import com.atlassian.pageobjects.elements.PageElementFinder;
import com.atlassian.pageobjects.elements.query.Poller;
import org.openqa.selenium.By;
import javax.inject.Inject;
import java.util.List;
/**
* Represents a tabbed content area created via AUI.
*
* This is an example of a reusable components.
*/
public class AuiTabs implements TabbedComponent
{
@Inject
protected PageBinder pageBinder;
@Inject
protected PageElementFinder elementFinder;
private final By rootLocator;
private PageElement rootElement;
public AuiTabs(By locator)
{
this.rootLocator = locator;
}
@Init
public void initialize()
{
this.rootElement = elementFinder.find(rootLocator);
}
public PageElement selectedTab()
{
List<PageElement> items = rootElement.find(By.className("tabs-menu")).findAll(By.tagName("li"));
for(int i = 0; i < items.size(); i++)
{
PageElement tab = items.get(i);
if(tab.hasClass("active-tab"))
{
return tab;
}
}
throw new <API key>("A tab must be active.", this);
}
public PageElement selectedView()
{
List<PageElement> panes = rootElement.findAll(By.className("tabs-pane"));
for(int i = 0; i < panes.size(); i++)
{
PageElement pane = panes.get(i);
if(pane.hasClass("active-pane"))
{
return pane;
}
}
throw new <API key>("A pane must be active", this);
}
public List<PageElement> tabs()
{
return rootElement.find(By.className("tabs-menu")).findAll(By.tagName("li"));
}
public PageElement openTab(String tabText)
{
List<PageElement> tabs = rootElement.find(By.className("tabs-menu")).findAll(By.tagName("a"));
for(int i = 0; i < tabs.size(); i++)
{
if(tabs.get(i).getText().equals(tabText))
{
PageElement listItem = tabs.get(i);
listItem.click();
// find the pane and wait until it has class "active-pane"
String tabViewHref = listItem.getAttribute("href");
String tabViewClassName = tabViewHref.substring(tabViewHref.indexOf('
PageElement pane = rootElement.find(By.id(tabViewClassName));
Poller.waitUntilTrue(pane.timed().hasClass("active-pane"));
return pane;
}
}
throw new <API key>("Tab not found", this);
}
public PageElement openTab(PageElement tab)
{
String tabIdentifier = tab.getText();
return openTab(tabIdentifier);
}
}
|
<?php
/**
* iDatabase
*
* @author young
* @version 2013.11.22
*
*/
namespace Idatabase\Controller;
use My\Common\Controller\Action;
class ImportController extends Action
{
/**
* mongocollection
*
* @var object
*/
private $_data;
/**
* mongocollection
*
* @var object
*/
private $_structure;
/**
* mongocollection
*
* @var object
*/
private $_collection;
/**
*
*
* @var string
*/
private $_project_id = '';
/**
* alias_id__toString()
*
* @var string
*/
private $_collection_id = '';
/**
*
*
* @var string
*/
private $_collection_name = '';
/**
*
*
* @var array
*/
private $_schema = null;
/**
*
*
* @var array
*/
private $_fields = array();
/**
* Gearman
*
* @var object
*/
private $_gmClient;
/**
*
*
* @var object
*/
private $_file;
/**
*
*
* @see \My\Common\ActionController::init()
*/
public function init()
{
resetTimeMemLimit();
$this->_project_id = isset($_REQUEST['__PROJECT_ID__']) ? trim($_REQUEST['__PROJECT_ID__']) : '';
if (empty($this->_project_id))
throw new \Exception('$this->_project_id');
$this->_collection = $this->model('Idatabase\Model\Collection');
$this->_collection_id = isset($_REQUEST['__COLLECTION_ID__']) ? trim($_REQUEST['__COLLECTION_ID__']) : '';
if (empty($this->_collection_id))
throw new \Exception('$this->_collection_id');
$this->_collection_id = $this-><API key>($this->_collection_id);
$this->_collection_name = '<API key>' . $this->_collection_id;
$this->_data = $this->collection($this->_collection_name);
$this->_structure = $this->model('Idatabase\Model\Structure');
$this->_file = $this->model('Idatabase\Model\File');
// gearman
$this->_gmClient = $this->gearman()->client();
$this->getSchema();
}
/**
* gearman
*/
public function importCsvJobAction()
{
// mongoimport
$collection_id = trim($this->params()->fromPost('__COLLECTION_ID__', null));
$physicalDrop = filter_var($this->params()->fromPost('physicalDrop', false), <API key>);
$upload = $this->params()->fromFiles('import');
if (empty($collection_id) || empty($upload)) {
return $this->msg(false, '');
}
$uploadFileNameLower = strtolower($upload['name']);
if (strpos($uploadFileNameLower, '.zip') !== false) {
$bytes = file_get_contents($upload['tmp_name']);
$fileInfo = $this->_file->storeBytesToGridFS($bytes, 'import.zip');
$key = $fileInfo['_id']->__toString();
} else {
if (strpos($uploadFileNameLower, '.csv') === false) {
return $this->msg(false, 'csv');
}
$bytes = file_get_contents($upload['tmp_name']);
if (! detectUTF8($bytes)) {
return $this->msg(false, 'UTF-8');
}
$fileInfo = $this->_file->storeBytesToGridFS($bytes, 'import.csv');
$key = $fileInfo['_id']->__toString();
}
$workload = array();
$workload['key'] = $key;
$workload['collection_id'] = $collection_id;
$workload['physicalDrop'] = $physicalDrop;
// $jobHandle = $this->_gmClient->doBackground('dataImport', serialize($workload), $key);
$jobHandle = $this->_gmClient->doBackground('bsonImport', serialize($workload), $key);
$stat = $this->_gmClient->jobStatus($jobHandle);
if (isset($stat[0]) && $stat[0]) {
return $this->msg(true, '(1w/s)');
} else {
return $this->msg(false, '');
}
}
public function importAction()
{
try {
$importSheetName = trim($this->params()->fromPost('sheetName', null));
$file = $this->params()->fromFiles('import', null);
if ($importSheetName == null) {
return $this->msg(false, 'sheet');
}
if ($file == null) {
return $this->msg(false, 'Excel');
}
if ($file['error'] === UPLOAD_ERR_OK) {
$fileName = $file['name'];
$filePath = $file['tmp_name'];
$ext = strtolower(pathinfo($fileName, PATHINFO_EXTENSION));
switch ($ext) {
case 'xlsx':
$inputFileType = 'Excel2007';
break;
default:
return $this->msg(false, ',*.xlsx');
}
$objReader = \PHPExcel_IOFactory::createReader($inputFileType);
$objReader->setReadDataOnly(true);
$objReader->setLoadSheetsOnly($importSheetName);
$objPHPExcel = $objReader->load($filePath);
if (! in_array($importSheetName, array_values($objPHPExcel->getSheetNames()))) {
return $this->msg(false, 'Sheet:"' . $importSheetName . '",Excel');
}
$objPHPExcel-><API key>($importSheetName);
$objActiveSheet = $objPHPExcel->getActiveSheet();
$sheetData = $objActiveSheet->toArray(null, true, true, true);
$objPHPExcel-><API key>();
unset($objReader, $objPHPExcel, $objActiveSheet);
if (empty($sheetData)) {
return $this->msg(false, '');
}
$firstRow = array_shift($sheetData);
if (count($firstRow) == 0) {
return $this->msg(false, '');
}
$titles = array();
foreach ($firstRow as $col => $value) {
$value = trim($value);
if (in_array($value, array_keys($this->_schema), true)) {
$titles[$col] = $this->_schema[$value];
} else
if (in_array($value, array_values($this->_schema), true)) {
$titles[$col] = $value;
}
}
if (count($titles) == 0) {
return $this->msg(false, '');
}
array_walk($sheetData, function ($row, $rowNumber) use($titles)
{
$insertData = array();
foreach ($titles as $col => $colName) {
$insertData[$colName] = formatData($row[$col], $this->_fields[$colName]);
}
$this->_data-><API key>($insertData);
unset($insertData);
});
// bson
// $bson = '';
// foreach ($sheetData as $rowNumber=>$row) {
// $insertData = array();
// foreach ($titles as $col => $colName) {
// $insertData[$colName] = formatData($row[$col], $this->_fields[$colName]);
// $bson .= bson_encode($insertData);
unset($sheetData);
return $this->msg(true, '');
} else {
return $this->msg(false, '');
}
} catch (\Exception $e) {
fb(exceptionMsg($e), \FirePHP::LOG);
return $this->msg(false, '');
}
}
/**
*
*
* @return array
*/
private function getSchema()
{
$this->_schema = array();
$this->_fields = array();
$cursor = $this->_structure->find(array(
'collection_id' => $this->_collection_id
));
while ($cursor->hasNext()) {
$row = $cursor->getNext();
$this->_schema[$row['label']] = $row['field'];
$this->_fields[$row['field']] = $row['type'];
}
return true;
}
/**
* _id
*
* @param string $name
* @throws \Exception or string
*/
private function <API key>($name)
{
try {
new \MongoId($name);
return $name;
} catch (\MongoException $ex) {}
$collectionInfo = $this->_collection->findOne(array(
'project_id' => $this->_project_id,
'name' => $name
));
if ($collectionInfo == null) {
throw new \Exception('');
}
return $collectionInfo['_id']->__toString();
}
}
|
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model app\models\<API key> */
/* @var $form yii\widgets\ActiveForm */
?>
<div class="<API key>">
<?php $form = ActiveForm::begin([
'action' => ['index'],
'method' => 'get',
]); ?>
<?= $form->field($model, 'id_imj') ?>
<?= $form->field($model, 'id_akun') ?>
<?= $form->field($model, 'nomor_imj') ?>
<?= $form->field($model, 'tglDikeluarkan_imj') ?>
<?= $form->field($model, 'tglPengajuan_imj') ?>
<?php // echo $form->field($model, 'kepada_imj') ?>
<?php // echo $form->field($model, 'alamat_imj') ?>
<?php // echo $form->field($model, 'namaAcara_imj') ?>
<?php // echo $form->field($model, 'jalanDitutup_imj') ?>
<?php // echo $form->field($model, '<API key>') ?>
<?php // echo $form->field($model, 'tglAcara_imj') ?>
<?php // echo $form->field($model, 'JamAcara_imj') ?>
<?php // echo $form->field($model, 'tglAcaraSelesai_imj') ?>
<?php // echo $form->field($model, 'jamAcaraSelesai_imj') ?>
<?php // echo $form->field($model, 'tembusan_imj') ?>
<?php // echo $form->field($model, 'keterangan_imj') ?>
<div class="form-group">
<?= Html::submitButton('Search', ['class' => 'btn btn-primary']) ?>
<?= Html::resetButton('Reset', ['class' => 'btn btn-default']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
|
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title>Date parser test — 100<=x<=999 and January<=y<=December and 100<=z<=999 — 100 december 100</title>
<script src="../date_test.js"></script>
<p>Failed (Script did not run)</p>
<script>
test_date_invalid("100 december 100", "Invalid Date")
</script>
</html>
|
// <API key>.hpp
#ifndef <API key>
#define <API key>
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include <boost/asio/detail/config.hpp>
#include <cstddef>
#include <boost/asio/<API key>.hpp>
#include <boost/asio/buffer.hpp>
#include <boost/asio/<API key>.hpp>
#include <boost/asio/detail/bind_handler.hpp>
#include <boost/asio/detail/<API key>.hpp>
#include <boost/asio/detail/noncopyable.hpp>
#include <boost/asio/detail/type_traits.hpp>
#include <boost/asio/error.hpp>
#include <boost/asio/io_service.hpp>
#include <boost/asio/write.hpp>
#include <boost/asio/detail/push_options.hpp>
namespace pdalboost {} namespace boost = pdalboost; namespace pdalboost {
namespace asio {
Adds buffering to the write-related operations of a stream.
/**
* The <API key> class template can be used to add buffering to the
* synchronous and asynchronous write operations of a stream.
*
* @par Thread Safety
* @e Distinct @e objects: Safe.@n
* @e Shared @e objects: Unsafe.
*
* @par Concepts:
* AsyncReadStream, AsyncWriteStream, Stream, SyncReadStream, SyncWriteStream.
*/
template <typename Stream>
class <API key>
: private noncopyable
{
public:
The type of the next layer.
typedef typename remove_reference<Stream>::type next_layer_type;
The type of the lowest layer.
typedef typename next_layer_type::lowest_layer_type lowest_layer_type;
#if defined(<API key>)
The default buffer size.
static const std::size_t default_buffer_size = <API key>;
#else
<API key>(std::size_t, default_buffer_size = 1024);
#endif
Construct, passing the specified argument to initialise the next layer.
template <typename Arg>
explicit <API key>(Arg& a)
: next_layer_(a),
storage_(default_buffer_size)
{
}
Construct, passing the specified argument to initialise the next layer.
template <typename Arg>
<API key>(Arg& a, std::size_t buffer_size)
: next_layer_(a),
storage_(buffer_size)
{
}
Get a reference to the next layer.
next_layer_type& next_layer()
{
return next_layer_;
}
Get a reference to the lowest layer.
lowest_layer_type& lowest_layer()
{
return next_layer_.lowest_layer();
}
Get a const reference to the lowest layer.
const lowest_layer_type& lowest_layer() const
{
return next_layer_.lowest_layer();
}
Get the io_service associated with the object.
pdalboost::asio::io_service& get_io_service()
{
return next_layer_.get_io_service();
}
Close the stream.
void close()
{
next_layer_.close();
}
Close the stream.
pdalboost::system::error_code close(pdalboost::system::error_code& ec)
{
return next_layer_.close(ec);
}
Flush all data from the buffer to the next layer. Returns the number of
bytes written to the next layer on the last write operation. Throws an
exception on failure.
std::size_t flush();
Flush all data from the buffer to the next layer. Returns the number of
bytes written to the next layer on the last write operation, or 0 if an
error occurred.
std::size_t flush(pdalboost::system::error_code& ec);
Start an asynchronous flush.
template <typename WriteHandler>
<API key>(WriteHandler,
void (pdalboost::system::error_code, std::size_t))
async_flush(BOOST_ASIO_MOVE_ARG(WriteHandler) handler);
Write the given data to the stream. Returns the number of bytes written.
Throws an exception on failure.
template <typename ConstBufferSequence>
std::size_t write_some(const ConstBufferSequence& buffers);
Write the given data to the stream. Returns the number of bytes written,
or 0 if an error occurred and the error handler did not throw.
template <typename ConstBufferSequence>
std::size_t write_some(const ConstBufferSequence& buffers,
pdalboost::system::error_code& ec);
Start an asynchronous write. The data being written must be valid for the
lifetime of the asynchronous operation.
template <typename ConstBufferSequence, typename WriteHandler>
<API key>(WriteHandler,
void (pdalboost::system::error_code, std::size_t))
async_write_some(const ConstBufferSequence& buffers,
BOOST_ASIO_MOVE_ARG(WriteHandler) handler);
Read some data from the stream. Returns the number of bytes read. Throws
an exception on failure.
template <typename <API key>>
std::size_t read_some(const <API key>& buffers)
{
return next_layer_.read_some(buffers);
}
Read some data from the stream. Returns the number of bytes read or 0 if
an error occurred.
template <typename <API key>>
std::size_t read_some(const <API key>& buffers,
pdalboost::system::error_code& ec)
{
return next_layer_.read_some(buffers, ec);
}
Start an asynchronous read. The buffer into which the data will be read
must be valid for the lifetime of the asynchronous operation.
template <typename <API key>, typename ReadHandler>
<API key>(ReadHandler,
void (pdalboost::system::error_code, std::size_t))
async_read_some(const <API key>& buffers,
BOOST_ASIO_MOVE_ARG(ReadHandler) handler)
{
detail::async_result_init<
ReadHandler, void (pdalboost::system::error_code, std::size_t)> init(
<API key>(ReadHandler)(handler));
next_layer_.async_read_some(buffers,
<API key>(<API key>(ReadHandler,
void (pdalboost::system::error_code, std::size_t)))(init.handler));
return init.result.get();
}
Peek at the incoming data on the stream. Returns the number of bytes read.
Throws an exception on failure.
template <typename <API key>>
std::size_t peek(const <API key>& buffers)
{
return next_layer_.peek(buffers);
}
Peek at the incoming data on the stream. Returns the number of bytes read,
or 0 if an error occurred.
template <typename <API key>>
std::size_t peek(const <API key>& buffers,
pdalboost::system::error_code& ec)
{
return next_layer_.peek(buffers, ec);
}
Determine the amount of data that may be read without blocking.
std::size_t in_avail()
{
return next_layer_.in_avail();
}
Determine the amount of data that may be read without blocking.
std::size_t in_avail(pdalboost::system::error_code& ec)
{
return next_layer_.in_avail(ec);
}
private:
Copy data into the internal buffer from the specified source buffer.
Returns the number of bytes copied.
template <typename ConstBufferSequence>
std::size_t copy(const ConstBufferSequence& buffers);
The next layer.
Stream next_layer_;
// The data in the buffer.
detail::<API key> storage_;
};
} // namespace asio
} // namespace pdalboost
#include <boost/asio/detail/pop_options.hpp>
#include <boost/asio/impl/<API key>.hpp>
#endif // <API key>
|
\file reporttimeout.cpp
\brief This file contains the implementation of a JAUS message.
<br>Author(s): Bo Sun
<br>Created: 17 November 2009
<br>Copyright (c) 2009
<br>Applied Cognition and Training in Immersive Virtual Environments
<br>(ACTIVE) Laboratory
<br>Institute for Simulation and Training (IST)
<br>University of Central Florida (UCF)
<br>All rights reserved.
<br>Email: bsun@ist.ucf.edu
<br>Web: http://active.ist.ucf.edu
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
* Neither the name of the ACTIVE LAB, IST, UCF, nor the
names of its contributors may be used to endorse or promote products
derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE ACTIVE LAB''AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL UCF BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "jaus/core/control/reporttimeout.h"
using namespace JAUS;
\brief Constructor, initializes default values.
\param[in] src Source ID of message sender.
\param[in] dest Destination ID of message.
ReportTimeout::ReportTimeout(const Address& dest, const Address& src) : Message(REPORT_TIMEOUT, dest, src)
{
mTimeoutSeconds = 0;
}
\brief Copy constructor.
ReportTimeout::ReportTimeout(const ReportTimeout& message) : Message(REPORT_TIMEOUT)
{
*this = message;
}
\brief Destructor.
ReportTimeout::~ReportTimeout()
{
}
\brief Writes message payload to the packet.
Message contents are written to the packet following the JAUS standard.
\param[out] packet Packet to write payload to.
\return -1 on error, otherwise number of bytes written.
int ReportTimeout::WriteMessageBody(Packet& packet) const
{
int expected = BYTE_SIZE;
int written = 0;
written += packet.Write(mTimeoutSeconds);
return expected == written ? written : -1;
}
\brief Reads message payload from the packet.
Message contents are read from the packet following the JAUS standard.
\param[in] packet Packet containing message payload data to read.
\return -1 on error, otherwise number of bytes written.
int ReportTimeout::ReadMessageBody(const Packet& packet)
{
int expected = BYTE_SIZE;
int read = 0;
read += packet.Read(mTimeoutSeconds);
return expected == read ? read : -1;
}
\brief Clears message payload data.
void ReportTimeout::ClearMessageBody()
{
mTimeoutSeconds = 0;
}
\brief Runs a test case to validate the message class.
\return 1 on success, otherwise 0.
int ReportTimeout::RunTestCase() const
{
int result = 0;
Packet packet;
ReportTimeout msg1, msg2;
msg1.SetTimeoutSeconds(100);
if( msg1.WriteMessageBody(packet) != -1 &&
msg2.ReadMessageBody(packet) != -1 &&
msg1.GetTimeoutSeconds() == msg2.GetTimeoutSeconds())
{
result = 1;
}
return result;
}
\brief Sets equal to.
ReportTimeout& ReportTimeout::operator=(const ReportTimeout& message)
{
if(this != &message)
{
CopyHeaderData(&message);
mTimeoutSeconds = message.mTimeoutSeconds;
}
return *this;
}
/* End of File */
|
html {
font-family: sans-serif;
-ms-text-size-adjust: 100%;
-<API key>: 100%;
}
body {
margin: 0;
}
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary {
display: block;
}
audio,
canvas,
progress,
video {
display: inline-block;
vertical-align: baseline;
}
audio:not([controls]) {
display: none;
height: 0;
}
[hidden],
template {
display: none;
}
a {
background: transparent;
}
a:active,
a:hover {
outline: 0;
}
abbr[title] {
border-bottom: 1px dotted;
}
b,
strong {
font-weight: bold;
}
dfn {
font-style: italic;
}
h1 {
font-size: 2em;
margin: 0.67em 0;
}
mark {
background: #ff0;
color: #000;
}
small {
font-size: 80%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sup {
top: -0.5em;
}
sub {
bottom: -0.25em;
}
img {
border: 0;
}
svg:not(:root) {
overflow: hidden;
}
figure {
margin: 1em 40px;
}
hr {
-moz-box-sizing: content-box;
box-sizing: content-box;
height: 0;
}
pre {
overflow: auto;
}
code,
kbd,
pre,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
button,
input,
optgroup,
select,
textarea {
color: inherit;
font: inherit;
margin: 0;
}
button {
overflow: visible;
}
button,
select {
text-transform: none;
}
button,
html input[type="button"],
input[type="reset"],
input[type="submit"] {
-webkit-appearance: button;
cursor: pointer;
}
button[disabled],
html input[disabled] {
cursor: default;
}
button::-moz-focus-inner,
input::-moz-focus-inner {
border: 0;
padding: 0;
}
input {
line-height: normal;
}
input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box;
padding: 0;
}
input[type="number"]::-<API key>,
input[type="number"]::-<API key> {
height: auto;
}
input[type="search"] {
-webkit-appearance: textfield;
-moz-box-sizing: content-box;
-webkit-box-sizing: content-box;
box-sizing: content-box;
}
input[type="search"]::-<API key>,
input[type="search"]::-<API key> {
-webkit-appearance: none;
}
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
legend {
border: 0;
padding: 0;
}
textarea {
overflow: auto;
}
optgroup {
font-weight: bold;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
td,
th {
padding: 0;
}
@media print {
* {
text-shadow: none !important;
color: #000 !important;
background: transparent !important;
box-shadow: none !important;
}
a,
a:visited {
text-decoration: underline;
}
a[href]:after {
content: " (" attr(href) ")";
}
abbr[title]:after {
content: " (" attr(title) ")";
}
a[href^="javascript:"]:after,
a[href^="#"]:after {
content: "";
}
pre,
blockquote {
border: 1px solid #999;
page-break-inside: avoid;
}
thead {
display: table-header-group;
}
tr,
img {
page-break-inside: avoid;
}
img {
max-width: 100% !important;
}
p,
h2,
h3 {
orphans: 3;
widows: 3;
}
h2,
h3 {
page-break-after: avoid;
}
select {
background: #fff !important;
}
.navbar {
display: none;
}
.table td,
.table th {
background-color: #fff !important;
}
.btn > .caret,
.dropup > .btn > .caret {
border-top-color: #000 !important;
}
.label {
border: 1px solid #000;
}
.table {
border-collapse: collapse !important;
}
.table-bordered th,
.table-bordered td {
border: 1px solid #ddd !important;
}
}
@font-face {
font-family: 'Glyphicons Halflings';
src: url('bootstrap-3.2.0/fonts/<API key>.eot');
src: url('bootstrap-3.2.0/fonts/<API key>.eot?#iefix') format('embedded-opentype'), url('bootstrap-3.2.0/fonts/<API key>.woff') format('woff'), url('bootstrap-3.2.0/fonts/<API key>.ttf') format('truetype'), url('bootstrap-3.2.0/fonts/<API key>.svg#<API key>') format('svg');
}
.glyphicon {
position: relative;
top: 1px;
display: inline-block;
font-family: 'Glyphicons Halflings';
font-style: normal;
font-weight: normal;
line-height: 1;
-<API key>: antialiased;
-<API key>: grayscale;
}
.glyphicon-asterisk:before {
content: "\2a";
}
.glyphicon-plus:before {
content: "\2b";
}
.glyphicon-euro:before {
content: "\20ac";
}
.glyphicon-minus:before {
content: "\2212";
}
.glyphicon-cloud:before {
content: "\2601";
}
.glyphicon-envelope:before {
content: "\2709";
}
.glyphicon-pencil:before {
content: "\270f";
}
.glyphicon-glass:before {
content: "\e001";
}
.glyphicon-music:before {
content: "\e002";
}
.glyphicon-search:before {
content: "\e003";
}
.glyphicon-heart:before {
content: "\e005";
}
.glyphicon-star:before {
content: "\e006";
}
.<API key>:before {
content: "\e007";
}
.glyphicon-user:before {
content: "\e008";
}
.glyphicon-film:before {
content: "\e009";
}
.glyphicon-th-large:before {
content: "\e010";
}
.glyphicon-th:before {
content: "\e011";
}
.glyphicon-th-list:before {
content: "\e012";
}
.glyphicon-ok:before {
content: "\e013";
}
.glyphicon-remove:before {
content: "\e014";
}
.glyphicon-zoom-in:before {
content: "\e015";
}
.glyphicon-zoom-out:before {
content: "\e016";
}
.glyphicon-off:before {
content: "\e017";
}
.glyphicon-signal:before {
content: "\e018";
}
.glyphicon-cog:before {
content: "\e019";
}
.glyphicon-trash:before {
content: "\e020";
}
.glyphicon-home:before {
content: "\e021";
}
.glyphicon-file:before {
content: "\e022";
}
.glyphicon-time:before {
content: "\e023";
}
.glyphicon-road:before {
content: "\e024";
}
.<API key>:before {
content: "\e025";
}
.glyphicon-download:before {
content: "\e026";
}
.glyphicon-upload:before {
content: "\e027";
}
.glyphicon-inbox:before {
content: "\e028";
}
.<API key>:before {
content: "\e029";
}
.glyphicon-repeat:before {
content: "\e030";
}
.glyphicon-refresh:before {
content: "\e031";
}
.glyphicon-list-alt:before {
content: "\e032";
}
.glyphicon-lock:before {
content: "\e033";
}
.glyphicon-flag:before {
content: "\e034";
}
.<API key>:before {
content: "\e035";
}
.<API key>:before {
content: "\e036";
}
.<API key>:before {
content: "\e037";
}
.glyphicon-volume-up:before {
content: "\e038";
}
.glyphicon-qrcode:before {
content: "\e039";
}
.glyphicon-barcode:before {
content: "\e040";
}
.glyphicon-tag:before {
content: "\e041";
}
.glyphicon-tags:before {
content: "\e042";
}
.glyphicon-book:before {
content: "\e043";
}
.glyphicon-bookmark:before {
content: "\e044";
}
.glyphicon-print:before {
content: "\e045";
}
.glyphicon-camera:before {
content: "\e046";
}
.glyphicon-font:before {
content: "\e047";
}
.glyphicon-bold:before {
content: "\e048";
}
.glyphicon-italic:before {
content: "\e049";
}
.<API key>:before {
content: "\e050";
}
.<API key>:before {
content: "\e051";
}
.<API key>:before {
content: "\e052";
}
.<API key>:before {
content: "\e053";
}
.<API key>:before {
content: "\e054";
}
.<API key>:before {
content: "\e055";
}
.glyphicon-list:before {
content: "\e056";
}
.<API key>:before {
content: "\e057";
}
.<API key>:before {
content: "\e058";
}
.<API key>:before {
content: "\e059";
}
.glyphicon-picture:before {
content: "\e060";
}
.<API key>:before {
content: "\e062";
}
.glyphicon-adjust:before {
content: "\e063";
}
.glyphicon-tint:before {
content: "\e064";
}
.glyphicon-edit:before {
content: "\e065";
}
.glyphicon-share:before {
content: "\e066";
}
.glyphicon-check:before {
content: "\e067";
}
.glyphicon-move:before {
content: "\e068";
}
.<API key>:before {
content: "\e069";
}
.<API key>:before {
content: "\e070";
}
.glyphicon-backward:before {
content: "\e071";
}
.glyphicon-play:before {
content: "\e072";
}
.glyphicon-pause:before {
content: "\e073";
}
.glyphicon-stop:before {
content: "\e074";
}
.glyphicon-forward:before {
content: "\e075";
}
.<API key>:before {
content: "\e076";
}
.<API key>:before {
content: "\e077";
}
.glyphicon-eject:before {
content: "\e078";
}
.<API key>:before {
content: "\e079";
}
.<API key>:before {
content: "\e080";
}
.glyphicon-plus-sign:before {
content: "\e081";
}
.<API key>:before {
content: "\e082";
}
.<API key>:before {
content: "\e083";
}
.glyphicon-ok-sign:before {
content: "\e084";
}
.<API key>:before {
content: "\e085";
}
.glyphicon-info-sign:before {
content: "\e086";
}
.<API key>:before {
content: "\e087";
}
.<API key>:before {
content: "\e088";
}
.glyphicon-ok-circle:before {
content: "\e089";
}
.<API key>:before {
content: "\e090";
}
.<API key>:before {
content: "\e091";
}
.<API key>:before {
content: "\e092";
}
.glyphicon-arrow-up:before {
content: "\e093";
}
.<API key>:before {
content: "\e094";
}
.glyphicon-share-alt:before {
content: "\e095";
}
.<API key>:before {
content: "\e096";
}
.<API key>:before {
content: "\e097";
}
.<API key>:before {
content: "\e101";
}
.glyphicon-gift:before {
content: "\e102";
}
.glyphicon-leaf:before {
content: "\e103";
}
.glyphicon-fire:before {
content: "\e104";
}
.glyphicon-eye-open:before {
content: "\e105";
}
.glyphicon-eye-close:before {
content: "\e106";
}
.<API key>:before {
content: "\e107";
}
.glyphicon-plane:before {
content: "\e108";
}
.glyphicon-calendar:before {
content: "\e109";
}
.glyphicon-random:before {
content: "\e110";
}
.glyphicon-comment:before {
content: "\e111";
}
.glyphicon-magnet:before {
content: "\e112";
}
.<API key>:before {
content: "\e113";
}
.<API key>:before {
content: "\e114";
}
.glyphicon-retweet:before {
content: "\e115";
}
.<API key>:before {
content: "\e116";
}
.<API key>:before {
content: "\e117";
}
.<API key>:before {
content: "\e118";
}
.<API key>:before {
content: "\e119";
}
.<API key>:before {
content: "\e120";
}
.glyphicon-hdd:before {
content: "\e121";
}
.glyphicon-bullhorn:before {
content: "\e122";
}
.glyphicon-bell:before {
content: "\e123";
}
.<API key>:before {
content: "\e124";
}
.glyphicon-thumbs-up:before {
content: "\e125";
}
.<API key>:before {
content: "\e126";
}
.<API key>:before {
content: "\e127";
}
.glyphicon-hand-left:before {
content: "\e128";
}
.glyphicon-hand-up:before {
content: "\e129";
}
.glyphicon-hand-down:before {
content: "\e130";
}
.<API key>:before {
content: "\e131";
}
.<API key>:before {
content: "\e132";
}
.<API key>:before {
content: "\e133";
}
.<API key>:before {
content: "\e134";
}
.glyphicon-globe:before {
content: "\e135";
}
.glyphicon-wrench:before {
content: "\e136";
}
.glyphicon-tasks:before {
content: "\e137";
}
.glyphicon-filter:before {
content: "\e138";
}
.glyphicon-briefcase:before {
content: "\e139";
}
.<API key>:before {
content: "\e140";
}
.glyphicon-dashboard:before {
content: "\e141";
}
.glyphicon-paperclip:before {
content: "\e142";
}
.<API key>:before {
content: "\e143";
}
.glyphicon-link:before {
content: "\e144";
}
.glyphicon-phone:before {
content: "\e145";
}
.glyphicon-pushpin:before {
content: "\e146";
}
.glyphicon-usd:before {
content: "\e148";
}
.glyphicon-gbp:before {
content: "\e149";
}
.glyphicon-sort:before {
content: "\e150";
}
.<API key>:before {
content: "\e151";
}
.<API key>:before {
content: "\e152";
}
.<API key>:before {
content: "\e153";
}
.<API key>:before {
content: "\e154";
}
.<API key>:before {
content: "\e155";
}
.<API key>:before {
content: "\e156";
}
.glyphicon-unchecked:before {
content: "\e157";
}
.glyphicon-expand:before {
content: "\e158";
}
.<API key>:before {
content: "\e159";
}
.<API key>:before {
content: "\e160";
}
.glyphicon-log-in:before {
content: "\e161";
}
.glyphicon-flash:before {
content: "\e162";
}
.glyphicon-log-out:before {
content: "\e163";
}
.<API key>:before {
content: "\e164";
}
.glyphicon-record:before {
content: "\e165";
}
.glyphicon-save:before {
content: "\e166";
}
.glyphicon-open:before {
content: "\e167";
}
.glyphicon-saved:before {
content: "\e168";
}
.glyphicon-import:before {
content: "\e169";
}
.glyphicon-export:before {
content: "\e170";
}
.glyphicon-send:before {
content: "\e171";
}
.<API key>:before {
content: "\e172";
}
.<API key>:before {
content: "\e173";
}
.<API key>:before {
content: "\e174";
}
.<API key>:before {
content: "\e175";
}
.<API key>:before {
content: "\e176";
}
.<API key>:before {
content: "\e177";
}
.glyphicon-transfer:before {
content: "\e178";
}
.glyphicon-cutlery:before {
content: "\e179";
}
.glyphicon-header:before {
content: "\e180";
}
.<API key>:before {
content: "\e181";
}
.glyphicon-earphone:before {
content: "\e182";
}
.glyphicon-phone-alt:before {
content: "\e183";
}
.glyphicon-tower:before {
content: "\e184";
}
.glyphicon-stats:before {
content: "\e185";
}
.glyphicon-sd-video:before {
content: "\e186";
}
.glyphicon-hd-video:before {
content: "\e187";
}
.glyphicon-subtitles:before {
content: "\e188";
}
.<API key>:before {
content: "\e189";
}
.<API key>:before {
content: "\e190";
}
.glyphicon-sound-5-1:before {
content: "\e191";
}
.glyphicon-sound-6-1:before {
content: "\e192";
}
.glyphicon-sound-7-1:before {
content: "\e193";
}
.<API key>:before {
content: "\e194";
}
.<API key>:before {
content: "\e195";
}
.<API key>:before {
content: "\e197";
}
.<API key>:before {
content: "\e198";
}
.<API key>:before {
content: "\e199";
}
.<API key>:before {
content: "\e200";
}
* {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
*:before,
*:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
html {
font-size: 10px;
-<API key>: rgba(0, 0, 0, 0);
}
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
line-height: 1.42857143;
color: #333333;
background-color: #ffffff;
}
input,
button,
select,
textarea {
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
a {
color: #428bca;
text-decoration: none;
}
a:hover,
a:focus {
color: #2a6496;
text-decoration: underline;
}
a:focus {
outline: thin dotted;
outline: 5px auto -<API key>;
outline-offset: -2px;
}
figure {
margin: 0;
}
img {
vertical-align: middle;
}
.img-responsive,
.thumbnail > img,
.thumbnail a > img,
.carousel-inner > .item > img,
.carousel-inner > .item > a > img {
display: block;
width: 100% \9;
max-width: 100%;
height: auto;
}
.img-rounded {
border-radius: 6px;
}
.img-thumbnail {
padding: 4px;
line-height: 1.42857143;
background-color: #ffffff;
border: 1px solid #dddddd;
border-radius: 4px;
-webkit-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
display: inline-block;
width: 100% \9;
max-width: 100%;
height: auto;
}
.img-circle {
border-radius: 50%;
}
hr {
margin-top: 20px;
margin-bottom: 20px;
border: 0;
border-top: 1px solid #eeeeee;
}
.sr-only {
position: absolute;
width: 1px;
height: 1px;
margin: -1px;
padding: 0;
overflow: hidden;
clip: rect(0, 0, 0, 0);
border: 0;
}
.sr-only-focusable:active,
.sr-only-focusable:focus {
position: static;
width: auto;
height: auto;
margin: 0;
overflow: visible;
clip: auto;
}
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
font-family: inherit;
font-weight: 500;
line-height: 1.1;
color: inherit;
}
h1 small,
h2 small,
h3 small,
h4 small,
h5 small,
h6 small,
.h1 small,
.h2 small,
.h3 small,
.h4 small,
.h5 small,
.h6 small,
h1 .small,
h2 .small,
h3 .small,
h4 .small,
h5 .small,
h6 .small,
.h1 .small,
.h2 .small,
.h3 .small,
.h4 .small,
.h5 .small,
.h6 .small {
font-weight: normal;
line-height: 1;
color: #777777;
}
h1,
.h1,
h2,
.h2,
h3,
.h3 {
margin-top: 20px;
margin-bottom: 10px;
}
h1 small,
.h1 small,
h2 small,
.h2 small,
h3 small,
.h3 small,
h1 .small,
.h1 .small,
h2 .small,
.h2 .small,
h3 .small,
.h3 .small {
font-size: 65%;
}
h4,
.h4,
h5,
.h5,
h6,
.h6 {
margin-top: 10px;
margin-bottom: 10px;
}
h4 small,
.h4 small,
h5 small,
.h5 small,
h6 small,
.h6 small,
h4 .small,
.h4 .small,
h5 .small,
.h5 .small,
h6 .small,
.h6 .small {
font-size: 75%;
}
h1,
.h1 {
font-size: 36px;
}
h2,
.h2 {
font-size: 30px;
}
h3,
.h3 {
font-size: 24px;
}
h4,
.h4 {
font-size: 18px;
}
h5,
.h5 {
font-size: 14px;
}
h6,
.h6 {
font-size: 12px;
}
p {
margin: 0 0 10px;
}
.lead {
margin-bottom: 20px;
font-size: 16px;
font-weight: 300;
line-height: 1.4;
}
@media (min-width: 768px) {
.lead {
font-size: 21px;
}
}
small,
.small {
font-size: 85%;
}
cite {
font-style: normal;
}
mark,
.mark {
background-color: #fcf8e3;
padding: .2em;
}
.text-left {
text-align: left;
}
.text-right {
text-align: right;
}
.text-center {
text-align: center;
}
.text-justify {
text-align: justify;
}
.text-nowrap {
white-space: nowrap;
}
.text-lowercase {
text-transform: lowercase;
}
.text-uppercase {
text-transform: uppercase;
}
.text-capitalize {
text-transform: capitalize;
}
.text-muted {
color: #777777;
}
.text-primary {
color: #428bca;
}
a.text-primary:hover {
color: #3071a9;
}
.text-success {
color: #3c763d;
}
a.text-success:hover {
color: #2b542c;
}
.text-info {
color: #31708f;
}
a.text-info:hover {
color: #245269;
}
.text-warning {
color: #8a6d3b;
}
a.text-warning:hover {
color: #66512c;
}
.text-danger {
color: #a94442;
}
a.text-danger:hover {
color: #843534;
}
.bg-primary {
color: #fff;
background-color: #428bca;
}
a.bg-primary:hover {
background-color: #3071a9;
}
.bg-success {
background-color: #dff0d8;
}
a.bg-success:hover {
background-color: #c1e2b3;
}
.bg-info {
background-color: #d9edf7;
}
a.bg-info:hover {
background-color: #afd9ee;
}
.bg-warning {
background-color: #fcf8e3;
}
a.bg-warning:hover {
background-color: #f7ecb5;
}
.bg-danger {
background-color: #f2dede;
}
a.bg-danger:hover {
background-color: #e4b9b9;
}
.page-header {
padding-bottom: 9px;
margin: 40px 0 20px;
border-bottom: 1px solid #eeeeee;
}
ul,
ol {
margin-top: 0;
margin-bottom: 10px;
}
ul ul,
ol ul,
ul ol,
ol ol {
margin-bottom: 0;
}
.list-unstyled {
padding-left: 0;
list-style: none;
}
.list-inline {
padding-left: 0;
list-style: none;
margin-left: -5px;
}
.list-inline > li {
display: inline-block;
padding-left: 5px;
padding-right: 5px;
}
dl {
margin-top: 0;
margin-bottom: 20px;
}
dt,
dd {
line-height: 1.42857143;
}
dt {
font-weight: bold;
}
dd {
margin-left: 0;
}
@media (min-width: 768px) {
.dl-horizontal dt {
float: left;
width: 160px;
clear: left;
text-align: right;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.dl-horizontal dd {
margin-left: 180px;
}
}
abbr[title],
abbr[data-original-title] {
cursor: help;
border-bottom: 1px dotted #777777;
}
.initialism {
font-size: 90%;
text-transform: uppercase;
}
blockquote {
padding: 10px 20px;
margin: 0 0 20px;
font-size: 17.5px;
border-left: 5px solid #eeeeee;
}
blockquote p:last-child,
blockquote ul:last-child,
blockquote ol:last-child {
margin-bottom: 0;
}
blockquote footer,
blockquote small,
blockquote .small {
display: block;
font-size: 80%;
line-height: 1.42857143;
color: #777777;
}
blockquote footer:before,
blockquote small:before,
blockquote .small:before {
content: '\2014 \00A0';
}
.blockquote-reverse,
blockquote.pull-right {
padding-right: 15px;
padding-left: 0;
border-right: 5px solid #eeeeee;
border-left: 0;
text-align: right;
}
.blockquote-reverse footer:before,
blockquote.pull-right footer:before,
.blockquote-reverse small:before,
blockquote.pull-right small:before,
.blockquote-reverse .small:before,
blockquote.pull-right .small:before {
content: '';
}
.blockquote-reverse footer:after,
blockquote.pull-right footer:after,
.blockquote-reverse small:after,
blockquote.pull-right small:after,
.blockquote-reverse .small:after,
blockquote.pull-right .small:after {
content: '\00A0 \2014';
}
blockquote:before,
blockquote:after {
content: "";
}
address {
margin-bottom: 20px;
font-style: normal;
line-height: 1.42857143;
}
code,
kbd,
pre,
samp {
font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
}
code {
padding: 2px 4px;
font-size: 90%;
color: #c7254e;
background-color: #f9f2f4;
border-radius: 4px;
}
kbd {
padding: 2px 4px;
font-size: 90%;
color: #ffffff;
background-color: #333333;
border-radius: 3px;
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.25);
}
kbd kbd {
padding: 0;
font-size: 100%;
box-shadow: none;
}
pre {
display: block;
padding: 9.5px;
margin: 0 0 10px;
font-size: 13px;
line-height: 1.42857143;
word-break: break-all;
word-wrap: break-word;
color: #333333;
background-color: #f5f5f5;
border: 1px solid #cccccc;
border-radius: 4px;
}
pre code {
padding: 0;
font-size: inherit;
color: inherit;
white-space: pre-wrap;
background-color: transparent;
border-radius: 0;
}
.pre-scrollable {
max-height: 340px;
overflow-y: scroll;
}
.container {
margin-right: auto;
margin-left: auto;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 768px) {
.container {
width: 750px;
}
}
@media (min-width: 992px) {
.container {
width: 970px;
}
}
@media (min-width: 1200px) {
.container {
width: 1170px;
}
}
.container-fluid {
margin-right: auto;
margin-left: auto;
padding-left: 15px;
padding-right: 15px;
}
.row {
margin-left: -15px;
margin-right: -15px;
}
.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 {
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 {
float: left;
}
.col-xs-12 {
width: 100%;
}
.col-xs-11 {
width: 91.66666667%;
}
.col-xs-10 {
width: 83.33333333%;
}
.col-xs-9 {
width: 75%;
}
.col-xs-8 {
width: 66.66666667%;
}
.col-xs-7 {
width: 58.33333333%;
}
.col-xs-6 {
width: 50%;
}
.col-xs-5 {
width: 41.66666667%;
}
.col-xs-4 {
width: 33.33333333%;
}
.col-xs-3 {
width: 25%;
}
.col-xs-2 {
width: 16.66666667%;
}
.col-xs-1 {
width: 8.33333333%;
}
.col-xs-pull-12 {
right: 100%;
}
.col-xs-pull-11 {
right: 91.66666667%;
}
.col-xs-pull-10 {
right: 83.33333333%;
}
.col-xs-pull-9 {
right: 75%;
}
.col-xs-pull-8 {
right: 66.66666667%;
}
.col-xs-pull-7 {
right: 58.33333333%;
}
.col-xs-pull-6 {
right: 50%;
}
.col-xs-pull-5 {
right: 41.66666667%;
}
.col-xs-pull-4 {
right: 33.33333333%;
}
.col-xs-pull-3 {
right: 25%;
}
.col-xs-pull-2 {
right: 16.66666667%;
}
.col-xs-pull-1 {
right: 8.33333333%;
}
.col-xs-pull-0 {
right: auto;
}
.col-xs-push-12 {
left: 100%;
}
.col-xs-push-11 {
left: 91.66666667%;
}
.col-xs-push-10 {
left: 83.33333333%;
}
.col-xs-push-9 {
left: 75%;
}
.col-xs-push-8 {
left: 66.66666667%;
}
.col-xs-push-7 {
left: 58.33333333%;
}
.col-xs-push-6 {
left: 50%;
}
.col-xs-push-5 {
left: 41.66666667%;
}
.col-xs-push-4 {
left: 33.33333333%;
}
.col-xs-push-3 {
left: 25%;
}
.col-xs-push-2 {
left: 16.66666667%;
}
.col-xs-push-1 {
left: 8.33333333%;
}
.col-xs-push-0 {
left: auto;
}
.col-xs-offset-12 {
margin-left: 100%;
}
.col-xs-offset-11 {
margin-left: 91.66666667%;
}
.col-xs-offset-10 {
margin-left: 83.33333333%;
}
.col-xs-offset-9 {
margin-left: 75%;
}
.col-xs-offset-8 {
margin-left: 66.66666667%;
}
.col-xs-offset-7 {
margin-left: 58.33333333%;
}
.col-xs-offset-6 {
margin-left: 50%;
}
.col-xs-offset-5 {
margin-left: 41.66666667%;
}
.col-xs-offset-4 {
margin-left: 33.33333333%;
}
.col-xs-offset-3 {
margin-left: 25%;
}
.col-xs-offset-2 {
margin-left: 16.66666667%;
}
.col-xs-offset-1 {
margin-left: 8.33333333%;
}
.col-xs-offset-0 {
margin-left: 0%;
}
@media (min-width: 768px) {
.col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 {
float: left;
}
.col-sm-12 {
width: 100%;
}
.col-sm-11 {
width: 91.66666667%;
}
.col-sm-10 {
width: 83.33333333%;
}
.col-sm-9 {
width: 75%;
}
.col-sm-8 {
width: 66.66666667%;
}
.col-sm-7 {
width: 58.33333333%;
}
.col-sm-6 {
width: 50%;
}
.col-sm-5 {
width: 41.66666667%;
}
.col-sm-4 {
width: 33.33333333%;
}
.col-sm-3 {
width: 25%;
}
.col-sm-2 {
width: 16.66666667%;
}
.col-sm-1 {
width: 8.33333333%;
}
.col-sm-pull-12 {
right: 100%;
}
.col-sm-pull-11 {
right: 91.66666667%;
}
.col-sm-pull-10 {
right: 83.33333333%;
}
.col-sm-pull-9 {
right: 75%;
}
.col-sm-pull-8 {
right: 66.66666667%;
}
.col-sm-pull-7 {
right: 58.33333333%;
}
.col-sm-pull-6 {
right: 50%;
}
.col-sm-pull-5 {
right: 41.66666667%;
}
.col-sm-pull-4 {
right: 33.33333333%;
}
.col-sm-pull-3 {
right: 25%;
}
.col-sm-pull-2 {
right: 16.66666667%;
}
.col-sm-pull-1 {
right: 8.33333333%;
}
.col-sm-pull-0 {
right: auto;
}
.col-sm-push-12 {
left: 100%;
}
.col-sm-push-11 {
left: 91.66666667%;
}
.col-sm-push-10 {
left: 83.33333333%;
}
.col-sm-push-9 {
left: 75%;
}
.col-sm-push-8 {
left: 66.66666667%;
}
.col-sm-push-7 {
left: 58.33333333%;
}
.col-sm-push-6 {
left: 50%;
}
.col-sm-push-5 {
left: 41.66666667%;
}
.col-sm-push-4 {
left: 33.33333333%;
}
.col-sm-push-3 {
left: 25%;
}
.col-sm-push-2 {
left: 16.66666667%;
}
.col-sm-push-1 {
left: 8.33333333%;
}
.col-sm-push-0 {
left: auto;
}
.col-sm-offset-12 {
margin-left: 100%;
}
.col-sm-offset-11 {
margin-left: 91.66666667%;
}
.col-sm-offset-10 {
margin-left: 83.33333333%;
}
.col-sm-offset-9 {
margin-left: 75%;
}
.col-sm-offset-8 {
margin-left: 66.66666667%;
}
.col-sm-offset-7 {
margin-left: 58.33333333%;
}
.col-sm-offset-6 {
margin-left: 50%;
}
.col-sm-offset-5 {
margin-left: 41.66666667%;
}
.col-sm-offset-4 {
margin-left: 33.33333333%;
}
.col-sm-offset-3 {
margin-left: 25%;
}
.col-sm-offset-2 {
margin-left: 16.66666667%;
}
.col-sm-offset-1 {
margin-left: 8.33333333%;
}
.col-sm-offset-0 {
margin-left: 0%;
}
}
@media (min-width: 992px) {
.col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 {
float: left;
}
.col-md-12 {
width: 100%;
}
.col-md-11 {
width: 91.66666667%;
}
.col-md-10 {
width: 83.33333333%;
}
.col-md-9 {
width: 75%;
}
.col-md-8 {
width: 66.66666667%;
}
.col-md-7 {
width: 58.33333333%;
}
.col-md-6 {
width: 50%;
}
.col-md-5 {
width: 41.66666667%;
}
.col-md-4 {
width: 33.33333333%;
}
.col-md-3 {
width: 25%;
}
.col-md-2 {
width: 16.66666667%;
}
.col-md-1 {
width: 8.33333333%;
}
.col-md-pull-12 {
right: 100%;
}
.col-md-pull-11 {
right: 91.66666667%;
}
.col-md-pull-10 {
right: 83.33333333%;
}
.col-md-pull-9 {
right: 75%;
}
.col-md-pull-8 {
right: 66.66666667%;
}
.col-md-pull-7 {
right: 58.33333333%;
}
.col-md-pull-6 {
right: 50%;
}
.col-md-pull-5 {
right: 41.66666667%;
}
.col-md-pull-4 {
right: 33.33333333%;
}
.col-md-pull-3 {
right: 25%;
}
.col-md-pull-2 {
right: 16.66666667%;
}
.col-md-pull-1 {
right: 8.33333333%;
}
.col-md-pull-0 {
right: auto;
}
.col-md-push-12 {
left: 100%;
}
.col-md-push-11 {
left: 91.66666667%;
}
.col-md-push-10 {
left: 83.33333333%;
}
.col-md-push-9 {
left: 75%;
}
.col-md-push-8 {
left: 66.66666667%;
}
.col-md-push-7 {
left: 58.33333333%;
}
.col-md-push-6 {
left: 50%;
}
.col-md-push-5 {
left: 41.66666667%;
}
.col-md-push-4 {
left: 33.33333333%;
}
.col-md-push-3 {
left: 25%;
}
.col-md-push-2 {
left: 16.66666667%;
}
.col-md-push-1 {
left: 8.33333333%;
}
.col-md-push-0 {
left: auto;
}
.col-md-offset-12 {
margin-left: 100%;
}
.col-md-offset-11 {
margin-left: 91.66666667%;
}
.col-md-offset-10 {
margin-left: 83.33333333%;
}
.col-md-offset-9 {
margin-left: 75%;
}
.col-md-offset-8 {
margin-left: 66.66666667%;
}
.col-md-offset-7 {
margin-left: 58.33333333%;
}
.col-md-offset-6 {
margin-left: 50%;
}
.col-md-offset-5 {
margin-left: 41.66666667%;
}
.col-md-offset-4 {
margin-left: 33.33333333%;
}
.col-md-offset-3 {
margin-left: 25%;
}
.col-md-offset-2 {
margin-left: 16.66666667%;
}
.col-md-offset-1 {
margin-left: 8.33333333%;
}
.col-md-offset-0 {
margin-left: 0%;
}
}
@media (min-width: 1200px) {
.col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 {
float: left;
}
.col-lg-12 {
width: 100%;
}
.col-lg-11 {
width: 91.66666667%;
}
.col-lg-10 {
width: 83.33333333%;
}
.col-lg-9 {
width: 75%;
}
.col-lg-8 {
width: 66.66666667%;
}
.col-lg-7 {
width: 58.33333333%;
}
.col-lg-6 {
width: 50%;
}
.col-lg-5 {
width: 41.66666667%;
}
.col-lg-4 {
width: 33.33333333%;
}
.col-lg-3 {
width: 25%;
}
.col-lg-2 {
width: 16.66666667%;
}
.col-lg-1 {
width: 8.33333333%;
}
.col-lg-pull-12 {
right: 100%;
}
.col-lg-pull-11 {
right: 91.66666667%;
}
.col-lg-pull-10 {
right: 83.33333333%;
}
.col-lg-pull-9 {
right: 75%;
}
.col-lg-pull-8 {
right: 66.66666667%;
}
.col-lg-pull-7 {
right: 58.33333333%;
}
.col-lg-pull-6 {
right: 50%;
}
.col-lg-pull-5 {
right: 41.66666667%;
}
.col-lg-pull-4 {
right: 33.33333333%;
}
.col-lg-pull-3 {
right: 25%;
}
.col-lg-pull-2 {
right: 16.66666667%;
}
.col-lg-pull-1 {
right: 8.33333333%;
}
.col-lg-pull-0 {
right: auto;
}
.col-lg-push-12 {
left: 100%;
}
.col-lg-push-11 {
left: 91.66666667%;
}
.col-lg-push-10 {
left: 83.33333333%;
}
.col-lg-push-9 {
left: 75%;
}
.col-lg-push-8 {
left: 66.66666667%;
}
.col-lg-push-7 {
left: 58.33333333%;
}
.col-lg-push-6 {
left: 50%;
}
.col-lg-push-5 {
left: 41.66666667%;
}
.col-lg-push-4 {
left: 33.33333333%;
}
.col-lg-push-3 {
left: 25%;
}
.col-lg-push-2 {
left: 16.66666667%;
}
.col-lg-push-1 {
left: 8.33333333%;
}
.col-lg-push-0 {
left: auto;
}
.col-lg-offset-12 {
margin-left: 100%;
}
.col-lg-offset-11 {
margin-left: 91.66666667%;
}
.col-lg-offset-10 {
margin-left: 83.33333333%;
}
.col-lg-offset-9 {
margin-left: 75%;
}
.col-lg-offset-8 {
margin-left: 66.66666667%;
}
.col-lg-offset-7 {
margin-left: 58.33333333%;
}
.col-lg-offset-6 {
margin-left: 50%;
}
.col-lg-offset-5 {
margin-left: 41.66666667%;
}
.col-lg-offset-4 {
margin-left: 33.33333333%;
}
.col-lg-offset-3 {
margin-left: 25%;
}
.col-lg-offset-2 {
margin-left: 16.66666667%;
}
.col-lg-offset-1 {
margin-left: 8.33333333%;
}
.col-lg-offset-0 {
margin-left: 0%;
}
}
table {
background-color: transparent;
}
th {
text-align: left;
}
.table {
width: 100%;
max-width: 100%;
margin-bottom: 20px;
}
.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
padding: 8px;
line-height: 1.42857143;
vertical-align: top;
border-top: 1px solid #dddddd;
}
.table > thead > tr > th {
vertical-align: bottom;
border-bottom: 2px solid #dddddd;
}
.table > caption + thead > tr:first-child > th,
.table > colgroup + thead > tr:first-child > th,
.table > thead:first-child > tr:first-child > th,
.table > caption + thead > tr:first-child > td,
.table > colgroup + thead > tr:first-child > td,
.table > thead:first-child > tr:first-child > td {
border-top: 0;
}
.table > tbody + tbody {
border-top: 2px solid #dddddd;
}
.table .table {
background-color: #ffffff;
}
.table-condensed > thead > tr > th,
.table-condensed > tbody > tr > th,
.table-condensed > tfoot > tr > th,
.table-condensed > thead > tr > td,
.table-condensed > tbody > tr > td,
.table-condensed > tfoot > tr > td {
padding: 5px;
}
.table-bordered {
border: 1px solid #dddddd;
}
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > th,
.table-bordered > tfoot > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > td,
.table-bordered > tfoot > tr > td {
border: 1px solid #dddddd;
}
.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td {
border-bottom-width: 2px;
}
.table-striped > tbody > tr:nth-child(odd) > td,
.table-striped > tbody > tr:nth-child(odd) > th {
background-color: #f9f9f9;
}
.table-hover > tbody > tr:hover > td,
.table-hover > tbody > tr:hover > th {
background-color: #f5f5f5;
}
table col[class*="col-"] {
position: static;
float: none;
display: table-column;
}
table td[class*="col-"],
table th[class*="col-"] {
position: static;
float: none;
display: table-cell;
}
.table > thead > tr > td.active,
.table > tbody > tr > td.active,
.table > tfoot > tr > td.active,
.table > thead > tr > th.active,
.table > tbody > tr > th.active,
.table > tfoot > tr > th.active,
.table > thead > tr.active > td,
.table > tbody > tr.active > td,
.table > tfoot > tr.active > td,
.table > thead > tr.active > th,
.table > tbody > tr.active > th,
.table > tfoot > tr.active > th {
background-color: #f5f5f5;
}
.table-hover > tbody > tr > td.active:hover,
.table-hover > tbody > tr > th.active:hover,
.table-hover > tbody > tr.active:hover > td,
.table-hover > tbody > tr:hover > .active,
.table-hover > tbody > tr.active:hover > th {
background-color: #e8e8e8;
}
.table > thead > tr > td.success,
.table > tbody > tr > td.success,
.table > tfoot > tr > td.success,
.table > thead > tr > th.success,
.table > tbody > tr > th.success,
.table > tfoot > tr > th.success,
.table > thead > tr.success > td,
.table > tbody > tr.success > td,
.table > tfoot > tr.success > td,
.table > thead > tr.success > th,
.table > tbody > tr.success > th,
.table > tfoot > tr.success > th {
background-color: #dff0d8;
}
.table-hover > tbody > tr > td.success:hover,
.table-hover > tbody > tr > th.success:hover,
.table-hover > tbody > tr.success:hover > td,
.table-hover > tbody > tr:hover > .success,
.table-hover > tbody > tr.success:hover > th {
background-color: #d0e9c6;
}
.table > thead > tr > td.info,
.table > tbody > tr > td.info,
.table > tfoot > tr > td.info,
.table > thead > tr > th.info,
.table > tbody > tr > th.info,
.table > tfoot > tr > th.info,
.table > thead > tr.info > td,
.table > tbody > tr.info > td,
.table > tfoot > tr.info > td,
.table > thead > tr.info > th,
.table > tbody > tr.info > th,
.table > tfoot > tr.info > th {
background-color: #d9edf7;
}
.table-hover > tbody > tr > td.info:hover,
.table-hover > tbody > tr > th.info:hover,
.table-hover > tbody > tr.info:hover > td,
.table-hover > tbody > tr:hover > .info,
.table-hover > tbody > tr.info:hover > th {
background-color: #c4e3f3;
}
.table > thead > tr > td.warning,
.table > tbody > tr > td.warning,
.table > tfoot > tr > td.warning,
.table > thead > tr > th.warning,
.table > tbody > tr > th.warning,
.table > tfoot > tr > th.warning,
.table > thead > tr.warning > td,
.table > tbody > tr.warning > td,
.table > tfoot > tr.warning > td,
.table > thead > tr.warning > th,
.table > tbody > tr.warning > th,
.table > tfoot > tr.warning > th {
background-color: #fcf8e3;
}
.table-hover > tbody > tr > td.warning:hover,
.table-hover > tbody > tr > th.warning:hover,
.table-hover > tbody > tr.warning:hover > td,
.table-hover > tbody > tr:hover > .warning,
.table-hover > tbody > tr.warning:hover > th {
background-color: #faf2cc;
}
.table > thead > tr > td.danger,
.table > tbody > tr > td.danger,
.table > tfoot > tr > td.danger,
.table > thead > tr > th.danger,
.table > tbody > tr > th.danger,
.table > tfoot > tr > th.danger,
.table > thead > tr.danger > td,
.table > tbody > tr.danger > td,
.table > tfoot > tr.danger > td,
.table > thead > tr.danger > th,
.table > tbody > tr.danger > th,
.table > tfoot > tr.danger > th {
background-color: #f2dede;
}
.table-hover > tbody > tr > td.danger:hover,
.table-hover > tbody > tr > th.danger:hover,
.table-hover > tbody > tr.danger:hover > td,
.table-hover > tbody > tr:hover > .danger,
.table-hover > tbody > tr.danger:hover > th {
background-color: #ebcccc;
}
@media screen and (max-width: 767px) {
.table-responsive {
width: 100%;
margin-bottom: 15px;
overflow-y: hidden;
overflow-x: auto;
-ms-overflow-style: -<API key>;
border: 1px solid #dddddd;
-<API key>: touch;
}
.table-responsive > .table {
margin-bottom: 0;
}
.table-responsive > .table > thead > tr > th,
.table-responsive > .table > tbody > tr > th,
.table-responsive > .table > tfoot > tr > th,
.table-responsive > .table > thead > tr > td,
.table-responsive > .table > tbody > tr > td,
.table-responsive > .table > tfoot > tr > td {
white-space: nowrap;
}
.table-responsive > .table-bordered {
border: 0;
}
.table-responsive > .table-bordered > thead > tr > th:first-child,
.table-responsive > .table-bordered > tbody > tr > th:first-child,
.table-responsive > .table-bordered > tfoot > tr > th:first-child,
.table-responsive > .table-bordered > thead > tr > td:first-child,
.table-responsive > .table-bordered > tbody > tr > td:first-child,
.table-responsive > .table-bordered > tfoot > tr > td:first-child {
border-left: 0;
}
.table-responsive > .table-bordered > thead > tr > th:last-child,
.table-responsive > .table-bordered > tbody > tr > th:last-child,
.table-responsive > .table-bordered > tfoot > tr > th:last-child,
.table-responsive > .table-bordered > thead > tr > td:last-child,
.table-responsive > .table-bordered > tbody > tr > td:last-child,
.table-responsive > .table-bordered > tfoot > tr > td:last-child {
border-right: 0;
}
.table-responsive > .table-bordered > tbody > tr:last-child > th,
.table-responsive > .table-bordered > tfoot > tr:last-child > th,
.table-responsive > .table-bordered > tbody > tr:last-child > td,
.table-responsive > .table-bordered > tfoot > tr:last-child > td {
border-bottom: 0;
}
}
fieldset {
padding: 0;
margin: 0;
border: 0;
min-width: 0;
}
legend {
display: block;
width: 100%;
padding: 0;
margin-bottom: 20px;
font-size: 21px;
line-height: inherit;
color: #333333;
border: 0;
border-bottom: 1px solid #e5e5e5;
}
label {
display: inline-block;
max-width: 100%;
margin-bottom: 5px;
font-weight: bold;
}
input[type="search"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
input[type="radio"],
input[type="checkbox"] {
margin: 4px 0 0;
margin-top: 1px \9;
line-height: normal;
}
input[type="file"] {
display: block;
}
input[type="range"] {
display: block;
width: 100%;
}
select[multiple],
select[size] {
height: auto;
}
input[type="file"]:focus,
input[type="radio"]:focus,
input[type="checkbox"]:focus {
outline: thin dotted;
outline: 5px auto -<API key>;
outline-offset: -2px;
}
output {
display: block;
padding-top: 7px;
font-size: 14px;
line-height: 1.42857143;
color: #555555;
}
.form-control {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
color: #555555;
background-color: #ffffff;
background-image: none;
border: 1px solid #cccccc;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
.form-control:focus {
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
.form-control::-moz-placeholder {
color: #777777;
opacity: 1;
}
.form-control:-<API key> {
color: #777777;
}
.form-control::-<API key> {
color: #777777;
}
.form-control[disabled],
.form-control[readonly],
fieldset[disabled] .form-control {
cursor: not-allowed;
background-color: #eeeeee;
opacity: 1;
}
textarea.form-control {
height: auto;
}
input[type="search"] {
-webkit-appearance: none;
}
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"] {
line-height: 34px;
line-height: 1.42857143 \0;
}
input[type="date"].input-sm,
input[type="time"].input-sm,
input[type="datetime-local"].input-sm,
input[type="month"].input-sm {
line-height: 30px;
}
input[type="date"].input-lg,
input[type="time"].input-lg,
input[type="datetime-local"].input-lg,
input[type="month"].input-lg {
line-height: 46px;
}
.form-group {
margin-bottom: 15px;
}
.radio,
.checkbox {
position: relative;
display: block;
min-height: 20px;
margin-top: 10px;
margin-bottom: 10px;
}
.radio label,
.checkbox label {
padding-left: 20px;
margin-bottom: 0;
font-weight: normal;
cursor: pointer;
}
.radio input[type="radio"],
.radio-inline input[type="radio"],
.checkbox input[type="checkbox"],
.checkbox-inline input[type="checkbox"] {
position: absolute;
margin-left: -20px;
margin-top: 4px \9;
}
.radio + .radio,
.checkbox + .checkbox {
margin-top: -5px;
}
.radio-inline,
.checkbox-inline {
display: inline-block;
padding-left: 20px;
margin-bottom: 0;
vertical-align: middle;
font-weight: normal;
cursor: pointer;
}
.radio-inline + .radio-inline,
.checkbox-inline + .checkbox-inline {
margin-top: 0;
margin-left: 10px;
}
input[type="radio"][disabled],
input[type="checkbox"][disabled],
input[type="radio"].disabled,
input[type="checkbox"].disabled,
fieldset[disabled] input[type="radio"],
fieldset[disabled] input[type="checkbox"] {
cursor: not-allowed;
}
.radio-inline.disabled,
.checkbox-inline.disabled,
fieldset[disabled] .radio-inline,
fieldset[disabled] .checkbox-inline {
cursor: not-allowed;
}
.radio.disabled label,
.checkbox.disabled label,
fieldset[disabled] .radio label,
fieldset[disabled] .checkbox label {
cursor: not-allowed;
}
.form-control-static {
padding-top: 7px;
padding-bottom: 7px;
margin-bottom: 0;
}
.form-control-static.input-lg,
.form-control-static.input-sm {
padding-left: 0;
padding-right: 0;
}
.input-sm,
.form-horizontal .form-group-sm .form-control {
height: 30px;
padding: 5px 10px;
font-size: 12px;
line-height: 1.5;
border-radius: 3px;
}
select.input-sm {
height: 30px;
line-height: 30px;
}
textarea.input-sm,
select[multiple].input-sm {
height: auto;
}
.input-lg,
.form-horizontal .form-group-lg .form-control {
height: 46px;
padding: 10px 16px;
font-size: 18px;
line-height: 1.33;
border-radius: 6px;
}
select.input-lg {
height: 46px;
line-height: 46px;
}
textarea.input-lg,
select[multiple].input-lg {
height: auto;
}
.has-feedback {
position: relative;
}
.has-feedback .form-control {
padding-right: 42.5px;
}
.<API key> {
position: absolute;
top: 25px;
right: 0;
z-index: 2;
display: block;
width: 34px;
height: 34px;
line-height: 34px;
text-align: center;
}
.input-lg + .<API key> {
width: 46px;
height: 46px;
line-height: 46px;
}
.input-sm + .<API key> {
width: 30px;
height: 30px;
line-height: 30px;
}
.has-success .help-block,
.has-success .control-label,
.has-success .radio,
.has-success .checkbox,
.has-success .radio-inline,
.has-success .checkbox-inline {
color: #3c763d;
}
.has-success .form-control {
border-color: #3c763d;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.has-success .form-control:focus {
border-color: #2b542c;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #67b168;
}
.has-success .input-group-addon {
color: #3c763d;
border-color: #3c763d;
background-color: #dff0d8;
}
.has-success .<API key> {
color: #3c763d;
}
.has-warning .help-block,
.has-warning .control-label,
.has-warning .radio,
.has-warning .checkbox,
.has-warning .radio-inline,
.has-warning .checkbox-inline {
color: #8a6d3b;
}
.has-warning .form-control {
border-color: #8a6d3b;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.has-warning .form-control:focus {
border-color: #66512c;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #c0a16b;
}
.has-warning .input-group-addon {
color: #8a6d3b;
border-color: #8a6d3b;
background-color: #fcf8e3;
}
.has-warning .<API key> {
color: #8a6d3b;
}
.has-error .help-block,
.has-error .control-label,
.has-error .radio,
.has-error .checkbox,
.has-error .radio-inline,
.has-error .checkbox-inline {
color: #a94442;
}
.has-error .form-control {
border-color: #a94442;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
}
.has-error .form-control:focus {
border-color: #843534;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #ce8483;
}
.has-error .input-group-addon {
color: #a94442;
border-color: #a94442;
background-color: #f2dede;
}
.has-error .<API key> {
color: #a94442;
}
.has-feedback label.sr-only ~ .<API key> {
top: 0;
}
.help-block {
display: block;
margin-top: 5px;
margin-bottom: 10px;
color: #737373;
}
@media (min-width: 768px) {
.form-inline .form-group {
display: inline-block;
margin-bottom: 0;
vertical-align: middle;
}
.form-inline .form-control {
display: inline-block;
width: auto;
vertical-align: middle;
}
.form-inline .input-group {
display: inline-table;
vertical-align: middle;
}
.form-inline .input-group .input-group-addon,
.form-inline .input-group .input-group-btn,
.form-inline .input-group .form-control {
width: auto;
}
.form-inline .input-group > .form-control {
width: 100%;
}
.form-inline .control-label {
margin-bottom: 0;
vertical-align: middle;
}
.form-inline .radio,
.form-inline .checkbox {
display: inline-block;
margin-top: 0;
margin-bottom: 0;
vertical-align: middle;
}
.form-inline .radio label,
.form-inline .checkbox label {
padding-left: 0;
}
.form-inline .radio input[type="radio"],
.form-inline .checkbox input[type="checkbox"] {
position: relative;
margin-left: 0;
}
.form-inline .has-feedback .<API key> {
top: 0;
}
}
.form-horizontal .radio,
.form-horizontal .checkbox,
.form-horizontal .radio-inline,
.form-horizontal .checkbox-inline {
margin-top: 0;
margin-bottom: 0;
padding-top: 7px;
}
.form-horizontal .radio,
.form-horizontal .checkbox {
min-height: 27px;
}
.form-horizontal .form-group {
margin-left: -15px;
margin-right: -15px;
}
@media (min-width: 768px) {
.form-horizontal .control-label {
text-align: right;
margin-bottom: 0;
padding-top: 7px;
}
}
.form-horizontal .has-feedback .<API key> {
top: 0;
right: 15px;
}
@media (min-width: 768px) {
.form-horizontal .form-group-lg .control-label {
padding-top: 14.3px;
}
}
@media (min-width: 768px) {
.form-horizontal .form-group-sm .control-label {
padding-top: 6px;
}
}
.btn {
display: inline-block;
margin-bottom: 0;
font-weight: normal;
text-align: center;
vertical-align: middle;
cursor: pointer;
background-image: none;
border: 1px solid transparent;
white-space: nowrap;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
border-radius: 4px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.btn:focus,
.btn:active:focus,
.btn.active:focus {
outline: thin dotted;
outline: 5px auto -<API key>;
outline-offset: -2px;
}
.btn:hover,
.btn:focus {
color: #333333;
text-decoration: none;
}
.btn:active,
.btn.active {
outline: 0;
background-image: none;
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
.btn.disabled,
.btn[disabled],
fieldset[disabled] .btn {
cursor: not-allowed;
pointer-events: none;
opacity: 0.65;
filter: alpha(opacity=65);
-webkit-box-shadow: none;
box-shadow: none;
}
.btn-default {
color: #333333;
background-color: #ffffff;
border-color: #cccccc;
}
.btn-default:hover,
.btn-default:focus,
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default {
color: #333333;
background-color: #e6e6e6;
border-color: #adadad;
}
.btn-default:active,
.btn-default.active,
.open > .dropdown-toggle.btn-default {
background-image: none;
}
.btn-default.disabled,
.btn-default[disabled],
fieldset[disabled] .btn-default,
.btn-default.disabled:hover,
.btn-default[disabled]:hover,
fieldset[disabled] .btn-default:hover,
.btn-default.disabled:focus,
.btn-default[disabled]:focus,
fieldset[disabled] .btn-default:focus,
.btn-default.disabled:active,
.btn-default[disabled]:active,
fieldset[disabled] .btn-default:active,
.btn-default.disabled.active,
.btn-default[disabled].active,
fieldset[disabled] .btn-default.active {
background-color: #ffffff;
border-color: #cccccc;
}
.btn-default .badge {
color: #ffffff;
background-color: #333333;
}
.btn-primary {
color: #ffffff;
background-color: #428bca;
border-color: #357ebd;
}
.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
color: #ffffff;
background-color: #3071a9;
border-color: #285e8e;
}
.btn-primary:active,
.btn-primary.active,
.open > .dropdown-toggle.btn-primary {
background-image: none;
}
.btn-primary.disabled,
.btn-primary[disabled],
fieldset[disabled] .btn-primary,
.btn-primary.disabled:hover,
.btn-primary[disabled]:hover,
fieldset[disabled] .btn-primary:hover,
.btn-primary.disabled:focus,
.btn-primary[disabled]:focus,
fieldset[disabled] .btn-primary:focus,
.btn-primary.disabled:active,
.btn-primary[disabled]:active,
fieldset[disabled] .btn-primary:active,
.btn-primary.disabled.active,
.btn-primary[disabled].active,
fieldset[disabled] .btn-primary.active {
background-color: #428bca;
border-color: #357ebd;
}
.btn-primary .badge {
color: #428bca;
background-color: #ffffff;
}
.btn-success {
color: #ffffff;
background-color: #5cb85c;
border-color: #4cae4c;
}
.btn-success:hover,
.btn-success:focus,
.btn-success:active,
.btn-success.active,
.open > .dropdown-toggle.btn-success {
color: #ffffff;
background-color: #449d44;
border-color: #398439;
}
.btn-success:active,
.btn-success.active,
.open > .dropdown-toggle.btn-success {
background-image: none;
}
.btn-success.disabled,
.btn-success[disabled],
fieldset[disabled] .btn-success,
.btn-success.disabled:hover,
.btn-success[disabled]:hover,
fieldset[disabled] .btn-success:hover,
.btn-success.disabled:focus,
.btn-success[disabled]:focus,
fieldset[disabled] .btn-success:focus,
.btn-success.disabled:active,
.btn-success[disabled]:active,
fieldset[disabled] .btn-success:active,
.btn-success.disabled.active,
.btn-success[disabled].active,
fieldset[disabled] .btn-success.active {
background-color: #5cb85c;
border-color: #4cae4c;
}
.btn-success .badge {
color: #5cb85c;
background-color: #ffffff;
}
.btn-info {
color: #ffffff;
background-color: #5bc0de;
border-color: #46b8da;
}
.btn-info:hover,
.btn-info:focus,
.btn-info:active,
.btn-info.active,
.open > .dropdown-toggle.btn-info {
color: #ffffff;
background-color: #31b0d5;
border-color: #269abc;
}
.btn-info:active,
.btn-info.active,
.open > .dropdown-toggle.btn-info {
background-image: none;
}
.btn-info.disabled,
.btn-info[disabled],
fieldset[disabled] .btn-info,
.btn-info.disabled:hover,
.btn-info[disabled]:hover,
fieldset[disabled] .btn-info:hover,
.btn-info.disabled:focus,
.btn-info[disabled]:focus,
fieldset[disabled] .btn-info:focus,
.btn-info.disabled:active,
.btn-info[disabled]:active,
fieldset[disabled] .btn-info:active,
.btn-info.disabled.active,
.btn-info[disabled].active,
fieldset[disabled] .btn-info.active {
background-color: #5bc0de;
border-color: #46b8da;
}
.btn-info .badge {
color: #5bc0de;
background-color: #ffffff;
}
.btn-warning {
color: #ffffff;
background-color: #f0ad4e;
border-color: #eea236;
}
.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active,
.btn-warning.active,
.open > .dropdown-toggle.btn-warning {
color: #ffffff;
background-color: #ec971f;
border-color: #d58512;
}
.btn-warning:active,
.btn-warning.active,
.open > .dropdown-toggle.btn-warning {
background-image: none;
}
.btn-warning.disabled,
.btn-warning[disabled],
fieldset[disabled] .btn-warning,
.btn-warning.disabled:hover,
.btn-warning[disabled]:hover,
fieldset[disabled] .btn-warning:hover,
.btn-warning.disabled:focus,
.btn-warning[disabled]:focus,
fieldset[disabled] .btn-warning:focus,
.btn-warning.disabled:active,
.btn-warning[disabled]:active,
fieldset[disabled] .btn-warning:active,
.btn-warning.disabled.active,
.btn-warning[disabled].active,
fieldset[disabled] .btn-warning.active {
background-color: #f0ad4e;
border-color: #eea236;
}
.btn-warning .badge {
color: #f0ad4e;
background-color: #ffffff;
}
.btn-danger {
color: #ffffff;
background-color: #d9534f;
border-color: #d43f3a;
}
.btn-danger:hover,
.btn-danger:focus,
.btn-danger:active,
.btn-danger.active,
.open > .dropdown-toggle.btn-danger {
color: #ffffff;
background-color: #c9302c;
border-color: #ac2925;
}
.btn-danger:active,
.btn-danger.active,
.open > .dropdown-toggle.btn-danger {
background-image: none;
}
.btn-danger.disabled,
.btn-danger[disabled],
fieldset[disabled] .btn-danger,
.btn-danger.disabled:hover,
.btn-danger[disabled]:hover,
fieldset[disabled] .btn-danger:hover,
.btn-danger.disabled:focus,
.btn-danger[disabled]:focus,
fieldset[disabled] .btn-danger:focus,
.btn-danger.disabled:active,
.btn-danger[disabled]:active,
fieldset[disabled] .btn-danger:active,
.btn-danger.disabled.active,
.btn-danger[disabled].active,
fieldset[disabled] .btn-danger.active {
background-color: #d9534f;
border-color: #d43f3a;
}
.btn-danger .badge {
color: #d9534f;
background-color: #ffffff;
}
.btn-link {
color: #428bca;
font-weight: normal;
cursor: pointer;
border-radius: 0;
}
.btn-link,
.btn-link:active,
.btn-link[disabled],
fieldset[disabled] .btn-link {
background-color: transparent;
-webkit-box-shadow: none;
box-shadow: none;
}
.btn-link,
.btn-link:hover,
.btn-link:focus,
.btn-link:active {
border-color: transparent;
}
.btn-link:hover,
.btn-link:focus {
color: #2a6496;
text-decoration: underline;
background-color: transparent;
}
.btn-link[disabled]:hover,
fieldset[disabled] .btn-link:hover,
.btn-link[disabled]:focus,
fieldset[disabled] .btn-link:focus {
color: #777777;
text-decoration: none;
}
.btn-lg,
.btn-group-lg > .btn {
padding: 10px 16px;
font-size: 18px;
line-height: 1.33;
border-radius: 6px;
}
.btn-sm,
.btn-group-sm > .btn {
padding: 5px 10px;
font-size: 12px;
line-height: 1.5;
border-radius: 3px;
}
.btn-xs,
.btn-group-xs > .btn {
padding: 1px 5px;
font-size: 12px;
line-height: 1.5;
border-radius: 3px;
}
.btn-block {
display: block;
width: 100%;
}
.btn-block + .btn-block {
margin-top: 5px;
}
input[type="submit"].btn-block,
input[type="reset"].btn-block,
input[type="button"].btn-block {
width: 100%;
}
.fade {
opacity: 0;
-webkit-transition: opacity 0.15s linear;
-o-transition: opacity 0.15s linear;
transition: opacity 0.15s linear;
}
.fade.in {
opacity: 1;
}
.collapse {
display: none;
}
.collapse.in {
display: block;
}
tr.collapse.in {
display: table-row;
}
tbody.collapse.in {
display: table-row-group;
}
.collapsing {
position: relative;
height: 0;
overflow: hidden;
-webkit-transition: height 0.35s ease;
-o-transition: height 0.35s ease;
transition: height 0.35s ease;
}
.caret {
display: inline-block;
width: 0;
height: 0;
margin-left: 2px;
vertical-align: middle;
border-top: 4px solid;
border-right: 4px solid transparent;
border-left: 4px solid transparent;
}
.dropdown {
position: relative;
}
.dropdown-toggle:focus {
outline: 0;
}
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
display: none;
float: left;
min-width: 160px;
padding: 5px 0;
margin: 2px 0 0;
list-style: none;
font-size: 14px;
text-align: left;
background-color: #ffffff;
border: 1px solid #cccccc;
border: 1px solid rgba(0, 0, 0, 0.15);
border-radius: 4px;
-webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
background-clip: padding-box;
}
.dropdown-menu.pull-right {
right: 0;
left: auto;
}
.dropdown-menu .divider {
height: 1px;
margin: 9px 0;
overflow: hidden;
background-color: #e5e5e5;
}
.dropdown-menu > li > a {
display: block;
padding: 3px 20px;
clear: both;
font-weight: normal;
line-height: 1.42857143;
color: #333333;
white-space: nowrap;
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
text-decoration: none;
color: #262626;
background-color: #f5f5f5;
}
.dropdown-menu > .active > a,
.dropdown-menu > .active > a:hover,
.dropdown-menu > .active > a:focus {
color: #ffffff;
text-decoration: none;
outline: 0;
background-color: #428bca;
}
.dropdown-menu > .disabled > a,
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
color: #777777;
}
.dropdown-menu > .disabled > a:hover,
.dropdown-menu > .disabled > a:focus {
text-decoration: none;
background-color: transparent;
background-image: none;
filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
cursor: not-allowed;
}
.open > .dropdown-menu {
display: block;
}
.open > a {
outline: 0;
}
.dropdown-menu-right {
left: auto;
right: 0;
}
.dropdown-menu-left {
left: 0;
right: auto;
}
.dropdown-header {
display: block;
padding: 3px 20px;
font-size: 12px;
line-height: 1.42857143;
color: #777777;
white-space: nowrap;
}
.dropdown-backdrop {
position: fixed;
left: 0;
right: 0;
bottom: 0;
top: 0;
z-index: 990;
}
.pull-right > .dropdown-menu {
right: 0;
left: auto;
}
.dropup .caret,
.navbar-fixed-bottom .dropdown .caret {
border-top: 0;
border-bottom: 4px solid;
content: "";
}
.dropup .dropdown-menu,
.navbar-fixed-bottom .dropdown .dropdown-menu {
top: auto;
bottom: 100%;
margin-bottom: 1px;
}
@media (min-width: 768px) {
.navbar-right .dropdown-menu {
left: auto;
right: 0;
}
.navbar-right .dropdown-menu-left {
left: 0;
right: auto;
}
}
.btn-group,
.btn-group-vertical {
position: relative;
display: inline-block;
vertical-align: middle;
}
.btn-group > .btn,
.btn-group-vertical > .btn {
position: relative;
float: left;
}
.btn-group > .btn:hover,
.btn-group-vertical > .btn:hover,
.btn-group > .btn:focus,
.btn-group-vertical > .btn:focus,
.btn-group > .btn:active,
.btn-group-vertical > .btn:active,
.btn-group > .btn.active,
.btn-group-vertical > .btn.active {
z-index: 2;
}
.btn-group > .btn:focus,
.btn-group-vertical > .btn:focus {
outline: 0;
}
.btn-group .btn + .btn,
.btn-group .btn + .btn-group,
.btn-group .btn-group + .btn,
.btn-group .btn-group + .btn-group {
margin-left: -1px;
}
.btn-toolbar {
margin-left: -5px;
}
.btn-toolbar .btn-group,
.btn-toolbar .input-group {
float: left;
}
.btn-toolbar > .btn,
.btn-toolbar > .btn-group,
.btn-toolbar > .input-group {
margin-left: 5px;
}
.btn-group > .btn:not(:first-child):not(:last-child):not(.dropdown-toggle) {
border-radius: 0;
}
.btn-group > .btn:first-child {
margin-left: 0;
}
.btn-group > .btn:first-child:not(:last-child):not(.dropdown-toggle) {
<API key>: 0;
<API key>: 0;
}
.btn-group > .btn:last-child:not(:first-child),
.btn-group > .dropdown-toggle:not(:first-child) {
<API key>: 0;
<API key>: 0;
}
.btn-group > .btn-group {
float: left;
}
.btn-group > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;
}
.btn-group > .btn-group:first-child > .btn:last-child,
.btn-group > .btn-group:first-child > .dropdown-toggle {
<API key>: 0;
<API key>: 0;
}
.btn-group > .btn-group:last-child > .btn:first-child {
<API key>: 0;
<API key>: 0;
}
.btn-group .dropdown-toggle:active,
.btn-group.open .dropdown-toggle {
outline: 0;
}
.btn-group > .btn + .dropdown-toggle {
padding-left: 8px;
padding-right: 8px;
}
.btn-group > .btn-lg + .dropdown-toggle {
padding-left: 12px;
padding-right: 12px;
}
.btn-group.open .dropdown-toggle {
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
.btn-group.open .dropdown-toggle.btn-link {
-webkit-box-shadow: none;
box-shadow: none;
}
.btn .caret {
margin-left: 0;
}
.btn-lg .caret {
border-width: 5px 5px 0;
border-bottom-width: 0;
}
.dropup .btn-lg .caret {
border-width: 0 5px 5px;
}
.btn-group-vertical > .btn,
.btn-group-vertical > .btn-group,
.btn-group-vertical > .btn-group > .btn {
display: block;
float: none;
width: 100%;
max-width: 100%;
}
.btn-group-vertical > .btn-group > .btn {
float: none;
}
.btn-group-vertical > .btn + .btn,
.btn-group-vertical > .btn + .btn-group,
.btn-group-vertical > .btn-group + .btn,
.btn-group-vertical > .btn-group + .btn-group {
margin-top: -1px;
margin-left: 0;
}
.btn-group-vertical > .btn:not(:first-child):not(:last-child) {
border-radius: 0;
}
.btn-group-vertical > .btn:first-child:not(:last-child) {
<API key>: 4px;
<API key>: 0;
<API key>: 0;
}
.btn-group-vertical > .btn:last-child:not(:first-child) {
<API key>: 4px;
<API key>: 0;
<API key>: 0;
}
.btn-group-vertical > .btn-group:not(:first-child):not(:last-child) > .btn {
border-radius: 0;
}
.btn-group-vertical > .btn-group:first-child:not(:last-child) > .btn:last-child,
.btn-group-vertical > .btn-group:first-child:not(:last-child) > .dropdown-toggle {
<API key>: 0;
<API key>: 0;
}
.btn-group-vertical > .btn-group:last-child:not(:first-child) > .btn:first-child {
<API key>: 0;
<API key>: 0;
}
.btn-group-justified {
display: table;
width: 100%;
table-layout: fixed;
border-collapse: separate;
}
.btn-group-justified > .btn,
.btn-group-justified > .btn-group {
float: none;
display: table-cell;
width: 1%;
}
.btn-group-justified > .btn-group .btn {
width: 100%;
}
.btn-group-justified > .btn-group .dropdown-menu {
left: auto;
}
[data-toggle="buttons"] > .btn > input[type="radio"],
[data-toggle="buttons"] > .btn > input[type="checkbox"] {
position: absolute;
z-index: -1;
opacity: 0;
filter: alpha(opacity=0);
}
.input-group {
position: relative;
display: table;
border-collapse: separate;
}
.input-group[class*="col-"] {
float: none;
padding-left: 0;
padding-right: 0;
}
.input-group .form-control {
position: relative;
z-index: 2;
float: left;
width: 100%;
margin-bottom: 0;
}
.input-group-lg > .form-control,
.input-group-lg > .input-group-addon,
.input-group-lg > .input-group-btn > .btn {
height: 46px;
padding: 10px 16px;
font-size: 18px;
line-height: 1.33;
border-radius: 6px;
}
select.input-group-lg > .form-control,
select.input-group-lg > .input-group-addon,
select.input-group-lg > .input-group-btn > .btn {
height: 46px;
line-height: 46px;
}
textarea.input-group-lg > .form-control,
textarea.input-group-lg > .input-group-addon,
textarea.input-group-lg > .input-group-btn > .btn,
select[multiple].input-group-lg > .form-control,
select[multiple].input-group-lg > .input-group-addon,
select[multiple].input-group-lg > .input-group-btn > .btn {
height: auto;
}
.input-group-sm > .form-control,
.input-group-sm > .input-group-addon,
.input-group-sm > .input-group-btn > .btn {
height: 30px;
padding: 5px 10px;
font-size: 12px;
line-height: 1.5;
border-radius: 3px;
}
select.input-group-sm > .form-control,
select.input-group-sm > .input-group-addon,
select.input-group-sm > .input-group-btn > .btn {
height: 30px;
line-height: 30px;
}
textarea.input-group-sm > .form-control,
textarea.input-group-sm > .input-group-addon,
textarea.input-group-sm > .input-group-btn > .btn,
select[multiple].input-group-sm > .form-control,
select[multiple].input-group-sm > .input-group-addon,
select[multiple].input-group-sm > .input-group-btn > .btn {
height: auto;
}
.input-group-addon,
.input-group-btn,
.input-group .form-control {
display: table-cell;
}
.input-group-addon:not(:first-child):not(:last-child),
.input-group-btn:not(:first-child):not(:last-child),
.input-group .form-control:not(:first-child):not(:last-child) {
border-radius: 0;
}
.input-group-addon,
.input-group-btn {
width: 1%;
white-space: nowrap;
vertical-align: middle;
}
.input-group-addon {
padding: 6px 12px;
font-size: 14px;
font-weight: normal;
line-height: 1;
color: #555555;
text-align: center;
background-color: #eeeeee;
border: 1px solid #cccccc;
border-radius: 4px;
}
.input-group-addon.input-sm {
padding: 5px 10px;
font-size: 12px;
border-radius: 3px;
}
.input-group-addon.input-lg {
padding: 10px 16px;
font-size: 18px;
border-radius: 6px;
}
.input-group-addon input[type="radio"],
.input-group-addon input[type="checkbox"] {
margin-top: 0;
}
.input-group .form-control:first-child,
.input-group-addon:first-child,
.input-group-btn:first-child > .btn,
.input-group-btn:first-child > .btn-group > .btn,
.input-group-btn:first-child > .dropdown-toggle,
.input-group-btn:last-child > .btn:not(:last-child):not(.dropdown-toggle),
.input-group-btn:last-child > .btn-group:not(:last-child) > .btn {
<API key>: 0;
<API key>: 0;
}
.input-group-addon:first-child {
border-right: 0;
}
.input-group .form-control:last-child,
.input-group-addon:last-child,
.input-group-btn:last-child > .btn,
.input-group-btn:last-child > .btn-group > .btn,
.input-group-btn:last-child > .dropdown-toggle,
.input-group-btn:first-child > .btn:not(:first-child),
.input-group-btn:first-child > .btn-group:not(:first-child) > .btn {
<API key>: 0;
<API key>: 0;
}
.input-group-addon:last-child {
border-left: 0;
}
.input-group-btn {
position: relative;
font-size: 0;
white-space: nowrap;
}
.input-group-btn > .btn {
position: relative;
}
.input-group-btn > .btn + .btn {
margin-left: -1px;
}
.input-group-btn > .btn:hover,
.input-group-btn > .btn:focus,
.input-group-btn > .btn:active {
z-index: 2;
}
.input-group-btn:first-child > .btn,
.input-group-btn:first-child > .btn-group {
margin-right: -1px;
}
.input-group-btn:last-child > .btn,
.input-group-btn:last-child > .btn-group {
margin-left: -1px;
}
.nav {
margin-bottom: 0;
padding-left: 0;
list-style: none;
}
.nav > li {
position: relative;
display: block;
}
.nav > li > a {
position: relative;
display: block;
padding: 10px 15px;
}
.nav > li > a:hover,
.nav > li > a:focus {
text-decoration: none;
background-color: #eeeeee;
}
.nav > li.disabled > a {
color: #777777;
}
.nav > li.disabled > a:hover,
.nav > li.disabled > a:focus {
color: #777777;
text-decoration: none;
background-color: transparent;
cursor: not-allowed;
}
.nav .open > a,
.nav .open > a:hover,
.nav .open > a:focus {
background-color: #eeeeee;
border-color: #428bca;
}
.nav .nav-divider {
height: 1px;
margin: 9px 0;
overflow: hidden;
background-color: #e5e5e5;
}
.nav > li > a > img {
max-width: none;
}
.nav-tabs {
border-bottom: 1px solid #dddddd;
}
.nav-tabs > li {
float: left;
margin-bottom: -1px;
}
.nav-tabs > li > a {
margin-right: 2px;
line-height: 1.42857143;
border: 1px solid transparent;
border-radius: 4px 4px 0 0;
}
.nav-tabs > li > a:hover {
border-color: #eeeeee #eeeeee #dddddd;
}
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
color: #555555;
background-color: #ffffff;
border: 1px solid #dddddd;
border-bottom-color: transparent;
cursor: default;
}
.nav-tabs.nav-justified {
width: 100%;
border-bottom: 0;
}
.nav-tabs.nav-justified > li {
float: none;
}
.nav-tabs.nav-justified > li > a {
text-align: center;
margin-bottom: 5px;
}
.nav-tabs.nav-justified > .dropdown .dropdown-menu {
top: auto;
left: auto;
}
@media (min-width: 768px) {
.nav-tabs.nav-justified > li {
display: table-cell;
width: 1%;
}
.nav-tabs.nav-justified > li > a {
margin-bottom: 0;
}
}
.nav-tabs.nav-justified > li > a {
margin-right: 0;
border-radius: 4px;
}
.nav-tabs.nav-justified > .active > a,
.nav-tabs.nav-justified > .active > a:hover,
.nav-tabs.nav-justified > .active > a:focus {
border: 1px solid #dddddd;
}
@media (min-width: 768px) {
.nav-tabs.nav-justified > li > a {
border-bottom: 1px solid #dddddd;
border-radius: 4px 4px 0 0;
}
.nav-tabs.nav-justified > .active > a,
.nav-tabs.nav-justified > .active > a:hover,
.nav-tabs.nav-justified > .active > a:focus {
border-bottom-color: #ffffff;
}
}
.nav-pills > li {
float: left;
}
.nav-pills > li > a {
border-radius: 4px;
}
.nav-pills > li + li {
margin-left: 2px;
}
.nav-pills > li.active > a,
.nav-pills > li.active > a:hover,
.nav-pills > li.active > a:focus {
color: #ffffff;
background-color: #428bca;
}
.nav-stacked > li {
float: none;
}
.nav-stacked > li + li {
margin-top: 2px;
margin-left: 0;
}
.nav-justified {
width: 100%;
}
.nav-justified > li {
float: none;
}
.nav-justified > li > a {
text-align: center;
margin-bottom: 5px;
}
.nav-justified > .dropdown .dropdown-menu {
top: auto;
left: auto;
}
@media (min-width: 768px) {
.nav-justified > li {
display: table-cell;
width: 1%;
}
.nav-justified > li > a {
margin-bottom: 0;
}
}
.nav-tabs-justified {
border-bottom: 0;
}
.nav-tabs-justified > li > a {
margin-right: 0;
border-radius: 4px;
}
.nav-tabs-justified > .active > a,
.nav-tabs-justified > .active > a:hover,
.nav-tabs-justified > .active > a:focus {
border: 1px solid #dddddd;
}
@media (min-width: 768px) {
.nav-tabs-justified > li > a {
border-bottom: 1px solid #dddddd;
border-radius: 4px 4px 0 0;
}
.nav-tabs-justified > .active > a,
.nav-tabs-justified > .active > a:hover,
.nav-tabs-justified > .active > a:focus {
border-bottom-color: #ffffff;
}
}
.tab-content > .tab-pane {
display: none;
}
.tab-content > .active {
display: block;
}
.nav-tabs .dropdown-menu {
margin-top: -1px;
<API key>: 0;
<API key>: 0;
}
.navbar {
position: relative;
min-height: 50px;
margin-bottom: 20px;
border: 1px solid transparent;
}
@media (min-width: 768px) {
.navbar {
border-radius: 4px;
}
}
@media (min-width: 768px) {
.navbar-header {
float: left;
}
}
.navbar-collapse {
overflow-x: visible;
padding-right: 15px;
padding-left: 15px;
border-top: 1px solid transparent;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
-<API key>: touch;
}
.navbar-collapse.in {
overflow-y: auto;
}
@media (min-width: 768px) {
.navbar-collapse {
width: auto;
border-top: 0;
box-shadow: none;
}
.navbar-collapse.collapse {
display: block !important;
height: auto !important;
padding-bottom: 0;
overflow: visible !important;
}
.navbar-collapse.in {
overflow-y: visible;
}
.navbar-fixed-top .navbar-collapse,
.navbar-static-top .navbar-collapse,
.navbar-fixed-bottom .navbar-collapse {
padding-left: 0;
padding-right: 0;
}
}
.navbar-fixed-top .navbar-collapse,
.navbar-fixed-bottom .navbar-collapse {
max-height: 340px;
}
@media (max-width: 480px) and (orientation: landscape) {
.navbar-fixed-top .navbar-collapse,
.navbar-fixed-bottom .navbar-collapse {
max-height: 200px;
}
}
.container > .navbar-header,
.container-fluid > .navbar-header,
.container > .navbar-collapse,
.container-fluid > .navbar-collapse {
margin-right: -15px;
margin-left: -15px;
}
@media (min-width: 768px) {
.container > .navbar-header,
.container-fluid > .navbar-header,
.container > .navbar-collapse,
.container-fluid > .navbar-collapse {
margin-right: 0;
margin-left: 0;
}
}
.navbar-static-top {
z-index: 1000;
border-width: 0 0 1px;
}
@media (min-width: 768px) {
.navbar-static-top {
border-radius: 0;
}
}
.navbar-fixed-top,
.navbar-fixed-bottom {
position: fixed;
right: 0;
left: 0;
z-index: 1030;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
@media (min-width: 768px) {
.navbar-fixed-top,
.navbar-fixed-bottom {
border-radius: 0;
}
}
.navbar-fixed-top {
top: 0;
border-width: 0 0 1px;
}
.navbar-fixed-bottom {
bottom: 0;
margin-bottom: 0;
border-width: 1px 0 0;
}
.navbar-brand {
float: left;
padding: 15px 15px;
font-size: 18px;
line-height: 20px;
height: 50px;
}
.navbar-brand:hover,
.navbar-brand:focus {
text-decoration: none;
}
@media (min-width: 768px) {
.navbar > .container .navbar-brand,
.navbar > .container-fluid .navbar-brand {
margin-left: -15px;
}
}
.navbar-toggle {
position: relative;
float: right;
margin-right: 15px;
padding: 9px 10px;
margin-top: 8px;
margin-bottom: 8px;
background-color: transparent;
background-image: none;
border: 1px solid transparent;
border-radius: 4px;
}
.navbar-toggle:focus {
outline: 0;
}
.navbar-toggle .icon-bar {
display: block;
width: 22px;
height: 2px;
border-radius: 1px;
}
.navbar-toggle .icon-bar + .icon-bar {
margin-top: 4px;
}
@media (min-width: 768px) {
.navbar-toggle {
display: none;
}
}
.navbar-nav {
margin: 7.5px -15px;
}
.navbar-nav > li > a {
padding-top: 10px;
padding-bottom: 10px;
line-height: 20px;
}
@media (max-width: 767px) {
.navbar-nav .open .dropdown-menu {
position: static;
float: none;
width: auto;
margin-top: 0;
background-color: transparent;
border: 0;
box-shadow: none;
}
.navbar-nav .open .dropdown-menu > li > a,
.navbar-nav .open .dropdown-menu .dropdown-header {
padding: 5px 15px 5px 25px;
}
.navbar-nav .open .dropdown-menu > li > a {
line-height: 20px;
}
.navbar-nav .open .dropdown-menu > li > a:hover,
.navbar-nav .open .dropdown-menu > li > a:focus {
background-image: none;
}
}
@media (min-width: 768px) {
.navbar-nav {
float: left;
margin: 0;
}
.navbar-nav > li {
float: left;
}
.navbar-nav > li > a {
padding-top: 15px;
padding-bottom: 15px;
}
.navbar-nav.navbar-right:last-child {
margin-right: -15px;
}
}
@media (min-width: 768px) {
.navbar-left {
float: left !important;
float: left;
}
.navbar-right {
float: right !important;
float: right;
}
}
.navbar-form {
margin-left: -15px;
margin-right: -15px;
padding: 10px 15px;
border-top: 1px solid transparent;
border-bottom: 1px solid transparent;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1);
margin-top: 8px;
margin-bottom: 8px;
}
@media (min-width: 768px) {
.navbar-form .form-group {
display: inline-block;
margin-bottom: 0;
vertical-align: middle;
}
.navbar-form .form-control {
display: inline-block;
width: auto;
vertical-align: middle;
}
.navbar-form .input-group {
display: inline-table;
vertical-align: middle;
}
.navbar-form .input-group .input-group-addon,
.navbar-form .input-group .input-group-btn,
.navbar-form .input-group .form-control {
width: auto;
}
.navbar-form .input-group > .form-control {
width: 100%;
}
.navbar-form .control-label {
margin-bottom: 0;
vertical-align: middle;
}
.navbar-form .radio,
.navbar-form .checkbox {
display: inline-block;
margin-top: 0;
margin-bottom: 0;
vertical-align: middle;
}
.navbar-form .radio label,
.navbar-form .checkbox label {
padding-left: 0;
}
.navbar-form .radio input[type="radio"],
.navbar-form .checkbox input[type="checkbox"] {
position: relative;
margin-left: 0;
}
.navbar-form .has-feedback .<API key> {
top: 0;
}
}
@media (max-width: 767px) {
.navbar-form .form-group {
margin-bottom: 5px;
}
}
@media (min-width: 768px) {
.navbar-form {
width: auto;
border: 0;
margin-left: 0;
margin-right: 0;
padding-top: 0;
padding-bottom: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
.navbar-form.navbar-right:last-child {
margin-right: -15px;
}
}
.navbar-nav > li > .dropdown-menu {
margin-top: 0;
<API key>: 0;
<API key>: 0;
}
.navbar-fixed-bottom .navbar-nav > li > .dropdown-menu {
<API key>: 0;
<API key>: 0;
}
.navbar-btn {
margin-top: 8px;
margin-bottom: 8px;
}
.navbar-btn.btn-sm {
margin-top: 10px;
margin-bottom: 10px;
}
.navbar-btn.btn-xs {
margin-top: 14px;
margin-bottom: 14px;
}
.navbar-text {
margin-top: 15px;
margin-bottom: 15px;
}
@media (min-width: 768px) {
.navbar-text {
float: left;
margin-left: 15px;
margin-right: 15px;
}
.navbar-text.navbar-right:last-child {
margin-right: 0;
}
}
.navbar-default {
background-color: #f8f8f8;
border-color: #e7e7e7;
}
.navbar-default .navbar-brand {
color: #777777;
}
.navbar-default .navbar-brand:hover,
.navbar-default .navbar-brand:focus {
color: #5e5e5e;
background-color: transparent;
}
.navbar-default .navbar-text {
color: #777777;
}
.navbar-default .navbar-nav > li > a {
color: #777777;
}
.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus {
color: #333333;
background-color: transparent;
}
.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
color: #555555;
background-color: #e7e7e7;
}
.navbar-default .navbar-nav > .disabled > a,
.navbar-default .navbar-nav > .disabled > a:hover,
.navbar-default .navbar-nav > .disabled > a:focus {
color: #cccccc;
background-color: transparent;
}
.navbar-default .navbar-toggle {
border-color: #dddddd;
}
.navbar-default .navbar-toggle:hover,
.navbar-default .navbar-toggle:focus {
background-color: #dddddd;
}
.navbar-default .navbar-toggle .icon-bar {
background-color: #888888;
}
.navbar-default .navbar-collapse,
.navbar-default .navbar-form {
border-color: #e7e7e7;
}
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .open > a:focus {
background-color: #e7e7e7;
color: #555555;
}
@media (max-width: 767px) {
.navbar-default .navbar-nav .open .dropdown-menu > li > a {
color: #777777;
}
.navbar-default .navbar-nav .open .dropdown-menu > li > a:hover,
.navbar-default .navbar-nav .open .dropdown-menu > li > a:focus {
color: #333333;
background-color: transparent;
}
.navbar-default .navbar-nav .open .dropdown-menu > .active > a,
.navbar-default .navbar-nav .open .dropdown-menu > .active > a:hover,
.navbar-default .navbar-nav .open .dropdown-menu > .active > a:focus {
color: #555555;
background-color: #e7e7e7;
}
.navbar-default .navbar-nav .open .dropdown-menu > .disabled > a,
.navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:hover,
.navbar-default .navbar-nav .open .dropdown-menu > .disabled > a:focus {
color: #cccccc;
background-color: transparent;
}
}
.navbar-default .navbar-link {
color: #777777;
}
.navbar-default .navbar-link:hover {
color: #333333;
}
.navbar-default .btn-link {
color: #777777;
}
.navbar-default .btn-link:hover,
.navbar-default .btn-link:focus {
color: #333333;
}
.navbar-default .btn-link[disabled]:hover,
fieldset[disabled] .navbar-default .btn-link:hover,
.navbar-default .btn-link[disabled]:focus,
fieldset[disabled] .navbar-default .btn-link:focus {
color: #cccccc;
}
.navbar-inverse {
background-color: #222222;
border-color: #080808;
}
.navbar-inverse .navbar-brand {
color: #777777;
}
.navbar-inverse .navbar-brand:hover,
.navbar-inverse .navbar-brand:focus {
color: #ffffff;
background-color: transparent;
}
.navbar-inverse .navbar-text {
color: #777777;
}
.navbar-inverse .navbar-nav > li > a {
color: #777777;
}
.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > li > a:focus {
color: #ffffff;
background-color: transparent;
}
.navbar-inverse .navbar-nav > .active > a,
.navbar-inverse .navbar-nav > .active > a:hover,
.navbar-inverse .navbar-nav > .active > a:focus {
color: #ffffff;
background-color: #080808;
}
.navbar-inverse .navbar-nav > .disabled > a,
.navbar-inverse .navbar-nav > .disabled > a:hover,
.navbar-inverse .navbar-nav > .disabled > a:focus {
color: #444444;
background-color: transparent;
}
.navbar-inverse .navbar-toggle {
border-color: #333333;
}
.navbar-inverse .navbar-toggle:hover,
.navbar-inverse .navbar-toggle:focus {
background-color: #333333;
}
.navbar-inverse .navbar-toggle .icon-bar {
background-color: #ffffff;
}
.navbar-inverse .navbar-collapse,
.navbar-inverse .navbar-form {
border-color: #101010;
}
.navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .open > a:hover,
.navbar-inverse .navbar-nav > .open > a:focus {
background-color: #080808;
color: #ffffff;
}
@media (max-width: 767px) {
.navbar-inverse .navbar-nav .open .dropdown-menu > .dropdown-header {
border-color: #080808;
}
.navbar-inverse .navbar-nav .open .dropdown-menu .divider {
background-color: #080808;
}
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a {
color: #777777;
}
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:hover,
.navbar-inverse .navbar-nav .open .dropdown-menu > li > a:focus {
color: #ffffff;
background-color: transparent;
}
.navbar-inverse .navbar-nav .open .dropdown-menu > .active > a,
.navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:hover,
.navbar-inverse .navbar-nav .open .dropdown-menu > .active > a:focus {
color: #ffffff;
background-color: #080808;
}
.navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a,
.navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:hover,
.navbar-inverse .navbar-nav .open .dropdown-menu > .disabled > a:focus {
color: #444444;
background-color: transparent;
}
}
.navbar-inverse .navbar-link {
color: #777777;
}
.navbar-inverse .navbar-link:hover {
color: #ffffff;
}
.navbar-inverse .btn-link {
color: #777777;
}
.navbar-inverse .btn-link:hover,
.navbar-inverse .btn-link:focus {
color: #ffffff;
}
.navbar-inverse .btn-link[disabled]:hover,
fieldset[disabled] .navbar-inverse .btn-link:hover,
.navbar-inverse .btn-link[disabled]:focus,
fieldset[disabled] .navbar-inverse .btn-link:focus {
color: #444444;
}
.breadcrumb {
padding: 8px 15px;
margin-bottom: 20px;
list-style: none;
background-color: #f5f5f5;
border-radius: 4px;
}
.breadcrumb > li {
display: inline-block;
}
.breadcrumb > li + li:before {
content: "/\00a0";
padding: 0 5px;
color: #cccccc;
}
.breadcrumb > .active {
color: #777777;
}
.pagination {
display: inline-block;
padding-left: 0;
margin: 20px 0;
border-radius: 4px;
}
.pagination > li {
display: inline;
}
.pagination > li > a,
.pagination > li > span {
position: relative;
float: left;
padding: 6px 12px;
line-height: 1.42857143;
text-decoration: none;
color: #428bca;
background-color: #ffffff;
border: 1px solid #dddddd;
margin-left: -1px;
}
.pagination > li:first-child > a,
.pagination > li:first-child > span {
margin-left: 0;
<API key>: 4px;
<API key>: 4px;
}
.pagination > li:last-child > a,
.pagination > li:last-child > span {
<API key>: 4px;
<API key>: 4px;
}
.pagination > li > a:hover,
.pagination > li > span:hover,
.pagination > li > a:focus,
.pagination > li > span:focus {
color: #2a6496;
background-color: #eeeeee;
border-color: #dddddd;
}
.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover,
.pagination > .active > a:focus,
.pagination > .active > span:focus {
z-index: 2;
color: #ffffff;
background-color: #428bca;
border-color: #428bca;
cursor: default;
}
.pagination > .disabled > span,
.pagination > .disabled > span:hover,
.pagination > .disabled > span:focus,
.pagination > .disabled > a,
.pagination > .disabled > a:hover,
.pagination > .disabled > a:focus {
color: #777777;
background-color: #ffffff;
border-color: #dddddd;
cursor: not-allowed;
}
.pagination-lg > li > a,
.pagination-lg > li > span {
padding: 10px 16px;
font-size: 18px;
}
.pagination-lg > li:first-child > a,
.pagination-lg > li:first-child > span {
<API key>: 6px;
<API key>: 6px;
}
.pagination-lg > li:last-child > a,
.pagination-lg > li:last-child > span {
<API key>: 6px;
<API key>: 6px;
}
.pagination-sm > li > a,
.pagination-sm > li > span {
padding: 5px 10px;
font-size: 12px;
}
.pagination-sm > li:first-child > a,
.pagination-sm > li:first-child > span {
<API key>: 3px;
<API key>: 3px;
}
.pagination-sm > li:last-child > a,
.pagination-sm > li:last-child > span {
<API key>: 3px;
<API key>: 3px;
}
.pager {
padding-left: 0;
margin: 20px 0;
list-style: none;
text-align: center;
}
.pager li {
display: inline;
}
.pager li > a,
.pager li > span {
display: inline-block;
padding: 5px 14px;
background-color: #ffffff;
border: 1px solid #dddddd;
border-radius: 15px;
}
.pager li > a:hover,
.pager li > a:focus {
text-decoration: none;
background-color: #eeeeee;
}
.pager .next > a,
.pager .next > span {
float: right;
}
.pager .previous > a,
.pager .previous > span {
float: left;
}
.pager .disabled > a,
.pager .disabled > a:hover,
.pager .disabled > a:focus,
.pager .disabled > span {
color: #777777;
background-color: #ffffff;
cursor: not-allowed;
}
.label {
display: inline;
padding: .2em .6em .3em;
font-size: 75%;
font-weight: bold;
line-height: 1;
color: #ffffff;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
border-radius: .25em;
}
a.label:hover,
a.label:focus {
color: #ffffff;
text-decoration: none;
cursor: pointer;
}
.label:empty {
display: none;
}
.btn .label {
position: relative;
top: -1px;
}
.label-default {
background-color: #777777;
}
.label-default[href]:hover,
.label-default[href]:focus {
background-color: #5e5e5e;
}
.label-primary {
background-color: #428bca;
}
.label-primary[href]:hover,
.label-primary[href]:focus {
background-color: #3071a9;
}
.label-success {
background-color: #5cb85c;
}
.label-success[href]:hover,
.label-success[href]:focus {
background-color: #449d44;
}
.label-info {
background-color: #5bc0de;
}
.label-info[href]:hover,
.label-info[href]:focus {
background-color: #31b0d5;
}
.label-warning {
background-color: #f0ad4e;
}
.label-warning[href]:hover,
.label-warning[href]:focus {
background-color: #ec971f;
}
.label-danger {
background-color: #d9534f;
}
.label-danger[href]:hover,
.label-danger[href]:focus {
background-color: #c9302c;
}
.badge {
display: inline-block;
min-width: 10px;
padding: 3px 7px;
font-size: 12px;
font-weight: bold;
color: #ffffff;
line-height: 1;
vertical-align: baseline;
white-space: nowrap;
text-align: center;
background-color: #777777;
border-radius: 10px;
}
.badge:empty {
display: none;
}
.btn .badge {
position: relative;
top: -1px;
}
.btn-xs .badge {
top: 0;
padding: 1px 5px;
}
a.badge:hover,
a.badge:focus {
color: #ffffff;
text-decoration: none;
cursor: pointer;
}
a.list-group-item.active > .badge,
.nav-pills > .active > a > .badge {
color: #428bca;
background-color: #ffffff;
}
.nav-pills > li > a > .badge {
margin-left: 3px;
}
.jumbotron {
padding: 30px;
margin-bottom: 30px;
color: inherit;
background-color: #eeeeee;
}
.jumbotron h1,
.jumbotron .h1 {
color: inherit;
}
.jumbotron p {
margin-bottom: 15px;
font-size: 21px;
font-weight: 200;
}
.jumbotron > hr {
border-top-color: #d5d5d5;
}
.container .jumbotron {
border-radius: 6px;
}
.jumbotron .container {
max-width: 100%;
}
@media screen and (min-width: 768px) {
.jumbotron {
padding-top: 48px;
padding-bottom: 48px;
}
.container .jumbotron {
padding-left: 60px;
padding-right: 60px;
}
.jumbotron h1,
.jumbotron .h1 {
font-size: 63px;
}
}
.thumbnail {
display: block;
padding: 4px;
margin-bottom: 20px;
line-height: 1.42857143;
background-color: #ffffff;
border: 1px solid #dddddd;
border-radius: 4px;
-webkit-transition: all 0.2s ease-in-out;
-o-transition: all 0.2s ease-in-out;
transition: all 0.2s ease-in-out;
}
.thumbnail > img,
.thumbnail a > img {
margin-left: auto;
margin-right: auto;
}
a.thumbnail:hover,
a.thumbnail:focus,
a.thumbnail.active {
border-color: #428bca;
}
.thumbnail .caption {
padding: 9px;
color: #333333;
}
.alert {
padding: 15px;
margin-bottom: 20px;
border: 1px solid transparent;
border-radius: 4px;
}
.alert h4 {
margin-top: 0;
color: inherit;
}
.alert .alert-link {
font-weight: bold;
}
.alert > p,
.alert > ul {
margin-bottom: 0;
}
.alert > p + p {
margin-top: 5px;
}
.alert-dismissable,
.alert-dismissible {
padding-right: 35px;
}
.alert-dismissable .close,
.alert-dismissible .close {
position: relative;
top: -2px;
right: -21px;
color: inherit;
}
.alert-success {
background-color: #dff0d8;
border-color: #d6e9c6;
color: #3c763d;
}
.alert-success hr {
border-top-color: #c9e2b3;
}
.alert-success .alert-link {
color: #2b542c;
}
.alert-info {
background-color: #d9edf7;
border-color: #bce8f1;
color: #31708f;
}
.alert-info hr {
border-top-color: #a6e1ec;
}
.alert-info .alert-link {
color: #245269;
}
.alert-warning {
background-color: #fcf8e3;
border-color: #faebcc;
color: #8a6d3b;
}
.alert-warning hr {
border-top-color: #f7e1b5;
}
.alert-warning .alert-link {
color: #66512c;
}
.alert-danger {
background-color: #f2dede;
border-color: #ebccd1;
color: #a94442;
}
.alert-danger hr {
border-top-color: #e4b9c0;
}
.alert-danger .alert-link {
color: #843534;
}
@-webkit-keyframes <API key> {
from {
background-position: 40px 0;
}
to {
background-position: 0 0;
}
}
@keyframes <API key> {
from {
background-position: 40px 0;
}
to {
background-position: 0 0;
}
}
.progress {
overflow: hidden;
height: 20px;
margin-bottom: 20px;
background-color: #f5f5f5;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}
.progress-bar {
float: left;
width: 0%;
height: 100%;
font-size: 12px;
line-height: 20px;
color: #ffffff;
text-align: center;
background-color: #428bca;
-webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
-webkit-transition: width 0.6s ease;
-o-transition: width 0.6s ease;
transition: width 0.6s ease;
}
.progress-striped .progress-bar,
.<API key> {
background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-size: 40px 40px;
}
.progress.active .progress-bar,
.progress-bar.active {
-webkit-animation: <API key> 2s linear infinite;
-o-animation: <API key> 2s linear infinite;
animation: <API key> 2s linear infinite;
}
.progress-bar[aria-valuenow="1"],
.progress-bar[aria-valuenow="2"] {
min-width: 30px;
}
.progress-bar[aria-valuenow="0"] {
color: #777777;
min-width: 30px;
background-color: transparent;
background-image: none;
box-shadow: none;
}
.<API key> {
background-color: #5cb85c;
}
.progress-striped .<API key> {
background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
.progress-bar-info {
background-color: #5bc0de;
}
.progress-striped .progress-bar-info {
background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
.<API key> {
background-color: #f0ad4e;
}
.progress-striped .<API key> {
background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
.progress-bar-danger {
background-color: #d9534f;
}
.progress-striped .progress-bar-danger {
background-image: -<API key>(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
}
.media,
.media-body {
overflow: hidden;
zoom: 1;
}
.media,
.media .media {
margin-top: 15px;
}
.media:first-child {
margin-top: 0;
}
.media-object {
display: block;
}
.media-heading {
margin: 0 0 5px;
}
.media > .pull-left {
margin-right: 10px;
}
.media > .pull-right {
margin-left: 10px;
}
.media-list {
padding-left: 0;
list-style: none;
}
.list-group {
margin-bottom: 20px;
padding-left: 0;
}
.list-group-item {
position: relative;
display: block;
padding: 10px 15px;
margin-bottom: -1px;
background-color: #ffffff;
border: 1px solid #dddddd;
}
.list-group-item:first-child {
<API key>: 4px;
<API key>: 4px;
}
.list-group-item:last-child {
margin-bottom: 0;
<API key>: 4px;
<API key>: 4px;
}
.list-group-item > .badge {
float: right;
}
.list-group-item > .badge + .badge {
margin-right: 5px;
}
a.list-group-item {
color: #555555;
}
a.list-group-item .<API key> {
color: #333333;
}
a.list-group-item:hover,
a.list-group-item:focus {
text-decoration: none;
color: #555555;
background-color: #f5f5f5;
}
.list-group-item.disabled,
.list-group-item.disabled:hover,
.list-group-item.disabled:focus {
background-color: #eeeeee;
color: #777777;
}
.list-group-item.disabled .<API key>,
.list-group-item.disabled:hover .<API key>,
.list-group-item.disabled:focus .<API key> {
color: inherit;
}
.list-group-item.disabled .<API key>,
.list-group-item.disabled:hover .<API key>,
.list-group-item.disabled:focus .<API key> {
color: #777777;
}
.list-group-item.active,
.list-group-item.active:hover,
.list-group-item.active:focus {
z-index: 2;
color: #ffffff;
background-color: #428bca;
border-color: #428bca;
}
.list-group-item.active .<API key>,
.list-group-item.active:hover .<API key>,
.list-group-item.active:focus .<API key>,
.list-group-item.active .<API key> > small,
.list-group-item.active:hover .<API key> > small,
.list-group-item.active:focus .<API key> > small,
.list-group-item.active .<API key> > .small,
.list-group-item.active:hover .<API key> > .small,
.list-group-item.active:focus .<API key> > .small {
color: inherit;
}
.list-group-item.active .<API key>,
.list-group-item.active:hover .<API key>,
.list-group-item.active:focus .<API key> {
color: #e1edf7;
}
.<API key> {
color: #3c763d;
background-color: #dff0d8;
}
a.<API key> {
color: #3c763d;
}
a.<API key> .<API key> {
color: inherit;
}
a.<API key>:hover,
a.<API key>:focus {
color: #3c763d;
background-color: #d0e9c6;
}
a.<API key>.active,
a.<API key>.active:hover,
a.<API key>.active:focus {
color: #fff;
background-color: #3c763d;
border-color: #3c763d;
}
.<API key> {
color: #31708f;
background-color: #d9edf7;
}
a.<API key> {
color: #31708f;
}
a.<API key> .<API key> {
color: inherit;
}
a.<API key>:hover,
a.<API key>:focus {
color: #31708f;
background-color: #c4e3f3;
}
a.<API key>.active,
a.<API key>.active:hover,
a.<API key>.active:focus {
color: #fff;
background-color: #31708f;
border-color: #31708f;
}
.<API key> {
color: #8a6d3b;
background-color: #fcf8e3;
}
a.<API key> {
color: #8a6d3b;
}
a.<API key> .<API key> {
color: inherit;
}
a.<API key>:hover,
a.<API key>:focus {
color: #8a6d3b;
background-color: #faf2cc;
}
a.<API key>.active,
a.<API key>.active:hover,
a.<API key>.active:focus {
color: #fff;
background-color: #8a6d3b;
border-color: #8a6d3b;
}
.<API key> {
color: #a94442;
background-color: #f2dede;
}
a.<API key> {
color: #a94442;
}
a.<API key> .<API key> {
color: inherit;
}
a.<API key>:hover,
a.<API key>:focus {
color: #a94442;
background-color: #ebcccc;
}
a.<API key>.active,
a.<API key>.active:hover,
a.<API key>.active:focus {
color: #fff;
background-color: #a94442;
border-color: #a94442;
}
.<API key> {
margin-top: 0;
margin-bottom: 5px;
}
.<API key> {
margin-bottom: 0;
line-height: 1.3;
}
.panel {
margin-bottom: 20px;
background-color: #ffffff;
border: 1px solid transparent;
border-radius: 4px;
-webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.05);
}
.panel-body {
padding: 15px;
}
.panel-heading {
padding: 10px 15px;
border-bottom: 1px solid transparent;
<API key>: 3px;
<API key>: 3px;
}
.panel-heading > .dropdown .dropdown-toggle {
color: inherit;
}
.panel-title {
margin-top: 0;
margin-bottom: 0;
font-size: 16px;
color: inherit;
}
.panel-title > a {
color: inherit;
}
.panel-footer {
padding: 10px 15px;
background-color: #f5f5f5;
border-top: 1px solid #dddddd;
<API key>: 3px;
<API key>: 3px;
}
.panel > .list-group {
margin-bottom: 0;
}
.panel > .list-group .list-group-item {
border-width: 1px 0;
border-radius: 0;
}
.panel > .list-group:first-child .list-group-item:first-child {
border-top: 0;
<API key>: 3px;
<API key>: 3px;
}
.panel > .list-group:last-child .list-group-item:last-child {
border-bottom: 0;
<API key>: 3px;
<API key>: 3px;
}
.panel-heading + .list-group .list-group-item:first-child {
border-top-width: 0;
}
.list-group + .panel-footer {
border-top-width: 0;
}
.panel > .table,
.panel > .table-responsive > .table,
.panel > .panel-collapse > .table {
margin-bottom: 0;
}
.panel > .table:first-child,
.panel > .table-responsive:first-child > .table:first-child {
<API key>: 3px;
<API key>: 3px;
}
.panel > .table:first-child > thead:first-child > tr:first-child td:first-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:first-child,
.panel > .table:first-child > tbody:first-child > tr:first-child td:first-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:first-child,
.panel > .table:first-child > thead:first-child > tr:first-child th:first-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:first-child,
.panel > .table:first-child > tbody:first-child > tr:first-child th:first-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:first-child {
<API key>: 3px;
}
.panel > .table:first-child > thead:first-child > tr:first-child td:last-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child td:last-child,
.panel > .table:first-child > tbody:first-child > tr:first-child td:last-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child td:last-child,
.panel > .table:first-child > thead:first-child > tr:first-child th:last-child,
.panel > .table-responsive:first-child > .table:first-child > thead:first-child > tr:first-child th:last-child,
.panel > .table:first-child > tbody:first-child > tr:first-child th:last-child,
.panel > .table-responsive:first-child > .table:first-child > tbody:first-child > tr:first-child th:last-child {
<API key>: 3px;
}
.panel > .table:last-child,
.panel > .table-responsive:last-child > .table:last-child {
<API key>: 3px;
<API key>: 3px;
}
.panel > .table:last-child > tbody:last-child > tr:last-child td:first-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:first-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:first-child,
.panel > .table:last-child > tbody:last-child > tr:last-child th:first-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:first-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child th:first-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:first-child {
<API key>: 3px;
}
.panel > .table:last-child > tbody:last-child > tr:last-child td:last-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child td:last-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child td:last-child,
.panel > .table:last-child > tbody:last-child > tr:last-child th:last-child,
.panel > .table-responsive:last-child > .table:last-child > tbody:last-child > tr:last-child th:last-child,
.panel > .table:last-child > tfoot:last-child > tr:last-child th:last-child,
.panel > .table-responsive:last-child > .table:last-child > tfoot:last-child > tr:last-child th:last-child {
<API key>: 3px;
}
.panel > .panel-body + .table,
.panel > .panel-body + .table-responsive {
border-top: 1px solid #dddddd;
}
.panel > .table > tbody:first-child > tr:first-child th,
.panel > .table > tbody:first-child > tr:first-child td {
border-top: 0;
}
.panel > .table-bordered,
.panel > .table-responsive > .table-bordered {
border: 0;
}
.panel > .table-bordered > thead > tr > th:first-child,
.panel > .table-responsive > .table-bordered > thead > tr > th:first-child,
.panel > .table-bordered > tbody > tr > th:first-child,
.panel > .table-responsive > .table-bordered > tbody > tr > th:first-child,
.panel > .table-bordered > tfoot > tr > th:first-child,
.panel > .table-responsive > .table-bordered > tfoot > tr > th:first-child,
.panel > .table-bordered > thead > tr > td:first-child,
.panel > .table-responsive > .table-bordered > thead > tr > td:first-child,
.panel > .table-bordered > tbody > tr > td:first-child,
.panel > .table-responsive > .table-bordered > tbody > tr > td:first-child,
.panel > .table-bordered > tfoot > tr > td:first-child,
.panel > .table-responsive > .table-bordered > tfoot > tr > td:first-child {
border-left: 0;
}
.panel > .table-bordered > thead > tr > th:last-child,
.panel > .table-responsive > .table-bordered > thead > tr > th:last-child,
.panel > .table-bordered > tbody > tr > th:last-child,
.panel > .table-responsive > .table-bordered > tbody > tr > th:last-child,
.panel > .table-bordered > tfoot > tr > th:last-child,
.panel > .table-responsive > .table-bordered > tfoot > tr > th:last-child,
.panel > .table-bordered > thead > tr > td:last-child,
.panel > .table-responsive > .table-bordered > thead > tr > td:last-child,
.panel > .table-bordered > tbody > tr > td:last-child,
.panel > .table-responsive > .table-bordered > tbody > tr > td:last-child,
.panel > .table-bordered > tfoot > tr > td:last-child,
.panel > .table-responsive > .table-bordered > tfoot > tr > td:last-child {
border-right: 0;
}
.panel > .table-bordered > thead > tr:first-child > td,
.panel > .table-responsive > .table-bordered > thead > tr:first-child > td,
.panel > .table-bordered > tbody > tr:first-child > td,
.panel > .table-responsive > .table-bordered > tbody > tr:first-child > td,
.panel > .table-bordered > thead > tr:first-child > th,
.panel > .table-responsive > .table-bordered > thead > tr:first-child > th,
.panel > .table-bordered > tbody > tr:first-child > th,
.panel > .table-responsive > .table-bordered > tbody > tr:first-child > th {
border-bottom: 0;
}
.panel > .table-bordered > tbody > tr:last-child > td,
.panel > .table-responsive > .table-bordered > tbody > tr:last-child > td,
.panel > .table-bordered > tfoot > tr:last-child > td,
.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > td,
.panel > .table-bordered > tbody > tr:last-child > th,
.panel > .table-responsive > .table-bordered > tbody > tr:last-child > th,
.panel > .table-bordered > tfoot > tr:last-child > th,
.panel > .table-responsive > .table-bordered > tfoot > tr:last-child > th {
border-bottom: 0;
}
.panel > .table-responsive {
border: 0;
margin-bottom: 0;
}
.panel-group {
margin-bottom: 20px;
}
.panel-group .panel {
margin-bottom: 0;
border-radius: 4px;
}
.panel-group .panel + .panel {
margin-top: 5px;
}
.panel-group .panel-heading {
border-bottom: 0;
}
.panel-group .panel-heading + .panel-collapse > .panel-body {
border-top: 1px solid #dddddd;
}
.panel-group .panel-footer {
border-top: 0;
}
.panel-group .panel-footer + .panel-collapse .panel-body {
border-bottom: 1px solid #dddddd;
}
.panel-default {
border-color: #dddddd;
}
.panel-default > .panel-heading {
color: #333333;
background-color: #f5f5f5;
border-color: #dddddd;
}
.panel-default > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #dddddd;
}
.panel-default > .panel-heading .badge {
color: #f5f5f5;
background-color: #333333;
}
.panel-default > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #dddddd;
}
.panel-primary {
border-color: #428bca;
}
.panel-primary > .panel-heading {
color: #ffffff;
background-color: #428bca;
border-color: #428bca;
}
.panel-primary > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #428bca;
}
.panel-primary > .panel-heading .badge {
color: #428bca;
background-color: #ffffff;
}
.panel-primary > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #428bca;
}
.panel-success {
border-color: #d6e9c6;
}
.panel-success > .panel-heading {
color: #3c763d;
background-color: #dff0d8;
border-color: #d6e9c6;
}
.panel-success > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #d6e9c6;
}
.panel-success > .panel-heading .badge {
color: #dff0d8;
background-color: #3c763d;
}
.panel-success > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #d6e9c6;
}
.panel-info {
border-color: #bce8f1;
}
.panel-info > .panel-heading {
color: #31708f;
background-color: #d9edf7;
border-color: #bce8f1;
}
.panel-info > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #bce8f1;
}
.panel-info > .panel-heading .badge {
color: #d9edf7;
background-color: #31708f;
}
.panel-info > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #bce8f1;
}
.panel-warning {
border-color: #faebcc;
}
.panel-warning > .panel-heading {
color: #8a6d3b;
background-color: #fcf8e3;
border-color: #faebcc;
}
.panel-warning > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #faebcc;
}
.panel-warning > .panel-heading .badge {
color: #fcf8e3;
background-color: #8a6d3b;
}
.panel-warning > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #faebcc;
}
.panel-danger {
border-color: #ebccd1;
}
.panel-danger > .panel-heading {
color: #a94442;
background-color: #f2dede;
border-color: #ebccd1;
}
.panel-danger > .panel-heading + .panel-collapse > .panel-body {
border-top-color: #ebccd1;
}
.panel-danger > .panel-heading .badge {
color: #f2dede;
background-color: #a94442;
}
.panel-danger > .panel-footer + .panel-collapse > .panel-body {
border-bottom-color: #ebccd1;
}
.embed-responsive {
position: relative;
display: block;
height: 0;
padding: 0;
overflow: hidden;
}
.embed-responsive .<API key>,
.embed-responsive iframe,
.embed-responsive embed,
.embed-responsive object {
position: absolute;
top: 0;
left: 0;
bottom: 0;
height: 100%;
width: 100%;
border: 0;
}
.embed-responsive.<API key> {
padding-bottom: 56.25%;
}
.embed-responsive.<API key> {
padding-bottom: 75%;
}
.well {
min-height: 20px;
padding: 19px;
margin-bottom: 20px;
background-color: #f5f5f5;
border: 1px solid #e3e3e3;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
}
.well blockquote {
border-color: #ddd;
border-color: rgba(0, 0, 0, 0.15);
}
.well-lg {
padding: 24px;
border-radius: 6px;
}
.well-sm {
padding: 9px;
border-radius: 3px;
}
.close {
float: right;
font-size: 21px;
font-weight: bold;
line-height: 1;
color: #000000;
text-shadow: 0 1px 0 #ffffff;
opacity: 0.2;
filter: alpha(opacity=20);
}
.close:hover,
.close:focus {
color: #000000;
text-decoration: none;
cursor: pointer;
opacity: 0.5;
filter: alpha(opacity=50);
}
button.close {
padding: 0;
cursor: pointer;
background: transparent;
border: 0;
-webkit-appearance: none;
}
.modal-open {
overflow: hidden;
}
.modal {
display: none;
overflow: hidden;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1050;
-<API key>: touch;
outline: 0;
}
.modal.fade .modal-dialog {
-webkit-transform: translate3d(0, -25%, 0);
transform: translate3d(0, -25%, 0);
-webkit-transition: -webkit-transform 0.3s ease-out;
-moz-transition: -moz-transform 0.3s ease-out;
-o-transition: -o-transform 0.3s ease-out;
transition: transform 0.3s ease-out;
}
.modal.in .modal-dialog {
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
.modal-open .modal {
overflow-x: hidden;
overflow-y: auto;
}
.modal-dialog {
position: relative;
width: auto;
margin: 10px;
}
.modal-content {
position: relative;
background-color: #ffffff;
border: 1px solid #999999;
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 6px;
-webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
background-clip: padding-box;
outline: 0;
}
.modal-backdrop {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1040;
background-color: #000000;
}
.modal-backdrop.fade {
opacity: 0;
filter: alpha(opacity=0);
}
.modal-backdrop.in {
opacity: 0.5;
filter: alpha(opacity=50);
}
.modal-header {
padding: 15px;
border-bottom: 1px solid #e5e5e5;
min-height: 16.42857143px;
}
.modal-header .close {
margin-top: -2px;
}
.modal-title {
margin: 0;
line-height: 1.42857143;
}
.modal-body {
position: relative;
padding: 15px;
}
.modal-footer {
padding: 15px;
text-align: right;
border-top: 1px solid #e5e5e5;
}
.modal-footer .btn + .btn {
margin-left: 5px;
margin-bottom: 0;
}
.modal-footer .btn-group .btn + .btn {
margin-left: -1px;
}
.modal-footer .btn-block + .btn-block {
margin-left: 0;
}
.<API key> {
position: absolute;
top: -9999px;
width: 50px;
height: 50px;
overflow: scroll;
}
@media (min-width: 768px) {
.modal-dialog {
width: 600px;
margin: 30px auto;
}
.modal-content {
-webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}
.modal-sm {
width: 300px;
}
}
@media (min-width: 992px) {
.modal-lg {
width: 900px;
}
}
.tooltip {
position: absolute;
z-index: 1070;
display: block;
visibility: visible;
font-size: 12px;
line-height: 1.4;
opacity: 0;
filter: alpha(opacity=0);
}
.tooltip.in {
opacity: 0.9;
filter: alpha(opacity=90);
}
.tooltip.top {
margin-top: -3px;
padding: 5px 0;
}
.tooltip.right {
margin-left: 3px;
padding: 0 5px;
}
.tooltip.bottom {
margin-top: 3px;
padding: 5px 0;
}
.tooltip.left {
margin-left: -3px;
padding: 0 5px;
}
.tooltip-inner {
max-width: 200px;
padding: 3px 8px;
color: #ffffff;
text-align: center;
text-decoration: none;
background-color: #000000;
border-radius: 4px;
}
.tooltip-arrow {
position: absolute;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
.tooltip.top .tooltip-arrow {
bottom: 0;
left: 50%;
margin-left: -5px;
border-width: 5px 5px 0;
border-top-color: #000000;
}
.tooltip.top-left .tooltip-arrow {
bottom: 0;
left: 5px;
border-width: 5px 5px 0;
border-top-color: #000000;
}
.tooltip.top-right .tooltip-arrow {
bottom: 0;
right: 5px;
border-width: 5px 5px 0;
border-top-color: #000000;
}
.tooltip.right .tooltip-arrow {
top: 50%;
left: 0;
margin-top: -5px;
border-width: 5px 5px 5px 0;
border-right-color: #000000;
}
.tooltip.left .tooltip-arrow {
top: 50%;
right: 0;
margin-top: -5px;
border-width: 5px 0 5px 5px;
border-left-color: #000000;
}
.tooltip.bottom .tooltip-arrow {
top: 0;
left: 50%;
margin-left: -5px;
border-width: 0 5px 5px;
border-bottom-color: #000000;
}
.tooltip.bottom-left .tooltip-arrow {
top: 0;
left: 5px;
border-width: 0 5px 5px;
border-bottom-color: #000000;
}
.tooltip.bottom-right .tooltip-arrow {
top: 0;
right: 5px;
border-width: 0 5px 5px;
border-bottom-color: #000000;
}
.popover {
position: absolute;
top: 0;
left: 0;
z-index: 1060;
display: none;
max-width: 276px;
padding: 1px;
text-align: left;
background-color: #ffffff;
background-clip: padding-box;
border: 1px solid #cccccc;
border: 1px solid rgba(0, 0, 0, 0.2);
border-radius: 6px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
white-space: normal;
}
.popover.top {
margin-top: -10px;
}
.popover.right {
margin-left: 10px;
}
.popover.bottom {
margin-top: 10px;
}
.popover.left {
margin-left: -10px;
}
.popover-title {
margin: 0;
padding: 8px 14px;
font-size: 14px;
font-weight: normal;
line-height: 18px;
background-color: #f7f7f7;
border-bottom: 1px solid #ebebeb;
border-radius: 5px 5px 0 0;
}
.popover-content {
padding: 9px 14px;
}
.popover > .arrow,
.popover > .arrow:after {
position: absolute;
display: block;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
.popover > .arrow {
border-width: 11px;
}
.popover > .arrow:after {
border-width: 10px;
content: "";
}
.popover.top > .arrow {
left: 50%;
margin-left: -11px;
border-bottom-width: 0;
border-top-color: #999999;
border-top-color: rgba(0, 0, 0, 0.25);
bottom: -11px;
}
.popover.top > .arrow:after {
content: " ";
bottom: 1px;
margin-left: -10px;
border-bottom-width: 0;
border-top-color: #ffffff;
}
.popover.right > .arrow {
top: 50%;
left: -11px;
margin-top: -11px;
border-left-width: 0;
border-right-color: #999999;
border-right-color: rgba(0, 0, 0, 0.25);
}
.popover.right > .arrow:after {
content: " ";
left: 1px;
bottom: -10px;
border-left-width: 0;
border-right-color: #ffffff;
}
.popover.bottom > .arrow {
left: 50%;
margin-left: -11px;
border-top-width: 0;
border-bottom-color: #999999;
border-bottom-color: rgba(0, 0, 0, 0.25);
top: -11px;
}
.popover.bottom > .arrow:after {
content: " ";
top: 1px;
margin-left: -10px;
border-top-width: 0;
border-bottom-color: #ffffff;
}
.popover.left > .arrow {
top: 50%;
right: -11px;
margin-top: -11px;
border-right-width: 0;
border-left-color: #999999;
border-left-color: rgba(0, 0, 0, 0.25);
}
.popover.left > .arrow:after {
content: " ";
right: 1px;
border-right-width: 0;
border-left-color: #ffffff;
bottom: -10px;
}
.carousel {
position: relative;
}
.carousel-inner {
position: relative;
overflow: hidden;
width: 100%;
}
.carousel-inner > .item {
display: none;
position: relative;
-webkit-transition: 0.6s ease-in-out left;
-o-transition: 0.6s ease-in-out left;
transition: 0.6s ease-in-out left;
}
.carousel-inner > .item > img,
.carousel-inner > .item > a > img {
line-height: 1;
}
.carousel-inner > .active,
.carousel-inner > .next,
.carousel-inner > .prev {
display: block;
}
.carousel-inner > .active {
left: 0;
}
.carousel-inner > .next,
.carousel-inner > .prev {
position: absolute;
top: 0;
width: 100%;
}
.carousel-inner > .next {
left: 100%;
}
.carousel-inner > .prev {
left: -100%;
}
.carousel-inner > .next.left,
.carousel-inner > .prev.right {
left: 0;
}
.carousel-inner > .active.left {
left: -100%;
}
.carousel-inner > .active.right {
left: 100%;
}
.carousel-control {
position: absolute;
top: 0;
left: 0;
bottom: 0;
width: 15%;
opacity: 0.5;
filter: alpha(opacity=50);
font-size: 20px;
color: #ffffff;
text-align: center;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.carousel-control.left {
background-image: -<API key>(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);
background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);
background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.0001) 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#80000000', endColorstr='#00000000', GradientType=1);
}
.carousel-control.right {
left: auto;
right: 0;
background-image: -<API key>(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);
background-image: -o-linear-gradient(left, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);
background-image: linear-gradient(to right, rgba(0, 0, 0, 0.0001) 0%, rgba(0, 0, 0, 0.5) 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00000000', endColorstr='#80000000', GradientType=1);
}
.carousel-control:hover,
.carousel-control:focus {
outline: 0;
color: #ffffff;
text-decoration: none;
opacity: 0.9;
filter: alpha(opacity=90);
}
.carousel-control .icon-prev,
.carousel-control .icon-next,
.carousel-control .<API key>,
.carousel-control .<API key> {
position: absolute;
top: 50%;
z-index: 5;
display: inline-block;
}
.carousel-control .icon-prev,
.carousel-control .<API key> {
left: 50%;
margin-left: -10px;
}
.carousel-control .icon-next,
.carousel-control .<API key> {
right: 50%;
margin-right: -10px;
}
.carousel-control .icon-prev,
.carousel-control .icon-next {
width: 20px;
height: 20px;
margin-top: -10px;
font-family: serif;
}
.carousel-control .icon-prev:before {
content: '\2039';
}
.carousel-control .icon-next:before {
content: '\203a';
}
.carousel-indicators {
position: absolute;
bottom: 10px;
left: 50%;
z-index: 15;
width: 60%;
margin-left: -30%;
padding-left: 0;
list-style: none;
text-align: center;
}
.carousel-indicators li {
display: inline-block;
width: 10px;
height: 10px;
margin: 1px;
text-indent: -999px;
border: 1px solid #ffffff;
border-radius: 10px;
cursor: pointer;
background-color: #000 \9;
background-color: rgba(0, 0, 0, 0);
}
.carousel-indicators .active {
margin: 0;
width: 12px;
height: 12px;
background-color: #ffffff;
}
.carousel-caption {
position: absolute;
left: 15%;
right: 15%;
bottom: 20px;
z-index: 10;
padding-top: 20px;
padding-bottom: 20px;
color: #ffffff;
text-align: center;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}
.carousel-caption .btn {
text-shadow: none;
}
@media screen and (min-width: 768px) {
.carousel-control .<API key>,
.carousel-control .<API key>,
.carousel-control .icon-prev,
.carousel-control .icon-next {
width: 30px;
height: 30px;
margin-top: -15px;
font-size: 30px;
}
.carousel-control .<API key>,
.carousel-control .icon-prev {
margin-left: -15px;
}
.carousel-control .<API key>,
.carousel-control .icon-next {
margin-right: -15px;
}
.carousel-caption {
left: 20%;
right: 20%;
padding-bottom: 30px;
}
.carousel-indicators {
bottom: 20px;
}
}
.clearfix:before,
.clearfix:after,
.dl-horizontal dd:before,
.dl-horizontal dd:after,
.container:before,
.container:after,
.container-fluid:before,
.container-fluid:after,
.row:before,
.row:after,
.form-horizontal .form-group:before,
.form-horizontal .form-group:after,
.btn-toolbar:before,
.btn-toolbar:after,
.btn-group-vertical > .btn-group:before,
.btn-group-vertical > .btn-group:after,
.nav:before,
.nav:after,
.navbar:before,
.navbar:after,
.navbar-header:before,
.navbar-header:after,
.navbar-collapse:before,
.navbar-collapse:after,
.pager:before,
.pager:after,
.panel-body:before,
.panel-body:after,
.modal-footer:before,
.modal-footer:after,
html.boxed-layout #<API key>:before,
html.boxed-layout #<API key>:after,
html.boxed-layout #<API key>:before,
html.boxed-layout #<API key>:after,
html.boxed-layout #layout-footer:before,
html.boxed-layout #layout-footer:after,
html.fixed-nav.boxed-layout #layout-navigation:before,
html.fixed-nav.boxed-layout #layout-navigation:after,
html.floating-nav.boxed-layout .navbar-wrapper:before,
html.floating-nav.boxed-layout .navbar-wrapper:after,
#layout-main:before,
#layout-main:after,
#layout-tripel:before,
#layout-tripel:after,
#footer-quad:before,
#footer-quad:after,
html.sticky-footer.boxed-layout #footer:before,
html.sticky-footer.boxed-layout #footer:after,
html.orchard-users form:before,
html.orchard-users form:after {
content: " ";
display: table;
}
.clearfix:after,
.dl-horizontal dd:after,
.container:after,
.container-fluid:after,
.row:after,
.form-horizontal .form-group:after,
.btn-toolbar:after,
.btn-group-vertical > .btn-group:after,
.nav:after,
.navbar:after,
.navbar-header:after,
.navbar-collapse:after,
.pager:after,
.panel-body:after,
.modal-footer:after,
html.boxed-layout #<API key>:after,
html.boxed-layout #<API key>:after,
html.boxed-layout #layout-footer:after,
html.fixed-nav.boxed-layout #layout-navigation:after,
html.floating-nav.boxed-layout .navbar-wrapper:after,
#layout-main:after,
#layout-tripel:after,
#footer-quad:after,
html.sticky-footer.boxed-layout #footer:after,
html.orchard-users form:after {
clear: both;
}
.center-block {
display: block;
margin-left: auto;
margin-right: auto;
}
.pull-right {
float: right !important;
}
.pull-left {
float: left !important;
}
.hide {
display: none !important;
}
.show {
display: block !important;
}
.invisible {
visibility: hidden;
}
.text-hide {
font: 0/0 a;
color: transparent;
text-shadow: none;
background-color: transparent;
border: 0;
}
.hidden {
display: none !important;
visibility: hidden !important;
}
.affix {
position: fixed;
-webkit-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
}
@-ms-viewport {
width: device-width;
}
.visible-xs,
.visible-sm,
.visible-md,
.visible-lg {
display: none !important;
}
.visible-xs-block,
.visible-xs-inline,
.<API key>,
.visible-sm-block,
.visible-sm-inline,
.<API key>,
.visible-md-block,
.visible-md-inline,
.<API key>,
.visible-lg-block,
.visible-lg-inline,
.<API key> {
display: none !important;
}
@media (max-width: 767px) {
.visible-xs {
display: block !important;
}
table.visible-xs {
display: table;
}
tr.visible-xs {
display: table-row !important;
}
th.visible-xs,
td.visible-xs {
display: table-cell !important;
}
}
@media (max-width: 767px) {
.visible-xs-block {
display: block !important;
}
}
@media (max-width: 767px) {
.visible-xs-inline {
display: inline !important;
}
}
@media (max-width: 767px) {
.<API key> {
display: inline-block !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.visible-sm {
display: block !important;
}
table.visible-sm {
display: table;
}
tr.visible-sm {
display: table-row !important;
}
th.visible-sm,
td.visible-sm {
display: table-cell !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.visible-sm-block {
display: block !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.visible-sm-inline {
display: inline !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.<API key> {
display: inline-block !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.visible-md {
display: block !important;
}
table.visible-md {
display: table;
}
tr.visible-md {
display: table-row !important;
}
th.visible-md,
td.visible-md {
display: table-cell !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.visible-md-block {
display: block !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.visible-md-inline {
display: inline !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.<API key> {
display: inline-block !important;
}
}
@media (min-width: 1200px) {
.visible-lg {
display: block !important;
}
table.visible-lg {
display: table;
}
tr.visible-lg {
display: table-row !important;
}
th.visible-lg,
td.visible-lg {
display: table-cell !important;
}
}
@media (min-width: 1200px) {
.visible-lg-block {
display: block !important;
}
}
@media (min-width: 1200px) {
.visible-lg-inline {
display: inline !important;
}
}
@media (min-width: 1200px) {
.<API key> {
display: inline-block !important;
}
}
@media (max-width: 767px) {
.hidden-xs {
display: none !important;
}
}
@media (min-width: 768px) and (max-width: 991px) {
.hidden-sm {
display: none !important;
}
}
@media (min-width: 992px) and (max-width: 1199px) {
.hidden-md {
display: none !important;
}
}
@media (min-width: 1200px) {
.hidden-lg {
display: none !important;
}
}
.visible-print {
display: none !important;
}
@media print {
.visible-print {
display: block !important;
}
table.visible-print {
display: table;
}
tr.visible-print {
display: table-row !important;
}
th.visible-print,
td.visible-print {
display: table-cell !important;
}
}
.visible-print-block {
display: none !important;
}
@media print {
.visible-print-block {
display: block !important;
}
}
.<API key> {
display: none !important;
}
@media print {
.<API key> {
display: inline !important;
}
}
.<API key> {
display: none !important;
}
@media print {
.<API key> {
display: inline-block !important;
}
}
@media print {
.hidden-print {
display: none !important;
}
}
@font-face {
font-family: 'FontAwesome';
src: url('font-awesome-4.2.0/fonts/fontawesome-webfont.eot?v=4.2.0');
src: url('font-awesome-4.2.0/fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'), url('font-awesome-4.2.0/fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'), url('font-awesome-4.2.0/fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'), url('font-awesome-4.2.0/fonts/fontawesome-webfont.svg?v=4.2.0#fontawesomeregular') format('svg');
font-weight: normal;
font-style: normal;
}
.fa {
display: inline-block;
font: normal normal normal 14px/1 FontAwesome;
font-size: inherit;
text-rendering: auto;
-<API key>: antialiased;
-<API key>: grayscale;
}
/* makes the font 33% larger relative to the icon container */
.fa-lg {
font-size: 1.33333333em;
line-height: 0.75em;
vertical-align: -15%;
}
.fa-2x {
font-size: 2em;
}
.fa-3x {
font-size: 3em;
}
.fa-4x {
font-size: 4em;
}
.fa-5x {
font-size: 5em;
}
.fa-fw {
width: 1.28571429em;
text-align: center;
}
.fa-ul {
padding-left: 0;
margin-left: 2.14285714em;
list-style-type: none;
}
.fa-ul > li {
position: relative;
}
.fa-li {
position: absolute;
left: -2.14285714em;
width: 2.14285714em;
top: 0.14285714em;
text-align: center;
}
.fa-li.fa-lg {
left: -1.85714286em;
}
.fa-border {
padding: .2em .25em .15em;
border: solid 0.08em #eeeeee;
border-radius: .1em;
}
.pull-right {
float: right;
}
.pull-left {
float: left;
}
.fa.pull-left {
margin-right: .3em;
}
.fa.pull-right {
margin-left: .3em;
}
.fa-spin {
-webkit-animation: fa-spin 2s infinite linear;
animation: fa-spin 2s infinite linear;
}
@-webkit-keyframes fa-spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
@keyframes fa-spin {
0% {
-webkit-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(359deg);
transform: rotate(359deg);
}
}
.fa-rotate-90 {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=1);
-webkit-transform: rotate(90deg);
-ms-transform: rotate(90deg);
transform: rotate(90deg);
}
.fa-rotate-180 {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2);
-webkit-transform: rotate(180deg);
-ms-transform: rotate(180deg);
transform: rotate(180deg);
}
.fa-rotate-270 {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=3);
-webkit-transform: rotate(270deg);
-ms-transform: rotate(270deg);
transform: rotate(270deg);
}
.fa-flip-horizontal {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1);
-webkit-transform: scale(-1, 1);
-ms-transform: scale(-1, 1);
transform: scale(-1, 1);
}
.fa-flip-vertical {
filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1);
-webkit-transform: scale(1, -1);
-ms-transform: scale(1, -1);
transform: scale(1, -1);
}
:root .fa-rotate-90,
:root .fa-rotate-180,
:root .fa-rotate-270,
:root .fa-flip-horizontal,
:root .fa-flip-vertical {
filter: none;
}
.fa-stack {
position: relative;
display: inline-block;
width: 2em;
height: 2em;
line-height: 2em;
vertical-align: middle;
}
.fa-stack-1x,
.fa-stack-2x {
position: absolute;
left: 0;
width: 100%;
text-align: center;
}
.fa-stack-1x {
line-height: inherit;
}
.fa-stack-2x {
font-size: 2em;
}
.fa-inverse {
color: #ffffff;
}
/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen
readers do not read off random characters that represent icons */
.fa-glass:before {
content: "\f000";
}
.fa-music:before {
content: "\f001";
}
.fa-search:before {
content: "\f002";
}
.fa-envelope-o:before {
content: "\f003";
}
.fa-heart:before {
content: "\f004";
}
.fa-star:before {
content: "\f005";
}
.fa-star-o:before {
content: "\f006";
}
.fa-user:before {
content: "\f007";
}
.fa-film:before {
content: "\f008";
}
.fa-th-large:before {
content: "\f009";
}
.fa-th:before {
content: "\f00a";
}
.fa-th-list:before {
content: "\f00b";
}
.fa-check:before {
content: "\f00c";
}
.fa-remove:before,
.fa-close:before,
.fa-times:before {
content: "\f00d";
}
.fa-search-plus:before {
content: "\f00e";
}
.fa-search-minus:before {
content: "\f010";
}
.fa-power-off:before {
content: "\f011";
}
.fa-signal:before {
content: "\f012";
}
.fa-gear:before,
.fa-cog:before {
content: "\f013";
}
.fa-trash-o:before {
content: "\f014";
}
.fa-home:before {
content: "\f015";
}
.fa-file-o:before {
content: "\f016";
}
.fa-clock-o:before {
content: "\f017";
}
.fa-road:before {
content: "\f018";
}
.fa-download:before {
content: "\f019";
}
.<API key>:before {
content: "\f01a";
}
.<API key>:before {
content: "\f01b";
}
.fa-inbox:before {
content: "\f01c";
}
.fa-play-circle-o:before {
content: "\f01d";
}
.fa-rotate-right:before,
.fa-repeat:before {
content: "\f01e";
}
.fa-refresh:before {
content: "\f021";
}
.fa-list-alt:before {
content: "\f022";
}
.fa-lock:before {
content: "\f023";
}
.fa-flag:before {
content: "\f024";
}
.fa-headphones:before {
content: "\f025";
}
.fa-volume-off:before {
content: "\f026";
}
.fa-volume-down:before {
content: "\f027";
}
.fa-volume-up:before {
content: "\f028";
}
.fa-qrcode:before {
content: "\f029";
}
.fa-barcode:before {
content: "\f02a";
}
.fa-tag:before {
content: "\f02b";
}
.fa-tags:before {
content: "\f02c";
}
.fa-book:before {
content: "\f02d";
}
.fa-bookmark:before {
content: "\f02e";
}
.fa-print:before {
content: "\f02f";
}
.fa-camera:before {
content: "\f030";
}
.fa-font:before {
content: "\f031";
}
.fa-bold:before {
content: "\f032";
}
.fa-italic:before {
content: "\f033";
}
.fa-text-height:before {
content: "\f034";
}
.fa-text-width:before {
content: "\f035";
}
.fa-align-left:before {
content: "\f036";
}
.fa-align-center:before {
content: "\f037";
}
.fa-align-right:before {
content: "\f038";
}
.fa-align-justify:before {
content: "\f039";
}
.fa-list:before {
content: "\f03a";
}
.fa-dedent:before,
.fa-outdent:before {
content: "\f03b";
}
.fa-indent:before {
content: "\f03c";
}
.fa-video-camera:before {
content: "\f03d";
}
.fa-photo:before,
.fa-image:before,
.fa-picture-o:before {
content: "\f03e";
}
.fa-pencil:before {
content: "\f040";
}
.fa-map-marker:before {
content: "\f041";
}
.fa-adjust:before {
content: "\f042";
}
.fa-tint:before {
content: "\f043";
}
.fa-edit:before,
.fa-pencil-square-o:before {
content: "\f044";
}
.fa-share-square-o:before {
content: "\f045";
}
.fa-check-square-o:before {
content: "\f046";
}
.fa-arrows:before {
content: "\f047";
}
.fa-step-backward:before {
content: "\f048";
}
.fa-fast-backward:before {
content: "\f049";
}
.fa-backward:before {
content: "\f04a";
}
.fa-play:before {
content: "\f04b";
}
.fa-pause:before {
content: "\f04c";
}
.fa-stop:before {
content: "\f04d";
}
.fa-forward:before {
content: "\f04e";
}
.fa-fast-forward:before {
content: "\f050";
}
.fa-step-forward:before {
content: "\f051";
}
.fa-eject:before {
content: "\f052";
}
.fa-chevron-left:before {
content: "\f053";
}
.fa-chevron-right:before {
content: "\f054";
}
.fa-plus-circle:before {
content: "\f055";
}
.fa-minus-circle:before {
content: "\f056";
}
.fa-times-circle:before {
content: "\f057";
}
.fa-check-circle:before {
content: "\f058";
}
.fa-question-circle:before {
content: "\f059";
}
.fa-info-circle:before {
content: "\f05a";
}
.fa-crosshairs:before {
content: "\f05b";
}
.fa-times-circle-o:before {
content: "\f05c";
}
.fa-check-circle-o:before {
content: "\f05d";
}
.fa-ban:before {
content: "\f05e";
}
.fa-arrow-left:before {
content: "\f060";
}
.fa-arrow-right:before {
content: "\f061";
}
.fa-arrow-up:before {
content: "\f062";
}
.fa-arrow-down:before {
content: "\f063";
}
.fa-mail-forward:before,
.fa-share:before {
content: "\f064";
}
.fa-expand:before {
content: "\f065";
}
.fa-compress:before {
content: "\f066";
}
.fa-plus:before {
content: "\f067";
}
.fa-minus:before {
content: "\f068";
}
.fa-asterisk:before {
content: "\f069";
}
.<API key>:before {
content: "\f06a";
}
.fa-gift:before {
content: "\f06b";
}
.fa-leaf:before {
content: "\f06c";
}
.fa-fire:before {
content: "\f06d";
}
.fa-eye:before {
content: "\f06e";
}
.fa-eye-slash:before {
content: "\f070";
}
.fa-warning:before,
.<API key>:before {
content: "\f071";
}
.fa-plane:before {
content: "\f072";
}
.fa-calendar:before {
content: "\f073";
}
.fa-random:before {
content: "\f074";
}
.fa-comment:before {
content: "\f075";
}
.fa-magnet:before {
content: "\f076";
}
.fa-chevron-up:before {
content: "\f077";
}
.fa-chevron-down:before {
content: "\f078";
}
.fa-retweet:before {
content: "\f079";
}
.fa-shopping-cart:before {
content: "\f07a";
}
.fa-folder:before {
content: "\f07b";
}
.fa-folder-open:before {
content: "\f07c";
}
.fa-arrows-v:before {
content: "\f07d";
}
.fa-arrows-h:before {
content: "\f07e";
}
.fa-bar-chart-o:before,
.fa-bar-chart:before {
content: "\f080";
}
.fa-twitter-square:before {
content: "\f081";
}
.fa-facebook-square:before {
content: "\f082";
}
.fa-camera-retro:before {
content: "\f083";
}
.fa-key:before {
content: "\f084";
}
.fa-gears:before,
.fa-cogs:before {
content: "\f085";
}
.fa-comments:before {
content: "\f086";
}
.fa-thumbs-o-up:before {
content: "\f087";
}
.fa-thumbs-o-down:before {
content: "\f088";
}
.fa-star-half:before {
content: "\f089";
}
.fa-heart-o:before {
content: "\f08a";
}
.fa-sign-out:before {
content: "\f08b";
}
.fa-linkedin-square:before {
content: "\f08c";
}
.fa-thumb-tack:before {
content: "\f08d";
}
.fa-external-link:before {
content: "\f08e";
}
.fa-sign-in:before {
content: "\f090";
}
.fa-trophy:before {
content: "\f091";
}
.fa-github-square:before {
content: "\f092";
}
.fa-upload:before {
content: "\f093";
}
.fa-lemon-o:before {
content: "\f094";
}
.fa-phone:before {
content: "\f095";
}
.fa-square-o:before {
content: "\f096";
}
.fa-bookmark-o:before {
content: "\f097";
}
.fa-phone-square:before {
content: "\f098";
}
.fa-twitter:before {
content: "\f099";
}
.fa-facebook:before {
content: "\f09a";
}
.fa-github:before {
content: "\f09b";
}
.fa-unlock:before {
content: "\f09c";
}
.fa-credit-card:before {
content: "\f09d";
}
.fa-rss:before {
content: "\f09e";
}
.fa-hdd-o:before {
content: "\f0a0";
}
.fa-bullhorn:before {
content: "\f0a1";
}
.fa-bell:before {
content: "\f0f3";
}
.fa-certificate:before {
content: "\f0a3";
}
.fa-hand-o-right:before {
content: "\f0a4";
}
.fa-hand-o-left:before {
content: "\f0a5";
}
.fa-hand-o-up:before {
content: "\f0a6";
}
.fa-hand-o-down:before {
content: "\f0a7";
}
.<API key>:before {
content: "\f0a8";
}
.<API key>:before {
content: "\f0a9";
}
.fa-arrow-circle-up:before {
content: "\f0aa";
}
.<API key>:before {
content: "\f0ab";
}
.fa-globe:before {
content: "\f0ac";
}
.fa-wrench:before {
content: "\f0ad";
}
.fa-tasks:before {
content: "\f0ae";
}
.fa-filter:before {
content: "\f0b0";
}
.fa-briefcase:before {
content: "\f0b1";
}
.fa-arrows-alt:before {
content: "\f0b2";
}
.fa-group:before,
.fa-users:before {
content: "\f0c0";
}
.fa-chain:before,
.fa-link:before {
content: "\f0c1";
}
.fa-cloud:before {
content: "\f0c2";
}
.fa-flask:before {
content: "\f0c3";
}
.fa-cut:before,
.fa-scissors:before {
content: "\f0c4";
}
.fa-copy:before,
.fa-files-o:before {
content: "\f0c5";
}
.fa-paperclip:before {
content: "\f0c6";
}
.fa-save:before,
.fa-floppy-o:before {
content: "\f0c7";
}
.fa-square:before {
content: "\f0c8";
}
.fa-navicon:before,
.fa-reorder:before,
.fa-bars:before {
content: "\f0c9";
}
.fa-list-ul:before {
content: "\f0ca";
}
.fa-list-ol:before {
content: "\f0cb";
}
.fa-strikethrough:before {
content: "\f0cc";
}
.fa-underline:before {
content: "\f0cd";
}
.fa-table:before {
content: "\f0ce";
}
.fa-magic:before {
content: "\f0d0";
}
.fa-truck:before {
content: "\f0d1";
}
.fa-pinterest:before {
content: "\f0d2";
}
.fa-pinterest-square:before {
content: "\f0d3";
}
.<API key>:before {
content: "\f0d4";
}
.fa-google-plus:before {
content: "\f0d5";
}
.fa-money:before {
content: "\f0d6";
}
.fa-caret-down:before {
content: "\f0d7";
}
.fa-caret-up:before {
content: "\f0d8";
}
.fa-caret-left:before {
content: "\f0d9";
}
.fa-caret-right:before {
content: "\f0da";
}
.fa-columns:before {
content: "\f0db";
}
.fa-unsorted:before,
.fa-sort:before {
content: "\f0dc";
}
.fa-sort-down:before,
.fa-sort-desc:before {
content: "\f0dd";
}
.fa-sort-up:before,
.fa-sort-asc:before {
content: "\f0de";
}
.fa-envelope:before {
content: "\f0e0";
}
.fa-linkedin:before {
content: "\f0e1";
}
.fa-rotate-left:before,
.fa-undo:before {
content: "\f0e2";
}
.fa-legal:before,
.fa-gavel:before {
content: "\f0e3";
}
.fa-dashboard:before,
.fa-tachometer:before {
content: "\f0e4";
}
.fa-comment-o:before {
content: "\f0e5";
}
.fa-comments-o:before {
content: "\f0e6";
}
.fa-flash:before,
.fa-bolt:before {
content: "\f0e7";
}
.fa-sitemap:before {
content: "\f0e8";
}
.fa-umbrella:before {
content: "\f0e9";
}
.fa-paste:before,
.fa-clipboard:before {
content: "\f0ea";
}
.fa-lightbulb-o:before {
content: "\f0eb";
}
.fa-exchange:before {
content: "\f0ec";
}
.fa-cloud-download:before {
content: "\f0ed";
}
.fa-cloud-upload:before {
content: "\f0ee";
}
.fa-user-md:before {
content: "\f0f0";
}
.fa-stethoscope:before {
content: "\f0f1";
}
.fa-suitcase:before {
content: "\f0f2";
}
.fa-bell-o:before {
content: "\f0a2";
}
.fa-coffee:before {
content: "\f0f4";
}
.fa-cutlery:before {
content: "\f0f5";
}
.fa-file-text-o:before {
content: "\f0f6";
}
.fa-building-o:before {
content: "\f0f7";
}
.fa-hospital-o:before {
content: "\f0f8";
}
.fa-ambulance:before {
content: "\f0f9";
}
.fa-medkit:before {
content: "\f0fa";
}
.fa-fighter-jet:before {
content: "\f0fb";
}
.fa-beer:before {
content: "\f0fc";
}
.fa-h-square:before {
content: "\f0fd";
}
.fa-plus-square:before {
content: "\f0fe";
}
.<API key>:before {
content: "\f100";
}
.<API key>:before {
content: "\f101";
}
.fa-angle-double-up:before {
content: "\f102";
}
.<API key>:before {
content: "\f103";
}
.fa-angle-left:before {
content: "\f104";
}
.fa-angle-right:before {
content: "\f105";
}
.fa-angle-up:before {
content: "\f106";
}
.fa-angle-down:before {
content: "\f107";
}
.fa-desktop:before {
content: "\f108";
}
.fa-laptop:before {
content: "\f109";
}
.fa-tablet:before {
content: "\f10a";
}
.fa-mobile-phone:before,
.fa-mobile:before {
content: "\f10b";
}
.fa-circle-o:before {
content: "\f10c";
}
.fa-quote-left:before {
content: "\f10d";
}
.fa-quote-right:before {
content: "\f10e";
}
.fa-spinner:before {
content: "\f110";
}
.fa-circle:before {
content: "\f111";
}
.fa-mail-reply:before,
.fa-reply:before {
content: "\f112";
}
.fa-github-alt:before {
content: "\f113";
}
.fa-folder-o:before {
content: "\f114";
}
.fa-folder-open-o:before {
content: "\f115";
}
.fa-smile-o:before {
content: "\f118";
}
.fa-frown-o:before {
content: "\f119";
}
.fa-meh-o:before {
content: "\f11a";
}
.fa-gamepad:before {
content: "\f11b";
}
.fa-keyboard-o:before {
content: "\f11c";
}
.fa-flag-o:before {
content: "\f11d";
}
.fa-flag-checkered:before {
content: "\f11e";
}
.fa-terminal:before {
content: "\f120";
}
.fa-code:before {
content: "\f121";
}
.fa-mail-reply-all:before,
.fa-reply-all:before {
content: "\f122";
}
.fa-star-half-empty:before,
.fa-star-half-full:before,
.fa-star-half-o:before {
content: "\f123";
}
.fa-location-arrow:before {
content: "\f124";
}
.fa-crop:before {
content: "\f125";
}
.fa-code-fork:before {
content: "\f126";
}
.fa-unlink:before,
.fa-chain-broken:before {
content: "\f127";
}
.fa-question:before {
content: "\f128";
}
.fa-info:before {
content: "\f129";
}
.fa-exclamation:before {
content: "\f12a";
}
.fa-superscript:before {
content: "\f12b";
}
.fa-subscript:before {
content: "\f12c";
}
.fa-eraser:before {
content: "\f12d";
}
.fa-puzzle-piece:before {
content: "\f12e";
}
.fa-microphone:before {
content: "\f130";
}
.fa-microphone-slash:before {
content: "\f131";
}
.fa-shield:before {
content: "\f132";
}
.fa-calendar-o:before {
content: "\f133";
}
.<API key>:before {
content: "\f134";
}
.fa-rocket:before {
content: "\f135";
}
.fa-maxcdn:before {
content: "\f136";
}
.<API key>:before {
content: "\f137";
}
.<API key>:before {
content: "\f138";
}
.<API key>:before {
content: "\f139";
}
.<API key>:before {
content: "\f13a";
}
.fa-html5:before {
content: "\f13b";
}
.fa-css3:before {
content: "\f13c";
}
.fa-anchor:before {
content: "\f13d";
}
.fa-unlock-alt:before {
content: "\f13e";
}
.fa-bullseye:before {
content: "\f140";
}
.fa-ellipsis-h:before {
content: "\f141";
}
.fa-ellipsis-v:before {
content: "\f142";
}
.fa-rss-square:before {
content: "\f143";
}
.fa-play-circle:before {
content: "\f144";
}
.fa-ticket:before {
content: "\f145";
}
.fa-minus-square:before {
content: "\f146";
}
.fa-minus-square-o:before {
content: "\f147";
}
.fa-level-up:before {
content: "\f148";
}
.fa-level-down:before {
content: "\f149";
}
.fa-check-square:before {
content: "\f14a";
}
.fa-pencil-square:before {
content: "\f14b";
}
.<API key>:before {
content: "\f14c";
}
.fa-share-square:before {
content: "\f14d";
}
.fa-compass:before {
content: "\f14e";
}
.fa-toggle-down:before,
.<API key>:before {
content: "\f150";
}
.fa-toggle-up:before,
.<API key>:before {
content: "\f151";
}
.fa-toggle-right:before,
.<API key>:before {
content: "\f152";
}
.fa-euro:before,
.fa-eur:before {
content: "\f153";
}
.fa-gbp:before {
content: "\f154";
}
.fa-dollar:before,
.fa-usd:before {
content: "\f155";
}
.fa-rupee:before,
.fa-inr:before {
content: "\f156";
}
.fa-cny:before,
.fa-rmb:before,
.fa-yen:before,
.fa-jpy:before {
content: "\f157";
}
.fa-ruble:before,
.fa-rouble:before,
.fa-rub:before {
content: "\f158";
}
.fa-won:before,
.fa-krw:before {
content: "\f159";
}
.fa-bitcoin:before,
.fa-btc:before {
content: "\f15a";
}
.fa-file:before {
content: "\f15b";
}
.fa-file-text:before {
content: "\f15c";
}
.fa-sort-alpha-asc:before {
content: "\f15d";
}
.fa-sort-alpha-desc:before {
content: "\f15e";
}
.fa-sort-amount-asc:before {
content: "\f160";
}
.fa-sort-amount-desc:before {
content: "\f161";
}
.fa-sort-numeric-asc:before {
content: "\f162";
}
.<API key>:before {
content: "\f163";
}
.fa-thumbs-up:before {
content: "\f164";
}
.fa-thumbs-down:before {
content: "\f165";
}
.fa-youtube-square:before {
content: "\f166";
}
.fa-youtube:before {
content: "\f167";
}
.fa-xing:before {
content: "\f168";
}
.fa-xing-square:before {
content: "\f169";
}
.fa-youtube-play:before {
content: "\f16a";
}
.fa-dropbox:before {
content: "\f16b";
}
.fa-stack-overflow:before {
content: "\f16c";
}
.fa-instagram:before {
content: "\f16d";
}
.fa-flickr:before {
content: "\f16e";
}
.fa-adn:before {
content: "\f170";
}
.fa-bitbucket:before {
content: "\f171";
}
.fa-bitbucket-square:before {
content: "\f172";
}
.fa-tumblr:before {
content: "\f173";
}
.fa-tumblr-square:before {
content: "\f174";
}
.fa-long-arrow-down:before {
content: "\f175";
}
.fa-long-arrow-up:before {
content: "\f176";
}
.fa-long-arrow-left:before {
content: "\f177";
}
.fa-long-arrow-right:before {
content: "\f178";
}
.fa-apple:before {
content: "\f179";
}
.fa-windows:before {
content: "\f17a";
}
.fa-android:before {
content: "\f17b";
}
.fa-linux:before {
content: "\f17c";
}
.fa-dribbble:before {
content: "\f17d";
}
.fa-skype:before {
content: "\f17e";
}
.fa-foursquare:before {
content: "\f180";
}
.fa-trello:before {
content: "\f181";
}
.fa-female:before {
content: "\f182";
}
.fa-male:before {
content: "\f183";
}
.fa-gittip:before {
content: "\f184";
}
.fa-sun-o:before {
content: "\f185";
}
.fa-moon-o:before {
content: "\f186";
}
.fa-archive:before {
content: "\f187";
}
.fa-bug:before {
content: "\f188";
}
.fa-vk:before {
content: "\f189";
}
.fa-weibo:before {
content: "\f18a";
}
.fa-renren:before {
content: "\f18b";
}
.fa-pagelines:before {
content: "\f18c";
}
.fa-stack-exchange:before {
content: "\f18d";
}
.<API key>:before {
content: "\f18e";
}
.<API key>:before {
content: "\f190";
}
.fa-toggle-left:before,
.<API key>:before {
content: "\f191";
}
.fa-dot-circle-o:before {
content: "\f192";
}
.fa-wheelchair:before {
content: "\f193";
}
.fa-vimeo-square:before {
content: "\f194";
}
.fa-turkish-lira:before,
.fa-try:before {
content: "\f195";
}
.fa-plus-square-o:before {
content: "\f196";
}
.fa-space-shuttle:before {
content: "\f197";
}
.fa-slack:before {
content: "\f198";
}
.fa-envelope-square:before {
content: "\f199";
}
.fa-wordpress:before {
content: "\f19a";
}
.fa-openid:before {
content: "\f19b";
}
.fa-institution:before,
.fa-bank:before,
.fa-university:before {
content: "\f19c";
}
.fa-mortar-board:before,
.fa-graduation-cap:before {
content: "\f19d";
}
.fa-yahoo:before {
content: "\f19e";
}
.fa-google:before {
content: "\f1a0";
}
.fa-reddit:before {
content: "\f1a1";
}
.fa-reddit-square:before {
content: "\f1a2";
}
.<API key>:before {
content: "\f1a3";
}
.fa-stumbleupon:before {
content: "\f1a4";
}
.fa-delicious:before {
content: "\f1a5";
}
.fa-digg:before {
content: "\f1a6";
}
.fa-pied-piper:before {
content: "\f1a7";
}
.fa-pied-piper-alt:before {
content: "\f1a8";
}
.fa-drupal:before {
content: "\f1a9";
}
.fa-joomla:before {
content: "\f1aa";
}
.fa-language:before {
content: "\f1ab";
}
.fa-fax:before {
content: "\f1ac";
}
.fa-building:before {
content: "\f1ad";
}
.fa-child:before {
content: "\f1ae";
}
.fa-paw:before {
content: "\f1b0";
}
.fa-spoon:before {
content: "\f1b1";
}
.fa-cube:before {
content: "\f1b2";
}
.fa-cubes:before {
content: "\f1b3";
}
.fa-behance:before {
content: "\f1b4";
}
.fa-behance-square:before {
content: "\f1b5";
}
.fa-steam:before {
content: "\f1b6";
}
.fa-steam-square:before {
content: "\f1b7";
}
.fa-recycle:before {
content: "\f1b8";
}
.fa-automobile:before,
.fa-car:before {
content: "\f1b9";
}
.fa-cab:before,
.fa-taxi:before {
content: "\f1ba";
}
.fa-tree:before {
content: "\f1bb";
}
.fa-spotify:before {
content: "\f1bc";
}
.fa-deviantart:before {
content: "\f1bd";
}
.fa-soundcloud:before {
content: "\f1be";
}
.fa-database:before {
content: "\f1c0";
}
.fa-file-pdf-o:before {
content: "\f1c1";
}
.fa-file-word-o:before {
content: "\f1c2";
}
.fa-file-excel-o:before {
content: "\f1c3";
}
.<API key>:before {
content: "\f1c4";
}
.fa-file-photo-o:before,
.fa-file-picture-o:before,
.fa-file-image-o:before {
content: "\f1c5";
}
.fa-file-zip-o:before,
.fa-file-archive-o:before {
content: "\f1c6";
}
.fa-file-sound-o:before,
.fa-file-audio-o:before {
content: "\f1c7";
}
.fa-file-movie-o:before,
.fa-file-video-o:before {
content: "\f1c8";
}
.fa-file-code-o:before {
content: "\f1c9";
}
.fa-vine:before {
content: "\f1ca";
}
.fa-codepen:before {
content: "\f1cb";
}
.fa-jsfiddle:before {
content: "\f1cc";
}
.fa-life-bouy:before,
.fa-life-buoy:before,
.fa-life-saver:before,
.fa-support:before,
.fa-life-ring:before {
content: "\f1cd";
}
.fa-circle-o-notch:before {
content: "\f1ce";
}
.fa-ra:before,
.fa-rebel:before {
content: "\f1d0";
}
.fa-ge:before,
.fa-empire:before {
content: "\f1d1";
}
.fa-git-square:before {
content: "\f1d2";
}
.fa-git:before {
content: "\f1d3";
}
.fa-hacker-news:before {
content: "\f1d4";
}
.fa-tencent-weibo:before {
content: "\f1d5";
}
.fa-qq:before {
content: "\f1d6";
}
.fa-wechat:before,
.fa-weixin:before {
content: "\f1d7";
}
.fa-send:before,
.fa-paper-plane:before {
content: "\f1d8";
}
.fa-send-o:before,
.fa-paper-plane-o:before {
content: "\f1d9";
}
.fa-history:before {
content: "\f1da";
}
.fa-circle-thin:before {
content: "\f1db";
}
.fa-header:before {
content: "\f1dc";
}
.fa-paragraph:before {
content: "\f1dd";
}
.fa-sliders:before {
content: "\f1de";
}
.fa-share-alt:before {
content: "\f1e0";
}
.fa-share-alt-square:before {
content: "\f1e1";
}
.fa-bomb:before {
content: "\f1e2";
}
.fa-soccer-ball-o:before,
.fa-futbol-o:before {
content: "\f1e3";
}
.fa-tty:before {
content: "\f1e4";
}
.fa-binoculars:before {
content: "\f1e5";
}
.fa-plug:before {
content: "\f1e6";
}
.fa-slideshare:before {
content: "\f1e7";
}
.fa-twitch:before {
content: "\f1e8";
}
.fa-yelp:before {
content: "\f1e9";
}
.fa-newspaper-o:before {
content: "\f1ea";
}
.fa-wifi:before {
content: "\f1eb";
}
.fa-calculator:before {
content: "\f1ec";
}
.fa-paypal:before {
content: "\f1ed";
}
.fa-google-wallet:before {
content: "\f1ee";
}
.fa-cc-visa:before {
content: "\f1f0";
}
.fa-cc-mastercard:before {
content: "\f1f1";
}
.fa-cc-discover:before {
content: "\f1f2";
}
.fa-cc-amex:before {
content: "\f1f3";
}
.fa-cc-paypal:before {
content: "\f1f4";
}
.fa-cc-stripe:before {
content: "\f1f5";
}
.fa-bell-slash:before {
content: "\f1f6";
}
.fa-bell-slash-o:before {
content: "\f1f7";
}
.fa-trash:before {
content: "\f1f8";
}
.fa-copyright:before {
content: "\f1f9";
}
.fa-at:before {
content: "\f1fa";
}
.fa-eyedropper:before {
content: "\f1fb";
}
.fa-paint-brush:before {
content: "\f1fc";
}
.fa-birthday-cake:before {
content: "\f1fd";
}
.fa-area-chart:before {
content: "\f1fe";
}
.fa-pie-chart:before {
content: "\f200";
}
.fa-line-chart:before {
content: "\f201";
}
.fa-lastfm:before {
content: "\f202";
}
.fa-lastfm-square:before {
content: "\f203";
}
.fa-toggle-off:before {
content: "\f204";
}
.fa-toggle-on:before {
content: "\f205";
}
.fa-bicycle:before {
content: "\f206";
}
.fa-bus:before {
content: "\f207";
}
.fa-ioxhost:before {
content: "\f208";
}
.fa-angellist:before {
content: "\f209";
}
.fa-cc:before {
content: "\f20a";
}
.fa-shekel:before,
.fa-sheqel:before,
.fa-ils:before {
content: "\f20b";
}
.fa-meanpath:before {
content: "\f20c";
}
html.boxed-layout #<API key>,
html.boxed-layout #<API key>,
html.boxed-layout #layout-footer {
margin-right: auto;
margin-left: auto;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 768px) {
html.boxed-layout #<API key>,
html.boxed-layout #<API key>,
html.boxed-layout #layout-footer {
width: 750px;
}
}
@media (min-width: 992px) {
html.boxed-layout #<API key>,
html.boxed-layout #<API key>,
html.boxed-layout #layout-footer {
width: 970px;
}
}
@media (min-width: 1200px) {
html.boxed-layout #<API key>,
html.boxed-layout #<API key>,
html.boxed-layout #layout-footer {
width: 1170px;
}
}
html.boxed-layout #<API key> > .navbar-header,
html.boxed-layout #<API key> > .navbar-header,
html.boxed-layout #layout-footer > .navbar-header,
html.boxed-layout #<API key> > .navbar-collapse,
html.boxed-layout #<API key> > .navbar-collapse,
html.boxed-layout #layout-footer > .navbar-collapse {
margin-right: -15px;
margin-left: -15px;
}
@media (min-width: 768px) {
html.boxed-layout #<API key> > .navbar-header,
html.boxed-layout #<API key> > .navbar-header,
html.boxed-layout #layout-footer > .navbar-header,
html.boxed-layout #<API key> > .navbar-collapse,
html.boxed-layout #<API key> > .navbar-collapse,
html.boxed-layout #layout-footer > .navbar-collapse {
margin-right: 0;
margin-left: 0;
}
}
html.fluid-layout #<API key>,
html.fluid-layout #<API key>,
html.fluid-layout #layout-footer {
padding: 0 15px;
}
html.fixed-nav.boxed-layout #layout-navigation {
margin-right: auto;
margin-left: auto;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 768px) {
html.fixed-nav.boxed-layout #layout-navigation {
width: 750px;
}
}
@media (min-width: 992px) {
html.fixed-nav.boxed-layout #layout-navigation {
width: 970px;
}
}
@media (min-width: 1200px) {
html.fixed-nav.boxed-layout #layout-navigation {
width: 1170px;
}
}
html.fixed-nav.boxed-layout #layout-navigation > .navbar-header,
html.fixed-nav.boxed-layout #layout-navigation > .navbar-collapse {
margin-right: -15px;
margin-left: -15px;
}
@media (min-width: 768px) {
html.fixed-nav.boxed-layout #layout-navigation > .navbar-header,
html.fixed-nav.boxed-layout #layout-navigation > .navbar-collapse {
margin-right: 0;
margin-left: 0;
}
}
html.fixed-nav.fluid-layout #layout-navigation {
padding: 0 15px;
}
html.floating-nav #layout-navigation {
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 992px) {
html.floating-nav #layout-navigation {
float: left;
width: 100%;
}
}
html.floating-nav.boxed-layout .navbar-wrapper {
margin-right: auto;
margin-left: auto;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 768px) {
html.floating-nav.boxed-layout .navbar-wrapper {
width: 750px;
}
}
@media (min-width: 992px) {
html.floating-nav.boxed-layout .navbar-wrapper {
width: 970px;
}
}
@media (min-width: 1200px) {
html.floating-nav.boxed-layout .navbar-wrapper {
width: 1170px;
}
}
html.floating-nav.boxed-layout .navbar-wrapper > .navbar-header,
html.floating-nav.boxed-layout .navbar-wrapper > .navbar-collapse {
margin-right: -15px;
margin-left: -15px;
}
@media (min-width: 768px) {
html.floating-nav.boxed-layout .navbar-wrapper > .navbar-header,
html.floating-nav.boxed-layout .navbar-wrapper > .navbar-collapse {
margin-right: 0;
margin-left: 0;
}
}
html.floating-nav.fluid-layout .navbar-wrapper {
padding: 0 15px;
}
#layout-main,
#layout-tripel,
#footer-quad {
margin-left: -15px;
margin-right: -15px;
}
#layout-content {
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 992px) {
#layout-content {
float: left;
width: 100%;
}
}
.aside-1 #layout-content,
.aside-2 #layout-content {
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 992px) {
.aside-1 #layout-content,
.aside-2 #layout-content {
float: left;
width: 75%;
}
}
.aside-12 #layout-content {
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 992px) {
.aside-12 #layout-content {
float: left;
width: 50%;
}
}
#aside-first,
#aside-second {
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 992px) {
#aside-first,
#aside-second {
float: left;
width: 25%;
}
}
.tripel-1 #tripel-first,
.tripel-2 #tripel-first,
.tripel-3 #tripel-first,
.tripel-1 #tripel-second,
.tripel-2 #tripel-second,
.tripel-3 #tripel-second,
.tripel-1 #tripel-third,
.tripel-2 #tripel-third,
.tripel-3 #tripel-third {
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 992px) {
.tripel-1 #tripel-first,
.tripel-2 #tripel-first,
.tripel-3 #tripel-first,
.tripel-1 #tripel-second,
.tripel-2 #tripel-second,
.tripel-3 #tripel-second,
.tripel-1 #tripel-third,
.tripel-2 #tripel-third,
.tripel-3 #tripel-third {
float: left;
width: 100%;
}
}
.tripel-12 #tripel-first,
.tripel-13 #tripel-first,
.tripel-23 #tripel-first,
.tripel-12 #tripel-second,
.tripel-13 #tripel-second,
.tripel-23 #tripel-second,
.tripel-12 #tripel-third,
.tripel-13 #tripel-third,
.tripel-23 #tripel-third {
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 992px) {
.tripel-12 #tripel-first,
.tripel-13 #tripel-first,
.tripel-23 #tripel-first,
.tripel-12 #tripel-second,
.tripel-13 #tripel-second,
.tripel-23 #tripel-second,
.tripel-12 #tripel-third,
.tripel-13 #tripel-third,
.tripel-23 #tripel-third {
float: left;
width: 50%;
}
}
.tripel-123 #tripel-first,
.tripel-123 #tripel-second,
.tripel-123 #tripel-third {
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 992px) {
.tripel-123 #tripel-first,
.tripel-123 #tripel-second,
.tripel-123 #tripel-third {
float: left;
width: 33.33333333%;
}
}
.split-1 + #layout-footer #footer-quad-first,
.split-2 + #layout-footer #footer-quad-first,
.split-3 + #layout-footer #footer-quad-first,
.split-4 + #layout-footer #footer-quad-first,
.split-1 + #layout-footer #footer-quad-second,
.split-2 + #layout-footer #footer-quad-second,
.split-3 + #layout-footer #footer-quad-second,
.split-4 + #layout-footer #footer-quad-second,
.split-1 + #layout-footer #footer-quad-third,
.split-2 + #layout-footer #footer-quad-third,
.split-3 + #layout-footer #footer-quad-third,
.split-4 + #layout-footer #footer-quad-third,
.split-1 + #layout-footer #footer-quad-fourth,
.split-2 + #layout-footer #footer-quad-fourth,
.split-3 + #layout-footer #footer-quad-fourth,
.split-4 + #layout-footer #footer-quad-fourth {
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 992px) {
.split-1 + #layout-footer #footer-quad-first,
.split-2 + #layout-footer #footer-quad-first,
.split-3 + #layout-footer #footer-quad-first,
.split-4 + #layout-footer #footer-quad-first,
.split-1 + #layout-footer #footer-quad-second,
.split-2 + #layout-footer #footer-quad-second,
.split-3 + #layout-footer #footer-quad-second,
.split-4 + #layout-footer #footer-quad-second,
.split-1 + #layout-footer #footer-quad-third,
.split-2 + #layout-footer #footer-quad-third,
.split-3 + #layout-footer #footer-quad-third,
.split-4 + #layout-footer #footer-quad-third,
.split-1 + #layout-footer #footer-quad-fourth,
.split-2 + #layout-footer #footer-quad-fourth,
.split-3 + #layout-footer #footer-quad-fourth,
.split-4 + #layout-footer #footer-quad-fourth {
float: left;
width: 100%;
}
}
.split-12 + #layout-footer #footer-quad-first,
.split-13 + #layout-footer #footer-quad-first,
.split-14 + #layout-footer #footer-quad-first,
.split-23 + #layout-footer #footer-quad-first,
.split-24 + #layout-footer #footer-quad-first,
.split-34 + #layout-footer #footer-quad-first,
.split-12 + #layout-footer #footer-quad-second,
.split-13 + #layout-footer #footer-quad-second,
.split-14 + #layout-footer #footer-quad-second,
.split-23 + #layout-footer #footer-quad-second,
.split-24 + #layout-footer #footer-quad-second,
.split-34 + #layout-footer #footer-quad-second,
.split-12 + #layout-footer #footer-quad-third,
.split-13 + #layout-footer #footer-quad-third,
.split-14 + #layout-footer #footer-quad-third,
.split-23 + #layout-footer #footer-quad-third,
.split-24 + #layout-footer #footer-quad-third,
.split-34 + #layout-footer #footer-quad-third,
.split-12 + #layout-footer #footer-quad-fourth,
.split-13 + #layout-footer #footer-quad-fourth,
.split-14 + #layout-footer #footer-quad-fourth,
.split-23 + #layout-footer #footer-quad-fourth,
.split-24 + #layout-footer #footer-quad-fourth,
.split-34 + #layout-footer #footer-quad-fourth {
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 992px) {
.split-12 + #layout-footer #footer-quad-first,
.split-13 + #layout-footer #footer-quad-first,
.split-14 + #layout-footer #footer-quad-first,
.split-23 + #layout-footer #footer-quad-first,
.split-24 + #layout-footer #footer-quad-first,
.split-34 + #layout-footer #footer-quad-first,
.split-12 + #layout-footer #footer-quad-second,
.split-13 + #layout-footer #footer-quad-second,
.split-14 + #layout-footer #footer-quad-second,
.split-23 + #layout-footer #footer-quad-second,
.split-24 + #layout-footer #footer-quad-second,
.split-34 + #layout-footer #footer-quad-second,
.split-12 + #layout-footer #footer-quad-third,
.split-13 + #layout-footer #footer-quad-third,
.split-14 + #layout-footer #footer-quad-third,
.split-23 + #layout-footer #footer-quad-third,
.split-24 + #layout-footer #footer-quad-third,
.split-34 + #layout-footer #footer-quad-third,
.split-12 + #layout-footer #footer-quad-fourth,
.split-13 + #layout-footer #footer-quad-fourth,
.split-14 + #layout-footer #footer-quad-fourth,
.split-23 + #layout-footer #footer-quad-fourth,
.split-24 + #layout-footer #footer-quad-fourth,
.split-34 + #layout-footer #footer-quad-fourth {
float: left;
width: 50%;
}
}
.split-123 + #layout-footer #footer-quad-first,
.split-124 + #layout-footer #footer-quad-first,
.split-134 + #layout-footer #footer-quad-first,
.split-234 + #layout-footer #footer-quad-first,
.split-123 + #layout-footer #footer-quad-second,
.split-124 + #layout-footer #footer-quad-second,
.split-134 + #layout-footer #footer-quad-second,
.split-234 + #layout-footer #footer-quad-second,
.split-123 + #layout-footer #footer-quad-third,
.split-124 + #layout-footer #footer-quad-third,
.split-134 + #layout-footer #footer-quad-third,
.split-234 + #layout-footer #footer-quad-third,
.split-123 + #layout-footer #footer-quad-fourth,
.split-124 + #layout-footer #footer-quad-fourth,
.split-134 + #layout-footer #footer-quad-fourth,
.split-234 + #layout-footer #footer-quad-fourth {
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 992px) {
.split-123 + #layout-footer #footer-quad-first,
.split-124 + #layout-footer #footer-quad-first,
.split-134 + #layout-footer #footer-quad-first,
.split-234 + #layout-footer #footer-quad-first,
.split-123 + #layout-footer #footer-quad-second,
.split-124 + #layout-footer #footer-quad-second,
.split-134 + #layout-footer #footer-quad-second,
.split-234 + #layout-footer #footer-quad-second,
.split-123 + #layout-footer #footer-quad-third,
.split-124 + #layout-footer #footer-quad-third,
.split-134 + #layout-footer #footer-quad-third,
.split-234 + #layout-footer #footer-quad-third,
.split-123 + #layout-footer #footer-quad-fourth,
.split-124 + #layout-footer #footer-quad-fourth,
.split-134 + #layout-footer #footer-quad-fourth,
.split-234 + #layout-footer #footer-quad-fourth {
float: left;
width: 33.33333333%;
}
}
.split-1234 + #layout-footer #footer-quad-first,
.split-1234 + #layout-footer #footer-quad-second,
.split-1234 + #layout-footer #footer-quad-third,
.split-1234 + #layout-footer #footer-quad-fourth {
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 992px) {
.split-1234 + #layout-footer #footer-quad-first,
.split-1234 + #layout-footer #footer-quad-second,
.split-1234 + #layout-footer #footer-quad-third,
.split-1234 + #layout-footer #footer-quad-fourth {
float: left;
width: 25%;
}
}
html.sticky-footer {
min-height: 100%;
position: relative;
}
html.sticky-footer #layout-footer {
position: absolute;
bottom: 0;
width: 100%;
}
html.sticky-footer.boxed-layout #footer {
margin-right: auto;
margin-left: auto;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 768px) {
html.sticky-footer.boxed-layout #footer {
width: 750px;
}
}
@media (min-width: 992px) {
html.sticky-footer.boxed-layout #footer {
width: 970px;
}
}
@media (min-width: 1200px) {
html.sticky-footer.boxed-layout #footer {
width: 1170px;
}
}
html.sticky-footer.boxed-layout #footer > .navbar-header,
html.sticky-footer.boxed-layout #footer > .navbar-collapse {
margin-right: -15px;
margin-left: -15px;
}
@media (min-width: 768px) {
html.sticky-footer.boxed-layout #footer > .navbar-header,
html.sticky-footer.boxed-layout #footer > .navbar-collapse {
margin-right: 0;
margin-left: 0;
}
}
html.sticky-footer.fluid-layout #footer {
padding: 0 15px;
}
.carousel-control .fa-chevron-left {
width: 30px;
height: 30px;
margin-top: -15px;
margin-left: -15px;
font-size: 30px;
left: 50%;
position: absolute;
top: 50%;
z-index: 5;
display: inline-block;
}
.carousel-control .fa-chevron-right {
width: 30px;
height: 30px;
margin-top: -15px;
margin-left: -15px;
font-size: 30px;
right: 50%;
position: absolute;
top: 50%;
z-index: 5;
display: inline-block;
}
.media .comment-avatar {
margin-right: 10px;
}
ul.comments li {
margin-top: 40px;
}
#toTop {
position: fixed;
right: 5px;
bottom: 10px;
cursor: pointer;
display: none;
text-align: center;
z-index: 500;
}
#toTop:hover {
opacity: .7;
}
/* add user icon before menu */
.menuUserName > a:before {
content: "\f007";
font-family: "FontAwesome";
margin-right: 5px;
}
.widget-search-form {
float: none !important;
}
.dropdown-menu ul {
left: 100%;
top: 0;
}
.dropdown .dropdown:hover > .dropdown-menu,
.dropdown .dropdown .dropdown:hover > .dropdown-menu,
.dropdown .dropdown .dropdown .dropdown:hover > .dropdown-menu,
.dropdown .dropdown .dropdown .dropdown .dropdown:hover > .dropdown-menu {
display: block;
}
.dropdown-menu i {
line-height: 1.42857143;
}
.navbar-brand {
padding-left: 0;
}
fieldset > div {
margin-bottom: 15px;
}
input[type="color"],
input[type="date"],
input[type="datetime"],
input[type="datetime-local"],
input[type="email"],
input[type="file"],
input[type="month"],
input[type="number"],
input[type="password"],
input[type="range"],
input[type="search"],
input[type="tel"],
input[type="text"],
input[type="time"],
input[type="url"],
input[type="week"],
select,
textarea {
display: block;
width: 100%;
height: 34px;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
color: #555555;
background-color: #ffffff;
background-image: none;
border: 1px solid #cccccc;
border-radius: 4px;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
-webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
-o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s;
}
input[type="color"]:focus,
input[type="date"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="email"]:focus,
input[type="file"]:focus,
input[type="month"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="range"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="text"]:focus,
input[type="time"]:focus,
input[type="url"]:focus,
input[type="week"]:focus,
select:focus,
textarea:focus {
border-color: #66afe9;
outline: 0;
-webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102, 175, 233, 0.6);
}
input[type="color"]::-moz-placeholder,
input[type="date"]::-moz-placeholder,
input[type="datetime"]::-moz-placeholder,
input[type="datetime-local"]::-moz-placeholder,
input[type="email"]::-moz-placeholder,
input[type="file"]::-moz-placeholder,
input[type="month"]::-moz-placeholder,
input[type="number"]::-moz-placeholder,
input[type="password"]::-moz-placeholder,
input[type="range"]::-moz-placeholder,
input[type="search"]::-moz-placeholder,
input[type="tel"]::-moz-placeholder,
input[type="text"]::-moz-placeholder,
input[type="time"]::-moz-placeholder,
input[type="url"]::-moz-placeholder,
input[type="week"]::-moz-placeholder,
select::-moz-placeholder,
textarea::-moz-placeholder {
color: #777777;
opacity: 1;
}
input[type="color"]:-<API key>,
input[type="date"]:-<API key>,
input[type="datetime"]:-<API key>,
input[type="datetime-local"]:-<API key>,
input[type="email"]:-<API key>,
input[type="file"]:-<API key>,
input[type="month"]:-<API key>,
input[type="number"]:-<API key>,
input[type="password"]:-<API key>,
input[type="range"]:-<API key>,
input[type="search"]:-<API key>,
input[type="tel"]:-<API key>,
input[type="text"]:-<API key>,
input[type="time"]:-<API key>,
input[type="url"]:-<API key>,
input[type="week"]:-<API key>,
select:-<API key>,
textarea:-<API key> {
color: #777777;
}
input[type="color"]::-<API key>,
input[type="date"]::-<API key>,
input[type="datetime"]::-<API key>,
input[type="datetime-local"]::-<API key>,
input[type="email"]::-<API key>,
input[type="file"]::-<API key>,
input[type="month"]::-<API key>,
input[type="number"]::-<API key>,
input[type="password"]::-<API key>,
input[type="range"]::-<API key>,
input[type="search"]::-<API key>,
input[type="tel"]::-<API key>,
input[type="text"]::-<API key>,
input[type="time"]::-<API key>,
input[type="url"]::-<API key>,
input[type="week"]::-<API key>,
select::-<API key>,
textarea::-<API key> {
color: #777777;
}
input[type="color"][disabled],
input[type="date"][disabled],
input[type="datetime"][disabled],
input[type="datetime-local"][disabled],
input[type="email"][disabled],
input[type="file"][disabled],
input[type="month"][disabled],
input[type="number"][disabled],
input[type="password"][disabled],
input[type="range"][disabled],
input[type="search"][disabled],
input[type="tel"][disabled],
input[type="text"][disabled],
input[type="time"][disabled],
input[type="url"][disabled],
input[type="week"][disabled],
select[disabled],
textarea[disabled],
input[type="color"][readonly],
input[type="date"][readonly],
input[type="datetime"][readonly],
input[type="datetime-local"][readonly],
input[type="email"][readonly],
input[type="file"][readonly],
input[type="month"][readonly],
input[type="number"][readonly],
input[type="password"][readonly],
input[type="range"][readonly],
input[type="search"][readonly],
input[type="tel"][readonly],
input[type="text"][readonly],
input[type="time"][readonly],
input[type="url"][readonly],
input[type="week"][readonly],
select[readonly],
textarea[readonly],
fieldset[disabled] input[type="color"],
fieldset[disabled] input[type="date"],
fieldset[disabled] input[type="datetime"],
fieldset[disabled] input[type="datetime-local"],
fieldset[disabled] input[type="email"],
fieldset[disabled] input[type="file"],
fieldset[disabled] input[type="month"],
fieldset[disabled] input[type="number"],
fieldset[disabled] input[type="password"],
fieldset[disabled] input[type="range"],
fieldset[disabled] input[type="search"],
fieldset[disabled] input[type="tel"],
fieldset[disabled] input[type="text"],
fieldset[disabled] input[type="time"],
fieldset[disabled] input[type="url"],
fieldset[disabled] input[type="week"],
fieldset[disabled] select,
fieldset[disabled] textarea {
cursor: not-allowed;
background-color: #eeeeee;
opacity: 1;
}
textareainput[type="color"],
textareainput[type="date"],
textareainput[type="datetime"],
textareainput[type="datetime-local"],
textareainput[type="email"],
textareainput[type="file"],
textareainput[type="month"],
textareainput[type="number"],
textareainput[type="password"],
textareainput[type="range"],
textareainput[type="search"],
textareainput[type="tel"],
textareainput[type="text"],
textareainput[type="time"],
textareainput[type="url"],
textareainput[type="week"],
textareaselect,
textareatextarea {
height: auto;
}
textarea {
height: auto;
}
button {
display: inline-block;
margin-bottom: 0;
font-weight: normal;
text-align: center;
vertical-align: middle;
cursor: pointer;
background-image: none;
border: 1px solid transparent;
white-space: nowrap;
padding: 6px 12px;
font-size: 14px;
line-height: 1.42857143;
border-radius: 4px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
color: #333333;
background-color: #ffffff;
border-color: #cccccc;
}
button:focus,
button:active:focus,
button.active:focus {
outline: thin dotted;
outline: 5px auto -<API key>;
outline-offset: -2px;
}
button:hover,
button:focus {
color: #333333;
text-decoration: none;
}
button:active,
button.active {
outline: 0;
background-image: none;
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
}
button.disabled,
button[disabled],
fieldset[disabled] button {
cursor: not-allowed;
pointer-events: none;
opacity: 0.65;
filter: alpha(opacity=65);
-webkit-box-shadow: none;
box-shadow: none;
}
button:hover,
button:focus,
button:active,
button.active,
.open > .<API key> {
color: #333333;
background-color: #e6e6e6;
border-color: #adadad;
}
button:active,
button.active,
.open > .<API key> {
background-image: none;
}
button.disabled,
button[disabled],
fieldset[disabled] button,
button.disabled:hover,
button[disabled]:hover,
fieldset[disabled] button:hover,
button.disabled:focus,
button[disabled]:focus,
fieldset[disabled] button:focus,
button.disabled:active,
button[disabled]:active,
fieldset[disabled] button:active,
button.disabled.active,
button[disabled].active,
fieldset[disabled] button.active {
background-color: #ffffff;
border-color: #cccccc;
}
button .badge {
color: #ffffff;
background-color: #333333;
}
button.primaryAction {
color: #ffffff;
background-color: #428bca;
border-color: #357ebd;
}
button.primaryAction:hover,
button.primaryAction:focus,
button.primaryAction:active,
button.primaryAction.active,
.open > .<API key>.primaryAction {
color: #ffffff;
background-color: #3071a9;
border-color: #285e8e;
}
button.primaryAction:active,
button.primaryAction.active,
.open > .<API key>.primaryAction {
background-image: none;
}
button.primaryAction.disabled,
button.primaryAction[disabled],
fieldset[disabled] button.primaryAction,
button.primaryAction.disabled:hover,
button.primaryAction[disabled]:hover,
fieldset[disabled] button.primaryAction:hover,
button.primaryAction.disabled:focus,
button.primaryAction[disabled]:focus,
fieldset[disabled] button.primaryAction:focus,
button.primaryAction.disabled:active,
button.primaryAction[disabled]:active,
fieldset[disabled] button.primaryAction:active,
button.primaryAction.disabled.active,
button.primaryAction[disabled].active,
fieldset[disabled] button.primaryAction.active {
background-color: #428bca;
border-color: #357ebd;
}
button.primaryAction .badge {
color: #428bca;
background-color: #ffffff;
}
ol,
ul {
padding-left: 0;
list-style: none;
}
.pager {
display: inline-block;
padding-left: 0;
margin: 20px 0;
border-radius: 4px;
}
.pager > li {
display: inline;
}
.pager > li > a,
.pager > li > span {
position: relative;
float: left;
padding: 6px 12px;
line-height: 1.42857143;
text-decoration: none;
color: #428bca;
background-color: #ffffff;
border: 1px solid #dddddd;
margin-left: -1px;
}
.pager > li:first-child > a,
.pager > li:first-child > span {
margin-left: 0;
<API key>: 4px;
<API key>: 4px;
}
.pager > li:last-child > a,
.pager > li:last-child > span {
<API key>: 4px;
<API key>: 4px;
}
.pager > li > a:hover,
.pager > li > span:hover,
.pager > li > a:focus,
.pager > li > span:focus {
color: #2a6496;
background-color: #eeeeee;
border-color: #dddddd;
}
.pager > .active > a,
.pager > .active > span,
.pager > .active > a:hover,
.pager > .active > span:hover,
.pager > .active > a:focus,
.pager > .active > span:focus {
z-index: 2;
color: #ffffff;
background-color: #428bca;
border-color: #428bca;
cursor: default;
}
.pager > .disabled > span,
.pager > .disabled > span:hover,
.pager > .disabled > span:focus,
.pager > .disabled > a,
.pager > .disabled > a:hover,
.pager > .disabled > a:focus {
color: #777777;
background-color: #ffffff;
border-color: #dddddd;
cursor: not-allowed;
}
html.orchard-users form {
margin-left: -15px;
margin-right: -15px;
}
html.orchard-users form fieldset {
position: relative;
min-height: 1px;
padding-left: 15px;
padding-right: 15px;
}
@media (min-width: 992px) {
html.orchard-users form fieldset {
float: left;
width: 50%;
}
}
.<API key> {
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
border-color: #a94442 !important;
}
.<API key> {
display: block;
margin-top: 5px;
margin-bottom: 10px;
color: #737373;
color: #a94442;
}
.widget h1 {
font-family: inherit;
font-weight: 500;
line-height: 1.1;
color: inherit;
margin-top: 20px;
margin-bottom: 10px;
font-size: 24px;
}
.widget h1 small,
.widget h1 .small {
font-weight: normal;
line-height: 1;
color: #777777;
}
.widget h1 small,
.widget h1 .small {
font-size: 65%;
}
.tags,
.comment-count {
margin-right: 20px;
}
/* Z-INDEX */
.formError {
z-index: 990;
}
.formError .formErrorContent {
z-index: 991;
}
.formError .formErrorArrow {
z-index: 996;
}
.ui-dialog .formError {
z-index: 5000;
}
.ui-dialog .formError .formErrorContent {
z-index: 5001;
}
.ui-dialog .formError .formErrorArrow {
z-index: 5006;
}
.inputContainer {
position: relative;
float: left;
}
.formError {
position: absolute;
top: 300px;
left: 300px;
display: block;
cursor: pointer;
text-align: left;
}
.formError.inline {
position: relative;
top: 0;
left: 0;
display: inline-block;
}
.ajaxSubmit {
padding: 20px;
background: #55ea55;
border: 0px solid #ffffff;
display: none;
}
.formError .formErrorContent {
width: 100%;
background: #ee0101;
position: relative;
color: #ffffff;
min-width: 120px;
font-size: 11px;
border: 0px solid #ffffff;
box-shadow: 0 0 2px #333333;
-moz-box-shadow: 0 0 2px #333333;
-webkit-box-shadow: 0 0 2px #333333;
-o-box-shadow: 0 0 2px #333333;
padding: 4px 10px 4px 10px;
border-radius: 6px;
-moz-border-radius: 6px;
-<API key>: 6px;
-o-border-radius: 6px;
}
.formError.inline .formErrorContent {
box-shadow: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
-o-box-shadow: none;
border: none;
border-radius: 0;
-moz-border-radius: 0;
-<API key>: 0;
-o-border-radius: 0;
}
.greenPopup .formErrorContent {
background: #33be40;
}
.blackPopup .formErrorContent {
background: #393939;
color: #FFF;
}
.formError .formErrorArrow {
width: 15px;
margin: -2px 0 0 13px;
position: relative;
}
body[dir='rtl'] .formError .formErrorArrow,
body.rtl .formError .formErrorArrow {
margin: -2px 13px 0 0;
}
.formError .<API key> {
box-shadow: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
-o-box-shadow: none;
margin: 0px 0 0 12px;
top: 2px;
}
.formError .formErrorArrow div {
border-left: 0px solid #ffffff;
border-right: 0px solid #ffffff;
box-shadow: 0 1px 1px #4d4d4d;
-moz-box-shadow: 0 1px 1px #4d4d4d;
-webkit-box-shadow: 0 1px 1px #4d4d4d;
-o-box-shadow: 0 1px 1px #4d4d4d;
font-size: 0px;
height: 1px;
background: #ee0101;
margin: 0 auto;
line-height: 0;
font-size: 0;
display: block;
}
.formError .<API key> div {
box-shadow: none;
-moz-box-shadow: none;
-webkit-box-shadow: none;
-o-box-shadow: none;
}
.greenPopup .formErrorArrow div {
background: #33be40;
}
.blackPopup .formErrorArrow div {
background: #393939;
color: #FFF;
}
.formError .formErrorArrow .line10 {
width: 13px;
border: none;
}
.formError .formErrorArrow .line9 {
width: 11px;
border: none;
}
.formError .formErrorArrow .line8 {
width: 11px;
}
.formError .formErrorArrow .line7 {
width: 9px;
}
.formError .formErrorArrow .line6 {
width: 7px;
}
.formError .formErrorArrow .line5 {
width: 5px;
}
.formError .formErrorArrow .line4 {
width: 3px;
}
.formError .formErrorArrow .line3 {
width: 0px;
border-left: 0px solid #ffffff;
border-right: 0px solid #ffffff;
border-bottom: 0 solid #ffffff;
}
.formError .formErrorArrow .line2 {
width: 3px;
border: none;
background: #ffffff;
}
.formError .formErrorArrow .line1 {
width: 1px;
border: none;
background: #ffffff;
}
.portfolio-filter {
padding: 25px 15px;
text-transform: uppercase;
font-size: 11px;
}
.portfolio-item {
overflow: hidden;
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
border-radius: 3px;
}
.portfolio-item .portfolio-thumb {
position: relative;
overflow: hidden;
}
.portfolio-item .portfolio-thumb img {
-webkit-transition: all 0.2s ease;
transition: all 0.2s ease;
}
.portfolio-item .portfolio-details {
text-align: center;
padding: 20px;
border-top: 0;
overflow: hidden;
}
.portfolio-item .portfolio-details h5 {
margin-top: 0;
position: relative;
}
.portfolio-item .portfolio-details p {
margin-top: 20px;
margin-bottom: 0;
}
.isotope {
-<API key>: height, width;
-<API key>: height, width;
-<API key>: height, width;
-<API key>: height, width;
transition-property: height, width;
}
.isotope,
.isotope .isotope-item {
-<API key>: 0.8s;
-<API key>: 0.8s;
-<API key>: 0.8s;
-<API key>: 0.8s;
transition-duration: 0.8s;
}
.latest-twitter-list h5 {
display: inline-block;
margin: 0;
}
.latest-twitter-list li {
margin-bottom: 10px;
}
.navbar-nav > li > .dropdown-menu .dropdown-menu {
margin-top: -6px;
}
/*# sourceMappingURL=site-default.css.map */
|
#ifndef DF_TYPES_H
#define DF_TYPES_H
/* ADT headers */
#include "adt_list.h"
#include "adt_array_list.h"
#define DF_PROTO_ICMP 1
#define DF_PROTO_TCP 6
#define DF_PROTO_UDP 17
#define DF_PROTO_SCTP 132
#define SIG_RULESET 0xD68FC735
#define SIG_IPV4_RULE 0x3758E847
#define SIG_IPV6_RULE 0xA79B7AEF
#define ISIPRULE_SIGNATURE(x) (((x) == SIG_IPV4_RULE) ? 1 : \
((x) == SIG_IPV6_RULE) ? 1 : 0)
#define ISRULE_SIGNATURE(x) (((x) == SIG_IPV4_RULE) ? 1 : \
((x) == SIG_IPV6_RULE) ? 1 : 0)
typedef struct df_ruleset_s
{
uint32_t signature; /* signature 0xD68FC735 */
ListPtr rule_list; /* list of filters in the ruleset */
} df_ruleset_t;
typedef struct df_rule_meta_s
{
uint32_t signature; /* signature for the filter type, should be unique for each filter */
/* see above for possible filter signatures. */
/* ruleset handle */
RulesetH ruleset; /* handle to the parent ruleset */
/* meta data */
uint16_t action : 1; /* 1 for accept, 0 for reject */
uint16_t steering : 1; /* 1 for steer to line, 0 for steer to host */
uint16_t reserved : 14; /* reserved for future use */
uint16_t snap_len; /* the snap length of the accepted packets */
uint16_t rule_tag; /* the filter tag set in ERf header, only lower 14-bits are used */
uint16_t priority;
} df_rule_meta_t;
typedef struct icmp_type_ruler_s
{
uint8_t type;
uint8_t mask;
} icmp_type_rule_t;
typedef struct port_rule_s
{
uint16_t port;
uint16_t mask;
} port_rule_t;
typedef struct ipv4_addr_rule_s
{
uint8_t addr[4];
uint8_t mask[4];
} ipv4_addr_rule_t;
typedef struct ipv6_addr_rule_s
{
uint8_t addr[16];
uint8_t mask[16];
} ipv6_addr_rule_t;
typedef struct ipv6_flow_rule_s
{
uint32_t flow;
uint32_t mask;
} ipv6_flow_rule_t;
typedef struct tcp_flags_rule_s
{
uint8_t flags;
uint8_t mask;
} tcp_flags_rule_t;
typedef struct df_ipv4_rule_s
{
/* meta data */
df_rule_meta_t meta;
/* ip header */
ipv4_addr_rule_t source; /* source filter */
ipv4_addr_rule_t dest; /* destination filter */
/* level 5/6 */
uint8_t protocol; /* protocol to filter on, 0xFF for no protocol filter */
tcp_flags_rule_t tcp_flags; /* tcp flags to filter on (only valid if protocol is 6) */
ArrayListPtr port_rules; /* list of port filters (only valid if protocol is 6,17 or 132)*/
ArrayListPtr icmp_type_rules; /* list of icmp type filters (only valid if protocol is 1) */
} df_ipv4_rule_t;
typedef struct df_ipv6_rule_s
{
/* meta data */
df_rule_meta_t meta;
/* ip header */
ipv6_addr_rule_t source; /* source filter */
ipv6_addr_rule_t dest; /* destination filter */
ipv6_flow_rule_t flow; /* flow label filter */
/* level 5/6 */
uint8_t protocol; /* protocol to filter on, 0xFF for no protocol filter */
tcp_flags_rule_t tcp_flags; /* tcp flags to filter on (only valid if protocol is 6) */
ArrayListPtr port_rules; /* list of port filters (only valid if protocol is 6,17 or 132)*/
ArrayListPtr icmp_type_rules; /* list of icmp type filters (only valid if protocol is 1) */
} df_ipv6_rule_t;
#define DFFLAG_BITMASK 0x01
#define DFFLAG_RANGE 0x02
#define DFFLAG_SOURCE 0x80
#define DFFLAG_DEST 0x00
typedef struct df_port_rule_s
{
uint8_t flags;
union {
struct {
uint16_t value;
uint16_t mask;
} bitmask;
struct {
uint16_t min;
uint16_t max;
} range;
} rule;
} df_port_rule_t;
typedef struct df_icmp_type_rule_s
{
uint8_t flags;
union {
struct {
uint8_t value;
uint8_t mask;
} bitmask;
struct {
uint8_t min;
uint8_t max;
} range;
} rule;
} df_icmp_type_rule_t;
#endif // DF_TYPES_H
|
<?php
namespace common\models;
use Yii;
use yii\db\ActiveRecord;
/**
* This is the model class for table "template_js".
*
* @property integer $id
* @property integer $template_id
* @property integer $js_id
*
* @property Js $js
* @property Template $template
*/
class TemplateJs extends ActiveRecord
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'template_js';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['template_id', 'js_id'], 'required'],
[['template_id', 'js_id'], 'integer']
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'id' => Yii::t('app', 'ID'),
'template_id' => Yii::t('app', 'Template ID'),
'js_id' => Yii::t('app', 'Js ID'),
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getJs()
{
return $this->hasOne(Js::className(), ['id' => 'js_id']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getTemplate()
{
return $this->hasOne(Template::className(), ['id' => 'template_id']);
}
}
|
create table Account_ (
accountId int8 not null primary key,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
parentAccountId int8,
name varchar(75),
legalName varchar(75),
legalId varchar(75),
legalType varchar(75),
sicCode varchar(75),
tickerSymbol varchar(75),
industry varchar(75),
type_ varchar(75),
size_ varchar(75)
)
extent size 16 next size 16
lock mode row;
create table Address (
addressId int8 not null primary key,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
classNameId int8,
classPK int8,
street1 varchar(75),
street2 varchar(75),
street3 varchar(75),
city varchar(75),
zip varchar(75),
regionId int8,
countryId int8,
typeId int,
mailing boolean,
primary_ boolean
)
extent size 16 next size 16
lock mode row;
create table <API key> (
deliveryId int8 not null primary key,
companyId int8,
userId int8,
type_ varchar(75),
email boolean,
sms boolean,
website boolean
)
extent size 16 next size 16
lock mode row;
create table AnnouncementsEntry (
uuid_ varchar(75),
entryId int8 not null primary key,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
classNameId int8,
classPK int8,
title varchar(75),
content lvarchar,
url lvarchar,
type_ varchar(75),
displayDate datetime YEAR TO FRACTION,
expirationDate datetime YEAR TO FRACTION,
priority int,
alert boolean
)
extent size 16 next size 16
lock mode row;
create table AnnouncementsFlag (
flagId int8 not null primary key,
userId int8,
createDate datetime YEAR TO FRACTION,
entryId int8,
value int
)
extent size 16 next size 16
lock mode row;
create table BlogsEntry (
uuid_ varchar(75),
entryId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
title varchar(150),
urlTitle varchar(150),
content text,
displayDate datetime YEAR TO FRACTION,
draft boolean,
allowTrackbacks boolean,
trackbacks text
)
extent size 16 next size 16
lock mode row;
create table BlogsStatsUser (
statsUserId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
entryCount int,
lastPostDate datetime YEAR TO FRACTION,
ratingsTotalEntries int,
ratingsTotalScore float,
ratingsAverageScore float
)
extent size 16 next size 16
lock mode row;
create table BookmarksEntry (
uuid_ varchar(75),
entryId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
folderId int8,
name varchar(255),
url lvarchar,
comments lvarchar,
visits int,
priority int
)
extent size 16 next size 16
lock mode row;
create table BookmarksFolder (
uuid_ varchar(75),
folderId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
parentFolderId int8,
name varchar(75),
description lvarchar
)
extent size 16 next size 16
lock mode row;
create table BrowserTracker (
browserTrackerId int8 not null primary key,
userId int8,
browserKey int8
)
extent size 16 next size 16
lock mode row;
create table CalEvent (
uuid_ varchar(75),
eventId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
title varchar(75),
description lvarchar,
startDate datetime YEAR TO FRACTION,
endDate datetime YEAR TO FRACTION,
durationHour int,
durationMinute int,
allDay boolean,
timeZoneSensitive boolean,
type_ varchar(75),
repeating boolean,
recurrence text,
remindBy int,
firstReminder int,
secondReminder int
)
extent size 16 next size 16
lock mode row;
create table ClassName_ (
classNameId int8 not null primary key,
value varchar(200)
)
extent size 16 next size 16
lock mode row;
create table Company (
companyId int8 not null primary key,
accountId int8,
webId varchar(75),
key_ text,
virtualHost varchar(75),
mx varchar(75),
homeURL lvarchar,
logoId int8,
system boolean
)
extent size 16 next size 16
lock mode row;
create table Contact_ (
contactId int8 not null primary key,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
accountId int8,
parentContactId int8,
firstName varchar(75),
middleName varchar(75),
lastName varchar(75),
prefixId int,
suffixId int,
male boolean,
birthday datetime YEAR TO FRACTION,
smsSn varchar(75),
aimSn varchar(75),
facebookSn varchar(75),
icqSn varchar(75),
jabberSn varchar(75),
msnSn varchar(75),
mySpaceSn varchar(75),
skypeSn varchar(75),
twitterSn varchar(75),
ymSn varchar(75),
employeeStatusId varchar(75),
employeeNumber varchar(75),
jobTitle varchar(100),
jobClass varchar(75),
hoursOfOperation varchar(75)
)
extent size 16 next size 16
lock mode row;
create table Counter (
name varchar(75) not null primary key,
currentId int8
)
extent size 16 next size 16
lock mode row;
create table Country (
countryId int8 not null primary key,
name varchar(75),
a2 varchar(75),
a3 varchar(75),
number_ varchar(75),
idd_ varchar(75),
active_ boolean
)
extent size 16 next size 16
lock mode row;
create table CyrusUser (
userId varchar(75) not null primary key,
password_ varchar(75) not null
)
extent size 16 next size 16
lock mode row;
create table CyrusVirtual (
emailAddress varchar(75) not null primary key,
userId varchar(75) not null
)
extent size 16 next size 16
lock mode row;
create table DLFileEntry (
uuid_ varchar(75),
fileEntryId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
versionUserId int8,
versionUserName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
folderId int8,
name varchar(255),
title varchar(255),
description lvarchar,
version float,
size_ int,
readCount int,
extraSettings text
)
extent size 16 next size 16
lock mode row;
create table DLFileRank (
fileRankId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
createDate datetime YEAR TO FRACTION,
folderId int8,
name varchar(255)
)
extent size 16 next size 16
lock mode row;
create table DLFileShortcut (
uuid_ varchar(75),
fileShortcutId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
folderId int8,
toFolderId int8,
toName varchar(255)
)
extent size 16 next size 16
lock mode row;
create table DLFileVersion (
fileVersionId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
folderId int8,
name varchar(255),
version float,
size_ int
)
extent size 16 next size 16
lock mode row;
create table DLFolder (
uuid_ varchar(75),
folderId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
parentFolderId int8,
name varchar(100),
description lvarchar,
lastPostDate datetime YEAR TO FRACTION
)
extent size 16 next size 16
lock mode row;
create table EmailAddress (
emailAddressId int8 not null primary key,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
classNameId int8,
classPK int8,
address varchar(75),
typeId int,
primary_ boolean
)
extent size 16 next size 16
lock mode row;
create table ExpandoColumn (
columnId int8 not null primary key,
companyId int8,
tableId int8,
name varchar(75),
type_ int,
defaultData lvarchar,
typeSettings lvarchar(4096)
)
extent size 16 next size 16
lock mode row;
create table ExpandoRow (
rowId_ int8 not null primary key,
companyId int8,
tableId int8,
classPK int8
)
extent size 16 next size 16
lock mode row;
create table ExpandoTable (
tableId int8 not null primary key,
companyId int8,
classNameId int8,
name varchar(75)
)
extent size 16 next size 16
lock mode row;
create table ExpandoValue (
valueId int8 not null primary key,
companyId int8,
tableId int8,
columnId int8,
rowId_ int8,
classNameId int8,
classPK int8,
data_ lvarchar
)
extent size 16 next size 16
lock mode row;
create table Group_ (
groupId int8 not null primary key,
companyId int8,
creatorUserId int8,
classNameId int8,
classPK int8,
parentGroupId int8,
liveGroupId int8,
name varchar(75),
description lvarchar,
type_ int,
typeSettings lvarchar,
friendlyURL varchar(100),
active_ boolean
)
extent size 16 next size 16
lock mode row;
create table Groups_Orgs (
groupId int8 not null,
organizationId int8 not null,
primary key (groupId, organizationId)
)
extent size 16 next size 16
lock mode row;
create table Groups_Permissions (
groupId int8 not null,
permissionId int8 not null,
primary key (groupId, permissionId)
)
extent size 16 next size 16
lock mode row;
create table Groups_Roles (
groupId int8 not null,
roleId int8 not null,
primary key (groupId, roleId)
)
extent size 16 next size 16
lock mode row;
create table Groups_UserGroups (
groupId int8 not null,
userGroupId int8 not null,
primary key (groupId, userGroupId)
)
extent size 16 next size 16
lock mode row;
create table IGFolder (
uuid_ varchar(75),
folderId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
parentFolderId int8,
name varchar(75),
description lvarchar
)
extent size 16 next size 16
lock mode row;
create table IGImage (
uuid_ varchar(75),
imageId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
folderId int8,
name varchar(75),
description lvarchar,
smallImageId int8,
largeImageId int8,
custom1ImageId int8,
custom2ImageId int8
)
extent size 16 next size 16
lock mode row;
create table Image (
imageId int8 not null primary key,
modifiedDate datetime YEAR TO FRACTION,
text_ text,
type_ varchar(75),
height int,
width int,
size_ int
)
extent size 16 next size 16
lock mode row;
create table JournalArticle (
uuid_ varchar(75),
id_ int8 not null primary key,
resourcePrimKey int8,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
articleId varchar(75),
version float,
title varchar(100),
urlTitle varchar(150),
description lvarchar,
content text,
type_ varchar(75),
structureId varchar(75),
templateId varchar(75),
displayDate datetime YEAR TO FRACTION,
approved boolean,
approvedByUserId int8,
approvedByUserName varchar(75),
approvedDate datetime YEAR TO FRACTION,
expired boolean,
expirationDate datetime YEAR TO FRACTION,
reviewDate datetime YEAR TO FRACTION,
indexable boolean,
smallImage boolean,
smallImageId int8,
smallImageURL varchar(75)
)
extent size 16 next size 16
lock mode row;
create table JournalArticleImage (
articleImageId int8 not null primary key,
groupId int8,
articleId varchar(75),
version float,
elInstanceId varchar(75),
elName varchar(75),
languageId varchar(75),
tempImage boolean
)
extent size 16 next size 16
lock mode row;
create table <API key> (
resourcePrimKey int8 not null primary key,
groupId int8,
articleId varchar(75)
)
extent size 16 next size 16
lock mode row;
create table <API key> (
contentSearchId int8 not null primary key,
groupId int8,
companyId int8,
privateLayout boolean,
layoutId int8,
portletId varchar(200),
articleId varchar(75)
)
extent size 16 next size 16
lock mode row;
create table JournalFeed (
uuid_ varchar(75),
id_ int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
feedId varchar(75),
name varchar(75),
description lvarchar,
type_ varchar(75),
structureId varchar(75),
templateId varchar(75),
rendererTemplateId varchar(75),
delta int,
orderByCol varchar(75),
orderByType varchar(75),
<API key> varchar(75),
targetPortletId varchar(75),
contentField varchar(75),
feedType varchar(75),
feedVersion float
)
extent size 16 next size 16
lock mode row;
create table JournalStructure (
uuid_ varchar(75),
id_ int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
structureId varchar(75),
parentStructureId varchar(75),
name varchar(75),
description lvarchar,
xsd text
)
extent size 16 next size 16
lock mode row;
create table JournalTemplate (
uuid_ varchar(75),
id_ int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
templateId varchar(75),
structureId varchar(75),
name varchar(75),
description lvarchar,
xsl text,
langType varchar(75),
cacheable boolean,
smallImage boolean,
smallImageId int8,
smallImageURL varchar(75)
)
extent size 16 next size 16
lock mode row;
create table Layout (
plid int8 not null primary key,
groupId int8,
companyId int8,
privateLayout boolean,
layoutId int8,
parentLayoutId int8,
name lvarchar,
title lvarchar,
description lvarchar,
type_ varchar(75),
typeSettings lvarchar(4096),
hidden_ boolean,
friendlyURL varchar(100),
iconImage boolean,
iconImageId int8,
themeId varchar(75),
colorSchemeId varchar(75),
wapThemeId varchar(75),
wapColorSchemeId varchar(75),
css lvarchar,
priority int,
dlFolderId int8
)
extent size 16 next size 16
lock mode row;
create table LayoutSet (
layoutSetId int8 not null primary key,
groupId int8,
companyId int8,
privateLayout boolean,
logo boolean,
logoId int8,
themeId varchar(75),
colorSchemeId varchar(75),
wapThemeId varchar(75),
wapColorSchemeId varchar(75),
css lvarchar,
pageCount int,
virtualHost varchar(75)
)
extent size 16 next size 16
lock mode row;
create table ListType (
listTypeId int not null primary key,
name varchar(75),
type_ varchar(75)
)
extent size 16 next size 16
lock mode row;
create table MBBan (
banId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
banUserId int8
)
extent size 16 next size 16
lock mode row;
create table MBCategory (
uuid_ varchar(75),
categoryId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
parentCategoryId int8,
name varchar(75),
description lvarchar,
threadCount int,
messageCount int,
lastPostDate datetime YEAR TO FRACTION
)
extent size 16 next size 16
lock mode row;
create table MBDiscussion (
discussionId int8 not null primary key,
classNameId int8,
classPK int8,
threadId int8
)
extent size 16 next size 16
lock mode row;
create table MBMailingList (
uuid_ varchar(75),
mailingListId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
categoryId int8,
emailAddress varchar(75),
inProtocol varchar(75),
inServerName varchar(75),
inServerPort int,
inUseSSL boolean,
inUserName varchar(75),
inPassword varchar(75),
inReadInterval int,
outEmailAddress varchar(75),
outCustom boolean,
outServerName varchar(75),
outServerPort int,
outUseSSL boolean,
outUserName varchar(75),
outPassword varchar(75),
active_ boolean
)
extent size 16 next size 16
lock mode row;
create table MBMessage (
uuid_ varchar(75),
messageId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
classNameId int8,
classPK int8,
categoryId int8,
threadId int8,
parentMessageId int8,
subject varchar(75),
body text,
attachments boolean,
anonymous boolean,
priority float
)
extent size 16 next size 16
lock mode row;
create table MBMessageFlag (
messageFlagId int8 not null primary key,
userId int8,
modifiedDate datetime YEAR TO FRACTION,
threadId int8,
messageId int8,
flag int
)
extent size 16 next size 16
lock mode row;
create table MBStatsUser (
statsUserId int8 not null primary key,
groupId int8,
userId int8,
messageCount int,
lastPostDate datetime YEAR TO FRACTION
)
extent size 16 next size 16
lock mode row;
create table MBThread (
threadId int8 not null primary key,
groupId int8,
categoryId int8,
rootMessageId int8,
messageCount int,
viewCount int,
lastPostByUserId int8,
lastPostDate datetime YEAR TO FRACTION,
priority float
)
extent size 16 next size 16
lock mode row;
create table MembershipRequest (
membershipRequestId int8 not null primary key,
companyId int8,
userId int8,
createDate datetime YEAR TO FRACTION,
groupId int8,
comments lvarchar,
replyComments lvarchar,
replyDate datetime YEAR TO FRACTION,
replierUserId int8,
statusId int
)
extent size 16 next size 16
lock mode row;
create table Organization_ (
organizationId int8 not null primary key,
companyId int8,
<API key> int8,
leftOrganizationId int8,
rightOrganizationId int8,
name varchar(100),
type_ varchar(75),
recursable boolean,
regionId int8,
countryId int8,
statusId int,
comments lvarchar
)
extent size 16 next size 16
lock mode row;
create table OrgGroupPermission (
organizationId int8 not null,
groupId int8 not null,
permissionId int8 not null,
primary key (organizationId, groupId, permissionId)
)
extent size 16 next size 16
lock mode row;
create table OrgGroupRole (
organizationId int8 not null,
groupId int8 not null,
roleId int8 not null,
primary key (organizationId, groupId, roleId)
)
extent size 16 next size 16
lock mode row;
create table OrgLabor (
orgLaborId int8 not null primary key,
organizationId int8,
typeId int,
sunOpen int,
sunClose int,
monOpen int,
monClose int,
tueOpen int,
tueClose int,
wedOpen int,
wedClose int,
thuOpen int,
thuClose int,
friOpen int,
friClose int,
satOpen int,
satClose int
)
extent size 16 next size 16
lock mode row;
create table PasswordPolicy (
passwordPolicyId int8 not null primary key,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
defaultPolicy boolean,
name varchar(75),
description lvarchar,
changeable boolean,
changeRequired boolean,
minAge int8,
checkSyntax boolean,
<API key> boolean,
minLength int,
history boolean,
historyCount int,
expireable boolean,
maxAge int8,
warningTime int8,
graceLimit int,
lockout boolean,
maxFailure int,
lockoutDuration int8,
requireUnlock boolean,
resetFailureCount int8
)
extent size 16 next size 16
lock mode row;
create table PasswordPolicyRel (
passwordPolicyRelId int8 not null primary key,
passwordPolicyId int8,
classNameId int8,
classPK int8
)
extent size 16 next size 16
lock mode row;
create table PasswordTracker (
passwordTrackerId int8 not null primary key,
userId int8,
createDate datetime YEAR TO FRACTION,
password_ varchar(75)
)
extent size 16 next size 16
lock mode row;
create table Permission_ (
permissionId int8 not null primary key,
companyId int8,
actionId varchar(75),
resourceId int8
)
extent size 16 next size 16
lock mode row;
create table Phone (
phoneId int8 not null primary key,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
classNameId int8,
classPK int8,
number_ varchar(75),
extension varchar(75),
typeId int,
primary_ boolean
)
extent size 16 next size 16
lock mode row;
create table PluginSetting (
pluginSettingId int8 not null primary key,
companyId int8,
pluginId varchar(75),
pluginType varchar(75),
roles lvarchar,
active_ boolean
)
extent size 16 next size 16
lock mode row;
create table PollsChoice (
uuid_ varchar(75),
choiceId int8 not null primary key,
questionId int8,
name varchar(75),
description lvarchar(1000)
)
extent size 16 next size 16
lock mode row;
create table PollsQuestion (
uuid_ varchar(75),
questionId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
title lvarchar(500),
description lvarchar,
expirationDate datetime YEAR TO FRACTION,
lastVoteDate datetime YEAR TO FRACTION
)
extent size 16 next size 16
lock mode row;
create table PollsVote (
voteId int8 not null primary key,
userId int8,
questionId int8,
choiceId int8,
voteDate datetime YEAR TO FRACTION
)
extent size 16 next size 16
lock mode row;
create table Portlet (
id_ int8 not null primary key,
companyId int8,
portletId varchar(200),
roles lvarchar,
active_ boolean
)
extent size 16 next size 16
lock mode row;
create table PortletItem (
portletItemId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
name varchar(75),
portletId varchar(75),
classNameId int8
)
extent size 16 next size 16
lock mode row;
create table PortletPreferences (
<API key> int8 not null primary key,
ownerId int8,
ownerType int,
plid int8,
portletId varchar(200),
preferences text
)
extent size 16 next size 16
lock mode row;
create table RatingsEntry (
entryId int8 not null primary key,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
classNameId int8,
classPK int8,
score float
)
extent size 16 next size 16
lock mode row;
create table RatingsStats (
statsId int8 not null primary key,
classNameId int8,
classPK int8,
totalEntries int,
totalScore float,
averageScore float
)
extent size 16 next size 16
lock mode row;
create table Region (
regionId int8 not null primary key,
countryId int8,
regionCode varchar(75),
name varchar(75),
active_ boolean
)
extent size 16 next size 16
lock mode row;
create table Release_ (
releaseId int8 not null primary key,
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
buildNumber int,
buildDate datetime YEAR TO FRACTION,
verified boolean,
testString lvarchar(1024)
)
extent size 16 next size 16
lock mode row;
create table Resource_ (
resourceId int8 not null primary key,
codeId int8,
primKey varchar(255)
)
extent size 16 next size 16
lock mode row;
create table ResourceAction (
resourceActionId int8 not null primary key,
name varchar(75),
actionId varchar(75),
bitwiseValue int8
)
extent size 16 next size 16
lock mode row;
create table ResourceCode (
codeId int8 not null primary key,
companyId int8,
name varchar(255),
scope int
)
extent size 16 next size 16
lock mode row;
create table ResourcePermission (
<API key> int8 not null primary key,
companyId int8,
name varchar(255),
scope int,
primKey varchar(255),
roleId int8,
actionIds int8
)
extent size 16 next size 16
lock mode row;
create table Role_ (
roleId int8 not null primary key,
companyId int8,
classNameId int8,
classPK int8,
name varchar(75),
title lvarchar,
description lvarchar,
type_ int,
subtype varchar(75)
)
extent size 16 next size 16
lock mode row;
create table Roles_Permissions (
roleId int8 not null,
permissionId int8 not null,
primary key (roleId, permissionId)
)
extent size 16 next size 16
lock mode row;
create table <API key> (
frameworkVersionId int8 not null,
productVersionId int8 not null,
primary key (frameworkVersionId, productVersionId)
)
extent size 16 next size 16
lock mode row;
create table SCFrameworkVersion (
frameworkVersionId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
name varchar(75),
url lvarchar,
active_ boolean,
priority int
)
extent size 16 next size 16
lock mode row;
create table SCLicense (
licenseId int8 not null primary key,
name varchar(75),
url lvarchar,
openSource boolean,
active_ boolean,
recommended boolean
)
extent size 16 next size 16
lock mode row;
create table <API key> (
licenseId int8 not null,
productEntryId int8 not null,
primary key (licenseId, productEntryId)
)
extent size 16 next size 16
lock mode row;
create table SCProductEntry (
productEntryId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
name varchar(75),
type_ varchar(75),
tags varchar(255),
shortDescription lvarchar,
longDescription lvarchar,
pageURL lvarchar,
author varchar(75),
repoGroupId varchar(75),
repoArtifactId varchar(75)
)
extent size 16 next size 16
lock mode row;
create table SCProductScreenshot (
productScreenshotId int8 not null primary key,
companyId int8,
groupId int8,
productEntryId int8,
thumbnailId int8,
fullImageId int8,
priority int
)
extent size 16 next size 16
lock mode row;
create table SCProductVersion (
productVersionId int8 not null primary key,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
productEntryId int8,
version varchar(75),
changeLog lvarchar,
downloadPageURL lvarchar,
directDownloadURL varchar(2000),
repoStoreArtifact boolean
)
extent size 16 next size 16
lock mode row;
create table ServiceComponent (
serviceComponentId int8 not null primary key,
buildNamespace varchar(75),
buildNumber int8,
buildDate int8,
data_ text
)
extent size 16 next size 16
lock mode row;
create table Shard (
shardId int8 not null primary key,
classNameId int8,
classPK int8,
name varchar(75)
)
extent size 16 next size 16
lock mode row;
create table ShoppingCart (
cartId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
itemIds lvarchar,
couponCodes varchar(75),
altShipping int,
insure boolean
)
extent size 16 next size 16
lock mode row;
create table ShoppingCategory (
categoryId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
parentCategoryId int8,
name varchar(75),
description lvarchar
)
extent size 16 next size 16
lock mode row;
create table ShoppingCoupon (
couponId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
code_ varchar(75),
name varchar(75),
description lvarchar,
startDate datetime YEAR TO FRACTION,
endDate datetime YEAR TO FRACTION,
active_ boolean,
limitCategories lvarchar,
limitSkus lvarchar,
minOrder float,
discount float,
discountType varchar(75)
)
extent size 16 next size 16
lock mode row;
create table ShoppingItem (
itemId int8 not null primary key,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
categoryId int8,
sku varchar(75),
name varchar(200),
description lvarchar,
properties lvarchar,
fields_ boolean,
fieldsQuantities lvarchar,
minQuantity int,
maxQuantity int,
price float,
discount float,
taxable boolean,
shipping float,
useShippingFormula boolean,
requiresShipping boolean,
stockQuantity int,
featured_ boolean,
sale_ boolean,
smallImage boolean,
smallImageId int8,
smallImageURL varchar(75),
mediumImage boolean,
mediumImageId int8,
mediumImageURL varchar(75),
largeImage boolean,
largeImageId int8,
largeImageURL varchar(75)
)
extent size 16 next size 16
lock mode row;
create table ShoppingItemField (
itemFieldId int8 not null primary key,
itemId int8,
name varchar(75),
values_ lvarchar,
description lvarchar
)
extent size 16 next size 16
lock mode row;
create table ShoppingItemPrice (
itemPriceId int8 not null primary key,
itemId int8,
minQuantity int,
maxQuantity int,
price float,
discount float,
taxable boolean,
shipping float,
useShippingFormula boolean,
status int
)
extent size 16 next size 16
lock mode row;
create table ShoppingOrder (
orderId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
number_ varchar(75),
tax float,
shipping float,
altShipping varchar(75),
requiresShipping boolean,
insure boolean,
insurance float,
couponCodes varchar(75),
couponDiscount float,
billingFirstName varchar(75),
billingLastName varchar(75),
billingEmailAddress varchar(75),
billingCompany varchar(75),
billingStreet varchar(75),
billingCity varchar(75),
billingState varchar(75),
billingZip varchar(75),
billingCountry varchar(75),
billingPhone varchar(75),
shipToBilling boolean,
shippingFirstName varchar(75),
shippingLastName varchar(75),
<API key> varchar(75),
shippingCompany varchar(75),
shippingStreet varchar(75),
shippingCity varchar(75),
shippingState varchar(75),
shippingZip varchar(75),
shippingCountry varchar(75),
shippingPhone varchar(75),
ccName varchar(75),
ccType varchar(75),
ccNumber varchar(75),
ccExpMonth int,
ccExpYear int,
ccVerNumber varchar(75),
comments lvarchar,
ppTxnId varchar(75),
ppPaymentStatus varchar(75),
ppPaymentGross float,
ppReceiverEmail varchar(75),
ppPayerEmail varchar(75),
sendOrderEmail boolean,
sendShippingEmail boolean
)
extent size 16 next size 16
lock mode row;
create table ShoppingOrderItem (
orderItemId int8 not null primary key,
orderId int8,
itemId varchar(75),
sku varchar(75),
name varchar(200),
description lvarchar,
properties lvarchar,
price float,
quantity int,
shippedDate datetime YEAR TO FRACTION
)
extent size 16 next size 16
lock mode row;
create table SocialActivity (
activityId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
createDate datetime YEAR TO FRACTION,
mirrorActivityId int8,
classNameId int8,
classPK int8,
type_ int,
extraData lvarchar,
receiverUserId int8
)
extent size 16 next size 16
lock mode row;
create table SocialRelation (
uuid_ varchar(75),
relationId int8 not null primary key,
companyId int8,
createDate datetime YEAR TO FRACTION,
userId1 int8,
userId2 int8,
type_ int
)
extent size 16 next size 16
lock mode row;
create table SocialRequest (
uuid_ varchar(75),
requestId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
classNameId int8,
classPK int8,
type_ int,
extraData lvarchar,
receiverUserId int8,
status int
)
extent size 16 next size 16
lock mode row;
create table Subscription (
subscriptionId int8 not null primary key,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
classNameId int8,
classPK int8,
frequency varchar(75)
)
extent size 16 next size 16
lock mode row;
create table TagsAsset (
assetId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
classNameId int8,
classPK int8,
visible boolean,
startDate datetime YEAR TO FRACTION,
endDate datetime YEAR TO FRACTION,
publishDate datetime YEAR TO FRACTION,
expirationDate datetime YEAR TO FRACTION,
mimeType varchar(75),
title varchar(255),
description lvarchar,
summary lvarchar,
url lvarchar,
height int,
width int,
priority float,
viewCount int
)
extent size 16 next size 16
lock mode row;
create table <API key> (
assetId int8 not null,
entryId int8 not null,
primary key (assetId, entryId)
)
extent size 16 next size 16
lock mode row;
create table TagsEntry (
entryId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
parentEntryId int8,
name varchar(75),
vocabularyId int8
)
extent size 16 next size 16
lock mode row;
create table TagsProperty (
propertyId int8 not null primary key,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
entryId int8,
key_ varchar(75),
value varchar(255)
)
extent size 16 next size 16
lock mode row;
create table TagsSource (
sourceId int8 not null primary key,
parentSourceId int8,
name varchar(75),
acronym varchar(75)
)
extent size 16 next size 16
lock mode row;
create table TagsVocabulary (
vocabularyId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
name varchar(75),
description varchar(75),
folksonomy boolean
)
extent size 16 next size 16
lock mode row;
create table TasksProposal (
proposalId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
classNameId int8,
classPK varchar(75),
name varchar(75),
description lvarchar,
publishDate datetime YEAR TO FRACTION,
dueDate datetime YEAR TO FRACTION
)
extent size 16 next size 16
lock mode row;
create table TasksReview (
reviewId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
proposalId int8,
assignedByUserId int8,
assignedByUserName varchar(75),
stage int,
completed boolean,
rejected boolean
)
extent size 16 next size 16
lock mode row;
create table User_ (
uuid_ varchar(75),
userId int8 not null primary key,
companyId int8,
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
defaultUser boolean,
contactId int8,
password_ varchar(75),
passwordEncrypted boolean,
passwordReset boolean,
<API key> datetime YEAR TO FRACTION,
<API key> varchar(75),
reminderQueryAnswer varchar(75),
graceLoginCount int,
screenName varchar(75),
emailAddress varchar(75),
openId lvarchar(1024),
portraitId int8,
languageId varchar(75),
timeZoneId varchar(75),
greeting varchar(255),
comments lvarchar,
firstName varchar(75),
middleName varchar(75),
lastName varchar(75),
jobTitle varchar(75),
loginDate datetime YEAR TO FRACTION,
loginIP varchar(75),
lastLoginDate datetime YEAR TO FRACTION,
lastLoginIP varchar(75),
lastFailedLoginDate datetime YEAR TO FRACTION,
failedLoginAttempts int,
lockout boolean,
lockoutDate datetime YEAR TO FRACTION,
agreedToTermsOfUse boolean,
active_ boolean
)
extent size 16 next size 16
lock mode row;
create table UserGroup (
userGroupId int8 not null primary key,
companyId int8,
parentUserGroupId int8,
name varchar(75),
description lvarchar
)
extent size 16 next size 16
lock mode row;
create table UserGroupRole (
userId int8 not null,
groupId int8 not null,
roleId int8 not null,
primary key (userId, groupId, roleId)
)
extent size 16 next size 16
lock mode row;
create table UserIdMapper (
userIdMapperId int8 not null primary key,
userId int8,
type_ varchar(75),
description varchar(75),
externalUserId varchar(75)
)
extent size 16 next size 16
lock mode row;
create table Users_Groups (
userId int8 not null,
groupId int8 not null,
primary key (userId, groupId)
)
extent size 16 next size 16
lock mode row;
create table Users_Orgs (
userId int8 not null,
organizationId int8 not null,
primary key (userId, organizationId)
)
extent size 16 next size 16
lock mode row;
create table Users_Permissions (
userId int8 not null,
permissionId int8 not null,
primary key (userId, permissionId)
)
extent size 16 next size 16
lock mode row;
create table Users_Roles (
userId int8 not null,
roleId int8 not null,
primary key (userId, roleId)
)
extent size 16 next size 16
lock mode row;
create table Users_UserGroups (
userGroupId int8 not null,
userId int8 not null,
primary key (userGroupId, userId)
)
extent size 16 next size 16
lock mode row;
create table UserTracker (
userTrackerId int8 not null primary key,
companyId int8,
userId int8,
modifiedDate datetime YEAR TO FRACTION,
sessionId varchar(200),
remoteAddr varchar(75),
remoteHost varchar(75),
userAgent varchar(200)
)
extent size 16 next size 16
lock mode row;
create table UserTrackerPath (
userTrackerPathId int8 not null primary key,
userTrackerId int8,
path_ lvarchar,
pathDate datetime YEAR TO FRACTION
)
extent size 16 next size 16
lock mode row;
create table Vocabulary (
vocabularyId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
name varchar(75),
description varchar(75),
folksonomy boolean
)
extent size 16 next size 16
lock mode row;
create table WebDAVProps (
webDavPropsId int8 not null primary key,
companyId int8,
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
classNameId int8,
classPK int8,
props text
)
extent size 16 next size 16
lock mode row;
create table Website (
websiteId int8 not null primary key,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
classNameId int8,
classPK int8,
url lvarchar,
typeId int,
primary_ boolean
)
extent size 16 next size 16
lock mode row;
create table WikiNode (
uuid_ varchar(75),
nodeId int8 not null primary key,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
name varchar(75),
description lvarchar,
lastPostDate datetime YEAR TO FRACTION
)
extent size 16 next size 16
lock mode row;
create table WikiPage (
uuid_ varchar(75),
pageId int8 not null primary key,
resourcePrimKey int8,
groupId int8,
companyId int8,
userId int8,
userName varchar(75),
createDate datetime YEAR TO FRACTION,
modifiedDate datetime YEAR TO FRACTION,
nodeId int8,
title varchar(255),
version float,
minorEdit boolean,
content text,
summary lvarchar,
format varchar(75),
head boolean,
parentTitle varchar(75),
redirectTitle varchar(75)
)
extent size 16 next size 16
lock mode row;
create table WikiPageResource (
resourcePrimKey int8 not null primary key,
nodeId int8,
title varchar(75)
)
extent size 16 next size 16
lock mode row;
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (1, 'Canada', 'CA', 'CAN', '124', '001', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (2, 'China', 'CN', 'CHN', '156', '086', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (3, 'France', 'FR', 'FRA', '250', '033', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (4, 'Germany', 'DE', 'DEU', '276', '049', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (5, 'Hong Kong', 'HK', 'HKG', '344', '852', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (6, 'Hungary', 'HU', 'HUN', '348', '036', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (7, 'Israel', 'IL', 'ISR', '376', '972', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (8, 'Italy', 'IT', 'ITA', '380', '039', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (9, 'Japan', 'JP', 'JPN', '392', '081', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (10, 'South Korea', 'KR', 'KOR', '410', '082', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (11, 'Netherlands', 'NL', 'NLD', '528', '031', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (12, 'Portugal', 'PT', 'PRT', '620', '351', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (13, 'Russia', 'RU', 'RUS', '643', '007', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (14, 'Singapore', 'SG', 'SGP', '702', '065', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (15, 'Spain', 'ES', 'ESP', '724', '034', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (16, 'Turkey', 'TR', 'TUR', '792', '090', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (17, 'Vietnam', 'VM', 'VNM', '704', '084', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (18, 'United Kingdom', 'GB', 'GBR', '826', '044', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (19, 'United States', 'US', 'USA', '840', '001', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (20, 'Afghanistan', 'AF', 'AFG', '4', '093', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (21, 'Albania', 'AL', 'ALB', '8', '355', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (22, 'Algeria', 'DZ', 'DZA', '12', '213', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (23, 'American Samoa', 'AS', 'ASM', '16', '684', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (24, 'Andorra', 'AD', 'AND', '20', '376', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (25, 'Angola', 'AO', 'AGO', '24', '244', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (26, 'Anguilla', 'AI', 'AIA', '660', '264', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (27, 'Antarctica', 'AQ', 'ATA', '10', '672', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (28, 'Antigua', 'AG', 'ATG', '28', '268', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (29, 'Argentina', 'AR', 'ARG', '32', '054', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (30, 'Armenia', 'AM', 'ARM', '51', '374', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (31, 'Aruba', 'AW', 'ABW', '533', '297', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (32, 'Australia', 'AU', 'AUS', '36', '061', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (33, 'Austria', 'AT', 'AUT', '40', '043', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (34, 'Azerbaijan', 'AZ', 'AZE', '31', '994', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (35, 'Bahamas', 'BS', 'BHS', '44', '242', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (36, 'Bahrain', 'BH', 'BHR', '48', '973', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (37, 'Bangladesh', 'BD', 'BGD', '50', '880', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (38, 'Barbados', 'BB', 'BRB', '52', '246', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (39, 'Belarus', 'BY', 'BLR', '112', '375', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (40, 'Belgium', 'BE', 'BEL', '56', '032', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (41, 'Belize', 'BZ', 'BLZ', '84', '501', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (42, 'Benin', 'BJ', 'BEN', '204', '229', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (43, 'Bermuda', 'BM', 'BMU', '60', '441', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (44, 'Bhutan', 'BT', 'BTN', '64', '975', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (45, 'Bolivia', 'BO', 'BOL', '68', '591', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (46, 'Bosnia-Herzegovina', 'BA', 'BIH', '70', '387', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (47, 'Botswana', 'BW', 'BWA', '72', '267', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (48, 'Brazil', 'BR', 'BRA', '76', '055', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (49, 'British Virgin Islands', 'VG', 'VGB', '92', '284', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (50, 'Brunei', 'BN', 'BRN', '96', '673', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (51, 'Bulgaria', 'BG', 'BGR', '100', '359', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (52, 'Burkina Faso', 'BF', 'BFA', '854', '226', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (53, 'Burma (Myanmar)', 'MM', 'MMR', '104', '095', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (54, 'Burundi', 'BI', 'BDI', '108', '257', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (55, 'Cambodia', 'KH', 'KHM', '116', '855', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (56, 'Cameroon', 'CM', 'CMR', '120', '237', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (57, 'Cape Verde Island', 'CV', 'CPV', '132', '238', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (58, 'Cayman Islands', 'KY', 'CYM', '136', '345', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (59, 'Central African Republic', 'CF', 'CAF', '140', '236', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (60, 'Chad', 'TD', 'TCD', '148', '235', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (61, 'Chile', 'CL', 'CHL', '152', '056', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (62, 'Christmas Island', 'CX', 'CXR', '162', '061', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (63, 'Cocos Islands', 'CC', 'CCK', '166', '061', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (64, 'Colombia', 'CO', 'COL', '170', '057', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (65, 'Comoros', 'KM', 'COM', '174', '269', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (66, 'Republic of Congo', 'CD', 'COD', '180', '242', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (67, 'Democratic Republic of Congo', 'CG', 'COG', '178', '243', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (68, 'Cook Islands', 'CK', 'COK', '184', '682', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (69, 'Costa Rica', 'CR', 'CRI', '188', '506', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (70, 'Croatia', 'HR', 'HRV', '191', '385', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (71, 'Cuba', 'CU', 'CUB', '192', '053', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (72, 'Cyprus', 'CY', 'CYP', '196', '357', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (73, 'Czech Republic', 'CZ', 'CZE', '203', '420', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (74, 'Denmark', 'DK', 'DNK', '208', '045', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (75, 'Djibouti', 'DJ', 'DJI', '262', '253', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (76, 'Dominica', 'DM', 'DMA', '212', '767', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (77, 'Dominican Republic', 'DO', 'DOM', '214', '809', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (78, 'Ecuador', 'EC', 'ECU', '218', '593', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (79, 'Egypt', 'EG', 'EGY', '818', '020', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (80, 'El Salvador', 'SV', 'SLV', '222', '503', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (81, 'Equatorial Guinea', 'GQ', 'GNQ', '226', '240', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (82, 'Eritrea', 'ER', 'ERI', '232', '291', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (83, 'Estonia', 'EE', 'EST', '233', '372', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (84, 'Ethiopia', 'ET', 'ETH', '231', '251', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (85, 'Faeroe Islands', 'FO', 'FRO', '234', '298', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (86, 'Falkland Islands', 'FK', 'FLK', '238', '500', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (87, 'Fiji Islands', 'FJ', 'FJI', '242', '679', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (88, 'Finland', 'FI', 'FIN', '246', '358', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (89, 'French Guiana', 'GF', 'GUF', '254', '594', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (90, 'French Polynesia', 'PF', 'PYF', '258', '689', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (91, 'Gabon', 'GA', 'GAB', '266', '241', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (92, 'Gambia', 'GM', 'GMB', '270', '220', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (93, 'Georgia', 'GE', 'GEO', '268', '995', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (94, 'Ghana', 'GH', 'GHA', '288', '233', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (95, 'Gibraltar', 'GI', 'GIB', '292', '350', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (96, 'Greece', 'GR', 'GRC', '300', '030', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (97, 'Greenland', 'GL', 'GRL', '304', '299', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (98, 'Grenada', 'GD', 'GRD', '308', '473', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (99, 'Guadeloupe', 'GP', 'GLP', '312', '590', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (100, 'Guam', 'GU', 'GUM', '316', '671', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (101, 'Guatemala', 'GT', 'GTM', '320', '502', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (102, 'Guinea', 'GN', 'GIN', '324', '224', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (103, 'Guinea-Bissau', 'GW', 'GNB', '624', '245', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (104, 'Guyana', 'GY', 'GUY', '328', '592', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (105, 'Haiti', 'HT', 'HTI', '332', '509', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (106, 'Honduras', 'HN', 'HND', '340', '504', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (107, 'Iceland', 'IS', 'ISL', '352', '354', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (108, 'India', 'IN', 'IND', '356', '091', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (109, 'Indonesia', 'ID', 'IDN', '360', '062', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (110, 'Iran', 'IR', 'IRN', '364', '098', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (111, 'Iraq', 'IQ', 'IRQ', '368', '964', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (112, 'Ireland', 'IE', 'IRL', '372', '353', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (113, 'Ivory Coast', 'CI', 'CIV', '384', '225', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (114, 'Jamaica', 'JM', 'JAM', '388', '876', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (115, 'Jordan', 'JO', 'JOR', '400', '962', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (116, 'Kazakhstan', 'KZ', 'KAZ', '398', '007', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (117, 'Kenya', 'KE', 'KEN', '404', '254', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (118, 'Kiribati', 'KI', 'KIR', '408', '686', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (119, 'Kuwait', 'KW', 'KWT', '414', '965', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (120, 'North Korea', 'KP', 'PRK', '408', '850', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (121, 'Kyrgyzstan', 'KG', 'KGZ', '471', '996', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (122, 'Laos', 'LA', 'LAO', '418', '856', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (123, 'Latvia', 'LV', 'LVA', '428', '371', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (124, 'Lebanon', 'LB', 'LBN', '422', '961', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (125, 'Lesotho', 'LS', 'LSO', '426', '266', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (126, 'Liberia', 'LR', 'LBR', '430', '231', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (127, 'Libya', 'LY', 'LBY', '434', '218', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (128, 'Liechtenstein', 'LI', 'LIE', '438', '423', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (129, 'Lithuania', 'LT', 'LTU', '440', '370', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (130, 'Luxembourg', 'LU', 'LUX', '442', '352', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (131, 'Macau', 'MO', 'MAC', '446', '853', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (132, 'Macedonia', 'MK', 'MKD', '807', '389', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (133, 'Madagascar', 'MG', 'MDG', '450', '261', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (134, 'Malawi', 'MW', 'MWI', '454', '265', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (135, 'Malaysia', 'MY', 'MYS', '458', '060', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (136, 'Maldives', 'MV', 'MDV', '462', '960', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (137, 'Mali', 'ML', 'MLI', '466', '223', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (138, 'Malta', 'MT', 'MLT', '470', '356', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (139, 'Marshall Islands', 'MH', 'MHL', '584', '692', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (140, 'Martinique', 'MQ', 'MTQ', '474', '596', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (141, 'Mauritania', 'MR', 'MRT', '478', '222', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (142, 'Mauritius', 'MU', 'MUS', '480', '230', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (143, 'Mayotte Island', 'YT', 'MYT', '175', '269', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (144, 'Mexico', 'MX', 'MEX', '484', '052', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (145, 'Micronesia', 'FM', 'FSM', '583', '691', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (146, 'Moldova', 'MD', 'MDA', '498', '373', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (147, 'Monaco', 'MC', 'MCO', '492', '377', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (148, 'Mongolia', 'MN', 'MNG', '496', '976', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (149, 'Montenegro', 'ME', 'MNE', '499', '382', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (150, 'Montserrat', 'MS', 'MSR', '500', '664', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (151, 'Morocco', 'MA', 'MAR', '504', '212', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (152, 'Mozambique', 'MZ', 'MOZ', '508', '258', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (153, 'Namibia', 'NA', 'NAM', '516', '264', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (154, 'Nauru', 'NR', 'NRU', '520', '674', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (155, 'Nepal', 'NP', 'NPL', '524', '977', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (156, 'Netherlands Antilles', 'AN', 'ANT', '530', '599', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (157, 'New Caledonia', 'NC', 'NCL', '540', '687', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (158, 'New Zealand', 'NZ', 'NZL', '554', '064', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (159, 'Nicaragua', 'NI', 'NIC', '558', '505', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (160, 'Niger', 'NE', 'NER', '562', '227', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (161, 'Nigeria', 'NG', 'NGA', '566', '234', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (162, 'Niue', 'NU', 'NIU', '570', '683', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (163, 'Norfolk Island', 'NF', 'NFK', '574', '672', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (164, 'Norway', 'NO', 'NOR', '578', '047', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (165, 'Oman', 'OM', 'OMN', '512', '968', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (166, 'Pakistan', 'PK', 'PAK', '586', '092', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (167, 'Palau', 'PW', 'PLW', '585', '680', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (168, 'Palestine', 'PS', 'PSE', '275', '970', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (169, 'Panama', 'PA', 'PAN', '591', '507', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (170, 'Papua New Guinea', 'PG', 'PNG', '598', '675', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (171, 'Paraguay', 'PY', 'PRY', '600', '595', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (172, 'Peru', 'PE', 'PER', '604', '051', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (173, 'Philippines', 'PH', 'PHL', '608', '063', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (174, 'Poland', 'PL', 'POL', '616', '048', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (175, 'Puerto Rico', 'PR', 'PRI', '630', '787', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (176, 'Qatar', 'QA', 'QAT', '634', '974', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (177, 'Reunion Island', 'RE', 'REU', '638', '262', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (178, 'Romania', 'RO', 'ROU', '642', '040', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (179, 'Rwanda', 'RW', 'RWA', '646', '250', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (180, 'St. Helena', 'SH', 'SHN', '654', '290', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (181, 'St. Kitts', 'KN', 'KNA', '659', '869', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (182, 'St. Lucia', 'LC', 'LCA', '662', '758', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (183, 'St. Pierre & Miquelon', 'PM', 'SPM', '666', '508', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (184, 'St. Vincent', 'VC', 'VCT', '670', '784', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (185, 'San Marino', 'SM', 'SMR', '674', '378', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (186, 'Sao Tome & Principe', 'ST', 'STP', '678', '239', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (187, 'Saudi Arabia', 'SA', 'SAU', '682', '966', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (188, 'Senegal', 'SN', 'SEN', '686', '221', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (189, 'Serbia', 'RS', 'SRB', '688', '381', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (190, 'Seychelles', 'SC', 'SYC', '690', '248', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (191, 'Sierra Leone', 'SL', 'SLE', '694', '249', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (192, 'Slovakia', 'SK', 'SVK', '703', '421', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (193, 'Slovenia', 'SI', 'SVN', '705', '386', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (194, 'Solomon Islands', 'SB', 'SLB', '90', '677', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (195, 'Somalia', 'SO', 'SOM', '706', '252', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (196, 'South Africa', 'ZA', 'ZAF', '710', '027', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (197, 'Sri Lanka', 'LK', 'LKA', '144', '094', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (198, 'Sudan', 'SD', 'SDN', '736', '095', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (199, 'Suriname', 'SR', 'SUR', '740', '597', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (200, 'Swaziland', 'SZ', 'SWZ', '748', '268', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (201, 'Sweden', 'SE', 'SWE', '752', '046', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (202, 'Switzerland', 'CH', 'CHE', '756', '041', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (203, 'Syria', 'SY', 'SYR', '760', '963', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (204, 'Taiwan', 'TW', 'TWN', '158', '886', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (205, 'Tajikistan', 'TJ', 'TJK', '762', '992', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (206, 'Tanzania', 'TZ', 'TZA', '834', '255', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (207, 'Thailand', 'TH', 'THA', '764', '066', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (208, 'Togo', 'TG', 'TGO', '768', '228', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (209, 'Tonga', 'TO', 'TON', '776', '676', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (210, 'Trinidad & Tobago', 'TT', 'TTO', '780', '868', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (211, 'Tunisia', 'TN', 'TUN', '788', '216', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (212, 'Turkmenistan', 'TM', 'TKM', '795', '993', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (213, 'Turks & Caicos', 'TC', 'TCA', '796', '649', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (214, 'Tuvalu', 'TV', 'TUV', '798', '688', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (215, 'Uganda', 'UG', 'UGA', '800', '256', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (216, 'Ukraine', 'UA', 'UKR', '804', '380', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (217, 'United Arab Emirates', 'AE', 'ARE', '784', '971', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (218, 'Uruguay', 'UY', 'URY', '858', '598', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (219, 'Uzbekistan', 'UZ', 'UZB', '860', '998', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (220, 'Vanuatu', 'VU', 'VUT', '548', '678', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (221, 'Vatican City', 'VA', 'VAT', '336', '039', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (222, 'Venezuela', 'VE', 'VEN', '862', '058', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (223, 'Wallis & Futuna', 'WF', 'WLF', '876', '681', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (224, 'Western Samoa', 'EH', 'ESH', '732', '685', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (225, 'Yemen', 'YE', 'YEM', '887', '967', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (226, 'Zambia', 'ZM', 'ZMB', '894', '260', 'T');
insert into Country (countryId, name, a2, a3, number_, idd_, active_) values (227, 'Zimbabwe', 'ZW', 'ZWE', '716', '263', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (1001, 1, 'AB', 'Alberta', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (1002, 1, 'BC', 'British Columbia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (1003, 1, 'MB', 'Manitoba', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (1004, 1, 'NB', 'New Brunswick', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (1005, 1, 'NL', 'Newfoundland and Labrador', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (1006, 1, 'NT', 'Northwest Territories', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (1007, 1, 'NS', 'Nova Scotia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (1008, 1, 'NU', 'Nunavut', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (1009, 1, 'ON', 'Ontario', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (1010, 1, 'PE', 'Prince Edward Island', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (1011, 1, 'QC', 'Quebec', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (1012, 1, 'SK', 'Saskatchewan', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (1013, 1, 'YT', 'Yukon', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3001, 3, 'A', 'Alsace', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3002, 3, 'B', 'Aquitaine', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3003, 3, 'C', 'Auvergne', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3004, 3, 'P', 'Basse-Normandie', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3005, 3, 'D', 'Bourgogne', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3006, 3, 'E', 'Bretagne', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3007, 3, 'F', 'Centre', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3008, 3, 'G', 'Champagne-Ardenne', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3009, 3, 'H', 'Corse', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3010, 3, 'GF', 'Guyane', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3011, 3, 'I', 'Franche Comté', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3012, 3, 'GP', 'Guadeloupe', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3013, 3, 'Q', 'Haute-Normandie', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3014, 3, 'J', 'Île-de-France', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3015, 3, 'K', '<API key>', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3016, 3, 'L', 'Limousin', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3017, 3, 'M', 'Lorraine', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3018, 3, 'MQ', 'Martinique', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3019, 3, 'N', 'Midi-Pyrénées', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3020, 3, 'O', 'Nord Pas de Calais', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3021, 3, 'R', 'Pays de la Loire', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3022, 3, 'S', 'Picardie', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3023, 3, 'T', 'Poitou-Charentes', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3024, 3, 'U', 'Provence-Alpes-Côte-d\'Azur', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3025, 3, 'RE', 'Réunion', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (3026, 3, 'V', 'Rhône-Alpes', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (4001, 4, 'BW', 'Baden-Württemberg', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (4002, 4, 'BY', 'Bayern', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (4003, 4, 'BE', 'Berlin', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (4004, 4, 'BR', 'Brandenburg', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (4005, 4, 'HB', 'Bremen', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (4006, 4, 'HH', 'Hamburg', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (4007, 4, 'HE', 'Hessen', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (4008, 4, 'MV', '<API key>', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (4009, 4, 'NI', 'Niedersachsen', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (4010, 4, 'NW', 'Nordrhein-Westfalen', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (4011, 4, 'RP', 'Rheinland-Pfalz', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (4012, 4, 'SL', 'Saarland', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (4013, 4, 'SN', 'Sachsen', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (4014, 4, 'ST', 'Sachsen-Anhalt', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (4015, 4, 'SH', 'Schleswig-Holstein', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (4016, 4, 'TH', 'Thüringen', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8001, 8, 'AG', 'Agrigento', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8002, 8, 'AL', 'Alessandria', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8003, 8, 'AN', 'Ancona', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8004, 8, 'AO', 'Aosta', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8005, 8, 'AR', 'Arezzo', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8006, 8, 'AP', 'Ascoli Piceno', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8007, 8, 'AT', 'Asti', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8008, 8, 'AV', 'Avellino', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8009, 8, 'BA', 'Bari', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8010, 8, 'BT', '<API key>', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8011, 8, 'BL', 'Belluno', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8012, 8, 'BN', 'Benevento', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8013, 8, 'BG', 'Bergamo', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8014, 8, 'BI', 'Biella', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8015, 8, 'BO', 'Bologna', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8016, 8, 'BZ', 'Bolzano', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8017, 8, 'BS', 'Brescia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8018, 8, 'BR', 'Brindisi', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8019, 8, 'CA', 'Cagliari', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8020, 8, 'CL', 'Caltanissetta', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8021, 8, 'CB', 'Campobasso', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8022, 8, 'CI', 'Carbonia-Iglesias', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8023, 8, 'CE', 'Caserta', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8024, 8, 'CT', 'Catania', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8025, 8, 'CZ', 'Catanzaro', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8026, 8, 'CH', 'Chieti', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8027, 8, 'CO', 'Como', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8028, 8, 'CS', 'Cosenza', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8029, 8, 'CR', 'Cremona', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8030, 8, 'KR', 'Crotone', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8031, 8, 'CN', 'Cuneo', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8032, 8, 'EN', 'Enna', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8033, 8, 'FM', 'Fermo', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8034, 8, 'FE', 'Ferrara', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8035, 8, 'FI', 'Firenze', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8036, 8, 'FG', 'Foggia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8037, 8, 'FC', 'Forli-Cesena', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8038, 8, 'FR', 'Frosinone', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8039, 8, 'GE', 'Genova', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8040, 8, 'GO', 'Gorizia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8041, 8, 'GR', 'Grosseto', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8042, 8, 'IM', 'Imperia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8043, 8, 'IS', 'Isernia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8044, 8, 'AQ', 'L''Aquila', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8045, 8, 'SP', 'La Spezia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8046, 8, 'LT', 'Latina', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8047, 8, 'LE', 'Lecce', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8048, 8, 'LC', 'Lecco', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8049, 8, 'LI', 'Livorno', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8050, 8, 'LO', 'Lodi', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8051, 8, 'LU', 'Lucca', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8052, 8, 'MC', 'Macerata', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8053, 8, 'MN', 'Mantova', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8054, 8, 'MS', 'Massa-Carrara', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8055, 8, 'MT', 'Matera', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8056, 8, 'MA', 'Medio Campidano', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8057, 8, 'ME', 'Messina', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8058, 8, 'MI', 'Milano', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8059, 8, 'MO', 'Modena', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8060, 8, 'MZ', 'Monza', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8061, 8, 'NA', 'Napoli', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8062, 8, 'NO', 'Novara', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8063, 8, 'NU', 'Nuoro', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8064, 8, 'OG', 'Ogliastra', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8065, 8, 'OT', 'Olbia-Tempio', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8066, 8, 'OR', 'Oristano', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8067, 8, 'PD', 'Padova', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8068, 8, 'PA', 'Palermo', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8069, 8, 'PR', 'Parma', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8070, 8, 'PV', 'Pavia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8071, 8, 'PG', 'Perugia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8072, 8, 'PU', 'Pesaro e Urbino', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8073, 8, 'PE', 'Pescara', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8074, 8, 'PC', 'Piacenza', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8075, 8, 'PI', 'Pisa', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8076, 8, 'PT', 'Pistoia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8077, 8, 'PN', 'Pordenone', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8078, 8, 'PZ', 'Potenza', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8079, 8, 'PO', 'Prato', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8080, 8, 'RG', 'Ragusa', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8081, 8, 'RA', 'Ravenna', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8082, 8, 'RC', 'Reggio Calabria', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8083, 8, 'RE', 'Reggio Emilia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8084, 8, 'RI', 'Rieti', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8085, 8, 'RN', 'Rimini', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8086, 8, 'RM', 'Roma', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8087, 8, 'RO', 'Rovigo', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8088, 8, 'SA', 'Salerno', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8089, 8, 'SS', 'Sassari', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8090, 8, 'SV', 'Savona', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8091, 8, 'SI', 'Siena', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8092, 8, 'SR', 'Siracusa', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8093, 8, 'SO', 'Sondrio', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8094, 8, 'TA', 'Taranto', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8095, 8, 'TE', 'Teramo', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8096, 8, 'TR', 'Terni', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8097, 8, 'TO', 'Torino', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8098, 8, 'TP', 'Trapani', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8099, 8, 'TN', 'Trento', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8100, 8, 'TV', 'Treviso', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8101, 8, 'TS', 'Trieste', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8102, 8, 'UD', 'Udine', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8103, 8, 'VA', 'Varese', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8104, 8, 'VE', 'Venezia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8105, 8, 'VB', '<API key>', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8106, 8, 'VC', 'Vercelli', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8107, 8, 'VR', 'Verona', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8108, 8, 'VV', 'Vibo Valentia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8109, 8, 'VI', 'Vicenza', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (8110, 8, 'VT', 'Viterbo', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (15001, 15, 'AN', 'Andalusia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (15002, 15, 'AR', 'Aragon', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (15003, 15, 'AS', 'Asturias', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (15004, 15, 'IB', 'Balearic Islands', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (15005, 15, 'PV', 'Basque Country', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (15006, 15, 'CN', 'Canary Islands', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (15007, 15, 'CB', 'Cantabria', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (15008, 15, 'CL', 'Castile and Leon', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (15009, 15, 'CM', 'Castile-La Mancha', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (15010, 15, 'CT', 'Catalonia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (15011, 15, 'CE', 'Ceuta', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (15012, 15, 'EX', 'Extremadura', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (15013, 15, 'GA', 'Galicia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (15014, 15, 'LO', 'La Rioja', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (15015, 15, 'M', 'Madrid', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (15016, 15, 'ML', 'Melilla', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (15017, 15, 'MU', 'Murcia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (15018, 15, 'NA', 'Navarra', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (15019, 15, 'VC', 'Valencia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19001, 19, 'AL', 'Alabama', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19002, 19, 'AK', 'Alaska', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19003, 19, 'AZ', 'Arizona', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19004, 19, 'AR', 'Arkansas', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19005, 19, 'CA', 'California', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19006, 19, 'CO', 'Colorado', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19007, 19, 'CT', 'Connecticut', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19008, 19, 'DC', 'District of Columbia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19009, 19, 'DE', 'Delaware', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19010, 19, 'FL', 'Florida', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19011, 19, 'GA', 'Georgia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19012, 19, 'HI', 'Hawaii', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19013, 19, 'ID', 'Idaho', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19014, 19, 'IL', 'Illinois', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19015, 19, 'IN', 'Indiana', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19016, 19, 'IA', 'Iowa', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19017, 19, 'KS', 'Kansas', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19018, 19, 'KY', 'Kentucky ', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19019, 19, 'LA', 'Louisiana ', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19020, 19, 'ME', 'Maine', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19021, 19, 'MD', 'Maryland', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19022, 19, 'MA', 'Massachusetts', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19023, 19, 'MI', 'Michigan', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19024, 19, 'MN', 'Minnesota', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19025, 19, 'MS', 'Mississippi', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19026, 19, 'MO', 'Missouri', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19027, 19, 'MT', 'Montana', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19028, 19, 'NE', 'Nebraska', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19029, 19, 'NV', 'Nevada', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19030, 19, 'NH', 'New Hampshire', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19031, 19, 'NJ', 'New Jersey', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19032, 19, 'NM', 'New Mexico', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19033, 19, 'NY', 'New York', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19034, 19, 'NC', 'North Carolina', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19035, 19, 'ND', 'North Dakota', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19036, 19, 'OH', 'Ohio', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19037, 19, 'OK', 'Oklahoma ', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19038, 19, 'OR', 'Oregon', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19039, 19, 'PA', 'Pennsylvania', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19040, 19, 'PR', 'Puerto Rico', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19041, 19, 'RI', 'Rhode Island', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19042, 19, 'SC', 'South Carolina', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19043, 19, 'SD', 'South Dakota', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19044, 19, 'TN', 'Tennessee', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19045, 19, 'TX', 'Texas', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19046, 19, 'UT', 'Utah', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19047, 19, 'VT', 'Vermont', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19048, 19, 'VA', 'Virginia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19049, 19, 'WA', 'Washington', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19050, 19, 'WV', 'West Virginia', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19051, 19, 'WI', 'Wisconsin', 'T');
insert into Region (regionId, countryId, regionCode, name, active_) values (19052, 19, 'WY', 'Wyoming', 'T');
-- List types for accounts
insert into ListType (listTypeId, name, type_) values (10000, 'Billing', 'com.liferay.portal.model.Account.address');
insert into ListType (listTypeId, name, type_) values (10001, 'Other', 'com.liferay.portal.model.Account.address');
insert into ListType (listTypeId, name, type_) values (10002, 'P.O. Box', 'com.liferay.portal.model.Account.address');
insert into ListType (listTypeId, name, type_) values (10003, 'Shipping', 'com.liferay.portal.model.Account.address');
insert into ListType (listTypeId, name, type_) values (10004, 'E-mail', 'com.liferay.portal.model.Account.emailAddress');
insert into ListType (listTypeId, name, type_) values (10005, 'E-mail 2', 'com.liferay.portal.model.Account.emailAddress');
insert into ListType (listTypeId, name, type_) values (10006, 'E-mail 3', 'com.liferay.portal.model.Account.emailAddress');
insert into ListType (listTypeId, name, type_) values (10007, 'Fax', 'com.liferay.portal.model.Account.phone');
insert into ListType (listTypeId, name, type_) values (10008, 'Local', 'com.liferay.portal.model.Account.phone');
insert into ListType (listTypeId, name, type_) values (10009, 'Other', 'com.liferay.portal.model.Account.phone');
insert into ListType (listTypeId, name, type_) values (10010, 'Toll-Free', 'com.liferay.portal.model.Account.phone');
insert into ListType (listTypeId, name, type_) values (10011, 'TTY', 'com.liferay.portal.model.Account.phone');
insert into ListType (listTypeId, name, type_) values (10012, 'Intranet', 'com.liferay.portal.model.Account.website');
insert into ListType (listTypeId, name, type_) values (10013, 'Public', 'com.liferay.portal.model.Account.website');
-- List types for contacts
insert into ListType (listTypeId, name, type_) values (11000, 'Business', 'com.liferay.portal.model.Contact.address');
insert into ListType (listTypeId, name, type_) values (11001, 'Other', 'com.liferay.portal.model.Contact.address');
insert into ListType (listTypeId, name, type_) values (11002, 'Personal', 'com.liferay.portal.model.Contact.address');
insert into ListType (listTypeId, name, type_) values (11003, 'E-mail', 'com.liferay.portal.model.Contact.emailAddress');
insert into ListType (listTypeId, name, type_) values (11004, 'E-mail 2', 'com.liferay.portal.model.Contact.emailAddress');
insert into ListType (listTypeId, name, type_) values (11005, 'E-mail 3', 'com.liferay.portal.model.Contact.emailAddress');
insert into ListType (listTypeId, name, type_) values (11006, 'Business', 'com.liferay.portal.model.Contact.phone');
insert into ListType (listTypeId, name, type_) values (11007, 'Business Fax', 'com.liferay.portal.model.Contact.phone');
insert into ListType (listTypeId, name, type_) values (11008, 'Mobile', 'com.liferay.portal.model.Contact.phone');
insert into ListType (listTypeId, name, type_) values (11009, 'Other', 'com.liferay.portal.model.Contact.phone');
insert into ListType (listTypeId, name, type_) values (11010, 'Pager', 'com.liferay.portal.model.Contact.phone');
insert into ListType (listTypeId, name, type_) values (11011, 'Personal', 'com.liferay.portal.model.Contact.phone');
insert into ListType (listTypeId, name, type_) values (11012, 'Personal Fax', 'com.liferay.portal.model.Contact.phone');
insert into ListType (listTypeId, name, type_) values (11013, 'TTY', 'com.liferay.portal.model.Contact.phone');
insert into ListType (listTypeId, name, type_) values (11014, 'Dr.', 'com.liferay.portal.model.Contact.prefix');
insert into ListType (listTypeId, name, type_) values (11015, 'Mr.', 'com.liferay.portal.model.Contact.prefix');
insert into ListType (listTypeId, name, type_) values (11016, 'Mrs.', 'com.liferay.portal.model.Contact.prefix');
insert into ListType (listTypeId, name, type_) values (11017, 'Ms.', 'com.liferay.portal.model.Contact.prefix');
insert into ListType (listTypeId, name, type_) values (11020, 'II', 'com.liferay.portal.model.Contact.suffix');
insert into ListType (listTypeId, name, type_) values (11021, 'III', 'com.liferay.portal.model.Contact.suffix');
insert into ListType (listTypeId, name, type_) values (11022, 'IV', 'com.liferay.portal.model.Contact.suffix');
insert into ListType (listTypeId, name, type_) values (11023, 'Jr.', 'com.liferay.portal.model.Contact.suffix');
insert into ListType (listTypeId, name, type_) values (11024, 'PhD.', 'com.liferay.portal.model.Contact.suffix');
insert into ListType (listTypeId, name, type_) values (11025, 'Sr.', 'com.liferay.portal.model.Contact.suffix');
insert into ListType (listTypeId, name, type_) values (11026, 'Blog', 'com.liferay.portal.model.Contact.website');
insert into ListType (listTypeId, name, type_) values (11027, 'Business', 'com.liferay.portal.model.Contact.website');
insert into ListType (listTypeId, name, type_) values (11028, 'Other', 'com.liferay.portal.model.Contact.website');
insert into ListType (listTypeId, name, type_) values (11029, 'Personal', 'com.liferay.portal.model.Contact.website');
-- List types for organizations
insert into ListType (listTypeId, name, type_) values (12000, 'Billing', 'com.liferay.portal.model.Organization.address');
insert into ListType (listTypeId, name, type_) values (12001, 'Other', 'com.liferay.portal.model.Organization.address');
insert into ListType (listTypeId, name, type_) values (12002, 'P.O. Box', 'com.liferay.portal.model.Organization.address');
insert into ListType (listTypeId, name, type_) values (12003, 'Shipping', 'com.liferay.portal.model.Organization.address');
insert into ListType (listTypeId, name, type_) values (12004, 'E-mail', 'com.liferay.portal.model.Organization.emailAddress');
insert into ListType (listTypeId, name, type_) values (12005, 'E-mail 2', 'com.liferay.portal.model.Organization.emailAddress');
insert into ListType (listTypeId, name, type_) values (12006, 'E-mail 3', 'com.liferay.portal.model.Organization.emailAddress');
insert into ListType (listTypeId, name, type_) values (12007, 'Fax', 'com.liferay.portal.model.Organization.phone');
insert into ListType (listTypeId, name, type_) values (12008, 'Local', 'com.liferay.portal.model.Organization.phone');
insert into ListType (listTypeId, name, type_) values (12009, 'Other', 'com.liferay.portal.model.Organization.phone');
insert into ListType (listTypeId, name, type_) values (12010, 'Toll-Free', 'com.liferay.portal.model.Organization.phone');
insert into ListType (listTypeId, name, type_) values (12011, 'TTY', 'com.liferay.portal.model.Organization.phone');
insert into ListType (listTypeId, name, type_) values (12012, 'Administrative', 'com.liferay.portal.model.Organization.service');
insert into ListType (listTypeId, name, type_) values (12013, 'Contracts', 'com.liferay.portal.model.Organization.service');
insert into ListType (listTypeId, name, type_) values (12014, 'Donation', 'com.liferay.portal.model.Organization.service');
insert into ListType (listTypeId, name, type_) values (12015, 'Retail', 'com.liferay.portal.model.Organization.service');
insert into ListType (listTypeId, name, type_) values (12016, 'Training', 'com.liferay.portal.model.Organization.service');
insert into ListType (listTypeId, name, type_) values (12017, 'Full Member', 'com.liferay.portal.model.Organization.status');
insert into ListType (listTypeId, name, type_) values (12018, 'Provisional Member', 'com.liferay.portal.model.Organization.status');
insert into ListType (listTypeId, name, type_) values (12019, 'Intranet', 'com.liferay.portal.model.Organization.website');
insert into ListType (listTypeId, name, type_) values (12020, 'Public', 'com.liferay.portal.model.Organization.website');
insert into Counter values ('com.liferay.counter.model.Counter', 10000);
insert into Release_ (releaseId, createDate, modifiedDate, buildNumber, verified) values (1, CURRENT YEAR TO FRACTION, CURRENT YEAR TO FRACTION, 5203, 'F');
create table QUARTZ_JOB_DETAILS (
JOB_NAME varchar(80) not null,
JOB_GROUP varchar(80) not null,
DESCRIPTION varchar(120),
JOB_CLASS_NAME varchar(128) not null,
IS_DURABLE boolean not null,
IS_VOLATILE boolean not null,
IS_STATEFUL boolean not null,
REQUESTS_RECOVERY boolean not null,
JOB_DATA byte in table,
primary key (JOB_NAME, JOB_GROUP)
)
extent size 16 next size 16
lock mode row;
create table <API key> (
JOB_NAME varchar(80) not null,
JOB_GROUP varchar(80) not null,
JOB_LISTENER varchar(80) not null,
primary key (JOB_NAME, JOB_GROUP, JOB_LISTENER)
)
extent size 16 next size 16
lock mode row;
create table QUARTZ_TRIGGERS (
TRIGGER_NAME varchar(80) not null,
TRIGGER_GROUP varchar(80) not null,
JOB_NAME varchar(80) not null,
JOB_GROUP varchar(80) not null,
IS_VOLATILE boolean not null,
DESCRIPTION varchar(120),
NEXT_FIRE_TIME int8,
PREV_FIRE_TIME int8,
PRIORITY int,
TRIGGER_STATE varchar(16) not null,
TRIGGER_TYPE varchar(8) not null,
START_TIME int8 not null,
END_TIME int8,
CALENDAR_NAME varchar(80),
MISFIRE_INSTR int,
JOB_DATA byte in table,
primary key (TRIGGER_NAME, TRIGGER_GROUP)
)
extent size 16 next size 16
lock mode row;
create table <API key> (
TRIGGER_NAME varchar(80) not null,
TRIGGER_GROUP varchar(80) not null,
REPEAT_COUNT int8 not null,
REPEAT_INTERVAL int8 not null,
TIMES_TRIGGERED int8 not null,
primary key (TRIGGER_NAME, TRIGGER_GROUP)
)
extent size 16 next size 16
lock mode row;
create table <API key> (
TRIGGER_NAME varchar(80) not null,
TRIGGER_GROUP varchar(80) not null,
CRON_EXPRESSION varchar(80) not null,
TIME_ZONE_ID varchar(80),
primary key (TRIGGER_NAME, TRIGGER_GROUP)
)
extent size 16 next size 16
lock mode row;
create table <API key> (
TRIGGER_NAME varchar(80) not null,
TRIGGER_GROUP varchar(80) not null,
BLOB_DATA byte in table,
primary key (TRIGGER_NAME, TRIGGER_GROUP)
)
extent size 16 next size 16
lock mode row;
create table <API key> (
TRIGGER_NAME varchar(80) not null,
TRIGGER_GROUP varchar(80) not null,
TRIGGER_LISTENER varchar(80) not null,
primary key (TRIGGER_NAME, TRIGGER_GROUP, TRIGGER_LISTENER)
)
extent size 16 next size 16
lock mode row;
create table QUARTZ_CALENDARS (
CALENDAR_NAME varchar(80) not null primary key,
CALENDAR byte in table not null
)
extent size 16 next size 16
lock mode row;
create table <API key> (
TRIGGER_GROUP varchar(80) not null primary key
)
extent size 16 next size 16
lock mode row;
create table <API key> (
ENTRY_ID varchar(95) not null primary key,
TRIGGER_NAME varchar(80) not null,
TRIGGER_GROUP varchar(80) not null,
IS_VOLATILE boolean not null,
INSTANCE_NAME varchar(80) not null,
FIRED_TIME int8 not null,
PRIORITY int not null,
STATE varchar(16) not null,
JOB_NAME varchar(80),
JOB_GROUP varchar(80),
IS_STATEFUL boolean,
REQUESTS_RECOVERY boolean
)
extent size 16 next size 16
lock mode row;
create table <API key> (
INSTANCE_NAME varchar(80) not null primary key,
LAST_CHECKIN_TIME int8 not null,
CHECKIN_INTERVAL int8 not null
)
extent size 16 next size 16
lock mode row;
create table QUARTZ_LOCKS (
LOCK_NAME varchar(40) not null primary key
)
extent size 16 next size 16
lock mode row;
insert into QUARTZ_LOCKS values('TRIGGER_ACCESS');
insert into QUARTZ_LOCKS values('JOB_ACCESS');
insert into QUARTZ_LOCKS values('CALENDAR_ACCESS');
insert into QUARTZ_LOCKS values('STATE_ACCESS');
insert into QUARTZ_LOCKS values('MISFIRE_ACCESS');
create index IX_F7655CC3 on QUARTZ_TRIGGERS (NEXT_FIRE_TIME);
create index IX_9955EFB5 on QUARTZ_TRIGGERS (TRIGGER_STATE);
create index IX_8040C593 on QUARTZ_TRIGGERS (TRIGGER_STATE, NEXT_FIRE_TIME);
create index IX_804154AF on <API key> (INSTANCE_NAME);
create index IX_BAB9A1F7 on <API key> (JOB_GROUP);
create index IX_ADEE6A17 on <API key> (JOB_NAME);
create index IX_64B194F2 on <API key> (TRIGGER_GROUP);
create index IX_5FEABBC on <API key> (TRIGGER_NAME);
create index IX_20D8706C on <API key> (TRIGGER_NAME, TRIGGER_GROUP);
|
(function() {
"use strict";
var sig = "Check params: function ntil(checker, performer, success, failure, opts)";
function chain(checker, opts) {
this.opts = function(options) { opts = options; return this }
this.exec = function(perform) { this.perform = perform; return this };
this.done = function(success) { this.success = success; return this };
this.fail = function(failure) { this.failure = failure; return this };
this.func = function() {
return ntil(checker, this.perform, this.success, this.failure, opts);
};
}
function ntil(checker, performer, success, failure, opts) {
opts = opts || {};
if (typeof checker !== 'function') throw sig;
if (typeof performer !== 'function') return new chain(checker, performer);
var name = opts.name || performer.name || 'anonymous function',
logger = opts.logger,
waitSecs = opts.waitSecs || 1,
waitMult = opts.waitMult || 2,
maxCalls = opts.maxCalls || 7; // it takes about a minute for 7 attempts
return function() {
var args = Array.prototype.slice.call(arguments, 0),
wait = waitSecs,
calls = 0;
function next() {
var result = Array.prototype.slice.call(arguments, 0);
if (checker.apply(checker, result) === true) {
if (logger) logger.info(name + ': success');
if (typeof success === 'function') success.apply(success, result);
} else {
calls++;
if (calls < maxCalls) {
if (logger) logger.warn(name + ': ' + calls + ' failure' + (calls === 1 ? '' : 's') + ' - trying again in ' + wait + ' seconds');
setTimeout(function() {
invoke();
}, wait * 1000);
wait *= waitMult;
} else {
if (logger) logger.warn(name + ': too many failures (' + calls + ')');
if (typeof failure === 'function') failure.apply(failure, result);
}
}
}
function invoke() {
try {
performer.apply(performer, args);
} catch (e) {
if (logger) logger.warn(name + ': exception "' + e + '"');
next();
}
}
args.push(next);
invoke();
}
}
if (typeof module !== 'undefined' && module.exports) {
module.exports = ntil;
} else { // browser?
this.ntil = ntil;
}
}).call(this);
|
<?php
use yii\bootstrap\ActiveForm;
use yii\helpers\Html;
use yii\grid\GridView;
use yii\helpers\Url;
use app\models\Ticket;
$this->params['breadcrumbs'][] = ['label' => Yii::t('app','ticket list'), 'url' => ['
$this->params['addUrl'] = 'ticket/new';
?>
<div class="row">
<div class="col-lg-12">
<!-- START YOUR CONTENT HERE -->
<div class="portlet"><!-- /Portlet -->
<div class="portlet-heading dark">
<div class="portlet-title">
<h4><i class="fa fa-newspaper-o"></i> <?=Yii::t("app","my ticket") ?></h4>
</div>
<div class="portlet-widgets">
<a data-toggle="collapse" data-parent="#accordion" href="#basic"><i class="fa fa-chevron-down"></i></a>
<span class="divider"></span>
<a href="#" class="box-close"><i class="fa fa-times"></i></a>
</div>
<div class="clearfix"></div>
</div>
<div id="basic" class="panel-collapse collapse in">
<div class="portlet-body">
<div class="row">
<div class="log-lg-12">
<?=Yii::$app->session->getFlash("message")?>
</div>
<div class="col-lg-12">
<?=GridView::widget( [
'dataProvider' => $dataProvider,
//'filterModel' => $model,
'tableOptions' => ['class'=>'table table-bordered table-hover tc-table table-responsive'],
'layout' => '<div class="hidden-sm hidden-xs hidden-md">{summary}</div>{errors}{items}<div class="pagination pull-right">{pager}</div> <div class="clearfix"></div>',
'columns'=>[
['class' => 'yii\grid\SerialColumn'],
'ticket_id' => [
'attribute' => 'ticket_id',
'footer' => Yii::t('app','id'),
'headerOptions' => ['class'=>'hidden-xs hidden-sm'],
'contentOptions'=> ['class'=>'hidden-xs hidden-sm'],
'footerOptions' => ['class'=>'hidden-xs hidden-sm'],
],
'ticket_date' => [
'attribute' => 'ticket_date',
'footer' => Yii::t('app','date'),
],
'ticket_subject' => [
'attribute' => 'ticket_subject',
'footer' => Yii::t('app','subject'),
],
'<API key>' => [
'attribute' => '<API key>',
'footer' => Yii::t('app','status'),
'headerOptions' => ['class'=>'hidden-xs hidden-sm'],
'contentOptions'=> ['class'=>'hidden-xs hidden-sm'],
'footerOptions' => ['class'=>'hidden-xs hidden-sm'],
],
'helpdesk_name' => [
'attribute' => 'helpdesk_name',
'footer' => Yii::t('app','support'),
],
],
'showFooter' => true ,
] );?>
</div>
</div>
</div>
</div>
</div><!--/Portlet -->
</div> <!-- Enf of col lg-->
</div> <!-- ENd of row -->
<script>
//for tables checkbox dem
jQuery(function($) {
$('.input-group.date').datepicker({
autoclose : true,
format: "dd/mm/yyyy"
});
$('table th input:checkbox').on('click' , function(){
var that = this;
$(this).closest('table').find('tr > td:first-child input:checkbox')
.each(function(){
this.checked = that.checked;
$(this).closest('tr').toggleClass('selected');
});
});
$('.btn-pwd').click(function (e) {
if (!confirm('<?=Yii::t('app/message','msg btn password')?>')) return false;
return true;
});
$('.btn-delete').click(function (e) {
if (!confirm('<?=Yii::t('app/message','msg btn delete')?>')) return false;
return true;
});
});
</script>
|
#include <errno.h>
#include <netinet/in.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdio.h>
#define SOL_LOG_DOMAIN &<API key>
#include "cbor.h"
#include "sol-coap.h"
#include "sol-json.h"
#include "sol-log-internal.h"
#include "sol-platform.h"
#include "sol-str-slice.h"
#include "sol-util.h"
#include "sol-vector.h"
#include "sol-oic-cbor.h"
#include "sol-oic-common.h"
#include "sol-oic-server.h"
<API key>(<API key>, "oic-server");
struct sol_oic_server {
struct sol_coap_server *server;
struct sol_coap_server *dtls_server;
struct sol_vector resources;
struct <API key> *information;
int refcnt;
};
struct <API key> {
struct sol_coap_resource *coap;
char *href;
char *rt;
char *iface;
enum <API key> flags;
struct {
struct {
<API key> (*handle)(const struct <API key> *cliaddr,
const void *data, const struct sol_vector *input,
struct sol_vector *output);
} get, put, post, delete;
const void *data;
} callback;
};
static struct sol_oic_server oic_server;
#define OIC_SERVER_CHECK(ret) \
do { \
if (oic_server.refcnt == 0) { \
SOL_WRN("OIC API used before initialization"); \
return ret; \
} \
} while (0)
#define <API key> 5683
#define <API key> 5684
static int
_sol_oic_server_d(struct sol_coap_server *server,
const struct sol_coap_resource *resource, struct sol_coap_packet *req,
const struct <API key> *cliaddr, void *data)
{
const uint8_t format_cbor = <API key>;
CborEncoder encoder, root, map, rep_map;
CborError err;
struct sol_coap_packet *response;
const char *os_version;
uint8_t *payload;
uint16_t size;
OIC_SERVER_CHECK(-ENOTCONN);
response = sol_coap_packet_new(req);
SOL_NULL_CHECK(response, -ENOMEM);
sol_coap_add_option(response, <API key>, &format_cbor, sizeof(format_cbor));
if (<API key>(response, &payload, &size) < 0) {
SOL_WRN("Couldn't obtain payload from CoAP packet");
goto out;
}
cbor_encoder_init(&encoder, payload, size, 0);
err = <API key>(&encoder, &root, 2);
err |= cbor_encode_uint(&root, <API key>);
err |= <API key>(&root, &map, <API key>);
err |= <API key>(&map, SOL_OIC_KEY_HREF);
err |= <API key>(&map, "/oic/d");
err |= <API key>(&map, &rep_map, <API key>);
#define APPEND_KEY_VALUE(k, v) \
do { \
err |= <API key>(&rep_map, k); \
err |= <API key>(&rep_map, \
oic_server.information->v.data, oic_server.information->v.len); \
} while (0)
APPEND_KEY_VALUE(<API key>, manufacturer_name);
APPEND_KEY_VALUE(<API key>, manufacturer_url);
APPEND_KEY_VALUE(<API key>, model_number);
APPEND_KEY_VALUE(<API key>, manufacture_date);
APPEND_KEY_VALUE(<API key>, platform_version);
APPEND_KEY_VALUE(SOL_OIC_KEY_HW_VER, hardware_version);
APPEND_KEY_VALUE(<API key>, firmware_version);
APPEND_KEY_VALUE(<API key>, support_url);
#undef APPEND_KEY_VALUE
err |= <API key>(&rep_map, <API key>);
err |= <API key>(&rep_map,
(const uint8_t *)oic_server.information->platform_id.data,
oic_server.information->platform_id.len);
err |= <API key>(&rep_map, <API key>);
err |= <API key>(&rep_map, "");
err |= <API key>(&rep_map, SOL_OIC_KEY_OS_VER);
os_version = <API key>();
err |= <API key>(&rep_map, os_version ? os_version : "Unknown");
err |= <API key>(&rep_map, &map);
err |= <API key>(&map, &root);
err |= <API key>(&encoder, &root);
if (err == CborNoError) {
<API key>(response, SOL_COAP_TYPE_ACK);
<API key>(response, SOL_COAP_RSPCODE_OK);
<API key>(response, encoder.ptr - payload);
return <API key>(server, response, cliaddr);
}
SOL_WRN("Error encoding platform CBOR response: %s",
cbor_error_string(err));
out:
<API key>(response);
return -ENOMEM;
}
static const struct sol_coap_resource oic_d_coap_resource = {
SOL_SET_API_VERSION(.api_version = <API key>, )
.path = {
<API key>("oic"),
<API key>("d"),
SOL_STR_SLICE_EMPTY
},
.get = _sol_oic_server_d,
.flags = SOL_COAP_FLAGS_NONE
};
static unsigned int
as_nibble(const char c)
{
if (c >= '0' && c <= '9')
return c - '0';
if (c >= 'a' && c <= 'f')
return c - 'a' + 10;
if (c >= 'A' && c <= 'F')
return c - 'A' + 10;
SOL_WRN("Invalid hex character: %d", c);
return 0;
}
static const uint8_t *
get_machine_id(void)
{
static uint8_t machine_id[16] = { 0 };
static bool machine_id_set = false;
const char *machine_id_buf;
if (unlikely(!machine_id_set)) {
machine_id_buf = <API key>();
if (!machine_id_buf) {
SOL_WRN("Could not get machine ID");
memset(machine_id, 0xFF, sizeof(machine_id));
} else {
const char *p;
size_t i;
for (p = machine_id_buf, i = 0; i < 16; i++, p += 2)
machine_id[i] = as_nibble(*p) << 4 | as_nibble(*(p + 1));
}
machine_id_set = true;
}
return machine_id;
}
static int
_sol_oic_server_res(struct sol_coap_server *server,
const struct sol_coap_resource *resource, struct sol_coap_packet *req,
const struct <API key> *cliaddr, void *data)
{
CborEncoder encoder, array;
CborError err;
struct <API key> *iter;
struct sol_coap_packet *resp;
uint16_t size;
const uint8_t format_cbor = <API key>;
uint8_t *payload;
uint16_t idx;
const uint8_t *uri_query;
uint16_t uri_query_len;
uri_query = <API key>(req, <API key>, &uri_query_len);
if (uri_query && uri_query_len > sizeof("rt=") - 1) {
uri_query += sizeof("rt=") - 1;
uri_query_len -= 3;
} else {
uri_query = NULL;
uri_query_len = 0;
}
resp = sol_coap_packet_new(req);
SOL_NULL_CHECK(resp, -ENOMEM);
<API key>(resp, SOL_COAP_TYPE_ACK);
sol_coap_add_option(resp, <API key>, &format_cbor, sizeof(format_cbor));
<API key>(resp, &payload, &size);
cbor_encoder_init(&encoder, payload, size, 0);
if (uri_query) {
err = <API key>(&encoder, &array, <API key>);
} else {
err = <API key>(&encoder, &array, 1 + oic_server.resources.len);
}
err |= cbor_encode_uint(&array, <API key>);
<API key> (&oic_server.resources, iter, idx) {
CborEncoder map, prop_map, policy_map;
if (uri_query && iter->rt) {
size_t rt_len = strlen(iter->rt);
if (rt_len != uri_query_len)
continue;
if (memcmp(uri_query, iter->rt, rt_len) != 0)
continue;
}
if (!(iter->flags & <API key>))
continue;
if (!(iter->flags & SOL_OIC_FLAG_ACTIVE))
continue;
err |= <API key>(&array, &map, 3);
err |= <API key>(&map, SOL_OIC_KEY_HREF);
err |= <API key>(&map, iter->href);
err |= <API key>(&map, <API key>);
err |= <API key>(&map, get_machine_id(), 16);
err |= <API key>(&map, <API key>);
err |= <API key>(&map, &prop_map, !!iter->iface + !!iter->rt + 1);
if (iter->iface) {
CborEncoder if_array;
err |= <API key>(&prop_map, <API key>);
err |= <API key>(&prop_map, &if_array, 1);
err |= <API key>(&if_array, iter->iface);
err |= <API key>(&prop_map, &if_array);
}
if (iter->rt) {
CborEncoder rt_array;
err |= <API key>(&prop_map, <API key>);
err |= <API key>(&prop_map, &rt_array, 1);
err |= <API key>(&rt_array, iter->rt);
err |= <API key>(&prop_map, &rt_array);
}
err |= <API key>(&prop_map, SOL_OIC_KEY_POLICY);
err |= <API key>(&prop_map, &policy_map, <API key>);
err |= <API key>(&policy_map, SOL_OIC_KEY_BITMAP);
err |= cbor_encode_uint(&policy_map, iter->flags);
err |= <API key>(&prop_map, &policy_map);
err |= <API key>(&map, &prop_map);
err |= <API key>(&array, &map);
}
err |= <API key>(&encoder, &array);
if (err != CborNoError) {
char addr[<API key>];
<API key>(cliaddr, addr, sizeof(addr));
SOL_WRN("Error building response for /oc/core, server %p client %s: %s",
oic_server.server, addr, cbor_error_string(err));
<API key>(resp, <API key>);
} else {
<API key>(resp, SOL_COAP_RSPCODE_OK);
<API key>(resp, encoder.ptr - payload);
}
return <API key>(server, resp, cliaddr);
}
static const struct sol_coap_resource <API key> = {
SOL_SET_API_VERSION(.api_version = <API key>, )
.path = {
<API key>("oic"),
<API key>("res"),
SOL_STR_SLICE_EMPTY
},
.get = _sol_oic_server_res,
.flags = SOL_COAP_FLAGS_NONE
};
static struct <API key> *
init_static_info(void)
{
struct <API key> information = {
.manufacturer_name = <API key>(<API key>),
.manufacturer_url = <API key>(<API key>),
.model_number = <API key>(OIC_MODEL_NUMBER),
.manufacture_date = <API key>(<API key>),
.platform_version = <API key>(<API key>),
.hardware_version = <API key>(<API key>),
.firmware_version = <API key>(<API key>),
.support_url = <API key>(OIC_SUPPORT_URL)
};
struct <API key> *info;
information.platform_id = SOL_STR_SLICE_STR((const char *)get_machine_id(), 16);
info = sol_util_memdup(&information, sizeof(*info));
SOL_NULL_CHECK(info, NULL);
return info;
}
SOL_API int
sol_oic_server_init(void)
{
struct <API key> *info;
if (oic_server.refcnt > 0) {
oic_server.refcnt++;
return 0;
}
<API key>;
info = init_static_info();
SOL_NULL_CHECK(info, -1);
oic_server.server = sol_coap_server_new(<API key>);
if (!oic_server.server)
goto error;
if (!<API key>(oic_server.server, &oic_d_coap_resource, NULL))
goto error;
if (!<API key>(oic_server.server, &<API key>, NULL)) {
<API key>(oic_server.server, &oic_d_coap_resource);
goto error;
}
oic_server.dtls_server = <API key>(<API key>);
if (!oic_server.dtls_server) {
if (errno == ENOSYS) {
SOL_INF("DTLS support not built in, OIC server running in insecure mode");
} else {
SOL_INF("DTLS server could not be created for OIC server: %s",
sol_util_strerrora(errno));
}
} else {
if (!<API key>(oic_server.dtls_server, &oic_d_coap_resource, NULL)) {
SOL_WRN("Could not register device info secure resource, OIC server running in insecure mode");
<API key>(oic_server.dtls_server);
oic_server.dtls_server = NULL;
}
}
oic_server.information = info;
sol_vector_init(&oic_server.resources, sizeof(struct <API key>));
oic_server.refcnt++;
return 0;
error:
free(info);
return -1;
}
SOL_API void
<API key>(void)
{
struct <API key> *res;
uint16_t idx;
OIC_SERVER_CHECK();
if (--oic_server.refcnt > 0)
return;
<API key> (&oic_server.resources, res, idx)
<API key>(oic_server.server, res->coap);
if (oic_server.dtls_server) {
<API key> (&oic_server.resources, res, idx)
<API key>(oic_server.dtls_server, res->coap);
<API key>(oic_server.dtls_server, &oic_d_coap_resource);
<API key>(oic_server.dtls_server);
}
sol_vector_clear(&oic_server.resources);
<API key>(oic_server.server, &oic_d_coap_resource);
<API key>(oic_server.server, &<API key>);
<API key>(oic_server.server);
free(oic_server.information);
}
static void
_clear_repr_vector(struct sol_vector *repr)
{
struct sol_oic_repr_field *field;
uint16_t idx;
<API key> (repr, field, idx) {
if (field->type == <API key> ||
field->type == <API key>) {
free((char *)field->v_slice.data);
}
}
sol_vector_clear(repr);
}
static int
<API key>(
<API key> (*handle_fn)(const struct <API key> *cliaddr, const void *data,
const struct sol_vector *input, struct sol_vector *output),
struct sol_coap_server *server, struct sol_coap_packet *req,
const struct <API key> *cliaddr,
struct <API key> *res, bool expect_payload)
{
const uint8_t format_cbor = <API key>;
struct sol_coap_packet *response;
struct sol_vector input = SOL_VECTOR_INIT(struct sol_oic_repr_field);
struct sol_vector output = SOL_VECTOR_INIT(struct sol_oic_repr_field);
<API key> code = <API key>;
OIC_SERVER_CHECK(-ENOTCONN);
response = sol_coap_packet_new(req);
if (!response) {
SOL_WRN("Could not build response packet.");
return -1;
}
if (!handle_fn) {
code = <API key>;
goto done;
}
if (expect_payload) {
if (!<API key>(req)) {
code = <API key>;
goto done;
}
if (<API key>(req, &input) != CborNoError) {
code = <API key>;
goto done;
}
}
code = handle_fn(cliaddr, res->callback.data, &input, &output);
if (code == <API key>) {
sol_coap_add_option(response, <API key>, &format_cbor, sizeof(format_cbor));
if (<API key>(response, res->href, &output) != CborNoError)
code = <API key>;
}
done:
<API key>(response, SOL_COAP_TYPE_ACK);
<API key>(response,
code == <API key> ? SOL_COAP_RSPCODE_OK : code);
_clear_repr_vector(&input);
/* Output vector is user-built, so it's not safe to call
* _clear_repr_vector() on it. Clean the vector itself, but not its
* items.*/
sol_vector_clear(&output);
return <API key>(server, response, cliaddr);
}
#define <API key>(method, expect_payload) \
static int \
<API key> ## method(struct sol_coap_server *server, \
const struct sol_coap_resource *resource, struct sol_coap_packet *req, \
const struct <API key> *cliaddr, void *data) \
{ \
struct <API key> *res = data; \
return <API key>(res->callback.method.handle, \
server, req, cliaddr, res, expect_payload); \
}
<API key>(get, false)
<API key>(put, true)
<API key>(post, true)
<API key>(delete, true)
#undef <API key>
static struct sol_coap_resource *
<API key>(struct <API key> *resource)
{
const struct sol_str_slice endpoint = <API key>(resource->href);
struct sol_coap_resource *res;
unsigned int count = 0;
unsigned int current;
size_t i;
for (i = 0; i < endpoint.len; i++)
if (endpoint.data[i] == '/')
count++;
SOL_INT_CHECK(count, == 0, NULL);
if (endpoint.data[0] != '/') {
SOL_WRN("Invalid endpoint - Path '%.*s' does not start with '/'", SOL_STR_SLICE_PRINT(endpoint));
return NULL;
}
if (endpoint.data[endpoint.len - 1] == '/') {
SOL_WRN("Invalid endpoint - Path '%.*s' ends with '/'", SOL_STR_SLICE_PRINT(endpoint));
return NULL;
}
/* alloc space for the path plus empty slice at the end */
res = calloc(1, sizeof(struct sol_coap_resource) + (count + 1) * sizeof(struct sol_str_slice));
SOL_NULL_CHECK(res, NULL);
SOL_SET_API_VERSION(res->api_version = <API key>; )
res->path[0].data = &endpoint.data[1];
for (i = 1, current = 0; i < endpoint.len; i++) {
if (endpoint.data[i] == '/')
res->path[++current].data = &endpoint.data[i + 1];
else
res->path[current].len++;
}
res->get = <API key>;
res->put = <API key>;
res->post = <API key>;
res->delete = <API key>;
if (resource->flags & <API key>)
res->flags |= <API key>;
if (oic_server.dtls_server)
resource->flags |= SOL_OIC_FLAG_SECURE;
res->iface = <API key>(resource->iface);
res->resource_type = <API key>(resource->rt);
return res;
}
static char *
create_endpoint(void)
{
static unsigned int id = 0;
char *buffer = NULL;
int r;
r = asprintf(&buffer, "/sol/%x", id++);
return r < 0 ? NULL : buffer;
}
SOL_API struct <API key> *
<API key>(const struct <API key> *rt,
const void *handler_data, enum <API key> flags)
{
struct <API key> *res;
OIC_SERVER_CHECK(NULL);
SOL_NULL_CHECK(rt, NULL);
#ifndef SOL_NO_API_VERSION
if (unlikely(rt->api_version != <API key>)) {
SOL_WRN("Couldn't add resource_type with "
"version '%u'. Expected version '%u'.",
rt->api_version, <API key>);
return NULL;
}
#endif
res = sol_vector_append(&oic_server.resources);
SOL_NULL_CHECK(res, NULL);
res->callback.data = handler_data;
res->callback.get.handle = rt->get.handle;
res->callback.put.handle = rt->put.handle;
res->callback.post.handle = rt->post.handle;
res->callback.delete.handle = rt->delete.handle;
res->flags = flags;
res->rt = strndup(rt->resource_type.data, rt->resource_type.len);
SOL_NULL_CHECK_GOTO(res->rt, remove_res);
res->iface = strndup(rt->interface.data, rt->interface.len);
SOL_NULL_CHECK_GOTO(res->iface, free_rt);
res->href = create_endpoint();
SOL_NULL_CHECK_GOTO(res->href, free_iface);
res->coap = <API key>(res);
SOL_NULL_CHECK_GOTO(res->coap, free_coap);
if (!<API key>(oic_server.server, res->coap, res))
goto free_coap;
if (oic_server.dtls_server) {
if (!<API key>(oic_server.dtls_server, res->coap, res)) {
SOL_WRN("Could not register resource in DTLS server");
goto unregister_resource;
}
}
return res;
unregister_resource:
<API key>(oic_server.server, res->coap);
free_coap:
free(res->coap);
free_iface:
free(res->iface);
free_rt:
free(res->rt);
remove_res:
sol_vector_del(&oic_server.resources, oic_server.resources.len - 1);
return NULL;
}
SOL_API void
<API key>(struct <API key> *resource)
{
struct <API key> *iter;
uint16_t idx;
OIC_SERVER_CHECK();
SOL_NULL_CHECK(resource);
<API key>(oic_server.server, resource->coap);
if (oic_server.dtls_server)
<API key>(oic_server.dtls_server, resource->coap);
free(resource->coap);
free(resource->href);
free(resource->iface);
free(resource->rt);
<API key> (&oic_server.resources, iter, idx) {
if (iter == resource) {
sol_vector_del(&oic_server.resources, idx);
return;
}
}
SOL_ERR("Could not find resource %p in OIC server resource list",
resource);
}
static bool
<API key>(struct <API key> *resource,
const struct sol_vector *fields, struct sol_coap_server *server)
{
const uint8_t format_cbor = <API key>;
struct sol_coap_packet *pkt;
pkt = <API key>(oic_server.server, resource->coap);
SOL_NULL_CHECK(pkt, false);
sol_coap_add_option(pkt, <API key>, &format_cbor, sizeof(format_cbor));
if (<API key>(pkt, resource->href, fields) != CborNoError) {
<API key>(pkt, <API key>);
} else {
<API key>(pkt, SOL_COAP_RSPCODE_OK);
}
<API key>(pkt, SOL_COAP_TYPE_ACK);
return !<API key>(oic_server.server, resource->coap, pkt);
}
SOL_API bool
<API key>(struct <API key> *resource,
const struct sol_vector *fields)
{
bool sent_server = false;
bool sent_dtls_server = false;
SOL_NULL_CHECK(resource, false);
sent_server = <API key>(resource, fields, oic_server.server);
if (oic_server.dtls_server)
sent_dtls_server = <API key>(resource, fields, oic_server.dtls_server);
return sent_server || sent_dtls_server;
}
|
<?php
use yii\helpers\Html;
/* @var $this yii\web\View */
/* @var $model app\models\Category */
$this->title = 'Update Consultant Category: ' . ' ' . $model->category;
$this->params['breadcrumbs'][] = ['label' => 'Categories', 'url' => ['index']];
$this->params['breadcrumbs'][] = ['label' => $model->category, 'url' => ['view', 'id' => $model->categoryid]];
$this->params['breadcrumbs'][] = 'Update';
?>
<div class="category-update">
<h1><?= Html::encode($this->title) ?></h1>
<?= $this->render('_form', [
'model' => $model,
]) ?>
</div>
|
*//*
/*!
\file cmdtextfield.h
\date Dec 2011
\author TNick
\brief Contains the definition for CmdTextField class
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please read COPYING and README files in root folder
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
#ifndef <API key>
#define <API key>
#include <QPlainTextEdit>
#include <QLabel>
#include <QStringList>
namespace Gui {
/**
* @brief class representing a plain text control that interprets commands
*/
class CmdTextField :public QPlainTextEdit {
Q_OBJECT
private:
/**
* @brief associated log panel
*/
QPlainTextEdit * tx_Log;
/**
* @brief the label shown in front of text
*/
QLabel * lbl_;
/**
* @brief previously inputted text
*/
QStringList tx_prev_;
/**
* @brief index of previously inputted text
*/
int prev_idx_;
public:
/**
* @brief constructor;
*/
CmdTextField ( QWidget * parent = 0 );
/**
* @brief constructor;
*/
CmdTextField ( QPlainTextEdit * log_target, QWidget * parent = 0 );
/**
* @brief destructor;
*/
virtual ~CmdTextField ( void );
/**
* @brief get
*/
inline QPlainTextEdit * assocLog ( void )
{ return tx_Log; }
/**
* @brief set
*/
inline void setAssocLog ( QPlainTextEdit * new_val )
{ tx_Log = new_val; }
/**
* @brief change the text displayied at the left of the input box
*/
void setLabelText (
const QString & new_val = QString()
);
protected:
/**
* @brief filter the keys
*/
void keyPressEvent ( QKeyEvent *e );
/**
* @brief helps us keep the label in place
*/
void resizeEvent ( QResizeEvent * );
private:
/**
* @brief common initialisation to all constructors
*/
void init ( void );
/**
* @brief append a new string to the list
*/
void appendCommand ( const QString & s_in );
/**
* @brief get previously entered string at index i
*/
QString previousCommand ( int i = 0 );
}; /* class CmdTextField */
} // namespace Gui
#endif // <API key>
|
#ifndef FASTJSON_DOM_H
#define FASTJSON_DOM_H
#include "fastjson/core.h"
#include "fastjson/utils.h"
#include "fastjson/error.h"
//TODO: Ugly that we need this.. can we remove it later?
#include <vector>
#include <sstream>
#include <string.h>
namespace fastjson { namespace dom {
//Requires the DATA type to have a next pointer to DATA
//We hijack that pointer for use in the free list.
template<typename DATA>
class Pager
{
public:
Pager() : free_ptr(NULL), data(), available_count_(0)
{
}
~Pager()
{
for(unsigned int i=0; i<data.size(); ++i)
{
delete [] data[i];
}
}
uint32_t n_available() const { return available_count_; }
void create_and_add_page(uint32_t n)
{
DATA * new_page = new DATA[n];
for(unsigned int i=0; i<n; ++i)
{
new_page[i].next = free_ptr;
free_ptr = new_page + i;
}
data.push_back(new_page);
available_count_+=n;
}
//We dont really use N - but if we ever track in-use entries too we'll need it
void add_used_page( DATA * page, uint32_t )
{
data.push_back(page);
}
DATA * create_value()
{
if(available_count_==0)
{
//TODO: This should not be hardcoded to 10...
create_and_add_page(10);
}
available_count_
DATA * value = free_ptr;
free_ptr = value->next;
value->next = NULL;
return value;
}
void destroy( DATA * a )
{
available_count_++;
a->next = free_ptr;
free_ptr = a;
}
protected:
DATA * free_ptr;
std::vector< DATA* > data;
uint32_t available_count_;
};
//NOTE: These dont clean up the strings... you need to do that your self.
// For us the chunk handles that.
struct StringBuffer
{
public:
explicit StringBuffer(unsigned int N )
{
buf_ = new char[N];
size_ = N;
inuse_ = 0;
}
struct in_use {} ;
StringBuffer( char * buffer, unsigned int N, in_use )
{
buf_ = buffer;
size_ = N;
inuse_ = N;
}
unsigned int available() const { return size_ - inuse_; }
char * write( const char * s, unsigned int len )
{
char * start = buf_ + inuse_;
memcpy( start, s, len );
inuse_ += len;
return start;
}
void destroy() { delete [] buf_; buf_=NULL;}
protected:
char * buf_;
unsigned int size_;
unsigned int inuse_;
};
// The idea behind a document is that it can maintain free lists of the unused elements.
// It can allocate more memory as required,
// It can be merged into another document (merging the free lists correctly).
class Chunk
{
public:
Chunk() : arrays_(), dicts_(), strings_() {}
~Chunk()
{
for(unsigned int i=0; i<strings_.size(); ++i)
{
strings_[i].destroy();
}
}
//TODO: Shift this into an object containing the StringBuffers?
char * create_raw_buffer( const char * b, unsigned int space_required )
{
unsigned int i=0;
for(i=0; i<strings_.size(); ++i)
{
if ( strings_[i].available() >= space_required )
{
return strings_[i].write( b, space_required );
}
}
//Should use a minimum for this so that we get less fragmentation?
strings_.push_back( StringBuffer( space_required ) );
return strings_.back().write( b, space_required );
}
void add_array_page( ArrayEntry * entries, unsigned int N )
{
arrays_.add_used_page(entries, N);
}
void add_dict_page( DictEntry * entries, unsigned int N )
{
dicts_.add_used_page(entries, N);
}
void add_string_page( char * buffer, unsigned int L )
{
strings_.push_back( StringBuffer(buffer,L, StringBuffer::in_use() ) );
}
Pager<ArrayEntry>& arrays() { return arrays_; }
Pager<DictEntry>& dicts() { return dicts_; }
std::vector<StringBuffer>& strings() { return strings_; }
protected:
Pager<ArrayEntry> arrays_;
Pager<DictEntry> dicts_;
std::vector<StringBuffer> strings_;
};
class Value
{
public:
static Value as_value( Token * tok, Chunk * chunk )
{
Value retval;
assert(tok->type==Token::ValueToken);
retval.tok_ = tok;
retval.chunk_ = chunk;
}
static Value create_value( Token * tok, Chunk * chunk )
{
//Assumes that whatever was there has been cleaned up
Value retval;
tok->type = Token::ValueToken;
tok->dict.ptr = NULL;
retval.tok_ = tok;
retval.chunk_ = chunk;
return retval;
}
template<typename T, typename W>
bool set_numeric( const W & value )
{
tok_->value.type_hint = ValueType::NumberHint;
std::stringstream ss;
ss<<value;
std::string s = ss.str();
//Now allocate enough space for it.
tok_->value.ptr = chunk_->create_raw_buffer( s.c_str(), s.size() );
tok_->value.size = s.size();
return true;
}
template<typename T, typename W>
bool set_string( const W & value )
{
tok_->value.type_hint = ValueType::StringHint;
std::stringstream ss;
ss<<value;
std::string s = ss.str();
//Now allocate enough space for it.
tok_->value.ptr = chunk_->create_raw_buffer( s.c_str(), s.size() );
tok_->value.size = s.size();
return true;
}
void set_raw_string( const std::string & s )
{
tok_->value.type_hint = ValueType::StringHint;
tok_->value.ptr = chunk_->create_raw_buffer( s.c_str(), s.size() );
tok_->value.size = s.size();
}
void set_raw_cstring( const char * cstr )
{
tok_->value.type_hint = ValueType::StringHint;
size_t len = strlen(cstr);
tok_->value.ptr = chunk_->create_raw_buffer( cstr, len );
tok_->value.size = len;
}
const Token * token() const
{
return tok_;
}
protected:
Value() : tok_(NULL), chunk_(NULL)
{
}
Token * tok_;
Chunk * chunk_;
};
template<typename T>
struct json_helper;
template<>
struct json_helper<std::string>
{
static bool build( Token * tok, Chunk * chunk, const std::string & value )
{
Value v = Value::create_value(tok,chunk);
v.set_raw_string( value );
return true;
}
static bool from_json_value( const Token * tok, std::string * s )
{
if(!tok || tok->type!=Token::ValueToken ) return false;
if(tok->value.ptr) { *s = std::string( tok->value.ptr, tok->value.size); return true; }
*s = "";
return true;
}
};
template<typename T>
struct <API key>
{
static bool build( Token * tok, Chunk * chunk, T value )
{
Value v = Value::create_value(tok,chunk);
v.set_numeric<T>(value);
return true;
}
static bool from_json_value( const Token * tok, T * v )
{
if(!tok || tok->type!=Token::ValueToken ) return false;
if( ! tok->value.ptr ) { *v = 0; }
return utils::try_convert<T>( tok->value.ptr, tok->value.size, v );
}
};
template<> struct json_helper<int> : public <API key><int> {};
template<> struct json_helper<uint64_t> : public <API key><uint64_t> {};
template<> struct json_helper<int64_t> : public <API key><int64_t> {};
template<> struct json_helper<float> : public <API key><float> {};
template<> struct json_helper<double> : public <API key><double> {};
template<>
struct json_helper<bool>
{
static bool build( Token * tok, Chunk * /* chunk */, bool value )
{
if(value)
{
tok->type=<API key>;
}
else
{
tok->type=<API key>;
}
return true;
}
static bool from_json_value( const Token * token, bool * v )
{
if( ! token ) return false;
if( ! v ) return false;
if( token->type == <API key> ) { *v = true; return true; }
if( token->type == <API key> ) { *v = false; return true; }
//Lets be lenient in what we accept .. a 0 is false and a 1 is true (same for "0" and "1").
if( (token->type == Token::ValueToken) && (token->value.size==1) )
{
if( token->value.ptr[0] == '0' ) { *v = false; return true; }
if( token->value.ptr[0] == '1' ) { *v = true; return true; }
}
return false;
}
};
class Dictionary
{
public:
static Dictionary as_dict( Token * tok, Chunk * chunk )
{
Dictionary retval;
assert(tok->type==Token::DictToken);
DictEntry * d = tok->dict.ptr;
DictEntry * end = NULL;
//Get the real end...
while(d)
{
end = d;
d = d->next;
}
retval.tok_ = tok;
retval.chunk_ = chunk;
retval.end_ = end;
return retval;
}
static Dictionary create_dict( Token * tok, Chunk * chunk )
{
//Assumes that whatever was there has been cleaned up
Dictionary retval;
tok->type = Token::DictToken;
tok->dict.ptr = NULL;
retval.tok_ = tok;
retval.chunk_ = chunk;
retval.end_ = NULL;
return retval;
}
template<typename T, typename W>
bool add( const std::string & key, const W & value )
{
Token tok;
if( ! json_helper<T>::build( &tok, chunk_, value ) )
{
return false;
}
return add_token(key,tok);
}
bool add_token( const std::string & key, const Token & tok )
{
DictEntry * dv = chunk_->dicts().create_value();
dv->next = NULL;
Value key_v = Value::create_value( &dv->key_tok, chunk_ );
key_v.set_raw_string(key);
dv->value_tok = tok;
if( end_ )
{
end_->next = dv;
}
else
{
tok_->dict.ptr = dv;
}
end_ = dv;
return true;
}
DictEntry * add_child_raw()
{
DictEntry * dv = chunk_->dicts().create_value();
dv->next = NULL;
if( end_ )
{
end_->next = dv;
}
else
{
tok_->dict.ptr = dv;
}
end_ = dv;
return dv;
}
DictEntry * add_child_raw( const std::string & key )
{
DictEntry * dv = chunk_->dicts().create_value();
Value key_v = Value::create_value( &dv->key_tok, chunk_ );
key_v.set_raw_string(key);
dv->next = NULL;
if( end_ )
{
end_->next = dv;
}
else
{
tok_->dict.ptr = dv;
}
end_ = dv;
return dv;
}
template<typename T>
bool get( const std::string & k, T * value )
{
DictEntry * child = tok_->dict.ptr;
while( child )
{
//Is the childs key a string value
if( child->key_tok.type == Token::ValueToken && child->key_tok.value.type_hint == ValueType::StringHint )
{
if( std::string(child->key_tok.value.ptr, child->key_tok.value.size) == k )
{
return json_helper<T>::from_json_value( &child->value_tok, value );
}
}
child = child->next;
}
return false;
}
template<typename T>
T get_default( const std::string & k, const T & default_value )
{
DictEntry * child = tok_->dict.ptr;
while( child )
{
//Is the childs key a string value
if( child->key_tok.type == Token::ValueToken && child->key_tok.value.type_hint == ValueType::StringHint )
{
if( std::string(child->key_tok.value.ptr, child->key_tok.value.size) == k )
{
T rv;
if( json_helper<T>::from_json_value( &child->value_tok, &rv ) )
{
return rv;
}
}
}
child = child->next;
}
return default_value;
}
bool has_child( const std::string & k ) const
{
DictEntry * child = tok_->dict.ptr;
while( child )
{
//Is the childs key a string value
if( child->key_tok.type == Token::ValueToken && child->key_tok.value.type_hint == ValueType::StringHint )
{
if( std::string(child->key_tok.value.ptr, child->key_tok.value.size) == k )
{
return true;
}
}
child = child->next;
}
return false;
}
bool get_raw( const std::string & k, Token * token )
{
DictEntry * child = tok_->dict.ptr;
while( child )
{
//Is the childs key a string value
if( child->key_tok.type == Token::ValueToken && child->key_tok.value.type_hint == ValueType::StringHint )
{
if( std::string(child->key_tok.value.ptr, child->key_tok.value.size) == k )
{
*token = child->value_tok;
return true;
}
}
child = child->next;
}
return false;
}
const Token * token() const
{
return tok_;
}
protected:
Dictionary() : tok_(NULL), chunk_(NULL), end_(NULL)
{
}
Token * tok_;
Chunk * chunk_;
DictEntry * end_;
};
class Dictionary_const
{
public:
static Dictionary_const as_dict( const Token * tok )
{
Dictionary_const retval;
assert(tok->type==Token::DictToken);
retval.tok_ = tok;
return retval;
}
template<typename T>
bool get( const std::string & k, T * value )
{
DictEntry * child = tok_->dict.ptr;
while( child )
{
//Is the childs key a string value
if( child->key_tok.type == Token::ValueToken && child->key_tok.value.type_hint == ValueType::StringHint )
{
if( std::string(child->key_tok.value.ptr, child->key_tok.value.size) == k )
{
return json_helper<T>::from_json_value( &child->value_tok, value );
}
}
child = child->next;
}
return false;
}
// This breaks the classes contract as someone could make changes
// to the structures pointed to by the Token, but its the only way to
// get a raw token out of these easily.
bool get_raw( const std::string & k, Token * token )
{
DictEntry * child = tok_->dict.ptr;
while( child )
{
//Is the childs key a string value
if( child->key_tok.type == Token::ValueToken && child->key_tok.value.type_hint == ValueType::StringHint )
{
if( std::string(child->key_tok.value.ptr, child->key_tok.value.size) == k )
{
*token = child->value_tok;
return true;
}
}
child = child->next;
}
return false;
}
bool has_child( const std::string & k ) const
{
DictEntry * child = tok_->dict.ptr;
while( child )
{
//Is the childs key a string value
if( child->key_tok.type == Token::ValueToken && child->key_tok.value.type_hint == ValueType::StringHint )
{
if( std::string(child->key_tok.value.ptr, child->key_tok.value.size) == k )
{
return true;
}
}
child = child->next;
}
return false;
}
const Token * token() const
{
return tok_;
}
protected:
Dictionary_const() : tok_(NULL)
{
}
const Token * tok_;
};
class Array
{
public:
static Array as_array( Token * tok, Chunk * chunk )
{
Array retval;
assert(tok->type==Token::ArrayToken);
ArrayEntry * a = tok->array.ptr;
ArrayEntry * end = NULL;
//Get the real end...
while(a)
{
end = a;
a = a->next;
}
retval.tok_ = tok;
retval.chunk_ = chunk;
retval.end_ = end;
return retval;
}
static Array create_array( Token * tok, Chunk * chunk )
{
//Assumes that whatever was there has been cleaned up
Array retval;
tok->type = Token::ArrayToken;
tok->array.ptr = NULL;
retval.tok_ = tok;
retval.chunk_ = chunk;
retval.end_ = NULL;
return retval;
}
template<typename T, typename W>
bool add( const W & value )
{
//Get the spot for the token...
ArrayEntry * array_entry = chunk_->arrays().create_value();
array_entry->next = NULL;
if( ! json_helper<T>::build( &array_entry->tok, chunk_, value ) )
{
chunk_->arrays().destroy( array_entry );
return false;
}
//Hook it int the array
if( end_ )
{
end_->next = array_entry;
}
else
{
tok_->array.ptr = array_entry;
}
end_ = array_entry;
return true;
}
ArrayEntry * add_child_raw()
{
ArrayEntry * array_entry = chunk_->arrays().create_value();
array_entry->next = NULL;
//Hook it int the array
if( end_ )
{
end_->next = array_entry;
}
else
{
tok_->array.ptr = array_entry;
}
end_ = array_entry;
return array_entry;
}
const fastjson::Token * token() const
{
return tok_;
}
size_t length() const
{
fastjson::ArrayEntry * a = tok_->array.ptr;
size_t retval = 0;
//Get the real end...
while(a)
{
++retval;
a = a->next;
}
return retval;
}
private:
Array() : tok_(NULL), chunk_(NULL), end_(NULL)
{
}
Token * tok_;
Chunk * chunk_;
ArrayEntry * end_;
};
template< typename T >
struct json_helper< std::vector<T> >
{
static bool build( Token * tok, Chunk * chunk, const std::vector<T> & v )
{
Array a = Array::create_array( tok, chunk );
for( unsigned int i=0; i<v.size(); ++i)
{
a.add<T>( v[i] );
}
return true;
}
static bool from_json_value( const Token * tok, std::vector<T> * data )
{
if(!data) return false;
if(!tok || tok->type!=Token::ArrayToken ) return false;
std::vector<T> retval;
ArrayEntry * child = tok->array.ptr;
while(child)
{
retval.push_back(T());
if(! json_helper<T>::from_json_value( &child->tok, &retval.back() ) ) return false;
child = child->next;
}
*data = retval;
return true;
}
};
bool parse_string( const std::string & s, Token * tok, Chunk * chunk, unsigned int parse_mode, UserErrorCallback user_error_callback, void * user_data );
void clone_token( const Token * in_token, Token * out_token, Chunk * chunk );
}
}
namespace fastjson { namespace util {
void set_string( Token * tok, dom::Chunk * chunk, const char * s );
} }
#endif
|
#include "xeumeuleu_test_pch.h"
#include <xeumeuleu/xml.hpp>
// Name: <API key>
// Created: MAT 2008-01-07
<API key>( <API key> )
{
xml::xistringstream xis1( "<root-1/>" );
xml::xistringstream xis2( "<root-2/>" );
xml::ximultistream xis( xis1, xis2 );
<API key>( xis >> xml::start( "root-1" ) );
}
// Name: <API key>
// Created: MAT 2008-01-07
<API key>( <API key> )
{
xml::xistringstream xis1( "<root-1/>" );
xml::xistringstream xis2( "<root-2/>" );
xml::ximultistream xis( xis1, xis2 );
<API key>( xis >> xml::start( "root-2" ) );
}
// Name: <API key>
// Created: MAT 2008-01-07
<API key>( <API key> )
{
xml::xistringstream xis1( "<root-1/>" );
xml::xistringstream xis2( "<root-2/>" );
xml::ximultistream xis( xis1, xis2 );
BOOST_CHECK_THROW( xis >> xml::start( "non-existing-node" ), xml::exception );
}
// Name: <API key>
// Created: MAT 2008-01-07
<API key>( <API key> )
{
xml::xistringstream xis1( "<root attribute='stream-1'/>" );
xml::xistringstream xis2( "<root/>" );
xml::ximultistream xis( xis1, xis2 );
xis >> xml::start( "root" );
BOOST_CHECK_EQUAL( "stream-1", xis.attribute< std::string >( "attribute" ) );
}
// Name: <API key>
// Created: MAT 2008-01-07
<API key>( <API key> )
{
xml::xistringstream xis1( "<root/>" );
xml::xistringstream xis2( "<root attribute='stream-2'/>" );
xml::ximultistream xis( xis1, xis2 );
xis >> xml::start( "root" );
BOOST_CHECK_EQUAL( "stream-2", xis.attribute< std::string >( "attribute" ) );
}
// Name: <API key>
// Created: MAT 2008-01-07
<API key>( <API key> )
{
xml::xistringstream xis1( "<root attribute='stream-1'/>" );
xml::xistringstream xis2( "<root attribute='stream-2'/>" );
xml::ximultistream xis( xis1, xis2 );
xis >> xml::start( "root" );
BOOST_CHECK_EQUAL( "stream-1", xis.attribute< std::string >( "attribute" ) );
}
// Name: <API key>
// Created: MAT 2008-01-07
<API key>( <API key> )
{
xml::xistringstream xis1( "<root/>" );
xml::xistringstream xis2( "<root/>" );
xml::ximultistream xis( xis1, xis2 );
xis >> xml::start( "root" );
BOOST_CHECK_THROW( xis.attribute< std::string >( "attribute" ), xml::exception );
}
// Name: reading_from_an_ximultistream_a_non_existing_attribute_from_existing_branch_throws
// Created: MAT 2008-01-07
<API key>( reading_from_an_ximultistream_a_non_existing_attribute_from_existing_branch_throws )
{
xml::xistringstream xis1( "<root-1/>" );
xml::xistringstream xis2( "<root-2/>" );
xml::ximultistream xis( xis1, xis2 );
xis >> xml::start( "root-1" );
BOOST_CHECK_THROW( xis.attribute< std::string >( "attribute" ), xml::exception );
}
// Name: reading_from_an_ximultistream_from_first_branch_then_second_branch_is_transparent
// Created: MAT 2008-01-07
<API key>( reading_from_an_ximultistream_from_first_branch_then_second_branch_is_transparent )
{
xml::xistringstream xis1( "<root-1 attribute-1='stream-1'/>" );
xml::xistringstream xis2( "<root-2 attribute-2='stream-2'/>" );
xml::ximultistream xis( xis1, xis2 );
std::string actual1, actual2;
xis >> xml::start( "root-1" )
>> xml::attribute( "attribute-1", actual1 )
>> xml::end
>> xml::start( "root-2" )
>> xml::attribute( "attribute-2", actual2 );
BOOST_CHECK_EQUAL( "stream-1", actual1 );
BOOST_CHECK_EQUAL( "stream-2", actual2 );
}
// Name: reading_from_an_ximultistream_from_second_branch_does_not_change_stream_precedence
// Created: MAT 2008-01-07
<API key>( reading_from_an_ximultistream_from_second_branch_does_not_change_stream_precedence )
{
xml::xistringstream xis1( "<root attribute='stream-1'/>" );
xml::xistringstream xis2( "<root attribute='stream-2'><element/></root>" );
xml::ximultistream xis( xis1, xis2 );
xis >> xml::start( "root" )
>> xml::start( "element" )
>> xml::end;
BOOST_CHECK_EQUAL( "stream-1", xis.attribute< std::string >( "attribute" ) );
}
// Name: <API key>
// Created: MAT 2008-01-07
<API key>( <API key> )
{
xml::xistringstream xis1( "<root-1 attribute='stream-1'/>" );
xml::xistringstream xis2( "<root-2 attribute='stream-2'/>" );
xml::ximultistream xis( xis1, xis2 );
{
xml::xisubstream xiss( xis );
xiss >> xml::start( "root-2" );
}
xis >> xml::start( "root-1" );
BOOST_CHECK_EQUAL( "stream-1", xis.attribute< std::string >( "attribute" ) );
}
// Name: <API key>
// Created: MAT 2008-04-25
<API key>( <API key> )
{
xml::xistringstream xis1( "<root-1 attribute='stream-1'/>" );
xml::xistringstream xis2( "<root-2 attribute='stream-2'/>" );
xml::xistringstream xis3( "<root-3 attribute='stream-3'/>" );
xml::ximultistream xims( xis1, xis2 );
xml::ximultistream xis( xims, xis3 );
std::string actual1, actual2, actual3;
xis >> xml::start( "root-1" )
>> xml::attribute( "attribute", actual1 )
>> xml::end
>> xml::start( "root-2" )
>> xml::attribute( "attribute", actual2 )
>> xml::end
>> xml::start( "root-3" )
>> xml::attribute( "attribute", actual3 );
BOOST_CHECK_EQUAL( "stream-1", actual1 );
BOOST_CHECK_EQUAL( "stream-2", actual2 );
BOOST_CHECK_EQUAL( "stream-3", actual3 );
}
// Name: <API key>
// Created: MAT 2008-11-22
<API key>( <API key> )
{
xml::xistringstream xis1( "<root/>" );
xml::xistringstream xis2( "<root/>" );
xml::ximultistream xims( xis1, xis2 );
xml::xostringstream xos;
BOOST_CHECK_THROW( xos << xims, xml::exception );
}
// Name: <API key>
// Created: MAT 2008-11-22
<API key>( <API key> )
{
xml::xistringstream xis1( "<root-1/>" );
xml::xistringstream xis2( "<root-2/>" );
xml::ximultistream xims( xis1, xis2 );
xml::xostringstream xos;
xos << xml::start( "root" )
<< xims
<< xml::end;
xml::xistringstream xis( xos.str() );
xis >> xml::start( "root" )
>> xml::start( "root-1" )
>> xml::end
>> xml::start( "root-2" );
}
// Name: <API key>
// Created: MAT 2008-05-17
<API key>( <API key> )
{
xml::xistringstream xis1( "<root-1 attribute='stream-1'/>" );
xml::xistringstream xis2( "<root-2 attribute='stream-2'/>" );
xml::ximultistream xis( xis1, xis2 );
xml::xibufferstream xibs( xis );
std::string actual1, actual2;
xibs >> xml::start( "root-1" )
>> xml::attribute( "attribute", actual1 )
>> xml::end
>> xml::start( "root-2" )
>> xml::attribute( "attribute", actual2 );
BOOST_CHECK_EQUAL( "stream-1", actual1 );
BOOST_CHECK_EQUAL( "stream-2", actual2 );
}
// Name: <API key>
// Created: MAT 2008-05-17
<API key>( <API key> )
{
xml::xistringstream xis1( "<root/>" );
xml::xistringstream xis2( "<root attribute='stream-2'/>" );
xml::ximultistream xis( xis1, xis2 );
xml::xibufferstream xibs( xis );
std::string actual = "stream-1";
xibs >> xml::start( "root" )
>> xml::optional >>xml::attribute( "attribute", actual );
BOOST_CHECK_EQUAL( "stream-2", actual );
}
// Name: <API key>
// Created: MAT 2008-05-17
<API key>( <API key> )
{
xml::xistringstream xis1( "<root/>" );
xml::xistringstream xis2( "<root/>" );
xml::ximultistream xis( xis1, xis2 );
xml::xibufferstream xibs( xis );
std::string actual = "no attribute";
xibs >> xml::start( "root" )
>> xml::optional >>xml::attribute( "attribute", actual );
BOOST_CHECK_EQUAL( "no attribute", actual );
}
// Name: an_optional_attribute_not_found_in_an_optional_sub_node_of_either_stream_is_valid
// Created: MCO 2009-05-31
<API key>( an_optional_attribute_not_found_in_an_optional_sub_node_of_either_stream_is_valid )
{
xml::xistringstream xis1( "<root>"
" <sub-node/>"
"</root>" );
xml::xistringstream xis2( "<root/>" );
xml::ximultistream xis( xis1, xis2 );
std::string attribute;
xis >> xml::start( "root" )
>> xml::optional >> xml::start( "sub-node" )
>> xml::optional >> xml::attribute( "<API key>", attribute );
}
|
package com.xoba.smr;
import java.io.PrintWriter;
import java.io.StringReader;
import java.io.StringWriter;
import java.net.URI;
import java.util.Collection;
import java.util.Formatter;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Properties;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeMap;
import java.util.TreeSet;
import org.apache.commons.codec.binary.Base64;
import com.amazonaws.Request;
import com.amazonaws.auth.AWSCredentials;
import com.amazonaws.handlers.<API key>;
import com.amazonaws.services.ec2.AmazonEC2;
import com.amazonaws.services.ec2.AmazonEC2Client;
import com.amazonaws.services.ec2.model.CreateTagsRequest;
import com.amazonaws.services.ec2.model.Instance;
import com.amazonaws.services.ec2.model.LaunchSpecification;
import com.amazonaws.services.ec2.model.<API key>;
import com.amazonaws.services.ec2.model.<API key>;
import com.amazonaws.services.ec2.model.RunInstancesRequest;
import com.amazonaws.services.ec2.model.RunInstancesResult;
import com.amazonaws.services.ec2.model.Tag;
import com.amazonaws.services.s3.AmazonS3;
import com.amazonaws.services.s3.AmazonS3Client;
import com.amazonaws.services.simpledb.AmazonSimpleDB;
import com.amazonaws.services.simpledb.<API key>;
import com.amazonaws.services.sqs.AmazonSQS;
import com.amazonaws.services.sqs.AmazonSQSClient;
import com.amazonaws.services.sqs.model.SendMessageRequest;
import com.xoba.util.ILogger;
import com.xoba.util.LogFactory;
import com.xoba.util.MraUtils;
public class SimpleMapReduce {
private static final ILogger logger = LogFactory.getDefault().create();
public static void launch(Properties config, Collection<String> inputSplitPrefixes, AmazonInstance ai,
int machineCount) throws Exception {
launch(config, inputSplitPrefixes, ai, machineCount, true);
}
public static void launch(Properties config, Collection<String> inputSplitPrefixes, AmazonInstance ai,
int machineCount, boolean spotInstances) throws Exception {
if (!config.containsKey(ConfigKey.JOB_ID.toString())) {
config.put(ConfigKey.JOB_ID.toString(), MraUtils.md5Hash(new TreeMap<Object, Object>(config).toString())
.substring(0, 8));
}
String id = config.getProperty(ConfigKey.JOB_ID.toString());
AWSCredentials aws = create(config);
AmazonSimpleDB db = new <API key>(aws);
AmazonSQS sqs = new AmazonSQSClient(aws);
AmazonS3 s3 = new AmazonS3Client(aws);
final String mapQueue = config.getProperty(ConfigKey.MAP_QUEUE.toString());
final String reduceQueue = config.getProperty(ConfigKey.REDUCE_QUEUE.toString());
final String dom = config.getProperty(ConfigKey.SIMPLEDB_DOM.toString());
final String mapInputBucket = config.getProperty(ConfigKey.MAP_INPUTS_BUCKET.toString());
final String shuffleBucket = config.getProperty(ConfigKey.SHUFFLE_BUCKET.toString());
final String reduceOutputBucket = config.getProperty(ConfigKey.<API key>.toString());
final int hashCard = new Integer(config.getProperty(ConfigKey.HASH_CARDINALITY.toString()));
s3.createBucket(reduceOutputBucket);
final long inputSplitCount = inputSplitPrefixes.size();
for (String key : inputSplitPrefixes) {
Properties p = new Properties();
p.setProperty("input", "s3://" + mapInputBucket + "/" + key);
sqs.sendMessage(new SendMessageRequest(mapQueue, serialize(p)));
}
SimpleDbCommitter.commitNewAttribute(db, dom, "parameters", "splits", "" + inputSplitCount);
SimpleDbCommitter.commitNewAttribute(db, dom, "parameters", "hashes", "" + hashCard);
SimpleDbCommitter.commitNewAttribute(db, dom, "parameters", "done", "1");
for (String hash : getAllHashes(hashCard)) {
Properties p = new Properties();
p.setProperty("input", "s3://" + shuffleBucket + "/" + hash);
sqs.sendMessage(new SendMessageRequest(reduceQueue, serialize(p)));
}
if (machineCount == 1) {
// run locally
SMRDriver.main(new String[] { MraUtils.convertToHex(serialize(config).getBytes()) });
} else if (machineCount > 1) {
// run in the cloud
String userData = produceUserData(ai, config,
new URI(config.getProperty(ConfigKey.<API key>.toString())));
logger.debugf("launching job with id %s:", id);
System.out.println(userData);
AmazonEC2 ec2 = new AmazonEC2Client(aws);
if (spotInstances) {
<API key> sir = new <API key>();
sir.setSpotPrice(new Double(ai.getPrice()).toString());
sir.setInstanceCount(machineCount);
sir.setType("one-time");
LaunchSpecification spec = new LaunchSpecification();
spec.setImageId(ai.getDefaultAMI());
spec.setUserData(new String(new Base64().encode(userData.getBytes("US-ASCII"))));
spec.setInstanceType(ai.getApiName());
sir.<API key>(spec);
<API key> result = ec2.<API key>(sir);
logger.debugf("spot instance request result: %s", result);
} else {
RunInstancesRequest req = new RunInstancesRequest(ai.getDefaultAMI(), machineCount, machineCount);
req.setClientToken(id);
req.setInstanceType(ai.getApiName());
req.<API key>("terminate");
req.setUserData(new String(new Base64().encode(userData.getBytes("US-ASCII"))));
RunInstancesResult resp = ec2.runInstances(req);
logger.debugf("on demand reservation id: %s", resp.getReservation().getReservationId());
labelEc2Instance(ec2, resp, "smr-" + id);
}
}
}
public static void labelEc2Instance(AmazonEC2 ec2, RunInstancesResult resp, String title) throws Exception {
int tries = 0;
boolean done = false;
while (tries++ < 3 && !done) {
try {
List<String> resources = new LinkedList<String>();
for (Instance i : resp.getReservation().getInstances()) {
resources.add(i.getInstanceId());
}
List<Tag> tags = new LinkedList<Tag>();
tags.add(new Tag("Name", title));
CreateTagsRequest ctr = new CreateTagsRequest(resources, tags);
ec2.createTags(ctr);
done = true;
logger.debugf("set tag(s)");
} catch (Exception e) {
logger.warnf("exception setting tags: %s", e);
Thread.sleep(3000);
}
}
}
public static String produceUserData(AmazonInstance ai, Properties c, URI jarFileURI) throws Exception {
StringWriter sw = new StringWriter();
<API key> pw = new <API key>(new PrintWriter(sw));
pw.println("#!/bin/sh");
pw.println("cd /root");
pw.println("chmod 777 /mnt");
pw.println("aptitude update");
Set<String> set = new TreeSet<String>();
set.add("openjdk-6-jdk");
set.add("wget");
if (set.size() > 0) {
pw.print("aptitude install -y ");
Iterator<String> it = set.iterator();
while (it.hasNext()) {
String x = it.next();
pw.print(x);
if (it.hasNext()) {
pw.print(" ");
}
}
pw.println();
}
pw.printf("wget %s", jarFileURI);
pw.println();
String[] parts = jarFileURI.getPath().split("/");
String jar = parts[parts.length - 1];
pw.printf("java -Xmx%.0fm -cp %s %s %s", 1000 * 0.8 * ai.getMemoryGB(), jar, SMRDriver.class.getName(),
MraUtils.convertToHex(serialize(c).getBytes()));
pw.println();
pw.println("poweroff");
pw.close();
return sw.toString();
}
public static AmazonS3 getS3(AWSCredentials aws) {
AmazonS3Client s3 = new AmazonS3Client(aws);
s3.addRequestHandler(new <API key>() {
@Override
public void beforeRequest(Request<?> request) {
request.addHeader("x-amz-request-payer", "requester");
}
});
return s3;
}
public static String prefixedName(String p, String n) {
return p + "-" + n;
}
public static AWSCredentials create(final Properties p) {
return new AWSCredentials() {
@Override
public String getAWSSecretKey() {
return p.getProperty(ConfigKey.AWS_SECRETKEY.toString());
}
@Override
public String getAWSAccessKeyId() {
return p.getProperty(ConfigKey.AWS_KEYID.toString());
}
};
}
public static SortedSet<String> getAllHashes(long mod) {
SortedSet<String> out = new TreeSet<String>();
for (long i = 0; i < mod; i++) {
out.add(fmt(i, mod));
}
return out;
}
public static String hash(byte[] key, long mod) {
byte[] buf = MraUtils.md5HashBytesToBytes(key);
long x = Math.abs(MraUtils.extractLongValue(buf));
return fmt(x % mod, mod);
}
private static String fmt(long x, long mod) {
long places = Math.round(Math.ceil(Math.log10(mod)));
if (places == 0) {
places = 1;
}
return new Formatter().format("%0" + places + "d", x).toString();
}
public static String serialize(Properties p) throws Exception {
StringWriter sw = new StringWriter();
try {
p.store(sw, "n/a");
} finally {
sw.close();
}
return sw.toString();
}
public static Properties marshall(String s) throws Exception {
Properties p = new Properties();
StringReader sr = new StringReader(s);
try {
p.load(sr);
} finally {
sr.close();
}
return p;
}
}
|
// modification, are permitted provided that the following conditions are met:
// documentation and/or other materials provided with the distribution.
// * Neither the name of the author nor the names of other contributors may
// be used to endorse or promote products derived from this software
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
#pragma once
extern "C" {
#pragma warning(push, 0)
#include <microhttpd.h>
#pragma warning(pop)
}
#include "Context.h"
#include <condition_variable>
#include <mutex>
#include <vector>
#if MHD_VERSION < 0x00097001
#define MHD_Result int
#endif
class HttpServer {
public:
HttpServer(Context& context);
~HttpServer();
bool Start();
bool Stop();
void Wait();
private:
static MHD_Result HandleRequest(
void *cls,
struct MHD_Connection *connection,
const char *url,
const char *method,
const char *version,
const char *upload_data,
size_t *upload_data_size,
void **con_cls);
static size_t HandleUnescape(
void * cls,
struct MHD_Connection *c,
char *s);
static int <API key>(
HttpServer* server,
MHD_Response*& response,
MHD_Connection* connection,
std::vector<std::string>& pathParts);
static int <API key>(
HttpServer* server,
MHD_Response*& response,
MHD_Connection* connection,
std::vector<std::string>& pathParts);
struct MHD_Daemon *httpServer;
Context& context;
volatile bool running;
std::condition_variable exitCondition;
std::mutex exitMutex;
};
|
<?php
namespace app\controllers\user;
use Yii;
use dektrium\user\controllers\ProfileController as PController;
use app\models\ProfileSearch;
/**
* UserInfoController implements the CRUD actions for UserInfo model.
*/
class ProfileController extends PController
{
/*public function behaviors()
{
return [
'verbs' => [
'class' => VerbFilter::className(),
'actions' => [
'delete' => ['post'],
],
],
];
}*/
/**
* Lists all UserInfo models.
* @return mixed
*/
public function actionIndex()
{
$searchModel = new ProfileSearch();
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Displays a single UserInfo model.
* @param integer $id
* @return mixed
*/
/*public function actionView($id)
{
return $this->render('view', [
'model' => $this->findModel($id),
]);
}*/
/**
* Creates a new UserInfo model.
* If creation is successful, the browser will be redirected to the 'view' page.
* @return mixed
*/
/*public function actionCreate()
{
$model = new UserInfo();
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]);
} else {
return $this->render('create', [
'model' => $model,
]);
}
}*/
/**
* Updates an existing UserInfo model.
* If update is successful, the browser will be redirected to the 'view' page.
* @param integer $id
* @return mixed
*/
/*public function actionUpdate($id)
{
$model = $this->findModel($id);
if ($model->load(Yii::$app->request->post()) && $model->save()) {
return $this->redirect(['view', 'id' => $model->id]);
} else {
return $this->render('update', [
'model' => $model,
]);
}
}*/
/**
* Deletes an existing UserInfo model.
* If deletion is successful, the browser will be redirected to the 'index' page.
* @param integer $id
* @return mixed
*/
/*public function actionDelete($id)
{
$this->findModel($id)->delete();
return $this->redirect(['index']);
}*/
/**
* Finds the UserInfo model based on its primary key value.
* If the model is not found, a 404 HTTP exception will be thrown.
* @param integer $id
* @return UserInfo the loaded model
* @throws <API key> if the model cannot be found
*/
/*protected function findModel($id)
{
if (($model = UserInfo::findOne($id)) !== null) {
return $model;
} else {
throw new <API key>('The requested page does not exist.');
}
}*/
}
|
#ifndef REGRESS_H
#define REGRESS_H
/* Macro to shorten code where a number is added to the current value of an
* element in a matrix. */
#define addval(A, VAL, I, J) setval((A), (VAL) + val((A), (I), (J)), (I), (J))
typedef struct {
double **array;
int rows;
int cols;
} matrix;
void DestroyMatrix(matrix*);
matrix* CalcMinor(matrix*, int, int);
double CalcDeterminant(matrix*);
int nCols(matrix*);
int nRows(matrix*);
double val(matrix*, int, int);
void setval(matrix*, double, int, int);
matrix* CreateMatrix(int, int);
matrix* mtxtrn(matrix*);
matrix* mtxmul(matrix*, matrix*);
matrix* CalcAdj(matrix*);
matrix* CalcInv(matrix*);
matrix* regress(matrix*, matrix*);
matrix* polyfit(matrix*, matrix*, int);
matrix* ParseMatrix(char*);
matrix* linspace(double, double, int);
void Map(matrix*, double (*func)(double));
void mtxprnt(matrix*);
void mtxprntfile(matrix*, char*);
#endif
|
div#childtickets {
border: 1px outset #996;
border-radius: .5em;
padding: 1em;
}
div#childtickets table.listing thead th {
border: none;
}
div#childtickets table.listing tbody tr {
border: none;
}
div#childtickets table.listing tbody td {
border: none;
padding: 0.1em 0.5em;
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Matlab.Nodes
{
[Serializable]
public abstract class InnerNode : InternalNode
{
#region CONSTRUCTORS:
protected InnerNode()
: base()
{
return;
}
#endregion
}
}
|
#!/usr/bin/python
import os
# With the addition of Keystone, to use an openstack cloud you should
# authenticate against keystone, which returns a **Token** and **Service
# Catalog**. The catalog contains the endpoint for all services the
# user/tenant has access to - including nova, glance, keystone, swift.
# *NOTE*: Using the 2.0 *auth api* does not mean that compute api is 2.0. We
# will use the 1.1 *compute api*
os.environ['OS_AUTH_URL'] = "https://keystone.rc.nectar.org.au:5000/v2.0/"
# With the addition of Keystone we have standardized on the term **tenant**
# as the entity that owns the resources.
os.environ['OS_TENANT_ID'] = "<API key>"
os.environ['OS_TENANT_NAME'] = "tenant_name"
# In addition to the owning entity (tenant), openstack stores the entity
# performing the action as the **user**.
os.environ['OS_USERNAME'] = "joe.bloggs@uni.edu.au"
# With Keystone you pass the keystone password.
os.environ['OS_PASSWORD'] = "????????????????????"
|
<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
/**
* @var yii\web\View $this
* @var app\models\Image $model
* @var yii\widgets\ActiveForm $form
*/
?>
<div class="image-form">
<?php $form = ActiveForm::begin(); ?>
<?= $form->field($model, 'name')->textInput(['maxlength' => 50]) ?>
<?= $form->field($model, 'location_shooting')->textInput(['maxlength' => 200]) ?>
<?= $form->field($model, 'file')->textarea(['rows' => 6]) ?>
<?= $form->field($model, 'upload_date')->textInput() ?>
<div class="form-group">
<?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
</div>
<?php ActiveForm::end(); ?>
</div>
|
<?php
session_start();
if (!isset($_SESSION["bis"]) || $_SESSION["bis"] != 1) {
header("Location: index.php");
die();
}
?>
|
require "rbconfig"
require 'test/unit'
require 'socket'
require 'openssl'
require 'puma/minissl'
require 'puma/server'
require 'net/https'
class TestPumaServer < Test::Unit::TestCase
def setup
@port = 3212
@host = "127.0.0.1"
@app = lambda { |env| [200, {}, [env['rack.url_scheme']]] }
@events = Puma::Events.new STDOUT, STDERR
@server = Puma::Server.new @app, @events
if defined?(JRUBY_VERSION)
@ssl_key = File.expand_path "../../examples/puma/keystore.jks", __FILE__
@ssl_cert = @ssl_key
else
@ssl_key = File.expand_path "../../examples/puma/puma_keypair.pem", __FILE__
@ssl_cert = File.expand_path "../../examples/puma/cert_puma.pem", __FILE__
end
end
def teardown
@server.stop(true)
end
def <API key>
ctx = Puma::MiniSSL::Context.new
ctx.key = @ssl_key
ctx.cert = @ssl_cert
ctx.verify_mode = Puma::MiniSSL::VERIFY_NONE
@server.add_ssl_listener @host, @port, ctx
@server.run
http = Net::HTTP.new @host, @port
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
body = nil
http.start do
req = Net::HTTP::Get.new "/", {}
http.request(req) do |rep|
body = rep.body
end
end
assert_equal "https", body
end unless defined? JRUBY_VERSION
def <API key>
data = nil
@server.app = proc do |env|
data = env['rack.input'].read
[200, {}, ["ok"]]
end
@server.add_tcp_listener @host, @port
@server.run
fifteen = "1" * 15
sock = TCPSocket.new @host, @port
sock << "PUT / HTTP/1.0\r\nContent-Length: 30\r\n\r\n#{fifteen}"
sleep 0.1 # important so that the previous data is sent as a packet
sock << fifteen
sock.read
assert_equal "#{fifteen}#{fifteen}", data
end
def test_puma_socket
body = "HTTP/1.1 750 Upgraded to Awesome\r\nDone: Yep!\r\n"
@server.app = proc do |env|
io = env['puma.socket']
io.write body
io.close
[-1, {}, []]
end
@server.add_tcp_listener @host, @port
@server.run
sock = TCPSocket.new @host, @port
sock << "PUT / HTTP/1.0\r\n\r\nHello"
assert_equal body, sock.read
end
def <API key>
giant = "x" * 2056610
@server.app = proc do |env|
[200, {}, [giant]]
end
@server.add_tcp_listener @host, @port
@server.run
sock = TCPSocket.new @host, @port
sock << "GET / HTTP/1.0\r\n\r\n"
while true
line = sock.gets
break if line == "\r\n"
end
out = sock.read
assert_equal giant.bytesize, out.bytesize
end
def <API key>
@server.app = proc do |env|
[200, {}, [env['SERVER_PORT']]]
end
@server.add_tcp_listener @host, @port
@server.run
req = Net::HTTP::Get.new("/")
req['HOST'] = "example.com"
req['X_FORWARDED_PROTO'] = "https"
res = Net::HTTP.start @host, @port do |http|
http.request(req)
end
assert_equal "443", res.body
end
def <API key>
@server.app = proc do |env|
[200, {}, [env['SERVER_PORT']]]
end
@server.add_tcp_listener @host, @port
@server.run
req = Net::HTTP::Get.new("/")
req['HOST'] = "example.com"
res = Net::HTTP.start @host, @port do |http|
http.request(req)
end
assert_equal "80", res.body
end
def <API key>
@server.app = proc { |env| [200, {"Foo" => "Bar"}, ["hello"]] }
@server.add_tcp_listener @host, @port
@server.run
sock = TCPSocket.new @host, @port
sock << "HEAD / HTTP/1.0\r\n\r\n"
data = sock.read
assert_equal "HTTP/1.0 200 OK\r\nFoo: Bar\r\nContent-Length: 5\r\n\r\n", data
end
def <API key>
@server.app = proc { |env| [200, {}, [""]] }
@server.add_tcp_listener @host, @port
@server.run
sock = TCPSocket.new @host, @port
sock << "HEAD / HTTP/1.0\r\n\r\n"
data = sock.read
assert_equal "HTTP/1.0 200 OK\r\nContent-Length: 0\r\n\r\n", data
end
def <API key>
@server.app = proc { |env| [200, {}, []] }
@server.add_tcp_listener @host, @port
@server.run
sock = TCPSocket.new @host, @port
sock << "HEAD / HTTP/1.0\r\n\r\n"
data = sock.read
assert_equal "HTTP/1.0 200 OK\r\n\r\n", data
end
def <API key>
@events = Puma::Events.strings
@server = Puma::Server.new @app, @events
@server.app = proc { |e| raise "don't leak me bro" }
@server.leak_stack_on_error = false
@server.add_tcp_listener @host, @port
@server.run
sock = TCPSocket.new @host, @port
sock << "GET / HTTP/1.0\r\n\r\n"
data = sock.read
assert_not_match(/don't leak me bro/, data)
assert_match(/HTTP\/1.0 500 Internal Server Error/, data)
end
def <API key>
@events = Puma::Events.strings
re = lambda { |err| [302, {'Content-Type' => 'text', 'Location' => 'foo.html'}, ['302 found']] }
@server = Puma::Server.new @app, @events, {<API key>: re}
@server.app = proc { |e| raise "don't leak me bro" }
@server.add_tcp_listener @host, @port
@server.run
sock = TCPSocket.new @host, @port
sock << "GET / HTTP/1.0\r\n\r\n"
data = sock.read
assert_match(/HTTP\/1.0 302 Found/, data)
end
def <API key>
@server.app = proc { |env| [449, {}, [""]] }
@server.add_tcp_listener @host, @port
@server.run
sock = TCPSocket.new @host, @port
sock << "GET / HTTP/1.0\r\n\r\n"
data = sock.read
assert_equal "HTTP/1.0 449 CUSTOM\r\nConnection: close\r\nContent-Length: 0\r\n\r\n", data
end
def <API key>
@server.app = proc { |env| [449, {}, [""]] }
@server.add_tcp_listener @host, @port
@server.run
sock = TCPSocket.new @host, @port
sock << "GET / HTTP/1.1\r\n\r\n"
data = sock.read
assert_equal "HTTP/1.1 449 CUSTOM\r\nContent-Length: 0\r\n\r\n", data
end
def <API key>
@server.app = proc { |env| [200, {"Content-Type" => "application/pdf",
"Content-Length" => "4242"}, []] }
@server.add_tcp_listener @host, @port
@server.run
sock = TCPSocket.new @host, @port
sock << "HEAD / HTTP/1.0\r\n\r\n"
data = sock.read
assert_equal "HTTP/1.0 200 OK\r\nContent-Type: application/pdf\r\nContent-Length: 4242\r\n\r\n", data
end
def <API key>
states = []
@events.register(:state) { |s| states << s }
@server.app = proc { |env| [200, {}, [""]] }
@server.add_tcp_listener @host, @port
@server.run
sock = TCPSocket.new @host, @port
sock << "HEAD / HTTP/1.0\r\n\r\n"
sock.read
assert_equal [:booting, :running], states
@server.stop(true)
assert_equal [:booting, :running, :stop, :done], states
end
def <API key>
@server.first_data_timeout = 2
@server.add_tcp_listener @host, @port
@server.run
client = TCPSocket.new @host, @port
client << "POST / HTTP/1.1\r\nHost: test.com\r\nContent-Type: text/plain\r\nContent-Length: 5\r\n\r\n"
data = client.gets
assert_equal "HTTP/1.1 408 Request Timeout\r\n", data
end
end
|
#ifndef <API key>
#define <API key>
#include "ash/components/phonehub/<API key>.h"
namespace ash {
namespace phonehub {
class <API key> : public <API key> {
public:
explicit <API key>(
AccessStatus access_status = AccessStatus::<API key>);
~<API key>() override;
using <API key>::<API key>;
void <API key>(AccessStatus access_status) override;
void <API key>(
<API key>::Status new_status);
// <API key>:
AccessStatus GetAccessStatus() const override;
bool <API key>() const override;
void <API key>() override;
void <API key>();
private:
AccessStatus access_status_;
bool <API key> = false;
};
} // namespace phonehub
} // namespace ash
namespace chromeos {
namespace phonehub {
using ::ash::phonehub::<API key>;
}
} // namespace chromeos
#endif // <API key>
|
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from .local import Local # noqa
from .production import Production # noqa
# This will make sure the app is always imported when
# Django starts so that shared_task will use this app.
from .celery import app as celery_app
|
#ifndef <API key>
#define <API key>
#include "ash/system/audio/audio_observer.h"
#include "ash/system/tray/tray_image_item.h"
#include "base/memory/scoped_ptr.h"
namespace ash {
namespace system {
class TrayAudioDelegate;
}
namespace internal {
namespace tray {
class VolumeView;
}
class TrayAudio : public TrayImageItem,
public AudioObserver {
public:
TrayAudio(SystemTray* system_tray,
scoped_ptr<system::TrayAudioDelegate> audio_delegate);
virtual ~TrayAudio();
protected:
virtual void Update();
scoped_ptr<system::TrayAudioDelegate> audio_delegate_;
tray::VolumeView* volume_view_;
// True if VolumeView should be created for accelerator pop up;
// Otherwise, it should be created for detailed view in ash tray bubble.
bool pop_up_volume_view_;
private:
// Overridden from TrayImageItem.
virtual bool <API key>() OVERRIDE;
// Overridden from SystemTrayItem.
virtual views::View* CreateDefaultView(user::LoginStatus status) OVERRIDE;
virtual views::View* CreateDetailedView(user::LoginStatus status) OVERRIDE;
virtual void DestroyDefaultView() OVERRIDE;
virtual void DestroyDetailedView() OVERRIDE;
virtual bool ShouldHideArrow() const OVERRIDE;
virtual bool ShouldShowShelf() const OVERRIDE;
// Overridden from AudioObserver.
virtual void <API key>() OVERRIDE;
virtual void OnOutputMuteChanged() OVERRIDE;
virtual void OnAudioNodesChanged() OVERRIDE;
virtual void <API key>() OVERRIDE;
virtual void <API key>() OVERRIDE;
<API key>(TrayAudio);
};
} // namespace internal
} // namespace ash
#endif // <API key>
|
module Text.OpenGL.Xml.ReadRegistry (
readRegistry,
parseRegistry,
PreProcess
) where
import Prelude hiding ((.), id)
import Control.Category
import Text.OpenGL.Types
import Text.OpenGL.Xml.Pickle()
import Text.OpenGL.Xml.PreProcess
import Text.XML.HXT.Core
type PreProcess = Bool
-- TODO RelaxNG validation
readRegistry :: FilePath -> PreProcess -> IO (Either String Registry)
readRegistry fp pp = do
results <- runX (
readDocument readOpts fp >>> preProcess pp >>> parseRegistryArrow
) -- TODO: error handling
return $ handleResults results
where
readOpts :: [SysConfig]
readOpts = [withValidate no, withPreserveComment no]
preProcess :: (ArrowChoice a, ArrowXml a) => PreProcess -> a XmlTree XmlTree
preProcess pp = if pp then preProcessRegistry else id
-- | TODO: make it work (doesn't work with the <?xml ?> header.
parseRegistry :: String -> PreProcess -> Either String Registry
parseRegistry str pp = handleResults $ runLA (
xread >>> preProcess pp >>> parseRegistryArrow
) str
handleResults :: [Either String Registry] -> Either String Registry
handleResults rs = case rs of
[] -> Left "No parse"
(_:_:_) -> Left "Multiple parse"
[rc] -> rc
parseRegistryArrow :: ArrowXml a => a XmlTree (Either String Registry)
parseRegistryArrow =
removeAllWhiteSpace >>> -- This processing is needed for the non IO case.
removeAllComment >>>
arr (unpickleDoc' xpickle)
|
// CEDestinySDK.h
// CEDestinySDK
#import <UIKit/UIKit.h>
//! Project version number for CEDestinySDK.
FOUNDATION_EXPORT double <API key>;
//! Project version string for CEDestinySDK.
FOUNDATION_EXPORT const unsigned char <API key>[];
// In this header, you should import all the public headers of your framework using statements like #import <CEDestinySDK/PublicHeader.h>
#import "CEDestinySDK.h"
|
require 'spree_auto_invoice'
require 'rails'
module SpreeAutoInvoice
class Railtie < Rails::Railtie
rake_tasks do
require '../tasks/spree_auto_invoice.rake'
end
end
end
|
<?php
use librarys\helpers\utils\String;
?>
<div class="a_info neinf">
<div>
<div class="a_rea a_hop">
<h2>
<span><a href="http://jb.9939.com/article_list.shtml">>></a></span>
“<font style="color:
</h2>
<ul class="a_prev">
<?php
if (isset($relArticles['list']) && !empty($relArticles['list'])) {
$leftRelArticles = array_splice($relArticles['list'], 0, 12);
foreach ($leftRelArticles as $relArticle){
?>
<li>
<a href="<?php echo '/article/'.date("Y/md", $relArticle["inputtime"]).'/'.$relArticle['id'].'.shtml' ; ?>" title="<?php echo $relArticle['title']; ?>"><?php echo $relArticle['title']; ?></a>
</li>
<?php
}
}
?>
</ul>
</div>
</div>
<div>
<div class="a_rea a_hop inpc">
<h2>
<span>
<a href="http://ask.9939.com/asking/" class="inqu"></a>
<a href="http://ask.9939.com/">>></a>
</span>
<img src="/images/pi_02.png">
</h2>
<ul class="a_mon">
<?php
if (isset($asks['list']) && !empty($asks['list'])) {
foreach ($asks['list'] as $outerKey => $outerAsk){
?>
<li>
<h3>
<a href="<?php echo \yii\helpers\Url::to('@ask/id/' . $outerAsk['ask']['id']); ?>" title="<?php echo $outerAsk['ask']['title']; ?>">
<?php echo $outerAsk['ask']['title']; ?>
</a>
</h3>
<p>
<?php
if (isset($outerAsk['answer']) && !empty($outerAsk['answer'])) {
?>
<?php echo \librarys\helpers\utils\String::cutString($outerAsk['answer']['content'], 54); ?>
<?php
}
?>
<a href="<?php echo \yii\helpers\Url::to('@ask/id/' . $outerAsk['ask']['id']); ?>"></a>
</p>
</li>
<?php
}
}
?>
</ul>
</div>
</div>
<?php
if (isset($disease) && !empty($disease)) {
?>
<div class="a_rea a_hop inpc" style="background: none;">
<h2>
<span>
<?php
if (isset($isSymptom) && $isSymptom == 1) {
?>
<a href="/zhengzhuang/<?php echo $disease['pinyin_initial']; ?>/jiancha/">>></a>
<?php
}else {
?>
<a href="/<?php echo $disease['pinyin_initial']; ?>/lcjc/">>></a>
<?php } ?>
</span>
<img src="/images/reche.gif">
</h2>
<div class="nipat">
<?php
if (isset($isSymptom) && $isSymptom == 1){
?>
<h3><?php echo $disease['name']; ?><span></span></h3>
<p><?php echo String::cutString($disease['examine'], 100); ?>
<a href="/zhengzhuang/<?php echo $disease['pinyin_initial']; ?>/jiancha/"></a>
</p>
<?php
}else {
?>
<h3><?php echo $disease['name']; ?><span></span></h3>
<p><?php echo String::cutString($disease['inspect'], 100); ?>
<a href="/<?php echo $disease['pinyin_initial']; ?>/lcjc/"></a>
</p>
<?php
}
?>
</div>
</div>
<?php } ?>
<div class="a_rea a_hop inpc" style="background: none;">
<h2>
<img src="/images/everb.gif">
</h2>
<?php
if (isset($disease) && !empty($disease)) {
?>
<ul class="finin clearfix">
<?php
if (isset($stillFind) && !empty($stillFind)) {
foreach ($stillFind as $find){
?>
<li>
<a href="http://jb.9939.com/so/<?php echo $find['pinyin']; ?>/" title="<?php echo $find['keywords']; ?>">
<?php echo $find['keywords']; ?>
</a>
</li>
<?php
}
}
?>
</ul>
<?php
}
?>
</div>
<!-- Start -->
<?php echo $this->render('detail_below_pic'); ?>
<!-- End -->
</div>
|
#include "components/optimization_guide/<API key>.h"
#include "components/optimization_guide/proto/hint_cache.pb.h"
#include "components/optimization_guide/proto/hints.pb.h"
#include "components/optimization_guide/store_update_data.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
namespace optimization_guide {
TEST(<API key>, <API key>) {
proto::Hint hint1;
// Page hint for "/one/"
proto::PageHint* page_hint1 = hint1.add_page_hints();
page_hint1->set_page_pattern("foo.org/*/one/");
// Page hint for "two"
proto::PageHint* page_hint2 = hint1.add_page_hints();
page_hint2->set_page_pattern("two");
// Page hint for "three.jpg"
proto::PageHint* page_hint3 = hint1.add_page_hints();
page_hint3->set_page_pattern("three.jpg");
EXPECT_EQ(nullptr, FindPageHintForURL(GURL(""), &hint1));
EXPECT_EQ(nullptr, FindPageHintForURL(GURL("https:
EXPECT_EQ(nullptr,
FindPageHintForURL(GURL("https:
EXPECT_EQ(nullptr,
FindPageHintForURL(GURL("https:
EXPECT_EQ(page_hint1,
FindPageHintForURL(GURL("https:
EXPECT_EQ(page_hint1,
FindPageHintForURL(GURL("https:
&hint1));
EXPECT_EQ(page_hint1, FindPageHintForURL(
GURL("https:
EXPECT_EQ(page_hint1,
FindPageHintForURL(
GURL("https:
EXPECT_EQ(page_hint2,
FindPageHintForURL(
GURL("https:
EXPECT_EQ(page_hint2,
FindPageHintForURL(GURL("https:
&hint1));
EXPECT_EQ(page_hint2,
FindPageHintForURL(GURL("https://one.two.org"), &hint1));
EXPECT_EQ(page_hint3, FindPageHintForURL(
GURL("https:
}
TEST(<API key>, <API key>) {
EXPECT_EQ(
<API key>(
proto::<API key>::<API key>),
net::<API key>::<API key>);
EXPECT_EQ(
<API key>(
proto::<API key>::<API key>),
net::<API key>::<API key>);
EXPECT_EQ(
<API key>(
proto::<API key>::<API key>),
net::<API key>::<API key>);
EXPECT_EQ(<API key>(
proto::<API key>::<API key>),
net::<API key>::<API key>);
EXPECT_EQ(<API key>(
proto::<API key>::<API key>),
net::<API key>::<API key>);
EXPECT_EQ(<API key>(
proto::<API key>::<API key>),
net::<API key>::<API key>);
}
TEST(<API key>, <API key>) {
EXPECT_TRUE(<API key>(GURL("https://blerg.com")));
EXPECT_TRUE(<API key>(GURL("http://blerg.com")));
EXPECT_FALSE(<API key>(GURL("file://blerg")));
EXPECT_FALSE(<API key>(GURL("chrome://blerg")));
EXPECT_FALSE(<API key>(
GURL("https:
EXPECT_FALSE(<API key>(GURL("https://localhost:5000")));
EXPECT_FALSE(<API key>(GURL("https://192.168.1.1")));
}
} // namespace optimization_guide
|
#include "chrome/browser/ui/extensions/<API key>.h"
#include <utility>
#include "build/build_config.h"
#include "chrome/browser/extensions/<API key>.h"
#include "chrome/browser/extensions/<API key>.h"
#include "chrome/browser/extensions/<API key>.h"
#include "chrome/browser/ui/browser_dialogs.h"
#include "chrome/browser/ui/browser_finder.h"
#include "chrome/browser/ui/browser_window.h"
#include "chrome/browser/ui/extensions/<API key>.h"
#include "chrome/browser/ui/extensions/<API key>.h"
#include "chrome/browser/ui/extensions/<API key>.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/toolbar/toolbar_actions_bar.h"
#include "chrome/browser/ui/ui_features.h"
#include "chrome/common/extensions/manifest_handlers/<API key>.h"
#include "chrome/common/url_constants.h"
#include "content/public/browser/browser_url_handler.h"
#include "content/public/browser/navigation_entry.h"
#include "extensions/common/constants.h"
namespace extensions {
namespace {
// Whether the NTP post-install UI is enabled. By default, this is limited to
// Windows, Mac, and ChromeOS, but can be overridden for testing.
#if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
bool <API key> = true;
#else
bool <API key> = false;
#endif
#if defined(OS_WIN) || defined(OS_MACOSX)
void <API key>(<API key> type,
Browser* browser) {
ToolbarActionsModel* model = ToolbarActionsModel::Get(browser->profile());
if (model->has_active_bubble())
return;
std::unique_ptr<<API key>> settings_api_bubble(
new <API key>(
new <API key>(browser->profile(), type), browser));
if (!settings_api_bubble->ShouldShow())
return;
settings_api_bubble->SetIsActiveBubble();
std::unique_ptr<<API key>> bridge(
new <API key>(std::move(settings_api_bubble)));
browser->window()-><API key>()-><API key>(
std::move(bridge));
}
#endif
} // namespace
void <API key>(bool enabled) {
<API key> = enabled;
}
void <API key>(Browser* browser) {
#if defined(OS_WIN) || defined(OS_MACOSX)
<API key>(<API key>, browser);
#endif
}
void <API key>(
content::WebContents* web_contents,
AutocompleteMatch::Type match_type) {
#if defined(OS_WIN) || defined(OS_MACOSX)
if (!AutocompleteMatch::IsSearchType(match_type) ||
match_type == <API key>::SEARCH_OTHER_ENGINE) {
return;
}
Browser* browser = chrome::<API key>(web_contents);
if (!browser)
return;
if (base::FeatureList::IsEnabled(
features::<API key>)) {
base::Optional<<API key>::Params> params =
<API key>::<API key>(
browser->profile());
if (!params)
return;
auto dialog = std::make_unique<<API key>>(
std::move(*params), browser->profile());
if (!dialog->ShouldShow())
return;
chrome::<API key>(std::move(dialog), browser);
} else {
<API key>(<API key>, browser);
}
#endif
}
void <API key>(
Browser* browser, content::WebContents* web_contents) {
if (!<API key>)
return;
// Acknowledge existing extensions if necessary.
<API key>::<API key>(
browser->profile());
// Jump through a series of hoops to see if the web contents is pointing to
// an <API key> NTP.
// TODO(devlin): Some of this is redundant with the checks in the bubble/
// dialog. We should consolidate, but that'll be simpler once we only have
// one UI option. In the meantime, extra checks don't hurt.
content::NavigationEntry* entry =
web_contents->GetController().GetVisibleEntry();
if (!entry)
return;
GURL active_url = entry->GetURL();
if (!active_url.SchemeIs(extensions::kExtensionScheme))
return; // Not a URL that we care about.
// See if the current active URL matches a transformed NewTab URL.
GURL ntp_url(chrome::kChromeUINewTabURL);
content::BrowserURLHandler::GetInstance()-><API key>(
&ntp_url, web_contents->GetBrowserContext());
if (ntp_url != active_url)
return; // Not being overridden by an extension.
Profile* const profile = browser->profile();
ToolbarActionsModel* model = ToolbarActionsModel::Get(profile);
if (model->has_active_bubble())
return;
if (base::FeatureList::IsEnabled(
features::<API key>)) {
base::Optional<<API key>::Params> params =
<API key>::<API key>(profile);
if (!params)
return;
auto dialog = std::make_unique<<API key>>(
std::move(*params), profile);
if (!dialog->ShouldShow())
return;
chrome::<API key>(std::move(dialog), browser);
return;
}
std::unique_ptr<<API key>> <API key>(
new <API key>(
new <API key>(profile), browser));
if (!<API key>->ShouldShow())
return;
<API key>->SetIsActiveBubble();
std::unique_ptr<<API key>> bridge(
new <API key>(std::move(<API key>)));
browser->window()-><API key>()-><API key>(
std::move(bridge));
}
} // namespace extensions
|
package org.broadinstitute.hellbender.engine;
import org.broadinstitute.barclay.argparser.<API key>;
import org.broadinstitute.hellbender.cmdline.TestProgramGroup;
@<API key>(
summary = "A dummy GATKTool to help test Funcotator.",
oneLineSummary = "Dummy dumb dumb tool for testing.",
programGroup = TestProgramGroup.class
)
public final class <API key> extends GATKTool {
public <API key>() {
parseArgs(new String[]{});
onStartup();
}
@Override
public void traverse() {
}
@Override
void initializeFeatures(){
features = new FeatureManager(this, FeatureDataSource.<API key>, cloudPrefetchBuffer, <API key>,
referenceArguments.getReferencePath());
}
}
|
// Standard system includes
#include <assert.h>
#include <errno.h> // -EINVAL, -ENODEV
#include <netdb.h> // gethostbyname
#include <sys/poll.h>
#include <sys/types.h> // connect
#include <sys/socket.h> // connect
#include <trace.h>
#define MY_TRACE_PREFIX "EthernetServer"
extern "C" {
#include "string.h"
}
#include "Ethernet.h"
#include "EthernetClient.h"
#include "EthernetServer.h"
EthernetServer::EthernetServer(uint16_t port)
{
_port = port;
_sock = -1;
_init_ok = false;
pclients = new EthernetClient[MAX_SOCK_NUM];
<API key> = new int[MAX_SOCK_NUM];
_scansock = 0;
if (pclients == NULL){
trace_error("%s OOM condition", __func__);
return;
}
for(int sock = 0; sock < MAX_SOCK_NUM; sock++){
<API key>[sock] = 0;
pclients[sock].id = sock;
}
}
EthernetServer::~EthernetServer()
{
if (pclients != NULL){
delete [] pclients;
pclients = NULL;
}
if(<API key> != NULL){
delete [] <API key>;
<API key> = NULL;
}
}
void EthernetServer::begin()
{
int ret;
extern int errno;
_sock = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
if (_sock < 0){
trace_error("unable to open a TCP socket!");
return;
}
_sin.sin_addr.s_addr = INADDR_ANY;
_sin.sin_family = AF_INET;
_sin.sin_port = htons(_port);
ret = bind(_sock, (struct sockaddr*)&_sin, sizeof(_sin));
if ( ret < 0){
trace_error("%s unable to bind port %d", __func__, _port);
return;
}
//socket(sock, SnMR::TCP, _port, 0);
ret = listen(_sock, MAX_SOCK_NUM);
if ( ret < 0){
trace_error("%s unable to listen on port %d", __func__, _port);
return;
}
for(int sock = 0; sock < MAX_SOCK_NUM; sock++)
EthernetClass::_server_port[sock] = _port;
// mark as available
_init_ok = true;
}
static int _accept(int sock, struct sockaddr * psin, socklen_t * psize)
{
return accept(sock, psin, psize);
}
void EthernetServer::accept()
{
struct pollfd ufds;
int ret = 0, size_val, success = 0;
extern int errno;
if (_sock == -1)
return;
ufds.fd = _sock;
ufds.events = POLLIN;
ufds.revents = 0;
ret = poll(&ufds, 1, 0);
if ( ret < 0 ){
trace_error("%s error on poll errno %d", __func__, errno);
_sock = -1;
close(_sock);
return;
}
if(ufds.revents&POLLIN){
//trace_debug("%s in activity on socket %d - calling accept()", __func__, _sock);
size_val = sizeof(_cli_sin);
ret = _accept(_sock, (struct sockaddr*)&_cli_sin, (socklen_t*)&size_val);
if ( ret < 0){
close(_sock);
_sock = -1;
trace_error("%s Fail to accept() sock %d port %d", __func__, _sock, _port);
return;
}
for(int sock = 0; sock < MAX_SOCK_NUM && success == 0; sock++){
if (pclients[sock]._sock == -1){
pclients[sock]._sock = ret;
pclients[sock]._pCloseServer = this;
pclients[sock].connect_true = true;
pclients[sock]._inactive_counter = &<API key>[sock];
success = 1;
}
}
if ( success == 0 ){
trace_error("%s detect connect event - unable to allocate socket slot !", __func__);
}
}
}
EthernetClient EthernetServer::available()
{
accept();
// Scan for next connection - meaning don't return the same one each time
for(int sock = 0; sock < MAX_SOCK_NUM; sock++){
if (pclients[sock]._sock != -1 && sock != _scansock){
//trace_debug("Returning socket entity %d socket %d", sock, pclients[sock]._sock);
_scansock = sock;
return pclients[sock];
}
}
// scan for any connection
for(int sock = 0; sock < MAX_SOCK_NUM; sock++){
if (pclients[sock]._sock != -1){
//trace_debug("Returning socket entity %d socket %d", sock, pclients[sock]._sock);
_scansock = sock;
return pclients[sock];
}
}
//trace_debug("%s no client to return", __func__);
_scansock = 0;
return pclients[0];
}
size_t EthernetServer::write(uint8_t b)
{
return write(&b, 1);
}
size_t EthernetServer::write(const uint8_t *buffer, size_t size)
{
size_t n = 0;
//accept();
// This routine writes the given data to all current clients
for(int sock = 0; sock < MAX_SOCK_NUM; sock++){
if (pclients[sock]._sock != -1){
n += pclients[sock].write(buffer, size);
}
}
return n;
}
void EthernetServer::closeNotify(int idx)
{
if (idx < MAX_SOCK_NUM)
pclients[idx]._sock = -1;
}
|
'use strict';
module.exports = function (Logger, $rootScope) {
return {
restrict: 'A',
scope: {
hasRank: '='
},
link: function ($scope, elem, attrs) {
$rootScope.$watch('currentUser', function () {
Logger.info('Checking for rank: ' + $scope.hasRank);
if ($rootScope.currentUser && $rootScope.currentUser.rank >= $scope.hasRank) {
elem.show();
} else {
elem.hide();
}
});
}
};
};
|
package com.fasteasytrade.jrandtest.algo;
import java.math.BigInteger;
import java.util.Random;
/**
* QuadraidResidue1 Prng algorithm from NIST test package
* <p>
* Fix random p, prime, length 512 bits.
* <p>
* Fix random g, prime, length 512 bits. g < p.
* <p>
* Each prng iteration calculate g = g**2 mod p.<br>
* The lowest 64 bits of g are the prng result.
*
* @author Zur Aougav
*/
public class <API key> extends Cipher {
/**
* n's length/num of bits
*/
public final int bit_length = 512;
/**
* prime (with probability < 2 ** -100).
* <p>
* Length of p is bit_length = 512 bits = 64 bytes.
*/
BigInteger p;
/**
* Initial g is a random prime (with probability < 2 ** -100)
* <p>
* Length of g is bit_length = 512 bits = 64 bytes.
* <p>
* g is the "state" of the prng.
* <p>
* g = take 64 lowr bits of ( g**2 mod n ).
*/
BigInteger g;
/**
* g0 is the "initial state" of the prng.
* <p>
* reset method set g to g0.
*/
BigInteger g0;
<API key>() {
setup(bit_length);
}
<API key>(int x) {
if (x < bit_length) {
setup(bit_length);
} else {
setup(x);
}
}
<API key>(BigInteger p, BigInteger g) {
this.p = p;
this.g = g;
g0 = g;
}
<API key>(BigInteger p, BigInteger g, BigInteger g0) {
this.p = p;
this.g = g;
this.g0 = g0;
}
/**
* Generate the key and seed for Quadratic Residue Prng.
* <p>
* Select random primes - p, g. g < p.
*
* @param len
* length of p and g, num of bits.
*/
void setup(int len) {
Random rand = new Random();
p = BigInteger.probablePrime(len, rand);
g = BigInteger.probablePrime(len, rand);
/**
* if g >= p swap(g, p).
*/
if (g.compareTo(p) > -1) {
BigInteger temp = g;
g = p;
p = temp;
}
/**
* here for sure g < p
*/
g0 = g;
}
/**
* calculate g**2 mod p and returns lowest 64 bits, long.
*
*/
public long nextLong() {
g = g.multiply(g).mod(p);
/**
* set g to 2 if g <= 1.
*/
if (g.compareTo(BigInteger.ONE) < 1) {
g = BigInteger.valueOf(2);
}
return g.longValue();
}
/**
* Public key.
*
* @return p prime (with probability < 2 ** -100)
*/
public BigInteger getP() {
return p;
}
/**
* Secret key
*
* @return g prime (with probability < 2 ** -100)
*/
public BigInteger getG() {
return g;
}
/**
* Reset "state" of prng by setting g to g0 (initial g).
*
*/
public void reset() {
g = g0;
}
}
|
#include "core/inspector/MainThreadDebugger.h"
#include "bindings/core/v8/BindingSecurity.h"
#include "bindings/core/v8/DOMWrapperWorld.h"
#include "bindings/core/v8/ScriptController.h"
#include "bindings/core/v8/SourceLocation.h"
#include "bindings/core/v8/V8ErrorHandler.h"
#include "bindings/core/v8/V8Node.h"
#include "bindings/core/v8/V8Window.h"
#include "bindings/core/v8/<API key>.h"
#include "core/dom/ContainerNode.h"
#include "core/dom/Document.h"
#include "core/dom/Element.h"
#include "core/dom/ExecutionContext.h"
#include "core/dom/StaticNodeList.h"
#include "core/events/ErrorEvent.h"
#include "core/frame/Deprecation.h"
#include "core/frame/FrameConsole.h"
#include "core/frame/FrameHost.h"
#include "core/frame/LocalDOMWindow.h"
#include "core/frame/LocalFrame.h"
#include "core/frame/Settings.h"
#include "core/frame/UseCounter.h"
#include "core/inspector/ConsoleMessage.h"
#include "core/inspector/<API key>.h"
#include "core/inspector/IdentifiersFactory.h"
#include "core/inspector/InspectedFrames.h"
#include "core/inspector/InspectorTaskRunner.h"
#include "core/timing/MemoryInfo.h"
#include "core/workers/<API key>.h"
#include "core/xml/XPathEvaluator.h"
#include "core/xml/XPathResult.h"
#include "platform/<API key>.h"
#include "platform/inspector_protocol/Values.h"
#include "platform/v8_inspector/public/V8Inspector.h"
#include "wtf/PtrUtil.h"
#include "wtf/ThreadingPrimitives.h"
#include <memory>
namespace blink {
namespace {
int frameId(LocalFrame* frame)
{
ASSERT(frame);
return WeakIdentifierMap<LocalFrame>::identifier(frame);
}
Mutex& creationMutex()
{
<API key>(Mutex, mutex, (new Mutex));
return mutex;
}
LocalFrame* toFrame(ExecutionContext* context)
{
if (!context)
return nullptr;
if (context->isDocument())
return toDocument(context)->frame();
if (context-><API key>())
return <API key>(context)->frame();
return nullptr;
}
}
MainThreadDebugger* MainThreadDebugger::s_instance = nullptr;
MainThreadDebugger::MainThreadDebugger(v8::Isolate* isolate)
: ThreadDebugger(isolate)
, m_taskRunner(wrapUnique(new InspectorTaskRunner()))
, m_paused(false)
{
MutexLocker locker(creationMutex());
ASSERT(!s_instance);
s_instance = this;
}
MainThreadDebugger::~MainThreadDebugger()
{
MutexLocker locker(creationMutex());
ASSERT(s_instance == this);
s_instance = nullptr;
}
void MainThreadDebugger::<API key>(ExecutionContext* context, MessageSource source, MessageLevel level, const String& message, SourceLocation* location)
{
if (LocalFrame* frame = toFrame(context))
frame->console().<API key>(source, level, message, location);
}
int MainThreadDebugger::contextGroupId(ExecutionContext* context)
{
LocalFrame* frame = toFrame(context);
return frame ? contextGroupId(frame) : 0;
}
void MainThreadDebugger::<API key>(std::unique_ptr<ClientMessageLoop> clientMessageLoop)
{
ASSERT(!m_clientMessageLoop);
ASSERT(clientMessageLoop);
m_clientMessageLoop = std::move(clientMessageLoop);
}
void MainThreadDebugger::<API key>(LocalFrame* frame)
{
DCHECK(isMainThread());
if (frame->localFrameRoot() == frame)
v8Inspector()->resetContextGroup(contextGroupId(frame));
}
void MainThreadDebugger::contextCreated(ScriptState* scriptState, LocalFrame* frame, SecurityOrigin* origin)
{
ASSERT(isMainThread());
v8::HandleScope handles(scriptState->isolate());
DOMWrapperWorld& world = scriptState->world();
std::unique_ptr<protocol::DictionaryValue> auxData = protocol::DictionaryValue::create();
auxData->setBoolean("isDefault", world.isMainWorld());
auxData->setString("frameId", IdentifiersFactory::frameId(frame));
V8ContextInfo contextInfo(scriptState->context(), contextGroupId(frame), world.isIsolatedWorld() ? world.<API key>() : "");
if (origin)
contextInfo.origin = origin->toRawString();
contextInfo.auxData = auxData->toJSONString();
contextInfo.hasMemoryOnConsole = scriptState->getExecutionContext()->isDocument();
v8Inspector()->contextCreated(contextInfo);
}
void MainThreadDebugger::<API key>(ScriptState* scriptState)
{
v8::HandleScope handles(scriptState->isolate());
v8Inspector()->contextDestroyed(scriptState->context());
}
void MainThreadDebugger::exceptionThrown(ExecutionContext* context, ErrorEvent* event)
{
LocalFrame* frame = nullptr;
ScriptState* scriptState = nullptr;
if (context->isDocument()) {
frame = toDocument(context)->frame();
if (!frame)
return;
scriptState = event->world() ? ScriptState::forWorld(frame, *event->world()) : nullptr;
} else if (context-><API key>()) {
frame = <API key>(context)->frame();
if (!frame)
return;
scriptState = <API key>(context)->scriptController()->getScriptState();
} else {
NOTREACHED();
}
frame->console().<API key>(JSMessageSource, ErrorMessageLevel, event->messageForConsole(), event->location());
const String16 defaultMessage = "Uncaught";
if (scriptState && scriptState->contextIsValid()) {
ScriptState::Scope scope(scriptState);
v8::Local<v8::Value> exception = V8ErrorHandler::<API key>(scriptState, event, scriptState->context()->Global());
SourceLocation* location = event->location();
v8Inspector()->exceptionThrown(scriptState->context(), defaultMessage, exception, event->messageForConsole(), location->url(), location->lineNumber(), location->columnNumber(), location->takeStackTrace(), location->scriptId());
}
}
int MainThreadDebugger::contextGroupId(LocalFrame* frame)
{
LocalFrame* localFrameRoot = frame->localFrameRoot();
return frameId(localFrameRoot);
}
MainThreadDebugger* MainThreadDebugger::instance()
{
ASSERT(isMainThread());
V8PerIsolateData* data = V8PerIsolateData::from(V8PerIsolateData::mainThreadIsolate());
ASSERT(data->threadDebugger() && !data->threadDebugger()->isWorker());
return static_cast<MainThreadDebugger*>(data->threadDebugger());
}
void MainThreadDebugger::<API key>(std::unique_ptr<InspectorTaskRunner::Task> task)
{
MutexLocker locker(creationMutex());
if (s_instance) {
s_instance->m_taskRunner->appendTask(std::move(task));
s_instance->m_taskRunner-><API key>(s_instance->m_isolate);
}
}
void MainThreadDebugger::<API key>(int contextGroupId)
{
LocalFrame* pausedFrame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId);
// Do not pause in Context of detached frame.
if (!pausedFrame)
return;
ASSERT(pausedFrame == pausedFrame->localFrameRoot());
m_paused = true;
if (UserGestureToken* <API key>::currentToken())
token->setPauseInDebugger();
// Wait for continue or step command.
if (m_clientMessageLoop)
m_clientMessageLoop->run(pausedFrame);
}
void MainThreadDebugger::<API key>()
{
m_paused = false;
if (m_clientMessageLoop)
m_clientMessageLoop->quitNow();
}
void MainThreadDebugger::muteMetrics(int contextGroupId)
{
LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId);
if (frame && frame->host()) {
frame->host()->useCounter().muteForInspector();
frame->host()->deprecation().muteForInspector();
}
}
void MainThreadDebugger::unmuteMetrics(int contextGroupId)
{
LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId);
if (frame && frame->host()) {
frame->host()->useCounter().unmuteForInspector();
frame->host()->deprecation().unmuteForInspector();
}
}
v8::Local<v8::Context> MainThreadDebugger::<API key>(int contextGroupId)
{
LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId);
ScriptState* scriptState = frame ? ScriptState::forMainWorld(frame) : nullptr;
return scriptState ? scriptState->context() : v8::Local<v8::Context>();
}
void MainThreadDebugger::<API key>(int contextGroupId)
{
LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId);
frame->settings()-><API key>(true);
}
void MainThreadDebugger::<API key>(int contextGroupId)
{
LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId);
frame->settings()-><API key>(false);
}
bool MainThreadDebugger::canExecuteScripts(int contextGroupId)
{
LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId);
return frame->script().canExecuteScripts(<API key>);
}
void MainThreadDebugger::resumeStartup(int contextGroupId)
{
LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId);
if (m_clientMessageLoop)
m_clientMessageLoop->resumeStartup(frame);
}
void MainThreadDebugger::consoleAPIMessage(int contextGroupId, V8ConsoleAPIType type, const String16& message, const String16& url, unsigned lineNumber, unsigned columnNumber, V8StackTrace* stackTrace)
{
LocalFrame* frame = WeakIdentifierMap<LocalFrame>::lookup(contextGroupId);
if (!frame)
return;
if (type == V8ConsoleAPIType::kClear && frame->host())
frame->host()-><API key>().clear();
std::unique_ptr<SourceLocation> location = SourceLocation::create(url, lineNumber, columnNumber, stackTrace ? stackTrace->clone() : nullptr, 0);
frame->console().<API key>(<API key>, <API key>(type), message, location.get());
}
v8::MaybeLocal<v8::Value> MainThreadDebugger::memoryInfo(v8::Isolate* isolate, v8::Local<v8::Context> context)
{
ExecutionContext* executionContext = toExecutionContext(context);
ASSERT_UNUSED(executionContext, executionContext);
ASSERT(executionContext->isDocument());
return toV8(MemoryInfo::create(), context->Global(), isolate);
}
void MainThreadDebugger::<API key>(v8::Local<v8::Context> context, v8::Local<v8::Object> object)
{
ThreadDebugger::<API key>(context, object);
<API key>(context, object, "$", MainThreadDebugger::<API key>, "function $(selector, [startNode]) { [Command Line API] }");
<API key>(context, object, "$$", MainThreadDebugger::<API key>, "function $$(selector, [startNode]) { [Command Line API] }");
<API key>(context, object, "$x", MainThreadDebugger::<API key>, "function $x(xpath, [startNode]) { [Command Line API] }");
}
static Node* <API key>(const v8::<API key><v8::Value>& info)
{
if (info.Length() > 1) {
if (Node* node = V8Node::toImplWithTypeCheck(info.GetIsolate(), info[1]))
return node;
}
ExecutionContext* executionContext = toExecutionContext(info.GetIsolate()->GetCurrentContext());
if (executionContext->isDocument())
return toDocument(executionContext);
return nullptr;
}
void MainThreadDebugger::<API key>(const v8::<API key><v8::Value>& info)
{
if (info.Length() < 1)
return;
String selector = <API key>(info[0]);
if (selector.isEmpty())
return;
Node* node = <API key>(info);
if (!node || !node->isContainerNode())
return;
ExceptionState exceptionState(ExceptionState::ExecutionContext, "$", "CommandLineAPI", info.Holder(), info.GetIsolate());
Element* element = toContainerNode(node)->querySelector(AtomicString(selector), exceptionState);
if (exceptionState.throwIfNeeded())
return;
if (element)
info.GetReturnValue().Set(toV8(element, info.Holder(), info.GetIsolate()));
else
info.GetReturnValue().Set(v8::Null(info.GetIsolate()));
}
void MainThreadDebugger::<API key>(const v8::<API key><v8::Value>& info)
{
if (info.Length() < 1)
return;
String selector = <API key>(info[0]);
if (selector.isEmpty())
return;
Node* node = <API key>(info);
if (!node || !node->isContainerNode())
return;
ExceptionState exceptionState(ExceptionState::ExecutionContext, "$$", "CommandLineAPI", info.Holder(), info.GetIsolate());
// toV8(elementList) doesn't work here, since we need a proper Array instance, not NodeList.
StaticElementList* elementList = toContainerNode(node)->querySelectorAll(AtomicString(selector), exceptionState);
if (exceptionState.throwIfNeeded() || !elementList)
return;
v8::Isolate* isolate = info.GetIsolate();
v8::Local<v8::Context> context = isolate->GetCurrentContext();
v8::Local<v8::Array> nodes = v8::Array::New(isolate, elementList->length());
for (size_t i = 0; i < elementList->length(); ++i) {
Element* element = elementList->item(i);
if (!nodes->Set(context, i, toV8(element, info.Holder(), info.GetIsolate())).FromMaybe(false))
return;
}
info.GetReturnValue().Set(nodes);
}
void MainThreadDebugger::<API key>(const v8::<API key><v8::Value>& info)
{
if (info.Length() < 1)
return;
String selector = <API key>(info[0]);
if (selector.isEmpty())
return;
Node* node = <API key>(info);
if (!node || !node->isContainerNode())
return;
ExceptionState exceptionState(ExceptionState::ExecutionContext, "$x", "CommandLineAPI", info.Holder(), info.GetIsolate());
XPathResult* result = XPathEvaluator::create()->evaluate(selector, node, nullptr, XPathResult::kAnyType, ScriptValue(), exceptionState);
if (exceptionState.throwIfNeeded() || !result)
return;
if (result->resultType() == XPathResult::kNumberType) {
info.GetReturnValue().Set(toV8(result->numberValue(exceptionState), info.Holder(), info.GetIsolate()));
} else if (result->resultType() == XPathResult::kStringType) {
info.GetReturnValue().Set(toV8(result->stringValue(exceptionState), info.Holder(), info.GetIsolate()));
} else if (result->resultType() == XPathResult::kBooleanType) {
info.GetReturnValue().Set(toV8(result->booleanValue(exceptionState), info.Holder(), info.GetIsolate()));
} else {
v8::Isolate* isolate = info.GetIsolate();
v8::Local<v8::Context> context = isolate->GetCurrentContext();
v8::Local<v8::Array> nodes = v8::Array::New(isolate);
size_t index = 0;
while (Node* node = result->iterateNext(exceptionState)) {
if (exceptionState.throwIfNeeded())
return;
if (!nodes->Set(context, index++, toV8(node, info.Holder(), info.GetIsolate())).FromMaybe(false))
return;
}
info.GetReturnValue().Set(nodes);
}
exceptionState.throwIfNeeded();
}
} // namespace blink
|
Spree.user_class.class_eval do
belongs_to :supplier, class_name: 'Spree::Supplier', optional: true
has_many :variants, through: :supplier
def supplier?
supplier.present?
end
def supplier_admin?
spree_roles.map(&:name).include?("supplier_admin")
end
def market_maker?
has_admin_role?
end
def has_admin_role?
spree_roles.map(&:name).include?("admin")
end
end
|
# Possible discounts:
# - Node (administer inline with nodes)
# - Bulk amounts on nodes
# - User
# - Group of users
# - Order (this is more-or-less a voucher)
# - Shipping costs
# Possible amounts:
# - Percentage
# - Fixed amount
# Flag indicating if a discount can be combined with other discounts.
# Boolean "offer" to include in list of offers. Default to true if discount is at node level.
# Save all applied discounts when ordering in a ManyToMany relationship with Order.
|
using System;
using System.Threading.Tasks;
namespace CefSharp.Test
{
public static class <API key>
{
public static Task<<API key>> LoadRequestAsync(this IWebBrowser browser, IRequest request)
{
if(request == null)
{
throw new <API key>("request");
}
//If using .Net 4.6 then use TaskCreationOptions.<API key>
//and switch to tcs.TrySetResult below - no need for the custom extension method
var tcs = new <API key><<API key>>(TaskCreationOptions.<API key>);
EventHandler<LoadErrorEventArgs> loadErrorHandler = null;
EventHandler<<API key>> <API key> = null;
loadErrorHandler = (sender, args) =>
{
//Ignore Aborted
//Currently invalid SSL certificates which aren't explicitly allowed
//end up with CefErrorCode.Aborted, I've created the following PR
//in the hopes of getting this fixed.
if (args.ErrorCode == CefErrorCode.Aborted)
{
return;
}
//If LoadError was called then we'll remove both our handlers
//as we won't need to capture LoadingStateChanged, we know there
//was an error
browser.LoadError -= loadErrorHandler;
browser.LoadingStateChanged -= <API key>;
tcs.TrySetResult(new <API key>(args.ErrorCode, -1));
};
<API key> = (sender, args) =>
{
//Wait for while page to finish loading not just the first frame
if (!args.IsLoading)
{
var host = args.Browser.GetHost();
var navEntry = host?.<API key>();
int statusCode = navEntry?.HttpStatusCode ?? -1;
//By default 0 is some sort of error, we map that to -1
//so that it's clearer that something failed.
if (statusCode == 0)
{
statusCode = -1;
}
browser.LoadingStateChanged -= <API key>;
//This is required when using a standard <API key>
//Extension method found in the CefSharp.Internals namespace
tcs.TrySetResult(new <API key>(CefErrorCode.None, statusCode));
}
};
browser.LoadingStateChanged += <API key>;
browser.GetMainFrame().LoadRequest(request);
return tcs.Task;
}
public static Task<bool> <API key>(this IWebBrowser browser)
{
//If using .Net 4.6 then use TaskCreationOptions.<API key>
//and switch to tcs.TrySetResult below - no need for the custom extension method
var tcs = new <API key><bool>(TaskCreationOptions.<API key>);
EventHandler<<API key>> handler = null;
handler = (sender, args) =>
{
browser.<API key> -= handler;
dynamic msg = args.Message;
//Wait for while page to finish loading not just the first frame
if (msg.Type == "<API key>")
{
var details = msg.Details;
var total = (int)details.total;
var passed = (int)details.passed;
tcs.TrySetResult(total == passed);
}
else
{
tcs.TrySetException(new Exception("<API key> - Incorrect Message Type"));
}
};
browser.<API key> += handler;
return tcs.Task;
}
}
}
|
<?php
use yii\db\Migration;
class <API key> extends Migration
{
public function safeUp()
{
$this->alterColumn('vraag', 'text', 'blob');
$this->alterColumn('antwoord', 'text', 'blob');
}
public function safeDown()
{
$this->alterColumn('vraag', 'text', 'string(128)');
$this->alterColumn('antwoord', 'text', 'string(128)');
}
}
|
#ifndef CTRL_PARTITION_H
#define CTRL_PARTITION_H
#include <wx/panel.h>
//#include <wx/sizer.h>
enum CTRL_STATE
{
S_IDLE,
S_LEFT_SLIDER,
S_RIGHT_SLIDER,
S_MOVE
};
class wxPartition : public wxPanel
{
static const int slider_width = 10;
int slider_left_pos;
int slider_right_pos;
CTRL_STATE state;
unsigned n_steps;
wxMouseEvent mouse_old_pos;
bool enabled;
public:
wxPartition(wxWindow *parent,
wxWindowID winid = wxID_ANY,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString &name = wxPanelNameStr);
void SetNumberOfSteps(unsigned n_steps){this->n_steps=n_steps;}
unsigned GetNumberOfSteps(){return n_steps;}
bool SetLeftSliderPos(unsigned pos);
bool SetRightSliderPos(unsigned pos);
unsigned GetLeftSliderPos();
unsigned GetRightSliderPos();
bool Enable(bool enable=true);
void paintEvent(wxPaintEvent & evt);
void paintNow();
void render(wxDC& dc);
void mouseMoved(wxMouseEvent& event);
void mouseDown(wxMouseEvent& event);
void mouseReleased(wxMouseEvent& event);
void mouseLeftWindow(wxMouseEvent& event);
void <API key>(wxMouseEvent& event);
DECLARE_EVENT_TABLE()
};
#endif
|
Title: Music API Server
Date: 2014-06-24 12:56
Update: 2014-07-02 20:36
Tags: , API
api:
*
*
*
*
*
*
*
*
: [mawenbao/music-api-server](https://github.com/mawenbao/music-api-server)
## (debian/ubuntu)
`GOPATH`[](http://blog.atime.me/note/golang-summary.html#<API key>)
# install redis-server
sudo apt-get install redis-server
# install redis driver for golang
go get github.com/garyburd/redigo/redis
# install music api server
go get github.com/mawenbao/music-api-server
# install init script
sudo cp $GOPATH/src/github.com/mawenbao/music-api-server/tools/init-script /etc/init.d/music-api-server
# set your GOPATH in init script
sudo sed -i "s|/SET/YOUR/GOPATH/HERE|`echo $GOPATH`|" /etc/init.d/music-api-server
sudo chmod +x /etc/init.d/music-api-server
# start music api server
sudo service music-api-server start
# (optional) let music api server start on boot
sudo update-rc.d music-api-server defaults
# (optional) install logrotate config
sudo cp $GOPATH/src/github.com/mawenbao/music-api-server/tools/logrotate-config /etc/logrotate.d/music-api-server
## (debian/ubuntu)
# update and restart music-api-server
go get -u github.com/mawenbao/music-api-server
sudo service music-api-server restart
# flush redis cache
redis-cli
> flushall
## API
Demo
[http:
GET http://localhost:9099/?p=xiami&t=songlist&i=20526,1772292423&c=abc123
* `localhost:9099`:
* `p=xiami`: API:
* (xiami)
* (netease)
* `t=songlist`:
* songlist(xiami + netease): idid
* album(xiami + netease): idid
* collect(xiami): idid
* playlist(netease): id(playlist)id
* `i=20526,1772292423`: ///idid
* `c=abc123`: jsonp`abc123({songs: ...});`
{
"status": "okfailedmsg",
"msg": "statusfailed",
"songs": [
{
"name": "",
"url": "",
"artists": "",
"provider": ""
"lrc_url": "()",
}
]
}
`c=abc123`[jsonp](http://en.wikipedia.org/wiki/JSONP)
## TODO
1.
## Thanks
* [Wordpress Hermit Player](http://mufeng.me/<API key>.html)
* [API](https://github.com/yanunon/NeteaseCloudMusic/wiki/%E7%BD%91%E6%98%93%E4%BA%91%E9%9F%B3%E4%B9%90API%E5%88%86%E6%9E%90)
|
<?php
use SerializerKit\XmlSerializer;
class XmlSerializerTest extends <API key>
{
function test()
{
$xmls = new XmlSerializer;
$string = $xmls->encode(array(
'title' => 'War and Peace',
'isbn' => 123123123,
'authors' => array(
array( 'name' => 'First', 'email' => 'Email-1' ),
array( 'name' => 'Second', 'email' => 'Email-2' ),
),
));
ok( $string );
$data = $xmls->decode( $string );
ok( $data['title'] );
ok( $data['isbn'] );
ok( is_array($data['authors']) );
ok( $data['authors'][0] );
ok( $data['authors'][1] );
}
}
|
# Makefile for Sphinx documentation
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"
clean:
|
#![allow(missing_docs)]
use downcast_rs::Downcast;
use na::{DVector, RealField};
use ncollide::query::ContactId;
use crate::detection::<API key>;
use crate::material::<API key>;
use crate::object::{BodyHandle, BodySet, ColliderHandle};
use crate::solver::{ConstraintSet, <API key>};
The modeling of a contact.
pub trait ContactModel<N: RealField, Handle: BodyHandle, CollHandle: ColliderHandle>:
Downcast + Send + Sync
{
Maximum number of velocity constraint to be generated for each contact.
fn <API key>(
&self,
manifold: &<API key><N, Handle, CollHandle>,
) -> usize;
Generate all constraints for the given contact manifolds.
fn constraints(
&mut self,
parameters: &<API key><N>,
<API key>: &<API key><N>,
bodies: &dyn BodySet<N, Handle = Handle>,
ext_vels: &DVector<N>,
manifolds: &[<API key><N, Handle, CollHandle>],
ground_j_id: &mut usize,
j_id: &mut usize,
jacobians: &mut [N],
constraints: &mut ConstraintSet<N, Handle, CollHandle, ContactId>,
);
Stores all the impulses found by the solver into a cache for warmstarting.
fn cache_impulses(&mut self, constraints: &ConstraintSet<N, Handle, CollHandle, ContactId>);
}
impl_downcast!(ContactModel<N, Handle, CollHandle> where N: RealField, Handle: BodyHandle, CollHandle: ColliderHandle);
|
/**
* @file
* Money is a value object representing a monetary value. It does not use
* floating point numbers, so it avoids rounding errors.
* The only operation that may cause stray cents is split, it assures that no
* cents vanish by distributing as evenly as possible among the parts it splits into.
*
* Money has no notion of currency, so working in a single currency -- no matter
* which one -- is appropriate usage.
*
* In lack of better terminology, Money uses "dollars" and "cents".
*
* One dollar is assumed to be 100 cents.
*
* The cent number is guaranteed to be below 100.
*/
Module("Cactus.Data", function (m) {
/**
* @param natural dollars
* @param natural cents
* if > 100 then dollars are added until cents < 100.
*/
var Money = Class("Money", {
has : {
/**
* @type int
*/
amount : null
},
methods : {
BUILD : function (dollars, cents) {
var dollars = parseInt(dollars, 10);
var cents = parseInt(cents, 10);
if (dollars !== 0 && cents < 0) {
throw new Error("Money: cents < 0");
}
if (isNaN(dollars)) {
throw new Error("Money: dollars is NaN");
}
if (isNaN(cents)) {
throw new Error("Money: cents is NaN");
}
return {
amount : dollars * 100 + (dollars < 0 ? -1 * cents : cents)
};
},
/**
* @return int
*/
_getAmount : function () {
return this.amount;
},
/**
* @return natural
*/
getDollars : function () {
if (this.amount < 0) {
return Math.ceil(this.amount / 100);
} else {
return Math.floor(this.amount / 100);
}
},
/**
* @return natural
*/
getCents : function () {
if (this.amount < 0 && this.getDollars() === 0) {
return this.amount % 100;
} else {
return Math.abs(this.amount % 100);
}
},
/**
* The value with zero padded cents if < 100, and . used as the decimal
* separator.
*
* @return string
*/
toString : function () {
if (this.isNegative()) {
if (this.gt(new Money(-1, 0))) {
var cents = (-this.getCents()) < 10
? "0" + (-this.getCents()) : (-this.getCents());
return "-0." + cents;
}
}
var cents = this.getCents() < 10
? "0" + this.getCents() : this.getCents();
return this.getDollars() + "." + cents;
},
/**
* @param Money money
* @return Money
*/
add : function (money) {
return Money._fromAmount(this._getAmount() + money._getAmount());
},
/**
* @param Money money
* @return Money
*/
sub : function (money) {
return Money._fromAmount(this._getAmount() - money._getAmount());
},
/**
* @param number multiplier
* @return Money
*/
mult : function (multiplier) {
return Money._fromAmount(this._getAmount() * multiplier);
},
/**
* @return Boolean
*/
isPositive : function () {
return this._getAmount() > 0;
},
/**
* @return Boolean
*/
isNegative : function () {
return this._getAmount() < 0;
},
/**
* @return Boolean
*/
isZero : function () {
return this._getAmount() === 0;
},
/**
* @param Money money
* @return Boolean
*/
equals : function (money) {
return this._getAmount() === money._getAmount();
},
/**
* @param Money money
* @return Boolean
*/
gt : function (money) {
return this._getAmount() > money._getAmount();
},
/**
* @param Money money
* @return Boolean
*/
lt : function (money) {
return money.gt(this);
},
/**
* @param Money money
* @return Money
*/
negate : function () {
return Money._fromAmount(-this._getAmount());
},
/**
* Splits the object into parts, the remaining cents are distributed from
* the first element of the result and onward.
*
* @param int divisor
* @return Array<Money>
*/
split : function (divisor) {
var dividend = this._getAmount();
var quotient = Math.floor(dividend / divisor);
var remainder = dividend - quotient * divisor;
var res = [];
var moneyA = Money._fromAmount(quotient + 1);
var moneyB = Money._fromAmount(quotient);
for (var i = 0; i < remainder; i++) {
res.push(moneyA);
}
for (i = 0; i < divisor - remainder; i++) {
res.push(moneyB);
}
return res;
},
/**
* @return Hash{
* dollars : int,
* cents : int
* }
*/
serialize : function () {
return {
dollars : this.getDollars(),
cents : this.getCents()
};
}
}
});
/**
* @param String s
* @return Money
*/
Money.fromString = function (s) {
if (s === null) {
throw new Error("Money.fromString: String was null.");
}
if (s === "") {
throw new Error("Money.fromString: String was empty.");
}
if (!/^-?\d+(?:\.\d{2})?$/.test(s)) {
throw new Error("Money.fromString: Invalid format, got: " + s);
}
var a = s.split(".");
if (a.length === 1) {
return new Money(parseInt(a[0], 10), 0);
} else if (a.length === 2) {
return new Money(parseInt(a[0], 10), parseInt(a[1], 10));
} else {
throw new Error("Money:fromString: BUG: RegExp should have prevent this from happening.");
}
};
/**
* @param int amount
* @return Money
*/
Money._fromAmount = function (amount) {
if (amount > 0) {
return new Money(Math.floor(amount / 100), amount % 100);
} else {
return new Money(Math.ceil(amount / 100), Math.abs(amount) < 100 ? (amount % 100) : -(amount % 100));
}
};
/**
* @param Array<Money> ms
* @return Money
*/
Money.sum = function (ms) {
var sum = new Money(0, 0);
for (var i = 0; i < ms.length; i++) {
sum = sum.add(ms[i]);
}
return sum;
};
m.Money = Money;
});
|
#include "Shape.h"
#include "DynBase.h"
//#include <iostream>
using std::cout;
using std::endl;
Shape::~Shape()
{
cout << "~Shape ..." << endl;
}
void Circle::Draw()
{
cout << "Circle::Draw() ..." << endl;
}
Circle::~Circle()
{
cout << "~Circle ..." << endl;
}
void Square::Draw()
{
cout << "Square::Draw() ..." << endl;
}
Square::~Square()
{
cout << "~Square ..." << endl;
}
void Rectangle::Draw()
{
cout << "Rectangle::Draw() ..." << endl;
}
Rectangle::~Rectangle()
{
cout << "~Rectangle ..." << endl;
}
REGISTER_CLASS(Circle);
REGISTER_CLASS(Square);
REGISTER_CLASS(Rectangle);
/*class CircleRegister
{
public:
static void* NewInstance()
{
return new Rectangle;
}
private:
static Register reg_;
};
Register CircleRegister::reg_("Circle", CircleRegister::NewInstance);*/
|
'use strict';
import {
IContentsModel
} from 'jupyter-js-services';
import {
Message
} from 'phosphor-messaging';
import {
PanelLayout
} from 'phosphor-panel';
import {
Widget
} from 'phosphor-widget';
import {
FileButtons
} from './buttons';
import {
BreadCrumbs
} from './crumbs';
import {
DirListing
} from './listing';
import {
FileBrowserModel
} from './model';
import {
FILE_BROWSER_CLASS, showErrorMessage
} from './utils';
/**
* The class name added to the filebrowser crumbs node.
*/
const CRUMBS_CLASS = '<API key>';
/**
* The class name added to the filebrowser buttons node.
*/
const BUTTON_CLASS = '<API key>';
/**
* The class name added to the filebrowser listing node.
*/
const LISTING_CLASS = '<API key>';
/**
* The duration of auto-refresh in ms.
*/
const REFRESH_DURATION = 30000;
/**
* A widget which hosts a file browser.
*
* The widget uses the Jupyter Contents API to retreive contents,
* and presents itself as a flat list of files and directories with
* breadcrumbs.
*/
export
class FileBrowserWidget extends Widget {
/**
* Construct a new file browser.
*
* @param model - The file browser view model.
*/
constructor(model: FileBrowserModel) {
super();
this.addClass(FILE_BROWSER_CLASS);
this._model = model;
this._model.refreshed.connect(this._handleRefresh, this)
this._crumbs = new BreadCrumbs(model);
this._buttons = new FileButtons(model);
this._listing = new DirListing(model);
this._crumbs.addClass(CRUMBS_CLASS);
this._buttons.addClass(BUTTON_CLASS);
this._listing.addClass(LISTING_CLASS);
let layout = new PanelLayout();
layout.addChild(this._crumbs);
layout.addChild(this._buttons);
layout.addChild(this._listing);
this.layout = layout;
}
/**
* Dispose of the resources held by the file browser.
*/
dispose() {
this._model = null;
this._crumbs = null;
this._buttons = null;
this._listing = null;
super.dispose();
}
get model(): FileBrowserModel {
return this._model;
}
/**
* Get the widget factory for the widget.
*/
get widgetFactory(): (model: IContentsModel) => Widget {
return this._listing.widgetFactory;
}
/**
* Set the widget factory for the widget.
*/
set widgetFactory(factory: (model: IContentsModel) => Widget) {
this._listing.widgetFactory = factory;
}
/**
* Change directory.
*/
cd(path: string): Promise<void> {
return this._model.cd(path);
}
/**
* Open the currently selected item(s).
*
* Changes to the first directory encountered.
* Emits [[openRequested]] signals for files.
*/
open(): void {
let foundDir = false;
let items = this._model.sortedItems;
for (let item of items) {
if (!this._model.isSelected(item.name)) {
continue;
}
if (item.type === 'directory' && !foundDir) {
foundDir = true;
this._model.open(item.name).catch(error =>
showErrorMessage(this, 'Open directory', error)
);
} else {
this.model.open(item.name);
}
}
}
/**
* Create a new untitled file or directory in the current directory.
*/
newUntitled(type: string, ext?: string): Promise<IContentsModel> {
return this.model.newUntitled(type, ext);
}
/**
* Rename the first currently selected item.
*/
rename(): Promise<string> {
return this._listing.rename();
}
/**
* Cut the selected items.
*/
cut(): void {
this._listing.cut();
}
/**
* Copy the selected items.
*/
copy(): void {
this._listing.copy();
}
/**
* Paste the items from the clipboard.
*/
paste(): Promise<void> {
return this._listing.paste();
}
/**
* Delete the currently selected item(s).
*/
delete(): Promise<void> {
return this._listing.delete();
}
/**
* Duplicate the currently selected item(s).
*/
duplicate(): Promise<void> {
return this._listing.duplicate();
}
/**
* Download the currently selected item(s).
*/
download(): Promise<void> {
return this._listing.download();
}
/**
* Shut down kernels on the applicable currently selected items.
*/
shutdownKernels(): Promise<void> {
return this._listing.shutdownKernels();
}
/**
* Refresh the current directory.
*/
refresh(): Promise<void> {
return this._model.refresh().catch(
error => showErrorMessage(this, 'Refresh Error', error)
);
}
/**
* Select next item.
*/
selectNext(): void {
this._listing.selectNext();
}
/**
* Select previous item.
*/
selectPrevious(): void {
this._listing.selectPrevious();
}
/**
* A message handler invoked on an `'after-attach'` message.
*/
protected onAfterAttach(msg: Message): void {
super.onAfterAttach(msg);
this.refresh();
}
/**
* A message handler invoked on an `'after-show'` message.
*/
protected onAfterShow(msg: Message): void {
super.onAfterShow(msg);
this.refresh();
}
/**
* Handle a model refresh.
*/
private _handleRefresh(): void {
clearTimeout(this._timeoutId);
this._timeoutId = setTimeout(() => this.refresh(), REFRESH_DURATION);
}
private _model: FileBrowserModel = null;
private _crumbs: BreadCrumbs = null;
private _buttons: FileButtons = null;
private _listing: DirListing = null;
private _timeoutId = -1;
}
|
<?php
namespace ZendTest\Mvc\Controller\Plugin\TestAsset;
use Zend\Authentication\Adapter\AdapterInterface;
use Zend\Authentication\Result;
class <API key> implements AdapterInterface
{
protected $identity;
public function setIdentity($identity)
{
$this->identity = $identity;
}
public function authenticate()
{
return new Result(Result::SUCCESS, $this->identity);
}
}
|
<?php
namespace app\models;
use Yii;
/**
* This is the model class for table "solicitud_prestamo".
*
* @property integer $SPRE_ID
* @property string $PE_RUT
* @property string $SPRE_DESCRIPCION
* @property string $SPRE_FECHA
* @property string $SPRE_ESTADO
* @property string $SPRE_TEXTO
*
* @property Persona $pERUT
* @property SpreHeSolicita[] $spreHeSolicitas
*/
class SolicitudPrestamo extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'solicitud_prestamo';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['PE_RUT'], 'required'],
[['SPRE_FECHA'], 'safe'],
[['SPRE_DESCRIPCION'], 'string'],
[['PE_RUT'], 'string', 'max' => 12],
[['SPRE_TITULO'], 'string', 'max' => 50],
[['SPRE_ESTADO'], 'string', 'max' => 20]
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'SPRE_ID' => 'ID',
'PE_RUT' => 'Persona',
'SPRE_TITULO' => 'Título',
'SPRE_FECHA' => 'Fecha',
'SPRE_ESTADO' => 'Estado',
'SPRE_DESCRIPCION' => 'Descripción',
];
}
/**
* @return \yii\db\ActiveQuery
*/
public function getPERUT()
{
return $this->hasOne(Persona::className(), ['PE_RUT' => 'PE_RUT']);
}
/**
* @return \yii\db\ActiveQuery
*/
public function getSpreHeSolicitas()
{
return $this->hasMany(SpreHeSolicita::className(), ['SPRE_ID' => 'SPRE_ID']);
}
}
|
% File: api.pl
% Purpose: prolog api for elf application
% Author: Roger Evans
% Version: 1.0
% Date: 21/12/2013
%
% (c) Copyright 2013, University of Brighton
% application api from prolog
nimrodel(Model, Title, String) :-
nimrodel(['-model', Model, '-title', Title, String]).
nimrodel(Model, String) :-
nimrodel(['-model', Model, String]).
nimrodel(X) :- atom(X), !,
nimrodel([X]).
nimrodel(X) :-
datr_query('nimrodel.MAIN', [arglist | X], _V).
nimrodel_query(Index, Path) :-
datr_theorem('nimrodel.STRING-QUERY', [Index | Path]).
|
@(message: String,books : List[models.Book], conditions : List[models.Condition],
requests : List[models.CurrentRequest], bookSelected : Long , price : String ,conditionSelected : Long )
@<API key> = @{ helper.FieldConstructor(<TwitterConsumerkey>.render) }
@main("My Requests") {
<div class="container">
<div class="row main-features">
<br>
<div class="span7">
<div class="well">
<h3>Create a Book Request</h3>
@helper.form(action = routes.CurrentRequest.newRequest()) {
<div class="span2">
<span class="label label-inverse">Book </span>
</div>
<div class="span4">
<select name="bookKey" name="bookKey" >
@for(book <- books) {
<option value=@book.getPrimaryKey()
@if(bookSelected == book.getPrimaryKey()){selected}>@book.getTitle()</option>
}
</select>
</div>
<table class="table table-condensed table-striped">
<thead>
<tr>
<th>
<span class="label label-info">Version </span>
</th>
<th>
<span class="label label-info">ISBN </span>
</th>
<th>
<span class="label label-info">Bookstore Price </span>
</th>
<th>
<span class="label label-info">Cover </span>
</th>
<th></th>
</tr>
</thead>
<tbody>
<tr>
@for(book <- books) {
@if(bookSelected == book.getPrimaryKey()){
<td>
<label>
<b>@book.getEdition()</b>
</label>
</td>
<td>
<label>
<b>@book.getIsbn()</b>
</label>
</td>
<td>
<label>
<b>@book.getBookStorePrice()</b>
</label>
</td>
<td>
<img src="http://covers.openlibrary.org/b/isbn/@book.getIsbn()-S.jpg">
</td>
}}
</tr>
</tbody>
</table>
<div class="span2">
<span class="label label-inverse">Condition</span>
</div>
<div class="span4">
<select name="conditionKey">
@for(condition <- conditions) {
<option @if(conditionSelected == condition.getPrimaryKey()){ selected }
value=@condition.getPrimaryKey()>@condition.getName()</option>
}
</select>
</div>
<div class="span2">
<span class="label label-inverse">Price</span>
</div>
<div class="span3">
<input name="price" type="text" value="@price" class="input-medium"> <br>
<br>
</div>
<br>
<br>
<div class="span5">
<input type="submit" class="btn btn-primary btn-large btn-block" id="newRequest" value="Create New Request" />
</div>
}
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</div>
</div>
<div class="span7">
<p>
@message
</p>
</div>
<div class="span7">
<table class="table table-condensed table-striped">
<thead>
<tr>
<th>
<span class="label label-info">Book </span>
</th>
<th>
<span class="label label-info">Condition </span>
</th>
<th>
<span class="label label-info">Request Price </span>
</th>
<th></th>
</tr>
</thead>
<tbody>
@for(request <- requests) {
<tr>
<td>
@request.getBook().getTitle()
</td>
<td>
@request.getCondition().getName()
</td>
<td>
<input type="text" value=@request.getPrice() class="input-medium">
</td>
<td>
<div class="btn-group">
<a class="btn btn-small btn-primary">Update</a>
</div>
</td>
</tr>
}
</tbody>
</table>
@if(requests.size() ==0){ No Current Requests}
</div>
</div>
</div>
}
|
<?php
namespace app\models;
use app\models\query\ActionQuery;
use app\models\query\CommentQuery;
use Yii;
use yii\db\ActiveRecord;
/**
* This is the model class for table "comment".
*
* @property integer $id
* @property integer $action_id
* @property string $content
*
* @property Action $action
*/
class Comment extends ActiveRecord
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'comment';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['action_id', 'content'], 'required'],
[['action_id'], 'integer'],
[['content'], 'string', 'max' => 255],
[['action_id'], 'exist', 'skipOnError' => true, 'targetClass' => Action::className(), 'targetAttribute' => ['action_id' => 'id']],
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'id' => Yii::t('app', 'ID'),
'action_id' => Yii::t('app', 'Action ID'),
'content' => Yii::t('app', 'Content'),
];
}
/**
* @return ActionQuery
*/
public function getAction()
{
return $this->hasOne(Action::className(), ['id' => 'action_id'])->inverseOf('comments');
}
/**
* @inheritdoc
* @return CommentQuery the active query used by this AR class.
*/
public static function find()
{
return new CommentQuery(get_called_class());
}
}
|
<!DOCTYPE html>
<html lang='en'>
<head>
<title>Ligs and Pseudo Test</title>
<link href="b.css" media="screen" rel="stylesheet" type="text/css" />
</head>
<body>
<p data-a="hello ">Hello world how are you today?</p>
<p>This is a test of the use of ligatures to encode icons in a fun and cool way. Now you can insert graphics just through very simple text edditing, kind of like having emoticons!</p>
<p>Sadly ligs aren't supported in IE before version 10!</p>
<p>We will also test the <span aria-hidden="true" data-icon="heroku"> </span> for the CSS :before and :after pseudo elements</p>
</body>
</html>
|
#include "chrome/browser/net/<API key>.h"
#include "base/bind.h"
#include "base/compiler_specific.h"
#include "base/message_loop.h"
#include "chrome/browser/profiles/profile.h"
#include "content/public/common/url_fetcher.h"
#include "net/base/load_flags.h"
#include "net/url_request/<API key>.h"
#include "net/url_request/url_request_status.h"
<API key>::<API key>(
net::<API key>* context)
: <API key>(weak_factory_(this)),
task_is_pending_(false),
context_(context) {
DCHECK(CalledOnValidThread());
}
<API key>::~<API key>() {
DCHECK(CalledOnValidThread());
}
// static
void <API key>::Shutdown() {
net::SdchManager::Shutdown();
}
void <API key>::Schedule(const GURL& dictionary_url) {
DCHECK(CalledOnValidThread());
// Avoid pushing duplicate copy onto queue. We may fetch this url again later
// and get a different dictionary, but there is no reason to have it in the
// queue twice at one time.
if (!fetch_queue_.empty() && fetch_queue_.back() == dictionary_url) {
net::SdchManager::SdchErrorRecovery(
net::SdchManager::<API key>);
return;
}
if (attempted_load_.find(dictionary_url) != attempted_load_.end()) {
net::SdchManager::SdchErrorRecovery(
net::SdchManager::<API key>);
return;
}
attempted_load_.insert(dictionary_url);
fetch_queue_.push(dictionary_url);
ScheduleDelayedRun();
}
void <API key>::ScheduleDelayedRun() {
if (fetch_queue_.empty() || current_fetch_.get() || task_is_pending_)
return;
MessageLoop::current()->PostDelayedTask(FROM_HERE,
base::Bind(&<API key>::StartFetching,
weak_factory_.GetWeakPtr()),
base::TimeDelta::FromMilliseconds(<API key>));
task_is_pending_ = true;
}
void <API key>::StartFetching() {
DCHECK(task_is_pending_);
task_is_pending_ = false;
DCHECK(context_.get());
current_fetch_.reset(content::URLFetcher::Create(
fetch_queue_.front(), content::URLFetcher::GET, this));
fetch_queue_.pop();
current_fetch_->SetRequestContext(context_.get());
current_fetch_->SetLoadFlags(net::<API key> |
net::<API key>);
current_fetch_->Start();
}
void <API key>::OnURLFetchComplete(
const net::URLFetcher* source) {
if ((200 == source->GetResponseCode()) &&
(source->GetStatus().status() == net::URLRequestStatus::SUCCESS)) {
std::string data;
source->GetResponseAsString(&data);
net::SdchManager::Global()->AddSdchDictionary(data, source->GetURL());
}
current_fetch_.reset(NULL);
ScheduleDelayedRun();
}
|
<?php
use yii\helpers\Html;
use mdm\admin\models\Assignment;
use backend\models\UserBackend;
use yii\base\Object;
$user = new UserBackend();
$list = UserBackend::find()->where([])->asArray()->all();
//print_r($list);
//echo "<br>";
$euserId = "";
for($i=0;$i<count($list);$i++){
$tmpId = $list[$i]["id"];
$assign = new Assignment($tmpId);
$test = $assign->getItems();
//print_r($test);
//echo "<br>";
if(array_key_exists("",$test["assigned"])){
$euserId = $tmpId;
break;
}
}
//echo "userId=".$euserId;
/* @var $this \yii\web\View */
/* @var $content string */
if (Yii::$app->controller->action->id === 'login') {
/**
* Do not use this code in your template. Remove it.
* Instead, use the code $this->layout = '//main-login'; in your controller.
*/
echo $this->render(
'main-login',
['content' => $content]
);
} else {
if (class_exists('backend\assets\AppAsset')) {
backend\assets\AppAsset::register($this);
} else {
app\assets\AppAsset::register($this);
}
dmstr\web\AdminLteAsset::register($this);
$directoryAsset = Yii::$app->assetManager->getPublishedUrl('@vendor/almasaeed2010/adminlte/dist');
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
<meta charset="<?= Yii::$app->charset ?>"/>
<meta name="viewport" content="width=device-width, initial-scale=1">
<?= Html::csrfMetaTags() ?>
<title><?= Html::encode($this->title) ?></title>
<?php $this->head() ?>
</head>
<body class="hold-transition <?= \dmstr\helpers\AdminLteHelper::skinClass() ?> sidebar-mini">
<?php $this->beginBody() ?>
<div class="wrapper">
<?= $this->render(
'header.php',
['directoryAsset' => $directoryAsset,'euserId'=>$euserId]
) ?>
<?= $this->render(
'left.php',
['directoryAsset' => $directoryAsset,'euserId'=>$euserId]
)
?>
<?= $this->render(
'content.php',
['content' => $content, 'directoryAsset' => $directoryAsset]
) ?>
</div>
<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>
<?php } ?>
|
C Copyright (c) 2007-2017 National Technology & Engineering Solutions of
C Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
C NTESS, the U.S. Government retains certain rights in this software.
C
C Redistribution and use in source and binary forms, with or without
C modification, are permitted provided that the following conditions are
C met:
C
C * Redistributions of source code must retain the above copyright
C notice, this list of conditions and the following disclaimer.
C
C * Redistributions in binary form must reproduce the above
C copyright notice, this list of conditions and the following
C disclaimer in the documentation and/or other materials provided
C with the distribution.
C
C * Neither the name of NTESS nor the names of its
C contributors may be used to endorse or promote products derived
C from this software without specific prior written permission.
C
C THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
C "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
C LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
C A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
C OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
C SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
C LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
C DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
C THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
C (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
C OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
C
C========================================================================
*DECK, SETON0
SUBROUTINE SETON0(ICONA,NELTN,SOLEA,SOLENA,IDBLK,XA,YA,ZA,ISTP,
& ITT,iblk)
C
C *********************************************************************
C
C Subroutine SETON0 extracts nodal values of shell element variables by
C looping over each element and summing the value of the variable
C in that element to each node in the connectivity list for that
C element. Then the nodal summation of element variables is divided
C by the number of elements that contributed to that node (resulting
C in a nodal average of the element value.) This is done for the old
C mesh elements and nodes to facilitate interpolation.
C
C Each element block must be processed independently in order to
C avoid averaging element variables across material boundaries.
C Note: the last set of DO loops acts over all nodes; to make sense
C one element block must be completely processed before another
C element block is sent into this subroutine.
C
C Calls subroutine VOL
C
c Called by MAPVAR
C
C *********************************************************************
C
C ICONA mesh-A connectivity (1:nelnda,1:numeba)
C NELTN number of elements tied to each node (1:nodesa)
C SOLEA element variables (1:numeba,1:nvarel)
C SOLENA element variables at nodes (1:nodesa,1:nvarel)
C IDBLK current element block I.D.
C XA,YA,ZA coordinates
C XX,YY,ZZ vector of coordinates of nodes for an element
C ISTP current time step
C ITT truth table
C iblk element block being processed (not ID)
C
C *********************************************************************
C
include 'aexds1.blk'
include 'aexds2.blk'
include 'amesh.blk'
include 'ebbyeb.blk'
include 'ex2tp.blk'
include 'tapes.blk'
C
DIMENSION ICONA(NELNDA,*), NELTN(*)
DIMENSION SOLEA(NUMEBA,*), SOLENA(NODESA,NVAREL), ITT(NVAREL,*)
DIMENSION XA(*), YA(*), ZA(*), XX(27), YY(27), ZZ(27)
C
C *********************************************************************
C
NNODES = 4
DO 10 I = 1, NODESA
NELTN(I) = 0
DO 10 J = 1, NVAREL
SOLENA(I,J) = 0.
10 CONTINUE
C
DO 20 NEL = 1, NUMEBA
DO 30 I = 1, NNODES
C
C number of elements associated with each node - used for
C computing an average later on
C
NELTN(ICONA(I,NEL)) = NELTN(ICONA(I,NEL)) + 1
30 CONTINUE
20 CONTINUE
C
DO 40 IVAR = 1, NVAREL
IF (ITT(IVAR,iblk) .EQ. 0)GO TO 40
CALL EXGEV(NTP2EX,ISTP,IVAR,IDBLK,NUMEBA,SOLEA(1,IVAR),IERR)
C
IF (NAMVAR(nvargp+IVAR)(1:6) .EQ. 'ELMASS') THEN
C
C replace element mass with nodal density for interpolation
C
DO 50 IEL = 1, NUMEBA
DO 60 I = 1, NNODES
XX(I) = XA(ICONA(I,IEL))
YY(I) = YA(ICONA(I,IEL))
ZZ(I) = ZA(ICONA(I,IEL))
60 CONTINUE
CALL VOL(ITYPE,XX,YY,ZZ,VOLUME)
SOLEA(IEL,IVAR) = SOLEA(IEL,IVAR) / VOLUME
50 CONTINUE
END IF
C
C accumulate element variables to nodes
C
DO 70 NEL = 1, NUMEBA
DO 80 I = 1, NNODES
SOLENA(ICONA(I,NEL),IVAR) =
& SOLENA(ICONA(I,NEL),IVAR) + SOLEA(NEL,IVAR)
80 CONTINUE
70 CONTINUE
C
C divide by number of elements contributing to each node (average)
C
DO 90 I = 1, NODESA
IF(NELTN(I) .NE. 0)THEN
SOLENA(I,IVAR) = SOLENA(I,IVAR) / float(NELTN(I))
END IF
90 CONTINUE
40 CONTINUE
RETURN
END
|
<!
Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
for details. All rights reserved. Use of this source code is governed by a
BSD-style license that can be found in the LICENSE file.
<div *ngIf="pending"
class="btn spinner">
<material-spinner></material-spinner>
</div>
<material-button #yesButton
*ngIf="!pending && yesDisplayed"
class="btn btn-yes"
[autoFocus]="yesAutoFocus"
[raised]="yesRaised || raised"
[class.highlighted]="yesHighlighted"
[disabled]="yesDisabled || disabled"
[attr.aria-label]="yesAriaLabel"
[attr.aria-describedby]="yesAriaDescribedBy"
(trigger)="onYes($event)">
{{yesText}}
</material-button>
<material-button #noButton
*ngIf="!pending && noDisplayed"
class="btn btn-no"
[autoFocus]="noAutoFocus"
[raised]="raised"
[disabled]="noDisabled || disabled"
[attr.aria-label]="noAriaLabel"
[attr.aria-describedby]="noAriaDescribedBy"
(trigger)="onNo($event)">
{{noText}}
</material-button>
|
package de.uni.freiburg.iig.telematik.wolfgang.properties.check;
import javax.swing.JPanel;
import javax.swing.JPopupMenu;
import de.invation.code.toval.graphic.component.DisplayFrame;
import de.invation.code.toval.graphic.util.SpringUtilities;
import de.uni.freiburg.iig.telematik.sepia.petrinet.cpn.properties.cwn.CWNProperties;
import de.uni.freiburg.iig.telematik.sepia.petrinet.properties.<API key>;
import javax.swing.SpringLayout;
public class <API key> extends <API key><CWNProperties> {
private static final long serialVersionUID = -950169446391727139L;
private <API key> lblStructure;
private <API key> lblInOutPlaces;
private <API key> lblConnectedness;
private <API key> lblValidMarking;
private <API key> lblCFDependency;
private <API key> <API key>;
private <API key> lblCompletion;
private <API key> lblOptionComplete;
private <API key> lblBounded;
@Override
protected String getHeadline() {
return "Colored WF Net Check";
}
@Override
protected void addSpecificFields(JPanel pnl) {
lblStructure = new <API key>("\u2022 CWN Structure", <API key>.UNKNOWN);
pnl.add(lblStructure);
JPanel pnlStructureSub = new JPanel(new SpringLayout());
pnl.add(pnlStructureSub);
lblInOutPlaces = new <API key>("\u2022 Valid InOut Places", <API key>.UNKNOWN);
pnlStructureSub.add(lblInOutPlaces);
lblConnectedness = new <API key>("\u2022 Strong Connectedness", <API key>.UNKNOWN);
pnlStructureSub.add(lblConnectedness);
lblValidMarking = new <API key>("\u2022 Valid Initial Marking", <API key>.UNKNOWN);
pnlStructureSub.add(lblValidMarking);
lblCFDependency = new <API key>("\u2022 Control Flow Dependency", <API key>.UNKNOWN);
pnlStructureSub.add(lblCFDependency);
SpringUtilities.makeCompactGrid(pnlStructureSub, pnlStructureSub.getComponentCount(), 1, 15, 0, 0, 0);
pnl.add(new JPopupMenu.Separator());
lblBounded = new <API key>("\u2022 Is Bounded", <API key>.UNKNOWN);
pnl.add(lblBounded);
pnl.add(new JPopupMenu.Separator());
lblOptionComplete = new <API key>("\u2022 Option To Complete", <API key>.UNKNOWN);
pnl.add(lblOptionComplete);
pnl.add(new JPopupMenu.Separator());
lblCompletion = new <API key>("\u2022 Proper Completion", <API key>.UNKNOWN);
pnl.add(lblCompletion);
pnl.add(new JPopupMenu.Separator());
<API key> = new <API key>("\u2022 No Dead Transitions", <API key>.UNKNOWN);
pnl.add(<API key>);
}
@Override
public void resetFieldContent() {
super.updateFieldContent(null, null);
lblStructure.<API key>(<API key>.UNKNOWN);
lblInOutPlaces.<API key>(<API key>.UNKNOWN);
lblConnectedness.<API key>(<API key>.UNKNOWN);
lblValidMarking.<API key>(<API key>.UNKNOWN);
lblCFDependency.<API key>(<API key>.UNKNOWN);
lblBounded.<API key>(<API key>.UNKNOWN);
lblOptionComplete.<API key>(<API key>.UNKNOWN);
lblCompletion.<API key>(<API key>.UNKNOWN);
<API key>.<API key>(<API key>.UNKNOWN);
}
@Override
public void updateFieldContent(CWNProperties checkResult, Exception exception) {
super.updateFieldContent(checkResult, exception);
lblStructure.<API key>(checkResult.hasCWNStructure);
lblInOutPlaces.<API key>(checkResult.validInOutPlaces);
lblConnectedness.<API key>(checkResult.strongConnectedness);
lblValidMarking.<API key>(checkResult.validInitialMarking);
lblCFDependency.<API key>(checkResult.<API key>);
lblBounded.<API key>(checkResult.isBounded);
lblOptionComplete.<API key>(checkResult.<API key>);
lblCompletion.<API key>(checkResult.<API key>);
<API key>.<API key>(checkResult.noDeadTransitions);
}
public static void main(String[] args) {
<API key> view = new <API key>();
view.setUpGui();
view.updateFieldContent(new CWNProperties(), null);
new DisplayFrame(view, true);
}
}
|
package nom.bdezonia.zorbage.algorithm;
import java.math.BigDecimal;
import java.math.MathContext;
import nom.bdezonia.zorbage.algebra.Addition;
import nom.bdezonia.zorbage.algebra.Algebra;
import nom.bdezonia.zorbage.algebra.Conjugate;
import nom.bdezonia.zorbage.algebra.Invertible;
import nom.bdezonia.zorbage.algebra.Multiplication;
import nom.bdezonia.zorbage.algebra.RealConstants;
import nom.bdezonia.zorbage.algebra.SetComplex;
import nom.bdezonia.zorbage.algebra.Trigonometric;
import nom.bdezonia.zorbage.algebra.Unity;
import nom.bdezonia.zorbage.datasource.IndexedDataSource;
/**
*
* @author Barry DeZonia
*
*/
public class InvFFT {
// do not instantiate
private InvFFT() {}
/**
*
* @param <T>
* @param <U>
* @param <V>
* @param <W>
* @param cmplxAlg
* @param realAlg
* @param a
* @param b
*/
public static
<T extends Algebra<T,U> & Addition<U> & Multiplication<U> & Conjugate<U>,
U extends SetComplex<W>,
V extends Algebra<V,W> & Trigonometric<W> & RealConstants<W> & Unity<W> &
Multiplication<W> & Addition<W> & Invertible<W>,
W>
void compute(T cmplxAlg, V realAlg, IndexedDataSource<U> a,IndexedDataSource<U> b)
{
long aSize = a.size();
long bSize = b.size();
if (aSize != FFT.enclosingPowerOf2(aSize))
throw new <API key>("input size is not a power of 2");
if (aSize != bSize)
throw new <API key>("output size does not match input size");
U one_over_n = cmplxAlg.construct((BigDecimal.ONE.divide(BigDecimal.valueOf(aSize), new MathContext(100))).toString());
nom.bdezonia.zorbage.algorithm.Conjugate.compute(cmplxAlg, a, b);
FFT.compute(cmplxAlg, realAlg, b, b);
nom.bdezonia.zorbage.algorithm.Conjugate.compute(cmplxAlg, b, b);
Scale.compute(cmplxAlg, one_over_n, b, b);
}
}
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.