text
stringlengths 2
99.9k
| meta
dict |
---|---|
export default {
plugins: ['~/plugins/missing.js']
}
| {
"pile_set_name": "Github"
} |
function WPATH(s) {
var index = s.lastIndexOf("/");
var path = -1 === index ? "com.foo.widget/" + s : s.substring(0, index) + "/com.foo.widget/" + s.substring(index + 1);
return 0 !== path.indexOf("/") ? "/" + path : path;
}
module.exports = [ {
isApi: true,
priority: 1000.0001,
key: "TableViewRow",
style: {
height: "50dp"
}
} ]; | {
"pile_set_name": "Github"
} |
#!/bin/sh
# install - install a program, script, or datafile
scriptversion=2011-11-20.07; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
# following copyright and license.
#
# Copyright (C) 1994 X Consortium
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
# sell copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#
# Except as contained in this notice, the name of the X Consortium shall not
# be used in advertising or otherwise to promote the sale, use or other deal-
# ings in this Software without prior written authorization from the X Consor-
# tium.
#
#
# FSF changes to this file are in the public domain.
#
# Calling this script install-sh is preferred over install.sh, to prevent
# 'make' implicit rules from creating a file called install from it
# when there is no Makefile.
#
# This script is compatible with the BSD install script, but was written
# from scratch.
nl='
'
IFS=" "" $nl"
# set DOITPROG to echo to test this script
# Don't use :- since 4.3BSD and earlier shells don't like it.
doit=${DOITPROG-}
if test -z "$doit"; then
doit_exec=exec
else
doit_exec=$doit
fi
# Put in absolute file names if you don't have them in your path;
# or use environment vars.
chgrpprog=${CHGRPPROG-chgrp}
chmodprog=${CHMODPROG-chmod}
chownprog=${CHOWNPROG-chown}
cmpprog=${CMPPROG-cmp}
cpprog=${CPPROG-cp}
mkdirprog=${MKDIRPROG-mkdir}
mvprog=${MVPROG-mv}
rmprog=${RMPROG-rm}
stripprog=${STRIPPROG-strip}
posix_glob='?'
initialize_posix_glob='
test "$posix_glob" != "?" || {
if (set -f) 2>/dev/null; then
posix_glob=
else
posix_glob=:
fi
}
'
posix_mkdir=
# Desired mode of installed file.
mode=0755
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
mvcmd=$mvprog
rmcmd="$rmprog -f"
stripcmd=
src=
dst=
dir_arg=
dst_arg=
copy_on_change=false
no_target_directory=
usage="\
Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
or: $0 [OPTION]... SRCFILES... DIRECTORY
or: $0 [OPTION]... -t DIRECTORY SRCFILES...
or: $0 [OPTION]... -d DIRECTORIES...
In the 1st form, copy SRCFILE to DSTFILE.
In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
In the 4th, create DIRECTORIES.
Options:
--help display this help and exit.
--version display version info and exit.
-c (ignored)
-C install only if different (preserve the last data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
-s $stripprog installed files.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
"
while test $# -ne 0; do
case $1 in
-c) ;;
-C) copy_on_change=true;;
-d) dir_arg=true;;
-g) chgrpcmd="$chgrpprog $2"
shift;;
--help) echo "$usage"; exit $?;;
-m) mode=$2
case $mode in
*' '* | *' '* | *'
'* | *'*'* | *'?'* | *'['*)
echo "$0: invalid mode: $mode" >&2
exit 1;;
esac
shift;;
-o) chowncmd="$chownprog $2"
shift;;
-s) stripcmd=$stripprog;;
-t) dst_arg=$2
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
shift;;
-T) no_target_directory=true;;
--version) echo "$0 $scriptversion"; exit $?;;
--) shift
break;;
-*) echo "$0: invalid option: $1" >&2
exit 1;;
*) break;;
esac
shift
done
if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
# When -d is used, all remaining arguments are directories to create.
# When -t is used, the destination is already specified.
# Otherwise, the last argument is the destination. Remove it from $@.
for arg
do
if test -n "$dst_arg"; then
# $@ is not empty: it contains at least $arg.
set fnord "$@" "$dst_arg"
shift # fnord
fi
shift # arg
dst_arg=$arg
# Protect names problematic for 'test' and other utilities.
case $dst_arg in
-* | [=\(\)!]) dst_arg=./$dst_arg;;
esac
done
fi
if test $# -eq 0; then
if test -z "$dir_arg"; then
echo "$0: no input file specified." >&2
exit 1
fi
# It's OK to call 'install-sh -d' without argument.
# This can happen when creating conditional directories.
exit 0
fi
if test -z "$dir_arg"; then
do_exit='(exit $ret); exit $ret'
trap "ret=129; $do_exit" 1
trap "ret=130; $do_exit" 2
trap "ret=141; $do_exit" 13
trap "ret=143; $do_exit" 15
# Set umask so as not to create temps with too-generous modes.
# However, 'strip' requires both read and write access to temps.
case $mode in
# Optimize common cases.
*644) cp_umask=133;;
*755) cp_umask=22;;
*[0-7])
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw='% 200'
fi
cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
*)
if test -z "$stripcmd"; then
u_plus_rw=
else
u_plus_rw=,u+rw
fi
cp_umask=$mode$u_plus_rw;;
esac
fi
for src
do
# Protect names problematic for 'test' and other utilities.
case $src in
-* | [=\(\)!]) src=./$src;;
esac
if test -n "$dir_arg"; then
dst=$src
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
# might cause directories to be created, which would be especially bad
# if $src (and thus $dsttmp) contains '*'.
if test ! -f "$src" && test ! -d "$src"; then
echo "$0: $src does not exist." >&2
exit 1
fi
if test -z "$dst_arg"; then
echo "$0: no destination specified." >&2
exit 1
fi
dst=$dst_arg
# If destination is a directory, append the input filename; won't work
# if double slashes aren't ignored.
if test -d "$dst"; then
if test -n "$no_target_directory"; then
echo "$0: $dst_arg: Is a directory" >&2
exit 1
fi
dstdir=$dst
dst=$dstdir/`basename "$src"`
dstdir_status=0
else
# Prefer dirname, but fall back on a substitute if dirname fails.
dstdir=`
(dirname "$dst") 2>/dev/null ||
expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
X"$dst" : 'X\(//\)[^/]' \| \
X"$dst" : 'X\(//\)$' \| \
X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
echo X"$dst" |
sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
s//\1/
q
}
/^X\(\/\/\)[^/].*/{
s//\1/
q
}
/^X\(\/\/\)$/{
s//\1/
q
}
/^X\(\/\).*/{
s//\1/
q
}
s/.*/./; q'
`
test -d "$dstdir"
dstdir_status=$?
fi
fi
obsolete_mkdir_used=false
if test $dstdir_status != 0; then
case $posix_mkdir in
'')
# Create intermediate dirs using mode 755 as modified by the umask.
# This is like FreeBSD 'install' as of 1997-10-28.
umask=`umask`
case $stripcmd.$umask in
# Optimize common cases.
*[2367][2367]) mkdir_umask=$umask;;
.*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
*[0-7])
mkdir_umask=`expr $umask + 22 \
- $umask % 100 % 40 + $umask % 20 \
- $umask % 10 % 4 + $umask % 2
`;;
*) mkdir_umask=$umask,go-w;;
esac
# With -d, create the new directory with the user-specified mode.
# Otherwise, rely on $mkdir_umask.
if test -n "$dir_arg"; then
mkdir_mode=-m$mode
else
mkdir_mode=
fi
posix_mkdir=false
case $umask in
*[123567][0-7][0-7])
# POSIX mkdir -p sets u+wx bits regardless of umask, which
# is incompatible with FreeBSD 'install' when (umask & 300) != 0.
;;
*)
tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
if (umask $mkdir_umask &&
exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
then
if test -z "$dir_arg" || {
# Check for POSIX incompatibilities with -m.
# HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
# other-writable bit of parent directory when it shouldn't.
# FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
ls_ld_tmpdir=`ls -ld "$tmpdir"`
case $ls_ld_tmpdir in
d????-?r-*) different_mode=700;;
d????-?--*) different_mode=755;;
*) false;;
esac &&
$mkdirprog -m$different_mode -p -- "$tmpdir" && {
ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
}
}
then posix_mkdir=:
fi
rmdir "$tmpdir/d" "$tmpdir"
else
# Remove any dirs left behind by ancient mkdir implementations.
rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
fi
trap '' 0;;
esac;;
esac
if
$posix_mkdir && (
umask $mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
)
then :
else
# The umask is ridiculous, or mkdir does not conform to POSIX,
# or it failed possibly due to a race condition. Create the
# directory the slow way, step by step, checking for races as we go.
case $dstdir in
/*) prefix='/';;
[-=\(\)!]*) prefix='./';;
*) prefix='';;
esac
eval "$initialize_posix_glob"
oIFS=$IFS
IFS=/
$posix_glob set -f
set fnord $dstdir
shift
$posix_glob set +f
IFS=$oIFS
prefixes=
for d
do
test X"$d" = X && continue
prefix=$prefix$d
if test -d "$prefix"; then
prefixes=
else
if $posix_mkdir; then
(umask=$mkdir_umask &&
$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
# Don't fail if two instances are running concurrently.
test -d "$prefix" || exit 1
else
case $prefix in
*\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
*) qprefix=$prefix;;
esac
prefixes="$prefixes '$qprefix'"
fi
fi
prefix=$prefix/
done
if test -n "$prefixes"; then
# Don't fail if two instances are running concurrently.
(umask $mkdir_umask &&
eval "\$doit_exec \$mkdirprog $prefixes") ||
test -d "$dstdir" || exit 1
obsolete_mkdir_used=true
fi
fi
fi
if test -n "$dir_arg"; then
{ test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
{ test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
else
# Make a couple of temp file names in the proper directory.
dsttmp=$dstdir/_inst.$$_
rmtmp=$dstdir/_rm.$$_
# Trap to clean up those temp files at exit.
trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
# Copy the file name to the temp name.
(umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
# and set any options; do chmod last to preserve setuid bits.
#
# If any of these fail, we abort the whole thing. If we want to
# ignore errors from any of these, just make sure not to ignore
# errors from the above "$doit $cpprog $src $dsttmp" command.
#
{ test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
{ test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
{ test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
{ test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
# If -C, don't bother to copy if it wouldn't change the file.
if $copy_on_change &&
old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
eval "$initialize_posix_glob" &&
$posix_glob set -f &&
set X $old && old=:$2:$4:$5:$6 &&
set X $new && new=:$2:$4:$5:$6 &&
$posix_glob set +f &&
test "$old" = "$new" &&
$cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
then
rm -f "$dsttmp"
else
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
# The rename failed, perhaps because mv can't rename something else
# to itself, or perhaps because mv is so ancient that it does not
# support -f.
{
# Now remove or move aside any old file at destination location.
# We try this two ways since rm can't unlink itself on some
# systems and the destination file might be busy for other
# reasons. In this case, the final cleanup might fail but the new
# file should still install successfully.
{
test ! -f "$dst" ||
$doit $rmcmd -f "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
{ $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
}
} &&
# Now rename the file to the real destination.
$doit $mvcmd "$dsttmp" "$dst"
}
fi || exit 1
trap '' 0
fi
done
# Local variables:
# eval: (add-hook 'write-file-hooks 'time-stamp)
# time-stamp-start: "scriptversion="
# time-stamp-format: "%:y-%02m-%02d.%02H"
# time-stamp-time-zone: "UTC"
# time-stamp-end: "; # UTC"
# End:
| {
"pile_set_name": "Github"
} |
CACHE MANIFEST
# 2013-04-04
CACHE:
/favicon.ico
index.html
styles.css
files/inconsolata.woff
js/esprima.js
js/rawdeflate.js
js/rawinflate.js
js/codemirror/codemirror.css
js/codemirror/codemirror.js
js/codemirror/mode/css.js
js/codemirror/mode/htmlmixed.js
js/codemirror/mode/javascript.js
js/codemirror/mode/xml.js
NETWORK:
*
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2019 The GraphicsFuzz Project Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.graphicsfuzz.common.ast.type;
public class LocationLayoutQualifier implements LayoutQualifier {
private final int locationValue;
public LocationLayoutQualifier(int locationValue) {
this.locationValue = locationValue;
}
@Override
public String toString() {
return "location = " + locationValue;
}
}
| {
"pile_set_name": "Github"
} |
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NorthwindOptimisticConcurrencyTableAdapters;
[System.ComponentModel.DataObject]
public class ProductsOptimisticConcurrencyBLL
{
private ProductsOptimisticConcurrencyTableAdapter _productsAdapter = null;
protected ProductsOptimisticConcurrencyTableAdapter Adapter
{
get
{
if (_productsAdapter == null)
_productsAdapter = new ProductsOptimisticConcurrencyTableAdapter();
return _productsAdapter;
}
}
[System.ComponentModel.DataObjectMethodAttribute
(System.ComponentModel.DataObjectMethodType.Select, true)]
public NorthwindOptimisticConcurrency.ProductsOptimisticConcurrencyDataTable GetProducts()
{
return Adapter.GetProducts();
}
} | {
"pile_set_name": "Github"
} |
放射性同位元素等の事業所外運搬に係る危険時における措置に関する規則
(昭和五十六年五月十八日運輸省令第二十二号)最終改正:平成二四年九月一四日国土交通省令第七五号
放射性同位元素等による放射線障害の防止に関する法律
(昭和三十二年法律第百六十七号)第三十三条第一項
及び第三項
並びに第四十二条第一項
の規定に基づき、放射性同位元素等の事業所外運搬に係る危険時における措置に関する規則を次のように定める。
(応急の措置)
第一条
放射性同位元素等による放射線障害の防止に関する法律
(昭和三十二年法律第百六十七号。以下「法」という。)第三十三条第一項
の規定に基づき、許可届出使用者(表示付認証機器使用者を含む。)、届出販売業者、届出賃貸業者及び許可廃棄業者並びにこれらの者から運搬を委託された者(以下「許可届出使用者等」という。)は、工場又は事業所の外における放射性同位元素又は放射性汚染物(以下「放射性同位元素等」という。)の運搬(以下「事業所外運搬」という。)中、その所持する放射性同位元素等に関し、地震、火災その他の災害が起こつたことにより、放射線障害のおそれがある場合又は放射線障害が発生した場合においては、直ちに、次の各号に定める措置(法第十八条第一項
に規定する運搬にあつては、第四号に掲げる措置を除く。)を講じなければならない。
一
放射性同位元素等の運搬に使用されている鉄道、軌道若しくは無軌条電車の車両、索道の搬器、自動車、軽車両、船舶若しくは航空機に火災が起こり、又はこれらに延焼するおそれがある火災が起こつたときは、消火又は延焼の防止に努めるとともに、直ちに、その旨を消防署若しくは消防法
(昭和二十三年法律第百八十六号)第二十四条
の規定により市町村長の指定した場所又は最寄りの海上保安庁の事務所に通報すること。
二
放射線障害の発生を防止するために必要があるときは、付近にいる者に避難するよう警告すること。
三
放射線障害を受けた者又は受けたおそれのある者がいるときは、速やかに、その者を救出し、避難させる等緊急の措置を講ずること。
四
放射性同位元素等による汚染が生じたときは、速やかに、汚染の広がりの防止及び汚染の除去を行うこと。
五
放射性同位元素等を他の場所に移す余裕があるときは、必要に応じてこれを安全な場所に移し、その場所の周囲にはなわ張り、標識の設置等を行い、及び見張人を配置することにより、関係者以外の者が立ち入ることを禁止すること。
六
その他放射線障害を防止するために必要な措置を講ずること。
2
許可届出使用者等は、前項各号に掲げる措置を講ずる場合には、遮蔽具、かん子又は保護具を用いること、放射線に被ばくする時間を短くすること等により、当該作業に従事する者の線量を、できる限り少なくするようにしなければならない。この場合において、放射性同位元素等による放射線障害の防止に関する法律施行規則
(昭和三十五年総理府令第五十六号)第一条第八号
に規定する放射線業務従事者のうち男子、妊娠不能と診断された女子又は妊娠の意思のない旨を許可届出使用者等に書面で申し出た女子が前項各号に掲げる作業を行う場合における線量限度は、同令第二十九条第二項
に基づき原子力規制委員会の定める線量とする。
(届出)
第二条
許可届出使用者等は、前条第一項に規定する事態が生じた場合には、遅滞なく、次に掲げる事項を国土交通大臣に届け出なければならない。
一
前条第一項の事態が生じた日時及び場所並びに原因
二
発生し、又は発生するおそれのある放射線障害の状況
三
講じ、又は講じようとしている応急の措置の内容
(報告徴収)
第三条
前条に規定するもののほか、国土交通大臣は、法第三十三条第一項
及び第四項
の規定の施行に必要な限度で、許可届出使用者(表示付認証機器届出使用者を含む。)、届出販売業者、届出賃貸業者及び許可廃棄業者並びにこれらの者から運搬を委託された者に対し、事業所外運搬の状況その他の事項について、報告をさせることができる。
附 則
この省令は、放射性同位元素等による放射線障害の防止に関する法律の一部を改正する法律(昭和五十五年法律第五十二号)の施行の日(昭和五十六年五月十八日)から施行する。
附 則 (平成元年二月二七日運輸省令第五号) 抄
(施行期日)
第一条
この省令は、平成元年四月一日(以下「施行日」という。)から施行する。
附 則 (平成一二年一一月二九日運輸省令第三九号) 抄
(施行期日)
第一条
この省令は、平成十三年一月六日から施行する。
附 則 (平成一三年三月一九日国土交通省令第四〇号)
(施行期日)
1
この省令は、平成十三年四月一日から施行する。
(経過措置)
2
この省令の施行の際現に航海中である船舶については、当該航海が終了するまでは、なお従前の例による。
附 則 (平成一七年六月一日国土交通省令第六一号)
この省令は、放射性同位元素等による放射線障害の防止に関する法律の一部を改正する法律の施行の日(平成十七年六月一日)から施行する。
附 則 (平成二四年三月三〇日国土交通省令第三一号) 抄
(施行期日)
第一条
この省令は、放射性同位元素等による放射線障害の防止に関する法律の一部を改正する法律の施行の日(平成二十四年四月一日)から施行する。
(放射性同位元素等の事業所外運搬に係る危険時における措置に関する規則の一部改正に伴う経過措置)
第四条
この省令の施行前に生じた事態に関する応急の措置及び届出については、第二条の規定による改正後の放射性同位元素等の事業所外運搬に係る危険時における措置に関する規則の規定にかかわらず、なお従前の例による。
附 則 (平成二四年九月一四日国土交通省令第七五号) 抄
この省令は、原子力規制委員会設置法の施行の日(平成二十四年九月十九日)から施行する。ただし、次の各号に掲げる規定は、当該各号に定める日から施行する。
一
第四条(放射性同位元素等車両運搬規則第十八条第三項の改正規定に限る。)、第七条、第十一条及び第十二条の規定 原子力規制委員会設置法附則第一条第三号に掲げる規定の施行の日(平成二十五年四月一日)
| {
"pile_set_name": "Github"
} |
unsigned char ca[] = {
0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x42, 0x45, 0x47, 0x49, 0x4e, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49,
0x46, 0x49, 0x43, 0x41, 0x54, 0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x4d, 0x49, 0x49, 0x44,
0x33, 0x44, 0x43, 0x43, 0x41, 0x30, 0x57, 0x67, 0x41, 0x77, 0x49, 0x42, 0x41, 0x67, 0x49, 0x4a,
0x41, 0x4d, 0x6e, 0x6c, 0x67, 0x4c, 0x31, 0x63, 0x7a, 0x73, 0x6d, 0x6a, 0x4d, 0x41, 0x30, 0x47,
0x43, 0x53, 0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, 0x51, 0x45, 0x42, 0x43, 0x77, 0x55, 0x41,
0x4d, 0x49, 0x47, 0x54, 0x4d, 0x51, 0x73, 0x77, 0x43, 0x51, 0x59, 0x44, 0x0a, 0x56, 0x51, 0x51,
0x47, 0x45, 0x77, 0x4a, 0x47, 0x55, 0x6a, 0x45, 0x50, 0x4d, 0x41, 0x30, 0x47, 0x41, 0x31, 0x55,
0x45, 0x43, 0x41, 0x77, 0x47, 0x55, 0x6d, 0x46, 0x6b, 0x61, 0x58, 0x56, 0x7a, 0x4d, 0x52, 0x49,
0x77, 0x45, 0x41, 0x59, 0x44, 0x56, 0x51, 0x51, 0x48, 0x44, 0x41, 0x6c, 0x54, 0x62, 0x32, 0x31,
0x6c, 0x64, 0x32, 0x68, 0x6c, 0x63, 0x6d, 0x55, 0x78, 0x46, 0x54, 0x41, 0x54, 0x0a, 0x42, 0x67,
0x4e, 0x56, 0x42, 0x41, 0x6f, 0x4d, 0x44, 0x45, 0x56, 0x34, 0x59, 0x57, 0x31, 0x77, 0x62, 0x47,
0x55, 0x67, 0x53, 0x57, 0x35, 0x6a, 0x4c, 0x6a, 0x45, 0x67, 0x4d, 0x42, 0x34, 0x47, 0x43, 0x53,
0x71, 0x47, 0x53, 0x49, 0x62, 0x33, 0x44, 0x51, 0x45, 0x4a, 0x41, 0x52, 0x59, 0x52, 0x59, 0x57,
0x52, 0x74, 0x61, 0x57, 0x35, 0x41, 0x5a, 0x58, 0x68, 0x68, 0x62, 0x58, 0x42, 0x73, 0x0a, 0x5a,
0x53, 0x35, 0x6a, 0x62, 0x32, 0x30, 0x78, 0x4a, 0x6a, 0x41, 0x6b, 0x42, 0x67, 0x4e, 0x56, 0x42,
0x41, 0x4d, 0x4d, 0x48, 0x55, 0x56, 0x34, 0x59, 0x57, 0x31, 0x77, 0x62, 0x47, 0x55, 0x67, 0x51,
0x32, 0x56, 0x79, 0x64, 0x47, 0x6c, 0x6d, 0x61, 0x57, 0x4e, 0x68, 0x64, 0x47, 0x55, 0x67, 0x51,
0x58, 0x56, 0x30, 0x61, 0x47, 0x39, 0x79, 0x61, 0x58, 0x52, 0x35, 0x4d, 0x42, 0x34, 0x58, 0x0a,
0x44, 0x54, 0x45, 0x33, 0x4d, 0x44, 0x59, 0x77, 0x4e, 0x7a, 0x41, 0x34, 0x4d, 0x44, 0x59, 0x30,
0x4f, 0x56, 0x6f, 0x58, 0x44, 0x54, 0x49, 0x33, 0x4d, 0x44, 0x59, 0x77, 0x4e, 0x54, 0x41, 0x34,
0x4d, 0x44, 0x59, 0x30, 0x4f, 0x56, 0x6f, 0x77, 0x67, 0x5a, 0x4d, 0x78, 0x43, 0x7a, 0x41, 0x4a,
0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x59, 0x54, 0x41, 0x6b, 0x5a, 0x53, 0x4d, 0x51, 0x38, 0x77,
0x0a, 0x44, 0x51, 0x59, 0x44, 0x56, 0x51, 0x51, 0x49, 0x44, 0x41, 0x5a, 0x53, 0x59, 0x57, 0x52,
0x70, 0x64, 0x58, 0x4d, 0x78, 0x45, 0x6a, 0x41, 0x51, 0x42, 0x67, 0x4e, 0x56, 0x42, 0x41, 0x63,
0x4d, 0x43, 0x56, 0x4e, 0x76, 0x62, 0x57, 0x56, 0x33, 0x61, 0x47, 0x56, 0x79, 0x5a, 0x54, 0x45,
0x56, 0x4d, 0x42, 0x4d, 0x47, 0x41, 0x31, 0x55, 0x45, 0x43, 0x67, 0x77, 0x4d, 0x52, 0x58, 0x68,
0x68, 0x0a, 0x62, 0x58, 0x42, 0x73, 0x5a, 0x53, 0x42, 0x4a, 0x62, 0x6d, 0x4d, 0x75, 0x4d, 0x53,
0x41, 0x77, 0x48, 0x67, 0x59, 0x4a, 0x4b, 0x6f, 0x5a, 0x49, 0x68, 0x76, 0x63, 0x4e, 0x41, 0x51,
0x6b, 0x42, 0x46, 0x68, 0x46, 0x68, 0x5a, 0x47, 0x31, 0x70, 0x62, 0x6b, 0x42, 0x6c, 0x65, 0x47,
0x46, 0x74, 0x63, 0x47, 0x78, 0x6c, 0x4c, 0x6d, 0x4e, 0x76, 0x62, 0x54, 0x45, 0x6d, 0x4d, 0x43,
0x51, 0x47, 0x0a, 0x41, 0x31, 0x55, 0x45, 0x41, 0x77, 0x77, 0x64, 0x52, 0x58, 0x68, 0x68, 0x62,
0x58, 0x42, 0x73, 0x5a, 0x53, 0x42, 0x44, 0x5a, 0x58, 0x4a, 0x30, 0x61, 0x57, 0x5a, 0x70, 0x59,
0x32, 0x46, 0x30, 0x5a, 0x53, 0x42, 0x42, 0x64, 0x58, 0x52, 0x6f, 0x62, 0x33, 0x4a, 0x70, 0x64,
0x48, 0x6b, 0x77, 0x67, 0x5a, 0x38, 0x77, 0x44, 0x51, 0x59, 0x4a, 0x4b, 0x6f, 0x5a, 0x49, 0x68,
0x76, 0x63, 0x4e, 0x0a, 0x41, 0x51, 0x45, 0x42, 0x42, 0x51, 0x41, 0x44, 0x67, 0x59, 0x30, 0x41,
0x4d, 0x49, 0x47, 0x4a, 0x41, 0x6f, 0x47, 0x42, 0x41, 0x4c, 0x70, 0x57, 0x52, 0x32, 0x33, 0x66,
0x6e, 0x2f, 0x54, 0x6d, 0x48, 0x78, 0x73, 0x58, 0x73, 0x48, 0x64, 0x72, 0x79, 0x64, 0x7a, 0x50,
0x53, 0x64, 0x31, 0x37, 0x66, 0x5a, 0x6b, 0x63, 0x37, 0x31, 0x57, 0x73, 0x61, 0x69, 0x63, 0x67,
0x51, 0x52, 0x36, 0x36, 0x0a, 0x31, 0x74, 0x49, 0x56, 0x59, 0x62, 0x32, 0x32, 0x55, 0x57, 0x47,
0x66, 0x6a, 0x39, 0x4b, 0x50, 0x4d, 0x38, 0x54, 0x48, 0x4d, 0x73, 0x56, 0x37, 0x34, 0x65, 0x77,
0x34, 0x5a, 0x6b, 0x61, 0x51, 0x33, 0x39, 0x71, 0x76, 0x55, 0x30, 0x69, 0x75, 0x51, 0x49, 0x52,
0x72, 0x4b, 0x41, 0x52, 0x46, 0x48, 0x46, 0x6f, 0x6b, 0x2b, 0x76, 0x62, 0x61, 0x65, 0x63, 0x67,
0x57, 0x4d, 0x65, 0x57, 0x65, 0x0a, 0x76, 0x47, 0x49, 0x71, 0x64, 0x6e, 0x6d, 0x79, 0x42, 0x39,
0x67, 0x4a, 0x59, 0x61, 0x46, 0x4f, 0x4b, 0x67, 0x74, 0x53, 0x6b, 0x66, 0x58, 0x73, 0x75, 0x32,
0x64, 0x64, 0x73, 0x71, 0x64, 0x76, 0x4c, 0x59, 0x77, 0x63, 0x44, 0x62, 0x63, 0x7a, 0x72, 0x71,
0x38, 0x58, 0x39, 0x79, 0x45, 0x58, 0x70, 0x4e, 0x36, 0x6d, 0x6e, 0x78, 0x58, 0x65, 0x43, 0x63,
0x50, 0x47, 0x34, 0x46, 0x30, 0x70, 0x0a, 0x41, 0x67, 0x4d, 0x42, 0x41, 0x41, 0x47, 0x6a, 0x67,
0x67, 0x45, 0x30, 0x4d, 0x49, 0x49, 0x42, 0x4d, 0x44, 0x41, 0x64, 0x42, 0x67, 0x4e, 0x56, 0x48,
0x51, 0x34, 0x45, 0x46, 0x67, 0x51, 0x55, 0x67, 0x69, 0x67, 0x70, 0x64, 0x41, 0x55, 0x70, 0x4f,
0x4e, 0x6f, 0x44, 0x71, 0x30, 0x70, 0x51, 0x33, 0x79, 0x66, 0x78, 0x72, 0x73, 0x6c, 0x43, 0x53,
0x70, 0x63, 0x77, 0x67, 0x63, 0x67, 0x47, 0x0a, 0x41, 0x31, 0x55, 0x64, 0x49, 0x77, 0x53, 0x42,
0x77, 0x44, 0x43, 0x42, 0x76, 0x59, 0x41, 0x55, 0x67, 0x69, 0x67, 0x70, 0x64, 0x41, 0x55, 0x70,
0x4f, 0x4e, 0x6f, 0x44, 0x71, 0x30, 0x70, 0x51, 0x33, 0x79, 0x66, 0x78, 0x72, 0x73, 0x6c, 0x43,
0x53, 0x70, 0x65, 0x68, 0x67, 0x5a, 0x6d, 0x6b, 0x67, 0x5a, 0x59, 0x77, 0x67, 0x5a, 0x4d, 0x78,
0x43, 0x7a, 0x41, 0x4a, 0x42, 0x67, 0x4e, 0x56, 0x0a, 0x42, 0x41, 0x59, 0x54, 0x41, 0x6b, 0x5a,
0x53, 0x4d, 0x51, 0x38, 0x77, 0x44, 0x51, 0x59, 0x44, 0x56, 0x51, 0x51, 0x49, 0x44, 0x41, 0x5a,
0x53, 0x59, 0x57, 0x52, 0x70, 0x64, 0x58, 0x4d, 0x78, 0x45, 0x6a, 0x41, 0x51, 0x42, 0x67, 0x4e,
0x56, 0x42, 0x41, 0x63, 0x4d, 0x43, 0x56, 0x4e, 0x76, 0x62, 0x57, 0x56, 0x33, 0x61, 0x47, 0x56,
0x79, 0x5a, 0x54, 0x45, 0x56, 0x4d, 0x42, 0x4d, 0x47, 0x0a, 0x41, 0x31, 0x55, 0x45, 0x43, 0x67,
0x77, 0x4d, 0x52, 0x58, 0x68, 0x68, 0x62, 0x58, 0x42, 0x73, 0x5a, 0x53, 0x42, 0x4a, 0x62, 0x6d,
0x4d, 0x75, 0x4d, 0x53, 0x41, 0x77, 0x48, 0x67, 0x59, 0x4a, 0x4b, 0x6f, 0x5a, 0x49, 0x68, 0x76,
0x63, 0x4e, 0x41, 0x51, 0x6b, 0x42, 0x46, 0x68, 0x46, 0x68, 0x5a, 0x47, 0x31, 0x70, 0x62, 0x6b,
0x42, 0x6c, 0x65, 0x47, 0x46, 0x74, 0x63, 0x47, 0x78, 0x6c, 0x0a, 0x4c, 0x6d, 0x4e, 0x76, 0x62,
0x54, 0x45, 0x6d, 0x4d, 0x43, 0x51, 0x47, 0x41, 0x31, 0x55, 0x45, 0x41, 0x77, 0x77, 0x64, 0x52,
0x58, 0x68, 0x68, 0x62, 0x58, 0x42, 0x73, 0x5a, 0x53, 0x42, 0x44, 0x5a, 0x58, 0x4a, 0x30, 0x61,
0x57, 0x5a, 0x70, 0x59, 0x32, 0x46, 0x30, 0x5a, 0x53, 0x42, 0x42, 0x64, 0x58, 0x52, 0x6f, 0x62,
0x33, 0x4a, 0x70, 0x64, 0x48, 0x6d, 0x43, 0x43, 0x51, 0x44, 0x4a, 0x0a, 0x35, 0x59, 0x43, 0x39,
0x58, 0x4d, 0x37, 0x4a, 0x6f, 0x7a, 0x41, 0x4d, 0x42, 0x67, 0x4e, 0x56, 0x48, 0x52, 0x4d, 0x45,
0x42, 0x54, 0x41, 0x44, 0x41, 0x51, 0x48, 0x2f, 0x4d, 0x44, 0x59, 0x47, 0x41, 0x31, 0x55, 0x64,
0x48, 0x77, 0x51, 0x76, 0x4d, 0x43, 0x30, 0x77, 0x4b, 0x36, 0x41, 0x70, 0x6f, 0x43, 0x65, 0x47,
0x4a, 0x57, 0x68, 0x30, 0x64, 0x48, 0x41, 0x36, 0x4c, 0x79, 0x39, 0x33, 0x0a, 0x64, 0x33, 0x63,
0x75, 0x5a, 0x58, 0x68, 0x68, 0x62, 0x58, 0x42, 0x73, 0x5a, 0x53, 0x35, 0x6a, 0x62, 0x32, 0x30,
0x76, 0x5a, 0x58, 0x68, 0x68, 0x62, 0x58, 0x42, 0x73, 0x5a, 0x56, 0x39, 0x6a, 0x59, 0x53, 0x35,
0x6a, 0x63, 0x6d, 0x77, 0x77, 0x44, 0x51, 0x59, 0x4a, 0x4b, 0x6f, 0x5a, 0x49, 0x68, 0x76, 0x63,
0x4e, 0x41, 0x51, 0x45, 0x4c, 0x42, 0x51, 0x41, 0x44, 0x67, 0x59, 0x45, 0x41, 0x0a, 0x65, 0x75,
0x78, 0x4f, 0x42, 0x50, 0x49, 0x6e, 0x53, 0x4a, 0x52, 0x4b, 0x41, 0x49, 0x73, 0x65, 0x4d, 0x78,
0x50, 0x6d, 0x41, 0x61, 0x62, 0x74, 0x41, 0x71, 0x4b, 0x4e, 0x73, 0x6c, 0x5a, 0x53, 0x6d, 0x70,
0x47, 0x34, 0x48, 0x65, 0x33, 0x6c, 0x6b, 0x4b, 0x74, 0x2b, 0x48, 0x4d, 0x33, 0x6a, 0x66, 0x7a,
0x6e, 0x55, 0x74, 0x33, 0x70, 0x73, 0x6d, 0x44, 0x37, 0x6a, 0x31, 0x68, 0x46, 0x57, 0x0a, 0x53,
0x34, 0x6c, 0x37, 0x4b, 0x58, 0x7a, 0x7a, 0x61, 0x6a, 0x76, 0x61, 0x47, 0x59, 0x79, 0x62, 0x44,
0x71, 0x35, 0x4e, 0x39, 0x4d, 0x71, 0x72, 0x44, 0x6a, 0x68, 0x47, 0x6e, 0x33, 0x56, 0x58, 0x5a,
0x71, 0x4f, 0x4c, 0x4d, 0x55, 0x4e, 0x44, 0x4c, 0x37, 0x4f, 0x51, 0x71, 0x39, 0x36, 0x54, 0x7a,
0x67, 0x71, 0x73, 0x54, 0x42, 0x54, 0x31, 0x64, 0x6d, 0x56, 0x53, 0x62, 0x4e, 0x6c, 0x74, 0x0a,
0x50, 0x51, 0x67, 0x69, 0x41, 0x65, 0x4b, 0x41, 0x6b, 0x33, 0x74, 0x6d, 0x48, 0x34, 0x6c, 0x52,
0x52, 0x69, 0x39, 0x4d, 0x54, 0x42, 0x53, 0x79, 0x4a, 0x36, 0x49, 0x39, 0x32, 0x4a, 0x59, 0x63,
0x53, 0x35, 0x48, 0x36, 0x42, 0x73, 0x34, 0x5a, 0x77, 0x43, 0x63, 0x3d, 0x0a, 0x2d, 0x2d, 0x2d,
0x2d, 0x2d, 0x45, 0x4e, 0x44, 0x20, 0x43, 0x45, 0x52, 0x54, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54,
0x45, 0x2d, 0x2d, 0x2d, 0x2d, 0x2d, 0x0a, 0x00, };
| {
"pile_set_name": "Github"
} |
package com.hytcshare.jerrywebspider;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class JerryWebSpiderApplicationTests {
@Test
public void contextLoads() {
}
}
| {
"pile_set_name": "Github"
} |
# runtime-tokio
A [Tokio](https://docs.rs/tokio)-based asynchronous [Runtime](https://github.com/rustasync/runtime).
See the [Runtime documentation](https://docs.rs/runtime) for more details.
## Examples
To enable this runtime do:
```rust
#[runtime::main(runtime_tokio::Tokio)]
async fn main() {}
```
## Installation
With [cargo-edit](https://crates.io/crates/cargo-edit) do:
```sh
$ cargo add runtime-tokio
```
## Safety
This crate uses `unsafe` in a few places to construct pin projections not natively supported by
Tokio.
## Contributing
Want to join us? Check out our [The "Contributing" section of the
guide][contributing] and take a look at some of these issues:
- [Issues labeled "good first issue"][good-first-issue]
- [Issues labeled "help wanted"][help-wanted]
#### Conduct
The Runtime project adheres to the [Contributor Covenant Code of
Conduct](https://github.com/rustasync/runtime/blob/master/.github/CODE_OF_CONDUCT.md). This
describes the minimum behavior expected from all contributors.
## License
Licensed under either of
* Apache License, Version 2.0 ([LICENSE-APACHE](../LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](../LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.
#### Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.
[releases]: https://github.com/rustasync/runtime/releases
[contributing]: https://github.com/rustasync/runtime/blob/master/.github/CONTRIBUTING.md
[good-first-issue]: https://github.com/rustasync/runtime/labels/good%20first%20issue
[help-wanted]: https://github.com/rustasync/runtime/labels/help%20wanted
| {
"pile_set_name": "Github"
} |
<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>supplychainpy.bot package — supplychainpy 0.0.4 documentation</title>
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="index" title="Index"
href="genindex.html"/>
<link rel="search" title="Search" href="search.html"/>
<link rel="top" title="supplychainpy 0.0.4 documentation" href="index.html"/>
<script src="_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="index.html" class="icon icon-home"> supplychainpy
</a>
<div class="version">
0.0.4
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul>
<li class="toctree-l1"><a class="reference internal" href="changelog.html">Change Log</a></li>
<li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li>
<li class="toctree-l1"><a class="reference internal" href="quickstart.html">Quick Guide</a></li>
<li class="toctree-l1"><a class="reference internal" href="reporting.html">Supplychainpy Reporting Suite</a></li>
<li class="toctree-l1"><a class="reference internal" href="inventory.html">Inventory Modeling and Analysis Made Easy with Supplychainpy</a></li>
<li class="toctree-l1"><a class="reference internal" href="pandas.html">Using supplychainpy with Pandas, Jupyter and Matplotlib</a></li>
<li class="toctree-l1"><a class="reference internal" href="ahp.html">Analytic Hierarchy Process</a></li>
<li class="toctree-l1"><a class="reference internal" href="monte_carlo_simulation.html">Monte Carlo Simulation</a></li>
<li class="toctree-l1"><a class="reference internal" href="docker.html">Supplychainpy with Docker</a></li>
<li class="toctree-l1"><a class="reference internal" href="calculations.html">Formulas and Equations</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">supplychainpy</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html">Docs</a> »</li>
<li>supplychainpy.bot package</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/supplychainpy.bot.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="supplychainpy-bot-package">
<h1>supplychainpy.bot package<a class="headerlink" href="#supplychainpy-bot-package" title="Permalink to this headline">¶</a></h1>
<div class="section" id="submodules">
<h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this headline">¶</a></h2>
</div>
<div class="section" id="module-supplychainpy.bot.dash">
<span id="supplychainpy-bot-dash-module"></span><h2>supplychainpy.bot.dash module<a class="headerlink" href="#module-supplychainpy.bot.dash" title="Permalink to this headline">¶</a></h2>
<dl class="class">
<dt id="supplychainpy.bot.dash.ChatBot">
<em class="property">class </em><code class="descclassname">supplychainpy.bot.dash.</code><code class="descname">ChatBot</code><a class="headerlink" href="#supplychainpy.bot.dash.ChatBot" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
<p>Chat Bot for supplychainpy Reporting.</p>
<dl class="staticmethod">
<dt id="supplychainpy.bot.dash.ChatBot.chat_machine">
<em class="property">static </em><code class="descname">chat_machine</code><span class="sig-paren">(</span><em>message: str</em><span class="sig-paren">)</span> → typing.List[str]<a class="headerlink" href="#supplychainpy.bot.dash.ChatBot.chat_machine" title="Permalink to this definition">¶</a></dt>
<dd><p>Interact with chat bot my sending a message and waiting for a response.
:param message: The message for the chat bot.
:type message: str</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">Returns:</th><td class="field-body">The response from the chat bot.</td>
</tr>
<tr class="field-even field"><th class="field-name">Return type:</th><td class="field-body">list</td>
</tr>
</tbody>
</table>
<p>Examples:
>>> chat_bot = ChatBot()
>>> response = chat_bot.chat_machine(message=’hello’)</p>
</dd></dl>
</dd></dl>
</div>
<div class="section" id="module-supplychainpy.bot">
<span id="module-contents"></span><h2>Module contents<a class="headerlink" href="#module-supplychainpy.bot" title="Permalink to this headline">¶</a></h2>
</div>
</div>
</div>
<div class="articleComments">
</div>
</div>
<footer>
<hr/>
<div role="contentinfo">
<p>
© Copyright 2016, Kevin Fasusi.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'./',
VERSION:'0.0.4',
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=TeX-AMS-MML_HTMLorMML"></script>
<script type="text/javascript" src="_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html> | {
"pile_set_name": "Github"
} |
package(default_visibility = ["//visibility:public"])
load(
"@io_bazel_rules_go//go:def.bzl",
"go_library",
)
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"strategy.go",
],
importpath = "k8s.io/kubernetes/pkg/registry/autoscaling/horizontalpodautoscaler",
deps = [
"//pkg/api/legacyscheme:go_default_library",
"//pkg/apis/autoscaling:go_default_library",
"//pkg/apis/autoscaling/validation:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library",
"//staging/src/k8s.io/apimachinery/pkg/util/validation/field:go_default_library",
"//staging/src/k8s.io/apiserver/pkg/storage/names:go_default_library",
],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [
":package-srcs",
"//pkg/registry/autoscaling/horizontalpodautoscaler/storage:all-srcs",
],
tags = ["automanaged"],
)
| {
"pile_set_name": "Github"
} |
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.jclouds.cloudstack.features;
import static org.jclouds.reflect.Reflection2.method;
import org.jclouds.Fallbacks.EmptySetOnNotFoundOr404;
import org.jclouds.Fallbacks.NullOnNotFoundOr404;
import org.jclouds.Fallbacks.VoidOnNotFoundOr404;
import org.jclouds.cloudstack.domain.Snapshot;
import org.jclouds.cloudstack.domain.SnapshotPolicySchedule;
import org.jclouds.cloudstack.internal.BaseCloudStackAsyncClientTest;
import org.jclouds.cloudstack.options.CreateSnapshotOptions;
import org.jclouds.cloudstack.options.ListSnapshotPoliciesOptions;
import org.jclouds.cloudstack.options.ListSnapshotsOptions;
import org.jclouds.cloudstack.util.SnapshotPolicySchedules;
import org.jclouds.fallbacks.MapHttp4xxCodesToExceptions;
import org.jclouds.functions.IdentityFunction;
import org.jclouds.http.HttpRequest;
import org.jclouds.http.functions.ParseFirstJsonValueNamed;
import org.jclouds.http.functions.ReleasePayloadAndReturn;
import org.jclouds.http.functions.UnwrapOnlyJsonValue;
import org.jclouds.rest.internal.GeneratedHttpRequest;
import org.testng.annotations.Test;
import com.google.common.base.Functions;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableSet;
import com.google.common.reflect.Invokable;
/**
* Tests the behaviour of SnapshotAsyncClient.
*
* @see SnapshotAsyncClient
* @author Richard Downer
*/
// NOTE:without testName, this will not call @Before* and fail w/NPE during
// surefire
@Test(groups = "unit", testName = "SnapshotAsyncClientTest")
public class SnapshotAsyncClientTest extends BaseCloudStackAsyncClientTest<SnapshotAsyncClient> {
public void testCreateSnapshot() throws NoSuchMethodException {
Invokable<?, ?> method = method(SnapshotAsyncClient.class, "createSnapshot", String.class, CreateSnapshotOptions[].class);
GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of(5));
assertRequestLineEquals(httpRequest,
"GET http://localhost:8080/client/api?response=json&command=createSnapshot&volumeid=5 HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
assertPayloadEquals(httpRequest, null, null, false);
assertResponseParserClassEquals(method, httpRequest, UnwrapOnlyJsonValue.class);
assertSaxResponseParserClassEquals(method, null);
assertFallbackClassEquals(method, MapHttp4xxCodesToExceptions.class);
checkFilters(httpRequest);
}
public void testCreateSnapshotOptions() throws NoSuchMethodException {
Invokable<?, ?> method = method(SnapshotAsyncClient.class, "createSnapshot", String.class, CreateSnapshotOptions[].class);
GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of(5, CreateSnapshotOptions.Builder.accountInDomain("acc", "7").policyId("9")));
assertRequestLineEquals(httpRequest,
"GET http://localhost:8080/client/api?response=json&command=createSnapshot&volumeid=5&account=acc&domainid=7&policyid=9 HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
assertPayloadEquals(httpRequest, null, null, false);
assertResponseParserClassEquals(method, httpRequest, UnwrapOnlyJsonValue.class);
assertSaxResponseParserClassEquals(method, null);
assertFallbackClassEquals(method, MapHttp4xxCodesToExceptions.class);
checkFilters(httpRequest);
}
public void testListSnapshots() throws NoSuchMethodException {
Invokable<?, ?> method = method(SnapshotAsyncClient.class, "listSnapshots", ListSnapshotsOptions[].class);
GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.of());
assertRequestLineEquals(httpRequest,
"GET http://localhost:8080/client/api?response=json&command=listSnapshots&listAll=true HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
assertPayloadEquals(httpRequest, null, null, false);
assertResponseParserClassEquals(method, httpRequest, ParseFirstJsonValueNamed.class);
assertSaxResponseParserClassEquals(method, null);
assertFallbackClassEquals(method, EmptySetOnNotFoundOr404.class);
checkFilters(httpRequest);
}
public void testGetSnapshot() throws NoSuchMethodException {
Invokable<?, ?> method = method(SnapshotAsyncClient.class, "getSnapshot", String.class);
GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of(5));
assertRequestLineEquals(httpRequest,
"GET http://localhost:8080/client/api?response=json&command=listSnapshots&listAll=true&id=5 HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
assertPayloadEquals(httpRequest, null, null, false);
assertResponseParserClassEquals(method, httpRequest,
Functions.compose(IdentityFunction.INSTANCE, IdentityFunction.INSTANCE).getClass());
assertSaxResponseParserClassEquals(method, null);
assertFallbackClassEquals(method, NullOnNotFoundOr404.class);
checkFilters(httpRequest);
}
public void testListSnapshotsOptions() throws NoSuchMethodException {
Invokable<?, ?> method = method(SnapshotAsyncClient.class, "listSnapshots", ListSnapshotsOptions[].class);
GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of(ListSnapshotsOptions.Builder.accountInDomain("acc", "7").id("5").interval(Snapshot.Interval.MONTHLY).isRecursive(true).keyword("fred").name("fred's snapshot").snapshotType(Snapshot.Type.RECURRING).volumeId("11")));
assertRequestLineEquals(httpRequest,
"GET http://localhost:8080/client/api?response=json&command=listSnapshots&listAll=true&account=acc&domainid=7&id=5&intervaltype=MONTHLY&isrecursive=true&keyword=fred&name=fred%27s%20snapshot&snapshottype=RECURRING&volumeid=11 HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
assertPayloadEquals(httpRequest, null, null, false);
assertResponseParserClassEquals(method, httpRequest, ParseFirstJsonValueNamed.class);
assertSaxResponseParserClassEquals(method, null);
assertFallbackClassEquals(method, EmptySetOnNotFoundOr404.class);
checkFilters(httpRequest);
}
public void testDeleteSnapshot() throws NoSuchMethodException {
Invokable<?, ?> method = method(SnapshotAsyncClient.class, "deleteSnapshot", String.class);
GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of(14));
assertRequestLineEquals(httpRequest,
"GET http://localhost:8080/client/api?response=json&command=deleteSnapshot&id=14 HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
assertPayloadEquals(httpRequest, null, null, false);
assertResponseParserClassEquals(method, httpRequest, ReleasePayloadAndReturn.class);
assertSaxResponseParserClassEquals(method, null);
assertFallbackClassEquals(method, VoidOnNotFoundOr404.class);
checkFilters(httpRequest);
}
HttpRequest extractIso = HttpRequest.builder().method("GET")
.endpoint("http://localhost:8080/client/api")
.addQueryParam("response", "json")
.addQueryParam("command", "createSnapshotPolicy")
.addQueryParam("maxsnaps", "10")
.addQueryParam("timezone", "UTC")
.addQueryParam("volumeid", "12")
.addQueryParam("intervaltype", "MONTHLY")
.addQueryParam("schedule", "07%3A06%3A05").build();
public void testCreateSnapshotPolicy() throws NoSuchMethodException {
Invokable<?, ?> method = method(SnapshotAsyncClient.class, "createSnapshotPolicy", SnapshotPolicySchedule.class, String.class, String.class, String.class);
GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of(SnapshotPolicySchedules.monthly(5, 6, 7), 10, "UTC", 12));
assertRequestLineEquals(httpRequest,extractIso.getRequestLine());
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
assertPayloadEquals(httpRequest, null, null, false);
assertResponseParserClassEquals(method, httpRequest, UnwrapOnlyJsonValue.class);
assertSaxResponseParserClassEquals(method, null);
assertFallbackClassEquals(method, MapHttp4xxCodesToExceptions.class);
checkFilters(httpRequest);
}
public void testDeleteSnapshotPolicy() throws NoSuchMethodException {
Invokable<?, ?> method = method(SnapshotAsyncClient.class, "deleteSnapshotPolicy", String.class);
GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of(7));
assertRequestLineEquals(httpRequest,
"GET http://localhost:8080/client/api?response=json&command=deleteSnapshotPolicies&id=7 HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
assertPayloadEquals(httpRequest, null, null, false);
assertResponseParserClassEquals(method, httpRequest, ReleasePayloadAndReturn.class);
assertSaxResponseParserClassEquals(method, null);
assertFallbackClassEquals(method, VoidOnNotFoundOr404.class);
checkFilters(httpRequest);
}
public void testDeleteSnapshotPolicies() throws NoSuchMethodException {
Invokable<?, ?> method = method(SnapshotAsyncClient.class, "deleteSnapshotPolicies", Iterable.class);
Iterable<String> ids = ImmutableSet.of("3", "5", "7");
GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of(ids));
assertRequestLineEquals(httpRequest,
"GET http://localhost:8080/client/api?response=json&command=deleteSnapshotPolicies&ids=3,5,7 HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
assertPayloadEquals(httpRequest, null, null, false);
assertResponseParserClassEquals(method, httpRequest, ReleasePayloadAndReturn.class);
assertSaxResponseParserClassEquals(method, null);
assertFallbackClassEquals(method, VoidOnNotFoundOr404.class);
checkFilters(httpRequest);
}
public void testListSnapshotPolicies() throws NoSuchMethodException {
Invokable<?, ?> method = method(SnapshotAsyncClient.class, "listSnapshotPolicies", String.class, ListSnapshotPoliciesOptions[].class);
GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of(10));
assertRequestLineEquals(httpRequest,
"GET http://localhost:8080/client/api?response=json&command=listSnapshotPolicies&listAll=true&volumeid=10 HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
assertPayloadEquals(httpRequest, null, null, false);
assertResponseParserClassEquals(method, httpRequest, UnwrapOnlyJsonValue.class);
assertSaxResponseParserClassEquals(method, null);
assertFallbackClassEquals(method, EmptySetOnNotFoundOr404.class);
checkFilters(httpRequest);
}
public void testListSnapshotPoliciesOptions() throws NoSuchMethodException {
Invokable<?, ?> method = method(SnapshotAsyncClient.class, "listSnapshotPolicies", String.class, ListSnapshotPoliciesOptions[].class);
GeneratedHttpRequest httpRequest = processor.createRequest(method, ImmutableList.<Object> of(10, ListSnapshotPoliciesOptions.Builder.accountInDomain("fred", "4").keyword("bob")));
assertRequestLineEquals(httpRequest,
"GET http://localhost:8080/client/api?response=json&command=listSnapshotPolicies&listAll=true&volumeid=10&account=fred&domainid=4&keyword=bob HTTP/1.1");
assertNonPayloadHeadersEqual(httpRequest, "Accept: application/json\n");
assertPayloadEquals(httpRequest, null, null, false);
assertResponseParserClassEquals(method, httpRequest, UnwrapOnlyJsonValue.class);
assertSaxResponseParserClassEquals(method, null);
assertFallbackClassEquals(method, EmptySetOnNotFoundOr404.class);
checkFilters(httpRequest);
}
}
| {
"pile_set_name": "Github"
} |
import {EmailTemplateBase} from '../database-models/email-template-base';
import {MailTypeBase} from '../database-models/mail-type-base';
//Generated Imports
export class EmailTemplate extends EmailTemplateBase
{
//#region Generated Reference Properties
//#region mailType Prop
mailType : MailTypeBase;
//#endregion mailType Prop
//#endregion Generated Reference Properties
} | {
"pile_set_name": "Github"
} |
<%= render :partial => "/tr8n/admin/common/header" %>
<div class="section_title">
<span style="font-size:12px; color:grey; float:right; padding-top:5px;">
<% unless Tr8n::Config.enable_client_sdk? %>
<span style="color:red">Make sure that JS Client SDK is enabled!</span>
<% end %>
</span>
Tr8n JavaScript Client SDK Test Tool
</div>
<div style="font-size:12px; color:grey; padding-bottom:5px;">
Tr8n JavaScript Client SDK is used for retrieving translations in a client application as well as register new phrases on the server.
It fully supports all language rules and token types available on the server.
Keep in mind that token notations may deffer from the server side implementation - based on the language used on the server.
</div>
<div style="background:#EFF8FF; border: 1px dotted #ccc; padding:5px; padding-bottom: 0px;">
<%= form_tag do %>
<table style="width:100%;">
<tr>
<td style="width:42%; padding:2px; background:#F1F4FA;">
<div style="font-weight:bold;">Label <span style='color:grey'>- text to be translated (required)</span></div>
<%=text_area_tag(:label, "{count|| message, messages}", :style => "width:98%; height:40px;")%><br>
</td>
<td style="width:42%; padding:2px; background:#F1F4FA;">
<div style="font-weight:bold;">Description <span style='color:grey'>- defines the context of the label (optional)</span></div>
<%=text_area_tag(:description, "", :style => "width:98%; height:40px;")%><br>
</td>
<td rowspan="3" style="width:15%; padding:2px; vertical-align:top;">
<center>
<div style="width:150px; text-align:center; padding-top:15px;">
<button style="width:100%;" onClick="translate();return false;">Translate</button>
<button style="width:100%;" onClick="translate({skip_decorations:true});return false;">Translate Label</button>
<button style="width:100%;" onClick="searchPhrase();return false;">View Translation Key</button>
<br><br>
<button style="width:100%;" onClick="clearResults();return false;">Clear Results</button>
<button style="width:100%;" onClick="Tr8n.UI.Lightbox.show('/tr8n/admin/clientsdk/lb_samples', {height:500});return false;">View Examples</button>
<button style="width:100%;" onClick="reloadTranslations();return false;">Reload Translations</button>
<button style="width:100%;" onClick="Tr8n.SDK.Proxy.logSettings();return false;">Print Settings</button>
<button style="width:100%;" onClick="Tr8n.SDK.Proxy.logTranslations();return false;">Print Translation Cache</button>
</div>
</center>
</td>
</tr>
<tr>
<td colspan="2" style="padding:2px; background:#F1F4FA;">
<div style="font-weight:bold;">Tokens JSON <span style='color:grey'>- provides values for tokens used in translation. (required, if data tokens are defined)</span></div>
<%=text_area_tag(:tokens, "{'count':5}", :style => "width:99%; height:50px;")%>
</td>
</tr>
<tr>
<td colspan="2" style="padding:2px;">
<div style="font-weight:bold; padding-top:10px;">Translation <span style='color:grey'>- translated label with substituted tokens</span></div>
<div id="result_html" style="background:#F9F8F7; height:40px; overflow:auto; border:1px dotted #ccc; padding:10px;"></div>
<div style="font-weight:bold; padding-top:10px;">Translation Raw HTML <span style='color:grey'>- translated label with substituted tokens</span></div>
<%=text_area_tag(:result, "", :style => "width:99%; background:#F9F8F7;height:50px; border:1px solid #ccc;", :readonly => true)%>
</td>
</tr>
</table>
<% end %>
</div>
<div id="tr8n_console" class="section_box colored" style="font-size:10px; height:350px; overflow:auto; margin: 10px;">
</div>
<script>
function clearResults() {
Tr8n.element('result').value = '';
Tr8n.element('result_html').innerHTML = '';
Tr8n.Logger.clear();
}
function reloadTranslations() {
Tr8n.SDK.Proxy.initTranslations();
}
function useExample(label, tokens) {
Tr8n.element('label').value = label
Tr8n.element('tokens').value = tokens;
clearResults();
Tr8n.UI.Lightbox.hide();
}
function translate(opts) {
opts = opts || {};
var tokens = null;
if (Tr8n.element('tokens').value != "") {
tokens = eval("[" + Tr8n.value('tokens') + "]")[0];
}
Tr8n.element('result').value = tr(Tr8n.value('label'), '', tokens, opts);
Tr8n.element('result_html').innerHTML = Tr8n.element('result').value;
}
function searchPhrase() {
url = "/tr8n/phrases/index?search=" + encodeURI(Tr8n.value('label'));
window.open(url,'translation_key');
}
</script>
<%= render :partial => "/tr8n/admin/common/footer" %>
| {
"pile_set_name": "Github"
} |
file(GLOB_RECURSE TEST_FILES LIST_DIRECTORIES false RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "*.err")
list(SORT TEST_FILES)
foreach(_file IN LISTS TEST_FILES)
get_filename_component(_path "${_file}" PATH)
get_filename_component(_name "${_file}" NAME_WE)
add_test(NAME "error_${_name}" COMMAND ${_converter_command} -o - -i "${CMAKE_CURRENT_SOURCE_DIR}/${_file}")
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${_path}/${_name}.pass_re")
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/${_path}/${_name}.pass_re" _pass_re)
set_tests_properties(error_${_name} PROPERTIES PASS_REGULAR_EXPRESSION "${_pass_re}")
else ()
set_tests_properties(error_${_name} PROPERTIES PASS_REGULAR_EXPRESSION "Illegal character '.' at line")
endif ()
set_tests_properties(error_${_name} PROPERTIES FAIL_REGULAR_EXPRESSION "z-index")
add_test(NAME "error_${_name}_rc" COMMAND ${_converter_command} -o - -i "${CMAKE_CURRENT_SOURCE_DIR}/${_file}")
set_tests_properties("error_${_name}_rc" PROPERTIES WILL_FAIL TRUE)
endforeach ()
| {
"pile_set_name": "Github"
} |
use strict;
print "
// Regex pattern below is automatically generated by regexpPrecederPatterns.pl
// Do not modify, your changes will be erased.
// CAVEAT: this does not properly handle the case where a regular
// expression immediately follows another since a regular expression may
// have flags for case-sensitivity and the like. Having regexp tokens
// adjacent is not valid in any language I'm aware of, so I'm punting.
// TODO: maybe style special characters inside a regexp as punctuation.
/**
* A set of tokens that can precede a regular expression literal in
* javascript
* http://web.archive.org/web/20070717142515/http://www.mozilla.org/js/language/js20/rationale/syntax.html
* has the full list, but I've removed ones that might be problematic when
* seen in languages that don't support regular expression literals.
*
* Specifically, I've removed any keywords that can't precede a regexp
* literal in a syntactically legal javascript program, and I've removed the
* \"in\" keyword since it's not a keyword in many languages, and might be used
* as a count of inches.
*
* The link above does not accurately describe EcmaScript rules since
* it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
* very well in practice.
*
* \@private
* \@const
*/
var REGEXP_PRECEDER_PATTERN = ";
my @preceders = (
"[!=]=?=?", # "!", "!=", "!==", "=", "==", "===",
"\\#",
"%=?", # "%", "%=",
"&&?=?", # "&", "&&", "&&=", "&=",
"\\(",
"\\*=?", # "*", "*=",
"[+\\-]=", # +=, -=. + and - handled below.
"->",
"\\/=?", # "/", "/=",
"::?", # ":", "::",
"<<?=?", # "<", "<<", "<<=", "<=",
">>?>?=?", # ">", ">=", ">>", ">>=", ">>>", ">>>=",
",",
";", # ";"
"\\?",
"@",
"\\[",
"~", # handles =~ and !~
"{",
"\\^\\^?=?", # "^", "^=", "^^", "^^=",
"\\|\\|?=?", # "|", "|=", "||", "||=",
"break", "case", "continue", "delete",
"do", "else", "finally", "instanceof",
"return", "throw", "try", "typeof"
);
# match at beginning, a dot that is not part of a number, or sign.
my $pattern = "'(?:^^\\\\.?|[+-]";
foreach my $preceder (@preceders) {
$preceder =~ s/\\/\\\\/g;
$pattern .= "|$preceder";
}
$pattern .= ")\\\\s*'"; # matches at end, and matches empty string
print "$pattern;\n";
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<cobra document="https://github.com/wufeifei/cobra">
<name value="get_headers导致的SSRF"/>
<language value="php"/>
<match mode="function-param-controllable"><![CDATA[get_headers]]></match>
<level value="7"/>
<test>
<case assert="true"><![CDATA[
$url = $_GET['url'];
echo get_headers($url);
]]></case>
<case assert="false"><![CDATA[
$url = 'http://www.example.com';
echo get_headers($url);
]]></case>
</test>
<solution>
## 安全风险
SSRF漏洞(Server-Side Request Forgery)
### 形成原理
SSRF形成的原因大都是由于服务端提供了从其他服务器应用获取数据的功能且没有对目标地址做过滤与限制。
### 风险
1、攻击者可以对外网、服务器所在内网、本地进行端口扫描,获取服务的banner信息。
2、攻击运行在内网或本地的应用程序。
3、对内网web应用进行指纹识别。
4、攻击内外网的web应用。
5、利用file协议读取本地文件等。
## 修复方案
1. 限制协议为HTTP、HTTPS
2. 限制请求域名白名单
3. 禁止30x跳转
## 举例
```php
$url = $_GET['url'];
echo get_headers($url);//对用户可控的参数没有进行过滤,攻击者恶意构造输入就可能导致SSRF
```
</solution>
<status value="on"/>
<author name="Lightless" email="[email protected]"/>
</cobra> | {
"pile_set_name": "Github"
} |
<?php
/*
+-------------------------------------------------------------------------+
| Copyright (C) 2004-2020 The Cacti Group |
| |
| This program is free software; you can redistribute it and/or |
| modify it under the terms of the GNU General Public License |
| as published by the Free Software Foundation; either version 2 |
| of the License, or (at your option) any later version. |
| |
| This program is distributed in the hope that it will be useful, |
| but WITHOUT ANY WARRANTY; without even the implied warranty of |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| GNU General Public License for more details. |
+-------------------------------------------------------------------------+
| Cacti: The Complete RRDtool-based Graphing Solution |
+-------------------------------------------------------------------------+
| This code is designed, written, and maintained by the Cacti Group. See |
| about.php and/or the AUTHORS file for specific developer information. |
+-------------------------------------------------------------------------+
| http://www.cacti.net/ |
+-------------------------------------------------------------------------+
*/
/* update_replication_crc - update hash stored in settings table to inform
remote pollers to replicate tables
@arg $poller_id - the id of the poller impacted by hash update
@arg $variable - the variable name to store in the settings table */
function update_replication_crc($poller_id, $variable) {
$hash = hash('ripemd160', date('Y-m-d H:i:s') . rand() . $poller_id);
db_execute_prepared("REPLACE INTO settings
SET value = ?, name='$variable" . ($poller_id > 0 ? "_" . "$poller_id'":"'"),
array($hash));
}
function repopulate_poller_cache() {
$poller_data = db_fetch_assoc('SELECT ' . SQL_NO_CACHE . ' dl.*, h.poller_id
FROM data_local AS dl
INNER JOIN host AS h
ON dl.host_id=h.id
WHERE dl.snmp_query_id = 0 OR (dl.snmp_query_id > 0 AND dl.snmp_index != "")
ORDER BY h.poller_id ASC');
$poller_items = array();
$local_data_ids = array();
$poller_prev = 1;
$i = 0;
$j = 0;
if (cacti_sizeof($poller_data)) {
foreach ($poller_data as $data) {
if ($j == 0) {
$poller_prev = $data['poller_id'];
}
$poller_id = $data['poller_id'];
if ($i > 500 || $poller_prev != $poller_id) {
poller_update_poller_cache_from_buffer($local_data_ids, $poller_items, $poller_prev);
$i = 0;
$local_data_ids = array();
$poller_items = array();
}
$poller_prev = $poller_id;
$poller_items = array_merge($poller_items, update_poller_cache($data));
$local_data_ids[] = $data['id'];
$i++;
$j++;
}
if ($i > 0) {
poller_update_poller_cache_from_buffer($local_data_ids, $poller_items, $poller_id);
}
}
$poller_ids = array_rekey(
db_fetch_assoc('SELECT DISTINCT poller_id
FROM poller_item'),
'poller_id', 'poller_id'
);
if (cacti_sizeof($poller_ids)) {
foreach ($poller_ids as $poller_id) {
api_data_source_cache_crc_update($poller_id);
}
}
/* update the field mappings for the poller */
db_execute('TRUNCATE TABLE poller_data_template_field_mappings');
db_execute('INSERT IGNORE INTO poller_data_template_field_mappings
SELECT dtr.data_template_id, dif.data_name,
GROUP_CONCAT(dtr.data_source_name ORDER BY dtr.data_source_name) AS data_source_names, NOW()
FROM data_template_rrd AS dtr
INNER JOIN data_input_fields AS dif
ON dtr.data_input_field_id = dif.id
WHERE dtr.local_data_id = 0
GROUP BY dtr.data_template_id, dif.data_name');
}
function update_poller_cache_from_query($host_id, $data_query_id, $local_data_ids) {
$poller_data = db_fetch_assoc_prepared('SELECT ' . SQL_NO_CACHE . ' *
FROM data_local
WHERE host_id = ?
AND snmp_query_id = ?
AND id IN(' . implode(', ', $local_data_ids) . ')
AND snmp_index != ""',
array($host_id, $data_query_id));
$poller_id = db_fetch_cell_prepared('SELECT poller_id
FROM host
WHERE id = ?',
array($host_id));
$i = 0;
$poller_items = $local_data_ids = array();
if (cacti_sizeof($poller_data)) {
foreach ($poller_data as $data) {
$poller_items = array_merge($poller_items, update_poller_cache($data));
$local_data_ids[] = $data['id'];
$i++;
if ($i > 500) {
$i = 0;
poller_update_poller_cache_from_buffer($local_data_ids, $poller_items, $poller_id);
$local_data_ids = array();
$poller_items = array();
}
}
if ($i > 0) {
poller_update_poller_cache_from_buffer($local_data_ids, $poller_items, $poller_id);
}
}
if ($poller_id > 1) {
api_data_source_cache_crc_update($poller_id);
}
}
function update_poller_cache($data_source, $commit = false) {
global $config;
include_once($config['library_path'] . '/data_query.php');
include_once($config['library_path'] . '/api_poller.php');
if (!is_array($data_source)) {
$data_source = db_fetch_row_prepared('SELECT ' . SQL_NO_CACHE . ' *
FROM data_local AS dl
WHERE id = ?
AND (dl.snmp_query_id = 0 OR (dl.snmp_query_id > 0 AND dl.snmp_index != ""))',
array($data_source));
}
$poller_items = array();
if (!cacti_sizeof($data_source)) {
return $poller_items;
}
$poller_id = db_fetch_cell_prepared('SELECT poller_id
FROM host AS h
INNER JOIN data_local AS dl
ON h.id=dl.host_id
WHERE dl.id = ?',
array($data_source['id']));
$data_input = db_fetch_row_prepared('SELECT ' . SQL_NO_CACHE . '
di.id, di.type_id, dtd.id AS data_template_data_id,
dtd.data_template_id, dtd.active, dtd.rrd_step
FROM data_template_data AS dtd
INNER JOIN data_input AS di
ON dtd.data_input_id=di.id
WHERE dtd.local_data_id = ?',
array($data_source['id']));
if (cacti_sizeof($data_input)) {
// Check whitelist for input validation
if (!data_input_whitelist_check($data_input['id'])) {
return $poller_items;
}
/* we have to perform some additional sql queries if this is a 'query' */
if (($data_input['type_id'] == DATA_INPUT_TYPE_SNMP_QUERY) ||
($data_input['type_id'] == DATA_INPUT_TYPE_SCRIPT_QUERY) ||
($data_input['type_id'] == DATA_INPUT_TYPE_QUERY_SCRIPT_SERVER)){
$field = data_query_field_list($data_input['data_template_data_id']);
$params = array();
if ($field['output_type'] != '') {
$output_type_sql = ' AND sqgr.snmp_query_graph_id = ' . $field['output_type'];
} else {
$output_type_sql = '';
}
$params[] = $data_input['data_template_id'];
$params[] = $data_source['id'];
$outputs = db_fetch_assoc_prepared('SELECT DISTINCT ' . SQL_NO_CACHE . "
sqgr.snmp_field_name, dtr.id as data_template_rrd_id
FROM snmp_query_graph_rrd AS sqgr
INNER JOIN data_template_rrd AS dtr FORCE INDEX (local_data_id)
ON sqgr.data_template_rrd_id = dtr.local_data_template_rrd_id
WHERE sqgr.data_template_id = ?
AND dtr.local_data_id = ?
$output_type_sql
ORDER BY dtr.id", $params);
}
if ($data_input['active'] == 'on') {
if (($data_input['type_id'] == DATA_INPUT_TYPE_SCRIPT) || ($data_input['type_id'] == DATA_INPUT_TYPE_PHP_SCRIPT_SERVER)) { /* script */
/* fall back to non-script server actions if the user is running a version of php older than 4.3 */
if (($data_input['type_id'] == DATA_INPUT_TYPE_PHP_SCRIPT_SERVER) && (function_exists('proc_open'))) {
$action = POLLER_ACTION_SCRIPT_PHP;
$script_path = get_full_script_path($data_source['id']);
} elseif (($data_input['type_id'] == DATA_INPUT_TYPE_PHP_SCRIPT_SERVER) && (!function_exists('proc_open'))) {
$action = POLLER_ACTION_SCRIPT;
$script_path = read_config_option('path_php_binary') . ' -q ' . get_full_script_path($data_source['id']);
} else {
$action = POLLER_ACTION_SCRIPT;
$script_path = get_full_script_path($data_source['id']);
}
$num_output_fields = cacti_sizeof(db_fetch_assoc_prepared('SELECT ' . SQL_NO_CACHE . ' id
FROM data_input_fields
WHERE data_input_id = ?
AND input_output = "out"
AND update_rra="on"',
array($data_input['id'])));
if ($num_output_fields == 1) {
$data_template_rrd_id = db_fetch_cell_prepared('SELECT ' . SQL_NO_CACHE . ' id
FROM data_template_rrd
WHERE local_data_id = ?',
array($data_source['id']));
$data_source_item_name = get_data_source_item_name($data_template_rrd_id);
} else {
$data_source_item_name = '';
}
$poller_items[] = api_poller_cache_item_add($data_source['host_id'], array(), $data_source['id'], $data_input['rrd_step'], $action, $data_source_item_name, 1, $script_path);
} elseif ($data_input['type_id'] == DATA_INPUT_TYPE_SNMP) { /* snmp */
/* get the host override fields */
$data_template_id = db_fetch_cell_prepared('SELECT ' . SQL_NO_CACHE . ' data_template_id
FROM data_template_data
WHERE local_data_id = ?',
array($data_source['id']));
/* get host fields first */
$host_fields = array_rekey(
db_fetch_assoc_prepared('SELECT ' . SQL_NO_CACHE . ' dif.type_code, did.value
FROM data_input_fields AS dif
LEFT JOIN data_input_data AS did
ON dif.id=did.data_input_field_id
WHERE (type_code LIKE "snmp_%" OR type_code IN("hostname","host_id"))
AND did.data_template_data_id = ?
AND did.value != ""', array($data_input['data_template_data_id'])),
'type_code', 'value'
);
$data_template_fields = array_rekey(
db_fetch_assoc_prepared('SELECT ' . SQL_NO_CACHE . ' dif.type_code, did.value
FROM data_input_fields AS dif
LEFT JOIN data_input_data AS did
ON dif.id=did.data_input_field_id
WHERE (type_code LIKE "snmp_%" OR type_code="hostname")
AND did.data_template_data_id = ?
AND data_template_data_id = ?
AND did.value != ""', array($data_template_id, $data_template_id)),
'type_code', 'value'
);
if (cacti_sizeof($host_fields)) {
if (cacti_sizeof($data_template_fields)) {
foreach($data_template_fields as $key => $value) {
if (!isset($host_fields[$key])) {
$host_fields[$key] = $value;
}
}
}
} elseif (cacti_sizeof($data_template_fields)) {
$host_fields = $data_template_fields;
}
$data_template_rrd_id = db_fetch_cell_prepared('SELECT ' . SQL_NO_CACHE . ' id
FROM data_template_rrd
WHERE local_data_id = ?',
array($data_source['id']));
$poller_items[] = api_poller_cache_item_add($data_source['host_id'], $host_fields, $data_source['id'], $data_input['rrd_step'], 0, get_data_source_item_name($data_template_rrd_id), 1, (isset($host_fields['snmp_oid']) ? $host_fields['snmp_oid'] : ''));
} elseif ($data_input['type_id'] == DATA_INPUT_TYPE_SNMP_QUERY) { /* snmp query */
$snmp_queries = get_data_query_array($data_source['snmp_query_id']);
/* get the host override fields */
$data_template_id = db_fetch_cell_prepared('SELECT ' . SQL_NO_CACHE . ' data_template_id
FROM data_template_data
WHERE local_data_id = ?',
array($data_source['id']));
/* get host fields first */
$host_fields = array_rekey(
db_fetch_assoc_prepared('SELECT ' . SQL_NO_CACHE . ' dif.type_code, did.value
FROM data_input_fields AS dif
LEFT JOIN data_input_data AS did
ON dif.id=did.data_input_field_id
WHERE (type_code LIKE "snmp_%" OR type_code="hostname")
AND did.data_template_data_id = ?
AND did.value != ""', array($data_input['data_template_data_id'])),
'type_code', 'value'
);
$data_template_fields = array_rekey(
db_fetch_assoc_prepared('SELECT ' . SQL_NO_CACHE . ' dif.type_code, did.value
FROM data_input_fields AS dif
LEFT JOIN data_input_data AS did
ON dif.id=did.data_input_field_id
WHERE (type_code LIKE "snmp_%" OR type_code="hostname")
AND did.data_template_data_id = ?
AND data_template_data_id = ?
AND did.value != ""', array($data_template_id, $data_template_id)),
'type_code', 'value'
);
if (cacti_sizeof($host_fields)) {
if (cacti_sizeof($data_template_fields)) {
foreach ($data_template_fields as $key => $value) {
if (!isset($host_fields[$key])) {
$host_fields[$key] = $value;
}
}
}
} elseif (cacti_sizeof($data_template_fields)) {
$host_fields = $data_template_fields;
}
if (cacti_sizeof($outputs) && cacti_sizeof($snmp_queries)) {
foreach ($outputs as $output) {
if (isset($snmp_queries['fields'][$output['snmp_field_name']]['oid'])) {
$oid = $snmp_queries['fields'][$output['snmp_field_name']]['oid'] . '.' . $data_source['snmp_index'];
if (isset($snmp_queries['fields'][$output['snmp_field_name']]['oid_suffix'])) {
$oid .= '.' . $snmp_queries['fields'][$output['snmp_field_name']]['oid_suffix'];
}
}
if (!empty($oid)) {
$poller_items[] = api_poller_cache_item_add($data_source['host_id'], $host_fields, $data_source['id'], $data_input['rrd_step'], 0, get_data_source_item_name($output['data_template_rrd_id']), cacti_sizeof($outputs), $oid);
}
}
}
} elseif (($data_input['type_id'] == DATA_INPUT_TYPE_SCRIPT_QUERY) || ($data_input['type_id'] == DATA_INPUT_TYPE_QUERY_SCRIPT_SERVER)) { /* script query */
$script_queries = get_data_query_array($data_source['snmp_query_id']);
/* get the host override fields */
$data_template_id = db_fetch_cell_prepared('SELECT ' . SQL_NO_CACHE . ' data_template_id
FROM data_template_data
WHERE local_data_id = ?',
array($data_source['id']));
/* get host fields first */
$host_fields = array_rekey(
db_fetch_assoc_prepared('SELECT ' . SQL_NO_CACHE . ' dif.type_code, did.value
FROM data_input_fields AS dif
LEFT JOIN data_input_data AS did
ON dif.id=did.data_input_field_id
WHERE (type_code LIKE "snmp_%" OR type_code="hostname")
AND did.data_template_data_id = ?
AND did.value != ""', array($data_input['data_template_data_id'])),
'type_code', 'value'
);
$data_template_fields = array_rekey(
db_fetch_assoc_prepared('SELECT ' . SQL_NO_CACHE . ' dif.type_code, did.value
FROM data_input_fields AS dif
LEFT JOIN data_input_data AS did
ON dif.id=did.data_input_field_id
WHERE (type_code LIKE "snmp_%" OR type_code="hostname")
AND data_template_data_id = ?
AND did.data_template_data_id = ?
AND did.value != ""', array($data_template_id, $data_template_id)),
'type_code', 'value'
);
if (cacti_sizeof($host_fields)) {
if (cacti_sizeof($data_template_fields)) {
foreach ($data_template_fields as $key => $value) {
if (!isset($host_fields[$key])) {
$host_fields[$key] = $value;
}
}
}
} elseif (cacti_sizeof($data_template_fields)) {
$host_fields = $data_template_fields;
}
if (cacti_sizeof($outputs) && cacti_sizeof($script_queries)) {
foreach ($outputs as $output) {
if (isset($script_queries['fields'][$output['snmp_field_name']]['query_name'])) {
$identifier = $script_queries['fields'][$output['snmp_field_name']]['query_name'];
/* fall back to non-script server actions if the user is running a version of php older than 4.3 */
if (($data_input['type_id'] == DATA_INPUT_TYPE_QUERY_SCRIPT_SERVER) && (function_exists('proc_open'))) {
$action = POLLER_ACTION_SCRIPT_PHP;
$prepend = '';
if (isset($script_queries['arg_prepend']) && $script_queries['arg_prepend'] != '') {
$prepend = $script_queries['arg_prepend'];
}
$script_path = get_script_query_path(trim($prepend . ' ' . $script_queries['arg_get'] . ' ' . $identifier . ' ' . $data_source['snmp_index']), $script_queries['script_path'] . ' ' . $script_queries['script_function'], $data_source['host_id']);
} elseif (($data_input['type_id'] == DATA_INPUT_TYPE_QUERY_SCRIPT_SERVER) && (!function_exists('proc_open'))) {
$action = POLLER_ACTION_SCRIPT;
$prepend = '';
if (isset($script_queries['arg_prepend']) && $script_queries['arg_prepend'] != '') {
$prepend = $script_queries['arg_prepend'];
}
$script_path = read_config_option('path_php_binary') . ' -q ' . get_script_query_path(trim($prepend . ' ' . $script_queries['arg_get'] . ' ' . $identifier . ' ' . $data_source['snmp_index']), $script_queries['script_path'], $data_source['host_id']);
} else {
$action = POLLER_ACTION_SCRIPT;
$script_path = get_script_query_path(trim((isset($script_queries['arg_prepend']) ? $script_queries['arg_prepend'] : '') . ' ' . $script_queries['arg_get'] . ' ' . $identifier . ' ' . $data_source['snmp_index']), $script_queries['script_path'], $data_source['host_id']);
}
}
if (isset($script_path)) {
$poller_items[] = api_poller_cache_item_add($data_source['host_id'], $host_fields, $data_source['id'], $data_input['rrd_step'], $action, get_data_source_item_name($output['data_template_rrd_id']), cacti_sizeof($outputs), $script_path);
}
}
}
} else {
$arguments = array(
'poller_items' => $poller_items,
'data_source' => $data_source,
'data_input' => $data_input
);
$arguments = api_plugin_hook_function('data_source_to_poller_items', $arguments);
// Process the returned poller items
if ((isset($arguments['poller_items'])) &&
(is_array($arguments['poller_items'])) &&
(cacti_sizeof($poller_items) < cacti_sizeof($arguments['poller_items']))) {
$poller_items = $arguments['poller_items'];
}
}
}
} else {
$data_template_data = db_fetch_row_prepared('SELECT ' . SQL_NO_CACHE . ' *
FROM data_template_data
WHERE local_data_id = ?',
array($data_source['id']));
if (cacti_sizeof($data_template_data) && $data_template_data['data_input_id'] > 0) {
cacti_log('WARNING: Repopulate Poller Cache found Data Input Missing for Data Source ' . $data_source['id'] . '. Database may be corrupted');
}
}
if ($commit && cacti_sizeof($poller_items)) {
poller_update_poller_cache_from_buffer((array)$data_source['id'], $poller_items, $poller_id);
} elseif (!$commit) {
return $poller_items;
}
}
function push_out_data_input_method($data_input_id) {
$data_sources = db_fetch_assoc_prepared('SELECT ' . SQL_NO_CACHE . ' dl.*, h.poller_id
FROM data_local AS dl
INNER JOIN (
SELECT DISTINCT local_data_id
FROM data_template_data
WHERE data_input_id = ?
AND local_data_id > 0
) AS dtd
ON dtd.local_data_id = dl.id
INNER JOIN host AS h
ON h.id = dl.host_id
WHERE dl.snmp_query_id = 0 OR (dl.snmp_query_id > 0 AND dl.snmp_index != "")
ORDER BY h.poller_id ASC',
array($data_input_id));
$poller_items = array();
$_my_local_data_ids = array();
if (cacti_sizeof($data_sources)) {
$prev_poller = -1;
foreach ($data_sources as $data_source) {
if ($prev_poller > 0 && $data_source['poller_id'] != $prev_poller) {
poller_update_poller_cache_from_buffer($_my_local_data_ids, $poller_items, $prev_poller);
$_my_local_data_ids = array();
$poller_items = array();
} else {
$_my_local_data_ids[] = $data_source['id'];
$poller_items = array_merge($poller_items, update_poller_cache($data_source));
}
$prev_poller = $data_source['poller_id'];
}
if (cacti_sizeof($_my_local_data_ids)) {
poller_update_poller_cache_from_buffer($_my_local_data_ids, $poller_items, $prev_poller);
}
}
}
/** mass update of poller cache - can run in parallel to poller
* @param array/int $local_data_ids - either a scalar (all ids) or an array of data source to act on
* @param array $poller_items - the new items for poller cache
* @param int $poller_id - the poller_id of the buffer
*/
function poller_update_poller_cache_from_buffer($local_data_ids, &$poller_items, $poller_id = 1) {
global $config;
/* set all fields present value to 0, to mark the outliers when we are all done */
$ids = '';
if (cacti_sizeof($local_data_ids)) {
$ids = implode(', ', $local_data_ids);
if ($ids != '') {
db_execute("UPDATE poller_item
SET present=0
WHERE local_data_id IN ($ids)");
if (($rcnn_id = poller_push_to_remote_db_connect($poller_id, true)) !== false) {
db_execute("UPDATE poller_item
SET present=0
WHERE local_data_id IN ($ids)", true, $rcnn_id);
}
}
} else {
/* don't mark anything in case we have no $local_data_ids =>
*this would flush the whole table at bottom of this function */
}
/* setup the database call */
$sql_prefix = 'INSERT INTO poller_item (local_data_id, poller_id, host_id, action, hostname, ' .
'snmp_community, snmp_version, snmp_timeout, snmp_username, snmp_password, ' .
'snmp_auth_protocol, snmp_priv_passphrase, snmp_priv_protocol, snmp_context, snmp_engine_id, ' .
'snmp_port, rrd_name, rrd_path, rrd_num, rrd_step, rrd_next_step, arg1, arg2, arg3, present) ' .
'VALUES';
$sql_suffix = ' ON DUPLICATE KEY UPDATE poller_id=VALUES(poller_id), host_id=VALUES(host_id), action=VALUES(action), hostname=VALUES(hostname), ' .
'snmp_community=VALUES(snmp_community), snmp_version=VALUES(snmp_version), snmp_timeout=VALUES(snmp_timeout), ' .
'snmp_username=VALUES(snmp_username), snmp_password=VALUES(snmp_password), snmp_auth_protocol=VALUES(snmp_auth_protocol), ' .
'snmp_priv_passphrase=VALUES(snmp_priv_passphrase), snmp_priv_protocol=VALUES(snmp_priv_protocol), ' .
'snmp_context=VALUES(snmp_context), snmp_engine_id=VALUES(snmp_engine_id), snmp_port=VALUES(snmp_port), ' .
'rrd_path=VALUES(rrd_path), rrd_num=VALUES(rrd_num), ' .
'rrd_step=VALUES(rrd_step), rrd_next_step=VALUES(rrd_next_step), arg1=VALUES(arg1), arg2=VALUES(arg2), ' .
'arg3=VALUES(arg3), present=VALUES(present)';
/* use a reasonable insert buffer, the default is 1MByte */
$max_packet = 256000;
/* setup somme defaults */
$overhead = strlen($sql_prefix) + strlen($sql_suffix);
$buf_len = 0;
$buf_count = 0;
$buffer = '';
if (cacti_sizeof($poller_items)) {
foreach ($poller_items as $record) {
/* take care of invalid entries */
if ($record == '') {
continue;
}
if ($buf_count == 0) {
$delim = ' ';
} else {
$delim = ', ';
}
$buffer .= $delim . $record;
$buf_len += strlen($record);
if ($overhead + $buf_len > $max_packet - 1024) {
db_execute($sql_prefix . $buffer . $sql_suffix);
if (($rcnn_id = poller_push_to_remote_db_connect($poller_id, true)) !== false) {
db_execute($sql_prefix . $buffer . $sql_suffix, true, $rcnn_id);
}
$buffer = '';
$buf_len = 0;
$buf_count = 0;
} else {
$buf_count++;
}
}
}
if ($buf_count > 0) {
db_execute($sql_prefix . $buffer . $sql_suffix);
if (($rcnn_id = poller_push_to_remote_db_connect($poller_id, true)) !== false) {
db_execute($sql_prefix . $buffer . $sql_suffix, true, $rcnn_id);
}
}
/* remove stale records FROM the poller cache */
if ($ids != '') {
db_execute("DELETE FROM poller_item
WHERE present=0
AND local_data_id IN ($ids)");
if (($rcnn_id = poller_push_to_remote_db_connect($poller_id, true)) !== false) {
db_execute("DELETE FROM poller_item
WHERE present=0
AND local_data_id IN ($ids)", true, $rcnn_id);
}
} else {
/* only handle explicitely given local_data_ids */
}
}
/** for a given data template, update all input data and the poller cache
* @param int $host_id - id of host, if any
* @param int $local_data_id - id of a single data source, if any
* @param int $data_template_id - id of data template
* works on table data_input_data and poller cache
*/
function push_out_host($host_id, $local_data_id = 0, $data_template_id = 0) {
/* ok here's the deal: first we need to find every data source that uses this host.
then we go through each of those data sources, finding each one using a data input method
with "special fields". if we find one, fill it will the data here FROM this host */
/* setup the poller items array */
$poller_items = array();
$local_data_ids = array();
$hosts = array();
$template_fields = array();
$sql_where = '';
/* setup the sql where, and if using a host, get it's host information */
if ($host_id != 0) {
/* get all information about this host so we can write it to the data source */
$hosts[$host_id] = db_fetch_row_prepared('SELECT ' . SQL_NO_CACHE . ' id AS host_id, host.*
FROM host WHERE id = ?',
array($host_id));
$sql_where .= ' AND dl.host_id=' . $host_id;
}
/* sql WHERE for local_data_id */
if ($local_data_id != 0) {
$sql_where .= ' AND dl.id=' . $local_data_id;
}
/* sql WHERE for data_template_id */
if ($data_template_id != 0) {
$sql_where .= ' AND dtd.data_template_id=' . $data_template_id;
}
$data_sources = db_fetch_assoc('SELECT ' . SQL_NO_CACHE . " dtd.id,
dtd.data_input_id, dtd.local_data_id,
dtd.local_data_template_data_id, dl.host_id,
dl.snmp_query_id, dl.snmp_index
FROM data_local AS dl
INNER JOIN data_template_data AS dtd
ON dl.id=dtd.local_data_id
WHERE dtd.data_input_id>0
AND (dl.snmp_query_id = 0 OR (dl.snmp_query_id > 0 AND dl.snmp_index != ''))
$sql_where");
/* loop through each matching data source */
if (cacti_sizeof($data_sources)) {
foreach ($data_sources as $data_source) {
/* set the host information */
if (!isset($hosts[$data_source['host_id']])) {
$hosts[$data_source['host_id']] = db_fetch_row_prepared('SELECT *
FROM host
WHERE id = ?',
array($data_source['host_id']));
}
$host = $hosts[$data_source['host_id']];
/* get field information FROM the data template */
if (!isset($template_fields[$data_source['local_data_template_data_id']])) {
$template_fields[$data_source['local_data_template_data_id']] = db_fetch_assoc_prepared('SELECT ' . SQL_NO_CACHE . '
did.value, did.t_value, dif.id, dif.type_code
FROM data_input_fields AS dif
LEFT JOIN data_input_data AS did
ON dif.id=did.data_input_field_id
WHERE dif.data_input_id = ?
AND did.data_template_data_id = ?
AND (did.t_value="" OR did.t_value is null)
AND dif.input_output = "in"',
array($data_source['data_input_id'], $data_source['local_data_template_data_id']));
}
/* loop through each field contained in the data template and push out a host value if:
- the field is a valid "host field"
- the value of the field is empty
- the field is set to 'templated' */
if (cacti_sizeof($template_fields[$data_source['local_data_template_data_id']])) {
foreach ($template_fields[$data_source['local_data_template_data_id']] as $template_field) {
if (preg_match('/^' . VALID_HOST_FIELDS . '$/i', $template_field['type_code']) && $template_field['value'] == '' && $template_field['t_value'] == '') {
// handle special case type_code
if ($template_field['type_code'] == 'host_id') {
$template_field['type_code'] = 'id';
}
db_execute_prepared('REPLACE INTO data_input_data
(data_input_field_id, data_template_data_id, value)
VALUES (?, ?, ?)',
array($template_field['id'], $data_source['id'], $host[$template_field['type_code']]));
}
}
}
/* flag an update to the poller cache as well */
$local_data_ids[] = $data_source['local_data_id'];
/* create a new compatible structure */
$data = $data_source;
$data['id'] = $data['local_data_id'];
$poller_items = array_merge($poller_items, update_poller_cache($data));
}
}
if (cacti_sizeof($hosts)) {
foreach($hosts as $host) {
if (isset($host['poller_id'])) {
$poller_ids[$host['poller_id']] = $host['poller_id'];
}
}
if (cacti_sizeof($poller_ids) > 1) {
cacti_log('WARNING: function push_out_host() discovered more than a single host', false, 'POLLER');
}
}
$poller_id = db_fetch_cell_prepared('SELECT poller_id
FROM host
WHERE id = ?',
array($host_id));
if (cacti_sizeof($local_data_ids)) {
poller_update_poller_cache_from_buffer($local_data_ids, $poller_items, $poller_id);
}
api_data_source_cache_crc_update($poller_id);
}
function data_input_whitelist_check($data_input_id) {
global $config;
static $data_input_whitelist = null;
static $validated_input_ids = null;
static $notified = array();
// no whitelist file defined, everything whitelisted
if (!isset($config['input_whitelist'])) {
return true;
}
// whitelist is configured but does not exist, means nothing whitelisted
if (!file_exists($config['input_whitelist'])) {
return false;
}
// load whitelist, but only once within process execution
if ($data_input_whitelist == null) {
$data_input_ids = array_rekey(
db_fetch_assoc('SELECT * FROM data_input'),
'hash', array('id', 'name', 'input_string')
);
$data_input_whitelist = json_decode(file_get_contents($config['input_whitelist']), true);
if ($data_input_whitelist === null) {
cacti_log('ERROR: Failed to parse input whitelist file: ' . $config['input_whitelist']);
return true;
}
if (cacti_sizeof($data_input_ids)) {
foreach ($data_input_ids as $hash => $id) {
if ($id['input_string'] != '') {
if (isset($data_input_whitelist[$hash])) {
if ($data_input_whitelist[$hash] == $id['input_string']) {
$validated_input_ids[$id['id']] = true;
} else {
cacti_log('ERROR: Whitelist entry failed validation for Data Input: ' . $id['name'] . '[ ' . $id['id'] . ' ]. Data Collection will not run. Run CLI command input_whitelist.php --audit and --update to remediate.');
$validated_input_ids[$id['id']] = false;
}
} else {
cacti_log('WARNING: Whitelist entry missing for Data Input: ' . $id['name'] . '[ ' . $id['id'] . ' ]. Run CLI command input_whitelist.php --update to remediate.');
$validated_input_ids[$id['id']] = true;
}
} else {
$validated_input_ids[$id['id']] = true;
}
}
}
}
if (isset($validated_input_ids[$data_input_id])) {
if ($validated_input_ids[$data_input_id] == true) {
return true;
} else {
cacti_log('WARNING: Data Input ' . $data_input_id . ' failing validation check.');
$notified[$data_input_id] = true;
return false;
}
} else {
return true;
}
}
function utilities_get_mysql_recommendations() {
global $config, $local_db_cnn_id;
// MySQL/MariaDB Important Variables
// Assume we are successfully, until we aren't!
$result = DB_STATUS_SUCCESS;
if ($config['poller_id'] == 1) {
$variables = array_rekey(db_fetch_assoc('SHOW GLOBAL VARIABLES'), 'Variable_name', 'Value');
} else {
$variables = array_rekey(db_fetch_assoc('SHOW GLOBAL VARIABLES', false, $local_db_cnn_id), 'Variable_name', 'Value');
}
$memInfo = utilities_get_system_memory();
if (strpos($variables['version'], 'MariaDB') !== false) {
$database = 'MariaDB';
$version = str_replace('-MariaDB', '', $variables['version']);
if (isset($variables['innodb_version'])) {
$link_ver = substr($variables['innodb_version'], 0, 3);
} else {
$link_ver = '5.5';
}
} else {
$database = 'MySQL';
$version = $variables['version'];
$link_ver = substr($variables['version'], 0, 3);
}
$recommendations = array(
'version' => array(
'value' => '5.6',
'class' => 'warning',
'measure' => 'ge',
'comment' => __('MySQL 5.6+ and MariaDB 10.0+ are great releases, and are very good versions to choose. Make sure you run the very latest release though which fixes a long standing low level networking issue that was causing spine many issues with reliability.')
)
);
if (isset($variables['innodb_version']) && version_compare($variables['innodb_version'], '5.6', '<')) {
if (version_compare($link_ver, '5.5', '>=')) {
if (!isset($variables['innodb_version'])) {
$recommendations += array(
'innodb' => array(
'value' => 'ON',
'class' => 'warning',
'measure' => 'equalint',
'comment' => __('It is STRONGLY recommended that you enable InnoDB in any %s version greater than 5.5.3.', $database)
)
);
$variables['innodb'] = 'UNSET';
}
}
$recommendations += array(
'collation_server' => array(
'value' => 'utf8mb4_unicode_ci',
'class' => 'warning',
'measure' => 'equal',
'comment' => __('When using Cacti with languages other than English, it is important to use the utf8_general_ci collation type as some characters take more than a single byte. If you are first just now installing Cacti, stop, make the changes and start over again. If your Cacti has been running and is in production, see the internet for instructions on converting your databases and tables if you plan on supporting other languages.')
),
'character_set_client' => array(
'value' => 'utf8mb4',
'class' => 'warning',
'measure' => 'equal',
'comment' => __('When using Cacti with languages other than English, it is important to use the utf8 character set as some characters take more than a single byte. If you are first just now installing Cacti, stop, make the changes and start over again. If your Cacti has been running and is in production, see the internet for instructions on converting your databases and tables if you plan on supporting other languages.')
)
);
} else {
if (version_compare($link_ver, '5.2', '>=')) {
if (!isset($variables['innodb_version'])) {
$recommendations += array(
'innodb' => array(
'value' => 'ON',
'class' => 'warning',
'measure' => 'equalint',
'comment' => __('It is recommended that you enable InnoDB in any %s version greater than 5.1.', $database)
)
);
$variables['innodb'] = 'UNSET';
}
}
$recommendations += array(
'collation_server' => array(
'value' => 'utf8mb4_unicode_ci',
'measure' => 'equal',
'comment' => __('When using Cacti with languages other than English, it is important to use the utf8mb4_unicode_ci collation type as some characters take more than a single byte.')
),
'character_set_client' => array(
'value' => 'utf8mb4',
'class' => 'warning',
'measure' => 'equal',
'comment' => __('When using Cacti with languages other than English, it is important to use the utf8mb4 character set as some characters take more than a single byte.')
)
);
}
$recommendations += array(
'max_connections' => array(
'value' => '100',
'measure' => 'ge',
'comment' => __('Depending on the number of logins and use of spine data collector, %s will need many connections. The calculation for spine is: total_connections = total_processes * (total_threads + script_servers + 1), then you must leave headroom for user connections, which will change depending on the number of concurrent login accounts.', $database)
),
'table_cache' => array(
'value' => '200',
'measure' => 'ge',
'comment' => __('Keeping the table cache larger means less file open/close operations when using innodb_file_per_table.')
),
'max_allowed_packet' => array(
'value' => 16777216,
'measure' => 'ge',
'comment' => __('With Remote polling capabilities, large amounts of data will be synced from the main server to the remote pollers. Therefore, keep this value at or above 16M.')
),
'max_heap_table_size' => array(
'value' => '1.6',
'measure' => 'pmem',
'class' => 'warning',
'comment' => __('If using the Cacti Performance Booster and choosing a memory storage engine, you have to be careful to flush your Performance Booster buffer before the system runs out of memory table space. This is done two ways, first reducing the size of your output column to just the right size. This column is in the tables poller_output, and poller_output_boost. The second thing you can do is allocate more memory to memory tables. We have arbitrarily chosen a recommended value of 10%% of system memory, but if you are using SSD disk drives, or have a smaller system, you may ignore this recommendation or choose a different storage engine. You may see the expected consumption of the Performance Booster tables under Console -> System Utilities -> View Boost Status.')
),
'tmp_table_size' => array(
'value' => '1.6',
'measure' => 'pmem',
'class' => 'warning',
'comment' => __('When executing subqueries, having a larger temporary table size, keep those temporary tables in memory.')
),
'join_buffer_size' => array(
'value' => '3.2',
'measure' => 'pmem',
'class' => 'warning',
'comment' => __('When performing joins, if they are below this size, they will be kept in memory and never written to a temporary file.')
),
'innodb_file_per_table' => array(
'value' => 'ON',
'measure' => 'equalint',
'class' => 'error',
'comment' => __('When using InnoDB storage it is important to keep your table spaces separate. This makes managing the tables simpler for long time users of %s. If you are running with this currently off, you can migrate to the per file storage by enabling the feature, and then running an alter statement on all InnoDB tables.', $database)
),
'innodb_file_format' => array(
'value' => 'Barracuda',
'measure' => 'equal',
'class' => 'error',
'comment' => __('When using innodb_file_per_table, it is important to set the innodb_file_format to Barracuda. This setting will allow longer indexes important for certain Cacti tables.')
),
'innodb_large_prefix' => array(
'value' => '1',
'measure' => 'equalint',
'class' => 'error',
'comment' => __('If your tables have very large indexes, you must operate with the Barracuda innodb_file_format and the innodb_large_prefix equal to 1. Failure to do this may result in plugins that can not properly create tables.')
),
'innodb_buffer_pool_size' => array(
'value' => '25',
'measure' => 'pmem',
'class' => 'warning',
'comment' => __('InnoDB will hold as much tables and indexes in system memory as is possible. Therefore, you should make the innodb_buffer_pool large enough to hold as much of the tables and index in memory. Checking the size of the /var/lib/mysql/cacti directory will help in determining this value. We are recommending 25%% of your systems total memory, but your requirements will vary depending on your systems size.')
),
'innodb_doublewrite' => array(
'value' => 'ON',
'measure' => 'equalint',
'class' => 'error',
'comment' => __('This settings should remain ON unless your Cacti instances is running on either ZFS or FusionI/O which both have internal journaling to accomodate abrupt system crashes. However, if you have very good power, and your systems rarely go down and you have backups, turning this setting to OFF can net you almost a 50% increase in database performance.')
),
'innodb_additional_mem_pool_size' => array(
'value' => '80M',
'measure' => 'gem',
'comment' => __('This is where metadata is stored. If you had a lot of tables, it would be useful to increase this.')
),
'innodb_lock_wait_timeout' => array(
'value' => '50',
'measure' => 'ge',
'comment' => __('Rogue queries should not for the database to go offline to others. Kill these queries before they kill your system.')
),
'innodb_flush_method' => array(
'value' => 'O_DIRECT',
'measure' => 'eq',
'comment' => __('Maximum I/O performance happens when you use the O_DIRECT method to flush pages.')
)
);
if (isset($variables['innodb_version'])) {
if (version_compare($variables['innodb_version'], '5.6', '<')) {
$recommendations += array(
'innodb_flush_log_at_trx_commit' => array(
'value' => '2',
'measure' => 'equal',
'comment' => __('Setting this value to 2 means that you will flush all transactions every second rather than at commit. This allows %s to perform writing less often.', $database)
),
'innodb_file_io_threads' => array(
'value' => '16',
'measure' => 'ge',
'comment' => __('With modern SSD type storage, having multiple io threads is advantageous for applications with high io characteristics.')
)
);
} elseif (version_compare($variables['innodb_version'], '10.5', '<')) {
$recommendations += array(
'innodb_flush_log_at_timeout' => array(
'value' => '3',
'measure' => 'ge',
'comment' => __('As of %s %s, the you can control how often %s flushes transactions to disk. The default is 1 second, but in high I/O systems setting to a value greater than 1 can allow disk I/O to be more sequential', $database, $version, $database),
),
'innodb_read_io_threads' => array(
'value' => '32',
'measure' => 'ge',
'comment' => __('With modern SSD type storage, having multiple read io threads is advantageous for applications with high io characteristics.')
),
'innodb_write_io_threads' => array(
'value' => '16',
'measure' => 'ge',
'comment' => __('With modern SSD type storage, having multiple write io threads is advantageous for applications with high io characteristics.')
),
'innodb_buffer_pool_instances' => array(
'value' => '16',
'measure' => 'pinst',
'class' => 'warning',
'comment' => __('%s will divide the innodb_buffer_pool into memory regions to improve performance. The max value is 64. When your innodb_buffer_pool is less than 1GB, you should use the pool size divided by 128MB. Continue to use this equation upto the max of 64.', $database)
),
'innodb_io_capacity' => array(
'value' => '5000',
'measure' => 'ge',
'class' => 'warning',
'comment' => __('If you have SSD disks, use this suggestion. If you have physical hard drives, use 200 * the number of active drives in the array. If using NVMe or PCIe Flash, much larger numbers as high as 100000 can be used.')
),
'innodb_io_capacity_max' => array(
'value' => '10000',
'measure' => 'ge',
'class' => 'warning',
'comment' => __('If you have SSD disks, use this suggestion. If you have physical hard drives, use 2000 * the number of active drives in the array. If using NVMe or PCIe Flash, much larger numbers as high as 200000 can be used.')
),
'innodb_flush_neighbor_pages' => array(
'value' => 'none',
'measure' => 'eq',
'class' => 'warning',
'comment' => __('If you have SSD disks, use this suggestion. Otherwise, do not set this setting.')
)
);
} else {
$recommendations += array(
'innodb_flush_log_at_timeout' => array(
'value' => '3',
'measure' => 'ge',
'comment' => __('As of %s %s, the you can control how often %s flushes transactions to disk. The default is 1 second, but in high I/O systems setting to a value greater than 1 can allow disk I/O to be more sequential', $database, $version, $database),
),
'innodb_read_io_threads' => array(
'value' => '32',
'measure' => 'ge',
'comment' => __('With modern SSD type storage, having multiple read io threads is advantageous for applications with high io characteristics.')
),
'innodb_write_io_threads' => array(
'value' => '16',
'measure' => 'ge',
'comment' => __('With modern SSD type storage, having multiple write io threads is advantageous for applications with high io characteristics.')
),
'innodb_io_capacity' => array(
'value' => '5000',
'measure' => 'ge',
'class' => 'warning',
'comment' => __('If you have SSD disks, use this suggestion. If you have physical hard drives, use 200 * the number of active drives in the array. If using NVMe or PCIe Flash, much larger numbers as high as 100000 can be used.')
),
'innodb_io_capacity_max' => array(
'value' => '10000',
'measure' => 'ge',
'class' => 'warning',
'comment' => __('If you have SSD disks, use this suggestion. If you have physical hard drives, use 2000 * the number of active drives in the array. If using NVMe or PCIe Flash, much larger numbers as high as 200000 can be used.')
),
'innodb_flush_neighbor_pages' => array(
'value' => 'none',
'measure' => 'eq',
'class' => 'warning',
'comment' => __('If you have SSD disks, use this suggestion. Otherwise, do not set this setting.')
)
);
unset($recommendations['innodb_additional_mem_pool_size']);
}
}
if (file_exists('/etc/my.cnf.d/server.cnf')) {
$location = '/etc/my.cnf.d/server.cnf';
} else {
$location = '/etc/my.cnf';
}
print '<tr class="tableHeader tableFixed">';
print '<th colspan="2">' . __('%s Tuning', $database) . ' (' . $location . ') - [ <a class="linkOverDark" href="' . html_escape('https://dev.mysql.com/doc/refman/' . $link_ver . '/en/server-system-variables.html') . '">' . __('Documentation') . '</a> ] ' . __('Note: Many changes below require a database restart') . '</th>';
print '</tr>';
form_alternate_row();
print "<td colspan='2' style='text-align:left;padding:0px'>";
print "<table id='mysql' class='cactiTable' style='width:100%'>";
print "<thead>";
print "<tr class='tableHeader'>";
print " <th class='tableSubHeaderColumn'>" . __('Variable') . "</th>";
print " <th class='tableSubHeaderColumn right'>" . __('Current Value'). "</th>";
print " <th class='tableSubHeaderColumn center'> </th>";
print " <th class='tableSubHeaderColumn'>" . __('Recommended Value') . "</th>";
print " <th class='tableSubHeaderColumn'>" . __('Comments') . "</th>";
print "</tr>";
print "</thead>";
$innodb_pool_size = 0;
foreach ($recommendations as $name => $r) {
if (isset($variables[$name])) {
$class = '';
// Unset $passed so that we only display fields that we checked
unset($passed);
$compare = '';
$value_recommend = isset($r['value']) ? $r['value'] : '<unset>';
$value_current = isset($variables[$name]) ? $variables[$name] : '<unset>';
$value_display = $value_current;
switch($r['measure']) {
case 'gem':
$compare = '>=';
$value_display = ($variables[$name]/1024/1024) . ' M';
$value = trim($r['value'], 'M') * 1024 * 1024;
if ($variables[$name] < $value) {
$passed = false;
}
break;
case 'ge':
$compare = '>=';
$passed = (version_compare($value_current, $value_recommend, '>='));
break;
case 'equalint':
case 'equal':
$compare = '=';
if (!isset($variables[$name])) {
$passed = false;
} else {
$e_var = $variables[$name];
$e_rec = $value_recommend;
if ($r['measure'] == 'equalint') {
$e_var = (!strcasecmp('on', $e_var) ? 1 : (!strcasecmp('off', $e_var) ? 0 : $e_var));
$e_rec = (!strcasecmp('on', $e_rec) ? 1 : (!strcasecmp('off', $e_rec) ? 0 : $e_rec));
}
$passed = $e_var == $e_rec;
}
break;
case 'pmem':
if (isset($memInfo['MemTotal'])) {
$totalMem = $memInfo['MemTotal'];
} elseif (isset($memInfo['TotalVisibleMemorySize'])) {
$totalMem = $memInfo['TotalVisibleMemorySize'];
} else {
break;
}
if ($name == 'innodb_buffer_pool_size') {
$innodb_pool_size = $variables[$name];
}
$compare = '>=';
$passed = ($variables[$name] >= ($r['value']*$totalMem/100));
$value_display = round($variables[$name]/1024/1024, 2) . ' M';
$value_recommend = round($r['value']*$totalMem/100/1024/1024, 2) . ' M';
break;
case 'pinst':
$compare = '>=';
// Divide the buffer pool size by 128MB, and ensure 1 or more
$pool_instances = round(($innodb_pool_size / 1024 / 1024 / 128) + 0.5);
if ($pool_instances < 1) {
$pool_instances = 1;
} elseif ($pool_instances > 64) {
$pool_instances = 64;
}
$passed = ($variables[$name] >= $pool_instances);
$value_recommend = $pool_instances;
break;
default:
$compare = $r['measure'];
$passed = true;
}
if (isset($passed)) {
if (!$passed) {
if (isset($r['class']) && $r['class'] == 'warning') {
$class = 'textWarning';
if ($result == DB_STATUS_SUCCESS) {
$result = DB_STATUS_WARNING;
}
} else {
$class = 'textError';
if ($result != DB_STATUS_ERROR) {
$result = DB_STATUS_ERROR;
}
}
}
form_alternate_row();
print "<td>" . $name . "</td>";
print "<td class='right $class'>$value_display</td>";
print "<td class='center'>$compare</td>";
print "<td>$value_recommend</td>";
print "<td class='$class'>" . $r['comment'] . "</td>";
form_end_row();
}
}
}
print "</table>";
print "</td>";
form_end_row();
return $result;
}
function utilities_php_modules() {
/*
Gather phpinfo into a string variable - This has to be done before
any headers are sent to the browser, as we are going to do some
output buffering fun
*/
ob_start();
phpinfo(INFO_MODULES);
$php_info = ob_get_contents();
ob_end_clean();
/* Remove nasty style sheets, links and other junk */
$php_info = str_replace("\n", '', $php_info);
$php_info = preg_replace('/^.*\<body\>/', '', $php_info);
$php_info = preg_replace('/\<\/body\>.*$/', '', $php_info);
$php_info = preg_replace('/\<a.*\>/U', '', $php_info);
$php_info = preg_replace('/\<\/a\>/', '<hr>', $php_info);
$php_info = preg_replace('/\<img.*\>/U', '', $php_info);
$php_info = preg_replace('/\<\/?address\>/', '', $php_info);
return $php_info;
}
function memory_bytes($val) {
$val = trim($val);
$last = strtolower($val[strlen($val)-1]);
$val = trim($val, 'GMKgmk');
switch($last) {
case 'g':
$val *= 1024;
case 'm':
$val *= 1024;
case 'k':
$val *= 1024;
}
return $val;
}
function memory_readable($val) {
if ($val < 1024) {
$val_label = 'bytes';
} elseif ($val < 1048576) {
$val_label = 'K';
$val /= 1024;
} elseif ($val < 1073741824) {
$val_label = 'M';
$val /= 1048576;
} else {
$val_label = 'G';
$val /= 1073741824;
}
return $val . $val_label;
}
function utilities_get_system_memory() {
global $config;
$memInfo = array();
if ($config['cacti_server_os'] == 'win32') {
exec('wmic os get FreePhysicalMemory', $memInfo['FreePhysicalMemory']);
exec('wmic os get FreeSpaceInPagingFiles', $memInfo['FreeSpaceInPagingFiles']);
exec('wmic os get FreeVirtualMemory', $memInfo['FreeVirtualMemory']);
exec('wmic os get SizeStoredInPagingFiles', $memInfo['SizeStoredInPagingFiles']);
exec('wmic os get TotalVirtualMemorySize', $memInfo['TotalVirtualMemorySize']);
exec('wmic os get TotalVisibleMemorySize', $memInfo['TotalVisibleMemorySize']);
if (cacti_sizeof($memInfo)) {
foreach ($memInfo as $key => $values) {
$memInfo[$key] = $values[1] * 1000;
}
}
} else {
$file = '';
if (file_exists('/proc/meminfo')) {
$file = '/proc/meminfo';
} elseif(file_exists('/linux/proc/meminfo')) {
$file = '/linux/proc/meminfo';
} elseif(file_exists('/compat/linux/proc/meminfo')) {
$file = '/compat/linux/proc/meminfo';
} elseif(file_exists('/usr/compat/linux/proc/meminfo')) {
$file = '/usr/compat/linux/proc/meminfo';
}
if ($file != '') {
$data = explode("\n", file_get_contents($file));
foreach ($data as $l) {
if (trim($l) != '') {
list($key, $val) = explode(':', $l);
$val = trim($val, " kBb\r\n");
$memInfo[$key] = round($val * 1000,0);
}
}
} elseif (file_exists('/usr/bin/free')) {
$menInfo = array();
$output = array();
$exit_code = 0;
exec('/usr/bin/free', $output, $exit_code);
if ($exit_code == 0) {
foreach ($output as $line) {
$parts = preg_split('/\s+/', $line);
switch ($parts[0]) {
case 'Mem:':
$memInfo['MemTotal'] = (isset($parts[1]) ? $parts[1]*1000:0);
$memInfo['MemUsed'] = (isset($parts[2]) ? $parts[2]*1000:0);
$memInfo['MemFree'] = (isset($parts[3]) ? $parts[3]*1000:0);
$memInfo['MemShared'] = (isset($parts[4]) ? $parts[4]*1000:0);
$memInfo['Buffers'] = (isset($parts[5]) ? $parts[5]*1000:0);
$memInfo['Cached'] = (isset($parts[6]) ? $parts[6]*1000:0);
break;
case '-/+':
$memInfo['Active'] = (isset($parts[2]) ? $parts[3]*1000:0);
$memInfo['Inactive'] = (isset($parts[3]) ? $parts[3]*1000:0);
break;
case 'Swap:':
$memInfo['SwapTotal'] = (isset($parts[1]) ? $parts[1]*1000:0);
$memInfo['SwapUsed'] = (isset($parts[2]) ? $parts[2]*1000:0);
break;
}
}
}
}
}
return $memInfo;
}
function utility_php_sort_extensions($a, $b) {
$name_a = isset($a['name']) ? $a['name'] : '';
$name_b = isset($b['name']) ? $b['name'] : '';
return strcasecmp($name_a, $name_b);
}
function utility_php_extensions() {
global $config;
$php = cacti_escapeshellcmd(read_config_option('path_php_binary', true));
$php_file = cacti_escapeshellarg($config['base_path'] . '/install/cli_check.php') . ' extensions';
$json = shell_exec($php . ' -q ' . $php_file);
$ext = @json_decode($json, true);
utility_php_verify_extensions($ext, 'web');
utility_php_set_installed($ext);
return $ext;
}
function utility_php_verify_extensions(&$extensions, $source) {
global $config;
if (empty($extensions)) {
$extensions = array(
'ctype' => array('cli' => false, 'web' => false),
'date' => array('cli' => false, 'web' => false),
'filter' => array('cli' => false, 'web' => false),
'gd' => array('cli' => false, 'web' => false),
'gmp' => array('cli' => false, 'web' => false),
'hash' => array('cli' => false, 'web' => false),
'json' => array('cli' => false, 'web' => false),
'ldap' => array('cli' => false, 'web' => false),
'mbstring' => array('cli' => false, 'web' => false),
'openssl' => array('cli' => false, 'web' => false),
'pcre' => array('cli' => false, 'web' => false),
'PDO' => array('cli' => false, 'web' => false),
'pdo_mysql' => array('cli' => false, 'web' => false),
'session' => array('cli' => false, 'web' => false),
'simplexml' => array('cli' => false, 'web' => false),
'sockets' => array('cli' => false, 'web' => false),
'spl' => array('cli' => false, 'web' => false),
'standard' => array('cli' => false, 'web' => false),
'xml' => array('cli' => false, 'web' => false),
'zlib' => array('cli' => false, 'web' => false)
);
if ($config['cacti_server_os'] == 'unix') {
$extensions['posix'] = array('cli' => false, 'web' => false);
} else {
$extensions['com_dotnet'] = array('cli' => false, 'web' => false);
}
}
uksort($extensions, "utility_php_sort_extensions");
foreach ($extensions as $name=>$extension) {
if (extension_loaded($name)){
$extensions[$name][$source] = true;
}
}
}
function utility_php_recommends() {
global $config;
$php = cacti_escapeshellcmd(read_config_option('path_php_binary', true));
$php_file = cacti_escapeshellarg($config['base_path'] . '/install/cli_check.php') . ' recommends';
$json = shell_exec($php . ' -q ' . $php_file);
$ext = array('web' => '', 'cli' => '');
$ext['cli'] = @json_decode($json, true);
utility_php_verify_recommends($ext['web'], 'web');
utility_php_set_recommends_text($ext);
return $ext;
}
function utility_get_formatted_bytes($input_value, $wanted_type, &$output_value, $default_type = 'B') {
$default_type = strtoupper($default_type);
$multiplier = array(
'B' => 1,
'K' => 1024,
'M' => 1024*1024,
'G' => 1024*1024*1024,
);
if ($input_value > 0 && preg_match('/([0-9.]+)([BKMG]){0,1}/i',$input_value,$matches)) {
$input_value = $matches[1];
if (isset($matches[2])) {
$default_type = $matches[2];
}
if (isset($multiplier[$default_type])) {
$input_value = $input_value * $multiplier[$default_type];
}
}
if (intval($input_value) < 0) {
$output_value = $input_value . $wanted_type;
} elseif (isset($multiplier[$wanted_type])) {
$output_value = ($input_value / $multiplier[$wanted_type]) . $wanted_type;
} elseif (isset($multiplier[$default_type])) {
$output_value = ($input_value * $multiplier[$default_type]) . $default_type;
} else {
$output_value = $input_value . 'B';
}
return $input_value;
}
function utility_php_verify_recommends(&$recommends, $source) {
global $original_memory_limit;
$rec_version = '5.4.0';
$rec_memory_mb = (version_compare(PHP_VERSION, '7.0.0', '<') ? 800 : 400);
$rec_execute_m = 1;
$memory_ini = (isset($original_memory_limit) ? $original_memory_limit : ini_get('memory_limit'));
// adjust above appropriately (used in configs)
$rec_execute = $rec_execute_m * 60;
$rec_memory = utility_get_formatted_bytes($rec_memory_mb, 'M', $rec_memory_mb, 'M');
$memory_limit = utility_get_formatted_bytes($memory_ini, 'M', $memory_ini, 'B');
$execute_time = ini_get('max_execution_time');
$timezone = ini_get('date.timezone');
$recommends = array(
array(
'name' => 'version',
'value' => $rec_version,
'current' => PHP_VERSION,
'status' => version_compare(PHP_VERSION, $rec_version, '>=') ? DB_STATUS_SUCCESS : DB_STATUS_ERROR,
),
array(
'name' => 'memory_limit',
'value' => $rec_memory_mb,
'current' => $memory_ini,
'status' => ($memory_limit <= 0 || $memory_limit >= $rec_memory) ? DB_STATUS_SUCCESS : DB_STATUS_WARNING,
),
array(
'name' => 'max_execution_time',
'value' => $rec_execute,
'current' => $execute_time,
'status' => ($execute_time <= 0 || $execute_time >= $rec_execute) ? DB_STATUS_SUCCESS : DB_STATUS_WARNING,
),
array(
'name' => 'date.timezone',
'value' => '<timezone>',
'current' => $timezone,
'status' => ($timezone ? DB_STATUS_SUCCESS : DB_STATUS_ERROR),
),
);
}
function utility_php_set_recommends_text(&$recs) {
if (is_array($recs) && sizeof($recs)) {
foreach ($recs as $name => $recommends) {
if (cacti_sizeof($recommends)) {
foreach ($recommends as $index => $recommend) {
if ($recommend['name'] == 'version') {
$recs[$name][$index]['description'] = __('PHP %s is the mimimum version', $recommend['value']);
} elseif ($recommend['name'] == 'memory_limit') {
$recs[$name][$index]['description'] = __('A minimum of %s memory limit', $recommend['value']);
} elseif ($recommend['name'] == 'max_execution_time') {
$recs[$name][$index]['description'] = __('A minimum of %s m execution time', $recommend['value']);
} elseif ($recommend['name'] == 'date.timezone') {
$recs[$name][$index]['description'] = __('A valid timezone that matches MySQL and the system');
}
}
}
}
}
}
function utility_php_optionals() {
global $config;
$php = cacti_escapeshellcmd(read_config_option('path_php_binary', true));
$php_file = cacti_escapeshellarg($config['base_path'] . '/install/cli_check.php') . ' optionals';
$json = shell_exec($php . ' -q ' . $php_file);
$opt = @json_decode($json, true);
utility_php_verify_optionals($opt, 'web');
utility_php_set_installed($opt);
return $opt;
}
function utility_php_verify_optionals(&$optionals, $source) {
if (empty($optionals)) {
$optionals = array(
'snmp' => array('web' => false, 'cli' => false),
'gettext' => array('web' => false, 'cli' => false),
'TrueType Box' => array('web' => false, 'cli' => false),
'TrueType Text' => array('web' => false, 'cli' => false),
);
}
foreach ($optionals as $name => $optional) {
if (extension_loaded($name)){
$optionals[$name][$source] = true;
}
}
$optionals['TrueType Box'][$source] = function_exists('imagettfbbox');
$optionals['TrueType Text'][$source] = function_exists('imagettftext');
}
function utility_php_set_installed(&$extensions) {
foreach ($extensions as $name=>$extension) {
$extensions[$name]['installed'] = $extension['web'] && $extension['cli'];
}
}
| {
"pile_set_name": "Github"
} |
version = $(shell git describe --dirty || echo dev)
curl=no
ifneq ($(curl),no)
flags=-DUSE_CURL -lcurl
else
flags=
endif
all: push.so
push.so: push.cpp
CXXFLAGS="$(CXXFLAGS) -DPUSHVERSION=\"\\\"$(version)\\\"\" $(flags)" LIBS="$(LIBS) $(flags)" \
znc-buildmod push.cpp
install: push.so
mkdir -p $(HOME)/.znc/modules/
cp push.so $(HOME)/.znc/modules/push.so
clean:
-rm -f push.so
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) 2015 - present Instructure, Inc.
*
* This file is part of Canvas.
*
* Canvas is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, version 3 of the License.
*
* Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
* A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License along
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import React from 'react'
import ReactDOM from 'react-dom'
import {Simulate} from 'react-dom/test-utils'
import $ from 'jquery'
import DataRow from 'jsx/grading/dataRow'
QUnit.module('DataRow not being edited, without a sibling', {
setup() {
const props = {
key: 0,
uniqueId: 0,
row: ['A', 92.346],
editing: false,
round: number => Math.round(number * 100) / 100,
onRowMinScoreChange() {}
}
const DataRowElement = <DataRow {...props} />
this.dataRow = ReactDOM.render(DataRowElement, $('<tbody>').appendTo('#fixtures')[0])
},
teardown() {
ReactDOM.unmountComponentAtNode(ReactDOM.findDOMNode(this.dataRow).parentNode)
$('#fixtures').empty()
}
})
test('renders in "view" mode (as opposed to "edit" mode)', function() {
ok(this.dataRow.refs.viewContainer)
})
test('getRowData() returns the correct name', function() {
deepEqual(this.dataRow.getRowData().name, 'A')
})
test('getRowData() sets max score to 100 if there is no sibling row', function() {
deepEqual(this.dataRow.getRowData().maxScore, 100)
})
test('renderMinScore() rounds the score if not in editing mode', function() {
deepEqual(this.dataRow.renderMinScore(), '92.35')
})
test("renderMaxScore() returns a max score of 100 without a '<' sign", function() {
deepEqual(this.dataRow.renderMaxScore(), '100')
})
QUnit.module('DataRow being edited', {
setup() {
this.props = {
key: 0,
uniqueId: 0,
row: ['A', 92.346],
editing: true,
round: number => Math.round(number * 100) / 100,
onRowMinScoreChange() {},
onRowNameChange() {},
onDeleteRow() {}
}
const DataRowElement = <DataRow {...this.props} />
this.dataRow = ReactDOM.render(DataRowElement, $('<tbody>').appendTo('#fixtures')[0])
},
teardown() {
ReactDOM.unmountComponentAtNode(ReactDOM.findDOMNode(this.dataRow).parentNode)
$('#fixtures').empty()
}
})
test('renders in "edit" mode (as opposed to "view" mode)', function() {
ok(this.dataRow.refs.editContainer)
})
test('on change, accepts arbitrary input and saves to state', function() {
const changeMinScore = sandbox.spy(this.props, 'onRowMinScoreChange')
const DataRowElement = <DataRow {...this.props} />
this.dataRow = ReactDOM.render(DataRowElement, $('<tbody>').appendTo('#fixtures')[0])
Simulate.change(this.dataRow.minScoreInput, {target: {value: 'A'}})
deepEqual(this.dataRow.renderMinScore(), 'A')
Simulate.change(this.dataRow.minScoreInput, {target: {value: '*&@%!'}})
deepEqual(this.dataRow.renderMinScore(), '*&@%!')
Simulate.change(this.dataRow.minScoreInput, {target: {value: '3B'}})
deepEqual(this.dataRow.renderMinScore(), '3B')
ok(changeMinScore.notCalled)
changeMinScore.restore()
})
test('screenreader text contains contextual label describing inserting row', () => {
const screenreaderTexts = [...document.getElementsByClassName('screenreader-only')]
ok(
screenreaderTexts.find(
screenreaderText => screenreaderText.textContent === 'Insert row below A'
)
)
})
test('screenreader text contains contextual label describing removing row', () => {
const screenreaderTexts = [...document.getElementsByClassName('screenreader-only')]
ok(screenreaderTexts.find(screenreaderText => screenreaderText.textContent === 'Remove row A'))
})
test('on blur, does not call onRowMinScoreChange if the input parsed value is less than 0', function() {
const changeMinScore = sandbox.spy(this.props, 'onRowMinScoreChange')
const DataRowElement = <DataRow {...this.props} />
this.dataRow = ReactDOM.render(DataRowElement, $('<tbody>').appendTo('#fixtures')[0])
Simulate.change(this.dataRow.minScoreInput, {target: {value: '-1'}})
Simulate.blur(this.dataRow.minScoreInput)
ok(changeMinScore.notCalled)
changeMinScore.restore()
})
test('on blur, does not call onRowMinScoreChange if the input parsed value is greater than 100', function() {
const changeMinScore = sandbox.spy(this.props, 'onRowMinScoreChange')
const DataRowElement = <DataRow {...this.props} />
this.dataRow = ReactDOM.render(DataRowElement, $('<tbody>').appendTo('#fixtures')[0])
Simulate.change(this.dataRow.minScoreInput, {target: {value: '101'}})
Simulate.blur(this.dataRow.minScoreInput)
ok(changeMinScore.notCalled)
changeMinScore.restore()
})
test('on blur, calls onRowMinScoreChange when input parsed value is between 0 and 100', function() {
const changeMinScore = sandbox.spy(this.props, 'onRowMinScoreChange')
const DataRowElement = <DataRow {...this.props} />
this.dataRow = ReactDOM.render(DataRowElement, $('<tbody>').appendTo('#fixtures')[0])
Simulate.change(this.dataRow.minScoreInput, {target: {value: '88.'}})
Simulate.blur(this.dataRow.minScoreInput)
Simulate.change(this.dataRow.minScoreInput, {target: {value: ''}})
Simulate.blur(this.dataRow.minScoreInput)
Simulate.change(this.dataRow.minScoreInput, {target: {value: '100'}})
Simulate.blur(this.dataRow.minScoreInput)
Simulate.change(this.dataRow.minScoreInput, {target: {value: '0'}})
Simulate.blur(this.dataRow.minScoreInput)
Simulate.change(this.dataRow.minScoreInput, {target: {value: 'A'}})
Simulate.blur(this.dataRow.minScoreInput)
Simulate.change(this.dataRow.minScoreInput, {target: {value: '%*@#($'}})
Simulate.blur(this.dataRow.minScoreInput)
deepEqual(changeMinScore.callCount, 3)
changeMinScore.restore()
})
test('on blur, does not call onRowMinScoreChange when input has not changed', function() {
const changeMinScore = sandbox.spy(this.props, 'onRowMinScoreChange')
const DataRowElement = <DataRow {...this.props} />
this.dataRow = ReactDOM.render(DataRowElement, $('<tbody>').appendTo('#fixtures')[0])
Simulate.blur(this.dataRow.minScoreInput)
ok(changeMinScore.notCalled)
changeMinScore.restore()
})
test('calls onRowNameChange when input changes', function() {
const changeMinScore = sandbox.spy(this.props, 'onRowNameChange')
const DataRowElement = <DataRow {...this.props} />
this.dataRow = ReactDOM.render(DataRowElement, $('<tbody>').appendTo('#fixtures')[0])
Simulate.change(this.dataRow.refs.nameInput, {target: {value: 'F'}})
ok(changeMinScore.calledOnce)
changeMinScore.restore()
})
test('calls onDeleteRow when the delete button is clicked', function() {
const deleteRow = sandbox.spy(this.props, 'onDeleteRow')
const DataRowElement = <DataRow {...this.props} />
this.dataRow = ReactDOM.render(DataRowElement, $('<tbody>').appendTo('#fixtures')[0])
Simulate.click(this.dataRow.refs.deleteButton)
ok(deleteRow.calledOnce)
})
QUnit.module('DataRow with a sibling', {
setup() {
const props = {
key: 1,
row: ['A-', 90],
siblingRow: ['A', 92.346],
uniqueId: 1,
editing: false,
round: number => Math.round(number * 100) / 100,
onRowMinScoreChange() {}
}
const DataRowElement = <DataRow {...props} />
this.dataRow = ReactDOM.render(DataRowElement, $('<tbody>').appendTo('#fixtures')[0])
},
teardown() {
ReactDOM.unmountComponentAtNode(ReactDOM.findDOMNode(this.dataRow).parentNode)
$('#fixtures').empty()
}
})
test("shows the max score as the sibling's min score", function() {
deepEqual(this.dataRow.renderMaxScore(), '< 92.35')
})
| {
"pile_set_name": "Github"
} |
## Description of Pull Request
*Description of what's implemented / fixed in PR*
## Test Case (Optional)
*Steps to test change*
## Reviewer(s)
* @lead (Merge responsibility unless delegated)
* @developer (Optional if a developer wants email notification of PRs)
| {
"pile_set_name": "Github"
} |
/*
* reserved comment block
* DO NOT REMOVE OR ALTER!
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* $Id: UnImplNode.java,v
*/
package com.sun.org.apache.xml.internal.utils;
import com.sun.org.apache.xml.internal.res.XMLErrorResources;
import com.sun.org.apache.xml.internal.res.XMLMessages;
import org.w3c.dom.Attr;
import org.w3c.dom.CDATASection;
import org.w3c.dom.Comment;
import org.w3c.dom.DOMException;
import org.w3c.dom.DOMImplementation;
import org.w3c.dom.Document;
import org.w3c.dom.DocumentFragment;
import org.w3c.dom.DocumentType;
import org.w3c.dom.Element;
import org.w3c.dom.EntityReference;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.w3c.dom.ProcessingInstruction;
import org.w3c.dom.Text;
import org.w3c.dom.UserDataHandler;
import org.w3c.dom.DOMConfiguration;
import org.w3c.dom.TypeInfo;
/**
* <meta name="usage" content="internal"/>
* To be subclassed by classes that wish to fake being nodes.
*/
public class UnImplNode implements Node, Element, NodeList, Document
{
/**
* Constructor UnImplNode
*
*/
public UnImplNode(){}
/**
* Throw an error.
*
* @param msg Message Key for the error
*/
public void error(String msg)
{
System.out.println("DOM ERROR! class: " + this.getClass().getName());
throw new RuntimeException(XMLMessages.createXMLMessage(msg, null));
}
/**
* Throw an error.
*
* @param msg Message Key for the error
* @param args Array of arguments to be used in the error message
*/
public void error(String msg, Object[] args)
{
System.out.println("DOM ERROR! class: " + this.getClass().getName());
throw new RuntimeException(XMLMessages.createXMLMessage(msg, args)); //"UnImplNode error: "+msg);
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @param newChild New node to append to the list of this node's children
*
* @return null
*
* @throws DOMException
*/
public Node appendChild(Node newChild) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"appendChild not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @return false
*/
public boolean hasChildNodes()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"hasChildNodes not supported!");
return false;
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @return 0
*/
public short getNodeType()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getNodeType not supported!");
return 0;
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @return null
*/
public Node getParentNode()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getParentNode not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @return null
*/
public NodeList getChildNodes()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getChildNodes not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @return null
*/
public Node getFirstChild()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getFirstChild not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @return null
*/
public Node getLastChild()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getLastChild not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @return null
*/
public Node getNextSibling()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getNextSibling not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.NodeList
*
* @return 0
*/
public int getLength()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getLength not supported!");
return 0;
} // getLength():int
/**
* Unimplemented. See org.w3c.dom.NodeList
*
* @param index index of a child of this node in its list of children
*
* @return null
*/
public Node item(int index)
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"item not supported!");
return null;
} // item(int):Node
/**
* Unimplemented. See org.w3c.dom.Node
*
* @return null
*/
public Document getOwnerDocument()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getOwnerDocument not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @return null
*/
public String getTagName()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getTagName not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @return null
*/
public String getNodeName()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getNodeName not supported!");
return null;
}
/** Unimplemented. See org.w3c.dom.Node */
public void normalize()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"normalize not supported!");
}
/**
* Unimplemented. See org.w3c.dom.Element
*
* @param name Name of the element
*
* @return null
*/
public NodeList getElementsByTagName(String name)
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getElementsByTagName not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Element
*
* @param oldAttr Attribute to be removed from this node's list of attributes
*
* @return null
*
* @throws DOMException
*/
public Attr removeAttributeNode(Attr oldAttr) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"removeAttributeNode not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Element
*
* @param newAttr Attribute node to be added to this node's list of attributes
*
* @return null
*
* @throws DOMException
*/
public Attr setAttributeNode(Attr newAttr) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"setAttributeNode not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Element
*
*
* @param name Name of an attribute
*
* @return false
*/
public boolean hasAttribute(String name)
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"hasAttribute not supported!");
return false;
}
/**
* Unimplemented. See org.w3c.dom.Element
*
*
* @param name
* @param x
*
* @return false
*/
public boolean hasAttributeNS(String name, String x)
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"hasAttributeNS not supported!");
return false;
}
/**
* Unimplemented. See org.w3c.dom.Element
*
*
* @param name Attribute node name
*
* @return null
*/
public Attr getAttributeNode(String name)
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getAttributeNode not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Element
*
* @param name Attribute node name to remove from list of attributes
*
* @throws DOMException
*/
public void removeAttribute(String name) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"removeAttribute not supported!");
}
/**
* Unimplemented. See org.w3c.dom.Element
*
* @param name Name of attribute to set
* @param value Value of attribute
*
* @throws DOMException
*/
public void setAttribute(String name, String value) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"setAttribute not supported!");
}
/**
* Unimplemented. See org.w3c.dom.Element
*
* @param name Name of attribute to get
*
* @return null
*/
public String getAttribute(String name)
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getAttribute not supported!");
return null;
}
/**
* Unimplemented. Introduced in DOM Level 2.
*
* @return false
*/
public boolean hasAttributes()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"hasAttributes not supported!");
return false;
}
/**
* Unimplemented. See org.w3c.dom.Element
*
* @param namespaceURI Namespace URI of the element
* @param localName Local part of qualified name of the element
*
* @return null
*/
public NodeList getElementsByTagNameNS(String namespaceURI,
String localName)
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getElementsByTagNameNS not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Element
*
* @param newAttr Attribute to set
*
* @return null
*
* @throws DOMException
*/
public Attr setAttributeNodeNS(Attr newAttr) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"setAttributeNodeNS not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Element
*
* @param namespaceURI Namespace URI of attribute node to get
* @param localName Local part of qualified name of attribute node to get
*
* @return null
*/
public Attr getAttributeNodeNS(String namespaceURI, String localName)
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getAttributeNodeNS not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Element
*
* @param namespaceURI Namespace URI of attribute node to remove
* @param localName Local part of qualified name of attribute node to remove
*
* @throws DOMException
*/
public void removeAttributeNS(String namespaceURI, String localName)
throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"removeAttributeNS not supported!");
}
/**
* Unimplemented. See org.w3c.dom.Element
*
* @param namespaceURI Namespace URI of attribute node to set
* @param qualifiedName qualified name of attribute
* @param value value of attribute
*
* @throws DOMException
*/
public void setAttributeNS(
String namespaceURI, String qualifiedName, String value)
throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"setAttributeNS not supported!");
}
/**
* Unimplemented. See org.w3c.dom.Element
*
* @param namespaceURI Namespace URI of attribute node to get
* @param localName Local part of qualified name of attribute node to get
*
* @return null
*/
public String getAttributeNS(String namespaceURI, String localName)
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getAttributeNS not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @return null
*/
public Node getPreviousSibling()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getPreviousSibling not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @param deep Flag indicating whether to clone deep (clone member variables)
*
* @return null
*/
public Node cloneNode(boolean deep)
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"cloneNode not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @return null
*
* @throws DOMException
*/
public String getNodeValue() throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getNodeValue not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @param nodeValue Value to set this node to
*
* @throws DOMException
*/
public void setNodeValue(String nodeValue) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"setNodeValue not supported!");
}
/**
* Unimplemented. See org.w3c.dom.Node
*
*
* NEEDSDOC @param value
* @return value Node value
*
* @throws DOMException
*/
// public String getValue ()
// {
// error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getValue not supported!");
// return null;
// }
/**
* Unimplemented. See org.w3c.dom.Node
*
* @param value Value to set this node to
*
* @throws DOMException
*/
public void setValue(String value) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"setValue not supported!");
}
/**
* Returns the name of this attribute.
*
* @return the name of this attribute.
*/
// public String getName()
// {
// return this.getNodeName();
// }
/**
* Unimplemented. See org.w3c.dom.Node
*
* @return null
*/
public Element getOwnerElement()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getOwnerElement not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @return False
*/
public boolean getSpecified()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"setValue not supported!");
return false;
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @return null
*/
public NamedNodeMap getAttributes()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getAttributes not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @param newChild New child node to insert
* @param refChild Insert in front of this child
*
* @return null
*
* @throws DOMException
*/
public Node insertBefore(Node newChild, Node refChild) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"insertBefore not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @param newChild Replace existing child with this one
* @param oldChild Existing child to be replaced
*
* @return null
*
* @throws DOMException
*/
public Node replaceChild(Node newChild, Node oldChild) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"replaceChild not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @param oldChild Child to be removed
*
* @return null
*
* @throws DOMException
*/
public Node removeChild(Node oldChild) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"replaceChild not supported!");
return null;
}
/**
* Tests whether the DOM implementation implements a specific feature and
* that feature is supported by this node.
* @param feature The name of the feature to test. This is the same name
* which can be passed to the method <code>hasFeature</code> on
* <code>DOMImplementation</code>.
* @param version This is the version number of the feature to test. In
* Level 2, version 1, this is the string "2.0". If the version is not
* specified, supporting any version of the feature will cause the
* method to return <code>true</code>.
*
* @return Returns <code>false</code>
* @since DOM Level 2
*/
public boolean isSupported(String feature, String version)
{
return false;
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @return null
*/
public String getNamespaceURI()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getNamespaceURI not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @return null
*/
public String getPrefix()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getPrefix not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @param prefix Prefix to set for this node
*
* @throws DOMException
*/
public void setPrefix(String prefix) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"setPrefix not supported!");
}
/**
* Unimplemented. See org.w3c.dom.Node
*
* @return null
*/
public String getLocalName()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"getLocalName not supported!");
return null;
}
/**
* Unimplemented. See org.w3c.dom.Document
*
* @return null
*/
public DocumentType getDoctype()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return null;
}
/**
* Unimplemented. See org.w3c.dom.Document
*
* @return null
*/
public DOMImplementation getImplementation()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return null;
}
/**
* Unimplemented. See org.w3c.dom.Document
*
* @return null
*/
public Element getDocumentElement()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return null;
}
/**
* Unimplemented. See org.w3c.dom.Document
*
* @param tagName Element tag name
*
* @return null
*
* @throws DOMException
*/
public Element createElement(String tagName) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return null;
}
/**
* Unimplemented. See org.w3c.dom.Document
*
* @return null
*/
public DocumentFragment createDocumentFragment()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return null;
}
/**
* Unimplemented. See org.w3c.dom.Document
*
* @param data Data for text node
*
* @return null
*/
public Text createTextNode(String data)
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return null;
}
/**
* Unimplemented. See org.w3c.dom.Document
*
* @param data Data for comment
*
* @return null
*/
public Comment createComment(String data)
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return null;
}
/**
* Unimplemented. See org.w3c.dom.Document
*
* @param data Data for CDATA section
*
* @return null
*
* @throws DOMException
*/
public CDATASection createCDATASection(String data) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return null;
}
/**
* Unimplemented. See org.w3c.dom.Document
*
* @param target Target for Processing instruction
* @param data Data for Processing instruction
*
* @return null
*
* @throws DOMException
*/
public ProcessingInstruction createProcessingInstruction(
String target, String data) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return null;
}
/**
* Unimplemented. See org.w3c.dom.Document
*
* @param name Attribute name
*
* @return null
*
* @throws DOMException
*/
public Attr createAttribute(String name) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return null;
}
/**
* Unimplemented. See org.w3c.dom.Document
*
* @param name Entity Reference name
*
* @return null
*
* @throws DOMException
*/
public EntityReference createEntityReference(String name)
throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return null;
}
/**
* Unimplemented. See org.w3c.dom.Document
*
* @param importedNode The node to import.
* @param deep If <code>true</code>, recursively import the subtree under
* the specified node; if <code>false</code>, import only the node
* itself, as explained above. This has no effect on <code>Attr</code>
* , <code>EntityReference</code>, and <code>Notation</code> nodes.
*
* @return null
*
* @throws DOMException
*/
public Node importNode(Node importedNode, boolean deep) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return null;
}
/**
* Unimplemented. See org.w3c.dom.Document
*
* @param namespaceURI Namespace URI for the element
* @param qualifiedName Qualified name of the element
*
* @return null
*
* @throws DOMException
*/
public Element createElementNS(String namespaceURI, String qualifiedName)
throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return null;
}
/**
* Unimplemented. See org.w3c.dom.Document
*
* @param namespaceURI Namespace URI of the attribute
* @param qualifiedName Qualified name of the attribute
*
* @return null
*
* @throws DOMException
*/
public Attr createAttributeNS(String namespaceURI, String qualifiedName)
throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return null;
}
/**
* Unimplemented. See org.w3c.dom.Document
*
* @param elementId ID of the element to get
*
* @return null
*/
public Element getElementById(String elementId)
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return null;
}
/**
* Set Node data
*
*
* @param data data to set for this node
*
* @throws DOMException
*/
public void setData(String data) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
}
/**
* Unimplemented.
*
* @param offset Start offset of substring to extract.
* @param count The length of the substring to extract.
*
* @return null
*
* @throws DOMException
*/
public String substringData(int offset, int count) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return null;
}
/**
* Unimplemented.
*
* @param arg String data to append
*
* @throws DOMException
*/
public void appendData(String arg) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
}
/**
* Unimplemented.
*
* @param offset Start offset of substring to insert.
* @param arg The (sub)string to insert.
*
* @throws DOMException
*/
public void insertData(int offset, String arg) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
}
/**
* Unimplemented.
*
* @param offset Start offset of substring to delete.
* @param count The length of the substring to delete.
*
* @throws DOMException
*/
public void deleteData(int offset, int count) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
}
/**
* Unimplemented.
*
* @param offset Start offset of substring to replace.
* @param count The length of the substring to replace.
* @param arg substring to replace with
*
* @throws DOMException
*/
public void replaceData(int offset, int count, String arg)
throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
}
/**
* Unimplemented.
*
* @param offset Offset into text to split
*
* @return null, unimplemented
*
* @throws DOMException
*/
public Text splitText(int offset) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return null;
}
/**
* NEEDSDOC Method adoptNode
*
*
* NEEDSDOC @param source
*
* NEEDSDOC (adoptNode) @return
*
* @throws DOMException
*/
public Node adoptNode(Node source) throws DOMException
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return null;
}
/**
* <p>EXPERIMENTAL! Based on the <a
* href='http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010605'>Document
* Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.</a>.
* <p>
* An attribute specifying, as part of the XML declaration, the encoding
* of this document. This is <code>null</code> when unspecified.
* @since DOM Level 3
*
* NEEDSDOC ($objectName$) @return
*/
public String getInputEncoding()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return null;
}
/**
* <p>EXPERIMENTAL! Based on the <a
* href='http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010605'>Document
* Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.</a>.
* <p>
* An attribute specifying, as part of the XML declaration, the encoding
* of this document. This is <code>null</code> when unspecified.
* @since DOM Level 3
*
* NEEDSDOC @param encoding
*/
public void setInputEncoding(String encoding)
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
}
/**
* <p>EXPERIMENTAL! Based on the <a
* href='http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010605'>Document
* Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.</a>.
* <p>
* An attribute specifying, as part of the XML declaration, whether this
* document is standalone.
* @since DOM Level 3
*
* NEEDSDOC ($objectName$) @return
*/
public boolean getStandalone()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return false;
}
/**
* <p>EXPERIMENTAL! Based on the <a
* href='http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010605'>Document
* Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.</a>.
* <p>
* An attribute specifying, as part of the XML declaration, whether this
* document is standalone.
* @since DOM Level 3
*
* NEEDSDOC @param standalone
*/
public void setStandalone(boolean standalone)
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
}
/**
* <p>EXPERIMENTAL! Based on the <a
* href='http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010605'>Document
* Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.</a>.
* <p>
* An attribute specifying whether errors checking is enforced or not.
* When set to <code>false</code>, the implementation is free to not
* test every possible error case normally defined on DOM operations,
* and not raise any <code>DOMException</code>. In case of error, the
* behavior is undefined. This attribute is <code>true</code> by
* defaults.
* @since DOM Level 3
*
* NEEDSDOC ($objectName$) @return
*/
public boolean getStrictErrorChecking()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return false;
}
/**
* <p>EXPERIMENTAL! Based on the <a
* href='http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010605'>Document
* Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.</a>.
* <p>
* An attribute specifying whether errors checking is enforced or not.
* When set to <code>false</code>, the implementation is free to not
* test every possible error case normally defined on DOM operations,
* and not raise any <code>DOMException</code>. In case of error, the
* behavior is undefined. This attribute is <code>true</code> by
* defaults.
* @since DOM Level 3
*
* NEEDSDOC @param strictErrorChecking
*/
public void setStrictErrorChecking(boolean strictErrorChecking)
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
}
/**
* <p>EXPERIMENTAL! Based on the <a
* href='http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010605'>Document
* Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.</a>.
* <p>
* An attribute specifying, as part of the XML declaration, the version
* number of this document. This is <code>null</code> when unspecified.
* @since DOM Level 3
*
* NEEDSDOC ($objectName$) @return
*/
public String getVersion()
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
return null;
}
/**
* <p>EXPERIMENTAL! Based on the <a
* href='http://www.w3.org/TR/2001/WD-DOM-Level-3-Core-20010605'>Document
* Object Model (DOM) Level 3 Core Working Draft of 5 June 2001.</a>.
* <p>
* An attribute specifying, as part of the XML declaration, the version
* number of this document. This is <code>null</code> when unspecified.
* @since DOM Level 3
*
* NEEDSDOC @param version
*/
public void setVersion(String version)
{
error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED);
}
//RAMESH : Pending proper implementation of DOM Level 3
public Object setUserData(String key,
Object data,
UserDataHandler handler) {
return getOwnerDocument().setUserData( key, data, handler);
}
/**
* Retrieves the object associated to a key on a this node. The object
* must first have been set to this node by calling
* <code>setUserData</code> with the same key.
* @param key The key the object is associated to.
* @return Returns the <code>DOMObject</code> associated to the given key
* on this node, or <code>null</code> if there was none.
* @since DOM Level 3
*/
public Object getUserData(String key) {
return getOwnerDocument().getUserData( key);
}
/**
* This method returns a specialized object which implements the
* specialized APIs of the specified feature and version. The
* specialized object may also be obtained by using binding-specific
* casting methods but is not necessarily expected to, as discussed in Mixed DOM implementations.
* @param feature The name of the feature requested (case-insensitive).
* @param version This is the version number of the feature to test. If
* the version is <code>null</code> or the empty string, supporting
* any version of the feature will cause the method to return an
* object that supports at least one version of the feature.
* @return Returns an object which implements the specialized APIs of
* the specified feature and version, if any, or <code>null</code> if
* there is no object which implements interfaces associated with that
* feature. If the <code>DOMObject</code> returned by this method
* implements the <code>Node</code> interface, it must delegate to the
* primary core <code>Node</code> and not return results inconsistent
* with the primary core <code>Node</code> such as attributes,
* childNodes, etc.
* @since DOM Level 3
*/
public Object getFeature(String feature, String version) {
// we don't have any alternate node, either this node does the job
// or we don't have anything that does
return isSupported(feature, version) ? this : null;
}
/**
* Tests whether two nodes are equal.
* <br>This method tests for equality of nodes, not sameness (i.e.,
* whether the two nodes are references to the same object) which can be
* tested with <code>Node.isSameNode</code>. All nodes that are the same
* will also be equal, though the reverse may not be true.
* <br>Two nodes are equal if and only if the following conditions are
* satisfied: The two nodes are of the same type.The following string
* attributes are equal: <code>nodeName</code>, <code>localName</code>,
* <code>namespaceURI</code>, <code>prefix</code>, <code>nodeValue</code>
* , <code>baseURI</code>. This is: they are both <code>null</code>, or
* they have the same length and are character for character identical.
* The <code>attributes</code> <code>NamedNodeMaps</code> are equal.
* This is: they are both <code>null</code>, or they have the same
* length and for each node that exists in one map there is a node that
* exists in the other map and is equal, although not necessarily at the
* same index.The <code>childNodes</code> <code>NodeLists</code> are
* equal. This is: they are both <code>null</code>, or they have the
* same length and contain equal nodes at the same index. This is true
* for <code>Attr</code> nodes as for any other type of node. Note that
* normalization can affect equality; to avoid this, nodes should be
* normalized before being compared.
* <br>For two <code>DocumentType</code> nodes to be equal, the following
* conditions must also be satisfied: The following string attributes
* are equal: <code>publicId</code>, <code>systemId</code>,
* <code>internalSubset</code>.The <code>entities</code>
* <code>NamedNodeMaps</code> are equal.The <code>notations</code>
* <code>NamedNodeMaps</code> are equal.
* <br>On the other hand, the following do not affect equality: the
* <code>ownerDocument</code> attribute, the <code>specified</code>
* attribute for <code>Attr</code> nodes, the
* <code>isWhitespaceInElementContent</code> attribute for
* <code>Text</code> nodes, as well as any user data or event listeners
* registered on the nodes.
*
* @param arg The node to compare equality with.
* @return If the nodes, and possibly subtrees are equal,
* <code>true</code> otherwise <code>false</code>.
* @since DOM Level 3
*/
public boolean isEqualNode(Node arg) {
if (arg == this) {
return true;
}
if (arg.getNodeType() != getNodeType()) {
return false;
}
// in theory nodeName can't be null but better be careful
// who knows what other implementations may be doing?...
if (getNodeName() == null) {
if (arg.getNodeName() != null) {
return false;
}
}
else if (!getNodeName().equals(arg.getNodeName())) {
return false;
}
if (getLocalName() == null) {
if (arg.getLocalName() != null) {
return false;
}
}
else if (!getLocalName().equals(arg.getLocalName())) {
return false;
}
if (getNamespaceURI() == null) {
if (arg.getNamespaceURI() != null) {
return false;
}
}
else if (!getNamespaceURI().equals(arg.getNamespaceURI())) {
return false;
}
if (getPrefix() == null) {
if (arg.getPrefix() != null) {
return false;
}
}
else if (!getPrefix().equals(arg.getPrefix())) {
return false;
}
if (getNodeValue() == null) {
if (arg.getNodeValue() != null) {
return false;
}
}
else if (!getNodeValue().equals(arg.getNodeValue())) {
return false;
}
/*
if (getBaseURI() == null) {
if (((NodeImpl) arg).getBaseURI() != null) {
return false;
}
}
else if (!getBaseURI().equals(((NodeImpl) arg).getBaseURI())) {
return false;
}
*/
return true;
}
/**
* DOM Level 3 - Experimental:
* Look up the namespace URI associated to the given prefix, starting from this node.
* Use lookupNamespaceURI(null) to lookup the default namespace
*
* @param namespaceURI
* @return th URI for the namespace
* @since DOM Level 3
*/
public String lookupNamespaceURI(String specifiedPrefix) {
short type = this.getNodeType();
switch (type) {
case Node.ELEMENT_NODE : {
String namespace = this.getNamespaceURI();
String prefix = this.getPrefix();
if (namespace !=null) {
// REVISIT: is it possible that prefix is empty string?
if (specifiedPrefix== null && prefix==specifiedPrefix) {
// looking for default namespace
return namespace;
} else if (prefix != null && prefix.equals(specifiedPrefix)) {
// non default namespace
return namespace;
}
}
if (this.hasAttributes()) {
NamedNodeMap map = this.getAttributes();
int length = map.getLength();
for (int i=0;i<length;i++) {
Node attr = map.item(i);
String attrPrefix = attr.getPrefix();
String value = attr.getNodeValue();
namespace = attr.getNamespaceURI();
if (namespace !=null && namespace.equals("http://www.w3.org/2000/xmlns/")) {
// at this point we are dealing with DOM Level 2 nodes only
if (specifiedPrefix == null &&
attr.getNodeName().equals("xmlns")) {
// default namespace
return value;
} else if (attrPrefix !=null &&
attrPrefix.equals("xmlns") &&
attr.getLocalName().equals(specifiedPrefix)) {
// non default namespace
return value;
}
}
}
}
/*
NodeImpl ancestor = (NodeImpl)getElementAncestor(this);
if (ancestor != null) {
return ancestor.lookupNamespaceURI(specifiedPrefix);
}
*/
return null;
}
/*
case Node.DOCUMENT_NODE : {
return((NodeImpl)((Document)this).getDocumentElement()).lookupNamespaceURI(specifiedPrefix) ;
}
*/
case Node.ENTITY_NODE :
case Node.NOTATION_NODE:
case Node.DOCUMENT_FRAGMENT_NODE:
case Node.DOCUMENT_TYPE_NODE:
// type is unknown
return null;
case Node.ATTRIBUTE_NODE:{
if (this.getOwnerElement().getNodeType() == Node.ELEMENT_NODE) {
return getOwnerElement().lookupNamespaceURI(specifiedPrefix);
}
return null;
}
default:{
/*
NodeImpl ancestor = (NodeImpl)getElementAncestor(this);
if (ancestor != null) {
return ancestor.lookupNamespaceURI(specifiedPrefix);
}
*/
return null;
}
}
}
/**
* DOM Level 3: Experimental
* This method checks if the specified <code>namespaceURI</code> is the
* default namespace or not.
* @param namespaceURI The namespace URI to look for.
* @return <code>true</code> if the specified <code>namespaceURI</code>
* is the default namespace, <code>false</code> otherwise.
* @since DOM Level 3
*/
public boolean isDefaultNamespace(String namespaceURI){
/*
// REVISIT: remove casts when DOM L3 becomes REC.
short type = this.getNodeType();
switch (type) {
case Node.ELEMENT_NODE: {
String namespace = this.getNamespaceURI();
String prefix = this.getPrefix();
// REVISIT: is it possible that prefix is empty string?
if (prefix == null || prefix.length() == 0) {
if (namespaceURI == null) {
return (namespace == namespaceURI);
}
return namespaceURI.equals(namespace);
}
if (this.hasAttributes()) {
ElementImpl elem = (ElementImpl)this;
NodeImpl attr = (NodeImpl)elem.getAttributeNodeNS("http://www.w3.org/2000/xmlns/", "xmlns");
if (attr != null) {
String value = attr.getNodeValue();
if (namespaceURI == null) {
return (namespace == value);
}
return namespaceURI.equals(value);
}
}
NodeImpl ancestor = (NodeImpl)getElementAncestor(this);
if (ancestor != null) {
return ancestor.isDefaultNamespace(namespaceURI);
}
return false;
}
case Node.DOCUMENT_NODE:{
return((NodeImpl)((Document)this).getDocumentElement()).isDefaultNamespace(namespaceURI);
}
case Node.ENTITY_NODE :
case Node.NOTATION_NODE:
case Node.DOCUMENT_FRAGMENT_NODE:
case Node.DOCUMENT_TYPE_NODE:
// type is unknown
return false;
case Node.ATTRIBUTE_NODE:{
if (this.ownerNode.getNodeType() == Node.ELEMENT_NODE) {
return ownerNode.isDefaultNamespace(namespaceURI);
}
return false;
}
default:{
NodeImpl ancestor = (NodeImpl)getElementAncestor(this);
if (ancestor != null) {
return ancestor.isDefaultNamespace(namespaceURI);
}
return false;
}
}
*/
return false;
}
/**
*
* DOM Level 3 - Experimental:
* Look up the prefix associated to the given namespace URI, starting from this node.
*
* @param namespaceURI
* @return the prefix for the namespace
*/
public String lookupPrefix(String namespaceURI){
// REVISIT: When Namespaces 1.1 comes out this may not be true
// Prefix can't be bound to null namespace
if (namespaceURI == null) {
return null;
}
short type = this.getNodeType();
switch (type) {
/*
case Node.ELEMENT_NODE: {
String namespace = this.getNamespaceURI(); // to flip out children
return lookupNamespacePrefix(namespaceURI, (ElementImpl)this);
}
case Node.DOCUMENT_NODE:{
return((NodeImpl)((Document)this).getDocumentElement()).lookupPrefix(namespaceURI);
}
*/
case Node.ENTITY_NODE :
case Node.NOTATION_NODE:
case Node.DOCUMENT_FRAGMENT_NODE:
case Node.DOCUMENT_TYPE_NODE:
// type is unknown
return null;
case Node.ATTRIBUTE_NODE:{
if (this.getOwnerElement().getNodeType() == Node.ELEMENT_NODE) {
return getOwnerElement().lookupPrefix(namespaceURI);
}
return null;
}
default:{
/*
NodeImpl ancestor = (NodeImpl)getElementAncestor(this);
if (ancestor != null) {
return ancestor.lookupPrefix(namespaceURI);
}
*/
return null;
}
}
}
/**
* Returns whether this node is the same node as the given one.
* <br>This method provides a way to determine whether two
* <code>Node</code> references returned by the implementation reference
* the same object. When two <code>Node</code> references are references
* to the same object, even if through a proxy, the references may be
* used completely interchangably, such that all attributes have the
* same values and calling the same DOM method on either reference
* always has exactly the same effect.
* @param other The node to test against.
* @return Returns <code>true</code> if the nodes are the same,
* <code>false</code> otherwise.
* @since DOM Level 3
*/
public boolean isSameNode(Node other) {
// we do not use any wrapper so the answer is obvious
return this == other;
}
/**
* This attribute returns the text content of this node and its
* descendants. When it is defined to be null, setting it has no effect.
* When set, any possible children this node may have are removed and
* replaced by a single <code>Text</code> node containing the string
* this attribute is set to. On getting, no serialization is performed,
* the returned string does not contain any markup. No whitespace
* normalization is performed, the returned string does not contain the
* element content whitespaces . Similarly, on setting, no parsing is
* performed either, the input string is taken as pure textual content.
* <br>The string returned is made of the text content of this node
* depending on its type, as defined below:
* <table border='1'>
* <tr>
* <th>Node type</th>
* <th>Content</th>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>
* ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE,
* DOCUMENT_FRAGMENT_NODE</td>
* <td valign='top' rowspan='1' colspan='1'>concatenation of the <code>textContent</code>
* attribute value of every child node, excluding COMMENT_NODE and
* PROCESSING_INSTRUCTION_NODE nodes</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>ATTRIBUTE_NODE, TEXT_NODE,
* CDATA_SECTION_NODE, COMMENT_NODE, PROCESSING_INSTRUCTION_NODE</td>
* <td valign='top' rowspan='1' colspan='1'>
* <code>nodeValue</code></td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE</td>
* <td valign='top' rowspan='1' colspan='1'>
* null</td>
* </tr>
* </table>
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
* @exception DOMException
* DOMSTRING_SIZE_ERR: Raised when it would return more characters than
* fit in a <code>DOMString</code> variable on the implementation
* platform.
* @since DOM Level 3
*/
public void setTextContent(String textContent)
throws DOMException {
setNodeValue(textContent);
}
/**
* This attribute returns the text content of this node and its
* descendants. When it is defined to be null, setting it has no effect.
* When set, any possible children this node may have are removed and
* replaced by a single <code>Text</code> node containing the string
* this attribute is set to. On getting, no serialization is performed,
* the returned string does not contain any markup. No whitespace
* normalization is performed, the returned string does not contain the
* element content whitespaces . Similarly, on setting, no parsing is
* performed either, the input string is taken as pure textual content.
* <br>The string returned is made of the text content of this node
* depending on its type, as defined below:
* <table border='1'>
* <tr>
* <th>Node type</th>
* <th>Content</th>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>
* ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE,
* DOCUMENT_FRAGMENT_NODE</td>
* <td valign='top' rowspan='1' colspan='1'>concatenation of the <code>textContent</code>
* attribute value of every child node, excluding COMMENT_NODE and
* PROCESSING_INSTRUCTION_NODE nodes</td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>ATTRIBUTE_NODE, TEXT_NODE,
* CDATA_SECTION_NODE, COMMENT_NODE, PROCESSING_INSTRUCTION_NODE</td>
* <td valign='top' rowspan='1' colspan='1'>
* <code>nodeValue</code></td>
* </tr>
* <tr>
* <td valign='top' rowspan='1' colspan='1'>DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE</td>
* <td valign='top' rowspan='1' colspan='1'>
* null</td>
* </tr>
* </table>
* @exception DOMException
* NO_MODIFICATION_ALLOWED_ERR: Raised when the node is readonly.
* @exception DOMException
* DOMSTRING_SIZE_ERR: Raised when it would return more characters than
* fit in a <code>DOMString</code> variable on the implementation
* platform.
* @since DOM Level 3
*/
public String getTextContent() throws DOMException {
return getNodeValue(); // overriden in some subclasses
}
/**
* Compares a node with this node with regard to their position in the
* document.
* @param other The node to compare against this node.
* @return Returns how the given node is positioned relatively to this
* node.
* @since DOM Level 3
*/
public short compareDocumentPosition(Node other) throws DOMException {
return 0;
}
/**
* The absolute base URI of this node or <code>null</code> if undefined.
* This value is computed according to . However, when the
* <code>Document</code> supports the feature "HTML" , the base URI is
* computed using first the value of the href attribute of the HTML BASE
* element if any, and the value of the <code>documentURI</code>
* attribute from the <code>Document</code> interface otherwise.
* <br> When the node is an <code>Element</code>, a <code>Document</code>
* or a a <code>ProcessingInstruction</code>, this attribute represents
* the properties [base URI] defined in . When the node is a
* <code>Notation</code>, an <code>Entity</code>, or an
* <code>EntityReference</code>, this attribute represents the
* properties [declaration base URI] in the . How will this be affected
* by resolution of relative namespace URIs issue?It's not.Should this
* only be on Document, Element, ProcessingInstruction, Entity, and
* Notation nodes, according to the infoset? If not, what is it equal to
* on other nodes? Null? An empty string? I think it should be the
* parent's.No.Should this be read-only and computed or and actual
* read-write attribute?Read-only and computed (F2F 19 Jun 2000 and
* teleconference 30 May 2001).If the base HTML element is not yet
* attached to a document, does the insert change the Document.baseURI?
* Yes. (F2F 26 Sep 2001)
* @since DOM Level 3
*/
public String getBaseURI() {
return null;
}
/**
* DOM Level 3 WD - Experimental.
* Renaming node
*/
public Node renameNode(Node n,
String namespaceURI,
String name)
throws DOMException{
return n;
}
/**
* DOM Level 3 WD - Experimental
* Normalize document.
*/
public void normalizeDocument(){
}
/**
* The configuration used when <code>Document.normalizeDocument</code> is
* invoked.
* @since DOM Level 3
*/
public DOMConfiguration getDomConfig(){
return null;
}
/**Experimental DOM Level 3 feature: documentURI */
protected String fDocumentURI;
/**
* DOM Level 3 WD - Experimental.
*/
public void setDocumentURI(String documentURI){
fDocumentURI= documentURI;
}
/**
* DOM Level 3 WD - Experimental.
* The location of the document or <code>null</code> if undefined.
* <br>Beware that when the <code>Document</code> supports the feature
* "HTML" , the href attribute of the HTML BASE element takes precedence
* over this attribute.
* @since DOM Level 3
*/
public String getDocumentURI(){
return fDocumentURI;
}
/**Experimental DOM Level 3 feature: Document actualEncoding */
protected String actualEncoding;
/**
* DOM Level 3 WD - Experimental.
* An attribute specifying the actual encoding of this document. This is
* <code>null</code> otherwise.
* <br> This attribute represents the property [character encoding scheme]
* defined in .
* @since DOM Level 3
*/
public String getActualEncoding() {
return actualEncoding;
}
/**
* DOM Level 3 WD - Experimental.
* An attribute specifying the actual encoding of this document. This is
* <code>null</code> otherwise.
* <br> This attribute represents the property [character encoding scheme]
* defined in .
* @since DOM Level 3
*/
public void setActualEncoding(String value) {
actualEncoding = value;
}
/**
* DOM Level 3 WD - Experimental.
*/
public Text replaceWholeText(String content)
throws DOMException{
/*
if (needsSyncData()) {
synchronizeData();
}
// make sure we can make the replacement
if (!canModify(nextSibling)) {
throw new DOMException(DOMException.NO_MODIFICATION_ALLOWED_ERR,
DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN, "NO_MODIFICATION_ALLOWED_ERR", null));
}
Node parent = this.getParentNode();
if (content == null || content.length() == 0) {
// remove current node
if (parent !=null) { // check if node in the tree
parent.removeChild(this);
return null;
}
}
Text currentNode = null;
if (isReadOnly()){
Text newNode = this.ownerDocument().createTextNode(content);
if (parent !=null) { // check if node in the tree
parent.insertBefore(newNode, this);
parent.removeChild(this);
currentNode = newNode;
} else {
return newNode;
}
} else {
this.setData(content);
currentNode = this;
}
Node sibling = currentNode.getNextSibling();
while ( sibling !=null) {
parent.removeChild(sibling);
sibling = currentNode.getNextSibling();
}
return currentNode;
*/
return null; //Pending
}
/**
* DOM Level 3 WD - Experimental.
* Returns all text of <code>Text</code> nodes logically-adjacent text
* nodes to this node, concatenated in document order.
* @since DOM Level 3
*/
public String getWholeText(){
/*
if (needsSyncData()) {
synchronizeData();
}
if (nextSibling == null) {
return data;
}
StringBuffer buffer = new StringBuffer();
if (data != null && data.length() != 0) {
buffer.append(data);
}
getWholeText(nextSibling, buffer);
return buffer.toString();
*/
return null; // PENDING
}
/**
* DOM Level 3 WD - Experimental.
* Returns whether this text node contains whitespace in element content,
* often abusively called "ignorable whitespace".
*/
public boolean isWhitespaceInElementContent(){
return false;
}
/**
* NON-DOM: set the type of this attribute to be ID type.
*
* @param id
*/
public void setIdAttribute(boolean id){
//PENDING
}
/**
* DOM Level 3: register the given attribute node as an ID attribute
*/
public void setIdAttribute(String name, boolean makeId) {
//PENDING
}
/**
* DOM Level 3: register the given attribute node as an ID attribute
*/
public void setIdAttributeNode(Attr at, boolean makeId) {
//PENDING
}
/**
* DOM Level 3: register the given attribute node as an ID attribute
*/
public void setIdAttributeNS(String namespaceURI, String localName,
boolean makeId) {
//PENDING
}
/**
* Method getSchemaTypeInfo.
* @return TypeInfo
*/
public TypeInfo getSchemaTypeInfo(){
return null; //PENDING
}
public boolean isId() {
return false; //PENDING
}
private String xmlEncoding;
public String getXmlEncoding ( ) {
return xmlEncoding;
}
public void setXmlEncoding ( String xmlEncoding ) {
this.xmlEncoding = xmlEncoding;
}
private boolean xmlStandalone;
public boolean getXmlStandalone() {
return xmlStandalone;
}
public void setXmlStandalone(boolean xmlStandalone) throws DOMException {
this.xmlStandalone = xmlStandalone;
}
private String xmlVersion;
public String getXmlVersion() {
return xmlVersion;
}
public void setXmlVersion(String xmlVersion) throws DOMException {
this.xmlVersion = xmlVersion;
}
}
| {
"pile_set_name": "Github"
} |
# Copyright 2012 Mozilla Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Main toolbar buttons (tooltips and alt text for images)
previous.title=পূর্ববর্তী পৃষ্ঠা
previous_label=পূর্ববর্তী
next.title=পরবর্তী পৃষ্ঠা
next_label=পরবর্তী
# LOCALIZATION NOTE (page.title): The tooltip for the pageNumber input.
page.title=পেজ
# LOCALIZATION NOTE (of_pages): "{{pagesCount}}" will be replaced by a number
# representing the total number of pages in the document.
of_pages={{pagesCount}}
# LOCALIZATION NOTE (page_of_pages): "{{pageNumber}}" and "{{pagesCount}}"
# will be replaced by a number representing the currently visible page,
# respectively a number representing the total number of pages in the document.
page_of_pages=({{pagesCount}} এর {{pageNumber}})
zoom_out.title=ছোট মাপে প্রদর্শন
zoom_out_label=ছোট মাপে প্রদর্শন
zoom_in.title=বড় মাপে প্রদর্শন
zoom_in_label=বড় মাপে প্রদর্শন
zoom.title=প্রদর্শনের মাপ
presentation_mode.title=উপস্থাপনা মোড স্যুইচ করুন
presentation_mode_label=উপস্থাপনা মোড
open_file.title=ফাইল খুলুন
open_file_label=খুলুন
print.title=প্রিন্ট করুন
print_label=প্রিন্ট করুন
download.title=ডাউনলোড করুন
download_label=ডাউনলোড করুন
bookmark.title=বর্তমান প্রদর্শন (কপি করুন অথবা নতুন উইন্ডোতে খুলুন)
bookmark_label=বর্তমান প্রদর্শন
# Secondary toolbar and context menu
tools.title=সরঞ্জাম
tools_label=সরঞ্জাম
first_page.title=প্রথম পৃষ্ঠায় চলুন
first_page.label=প্রথম পৃষ্ঠায় চলুন
first_page_label=প্রথম পৃষ্ঠায় চলুন
last_page.title=সর্বশেষ পৃষ্ঠায় চলুন
last_page.label=সর্বশেষ পৃষ্ঠায় চলুন
last_page_label=সর্বশেষ পৃষ্ঠায় চলুন
page_rotate_cw.title=ডানদিকে ঘোরানো হবে
page_rotate_cw.label=ডানদিকে ঘোরানো হবে
page_rotate_cw_label=ডানদিকে ঘোরানো হবে
page_rotate_ccw.title=বাঁদিকে ঘোরানো হবে
page_rotate_ccw.label=বাঁদিকে ঘোরানো হবে
page_rotate_ccw_label=বাঁদিকে ঘোরানো হবে
hand_tool_enable.title=হ্যান্ড টুল সক্রিয় করুন
hand_tool_enable_label=হ্যান্ড টুল সক্রিয় করুন
hand_tool_disable.title=হ্যান্ড টুল নিস্ক্রিয় করুন
hand_tool_disable_label=হ্যান্ড টুল নিস্ক্রিয় করুন
# Document properties dialog box
document_properties.title=নথির বৈশিষ্ট্য…
document_properties_label=নথির বৈশিষ্ট্য…
document_properties_file_name=ফাইলের নাম:
document_properties_file_size=ফাইলের মাপ:
# LOCALIZATION NOTE (document_properties_kb): "{{size_kb}}" and "{{size_b}}"
# will be replaced by the PDF file size in kilobytes, respectively in bytes.
document_properties_kb={{size_kb}} KB ({{size_b}} bytes)
# LOCALIZATION NOTE (document_properties_mb): "{{size_mb}}" and "{{size_b}}"
# will be replaced by the PDF file size in megabytes, respectively in bytes.
document_properties_mb={{size_mb}} মেগাবাইট ({{size_b}} bytes)
document_properties_title=শিরোনাম:
document_properties_author=লেখক:
document_properties_subject=বিষয়:
document_properties_keywords=নির্দেশক শব্দ:
document_properties_creation_date=নির্মাণের তারিখ:
document_properties_modification_date=পরিবর্তনের তারিখ:
# LOCALIZATION NOTE (document_properties_date_string): "{{date}}" and "{{time}}"
# will be replaced by the creation/modification date, and time, of the PDF file.
document_properties_date_string={{date}}, {{time}}
document_properties_creator=নির্মাতা:
document_properties_producer=PDF নির্মাতা:
document_properties_version=PDF সংস্করণ:
document_properties_page_count=মোট পৃষ্ঠা:
document_properties_close=বন্ধ করুন
print_progress_message=ডকুমেন্ট প্রিন্টিং-র জন্য তৈরি করা হচ্ছে...
# LOCALIZATION NOTE (print_progress_percent): "{{progress}}" will be replaced by
# a numerical per cent value.
print_progress_percent={{progress}}%
print_progress_close=বাতিল
# Tooltips and alt text for side panel toolbar buttons
# (the _label strings are alt text for the buttons, the .title strings are
# tooltips)
toggle_sidebar.title=সাইডবার টগল করুন
toggle_sidebar_label=সাইডবার টগল করুন
document_outline.title=ডকুমেন্ট আউটলাইন দেখান (দুবার ক্লিক করুন বাড়াতে//collapse সমস্ত আইটেম)
document_outline_label=ডকুমেন্ট আউটলাইন
attachments.title=সংযুক্তিসমূহ দেখান
attachments_label=সংযুক্ত বস্তু
thumbs.title=থাম্ব-নেইল প্রদর্শন
thumbs_label=থাম্ব-নেইল প্রদর্শন
findbar.title=নথিতে খুঁজুন
findbar_label=অনুসন্ধান করুন
# Thumbnails panel item (tooltip and alt text for images)
# LOCALIZATION NOTE (thumb_page_title): "{{page}}" will be replaced by the page
# number.
thumb_page_title=পৃষ্ঠা {{page}}
# LOCALIZATION NOTE (thumb_page_canvas): "{{page}}" will be replaced by the page
# number.
thumb_page_canvas=পৃষ্ঠা {{page}}-র থাম্ব-নেইল
# Find panel button title and messages
find_label=অনুসন্ধান:
find_previous.title=চিহ্নিত পংক্তির পূর্ববর্তী উপস্থিতি অনুসন্ধান করুন
find_previous_label=পূর্ববর্তী
find_next.title=চিহ্নিত পংক্তির পরবর্তী উপস্থিতি অনুসন্ধান করুন
find_next_label=পরবর্তী
find_highlight=সমগ্র উজ্জ্বল করুন
find_match_case_label=হরফের ছাঁদ মেলানো হবে
find_reached_top=পৃষ্ঠার প্রারম্ভে পৌছে গেছে, নীচের অংশ থেকে আরম্ভ করা হবে
find_reached_bottom=পৃষ্ঠার অন্তিম প্রান্তে পৌছে গেছে, প্রথম অংশ থেকে আরম্ভ করা হবে
find_not_found=পংক্তি পাওয়া যায়নি
# Error panel labels
error_more_info=অতিরিক্ত তথ্য
error_less_info=কম তথ্য
error_close=বন্ধ করুন
# LOCALIZATION NOTE (error_version_info): "{{version}}" and "{{build}}" will be
# replaced by the PDF.JS version and build ID.
error_version_info=PDF.js v{{version}} (build: {{build}})
# LOCALIZATION NOTE (error_message): "{{message}}" will be replaced by an
# english string describing the error.
error_message=Message: {{message}}
# LOCALIZATION NOTE (error_stack): "{{stack}}" will be replaced with a stack
# trace.
error_stack=Stack: {{stack}}
# LOCALIZATION NOTE (error_file): "{{file}}" will be replaced with a filename
error_file=File: {{file}}
# LOCALIZATION NOTE (error_line): "{{line}}" will be replaced with a line number
error_line=Line: {{line}}
rendering_error=পৃষ্ঠা প্রদর্শনকালে একটি সমস্যা দেখা দিয়েছে।
# Predefined zoom values
page_scale_width=পৃষ্ঠার প্রস্থ অনুযায়ী
page_scale_fit=পৃষ্ঠার মাপ অনুযায়ী
page_scale_auto=স্বয়ংক্রিয় মাপ নির্ধারণ
page_scale_actual=প্রকৃত মাপ
# LOCALIZATION NOTE (page_scale_percent): "{{scale}}" will be replaced by a
# numerical scale value.
page_scale_percent={{scale}}%
# Loading indicator messages
loading_error_indicator=ত্রুটি
loading_error=PDF লোড করার সময় সমস্যা দেখা দিয়েছে।
invalid_file_error=অবৈধ বা ক্ষতিগ্রস্ত পিডিএফ ফাইল।
missing_file_error=অনুপস্থিত PDF ফাইল
unexpected_response_error=সার্ভার থেকে অপ্রত্যাশিত সাড়া পাওয়া গেছে।
# LOCALIZATION NOTE (text_annotation_type.alt): This is used as a tooltip.
# "{{type}}" will be replaced with an annotation type from a list defined in
# the PDF spec (32000-1:2008 Table 169 – Annotation types).
# Some common types are e.g.: "Check", "Text", "Comment", "Note"
text_annotation_type.alt=[{{type}} Annotation]
password_label=এই PDF ফাইল খোলার জন্য পাসওয়ার্ড দিন।
password_invalid=পাসওয়ার্ড সঠিক নয়। অনুগ্রহ করে পুনরায় প্রচেষ্টা করুন।
password_ok=OK
password_cancel=বাতিল করুন
printing_not_supported=সতর্কবার্তা: এই ব্রাউজার দ্বারা প্রিন্ট ব্যবস্থা সম্পূর্ণরূপে সমর্থিত নয়।
printing_not_ready=সতর্কবাণী: পিডিএফ সম্পূর্ণরূপে মুদ্রণের জন্য লোড করা হয় না.
web_fonts_disabled=ওয়েব ফন্ট নিষ্ক্রিয় করা হয়েছে: এমবেডেড পিডিএফ ফন্ট ব্যবহার করতে অক্ষম.
document_colors_not_allowed=পিডিএফ নথি তাদের নিজস্ব রং ব্যবহার করার জন্য অনুমতিপ্রাপ্ত নয়: ব্রাউজারে নিষ্ক্রিয় করা হয়েছে য়েন 'পেজ তাদের নিজস্ব রং নির্বাচন করার অনুমতি প্রদান করা য়ায়।'
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2018 Google
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "Firestore/core/src/firebase/firestore/util/comparison.h"
#include <cmath>
#include <limits>
namespace firebase {
namespace firestore {
namespace util {
using std::isnan;
bool Comparator<absl::string_view>::operator()(absl::string_view left,
absl::string_view right) const {
// TODO(wilhuff): truncation aware comparison
return left < right;
}
bool Comparator<std::string>::operator()(const std::string& left,
const std::string& right) const {
// TODO(wilhuff): truncation aware comparison
return left < right;
}
bool Comparator<double>::operator()(double left, double right) const {
// NaN sorts equal to itself and before any other number.
if (left < right) {
return true;
} else if (left >= right) {
return false;
} else {
// One or both left and right is NaN.
return isnan(left) && !isnan(right);
}
}
static constexpr double INT64_MIN_VALUE_AS_DOUBLE =
static_cast<double>(std::numeric_limits<int64_t>::min());
static constexpr double INT64_MAX_VALUE_AS_DOUBLE =
static_cast<double>(std::numeric_limits<int64_t>::max());
ComparisonResult CompareMixedNumber(double double_value, int64_t int64_value) {
// LLONG_MIN has an exact representation as double, so to check for a value
// outside the range representable by long, we have to check for strictly less
// than LLONG_MIN. Note that this also handles negative infinity.
if (double_value < INT64_MIN_VALUE_AS_DOUBLE) {
return ComparisonResult::Ascending;
}
// LLONG_MAX has no exact representation as double (casting as we've done
// makes 2^63, which is larger than LLONG_MAX), so consider any value greater
// than or equal to the threshold to be out of range. This also handles
// positive infinity.
if (double_value >= INT64_MAX_VALUE_AS_DOUBLE) {
return ComparisonResult::Descending;
}
// In Firestore NaN is defined to compare before all other numbers.
if (isnan(double_value)) {
return ComparisonResult::Ascending;
}
auto double_as_int64 = static_cast<int64_t>(double_value);
ComparisonResult cmp = Compare<int64_t>(double_as_int64, int64_value);
if (cmp != ComparisonResult::Same) {
return cmp;
}
// At this point the long representations are equal but this could be due to
// rounding.
auto int64_as_double = static_cast<double>(int64_value);
return Compare<double>(double_value, int64_as_double);
}
/** Helper to normalize a double and then return the raw bits as a uint64_t. */
uint64_t DoubleBits(double d) {
if (isnan(d)) {
d = NAN;
}
// Unlike C, C++ does not define type punning through a union type.
// TODO(wilhuff): replace with absl::bit_cast
static_assert(sizeof(double) == sizeof(uint64_t), "doubles must be 8 bytes");
uint64_t bits;
memcpy(&bits, &d, sizeof(bits));
return bits;
}
bool DoubleBitwiseEquals(double left, double right) {
return DoubleBits(left) == DoubleBits(right);
}
size_t DoubleBitwiseHash(double d) {
uint64_t bits = DoubleBits(d);
// Note that x ^ (x >> 32) works fine for both 32 and 64 bit definitions of
// size_t
return static_cast<size_t>(bits) ^ static_cast<size_t>(bits >> 32);
}
} // namespace util
} // namespace firestore
} // namespace firebase
| {
"pile_set_name": "Github"
} |
# Try to find the GNU Multiple Precision Arithmetic Library (GMP)
# See http://gmplib.org/
if (GMP_INCLUDES AND GMP_LIBRARIES)
set(GMP_FIND_QUIETLY TRUE)
endif (GMP_INCLUDES AND GMP_LIBRARIES)
find_path(GMP_INCLUDES
NAMES
gmp.h
PATHS
$ENV{GMPDIR}
${INCLUDE_INSTALL_DIR}
)
find_library(GMP_LIBRARIES gmp PATHS $ENV{GMPDIR} ${LIB_INSTALL_DIR})
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GMP DEFAULT_MSG
GMP_INCLUDES GMP_LIBRARIES)
mark_as_advanced(GMP_INCLUDES GMP_LIBRARIES)
| {
"pile_set_name": "Github"
} |
import time
from functools import wraps
TEST_LOG_BOOL = True
def test_logger(msg):
print 'test-' + msg
def comprehensive_logger(logger=None, logging=True, maxlength=25, nowait=False):
'''
Decorator to log the inputs and outputs of functions, as well as the time taken
to run the function.
Requires: time, functools
logger: [opt] logging function, if not provided print is used
logging: [opt] boolean, turn logging on and off, default is True
maxlength: [opt] integer, sets the maximum length an argument or returned variable cant take, default 25
nowait: [opt] boolean, instructs the logger not to wait for the function to finish, default is False
'''
def default_logger(msg):
print msg
if logger == None:
logger = default_logger
def get_args(*args, **kwargs):
all_args = []
for i, arg in enumerate(args):
itm = 'pos' + str(i) + ": " + str(arg)[:maxlength]
all_args.append(itm)
for k, v in kwargs.iteritems():
itm = str(k) + ": " + str(v)[:maxlength]
all_args.append(itm)
return all_args
def decorater(func):
@wraps(func)
def wrapper(*args, **kwargs):
if logging and logger != None:
logger(func.__module__ + '.' + func.__name__ + " received: " + ", ".join(get_args(*args, **kwargs)))
if nowait:
func(*args, **kwargs)
logger(func.__module__ + '.' + func.__name__ + " -nowait")
return
else:
start = time.time()
result = func(*args, **kwargs)
end = time.time()
if logging and logger != None:
logger(func.__module__ + '.' + func.__name__ + " [" + str(end-start) + "] " + ' returns: ' + str(result)[:maxlength])
return result
return wrapper
return decorater
clog = comprehensive_logger
@clog(logging=TEST_LOG_BOOL)
def arg_tester(a, b, cdef):
print 'a: ' + str(a)
print 'b: ' + str(b)
print 'cdef: ' + str(cdef)
if __name__ == "__main__":
arg_tester('han', ['chewie', 'luke'], cdef='123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890') | {
"pile_set_name": "Github"
} |
//
// handler_type.hpp
// ~~~~~~~~~~~~~~~~
//
// Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#ifndef ASIO_HANDLER_TYPE_HPP
#define ASIO_HANDLER_TYPE_HPP
#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif // defined(_MSC_VER) && (_MSC_VER >= 1200)
#include "asio/detail/config.hpp"
#include "asio/detail/type_traits.hpp"
#include "asio/detail/push_options.hpp"
namespace asio {
/// Default handler type traits provided for all completion token types.
/**
* The handler_type traits class is used for determining the concrete handler
* type to be used for an asynchronous operation. It allows the handler type to
* be determined at the point where the specific completion handler signature
* is known.
*
* This template may be specialised for user-defined completion token types.
*/
template <typename CompletionToken, typename Signature, typename = void>
struct handler_type
{
/// The handler type for the specific signature.
typedef typename conditional<
is_same<CompletionToken, typename decay<CompletionToken>::type>::value,
decay<CompletionToken>,
handler_type<typename decay<CompletionToken>::type, Signature>
>::type::type type;
};
} // namespace asio
#include "asio/detail/pop_options.hpp"
#define ASIO_HANDLER_TYPE(h, sig) \
typename handler_type<h, sig>::type
#endif // ASIO_HANDLER_TYPE_HPP
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2002-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.security.config.doc;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
/**
* Represents a Spring Security XSD Element. It is created when parsing the current xsd to
* compare to the documented appendix.
*
* @author Rob Winch
* @author Josh Cummings
* @see SpringSecurityXsdParser
* @see XsdDocumentedTests
*/
public class Element {
private String name;
private String desc;
private Collection<Attribute> attrs = new ArrayList<>();
/**
* Contains the elements that extend this element (i.e. any-user-service contains
* ldap-user-service)
*/
private Collection<Element> subGrps = new ArrayList<>();
private Map<String, Element> childElmts = new HashMap<>();
private Map<String, Element> parentElmts = new HashMap<>();
public String getId() {
return String.format("nsa-%s", this.name);
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getDesc() {
return this.desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
public Collection<Attribute> getAttrs() {
return this.attrs;
}
public void setAttrs(Collection<Attribute> attrs) {
this.attrs = attrs;
}
public Collection<Element> getSubGrps() {
return this.subGrps;
}
public void setSubGrps(Collection<Element> subGrps) {
this.subGrps = subGrps;
}
public Map<String, Element> getChildElmts() {
return this.childElmts;
}
public void setChildElmts(Map<String, Element> childElmts) {
this.childElmts = childElmts;
}
public Map<String, Element> getParentElmts() {
return this.parentElmts;
}
public void setParentElmts(Map<String, Element> parentElmts) {
this.parentElmts = parentElmts;
}
/**
* Gets all the ids related to this Element including attributes, parent elements, and
* child elements.
*
* <p>
* The expected ids to be found are documented below.
* <ul>
* <li>Elements - any xml element will have the nsa-<element>. For example the
* http element will have the id nsa-http</li>
* <li>Parent Section - Any element with a parent other than beans will have a section
* named nsa-<element>-parents. For example, authentication-provider would have
* a section id of nsa-authentication-provider-parents. The section would then contain
* a list of links pointing to the documentation for each parent element.</li>
* <li>Attributes Section - Any element with attributes will have a section with the
* id nsa-<element>-attributes. For example the http element would require a
* section with the id http-attributes.</li>
* <li>Attribute - Each attribute of an element would have an id of
* nsa-<element>-<attributeName>. For example the attribute create-session
* for the http attribute would have the id http-create-session.</li>
* <li>Child Section - Any element with a child element will have a section named
* nsa-<element>-children. For example, authentication-provider would have a
* section id of nsa-authentication-provider-children. The section would then contain
* a list of links pointing to the documentation for each child element.</li>
* </ul>
* @return
*/
public Collection<String> getIds() {
Collection<String> ids = new ArrayList<>();
ids.add(getId());
this.childElmts.values().forEach((elmt) -> ids.add(elmt.getId()));
this.attrs.forEach((attr) -> ids.add(attr.getId()));
if (!this.childElmts.isEmpty()) {
ids.add(getId() + "-children");
}
if (!this.attrs.isEmpty()) {
ids.add(getId() + "-attributes");
}
if (!this.parentElmts.isEmpty()) {
ids.add(getId() + "-parents");
}
return ids;
}
public Map<String, Element> getAllChildElmts() {
Map<String, Element> result = new HashMap<>();
this.childElmts.values()
.forEach((elmt) -> elmt.subGrps.forEach((subElmt) -> result.put(subElmt.name, subElmt)));
result.putAll(this.childElmts);
return result;
}
public Map<String, Element> getAllParentElmts() {
Map<String, Element> result = new HashMap<>();
this.parentElmts.values()
.forEach((elmt) -> elmt.subGrps.forEach((subElmt) -> result.put(subElmt.name, subElmt)));
result.putAll(this.parentElmts);
return result;
}
}
| {
"pile_set_name": "Github"
} |
# Tensorflow - Named Entity Recognition
Each folder contains a __standalone__, __short (~100 lines of Tensorflow)__, `main.py` that implements a neural-network based model for Named Entity Recognition (NER) using [`tf.estimator`](https://www.tensorflow.org/guide/custom_estimators) and [`tf.data`](https://www.tensorflow.org/guide/datasets).

These implementations are __simple, efficient, and state-of-the-art__, in the sense that they do __as least as well as the results reported in the papers__. The best model achieves in *average* an __f1 score of 91.21__. To my knowledge, *existing implementations available on the web are convoluted, outdated and not always accurate* (including my [previous work](https://github.com/guillaumegenthial/sequence_tagging)). This repo is an attempt to fix this, in the hope that it will enable people to test and validate new ideas quickly.
The script [`lstm_crf/main.py`](https://github.com/guillaumegenthial/tf_ner/blob/master/models/lstm_crf/main.py) can also be seen as a __simple introduction to Tensorflow high-level APIs [`tf.estimator`](https://www.tensorflow.org/guide/custom_estimators) and [`tf.data`](https://www.tensorflow.org/guide/datasets) applied to Natural Language Processing__. [Here is a longer discussion about this implementation along with an introduction to tf.estimator and tf.data](https://guillaumegenthial.github.io/introduction-tensorflow-estimator.html)
## Install
You need __python3__ -- If you haven't switched yet, do it.
You need to install [`tf_metrics` ](https://github.com/guillaumegenthial/tf_metrics) (multi-class precision, recall and f1 metrics for Tensorflow).
```
pip install git+https://github.com/guillaumegenthial/tf_metrics.git
```
OR
```
git clone https://github.com/guillaumegenthial/tf_metrics.git
cd tf_metrics
pip install .
```
## Data Format
Follow the [`data/example`](https://github.com/guillaumegenthial/tf_ner/tree/master/data/example).
1. For `name` in `{train, testa, testb}`, create files `{name}.words.txt` and `{name}.tags.txt` that contain one sentence per line, each
word / tag separated by space. I recommend using the `IOBES` tagging scheme.
2. Create files `vocab.words.txt`, `vocab.tags.txt` and `vocab.chars.txt` that contain one token per line.
3. Create a `glove.npz` file containing one array `embeddings` of shape `(size_vocab_words, 300)` using [GloVe 840B vectors](https://nlp.stanford.edu/projects/glove/) and [`np.savez_compressed`](https://docs.scipy.org/doc/numpy-1.13.0/reference/generated/numpy.savez_compressed.html).
An example of scripts to build the `vocab` and the `glove.npz` files from the `{name}.words.txt` and `{name}.tags.txt` files is provided in [`data/example`](https://github.com/guillaumegenthial/tf_ner/tree/master/data/example). See
1. [`build_vocab.py`](https://github.com/guillaumegenthial/tf_ner/blob/master/data/example/build_vocab.py)
2. [`build_glove.py`'](https://github.com/guillaumegenthial/tf_ner/blob/master/data/example/build_glove.py)

If you just want to get started, once you have created your `{name}.words.txt` and `{name}.tags.txt` files, simply do
```
cd data/example
make download-glove
make build
```
(These commands will build the __example__ dataset)
*Note that the example dataset is here for debugging purposes only and won't be of much use to train an actual model*
## Get Started
Once you've produced all the required data files, simply pick one of the `main.py` scripts. Then, modify the `DATADIR` variable at the top of `main.py`.
To train, evaluate and write predictions to file, run
```
cd models/lstm_crf
python main.py
```
(These commands will train a bi-LSTM + CRF on the __example__ dataset if you haven't changed `DATADIR` in the `main.py`.)
__Each model subdirectory contains a breakdown of the instructions__.
## Models
Took inspiration from these papers
- [Bidirectional LSTM-CRF Models for Sequence Tagging](https://arxiv.org/abs/1508.01991) by Huang, Xu and Yu
- [Neural Architectures for Named Entity Recognition](https://arxiv.org/abs/1603.01360) by Lample et al.
- [End-to-end Sequence Labeling via Bi-directional LSTM-CNNs-CRF](https://arxiv.org/abs/1603.01354) by Ma et Hovy
You can also read [this blog post](https://guillaumegenthial.github.io/sequence-tagging-with-tensorflow.html).
Word-vectors are __not retrained__ to avoid any undesirable shift (explanation in [these CS224N notes](https://github.com/stanfordnlp/cs224n-winter17-notes/blob/master/notes2.pdf)).
The models are tested on the [CoNLL2003 shared task](https://www.clips.uantwerpen.be/conll2003/ner/).
Training times are provided for indicative purposes only. Obtained on a 2016 13-inch MBPro 3.3 GHz Intel Core i7.
For each model, we run 5 experiments
- Train on `train` only
- __Early stopping__ on `testa`
- Select best of 5 on the perfomance on `testa` (token-level F1)
- Report __F1 score mean and standard deviation__ (entity-level F1 from the official `conlleval` script)
- Select best on `testb` for reference (but shouldn't be used for comparison as this is just overfitting on the final test set)
In addition, we run 5 other experiments, keeping an __Exponential Moving Average (EMA)__ of the weights (used for evaluation) and report the best F1, mean / std.
As you can see, there's no clear statistical evidence of which of the 2 character-based models is the best. EMA seems to help most of the time. Also, considering the complexity of the models and the relatively small gap in performance (0.6 F1), using the `lstm_crf` model is probably a safe bet for most of the concrete applications.
---
### `lstm_crf`
__Architecture__
1. [GloVe 840B vectors](https://nlp.stanford.edu/projects/glove/)
2. Bi-LSTM
3. CRF
__Related Paper__ [Bidirectional LSTM-CRF Models for Sequence Tagging](https://arxiv.org/abs/1508.01991) by Huang, Xu and Yu
__Training time__ ~ 20 min
|| `train` | `testa` | `testb` | Paper, `testb` |
|---|:---:|:---:|:---:|:---:|
|best | 98.45 |93.81 | __90.61__ | 90.10 |
|best (EMA)| 98.82 | 94.06 | 90.43 | |
|mean ± std| 98.85 ± 0.22| 93.68 ± 0.12| 90.42 ± 0.10| |
|mean ± std (EMA)| 98.71 ± 0.47 | 93.81 ± 0.24 | __90.50__ ± 0.21| |
|abs. best | | | 90.61 | |
|abs. best (EMA) | | | 90.75 | |
---
### `chars_lstm_lstm_crf`
__Architecture__
1. [GloVe 840B vectors](https://nlp.stanford.edu/projects/glove/)
2. Chars embeddings
3. Chars bi-LSTM
4. Bi-LSTM
5. CRF
__Related Paper__ [Neural Architectures for Named Entity Recognition](https://arxiv.org/abs/1603.01360) by Lample et al.
__Training time__ ~ 35 min
|| `train` | `testa` | `testb` | Paper, `testb` |
|---|:---:|:---:|:---:|:---:|
|best| 98.81 | 94.36 | 91.02 | 90.94 |
|best (EMA) |98.73 | 94.50 | __91.14__ | |
|mean ± std | 98.83 ± 0.27| 94.02 ± 0.26| 91.01 ± 0.16 | |
|mean ± std (EMA) | 98.51 ± 0.25| 94.20 ± 0.28| __91.21__ ± 0.05 | |
|abs. best | | |91.22 | |
|abs. best (EMA) | | | 91.28 | |
---
### `chars_conv_lstm_crf`
__Architecture__
1. [GloVe 840B vectors](https://nlp.stanford.edu/projects/glove/)
2. Chars embeddings
3. Chars 1d convolution and max-pooling
4. Bi-LSTM
5. CRF
__Related Paper__ [End-to-end Sequence Labeling via Bi-directional LSTM-CNNs-CRF](https://arxiv.org/abs/1603.01354) by Ma et Hovy
__Training time__ ~ 35 min
|| `train` | `testa` | `testb` | Paper, `testb` |
|---|:---:|:---:|:---:|:---:|
|best| 99.16 | 94.53 | __91.18__ | 91.21 |
|best (EMA) |99.44 | 94.50 | 91.17 | |
|mean ± std | 98.86 ± 0.30| 94.10 ± 0.26| __91.20__ ± 0.15 | |
|mean ± std (EMA) | 98.67 ± 0.39| 94.29 ± 0.17| 91.13 ± 0.11 | |
|abs. best | | | 91.42 | |
|abs. best (EMA) | | | 91.22 | |
| {
"pile_set_name": "Github"
} |
// Code generated by go-swagger; DO NOT EDIT.
package models
/**
* Panther is a Cloud-Native SIEM for the Modern Security Team.
* Copyright (C) 2020 Panther Labs Inc
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/validate"
)
// Body Python policy source code
//
// swagger:model body
type Body string
// Validate validates this body
func (m Body) Validate(formats strfmt.Registry) error {
var res []error
if err := validate.MinLength("", "body", string(m), 10); err != nil {
return err
}
if err := validate.MaxLength("", "body", string(m), 1000000); err != nil {
return err
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2008-present MongoDB, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.bson.json;
import org.bson.types.ObjectId;
class ExtendedJsonObjectIdConverter implements Converter<ObjectId> {
@Override
public void convert(final ObjectId value, final StrictJsonWriter writer) {
writer.writeStartObject();
writer.writeString("$oid", value.toHexString());
writer.writeEndObject();
}
}
| {
"pile_set_name": "Github"
} |
using System.Collections.Generic;
namespace ChromeCast.Desktop.AudioStreamer.Communication.Classes
{
/// <summary>
/// Classes used for messages received from a Chromecast device.
/// </summary>
public class PayloadMessageBase
{
public string type;
}
public class MessageVolume : PayloadMessageBase
{
public SendVolume volume;
public int requestId;
}
public class SendVolume
{
public float level;
}
public class MessageVolumeMute : PayloadMessageBase
{
public SendVolumeMute volume;
public int requestId;
}
public class SendVolumeMute
{
public bool muted;
}
public class MessageLaunch : PayloadMessageBase
{
public string appId;
public int requestId;
}
public class MessageLoad : PayloadMessageBase
{
public bool autoplay;
public float currentTime;
public List<object> activeTrackIds;
public string repeatMode;
public Media media;
public int requestId;
}
public class MessagePause : PayloadMessageBase
{
public int mediaSessionId;
public string sessionId;
public int requestId;
}
public class MessageStatus : PayloadMessageBase
{
public int requestId;
}
public class Media
{
public string contentId;
public string contentType;
public string streamType;
public Metadata metadata;
}
public class Metadata
{
public int type;
public int metadataType;
public string title;
public List<Image> images;
}
public class Image
{
public string url;
}
/// <summary>
/// If the stream couldn't be opened (socket problems etc.) you get this message from the device.
/// type = 'LOAD_FAILED'
/// </summary>
public class MessageLoadFailed : PayloadMessageBase
{
public int requestId;
}
/// <summary>
/// If calling 'LOAD' a second time with the same url and the first is still 'loading'
/// , you get this message from the device.
/// type = 'LOAD_CANCELLED'
/// </summary>
public class MessageLoadCancelled : PayloadMessageBase
{
public int requestId;
}
/// <summary>
/// You get this message after LOAD, Volume change, Mute etc., and when you request the status.
/// type = 'MEDIA_STATUS'
/// </summary>
public class MessageMediaStatus : PayloadMessageBase
{
public List<MediaStatus> status;
public int requestId;
}
public class MediaStatus
{
public int mediaSessionId;
public int playbackRate;
public string playerState;
public float currentTime;
public int supportedMediaCommands;
public Volume volume;
public List<object> activeTrackIds;
public Media media;
public int currentItemId;
public ExtendedStatus extendedStatus;
public string repeatMode;
}
public class ExtendedStatus
{
public string playerState;
public Media media;
}
/// <summary>
/// After a 'LAUNCH' you get this message from the device, or when you request the device for it.
/// type = 'RECEIVER_STATUS'
/// </summary>
public class MessageReceiverStatus : PayloadMessageBase
{
public int requestId;
public ReceiverStatus status;
}
public class ReceiverStatus
{
public List<Application> applications;
public Volume volume;
}
public class Volume
{
public string controlType;
public float level;
public bool muted;
public float stepInterval;
}
public class Application
{
public string appId;
public string displayName;
public bool isIdleScreen;
public List<Namespaces> namespaces;
public string sessionId;
public string statusText;
public string transportId;
}
public class Namespaces
{
public string name;
}
} | {
"pile_set_name": "Github"
} |
// RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sve2 < %s \
// RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
// RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
// RUN: | FileCheck %s --check-prefix=CHECK-ERROR
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
// RUN: | llvm-objdump -d -mattr=+sve2 - | FileCheck %s --check-prefix=CHECK-INST
// RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sve2 < %s \
// RUN: | llvm-objdump -d - | FileCheck %s --check-prefix=CHECK-UNKNOWN
whilerw p15.b, x30, x30
// CHECK-INST: whilerw p15.b, x30, x30
// CHECK-ENCODING: [0xdf,0x33,0x3e,0x25]
// CHECK-ERROR: instruction requires: sve2
// CHECK-UNKNOWN: df 33 3e 25 <unknown>
whilerw p15.h, x30, x30
// CHECK-INST: whilerw p15.h, x30, x30
// CHECK-ENCODING: [0xdf,0x33,0x7e,0x25]
// CHECK-ERROR: instruction requires: sve2
// CHECK-UNKNOWN: df 33 7e 25 <unknown>
whilerw p15.s, x30, x30
// CHECK-INST: whilerw p15.s, x30, x30
// CHECK-ENCODING: [0xdf,0x33,0xbe,0x25]
// CHECK-ERROR: instruction requires: sve2
// CHECK-UNKNOWN: df 33 be 25 <unknown>
whilerw p15.d, x30, x30
// CHECK-INST: whilerw p15.d, x30, x30
// CHECK-ENCODING: [0xdf,0x33,0xfe,0x25]
// CHECK-ERROR: instruction requires: sve2
// CHECK-UNKNOWN: df 33 fe 25 <unknown>
| {
"pile_set_name": "Github"
} |
lib/udev/rules.d/*.rules
| {
"pile_set_name": "Github"
} |
# $Id: de.po,v 1.6 2006/03/22 04:21:57 mindless Exp $
#
# Gallery - a web based photo album viewer and editor
# Copyright (C) 2000-2006 Bharat Mediratta
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
#
# Previous translators (as far as known, add yourself here, please):
# - Jens Tkotz <[email protected]>
# - Frederik Kunz <[email protected]>
# - Bananeweizen <[email protected]>
#
msgid ""
msgstr ""
"Project-Id-Version: Gallery: Zip Download 1.0.4\n"
"POT-Creation-Date: 2003-02-11 03:09-0800\n"
"PO-Revision-Date: 2005-08-09 02:10+0100\n"
"Last-Translator: Bananeweizen <[email protected]>\n"
"Language-Team: German <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
msgid "Zip Download"
msgstr "ZIP-Download"
msgid "Download cart items in a zip file"
msgstr "Laden Sie alle Ihre gesammelten Elemente als ZIP-Datei herunter."
msgid "Commerce"
msgstr "Geschäftliches"
msgid "Download in Zip"
msgstr "Als ZIP-Datei herunterladen"
msgid "Zip Download Settings"
msgstr "Einstellungen für ZIP-Download"
msgid "Settings saved successfully"
msgstr "Einstellungen erfolgreich gespeichert"
msgid "Enter full path to the zip executable."
msgstr "Geben Sie den vollständigen, absoluten Pfad zur ZIP-Binärdatei an."
msgid "Zip Path:"
msgstr "ZIP-Pfad:"
msgid "You must enter a path to your zip binary"
msgstr "Sie müssen den Pfad zur ZIP-Binärdatei angeben."
msgid "The path you entered isn't valid or isn't executable"
msgstr "Der von Ihnen angegeben Pfad ist nicht gültig oder das Programm ist nicht ausführbar"
msgid "Unable to create a zip file from this binary"
msgstr "Kann mit dem angegebenen Programm keine ZIP-Datei erstellen"
msgid "The path you entered is valid"
msgstr "Der von Ihnen angegeben Pfad ist gültig"
msgid "Debug output"
msgstr "Debug-Ausgabe"
msgid ""
"We gathered this debug output while testing your zip installation. If you read through this "
"carefully you may discover the reason why it failed our tests."
msgstr ""
"Wir haben beim Testen Ihrer ZIP-Installation diese Fehlermeldungen gesammelt. Eventuell "
"können Sie durch aufmerksames Lesen dieser Informationen den Grund entdecken, warum sie "
"unsere Tests nicht bestand."
msgid "Save Settings"
msgstr "Einstellungen speichern"
msgid "Test Settings"
msgstr "Einstellungen testen"
msgid "Cancel"
msgstr "Abbrechen"
msgid "Reset"
msgstr "Zurücksetzen"
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
package java.nio.channels;
import java.io.IOException;
/**
* A channel that can read and write bytes. This interface simply unifies
* {@link ReadableByteChannel} and {@link WritableByteChannel}; it does not
* specify any new operations.
*
* @author Mark Reinhold
* @author JSR-51 Expert Group
* @since 1.4
*/
public interface ByteChannel
extends ReadableByteChannel, WritableByteChannel
{
}
| {
"pile_set_name": "Github"
} |
{
"done": {
"variables": {
"lives": {
"op": "equal",
"reference": -1
}
}
},
"reward": {
"variables": {
"score": {
"reward": 1
}
}
}
} | {
"pile_set_name": "Github"
} |
#ifndef _M68K_PARAM_H
#define _M68K_PARAM_H
#ifdef __uClinux__
#define EXEC_PAGESIZE 4096
#else
#define EXEC_PAGESIZE 8192
#endif
#include <asm-generic/param.h>
#endif /* _M68K_PARAM_H */
| {
"pile_set_name": "Github"
} |
import { convertObjectsToCSV, convertCSVToJSON } from './convert';
describe('Convert', () => {
describe('Object to CSV conversion', () => {
it('conversion with various parameter options', () => {
const objects: object[] = [
{ name: 'user1', id: 123 },
{ name: 'user2', id: 234 },
];
const expectedStr: string = 'name,id\r\nuser1,123\r\nuser2,234\r\n';
const expectedStrCustomKeySeparator: string = 'name|id\r\nuser1|123\r\nuser2|234\r\n';
const expectedStrCustomLineSeparator: string = 'name,id|user1,123|user2,234|';
const expectedStrCustomKeyLineSeparator: string = 'name|id&user1|123&user2|234&';
expect(convertObjectsToCSV(undefined)).toEqual('');
expect(convertObjectsToCSV([])).toEqual('');
expect(convertObjectsToCSV(objects)).toEqual(expectedStr);
expect(convertObjectsToCSV(objects, '|')).toEqual(expectedStrCustomKeySeparator);
expect(convertObjectsToCSV(objects, undefined, '|')).toEqual(expectedStrCustomLineSeparator);
expect(convertObjectsToCSV(objects)).toEqual(expectedStr);
expect(convertObjectsToCSV(objects, '|')).toEqual(expectedStrCustomKeySeparator);
expect(convertObjectsToCSV(objects, ',', '|')).toEqual(expectedStrCustomLineSeparator);
expect(convertObjectsToCSV(objects, '|', '&')).toEqual(expectedStrCustomKeyLineSeparator);
});
});
describe('CSV to JSON conversion', () => {
it('conversion with various parameter options', () => {
const csv: string = 'name,id\r\nuser1,123\r\nuser2,234\r\n';
const csvCustomKeySeparator: string = 'name|id\r\nuser1|123\r\nuser2|234\r\n';
const csvCustomLineSeparator: string = 'name,id|user1,123|user2,234|';
const csvCustomKeyLineSeparator: string = 'name|id&user1|123&user2|234&';
const expectedJSON: string =
'[\n {\n "name": "user1",\n "id": "123"\n },\n {\n "name": "user2",\n "id": "234"\n }\n]';
expect(convertCSVToJSON(undefined)).toEqual('');
expect(convertCSVToJSON('')).toEqual('');
expect(convertCSVToJSON(csv)).toEqual(expectedJSON);
expect(convertCSVToJSON(csvCustomKeySeparator, '|')).toEqual(expectedJSON);
expect(convertCSVToJSON(csvCustomLineSeparator, undefined, '|')).toEqual(expectedJSON);
expect(convertCSVToJSON(csv)).toEqual(expectedJSON);
expect(convertCSVToJSON(csvCustomKeySeparator, '|')).toEqual(expectedJSON);
expect(convertCSVToJSON(csvCustomLineSeparator, ',', '|')).toEqual(expectedJSON);
expect(convertCSVToJSON(csvCustomKeyLineSeparator, '|', '&')).toEqual(expectedJSON);
});
});
});
| {
"pile_set_name": "Github"
} |
// Copyright (c) Quarrel. All rights reserved.
using DiscordAPI.Models;
using System.ComponentModel;
namespace Quarrel.ViewModels.Models.Interfaces
{
/// <summary>
/// An interface for all bindable user objects.
/// </summary>
public interface IBindableUser : INotifyPropertyChanged
{
/// <summary>
/// Gets the raw <see cref="User"/> type for the user.
/// </summary>
User RawModel { get; }
/// <summary>
/// Gets the presence of the user.
/// </summary>
Presence Presence { get; }
}
}
| {
"pile_set_name": "Github"
} |
// JCL_DEBUG_EXPERT_INSERTJDBG OFF
program DITE;
{$WARN SYMBOL_PLATFORM OFF}
uses
{$IFDEF DEBUG}
{$ENDIF }
DITE.StackTrace in 'Units\DITE.StackTrace.pas',
Generics.Defaults,
Generics.Collections,
Forms,
DITE.Main in 'DITE.Main.pas' {FrmMain},
DITE.DelphiIDEHighlight in 'Units\DITE.DelphiIDEHighlight.pas',
DITE.DelphiVersions in 'Units\DITE.DelphiVersions.pas',
DITE.HSLUtils in 'Units\DITE.HSLUtils.pas',
DITE.HueSat in 'Units\DITE.HueSat.pas' {FrmHueSat},
DITE.Registry in 'Units\DITE.Registry.pas',
DITE.Settings in 'Units\DITE.Settings.pas' {FrmSettings},
DITE.ColorSelector in 'Units\DITE.ColorSelector.pas' {DialogColorSelector},
DITE.VSThemes in 'Units\DITE.VSThemes.pas',
DITE.EclipseThemes in 'Units\DITE.EclipseThemes.pas',
DITE.LazarusVersions in 'Units\DITE.LazarusVersions.pas',
DITE.SupportedIDEs in 'Units\DITE.SupportedIDEs.pas',
DITE.Misc in 'Units\DITE.Misc.pas',
DITE.LazarusIDEHighlight in 'Units\DITE.LazarusIDEHighlight.pas',
Vcl.Themes,
Vcl.Styles,
DITE.VclStylesFix in 'Units\DITE.VclStylesFix.pas',
DITE.LoadThemesImages in 'Units\DITE.LoadThemesImages.pas',
DITE.StdActionsPopMenu in 'Units\DITE.StdActionsPopMenu.pas',
DITE.HelpInsight in 'Units\DITE.HelpInsight.pas',
DITE.ColorPanel in 'Units\DITE.ColorPanel.pas' {ColorPanel},
DITE.SMSIDEHighlight in 'Units\DITE.SMSIDEHighlight.pas',
DITE.SMSVersions in 'Units\DITE.SMSVersions.pas',
DITE.AppMethodVersions in 'Units\DITE.AppMethodVersions.pas',
DITE.AdditionalSettings in 'Units\DITE.AdditionalSettings.pas' {FrmAdditionalSettings};
{$R *.res}
Var
IDEsList: TList<TDelphiVersionData>;
begin
IDEsList := TObjectList<TDelphiVersionData>.Create;
FillListDelphiVersions(IDEsList);
if not IsSMSInstalled and not IsLazarusInstalled and (IDEsList.Count = 0) then
begin
IDEsList.Free;
MsgBox('You don''t have a Object Pascal IDE installed (1)');
Halt(0);
end;
IDEsList.Free;
ReportMemoryLeaksOnShutdown := DebugHook <> 0;
Application.Initialize;
Application.MainFormOnTaskbar := True;
Application.CreateForm(TFrmMain, FrmMain);
if FrmMain.Settings.CheckForUpdates then
CheckForUpdates(True);
Application.Run;
end.
| {
"pile_set_name": "Github"
} |
---
external help file:
online version: https://docs.microsoft.com/powershell/module/sharepoint-pnp/set-pnplistinformationrightsmanagement
applicable: SharePoint Server 2013, SharePoint Server 2016, SharePoint Server 2019, SharePoint Online
schema: 2.0.0
title: Set-PnPListInformationRightsManagement
---
# Set-PnPListInformationRightsManagement
## SYNOPSIS
Get the site closure status of the site which has a site policy applied
## SYNTAX
```powershell
Set-PnPListInformationRightsManagement -List <ListPipeBind>
[-Enable <Boolean>]
[-EnableExpiration <Boolean>]
[-EnableRejection <Boolean>]
[-AllowPrint <Boolean>]
[-AllowScript <Boolean>]
[-AllowWriteCopy <Boolean>]
[-DisableDocumentBrowserView <Boolean>]
[-DocumentAccessExpireDays <Int>]
[-DocumentLibraryProtectionExpireDate <DateTime>]
[-EnableDocumentAccessExpire <Boolean>]
[-EnableDocumentBrowserPublishingView <Boolean>]
[-EnableGroupProtection <Boolean>]
[-EnableLicenseCacheExpire <Boolean>]
[-LicenseCacheExpireDays <Int>]
[-GroupName <String>]
[-PolicyDescription <String>]
[-PolicyTitle <String>]
[-TemplateId <String>]
[-Web <WebPipeBind>]
[-Connection <PnPConnection>]
```
## EXAMPLES
### ------------------EXAMPLE 1------------------
```powershell
Set-PnPListInformationRightsManagement -List "Documents" -Enabled $true
```
Enables Information Rights Management (IRM) on the list.
## PARAMETERS
### -AllowPrint
Sets a value indicating whether the viewer can print the downloaded document.
```yaml
Type: Boolean
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
```
### -AllowScript
Sets a value indicating whether the viewer can run a script on the downloaded document.
```yaml
Type: Boolean
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
```
### -AllowWriteCopy
Sets a value indicating whether the viewer can write on a copy of the downloaded document.
```yaml
Type: Boolean
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
```
### -DisableDocumentBrowserView
Sets a value indicating whether to block Office Web Application Companion applications (WACs) from showing this document.
```yaml
Type: Boolean
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
```
### -DocumentAccessExpireDays
Sets the number of days after which the downloaded document will expire.
```yaml
Type: Int
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
```
### -DocumentLibraryProtectionExpireDate
Sets the date after which the Information Rights Management (IRM) protection of this document library will stop.
```yaml
Type: DateTime
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
```
### -Enable
Specifies whether Information Rights Management (IRM) is enabled for the list.
```yaml
Type: Boolean
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
```
### -EnableDocumentAccessExpire
Sets a value indicating whether the downloaded document will expire.
```yaml
Type: Boolean
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
```
### -EnableDocumentBrowserPublishingView
Sets a value indicating whether to enable Office Web Application Companion applications (WACs) to publishing view.
```yaml
Type: Boolean
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
```
### -EnableExpiration
Specifies whether Information Rights Management (IRM) expiration is enabled for the list.
```yaml
Type: Boolean
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
```
### -EnableGroupProtection
Sets a value indicating whether the permission of the downloaded document is applicable to a group.
```yaml
Type: Boolean
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
```
### -EnableLicenseCacheExpire
Sets whether a user must verify their credentials after some interval.
```yaml
Type: Boolean
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
```
### -EnableRejection
Specifies whether Information Rights Management (IRM) rejection is enabled for the list.
```yaml
Type: Boolean
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
```
### -GroupName
Sets the group name (email address) that the permission is also applicable to.
```yaml
Type: String
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
```
### -LicenseCacheExpireDays
Sets the number of days that the application that opens the document caches the IRM license. When these elapse, the application will connect to the IRM server to validate the license.
```yaml
Type: Int
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
```
### -List
The list to set Information Rights Management (IRM) settings for.
```yaml
Type: ListPipeBind
Parameter Sets: (All)
Required: True
Position: Named
Accept pipeline input: False
```
### -PolicyDescription
Sets the permission policy description.
```yaml
Type: String
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
```
### -PolicyTitle
Sets the permission policy title.
```yaml
Type: String
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
```
### -TemplateId
```yaml
Type: String
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
```
### -Connection
Optional connection to be used by the cmdlet. Retrieve the value for this parameter by either specifying -ReturnConnection on Connect-PnPOnline or by executing Get-PnPConnection.
```yaml
Type: PnPConnection
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
```
### -Web
This parameter allows you to optionally apply the cmdlet action to a subweb within the current web. In most situations this parameter is not required and you can connect to the subweb using Connect-PnPOnline instead. Specify the GUID, server relative url (i.e. /sites/team1) or web instance of the web to apply the command to. Omit this parameter to use the current web.
```yaml
Type: WebPipeBind
Parameter Sets: (All)
Required: False
Position: Named
Accept pipeline input: False
```
## RELATED LINKS
[SharePoint Developer Patterns and Practices](https://aka.ms/sppnp) | {
"pile_set_name": "Github"
} |
// mksyscall.pl -l32 -arm syscall_bsd.go syscall_freebsd.go syscall_freebsd_arm.go
// MACHINE GENERATED BY THE COMMAND ABOVE; DO NOT EDIT
// +build arm,freebsd
package unix
import (
"syscall"
"unsafe"
)
var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setgroups(ngid int, gid *_Gid_t) (err error) {
_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
wpid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socket(domain int, typ int, proto int) (fd int, err error) {
r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Shutdown(s int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
_p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
var _p0 unsafe.Pointer
if len(mib) > 0 {
_p0 = unsafe.Pointer(&mib[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func utimes(path string, timeval *[2]Timeval) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
use(unsafe.Pointer(_p0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func futimes(fd int, timeval *[2]Timeval) (err error) {
_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func fcntl(fd int, cmd int, arg int) (val int, err error) {
r0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe() (r int, w int, err error) {
r0, r1, e1 := RawSyscall(SYS_PIPE, 0, 0, 0)
r = int(r0)
w = int(r1)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
use(unsafe.Pointer(_p0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chdir(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
use(unsafe.Pointer(_p0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chflags(path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
use(unsafe.Pointer(_p0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chmod(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
use(unsafe.Pointer(_p0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chown(path string, uid int, gid int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
use(unsafe.Pointer(_p0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chroot(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
use(unsafe.Pointer(_p0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Close(fd int) (err error) {
_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup(fd int) (nfd int, err error) {
r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
nfd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(from int, to int) (err error) {
_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Exit(code int) {
Syscall(SYS_EXIT, uintptr(code), 0, 0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ExtattrGetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(attrname)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
use(unsafe.Pointer(_p0))
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ExtattrSetFd(fd int, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(attrname)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)), uintptr(data), uintptr(nbytes), 0)
use(unsafe.Pointer(_p0))
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ExtattrDeleteFd(fd int, attrnamespace int, attrname string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(attrname)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FD, uintptr(fd), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p0)))
use(unsafe.Pointer(_p0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ExtattrListFd(fd int, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FD, uintptr(fd), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ExtattrGetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(file)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(attrname)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_EXTATTR_GET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
use(unsafe.Pointer(_p0))
use(unsafe.Pointer(_p1))
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ExtattrSetFile(file string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(file)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(attrname)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_EXTATTR_SET_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
use(unsafe.Pointer(_p0))
use(unsafe.Pointer(_p1))
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ExtattrDeleteFile(file string, attrnamespace int, attrname string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(file)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(attrname)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_EXTATTR_DELETE_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
use(unsafe.Pointer(_p0))
use(unsafe.Pointer(_p1))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ExtattrListFile(file string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(file)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_FILE, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
use(unsafe.Pointer(_p0))
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ExtattrGetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(link)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(attrname)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_EXTATTR_GET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
use(unsafe.Pointer(_p0))
use(unsafe.Pointer(_p1))
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ExtattrSetLink(link string, attrnamespace int, attrname string, data uintptr, nbytes int) (ret int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(link)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(attrname)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_EXTATTR_SET_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)), uintptr(data), uintptr(nbytes), 0)
use(unsafe.Pointer(_p0))
use(unsafe.Pointer(_p1))
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ExtattrDeleteLink(link string, attrnamespace int, attrname string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(link)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(attrname)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_EXTATTR_DELETE_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(unsafe.Pointer(_p1)))
use(unsafe.Pointer(_p0))
use(unsafe.Pointer(_p1))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ExtattrListLink(link string, attrnamespace int, data uintptr, nbytes int) (ret int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(link)
if err != nil {
return
}
r0, _, e1 := Syscall6(SYS_EXTATTR_LIST_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(attrnamespace), uintptr(data), uintptr(nbytes), 0, 0)
use(unsafe.Pointer(_p0))
ret = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fadvise(fd int, offset int64, length int64, advice int) (err error) {
_, _, e1 := Syscall9(SYS_POSIX_FADVISE, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) {
_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchflags(fd int, flags int) (err error) {
_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmod(fd int, mode uint32) (err error) {
_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) {
_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fpathconf(fd int, name int) (val int, err error) {
r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstat(fd int, stat *Stat_t) (err error) {
_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatfs(fd int, stat *Statfs_t) (err error) {
_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fsync(fd int) (err error) {
_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Ftruncate(fd int, length int64) (err error) {
_, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
var _p0 unsafe.Pointer
if len(buf) > 0 {
_p0 = unsafe.Pointer(&buf[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_GETDIRENTRIES, uintptr(fd), uintptr(_p0), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getdtablesize() (size int) {
r0, _, _ := Syscall(SYS_GETDTABLESIZE, 0, 0, 0)
size = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getegid() (egid int) {
r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
egid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Geteuid() (uid int) {
r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
uid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getgid() (gid int) {
r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
gid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgid(pid int) (pgid int, err error) {
r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
pgid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgrp() (pgrp int) {
r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
pgrp = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpid() (pid int) {
r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
pid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getppid() (ppid int) {
r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
ppid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpriority(which int, who int) (prio int, err error) {
r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
prio = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrlimit(which int, lim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrusage(who int, rusage *Rusage) (err error) {
_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getsid(pid int) (sid int, err error) {
r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
sid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Gettimeofday(tv *Timeval) (err error) {
_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getuid() (uid int) {
r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
uid = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Issetugid() (tainted bool) {
r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
tainted = bool(r0 != 0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kill(pid int, signum syscall.Signal) (err error) {
_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kqueue() (fd int, err error) {
r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lchown(path string, uid int, gid int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
use(unsafe.Pointer(_p0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Link(path string, link string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(link)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
use(unsafe.Pointer(_p0))
use(unsafe.Pointer(_p1))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) {
_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lstat(path string, stat *Stat_t) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
use(unsafe.Pointer(_p0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdir(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
use(unsafe.Pointer(_p0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifo(path string, mode uint32) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
use(unsafe.Pointer(_p0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mknod(path string, mode uint32, dev int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
use(unsafe.Pointer(_p0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
var _p0 unsafe.Pointer
if len(b) > 0 {
_p0 = unsafe.Pointer(&b[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Open(path string, mode int, perm uint32) (fd int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
use(unsafe.Pointer(_p0))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pathconf(path string, name int) (val int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
use(unsafe.Pointer(_p0))
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pread(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pwrite(fd int, p []byte, offset int64) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlink(path string, buf []byte) (n int, err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 unsafe.Pointer
if len(buf) > 0 {
_p1 = unsafe.Pointer(&buf[0])
} else {
_p1 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
use(unsafe.Pointer(_p0))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rename(from string, to string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(from)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(to)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
use(unsafe.Pointer(_p0))
use(unsafe.Pointer(_p1))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Revoke(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
use(unsafe.Pointer(_p0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rmdir(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
use(unsafe.Pointer(_p0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
newoffset = int64(int64(r1)<<32 | int64(r0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {
_, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setegid(egid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seteuid(euid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setgid(gid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setlogin(name string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(name)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
use(unsafe.Pointer(_p0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpgid(pid int, pgid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpriority(which int, who int, prio int) (err error) {
_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setregid(rgid int, egid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setreuid(ruid int, euid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setresgid(rgid int, egid int, sgid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setresuid(ruid int, euid int, suid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrlimit(which int, lim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setsid() (pid int, err error) {
r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
pid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Settimeofday(tp *Timeval) (err error) {
_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setuid(uid int) (err error) {
_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Stat(path string, stat *Stat_t) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
use(unsafe.Pointer(_p0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Statfs(path string, stat *Statfs_t) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
use(unsafe.Pointer(_p0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlink(path string, link string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
var _p1 *byte
_p1, err = BytePtrFromString(link)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
use(unsafe.Pointer(_p0))
use(unsafe.Pointer(_p1))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() (err error) {
_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Truncate(path string, length int64) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
use(unsafe.Pointer(_p0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Umask(newmask int) (oldmask int) {
r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
oldmask = int(r0)
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Undelete(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UNDELETE, uintptr(unsafe.Pointer(_p0)), 0, 0)
use(unsafe.Pointer(_p0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlink(path string) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
use(unsafe.Pointer(_p0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unmount(path string, flags int) (err error) {
var _p0 *byte
_p0, err = BytePtrFromString(path)
if err != nil {
return
}
_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
use(unsafe.Pointer(_p0))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, p []byte) (n int, err error) {
var _p0 unsafe.Pointer
if len(p) > 0 {
_p0 = unsafe.Pointer(&p[0])
} else {
_p0 = unsafe.Pointer(&_zero)
}
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
ret = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func munmap(addr uintptr, length uintptr) (err error) {
_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept4(fd int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (nfd int, err error) {
r0, _, e1 := Syscall6(SYS_ACCEPT4, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)), uintptr(flags), 0, 0)
nfd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
| {
"pile_set_name": "Github"
} |
/*
* Licensed to Crate under one or more contributor license agreements.
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership. Crate licenses this file
* to you under the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License. You may
* obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
* However, if you have executed another commercial license agreement
* with Crate these terms will supersede the license and you may use the
* software solely pursuant to the terms of the relevant commercial
* agreement.
*/
package io.crate.metadata;
import java.io.IOException;
import java.util.Objects;
import javax.annotation.Nullable;
import com.google.common.collect.ComparisonChain;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.io.stream.Writeable;
public final class FunctionName implements Comparable<FunctionName>, Writeable {
@Nullable
private final String schema;
private final String name;
public FunctionName(@Nullable String schema, String name) {
this.schema = schema;
this.name = name;
}
public FunctionName(String name) {
this(null, name);
}
public FunctionName(StreamInput in) throws IOException {
schema = in.readOptionalString();
name = in.readString();
}
@Nullable
public String schema() {
return schema;
}
public String name() {
return name;
}
@Override
public int compareTo(FunctionName o) {
return ComparisonChain.start()
.compare(schema, o.schema)
.compare(name, o.name)
.result();
}
@Override
public void writeTo(StreamOutput out) throws IOException {
out.writeOptionalString(schema);
out.writeString(name);
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
FunctionName that = (FunctionName) o;
return Objects.equals(schema, that.schema) &&
Objects.equals(name, that.name);
}
@Override
public int hashCode() {
return Objects.hash(schema, name);
}
@Override
public String toString() {
return "FunctionName{" +
"schema='" + schema + '\'' +
", name='" + name + '\'' +
'}';
}
public String displayName() {
if (schema == null) {
return name;
}
return schema + "." + name;
}
}
| {
"pile_set_name": "Github"
} |
# Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish, dis-
# tribute, sublicense, and/or sell copies of the Software, and to permit
# persons to whom the Software is furnished to do so, subject to the fol-
# lowing conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
# SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
# IN THE SOFTWARE.
#
from boto.compat import json
from boto.exception import JSONResponseError
from boto.connection import AWSAuthConnection
from boto.regioninfo import RegionInfo
from boto.cognito.sync import exceptions
class CognitoSyncConnection(AWSAuthConnection):
"""
Amazon Cognito Sync
Amazon Cognito Sync provides an AWS service and client library
that enable cross-device syncing of application-related user data.
High-level client libraries are available for both iOS and
Android. You can use these libraries to persist data locally so
that it's available even if the device is offline. Developer
credentials don't need to be stored on the mobile device to access
the service. You can use Amazon Cognito to obtain a normalized
user ID and credentials. User data is persisted in a dataset that
can store up to 1 MB of key-value pairs, and you can have up to 20
datasets per user identity.
With Amazon Cognito Sync, the data stored for each identity is
accessible only to credentials assigned to that identity. In order
to use the Cognito Sync service, you need to make API calls using
credentials retrieved with `Amazon Cognito Identity service`_.
"""
APIVersion = "2014-06-30"
DefaultRegionName = "us-east-1"
DefaultRegionEndpoint = "cognito-sync.us-east-1.amazonaws.com"
ResponseError = JSONResponseError
_faults = {
"LimitExceededException": exceptions.LimitExceededException,
"ResourceConflictException": exceptions.ResourceConflictException,
"InvalidConfigurationException": exceptions.InvalidConfigurationException,
"TooManyRequestsException": exceptions.TooManyRequestsException,
"InvalidParameterException": exceptions.InvalidParameterException,
"ResourceNotFoundException": exceptions.ResourceNotFoundException,
"InternalErrorException": exceptions.InternalErrorException,
"NotAuthorizedException": exceptions.NotAuthorizedException,
}
def __init__(self, **kwargs):
region = kwargs.get('region')
if not region:
region = RegionInfo(self, self.DefaultRegionName,
self.DefaultRegionEndpoint)
else:
del kwargs['region']
kwargs['host'] = region.endpoint
super(CognitoSyncConnection, self).__init__(**kwargs)
self.region = region
def _required_auth_capability(self):
return ['hmac-v4']
def delete_dataset(self, identity_pool_id, identity_id, dataset_name):
"""
Deletes the specific dataset. The dataset will be deleted
permanently, and the action can't be undone. Datasets that
this dataset was merged with will no longer report the merge.
Any consequent operation on this dataset will result in a
ResourceNotFoundException.
:type identity_pool_id: string
:param identity_pool_id: A name-spaced GUID (for example, us-
east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
Cognito. GUID generation is unique within a region.
:type identity_id: string
:param identity_id: A name-spaced GUID (for example, us-
east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
Cognito. GUID generation is unique within a region.
:type dataset_name: string
:param dataset_name: A string of up to 128 characters. Allowed
characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.'
(dot).
"""
uri = '/identitypools/{0}/identities/{1}/datasets/{2}'.format(
identity_pool_id, identity_id, dataset_name)
return self.make_request('DELETE', uri, expected_status=200)
def describe_dataset(self, identity_pool_id, identity_id, dataset_name):
"""
Gets metadata about a dataset by identity and dataset name.
The credentials used to make this API call need to have access
to the identity data. With Amazon Cognito Sync, each identity
has access only to its own data. You should use Amazon Cognito
Identity service to retrieve the credentials necessary to make
this API call.
:type identity_pool_id: string
:param identity_pool_id: A name-spaced GUID (for example, us-
east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
Cognito. GUID generation is unique within a region.
:type identity_id: string
:param identity_id: A name-spaced GUID (for example, us-
east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
Cognito. GUID generation is unique within a region.
:type dataset_name: string
:param dataset_name: A string of up to 128 characters. Allowed
characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.'
(dot).
"""
uri = '/identitypools/{0}/identities/{1}/datasets/{2}'.format(
identity_pool_id, identity_id, dataset_name)
return self.make_request('GET', uri, expected_status=200)
def describe_identity_pool_usage(self, identity_pool_id):
"""
Gets usage details (for example, data storage) about a
particular identity pool.
:type identity_pool_id: string
:param identity_pool_id: A name-spaced GUID (for example, us-
east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
Cognito. GUID generation is unique within a region.
"""
uri = '/identitypools/{0}'.format(identity_pool_id)
return self.make_request('GET', uri, expected_status=200)
def describe_identity_usage(self, identity_pool_id, identity_id):
"""
Gets usage information for an identity, including number of
datasets and data usage.
:type identity_pool_id: string
:param identity_pool_id: A name-spaced GUID (for example, us-
east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
Cognito. GUID generation is unique within a region.
:type identity_id: string
:param identity_id: A name-spaced GUID (for example, us-
east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
Cognito. GUID generation is unique within a region.
"""
uri = '/identitypools/{0}/identities/{1}'.format(
identity_pool_id, identity_id)
return self.make_request('GET', uri, expected_status=200)
def get_identity_pool_configuration(self, identity_pool_id):
"""
Gets the configuration settings of an identity pool.
:type identity_pool_id: string
:param identity_pool_id: A name-spaced GUID (for example, us-
east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
Cognito. This is the ID of the pool for which to return a
configuration.
"""
uri = '/identitypools/{0}/configuration'.format(identity_pool_id)
return self.make_request('GET', uri, expected_status=200)
def list_datasets(self, identity_pool_id, identity_id, next_token=None,
max_results=None):
"""
Lists datasets for an identity. The credentials used to make
this API call need to have access to the identity data. With
Amazon Cognito Sync, each identity has access only to its own
data. You should use Amazon Cognito Identity service to
retrieve the credentials necessary to make this API call.
:type identity_pool_id: string
:param identity_pool_id: A name-spaced GUID (for example, us-
east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
Cognito. GUID generation is unique within a region.
:type identity_id: string
:param identity_id: A name-spaced GUID (for example, us-
east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
Cognito. GUID generation is unique within a region.
:type next_token: string
:param next_token: A pagination token for obtaining the next page of
results.
:type max_results: integer
:param max_results: The maximum number of results to be returned.
"""
uri = '/identitypools/{0}/identities/{1}/datasets'.format(
identity_pool_id, identity_id)
params = {}
headers = {}
query_params = {}
if next_token is not None:
query_params['nextToken'] = next_token
if max_results is not None:
query_params['maxResults'] = max_results
return self.make_request('GET', uri, expected_status=200,
data=json.dumps(params), headers=headers,
params=query_params)
def list_identity_pool_usage(self, next_token=None, max_results=None):
"""
Gets a list of identity pools registered with Cognito.
:type next_token: string
:param next_token: A pagination token for obtaining the next page of
results.
:type max_results: integer
:param max_results: The maximum number of results to be returned.
"""
uri = '/identitypools'
params = {}
headers = {}
query_params = {}
if next_token is not None:
query_params['nextToken'] = next_token
if max_results is not None:
query_params['maxResults'] = max_results
return self.make_request('GET', uri, expected_status=200,
data=json.dumps(params), headers=headers,
params=query_params)
def list_records(self, identity_pool_id, identity_id, dataset_name,
last_sync_count=None, next_token=None, max_results=None,
sync_session_token=None):
"""
Gets paginated records, optionally changed after a particular
sync count for a dataset and identity. The credentials used to
make this API call need to have access to the identity data.
With Amazon Cognito Sync, each identity has access only to its
own data. You should use Amazon Cognito Identity service to
retrieve the credentials necessary to make this API call.
:type identity_pool_id: string
:param identity_pool_id: A name-spaced GUID (for example, us-
east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
Cognito. GUID generation is unique within a region.
:type identity_id: string
:param identity_id: A name-spaced GUID (for example, us-
east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
Cognito. GUID generation is unique within a region.
:type dataset_name: string
:param dataset_name: A string of up to 128 characters. Allowed
characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.'
(dot).
:type last_sync_count: long
:param last_sync_count: The last server sync count for this record.
:type next_token: string
:param next_token: A pagination token for obtaining the next page of
results.
:type max_results: integer
:param max_results: The maximum number of results to be returned.
:type sync_session_token: string
:param sync_session_token: A token containing a session ID, identity
ID, and expiration.
"""
uri = '/identitypools/{0}/identities/{1}/datasets/{2}/records'.format(
identity_pool_id, identity_id, dataset_name)
params = {}
headers = {}
query_params = {}
if last_sync_count is not None:
query_params['lastSyncCount'] = last_sync_count
if next_token is not None:
query_params['nextToken'] = next_token
if max_results is not None:
query_params['maxResults'] = max_results
if sync_session_token is not None:
query_params['syncSessionToken'] = sync_session_token
return self.make_request('GET', uri, expected_status=200,
data=json.dumps(params), headers=headers,
params=query_params)
def register_device(self, identity_pool_id, identity_id, platform, token):
"""
Registers a device to receive push sync notifications.
:type identity_pool_id: string
:param identity_pool_id: A name-spaced GUID (for example, us-
east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
Cognito. Here, the ID of the pool that the identity belongs to.
:type identity_id: string
:param identity_id: The unique ID for this identity.
:type platform: string
:param platform: The SNS platform type (e.g. GCM, SDM, APNS,
APNS_SANDBOX).
:type token: string
:param token: The push token.
"""
uri = '/identitypools/{0}/identity/{1}/device'.format(
identity_pool_id, identity_id)
params = {'Platform': platform, 'Token': token, }
headers = {}
query_params = {}
return self.make_request('POST', uri, expected_status=200,
data=json.dumps(params), headers=headers,
params=query_params)
def set_identity_pool_configuration(self, identity_pool_id,
push_sync=None):
"""
Sets the necessary configuration for push sync.
:type identity_pool_id: string
:param identity_pool_id: A name-spaced GUID (for example, us-
east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
Cognito. This is the ID of the pool to modify.
:type push_sync: dict
:param push_sync: Configuration options to be applied to the identity
pool.
"""
uri = '/identitypools/{0}/configuration'.format(identity_pool_id)
params = {}
headers = {}
query_params = {}
if push_sync is not None:
params['PushSync'] = push_sync
return self.make_request('POST', uri, expected_status=200,
data=json.dumps(params), headers=headers,
params=query_params)
def subscribe_to_dataset(self, identity_pool_id, identity_id,
dataset_name, device_id):
"""
Subscribes to receive notifications when a dataset is modified
by another device.
:type identity_pool_id: string
:param identity_pool_id: A name-spaced GUID (for example, us-
east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
Cognito. The ID of the pool to which the identity belongs.
:type identity_id: string
:param identity_id: Unique ID for this identity.
:type dataset_name: string
:param dataset_name: The name of the dataset to subcribe to.
:type device_id: string
:param device_id: The unique ID generated for this device by Cognito.
"""
uri = '/identitypools/{0}/identities/{1}/datasets/{2}/subscriptions/{3}'.format(
identity_pool_id, identity_id, dataset_name, device_id)
return self.make_request('POST', uri, expected_status=200)
def unsubscribe_from_dataset(self, identity_pool_id, identity_id,
dataset_name, device_id):
"""
Unsubscribe from receiving notifications when a dataset is
modified by another device.
:type identity_pool_id: string
:param identity_pool_id: A name-spaced GUID (for example, us-
east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
Cognito. The ID of the pool to which this identity belongs.
:type identity_id: string
:param identity_id: Unique ID for this identity.
:type dataset_name: string
:param dataset_name: The name of the dataset from which to unsubcribe.
:type device_id: string
:param device_id: The unique ID generated for this device by Cognito.
"""
uri = '/identitypools/{0}/identities/{1}/datasets/{2}/subscriptions/{3}'.format(
identity_pool_id, identity_id, dataset_name, device_id)
return self.make_request('DELETE', uri, expected_status=200)
def update_records(self, identity_pool_id, identity_id, dataset_name,
sync_session_token, device_id=None,
record_patches=None, client_context=None):
"""
Posts updates to records and add and delete records for a
dataset and user. The credentials used to make this API call
need to have access to the identity data. With Amazon Cognito
Sync, each identity has access only to its own data. You
should use Amazon Cognito Identity service to retrieve the
credentials necessary to make this API call.
:type identity_pool_id: string
:param identity_pool_id: A name-spaced GUID (for example, us-
east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
Cognito. GUID generation is unique within a region.
:type identity_id: string
:param identity_id: A name-spaced GUID (for example, us-
east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) created by Amazon
Cognito. GUID generation is unique within a region.
:type dataset_name: string
:param dataset_name: A string of up to 128 characters. Allowed
characters are a-z, A-Z, 0-9, '_' (underscore), '-' (dash), and '.'
(dot).
:type device_id: string
:param device_id: The unique ID generated for this device by Cognito.
:type record_patches: list
:param record_patches: A list of patch operations.
:type sync_session_token: string
:param sync_session_token: The SyncSessionToken returned by a previous
call to ListRecords for this dataset and identity.
:type client_context: string
:param client_context: Intended to supply a device ID that will
populate the `lastModifiedBy` field referenced in other methods.
The `ClientContext` field is not yet implemented.
"""
uri = '/identitypools/{0}/identities/{1}/datasets/{2}'.format(
identity_pool_id, identity_id, dataset_name)
params = {'SyncSessionToken': sync_session_token, }
headers = {}
query_params = {}
if device_id is not None:
params['DeviceId'] = device_id
if record_patches is not None:
params['RecordPatches'] = record_patches
if client_context is not None:
headers['x-amz-Client-Context'] = client_context
if client_context is not None:
headers['x-amz-Client-Context'] = client_context
return self.make_request('POST', uri, expected_status=200,
data=json.dumps(params), headers=headers,
params=query_params)
def make_request(self, verb, resource, headers=None, data='',
expected_status=None, params=None):
if headers is None:
headers = {}
response = AWSAuthConnection.make_request(
self, verb, resource, headers=headers, data=data, params=params)
body = json.loads(response.read().decode('utf-8'))
if response.status == expected_status:
return body
else:
error_type = response.getheader('x-amzn-ErrorType').split(':')[0]
error_class = self._faults.get(error_type, self.ResponseError)
raise error_class(response.status, response.reason, body)
| {
"pile_set_name": "Github"
} |
# -*- coding:utf-8 -*-
# repoman: Utilities
# Copyright 2007-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
"""This module contains utility functions to help repoman find ebuilds to
scan"""
__all__ = [
"editor_is_executable",
"FindPackagesToScan",
"FindPortdir",
"get_commit_message_with_editor",
"get_committer_name",
"have_ebuild_dir",
"have_profile_dir",
"UpdateChangeLog"
]
import errno
import io
from itertools import chain
import logging
import pwd
import stat
import sys
import time
import textwrap
import difflib
import tempfile
# import our initialized portage instance
from repoman._portage import portage
from portage import os
from portage import shutil
from portage import _encodings
from portage import _unicode_decode
from portage import _unicode_encode
from portage import util
from portage.localization import _
from portage.process import find_binary
from portage.output import green
from repoman.copyrights import update_copyright, update_copyright_year
normalize_path = util.normalize_path
util.initialize_logger()
def have_profile_dir(path, maxdepth=3, filename="profiles.desc"):
"""
Try to figure out if 'path' has a profiles/
dir in it by checking for the given filename.
"""
while path != "/" and maxdepth:
if os.path.exists(os.path.join(path, "profiles", filename)):
return normalize_path(path)
path = normalize_path(path + "/..")
maxdepth -= 1
def have_ebuild_dir(path, maxdepth=3):
"""
Try to figure out if 'path' or a subdirectory contains one or more
ebuild files named appropriately for their parent directory.
"""
stack = [(normalize_path(path), 1)]
while stack:
path, depth = stack.pop()
basename = os.path.basename(path)
try:
listdir = os.listdir(path)
except OSError:
continue
for filename in listdir:
abs_filename = os.path.join(path, filename)
try:
st = os.stat(abs_filename)
except OSError:
continue
if stat.S_ISDIR(st.st_mode):
if depth < maxdepth:
stack.append((abs_filename, depth + 1))
elif stat.S_ISREG(st.st_mode):
if filename.endswith(".ebuild") and \
filename.startswith(basename + "-"):
return os.path.dirname(os.path.dirname(path))
def FindPackagesToScan(settings, startdir, reposplit):
""" Try to find packages that need to be scanned
Args:
settings - portage.config instance, preferably repoman_settings
startdir - directory that repoman was run in
reposplit - root of the repository
Returns:
A list of directories to scan
"""
def AddPackagesInDir(path):
""" Given a list of dirs, add any packages in it """
ret = []
pkgdirs = os.listdir(path)
for d in pkgdirs:
if d == 'CVS' or d.startswith('.'):
continue
p = os.path.join(path, d)
if os.path.isdir(p):
cat_pkg_dir = os.path.join(*p.split(os.path.sep)[-2:])
logging.debug('adding %s to scanlist' % cat_pkg_dir)
ret.append(cat_pkg_dir)
return ret
scanlist = []
repolevel = len(reposplit)
if repolevel == 1: # root of the tree, startdir = repodir
for cat in settings.categories:
path = os.path.join(startdir, cat)
if not os.path.isdir(path):
continue
scanlist.extend(AddPackagesInDir(path))
elif repolevel == 2: # category level, startdir = catdir
# We only want 1 segment of the directory,
# this is why we use catdir instead of startdir.
catdir = reposplit[-2]
if catdir not in settings.categories:
logging.warn(
'%s is not a valid category according to profiles/categories, '
'skipping checks in %s' % (catdir, catdir))
else:
scanlist = AddPackagesInDir(catdir)
elif repolevel == 3: # pkgdir level, startdir = pkgdir
catdir = reposplit[-2]
pkgdir = reposplit[-1]
if catdir not in settings.categories:
logging.warn(
'%s is not a valid category according to profiles/categories, '
'skipping checks in %s' % (catdir, catdir))
else:
path = os.path.join(catdir, pkgdir)
logging.debug('adding %s to scanlist' % path)
scanlist.append(path)
return scanlist
def editor_is_executable(editor):
"""
Given an EDITOR string, validate that it refers to
an executable. This uses shlex_split() to split the
first component and do a PATH lookup if necessary.
@param editor: An EDITOR value from the environment.
@type: string
@rtype: bool
@return: True if an executable is found, False otherwise.
"""
editor_split = util.shlex_split(editor)
if not editor_split:
return False
filename = editor_split[0]
if not os.path.isabs(filename):
return find_binary(filename) is not None
return os.access(filename, os.X_OK) and os.path.isfile(filename)
def get_commit_message_with_editor(editor, message=None, prefix=""):
"""
Execute editor with a temporary file as it's argument
and return the file content afterwards.
@param editor: An EDITOR value from the environment
@type: string
@param message: An iterable of lines to show in the editor.
@type: iterable
@param prefix: Suggested prefix for the commit message summary line.
@type: string
@rtype: string or None
@return: A string on success or None if an error occurs.
"""
commitmessagedir = tempfile.mkdtemp(".repoman.msg")
filename = os.path.join(commitmessagedir, "COMMIT_EDITMSG")
try:
with open(filename, "wb") as mymsg:
mymsg.write(
_unicode_encode(_(
prefix +
"\n\n# Please enter the commit message "
"for your changes.\n# (Comment lines starting "
"with '#' will not be included)\n"),
encoding=_encodings['content'], errors='backslashreplace'))
if message:
mymsg.write(b"#\n")
for line in message:
mymsg.write(
_unicode_encode(
"#" + line, encoding=_encodings['content'],
errors='backslashreplace'))
retval = os.system(editor + " '%s'" % filename)
if not (os.WIFEXITED(retval) and os.WEXITSTATUS(retval) == os.EX_OK):
return None
try:
with io.open(_unicode_encode(
filename, encoding=_encodings['fs'], errors='strict'),
mode='r', encoding=_encodings['content'], errors='replace') as f:
mylines = f.readlines()
except OSError as e:
if e.errno != errno.ENOENT:
raise
del e
return None
return "".join(line for line in mylines if not line.startswith("#"))
finally:
try:
shutil.rmtree(commitmessagedir)
except OSError:
pass
def FindPortdir(settings):
""" Try to figure out what repo we are in and whether we are in a regular
tree or an overlay.
Basic logic is:
1. Determine what directory we are in (supports symlinks).
2. Build a list of directories from / to our current location
3. Iterate over PORTDIR_OVERLAY, if we find a match,
search for a profiles directory in the overlay. If it has one,
make it portdir, otherwise make it portdir_overlay.
4. If we didn't find an overlay in PORTDIR_OVERLAY,
see if we are in PORTDIR; if so, set portdir_overlay to PORTDIR.
If we aren't in PORTDIR, see if PWD has a profiles dir, if so,
set portdir_overlay and portdir to PWD, else make them False.
5. If we haven't found portdir_overlay yet,
it means the user is doing something odd, report an error.
6. If we haven't found a portdir yet, set portdir to PORTDIR.
Args:
settings - portage.config instance, preferably repoman_settings
Returns:
list(portdir, portdir_overlay, location)
"""
portdir = None
portdir_overlay = None
location = os.getcwd()
pwd = _unicode_decode(os.environ.get('PWD', ''), encoding=_encodings['fs'])
if pwd and pwd != location and os.path.realpath(pwd) == location:
# getcwd() returns the canonical path but that makes it hard for repoman to
# orient itself if the user has symlinks in their repository structure.
# We use os.environ["PWD"], if available, to get the non-canonical path of
# the current working directory (from the shell).
location = pwd
location = normalize_path(location)
path_ids = {}
p = location
s = None
while True:
s = os.stat(p)
path_ids[(s.st_dev, s.st_ino)] = p
if p == "/":
break
p = os.path.dirname(p)
if location[-1] != "/":
location += "/"
for overlay in portage.util.shlex_split(settings["PORTDIR_OVERLAY"]):
overlay = os.path.realpath(overlay)
try:
s = os.stat(overlay)
except OSError:
continue
overlay = path_ids.get((s.st_dev, s.st_ino))
if overlay is None:
continue
if overlay[-1] != "/":
overlay += "/"
if True:
portdir_overlay = overlay
subdir = location[len(overlay):]
if subdir and subdir[-1] != "/":
subdir += "/"
if have_profile_dir(location, subdir.count("/")):
portdir = portdir_overlay
break
# Couldn't match location with anything from PORTDIR_OVERLAY,
# so fall back to have_profile_dir() checks alone. Assume that
# an overlay will contain at least a "repo_name" file while a
# master repo (portdir) will contain at least a "profiles.desc"
# file.
if not portdir_overlay:
portdir_overlay = have_profile_dir(location, filename="repo_name")
if not portdir_overlay:
portdir_overlay = have_ebuild_dir(location)
if portdir_overlay:
subdir = location[len(portdir_overlay):]
if subdir and subdir[-1] != os.sep:
subdir += os.sep
if have_profile_dir(location, subdir.count(os.sep)):
portdir = portdir_overlay
if not portdir_overlay:
if (settings["PORTDIR"] + os.path.sep).startswith(location):
portdir_overlay = settings["PORTDIR"]
else:
portdir_overlay = have_profile_dir(location)
portdir = portdir_overlay
if not portdir_overlay:
msg = 'Repoman is unable to determine PORTDIR or PORTDIR_OVERLAY' + \
' from the current working directory'
logging.critical(msg)
return (None, None, None)
if not portdir:
portdir = settings["PORTDIR"]
if not portdir_overlay.endswith('/'):
portdir_overlay += '/'
if not portdir.endswith('/'):
portdir += '/'
return [normalize_path(x) for x in (portdir, portdir_overlay, location)]
def get_committer_name(env=None):
"""Generate a committer string like echangelog does."""
if env is None:
env = os.environ
if 'GENTOO_COMMITTER_NAME' in env and 'GENTOO_COMMITTER_EMAIL' in env:
user = '%s <%s>' % (
env['GENTOO_COMMITTER_NAME'],
env['GENTOO_COMMITTER_EMAIL'])
elif 'GENTOO_AUTHOR_NAME' in env and 'GENTOO_AUTHOR_EMAIL' in env:
user = '%s <%s>' % (
env['GENTOO_AUTHOR_NAME'],
env['GENTOO_AUTHOR_EMAIL'])
elif 'ECHANGELOG_USER' in env:
user = env['ECHANGELOG_USER']
else:
pwd_struct = pwd.getpwuid(os.getuid())
gecos = pwd_struct.pw_gecos.split(',')[0] # bug #80011
user = '%s <%[email protected]>' % (gecos, pwd_struct.pw_name)
return user
def UpdateChangeLog(
pkgdir, user, msg, skel_path, category, package,
new=(), removed=(), changed=(), pretend=False, quiet=False):
"""
Write an entry to an existing ChangeLog, or create a new one.
Updates copyright year on changed files, and updates the header of
ChangeLog with the contents of skel.ChangeLog.
"""
if '<root@' in user:
if not quiet:
logging.critical('Please set ECHANGELOG_USER or run as non-root')
return None
# ChangeLog times are in UTC
gmtime = time.gmtime()
year = time.strftime('%Y', gmtime)
date = time.strftime('%d %b %Y', gmtime)
cl_path = os.path.join(pkgdir, 'ChangeLog')
clold_lines = []
clnew_lines = []
old_header_lines = []
header_lines = []
clold_file = None
try:
clold_file = io.open(_unicode_encode(
cl_path, encoding=_encodings['fs'], errors='strict'),
mode='r', encoding=_encodings['repo.content'], errors='replace')
except EnvironmentError:
pass
f, clnew_path = tempfile.mkstemp()
# construct correct header first
try:
if clold_file is not None:
# retain header from old ChangeLog
first_line = True
for line in clold_file:
line_strip = line.strip()
if line_strip and line[:1] != "#":
clold_lines.append(line)
break
# always make sure cat/pkg is up-to-date in case we are
# moving packages around, or copied from another pkg, or ...
if first_line:
if line.startswith('# ChangeLog for'):
line = '# ChangeLog for %s/%s\n' % (category, package)
first_line = False
old_header_lines.append(line)
header_lines.append(update_copyright_year(year, line))
if not line_strip:
break
clskel_file = None
if not header_lines:
# delay opening this until we find we need a header
try:
clskel_file = io.open(_unicode_encode(
skel_path, encoding=_encodings['fs'], errors='strict'),
mode='r', encoding=_encodings['repo.content'],
errors='replace')
except EnvironmentError:
pass
if clskel_file is not None:
# read skel.ChangeLog up to first empty line
for line in clskel_file:
line_strip = line.strip()
if not line_strip:
break
line = line.replace('<CATEGORY>', category)
line = line.replace('<PACKAGE_NAME>', package)
line = update_copyright_year(year, line)
header_lines.append(line)
header_lines.append('\n')
clskel_file.close()
# write new ChangeLog entry
clnew_lines.extend(header_lines)
newebuild = False
for fn in new:
if not fn.endswith('.ebuild'):
continue
ebuild = fn.split(os.sep)[-1][0:-7]
clnew_lines.append('*%s (%s)\n' % (ebuild, date))
newebuild = True
if newebuild:
clnew_lines.append('\n')
trivial_files = ('ChangeLog', 'Manifest')
display_new = [
'+' + elem
for elem in new
if elem not in trivial_files]
display_removed = [
'-' + elem
for elem in removed]
display_changed = [
elem for elem in changed
if elem not in trivial_files]
if not (display_new or display_removed or display_changed):
# If there's nothing else to display, show one of the
# trivial files.
for fn in trivial_files:
if fn in new:
display_new = ['+' + fn]
break
elif fn in changed:
display_changed = [fn]
break
display_new.sort()
display_removed.sort()
display_changed.sort()
mesg = '%s; %s %s:' % (date, user, ', '.join(chain(
display_new, display_removed, display_changed)))
for line in textwrap.wrap(
mesg, 80, initial_indent=' ', subsequent_indent=' ',
break_on_hyphens=False):
clnew_lines.append('%s\n' % line)
for line in textwrap.wrap(
msg, 80, initial_indent=' ', subsequent_indent=' '):
clnew_lines.append('%s\n' % line)
# Don't append a trailing newline if the file is new.
if clold_file is not None:
clnew_lines.append('\n')
f = io.open(
f, mode='w', encoding=_encodings['repo.content'],
errors='backslashreplace')
for line in clnew_lines:
f.write(line)
# append stuff from old ChangeLog
if clold_file is not None:
if clold_lines:
# clold_lines may contain a saved non-header line
# that we want to write first.
# Also, append this line to clnew_lines so that the
# unified_diff call doesn't show it as removed.
for line in clold_lines:
f.write(line)
clnew_lines.append(line)
else:
# ensure that there is no more than one blank
# line after our new entry
for line in clold_file:
if line.strip():
f.write(line)
break
# Now prepend old_header_lines to clold_lines, for use
# in the unified_diff call below.
clold_lines = old_header_lines + clold_lines
# Trim any trailing newlines.
lines = clold_file.readlines()
clold_file.close()
while lines and lines[-1] == '\n':
del lines[-1]
f.writelines(lines)
f.close()
# show diff
if not quiet:
for line in difflib.unified_diff(
clold_lines, clnew_lines,
fromfile=cl_path, tofile=cl_path, n=0):
util.writemsg_stdout(line, noiselevel=-1)
util.writemsg_stdout("\n", noiselevel=-1)
if pretend:
# remove what we've done
os.remove(clnew_path)
else:
# rename to ChangeLog, and set permissions
try:
clold_stat = os.stat(cl_path)
except OSError:
clold_stat = None
shutil.move(clnew_path, cl_path)
if clold_stat is None:
util.apply_permissions(cl_path, mode=0o644)
else:
util.apply_stat_permissions(cl_path, clold_stat)
if clold_file is None:
return True
else:
return False
except IOError as e:
err = 'Repoman is unable to create/write to Changelog.new file: %s' % (e,)
logging.critical(err)
# try to remove if possible
try:
os.remove(clnew_path)
except OSError:
pass
return None
def repoman_sez(msg):
print (green("RepoMan sez:"), msg)
| {
"pile_set_name": "Github"
} |
MatrixXcf A = MatrixXcf::Random(4,4);
ComplexSchur<MatrixXcf> schur(4);
schur.compute(A);
cout << "The matrix T in the decomposition of A is:" << endl << schur.matrixT() << endl;
schur.compute(A.inverse());
cout << "The matrix T in the decomposition of A^(-1) is:" << endl << schur.matrixT() << endl;
| {
"pile_set_name": "Github"
} |
/*
Copyright The Kubernetes Authors.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
// Code generated by client-gen. DO NOT EDIT.
package v1beta1
import (
"context"
"time"
v1beta1 "k8s.io/api/extensions/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
types "k8s.io/apimachinery/pkg/types"
watch "k8s.io/apimachinery/pkg/watch"
scheme "k8s.io/client-go/kubernetes/scheme"
rest "k8s.io/client-go/rest"
)
// NetworkPoliciesGetter has a method to return a NetworkPolicyInterface.
// A group's client should implement this interface.
type NetworkPoliciesGetter interface {
NetworkPolicies(namespace string) NetworkPolicyInterface
}
// NetworkPolicyInterface has methods to work with NetworkPolicy resources.
type NetworkPolicyInterface interface {
Create(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.CreateOptions) (*v1beta1.NetworkPolicy, error)
Update(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (*v1beta1.NetworkPolicy, error)
Delete(ctx context.Context, name string, opts v1.DeleteOptions) error
DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error
Get(ctx context.Context, name string, opts v1.GetOptions) (*v1beta1.NetworkPolicy, error)
List(ctx context.Context, opts v1.ListOptions) (*v1beta1.NetworkPolicyList, error)
Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error)
Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.NetworkPolicy, err error)
NetworkPolicyExpansion
}
// networkPolicies implements NetworkPolicyInterface
type networkPolicies struct {
client rest.Interface
ns string
}
// newNetworkPolicies returns a NetworkPolicies
func newNetworkPolicies(c *ExtensionsV1beta1Client, namespace string) *networkPolicies {
return &networkPolicies{
client: c.RESTClient(),
ns: namespace,
}
}
// Get takes name of the networkPolicy, and returns the corresponding networkPolicy object, and an error if there is any.
func (c *networkPolicies) Get(ctx context.Context, name string, options v1.GetOptions) (result *v1beta1.NetworkPolicy, err error) {
result = &v1beta1.NetworkPolicy{}
err = c.client.Get().
Namespace(c.ns).
Resource("networkpolicies").
Name(name).
VersionedParams(&options, scheme.ParameterCodec).
Do(ctx).
Into(result)
return
}
// List takes label and field selectors, and returns the list of NetworkPolicies that match those selectors.
func (c *networkPolicies) List(ctx context.Context, opts v1.ListOptions) (result *v1beta1.NetworkPolicyList, err error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
result = &v1beta1.NetworkPolicyList{}
err = c.client.Get().
Namespace(c.ns).
Resource("networkpolicies").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Do(ctx).
Into(result)
return
}
// Watch returns a watch.Interface that watches the requested networkPolicies.
func (c *networkPolicies) Watch(ctx context.Context, opts v1.ListOptions) (watch.Interface, error) {
var timeout time.Duration
if opts.TimeoutSeconds != nil {
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
}
opts.Watch = true
return c.client.Get().
Namespace(c.ns).
Resource("networkpolicies").
VersionedParams(&opts, scheme.ParameterCodec).
Timeout(timeout).
Watch(ctx)
}
// Create takes the representation of a networkPolicy and creates it. Returns the server's representation of the networkPolicy, and an error, if there is any.
func (c *networkPolicies) Create(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.CreateOptions) (result *v1beta1.NetworkPolicy, err error) {
result = &v1beta1.NetworkPolicy{}
err = c.client.Post().
Namespace(c.ns).
Resource("networkpolicies").
VersionedParams(&opts, scheme.ParameterCodec).
Body(networkPolicy).
Do(ctx).
Into(result)
return
}
// Update takes the representation of a networkPolicy and updates it. Returns the server's representation of the networkPolicy, and an error, if there is any.
func (c *networkPolicies) Update(ctx context.Context, networkPolicy *v1beta1.NetworkPolicy, opts v1.UpdateOptions) (result *v1beta1.NetworkPolicy, err error) {
result = &v1beta1.NetworkPolicy{}
err = c.client.Put().
Namespace(c.ns).
Resource("networkpolicies").
Name(networkPolicy.Name).
VersionedParams(&opts, scheme.ParameterCodec).
Body(networkPolicy).
Do(ctx).
Into(result)
return
}
// Delete takes name of the networkPolicy and deletes it. Returns an error if one occurs.
func (c *networkPolicies) Delete(ctx context.Context, name string, opts v1.DeleteOptions) error {
return c.client.Delete().
Namespace(c.ns).
Resource("networkpolicies").
Name(name).
Body(&opts).
Do(ctx).
Error()
}
// DeleteCollection deletes a collection of objects.
func (c *networkPolicies) DeleteCollection(ctx context.Context, opts v1.DeleteOptions, listOpts v1.ListOptions) error {
var timeout time.Duration
if listOpts.TimeoutSeconds != nil {
timeout = time.Duration(*listOpts.TimeoutSeconds) * time.Second
}
return c.client.Delete().
Namespace(c.ns).
Resource("networkpolicies").
VersionedParams(&listOpts, scheme.ParameterCodec).
Timeout(timeout).
Body(&opts).
Do(ctx).
Error()
}
// Patch applies the patch and returns the patched networkPolicy.
func (c *networkPolicies) Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts v1.PatchOptions, subresources ...string) (result *v1beta1.NetworkPolicy, err error) {
result = &v1beta1.NetworkPolicy{}
err = c.client.Patch(pt).
Namespace(c.ns).
Resource("networkpolicies").
Name(name).
SubResource(subresources...).
VersionedParams(&opts, scheme.ParameterCodec).
Body(data).
Do(ctx).
Into(result)
return
}
| {
"pile_set_name": "Github"
} |
# Set the project name
project (subproject2)
# Create a sources variable with a link to all cpp files to compile
set(SOURCES
main2.cpp
)
# include the file with the function then call the macro
include(${CMAKE_SOURCE_DIR}/cmake/analysis.cmake)
add_analysis(${PROJECT_NAME} SOURCES)
# Add an executable with the above sources
add_executable(${PROJECT_NAME} ${SOURCES}) | {
"pile_set_name": "Github"
} |
$NetBSD: distinfo,v 1.3 2017/01/11 23:55:32 rodent Exp $
SHA1 (d2to1-0.2.12.tar.gz) = 72ab470f5837cb9de41f130ad7cf8b9b2c5187d0
RMD160 (d2to1-0.2.12.tar.gz) = ff57010d2892940d699825080bedf4bee2ab4373
SHA512 (d2to1-0.2.12.tar.gz) = a437d3652a63267470488de677e9d9e9844265480a8693f8b0163db8e1801f123888a14b78b0efb99c88598601cda5af7cfba993bd053c0683ed9ea22e8342a6
Size (d2to1-0.2.12.tar.gz) = 35901 bytes
| {
"pile_set_name": "Github"
} |
@Suppress("FOO") fun f() {
}
| {
"pile_set_name": "Github"
} |
/*
* linux/drivers/video/sstfb.c -- voodoo graphics frame buffer
*
* Copyright (c) 2000-2002 Ghozlane Toumi <[email protected]>
*
* Created 15 Jan 2000 by Ghozlane Toumi
*
* Contributions (and many thanks) :
*
* 03/2001 James Simmons <[email protected]>
* 04/2001 Paul Mundt <[email protected]>
* 05/2001 Urs Ganse <[email protected]>
* (initial work on voodoo2 port, interlace)
* 09/2002 Helge Deller <[email protected]>
* (enable driver on big-endian machines (hppa), ioctl fixes)
* 12/2002 Helge Deller <[email protected]>
* (port driver to new frambuffer infrastructure)
* 01/2003 Helge Deller <[email protected]>
* (initial work on fb hardware acceleration for voodoo2)
* 08/2006 Alan Cox <[email protected]>
* Remove never finished and bogus 24/32bit support
* Clean up macro abuse
* Minor tidying for format.
* 12/2006 Helge Deller <[email protected]>
* add /sys/class/graphics/fbX/vgapass sysfs-interface
* add module option "mode_option" to set initial screen mode
* use fbdev default videomode database
* remove debug functions from ioctl
*/
/*
* The voodoo1 has the following memory mapped address space:
* 0x000000 - 0x3fffff : registers (4MB)
* 0x400000 - 0x7fffff : linear frame buffer (4MB)
* 0x800000 - 0xffffff : texture memory (8MB)
*/
/*
* misc notes, TODOs, toASKs, and deep thoughts
-TODO: at one time or another test that the mode is acceptable by the monitor
-ASK: Can I choose different ordering for the color bitfields (rgba argb ...)
which one should i use ? is there any preferred one ? It seems ARGB is
the one ...
-TODO: in set_var check the validity of timings (hsync vsync)...
-TODO: check and recheck the use of sst_wait_idle : we don't flush the fifo via
a nop command. so it's ok as long as the commands we pass don't go
through the fifo. warning: issuing a nop command seems to need pci_fifo
-FIXME: in case of failure in the init sequence, be sure we return to a safe
state.
- FIXME: Use accelerator for 2D scroll
-FIXME: 4MB boards have banked memory (FbiInit2 bits 1 & 20)
*/
/*
* debug info
* SST_DEBUG : enable debugging
* SST_DEBUG_REG : debug registers
* 0 : no debug
* 1 : dac calls, [un]set_bits, FbiInit
* 2 : insane debug level (log every register read/write)
* SST_DEBUG_FUNC : functions
* 0 : no debug
* 1 : function call / debug ioctl
* 2 : variables
* 3 : flood . you don't want to do that. trust me.
* SST_DEBUG_VAR : debug display/var structs
* 0 : no debug
* 1 : dumps display, fb_var
*
* sstfb specific ioctls:
* toggle vga (0x46db) : toggle vga_pass_through
*/
#undef SST_DEBUG
/*
* Includes
*/
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/fb.h>
#include <linux/pci.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <asm/io.h>
#include <linux/uaccess.h>
#include <video/sstfb.h>
/* initialized by setup */
static int vgapass; /* enable VGA passthrough cable */
static int mem; /* mem size in MB, 0 = autodetect */
static int clipping = 1; /* use clipping (slower, safer) */
static int gfxclk; /* force FBI freq in Mhz . Dangerous */
static int slowpci; /* slow PCI settings */
/*
Possible default video modes: 800x600@60, 640x480@75, 1024x768@76, 640x480@60
*/
#define DEFAULT_VIDEO_MODE "640x480@60"
static char *mode_option __devinitdata = DEFAULT_VIDEO_MODE;
enum {
ID_VOODOO1 = 0,
ID_VOODOO2 = 1,
};
#define IS_VOODOO2(par) ((par)->type == ID_VOODOO2)
static struct sst_spec voodoo_spec[] __devinitdata = {
{ .name = "Voodoo Graphics", .default_gfx_clock = 50000, .max_gfxclk = 60 },
{ .name = "Voodoo2", .default_gfx_clock = 75000, .max_gfxclk = 85 },
};
/*
* debug functions
*/
#if (SST_DEBUG_REG > 0)
static void sst_dbg_print_read_reg(u32 reg, u32 val) {
const char *regname;
switch (reg) {
case FBIINIT0: regname = "FbiInit0"; break;
case FBIINIT1: regname = "FbiInit1"; break;
case FBIINIT2: regname = "FbiInit2"; break;
case FBIINIT3: regname = "FbiInit3"; break;
case FBIINIT4: regname = "FbiInit4"; break;
case FBIINIT5: regname = "FbiInit5"; break;
case FBIINIT6: regname = "FbiInit6"; break;
default: regname = NULL; break;
}
if (regname == NULL)
r_ddprintk("sst_read(%#x): %#x\n", reg, val);
else
r_dprintk(" sst_read(%s): %#x\n", regname, val);
}
static void sst_dbg_print_write_reg(u32 reg, u32 val) {
const char *regname;
switch (reg) {
case FBIINIT0: regname = "FbiInit0"; break;
case FBIINIT1: regname = "FbiInit1"; break;
case FBIINIT2: regname = "FbiInit2"; break;
case FBIINIT3: regname = "FbiInit3"; break;
case FBIINIT4: regname = "FbiInit4"; break;
case FBIINIT5: regname = "FbiInit5"; break;
case FBIINIT6: regname = "FbiInit6"; break;
default: regname = NULL; break;
}
if (regname == NULL)
r_ddprintk("sst_write(%#x, %#x)\n", reg, val);
else
r_dprintk(" sst_write(%s, %#x)\n", regname, val);
}
#else /* (SST_DEBUG_REG > 0) */
# define sst_dbg_print_read_reg(reg, val) do {} while(0)
# define sst_dbg_print_write_reg(reg, val) do {} while(0)
#endif /* (SST_DEBUG_REG > 0) */
/*
* hardware access functions
*/
/* register access */
#define sst_read(reg) __sst_read(par->mmio_vbase, reg)
#define sst_write(reg,val) __sst_write(par->mmio_vbase, reg, val)
#define sst_set_bits(reg,val) __sst_set_bits(par->mmio_vbase, reg, val)
#define sst_unset_bits(reg,val) __sst_unset_bits(par->mmio_vbase, reg, val)
#define sst_dac_read(reg) __sst_dac_read(par->mmio_vbase, reg)
#define sst_dac_write(reg,val) __sst_dac_write(par->mmio_vbase, reg, val)
#define dac_i_read(reg) __dac_i_read(par->mmio_vbase, reg)
#define dac_i_write(reg,val) __dac_i_write(par->mmio_vbase, reg, val)
static inline u32 __sst_read(u8 __iomem *vbase, u32 reg)
{
u32 ret = readl(vbase + reg);
sst_dbg_print_read_reg(reg, ret);
return ret;
}
static inline void __sst_write(u8 __iomem *vbase, u32 reg, u32 val)
{
sst_dbg_print_write_reg(reg, val);
writel(val, vbase + reg);
}
static inline void __sst_set_bits(u8 __iomem *vbase, u32 reg, u32 val)
{
r_dprintk("sst_set_bits(%#x, %#x)\n", reg, val);
__sst_write(vbase, reg, __sst_read(vbase, reg) | val);
}
static inline void __sst_unset_bits(u8 __iomem *vbase, u32 reg, u32 val)
{
r_dprintk("sst_unset_bits(%#x, %#x)\n", reg, val);
__sst_write(vbase, reg, __sst_read(vbase, reg) & ~val);
}
/*
* wait for the fbi chip. ASK: what happens if the fbi is stuck ?
*
* the FBI is supposed to be ready if we receive 5 time
* in a row a "idle" answer to our requests
*/
#define sst_wait_idle() __sst_wait_idle(par->mmio_vbase)
static int __sst_wait_idle(u8 __iomem *vbase)
{
int count = 0;
/* if (doFBINOP) __sst_write(vbase, NOPCMD, 0); */
while(1) {
if (__sst_read(vbase, STATUS) & STATUS_FBI_BUSY) {
f_dddprintk("status: busy\n");
/* FIXME basically, this is a busy wait. maybe not that good. oh well;
* this is a small loop after all.
* Or maybe we should use mdelay() or udelay() here instead ? */
count = 0;
} else {
count++;
f_dddprintk("status: idle(%d)\n", count);
}
if (count >= 5) return 1;
/* XXX do something to avoid hanging the machine if the voodoo is out */
}
}
/* dac access */
/* dac_read should be remaped to FbiInit2 (via the pci reg init_enable) */
static u8 __sst_dac_read(u8 __iomem *vbase, u8 reg)
{
u8 ret;
reg &= 0x07;
__sst_write(vbase, DAC_DATA, ((u32)reg << 8) | DAC_READ_CMD );
__sst_wait_idle(vbase);
/* udelay(10); */
ret = __sst_read(vbase, DAC_READ) & 0xff;
r_dprintk("sst_dac_read(%#x): %#x\n", reg, ret);
return ret;
}
static void __sst_dac_write(u8 __iomem *vbase, u8 reg, u8 val)
{
r_dprintk("sst_dac_write(%#x, %#x)\n", reg, val);
reg &= 0x07;
__sst_write(vbase, DAC_DATA,(((u32)reg << 8)) | (u32)val);
__sst_wait_idle(vbase);
}
/* indexed access to ti/att dacs */
static u32 __dac_i_read(u8 __iomem *vbase, u8 reg)
{
u32 ret;
__sst_dac_write(vbase, DACREG_ADDR_I, reg);
ret = __sst_dac_read(vbase, DACREG_DATA_I);
r_dprintk("sst_dac_read_i(%#x): %#x\n", reg, ret);
return ret;
}
static void __dac_i_write(u8 __iomem *vbase, u8 reg,u8 val)
{
r_dprintk("sst_dac_write_i(%#x, %#x)\n", reg, val);
__sst_dac_write(vbase, DACREG_ADDR_I, reg);
__sst_dac_write(vbase, DACREG_DATA_I, val);
}
/* compute the m,n,p , returns the real freq
* (ics datasheet : N <-> N1 , P <-> N2)
*
* Fout= Fref * (M+2)/( 2^P * (N+2))
* we try to get close to the asked freq
* with P as high, and M as low as possible
* range:
* ti/att : 0 <= M <= 255; 0 <= P <= 3; 0<= N <= 63
* ics : 1 <= M <= 127; 0 <= P <= 3; 1<= N <= 31
* we'll use the lowest limitation, should be precise enouth
*/
static int sst_calc_pll(const int freq, int *freq_out, struct pll_timing *t)
{
int m, m2, n, p, best_err, fout;
int best_n = -1;
int best_m = -1;
best_err = freq;
p = 3;
/* f * 2^P = vco should be less than VCOmax ~ 250 MHz for ics*/
while (((1 << p) * freq > VCO_MAX) && (p >= 0))
p--;
if (p == -1)
return -EINVAL;
for (n = 1; n < 32; n++) {
/* calc 2 * m so we can round it later*/
m2 = (2 * freq * (1 << p) * (n + 2) ) / DAC_FREF - 4 ;
m = (m2 % 2 ) ? m2/2+1 : m2/2 ;
if (m >= 128)
break;
fout = (DAC_FREF * (m + 2)) / ((1 << p) * (n + 2));
if ((abs(fout - freq) < best_err) && (m > 0)) {
best_n = n;
best_m = m;
best_err = abs(fout - freq);
/* we get the lowest m , allowing 0.5% error in freq*/
if (200*best_err < freq) break;
}
}
if (best_n == -1) /* unlikely, but who knows ? */
return -EINVAL;
t->p = p;
t->n = best_n;
t->m = best_m;
*freq_out = (DAC_FREF * (t->m + 2)) / ((1 << t->p) * (t->n + 2));
f_ddprintk ("m: %d, n: %d, p: %d, F: %dKhz\n",
t->m, t->n, t->p, *freq_out);
return 0;
}
/*
* clear lfb screen
*/
static void sstfb_clear_screen(struct fb_info *info)
{
/* clear screen */
fb_memset(info->screen_base, 0, info->fix.smem_len);
}
/**
* sstfb_check_var - Optional function. Validates a var passed in.
* @var: frame buffer variable screen structure
* @info: frame buffer structure that represents a single frame buffer
*
* Limit to the abilities of a single chip as SLI is not supported
* by this driver.
*/
static int sstfb_check_var(struct fb_var_screeninfo *var,
struct fb_info *info)
{
struct sstfb_par *par = info->par;
int hSyncOff = var->xres + var->right_margin + var->left_margin;
int vSyncOff = var->yres + var->lower_margin + var->upper_margin;
int vBackPorch = var->left_margin, yDim = var->yres;
int vSyncOn = var->vsync_len;
int tiles_in_X, real_length;
unsigned int freq;
if (sst_calc_pll(PICOS2KHZ(var->pixclock), &freq, &par->pll)) {
printk(KERN_ERR "sstfb: Pixclock at %ld KHZ out of range\n",
PICOS2KHZ(var->pixclock));
return -EINVAL;
}
var->pixclock = KHZ2PICOS(freq);
if (var->vmode & FB_VMODE_INTERLACED)
vBackPorch += (vBackPorch % 2);
if (var->vmode & FB_VMODE_DOUBLE) {
vBackPorch <<= 1;
yDim <<=1;
vSyncOn <<=1;
vSyncOff <<=1;
}
switch (var->bits_per_pixel) {
case 0 ... 16 :
var->bits_per_pixel = 16;
break;
default :
printk(KERN_ERR "sstfb: Unsupported bpp %d\n", var->bits_per_pixel);
return -EINVAL;
}
/* validity tests */
if (var->xres <= 1 || yDim <= 0 || var->hsync_len <= 1 ||
hSyncOff <= 1 || var->left_margin <= 2 || vSyncOn <= 0 ||
vSyncOff <= 0 || vBackPorch <= 0) {
return -EINVAL;
}
if (IS_VOODOO2(par)) {
/* Voodoo 2 limits */
tiles_in_X = (var->xres + 63 ) / 64 * 2;
if (var->xres > POW2(11) || yDim >= POW2(11)) {
printk(KERN_ERR "sstfb: Unsupported resolution %dx%d\n",
var->xres, var->yres);
return -EINVAL;
}
if (var->hsync_len > POW2(9) || hSyncOff > POW2(11) ||
var->left_margin - 2 >= POW2(9) || vSyncOn >= POW2(13) ||
vSyncOff >= POW2(13) || vBackPorch >= POW2(9) ||
tiles_in_X >= POW2(6) || tiles_in_X <= 0) {
printk(KERN_ERR "sstfb: Unsupported timings\n");
return -EINVAL;
}
} else {
/* Voodoo limits */
tiles_in_X = (var->xres + 63 ) / 64;
if (var->vmode) {
printk(KERN_ERR "sstfb: Interlace/doublescan not supported %#x\n",
var->vmode);
return -EINVAL;
}
if (var->xres > POW2(10) || var->yres >= POW2(10)) {
printk(KERN_ERR "sstfb: Unsupported resolution %dx%d\n",
var->xres, var->yres);
return -EINVAL;
}
if (var->hsync_len > POW2(8) || hSyncOff - 1 > POW2(10) ||
var->left_margin - 2 >= POW2(8) || vSyncOn >= POW2(12) ||
vSyncOff >= POW2(12) || vBackPorch >= POW2(8) ||
tiles_in_X >= POW2(4) || tiles_in_X <= 0) {
printk(KERN_ERR "sstfb: Unsupported timings\n");
return -EINVAL;
}
}
/* it seems that the fbi uses tiles of 64x16 pixels to "map" the mem */
/* FIXME: i don't like this... looks wrong */
real_length = tiles_in_X * (IS_VOODOO2(par) ? 32 : 64 )
* ((var->bits_per_pixel == 16) ? 2 : 4);
if (real_length * yDim > info->fix.smem_len) {
printk(KERN_ERR "sstfb: Not enough video memory\n");
return -ENOMEM;
}
var->sync &= (FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT);
var->vmode &= (FB_VMODE_INTERLACED | FB_VMODE_DOUBLE);
var->xoffset = 0;
var->yoffset = 0;
var->height = -1;
var->width = -1;
/*
* correct the color bit fields
*/
/* var->{red|green|blue}.msb_right = 0; */
switch (var->bits_per_pixel) {
case 16: /* RGB 565 LfbMode 0 */
var->red.length = 5;
var->green.length = 6;
var->blue.length = 5;
var->transp.length = 0;
var->red.offset = 11;
var->green.offset = 5;
var->blue.offset = 0;
var->transp.offset = 0;
break;
default:
return -EINVAL;
}
return 0;
}
/**
* sstfb_set_par - Optional function. Alters the hardware state.
* @info: frame buffer structure that represents a single frame buffer
*/
static int sstfb_set_par(struct fb_info *info)
{
struct sstfb_par *par = info->par;
u32 lfbmode, fbiinit1, fbiinit2, fbiinit3, fbiinit5, fbiinit6=0;
struct pci_dev *sst_dev = par->dev;
unsigned int freq;
int ntiles;
par->hSyncOff = info->var.xres + info->var.right_margin + info->var.left_margin;
par->yDim = info->var.yres;
par->vSyncOn = info->var.vsync_len;
par->vSyncOff = info->var.yres + info->var.lower_margin + info->var.upper_margin;
par->vBackPorch = info->var.upper_margin;
/* We need par->pll */
sst_calc_pll(PICOS2KHZ(info->var.pixclock), &freq, &par->pll);
if (info->var.vmode & FB_VMODE_INTERLACED)
par->vBackPorch += (par->vBackPorch % 2);
if (info->var.vmode & FB_VMODE_DOUBLE) {
par->vBackPorch <<= 1;
par->yDim <<=1;
par->vSyncOn <<=1;
par->vSyncOff <<=1;
}
if (IS_VOODOO2(par)) {
/* voodoo2 has 32 pixel wide tiles , BUT strange things
happen with odd number of tiles */
par->tiles_in_X = (info->var.xres + 63 ) / 64 * 2;
} else {
/* voodoo1 has 64 pixels wide tiles. */
par->tiles_in_X = (info->var.xres + 63 ) / 64;
}
f_ddprintk("hsync_len hSyncOff vsync_len vSyncOff\n");
f_ddprintk("%-7d %-8d %-7d %-8d\n",
info->var.hsync_len, par->hSyncOff,
par->vSyncOn, par->vSyncOff);
f_ddprintk("left_margin upper_margin xres yres Freq\n");
f_ddprintk("%-10d %-10d %-4d %-4d %-8ld\n",
info->var.left_margin, info->var.upper_margin,
info->var.xres, info->var.yres, PICOS2KHZ(info->var.pixclock));
sst_write(NOPCMD, 0);
sst_wait_idle();
pci_write_config_dword(sst_dev, PCI_INIT_ENABLE, PCI_EN_INIT_WR);
sst_set_bits(FBIINIT1, VIDEO_RESET);
sst_set_bits(FBIINIT0, FBI_RESET | FIFO_RESET);
sst_unset_bits(FBIINIT2, EN_DRAM_REFRESH);
sst_wait_idle();
/*sst_unset_bits (FBIINIT0, FBI_RESET); / reenable FBI ? */
sst_write(BACKPORCH, par->vBackPorch << 16 | (info->var.left_margin - 2));
sst_write(VIDEODIMENSIONS, par->yDim << 16 | (info->var.xres - 1));
sst_write(HSYNC, (par->hSyncOff - 1) << 16 | (info->var.hsync_len - 1));
sst_write(VSYNC, par->vSyncOff << 16 | par->vSyncOn);
fbiinit2 = sst_read(FBIINIT2);
fbiinit3 = sst_read(FBIINIT3);
/* everything is reset. we enable fbiinit2/3 remap : dac access ok */
pci_write_config_dword(sst_dev, PCI_INIT_ENABLE,
PCI_EN_INIT_WR | PCI_REMAP_DAC );
par->dac_sw.set_vidmod(info, info->var.bits_per_pixel);
/* set video clock */
par->dac_sw.set_pll(info, &par->pll, VID_CLOCK);
/* disable fbiinit2/3 remap */
pci_write_config_dword(sst_dev, PCI_INIT_ENABLE,
PCI_EN_INIT_WR);
/* restore fbiinit2/3 */
sst_write(FBIINIT2,fbiinit2);
sst_write(FBIINIT3,fbiinit3);
fbiinit1 = (sst_read(FBIINIT1) & VIDEO_MASK)
| EN_DATA_OE
| EN_BLANK_OE
| EN_HVSYNC_OE
| EN_DCLK_OE
/* | (15 << TILES_IN_X_SHIFT) */
| SEL_INPUT_VCLK_2X
/* | (2 << VCLK_2X_SEL_DEL_SHIFT)
| (2 << VCLK_DEL_SHIFT) */;
/* try with vclk_in_delay =0 (bits 29:30) , vclk_out_delay =0 (bits(27:28)
in (near) future set them accordingly to revision + resolution (cf glide)
first understand what it stands for :)
FIXME: there are some artefacts... check for the vclk_in_delay
lets try with 6ns delay in both vclk_out & in...
doh... they're still there :\
*/
ntiles = par->tiles_in_X;
if (IS_VOODOO2(par)) {
fbiinit1 |= ((ntiles & 0x20) >> 5) << TILES_IN_X_MSB_SHIFT
| ((ntiles & 0x1e) >> 1) << TILES_IN_X_SHIFT;
/* as the only value of importance for us in fbiinit6 is tiles in X (lsb),
and as reading fbinit 6 will return crap (see FBIINIT6_DEFAULT) we just
write our value. BTW due to the dac unable to read odd number of tiles, this
field is always null ... */
fbiinit6 = (ntiles & 0x1) << TILES_IN_X_LSB_SHIFT;
}
else
fbiinit1 |= ntiles << TILES_IN_X_SHIFT;
switch (info->var.bits_per_pixel) {
case 16:
fbiinit1 |= SEL_SOURCE_VCLK_2X_SEL;
break;
default:
return -EINVAL;
}
sst_write(FBIINIT1, fbiinit1);
if (IS_VOODOO2(par)) {
sst_write(FBIINIT6, fbiinit6);
fbiinit5=sst_read(FBIINIT5) & FBIINIT5_MASK ;
if (info->var.vmode & FB_VMODE_INTERLACED)
fbiinit5 |= INTERLACE;
if (info->var.vmode & FB_VMODE_DOUBLE)
fbiinit5 |= VDOUBLESCAN;
if (info->var.sync & FB_SYNC_HOR_HIGH_ACT)
fbiinit5 |= HSYNC_HIGH;
if (info->var.sync & FB_SYNC_VERT_HIGH_ACT)
fbiinit5 |= VSYNC_HIGH;
sst_write(FBIINIT5, fbiinit5);
}
sst_wait_idle();
sst_unset_bits(FBIINIT1, VIDEO_RESET);
sst_unset_bits(FBIINIT0, FBI_RESET | FIFO_RESET);
sst_set_bits(FBIINIT2, EN_DRAM_REFRESH);
/* disables fbiinit writes */
pci_write_config_dword(sst_dev, PCI_INIT_ENABLE, PCI_EN_FIFO_WR);
/* set lfbmode : set mode + front buffer for reads/writes
+ disable pipeline */
switch (info->var.bits_per_pixel) {
case 16:
lfbmode = LFB_565;
break;
default:
return -EINVAL;
}
#if defined(__BIG_ENDIAN)
/* Enable byte-swizzle functionality in hardware.
* With this enabled, all our read- and write-accesses to
* the voodoo framebuffer can be done in native format, and
* the hardware will automatically convert it to little-endian.
* - tested on HP-PARISC, Helge Deller <[email protected]> */
lfbmode |= ( LFB_WORD_SWIZZLE_WR | LFB_BYTE_SWIZZLE_WR |
LFB_WORD_SWIZZLE_RD | LFB_BYTE_SWIZZLE_RD );
#endif
if (clipping) {
sst_write(LFBMODE, lfbmode | EN_PXL_PIPELINE);
/*
* Set "clipping" dimensions. If clipping is disabled and
* writes to offscreen areas of the framebuffer are performed,
* the "behaviour is undefined" (_very_ undefined) - Urs
*/
/* btw, it requires enabling pixel pipeline in LFBMODE .
off screen read/writes will just wrap and read/print pixels
on screen. Ugly but not that dangerous */
f_ddprintk("setting clipping dimensions 0..%d, 0..%d\n",
info->var.xres - 1, par->yDim - 1);
sst_write(CLIP_LEFT_RIGHT, info->var.xres);
sst_write(CLIP_LOWY_HIGHY, par->yDim);
sst_set_bits(FBZMODE, EN_CLIPPING | EN_RGB_WRITE);
} else {
/* no clipping : direct access, no pipeline */
sst_write(LFBMODE, lfbmode);
}
return 0;
}
/**
* sstfb_setcolreg - Optional function. Sets a color register.
* @regno: hardware colormap register
* @red: frame buffer colormap structure
* @green: The green value which can be up to 16 bits wide
* @blue: The blue value which can be up to 16 bits wide.
* @transp: If supported the alpha value which can be up to 16 bits wide.
* @info: frame buffer info structure
*/
static int sstfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue,
u_int transp, struct fb_info *info)
{
struct sstfb_par *par = info->par;
u32 col;
f_dddprintk("sstfb_setcolreg\n");
f_dddprintk("%-2d rgbt: %#x, %#x, %#x, %#x\n",
regno, red, green, blue, transp);
if (regno > 15)
return 0;
red >>= (16 - info->var.red.length);
green >>= (16 - info->var.green.length);
blue >>= (16 - info->var.blue.length);
transp >>= (16 - info->var.transp.length);
col = (red << info->var.red.offset)
| (green << info->var.green.offset)
| (blue << info->var.blue.offset)
| (transp << info->var.transp.offset);
par->palette[regno] = col;
return 0;
}
static void sstfb_setvgapass( struct fb_info *info, int enable )
{
struct sstfb_par *par = info->par;
struct pci_dev *sst_dev = par->dev;
u32 fbiinit0, tmp;
enable = enable ? 1:0;
if (par->vgapass == enable)
return;
par->vgapass = enable;
pci_read_config_dword(sst_dev, PCI_INIT_ENABLE, &tmp);
pci_write_config_dword(sst_dev, PCI_INIT_ENABLE,
tmp | PCI_EN_INIT_WR );
fbiinit0 = sst_read (FBIINIT0);
if (par->vgapass) {
sst_write(FBIINIT0, fbiinit0 & ~DIS_VGA_PASSTHROUGH);
printk(KERN_INFO "fb%d: Enabling VGA pass-through\n", info->node );
} else {
sst_write(FBIINIT0, fbiinit0 | DIS_VGA_PASSTHROUGH);
printk(KERN_INFO "fb%d: Disabling VGA pass-through\n", info->node );
}
pci_write_config_dword(sst_dev, PCI_INIT_ENABLE, tmp);
}
static ssize_t store_vgapass(struct device *device, struct device_attribute *attr,
const char *buf, size_t count)
{
struct fb_info *info = dev_get_drvdata(device);
char ** last = NULL;
int val;
val = simple_strtoul(buf, last, 0);
sstfb_setvgapass(info, val);
return count;
}
static ssize_t show_vgapass(struct device *device, struct device_attribute *attr,
char *buf)
{
struct fb_info *info = dev_get_drvdata(device);
struct sstfb_par *par = info->par;
return snprintf(buf, PAGE_SIZE, "%d\n", par->vgapass);
}
static struct device_attribute device_attrs[] = {
__ATTR(vgapass, S_IRUGO|S_IWUSR, show_vgapass, store_vgapass)
};
static int sstfb_ioctl(struct fb_info *info, unsigned int cmd,
unsigned long arg)
{
struct sstfb_par *par;
u32 val;
switch (cmd) {
/* set/get VGA pass_through mode */
case SSTFB_SET_VGAPASS:
if (copy_from_user(&val, (void __user *)arg, sizeof(val)))
return -EFAULT;
sstfb_setvgapass(info, val);
return 0;
case SSTFB_GET_VGAPASS:
par = info->par;
val = par->vgapass;
if (copy_to_user((void __user *)arg, &val, sizeof(val)))
return -EFAULT;
return 0;
}
return -EINVAL;
}
/*
* Screen-to-Screen BitBlt 2D command (for the bmove fb op.) - Voodoo2 only
*/
#if 0
static void sstfb_copyarea(struct fb_info *info, const struct fb_copyarea *area)
{
struct sstfb_par *par = info->par;
u32 stride = info->fix.line_length;
if (!IS_VOODOO2(par))
return;
sst_write(BLTSRCBASEADDR, 0);
sst_write(BLTDSTBASEADDR, 0);
sst_write(BLTROP, BLTROP_COPY);
sst_write(BLTXYSTRIDES, stride | (stride << 16));
sst_write(BLTSRCXY, area->sx | (area->sy << 16));
sst_write(BLTDSTXY, area->dx | (area->dy << 16));
sst_write(BLTSIZE, area->width | (area->height << 16));
sst_write(BLTCOMMAND, BLT_SCR2SCR_BITBLT | LAUNCH_BITBLT |
(BLT_16BPP_FMT << 3) /* | BIT(14) */ | BIT(15) );
sst_wait_idle();
}
#endif
/*
* FillRect 2D command (solidfill or invert (via ROP_XOR)) - Voodoo2 only
*/
#if 0
static void sstfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect)
{
struct sstfb_par *par = info->par;
u32 stride = info->fix.line_length;
if (!IS_VOODOO2(par))
return;
sst_write(BLTCLIPX, info->var.xres);
sst_write(BLTCLIPY, info->var.yres);
sst_write(BLTDSTBASEADDR, 0);
sst_write(BLTCOLOR, rect->color);
sst_write(BLTROP, rect->rop == ROP_COPY ? BLTROP_COPY : BLTROP_XOR);
sst_write(BLTXYSTRIDES, stride | (stride << 16));
sst_write(BLTDSTXY, rect->dx | (rect->dy << 16));
sst_write(BLTSIZE, rect->width | (rect->height << 16));
sst_write(BLTCOMMAND, BLT_RECFILL_BITBLT | LAUNCH_BITBLT
| (BLT_16BPP_FMT << 3) /* | BIT(14) */ | BIT(15) | BIT(16) );
sst_wait_idle();
}
#endif
/*
* get lfb size
*/
static int __devinit sst_get_memsize(struct fb_info *info, __u32 *memsize)
{
u8 __iomem *fbbase_virt = info->screen_base;
/* force memsize */
if (mem >= 1 && mem <= 4) {
*memsize = (mem * 0x100000);
printk(KERN_INFO "supplied memsize: %#x\n", *memsize);
return 1;
}
writel(0xdeadbeef, fbbase_virt);
writel(0xdeadbeef, fbbase_virt+0x100000);
writel(0xdeadbeef, fbbase_virt+0x200000);
f_ddprintk("0MB: %#x, 1MB: %#x, 2MB: %#x\n",
readl(fbbase_virt), readl(fbbase_virt + 0x100000),
readl(fbbase_virt + 0x200000));
writel(0xabcdef01, fbbase_virt);
f_ddprintk("0MB: %#x, 1MB: %#x, 2MB: %#x\n",
readl(fbbase_virt), readl(fbbase_virt + 0x100000),
readl(fbbase_virt + 0x200000));
/* checks for 4mb lfb, then 2, then defaults to 1 */
if (readl(fbbase_virt + 0x200000) == 0xdeadbeef)
*memsize = 0x400000;
else if (readl(fbbase_virt + 0x100000) == 0xdeadbeef)
*memsize = 0x200000;
else
*memsize = 0x100000;
f_ddprintk("detected memsize: %dMB\n", *memsize >> 20);
return 1;
}
/*
* DAC detection routines
*/
/* fbi should be idle, and fifo emty and mem disabled */
/* supposed to detect AT&T ATT20C409 and Ti TVP3409 ramdacs */
static int __devinit sst_detect_att(struct fb_info *info)
{
struct sstfb_par *par = info->par;
int i, mir, dir;
for (i = 0; i < 3; i++) {
sst_dac_write(DACREG_WMA, 0); /* backdoor */
sst_dac_read(DACREG_RMR); /* read 4 times RMR */
sst_dac_read(DACREG_RMR);
sst_dac_read(DACREG_RMR);
sst_dac_read(DACREG_RMR);
/* the fifth time, CR0 is read */
sst_dac_read(DACREG_RMR);
/* the 6th, manufacturer id register */
mir = sst_dac_read(DACREG_RMR);
/*the 7th, device ID register */
dir = sst_dac_read(DACREG_RMR);
f_ddprintk("mir: %#x, dir: %#x\n", mir, dir);
if (mir == DACREG_MIR_ATT && dir == DACREG_DIR_ATT) {
return 1;
}
}
return 0;
}
static int __devinit sst_detect_ti(struct fb_info *info)
{
struct sstfb_par *par = info->par;
int i, mir, dir;
for (i = 0; i<3; i++) {
sst_dac_write(DACREG_WMA, 0); /* backdoor */
sst_dac_read(DACREG_RMR); /* read 4 times RMR */
sst_dac_read(DACREG_RMR);
sst_dac_read(DACREG_RMR);
sst_dac_read(DACREG_RMR);
/* the fifth time, CR0 is read */
sst_dac_read(DACREG_RMR);
/* the 6th, manufacturer id register */
mir = sst_dac_read(DACREG_RMR);
/*the 7th, device ID register */
dir = sst_dac_read(DACREG_RMR);
f_ddprintk("mir: %#x, dir: %#x\n", mir, dir);
if ((mir == DACREG_MIR_TI ) && (dir == DACREG_DIR_TI)) {
return 1;
}
}
return 0;
}
/*
* try to detect ICS5342 ramdac
* we get the 1st byte (M value) of preset f1,f7 and fB
* why those 3 ? mmmh... for now, i'll do it the glide way...
* and ask questions later. anyway, it seems that all the freq registers are
* really at their default state (cf specs) so i ask again, why those 3 regs ?
* mmmmh.. it seems that's much more ugly than i thought. we use f0 and fA for
* pll programming, so in fact, we *hope* that the f1, f7 & fB won't be
* touched...
* is it really safe ? how can i reset this ramdac ? geee...
*/
static int __devinit sst_detect_ics(struct fb_info *info)
{
struct sstfb_par *par = info->par;
int m_clk0_1, m_clk0_7, m_clk1_b;
int n_clk0_1, n_clk0_7, n_clk1_b;
int i;
for (i = 0; i<5; i++ ) {
sst_dac_write(DACREG_ICS_PLLRMA, 0x1); /* f1 */
m_clk0_1 = sst_dac_read(DACREG_ICS_PLLDATA);
n_clk0_1 = sst_dac_read(DACREG_ICS_PLLDATA);
sst_dac_write(DACREG_ICS_PLLRMA, 0x7); /* f7 */
m_clk0_7 = sst_dac_read(DACREG_ICS_PLLDATA);
n_clk0_7 = sst_dac_read(DACREG_ICS_PLLDATA);
sst_dac_write(DACREG_ICS_PLLRMA, 0xb); /* fB */
m_clk1_b= sst_dac_read(DACREG_ICS_PLLDATA);
n_clk1_b= sst_dac_read(DACREG_ICS_PLLDATA);
f_ddprintk("m_clk0_1: %#x, m_clk0_7: %#x, m_clk1_b: %#x\n",
m_clk0_1, m_clk0_7, m_clk1_b);
f_ddprintk("n_clk0_1: %#x, n_clk0_7: %#x, n_clk1_b: %#x\n",
n_clk0_1, n_clk0_7, n_clk1_b);
if (( m_clk0_1 == DACREG_ICS_PLL_CLK0_1_INI)
&& (m_clk0_7 == DACREG_ICS_PLL_CLK0_7_INI)
&& (m_clk1_b == DACREG_ICS_PLL_CLK1_B_INI)) {
return 1;
}
}
return 0;
}
/*
* gfx, video, pci fifo should be reset, dram refresh disabled
* see detect_dac
*/
static int sst_set_pll_att_ti(struct fb_info *info,
const struct pll_timing *t, const int clock)
{
struct sstfb_par *par = info->par;
u8 cr0, cc;
/* enable indexed mode */
sst_dac_write(DACREG_WMA, 0); /* backdoor */
sst_dac_read(DACREG_RMR); /* 1 time: RMR */
sst_dac_read(DACREG_RMR); /* 2 RMR */
sst_dac_read(DACREG_RMR); /* 3 // */
sst_dac_read(DACREG_RMR); /* 4 // */
cr0 = sst_dac_read(DACREG_RMR); /* 5 CR0 */
sst_dac_write(DACREG_WMA, 0);
sst_dac_read(DACREG_RMR);
sst_dac_read(DACREG_RMR);
sst_dac_read(DACREG_RMR);
sst_dac_read(DACREG_RMR);
sst_dac_write(DACREG_RMR, (cr0 & 0xf0)
| DACREG_CR0_EN_INDEXED
| DACREG_CR0_8BIT
| DACREG_CR0_PWDOWN );
/* so, now we are in indexed mode . dunno if its common, but
i find this way of doing things a little bit weird :p */
udelay(300);
cc = dac_i_read(DACREG_CC_I);
switch (clock) {
case VID_CLOCK:
dac_i_write(DACREG_AC0_I, t->m);
dac_i_write(DACREG_AC1_I, t->p << 6 | t->n);
dac_i_write(DACREG_CC_I,
(cc & 0x0f) | DACREG_CC_CLKA | DACREG_CC_CLKA_C);
break;
case GFX_CLOCK:
dac_i_write(DACREG_BD0_I, t->m);
dac_i_write(DACREG_BD1_I, t->p << 6 | t->n);
dac_i_write(DACREG_CC_I,
(cc & 0xf0) | DACREG_CC_CLKB | DACREG_CC_CLKB_D);
break;
default:
dprintk("%s: wrong clock code '%d'\n",
__func__, clock);
return 0;
}
udelay(300);
/* power up the dac & return to "normal" non-indexed mode */
dac_i_write(DACREG_CR0_I,
cr0 & ~DACREG_CR0_PWDOWN & ~DACREG_CR0_EN_INDEXED);
return 1;
}
static int sst_set_pll_ics(struct fb_info *info,
const struct pll_timing *t, const int clock)
{
struct sstfb_par *par = info->par;
u8 pll_ctrl;
sst_dac_write(DACREG_ICS_PLLRMA, DACREG_ICS_PLL_CTRL);
pll_ctrl = sst_dac_read(DACREG_ICS_PLLDATA);
switch(clock) {
case VID_CLOCK:
sst_dac_write(DACREG_ICS_PLLWMA, 0x0); /* CLK0, f0 */
sst_dac_write(DACREG_ICS_PLLDATA, t->m);
sst_dac_write(DACREG_ICS_PLLDATA, t->p << 5 | t->n);
/* selects freq f0 for clock 0 */
sst_dac_write(DACREG_ICS_PLLWMA, DACREG_ICS_PLL_CTRL);
sst_dac_write(DACREG_ICS_PLLDATA,
(pll_ctrl & 0xd8)
| DACREG_ICS_CLK0
| DACREG_ICS_CLK0_0);
break;
case GFX_CLOCK :
sst_dac_write(DACREG_ICS_PLLWMA, 0xa); /* CLK1, fA */
sst_dac_write(DACREG_ICS_PLLDATA, t->m);
sst_dac_write(DACREG_ICS_PLLDATA, t->p << 5 | t->n);
/* selects freq fA for clock 1 */
sst_dac_write(DACREG_ICS_PLLWMA, DACREG_ICS_PLL_CTRL);
sst_dac_write(DACREG_ICS_PLLDATA,
(pll_ctrl & 0xef) | DACREG_ICS_CLK1_A);
break;
default:
dprintk("%s: wrong clock code '%d'\n",
__func__, clock);
return 0;
}
udelay(300);
return 1;
}
static void sst_set_vidmod_att_ti(struct fb_info *info, const int bpp)
{
struct sstfb_par *par = info->par;
u8 cr0;
sst_dac_write(DACREG_WMA, 0); /* backdoor */
sst_dac_read(DACREG_RMR); /* read 4 times RMR */
sst_dac_read(DACREG_RMR);
sst_dac_read(DACREG_RMR);
sst_dac_read(DACREG_RMR);
/* the fifth time, CR0 is read */
cr0 = sst_dac_read(DACREG_RMR);
sst_dac_write(DACREG_WMA, 0); /* backdoor */
sst_dac_read(DACREG_RMR); /* read 4 times RMR */
sst_dac_read(DACREG_RMR);
sst_dac_read(DACREG_RMR);
sst_dac_read(DACREG_RMR);
/* cr0 */
switch(bpp) {
case 16:
sst_dac_write(DACREG_RMR, (cr0 & 0x0f) | DACREG_CR0_16BPP);
break;
default:
dprintk("%s: bad depth '%u'\n", __func__, bpp);
break;
}
}
static void sst_set_vidmod_ics(struct fb_info *info, const int bpp)
{
struct sstfb_par *par = info->par;
switch(bpp) {
case 16:
sst_dac_write(DACREG_ICS_CMD, DACREG_ICS_CMD_16BPP);
break;
default:
dprintk("%s: bad depth '%u'\n", __func__, bpp);
break;
}
}
/*
* detect dac type
* prerequisite : write to FbiInitx enabled, video and fbi and pci fifo reset,
* dram refresh disabled, FbiInit remaped.
* TODO: mmh.. maybe i should put the "prerequisite" in the func ...
*/
static struct dac_switch dacs[] __devinitdata = {
{ .name = "TI TVP3409",
.detect = sst_detect_ti,
.set_pll = sst_set_pll_att_ti,
.set_vidmod = sst_set_vidmod_att_ti },
{ .name = "AT&T ATT20C409",
.detect = sst_detect_att,
.set_pll = sst_set_pll_att_ti,
.set_vidmod = sst_set_vidmod_att_ti },
{ .name = "ICS ICS5342",
.detect = sst_detect_ics,
.set_pll = sst_set_pll_ics,
.set_vidmod = sst_set_vidmod_ics },
};
static int __devinit sst_detect_dactype(struct fb_info *info, struct sstfb_par *par)
{
int i, ret = 0;
for (i = 0; i < ARRAY_SIZE(dacs); i++) {
ret = dacs[i].detect(info);
if (ret)
break;
}
if (!ret)
return 0;
f_dprintk("%s found %s\n", __func__, dacs[i].name);
par->dac_sw = dacs[i];
return 1;
}
/*
* Internal Routines
*/
static int __devinit sst_init(struct fb_info *info, struct sstfb_par *par)
{
u32 fbiinit0, fbiinit1, fbiinit4;
struct pci_dev *dev = par->dev;
struct pll_timing gfx_timings;
struct sst_spec *spec;
int Fout;
int gfx_clock;
spec = &voodoo_spec[par->type];
f_ddprintk(" fbiinit0 fbiinit1 fbiinit2 fbiinit3 fbiinit4 "
" fbiinit6\n");
f_ddprintk("%0#10x %0#10x %0#10x %0#10x %0#10x %0#10x\n",
sst_read(FBIINIT0), sst_read(FBIINIT1), sst_read(FBIINIT2),
sst_read(FBIINIT3), sst_read(FBIINIT4), sst_read(FBIINIT6));
/* disable video clock */
pci_write_config_dword(dev, PCI_VCLK_DISABLE, 0);
/* enable writing to init registers, disable pci fifo */
pci_write_config_dword(dev, PCI_INIT_ENABLE, PCI_EN_INIT_WR);
/* reset video */
sst_set_bits(FBIINIT1, VIDEO_RESET);
sst_wait_idle();
/* reset gfx + pci fifo */
sst_set_bits(FBIINIT0, FBI_RESET | FIFO_RESET);
sst_wait_idle();
/* unreset fifo */
/*sst_unset_bits(FBIINIT0, FIFO_RESET);
sst_wait_idle();*/
/* unreset FBI */
/*sst_unset_bits(FBIINIT0, FBI_RESET);
sst_wait_idle();*/
/* disable dram refresh */
sst_unset_bits(FBIINIT2, EN_DRAM_REFRESH);
sst_wait_idle();
/* remap fbinit2/3 to dac */
pci_write_config_dword(dev, PCI_INIT_ENABLE,
PCI_EN_INIT_WR | PCI_REMAP_DAC );
/* detect dac type */
if (!sst_detect_dactype(info, par)) {
printk(KERN_ERR "sstfb: unknown dac type.\n");
//FIXME watch it: we are not in a safe state, bad bad bad.
return 0;
}
/* set graphic clock */
gfx_clock = spec->default_gfx_clock;
if ((gfxclk >10 ) && (gfxclk < spec->max_gfxclk)) {
printk(KERN_INFO "sstfb: Using supplied graphic freq : %dMHz\n", gfxclk);
gfx_clock = gfxclk *1000;
} else if (gfxclk) {
printk(KERN_WARNING "sstfb: %dMhz is way out of spec! Using default\n", gfxclk);
}
sst_calc_pll(gfx_clock, &Fout, &gfx_timings);
par->dac_sw.set_pll(info, &gfx_timings, GFX_CLOCK);
/* disable fbiinit remap */
pci_write_config_dword(dev, PCI_INIT_ENABLE,
PCI_EN_INIT_WR| PCI_EN_FIFO_WR );
/* defaults init registers */
/* FbiInit0: unreset gfx, unreset fifo */
fbiinit0 = FBIINIT0_DEFAULT;
fbiinit1 = FBIINIT1_DEFAULT;
fbiinit4 = FBIINIT4_DEFAULT;
par->vgapass = vgapass;
if (par->vgapass)
fbiinit0 &= ~DIS_VGA_PASSTHROUGH;
else
fbiinit0 |= DIS_VGA_PASSTHROUGH;
if (slowpci) {
fbiinit1 |= SLOW_PCI_WRITES;
fbiinit4 |= SLOW_PCI_READS;
} else {
fbiinit1 &= ~SLOW_PCI_WRITES;
fbiinit4 &= ~SLOW_PCI_READS;
}
sst_write(FBIINIT0, fbiinit0);
sst_wait_idle();
sst_write(FBIINIT1, fbiinit1);
sst_wait_idle();
sst_write(FBIINIT2, FBIINIT2_DEFAULT);
sst_wait_idle();
sst_write(FBIINIT3, FBIINIT3_DEFAULT);
sst_wait_idle();
sst_write(FBIINIT4, fbiinit4);
sst_wait_idle();
if (IS_VOODOO2(par)) {
sst_write(FBIINIT6, FBIINIT6_DEFAULT);
sst_wait_idle();
}
pci_write_config_dword(dev, PCI_INIT_ENABLE, PCI_EN_FIFO_WR);
pci_write_config_dword(dev, PCI_VCLK_ENABLE, 0);
return 1;
}
static void __devexit sst_shutdown(struct fb_info *info)
{
struct sstfb_par *par = info->par;
struct pci_dev *dev = par->dev;
struct pll_timing gfx_timings;
int Fout;
/* reset video, gfx, fifo, disable dram + remap fbiinit2/3 */
pci_write_config_dword(dev, PCI_INIT_ENABLE, PCI_EN_INIT_WR);
sst_set_bits(FBIINIT1, VIDEO_RESET | EN_BLANKING);
sst_unset_bits(FBIINIT2, EN_DRAM_REFRESH);
sst_set_bits(FBIINIT0, FBI_RESET | FIFO_RESET);
sst_wait_idle();
pci_write_config_dword(dev, PCI_INIT_ENABLE,
PCI_EN_INIT_WR | PCI_REMAP_DAC);
/* set 20Mhz gfx clock */
sst_calc_pll(20000, &Fout, &gfx_timings);
par->dac_sw.set_pll(info, &gfx_timings, GFX_CLOCK);
/* TODO maybe shutdown the dac, vrefresh and so on... */
pci_write_config_dword(dev, PCI_INIT_ENABLE,
PCI_EN_INIT_WR);
sst_unset_bits(FBIINIT0, FBI_RESET | FIFO_RESET | DIS_VGA_PASSTHROUGH);
pci_write_config_dword(dev, PCI_VCLK_DISABLE,0);
/* maybe keep fbiinit* and PCI_INIT_enable in the fb_info struct
* from start ? */
pci_write_config_dword(dev, PCI_INIT_ENABLE, 0);
}
/*
* Interface to the world
*/
static int __devinit sstfb_setup(char *options)
{
char *this_opt;
if (!options || !*options)
return 0;
while ((this_opt = strsep(&options, ",")) != NULL) {
if (!*this_opt) continue;
f_ddprintk("option %s\n", this_opt);
if (!strcmp(this_opt, "vganopass"))
vgapass = 0;
else if (!strcmp(this_opt, "vgapass"))
vgapass = 1;
else if (!strcmp(this_opt, "clipping"))
clipping = 1;
else if (!strcmp(this_opt, "noclipping"))
clipping = 0;
else if (!strcmp(this_opt, "fastpci"))
slowpci = 0;
else if (!strcmp(this_opt, "slowpci"))
slowpci = 1;
else if (!strncmp(this_opt, "mem:",4))
mem = simple_strtoul (this_opt+4, NULL, 0);
else if (!strncmp(this_opt, "gfxclk:",7))
gfxclk = simple_strtoul (this_opt+7, NULL, 0);
else
mode_option = this_opt;
}
return 0;
}
static struct fb_ops sstfb_ops = {
.owner = THIS_MODULE,
.fb_check_var = sstfb_check_var,
.fb_set_par = sstfb_set_par,
.fb_setcolreg = sstfb_setcolreg,
.fb_fillrect = cfb_fillrect, /* sstfb_fillrect */
.fb_copyarea = cfb_copyarea, /* sstfb_copyarea */
.fb_imageblit = cfb_imageblit,
.fb_ioctl = sstfb_ioctl,
};
static int __devinit sstfb_probe(struct pci_dev *pdev,
const struct pci_device_id *id)
{
struct fb_info *info;
struct fb_fix_screeninfo *fix;
struct sstfb_par *par;
struct sst_spec *spec;
int err;
/* Enable device in PCI config. */
if ((err=pci_enable_device(pdev))) {
printk(KERN_ERR "cannot enable device\n");
return err;
}
/* Allocate the fb and par structures. */
info = framebuffer_alloc(sizeof(struct sstfb_par), &pdev->dev);
if (!info)
return -ENOMEM;
pci_set_drvdata(pdev, info);
par = info->par;
fix = &info->fix;
par->type = id->driver_data;
spec = &voodoo_spec[par->type];
f_ddprintk("found device : %s\n", spec->name);
par->dev = pdev;
par->revision = pdev->revision;
fix->mmio_start = pci_resource_start(pdev,0);
fix->mmio_len = 0x400000;
fix->smem_start = fix->mmio_start + 0x400000;
if (!request_mem_region(fix->mmio_start, fix->mmio_len, "sstfb MMIO")) {
printk(KERN_ERR "sstfb: cannot reserve mmio memory\n");
goto fail_mmio_mem;
}
if (!request_mem_region(fix->smem_start, 0x400000,"sstfb FB")) {
printk(KERN_ERR "sstfb: cannot reserve fb memory\n");
goto fail_fb_mem;
}
par->mmio_vbase = ioremap_nocache(fix->mmio_start,
fix->mmio_len);
if (!par->mmio_vbase) {
printk(KERN_ERR "sstfb: cannot remap register area %#lx\n",
fix->mmio_start);
goto fail_mmio_remap;
}
info->screen_base = ioremap_nocache(fix->smem_start, 0x400000);
if (!info->screen_base) {
printk(KERN_ERR "sstfb: cannot remap framebuffer %#lx\n",
fix->smem_start);
goto fail_fb_remap;
}
if (!sst_init(info, par)) {
printk(KERN_ERR "sstfb: Init failed\n");
goto fail;
}
sst_get_memsize(info, &fix->smem_len);
strlcpy(fix->id, spec->name, sizeof(fix->id));
printk(KERN_INFO "%s (revision %d) with %s dac\n",
fix->id, par->revision, par->dac_sw.name);
printk(KERN_INFO "framebuffer at %#lx, mapped to 0x%p, size %dMB\n",
fix->smem_start, info->screen_base,
fix->smem_len >> 20);
f_ddprintk("regbase_virt: %#lx\n", par->mmio_vbase);
f_ddprintk("membase_phys: %#lx\n", fix->smem_start);
f_ddprintk("fbbase_virt: %p\n", info->screen_base);
info->flags = FBINFO_DEFAULT;
info->fbops = &sstfb_ops;
info->pseudo_palette = par->palette;
fix->type = FB_TYPE_PACKED_PIXELS;
fix->visual = FB_VISUAL_TRUECOLOR;
fix->accel = FB_ACCEL_NONE; /* FIXME */
/*
* According to the specs, the linelength must be of 1024 *pixels*
* and the 24bpp mode is in fact a 32 bpp mode (and both are in
* fact dithered to 16bit).
*/
fix->line_length = 2048; /* default value, for 24 or 32bit: 4096 */
fb_find_mode(&info->var, info, mode_option, NULL, 0, NULL, 16);
if (sstfb_check_var(&info->var, info)) {
printk(KERN_ERR "sstfb: invalid video mode.\n");
goto fail;
}
if (sstfb_set_par(info)) {
printk(KERN_ERR "sstfb: can't set default video mode.\n");
goto fail;
}
if (fb_alloc_cmap(&info->cmap, 256, 0)) {
printk(KERN_ERR "sstfb: can't alloc cmap memory.\n");
goto fail;
}
/* register fb */
info->device = &pdev->dev;
if (register_framebuffer(info) < 0) {
printk(KERN_ERR "sstfb: can't register framebuffer.\n");
goto fail_register;
}
sstfb_clear_screen(info);
if (device_create_file(info->dev, &device_attrs[0]))
printk(KERN_WARNING "sstfb: can't create sysfs entry.\n");
printk(KERN_INFO "fb%d: %s frame buffer device at 0x%p\n",
info->node, fix->id, info->screen_base);
return 0;
fail_register:
fb_dealloc_cmap(&info->cmap);
fail:
iounmap(info->screen_base);
fail_fb_remap:
iounmap(par->mmio_vbase);
fail_mmio_remap:
release_mem_region(fix->smem_start, 0x400000);
fail_fb_mem:
release_mem_region(fix->mmio_start, info->fix.mmio_len);
fail_mmio_mem:
framebuffer_release(info);
return -ENXIO; /* no voodoo detected */
}
static void __devexit sstfb_remove(struct pci_dev *pdev)
{
struct sstfb_par *par;
struct fb_info *info;
info = pci_get_drvdata(pdev);
par = info->par;
device_remove_file(info->dev, &device_attrs[0]);
sst_shutdown(info);
iounmap(info->screen_base);
iounmap(par->mmio_vbase);
release_mem_region(info->fix.smem_start, 0x400000);
release_mem_region(info->fix.mmio_start, info->fix.mmio_len);
fb_dealloc_cmap(&info->cmap);
unregister_framebuffer(info);
framebuffer_release(info);
}
static const struct pci_device_id sstfb_id_tbl[] = {
{ PCI_DEVICE(PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_VOODOO ),
.driver_data = ID_VOODOO1, },
{ PCI_DEVICE(PCI_VENDOR_ID_3DFX, PCI_DEVICE_ID_3DFX_VOODOO2),
.driver_data = ID_VOODOO2, },
{ 0 },
};
static struct pci_driver sstfb_driver = {
.name = "sstfb",
.id_table = sstfb_id_tbl,
.probe = sstfb_probe,
.remove = __devexit_p(sstfb_remove),
};
static int __devinit sstfb_init(void)
{
char *option = NULL;
if (fb_get_options("sstfb", &option))
return -ENODEV;
sstfb_setup(option);
return pci_register_driver(&sstfb_driver);
}
static void __devexit sstfb_exit(void)
{
pci_unregister_driver(&sstfb_driver);
}
module_init(sstfb_init);
module_exit(sstfb_exit);
MODULE_AUTHOR("(c) 2000,2002 Ghozlane Toumi <[email protected]>");
MODULE_DESCRIPTION("FBDev driver for 3dfx Voodoo Graphics and Voodoo2 based video boards");
MODULE_LICENSE("GPL");
module_param(mem, int, 0);
MODULE_PARM_DESC(mem, "Size of frame buffer memory in MB (1, 2, 4 MB, default=autodetect)");
module_param(vgapass, bool, 0);
MODULE_PARM_DESC(vgapass, "Enable VGA PassThrough mode (0 or 1) (default=0)");
module_param(clipping, bool, 0);
MODULE_PARM_DESC(clipping, "Enable clipping (slower, safer) (0 or 1) (default=1)");
module_param(gfxclk, int, 0);
MODULE_PARM_DESC(gfxclk, "Force graphic chip frequency in MHz. DANGEROUS. (default=auto)");
module_param(slowpci, bool, 0);
MODULE_PARM_DESC(slowpci, "Uses slow PCI settings (0 or 1) (default=0)");
module_param(mode_option, charp, 0);
MODULE_PARM_DESC(mode_option, "Initial video mode (default=" DEFAULT_VIDEO_MODE ")");
| {
"pile_set_name": "Github"
} |
import { Intent, ContextModule } from "@artsy/cohesion"
import { FollowGeneButtonMutation } from "__generated__/FollowGeneButtonMutation.graphql"
import * as Artsy from "Artsy"
import { ModalOptions, ModalType } from "Components/Authentication/Types"
import { extend } from "lodash"
import React from "react"
import {
commitMutation,
createFragmentContainer,
graphql,
RelayProp,
} from "react-relay"
import track, { TrackingProp } from "react-tracking"
import { FollowGeneButton_gene } from "../../__generated__/FollowGeneButton_gene.graphql"
import { FollowButtonDeprecated } from "./ButtonDeprecated"
import { FollowTrackingData } from "./Typings"
interface Props
extends React.HTMLProps<FollowGeneButton>,
Artsy.SystemContextProps {
relay?: RelayProp
gene?: FollowGeneButton_gene
tracking?: TrackingProp
trackingData?: FollowTrackingData
onOpenAuthModal?: (type: ModalType, config?: ModalOptions) => void
}
export class FollowGeneButton extends React.Component<Props> {
trackFollow = () => {
const {
tracking,
gene: { is_followed },
} = this.props
const trackingData: FollowTrackingData = this.props.trackingData || {}
const action = is_followed ? "Unfollowed Gene" : "Followed Gene"
tracking.trackEvent(extend({ action }, trackingData))
}
handleFollow = () => {
const { gene, user, relay, onOpenAuthModal } = this.props
const trackingData: FollowTrackingData = this.props.trackingData || {}
if (user && user.id) {
commitMutation<FollowGeneButtonMutation>(relay.environment, {
mutation: graphql`
mutation FollowGeneButtonMutation($input: FollowGeneInput!) {
followGene(input: $input) {
gene {
id
is_followed: isFollowed
}
}
}
`,
variables: {
input: {
geneID: gene.internalID,
},
},
optimisticResponse: {
followGene: {
gene: {
id: gene.id,
is_followed: !gene.is_followed,
},
},
},
})
this.trackFollow()
} else {
onOpenAuthModal &&
onOpenAuthModal(ModalType.signup, {
contextModule: ContextModule.intextTooltip,
intent: Intent.followGene,
copy: "Sign up to follow categories",
afterSignUpAction: {
action: "follow",
kind: "gene",
objectId: (gene && gene.internalID) || trackingData.entity_slug,
},
})
}
}
render() {
const { gene } = this.props
return (
<FollowButtonDeprecated
isFollowed={gene && gene.is_followed}
handleFollow={this.handleFollow}
/>
)
}
}
export const FollowGeneButtonFragmentContainer = track({})(
createFragmentContainer(Artsy.withSystemContext(FollowGeneButton), {
gene: graphql`
fragment FollowGeneButton_gene on Gene {
id
internalID
is_followed: isFollowed
}
`,
})
)
| {
"pile_set_name": "Github"
} |
all: hoppity
hoppity: hoppity.cc
g++ -o hoppity hoppity.cc -Wall -W -O2
| {
"pile_set_name": "Github"
} |
---
title: DATE
summary: The DATE data type stores a year, month, and day.
toc: true
---
The `DATE` [data type](data-types.html) stores a year, month, and day.
## Syntax
A constant value of type `DATE` can be expressed using an
[interpreted literal](sql-constants.html#interpreted-literals), or a
string literal
[annotated with](sql-expressions.html#explicitly-typed-expressions)
type `DATE` or
[coerced to](sql-expressions.html#explicit-type-coercions) type
`DATE`.
The string format for dates is `YYYY-MM-DD`. For example: `DATE '2016-12-23'`.
CockroachDB also supports using uninterpreted
[string literals](sql-constants.html#string-literals) in contexts
where a `DATE` value is otherwise expected.
## Size
A `DATE` column supports values up to 8 bytes in width, but the total storage size is likely to be larger due to CockroachDB metadata.
## Examples
~~~ sql
> CREATE TABLE dates (a DATE PRIMARY KEY, b INT);
> SHOW COLUMNS FROM dates;
~~~
~~~
+-------+------+-------+---------+
| Field | Type | Null | Default |
+-------+------+-------+---------+
| a | DATE | false | NULL |
| b | INT | true | NULL |
+-------+------+-------+---------+
~~~
~~~ sql
> -- explicitly typed DATE literal
> INSERT INTO dates VALUES (DATE '2016-03-26', 12345);
> -- string literal implicitly typed as DATE
> INSERT INTO dates VALUES ('2016-03-27', 12345);
> SELECT * FROM dates;
~~~
~~~
+---------------------------+-------+
| a | b |
+---------------------------+-------+
| 2016-03-26 00:00:00+00:00 | 12345 |
| 2016-03-27 00:00:00+00:00 | 12345 |
+---------------------------+-------+
~~~
## Supported Casting & Conversion
`DATE` values can be [cast](data-types.html#data-type-conversions-casts) to any of the following data types:
Type | Details
-----|--------
`INT` | Converts to number of days since the Unix epoch (Jan. 1, 1970). This is a CockroachDB experimental feature which may be changed without notice.
`DECIMAL` | Converts to number of days since the Unix epoch (Jan. 1, 1970). This is a CockroachDB experimental feature which may be changed without notice.
`FLOAT` | Converts to number of days since the Unix epoch (Jan. 1, 1970). This is a CockroachDB experimental feature which may be changed without notice.
`TIMESTAMP` | Sets the time to 00:00 (midnight) in the resulting timestamp
`STRING` | ––
{{site.data.alerts.callout_info}}Because the <a href="serial.html"><code>SERIAL</code> data type</a> represents values automatically generated by CockroachDB to uniquely identify rows, you cannot meaningfully cast other data types as <code>SERIAL</code> values.{{site.data.alerts.end}}
## See Also
[Data Types](data-types.html)
| {
"pile_set_name": "Github"
} |
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 2015
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_PREDEF_HARDWARE_SIMD_X86_H
#define BOOST_PREDEF_HARDWARE_SIMD_X86_H
#include <boost/predef/version_number.h>
#include <boost/predef/hardware/simd/x86/versions.h>
/*`
[heading `BOOST_HW_SIMD_X86`]
The SIMD extension for x86 (*if detected*).
Version number depends on the most recent detected extension.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__SSE__`] [__predef_detection__]]
[[`_M_X64`] [__predef_detection__]]
[[`_M_IX86_FP >= 1`] [__predef_detection__]]
[[`__SSE2__`] [__predef_detection__]]
[[`_M_X64`] [__predef_detection__]]
[[`_M_IX86_FP >= 2`] [__predef_detection__]]
[[`__SSE3__`] [__predef_detection__]]
[[`__SSSE3__`] [__predef_detection__]]
[[`__SSE4_1__`] [__predef_detection__]]
[[`__SSE4_2__`] [__predef_detection__]]
[[`__AVX__`] [__predef_detection__]]
[[`__FMA__`] [__predef_detection__]]
[[`__AVX2__`] [__predef_detection__]]
]
[table
[[__predef_symbol__] [__predef_version__]]
[[`__SSE__`] [BOOST_HW_SIMD_X86_SSE_VERSION]]
[[`_M_X64`] [BOOST_HW_SIMD_X86_SSE_VERSION]]
[[`_M_IX86_FP >= 1`] [BOOST_HW_SIMD_X86_SSE_VERSION]]
[[`__SSE2__`] [BOOST_HW_SIMD_X86_SSE2_VERSION]]
[[`_M_X64`] [BOOST_HW_SIMD_X86_SSE2_VERSION]]
[[`_M_IX86_FP >= 2`] [BOOST_HW_SIMD_X86_SSE2_VERSION]]
[[`__SSE3__`] [BOOST_HW_SIMD_X86_SSE3_VERSION]]
[[`__SSSE3__`] [BOOST_HW_SIMD_X86_SSSE3_VERSION]]
[[`__SSE4_1__`] [BOOST_HW_SIMD_X86_SSE4_1_VERSION]]
[[`__SSE4_2__`] [BOOST_HW_SIMD_X86_SSE4_2_VERSION]]
[[`__AVX__`] [BOOST_HW_SIMD_X86_AVX_VERSION]]
[[`__FMA__`] [BOOST_HW_SIMD_X86_FMA3_VERSION]]
[[`__AVX2__`] [BOOST_HW_SIMD_X86_AVX2_VERSION]]
]
*/
#define BOOST_HW_SIMD_X86 BOOST_VERSION_NUMBER_NOT_AVAILABLE
#undef BOOST_HW_SIMD_X86
#if !defined(BOOST_HW_SIMD_X86) && defined(__MIC__)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_MIC_VERSION
#endif
#if !defined(BOOST_HW_SIMD_X86) && defined(__AVX2__)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_AVX2_VERSION
#endif
#if !defined(BOOST_HW_SIMD_X86) && defined(__AVX__)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_AVX_VERSION
#endif
#if !defined(BOOST_HW_SIMD_X86) && defined(__FMA__)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_FMA_VERSION
#endif
#if !defined(BOOST_HW_SIMD_X86) && defined(__SSE4_2__)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE4_2_VERSION
#endif
#if !defined(BOOST_HW_SIMD_X86) && defined(__SSE4_1__)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE4_1_VERSION
#endif
#if !defined(BOOST_HW_SIMD_X86) && defined(__SSSE3__)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSSE3_VERSION
#endif
#if !defined(BOOST_HW_SIMD_X86) && defined(__SSE3__)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE3_VERSION
#endif
#if !defined(BOOST_HW_SIMD_X86) && (defined(__SSE2__) || defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2))
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE2_VERSION
#endif
#if !defined(BOOST_HW_SIMD_X86) && (defined(__SSE__) || defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP >= 1))
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_SSE_VERSION
#endif
#if !defined(BOOST_HW_SIMD_X86) && defined(__MMX__)
# define BOOST_HW_SIMD_X86 BOOST_HW_SIMD_X86_MMX_VERSION
#endif
#if !defined(BOOST_HW_SIMD_X86)
# define BOOST_HW_SIMD_X86 BOOST_VERSION_NUMBER_NOT_AVAILABLE
#else
# define BOOST_HW_SIMD_X86_AVAILABLE
#endif
#define BOOST_HW_SIMD_X86_NAME "x86 SIMD"
#endif
#include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_HW_SIMD_X86, BOOST_HW_SIMD_X86_NAME)
| {
"pile_set_name": "Github"
} |
// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) INRIA - F. Delebecque
//
// Copyright (C) 2012 - 2016 - Scilab Enterprises
//
// This file is hereby licensed under the terms of the GNU GPL v2.0,
// pursuant to article 5.3.4 of the CeCILL v.2.1.
// This file was originally licensed under the terms of the CeCILL v2.1,
// and continues to be available under such terms.
// For more information, see the COPYING file which you should have received
// along with this program.
function [ac,bc,u,ind]=canon(a,b)
//[ac,bc,u,ind]=canon(a,b) gives the canonical controllable form
//of the pair (a,b).
//
//ind controllability indices,
//ac,bc canonical form
//u current basis i.e. ac=inv(u)*a*u,bc=inv(u)*b
//
//See also : obsv_mat, cont_mat, ctr_gram, contrss
//!
//1: block-hessenberg form
// Was : [ac,bc,u,ro]=contr(a,b,[1.d-10*norm([a,b],1),1.d-10]);
[n,u,ro,V,ac,bc]=contr(a,b,1.d-10*norm([a,b],1));
//2:zeroing what is to the right of under-diagonal blocks
[na,ni]=size(b);[l,k]=size(ro);k0=na+1;k1=k0-ro(k);
for kk=k:-1:2,
k2=k1-ro(kk-1);rows=k1:k0-1;cols=k1:na;intsc=k2:k1-1;
i=eye(na,na);i(intsc,cols)=-ac(rows,intsc)\ac(rows,cols);
im1=2*eye()-i;ac=im1*ac*i,bc=im1*bc;u=u*i;k0=k1;k1=k2;
end;
//3: compression of under-the-diagonal blocks
i=eye(na,na);n=1;m=ro(1)+1;
for kk=1:k-1,
c=n:n+ro(kk)-1;z=ac(m:m+ro(kk+1)-1,c);
[x,s,v]=svd(z);i(c,c)=v;n=n+ro(kk);m=m+ro(kk+1);
end;
ac=i'*ac*i,bc=i'*bc;u=u*i;
//4. normalization of blocks
j=eye(na,na);i=eye(na,na);k0=na+1;k1=k0-ro(k);
for kk=k:-1:2,
k2=k1-ro(kk-1);rows=k1:k0-1;long=k2:k2+k0-k1-1;
i=eye(na,na);j=eye(na,na);
z=ac(rows,long);j(long,long)=z;
i(long,long)=inv(z);
ac=j*ac*i,bc=j*bc;u=u*i;k0=k1;k1=k2;
end;
// controllability indices
ind = zeros(1, ni);
[xx, mi] = size(ro);
for k=1:ni,for kk=1:mi,
if ro(kk)>=k then ind(k)=ind(k)+1;end;
end;end
//final permutation:
v=ones(1,na);
for k=1:ind(1)-1,
index=sum(ro(1:k))+1;v(k+1)=index;
end;
k0=1;kmin=ind(1)+1;
for kk=2:ni,
numb=ind(kk);
kmax=kmin+numb-1;
v(kmin:kmax)=v(k0:k0+numb-1)+ones(1,ind(kk));
k0=kmin;kmin=kmax+1;
end;
ac=ac(v,v),bc=bc(v,:),u=u(:,v);
endfunction
| {
"pile_set_name": "Github"
} |
import {Component, EventEmitter, Input, OnDestroy, OnInit, Output} from '@angular/core';
import {Router} from '@angular/router';
import {UserAnalyticsService} from '../../../user-analytics/services/user-analytics.service';
@Component({
selector: 'app-empty-state',
styleUrls: ['./empty-state.scss'],
templateUrl: './empty-state.html'
})
export class EmptyStateComponent implements OnInit, OnDestroy {
@Input()
public title: string;
@Input()
public icon: string;
@Input()
public ctaText: string;
@Input()
public ctaIcon: string;
@Input()
public ctaLink: string;
@Output()
public ctaClick: EventEmitter<any>;
constructor(private router: Router, private userAnalyticsService: UserAnalyticsService) {
this.ctaClick = new EventEmitter<any>();
}
public click() {
if (this.ctaLink) {
this.router.navigateByUrl(this.ctaLink);
}
this.ctaClick.emit();
this.userAnalyticsService.trackEvent(
'empty_state',
`cta_click_${this.ctaText}`,
'app-empty-state');
}
ngOnInit(): void {
}
ngOnDestroy() {
}
}
| {
"pile_set_name": "Github"
} |
#!/usr/bin/env php
<?php
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Console\Output\ConsoleOutput;
/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| First we need to get an application instance. This creates an instance
| of the application / container and bootstraps the application so it
| is ready to receive HTTP / Console requests from the environment.
|
*/
$app = require __DIR__.'/bootstrap/app.php';
/*
|--------------------------------------------------------------------------
| Run The Artisan Application
|--------------------------------------------------------------------------
|
| When we run the console application, the current CLI command will be
| executed in this console and the response sent back to a terminal
| or another output device for the developers. Here goes nothing!
|
*/
$kernel = $app->make(
'Illuminate\Contracts\Console\Kernel'
);
exit($kernel->handle(new ArgvInput, new ConsoleOutput));
| {
"pile_set_name": "Github"
} |
<?php
/**
* Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
* CC-BY License - http://creativecommons.org/licenses/by/3.0/
*/
$sLangCategory = 'Profiler';
$aLangContent = array(
);
| {
"pile_set_name": "Github"
} |
// Copyright 2015 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package pkcs12
import (
"errors"
"unicode/utf16"
)
// bmpString returns s encoded in UCS-2 with a zero terminator.
func bmpString(s string) ([]byte, error) {
// References:
// https://tools.ietf.org/html/rfc7292#appendix-B.1
// https://en.wikipedia.org/wiki/Plane_(Unicode)#Basic_Multilingual_Plane
// - non-BMP characters are encoded in UTF 16 by using a surrogate pair of 16-bit codes
// EncodeRune returns 0xfffd if the rune does not need special encoding
// - the above RFC provides the info that BMPStrings are NULL terminated.
ret := make([]byte, 0, 2*len(s)+2)
for _, r := range s {
if t, _ := utf16.EncodeRune(r); t != 0xfffd {
return nil, errors.New("pkcs12: string contains characters that cannot be encoded in UCS-2")
}
ret = append(ret, byte(r/256), byte(r%256))
}
return append(ret, 0, 0), nil
}
func decodeBMPString(bmpString []byte) (string, error) {
if len(bmpString)%2 != 0 {
return "", errors.New("pkcs12: odd-length BMP string")
}
// strip terminator if present
if l := len(bmpString); l >= 2 && bmpString[l-1] == 0 && bmpString[l-2] == 0 {
bmpString = bmpString[:l-2]
}
s := make([]uint16, 0, len(bmpString)/2)
for len(bmpString) > 0 {
s = append(s, uint16(bmpString[0])<<8+uint16(bmpString[1]))
bmpString = bmpString[2:]
}
return string(utf16.Decode(s)), nil
}
| {
"pile_set_name": "Github"
} |
import React from 'react'
import PropTypes from 'prop-types'
import { Button, Form, Input, Message } from 'semantic-ui-react'
import { parcelType } from 'components/types'
import TxStatus from 'components/TxStatus'
import { t } from '@dapps/modules/translation/utils'
import {
isValidName,
isValidDescription,
MAX_NAME_LENGTH,
MAX_DESCRIPTION_LENGTH
} from 'shared/asset'
import { preventDefault } from 'lib/utils'
import './EditParcelForm.css'
export default class EditParcelForm extends React.PureComponent {
static propTypes = {
parcel: parcelType.isRequired,
isTxIdle: PropTypes.bool,
onSubmit: PropTypes.func.isRequired,
onCancel: PropTypes.func.isRequired
}
constructor(props) {
super(props)
const { data } = this.props.parcel
this.state = {
name: data.name || '',
description: data.description || '',
ipns: data.ipns || '',
formErrors: []
}
}
handleNameChange = event => {
this.setState({ name: event.target.value, formErrors: [] })
}
handleDescriptionChange = event => {
this.setState({ description: event.target.value, formErrors: [] })
}
handleIpnsChange = event => {
this.setState({ ipns: event.target.value, formErrors: [] })
}
handleSubmit = () => {
if (this.hasChanged()) {
const { parcel, onSubmit } = this.props
const { name, description, ipns } = this.state
const formErrors = []
if (!this.isValidName(name)) {
formErrors.push(
name.length === 0
? t('asset_edit.errors.name_min_limit')
: t('asset_edit.errors.name_max_limit', {
length: MAX_NAME_LENGTH
})
)
}
if (!this.isValidDescription(description)) {
formErrors.push(
t('asset_edit.errors.description_limit', {
length: MAX_DESCRIPTION_LENGTH
})
)
}
if (formErrors.length === 0) {
onSubmit({
...parcel,
data: {
...parcel.data,
name,
description,
ipns
}
})
} else {
this.setState({ formErrors })
}
}
}
handleCancel = () => {
this.props.onCancel()
}
hasChanged() {
const { name = '', description = '', ipns = '' } = this.props.parcel.data
return (
this.state.name !== name ||
this.state.description !== description ||
this.state.ipns !== ipns
)
}
isValidName(name) {
return !this.hasChanged() || isValidName(name)
}
isValidDescription(description) {
return !this.hasChanged() || isValidDescription(description)
}
handleClearFormErrors = () => {
this.setState({ formErrors: [] })
}
render() {
const { isTxIdle } = this.props
const { name, description, ipns, formErrors } = this.state
return (
<Form
className="EditParcelForm"
error={!!formErrors}
onSubmit={preventDefault(this.handleSubmit)}
>
<Form.Field>
<label>{t('parcel_edit.name')}</label>
<Input
type="text"
value={name}
onChange={this.handleNameChange}
error={!this.isValidName(name)}
autoFocus
/>
</Form.Field>
<Form.Field>
<label>{t('parcel_edit.description')}</label>
<Input
type="text"
value={description}
onChange={this.handleDescriptionChange}
error={!this.isValidDescription(description)}
/>
</Form.Field>
<Form.Field>
<label>{t('parcel_edit.ipns')}</label>
<Input
type="text"
icon="warning sign"
value={ipns}
onChange={this.handleIpnsChange}
className="ipns-input"
/>
<span
className="warning-tooltip"
data-balloon={t('parcel_edit.warning_tooltip')}
data-balloon-pos="up"
/>
</Form.Field>
<TxStatus.Idle isIdle={isTxIdle} />
{formErrors.length > 0 ? (
<Message error onDismiss={this.handleClearFormErrors}>
{formErrors.map((error, index) => <div key={index}>{error}</div>)}
</Message>
) : null}
<div className="modal-buttons">
<Button type="button" onClick={this.handleCancel}>
{t('global.cancel')}
</Button>
<Button type="submit" primary={true} disabled={!this.hasChanged()}>
{t('global.submit')}
</Button>
</div>
</Form>
)
}
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2010-2019 Evolveum and contributors
~
~ This work is dual-licensed under the Apache License 2.0
~ and European Union Public License. See LICENSE file for details.
-->
<c:objects xmlns="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:c="http://midpoint.evolveum.com/xml/ns/public/common/common-3"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:q="http://prism.evolveum.com/xml/ns/public/query-3"
xmlns:ri="http://midpoint.evolveum.com/xml/ns/public/resource/instance-3"
xmlns:icfc="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/connector-schema-3">
<c:resource oid="10000000-9999-9999-0000-a000ff000002">
<c:name>CSV-1 (Document Access)</c:name>
<connectorRef type="ConnectorType">
<filter>
<q:equal>
<q:path>c:connectorType</q:path>
<q:value>com.evolveum.polygon.connector.csv.CsvConnector</q:value>
</q:equal>
</filter>
</connectorRef>
<c:connectorConfiguration>
<icfc:configurationProperties xmlns:icfcsv="http://midpoint.evolveum.com/xml/ns/public/connector/icf-1/bundle/com.evolveum.polygon.connector-csv/com.evolveum.polygon.connector.csv.CsvConnector">
<icfcsv:filePath>/opt/training/midpoint-labs/flatfiles/csv-1.csv</icfcsv:filePath>
<icfcsv:encoding>utf-8</icfcsv:encoding>
<icfcsv:quoteMode>ALL</icfcsv:quoteMode>
<icfcsv:quote>"</icfcsv:quote>
<icfcsv:fieldDelimiter>,</icfcsv:fieldDelimiter>
<icfcsv:multivalueDelimiter>;</icfcsv:multivalueDelimiter>
<icfcsv:uniqueAttribute>login</icfcsv:uniqueAttribute>
<icfcsv:passwordAttribute>password</icfcsv:passwordAttribute>
</icfc:configurationProperties>
</c:connectorConfiguration>
<schemaHandling>
<objectType>
<kind>account</kind>
<intent>default</intent>
<displayName>Default Account</displayName>
<default>true</default>
<objectClass>ri:AccountObjectClass</objectClass>
<attribute>
<ref>ri:login</ref>
<displayName>Login</displayName>
<limitations>
<minOccurs>0</minOccurs>
</limitations>
<outbound>
<source>
<path>givenName</path>
</source>
<source>
<path>familyName</path>
</source>
<expression>
<script>
<code>
tmpGivenNameInitial = basic.stringify(givenName)?.size() > 0 ? (basic.stringify(givenName)).substring(0,1) : ''
basic.norm(tmpGivenNameInitial + basic.stringify(familyName))?.replace(' ', '')
</code>
</script>
</expression>
</outbound>
</attribute>
<attribute>
<ref>ri:enumber</ref>
<displayName>Employee Number</displayName>
<description>Definition of Employee Number attribute handling.</description>
<outbound>
<source>
<path>employeeNumber</path>
</source>
</outbound>
</attribute>
<attribute>
<ref>ri:fname</ref>
<displayName>First name</displayName>
<description>Definition of Firstname attribute handling.</description>
<outbound>
<source>
<path>givenName</path>
</source>
</outbound>
</attribute>
<attribute>
<ref>ri:lname</ref>
<displayName>Last name</displayName>
<description>Definition of Lastname attribute handling.</description>
<outbound>
<strength>strong</strength>
<source>
<path>familyName</path>
</source>
<expression>
<script>
<code>basic.uc(basic.stringify(familyName))</code>
</script>
</expression>
</outbound>
</attribute>
<attribute>
<ref>ri:dep</ref>
<displayName>Department</displayName>
<description>Definition of Department attribute handling.</description>
<outbound>
<source>
<path>organizationalUnit</path>
</source>
</outbound>
</attribute>
<attribute>
<ref>ri:groups</ref>
<displayName>Groups</displayName>
<description>Definition of Group attribute handling.</description>
<limitations>
<minOccurs>0</minOccurs>
<maxOccurs>unbounded</maxOccurs>
</limitations>
<tolerant>false</tolerant>
</attribute>
<attribute>
<ref>ri:phone</ref>
<displayName>Phone Number</displayName>
<description>Phone number must be without any spaces on this system</description>
<outbound>
<source>
<path>telephoneNumber</path>
</source>
<expression>
<script>
<code>basic.stringify(telephoneNumber)?.replace(' ', '')?.replace('/', '')</code>
</script>
</expression>
</outbound>
</attribute>
<!-- BONUS LAB, part 2 of 2: uncomment the following section -->
<!--
<iteration>
<maxIterations>5</maxIterations>
</iteration>
-->
<!-- BONUS LAB, part 2 of 2: end of comment -->
<protected>
<filter>
<q:equal>
<q:matching>http://prism.evolveum.com/xml/ns/public/matching-rule-3#stringIgnoreCase</q:matching>
<q:path>attributes/ri:login</q:path>
<q:value>admin</q:value>
</q:equal>
</filter>
</protected>
<activation>
<!-- MID-101, LAB 5-5, part 1 of 2: Uncomment the section to use disable instead of delete -->
<!--
<existence>
<outbound>
<expression>
<path>$focusExists</path>
</expression>
</outbound>
</existence>
-->
<!-- MID-101, LAB 5-5, part 1 of 2: end of comment -->
<administrativeStatus>
<outbound>
<!-- MID-101, LAB 5-5, part 2 of 2: Uncomment the section to use disable instead of delete -->
<!--
<expression>
<script>
<code>
import com.evolveum.midpoint.xml.ns._public.common.common_3.ActivationStatusType;
if (legal && assigned) {
input;
} else {
ActivationStatusType.DISABLED;
}
</code>
</script>
</expression>
-->
<!-- MID-101, LAB 5-5, part 2 of 2: end of comment -->
</outbound>
</administrativeStatus>
</activation>
<credentials>
<password>
<outbound/>
<!--<passwordPolicyRef oid="81818181-76e0-59e2-8888-3d4f02d3ffff" type="c:ValuePolicyType"/>-->
</password>
</credentials>
</objectType>
<!-- MID-101, LAB 6-1, part 1 of 2: Uncomment the section to use second intent -->
<!--
<objectType>
<kind>account</kind>
<intent>test</intent>
<displayName>Test Account</displayName>
<default>false</default>
<objectClass>ri:AccountObjectClass</objectClass>
<attribute>
<ref>ri:login</ref>
<displayName>Login</displayName>
<limitations>
<minOccurs>0</minOccurs>
</limitations>
<outbound>
<source>
<path>name</path>
</source>
<expression>
<script>
<code>'_' + basic.norm(name)</code>
</script>
</expression>
</outbound>
</attribute>
<attribute>
<ref>ri:enumber</ref>
<displayName>Employee Number</displayName>
<description>Definition of Employee Number attribute handling.</description>
<outbound>
<source>
<path>employeeNumber</path>
</source>
</outbound>
</attribute>
<attribute>
<ref>ri:fname</ref>
<displayName>First name</displayName>
<description>Definition of Firstname attribute handling.</description>
<outbound>
<source>
<path>givenName</path>
</source>
</outbound>
</attribute>
<attribute>
<ref>ri:lname</ref>
<displayName>Last name</displayName>
<description>Definition of Lastname attribute handling.</description>
<outbound>
<source>
<path>familyName</path>
</source>
</outbound>
</attribute>
<attribute>
<ref>ri:dep</ref>
<displayName>Department</displayName>
<description>Definition of Department attribute handling.</description>
<outbound>
<source>
<path>organizationalUnit</path>
</source>
</outbound>
</attribute>
<attribute>
<ref>ri:groups</ref>
<displayName>Groups</displayName>
<description>Definition of Group attribute handling.</description>
<limitations>
<minOccurs>0</minOccurs>
<maxOccurs>unbounded</maxOccurs>
</limitations>
<tolerant>false</tolerant>
</attribute>
<attribute>
<ref>ri:phone</ref>
<displayName>Phone Number</displayName>
<description>Phone number must be without any spaces on this system</description>
<outbound>
<source>
<path>telephoneNumber</path>
</source>
<expression>
<script>
<code>basic.stringify(telephoneNumber)?.replace(' ', '')?.replace('/', '')</code>
</script>
</expression>
</outbound>
</attribute>
<protected>
<filter>
<q:equal>
<q:matching>http://prism.evolveum.com/xml/ns/public/matching-rule-3#stringIgnoreCase</q:matching>
<q:path>attributes/ri:login</q:path>
<q:value>admin</q:value>
</q:equal>
</filter>
</protected>
<activation>
<administrativeStatus>
<outbound/>
</administrativeStatus>
</activation>
<credentials>
<password>
<outbound>
<expression>
<asIs/>
</expression>
</outbound>
</password>
</credentials>
</objectType>
-->
<!-- MID-101, LAB 6-1, part 1 of 2: end of comment -->
</schemaHandling>
<capabilities xmlns:cap="http://midpoint.evolveum.com/xml/ns/public/resource/capabilities-3">
<configured>
<cap:activation>
<cap:status>
<cap:attribute>ri:dis</cap:attribute>
<cap:enableValue>false</cap:enableValue>
<cap:disableValue>true</cap:disableValue>
</cap:status>
</cap:activation>
<cap:countObjects>
<cap:simulate>sequentialSearch</cap:simulate>
</cap:countObjects>
</configured>
</capabilities>
<synchronization>
<objectSynchronization>
<name>Default account</name>
<description>The default account name does NOT start with "_"</description>
<kind>account</kind>
<intent>default</intent>
<enabled>true</enabled>
<condition>
<script>
<code>
// name = basic.lc(projection.getName().toString())
name = basic.getAttributeValue(projection, "login")
//log.info("XXX Synchronization condition for account/default; name (getName()) = {}; name (getAttributeValue) = {}; evaluated to {}", projection.getName(), name, !name?.startsWith('_'))
return !name?.startsWith('_')
</code>
</script>
</condition>
<correlation>
<q:description>
Correlation expression is a search query.
Following search queury will look for users that have "employeeNumber"
equal to the "enumber" attribute of the account.
The condition will ensure that "enumber" is not
empty, otherwise it would match any midPoint user
with empty "employeeNumber" attribute, such as "administrator".
The correlation rule by default looks for users, so it will not match
any other object type.
</q:description>
<q:equal>
<q:path>c:employeeNumber</q:path>
<expression>
<path>$projection/attributes/ri:enumber</path>
</expression>
</q:equal>
<condition>
<script>
<code>basic.getAttributeValue(projection, 'enumber') != null</code>
</script>
</condition>
</correlation>
<reaction>
<situation>linked</situation>
<synchronize>true</synchronize>
</reaction>
<reaction>
<situation>deleted</situation>
<synchronize>true</synchronize>
<action>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlink</handlerUri>
</action>
</reaction>
<reaction>
<situation>unlinked</situation>
<synchronize>true</synchronize>
<action>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#link</handlerUri>
</action>
</reaction>
<reaction>
<situation>unmatched</situation>
<synchronize>true</synchronize>
<action>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#inactivateShadow</handlerUri>
</action>
</reaction>
</objectSynchronization>
<!-- MID-101, LAB 6-1, part 2 of 2: Uncomment the section to use second intent -->
<!--
<objectSynchronization>
<name>Test account</name>
<description>The test account name starts with "_"</description>
<kind>account</kind>
<intent>test</intent>
<enabled>true</enabled>
<condition>
<script>
<code>
// name = basic.lc(projection.getName().toString())
name = basic.getAttributeValue(projection, "login")
//log.info("XXX Synchronization condition for account/test; name (getName()) = {}; name (getAttribute) = {}; evaluated to {}", projection.getName(), name, name.startsWith('_'))
return name?.startsWith('_')
</code>
</script>
</condition>
<correlation>
<q:description>
Correlation expression is a search query.
Following search queury will look for users that have "name"
equal to the account name without the first character. We assume that
the first character is "_" because of the condition above.
The correlation rule by default looks for users, so it will not match
any other object type.
</q:description>
<q:equal>
<q:matching>polyStringNorm</q:matching>
<q:path>c:name</q:path>
<expression>
<script>
<code>
n = projection.getName().toString()
n.substring(1)
</code>
</script>
</expression>
</q:equal>
</correlation>
<reaction>
<situation>linked</situation>
<synchronize>true</synchronize>
</reaction>
<reaction>
<situation>deleted</situation>
<synchronize>true</synchronize>
<action>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#unlink</handlerUri>
</action>
</reaction>
<reaction>
<situation>unlinked</situation>
<synchronize>true</synchronize>
<action>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#link</handlerUri>
</action>
</reaction>
<reaction>
<situation>unmatched</situation>
<synchronize>true</synchronize>
<action>
<handlerUri>http://midpoint.evolveum.com/xml/ns/public/model/action-3#inactivateShadow</handlerUri>
</action>
</reaction>
</objectSynchronization>
-->
<!-- MID-101, LAB 6-1, part 2 of 2: end of comment -->
</synchronization>
</c:resource>
</c:objects>
| {
"pile_set_name": "Github"
} |
module.exports = require('./getOr');
| {
"pile_set_name": "Github"
} |
//
// This file defines additional configuration options that are appropriate only
// for a static library on iOS. This should be set at the target level for each
// project configuration.
//
// Import base static library settings
#include "../Base/Targets/StaticLibrary.xcconfig"
// Apply common settings specific to iOS
#include "iOS-Base.xcconfig"
// Supported device families (1 is iPhone, 2 is iPad)
TARGETED_DEVICE_FAMILY = 1,2
| {
"pile_set_name": "Github"
} |
/*!
* jQuery UI CSS Framework 1.12.0
* http://jqueryui.com
*
* Copyright jQuery Foundation and other contributors
* Released under the MIT license.
* http://jquery.org/license
*
* http://api.jqueryui.com/category/theming/
*
* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Segoe%20UI%2CArial%2Csans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=8px&bgColorHeader=817865&bgTextureHeader=gloss_wave&bgImgOpacityHeader=45&borderColorHeader=494437&fcHeader=ffffff&iconColorHeader=fadc7a&bgColorContent=feeebd&bgTextureContent=highlight_soft&bgImgOpacityContent=100&borderColorContent=8e846b&fcContent=383838&iconColorContent=d19405&bgColorDefault=fece2f&bgTextureDefault=gloss_wave&bgImgOpacityDefault=60&borderColorDefault=d19405&fcDefault=4c3000&iconColorDefault=3d3d3d&bgColorHover=ffdd57&bgTextureHover=gloss_wave&bgImgOpacityHover=70&borderColorHover=a45b13&fcHover=381f00&iconColorHover=bd7b00&bgColorActive=ffffff&bgTextureActive=inset_soft&bgImgOpacityActive=30&borderColorActive=655e4e&fcActive=0074c7&iconColorActive=eb990f&bgColorHighlight=fff9e5&bgTextureHighlight=gloss_wave&bgImgOpacityHighlight=90&borderColorHighlight=eeb420&fcHighlight=1f1f1f&iconColorHighlight=ed9f26&bgColorError=d34d17&bgTextureError=diagonals_medium&bgImgOpacityError=20&borderColorError=ffb73d&fcError=ffffff&iconColorError=ffe180&bgColorOverlay=5c5c5c&bgTextureOverlay=flat&bgImgOpacityOverlay=50&opacityOverlay=80&bgColorShadow=cccccc&bgTextureShadow=flat&bgImgOpacityShadow=30&opacityShadow=60&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px
*/
/* Component containers
----------------------------------*/
.ui-widget {
font-family: Segoe UI,Arial,sans-serif;
font-size: 1.1em;
}
.ui-widget .ui-widget {
font-size: 1em;
}
.ui-widget input,
.ui-widget select,
.ui-widget textarea,
.ui-widget button {
font-family: Segoe UI,Arial,sans-serif;
font-size: 1em;
}
.ui-widget.ui-widget-content {
border: 1px solid #d19405;
}
.ui-widget-content {
border: 1px solid #8e846b;
background: #feeebd url("images/ui-bg_highlight-soft_100_feeebd_1x100.png") 50% top repeat-x;
color: #383838;
}
.ui-widget-content a {
color: #383838;
}
.ui-widget-header {
border: 1px solid #494437;
background: #817865 url("images/ui-bg_gloss-wave_45_817865_500x100.png") 50% 50% repeat-x;
color: #ffffff;
font-weight: bold;
}
.ui-widget-header a {
color: #ffffff;
}
/* Interaction states
----------------------------------*/
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default,
.ui-button,
/* We use html here because we need a greater specificity to make sure disabled
works properly when clicked or hovered */
html .ui-button.ui-state-disabled:hover,
html .ui-button.ui-state-disabled:active {
border: 1px solid #d19405;
background: #fece2f url("images/ui-bg_gloss-wave_60_fece2f_500x100.png") 50% 50% repeat-x;
font-weight: bold;
color: #4c3000;
}
.ui-state-default a,
.ui-state-default a:link,
.ui-state-default a:visited,
a.ui-button,
a:link.ui-button,
a:visited.ui-button,
.ui-button {
color: #4c3000;
text-decoration: none;
}
.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover,
.ui-state-focus,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus,
.ui-button:hover,
.ui-button:focus {
border: 1px solid #a45b13;
background: #ffdd57 url("images/ui-bg_gloss-wave_70_ffdd57_500x100.png") 50% 50% repeat-x;
font-weight: bold;
color: #381f00;
}
.ui-state-hover a,
.ui-state-hover a:hover,
.ui-state-hover a:link,
.ui-state-hover a:visited,
.ui-state-focus a,
.ui-state-focus a:hover,
.ui-state-focus a:link,
.ui-state-focus a:visited,
a.ui-button:hover,
a.ui-button:focus {
color: #381f00;
text-decoration: none;
}
.ui-visual-focus {
box-shadow: 0 0 3px 1px rgb(94, 158, 214);
}
.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active,
a.ui-button:active,
.ui-button:active,
.ui-button.ui-state-active:hover {
border: 1px solid #655e4e;
background: #ffffff url("images/ui-bg_inset-soft_30_ffffff_1x100.png") 50% 50% repeat-x;
font-weight: bold;
color: #0074c7;
}
.ui-icon-background,
.ui-state-active .ui-icon-background {
border: #655e4e;
background-color: #0074c7;
}
.ui-state-active a,
.ui-state-active a:link,
.ui-state-active a:visited {
color: #0074c7;
text-decoration: none;
}
/* Interaction Cues
----------------------------------*/
.ui-state-highlight,
.ui-widget-content .ui-state-highlight,
.ui-widget-header .ui-state-highlight {
border: 1px solid #eeb420;
background: #fff9e5 url("images/ui-bg_gloss-wave_90_fff9e5_500x100.png") 50% top repeat-x;
color: #1f1f1f;
}
.ui-state-checked {
border: 1px solid #eeb420;
background: #fff9e5;
}
.ui-state-highlight a,
.ui-widget-content .ui-state-highlight a,
.ui-widget-header .ui-state-highlight a {
color: #1f1f1f;
}
.ui-state-error,
.ui-widget-content .ui-state-error,
.ui-widget-header .ui-state-error {
border: 1px solid #ffb73d;
background: #d34d17 url("images/ui-bg_diagonals-medium_20_d34d17_40x40.png") 50% 50% repeat;
color: #ffffff;
}
.ui-state-error a,
.ui-widget-content .ui-state-error a,
.ui-widget-header .ui-state-error a {
color: #ffffff;
}
.ui-state-error-text,
.ui-widget-content .ui-state-error-text,
.ui-widget-header .ui-state-error-text {
color: #ffffff;
}
.ui-priority-primary,
.ui-widget-content .ui-priority-primary,
.ui-widget-header .ui-priority-primary {
font-weight: bold;
}
.ui-priority-secondary,
.ui-widget-content .ui-priority-secondary,
.ui-widget-header .ui-priority-secondary {
opacity: .7;
filter:Alpha(Opacity=70); /* support: IE8 */
font-weight: normal;
}
.ui-state-disabled,
.ui-widget-content .ui-state-disabled,
.ui-widget-header .ui-state-disabled {
opacity: .35;
filter:Alpha(Opacity=35); /* support: IE8 */
background-image: none;
}
.ui-state-disabled .ui-icon {
filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
}
/* Icons
----------------------------------*/
/* states and images */
.ui-icon {
width: 16px;
height: 16px;
}
.ui-icon,
.ui-widget-content .ui-icon {
background-image: url("images/ui-icons_d19405_256x240.png");
}
.ui-widget-header .ui-icon {
background-image: url("images/ui-icons_fadc7a_256x240.png");
}
.ui-button .ui-icon {
background-image: url("images/ui-icons_3d3d3d_256x240.png");
}
.ui-state-hover .ui-icon,
.ui-state-focus .ui-icon,
.ui-button:hover .ui-icon,
.ui-button:focus .ui-icon,
.ui-state-default .ui-icon {
background-image: url("images/ui-icons_bd7b00_256x240.png");
}
.ui-state-active .ui-icon,
.ui-button:active .ui-icon {
background-image: url("images/ui-icons_eb990f_256x240.png");
}
.ui-state-highlight .ui-icon,
.ui-button .ui-state-highlight.ui-icon {
background-image: url("images/ui-icons_ed9f26_256x240.png");
}
.ui-state-error .ui-icon,
.ui-state-error-text .ui-icon {
background-image: url("images/ui-icons_ffe180_256x240.png");
}
/* positioning */
.ui-icon-blank { background-position: 16px 16px; }
.ui-icon-caret-1-n { background-position: 0 0; }
.ui-icon-caret-1-ne { background-position: -16px 0; }
.ui-icon-caret-1-e { background-position: -32px 0; }
.ui-icon-caret-1-se { background-position: -48px 0; }
.ui-icon-caret-1-s { background-position: -65px 0; }
.ui-icon-caret-1-sw { background-position: -80px 0; }
.ui-icon-caret-1-w { background-position: -96px 0; }
.ui-icon-caret-1-nw { background-position: -112px 0; }
.ui-icon-caret-2-n-s { background-position: -128px 0; }
.ui-icon-caret-2-e-w { background-position: -144px 0; }
.ui-icon-triangle-1-n { background-position: 0 -16px; }
.ui-icon-triangle-1-ne { background-position: -16px -16px; }
.ui-icon-triangle-1-e { background-position: -32px -16px; }
.ui-icon-triangle-1-se { background-position: -48px -16px; }
.ui-icon-triangle-1-s { background-position: -65px -16px; }
.ui-icon-triangle-1-sw { background-position: -80px -16px; }
.ui-icon-triangle-1-w { background-position: -96px -16px; }
.ui-icon-triangle-1-nw { background-position: -112px -16px; }
.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
.ui-icon-arrow-1-n { background-position: 0 -32px; }
.ui-icon-arrow-1-ne { background-position: -16px -32px; }
.ui-icon-arrow-1-e { background-position: -32px -32px; }
.ui-icon-arrow-1-se { background-position: -48px -32px; }
.ui-icon-arrow-1-s { background-position: -65px -32px; }
.ui-icon-arrow-1-sw { background-position: -80px -32px; }
.ui-icon-arrow-1-w { background-position: -96px -32px; }
.ui-icon-arrow-1-nw { background-position: -112px -32px; }
.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
.ui-icon-arrowthick-1-n { background-position: 1px -48px; }
.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
.ui-icon-arrow-4 { background-position: 0 -80px; }
.ui-icon-arrow-4-diag { background-position: -16px -80px; }
.ui-icon-extlink { background-position: -32px -80px; }
.ui-icon-newwin { background-position: -48px -80px; }
.ui-icon-refresh { background-position: -64px -80px; }
.ui-icon-shuffle { background-position: -80px -80px; }
.ui-icon-transfer-e-w { background-position: -96px -80px; }
.ui-icon-transferthick-e-w { background-position: -112px -80px; }
.ui-icon-folder-collapsed { background-position: 0 -96px; }
.ui-icon-folder-open { background-position: -16px -96px; }
.ui-icon-document { background-position: -32px -96px; }
.ui-icon-document-b { background-position: -48px -96px; }
.ui-icon-note { background-position: -64px -96px; }
.ui-icon-mail-closed { background-position: -80px -96px; }
.ui-icon-mail-open { background-position: -96px -96px; }
.ui-icon-suitcase { background-position: -112px -96px; }
.ui-icon-comment { background-position: -128px -96px; }
.ui-icon-person { background-position: -144px -96px; }
.ui-icon-print { background-position: -160px -96px; }
.ui-icon-trash { background-position: -176px -96px; }
.ui-icon-locked { background-position: -192px -96px; }
.ui-icon-unlocked { background-position: -208px -96px; }
.ui-icon-bookmark { background-position: -224px -96px; }
.ui-icon-tag { background-position: -240px -96px; }
.ui-icon-home { background-position: 0 -112px; }
.ui-icon-flag { background-position: -16px -112px; }
.ui-icon-calendar { background-position: -32px -112px; }
.ui-icon-cart { background-position: -48px -112px; }
.ui-icon-pencil { background-position: -64px -112px; }
.ui-icon-clock { background-position: -80px -112px; }
.ui-icon-disk { background-position: -96px -112px; }
.ui-icon-calculator { background-position: -112px -112px; }
.ui-icon-zoomin { background-position: -128px -112px; }
.ui-icon-zoomout { background-position: -144px -112px; }
.ui-icon-search { background-position: -160px -112px; }
.ui-icon-wrench { background-position: -176px -112px; }
.ui-icon-gear { background-position: -192px -112px; }
.ui-icon-heart { background-position: -208px -112px; }
.ui-icon-star { background-position: -224px -112px; }
.ui-icon-link { background-position: -240px -112px; }
.ui-icon-cancel { background-position: 0 -128px; }
.ui-icon-plus { background-position: -16px -128px; }
.ui-icon-plusthick { background-position: -32px -128px; }
.ui-icon-minus { background-position: -48px -128px; }
.ui-icon-minusthick { background-position: -64px -128px; }
.ui-icon-close { background-position: -80px -128px; }
.ui-icon-closethick { background-position: -96px -128px; }
.ui-icon-key { background-position: -112px -128px; }
.ui-icon-lightbulb { background-position: -128px -128px; }
.ui-icon-scissors { background-position: -144px -128px; }
.ui-icon-clipboard { background-position: -160px -128px; }
.ui-icon-copy { background-position: -176px -128px; }
.ui-icon-contact { background-position: -192px -128px; }
.ui-icon-image { background-position: -208px -128px; }
.ui-icon-video { background-position: -224px -128px; }
.ui-icon-script { background-position: -240px -128px; }
.ui-icon-alert { background-position: 0 -144px; }
.ui-icon-info { background-position: -16px -144px; }
.ui-icon-notice { background-position: -32px -144px; }
.ui-icon-help { background-position: -48px -144px; }
.ui-icon-check { background-position: -64px -144px; }
.ui-icon-bullet { background-position: -80px -144px; }
.ui-icon-radio-on { background-position: -96px -144px; }
.ui-icon-radio-off { background-position: -112px -144px; }
.ui-icon-pin-w { background-position: -128px -144px; }
.ui-icon-pin-s { background-position: -144px -144px; }
.ui-icon-play { background-position: 0 -160px; }
.ui-icon-pause { background-position: -16px -160px; }
.ui-icon-seek-next { background-position: -32px -160px; }
.ui-icon-seek-prev { background-position: -48px -160px; }
.ui-icon-seek-end { background-position: -64px -160px; }
.ui-icon-seek-start { background-position: -80px -160px; }
/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
.ui-icon-seek-first { background-position: -80px -160px; }
.ui-icon-stop { background-position: -96px -160px; }
.ui-icon-eject { background-position: -112px -160px; }
.ui-icon-volume-off { background-position: -128px -160px; }
.ui-icon-volume-on { background-position: -144px -160px; }
.ui-icon-power { background-position: 0 -176px; }
.ui-icon-signal-diag { background-position: -16px -176px; }
.ui-icon-signal { background-position: -32px -176px; }
.ui-icon-battery-0 { background-position: -48px -176px; }
.ui-icon-battery-1 { background-position: -64px -176px; }
.ui-icon-battery-2 { background-position: -80px -176px; }
.ui-icon-battery-3 { background-position: -96px -176px; }
.ui-icon-circle-plus { background-position: 0 -192px; }
.ui-icon-circle-minus { background-position: -16px -192px; }
.ui-icon-circle-close { background-position: -32px -192px; }
.ui-icon-circle-triangle-e { background-position: -48px -192px; }
.ui-icon-circle-triangle-s { background-position: -64px -192px; }
.ui-icon-circle-triangle-w { background-position: -80px -192px; }
.ui-icon-circle-triangle-n { background-position: -96px -192px; }
.ui-icon-circle-arrow-e { background-position: -112px -192px; }
.ui-icon-circle-arrow-s { background-position: -128px -192px; }
.ui-icon-circle-arrow-w { background-position: -144px -192px; }
.ui-icon-circle-arrow-n { background-position: -160px -192px; }
.ui-icon-circle-zoomin { background-position: -176px -192px; }
.ui-icon-circle-zoomout { background-position: -192px -192px; }
.ui-icon-circle-check { background-position: -208px -192px; }
.ui-icon-circlesmall-plus { background-position: 0 -208px; }
.ui-icon-circlesmall-minus { background-position: -16px -208px; }
.ui-icon-circlesmall-close { background-position: -32px -208px; }
.ui-icon-squaresmall-plus { background-position: -48px -208px; }
.ui-icon-squaresmall-minus { background-position: -64px -208px; }
.ui-icon-squaresmall-close { background-position: -80px -208px; }
.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
/* Misc visuals
----------------------------------*/
/* Corner radius */
.ui-corner-all,
.ui-corner-top,
.ui-corner-left,
.ui-corner-tl {
border-top-left-radius: 8px;
}
.ui-corner-all,
.ui-corner-top,
.ui-corner-right,
.ui-corner-tr {
border-top-right-radius: 8px;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-left,
.ui-corner-bl {
border-bottom-left-radius: 8px;
}
.ui-corner-all,
.ui-corner-bottom,
.ui-corner-right,
.ui-corner-br {
border-bottom-right-radius: 8px;
}
/* Overlays */
.ui-widget-overlay {
background: #5c5c5c;
opacity: .8;
filter: Alpha(Opacity=80); /* support: IE8 */
}
.ui-widget-shadow {
-webkit-box-shadow: -7px -7px 7px #cccccc;
box-shadow: -7px -7px 7px #cccccc;
}
| {
"pile_set_name": "Github"
} |
/**
* Copyright (c) 2012 Partners In Health. All rights reserved.
* The use and distribution terms for this software are covered by the
* Eclipse Public License 1.0 (http://opensource.org/licenses/eclipse-1.0.php)
* which can be found in the file epl-v10.html at the root of this distribution.
* By using this software in any fashion, you are agreeing to be bound by
* the terms of this license.
* You must not remove this notice, or any other, from this software.
**/
package org.pih.warehouse.requisition
import org.pih.warehouse.inventory.StockMovementStatusCode
enum RequisitionStatus {
CREATED(1),
EDITING(2, PENDING),
VERIFYING(3, PENDING),
PICKING(4, PENDING),
PICKED(5, PENDING),
PENDING(5),
CHECKING(6, PENDING),
ISSUED(7),
RECEIVED(8),
CANCELED(9),
DELETED(10),
ERROR(11),
// Removed
OPEN(0),
FULFILLED(0),
REVIEWING(0),
CONFIRMING(0)
int sortOrder
RequisitionStatus displayStatusCode
RequisitionStatus() { }
RequisitionStatus(int sortOrder) { this.sortOrder = sortOrder }
RequisitionStatus(int sortOrder, RequisitionStatus displayStatusCode) {
this.sortOrder = sortOrder
this.displayStatusCode = displayStatusCode
}
RequisitionStatus getDisplayStatus() {
return this.displayStatusCode?:this
}
static int compare(RequisitionStatus a, RequisitionStatus b) {
return a.sortOrder <=> b.sortOrder
}
/* remove OPEN, FULFILLED */
static list() {
[CREATED, EDITING, VERIFYING, PICKING, PICKED, CHECKING, ISSUED, CANCELED]
}
static listPending() {
[CREATED, CHECKING, EDITING, PICKED, PICKING, VERIFYING]
}
static listCompleted() {
[ISSUED, RECEIVED]
}
static listCanceled() {
[CANCELED, DELETED]
}
static listAll() {
[CREATED, EDITING, VERIFYING, PICKING, PICKED, PENDING, CHECKING, FULFILLED, ISSUED, RECEIVED, CANCELED, DELETED, ERROR]
}
static toStockMovementStatus(RequisitionStatus requisitionStatus) {
switch(requisitionStatus) {
case RequisitionStatus.EDITING:
return StockMovementStatusCode.REQUESTING
case RequisitionStatus.VERIFYING:
return StockMovementStatusCode.REQUESTED
case RequisitionStatus.CHECKING:
return StockMovementStatusCode.PACKED
case RequisitionStatus.ISSUED:
return StockMovementStatusCode.DISPATCHED
default:
return StockMovementStatusCode.valueOf(requisitionStatus.toString())
}
}
static fromStockMovementStatus(StockMovementStatusCode stockMovementStatus) {
switch(stockMovementStatus) {
case StockMovementStatusCode.REQUESTING:
return RequisitionStatus.EDITING
case StockMovementStatusCode.REQUESTED:
return RequisitionStatus.VERIFYING
case StockMovementStatusCode.PACKED:
return RequisitionStatus.CHECKING
case StockMovementStatusCode.VALIDATED:
return RequisitionStatus.VERIFYING
case StockMovementStatusCode.DISPATCHED:
return RequisitionStatus.ISSUED
default:
return RequisitionStatus.valueOf(stockMovementStatus.toString())
}
}
String toString() { return name() }
}
| {
"pile_set_name": "Github"
} |
/* -*- Mode: indent-tabs-mode: nil; js-indent-level: 2 -*- */
/* vim: set sts=2 sw=2 et tw=80: */
"use strict";
add_task(async function test_clickData() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
browser_action: {},
},
background() {
function onClicked(tab, info) {
let button = info.button;
let modifiers = info.modifiers;
browser.test.sendMessage("onClick", { button, modifiers });
}
browser.browserAction.onClicked.addListener(onClicked);
browser.test.sendMessage("ready");
},
});
const map = {
shiftKey: "Shift",
altKey: "Alt",
metaKey: "Command",
ctrlKey: "Ctrl",
};
function assertSingleModifier(info, modifier, area) {
if (modifier === "ctrlKey" && AppConstants.platform === "macosx") {
is(
info.modifiers.length,
2,
`MacCtrl modifier with control click on Mac`
);
is(
info.modifiers[1],
"MacCtrl",
`MacCtrl modifier with control click on Mac`
);
} else {
is(
info.modifiers.length,
1,
`No unnecessary modifiers for exactly one key on event`
);
}
is(info.modifiers[0], map[modifier], `Correct modifier on ${area} click`);
}
await extension.startup();
await extension.awaitMessage("ready");
for (let area of [CustomizableUI.AREA_NAVBAR, getCustomizableUIPanelID()]) {
let widget = getBrowserActionWidget(extension);
CustomizableUI.addWidgetToArea(widget.id, area);
for (let modifier of Object.keys(map)) {
for (let i = 0; i < 2; i++) {
// On Mac, ctrl-click will send a context menu event from the widget,
// we won't send xul command event and won't have onClick message, either.
if (
AppConstants.platform == "macosx" &&
i == 0 &&
modifier == "ctrlKey"
) {
continue;
}
let clickEventData = { button: i };
clickEventData[modifier] = true;
await clickBrowserAction(extension, window, clickEventData);
let info = await extension.awaitMessage("onClick");
is(info.button, i, `Correct button in ${area} click`);
assertSingleModifier(info, modifier, area);
}
let keypressEventData = {};
keypressEventData[modifier] = true;
await triggerBrowserActionWithKeyboard(
extension,
"KEY_Enter",
keypressEventData
);
let info = await extension.awaitMessage("onClick");
is(info.button, 0, `Key command emulates left click`);
assertSingleModifier(info, modifier, area);
}
}
await extension.unload();
});
add_task(async function test_clickData_reset() {
let extension = ExtensionTestUtils.loadExtension({
manifest: {
browser_action: {},
page_action: {},
},
async background() {
function onBrowserActionClicked(tab, info) {
browser.test.sendMessage("onClick", info);
}
function onPageActionClicked(tab, info) {
// openPopup requires user interaction, such as a page action click.
browser.browserAction.openPopup();
}
browser.browserAction.onClicked.addListener(onBrowserActionClicked);
browser.pageAction.onClicked.addListener(onPageActionClicked);
let [tab] = await browser.tabs.query({
active: true,
currentWindow: true,
});
await browser.pageAction.show(tab.id);
browser.test.sendMessage("ready");
},
});
// Pollute the state of the browserAction's lastClickInfo
async function clickBrowserActionWithModifiers() {
await clickBrowserAction(extension, window, { button: 1, shiftKey: true });
let info = await extension.awaitMessage("onClick");
is(info.button, 1);
is(info.modifiers[0], "Shift");
}
function assertInfoReset(info) {
is(info.button, 0, `ClickData button reset properly`);
is(info.modifiers.length, 0, `ClickData modifiers reset properly`);
}
await extension.startup();
await extension.awaitMessage("ready");
await clickBrowserActionWithModifiers();
await clickPageAction(extension);
assertInfoReset(await extension.awaitMessage("onClick"));
await clickBrowserActionWithModifiers();
await triggerBrowserActionWithKeyboard(extension, "KEY_Enter");
assertInfoReset(await extension.awaitMessage("onClick"));
await clickBrowserActionWithModifiers();
await triggerBrowserActionWithKeyboard(extension, " ");
assertInfoReset(await extension.awaitMessage("onClick"));
await extension.unload();
});
| {
"pile_set_name": "Github"
} |
package com.oath.cyclops.functions.fluent;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import java.io.IOException;
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import cyclops.control.Option;
import cyclops.data.tuple.Tuple;
import org.junit.Before;
import org.junit.Test;
import cyclops.function.FluentFunctions;
import cyclops.function.FluentFunctions.FluentBiFunction;
import cyclops.function.FluentFunctions.FluentFunction;
import cyclops.function.FluentFunctions.FluentSupplier;
import cyclops.function.FluentFunctions.FluentTriFunction;
import cyclops.control.Try;
import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
public class FluentTriFunctionTest {
@Before
public void setup() {
this.times = 0;
}
int called;
public int add(Integer a, Integer b, Integer c) {
called++;
return a + b + c;
}
@Test
public void testApply() {
assertThat(FluentFunctions.of(this::add)
.name("myFunction")
.println()
.apply(10, 1, 0),
equalTo(11));
}
@Test
public void testCache() {
called = 0;
FluentTriFunction<Integer, Integer, Integer, Integer> fn = FluentFunctions.of(this::add)
.name("myFunction")
.memoize3();
fn.apply(10, 1, 0);
fn.apply(10, 1, 0);
fn.apply(10, 1, 0);
assertThat(called, equalTo(1));
}
@Test
public void testCacheGuava() {
Cache<Object, Integer> cache = CacheBuilder.newBuilder()
.maximumSize(1000)
.expireAfterWrite(10, TimeUnit.MINUTES)
.build();
called = 0;
FluentTriFunction<Integer, Integer, Integer, Integer> fn = FluentFunctions.of(this::add)
.name("myFunction")
.memoize3((key, f) -> cache.get(key, () -> f.apply(key)));
fn.apply(10, 1, 0);
fn.apply(10, 1, 0);
fn.apply(10, 1, 0);
assertThat(called, equalTo(1));
}
int set;
public boolean events(Integer i, Integer a, Integer c) {
return set == i;
}
@Test
public void testBefore() {
set = 0;
assertTrue(FluentFunctions.of(this::events)
.before((a, b, c) -> set = a)
.println()
.apply(10, 1, 100));
}
int in;
boolean out;
@Test
public void testAfter() {
set = 0;
assertFalse(FluentFunctions.of(this::events)
.after((in1, in2, in3, out) -> set = in1)
.println()
.apply(10, 1, 0));
boolean result = FluentFunctions.of(this::events)
.after((inA2, inB2, inB3, out2) -> {
in = inA2;
out = out2;
})
.println()
.apply(10, 1, 0);
assertThat(in, equalTo(10));
assertTrue(out == result);
}
@Test
public void testAround() {
set = 0;
assertThat(FluentFunctions.of(this::add)
.around(advice -> advice.proceed1(advice.param1 + 1))
.println()
.apply(10, 1, 0),
equalTo(12));
}
int times = 0;
public String exceptionalFirstTime(String input, String input2, String input3) throws IOException {
if (times == 0) {
times++;
throw new IOException();
}
return input + " world" + input2 + input3;
}
@Test
public void retry() {
assertThat(FluentFunctions.ofChecked(this::exceptionalFirstTime)
.println()
.retry(2, 500)
.apply("hello", "woo!", "h"),
equalTo("hello worldwoo!h"));
}
@Test
public void recover() {
assertThat(FluentFunctions.ofChecked(this::exceptionalFirstTime)
.recover(IOException.class, (in1, in2, in3) -> in1 + "boo!")
.println()
.apply("hello ", "woo!", "h"),
equalTo("hello boo!"));
}
@Test(expected = IOException.class)
public void recoverDont() {
assertThat(FluentFunctions.ofChecked(this::exceptionalFirstTime)
.recover(RuntimeException.class, (in1, in2, in3) -> in1 + "boo!")
.println()
.apply("hello ", "woo!", "h"),
equalTo("hello boo!"));
}
public String gen(String input) {
return input + System.currentTimeMillis();
}
@Test
public void generate() {
assertThat(FluentFunctions.of(this::gen)
.println()
.generate("next element")
.onePer(1, TimeUnit.SECONDS)
.limit(2)
.toList()
.size(),
equalTo(2));
}
@Test
public void iterate() {
FluentFunctions.of(this::add)
.iterate(1, 2, 3, (i) -> Tuple.tuple(i, i, i))
.limit(2)
.printOut();
assertThat(FluentFunctions.of(this::add)
.iterate(1, 2, 3, (i) -> Tuple.tuple(i, i, i))
.limit(2)
.toList()
.size(),
equalTo(2));
}
@Test
public void testLift() {
Integer nullValue = null;
assertThat(FluentFunctions.of(this::add)
.lift3()
.apply(2, 1, 3),
equalTo(Option.some(6)));
}
@Test
public void testTry() {
Try<String, IOException> tried = FluentFunctions.ofChecked(this::exceptionalFirstTime)
.liftTry(IOException.class)
.apply("hello", "boo!", "r");
if (tried.isSuccess())
fail("expecting failure");
}
Executor ex = Executors.newFixedThreadPool(1);
@Test
public void liftAsync() {
assertThat(FluentFunctions.of(this::add)
.liftAsync(ex)
.apply(1, 1, 2)
.join(),
equalTo(4));
}
@Test
public void async() {
assertThat(FluentFunctions.of(this::add)
.async(ex)
.thenApply(f -> f.apply(4, 1, 10))
.join(),
equalTo(15));
}
@Test
public void testPartiallyApply3() {
FluentSupplier<Integer> supplier = FluentFunctions.of(this::add)
.partiallyApply(3, 1, 2)
.println();
assertThat(supplier.get(), equalTo(6));
}
@Test
public void testPartiallyApply1() {
FluentFunction<Integer, Integer> fn = FluentFunctions.of(this::add)
.partiallyApply(3, 1)
.println();
assertThat(fn.apply(1), equalTo(5));
}
@Test
public void testPartiallyApply() {
FluentBiFunction<Integer, Integer, Integer> fn = FluentFunctions.of(this::add)
.partiallyApply(3)
.println();
assertThat(fn.apply(1, 10), equalTo(14));
}
@Test
public void curry() {
assertThat(FluentFunctions.of(this::add)
.curry()
.apply(1)
.apply(2)
.apply(10),
equalTo(13));
}
}
| {
"pile_set_name": "Github"
} |
{
"name": "@middy/http-header-normalizer",
"version": "1.4.0",
"description": "Http header normalizer middleware for the middy framework",
"engines": {
"node": ">=10"
},
"engineStrict": true,
"publishConfig": {
"access": "public"
},
"scripts": {
"test": "npm run test:typings && npm run test:unit",
"test:unit": "jest",
"test:typings": "typings-tester --config tsconfig.json index.d.ts"
},
"license": "MIT",
"keywords": [
"Lambda",
"Middleware",
"Serverless",
"Framework",
"AWS",
"AWS Lambda",
"Middy",
"HTTP",
"API",
"Header",
"Headers",
"Header normalizer"
],
"author": {
"name": "Middy contributors",
"url": "https://github.com/middyjs/middy/graphs/contributors"
},
"repository": {
"type": "git",
"url": "git+https://github.com/middyjs/middy.git"
},
"bugs": {
"url": "https://github.com/middyjs/middy/issues"
},
"homepage": "https://github.com/middyjs/middy#readme",
"peerDependencies": {
"@middy/core": ">=1.0.0-alpha"
},
"devDependencies": {
"@middy/core": "^1.4.0",
"es6-promisify": "^6.0.2"
},
"gitHead": "7a6c0fbb8ab71d6a2171e678697de9f237568431"
}
| {
"pile_set_name": "Github"
} |
<?php
/*
* Task worker
* Connects PULL socket to tcp://localhost:5557
* Collects workloads from ventilator via that socket
* Connects PUSH socket to tcp://localhost:5558
* Sends results to sink via that socket
* @author Ian Barber <ian(dot)barber(at)gmail(dot)com>
*/
$context = new ZMQContext();
// Socket to receive messages on
$receiver = new ZMQSocket($context, ZMQ::SOCKET_PULL);
$receiver->connect("tcp://localhost:5557");
// Socket to send messages to
$sender = new ZMQSocket($context, ZMQ::SOCKET_PUSH);
$sender->connect("tcp://localhost:5558");
// Process tasks forever
while (true) {
$string = $receiver->recv();
// Simple progress indicator for the viewer
echo $string, PHP_EOL;
// Do the work
usleep($string * 1000);
// Send results to sink
$sender->send("");
}
| {
"pile_set_name": "Github"
} |
[
{ "cc_library": {
"name" : "generator",
"cc_sources" : [ "generator.cc" ],
"cc_headers" : [ "generator.h" ],
"dependencies": [ "//common/log:log",
"//common/strings:strutil",
"//common/util:stl",
"//repobuild/distsource:dist_source",
"//repobuild/env:input",
"//repobuild/env:resource",
"//repobuild/nodes:allnodes",
"//repobuild/reader:parser"
]
}
}
] | {
"pile_set_name": "Github"
} |
/*
* This software is distributed under BSD 3-clause license (see LICENSE file).
*
* Authors: Evangelos Anagnostopoulos, Heiko Strathmann, Bjoern Esser,
* Sergey Lisitsyn, Viktor Gal
*/
#include <shogun/features/streaming/StreamingHashedDocDotFeatures.h>
#include <shogun/features/hashed/HashedDocDotFeatures.h>
#include <shogun/mathematics/Math.h>
#include <utility>
using namespace shogun;
StreamingHashedDocDotFeatures::StreamingHashedDocDotFeatures(std::shared_ptr<StreamingFile> file,
bool is_labelled, int32_t size, std::shared_ptr<Tokenizer> tzer, int32_t bits)
: StreamingDotFeatures()
{
init(std::move(file), is_labelled, size, std::move(tzer), bits, true, 1, 0);
}
StreamingHashedDocDotFeatures::StreamingHashedDocDotFeatures() : StreamingDotFeatures()
{
init(NULL, false, 0, NULL, 0, false, 1, 0);
}
StreamingHashedDocDotFeatures::StreamingHashedDocDotFeatures(
std::shared_ptr<StringFeatures<char>> dot_features, std::shared_ptr<Tokenizer> tzer, int32_t bits, float64_t* lab)
: StreamingDotFeatures()
{
auto file =
std::make_shared<StreamingFileFromStringFeatures<char>>(dot_features, lab);
bool is_labelled = (lab != NULL);
int32_t size=1024;
init(file, is_labelled, size, std::move(tzer), bits, true, 1, 0);
parser.set_free_vectors_on_destruct(false);
seekable= true;
}
void StreamingHashedDocDotFeatures::init(const std::shared_ptr<StreamingFile>& file, bool is_labelled,
int32_t size, std::shared_ptr<Tokenizer> tzer, int32_t bits, bool normalize, int32_t n_grams, int32_t skips)
{
num_bits = bits;
tokenizer = tzer;
if (tokenizer)
{
converter = std::make_shared<HashedDocConverter>(tzer, bits, normalize, n_grams, skips);
}
else
converter=NULL;
SG_ADD(&num_bits, "num_bits", "Number of bits for hash");
SG_ADD((std::shared_ptr<SGObject>* ) &tokenizer, "tokenizer", "The tokenizer used on the documents");
SG_ADD((std::shared_ptr<SGObject>* ) &converter, "converter", "Converter");
has_labels = is_labelled;
if (file)
{
working_file = file;
parser.init(file, is_labelled, size);
seekable = false;
}
else
working_file = NULL;
set_read_functions();
parser.set_free_vector_after_release(false);
}
StreamingHashedDocDotFeatures::~StreamingHashedDocDotFeatures()
{
if (parser.is_running())
parser.end_parser();
}
float32_t StreamingHashedDocDotFeatures::dot(std::shared_ptr<StreamingDotFeatures> df)
{
ASSERT(df)
ASSERT(df->get_name() == get_name())
auto cdf = std::static_pointer_cast<StreamingHashedDocDotFeatures>(df);
float32_t result = current_vector.sparse_dot(cdf->current_vector);
return result;
}
float32_t StreamingHashedDocDotFeatures::dense_dot(const float32_t* vec2, int32_t vec2_len)
{
ASSERT(vec2_len == Math::pow(2, num_bits))
float32_t result = 0;
for (index_t i=0; i<current_vector.num_feat_entries; i++)
{
result += vec2[current_vector.features[i].feat_index] *
current_vector.features[i].entry;
}
return result;
}
void StreamingHashedDocDotFeatures::add_to_dense_vec(float32_t alpha, float32_t* vec2,
int32_t vec2_len, bool abs_val)
{
float32_t value = abs_val ? Math::abs(alpha) : alpha;
for (index_t i=0; i<current_vector.num_feat_entries; i++)
vec2[current_vector.features[i].feat_index] += value * current_vector.features[i].entry;
}
int32_t StreamingHashedDocDotFeatures::get_dim_feature_space() const
{
return Math::pow(2, num_bits);
}
const char* StreamingHashedDocDotFeatures::get_name() const
{
return "StreamingHashedDocDotFeatures";
}
EFeatureType StreamingHashedDocDotFeatures::get_feature_type() const
{
return F_UINT;
}
EFeatureClass StreamingHashedDocDotFeatures::get_feature_class() const
{
return C_STREAMING_SPARSE;
}
void StreamingHashedDocDotFeatures::start_parser()
{
if (!parser.is_running())
parser.start_parser();
}
void StreamingHashedDocDotFeatures::end_parser()
{
parser.end_parser();
}
bool StreamingHashedDocDotFeatures::get_next_example()
{
SGVector<char> tmp;
if (parser.get_next_example(tmp.vector,
tmp.vlen, current_label))
{
ASSERT(tmp.vector)
ASSERT(tmp.vlen > 0)
current_vector = converter->apply(tmp);
return true;
}
return false;
}
void StreamingHashedDocDotFeatures::release_example()
{
parser.finalize_example();
}
int32_t StreamingHashedDocDotFeatures::get_num_features()
{
return (int32_t) Math::pow(2, num_bits);
}
float64_t StreamingHashedDocDotFeatures::get_label()
{
return current_label;
}
int32_t StreamingHashedDocDotFeatures::get_num_vectors() const
{
return 1;
}
void StreamingHashedDocDotFeatures::set_vector_reader()
{
parser.set_read_vector(&StreamingFile::get_string);
}
void StreamingHashedDocDotFeatures::set_vector_and_label_reader()
{
parser.set_read_vector_and_label(&StreamingFile::get_string_and_label);
}
SGSparseVector<float64_t> StreamingHashedDocDotFeatures::get_vector()
{
return current_vector;
}
void StreamingHashedDocDotFeatures::set_normalization(bool normalize)
{
converter->set_normalization(normalize);
}
void StreamingHashedDocDotFeatures::set_k_skip_n_grams(int32_t k, int32_t n)
{
converter->set_k_skip_n_grams(k, n);
}
| {
"pile_set_name": "Github"
} |
[
["0","\u0000",127],
["8ea1","。",62],
["a1a1"," 、。,.・:;?!゛゜´`¨^ ̄_ヽヾゝゞ〃仝々〆〇ー―‐/\~∥|…‥‘’“”()〔〕[]{}〈",9,"+-±×÷=≠<>≦≧∞∴♂♀°′″℃¥$¢£%#&*@§☆★○●◎◇"],
["a2a1","◆□■△▲▽▼※〒→←↑↓〓"],
["a2ba","∈∋⊆⊇⊂⊃∪∩"],
["a2ca","∧∨¬⇒⇔∀∃"],
["a2dc","∠⊥⌒∂∇≡≒≪≫√∽∝∵∫∬"],
["a2f2","ʼn♯♭♪†‡¶"],
["a2fe","◯"],
["a3b0","0",9],
["a3c1","A",25],
["a3e1","a",25],
["a4a1","ぁ",82],
["a5a1","ァ",85],
["a6a1","Α",16,"Σ",6],
["a6c1","α",16,"σ",6],
["a7a1","А",5,"ЁЖ",25],
["a7d1","а",5,"ёж",25],
["a8a1","─│┌┐┘└├┬┤┴┼━┃┏┓┛┗┣┳┫┻╋┠┯┨┷┿┝┰┥┸╂"],
["ada1","①",19,"Ⅰ",9],
["adc0","㍉㌔㌢㍍㌘㌧㌃㌶㍑㍗㌍㌦㌣㌫㍊㌻㎜㎝㎞㎎㎏㏄㎡"],
["addf","㍻〝〟№㏍℡㊤",4,"㈱㈲㈹㍾㍽㍼≒≡∫∮∑√⊥∠∟⊿∵∩∪"],
["b0a1","亜唖娃阿哀愛挨姶逢葵茜穐悪握渥旭葦芦鯵梓圧斡扱宛姐虻飴絢綾鮎或粟袷安庵按暗案闇鞍杏以伊位依偉囲夷委威尉惟意慰易椅為畏異移維緯胃萎衣謂違遺医井亥域育郁磯一壱溢逸稲茨芋鰯允印咽員因姻引飲淫胤蔭"],
["b1a1","院陰隠韻吋右宇烏羽迂雨卯鵜窺丑碓臼渦嘘唄欝蔚鰻姥厩浦瓜閏噂云運雲荏餌叡営嬰影映曳栄永泳洩瑛盈穎頴英衛詠鋭液疫益駅悦謁越閲榎厭円園堰奄宴延怨掩援沿演炎焔煙燕猿縁艶苑薗遠鉛鴛塩於汚甥凹央奥往応"],
["b2a1","押旺横欧殴王翁襖鴬鴎黄岡沖荻億屋憶臆桶牡乙俺卸恩温穏音下化仮何伽価佳加可嘉夏嫁家寡科暇果架歌河火珂禍禾稼箇花苛茄荷華菓蝦課嘩貨迦過霞蚊俄峨我牙画臥芽蛾賀雅餓駕介会解回塊壊廻快怪悔恢懐戒拐改"],
["b3a1","魁晦械海灰界皆絵芥蟹開階貝凱劾外咳害崖慨概涯碍蓋街該鎧骸浬馨蛙垣柿蛎鈎劃嚇各廓拡撹格核殻獲確穫覚角赫較郭閣隔革学岳楽額顎掛笠樫橿梶鰍潟割喝恰括活渇滑葛褐轄且鰹叶椛樺鞄株兜竃蒲釜鎌噛鴨栢茅萱"],
["b4a1","粥刈苅瓦乾侃冠寒刊勘勧巻喚堪姦完官寛干幹患感慣憾換敢柑桓棺款歓汗漢澗潅環甘監看竿管簡緩缶翰肝艦莞観諌貫還鑑間閑関陥韓館舘丸含岸巌玩癌眼岩翫贋雁頑顔願企伎危喜器基奇嬉寄岐希幾忌揮机旗既期棋棄"],
["b5a1","機帰毅気汽畿祈季稀紀徽規記貴起軌輝飢騎鬼亀偽儀妓宜戯技擬欺犠疑祇義蟻誼議掬菊鞠吉吃喫桔橘詰砧杵黍却客脚虐逆丘久仇休及吸宮弓急救朽求汲泣灸球究窮笈級糾給旧牛去居巨拒拠挙渠虚許距鋸漁禦魚亨享京"],
["b6a1","供侠僑兇競共凶協匡卿叫喬境峡強彊怯恐恭挟教橋況狂狭矯胸脅興蕎郷鏡響饗驚仰凝尭暁業局曲極玉桐粁僅勤均巾錦斤欣欽琴禁禽筋緊芹菌衿襟謹近金吟銀九倶句区狗玖矩苦躯駆駈駒具愚虞喰空偶寓遇隅串櫛釧屑屈"],
["b7a1","掘窟沓靴轡窪熊隈粂栗繰桑鍬勲君薫訓群軍郡卦袈祁係傾刑兄啓圭珪型契形径恵慶慧憩掲携敬景桂渓畦稽系経継繋罫茎荊蛍計詣警軽頚鶏芸迎鯨劇戟撃激隙桁傑欠決潔穴結血訣月件倹倦健兼券剣喧圏堅嫌建憲懸拳捲"],
["b8a1","検権牽犬献研硯絹県肩見謙賢軒遣鍵険顕験鹸元原厳幻弦減源玄現絃舷言諺限乎個古呼固姑孤己庫弧戸故枯湖狐糊袴股胡菰虎誇跨鈷雇顧鼓五互伍午呉吾娯後御悟梧檎瑚碁語誤護醐乞鯉交佼侯候倖光公功効勾厚口向"],
["b9a1","后喉坑垢好孔孝宏工巧巷幸広庚康弘恒慌抗拘控攻昂晃更杭校梗構江洪浩港溝甲皇硬稿糠紅紘絞綱耕考肯肱腔膏航荒行衡講貢購郊酵鉱砿鋼閤降項香高鴻剛劫号合壕拷濠豪轟麹克刻告国穀酷鵠黒獄漉腰甑忽惚骨狛込"],
["baa1","此頃今困坤墾婚恨懇昏昆根梱混痕紺艮魂些佐叉唆嵯左差査沙瑳砂詐鎖裟坐座挫債催再最哉塞妻宰彩才採栽歳済災采犀砕砦祭斎細菜裁載際剤在材罪財冴坂阪堺榊肴咲崎埼碕鷺作削咋搾昨朔柵窄策索錯桜鮭笹匙冊刷"],
["bba1","察拶撮擦札殺薩雑皐鯖捌錆鮫皿晒三傘参山惨撒散桟燦珊産算纂蚕讃賛酸餐斬暫残仕仔伺使刺司史嗣四士始姉姿子屍市師志思指支孜斯施旨枝止死氏獅祉私糸紙紫肢脂至視詞詩試誌諮資賜雌飼歯事似侍児字寺慈持時"],
["bca1","次滋治爾璽痔磁示而耳自蒔辞汐鹿式識鴫竺軸宍雫七叱執失嫉室悉湿漆疾質実蔀篠偲柴芝屡蕊縞舎写射捨赦斜煮社紗者謝車遮蛇邪借勺尺杓灼爵酌釈錫若寂弱惹主取守手朱殊狩珠種腫趣酒首儒受呪寿授樹綬需囚収周"],
["bda1","宗就州修愁拾洲秀秋終繍習臭舟蒐衆襲讐蹴輯週酋酬集醜什住充十従戎柔汁渋獣縦重銃叔夙宿淑祝縮粛塾熟出術述俊峻春瞬竣舜駿准循旬楯殉淳準潤盾純巡遵醇順処初所暑曙渚庶緒署書薯藷諸助叙女序徐恕鋤除傷償"],
["bea1","勝匠升召哨商唱嘗奨妾娼宵将小少尚庄床廠彰承抄招掌捷昇昌昭晶松梢樟樵沼消渉湘焼焦照症省硝礁祥称章笑粧紹肖菖蒋蕉衝裳訟証詔詳象賞醤鉦鍾鐘障鞘上丈丞乗冗剰城場壌嬢常情擾条杖浄状畳穣蒸譲醸錠嘱埴飾"],
["bfa1","拭植殖燭織職色触食蝕辱尻伸信侵唇娠寝審心慎振新晋森榛浸深申疹真神秦紳臣芯薪親診身辛進針震人仁刃塵壬尋甚尽腎訊迅陣靭笥諏須酢図厨逗吹垂帥推水炊睡粋翠衰遂酔錐錘随瑞髄崇嵩数枢趨雛据杉椙菅頗雀裾"],
["c0a1","澄摺寸世瀬畝是凄制勢姓征性成政整星晴棲栖正清牲生盛精聖声製西誠誓請逝醒青静斉税脆隻席惜戚斥昔析石積籍績脊責赤跡蹟碩切拙接摂折設窃節説雪絶舌蝉仙先千占宣専尖川戦扇撰栓栴泉浅洗染潜煎煽旋穿箭線"],
["c1a1","繊羨腺舛船薦詮賎践選遷銭銑閃鮮前善漸然全禅繕膳糎噌塑岨措曾曽楚狙疏疎礎祖租粗素組蘇訴阻遡鼠僧創双叢倉喪壮奏爽宋層匝惣想捜掃挿掻操早曹巣槍槽漕燥争痩相窓糟総綜聡草荘葬蒼藻装走送遭鎗霜騒像増憎"],
["c2a1","臓蔵贈造促側則即息捉束測足速俗属賊族続卒袖其揃存孫尊損村遜他多太汰詑唾堕妥惰打柁舵楕陀駄騨体堆対耐岱帯待怠態戴替泰滞胎腿苔袋貸退逮隊黛鯛代台大第醍題鷹滝瀧卓啄宅托択拓沢濯琢託鐸濁諾茸凧蛸只"],
["c3a1","叩但達辰奪脱巽竪辿棚谷狸鱈樽誰丹単嘆坦担探旦歎淡湛炭短端箪綻耽胆蛋誕鍛団壇弾断暖檀段男談値知地弛恥智池痴稚置致蜘遅馳築畜竹筑蓄逐秩窒茶嫡着中仲宙忠抽昼柱注虫衷註酎鋳駐樗瀦猪苧著貯丁兆凋喋寵"],
["c4a1","帖帳庁弔張彫徴懲挑暢朝潮牒町眺聴脹腸蝶調諜超跳銚長頂鳥勅捗直朕沈珍賃鎮陳津墜椎槌追鎚痛通塚栂掴槻佃漬柘辻蔦綴鍔椿潰坪壷嬬紬爪吊釣鶴亭低停偵剃貞呈堤定帝底庭廷弟悌抵挺提梯汀碇禎程締艇訂諦蹄逓"],
["c5a1","邸鄭釘鼎泥摘擢敵滴的笛適鏑溺哲徹撤轍迭鉄典填天展店添纏甜貼転顛点伝殿澱田電兎吐堵塗妬屠徒斗杜渡登菟賭途都鍍砥砺努度土奴怒倒党冬凍刀唐塔塘套宕島嶋悼投搭東桃梼棟盗淘湯涛灯燈当痘祷等答筒糖統到"],
["c6a1","董蕩藤討謄豆踏逃透鐙陶頭騰闘働動同堂導憧撞洞瞳童胴萄道銅峠鴇匿得徳涜特督禿篤毒独読栃橡凸突椴届鳶苫寅酉瀞噸屯惇敦沌豚遁頓呑曇鈍奈那内乍凪薙謎灘捺鍋楢馴縄畷南楠軟難汝二尼弐迩匂賑肉虹廿日乳入"],
["c7a1","如尿韮任妊忍認濡禰祢寧葱猫熱年念捻撚燃粘乃廼之埜嚢悩濃納能脳膿農覗蚤巴把播覇杷波派琶破婆罵芭馬俳廃拝排敗杯盃牌背肺輩配倍培媒梅楳煤狽買売賠陪這蝿秤矧萩伯剥博拍柏泊白箔粕舶薄迫曝漠爆縛莫駁麦"],
["c8a1","函箱硲箸肇筈櫨幡肌畑畠八鉢溌発醗髪伐罰抜筏閥鳩噺塙蛤隼伴判半反叛帆搬斑板氾汎版犯班畔繁般藩販範釆煩頒飯挽晩番盤磐蕃蛮匪卑否妃庇彼悲扉批披斐比泌疲皮碑秘緋罷肥被誹費避非飛樋簸備尾微枇毘琵眉美"],
["c9a1","鼻柊稗匹疋髭彦膝菱肘弼必畢筆逼桧姫媛紐百謬俵彪標氷漂瓢票表評豹廟描病秒苗錨鋲蒜蛭鰭品彬斌浜瀕貧賓頻敏瓶不付埠夫婦富冨布府怖扶敷斧普浮父符腐膚芙譜負賦赴阜附侮撫武舞葡蕪部封楓風葺蕗伏副復幅服"],
["caa1","福腹複覆淵弗払沸仏物鮒分吻噴墳憤扮焚奮粉糞紛雰文聞丙併兵塀幣平弊柄並蔽閉陛米頁僻壁癖碧別瞥蔑箆偏変片篇編辺返遍便勉娩弁鞭保舗鋪圃捕歩甫補輔穂募墓慕戊暮母簿菩倣俸包呆報奉宝峰峯崩庖抱捧放方朋"],
["cba1","法泡烹砲縫胞芳萌蓬蜂褒訪豊邦鋒飽鳳鵬乏亡傍剖坊妨帽忘忙房暴望某棒冒紡肪膨謀貌貿鉾防吠頬北僕卜墨撲朴牧睦穆釦勃没殆堀幌奔本翻凡盆摩磨魔麻埋妹昧枚毎哩槙幕膜枕鮪柾鱒桝亦俣又抹末沫迄侭繭麿万慢満"],
["cca1","漫蔓味未魅巳箕岬密蜜湊蓑稔脈妙粍民眠務夢無牟矛霧鵡椋婿娘冥名命明盟迷銘鳴姪牝滅免棉綿緬面麺摸模茂妄孟毛猛盲網耗蒙儲木黙目杢勿餅尤戻籾貰問悶紋門匁也冶夜爺耶野弥矢厄役約薬訳躍靖柳薮鑓愉愈油癒"],
["cda1","諭輸唯佑優勇友宥幽悠憂揖有柚湧涌猶猷由祐裕誘遊邑郵雄融夕予余与誉輿預傭幼妖容庸揚揺擁曜楊様洋溶熔用窯羊耀葉蓉要謡踊遥陽養慾抑欲沃浴翌翼淀羅螺裸来莱頼雷洛絡落酪乱卵嵐欄濫藍蘭覧利吏履李梨理璃"],
["cea1","痢裏裡里離陸律率立葎掠略劉流溜琉留硫粒隆竜龍侶慮旅虜了亮僚両凌寮料梁涼猟療瞭稜糧良諒遼量陵領力緑倫厘林淋燐琳臨輪隣鱗麟瑠塁涙累類令伶例冷励嶺怜玲礼苓鈴隷零霊麗齢暦歴列劣烈裂廉恋憐漣煉簾練聯"],
["cfa1","蓮連錬呂魯櫓炉賂路露労婁廊弄朗楼榔浪漏牢狼篭老聾蝋郎六麓禄肋録論倭和話歪賄脇惑枠鷲亙亘鰐詫藁蕨椀湾碗腕"],
["d0a1","弌丐丕个丱丶丼丿乂乖乘亂亅豫亊舒弍于亞亟亠亢亰亳亶从仍仄仆仂仗仞仭仟价伉佚估佛佝佗佇佶侈侏侘佻佩佰侑佯來侖儘俔俟俎俘俛俑俚俐俤俥倚倨倔倪倥倅伜俶倡倩倬俾俯們倆偃假會偕偐偈做偖偬偸傀傚傅傴傲"],
["d1a1","僉僊傳僂僖僞僥僭僣僮價僵儉儁儂儖儕儔儚儡儺儷儼儻儿兀兒兌兔兢竸兩兪兮冀冂囘册冉冏冑冓冕冖冤冦冢冩冪冫决冱冲冰况冽凅凉凛几處凩凭凰凵凾刄刋刔刎刧刪刮刳刹剏剄剋剌剞剔剪剴剩剳剿剽劍劔劒剱劈劑辨"],
["d2a1","辧劬劭劼劵勁勍勗勞勣勦飭勠勳勵勸勹匆匈甸匍匐匏匕匚匣匯匱匳匸區卆卅丗卉卍凖卞卩卮夘卻卷厂厖厠厦厥厮厰厶參簒雙叟曼燮叮叨叭叺吁吽呀听吭吼吮吶吩吝呎咏呵咎呟呱呷呰咒呻咀呶咄咐咆哇咢咸咥咬哄哈咨"],
["d3a1","咫哂咤咾咼哘哥哦唏唔哽哮哭哺哢唹啀啣啌售啜啅啖啗唸唳啝喙喀咯喊喟啻啾喘喞單啼喃喩喇喨嗚嗅嗟嗄嗜嗤嗔嘔嗷嘖嗾嗽嘛嗹噎噐營嘴嘶嘲嘸噫噤嘯噬噪嚆嚀嚊嚠嚔嚏嚥嚮嚶嚴囂嚼囁囃囀囈囎囑囓囗囮囹圀囿圄圉"],
["d4a1","圈國圍圓團圖嗇圜圦圷圸坎圻址坏坩埀垈坡坿垉垓垠垳垤垪垰埃埆埔埒埓堊埖埣堋堙堝塲堡塢塋塰毀塒堽塹墅墹墟墫墺壞墻墸墮壅壓壑壗壙壘壥壜壤壟壯壺壹壻壼壽夂夊夐夛梦夥夬夭夲夸夾竒奕奐奎奚奘奢奠奧奬奩"],
["d5a1","奸妁妝佞侫妣妲姆姨姜妍姙姚娥娟娑娜娉娚婀婬婉娵娶婢婪媚媼媾嫋嫂媽嫣嫗嫦嫩嫖嫺嫻嬌嬋嬖嬲嫐嬪嬶嬾孃孅孀孑孕孚孛孥孩孰孳孵學斈孺宀它宦宸寃寇寉寔寐寤實寢寞寥寫寰寶寳尅將專對尓尠尢尨尸尹屁屆屎屓"],
["d6a1","屐屏孱屬屮乢屶屹岌岑岔妛岫岻岶岼岷峅岾峇峙峩峽峺峭嶌峪崋崕崗嵜崟崛崑崔崢崚崙崘嵌嵒嵎嵋嵬嵳嵶嶇嶄嶂嶢嶝嶬嶮嶽嶐嶷嶼巉巍巓巒巖巛巫已巵帋帚帙帑帛帶帷幄幃幀幎幗幔幟幢幤幇幵并幺麼广庠廁廂廈廐廏"],
["d7a1","廖廣廝廚廛廢廡廨廩廬廱廳廰廴廸廾弃弉彝彜弋弑弖弩弭弸彁彈彌彎弯彑彖彗彙彡彭彳彷徃徂彿徊很徑徇從徙徘徠徨徭徼忖忻忤忸忱忝悳忿怡恠怙怐怩怎怱怛怕怫怦怏怺恚恁恪恷恟恊恆恍恣恃恤恂恬恫恙悁悍惧悃悚"],
["d8a1","悄悛悖悗悒悧悋惡悸惠惓悴忰悽惆悵惘慍愕愆惶惷愀惴惺愃愡惻惱愍愎慇愾愨愧慊愿愼愬愴愽慂慄慳慷慘慙慚慫慴慯慥慱慟慝慓慵憙憖憇憬憔憚憊憑憫憮懌懊應懷懈懃懆憺懋罹懍懦懣懶懺懴懿懽懼懾戀戈戉戍戌戔戛"],
["d9a1","戞戡截戮戰戲戳扁扎扞扣扛扠扨扼抂抉找抒抓抖拔抃抔拗拑抻拏拿拆擔拈拜拌拊拂拇抛拉挌拮拱挧挂挈拯拵捐挾捍搜捏掖掎掀掫捶掣掏掉掟掵捫捩掾揩揀揆揣揉插揶揄搖搴搆搓搦搶攝搗搨搏摧摯摶摎攪撕撓撥撩撈撼"],
["daa1","據擒擅擇撻擘擂擱擧舉擠擡抬擣擯攬擶擴擲擺攀擽攘攜攅攤攣攫攴攵攷收攸畋效敖敕敍敘敞敝敲數斂斃變斛斟斫斷旃旆旁旄旌旒旛旙无旡旱杲昊昃旻杳昵昶昴昜晏晄晉晁晞晝晤晧晨晟晢晰暃暈暎暉暄暘暝曁暹曉暾暼"],
["dba1","曄暸曖曚曠昿曦曩曰曵曷朏朖朞朦朧霸朮朿朶杁朸朷杆杞杠杙杣杤枉杰枩杼杪枌枋枦枡枅枷柯枴柬枳柩枸柤柞柝柢柮枹柎柆柧檜栞框栩桀桍栲桎梳栫桙档桷桿梟梏梭梔條梛梃檮梹桴梵梠梺椏梍桾椁棊椈棘椢椦棡椌棍"],
["dca1","棔棧棕椶椒椄棗棣椥棹棠棯椨椪椚椣椡棆楹楷楜楸楫楔楾楮椹楴椽楙椰楡楞楝榁楪榲榮槐榿槁槓榾槎寨槊槝榻槃榧樮榑榠榜榕榴槞槨樂樛槿權槹槲槧樅榱樞槭樔槫樊樒櫁樣樓橄樌橲樶橸橇橢橙橦橈樸樢檐檍檠檄檢檣"],
["dda1","檗蘗檻櫃櫂檸檳檬櫞櫑櫟檪櫚櫪櫻欅蘖櫺欒欖鬱欟欸欷盜欹飮歇歃歉歐歙歔歛歟歡歸歹歿殀殄殃殍殘殕殞殤殪殫殯殲殱殳殷殼毆毋毓毟毬毫毳毯麾氈氓气氛氤氣汞汕汢汪沂沍沚沁沛汾汨汳沒沐泄泱泓沽泗泅泝沮沱沾"],
["dea1","沺泛泯泙泪洟衍洶洫洽洸洙洵洳洒洌浣涓浤浚浹浙涎涕濤涅淹渕渊涵淇淦涸淆淬淞淌淨淒淅淺淙淤淕淪淮渭湮渮渙湲湟渾渣湫渫湶湍渟湃渺湎渤滿渝游溂溪溘滉溷滓溽溯滄溲滔滕溏溥滂溟潁漑灌滬滸滾漿滲漱滯漲滌"],
["dfa1","漾漓滷澆潺潸澁澀潯潛濳潭澂潼潘澎澑濂潦澳澣澡澤澹濆澪濟濕濬濔濘濱濮濛瀉瀋濺瀑瀁瀏濾瀛瀚潴瀝瀘瀟瀰瀾瀲灑灣炙炒炯烱炬炸炳炮烟烋烝烙焉烽焜焙煥煕熈煦煢煌煖煬熏燻熄熕熨熬燗熹熾燒燉燔燎燠燬燧燵燼"],
["e0a1","燹燿爍爐爛爨爭爬爰爲爻爼爿牀牆牋牘牴牾犂犁犇犒犖犢犧犹犲狃狆狄狎狒狢狠狡狹狷倏猗猊猜猖猝猴猯猩猥猾獎獏默獗獪獨獰獸獵獻獺珈玳珎玻珀珥珮珞璢琅瑯琥珸琲琺瑕琿瑟瑙瑁瑜瑩瑰瑣瑪瑶瑾璋璞璧瓊瓏瓔珱"],
["e1a1","瓠瓣瓧瓩瓮瓲瓰瓱瓸瓷甄甃甅甌甎甍甕甓甞甦甬甼畄畍畊畉畛畆畚畩畤畧畫畭畸當疆疇畴疊疉疂疔疚疝疥疣痂疳痃疵疽疸疼疱痍痊痒痙痣痞痾痿痼瘁痰痺痲痳瘋瘍瘉瘟瘧瘠瘡瘢瘤瘴瘰瘻癇癈癆癜癘癡癢癨癩癪癧癬癰"],
["e2a1","癲癶癸發皀皃皈皋皎皖皓皙皚皰皴皸皹皺盂盍盖盒盞盡盥盧盪蘯盻眈眇眄眩眤眞眥眦眛眷眸睇睚睨睫睛睥睿睾睹瞎瞋瞑瞠瞞瞰瞶瞹瞿瞼瞽瞻矇矍矗矚矜矣矮矼砌砒礦砠礪硅碎硴碆硼碚碌碣碵碪碯磑磆磋磔碾碼磅磊磬"],
["e3a1","磧磚磽磴礇礒礑礙礬礫祀祠祗祟祚祕祓祺祿禊禝禧齋禪禮禳禹禺秉秕秧秬秡秣稈稍稘稙稠稟禀稱稻稾稷穃穗穉穡穢穩龝穰穹穽窈窗窕窘窖窩竈窰窶竅竄窿邃竇竊竍竏竕竓站竚竝竡竢竦竭竰笂笏笊笆笳笘笙笞笵笨笶筐"],
["e4a1","筺笄筍笋筌筅筵筥筴筧筰筱筬筮箝箘箟箍箜箚箋箒箏筝箙篋篁篌篏箴篆篝篩簑簔篦篥籠簀簇簓篳篷簗簍篶簣簧簪簟簷簫簽籌籃籔籏籀籐籘籟籤籖籥籬籵粃粐粤粭粢粫粡粨粳粲粱粮粹粽糀糅糂糘糒糜糢鬻糯糲糴糶糺紆"],
["e5a1","紂紜紕紊絅絋紮紲紿紵絆絳絖絎絲絨絮絏絣經綉絛綏絽綛綺綮綣綵緇綽綫總綢綯緜綸綟綰緘緝緤緞緻緲緡縅縊縣縡縒縱縟縉縋縢繆繦縻縵縹繃縷縲縺繧繝繖繞繙繚繹繪繩繼繻纃緕繽辮繿纈纉續纒纐纓纔纖纎纛纜缸缺"],
["e6a1","罅罌罍罎罐网罕罔罘罟罠罨罩罧罸羂羆羃羈羇羌羔羞羝羚羣羯羲羹羮羶羸譱翅翆翊翕翔翡翦翩翳翹飜耆耄耋耒耘耙耜耡耨耿耻聊聆聒聘聚聟聢聨聳聲聰聶聹聽聿肄肆肅肛肓肚肭冐肬胛胥胙胝胄胚胖脉胯胱脛脩脣脯腋"],
["e7a1","隋腆脾腓腑胼腱腮腥腦腴膃膈膊膀膂膠膕膤膣腟膓膩膰膵膾膸膽臀臂膺臉臍臑臙臘臈臚臟臠臧臺臻臾舁舂舅與舊舍舐舖舩舫舸舳艀艙艘艝艚艟艤艢艨艪艫舮艱艷艸艾芍芒芫芟芻芬苡苣苟苒苴苳苺莓范苻苹苞茆苜茉苙"],
["e8a1","茵茴茖茲茱荀茹荐荅茯茫茗茘莅莚莪莟莢莖茣莎莇莊荼莵荳荵莠莉莨菴萓菫菎菽萃菘萋菁菷萇菠菲萍萢萠莽萸蔆菻葭萪萼蕚蒄葷葫蒭葮蒂葩葆萬葯葹萵蓊葢蒹蒿蒟蓙蓍蒻蓚蓐蓁蓆蓖蒡蔡蓿蓴蔗蔘蔬蔟蔕蔔蓼蕀蕣蕘蕈"],
["e9a1","蕁蘂蕋蕕薀薤薈薑薊薨蕭薔薛藪薇薜蕷蕾薐藉薺藏薹藐藕藝藥藜藹蘊蘓蘋藾藺蘆蘢蘚蘰蘿虍乕虔號虧虱蚓蚣蚩蚪蚋蚌蚶蚯蛄蛆蚰蛉蠣蚫蛔蛞蛩蛬蛟蛛蛯蜒蜆蜈蜀蜃蛻蜑蜉蜍蛹蜊蜴蜿蜷蜻蜥蜩蜚蝠蝟蝸蝌蝎蝴蝗蝨蝮蝙"],
["eaa1","蝓蝣蝪蠅螢螟螂螯蟋螽蟀蟐雖螫蟄螳蟇蟆螻蟯蟲蟠蠏蠍蟾蟶蟷蠎蟒蠑蠖蠕蠢蠡蠱蠶蠹蠧蠻衄衂衒衙衞衢衫袁衾袞衵衽袵衲袂袗袒袮袙袢袍袤袰袿袱裃裄裔裘裙裝裹褂裼裴裨裲褄褌褊褓襃褞褥褪褫襁襄褻褶褸襌褝襠襞"],
["eba1","襦襤襭襪襯襴襷襾覃覈覊覓覘覡覩覦覬覯覲覺覽覿觀觚觜觝觧觴觸訃訖訐訌訛訝訥訶詁詛詒詆詈詼詭詬詢誅誂誄誨誡誑誥誦誚誣諄諍諂諚諫諳諧諤諱謔諠諢諷諞諛謌謇謚諡謖謐謗謠謳鞫謦謫謾謨譁譌譏譎證譖譛譚譫"],
["eca1","譟譬譯譴譽讀讌讎讒讓讖讙讚谺豁谿豈豌豎豐豕豢豬豸豺貂貉貅貊貍貎貔豼貘戝貭貪貽貲貳貮貶賈賁賤賣賚賽賺賻贄贅贊贇贏贍贐齎贓賍贔贖赧赭赱赳趁趙跂趾趺跏跚跖跌跛跋跪跫跟跣跼踈踉跿踝踞踐踟蹂踵踰踴蹊"],
["eda1","蹇蹉蹌蹐蹈蹙蹤蹠踪蹣蹕蹶蹲蹼躁躇躅躄躋躊躓躑躔躙躪躡躬躰軆躱躾軅軈軋軛軣軼軻軫軾輊輅輕輒輙輓輜輟輛輌輦輳輻輹轅轂輾轌轉轆轎轗轜轢轣轤辜辟辣辭辯辷迚迥迢迪迯邇迴逅迹迺逑逕逡逍逞逖逋逧逶逵逹迸"],
["eea1","遏遐遑遒逎遉逾遖遘遞遨遯遶隨遲邂遽邁邀邊邉邏邨邯邱邵郢郤扈郛鄂鄒鄙鄲鄰酊酖酘酣酥酩酳酲醋醉醂醢醫醯醪醵醴醺釀釁釉釋釐釖釟釡釛釼釵釶鈞釿鈔鈬鈕鈑鉞鉗鉅鉉鉤鉈銕鈿鉋鉐銜銖銓銛鉚鋏銹銷鋩錏鋺鍄錮"],
["efa1","錙錢錚錣錺錵錻鍜鍠鍼鍮鍖鎰鎬鎭鎔鎹鏖鏗鏨鏥鏘鏃鏝鏐鏈鏤鐚鐔鐓鐃鐇鐐鐶鐫鐵鐡鐺鑁鑒鑄鑛鑠鑢鑞鑪鈩鑰鑵鑷鑽鑚鑼鑾钁鑿閂閇閊閔閖閘閙閠閨閧閭閼閻閹閾闊濶闃闍闌闕闔闖關闡闥闢阡阨阮阯陂陌陏陋陷陜陞"],
["f0a1","陝陟陦陲陬隍隘隕隗險隧隱隲隰隴隶隸隹雎雋雉雍襍雜霍雕雹霄霆霈霓霎霑霏霖霙霤霪霰霹霽霾靄靆靈靂靉靜靠靤靦靨勒靫靱靹鞅靼鞁靺鞆鞋鞏鞐鞜鞨鞦鞣鞳鞴韃韆韈韋韜韭齏韲竟韶韵頏頌頸頤頡頷頽顆顏顋顫顯顰"],
["f1a1","顱顴顳颪颯颱颶飄飃飆飩飫餃餉餒餔餘餡餝餞餤餠餬餮餽餾饂饉饅饐饋饑饒饌饕馗馘馥馭馮馼駟駛駝駘駑駭駮駱駲駻駸騁騏騅駢騙騫騷驅驂驀驃騾驕驍驛驗驟驢驥驤驩驫驪骭骰骼髀髏髑髓體髞髟髢髣髦髯髫髮髴髱髷"],
["f2a1","髻鬆鬘鬚鬟鬢鬣鬥鬧鬨鬩鬪鬮鬯鬲魄魃魏魍魎魑魘魴鮓鮃鮑鮖鮗鮟鮠鮨鮴鯀鯊鮹鯆鯏鯑鯒鯣鯢鯤鯔鯡鰺鯲鯱鯰鰕鰔鰉鰓鰌鰆鰈鰒鰊鰄鰮鰛鰥鰤鰡鰰鱇鰲鱆鰾鱚鱠鱧鱶鱸鳧鳬鳰鴉鴈鳫鴃鴆鴪鴦鶯鴣鴟鵄鴕鴒鵁鴿鴾鵆鵈"],
["f3a1","鵝鵞鵤鵑鵐鵙鵲鶉鶇鶫鵯鵺鶚鶤鶩鶲鷄鷁鶻鶸鶺鷆鷏鷂鷙鷓鷸鷦鷭鷯鷽鸚鸛鸞鹵鹹鹽麁麈麋麌麒麕麑麝麥麩麸麪麭靡黌黎黏黐黔黜點黝黠黥黨黯黴黶黷黹黻黼黽鼇鼈皷鼕鼡鼬鼾齊齒齔齣齟齠齡齦齧齬齪齷齲齶龕龜龠"],
["f4a1","堯槇遙瑤凜熙"],
["f9a1","纊褜鍈銈蓜俉炻昱棈鋹曻彅丨仡仼伀伃伹佖侒侊侚侔俍偀倢俿倞偆偰偂傔僴僘兊兤冝冾凬刕劜劦勀勛匀匇匤卲厓厲叝﨎咜咊咩哿喆坙坥垬埈埇﨏塚增墲夋奓奛奝奣妤妺孖寀甯寘寬尞岦岺峵崧嵓﨑嵂嵭嶸嶹巐弡弴彧德"],
["faa1","忞恝悅悊惞惕愠惲愑愷愰憘戓抦揵摠撝擎敎昀昕昻昉昮昞昤晥晗晙晴晳暙暠暲暿曺朎朗杦枻桒柀栁桄棏﨓楨﨔榘槢樰橫橆橳橾櫢櫤毖氿汜沆汯泚洄涇浯涖涬淏淸淲淼渹湜渧渼溿澈澵濵瀅瀇瀨炅炫焏焄煜煆煇凞燁燾犱"],
["fba1","犾猤猪獷玽珉珖珣珒琇珵琦琪琩琮瑢璉璟甁畯皂皜皞皛皦益睆劯砡硎硤硺礰礼神祥禔福禛竑竧靖竫箞精絈絜綷綠緖繒罇羡羽茁荢荿菇菶葈蒴蕓蕙蕫﨟薰蘒﨡蠇裵訒訷詹誧誾諟諸諶譓譿賰賴贒赶﨣軏﨤逸遧郞都鄕鄧釚"],
["fca1","釗釞釭釮釤釥鈆鈐鈊鈺鉀鈼鉎鉙鉑鈹鉧銧鉷鉸鋧鋗鋙鋐﨧鋕鋠鋓錥錡鋻﨨錞鋿錝錂鍰鍗鎤鏆鏞鏸鐱鑅鑈閒隆﨩隝隯霳霻靃靍靏靑靕顗顥飯飼餧館馞驎髙髜魵魲鮏鮱鮻鰀鵰鵫鶴鸙黑"],
["fcf1","ⅰ",9,"¬¦'""],
["8fa2af","˘ˇ¸˙˝¯˛˚~΄΅"],
["8fa2c2","¡¦¿"],
["8fa2eb","ºª©®™¤№"],
["8fa6e1","ΆΈΉΊΪ"],
["8fa6e7","Ό"],
["8fa6e9","ΎΫ"],
["8fa6ec","Ώ"],
["8fa6f1","άέήίϊΐόςύϋΰώ"],
["8fa7c2","Ђ",10,"ЎЏ"],
["8fa7f2","ђ",10,"ўџ"],
["8fa9a1","ÆĐ"],
["8fa9a4","Ħ"],
["8fa9a6","IJ"],
["8fa9a8","ŁĿ"],
["8fa9ab","ŊØŒ"],
["8fa9af","ŦÞ"],
["8fa9c1","æđðħıijĸłŀʼnŋøœßŧþ"],
["8faaa1","ÁÀÄÂĂǍĀĄÅÃĆĈČÇĊĎÉÈËÊĚĖĒĘ"],
["8faaba","ĜĞĢĠĤÍÌÏÎǏİĪĮĨĴĶĹĽĻŃŇŅÑÓÒÖÔǑŐŌÕŔŘŖŚŜŠŞŤŢÚÙÜÛŬǓŰŪŲŮŨǗǛǙǕŴÝŸŶŹŽŻ"],
["8faba1","áàäâăǎāąåãćĉčçċďéèëêěėēęǵĝğ"],
["8fabbd","ġĥíìïîǐ"],
["8fabc5","īįĩĵķĺľļńňņñóòöôǒőōõŕřŗśŝšşťţúùüûŭǔűūųůũǘǜǚǖŵýÿŷźžż"],
["8fb0a1","丂丄丅丌丒丟丣两丨丫丮丯丰丵乀乁乄乇乑乚乜乣乨乩乴乵乹乿亍亖亗亝亯亹仃仐仚仛仠仡仢仨仯仱仳仵份仾仿伀伂伃伈伋伌伒伕伖众伙伮伱你伳伵伷伹伻伾佀佂佈佉佋佌佒佔佖佘佟佣佪佬佮佱佷佸佹佺佽佾侁侂侄"],
["8fb1a1","侅侉侊侌侎侐侒侓侔侗侙侚侞侟侲侷侹侻侼侽侾俀俁俅俆俈俉俋俌俍俏俒俜俠俢俰俲俼俽俿倀倁倄倇倊倌倎倐倓倗倘倛倜倝倞倢倧倮倰倲倳倵偀偁偂偅偆偊偌偎偑偒偓偗偙偟偠偢偣偦偧偪偭偰偱倻傁傃傄傆傊傎傏傐"],
["8fb2a1","傒傓傔傖傛傜傞",4,"傪傯傰傹傺傽僀僃僄僇僌僎僐僓僔僘僜僝僟僢僤僦僨僩僯僱僶僺僾儃儆儇儈儋儌儍儎僲儐儗儙儛儜儝儞儣儧儨儬儭儯儱儳儴儵儸儹兂兊兏兓兕兗兘兟兤兦兾冃冄冋冎冘冝冡冣冭冸冺冼冾冿凂"],
["8fb3a1","凈减凑凒凓凕凘凞凢凥凮凲凳凴凷刁刂刅划刓刕刖刘刢刨刱刲刵刼剅剉剕剗剘剚剜剟剠剡剦剮剷剸剹劀劂劅劊劌劓劕劖劗劘劚劜劤劥劦劧劯劰劶劷劸劺劻劽勀勄勆勈勌勏勑勔勖勛勜勡勥勨勩勪勬勰勱勴勶勷匀匃匊匋"],
["8fb4a1","匌匑匓匘匛匜匞匟匥匧匨匩匫匬匭匰匲匵匼匽匾卂卌卋卙卛卡卣卥卬卭卲卹卾厃厇厈厎厓厔厙厝厡厤厪厫厯厲厴厵厷厸厺厽叀叅叏叒叓叕叚叝叞叠另叧叵吂吓吚吡吧吨吪启吱吴吵呃呄呇呍呏呞呢呤呦呧呩呫呭呮呴呿"],
["8fb5a1","咁咃咅咈咉咍咑咕咖咜咟咡咦咧咩咪咭咮咱咷咹咺咻咿哆哊响哎哠哪哬哯哶哼哾哿唀唁唅唈唉唌唍唎唕唪唫唲唵唶唻唼唽啁啇啉啊啍啐啑啘啚啛啞啠啡啤啦啿喁喂喆喈喎喏喑喒喓喔喗喣喤喭喲喿嗁嗃嗆嗉嗋嗌嗎嗑嗒"],
["8fb6a1","嗓嗗嗘嗛嗞嗢嗩嗶嗿嘅嘈嘊嘍",5,"嘙嘬嘰嘳嘵嘷嘹嘻嘼嘽嘿噀噁噃噄噆噉噋噍噏噔噞噠噡噢噣噦噩噭噯噱噲噵嚄嚅嚈嚋嚌嚕嚙嚚嚝嚞嚟嚦嚧嚨嚩嚫嚬嚭嚱嚳嚷嚾囅囉囊囋囏囐囌囍囙囜囝囟囡囤",4,"囱囫园"],
["8fb7a1","囶囷圁圂圇圊圌圑圕圚圛圝圠圢圣圤圥圩圪圬圮圯圳圴圽圾圿坅坆坌坍坒坢坥坧坨坫坭",4,"坳坴坵坷坹坺坻坼坾垁垃垌垔垗垙垚垜垝垞垟垡垕垧垨垩垬垸垽埇埈埌埏埕埝埞埤埦埧埩埭埰埵埶埸埽埾埿堃堄堈堉埡"],
["8fb8a1","堌堍堛堞堟堠堦堧堭堲堹堿塉塌塍塏塐塕塟塡塤塧塨塸塼塿墀墁墇墈墉墊墌墍墏墐墔墖墝墠墡墢墦墩墱墲壄墼壂壈壍壎壐壒壔壖壚壝壡壢壩壳夅夆夋夌夒夓夔虁夝夡夣夤夨夯夰夳夵夶夿奃奆奒奓奙奛奝奞奟奡奣奫奭"],
["8fb9a1","奯奲奵奶她奻奼妋妌妎妒妕妗妟妤妧妭妮妯妰妳妷妺妼姁姃姄姈姊姍姒姝姞姟姣姤姧姮姯姱姲姴姷娀娄娌娍娎娒娓娞娣娤娧娨娪娭娰婄婅婇婈婌婐婕婞婣婥婧婭婷婺婻婾媋媐媓媖媙媜媞媟媠媢媧媬媱媲媳媵媸媺媻媿"],
["8fbaa1","嫄嫆嫈嫏嫚嫜嫠嫥嫪嫮嫵嫶嫽嬀嬁嬈嬗嬴嬙嬛嬝嬡嬥嬭嬸孁孋孌孒孖孞孨孮孯孼孽孾孿宁宄宆宊宎宐宑宓宔宖宨宩宬宭宯宱宲宷宺宼寀寁寍寏寖",4,"寠寯寱寴寽尌尗尞尟尣尦尩尫尬尮尰尲尵尶屙屚屜屢屣屧屨屩"],
["8fbba1","屭屰屴屵屺屻屼屽岇岈岊岏岒岝岟岠岢岣岦岪岲岴岵岺峉峋峒峝峗峮峱峲峴崁崆崍崒崫崣崤崦崧崱崴崹崽崿嵂嵃嵆嵈嵕嵑嵙嵊嵟嵠嵡嵢嵤嵪嵭嵰嵹嵺嵾嵿嶁嶃嶈嶊嶒嶓嶔嶕嶙嶛嶟嶠嶧嶫嶰嶴嶸嶹巃巇巋巐巎巘巙巠巤"],
["8fbca1","巩巸巹帀帇帍帒帔帕帘帟帠帮帨帲帵帾幋幐幉幑幖幘幛幜幞幨幪",4,"幰庀庋庎庢庤庥庨庪庬庱庳庽庾庿廆廌廋廎廑廒廔廕廜廞廥廫异弆弇弈弎弙弜弝弡弢弣弤弨弫弬弮弰弴弶弻弽弿彀彄彅彇彍彐彔彘彛彠彣彤彧"],
["8fbda1","彯彲彴彵彸彺彽彾徉徍徏徖徜徝徢徧徫徤徬徯徰徱徸忄忇忈忉忋忐",4,"忞忡忢忨忩忪忬忭忮忯忲忳忶忺忼怇怊怍怓怔怗怘怚怟怤怭怳怵恀恇恈恉恌恑恔恖恗恝恡恧恱恾恿悂悆悈悊悎悑悓悕悘悝悞悢悤悥您悰悱悷"],
["8fbea1","悻悾惂惄惈惉惊惋惎惏惔惕惙惛惝惞惢惥惲惵惸惼惽愂愇愊愌愐",4,"愖愗愙愜愞愢愪愫愰愱愵愶愷愹慁慅慆慉慞慠慬慲慸慻慼慿憀憁憃憄憋憍憒憓憗憘憜憝憟憠憥憨憪憭憸憹憼懀懁懂懎懏懕懜懝懞懟懡懢懧懩懥"],
["8fbfa1","懬懭懯戁戃戄戇戓戕戜戠戢戣戧戩戫戹戽扂扃扄扆扌扐扑扒扔扖扚扜扤扭扯扳扺扽抍抎抏抐抦抨抳抶抷抺抾抿拄拎拕拖拚拪拲拴拼拽挃挄挊挋挍挐挓挖挘挩挪挭挵挶挹挼捁捂捃捄捆捊捋捎捒捓捔捘捛捥捦捬捭捱捴捵"],
["8fc0a1","捸捼捽捿掂掄掇掊掐掔掕掙掚掞掤掦掭掮掯掽揁揅揈揎揑揓揔揕揜揠揥揪揬揲揳揵揸揹搉搊搐搒搔搘搞搠搢搤搥搩搪搯搰搵搽搿摋摏摑摒摓摔摚摛摜摝摟摠摡摣摭摳摴摻摽撅撇撏撐撑撘撙撛撝撟撡撣撦撨撬撳撽撾撿"],
["8fc1a1","擄擉擊擋擌擎擐擑擕擗擤擥擩擪擭擰擵擷擻擿攁攄攈攉攊攏攓攔攖攙攛攞攟攢攦攩攮攱攺攼攽敃敇敉敐敒敔敟敠敧敫敺敽斁斅斊斒斕斘斝斠斣斦斮斲斳斴斿旂旈旉旎旐旔旖旘旟旰旲旴旵旹旾旿昀昄昈昉昍昑昒昕昖昝"],
["8fc2a1","昞昡昢昣昤昦昩昪昫昬昮昰昱昳昹昷晀晅晆晊晌晑晎晗晘晙晛晜晠晡曻晪晫晬晾晳晵晿晷晸晹晻暀晼暋暌暍暐暒暙暚暛暜暟暠暤暭暱暲暵暻暿曀曂曃曈曌曎曏曔曛曟曨曫曬曮曺朅朇朎朓朙朜朠朢朳朾杅杇杈杌杔杕杝"],
["8fc3a1","杦杬杮杴杶杻极构枎枏枑枓枖枘枙枛枰枱枲枵枻枼枽柹柀柂柃柅柈柉柒柗柙柜柡柦柰柲柶柷桒栔栙栝栟栨栧栬栭栯栰栱栳栻栿桄桅桊桌桕桗桘桛桫桮",4,"桵桹桺桻桼梂梄梆梈梖梘梚梜梡梣梥梩梪梮梲梻棅棈棌棏"],
["8fc4a1","棐棑棓棖棙棜棝棥棨棪棫棬棭棰棱棵棶棻棼棽椆椉椊椐椑椓椖椗椱椳椵椸椻楂楅楉楎楗楛楣楤楥楦楨楩楬楰楱楲楺楻楿榀榍榒榖榘榡榥榦榨榫榭榯榷榸榺榼槅槈槑槖槗槢槥槮槯槱槳槵槾樀樁樃樏樑樕樚樝樠樤樨樰樲"],
["8fc5a1","樴樷樻樾樿橅橆橉橊橎橐橑橒橕橖橛橤橧橪橱橳橾檁檃檆檇檉檋檑檛檝檞檟檥檫檯檰檱檴檽檾檿櫆櫉櫈櫌櫐櫔櫕櫖櫜櫝櫤櫧櫬櫰櫱櫲櫼櫽欂欃欆欇欉欏欐欑欗欛欞欤欨欫欬欯欵欶欻欿歆歊歍歒歖歘歝歠歧歫歮歰歵歽"],
["8fc6a1","歾殂殅殗殛殟殠殢殣殨殩殬殭殮殰殸殹殽殾毃毄毉毌毖毚毡毣毦毧毮毱毷毹毿氂氄氅氉氍氎氐氒氙氟氦氧氨氬氮氳氵氶氺氻氿汊汋汍汏汒汔汙汛汜汫汭汯汴汶汸汹汻沅沆沇沉沔沕沗沘沜沟沰沲沴泂泆泍泏泐泑泒泔泖"],
["8fc7a1","泚泜泠泧泩泫泬泮泲泴洄洇洊洎洏洑洓洚洦洧洨汧洮洯洱洹洼洿浗浞浟浡浥浧浯浰浼涂涇涑涒涔涖涗涘涪涬涴涷涹涽涿淄淈淊淎淏淖淛淝淟淠淢淥淩淯淰淴淶淼渀渄渞渢渧渲渶渹渻渼湄湅湈湉湋湏湑湒湓湔湗湜湝湞"],
["8fc8a1","湢湣湨湳湻湽溍溓溙溠溧溭溮溱溳溻溿滀滁滃滇滈滊滍滎滏滫滭滮滹滻滽漄漈漊漌漍漖漘漚漛漦漩漪漯漰漳漶漻漼漭潏潑潒潓潗潙潚潝潞潡潢潨潬潽潾澃澇澈澋澌澍澐澒澓澔澖澚澟澠澥澦澧澨澮澯澰澵澶澼濅濇濈濊"],
["8fc9a1","濚濞濨濩濰濵濹濼濽瀀瀅瀆瀇瀍瀗瀠瀣瀯瀴瀷瀹瀼灃灄灈灉灊灋灔灕灝灞灎灤灥灬灮灵灶灾炁炅炆炔",4,"炛炤炫炰炱炴炷烊烑烓烔烕烖烘烜烤烺焃",4,"焋焌焏焞焠焫焭焯焰焱焸煁煅煆煇煊煋煐煒煗煚煜煞煠"],
["8fcaa1","煨煹熀熅熇熌熒熚熛熠熢熯熰熲熳熺熿燀燁燄燋燌燓燖燙燚燜燸燾爀爇爈爉爓爗爚爝爟爤爫爯爴爸爹牁牂牃牅牎牏牐牓牕牖牚牜牞牠牣牨牫牮牯牱牷牸牻牼牿犄犉犍犎犓犛犨犭犮犱犴犾狁狇狉狌狕狖狘狟狥狳狴狺狻"],
["8fcba1","狾猂猄猅猇猋猍猒猓猘猙猞猢猤猧猨猬猱猲猵猺猻猽獃獍獐獒獖獘獝獞獟獠獦獧獩獫獬獮獯獱獷獹獼玀玁玃玅玆玎玐玓玕玗玘玜玞玟玠玢玥玦玪玫玭玵玷玹玼玽玿珅珆珉珋珌珏珒珓珖珙珝珡珣珦珧珩珴珵珷珹珺珻珽"],
["8fcca1","珿琀琁琄琇琊琑琚琛琤琦琨",9,"琹瑀瑃瑄瑆瑇瑋瑍瑑瑒瑗瑝瑢瑦瑧瑨瑫瑭瑮瑱瑲璀璁璅璆璇璉璏璐璑璒璘璙璚璜璟璠璡璣璦璨璩璪璫璮璯璱璲璵璹璻璿瓈瓉瓌瓐瓓瓘瓚瓛瓞瓟瓤瓨瓪瓫瓯瓴瓺瓻瓼瓿甆"],
["8fcda1","甒甖甗甠甡甤甧甩甪甯甶甹甽甾甿畀畃畇畈畎畐畒畗畞畟畡畯畱畹",5,"疁疅疐疒疓疕疙疜疢疤疴疺疿痀痁痄痆痌痎痏痗痜痟痠痡痤痧痬痮痯痱痹瘀瘂瘃瘄瘇瘈瘊瘌瘏瘒瘓瘕瘖瘙瘛瘜瘝瘞瘣瘥瘦瘩瘭瘲瘳瘵瘸瘹"],
["8fcea1","瘺瘼癊癀癁癃癄癅癉癋癕癙癟癤癥癭癮癯癱癴皁皅皌皍皕皛皜皝皟皠皢",6,"皪皭皽盁盅盉盋盌盎盔盙盠盦盨盬盰盱盶盹盼眀眆眊眎眒眔眕眗眙眚眜眢眨眭眮眯眴眵眶眹眽眾睂睅睆睊睍睎睏睒睖睗睜睞睟睠睢"],
["8fcfa1","睤睧睪睬睰睲睳睴睺睽瞀瞄瞌瞍瞔瞕瞖瞚瞟瞢瞧瞪瞮瞯瞱瞵瞾矃矉矑矒矕矙矞矟矠矤矦矪矬矰矱矴矸矻砅砆砉砍砎砑砝砡砢砣砭砮砰砵砷硃硄硇硈硌硎硒硜硞硠硡硣硤硨硪确硺硾碊碏碔碘碡碝碞碟碤碨碬碭碰碱碲碳"],
["8fd0a1","碻碽碿磇磈磉磌磎磒磓磕磖磤磛磟磠磡磦磪磲磳礀磶磷磺磻磿礆礌礐礚礜礞礟礠礥礧礩礭礱礴礵礻礽礿祄祅祆祊祋祏祑祔祘祛祜祧祩祫祲祹祻祼祾禋禌禑禓禔禕禖禘禛禜禡禨禩禫禯禱禴禸离秂秄秇秈秊秏秔秖秚秝秞"],
["8fd1a1","秠秢秥秪秫秭秱秸秼稂稃稇稉稊稌稑稕稛稞稡稧稫稭稯稰稴稵稸稹稺穄穅穇穈穌穕穖穙穜穝穟穠穥穧穪穭穵穸穾窀窂窅窆窊窋窐窑窔窞窠窣窬窳窵窹窻窼竆竉竌竎竑竛竨竩竫竬竱竴竻竽竾笇笔笟笣笧笩笪笫笭笮笯笰"],
["8fd2a1","笱笴笽笿筀筁筇筎筕筠筤筦筩筪筭筯筲筳筷箄箉箎箐箑箖箛箞箠箥箬箯箰箲箵箶箺箻箼箽篂篅篈篊篔篖篗篙篚篛篨篪篲篴篵篸篹篺篼篾簁簂簃簄簆簉簋簌簎簏簙簛簠簥簦簨簬簱簳簴簶簹簺籆籊籕籑籒籓籙",5],
["8fd3a1","籡籣籧籩籭籮籰籲籹籼籽粆粇粏粔粞粠粦粰粶粷粺粻粼粿糄糇糈糉糍糏糓糔糕糗糙糚糝糦糩糫糵紃紇紈紉紏紑紒紓紖紝紞紣紦紪紭紱紼紽紾絀絁絇絈絍絑絓絗絙絚絜絝絥絧絪絰絸絺絻絿綁綂綃綅綆綈綋綌綍綑綖綗綝"],
["8fd4a1","綞綦綧綪綳綶綷綹緂",4,"緌緍緎緗緙縀緢緥緦緪緫緭緱緵緶緹緺縈縐縑縕縗縜縝縠縧縨縬縭縯縳縶縿繄繅繇繎繐繒繘繟繡繢繥繫繮繯繳繸繾纁纆纇纊纍纑纕纘纚纝纞缼缻缽缾缿罃罄罇罏罒罓罛罜罝罡罣罤罥罦罭"],
["8fd5a1","罱罽罾罿羀羋羍羏羐羑羖羗羜羡羢羦羪羭羴羼羿翀翃翈翎翏翛翟翣翥翨翬翮翯翲翺翽翾翿耇耈耊耍耎耏耑耓耔耖耝耞耟耠耤耦耬耮耰耴耵耷耹耺耼耾聀聄聠聤聦聭聱聵肁肈肎肜肞肦肧肫肸肹胈胍胏胒胔胕胗胘胠胭胮"],
["8fd6a1","胰胲胳胶胹胺胾脃脋脖脗脘脜脞脠脤脧脬脰脵脺脼腅腇腊腌腒腗腠腡腧腨腩腭腯腷膁膐膄膅膆膋膎膖膘膛膞膢膮膲膴膻臋臃臅臊臎臏臕臗臛臝臞臡臤臫臬臰臱臲臵臶臸臹臽臿舀舃舏舓舔舙舚舝舡舢舨舲舴舺艃艄艅艆"],
["8fd7a1","艋艎艏艑艖艜艠艣艧艭艴艻艽艿芀芁芃芄芇芉芊芎芑芔芖芘芚芛芠芡芣芤芧芨芩芪芮芰芲芴芷芺芼芾芿苆苐苕苚苠苢苤苨苪苭苯苶苷苽苾茀茁茇茈茊茋荔茛茝茞茟茡茢茬茭茮茰茳茷茺茼茽荂荃荄荇荍荎荑荕荖荗荰荸"],
["8fd8a1","荽荿莀莂莄莆莍莒莔莕莘莙莛莜莝莦莧莩莬莾莿菀菇菉菏菐菑菔菝荓菨菪菶菸菹菼萁萆萊萏萑萕萙莭萯萹葅葇葈葊葍葏葑葒葖葘葙葚葜葠葤葥葧葪葰葳葴葶葸葼葽蒁蒅蒒蒓蒕蒞蒦蒨蒩蒪蒯蒱蒴蒺蒽蒾蓀蓂蓇蓈蓌蓏蓓"],
["8fd9a1","蓜蓧蓪蓯蓰蓱蓲蓷蔲蓺蓻蓽蔂蔃蔇蔌蔎蔐蔜蔞蔢蔣蔤蔥蔧蔪蔫蔯蔳蔴蔶蔿蕆蕏",4,"蕖蕙蕜",6,"蕤蕫蕯蕹蕺蕻蕽蕿薁薅薆薉薋薌薏薓薘薝薟薠薢薥薧薴薶薷薸薼薽薾薿藂藇藊藋藎薭藘藚藟藠藦藨藭藳藶藼"],
["8fdaa1","藿蘀蘄蘅蘍蘎蘐蘑蘒蘘蘙蘛蘞蘡蘧蘩蘶蘸蘺蘼蘽虀虂虆虒虓虖虗虘虙虝虠",4,"虩虬虯虵虶虷虺蚍蚑蚖蚘蚚蚜蚡蚦蚧蚨蚭蚱蚳蚴蚵蚷蚸蚹蚿蛀蛁蛃蛅蛑蛒蛕蛗蛚蛜蛠蛣蛥蛧蚈蛺蛼蛽蜄蜅蜇蜋蜎蜏蜐蜓蜔蜙蜞蜟蜡蜣"],
["8fdba1","蜨蜮蜯蜱蜲蜹蜺蜼蜽蜾蝀蝃蝅蝍蝘蝝蝡蝤蝥蝯蝱蝲蝻螃",6,"螋螌螐螓螕螗螘螙螞螠螣螧螬螭螮螱螵螾螿蟁蟈蟉蟊蟎蟕蟖蟙蟚蟜蟟蟢蟣蟤蟪蟫蟭蟱蟳蟸蟺蟿蠁蠃蠆蠉蠊蠋蠐蠙蠒蠓蠔蠘蠚蠛蠜蠞蠟蠨蠭蠮蠰蠲蠵"],
["8fdca1","蠺蠼衁衃衅衈衉衊衋衎衑衕衖衘衚衜衟衠衤衩衱衹衻袀袘袚袛袜袟袠袨袪袺袽袾裀裊",4,"裑裒裓裛裞裧裯裰裱裵裷褁褆褍褎褏褕褖褘褙褚褜褠褦褧褨褰褱褲褵褹褺褾襀襂襅襆襉襏襒襗襚襛襜襡襢襣襫襮襰襳襵襺"],
["8fdda1","襻襼襽覉覍覐覔覕覛覜覟覠覥覰覴覵覶覷覼觔",4,"觥觩觫觭觱觳觶觹觽觿訄訅訇訏訑訒訔訕訞訠訢訤訦訫訬訯訵訷訽訾詀詃詅詇詉詍詎詓詖詗詘詜詝詡詥詧詵詶詷詹詺詻詾詿誀誃誆誋誏誐誒誖誗誙誟誧誩誮誯誳"],
["8fdea1","誶誷誻誾諃諆諈諉諊諑諓諔諕諗諝諟諬諰諴諵諶諼諿謅謆謋謑謜謞謟謊謭謰謷謼譂",4,"譈譒譓譔譙譍譞譣譭譶譸譹譼譾讁讄讅讋讍讏讔讕讜讞讟谸谹谽谾豅豇豉豋豏豑豓豔豗豘豛豝豙豣豤豦豨豩豭豳豵豶豻豾貆"],
["8fdfa1","貇貋貐貒貓貙貛貜貤貹貺賅賆賉賋賏賖賕賙賝賡賨賬賯賰賲賵賷賸賾賿贁贃贉贒贗贛赥赩赬赮赿趂趄趈趍趐趑趕趞趟趠趦趫趬趯趲趵趷趹趻跀跅跆跇跈跊跎跑跔跕跗跙跤跥跧跬跰趼跱跲跴跽踁踄踅踆踋踑踔踖踠踡踢"],
["8fe0a1","踣踦踧踱踳踶踷踸踹踽蹀蹁蹋蹍蹎蹏蹔蹛蹜蹝蹞蹡蹢蹩蹬蹭蹯蹰蹱蹹蹺蹻躂躃躉躐躒躕躚躛躝躞躢躧躩躭躮躳躵躺躻軀軁軃軄軇軏軑軔軜軨軮軰軱軷軹軺軭輀輂輇輈輏輐輖輗輘輞輠輡輣輥輧輨輬輭輮輴輵輶輷輺轀轁"],
["8fe1a1","轃轇轏轑",4,"轘轝轞轥辝辠辡辤辥辦辵辶辸达迀迁迆迊迋迍运迒迓迕迠迣迤迨迮迱迵迶迻迾适逄逈逌逘逛逨逩逯逪逬逭逳逴逷逿遃遄遌遛遝遢遦遧遬遰遴遹邅邈邋邌邎邐邕邗邘邙邛邠邡邢邥邰邲邳邴邶邽郌邾郃"],
["8fe2a1","郄郅郇郈郕郗郘郙郜郝郟郥郒郶郫郯郰郴郾郿鄀鄄鄅鄆鄈鄍鄐鄔鄖鄗鄘鄚鄜鄞鄠鄥鄢鄣鄧鄩鄮鄯鄱鄴鄶鄷鄹鄺鄼鄽酃酇酈酏酓酗酙酚酛酡酤酧酭酴酹酺酻醁醃醅醆醊醎醑醓醔醕醘醞醡醦醨醬醭醮醰醱醲醳醶醻醼醽醿"],
["8fe3a1","釂釃釅釓釔釗釙釚釞釤釥釩釪釬",5,"釷釹釻釽鈀鈁鈄鈅鈆鈇鈉鈊鈌鈐鈒鈓鈖鈘鈜鈝鈣鈤鈥鈦鈨鈮鈯鈰鈳鈵鈶鈸鈹鈺鈼鈾鉀鉂鉃鉆鉇鉊鉍鉎鉏鉑鉘鉙鉜鉝鉠鉡鉥鉧鉨鉩鉮鉯鉰鉵",4,"鉻鉼鉽鉿銈銉銊銍銎銒銗"],
["8fe4a1","銙銟銠銤銥銧銨銫銯銲銶銸銺銻銼銽銿",4,"鋅鋆鋇鋈鋋鋌鋍鋎鋐鋓鋕鋗鋘鋙鋜鋝鋟鋠鋡鋣鋥鋧鋨鋬鋮鋰鋹鋻鋿錀錂錈錍錑錔錕錜錝錞錟錡錤錥錧錩錪錳錴錶錷鍇鍈鍉鍐鍑鍒鍕鍗鍘鍚鍞鍤鍥鍧鍩鍪鍭鍯鍰鍱鍳鍴鍶"],
["8fe5a1","鍺鍽鍿鎀鎁鎂鎈鎊鎋鎍鎏鎒鎕鎘鎛鎞鎡鎣鎤鎦鎨鎫鎴鎵鎶鎺鎩鏁鏄鏅鏆鏇鏉",4,"鏓鏙鏜鏞鏟鏢鏦鏧鏹鏷鏸鏺鏻鏽鐁鐂鐄鐈鐉鐍鐎鐏鐕鐖鐗鐟鐮鐯鐱鐲鐳鐴鐻鐿鐽鑃鑅鑈鑊鑌鑕鑙鑜鑟鑡鑣鑨鑫鑭鑮鑯鑱鑲钄钃镸镹"],
["8fe6a1","镾閄閈閌閍閎閝閞閟閡閦閩閫閬閴閶閺閽閿闆闈闉闋闐闑闒闓闙闚闝闞闟闠闤闦阝阞阢阤阥阦阬阱阳阷阸阹阺阼阽陁陒陔陖陗陘陡陮陴陻陼陾陿隁隂隃隄隉隑隖隚隝隟隤隥隦隩隮隯隳隺雊雒嶲雘雚雝雞雟雩雯雱雺霂"],
["8fe7a1","霃霅霉霚霛霝霡霢霣霨霱霳靁靃靊靎靏靕靗靘靚靛靣靧靪靮靳靶靷靸靻靽靿鞀鞉鞕鞖鞗鞙鞚鞞鞟鞢鞬鞮鞱鞲鞵鞶鞸鞹鞺鞼鞾鞿韁韄韅韇韉韊韌韍韎韐韑韔韗韘韙韝韞韠韛韡韤韯韱韴韷韸韺頇頊頙頍頎頔頖頜頞頠頣頦"],
["8fe8a1","頫頮頯頰頲頳頵頥頾顄顇顊顑顒顓顖顗顙顚顢顣顥顦顪顬颫颭颮颰颴颷颸颺颻颿飂飅飈飌飡飣飥飦飧飪飳飶餂餇餈餑餕餖餗餚餛餜餟餢餦餧餫餱",4,"餹餺餻餼饀饁饆饇饈饍饎饔饘饙饛饜饞饟饠馛馝馟馦馰馱馲馵"],
["8fe9a1","馹馺馽馿駃駉駓駔駙駚駜駞駧駪駫駬駰駴駵駹駽駾騂騃騄騋騌騐騑騖騞騠騢騣騤騧騭騮騳騵騶騸驇驁驄驊驋驌驎驑驔驖驝骪骬骮骯骲骴骵骶骹骻骾骿髁髃髆髈髎髐髒髕髖髗髛髜髠髤髥髧髩髬髲髳髵髹髺髽髿",4],
["8feaa1","鬄鬅鬈鬉鬋鬌鬍鬎鬐鬒鬖鬙鬛鬜鬠鬦鬫鬭鬳鬴鬵鬷鬹鬺鬽魈魋魌魕魖魗魛魞魡魣魥魦魨魪",4,"魳魵魷魸魹魿鮀鮄鮅鮆鮇鮉鮊鮋鮍鮏鮐鮔鮚鮝鮞鮦鮧鮩鮬鮰鮱鮲鮷鮸鮻鮼鮾鮿鯁鯇鯈鯎鯐鯗鯘鯝鯟鯥鯧鯪鯫鯯鯳鯷鯸"],
["8feba1","鯹鯺鯽鯿鰀鰂鰋鰏鰑鰖鰘鰙鰚鰜鰞鰢鰣鰦",4,"鰱鰵鰶鰷鰽鱁鱃鱄鱅鱉鱊鱎鱏鱐鱓鱔鱖鱘鱛鱝鱞鱟鱣鱩鱪鱜鱫鱨鱮鱰鱲鱵鱷鱻鳦鳲鳷鳹鴋鴂鴑鴗鴘鴜鴝鴞鴯鴰鴲鴳鴴鴺鴼鵅鴽鵂鵃鵇鵊鵓鵔鵟鵣鵢鵥鵩鵪鵫鵰鵶鵷鵻"],
["8feca1","鵼鵾鶃鶄鶆鶊鶍鶎鶒鶓鶕鶖鶗鶘鶡鶪鶬鶮鶱鶵鶹鶼鶿鷃鷇鷉鷊鷔鷕鷖鷗鷚鷞鷟鷠鷥鷧鷩鷫鷮鷰鷳鷴鷾鸊鸂鸇鸎鸐鸑鸒鸕鸖鸙鸜鸝鹺鹻鹼麀麂麃麄麅麇麎麏麖麘麛麞麤麨麬麮麯麰麳麴麵黆黈黋黕黟黤黧黬黭黮黰黱黲黵"],
["8feda1","黸黿鼂鼃鼉鼏鼐鼑鼒鼔鼖鼗鼙鼚鼛鼟鼢鼦鼪鼫鼯鼱鼲鼴鼷鼹鼺鼼鼽鼿齁齃",4,"齓齕齖齗齘齚齝齞齨齩齭",4,"齳齵齺齽龏龐龑龒龔龖龗龞龡龢龣龥"]
]
| {
"pile_set_name": "Github"
} |
"use strict";
exports.__esModule = true;
var _getIterator2 = require("babel-runtime/core-js/get-iterator");
var _getIterator3 = _interopRequireDefault(_getIterator2);
exports.call = call;
exports._call = _call;
exports.isBlacklisted = isBlacklisted;
exports.visit = visit;
exports.skip = skip;
exports.skipKey = skipKey;
exports.stop = stop;
exports.setScope = setScope;
exports.setContext = setContext;
exports.resync = resync;
exports._resyncParent = _resyncParent;
exports._resyncKey = _resyncKey;
exports._resyncList = _resyncList;
exports._resyncRemoved = _resyncRemoved;
exports.popContext = popContext;
exports.pushContext = pushContext;
exports.setup = setup;
exports.setKey = setKey;
exports.requeue = requeue;
exports._getQueueContexts = _getQueueContexts;
var _index = require("../index");
var _index2 = _interopRequireDefault(_index);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
function call(key) {
var opts = this.opts;
this.debug(function () {
return key;
});
if (this.node) {
if (this._call(opts[key])) return true;
}
if (this.node) {
return this._call(opts[this.node.type] && opts[this.node.type][key]);
}
return false;
}
function _call(fns) {
if (!fns) return false;
for (var _iterator = fns, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : (0, _getIterator3.default)(_iterator);;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
var fn = _ref;
if (!fn) continue;
var node = this.node;
if (!node) return true;
var ret = fn.call(this.state, this, this.state);
if (ret) throw new Error("Unexpected return value from visitor method " + fn);
if (this.node !== node) return true;
if (this.shouldStop || this.shouldSkip || this.removed) return true;
}
return false;
}
function isBlacklisted() {
var blacklist = this.opts.blacklist;
return blacklist && blacklist.indexOf(this.node.type) > -1;
}
function visit() {
if (!this.node) {
return false;
}
if (this.isBlacklisted()) {
return false;
}
if (this.opts.shouldSkip && this.opts.shouldSkip(this)) {
return false;
}
if (this.call("enter") || this.shouldSkip) {
this.debug(function () {
return "Skip...";
});
return this.shouldStop;
}
this.debug(function () {
return "Recursing into...";
});
_index2.default.node(this.node, this.opts, this.scope, this.state, this, this.skipKeys);
this.call("exit");
return this.shouldStop;
}
function skip() {
this.shouldSkip = true;
}
function skipKey(key) {
this.skipKeys[key] = true;
}
function stop() {
this.shouldStop = true;
this.shouldSkip = true;
}
function setScope() {
if (this.opts && this.opts.noScope) return;
var target = this.context && this.context.scope;
if (!target) {
var path = this.parentPath;
while (path && !target) {
if (path.opts && path.opts.noScope) return;
target = path.scope;
path = path.parentPath;
}
}
this.scope = this.getScope(target);
if (this.scope) this.scope.init();
}
function setContext(context) {
this.shouldSkip = false;
this.shouldStop = false;
this.removed = false;
this.skipKeys = {};
if (context) {
this.context = context;
this.state = context.state;
this.opts = context.opts;
}
this.setScope();
return this;
}
function resync() {
if (this.removed) return;
this._resyncParent();
this._resyncList();
this._resyncKey();
}
function _resyncParent() {
if (this.parentPath) {
this.parent = this.parentPath.node;
}
}
function _resyncKey() {
if (!this.container) return;
if (this.node === this.container[this.key]) return;
if (Array.isArray(this.container)) {
for (var i = 0; i < this.container.length; i++) {
if (this.container[i] === this.node) {
return this.setKey(i);
}
}
} else {
for (var key in this.container) {
if (this.container[key] === this.node) {
return this.setKey(key);
}
}
}
this.key = null;
}
function _resyncList() {
if (!this.parent || !this.inList) return;
var newContainer = this.parent[this.listKey];
if (this.container === newContainer) return;
this.container = newContainer || null;
}
function _resyncRemoved() {
if (this.key == null || !this.container || this.container[this.key] !== this.node) {
this._markRemoved();
}
}
function popContext() {
this.contexts.pop();
this.setContext(this.contexts[this.contexts.length - 1]);
}
function pushContext(context) {
this.contexts.push(context);
this.setContext(context);
}
function setup(parentPath, container, listKey, key) {
this.inList = !!listKey;
this.listKey = listKey;
this.parentKey = listKey || key;
this.container = container;
this.parentPath = parentPath || this.parentPath;
this.setKey(key);
}
function setKey(key) {
this.key = key;
this.node = this.container[this.key];
this.type = this.node && this.node.type;
}
function requeue() {
var pathToQueue = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this;
if (pathToQueue.removed) return;
var contexts = this.contexts;
for (var _iterator2 = contexts, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : (0, _getIterator3.default)(_iterator2);;) {
var _ref2;
if (_isArray2) {
if (_i2 >= _iterator2.length) break;
_ref2 = _iterator2[_i2++];
} else {
_i2 = _iterator2.next();
if (_i2.done) break;
_ref2 = _i2.value;
}
var context = _ref2;
context.maybeQueue(pathToQueue);
}
}
function _getQueueContexts() {
var path = this;
var contexts = this.contexts;
while (!contexts.length) {
path = path.parentPath;
contexts = path.contexts;
}
return contexts;
} | {
"pile_set_name": "Github"
} |
/*!
* Font Awesome 4.2.0 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
*/
/* FONT PATH
* -------------------------- */
@font-face {
font-family: 'FontAwesome';
src: url('../fonts/fontawesome-webfont.eot?v=4.2.0');
src: url('../fonts/fontawesome-webfont.eot?#iefix&v=4.2.0') format('embedded-opentype'), url('../fonts/fontawesome-webfont.woff?v=4.2.0') format('woff'), url('../fonts/fontawesome-webfont.ttf?v=4.2.0') format('truetype'), url('../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;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: 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";
}
.fa-arrow-circle-o-down:before {
content: "\f01a";
}
.fa-arrow-circle-o-up: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";
}
.fa-exclamation-circle: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,
.fa-exclamation-triangle: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";
}
.fa-arrow-circle-left:before {
content: "\f0a8";
}
.fa-arrow-circle-right:before {
content: "\f0a9";
}
.fa-arrow-circle-up:before {
content: "\f0aa";
}
.fa-arrow-circle-down: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";
}
.fa-google-plus-square: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";
}
.fa-angle-double-left:before {
content: "\f100";
}
.fa-angle-double-right:before {
content: "\f101";
}
.fa-angle-double-up:before {
content: "\f102";
}
.fa-angle-double-down: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";
}
.fa-fire-extinguisher:before {
content: "\f134";
}
.fa-rocket:before {
content: "\f135";
}
.fa-maxcdn:before {
content: "\f136";
}
.fa-chevron-circle-left:before {
content: "\f137";
}
.fa-chevron-circle-right:before {
content: "\f138";
}
.fa-chevron-circle-up:before {
content: "\f139";
}
.fa-chevron-circle-down: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";
}
.fa-external-link-square:before {
content: "\f14c";
}
.fa-share-square:before {
content: "\f14d";
}
.fa-compass:before {
content: "\f14e";
}
.fa-toggle-down:before,
.fa-caret-square-o-down:before {
content: "\f150";
}
.fa-toggle-up:before,
.fa-caret-square-o-up:before {
content: "\f151";
}
.fa-toggle-right:before,
.fa-caret-square-o-right: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";
}
.fa-sort-numeric-desc: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";
}
.fa-arrow-circle-o-right:before {
content: "\f18e";
}
.fa-arrow-circle-o-left:before {
content: "\f190";
}
.fa-toggle-left:before,
.fa-caret-square-o-left: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";
}
.fa-stumbleupon-circle: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";
}
.fa-file-powerpoint-o: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";
}
| {
"pile_set_name": "Github"
} |
//
// Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 15 2018 10:31:50).
//
// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.
//
#import <objc/NSObject.h>
@class NSArray, NSDictionary, NSNumber, NSString;
@interface _DKSync2Policy : NSObject
{
BOOL _syncDisabled;
BOOL _pushTriggersSync;
BOOL _requireCharging;
NSString *_name;
NSNumber *_version;
unsigned long long _maxSyncPeriodInDays;
unsigned long long _maxSyncDownIntervalInDays;
unsigned long long _minSyncIntervalInSeconds;
unsigned long long _minSyncWindowInSeconds;
unsigned long long _minSyncsPerDay;
unsigned long long _maxSyncsPerDay;
unsigned long long _numChangesTriggeringSync;
unsigned long long _singleDeviceSyncIntervalInDays;
NSDictionary *_streamNamesToSync;
NSArray *_streamNamesWithAdditionsTriggeringSync;
NSArray *_streamNamesWithDeletionsTriggeringSync;
unsigned long long _syncBatchSizeInEvents;
unsigned long long _maxBatchesPerSync;
unsigned long long _syncTimeoutInSeconds;
unsigned long long _triggeredSyncDelayInSeconds;
unsigned long long _policyDownloadIntervalInDays;
NSArray *_streamNamesToAlwaysSync;
}
+ (id)disabledFeaturesForSyncType:(id)arg1 transports:(long long)arg2;
+ (id)configurationPlistForFilename:(id)arg1;
+ (id)syncPolicyConfigPathForFilename:(id)arg1;
+ (void)handleDownloadSyncPolicyResponse:(id)arg1 data:(id)arg2 error:(id)arg3;
+ (void)possiblyDownloadSyncPolicyWithPolicyDownloadIntervalInDays:(unsigned long long)arg1;
+ (id)productVersion;
+ (id)policyFromDictionary:(id)arg1;
+ (void)setOkToDownloadPolicyUpdates:(BOOL)arg1;
+ (BOOL)cloudSyncDisabled;
+ (BOOL)rapportSyncDisabled;
+ (id)_policyForSyncTransportType:(long long)arg1;
+ (id)policyForSyncTransportType:(long long)arg1;
+ (id)policyCache;
+ (id)userDefaults;
- (void).cxx_destruct;
@property(retain, nonatomic) NSArray *streamNamesToAlwaysSync; // @synthesize streamNamesToAlwaysSync=_streamNamesToAlwaysSync;
@property(nonatomic) unsigned long long policyDownloadIntervalInDays; // @synthesize policyDownloadIntervalInDays=_policyDownloadIntervalInDays;
@property(nonatomic) unsigned long long triggeredSyncDelayInSeconds; // @synthesize triggeredSyncDelayInSeconds=_triggeredSyncDelayInSeconds;
@property(nonatomic) unsigned long long syncTimeoutInSeconds; // @synthesize syncTimeoutInSeconds=_syncTimeoutInSeconds;
@property(nonatomic) unsigned long long maxBatchesPerSync; // @synthesize maxBatchesPerSync=_maxBatchesPerSync;
@property(nonatomic) unsigned long long syncBatchSizeInEvents; // @synthesize syncBatchSizeInEvents=_syncBatchSizeInEvents;
@property(retain, nonatomic) NSArray *streamNamesWithDeletionsTriggeringSync; // @synthesize streamNamesWithDeletionsTriggeringSync=_streamNamesWithDeletionsTriggeringSync;
@property(retain, nonatomic) NSArray *streamNamesWithAdditionsTriggeringSync; // @synthesize streamNamesWithAdditionsTriggeringSync=_streamNamesWithAdditionsTriggeringSync;
@property(retain, nonatomic) NSDictionary *streamNamesToSync; // @synthesize streamNamesToSync=_streamNamesToSync;
@property(nonatomic) unsigned long long singleDeviceSyncIntervalInDays; // @synthesize singleDeviceSyncIntervalInDays=_singleDeviceSyncIntervalInDays;
@property(nonatomic) BOOL requireCharging; // @synthesize requireCharging=_requireCharging;
@property(nonatomic) BOOL pushTriggersSync; // @synthesize pushTriggersSync=_pushTriggersSync;
@property(nonatomic) unsigned long long numChangesTriggeringSync; // @synthesize numChangesTriggeringSync=_numChangesTriggeringSync;
@property(nonatomic) unsigned long long maxSyncsPerDay; // @synthesize maxSyncsPerDay=_maxSyncsPerDay;
@property(nonatomic) unsigned long long minSyncsPerDay; // @synthesize minSyncsPerDay=_minSyncsPerDay;
@property(nonatomic) unsigned long long minSyncWindowInSeconds; // @synthesize minSyncWindowInSeconds=_minSyncWindowInSeconds;
@property(nonatomic) unsigned long long minSyncIntervalInSeconds; // @synthesize minSyncIntervalInSeconds=_minSyncIntervalInSeconds;
@property(nonatomic) unsigned long long maxSyncDownIntervalInDays; // @synthesize maxSyncDownIntervalInDays=_maxSyncDownIntervalInDays;
@property(nonatomic) unsigned long long maxSyncPeriodInDays; // @synthesize maxSyncPeriodInDays=_maxSyncPeriodInDays;
@property(retain, nonatomic) NSNumber *version; // @synthesize version=_version;
@property(nonatomic) BOOL syncDisabled; // @synthesize syncDisabled=_syncDisabled;
@property(retain, nonatomic) NSString *name; // @synthesize name=_name;
- (id)description;
- (double)hoursBetweenSyncsWhenIsSingleDevice:(BOOL)arg1 urgency:(unsigned long long)arg2;
- (double)hoursBetweenSyncsWhenIsSingleDevice:(BOOL)arg1;
- (id)queryStartDateWithSyncType:(id)arg1 previousHighWaterMark:(id)arg2;
- (id)queryStartDateWithSyncType:(id)arg1 lastSyncDate:(id)arg2 lastDaySyncCount:(unsigned long long)arg3 previousHighWaterMark:(id)arg4;
- (id)queryStartDateWithSyncType:(id)arg1 lastSyncDate:(id)arg2 lastDaySyncCount:(unsigned long long)arg3;
- (BOOL)highPriorityForSyncUpWithSyncType:(id)arg1 lastSyncDate:(id)arg2;
- (BOOL)highPriorityForSyncDownWithSyncType:(id)arg1;
- (BOOL)canPerformSyncOperationWithSyncType:(id)arg1 lastSyncDate:(id)arg2 lastDaySyncCount:(unsigned long long)arg3 isCharging:(BOOL)arg4;
- (BOOL)canDeferSyncOperationWithSyncType:(id)arg1;
- (id)streamNamesToSyncWithSyncType:(id)arg1 transportType:(long long)arg2;
- (id)streamNamesToSyncWithDisabledFeatures:(id)arg1;
- (id)initWithDictionary:(id)arg1;
@end
| {
"pile_set_name": "Github"
} |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.axis2.wsdl.codegen.writer;
import java.io.File;
public class SkeletonWriter extends FileWriter {
public SkeletonWriter(String outputFileLocation) {
this.outputFileLocation = new File(outputFileLocation);
}
public SkeletonWriter(File outputFileLocation, String language) {
this.outputFileLocation = outputFileLocation;
this.language = language;
}
}
| {
"pile_set_name": "Github"
} |
// Copyright 2014 DeNA Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
var fs = require("fs");
var Canvas = require("canvas");
var Image = function() {}; // Image#src returns a empty string if use Canvas.Image
var window = global;
var document = {
createElement: function(name) {
if (name == "canvas") {
return new Canvas();
} else if (name == "img") {
return new Image();
} else {
throw "not supported";
}
}
};
var navigator = {
userAgent: "iPhone" // Default
};
var btoa = function(str) {
return (new Buffer(str, "binary")).toString("base64");
};
// var canvas = document.createElement("canvas");
// var ctx = canvas.getContext("2d");
// ctx.fillStyle = "rgba(0, 0, 0, 0)";
// ctx.fillRect(0, 0, 1, 1);
// canvas.toDataURL();
var emptyImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAACWCAYAAABkW7XSAAAEYklEQVR4Xu3UAQkAAAwCwdm/9HI83BLIOdw5AgQIRAQWySkmAQIEzmB5AgIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlAABg+UHCBDICBisTFWCEiBgsPwAAQIZAYOVqUpQAgQMlh8gQCAjYLAyVQlKgIDB8gMECGQEDFamKkEJEDBYfoAAgYyAwcpUJSgBAgbLDxAgkBEwWJmqBCVAwGD5AQIEMgIGK1OVoAQIGCw/QIBARsBgZaoSlACBB1YxAJfjJb2jAAAAAElFTkSuQmCC";
// console.log will be removed by the obfuscator, but console.log.apply won't,
// so define a utility function to output messages to stdout easily
var print = function() {
console.log.apply(console, arguments);
};
var main = function(input, output, varName, isReduceLines, reduceThreshold, colorRange, withQuotes) {
var header = {};
var tagList = [];
var buffer = fs.readFileSync(input);
var binary = Array.prototype.slice.call(buffer, 0);
var loader = { loadedBytes: binary.length, binary: binary };
var parser = new Parser({});
var pos = Parser.dealHeader(loader, header);
parser.loader = loader;
parser.tagList = tagList;
parser.dealBody(pos, false, colorRange);
var walkTags = function(tagList, funcs) {
for (var i = 0; i < tagList.length; i++) {
var tag = tagList[i];
for (var j = 0; j < funcs.length; j++) {
var func = funcs[j];
func(tag);
}
if (tag.hasOwnProperty("tags")) {
walkTags(tag.tags, funcs);
}
}
};
var makeOwnProperty = function(propName) {
return function(tag) {
tag[propName] = tag.__proto__[propName];
};
};
var convertImageToString = function(propName) {
return function(tag) {
var obj = tag[propName];
if (obj instanceof Canvas) {
if (tag.type != TagDefine.TypeTagDefineBitsJPEG2 && tag.type != TagDefine.TypeTagDefineBitsJPEG3) {
tag[propName] = obj.toDataURL();
} else {
console.warn("warning: JPEG with alpha is not supported and use empty image");
tag[propName] = emptyImage;
}
} else if (obj instanceof Image) {
tag[propName] = obj.src;
}
};
};
// make 'type' own property for JSON.stringify and convert img and canvas to data URI scheme
walkTags(tagList, [makeOwnProperty("type"), convertImageToString("img")]);
if(isReduceLines) {
reduceLines(tagList, reduceThreshold);
}
var json = JSON.stringify({JSON_VERSION: PEX_VERSION.split(".").slice(0,2).join("."), header: header, tagList: tagList});
if (withQuotes) {
json = "'" + json + "'";
}
if (varName) {
json = "var " + varName + "=" + json + ";";
}
if (output) {
fs.writeFileSync(output, json);
} else {
process.stdout.write(json);
}
};
var showUsage = function() {
var script = __filename.replace(/.*\//, "");
var usage = [
"parse SWF files and output JSON",
"",
" node " + script + " [ options ] filename",
"",
" -h, --help - show this usage",
" -o FILENAME, --output FILENAME - output the result into FILENAME (default: stdout)",
" --var VARIABLE_NAME - prepend 'var VARIABLE_NAME=' and append ';' to the output",
" --android - parse SWF for Android if transparent PNGs are used",
" --reduce-lines THRESHOLD - reduce lines by Douglas-Peucker method. Unit of THRESHOLD is twips.",
" --color-levels N - The number of values for each color channel in color. (default: 16)",
" The minimum value of N is 1 and the maximum value is 256, which means true color.",
" --with-quotes - quote the output JSON",
" --version - show the version",
];
console.error(usage.join("\n") + "\n");
};
(function() {
var opts = process.argv.slice(2);
var script = __filename.replace(/.*\//, "");
var colorRange = 16;
while (opts.length > 0) {
var v = opts.shift();
switch (v) {
case "-h":
case "--help":
showUsage();
process.exit(1);
break;
case "-o":
case "--output":
var output = opts.shift();
if (!output) {
console.error(script + ": output file is not specified");
process.exit(1);
}
break;
case "--var":
var varName = opts.shift();
if (!varName) {
console.error(script + ": variable name is not specified");
process.exit(1);
}
break;
case "--reduce-lines":
var isReduceLines = true;
var reduceThreshold = opts.shift();
break;
case "--android":
navigator.userAgent = "Android";
break;
case "--color-levels":
// use 'eval' to parse strings like 'null'
var n = eval(opts.shift());
colorRange = n && n < 256 && (Math.max(1, Math.min(256 / n, 256)) | 0);
break;
case "--with-quotes":
var withQuotes = true;
break;
case "--version":
print(script + " #PEX_VERSION# (#COMMIT_HASH#)");
process.exit(0);
break;
default:
if (v.substring(0, 1) == "-") {
console.error(script + ": invalid option '" + v + "'");
process.exit(1);
}
var input = v;
}
}
if (!input) {
showUsage();
process.exit(1);
}
main(input, output, varName, isReduceLines, reduceThreshold, colorRange, withQuotes);
})();
| {
"pile_set_name": "Github"
} |
//
// CommentListCellItem.swift
// Photostream
//
// Created by Mounir Ybanez on 29/11/2016.
// Copyright © 2016 Mounir Ybanez. All rights reserved.
//
import Kingfisher
import DateTools
protocol CommentListCellItem {
var timestamp: Double { get }
var authorName: String { get }
var authorAvatar: String { get }
var timeAgo: String { get }
var content: String { get }
}
extension CommentListCellItem {
var timeAgo: String {
let date = NSDate(timeIntervalSince1970: timestamp)
return date.timeAgoSinceNow()
}
}
protocol CommentListCellConfig {
var dynamicHeight: CGFloat { get }
func configure(with item: CommentListCellItem?, isPrototype: Bool)
func set(photo url: String, placeholder image: UIImage)
func set(author name: String)
func set(content: String)
func set(time: String)
}
extension CommentListCell: CommentListCellConfig {
fileprivate var authorImage: UIImage {
let frame = CGRect(x: 0, y: 0, width: photoLength, height: photoLength)
let font = UIFont.systemFont(ofSize: 12)
let text: String = authorLabel.text![0]
let image = UILabel.createPlaceholderImageWithFrame(frame, text: text, font: font)
return image
}
var dynamicHeight: CGFloat {
let height1 = timeLabel.frame.origin.y + timeLabel.frame.size.height + spacing
let height2 = photoLength + (spacing * 2)
return max(height1, height2)
}
func configure(with item: CommentListCellItem?, isPrototype: Bool = false) {
guard item != nil else {
return
}
set(author: item!.authorName)
set(content: item!.content)
set(time: item!.timeAgo.uppercased())
if !isPrototype {
set(photo: item!.authorAvatar, placeholder: authorImage)
}
setNeedsLayout()
layoutIfNeeded()
}
func set(photo url: String, placeholder image: UIImage) {
guard let photoUrl = URL(string: url) else {
authorPhoto.image = image
return
}
let resource = ImageResource(downloadURL: photoUrl)
authorPhoto.kf.setImage(with: resource, placeholder: image, options: nil, progressBlock: nil, completionHandler: nil)
}
func set(author name: String) {
authorLabel.text = name
}
func set(content: String) {
contentLabel.text = content
}
func set(time: String) {
timeLabel.text = time
}
}
| {
"pile_set_name": "Github"
} |
// Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT.
// +build go1.10
package cases
var (
caseIgnorable = map[rune]bool{
0x0027: true,
0x002e: true,
0x003a: true,
0x00b7: true,
0x0387: true,
0x05f4: true,
0x2018: true,
0x2019: true,
0x2024: true,
0x2027: true,
0xfe13: true,
0xfe52: true,
0xfe55: true,
0xff07: true,
0xff0e: true,
0xff1a: true,
}
special = map[rune]struct{ toLower, toTitle, toUpper string }{
0x00df: {"ß", "Ss", "SS"},
0x0130: {"i̇", "İ", "İ"},
0xfb00: {"ff", "Ff", "FF"},
0xfb01: {"fi", "Fi", "FI"},
0xfb02: {"fl", "Fl", "FL"},
0xfb03: {"ffi", "Ffi", "FFI"},
0xfb04: {"ffl", "Ffl", "FFL"},
0xfb05: {"ſt", "St", "ST"},
0xfb06: {"st", "St", "ST"},
0x0587: {"և", "Եւ", "ԵՒ"},
0xfb13: {"ﬓ", "Մն", "ՄՆ"},
0xfb14: {"ﬔ", "Մե", "ՄԵ"},
0xfb15: {"ﬕ", "Մի", "ՄԻ"},
0xfb16: {"ﬖ", "Վն", "ՎՆ"},
0xfb17: {"ﬗ", "Մխ", "ՄԽ"},
0x0149: {"ʼn", "ʼN", "ʼN"},
0x0390: {"ΐ", "Ϊ́", "Ϊ́"},
0x03b0: {"ΰ", "Ϋ́", "Ϋ́"},
0x01f0: {"ǰ", "J̌", "J̌"},
0x1e96: {"ẖ", "H̱", "H̱"},
0x1e97: {"ẗ", "T̈", "T̈"},
0x1e98: {"ẘ", "W̊", "W̊"},
0x1e99: {"ẙ", "Y̊", "Y̊"},
0x1e9a: {"ẚ", "Aʾ", "Aʾ"},
0x1f50: {"ὐ", "Υ̓", "Υ̓"},
0x1f52: {"ὒ", "Υ̓̀", "Υ̓̀"},
0x1f54: {"ὔ", "Υ̓́", "Υ̓́"},
0x1f56: {"ὖ", "Υ̓͂", "Υ̓͂"},
0x1fb6: {"ᾶ", "Α͂", "Α͂"},
0x1fc6: {"ῆ", "Η͂", "Η͂"},
0x1fd2: {"ῒ", "Ϊ̀", "Ϊ̀"},
0x1fd3: {"ΐ", "Ϊ́", "Ϊ́"},
0x1fd6: {"ῖ", "Ι͂", "Ι͂"},
0x1fd7: {"ῗ", "Ϊ͂", "Ϊ͂"},
0x1fe2: {"ῢ", "Ϋ̀", "Ϋ̀"},
0x1fe3: {"ΰ", "Ϋ́", "Ϋ́"},
0x1fe4: {"ῤ", "Ρ̓", "Ρ̓"},
0x1fe6: {"ῦ", "Υ͂", "Υ͂"},
0x1fe7: {"ῧ", "Ϋ͂", "Ϋ͂"},
0x1ff6: {"ῶ", "Ω͂", "Ω͂"},
0x1f80: {"ᾀ", "ᾈ", "ἈΙ"},
0x1f81: {"ᾁ", "ᾉ", "ἉΙ"},
0x1f82: {"ᾂ", "ᾊ", "ἊΙ"},
0x1f83: {"ᾃ", "ᾋ", "ἋΙ"},
0x1f84: {"ᾄ", "ᾌ", "ἌΙ"},
0x1f85: {"ᾅ", "ᾍ", "ἍΙ"},
0x1f86: {"ᾆ", "ᾎ", "ἎΙ"},
0x1f87: {"ᾇ", "ᾏ", "ἏΙ"},
0x1f88: {"ᾀ", "ᾈ", "ἈΙ"},
0x1f89: {"ᾁ", "ᾉ", "ἉΙ"},
0x1f8a: {"ᾂ", "ᾊ", "ἊΙ"},
0x1f8b: {"ᾃ", "ᾋ", "ἋΙ"},
0x1f8c: {"ᾄ", "ᾌ", "ἌΙ"},
0x1f8d: {"ᾅ", "ᾍ", "ἍΙ"},
0x1f8e: {"ᾆ", "ᾎ", "ἎΙ"},
0x1f8f: {"ᾇ", "ᾏ", "ἏΙ"},
0x1f90: {"ᾐ", "ᾘ", "ἨΙ"},
0x1f91: {"ᾑ", "ᾙ", "ἩΙ"},
0x1f92: {"ᾒ", "ᾚ", "ἪΙ"},
0x1f93: {"ᾓ", "ᾛ", "ἫΙ"},
0x1f94: {"ᾔ", "ᾜ", "ἬΙ"},
0x1f95: {"ᾕ", "ᾝ", "ἭΙ"},
0x1f96: {"ᾖ", "ᾞ", "ἮΙ"},
0x1f97: {"ᾗ", "ᾟ", "ἯΙ"},
0x1f98: {"ᾐ", "ᾘ", "ἨΙ"},
0x1f99: {"ᾑ", "ᾙ", "ἩΙ"},
0x1f9a: {"ᾒ", "ᾚ", "ἪΙ"},
0x1f9b: {"ᾓ", "ᾛ", "ἫΙ"},
0x1f9c: {"ᾔ", "ᾜ", "ἬΙ"},
0x1f9d: {"ᾕ", "ᾝ", "ἭΙ"},
0x1f9e: {"ᾖ", "ᾞ", "ἮΙ"},
0x1f9f: {"ᾗ", "ᾟ", "ἯΙ"},
0x1fa0: {"ᾠ", "ᾨ", "ὨΙ"},
0x1fa1: {"ᾡ", "ᾩ", "ὩΙ"},
0x1fa2: {"ᾢ", "ᾪ", "ὪΙ"},
0x1fa3: {"ᾣ", "ᾫ", "ὫΙ"},
0x1fa4: {"ᾤ", "ᾬ", "ὬΙ"},
0x1fa5: {"ᾥ", "ᾭ", "ὭΙ"},
0x1fa6: {"ᾦ", "ᾮ", "ὮΙ"},
0x1fa7: {"ᾧ", "ᾯ", "ὯΙ"},
0x1fa8: {"ᾠ", "ᾨ", "ὨΙ"},
0x1fa9: {"ᾡ", "ᾩ", "ὩΙ"},
0x1faa: {"ᾢ", "ᾪ", "ὪΙ"},
0x1fab: {"ᾣ", "ᾫ", "ὫΙ"},
0x1fac: {"ᾤ", "ᾬ", "ὬΙ"},
0x1fad: {"ᾥ", "ᾭ", "ὭΙ"},
0x1fae: {"ᾦ", "ᾮ", "ὮΙ"},
0x1faf: {"ᾧ", "ᾯ", "ὯΙ"},
0x1fb3: {"ᾳ", "ᾼ", "ΑΙ"},
0x1fbc: {"ᾳ", "ᾼ", "ΑΙ"},
0x1fc3: {"ῃ", "ῌ", "ΗΙ"},
0x1fcc: {"ῃ", "ῌ", "ΗΙ"},
0x1ff3: {"ῳ", "ῼ", "ΩΙ"},
0x1ffc: {"ῳ", "ῼ", "ΩΙ"},
0x1fb2: {"ᾲ", "Ὰͅ", "ᾺΙ"},
0x1fb4: {"ᾴ", "Άͅ", "ΆΙ"},
0x1fc2: {"ῂ", "Ὴͅ", "ῊΙ"},
0x1fc4: {"ῄ", "Ήͅ", "ΉΙ"},
0x1ff2: {"ῲ", "Ὼͅ", "ῺΙ"},
0x1ff4: {"ῴ", "Ώͅ", "ΏΙ"},
0x1fb7: {"ᾷ", "ᾼ͂", "Α͂Ι"},
0x1fc7: {"ῇ", "ῌ͂", "Η͂Ι"},
0x1ff7: {"ῷ", "ῼ͂", "Ω͂Ι"},
}
foldMap = map[rune]struct{ simple, full, special string }{
0x0049: {"", "", "ı"},
0x00b5: {"μ", "μ", ""},
0x00df: {"", "ss", ""},
0x0130: {"", "i̇", "i"},
0x0149: {"", "ʼn", ""},
0x017f: {"s", "s", ""},
0x01f0: {"", "ǰ", ""},
0x0345: {"ι", "ι", ""},
0x0390: {"", "ΐ", ""},
0x03b0: {"", "ΰ", ""},
0x03c2: {"σ", "σ", ""},
0x03d0: {"β", "β", ""},
0x03d1: {"θ", "θ", ""},
0x03d5: {"φ", "φ", ""},
0x03d6: {"π", "π", ""},
0x03f0: {"κ", "κ", ""},
0x03f1: {"ρ", "ρ", ""},
0x03f5: {"ε", "ε", ""},
0x0587: {"", "եւ", ""},
0x13f8: {"Ᏸ", "Ᏸ", ""},
0x13f9: {"Ᏹ", "Ᏹ", ""},
0x13fa: {"Ᏺ", "Ᏺ", ""},
0x13fb: {"Ᏻ", "Ᏻ", ""},
0x13fc: {"Ᏼ", "Ᏼ", ""},
0x13fd: {"Ᏽ", "Ᏽ", ""},
0x1c80: {"в", "в", ""},
0x1c81: {"д", "д", ""},
0x1c82: {"о", "о", ""},
0x1c83: {"с", "с", ""},
0x1c84: {"т", "т", ""},
0x1c85: {"т", "т", ""},
0x1c86: {"ъ", "ъ", ""},
0x1c87: {"ѣ", "ѣ", ""},
0x1c88: {"ꙋ", "ꙋ", ""},
0x1e96: {"", "ẖ", ""},
0x1e97: {"", "ẗ", ""},
0x1e98: {"", "ẘ", ""},
0x1e99: {"", "ẙ", ""},
0x1e9a: {"", "aʾ", ""},
0x1e9b: {"ṡ", "ṡ", ""},
0x1e9e: {"", "ss", ""},
0x1f50: {"", "ὐ", ""},
0x1f52: {"", "ὒ", ""},
0x1f54: {"", "ὔ", ""},
0x1f56: {"", "ὖ", ""},
0x1f80: {"", "ἀι", ""},
0x1f81: {"", "ἁι", ""},
0x1f82: {"", "ἂι", ""},
0x1f83: {"", "ἃι", ""},
0x1f84: {"", "ἄι", ""},
0x1f85: {"", "ἅι", ""},
0x1f86: {"", "ἆι", ""},
0x1f87: {"", "ἇι", ""},
0x1f88: {"", "ἀι", ""},
0x1f89: {"", "ἁι", ""},
0x1f8a: {"", "ἂι", ""},
0x1f8b: {"", "ἃι", ""},
0x1f8c: {"", "ἄι", ""},
0x1f8d: {"", "ἅι", ""},
0x1f8e: {"", "ἆι", ""},
0x1f8f: {"", "ἇι", ""},
0x1f90: {"", "ἠι", ""},
0x1f91: {"", "ἡι", ""},
0x1f92: {"", "ἢι", ""},
0x1f93: {"", "ἣι", ""},
0x1f94: {"", "ἤι", ""},
0x1f95: {"", "ἥι", ""},
0x1f96: {"", "ἦι", ""},
0x1f97: {"", "ἧι", ""},
0x1f98: {"", "ἠι", ""},
0x1f99: {"", "ἡι", ""},
0x1f9a: {"", "ἢι", ""},
0x1f9b: {"", "ἣι", ""},
0x1f9c: {"", "ἤι", ""},
0x1f9d: {"", "ἥι", ""},
0x1f9e: {"", "ἦι", ""},
0x1f9f: {"", "ἧι", ""},
0x1fa0: {"", "ὠι", ""},
0x1fa1: {"", "ὡι", ""},
0x1fa2: {"", "ὢι", ""},
0x1fa3: {"", "ὣι", ""},
0x1fa4: {"", "ὤι", ""},
0x1fa5: {"", "ὥι", ""},
0x1fa6: {"", "ὦι", ""},
0x1fa7: {"", "ὧι", ""},
0x1fa8: {"", "ὠι", ""},
0x1fa9: {"", "ὡι", ""},
0x1faa: {"", "ὢι", ""},
0x1fab: {"", "ὣι", ""},
0x1fac: {"", "ὤι", ""},
0x1fad: {"", "ὥι", ""},
0x1fae: {"", "ὦι", ""},
0x1faf: {"", "ὧι", ""},
0x1fb2: {"", "ὰι", ""},
0x1fb3: {"", "αι", ""},
0x1fb4: {"", "άι", ""},
0x1fb6: {"", "ᾶ", ""},
0x1fb7: {"", "ᾶι", ""},
0x1fbc: {"", "αι", ""},
0x1fbe: {"ι", "ι", ""},
0x1fc2: {"", "ὴι", ""},
0x1fc3: {"", "ηι", ""},
0x1fc4: {"", "ήι", ""},
0x1fc6: {"", "ῆ", ""},
0x1fc7: {"", "ῆι", ""},
0x1fcc: {"", "ηι", ""},
0x1fd2: {"", "ῒ", ""},
0x1fd3: {"", "ΐ", ""},
0x1fd6: {"", "ῖ", ""},
0x1fd7: {"", "ῗ", ""},
0x1fe2: {"", "ῢ", ""},
0x1fe3: {"", "ΰ", ""},
0x1fe4: {"", "ῤ", ""},
0x1fe6: {"", "ῦ", ""},
0x1fe7: {"", "ῧ", ""},
0x1ff2: {"", "ὼι", ""},
0x1ff3: {"", "ωι", ""},
0x1ff4: {"", "ώι", ""},
0x1ff6: {"", "ῶ", ""},
0x1ff7: {"", "ῶι", ""},
0x1ffc: {"", "ωι", ""},
0xab70: {"Ꭰ", "Ꭰ", ""},
0xab71: {"Ꭱ", "Ꭱ", ""},
0xab72: {"Ꭲ", "Ꭲ", ""},
0xab73: {"Ꭳ", "Ꭳ", ""},
0xab74: {"Ꭴ", "Ꭴ", ""},
0xab75: {"Ꭵ", "Ꭵ", ""},
0xab76: {"Ꭶ", "Ꭶ", ""},
0xab77: {"Ꭷ", "Ꭷ", ""},
0xab78: {"Ꭸ", "Ꭸ", ""},
0xab79: {"Ꭹ", "Ꭹ", ""},
0xab7a: {"Ꭺ", "Ꭺ", ""},
0xab7b: {"Ꭻ", "Ꭻ", ""},
0xab7c: {"Ꭼ", "Ꭼ", ""},
0xab7d: {"Ꭽ", "Ꭽ", ""},
0xab7e: {"Ꭾ", "Ꭾ", ""},
0xab7f: {"Ꭿ", "Ꭿ", ""},
0xab80: {"Ꮀ", "Ꮀ", ""},
0xab81: {"Ꮁ", "Ꮁ", ""},
0xab82: {"Ꮂ", "Ꮂ", ""},
0xab83: {"Ꮃ", "Ꮃ", ""},
0xab84: {"Ꮄ", "Ꮄ", ""},
0xab85: {"Ꮅ", "Ꮅ", ""},
0xab86: {"Ꮆ", "Ꮆ", ""},
0xab87: {"Ꮇ", "Ꮇ", ""},
0xab88: {"Ꮈ", "Ꮈ", ""},
0xab89: {"Ꮉ", "Ꮉ", ""},
0xab8a: {"Ꮊ", "Ꮊ", ""},
0xab8b: {"Ꮋ", "Ꮋ", ""},
0xab8c: {"Ꮌ", "Ꮌ", ""},
0xab8d: {"Ꮍ", "Ꮍ", ""},
0xab8e: {"Ꮎ", "Ꮎ", ""},
0xab8f: {"Ꮏ", "Ꮏ", ""},
0xab90: {"Ꮐ", "Ꮐ", ""},
0xab91: {"Ꮑ", "Ꮑ", ""},
0xab92: {"Ꮒ", "Ꮒ", ""},
0xab93: {"Ꮓ", "Ꮓ", ""},
0xab94: {"Ꮔ", "Ꮔ", ""},
0xab95: {"Ꮕ", "Ꮕ", ""},
0xab96: {"Ꮖ", "Ꮖ", ""},
0xab97: {"Ꮗ", "Ꮗ", ""},
0xab98: {"Ꮘ", "Ꮘ", ""},
0xab99: {"Ꮙ", "Ꮙ", ""},
0xab9a: {"Ꮚ", "Ꮚ", ""},
0xab9b: {"Ꮛ", "Ꮛ", ""},
0xab9c: {"Ꮜ", "Ꮜ", ""},
0xab9d: {"Ꮝ", "Ꮝ", ""},
0xab9e: {"Ꮞ", "Ꮞ", ""},
0xab9f: {"Ꮟ", "Ꮟ", ""},
0xaba0: {"Ꮠ", "Ꮠ", ""},
0xaba1: {"Ꮡ", "Ꮡ", ""},
0xaba2: {"Ꮢ", "Ꮢ", ""},
0xaba3: {"Ꮣ", "Ꮣ", ""},
0xaba4: {"Ꮤ", "Ꮤ", ""},
0xaba5: {"Ꮥ", "Ꮥ", ""},
0xaba6: {"Ꮦ", "Ꮦ", ""},
0xaba7: {"Ꮧ", "Ꮧ", ""},
0xaba8: {"Ꮨ", "Ꮨ", ""},
0xaba9: {"Ꮩ", "Ꮩ", ""},
0xabaa: {"Ꮪ", "Ꮪ", ""},
0xabab: {"Ꮫ", "Ꮫ", ""},
0xabac: {"Ꮬ", "Ꮬ", ""},
0xabad: {"Ꮭ", "Ꮭ", ""},
0xabae: {"Ꮮ", "Ꮮ", ""},
0xabaf: {"Ꮯ", "Ꮯ", ""},
0xabb0: {"Ꮰ", "Ꮰ", ""},
0xabb1: {"Ꮱ", "Ꮱ", ""},
0xabb2: {"Ꮲ", "Ꮲ", ""},
0xabb3: {"Ꮳ", "Ꮳ", ""},
0xabb4: {"Ꮴ", "Ꮴ", ""},
0xabb5: {"Ꮵ", "Ꮵ", ""},
0xabb6: {"Ꮶ", "Ꮶ", ""},
0xabb7: {"Ꮷ", "Ꮷ", ""},
0xabb8: {"Ꮸ", "Ꮸ", ""},
0xabb9: {"Ꮹ", "Ꮹ", ""},
0xabba: {"Ꮺ", "Ꮺ", ""},
0xabbb: {"Ꮻ", "Ꮻ", ""},
0xabbc: {"Ꮼ", "Ꮼ", ""},
0xabbd: {"Ꮽ", "Ꮽ", ""},
0xabbe: {"Ꮾ", "Ꮾ", ""},
0xabbf: {"Ꮿ", "Ꮿ", ""},
0xfb00: {"", "ff", ""},
0xfb01: {"", "fi", ""},
0xfb02: {"", "fl", ""},
0xfb03: {"", "ffi", ""},
0xfb04: {"", "ffl", ""},
0xfb05: {"", "st", ""},
0xfb06: {"", "st", ""},
0xfb13: {"", "մն", ""},
0xfb14: {"", "մե", ""},
0xfb15: {"", "մի", ""},
0xfb16: {"", "վն", ""},
0xfb17: {"", "մխ", ""},
}
breakProp = []struct{ lo, hi rune }{
{0x0, 0x26},
{0x28, 0x2d},
{0x2f, 0x2f},
{0x3b, 0x40},
{0x5b, 0x5e},
{0x60, 0x60},
{0x7b, 0xa9},
{0xab, 0xac},
{0xae, 0xb4},
{0xb6, 0xb6},
{0xb8, 0xb9},
{0xbb, 0xbf},
{0xd7, 0xd7},
{0xf7, 0xf7},
{0x2d8, 0x2dd},
{0x2e5, 0x2eb},
{0x375, 0x375},
{0x378, 0x379},
{0x37e, 0x37e},
{0x380, 0x385},
{0x38b, 0x38b},
{0x38d, 0x38d},
{0x3a2, 0x3a2},
{0x3f6, 0x3f6},
{0x482, 0x482},
{0x530, 0x530},
{0x557, 0x558},
{0x55a, 0x560},
{0x588, 0x590},
{0x5be, 0x5be},
{0x5c0, 0x5c0},
{0x5c3, 0x5c3},
{0x5c6, 0x5c6},
{0x5c8, 0x5cf},
{0x5eb, 0x5ef},
{0x5f5, 0x5ff},
{0x606, 0x60f},
{0x61b, 0x61b},
{0x61d, 0x61f},
{0x66a, 0x66a},
{0x66c, 0x66d},
{0x6d4, 0x6d4},
{0x6de, 0x6de},
{0x6e9, 0x6e9},
{0x6fd, 0x6fe},
{0x700, 0x70e},
{0x74b, 0x74c},
{0x7b2, 0x7bf},
{0x7f6, 0x7f9},
{0x7fb, 0x7ff},
{0x82e, 0x83f},
{0x85c, 0x85f},
{0x86b, 0x89f},
{0x8b5, 0x8b5},
{0x8be, 0x8d3},
{0x964, 0x965},
{0x970, 0x970},
{0x984, 0x984},
{0x98d, 0x98e},
{0x991, 0x992},
{0x9a9, 0x9a9},
{0x9b1, 0x9b1},
{0x9b3, 0x9b5},
{0x9ba, 0x9bb},
{0x9c5, 0x9c6},
{0x9c9, 0x9ca},
{0x9cf, 0x9d6},
{0x9d8, 0x9db},
{0x9de, 0x9de},
{0x9e4, 0x9e5},
{0x9f2, 0x9fb},
{0x9fd, 0xa00},
{0xa04, 0xa04},
{0xa0b, 0xa0e},
{0xa11, 0xa12},
{0xa29, 0xa29},
{0xa31, 0xa31},
{0xa34, 0xa34},
{0xa37, 0xa37},
{0xa3a, 0xa3b},
{0xa3d, 0xa3d},
{0xa43, 0xa46},
{0xa49, 0xa4a},
{0xa4e, 0xa50},
{0xa52, 0xa58},
{0xa5d, 0xa5d},
{0xa5f, 0xa65},
{0xa76, 0xa80},
{0xa84, 0xa84},
{0xa8e, 0xa8e},
{0xa92, 0xa92},
{0xaa9, 0xaa9},
{0xab1, 0xab1},
{0xab4, 0xab4},
{0xaba, 0xabb},
{0xac6, 0xac6},
{0xaca, 0xaca},
{0xace, 0xacf},
{0xad1, 0xadf},
{0xae4, 0xae5},
{0xaf0, 0xaf8},
{0xb00, 0xb00},
{0xb04, 0xb04},
{0xb0d, 0xb0e},
{0xb11, 0xb12},
{0xb29, 0xb29},
{0xb31, 0xb31},
{0xb34, 0xb34},
{0xb3a, 0xb3b},
{0xb45, 0xb46},
{0xb49, 0xb4a},
{0xb4e, 0xb55},
{0xb58, 0xb5b},
{0xb5e, 0xb5e},
{0xb64, 0xb65},
{0xb70, 0xb70},
{0xb72, 0xb81},
{0xb84, 0xb84},
{0xb8b, 0xb8d},
{0xb91, 0xb91},
{0xb96, 0xb98},
{0xb9b, 0xb9b},
{0xb9d, 0xb9d},
{0xba0, 0xba2},
{0xba5, 0xba7},
{0xbab, 0xbad},
{0xbba, 0xbbd},
{0xbc3, 0xbc5},
{0xbc9, 0xbc9},
{0xbce, 0xbcf},
{0xbd1, 0xbd6},
{0xbd8, 0xbe5},
{0xbf0, 0xbff},
{0xc04, 0xc04},
{0xc0d, 0xc0d},
{0xc11, 0xc11},
{0xc29, 0xc29},
{0xc3a, 0xc3c},
{0xc45, 0xc45},
{0xc49, 0xc49},
{0xc4e, 0xc54},
{0xc57, 0xc57},
{0xc5b, 0xc5f},
{0xc64, 0xc65},
{0xc70, 0xc7f},
{0xc84, 0xc84},
{0xc8d, 0xc8d},
{0xc91, 0xc91},
{0xca9, 0xca9},
{0xcb4, 0xcb4},
{0xcba, 0xcbb},
{0xcc5, 0xcc5},
{0xcc9, 0xcc9},
{0xcce, 0xcd4},
{0xcd7, 0xcdd},
{0xcdf, 0xcdf},
{0xce4, 0xce5},
{0xcf0, 0xcf0},
{0xcf3, 0xcff},
{0xd04, 0xd04},
{0xd0d, 0xd0d},
{0xd11, 0xd11},
{0xd45, 0xd45},
{0xd49, 0xd49},
{0xd4f, 0xd53},
{0xd58, 0xd5e},
{0xd64, 0xd65},
{0xd70, 0xd79},
{0xd80, 0xd81},
{0xd84, 0xd84},
{0xd97, 0xd99},
{0xdb2, 0xdb2},
{0xdbc, 0xdbc},
{0xdbe, 0xdbf},
{0xdc7, 0xdc9},
{0xdcb, 0xdce},
{0xdd5, 0xdd5},
{0xdd7, 0xdd7},
{0xde0, 0xde5},
{0xdf0, 0xdf1},
{0xdf4, 0xe30},
{0xe32, 0xe33},
{0xe3b, 0xe46},
{0xe4f, 0xe4f},
{0xe5a, 0xeb0},
{0xeb2, 0xeb3},
{0xeba, 0xeba},
{0xebd, 0xec7},
{0xece, 0xecf},
{0xeda, 0xeff},
{0xf01, 0xf17},
{0xf1a, 0xf1f},
{0xf2a, 0xf34},
{0xf36, 0xf36},
{0xf38, 0xf38},
{0xf3a, 0xf3d},
{0xf48, 0xf48},
{0xf6d, 0xf70},
{0xf85, 0xf85},
{0xf98, 0xf98},
{0xfbd, 0xfc5},
{0xfc7, 0x102a},
{0x103f, 0x103f},
{0x104a, 0x1055},
{0x105a, 0x105d},
{0x1061, 0x1061},
{0x1065, 0x1066},
{0x106e, 0x1070},
{0x1075, 0x1081},
{0x108e, 0x108e},
{0x109e, 0x109f},
{0x10c6, 0x10c6},
{0x10c8, 0x10cc},
{0x10ce, 0x10cf},
{0x10fb, 0x10fb},
{0x1249, 0x1249},
{0x124e, 0x124f},
{0x1257, 0x1257},
{0x1259, 0x1259},
{0x125e, 0x125f},
{0x1289, 0x1289},
{0x128e, 0x128f},
{0x12b1, 0x12b1},
{0x12b6, 0x12b7},
{0x12bf, 0x12bf},
{0x12c1, 0x12c1},
{0x12c6, 0x12c7},
{0x12d7, 0x12d7},
{0x1311, 0x1311},
{0x1316, 0x1317},
{0x135b, 0x135c},
{0x1360, 0x137f},
{0x1390, 0x139f},
{0x13f6, 0x13f7},
{0x13fe, 0x1400},
{0x166d, 0x166e},
{0x1680, 0x1680},
{0x169b, 0x169f},
{0x16eb, 0x16ed},
{0x16f9, 0x16ff},
{0x170d, 0x170d},
{0x1715, 0x171f},
{0x1735, 0x173f},
{0x1754, 0x175f},
{0x176d, 0x176d},
{0x1771, 0x1771},
{0x1774, 0x17b3},
{0x17d4, 0x17dc},
{0x17de, 0x17df},
{0x17ea, 0x180a},
{0x180f, 0x180f},
{0x181a, 0x181f},
{0x1878, 0x187f},
{0x18ab, 0x18af},
{0x18f6, 0x18ff},
{0x191f, 0x191f},
{0x192c, 0x192f},
{0x193c, 0x1945},
{0x1950, 0x19cf},
{0x19da, 0x19ff},
{0x1a1c, 0x1a54},
{0x1a5f, 0x1a5f},
{0x1a7d, 0x1a7e},
{0x1a8a, 0x1a8f},
{0x1a9a, 0x1aaf},
{0x1abf, 0x1aff},
{0x1b4c, 0x1b4f},
{0x1b5a, 0x1b6a},
{0x1b74, 0x1b7f},
{0x1bf4, 0x1bff},
{0x1c38, 0x1c3f},
{0x1c4a, 0x1c4c},
{0x1c7e, 0x1c7f},
{0x1c89, 0x1ccf},
{0x1cd3, 0x1cd3},
{0x1cfa, 0x1cff},
{0x1dfa, 0x1dfa},
{0x1f16, 0x1f17},
{0x1f1e, 0x1f1f},
{0x1f46, 0x1f47},
{0x1f4e, 0x1f4f},
{0x1f58, 0x1f58},
{0x1f5a, 0x1f5a},
{0x1f5c, 0x1f5c},
{0x1f5e, 0x1f5e},
{0x1f7e, 0x1f7f},
{0x1fb5, 0x1fb5},
{0x1fbd, 0x1fbd},
{0x1fbf, 0x1fc1},
{0x1fc5, 0x1fc5},
{0x1fcd, 0x1fcf},
{0x1fd4, 0x1fd5},
{0x1fdc, 0x1fdf},
{0x1fed, 0x1ff1},
{0x1ff5, 0x1ff5},
{0x1ffd, 0x200b},
{0x2010, 0x2017},
{0x201a, 0x2023},
{0x2025, 0x2026},
{0x2028, 0x2029},
{0x2030, 0x203e},
{0x2041, 0x2053},
{0x2055, 0x205f},
{0x2065, 0x2065},
{0x2070, 0x2070},
{0x2072, 0x207e},
{0x2080, 0x208f},
{0x209d, 0x20cf},
{0x20f1, 0x2101},
{0x2103, 0x2106},
{0x2108, 0x2109},
{0x2114, 0x2114},
{0x2116, 0x2118},
{0x211e, 0x2123},
{0x2125, 0x2125},
{0x2127, 0x2127},
{0x2129, 0x2129},
{0x212e, 0x212e},
{0x213a, 0x213b},
{0x2140, 0x2144},
{0x214a, 0x214d},
{0x214f, 0x215f},
{0x2189, 0x24b5},
{0x24ea, 0x2bff},
{0x2c2f, 0x2c2f},
{0x2c5f, 0x2c5f},
{0x2ce5, 0x2cea},
{0x2cf4, 0x2cff},
{0x2d26, 0x2d26},
{0x2d28, 0x2d2c},
{0x2d2e, 0x2d2f},
{0x2d68, 0x2d6e},
{0x2d70, 0x2d7e},
{0x2d97, 0x2d9f},
{0x2da7, 0x2da7},
{0x2daf, 0x2daf},
{0x2db7, 0x2db7},
{0x2dbf, 0x2dbf},
{0x2dc7, 0x2dc7},
{0x2dcf, 0x2dcf},
{0x2dd7, 0x2dd7},
{0x2ddf, 0x2ddf},
{0x2e00, 0x2e2e},
{0x2e30, 0x3004},
{0x3006, 0x3029},
{0x3030, 0x303a},
{0x303d, 0x3098},
{0x309b, 0x3104},
{0x312f, 0x3130},
{0x318f, 0x319f},
{0x31bb, 0x9fff},
{0xa48d, 0xa4cf},
{0xa4fe, 0xa4ff},
{0xa60d, 0xa60f},
{0xa62c, 0xa63f},
{0xa673, 0xa673},
{0xa67e, 0xa67e},
{0xa6f2, 0xa716},
{0xa7af, 0xa7af},
{0xa7b8, 0xa7f6},
{0xa828, 0xa83f},
{0xa874, 0xa87f},
{0xa8c6, 0xa8cf},
{0xa8da, 0xa8df},
{0xa8f8, 0xa8fa},
{0xa8fc, 0xa8fc},
{0xa8fe, 0xa8ff},
{0xa92e, 0xa92f},
{0xa954, 0xa95f},
{0xa97d, 0xa97f},
{0xa9c1, 0xa9ce},
{0xa9da, 0xa9e4},
{0xa9e6, 0xa9ef},
{0xa9fa, 0xa9ff},
{0xaa37, 0xaa3f},
{0xaa4e, 0xaa4f},
{0xaa5a, 0xaa7a},
{0xaa7e, 0xaaaf},
{0xaab1, 0xaab1},
{0xaab5, 0xaab6},
{0xaab9, 0xaabd},
{0xaac0, 0xaac0},
{0xaac2, 0xaadf},
{0xaaf0, 0xaaf1},
{0xaaf7, 0xab00},
{0xab07, 0xab08},
{0xab0f, 0xab10},
{0xab17, 0xab1f},
{0xab27, 0xab27},
{0xab2f, 0xab2f},
{0xab66, 0xab6f},
{0xabeb, 0xabeb},
{0xabee, 0xabef},
{0xabfa, 0xabff},
{0xd7a4, 0xd7af},
{0xd7c7, 0xd7ca},
{0xd7fc, 0xfaff},
{0xfb07, 0xfb12},
{0xfb18, 0xfb1c},
{0xfb29, 0xfb29},
{0xfb37, 0xfb37},
{0xfb3d, 0xfb3d},
{0xfb3f, 0xfb3f},
{0xfb42, 0xfb42},
{0xfb45, 0xfb45},
{0xfbb2, 0xfbd2},
{0xfd3e, 0xfd4f},
{0xfd90, 0xfd91},
{0xfdc8, 0xfdef},
{0xfdfc, 0xfdff},
{0xfe10, 0xfe12},
{0xfe14, 0xfe1f},
{0xfe30, 0xfe32},
{0xfe35, 0xfe4c},
{0xfe50, 0xfe51},
{0xfe53, 0xfe54},
{0xfe56, 0xfe6f},
{0xfe75, 0xfe75},
{0xfefd, 0xfefe},
{0xff00, 0xff06},
{0xff08, 0xff0d},
{0xff0f, 0xff19},
{0xff1b, 0xff20},
{0xff3b, 0xff3e},
{0xff40, 0xff40},
{0xff5b, 0xff9d},
{0xffbf, 0xffc1},
{0xffc8, 0xffc9},
{0xffd0, 0xffd1},
{0xffd8, 0xffd9},
{0xffdd, 0xfff8},
{0xfffc, 0xffff},
{0x1000c, 0x1000c},
{0x10027, 0x10027},
{0x1003b, 0x1003b},
{0x1003e, 0x1003e},
{0x1004e, 0x1004f},
{0x1005e, 0x1007f},
{0x100fb, 0x1013f},
{0x10175, 0x101fc},
{0x101fe, 0x1027f},
{0x1029d, 0x1029f},
{0x102d1, 0x102df},
{0x102e1, 0x102ff},
{0x10320, 0x1032c},
{0x1034b, 0x1034f},
{0x1037b, 0x1037f},
{0x1039e, 0x1039f},
{0x103c4, 0x103c7},
{0x103d0, 0x103d0},
{0x103d6, 0x103ff},
{0x1049e, 0x1049f},
{0x104aa, 0x104af},
{0x104d4, 0x104d7},
{0x104fc, 0x104ff},
{0x10528, 0x1052f},
{0x10564, 0x105ff},
{0x10737, 0x1073f},
{0x10756, 0x1075f},
{0x10768, 0x107ff},
{0x10806, 0x10807},
{0x10809, 0x10809},
{0x10836, 0x10836},
{0x10839, 0x1083b},
{0x1083d, 0x1083e},
{0x10856, 0x1085f},
{0x10877, 0x1087f},
{0x1089f, 0x108df},
{0x108f3, 0x108f3},
{0x108f6, 0x108ff},
{0x10916, 0x1091f},
{0x1093a, 0x1097f},
{0x109b8, 0x109bd},
{0x109c0, 0x109ff},
{0x10a04, 0x10a04},
{0x10a07, 0x10a0b},
{0x10a14, 0x10a14},
{0x10a18, 0x10a18},
{0x10a34, 0x10a37},
{0x10a3b, 0x10a3e},
{0x10a40, 0x10a5f},
{0x10a7d, 0x10a7f},
{0x10a9d, 0x10abf},
{0x10ac8, 0x10ac8},
{0x10ae7, 0x10aff},
{0x10b36, 0x10b3f},
{0x10b56, 0x10b5f},
{0x10b73, 0x10b7f},
{0x10b92, 0x10bff},
{0x10c49, 0x10c7f},
{0x10cb3, 0x10cbf},
{0x10cf3, 0x10fff},
{0x11047, 0x11065},
{0x11070, 0x1107e},
{0x110bb, 0x110bc},
{0x110be, 0x110cf},
{0x110e9, 0x110ef},
{0x110fa, 0x110ff},
{0x11135, 0x11135},
{0x11140, 0x1114f},
{0x11174, 0x11175},
{0x11177, 0x1117f},
{0x111c5, 0x111c9},
{0x111cd, 0x111cf},
{0x111db, 0x111db},
{0x111dd, 0x111ff},
{0x11212, 0x11212},
{0x11238, 0x1123d},
{0x1123f, 0x1127f},
{0x11287, 0x11287},
{0x11289, 0x11289},
{0x1128e, 0x1128e},
{0x1129e, 0x1129e},
{0x112a9, 0x112af},
{0x112eb, 0x112ef},
{0x112fa, 0x112ff},
{0x11304, 0x11304},
{0x1130d, 0x1130e},
{0x11311, 0x11312},
{0x11329, 0x11329},
{0x11331, 0x11331},
{0x11334, 0x11334},
{0x1133a, 0x1133b},
{0x11345, 0x11346},
{0x11349, 0x1134a},
{0x1134e, 0x1134f},
{0x11351, 0x11356},
{0x11358, 0x1135c},
{0x11364, 0x11365},
{0x1136d, 0x1136f},
{0x11375, 0x113ff},
{0x1144b, 0x1144f},
{0x1145a, 0x1147f},
{0x114c6, 0x114c6},
{0x114c8, 0x114cf},
{0x114da, 0x1157f},
{0x115b6, 0x115b7},
{0x115c1, 0x115d7},
{0x115de, 0x115ff},
{0x11641, 0x11643},
{0x11645, 0x1164f},
{0x1165a, 0x1167f},
{0x116b8, 0x116bf},
{0x116ca, 0x1171c},
{0x1172c, 0x1172f},
{0x1173a, 0x1189f},
{0x118ea, 0x118fe},
{0x11900, 0x119ff},
{0x11a3f, 0x11a46},
{0x11a48, 0x11a4f},
{0x11a84, 0x11a85},
{0x11a9a, 0x11abf},
{0x11af9, 0x11bff},
{0x11c09, 0x11c09},
{0x11c37, 0x11c37},
{0x11c41, 0x11c4f},
{0x11c5a, 0x11c71},
{0x11c90, 0x11c91},
{0x11ca8, 0x11ca8},
{0x11cb7, 0x11cff},
{0x11d07, 0x11d07},
{0x11d0a, 0x11d0a},
{0x11d37, 0x11d39},
{0x11d3b, 0x11d3b},
{0x11d3e, 0x11d3e},
{0x11d48, 0x11d4f},
{0x11d5a, 0x11fff},
{0x1239a, 0x123ff},
{0x1246f, 0x1247f},
{0x12544, 0x12fff},
{0x1342f, 0x143ff},
{0x14647, 0x167ff},
{0x16a39, 0x16a3f},
{0x16a5f, 0x16a5f},
{0x16a6a, 0x16acf},
{0x16aee, 0x16aef},
{0x16af5, 0x16aff},
{0x16b37, 0x16b3f},
{0x16b44, 0x16b4f},
{0x16b5a, 0x16b62},
{0x16b78, 0x16b7c},
{0x16b90, 0x16eff},
{0x16f45, 0x16f4f},
{0x16f7f, 0x16f8e},
{0x16fa0, 0x16fdf},
{0x16fe2, 0x1bbff},
{0x1bc6b, 0x1bc6f},
{0x1bc7d, 0x1bc7f},
{0x1bc89, 0x1bc8f},
{0x1bc9a, 0x1bc9c},
{0x1bc9f, 0x1bc9f},
{0x1bca4, 0x1d164},
{0x1d16a, 0x1d16c},
{0x1d183, 0x1d184},
{0x1d18c, 0x1d1a9},
{0x1d1ae, 0x1d241},
{0x1d245, 0x1d3ff},
{0x1d455, 0x1d455},
{0x1d49d, 0x1d49d},
{0x1d4a0, 0x1d4a1},
{0x1d4a3, 0x1d4a4},
{0x1d4a7, 0x1d4a8},
{0x1d4ad, 0x1d4ad},
{0x1d4ba, 0x1d4ba},
{0x1d4bc, 0x1d4bc},
{0x1d4c4, 0x1d4c4},
{0x1d506, 0x1d506},
{0x1d50b, 0x1d50c},
{0x1d515, 0x1d515},
{0x1d51d, 0x1d51d},
{0x1d53a, 0x1d53a},
{0x1d53f, 0x1d53f},
{0x1d545, 0x1d545},
{0x1d547, 0x1d549},
{0x1d551, 0x1d551},
{0x1d6a6, 0x1d6a7},
{0x1d6c1, 0x1d6c1},
{0x1d6db, 0x1d6db},
{0x1d6fb, 0x1d6fb},
{0x1d715, 0x1d715},
{0x1d735, 0x1d735},
{0x1d74f, 0x1d74f},
{0x1d76f, 0x1d76f},
{0x1d789, 0x1d789},
{0x1d7a9, 0x1d7a9},
{0x1d7c3, 0x1d7c3},
{0x1d7cc, 0x1d7cd},
{0x1d800, 0x1d9ff},
{0x1da37, 0x1da3a},
{0x1da6d, 0x1da74},
{0x1da76, 0x1da83},
{0x1da85, 0x1da9a},
{0x1daa0, 0x1daa0},
{0x1dab0, 0x1dfff},
{0x1e007, 0x1e007},
{0x1e019, 0x1e01a},
{0x1e022, 0x1e022},
{0x1e025, 0x1e025},
{0x1e02b, 0x1e7ff},
{0x1e8c5, 0x1e8cf},
{0x1e8d7, 0x1e8ff},
{0x1e94b, 0x1e94f},
{0x1e95a, 0x1edff},
{0x1ee04, 0x1ee04},
{0x1ee20, 0x1ee20},
{0x1ee23, 0x1ee23},
{0x1ee25, 0x1ee26},
{0x1ee28, 0x1ee28},
{0x1ee33, 0x1ee33},
{0x1ee38, 0x1ee38},
{0x1ee3a, 0x1ee3a},
{0x1ee3c, 0x1ee41},
{0x1ee43, 0x1ee46},
{0x1ee48, 0x1ee48},
{0x1ee4a, 0x1ee4a},
{0x1ee4c, 0x1ee4c},
{0x1ee50, 0x1ee50},
{0x1ee53, 0x1ee53},
{0x1ee55, 0x1ee56},
{0x1ee58, 0x1ee58},
{0x1ee5a, 0x1ee5a},
{0x1ee5c, 0x1ee5c},
{0x1ee5e, 0x1ee5e},
{0x1ee60, 0x1ee60},
{0x1ee63, 0x1ee63},
{0x1ee65, 0x1ee66},
{0x1ee6b, 0x1ee6b},
{0x1ee73, 0x1ee73},
{0x1ee78, 0x1ee78},
{0x1ee7d, 0x1ee7d},
{0x1ee7f, 0x1ee7f},
{0x1ee8a, 0x1ee8a},
{0x1ee9c, 0x1eea0},
{0x1eea4, 0x1eea4},
{0x1eeaa, 0x1eeaa},
{0x1eebc, 0x1f12f},
{0x1f14a, 0x1f14f},
{0x1f16a, 0x1f16f},
{0x1f18a, 0x1ffff},
}
breakTest = []string{
"AA",
"ÄA",
"Aa\u2060",
"Äa\u2060",
"Aa|:",
"Äa|:",
"Aa|'",
"Äa|'",
"Aa|'\u2060",
"Äa|'\u2060",
"Aa|,",
"Äa|,",
"a\u2060A",
"a\u2060̈A",
"a\u2060a\u2060",
"a\u2060̈a\u2060",
"a\u2060a|:",
"a\u2060̈a|:",
"a\u2060a|'",
"a\u2060̈a|'",
"a\u2060a|'\u2060",
"a\u2060̈a|'\u2060",
"a\u2060a|,",
"a\u2060̈a|,",
"a:A",
"a:̈A",
"a:a\u2060",
"a:̈a\u2060",
"a:a|:",
"a:̈a|:",
"a:a|'",
"a:̈a|'",
"a:a|'\u2060",
"a:̈a|'\u2060",
"a:a|,",
"a:̈a|,",
"a'A",
"a'̈A",
"a'a\u2060",
"a'̈a\u2060",
"a'a|:",
"a'̈a|:",
"a'a|'",
"a'̈a|'",
"a'a|'\u2060",
"a'̈a|'\u2060",
"a'a|,",
"a'̈a|,",
"a'\u2060A",
"a'\u2060̈A",
"a'\u2060a\u2060",
"a'\u2060̈a\u2060",
"a'\u2060a|:",
"a'\u2060̈a|:",
"a'\u2060a|'",
"a'\u2060̈a|'",
"a'\u2060a|'\u2060",
"a'\u2060̈a|'\u2060",
"a'\u2060a|,",
"a'\u2060̈a|,",
"a|,|A",
"a|,̈|A",
"a|,|a\u2060",
"a|,̈|a\u2060",
"a|,|a|:",
"a|,̈|a|:",
"a|,|a|'",
"a|,̈|a|'",
"a|,|a|'\u2060",
"a|,̈|a|'\u2060",
"a|,|a|,",
"a|,̈|a|,",
"AAA",
"A:A",
"A|:|:|A",
"A00A",
"A__A",
"a|🇦🇧|🇨|b",
"a|🇦🇧\u200d|🇨|b",
"a|🇦\u200d🇧|🇨|b",
"a|🇦🇧|🇨🇩|b",
"ä\u200d̈b",
"1_a|:|:|a",
"1_a|:|.|a",
"1_a|:|,|a",
"1_a|.|:|a",
"1_a|.|.|a",
"1_a|.|,|a",
"1_a|,|:|a",
"1_a|,|.|a",
"1_a|,|,|a",
"a_a|:|:|1",
"a|:|:|a",
"a_1|:|:|a",
"a_a|:|:|a",
"a_a|:|.|1",
"a|:|.|a",
"a_1|:|.|a",
"a_a|:|.|a",
"a_a|:|,|1",
"a|:|,|a",
"a_1|:|,|a",
"a_a|:|,|a",
"a_a|.|:|1",
"a|.|:|a",
"a_1|.|:|a",
"a_a|.|:|a",
"a_a|.|.|1",
"a|.|.|a",
"a_1|.|.|a",
"a_a|.|.|a",
"a_a|.|,|1",
"a|.|,|a",
"a_1|.|,|a",
"a_a|.|,|a",
"a_a|,|:|1",
"a|,|:|a",
"a_1|,|:|a",
"a_a|,|:|a",
"a_a|,|.|1",
"a|,|.|a",
"a_1|,|.|a",
"a_a|,|.|a",
"a_a|,|,|1",
"a|,|,|a",
"a_1|,|,|a",
"a_a|,|,|a",
}
)
| {
"pile_set_name": "Github"
} |
#
# Copyright (C) 2009-2013 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=luasocket
PKG_SOURCE_DATE:=2019-04-21
PKG_SOURCE_VERSION:=733af884f1aa18ff469bf3c4d18810e815853211
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/diegonehab/luasocket
PKG_MIRROR_HASH:=60aef7544426cae3e6c7560a6e4ad556a04b879ca0ad0311645b2c513c872128
PKG_MAINTAINER:=W. Michael Petullo <[email protected]>
PKG_LICENSE:=MIT
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
define Package/luasocket/default
SUBMENU:=Lua
SECTION:=lang
CATEGORY:=Languages
URL:=http://w3.impa.br/~diego/software/luasocket
endef
define Package/luasocket
$(Package/luasocket/default)
TITLE:=LuaSocket
DEPENDS:=+lua
VARIANT:=lua-51
DEFAULT_VARIANT:=1
endef
define Package/luasocket5.3
$(Package/luasocket/default)
TITLE:=LuaSocket 5.3
DEPENDS:=+liblua5.3
VARIANT:=lua-53
endef
ifeq ($(BUILD_VARIANT),lua-51)
LUA_VERSION=5.1
endif
ifeq ($(BUILD_VARIANT),lua-53)
LUA_VERSION=5.3
endif
define Package/luasocket/default/description
LuaSocket is the most comprehensive networking support
library for the Lua language. It provides easy access to
TCP, UDP, DNS, SMTP, FTP, HTTP, MIME and much more.
endef
Package/luasocket/description = $(Package/luasocket/default/description)
Package/luasocket5.3/description = $(Package/luasocket/default/description)
define Build/Configure
endef
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR)/ \
LIBDIR="$(TARGET_LDFLAGS)" \
CC="$(TARGET_CC) $(TARGET_CFLAGS) $(TARGET_CPPFLAGS) $(FPIC)" \
LD="$(TARGET_CROSS)ld -shared" \
LUAV=$(LUA_VERSION) LUAINC_linux_base=$(STAGING_DIR)/usr/include \
all
endef
define Package/luasocket/install
$(INSTALL_DIR) $(1)/usr/lib/lua
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ltn12,mime,socket}.lua $(1)/usr/lib/lua
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mime-1.0.3.so $(1)/usr/lib/lua
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/socket-3.0-rc1.so $(1)/usr/lib/lua
$(INSTALL_DIR) $(1)/usr/lib/lua/mime
ln -sf ../mime-1.0.3.so $(1)/usr/lib/lua/mime/core.so
$(INSTALL_DIR) $(1)/usr/lib/lua/socket
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/{ftp,http,smtp,tp,url,headers}.lua $(1)/usr/lib/lua/socket
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/unix.so $(1)/usr/lib/lua/socket
ln -sf ../socket-3.0-rc1.so $(1)/usr/lib/lua/socket/core.so
endef
define Package/luasocket5.3/install
$(MAKE) -C $(PKG_BUILD_DIR)/src \
DESTDIR="$(1)" \
LUAV=$(LUA_VERSION) \
install
endef
$(eval $(call BuildPackage,luasocket))
$(eval $(call BuildPackage,luasocket5.3))
| {
"pile_set_name": "Github"
} |
/*
* Copyright (C) Igor Sysoev
* Copyright (C) NGINX, Inc.
*/
#ifndef _NXT_UNIX_H_INCLUDED_
#define _NXT_UNIX_H_INCLUDED_
#if (NXT_LINUX)
#ifdef _FORTIFY_SOURCE
/*
* _FORTIFY_SOURCE
* may call sigaltstack() while _longjmp() checking;
* may cause _longjmp() to fail with message:
* "longjmp() causes uninitialized stack frame";
* does not allow to use "(void) write()";
* does surplus checks.
*/
#undef _FORTIFY_SOURCE
#endif
#ifndef _GNU_SOURCE
#define _GNU_SOURCE /* pread(), pwrite(), gethostname(). */
#endif
#define _FILE_OFFSET_BITS 64
#include <malloc.h> /* malloc_usable_size(). */
#include <sys/syscall.h> /* syscall(SYS_gettid). */
#if (__GLIBC__ >= 2 && __GLIBC_MINOR__ >= 4)
/*
* POSIX semaphores using NPTL atomic/futex operations
* were introduced during glibc 2.3 development time.
*/
#define NXT_HAVE_SEM_TRYWAIT_FAST 1
#endif
#endif /* NXT_LINUX */
#if (NXT_FREEBSD)
#if (NXT_HAVE_MALLOC_USABLE_SIZE)
#include <malloc_np.h> /* malloc_usable_size(). */
#endif
#if (__FreeBSD_version >= 900007)
/* POSIX semaphores using atomic/umtx. */
#define NXT_HAVE_SEM_TRYWAIT_FAST 1
#endif
#endif /* NXT_FREEBSD */
#if (NXT_SOLARIS)
#ifndef _FILE_OFFSET_BITS
#define _FILE_OFFSET_BITS 64 /* Must be before <sys/types.h>. */
#endif
#ifndef _REENTRANT /* May be set by "-mt" options. */
#define _REENTRANT /* Thread safe errno. */
#endif
#ifndef _POSIX_PTHREAD_SEMANTICS
#define _POSIX_PTHREAD_SEMANTICS /* 2 arguments in sigwait(). */
#endif
/*
* Solaris provides two sockets API:
*
* 1) 4.3BSD sockets (int instead of socklen_t in accept(), etc.;
* struct msghdr.msg_accrights) in libsocket;
* 2) X/Open sockets (socklen_t, struct msghdr.msg_control) with __xnet_
* function name prefix in libxnet and libsocket.
*/
/* Enable X/Open sockets API. */
#define _XOPEN_SOURCE
#define _XOPEN_SOURCE_EXTENDED 1
/* Enable Solaris extensions disabled by _XOPEN_SOURCE. */
#ifndef __EXTENSIONS__
#define __EXTENSIONS__
#endif
#endif /* NXT_SOLARIS */
#if (NXT_MACOSX)
#ifndef _DARWIN_C_SOURCE
#define _DARWIN_C_SOURCE /* pthread_threadid_np(), mach_port_t. */
#endif
#include <mach/mach_time.h> /* mach_absolute_time(). */
#include <malloc/malloc.h> /* malloc_size(). */
#endif /* NXT_MACOSX */
#if (NXT_AIX)
#define _THREAD_SAFE /* Must before any include. */
#endif /* NXT_AIX */
#if (NXT_HPUX)
#define _FILE_OFFSET_BITS 64
/*
* HP-UX provides three sockets API:
*
* 1) 4.3BSD sockets (int instead of socklen_t in accept(), etc.;
* struct msghdr.msg_accrights) in libc;
* 2) X/Open sockets (socklen_t, struct msghdr.msg_control) with _xpg_
* function name prefix in libc;
* 3) and X/Open sockets (socklen_t, struct msghdr.msg_control) in libxnet.
*/
/* Enable X/Open sockets API. */
#define _XOPEN_SOURCE
#define _XOPEN_SOURCE_EXTENDED
/* Enable static function wrappers for _xpg_ X/Open sockets API in libc. */
#define _HPUX_ALT_XOPEN_SOCKET_API
#include <sys/mpctl.h>
#if (NXT_HAVE_HG_GETHRTIME)
#include <sys/mercury.h>
#endif
#endif /* NXT_HPUX */
#if (NXT_HAVE_ALLOCA_H)
#include <alloca.h>
#endif
#include <dlfcn.h>
#include <errno.h>
#include <fcntl.h>
#include <grp.h>
#include <limits.h>
#include <netdb.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <poll.h>
#include <pwd.h>
#include <semaphore.h>
#include <setjmp.h>
#include <sched.h>
#include <signal.h>
#if (NXT_HAVE_POSIX_SPAWN)
#include <spawn.h>
#endif
#include <stdarg.h>
#include <stddef.h> /* offsetof() */
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#if (NXT_HAVE_SYS_FILIO_H)
#include <sys/filio.h> /* FIONBIO */
#endif
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <sys/param.h> /* MAXPATHLEN */
#include <sys/resource.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/uio.h>
#if (NXT_HAVE_UNIX_DOMAIN)
#include <sys/un.h>
#endif
#include <sys/wait.h>
#include <time.h>
#include <unistd.h>
#include <pthread.h>
#if (NXT_HAVE_EPOLL)
#include <sys/epoll.h>
#ifdef EPOLLRDHUP
/*
* Epoll edge-tiggered mode is pretty much useless without EPOLLRDHUP support.
*/
#define NXT_HAVE_EPOLL_EDGE 1
#endif
#endif
#if (NXT_HAVE_SIGNALFD)
#include <sys/signalfd.h>
#endif
#if (NXT_HAVE_EVENTFD)
#include <sys/eventfd.h>
#endif
#if (NXT_HAVE_KQUEUE)
#include <sys/event.h>
#endif
#if (NXT_HAVE_EVENTPORT)
#include <port.h>
#endif
#if (NXT_HAVE_DEVPOLL)
#include <sys/devpoll.h>
#endif
#if (NXT_HAVE_POLLSET)
#include <sys/pollset.h>
#endif
#if (NXT_HAVE_LINUX_SENDFILE)
#include <sys/sendfile.h>
#endif
#if (NXT_HAVE_SOLARIS_SENDFILEV)
#include <sys/sendfile.h>
#endif
#if (NXT_HAVE_GETRANDOM)
#include <sys/random.h> /* getrandom(). */
#elif (NXT_HAVE_LINUX_SYS_GETRANDOM)
#include <linux/random.h> /* SYS_getrandom. */
#elif (NXT_HAVE_GETENTROPY_SYS_RANDOM)
#include <sys/random.h> /* getentropy(). */
#endif
#if (NXT_HAVE_ISOLATION_ROOTFS)
#include <sys/mount.h>
#endif
#if (NXT_TEST_BUILD)
#include <nxt_test_build.h>
#endif
/*
* On Linux IOV_MAX is 1024. Linux uses kernel stack for 8 iovec's
* to avoid kernel allocation/deallocation.
*
* On FreeBSD IOV_MAX is 1024. FreeBSD used kernel stack for 8 iovec's
* to avoid kernel allocation/deallocation until FreeBSD 5.2.
* FreeBSD 5.2 and later do not use stack at all.
*
* On Solaris IOV_MAX is 16 and Solaris uses only kernel stack.
*
* On MacOSX IOV_MAX is 1024. MacOSX used kernel stack for 8 iovec's
* to avoid kernel allocation/deallocation until MacOSX 10.4 (Tiger).
* MacOSX 10.4 and later do not use stack at all.
*
* On NetBSD, OpenBSD, and DragonFlyBSD IOV_MAX is 1024. All these OSes
* uses kernel stack for 8 iovec's to avoid kernel allocation/deallocation.
*
* On AIX and HP-UX IOV_MAX is 16.
*/
#define NXT_IOBUF_MAX 8
typedef struct iovec nxt_iobuf_t;
#define \
nxt_iobuf_data(iob) \
(iob)->iov_base
#define \
nxt_iobuf_size(iob) \
(iob)->iov_len
#define \
nxt_iobuf_set(iob, p, size) \
do { \
(iob)->iov_base = (void *) p; \
(iob)->iov_len = size; \
} while (0)
#define \
nxt_iobuf_add(iob, size) \
(iob)->iov_len += size
#endif /* _NXT_UNIX_H_INCLUDED_ */
| {
"pile_set_name": "Github"
} |
import '../../../gulpfile';
| {
"pile_set_name": "Github"
} |
/*
* Copyright 2013 Red Hat Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*
* Authors: Ben Skeggs <[email protected]>
*/
#include "gf100.h"
#include "ctxgf100.h"
#include <nvif/class.h>
/*******************************************************************************
* PGRAPH register lists
******************************************************************************/
static const struct gf100_gr_init
gk110b_gr_init_l1c_0[] = {
{ 0x419c98, 1, 0x04, 0x00000000 },
{ 0x419ca8, 1, 0x04, 0x00000000 },
{ 0x419cb0, 1, 0x04, 0x09000000 },
{ 0x419cb4, 1, 0x04, 0x00000000 },
{ 0x419cb8, 1, 0x04, 0x00b08bea },
{ 0x419c84, 1, 0x04, 0x00010384 },
{ 0x419cbc, 1, 0x04, 0x281b3646 },
{ 0x419cc0, 2, 0x04, 0x00000000 },
{ 0x419c80, 1, 0x04, 0x00020230 },
{ 0x419ccc, 2, 0x04, 0x00000000 },
{}
};
static const struct gf100_gr_init
gk110b_gr_init_sm_0[] = {
{ 0x419e00, 1, 0x04, 0x00000080 },
{ 0x419ea0, 1, 0x04, 0x00000000 },
{ 0x419ee4, 1, 0x04, 0x00000000 },
{ 0x419ea4, 1, 0x04, 0x00000100 },
{ 0x419ea8, 1, 0x04, 0x00000000 },
{ 0x419eb4, 1, 0x04, 0x00000000 },
{ 0x419ebc, 2, 0x04, 0x00000000 },
{ 0x419edc, 1, 0x04, 0x00000000 },
{ 0x419f00, 1, 0x04, 0x00000000 },
{ 0x419ed0, 1, 0x04, 0x00002616 },
{ 0x419f74, 1, 0x04, 0x00015555 },
{ 0x419f80, 4, 0x04, 0x00000000 },
{}
};
static const struct gf100_gr_pack
gk110b_gr_pack_mmio[] = {
{ gk104_gr_init_main_0 },
{ gk110_gr_init_fe_0 },
{ gf100_gr_init_pri_0 },
{ gf100_gr_init_rstr2d_0 },
{ gf119_gr_init_pd_0 },
{ gk110_gr_init_ds_0 },
{ gf100_gr_init_scc_0 },
{ gk110_gr_init_sked_0 },
{ gk110_gr_init_cwd_0 },
{ gf119_gr_init_prop_0 },
{ gf108_gr_init_gpc_unk_0 },
{ gf100_gr_init_setup_0 },
{ gf100_gr_init_crstr_0 },
{ gf108_gr_init_setup_1 },
{ gf100_gr_init_zcull_0 },
{ gf119_gr_init_gpm_0 },
{ gk110_gr_init_gpc_unk_1 },
{ gf100_gr_init_gcc_0 },
{ gk104_gr_init_gpc_unk_2 },
{ gk104_gr_init_tpccs_0 },
{ gk110_gr_init_tex_0 },
{ gk104_gr_init_pe_0 },
{ gk110b_gr_init_l1c_0 },
{ gf100_gr_init_mpc_0 },
{ gk110b_gr_init_sm_0 },
{ gf117_gr_init_pes_0 },
{ gf117_gr_init_wwdx_0 },
{ gf117_gr_init_cbm_0 },
{ gk104_gr_init_be_0 },
{ gf100_gr_init_fe_1 },
{}
};
/*******************************************************************************
* PGRAPH engine/subdev functions
******************************************************************************/
static const struct gf100_gr_func
gk110b_gr = {
.oneinit_tiles = gf100_gr_oneinit_tiles,
.oneinit_sm_id = gf100_gr_oneinit_sm_id,
.init = gf100_gr_init,
.init_gpc_mmu = gf100_gr_init_gpc_mmu,
.init_vsc_stream_master = gk104_gr_init_vsc_stream_master,
.init_zcull = gf117_gr_init_zcull,
.init_num_active_ltcs = gf100_gr_init_num_active_ltcs,
.init_rop_active_fbps = gk104_gr_init_rop_active_fbps,
.init_fecs_exceptions = gf100_gr_init_fecs_exceptions,
.init_sked_hww_esr = gk104_gr_init_sked_hww_esr,
.init_419cc0 = gf100_gr_init_419cc0,
.init_419eb4 = gk110_gr_init_419eb4,
.init_ppc_exceptions = gk104_gr_init_ppc_exceptions,
.init_tex_hww_esr = gf100_gr_init_tex_hww_esr,
.init_shader_exceptions = gf100_gr_init_shader_exceptions,
.init_400054 = gf100_gr_init_400054,
.trap_mp = gf100_gr_trap_mp,
.mmio = gk110b_gr_pack_mmio,
.fecs.ucode = &gk110_gr_fecs_ucode,
.gpccs.ucode = &gk110_gr_gpccs_ucode,
.rops = gf100_gr_rops,
.ppc_nr = 2,
.grctx = &gk110b_grctx,
.zbc = &gf100_gr_zbc,
.sclass = {
{ -1, -1, FERMI_TWOD_A },
{ -1, -1, KEPLER_INLINE_TO_MEMORY_B },
{ -1, -1, KEPLER_B, &gf100_fermi },
{ -1, -1, KEPLER_COMPUTE_B },
{}
}
};
static const struct gf100_gr_fwif
gk110b_gr_fwif[] = {
{ -1, gf100_gr_load, &gk110b_gr },
{ -1, gf100_gr_nofw, &gk110b_gr },
{}
};
int
gk110b_gr_new(struct nvkm_device *device, int index, struct nvkm_gr **pgr)
{
return gf100_gr_new_(gk110b_gr_fwif, device, index, pgr);
}
| {
"pile_set_name": "Github"
} |
package client
import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/client/metadata"
"github.com/aws/aws-sdk-go/aws/request"
)
// A Config provides configuration to a service client instance.
type Config struct {
Config *aws.Config
Handlers request.Handlers
PartitionID string
Endpoint string
SigningRegion string
SigningName string
// States that the signing name did not come from a modeled source but
// was derived based on other data. Used by service client constructors
// to determine if the signin name can be overridden based on metadata the
// service has.
SigningNameDerived bool
}
// ConfigProvider provides a generic way for a service client to receive
// the ClientConfig without circular dependencies.
type ConfigProvider interface {
ClientConfig(serviceName string, cfgs ...*aws.Config) Config
}
// ConfigNoResolveEndpointProvider same as ConfigProvider except it will not
// resolve the endpoint automatically. The service client's endpoint must be
// provided via the aws.Config.Endpoint field.
type ConfigNoResolveEndpointProvider interface {
ClientConfigNoResolveEndpoint(cfgs ...*aws.Config) Config
}
// A Client implements the base client request and response handling
// used by all service clients.
type Client struct {
request.Retryer
metadata.ClientInfo
Config aws.Config
Handlers request.Handlers
}
// New will return a pointer to a new initialized service client.
func New(cfg aws.Config, info metadata.ClientInfo, handlers request.Handlers, options ...func(*Client)) *Client {
svc := &Client{
Config: cfg,
ClientInfo: info,
Handlers: handlers.Copy(),
}
switch retryer, ok := cfg.Retryer.(request.Retryer); {
case ok:
svc.Retryer = retryer
case cfg.Retryer != nil && cfg.Logger != nil:
s := fmt.Sprintf("WARNING: %T does not implement request.Retryer; using DefaultRetryer instead", cfg.Retryer)
cfg.Logger.Log(s)
fallthrough
default:
maxRetries := aws.IntValue(cfg.MaxRetries)
if cfg.MaxRetries == nil || maxRetries == aws.UseServiceDefaultRetries {
maxRetries = DefaultRetryerMaxNumRetries
}
svc.Retryer = DefaultRetryer{NumMaxRetries: maxRetries}
}
svc.AddDebugHandlers()
for _, option := range options {
option(svc)
}
return svc
}
// NewRequest returns a new Request pointer for the service API
// operation and parameters.
func (c *Client) NewRequest(operation *request.Operation, params interface{}, data interface{}) *request.Request {
return request.New(c.Config, c.ClientInfo, c.Handlers, c.Retryer, operation, params, data)
}
// AddDebugHandlers injects debug logging handlers into the service to log request
// debug information.
func (c *Client) AddDebugHandlers() {
if !c.Config.LogLevel.AtLeast(aws.LogDebug) {
return
}
c.Handlers.Send.PushFrontNamed(LogHTTPRequestHandler)
c.Handlers.Send.PushBackNamed(LogHTTPResponseHandler)
}
| {
"pile_set_name": "Github"
} |
<?xml version="1.0" encoding="utf-8"?>
<com.mikepenz.crossfadedrawerlayout.view.CrossfadeDrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/material_drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
/> | {
"pile_set_name": "Github"
} |
# stub frameworks like to gum up Object, so this is deliberately
# set NOT to run so that you don't accidentally run it when you
# run this dir.
# To run it, stand in this directory and say:
#
# RUN_RR_EXAMPLE=true ruby ../bin/spec mocking_with_rr.rb
if ENV['RUN_RR_EXAMPLE']
Spec::Runner.configure do |config|
config.mock_with :rr
end
describe "RR framework" do
it "should should be made available by saying config.mock_with :rr" do
o = Object.new
mock(o).msg("arg")
o.msg
end
it "should should be made available by saying config.mock_with :rr" do
o = Object.new
mock(o) do |m|
m.msg("arg")
end
o.msg
end
end
end
| {
"pile_set_name": "Github"
} |
metal-soy-bundle
===================================
A bundle containing all the closure dependencies required by soy files compiled to incremental-dom.
Note that this bundle was built by hand, and some features were deliberately removed to make the resulting bundle smaller, like escaping (which shouldn't be necessary for incremental dom anyway) and bidi directives (which will be added back soon).
See [https://metaljs.com/](https://metaljs.com/) for documentation.
| {
"pile_set_name": "Github"
} |
/*
* Copyright (c) 2013 Dave Collins <[email protected]>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
package spew
import (
"bytes"
"fmt"
"io"
"os"
)
// ConfigState houses the configuration options used by spew to format and
// display values. There is a global instance, Config, that is used to control
// all top-level Formatter and Dump functionality. Each ConfigState instance
// provides methods equivalent to the top-level functions.
//
// The zero value for ConfigState provides no indentation. You would typically
// want to set it to a space or a tab.
//
// Alternatively, you can use NewDefaultConfig to get a ConfigState instance
// with default settings. See the documentation of NewDefaultConfig for default
// values.
type ConfigState struct {
// Indent specifies the string to use for each indentation level. The
// global config instance that all top-level functions use set this to a
// single space by default. If you would like more indentation, you might
// set this to a tab with "\t" or perhaps two spaces with " ".
Indent string
// MaxDepth controls the maximum number of levels to descend into nested
// data structures. The default, 0, means there is no limit.
//
// NOTE: Circular data structures are properly detected, so it is not
// necessary to set this value unless you specifically want to limit deeply
// nested data structures.
MaxDepth int
// DisableMethods specifies whether or not error and Stringer interfaces are
// invoked for types that implement them.
DisableMethods bool
// DisablePointerMethods specifies whether or not to check for and invoke
// error and Stringer interfaces on types which only accept a pointer
// receiver when the current type is not a pointer.
//
// NOTE: This might be an unsafe action since calling one of these methods
// with a pointer receiver could technically mutate the value, however,
// in practice, types which choose to satisify an error or Stringer
// interface with a pointer receiver should not be mutating their state
// inside these interface methods. As a result, this option relies on
// access to the unsafe package, so it will not have any effect when
// running in environments without access to the unsafe package such as
// Google App Engine or with the "disableunsafe" build tag specified.
DisablePointerMethods bool
// ContinueOnMethod specifies whether or not recursion should continue once
// a custom error or Stringer interface is invoked. The default, false,
// means it will print the results of invoking the custom error or Stringer
// interface and return immediately instead of continuing to recurse into
// the internals of the data type.
//
// NOTE: This flag does not have any effect if method invocation is disabled
// via the DisableMethods or DisablePointerMethods options.
ContinueOnMethod bool
// SortKeys specifies map keys should be sorted before being printed. Use
// this to have a more deterministic, diffable output. Note that only
// native types (bool, int, uint, floats, uintptr and string) and types
// that support the error or Stringer interfaces (if methods are
// enabled) are supported, with other types sorted according to the
// reflect.Value.String() output which guarantees display stability.
SortKeys bool
// SpewKeys specifies that, as a last resort attempt, map keys should
// be spewed to strings and sorted by those strings. This is only
// considered if SortKeys is true.
SpewKeys bool
}
// Config is the active configuration of the top-level functions.
// The configuration can be changed by modifying the contents of spew.Config.
var Config = ConfigState{Indent: " "}
// Errorf is a wrapper for fmt.Errorf that treats each argument as if it were
// passed with a Formatter interface returned by c.NewFormatter. It returns
// the formatted string as a value that satisfies error. See NewFormatter
// for formatting details.
//
// This function is shorthand for the following syntax:
//
// fmt.Errorf(format, c.NewFormatter(a), c.NewFormatter(b))
func (c *ConfigState) Errorf(format string, a ...interface{}) (err error) {
return fmt.Errorf(format, c.convertArgs(a)...)
}
// Fprint is a wrapper for fmt.Fprint that treats each argument as if it were
// passed with a Formatter interface returned by c.NewFormatter. It returns
// the number of bytes written and any write error encountered. See
// NewFormatter for formatting details.
//
// This function is shorthand for the following syntax:
//
// fmt.Fprint(w, c.NewFormatter(a), c.NewFormatter(b))
func (c *ConfigState) Fprint(w io.Writer, a ...interface{}) (n int, err error) {
return fmt.Fprint(w, c.convertArgs(a)...)
}
// Fprintf is a wrapper for fmt.Fprintf that treats each argument as if it were
// passed with a Formatter interface returned by c.NewFormatter. It returns
// the number of bytes written and any write error encountered. See
// NewFormatter for formatting details.
//
// This function is shorthand for the following syntax:
//
// fmt.Fprintf(w, format, c.NewFormatter(a), c.NewFormatter(b))
func (c *ConfigState) Fprintf(w io.Writer, format string, a ...interface{}) (n int, err error) {
return fmt.Fprintf(w, format, c.convertArgs(a)...)
}
// Fprintln is a wrapper for fmt.Fprintln that treats each argument as if it
// passed with a Formatter interface returned by c.NewFormatter. See
// NewFormatter for formatting details.
//
// This function is shorthand for the following syntax:
//
// fmt.Fprintln(w, c.NewFormatter(a), c.NewFormatter(b))
func (c *ConfigState) Fprintln(w io.Writer, a ...interface{}) (n int, err error) {
return fmt.Fprintln(w, c.convertArgs(a)...)
}
// Print is a wrapper for fmt.Print that treats each argument as if it were
// passed with a Formatter interface returned by c.NewFormatter. It returns
// the number of bytes written and any write error encountered. See
// NewFormatter for formatting details.
//
// This function is shorthand for the following syntax:
//
// fmt.Print(c.NewFormatter(a), c.NewFormatter(b))
func (c *ConfigState) Print(a ...interface{}) (n int, err error) {
return fmt.Print(c.convertArgs(a)...)
}
// Printf is a wrapper for fmt.Printf that treats each argument as if it were
// passed with a Formatter interface returned by c.NewFormatter. It returns
// the number of bytes written and any write error encountered. See
// NewFormatter for formatting details.
//
// This function is shorthand for the following syntax:
//
// fmt.Printf(format, c.NewFormatter(a), c.NewFormatter(b))
func (c *ConfigState) Printf(format string, a ...interface{}) (n int, err error) {
return fmt.Printf(format, c.convertArgs(a)...)
}
// Println is a wrapper for fmt.Println that treats each argument as if it were
// passed with a Formatter interface returned by c.NewFormatter. It returns
// the number of bytes written and any write error encountered. See
// NewFormatter for formatting details.
//
// This function is shorthand for the following syntax:
//
// fmt.Println(c.NewFormatter(a), c.NewFormatter(b))
func (c *ConfigState) Println(a ...interface{}) (n int, err error) {
return fmt.Println(c.convertArgs(a)...)
}
// Sprint is a wrapper for fmt.Sprint that treats each argument as if it were
// passed with a Formatter interface returned by c.NewFormatter. It returns
// the resulting string. See NewFormatter for formatting details.
//
// This function is shorthand for the following syntax:
//
// fmt.Sprint(c.NewFormatter(a), c.NewFormatter(b))
func (c *ConfigState) Sprint(a ...interface{}) string {
return fmt.Sprint(c.convertArgs(a)...)
}
// Sprintf is a wrapper for fmt.Sprintf that treats each argument as if it were
// passed with a Formatter interface returned by c.NewFormatter. It returns
// the resulting string. See NewFormatter for formatting details.
//
// This function is shorthand for the following syntax:
//
// fmt.Sprintf(format, c.NewFormatter(a), c.NewFormatter(b))
func (c *ConfigState) Sprintf(format string, a ...interface{}) string {
return fmt.Sprintf(format, c.convertArgs(a)...)
}
// Sprintln is a wrapper for fmt.Sprintln that treats each argument as if it
// were passed with a Formatter interface returned by c.NewFormatter. It
// returns the resulting string. See NewFormatter for formatting details.
//
// This function is shorthand for the following syntax:
//
// fmt.Sprintln(c.NewFormatter(a), c.NewFormatter(b))
func (c *ConfigState) Sprintln(a ...interface{}) string {
return fmt.Sprintln(c.convertArgs(a)...)
}
/*
NewFormatter returns a custom formatter that satisfies the fmt.Formatter
interface. As a result, it integrates cleanly with standard fmt package
printing functions. The formatter is useful for inline printing of smaller data
types similar to the standard %v format specifier.
The custom formatter only responds to the %v (most compact), %+v (adds pointer
addresses), %#v (adds types), and %#+v (adds types and pointer addresses) verb
combinations. Any other verbs such as %x and %q will be sent to the the
standard fmt package for formatting. In addition, the custom formatter ignores
the width and precision arguments (however they will still work on the format
specifiers not handled by the custom formatter).
Typically this function shouldn't be called directly. It is much easier to make
use of the custom formatter by calling one of the convenience functions such as
c.Printf, c.Println, or c.Printf.
*/
func (c *ConfigState) NewFormatter(v interface{}) fmt.Formatter {
return newFormatter(c, v)
}
// Fdump formats and displays the passed arguments to io.Writer w. It formats
// exactly the same as Dump.
func (c *ConfigState) Fdump(w io.Writer, a ...interface{}) {
fdump(c, w, a...)
}
/*
Dump displays the passed parameters to standard out with newlines, customizable
indentation, and additional debug information such as complete types and all
pointer addresses used to indirect to the final value. It provides the
following features over the built-in printing facilities provided by the fmt
package:
* Pointers are dereferenced and followed
* Circular data structures are detected and handled properly
* Custom Stringer/error interfaces are optionally invoked, including
on unexported types
* Custom types which only implement the Stringer/error interfaces via
a pointer receiver are optionally invoked when passing non-pointer
variables
* Byte arrays and slices are dumped like the hexdump -C command which
includes offsets, byte values in hex, and ASCII output
The configuration options are controlled by modifying the public members
of c. See ConfigState for options documentation.
See Fdump if you would prefer dumping to an arbitrary io.Writer or Sdump to
get the formatted result as a string.
*/
func (c *ConfigState) Dump(a ...interface{}) {
fdump(c, os.Stdout, a...)
}
// Sdump returns a string with the passed arguments formatted exactly the same
// as Dump.
func (c *ConfigState) Sdump(a ...interface{}) string {
var buf bytes.Buffer
fdump(c, &buf, a...)
return buf.String()
}
// convertArgs accepts a slice of arguments and returns a slice of the same
// length with each argument converted to a spew Formatter interface using
// the ConfigState associated with s.
func (c *ConfigState) convertArgs(args []interface{}) (formatters []interface{}) {
formatters = make([]interface{}, len(args))
for index, arg := range args {
formatters[index] = newFormatter(c, arg)
}
return formatters
}
// NewDefaultConfig returns a ConfigState with the following default settings.
//
// Indent: " "
// MaxDepth: 0
// DisableMethods: false
// DisablePointerMethods: false
// ContinueOnMethod: false
// SortKeys: false
func NewDefaultConfig() *ConfigState {
return &ConfigState{Indent: " "}
}
| {
"pile_set_name": "Github"
} |
package client
import (
"bytes"
"fmt"
"io/ioutil"
"net/http"
"strings"
"testing"
"golang.org/x/net/context"
"github.com/docker/docker/api/types/swarm"
)
func TestSwarmUpdateError(t *testing.T) {
client := &Client{
transport: newMockClient(nil, errorMock(http.StatusInternalServerError, "Server error")),
}
err := client.SwarmUpdate(context.Background(), swarm.Version{}, swarm.Spec{}, swarm.UpdateFlags{})
if err == nil || err.Error() != "Error response from daemon: Server error" {
t.Fatalf("expected a Server Error, got %v", err)
}
}
func TestSwarmUpdate(t *testing.T) {
expectedURL := "/swarm/update"
client := &Client{
transport: newMockClient(nil, func(req *http.Request) (*http.Response, error) {
if !strings.HasPrefix(req.URL.Path, expectedURL) {
return nil, fmt.Errorf("Expected URL '%s', got '%s'", expectedURL, req.URL)
}
if req.Method != "POST" {
return nil, fmt.Errorf("expected POST method, got %s", req.Method)
}
return &http.Response{
StatusCode: http.StatusOK,
Body: ioutil.NopCloser(bytes.NewReader([]byte(""))),
}, nil
}),
}
err := client.SwarmUpdate(context.Background(), swarm.Version{}, swarm.Spec{}, swarm.UpdateFlags{})
if err != nil {
t.Fatal(err)
}
}
| {
"pile_set_name": "Github"
} |
#ifndef MuonReco_DYTInfo_h
#define MuonReco_DYTInfo_h
#include <vector>
#include <map>
#include <iostream>
#include "DataFormats/DetId/interface/DetId.h"
namespace reco {
class DYTInfo {
public:
/// Constructor - Destructor
DYTInfo();
~DYTInfo();
/// copy from another DYTInfo
void CopyFrom(const DYTInfo &);
/// number of stations used by DYT
const int NStUsed() const { return NStUsed_; };
void setNStUsed(int NStUsed) { NStUsed_ = NStUsed; };
/// estimator values for all station
const std::vector<double> &DYTEstimators() const { return DYTEstimators_; };
void setDYTEstimators(const std::map<int, double> &dytEstMap) {
DYTEstimators_.clear();
for (int st = 1; st <= 4; st++) {
if (dytEstMap.count(st) > 0)
DYTEstimators_.push_back(dytEstMap.find(st)->second);
else
DYTEstimators_.push_back(-1);
}
};
void setDYTEstimators(const std::vector<double> &EstValues) { DYTEstimators_ = EstValues; }
/// number of segments tested per muon station
const std::vector<bool> &UsedStations() const { return UsedStations_; };
void setUsedStations(const std::map<int, bool> &ustMap) {
UsedStations_.clear();
for (int st = 1; st <= 4; st++)
UsedStations_.push_back(ustMap.find(st)->second);
};
void setUsedStations(const std::vector<bool> ustVal) { UsedStations_ = ustVal; };
/// DetId vector of chamber with valid estimator
const std::vector<DetId> &IdChambers() const { return IdChambers_; };
void setIdChambers(const std::map<int, DetId> &IdChambersMap) {
IdChambers_.clear();
for (int st = 1; st <= 4; st++)
IdChambers_.push_back(IdChambersMap.find(st)->second);
};
void setIdChambers(const std::vector<DetId> &IdChambersVal) { IdChambers_ = IdChambersVal; };
/// vector of thresholds
const std::vector<double> &Thresholds() const { return Thresholds_; };
void setThresholds(const std::map<int, double> &ThresholdsMap) {
Thresholds_.clear();
for (int st = 1; st <= 4; st++)
Thresholds_.push_back(ThresholdsMap.find(st)->second);
};
void setThresholds(const std::vector<double> &ThresholdsVal) { Thresholds_ = ThresholdsVal; };
private:
int NStUsed_;
std::vector<bool> UsedStations_;
std::vector<double> DYTEstimators_;
std::vector<DetId> IdChambers_;
std::vector<double> Thresholds_;
};
} // namespace reco
#endif
| {
"pile_set_name": "Github"
} |
{ mkDerivation, stdenv, fetchFromGitHub, qmake, qtbase, qtdeclarative }:
mkDerivation rec {
pname = "firebird-emu";
version = "1.4";
src = fetchFromGitHub {
owner = "nspire-emus";
repo = "firebird";
rev = "v${version}";
sha256 = "0pdca6bgnmzfgf5kp83as99y348gn4plzbxnqxjs61vp489baahq";
fetchSubmodules = true;
};
enableParallelBuilding = true;
nativeBuildInputs = [ qmake ];
buildInputs = [ qtbase qtdeclarative ];
makeFlags = [ "INSTALL_ROOT=$(out)" ];
# Attempts to install to /usr/bin and /usr/share/applications, which Nix does
# not use.
prePatch = ''
substituteInPlace firebird.pro \
--replace '/usr/' '/'
'';
meta = {
homepage = "https://github.com/nspire-emus/firebird";
description = "Third-party multi-platform emulator of the ARM-based TI-Nspire™ calculators";
license = stdenv.lib.licenses.gpl3;
maintainers = with stdenv.lib.maintainers; [ pneumaticat ];
# Only tested on Linux, but likely possible to build on, e.g. macOS
platforms = stdenv.lib.platforms.linux;
};
}
| {
"pile_set_name": "Github"
} |
fn main() {
#[allow(unused_variables)]
let v1 = vec![false, true, false]; // Vec<bool>型
let v2 = vec![0.0, -1.0, 1.0, 0.5]; // Vec<f64>型
assert_eq!(v2.len(), 4); // v2ベクタの長さは4
// 長さ100のベクタを作り、全要素を0i32で初期化する
// (要素の型はCloneトレイトを実装していなければならない)
let v3 = vec![0; 100]; // Vec<i32>型
assert_eq!(v3.len(), 100);
// ベクタは入れ子にできる。子の要素数はそれぞれが異なってもかまわない
#[allow(unused_variables)]
let v4 = vec![vec!['a', 'b', 'c'], vec!['d']]; // Vec<Vec<char>>型
// ベクタは同じ型の要素の並び。異なる型の要素は持てない
// let v5 = vec![false, 'a'];
// → error[E0308]: mismatched types
let mut v6 = vec!['a', 'b', 'c']; // Vec<char>型
v6.push('d'); // 最後尾に値を追加
v6.push('e');
assert_eq!(v6, ['a', 'b', 'c', 'd', 'e']); // v6の現在の値
assert_eq!(v6.pop(), Some('e')); // 最後尾から値を取り出し
v6.insert(1, 'f'); // インデックス1の位置に要素を挿入
assert_eq!(v6.remove(2), 'b'); // インデックス2の要素を削除。返り値は削除した値
assert_eq!(v6, ['a', 'f', 'c', 'd']); // v6の現在の値
let mut v7 = vec!['g', 'h']; // 別のベクタv7を作成
v6.append(&mut v7); // v6の最後尾にv7の全要素を追加
assert_eq!(v6, ['a', 'f', 'c', 'd', 'g', 'h']);
assert_eq!(v7, []); // v7は空になった(全要素がv6へ移動した)
let a8 = ['i', 'j']; // 固定長配列a8を作成
v6.extend_from_slice(&a8); // v6の最後尾にa8の全要素を追加
assert_eq!(v6, ['a', 'f', 'c', 'd', 'g', 'h', 'i', 'j']);
assert_eq!(a8, ['i', 'j']); // a8は変更なし(a8の要素がコピーされた)
}
| {
"pile_set_name": "Github"
} |
# MZUI
为移动端设计,基于 Flex 的 UI 框架。
示例和文档:http://zui.sexy/m/
官方 ZUI QQ 群:384135104 项目和计划:http://zui.5upm.com/product-browse-1.html
## 特色
* 现代化:基于 Flex 设计,支持移动端全部主流浏览器,支持 Android 微信内置浏览器;
* 灵活:独立的外观选项,适合大部分控件,满足多样的外观定制需求;
* 可定制:所有内容可以按需使用,基于 Gulp 构建自定义版本非常简单;
* 轻量:JS(mzui.min.js)压缩后在 20KB 左右,CSS(mzui.min.css)压缩后在 76KB 左右,启用 GZip 压缩之后会更小(css 16KB, js 8KB),JS 部分兼容 jQuery 最新版本;

## 快速使用
### NPM
```
npm install mzui
```
### Bower
```
bower install mzui
```
## 浏览器兼容性
支持的浏览器:
* Android Chrome:最新版;
* iOS Safari:最新版;
* Android 微信:最新版;
* Windows 10 mobile Edge:最新版。
可能会带来兼容性问题的特性包括:
* [REM (root em) units](http://caniuse.com/#search=rem)
* [Flexible Box Layout](http://caniuse.com/#search=flex)
* [CSS3 2D Transforms](http://caniuse.com/#search=transform)
* [CSS3 Transitions](http://caniuse.com/#search=transition)
* [CSS3 Box-shadow](http://caniuse.com/#search=box-shadow)
## 后续计划
* 为响应式开发增加更多的内容
* 增加更多的场景示例
* 增加轮播
* 增加卡片控件
* 增加轻量的路由功能
## 已知问题
* 行列混用栅格在 iOS safari 上不可用;
## 桌面端方案推荐
欢迎使用 [ZUI: http://zui.sexy](http://zui.sexy)。
| {
"pile_set_name": "Github"
} |
Cinnamon is a Linux desktop which provides advanced innovative features and a traditional user experience.
The desktop layout is similar to Gnome 2 with underlying technology forked from Gnome Shell.
Cinnamon makes users feel at home with an easy to use and comfortable desktop experience.
Contributing
============
Cinnamon is on GitHub at https://github.com/linuxmint/cinnamon.
Note that some issue may not be with Cinnamon itself. For a list of related components,
please see https://projects.linuxmint.com/cinnamon/.
License
=======
Cinnamon is distributed under the terms of the GNU General Public License,
version 2 or later. See the COPYING file for details.
| {
"pile_set_name": "Github"
} |
Welcome to the Munin Guide
==========================
Contents:
.. toctree::
:maxdepth: 2
preface/index.rst
tutorial/index.rst
architecture/index.rst
installation/index.rst
advanced/index.rst
howtos/index.rst
develop/index.rst
develop/plugins/index.rst
reference/index.rst
others/index.rst
Indices and Tables
==================
* :ref:`genindex`
| {
"pile_set_name": "Github"
} |
// ************************************************************************
// ***************************** CEF4Delphi *******************************
// ************************************************************************
//
// CEF4Delphi is based on DCEF3 which uses CEF to embed a chromium-based
// browser in Delphi applications.
//
// The original license of DCEF3 still applies to CEF4Delphi.
//
// For more information about CEF4Delphi visit :
// https://www.briskbard.com/index.php?lang=en&pageid=cef
//
// Copyright © 2017 Salvador Diaz Fau. All rights reserved.
//
// ************************************************************************
// ************ vvvv Original license and comments below vvvv *************
// ************************************************************************
(*
* Delphi Chromium Embedded 3
*
* Usage allowed under the restrictions of the Lesser GNU General Public License
* or alternatively the restrictions of the Mozilla Public License 1.1
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
*
* Unit owner : Henri Gourvest <[email protected]>
* Web site : http://www.progdigy.com
* Repository : http://code.google.com/p/delphichromiumembedded/
* Group : http://groups.google.com/group/delphichromiumembedded
*
* Embarcadero Technologies, Inc is not permitted to use or redistribute
* this source code without explicit permission.
*
*)
unit uCustomTitleBarExtension;
{$I cef.inc}
interface
uses
{$IFDEF DELPHI16_UP}
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
System.Classes, Vcl.Graphics,
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls,
Vcl.ComCtrls,
{$ELSE}
Windows, Messages, SysUtils, Variants, Classes, Graphics,
Controls, Forms, Dialogs, StdCtrls, ExtCtrls, ComCtrls,
{$ENDIF}
uCEFChromium, uCEFWindowParent, uCEFInterfaces, uCEFApplication, uCEFTypes,
uCEFConstants,
uCEFWinControl, uCEFSentinel, uCEFChromiumCore;
const
MINIBROWSER_SHOWTEXTVIEWER = WM_APP + $100;
MINIBROWSER_JSBINPARAM = WM_APP + $103;
MINIBROWSER_CONTEXTMENU_SETJSEVENT = MENU_ID_USER_FIRST + 1;
MINIBROWSER_CONTEXTMENU_JSVISITDOM = MENU_ID_USER_FIRST + 2;
MINIBROWSER_CONTEXTMENU_MUTATIONOBSERVER = MENU_ID_USER_FIRST + 3;
MINIBROWSER_CONTEXTMENU_SHOWDEVTOOLS = MENU_ID_USER_FIRST + 4;
MOUSEOVER_MESSAGE_NAME = 'mousestate';
WINDOW_MINIMIZE_MESSAGE = 'minimize';
WINDOW_MAXIMIZE_MESSAGE = 'maximize';
WINDOW_CLOSE_MESSAGE = 'close';
BINARY_PARAM_JS = 'JSBinaryParameter';
type
TCTBForm = class(TForm)
CEFWindowParent1: TCEFWindowParent;
Chromium1: TChromium;
Timer1: TTimer;
Timer2: TTimer;
procedure FormShow(Sender: TObject);
procedure GoBtnClick(Sender: TObject);
procedure Chromium1BeforeContextMenu(Sender: TObject;
const browser: ICefBrowser; const frame: ICefFrame;
const params: ICefContextMenuParams; const model: ICefMenuModel);
procedure Chromium1ContextMenuCommand(Sender: TObject;
const browser: ICefBrowser; const frame: ICefFrame;
const params: ICefContextMenuParams; commandId: Integer;
eventFlags: Cardinal; out Result: Boolean);
procedure Chromium1ProcessMessageReceived(Sender: TObject;
const browser: ICefBrowser; const frame: ICefFrame;
sourceProcess: TCefProcessId; const message: ICefProcessMessage;
out Result: Boolean);
procedure Chromium1AfterCreated(Sender: TObject;
const browser: ICefBrowser);
procedure Timer1Timer(Sender: TObject);
procedure Chromium1BeforePopup(Sender: TObject; const browser: ICefBrowser;
const frame: ICefFrame; const targetUrl, targetFrameName: ustring;
targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean;
const popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo;
var client: ICefClient; var settings: TCefBrowserSettings;
var extra_info: ICefDictionaryValue; var noJavascriptAccess: Boolean;
var Result: Boolean);
procedure FormCreate(Sender: TObject);
procedure FormCloseQuery(Sender: TObject; var CanClose: Boolean);
procedure Chromium1Close(Sender: TObject; const browser: ICefBrowser;
var aAction: TCefCloseBrowserAction);
procedure Chromium1BeforeClose(Sender: TObject; const browser: ICefBrowser);
procedure executeJS(frame: ICefFrame);
procedure Timer2Timer(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure Chromium1LoadEnd(Sender: TObject; const browser: ICefBrowser;
const frame: ICefFrame; httpStatusCode: Integer);
protected
tp, tpc: TPoint;
mouseDrag: Boolean;
FText: string;
// Variables to control when can we destroy the form safely
FCanClose: Boolean; // Set to True in TChromium.OnBeforeClose
FClosing: Boolean; // Set to True in the CloseQuery event.
procedure BrowserCreatedMsg(var aMessage: TMessage);
message CEF_AFTERCREATED;
procedure BrowserDestroyMsg(var aMessage: TMessage); message CEF_DESTROY;
procedure ShowTextViewerMsg(var aMessage: TMessage);
message MINIBROWSER_SHOWTEXTVIEWER;
procedure EvalJSBinParamMsg(var aMessage: TMessage);
message MINIBROWSER_JSBINPARAM;
procedure WMMove(var aMessage: TWMMove); message WM_MOVE;
procedure WMMoving(var aMessage: TMessage); message WM_MOVING;
public
{ Public declarations }
end;
var
CTBForm: TCTBForm;
procedure CreateGlobalCEFApp;
implementation
{$R *.dfm}
uses
uCefBinaryValue, uCefProcessMessage, uCEFv8Handler, uTestExtension,
uCEFMiscFunctions;
// Please, read the code comments in the JSExtension demo (uJSExtension.pas) before using this demo!
// This demo is almost identical to JSExtension but it uses a slightly easier
// way to register JavaScript extensions inherited from the DCEF3 project.
// Instead of creating a custom class inherited from TCefv8HandlerOwn and calling the
// CefRegisterExtension function, this demo uses the TCefRTTIExtension.Register
// class procedure to register the TTestExtension class, which is a custom Delphi
// class with 2 class procedures.
// TCefRTTIExtension uses the RTTI from the TTestExtension class to generate the
// JS code and the ICefv8Handler parameters needed by CefRegisterExtension.
// You still need to call TCefRTTIExtension.Register in the GlobalCEFApp.OnWebKitInitialized event
// and use process messages to send information between processes.
// TTestExtension can send information back to the browser with a process message.
// The TTestExtension.mouseover function do this by calling
// TCefv8ContextRef.Current.Browser.MainFrame.SendProcessMessage(PID_BROWSER, msg);
// That message is received in the TChromium.OnProcessMessageReceived event.
// Destruction steps
// =================
// 1. FormCloseQuery sets CanClose to FALSE calls TChromium.CloseBrowser which triggers the TChromium.OnClose event.
// 2. TChromium.OnClose sends a CEFBROWSER_DESTROY message to destroy CEFWindowParent1 in the main thread, which triggers the TChromium.OnBeforeClose event.
// 3. TChromium.OnBeforeClose sets FCanClose := True and sends WM_CLOSE to the form.
procedure GlobalCEFApp_OnWebKitInitialized;
begin
{$IFDEF DELPHI14_UP}
// Registering the extension. Read this document for more details :
// https://bitbucket.org/chromiumembedded/cef/wiki/JavaScriptIntegration.md
if TCefRTTIExtension.Register('myextension', TTestExtension) then
{$IFDEF DEBUG}CefDebugLog('JavaScript extension registered successfully!'){$ENDIF}
else
{$IFDEF DEBUG}CefDebugLog('There was an error registering the JavaScript extension!'){$ENDIF};
{$ENDIF}
end;
procedure CreateGlobalCEFApp;
begin
GlobalCEFApp := TCefApplication.Create;
GlobalCEFApp.OnWebKitInitialized := GlobalCEFApp_OnWebKitInitialized;
{$IFDEF DEBUG}
GlobalCEFApp.LogFile := 'debug.log';
GlobalCEFApp.LogSeverity := LOGSEVERITY_INFO;
{$ENDIF}
end;
procedure TCTBForm.GoBtnClick(Sender: TObject);
begin
Chromium1.LoadURL('file:///app_view.html');
end;
procedure TCTBForm.Chromium1AfterCreated(Sender: TObject;
const browser: ICefBrowser);
begin
PostMessage(Handle, CEF_AFTERCREATED, 0, 0);
CTBForm.executeJS(Chromium1.browser.MainFrame);
end;
procedure TCTBForm.Chromium1BeforeContextMenu(Sender: TObject;
const browser: ICefBrowser; const frame: ICefFrame;
const params: ICefContextMenuParams; const model: ICefMenuModel);
begin
// Adding some custom context menu entries
model.AddSeparator;
model.AddItem(MINIBROWSER_CONTEXTMENU_SHOWDEVTOOLS, 'Show DevTools');
end;
procedure TCTBForm.Chromium1BeforePopup(Sender: TObject;
const browser: ICefBrowser; const frame: ICefFrame;
const targetUrl, targetFrameName: ustring;
targetDisposition: TCefWindowOpenDisposition; userGesture: Boolean;
const popupFeatures: TCefPopupFeatures; var windowInfo: TCefWindowInfo;
var client: ICefClient; var settings: TCefBrowserSettings;
var extra_info: ICefDictionaryValue; var noJavascriptAccess: Boolean;
var Result: Boolean);
begin
// For simplicity, this demo blocks all popup windows and new tabs
Result := (targetDisposition in [WOD_NEW_FOREGROUND_TAB,
WOD_NEW_BACKGROUND_TAB, WOD_NEW_POPUP, WOD_NEW_WINDOW]);
end;
procedure TCTBForm.executeJS(frame: ICefFrame);
var
TempJSCode: string;
begin
if (frame <> nil) and frame.IsValid then
begin
TempJSCode := 'document.body.addEventListener("mousedown", function(evt){' +
'myextension.mousestate(getComputedStyle(evt.target).webkitAppRegion)' +
'});' + chr(13);
TempJSCode := TempJSCode + ' setAppCaption("' + CTBForm.caption + '");';
frame.ExecuteJavaScript(TempJSCode, 'about:blank', 0);
end;
end;
procedure TCTBForm.Chromium1ContextMenuCommand(Sender: TObject;
const browser: ICefBrowser; const frame: ICefFrame;
const params: ICefContextMenuParams; commandId: Integer; eventFlags: Cardinal;
out Result: Boolean);
const
ELEMENT_ID = 'keywords';
// ID attribute in the search box at https://www.briskbard.com/forum/
var
TempPoint: TPoint;
begin
Result := False;
// Here is the code executed for each custom context menu entry
case commandId of
MINIBROWSER_CONTEXTMENU_SETJSEVENT:
CTBForm.executeJS(frame);
MINIBROWSER_CONTEXTMENU_SHOWDEVTOOLS:
begin
TempPoint.x := params.XCoord;
TempPoint.y := params.YCoord;
Chromium1.ShowDevTools(TempPoint, nil);
end;
end;
end;
procedure TCTBForm.EvalJSBinParamMsg(var aMessage: TMessage);
var
TempMsg: ICefProcessMessage;
TempOpenDialog: TOpenDialog;
TempStream: TFileStream;
TempBinValue: ICefBinaryValue;
TempBuffer: TBytes;
TempSize: NativeUInt;
TempPointer: pointer;
begin
TempOpenDialog := nil;
TempStream := nil;
try
try
TempOpenDialog := TOpenDialog.Create(nil);
TempOpenDialog.Filter := 'JPEG files (*.jpg)|*.JPG';
if TempOpenDialog.Execute then
begin
TempStream := TFileStream.Create(TempOpenDialog.FileName, fmOpenRead);
TempSize := TempStream.Size;
if (TempSize > 0) then
begin
SetLength(TempBuffer, TempSize);
TempSize := TempStream.Read(TempBuffer, TempSize);
if (TempSize > 0) then
begin
TempPointer := @TempBuffer[0];
TempBinValue := TCefBinaryValueRef.New(TempPointer, TempSize);
TempMsg := TCefProcessMessageRef.New(BINARY_PARAM_JS);
if TempMsg.ArgumentList.SetBinary(0, TempBinValue) then
Chromium1.SendProcessMessage(PID_RENDERER, TempMsg);
end;
end;
end;
except
on e: exception do
if CustomExceptionHandler('TCTBForm.EvalJSBinParamMsg', e) then
raise;
end;
finally
if (TempOpenDialog <> nil) then
FreeAndNil(TempOpenDialog);
if (TempStream <> nil) then
FreeAndNil(TempStream);
SetLength(TempBuffer, 0);
end;
end;
procedure TCTBForm.Chromium1LoadEnd(Sender: TObject; const browser: ICefBrowser;
const frame: ICefFrame; httpStatusCode: Integer);
begin
CTBForm.executeJS(Chromium1.browser.MainFrame);
end;
procedure TCTBForm.Chromium1ProcessMessageReceived(Sender: TObject;
const browser: ICefBrowser; const frame: ICefFrame;
sourceProcess: TCefProcessId; const message: ICefProcessMessage;
out Result: Boolean);
begin
Result := False;
if (message = nil) or (message.ArgumentList = nil) then
exit;
// This function receives the messages with the JavaScript results
// Many of these events are received in different threads and the VCL
// doesn't like to create and destroy components in different threads.
// It's safer to store the results and send a message to the main thread to show them.
// The message names are defined in the extension or in JS code.
if (message.Name = MOUSEOVER_MESSAGE_NAME) then
begin
tp := Mouse.CursorPos;
tp := CTBForm.ScreenToClient(tp);
mouseDrag := False;
if message.ArgumentList.GetString(0) = 'drag' then
begin
mouseDrag := True;
Timer2.Enabled := True;
end;
Result := True;
end;
if (message.Name = WINDOW_MINIMIZE_MESSAGE) then
begin
CTBForm.WindowState := wsMinimized;
end;
if (message.Name = WINDOW_MAXIMIZE_MESSAGE) then
begin
if CTBForm.WindowState = wsNormal then
begin
CTBForm.WindowState := wsMaximized;
end
else if CTBForm.WindowState = wsMaximized then
CTBForm.WindowState := wsNormal;
end;
if (message.Name = WINDOW_CLOSE_MESSAGE) then
begin
CTBForm.close;
end;
end;
procedure TCTBForm.FormShow(Sender: TObject);
begin
Chromium1.DefaultURL := 'file:///app_view.html';
// GlobalCEFApp.GlobalContextInitialized has to be TRUE before creating any browser
// If it's not initialized yet, we use a simple timer to create the browser later.
if not(Chromium1.CreateBrowser(CEFWindowParent1, '')) then
Timer1.Enabled := True;
end;
procedure TCTBForm.WMMove(var aMessage: TWMMove);
begin
inherited;
if (Chromium1 <> nil) then
Chromium1.NotifyMoveOrResizeStarted;
end;
procedure TCTBForm.WMMoving(var aMessage: TMessage);
begin
inherited;
if (Chromium1 <> nil) then
Chromium1.NotifyMoveOrResizeStarted;
end;
procedure TCTBForm.ShowTextViewerMsg(var aMessage: TMessage);
begin
end;
procedure TCTBForm.Timer1Timer(Sender: TObject);
begin
Timer1.Enabled := False;
if not(Chromium1.CreateBrowser(CEFWindowParent1, '')) and
not(Chromium1.Initialized) then
begin
Timer1.Enabled := True;
end;
end;
procedure TCTBForm.BrowserCreatedMsg(var aMessage: TMessage);
begin
CEFWindowParent1.UpdateSize;
end;
procedure TCTBForm.Chromium1BeforeClose(Sender: TObject;
const browser: ICefBrowser);
begin
FCanClose := True;
PostMessage(Handle, WM_CLOSE, 0, 0);
end;
procedure TCTBForm.Chromium1Close(Sender: TObject; const browser: ICefBrowser;
var aAction: TCefCloseBrowserAction);
begin
PostMessage(Handle, CEF_DESTROY, 0, 0);
aAction := cbaDelay;
end;
procedure TCTBForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
CanClose := FCanClose;
if not(FClosing) then
begin
FClosing := True;
Visible := False;
Chromium1.CloseBrowser(True);
end;
end;
procedure TCTBForm.FormCreate(Sender: TObject);
begin
FCanClose := False;
FClosing := False;
end;
procedure TCTBForm.BrowserDestroyMsg(var aMessage: TMessage);
begin
CEFWindowParent1.Free;
end;
procedure TCTBForm.Button1Click(Sender: TObject);
begin
end;
/// ////////////////////////////////////////////////////////////////////////////
procedure TCTBForm.Timer2Timer(Sender: TObject);
var
MouseLBtnDown: Boolean;
begin
tpc := Mouse.CursorPos;
MouseLBtnDown := (GetKeyState(VK_LBUTTON) < 0);
if not MouseLBtnDown then
begin
mouseDrag := False;
Timer2.Enabled := False;
end;
if mouseDrag then
begin
CTBForm.Left := tpc.x - tp.x;
CTBForm.top := tpc.y - tp.y;
end;
end;
end.
| {
"pile_set_name": "Github"
} |
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
syntax = "proto3";
package google.ads.googleads.v3.enums;
import "google/api/annotations.proto";
option csharp_namespace = "Google.Ads.GoogleAds.V3.Enums";
option go_package = "google.golang.org/genproto/googleapis/ads/googleads/v3/enums;enums";
option java_multiple_files = true;
option java_outer_classname = "AdvertisingChannelSubTypeProto";
option java_package = "com.google.ads.googleads.v3.enums";
option objc_class_prefix = "GAA";
option php_namespace = "Google\\Ads\\GoogleAds\\V3\\Enums";
option ruby_package = "Google::Ads::GoogleAds::V3::Enums";
// Proto file describing advertising channel subtypes.
// An immutable specialization of an Advertising Channel.
message AdvertisingChannelSubTypeEnum {
// Enum describing the different channel subtypes.
enum AdvertisingChannelSubType {
// Not specified.
UNSPECIFIED = 0;
// Used as a return value only. Represents value unknown in this version.
UNKNOWN = 1;
// Mobile app campaigns for Search.
SEARCH_MOBILE_APP = 2;
// Mobile app campaigns for Display.
DISPLAY_MOBILE_APP = 3;
// AdWords express campaigns for search.
SEARCH_EXPRESS = 4;
// AdWords Express campaigns for display.
DISPLAY_EXPRESS = 5;
// Smart Shopping campaigns.
SHOPPING_SMART_ADS = 6;
// Gmail Ad campaigns.
DISPLAY_GMAIL_AD = 7;
// Smart display campaigns.
DISPLAY_SMART_CAMPAIGN = 8;
// Video Outstream campaigns.
VIDEO_OUTSTREAM = 9;
// Video TrueView for Action campaigns.
VIDEO_ACTION = 10;
// Video campaigns with non-skippable video ads.
VIDEO_NON_SKIPPABLE = 11;
// App Campaign that allows you to easily promote your Android or iOS app
// across Google's top properties including Search, Play, YouTube, and the
// Google Display Network.
APP_CAMPAIGN = 12;
// App Campaign for engagement, focused on driving re-engagement with the
// app across several of Google’s top properties including Search, YouTube,
// and the Google Display Network.
APP_CAMPAIGN_FOR_ENGAGEMENT = 13;
// Shopping Comparison Listing campaigns.
SHOPPING_COMPARISON_LISTING_ADS = 15;
}
}
| {
"pile_set_name": "Github"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.