diff --git "a/train/github-12-30708209.jsonl" "b/train/github-12-30708209.jsonl" new file mode 100644--- /dev/null +++ "b/train/github-12-30708209.jsonl" @@ -0,0 +1,1193 @@ +{"text": "platform unix\n"} +{"text": "/**\n * KRC Parser Plus (Original 'KRC Parser')\n * Original Author: btx258\n * Modified by: Robotxm\n * Version: 0.3.7\n * License: GPL 3.0\n * Description: Make foobar2000 with ESLyric able to parse\n * KRC and translated lyrics if they exist.\n * Github: https://github.com/Robotxm/ESLyric-LyricsSource\n**/\n\n\n/** \n * Define whether to show dual-line desktop lyrics or not when translated lyrics doesn't exsit.\n * NOTICE: No matter what value is set, you must set ESLyric to show dual-line lyric.\n * true: Dual line\n * false: Single line\n * 当没有翻译歌词存在时,是否以双行样式显示桌面歌词。\n * 注意:无论此处设置为何值,都必须在 ESLyric 中设置桌面歌词的“显示模式”为“双行显示”。\n * true: 以双行显示\n * false: 以单行显示 \n**/\nvar dual_line = false;\n\n/** \n * Define whether to use beta function.\n * true: Enablde beta function\n * false: Disable beta function\n * 是否使用测试功能。此功能主要用于使存在翻译时歌词的显示效果与酷狗音乐一致。原理是在每一行歌词原文前添加一个空格。\n * 此空格不会被 ESLyric 显示,因此并不会影响观感。\n * 如果有处理歌词文件的需求,请避免使用测试功能。\n * true: 启用 Beta 测试功能\n * false: 禁用 Beta 测试功能\n**/\nvar beta = true;\n\n/**\n * Define whether to use alpha function.\n * NOTICE: If lyrics shows incorrectly, set to false and open an issue.\n * true: Enable alpha function\n * false: Disable alpha function\n * 是否使用 Alpha 测试功能。此功能主要是使得 ESLyric 成为真正的“逐字”模式。原理和酷狗一样,使用“开始”和“结束”\n * 两个时间标签控制一个字符。\n * 注意:如果启用后出现歌词显示错误,请关闭并提交 issue。\n * true: 启用 Alpha 测试功能\n * false: 禁用 Alpha 测试功能\n */\nvar alpha = true;\n\nfunction get_my_name() {\n return \"KRC Parser Plus\";\n}\n\nfunction get_version() {\n return \"0.3.7\";\n}\n\nfunction get_author() {\n return \"Robotxm & wistaria\";\n}\n\nfunction is_our_type(type) {\n return type.toLowerCase() == \"krc\";\n}\n\nfunction start_parse(data) {\n var zip_data = null;\n var krc_text = null;\n zip_data = krchex_xor(data);\n if (!zip_data)\n return;\n unzip_data = utils.ZUnCompress(zip_data);\n if (!unzip_data)\n return;\n krc_text = utils.UTF8ToUnicode(unzip_data);\n return krc2lrc(krc_text);\n}\n\nfunction krchex_xor(s) {\n var magic_bytes = [0x6b, 0x72, 0x63, 0x31]; // 'k' , 'r' , 'c' ,'1'\n if (s.length < magic_bytes.length) return;\n for (var i = 0; i < magic_bytes.length; ++i) {\n var c = s.charCodeAt(i);\n if (c != magic_bytes[i]) return;\n }\n var enc_key = [0x40, 0x47, 0x61, 0x77, 0x5e, 0x32, 0x74, 0x47, 0x51, 0x36, 0x31, 0x2d, 0xce, 0xd2, 0x6e, 0x69];\n var buf = \"\";\n var krc_header = magic_bytes.length; // First 4 bytes\n for (var i = krc_header; i < s.length; ++i) {\n var x1 = s.charCodeAt(i);;\n var x2 = enc_key[(i - krc_header) % 16];\n buf += String.fromCharCode(x1 ^ x2);\n }\n return buf;\n}\n\nfunction krc2lrc(text) {\n\n var lrcBuf = \"\";\n var regx_meta_info = /^\\[([^\\d:][^:]*):([^:]*)\\]\\s*$/;\n var regx_timestamps1 = /^\\[(\\d*,\\d*)\\]/;\n var regx_timestamps2 = /<(\\d*,\\d*,\\d*)>([^<]*)/g;\n var lrcMetaInfo = [\"ar\", \"ti\", \"al\", \"by\", \"offset\"];\n var metaInfoUnlock = true;\n var line, arr;\n var _end = 0;\n\n // Get translation\n var jkrc, trans;\n var lrcBuf2 = \"\";\n var lc = 0; // LRC metadata lines\n var btrans = false;\n if (text.indexOf(\"language\") != -1 && text.indexOf(\"eyJjb250ZW50IjpbXSwidmVyc2lvbiI6MX0=\") == -1) {\n var regx_lrc = text.match(/language:(.*)/g);\n regx_lrc[0] = regx_lrc[0].substring(0, regx_lrc[0].length - 1);\n var lrc = unescape(base64decode(regx_lrc[0].replace(\"language:\", \"\")).replace(/\\\\u/g, '%u'));\n var jkrc = eval('(' + lrc + ')');\n for (var j = 0; j < jkrc.content.length; j++) {\n if (jkrc.content[j].type == 1) {\n btrans = true;\n var trans = jkrc.content[j].lyricContent;\n }\n }\n }\n var lines = text.split(/[\\n\\r]/);\n\n // Start conversion\n for (var i = 0; i < lines.length; ++i) {\n line = lines[i];\n // Copy known meta tag back\n if (metaInfoUnlock && (arr = regx_meta_info.exec(line))) {\n for (var idx in lrcMetaInfo) {\n if (lrcMetaInfo[idx] == arr[1]) {\n lrcBuf = lrcBuf + arr[0] + \"\\r\\n\";\n lc++;\n break;\n }\n }\n var lrcMeta = lrcBuf;\n }\n else if ((arr = regx_timestamps1.exec(line))) {\n // Parse lyric line\n metaInfoUnlock = false;\n var buf = \"\";\n var _time_array = arr[1].split(',');\n var _start = parseInt(_time_array[0], 10);\n var _duaration = parseInt(_time_array[1], 10);\n while ((arr = regx_timestamps2.exec(line))) {\n var _sub_time = arr[1].split(',');\n var _sub_start = parseInt(_sub_time[0], 10);\n var _sub_duaration = parseInt(_sub_time[1], 10);\n var cnt = arr[2];\n buf = buf + \"[\" + format_time(_start + _sub_start) + \"]\" + cnt + (alpha ? (\"[\" + format_time(_start + _sub_start + _sub_duaration) + \"]\") : \"\");\n _duaration = parseInt(_sub_start + _sub_duaration, 10);\n }\n if (!alpha)\n buf = buf + \"[\" + format_time(_start + _duaration) + \"]\";\n _end = _start + _duaration;\n lrcBuf += buf + \"\\r\\n\";\n }\n }\n\n // Add translation if exists\n if (btrans) {\n if (beta) {\n var lrc_lines = lrcBuf.split(\"\\r\\n\");\n for (var k = 0; k < trans.length; k++) {\n if (k != trans.length - 1) {\n if (k == 0) {\n if (ToMilliSec(lrc_lines[k + lc].substr(lrc_lines[k + lc].length - 9, 8)) < ToMilliSec(lrc_lines[k + lc + 1].substr(1, 8)))\n lrcBuf2 += lrc_lines[k + lc] + \"\\r\\n\" + lrc_lines[k + lc].slice(-10) + (trans[k] == \"\" ? \"  \" : trans[k]) + lrc_lines[k + lc].slice(-10) + \"\\r\\n\";\n else\n lrcBuf2 += lrc_lines[k + lc] + \"\\r\\n\" + lrc_lines[k + lc + 1].substr(0, 10) + (trans[k] == \"\" ? \"  \" : trans[k]) + lrc_lines[k + lc + 1].substr(0, 10) + \"\\r\\n\";\n }\n else {\n if (ToMilliSec(lrc_lines[k + lc - 1].substr(lrc_lines[k + lc - 1].length - 9, 8)) < ToMilliSec(lrc_lines[k + lc].substr(1, 8))) {\n if (ToMilliSec(lrc_lines[k + lc].substr(lrc_lines[k + lc].length - 9, 8)) < ToMilliSec(lrc_lines[k + lc + 1].substr(1, 8)))\n lrcBuf2 += lrc_lines[k + lc - 1].slice(-10) + \" \" + lrc_lines[k + lc] + \"\\r\\n\" + lrc_lines[k + lc].slice(-10) + (trans[k] == \"\" ? \"  \" : trans[k]) + lrc_lines[k + lc].slice(-10) + \"\\r\\n\";\n else\n lrcBuf2 += lrc_lines[k + lc - 1].slice(-10) + \" \" + lrc_lines[k + lc] + \"\\r\\n\" + lrc_lines[k + lc + 1].substr(0, 10) + (trans[k] == \"\" ? \"  \" : trans[k]) + lrc_lines[k + lc + 1].substr(0, 10) + \"\\r\\n\";\n }\n else {\n if (ToMilliSec(lrc_lines[k + lc].substr(lrc_lines[k + lc].length - 9, 8)) < ToMilliSec(lrc_lines[k + lc + 1].substr(1, 8)))\n lrcBuf2 += lrc_lines[k + lc] + \"\\r\\n\" + lrc_lines[k + lc].slice(-10) + (trans[k] == \"\" ? \"  \" : trans[k]) + lrc_lines[k + lc].slice(-10) + \"\\r\\n\";\n else\n lrcBuf2 += lrc_lines[k + lc] + \"\\r\\n\" + lrc_lines[k + lc + 1].substr(0, 10) + (trans[k] == \"\" ? \"  \" : trans[k]) + lrc_lines[k + lc + 1].substr(0, 10) + \"\\r\\n\";\n }\n }\n }\n else {\n if (ToMilliSec(lrc_lines[k + lc - 1].substr(lrc_lines[k + lc - 1].length - 9, 8)) < ToMilliSec(lrc_lines[k + lc].substr(1, 8)))\n lrcBuf2 += lrc_lines[k + lc - 1].slice(-10) + \" \" + lrc_lines[k + lc] + \"\\r\\n\" + \"[\" + format_time(_end + 1000) + \"]\" + (trans[k] == \"\" ? \"  \" : trans[k]) + \"[\" + format_time(_end + 1000) + \"]\" + \"\\r\\n\" + \"[\" + format_time(_end + 1001) + \"] \\r\\n\";\n else\n lrcBuf2 += lrc_lines[k + lc] + \"\\r\\n[\" + format_time(_end + 1001) + \"]\" + (trans[k] == \"\" ? \"  \" : trans[k]) + \"[\" + format_time(_end + 1001) + \"]\" + \"\\r\\n\" + \"[\" + format_time(_end + 1001) + \"] \\r\\n\";\n }\n }\n lrcBuf = lrcMeta + \"\\r\\n\" + lrcBuf2;\n }\n else {\n var lrc_lines = lrcBuf.split(\"\\r\\n\");\n for (var k = 0; k < trans.length; k++) {\n if (k != trans.length - 1)\n lrcBuf2 += lrc_lines[k + lc] + \"\\r\\n\" + lrc_lines[k + lc + 1].slice(0, 10) + (trans[k] == \"\" ? \"  \" : trans[k]) + lrc_lines[k + lc + 1].slice(0, 10) + \"\\r\\n\";\n else\n lrcBuf2 += lrc_lines[k + lc] + \"\\r\\n\" + \"[\" + format_time(_end + 1000) + \"]\" + (trans[k] == \"\" ? \"  \" : trans[k]) + \"[\" + format_time(_end + 1000) + \"]\" + \"\\r\\n\" + \"[\" + format_time(_end + 1001) + \"] \\r\\n\";\n }\n lrcBuf = lrcMeta + \"\\r\\n\" + lrcBuf2;\n }\n }\n\n // Process something about single-line mode\n if (!dual_line && !btrans) {\n var lrc_lines = lrcBuf.split(\"\\r\\n\");\n for (var k = lc; k < lrc_lines.length; k++) {\n if (k != lrc_lines.length - 1) {\n if (ToMilliSec(lrc_lines[k + 1].substr(1, 8)) < ToMilliSec(lrc_lines[k].substr(lrc_lines[k].length - 9, 8)))\n lrcBuf2 += lrc_lines[k] + \"\\r\\n\" + lrc_lines[k + 1].substr(0, 10) + \"  \" + lrc_lines[k + 1].substr(0, 10) + \"\\r\\n\";\n else\n lrcBuf2 += lrc_lines[k] + \"\\r\\n\" + lrc_lines[k].slice(-10) + \"  \" + lrc_lines[k].slice(-10) + \"\\r\\n\";\n }\n else\n lrcBuf2 += lrc_lines[k] + \"\\r\\n\" + lrc_lines[k].slice(-10) + \"  \" + lrc_lines[k].slice(-10) + \"\\r\\n\";\n }\n lrcBuf = lrcBuf2;\n }\n\n return lrcBuf;\n}\n\nfunction ToMilliSec(timeString) {\n return parseInt(timeString.slice(0, 2), 10) * 60000 + parseInt(timeString.substr(3, 2), 10) * 1000 + parseInt(timeString.substr(6, 2), 10);\n}\n\nfunction zpad(n) {\n var s = n.toString();\n return (s.length < 2) ? \"0\" + s : s;\n}\n\nfunction format_time(time) {\n var t = Math.abs(time / 1000);\n var h = Math.floor(t / 3600);\n t -= h * 3600;\n var m = Math.floor(t / 60);\n t -= m * 60;\n var s = Math.floor(t);\n var ms = t - s;\n var str = (h ? zpad(h) + \":\" : \"\") + zpad(m) + \":\" + zpad(s) + \".\" + zpad(Math.floor(ms * 100));\n return str;\n}\n\nvar base64DecodeChars = new Array(- 1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1);\n\nfunction base64decode(str) {\n var c1, c2, c3, c4;\n var i, len, out;\n\n len = str.length;\n i = 0;\n out = \"\";\n while (i < len) {\n /* c1 */\n do {\n c1 = base64DecodeChars[str.charCodeAt(i++) & 0xff];\n } while (i < len && c1 == - 1);\n if (c1 == -1) break;\n\n /* c2 */\n do {\n c2 = base64DecodeChars[str.charCodeAt(i++) & 0xff];\n } while (i < len && c2 == - 1);\n if (c2 == -1) break;\n\n out += String.fromCharCode((c1 << 2) | ((c2 & 0x30) >> 4));\n\n /* c3 */\n do {\n c3 = str.charCodeAt(i++) & 0xff;\n if (c3 == 61) return out;\n c3 = base64DecodeChars[c3];\n } while (i < len && c3 == - 1);\n if (c3 == -1) break;\n\n out += String.fromCharCode(((c2 & 0xF) << 4) | ((c3 & 0x3C) >> 2));\n\n /* c4 */\n do {\n c4 = str.charCodeAt(i++) & 0xff;\n if (c4 == 61) return out;\n c4 = base64DecodeChars[c4];\n } while (i < len && c4 == - 1);\n if (c4 == -1) break;\n out += String.fromCharCode(((c3 & 0x03) << 6) | c4);\n }\n return out;\n}\n"} +{"text": "/*******************************************************************************\n * Copyright 2017 Capital One Services, LLC and Bitwise, Inc.\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * http://www.apache.org/licenses/LICENSE-2.0\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *******************************************************************************/\n\n \npackage hydrograph.ui.engine.converter.impl;\n\nimport hydrograph.ui.common.util.Constants;\nimport hydrograph.ui.datastructure.property.FixedWidthGridRow;\nimport hydrograph.ui.datastructure.property.GridRow;\nimport hydrograph.ui.engine.constants.PropertyNameConstants;\nimport hydrograph.ui.engine.converter.InputConverter;\nimport hydrograph.ui.engine.helper.ConverterHelper;\nimport hydrograph.ui.graph.model.Component;\nimport hydrograph.ui.graph.model.Link;\nimport hydrograph.ui.logging.factory.LogFactory;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport org.slf4j.Logger;\n\nimport hydrograph.engine.jaxb.commontypes.TypeBaseField;\nimport hydrograph.engine.jaxb.commontypes.TypeInputOutSocket;\nimport hydrograph.engine.jaxb.inputtypes.TextFileFixedWidth;\nimport hydrograph.engine.jaxb.itffw.TypeInputFixedwidthOutSocket;\n\npublic class InputFileFixedWidthConverter extends InputConverter {\n\n\tprivate static final Logger logger = LogFactory.INSTANCE.getLogger(InputFileFixedWidthConverter.class);\n\n\tpublic InputFileFixedWidthConverter(Component component) {\n\t\tsuper(component);\n\t\tthis.baseComponent = new TextFileFixedWidth();\n\t\tthis.component = component;\n\t\tthis.properties = component.getProperties();\n\t}\n\n\t@Override\n\tpublic void prepareForXML() {\n\t\tlogger.debug(\"prepareForXML - Generating XML data for \" + component);\n\t\tsuper.prepareForXML();\n\t\tTextFileFixedWidth fileFixedWidth = (TextFileFixedWidth) baseComponent;\n\t\tTextFileFixedWidth.Path path = new TextFileFixedWidth.Path();\n\t\tpath.setUri((String) properties.get(PropertyNameConstants.PATH.value()));\n\t\tTextFileFixedWidth.Charset charset = new TextFileFixedWidth.Charset();\n\t\tcharset.setValue(getCharset());\n\n\t\tfileFixedWidth.setPath(path);\n\t\tfileFixedWidth.setStrict(getBoolean(PropertyNameConstants.STRICT.value()));\n\t\tfileFixedWidth.setSafe(getBoolean(PropertyNameConstants.IS_SAFE.value()));\n\t\tfileFixedWidth.setCharset(charset);\n\t\tfileFixedWidth.setRuntimeProperties(getRuntimeProperties());\n\t}\n\n\t@Override\n\tprotected List getInOutSocket() {\n\t\tlogger.debug(\"getInOutSocket - Generating TypeInputOutSocket data for \" + component);\n\t\tList outSockets = new ArrayList<>();\n\t\tfor (Link link : component.getSourceConnections()) {\n\t\t\tTypeInputFixedwidthOutSocket outSocket = new TypeInputFixedwidthOutSocket();\n\t\t\toutSocket.setId(link.getSourceTerminal());\n\t\t\toutSocket.setType(link.getSource().getPort(link.getSourceTerminal()).getPortType());\n\t\t\toutSocket.setSchema(getSchema());\n\t\t\toutSocket.getOtherAttributes();\n\t\t\toutSockets.add(outSocket);\n\t\t}\n\t\treturn outSockets;\n\t}\n\n\t@Override\n\tprotected List getFieldOrRecord(List gridList) {\n\t\tlogger.debug(\"Generating data for {} for property {}\", new Object[] { properties.get(Constants.PARAM_NAME),\n\t\t\t\tPropertyNameConstants.SCHEMA.value() });\n\n\t\tList typeBaseFields = new ArrayList<>();\n\n\t\tif (gridList != null && gridList.size() != 0) {\n\t\t\tfor (GridRow object : gridList)\n\t\t\t\ttypeBaseFields.add(converterHelper.getFixedWidthTargetData((FixedWidthGridRow) object));\n\t\t}\n\t\treturn typeBaseFields;\n\t}\n\n}\n"} +{"text": "/*\n* Copyright (c) 2016, Intel Corporation.\n*\n* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n*\n* This code is free software; you can redistribute it and/or modify it\n* under the terms of the GNU General Public License version 2 only, as\n* published by the Free Software Foundation.\n*\n* This code is distributed in the hope that it will be useful, but WITHOUT\n* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n* version 2 for more details (a copy is included in the LICENSE file that\n* accompanied this code).\n*\n* You should have received a copy of the GNU General Public License version\n* 2 along with this work; if not, write to the Free Software Foundation,\n* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n*\n* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n* or visit www.oracle.com if you need additional information or have any\n* questions.\n*\n*/\n\n#include \"precompiled.hpp\"\n#include \"asm/assembler.hpp\"\n#include \"asm/assembler.inline.hpp\"\n#include \"runtime/stubRoutines.hpp\"\n#include \"macroAssembler_x86.hpp\"\n\n// ofs and limit are used for multi-block byte array.\n// int com.sun.security.provider.DigestBase.implCompressMultiBlock(byte[] b, int ofs, int limit)\nvoid MacroAssembler::fast_sha1(XMMRegister abcd, XMMRegister e0, XMMRegister e1, XMMRegister msg0,\n XMMRegister msg1, XMMRegister msg2, XMMRegister msg3, XMMRegister shuf_mask,\n Register buf, Register state, Register ofs, Register limit, Register rsp, bool multi_block) {\n\n Label start, done_hash, loop0;\n\n address upper_word_mask = StubRoutines::x86::upper_word_mask_addr();\n address shuffle_byte_flip_mask = StubRoutines::x86::shuffle_byte_flip_mask_addr();\n\n bind(start);\n movdqu(abcd, Address(state, 0));\n pinsrd(e0, Address(state, 16), 3);\n movdqu(shuf_mask, ExternalAddress(upper_word_mask)); // 0xFFFFFFFF000000000000000000000000\n pand(e0, shuf_mask);\n pshufd(abcd, abcd, 0x1B);\n movdqu(shuf_mask, ExternalAddress(shuffle_byte_flip_mask)); //0x000102030405060708090a0b0c0d0e0f\n\n bind(loop0);\n // Save hash values for addition after rounds\n movdqu(Address(rsp, 0), e0);\n movdqu(Address(rsp, 16), abcd);\n\n\n // Rounds 0 - 3\n movdqu(msg0, Address(buf, 0));\n pshufb(msg0, shuf_mask);\n paddd(e0, msg0);\n movdqa(e1, abcd);\n sha1rnds4(abcd, e0, 0);\n\n // Rounds 4 - 7\n movdqu(msg1, Address(buf, 16));\n pshufb(msg1, shuf_mask);\n sha1nexte(e1, msg1);\n movdqa(e0, abcd);\n sha1rnds4(abcd, e1, 0);\n sha1msg1(msg0, msg1);\n\n // Rounds 8 - 11\n movdqu(msg2, Address(buf, 32));\n pshufb(msg2, shuf_mask);\n sha1nexte(e0, msg2);\n movdqa(e1, abcd);\n sha1rnds4(abcd, e0, 0);\n sha1msg1(msg1, msg2);\n pxor(msg0, msg2);\n\n // Rounds 12 - 15\n movdqu(msg3, Address(buf, 48));\n pshufb(msg3, shuf_mask);\n sha1nexte(e1, msg3);\n movdqa(e0, abcd);\n sha1msg2(msg0, msg3);\n sha1rnds4(abcd, e1, 0);\n sha1msg1(msg2, msg3);\n pxor(msg1, msg3);\n\n // Rounds 16 - 19\n sha1nexte(e0, msg0);\n movdqa(e1, abcd);\n sha1msg2(msg1, msg0);\n sha1rnds4(abcd, e0, 0);\n sha1msg1(msg3, msg0);\n pxor(msg2, msg0);\n\n // Rounds 20 - 23\n sha1nexte(e1, msg1);\n movdqa(e0, abcd);\n sha1msg2(msg2, msg1);\n sha1rnds4(abcd, e1, 1);\n sha1msg1(msg0, msg1);\n pxor(msg3, msg1);\n\n // Rounds 24 - 27\n sha1nexte(e0, msg2);\n movdqa(e1, abcd);\n sha1msg2(msg3, msg2);\n sha1rnds4(abcd, e0, 1);\n sha1msg1(msg1, msg2);\n pxor(msg0, msg2);\n\n // Rounds 28 - 31\n sha1nexte(e1, msg3);\n movdqa(e0, abcd);\n sha1msg2(msg0, msg3);\n sha1rnds4(abcd, e1, 1);\n sha1msg1(msg2, msg3);\n pxor(msg1, msg3);\n\n // Rounds 32 - 35\n sha1nexte(e0, msg0);\n movdqa(e1, abcd);\n sha1msg2(msg1, msg0);\n sha1rnds4(abcd, e0, 1);\n sha1msg1(msg3, msg0);\n pxor(msg2, msg0);\n\n // Rounds 36 - 39\n sha1nexte(e1, msg1);\n movdqa(e0, abcd);\n sha1msg2(msg2, msg1);\n sha1rnds4(abcd, e1, 1);\n sha1msg1(msg0, msg1);\n pxor(msg3, msg1);\n\n // Rounds 40 - 43\n sha1nexte(e0, msg2);\n movdqa(e1, abcd);\n sha1msg2(msg3, msg2);\n sha1rnds4(abcd, e0, 2);\n sha1msg1(msg1, msg2);\n pxor(msg0, msg2);\n\n // Rounds 44 - 47\n sha1nexte(e1, msg3);\n movdqa(e0, abcd);\n sha1msg2(msg0, msg3);\n sha1rnds4(abcd, e1, 2);\n sha1msg1(msg2, msg3);\n pxor(msg1, msg3);\n\n // Rounds 48 - 51\n sha1nexte(e0, msg0);\n movdqa(e1, abcd);\n sha1msg2(msg1, msg0);\n sha1rnds4(abcd, e0, 2);\n sha1msg1(msg3, msg0);\n pxor(msg2, msg0);\n\n // Rounds 52 - 55\n sha1nexte(e1, msg1);\n movdqa(e0, abcd);\n sha1msg2(msg2, msg1);\n sha1rnds4(abcd, e1, 2);\n sha1msg1(msg0, msg1);\n pxor(msg3, msg1);\n\n // Rounds 56 - 59\n sha1nexte(e0, msg2);\n movdqa(e1, abcd);\n sha1msg2(msg3, msg2);\n sha1rnds4(abcd, e0, 2);\n sha1msg1(msg1, msg2);\n pxor(msg0, msg2);\n\n // Rounds 60 - 63\n sha1nexte(e1, msg3);\n movdqa(e0, abcd);\n sha1msg2(msg0, msg3);\n sha1rnds4(abcd, e1, 3);\n sha1msg1(msg2, msg3);\n pxor(msg1, msg3);\n\n // Rounds 64 - 67\n sha1nexte(e0, msg0);\n movdqa(e1, abcd);\n sha1msg2(msg1, msg0);\n sha1rnds4(abcd, e0, 3);\n sha1msg1(msg3, msg0);\n pxor(msg2, msg0);\n\n // Rounds 68 - 71\n sha1nexte(e1, msg1);\n movdqa(e0, abcd);\n sha1msg2(msg2, msg1);\n sha1rnds4(abcd, e1, 3);\n pxor(msg3, msg1);\n\n // Rounds 72 - 75\n sha1nexte(e0, msg2);\n movdqa(e1, abcd);\n sha1msg2(msg3, msg2);\n sha1rnds4(abcd, e0, 3);\n\n // Rounds 76 - 79\n sha1nexte(e1, msg3);\n movdqa(e0, abcd);\n sha1rnds4(abcd, e1, 3);\n\n // add current hash values with previously saved\n movdqu(msg0, Address(rsp, 0));\n sha1nexte(e0, msg0);\n movdqu(msg0, Address(rsp, 16));\n paddd(abcd, msg0);\n\n if (multi_block) {\n // increment data pointer and loop if more to process\n addptr(buf, 64);\n addptr(ofs, 64);\n cmpptr(ofs, limit);\n jcc(Assembler::belowEqual, loop0);\n movptr(rax, ofs); //return ofs\n }\n // write hash values back in the correct order\n pshufd(abcd, abcd, 0x1b);\n movdqu(Address(state, 0), abcd);\n pextrd(Address(state, 16), e0, 3);\n\n bind(done_hash);\n\n}\n\n// xmm0 (msg) is used as an implicit argument to sh256rnds2\n// and state0 and state1 can never use xmm0 register.\n// ofs and limit are used for multi-block byte array.\n// int com.sun.security.provider.DigestBase.implCompressMultiBlock(byte[] b, int ofs, int limit)\n#ifdef _LP64\nvoid MacroAssembler::fast_sha256(XMMRegister msg, XMMRegister state0, XMMRegister state1, XMMRegister msgtmp0,\n XMMRegister msgtmp1, XMMRegister msgtmp2, XMMRegister msgtmp3, XMMRegister msgtmp4,\n Register buf, Register state, Register ofs, Register limit, Register rsp,\n bool multi_block, XMMRegister shuf_mask) {\n#else\nvoid MacroAssembler::fast_sha256(XMMRegister msg, XMMRegister state0, XMMRegister state1, XMMRegister msgtmp0,\n XMMRegister msgtmp1, XMMRegister msgtmp2, XMMRegister msgtmp3, XMMRegister msgtmp4,\n Register buf, Register state, Register ofs, Register limit, Register rsp,\n bool multi_block) {\n#endif\n Label start, done_hash, loop0;\n\n address K256 = StubRoutines::x86::k256_addr();\n address pshuffle_byte_flip_mask = StubRoutines::x86::pshuffle_byte_flip_mask_addr();\n\n bind(start);\n movdqu(state0, Address(state, 0));\n movdqu(state1, Address(state, 16));\n\n pshufd(state0, state0, 0xB1);\n pshufd(state1, state1, 0x1B);\n movdqa(msgtmp4, state0);\n palignr(state0, state1, 8);\n pblendw(state1, msgtmp4, 0xF0);\n\n#ifdef _LP64\n movdqu(shuf_mask, ExternalAddress(pshuffle_byte_flip_mask));\n#endif\n lea(rax, ExternalAddress(K256));\n\n bind(loop0);\n movdqu(Address(rsp, 0), state0);\n movdqu(Address(rsp, 16), state1);\n\n // Rounds 0-3\n movdqu(msg, Address(buf, 0));\n#ifdef _LP64\n pshufb(msg, shuf_mask);\n#else\n pshufb(msg, ExternalAddress(pshuffle_byte_flip_mask));\n#endif\n movdqa(msgtmp0, msg);\n paddd(msg, Address(rax, 0));\n sha256rnds2(state1, state0);\n pshufd(msg, msg, 0x0E);\n sha256rnds2(state0, state1);\n\n // Rounds 4-7\n movdqu(msg, Address(buf, 16));\n#ifdef _LP64\n pshufb(msg, shuf_mask);\n#else\n pshufb(msg, ExternalAddress(pshuffle_byte_flip_mask));\n#endif\n movdqa(msgtmp1, msg);\n paddd(msg, Address(rax, 16));\n sha256rnds2(state1, state0);\n pshufd(msg, msg, 0x0E);\n sha256rnds2(state0, state1);\n sha256msg1(msgtmp0, msgtmp1);\n\n // Rounds 8-11\n movdqu(msg, Address(buf, 32));\n#ifdef _LP64\n pshufb(msg, shuf_mask);\n#else\n pshufb(msg, ExternalAddress(pshuffle_byte_flip_mask));\n#endif\n movdqa(msgtmp2, msg);\n paddd(msg, Address(rax, 32));\n sha256rnds2(state1, state0);\n pshufd(msg, msg, 0x0E);\n sha256rnds2(state0, state1);\n sha256msg1(msgtmp1, msgtmp2);\n\n // Rounds 12-15\n movdqu(msg, Address(buf, 48));\n#ifdef _LP64\n pshufb(msg, shuf_mask);\n#else\n pshufb(msg, ExternalAddress(pshuffle_byte_flip_mask));\n#endif\n movdqa(msgtmp3, msg);\n paddd(msg, Address(rax, 48));\n sha256rnds2(state1, state0);\n movdqa(msgtmp4, msgtmp3);\n palignr(msgtmp4, msgtmp2, 4);\n paddd(msgtmp0, msgtmp4);\n sha256msg2(msgtmp0, msgtmp3);\n pshufd(msg, msg, 0x0E);\n sha256rnds2(state0, state1);\n sha256msg1(msgtmp2, msgtmp3);\n\n // Rounds 16-19\n movdqa(msg, msgtmp0);\n paddd(msg, Address(rax, 64));\n sha256rnds2(state1, state0);\n movdqa(msgtmp4, msgtmp0);\n palignr(msgtmp4, msgtmp3, 4);\n paddd(msgtmp1, msgtmp4);\n sha256msg2(msgtmp1, msgtmp0);\n pshufd(msg, msg, 0x0E);\n sha256rnds2(state0, state1);\n sha256msg1(msgtmp3, msgtmp0);\n\n // Rounds 20-23\n movdqa(msg, msgtmp1);\n paddd(msg, Address(rax, 80));\n sha256rnds2(state1, state0);\n movdqa(msgtmp4, msgtmp1);\n palignr(msgtmp4, msgtmp0, 4);\n paddd(msgtmp2, msgtmp4);\n sha256msg2(msgtmp2, msgtmp1);\n pshufd(msg, msg, 0x0E);\n sha256rnds2(state0, state1);\n sha256msg1(msgtmp0, msgtmp1);\n\n // Rounds 24-27\n movdqa(msg, msgtmp2);\n paddd(msg, Address(rax, 96));\n sha256rnds2(state1, state0);\n movdqa(msgtmp4, msgtmp2);\n palignr(msgtmp4, msgtmp1, 4);\n paddd(msgtmp3, msgtmp4);\n sha256msg2(msgtmp3, msgtmp2);\n pshufd(msg, msg, 0x0E);\n sha256rnds2(state0, state1);\n sha256msg1(msgtmp1, msgtmp2);\n\n // Rounds 28-31\n movdqa(msg, msgtmp3);\n paddd(msg, Address(rax, 112));\n sha256rnds2(state1, state0);\n movdqa(msgtmp4, msgtmp3);\n palignr(msgtmp4, msgtmp2, 4);\n paddd(msgtmp0, msgtmp4);\n sha256msg2(msgtmp0, msgtmp3);\n pshufd(msg, msg, 0x0E);\n sha256rnds2(state0, state1);\n sha256msg1(msgtmp2, msgtmp3);\n\n // Rounds 32-35\n movdqa(msg, msgtmp0);\n paddd(msg, Address(rax, 128));\n sha256rnds2(state1, state0);\n movdqa(msgtmp4, msgtmp0);\n palignr(msgtmp4, msgtmp3, 4);\n paddd(msgtmp1, msgtmp4);\n sha256msg2(msgtmp1, msgtmp0);\n pshufd(msg, msg, 0x0E);\n sha256rnds2(state0, state1);\n sha256msg1(msgtmp3, msgtmp0);\n\n // Rounds 36-39\n movdqa(msg, msgtmp1);\n paddd(msg, Address(rax, 144));\n sha256rnds2(state1, state0);\n movdqa(msgtmp4, msgtmp1);\n palignr(msgtmp4, msgtmp0, 4);\n paddd(msgtmp2, msgtmp4);\n sha256msg2(msgtmp2, msgtmp1);\n pshufd(msg, msg, 0x0E);\n sha256rnds2(state0, state1);\n sha256msg1(msgtmp0, msgtmp1);\n\n // Rounds 40-43\n movdqa(msg, msgtmp2);\n paddd(msg, Address(rax, 160));\n sha256rnds2(state1, state0);\n movdqa(msgtmp4, msgtmp2);\n palignr(msgtmp4, msgtmp1, 4);\n paddd(msgtmp3, msgtmp4);\n sha256msg2(msgtmp3, msgtmp2);\n pshufd(msg, msg, 0x0E);\n sha256rnds2(state0, state1);\n sha256msg1(msgtmp1, msgtmp2);\n\n // Rounds 44-47\n movdqa(msg, msgtmp3);\n paddd(msg, Address(rax, 176));\n sha256rnds2(state1, state0);\n movdqa(msgtmp4, msgtmp3);\n palignr(msgtmp4, msgtmp2, 4);\n paddd(msgtmp0, msgtmp4);\n sha256msg2(msgtmp0, msgtmp3);\n pshufd(msg, msg, 0x0E);\n sha256rnds2(state0, state1);\n sha256msg1(msgtmp2, msgtmp3);\n\n // Rounds 48-51\n movdqa(msg, msgtmp0);\n paddd(msg, Address(rax, 192));\n sha256rnds2(state1, state0);\n movdqa(msgtmp4, msgtmp0);\n palignr(msgtmp4, msgtmp3, 4);\n paddd(msgtmp1, msgtmp4);\n sha256msg2(msgtmp1, msgtmp0);\n pshufd(msg, msg, 0x0E);\n sha256rnds2(state0, state1);\n sha256msg1(msgtmp3, msgtmp0);\n\n // Rounds 52-55\n movdqa(msg, msgtmp1);\n paddd(msg, Address(rax, 208));\n sha256rnds2(state1, state0);\n movdqa(msgtmp4, msgtmp1);\n palignr(msgtmp4, msgtmp0, 4);\n paddd(msgtmp2, msgtmp4);\n sha256msg2(msgtmp2, msgtmp1);\n pshufd(msg, msg, 0x0E);\n sha256rnds2(state0, state1);\n\n // Rounds 56-59\n movdqa(msg, msgtmp2);\n paddd(msg, Address(rax, 224));\n sha256rnds2(state1, state0);\n movdqa(msgtmp4, msgtmp2);\n palignr(msgtmp4, msgtmp1, 4);\n paddd(msgtmp3, msgtmp4);\n sha256msg2(msgtmp3, msgtmp2);\n pshufd(msg, msg, 0x0E);\n sha256rnds2(state0, state1);\n\n // Rounds 60-63\n movdqa(msg, msgtmp3);\n paddd(msg, Address(rax, 240));\n sha256rnds2(state1, state0);\n pshufd(msg, msg, 0x0E);\n sha256rnds2(state0, state1);\n movdqu(msg, Address(rsp, 0));\n paddd(state0, msg);\n movdqu(msg, Address(rsp, 16));\n paddd(state1, msg);\n\n if (multi_block) {\n // increment data pointer and loop if more to process\n addptr(buf, 64);\n addptr(ofs, 64);\n cmpptr(ofs, limit);\n jcc(Assembler::belowEqual, loop0);\n movptr(rax, ofs); //return ofs\n }\n\n pshufd(state0, state0, 0x1B);\n pshufd(state1, state1, 0xB1);\n movdqa(msgtmp4, state0);\n pblendw(state0, state1, 0xF0);\n palignr(state1, msgtmp4, 8);\n\n movdqu(Address(state, 0), state0);\n movdqu(Address(state, 16), state1);\n\n bind(done_hash);\n\n}\n\n#ifdef _LP64\n/*\n The algorithm below is based on Intel publication:\n \"Fast SHA-256 Implementations on Intelë Architecture Processors\" by Jim Guilford, Kirk Yap and Vinodh Gopal.\n The assembly code was originally provided by Sean Gulley and in many places preserves\n the original assembly NAMES and comments to simplify matching Java assembly with its original.\n The Java version was substantially redesigned to replace 1200 assembly instruction with\n much shorter run-time generator of the same code in memory.\n*/\n\nvoid MacroAssembler::sha256_AVX2_one_round_compute(\n Register reg_old_h,\n Register reg_a,\n Register reg_b,\n Register reg_c,\n Register reg_d,\n Register reg_e,\n Register reg_f,\n Register reg_g,\n Register reg_h,\n int iter) {\n const Register& reg_y0 = r13;\n const Register& reg_y1 = r14;\n const Register& reg_y2 = r15;\n const Register& reg_y3 = rcx;\n const Register& reg_T1 = r12;\n //;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; RND iter ;;;;;;;;;;;;;;;;;;;;;;;;;;;\n if (iter%4 > 0) {\n addl(reg_old_h, reg_y2); // reg_h = k + w + reg_h + S0 + S1 + CH = t1 + S0; --\n }\n movl(reg_y2, reg_f); // reg_y2 = reg_f ; CH\n rorxd(reg_y0, reg_e, 25); // reg_y0 = reg_e >> 25 ; S1A\n rorxd(reg_y1, reg_e, 11); // reg_y1 = reg_e >> 11 ; S1B\n xorl(reg_y2, reg_g); // reg_y2 = reg_f^reg_g ; CH\n\n xorl(reg_y0, reg_y1); // reg_y0 = (reg_e>>25) ^ (reg_h>>11) ; S1\n rorxd(reg_y1, reg_e, 6); // reg_y1 = (reg_e >> 6) ; S1\n andl(reg_y2, reg_e); // reg_y2 = (reg_f^reg_g)®_e ; CH\n\n if (iter%4 > 0) {\n addl(reg_old_h, reg_y3); // reg_h = t1 + S0 + MAJ ; --\n }\n\n xorl(reg_y0, reg_y1); // reg_y0 = (reg_e>>25) ^ (reg_e>>11) ^ (reg_e>>6) ; S1\n rorxd(reg_T1, reg_a, 13); // reg_T1 = reg_a >> 13 ; S0B\n xorl(reg_y2, reg_g); // reg_y2 = CH = ((reg_f^reg_g)®_e)^reg_g ; CH\n rorxd(reg_y1, reg_a, 22); // reg_y1 = reg_a >> 22 ; S0A\n movl(reg_y3, reg_a); // reg_y3 = reg_a ; MAJA\n\n xorl(reg_y1, reg_T1); // reg_y1 = (reg_a>>22) ^ (reg_a>>13) ; S0\n rorxd(reg_T1, reg_a, 2); // reg_T1 = (reg_a >> 2) ; S0\n addl(reg_h, Address(rsp, rdx, Address::times_1, 4*iter)); // reg_h = k + w + reg_h ; --\n orl(reg_y3, reg_c); // reg_y3 = reg_a|reg_c ; MAJA\n\n xorl(reg_y1, reg_T1); // reg_y1 = (reg_a>>22) ^ (reg_a>>13) ^ (reg_a>>2) ; S0\n movl(reg_T1, reg_a); // reg_T1 = reg_a ; MAJB\n andl(reg_y3, reg_b); // reg_y3 = (reg_a|reg_c)®_b ; MAJA\n andl(reg_T1, reg_c); // reg_T1 = reg_a®_c ; MAJB\n addl(reg_y2, reg_y0); // reg_y2 = S1 + CH ; --\n\n\n addl(reg_d, reg_h); // reg_d = k + w + reg_h + reg_d ; --\n orl(reg_y3, reg_T1); // reg_y3 = MAJ = (reg_a|reg_c)®_b)|(reg_a®_c) ; MAJ\n addl(reg_h, reg_y1); // reg_h = k + w + reg_h + S0 ; --\n\n addl(reg_d, reg_y2); // reg_d = k + w + reg_h + reg_d + S1 + CH = reg_d + t1 ; --\n\n\n if (iter%4 == 3) {\n addl(reg_h, reg_y2); // reg_h = k + w + reg_h + S0 + S1 + CH = t1 + S0; --\n addl(reg_h, reg_y3); // reg_h = t1 + S0 + MAJ ; --\n }\n}\n\nvoid MacroAssembler::sha256_AVX2_four_rounds_compute_first(int start) {\n sha256_AVX2_one_round_compute(rax, rax, rbx, rdi, rsi, r8, r9, r10, r11, start + 0);\n sha256_AVX2_one_round_compute(r11, r11, rax, rbx, rdi, rsi, r8, r9, r10, start + 1);\n sha256_AVX2_one_round_compute(r10, r10, r11, rax, rbx, rdi, rsi, r8, r9, start + 2);\n sha256_AVX2_one_round_compute(r9, r9, r10, r11, rax, rbx, rdi, rsi, r8, start + 3);\n}\n\nvoid MacroAssembler::sha256_AVX2_four_rounds_compute_last(int start) {\n sha256_AVX2_one_round_compute(r8, r8, r9, r10, r11, rax, rbx, rdi, rsi, start + 0);\n sha256_AVX2_one_round_compute(rsi, rsi, r8, r9, r10, r11, rax, rbx, rdi, start + 1);\n sha256_AVX2_one_round_compute(rdi, rdi, rsi, r8, r9, r10, r11, rax, rbx, start + 2);\n sha256_AVX2_one_round_compute(rbx, rbx, rdi, rsi, r8, r9, r10, r11, rax, start + 3);\n}\n\nvoid MacroAssembler::sha256_AVX2_one_round_and_sched(\n XMMRegister xmm_0, /* == ymm4 on 0, 1, 2, 3 iterations, then rotate 4 registers left on 4, 8, 12 iterations */\n XMMRegister xmm_1, /* ymm5 */ /* full cycle is 16 iterations */\n XMMRegister xmm_2, /* ymm6 */\n XMMRegister xmm_3, /* ymm7 */\n Register reg_a, /* == rax on 0 iteration, then rotate 8 register right on each next iteration */\n Register reg_b, /* rbx */ /* full cycle is 8 iterations */\n Register reg_c, /* rdi */\n Register reg_d, /* rsi */\n Register reg_e, /* r8 */\n Register reg_f, /* r9d */\n Register reg_g, /* r10d */\n Register reg_h, /* r11d */\n int iter)\n{\n movl(rcx, reg_a); // rcx = reg_a ; MAJA\n rorxd(r13, reg_e, 25); // r13 = reg_e >> 25 ; S1A\n rorxd(r14, reg_e, 11); // r14 = reg_e >> 11 ; S1B\n addl(reg_h, Address(rsp, rdx, Address::times_1, 4*iter));\n orl(rcx, reg_c); // rcx = reg_a|reg_c ; MAJA\n\n movl(r15, reg_f); // r15 = reg_f ; CH\n rorxd(r12, reg_a, 13); // r12 = reg_a >> 13 ; S0B\n xorl(r13, r14); // r13 = (reg_e>>25) ^ (reg_e>>11) ; S1\n xorl(r15, reg_g); // r15 = reg_f^reg_g ; CH\n\n rorxd(r14, reg_e, 6); // r14 = (reg_e >> 6) ; S1\n andl(r15, reg_e); // r15 = (reg_f^reg_g)®_e ; CH\n\n xorl(r13, r14); // r13 = (reg_e>>25) ^ (reg_e>>11) ^ (reg_e>>6) ; S1\n rorxd(r14, reg_a, 22); // r14 = reg_a >> 22 ; S0A\n addl(reg_d, reg_h); // reg_d = k + w + reg_h + reg_d ; --\n\n andl(rcx, reg_b); // rcx = (reg_a|reg_c)®_b ; MAJA\n xorl(r14, r12); // r14 = (reg_a>>22) ^ (reg_a>>13) ; S0\n\n rorxd(r12, reg_a, 2); // r12 = (reg_a >> 2) ; S0\n xorl(r15, reg_g); // r15 = CH = ((reg_f^reg_g)®_e)^reg_g ; CH\n\n xorl(r14, r12); // r14 = (reg_a>>22) ^ (reg_a>>13) ^ (reg_a>>2) ; S0\n movl(r12, reg_a); // r12 = reg_a ; MAJB\n andl(r12, reg_c); // r12 = reg_a®_c ; MAJB\n addl(r15, r13); // r15 = S1 + CH ; --\n\n orl(rcx, r12); // rcx = MAJ = (reg_a|reg_c)®_b)|(reg_a®_c) ; MAJ\n addl(reg_h, r14); // reg_h = k + w + reg_h + S0 ; --\n addl(reg_d, r15); // reg_d = k + w + reg_h + reg_d + S1 + CH = reg_d + t1 ; --\n\n addl(reg_h, r15); // reg_h = k + w + reg_h + S0 + S1 + CH = t1 + S0; --\n addl(reg_h, rcx); // reg_h = t1 + S0 + MAJ ; --\n\n if (iter%4 == 0) {\n vpalignr(xmm0, xmm_3, xmm_2, 4, AVX_256bit); // ymm0 = W[-7]\n vpaddd(xmm0, xmm0, xmm_0, AVX_256bit); // ymm0 = W[-7] + W[-16]; y1 = (e >> 6) ; S1\n vpalignr(xmm1, xmm_1, xmm_0, 4, AVX_256bit); // ymm1 = W[-15]\n vpsrld(xmm2, xmm1, 7, AVX_256bit);\n vpslld(xmm3, xmm1, 32-7, AVX_256bit);\n vpor(xmm3, xmm3, xmm2, AVX_256bit); // ymm3 = W[-15] ror 7\n vpsrld(xmm2, xmm1,18, AVX_256bit);\n } else if (iter%4 == 1 ) {\n vpsrld(xmm8, xmm1, 3, AVX_256bit); // ymm8 = W[-15] >> 3\n vpslld(xmm1, xmm1, 32-18, AVX_256bit);\n vpxor(xmm3, xmm3, xmm1, AVX_256bit);\n vpxor(xmm3, xmm3, xmm2, AVX_256bit); // ymm3 = W[-15] ror 7 ^ W[-15] ror 18\n vpxor(xmm1, xmm3, xmm8, AVX_256bit); // ymm1 = s0\n vpshufd(xmm2, xmm_3, 0xFA, AVX_256bit); // 11111010b ; ymm2 = W[-2] {BBAA}\n vpaddd(xmm0, xmm0, xmm1, AVX_256bit); // ymm0 = W[-16] + W[-7] + s0\n vpsrld(xmm8, xmm2, 10, AVX_256bit); // ymm8 = W[-2] >> 10 {BBAA}\n } else if (iter%4 == 2) {\n vpsrlq(xmm3, xmm2, 19, AVX_256bit); // ymm3 = W[-2] ror 19 {xBxA}\n vpsrlq(xmm2, xmm2, 17, AVX_256bit); // ymm2 = W[-2] ror 17 {xBxA}\n vpxor(xmm2, xmm2, xmm3, AVX_256bit);\n vpxor(xmm8, xmm8, xmm2, AVX_256bit); // ymm8 = s1 {xBxA}\n vpshufb(xmm8, xmm8, xmm10, AVX_256bit); // ymm8 = s1 {00BA}\n vpaddd(xmm0, xmm0, xmm8, AVX_256bit); // ymm0 = {..., ..., W[1], W[0]}\n vpshufd(xmm2, xmm0, 0x50, AVX_256bit); // 01010000b ; ymm2 = W[-2] {DDCC}\n } else if (iter%4 == 3) {\n vpsrld(xmm11, xmm2, 10, AVX_256bit); // ymm11 = W[-2] >> 10 {DDCC}\n vpsrlq(xmm3, xmm2, 19, AVX_256bit); // ymm3 = W[-2] ror 19 {xDxC}\n vpsrlq(xmm2, xmm2, 17, AVX_256bit); // ymm2 = W[-2] ror 17 {xDxC}\n vpxor(xmm2, xmm2, xmm3, AVX_256bit);\n vpxor(xmm11, xmm11, xmm2, AVX_256bit); // ymm11 = s1 {xDxC}\n vpshufb(xmm11, xmm11, xmm12, AVX_256bit); // ymm11 = s1 {DC00}\n vpaddd(xmm_0, xmm11, xmm0, AVX_256bit); // xmm_0 = {W[3], W[2], W[1], W[0]}\n }\n}\n\nvoid MacroAssembler::addm(int disp, Register r1, Register r2) {\n addl(r2, Address(r1, disp));\n movl(Address(r1, disp), r2);\n}\n\nvoid MacroAssembler::addmq(int disp, Register r1, Register r2) {\n addq(r2, Address(r1, disp));\n movq(Address(r1, disp), r2);\n}\n\nvoid MacroAssembler::sha256_AVX2(XMMRegister msg, XMMRegister state0, XMMRegister state1, XMMRegister msgtmp0,\n XMMRegister msgtmp1, XMMRegister msgtmp2, XMMRegister msgtmp3, XMMRegister msgtmp4,\n Register buf, Register state, Register ofs, Register limit, Register rsp,\n bool multi_block, XMMRegister shuf_mask) {\n\n Label loop0, loop1, loop2, loop3,\n last_block_enter, do_last_block, only_one_block, done_hash,\n compute_size, compute_size_end,\n compute_size1, compute_size_end1;\n\n address K256_W = StubRoutines::x86::k256_W_addr();\n address pshuffle_byte_flip_mask = StubRoutines::x86::pshuffle_byte_flip_mask_addr();\n address pshuffle_byte_flip_mask_addr = 0;\n\nconst XMMRegister& SHUF_00BA = xmm10; // ymm10: shuffle xBxA -> 00BA\nconst XMMRegister& SHUF_DC00 = xmm12; // ymm12: shuffle xDxC -> DC00\nconst XMMRegister& BYTE_FLIP_MASK = xmm13; // ymm13\n\nconst XMMRegister& X_BYTE_FLIP_MASK = xmm13; //XMM version of BYTE_FLIP_MASK\n\nconst Register& NUM_BLKS = r8; // 3rd arg\nconst Register& CTX = rdx; // 2nd arg\nconst Register& INP = rcx; // 1st arg\n\nconst Register& c = rdi;\nconst Register& d = rsi;\nconst Register& e = r8; // clobbers NUM_BLKS\nconst Register& y3 = rcx; // clobbers INP\n\nconst Register& TBL = rbp;\nconst Register& SRND = CTX; // SRND is same register as CTX\n\nconst Register& a = rax;\nconst Register& b = rbx;\nconst Register& f = r9;\nconst Register& g = r10;\nconst Register& h = r11;\n\nconst Register& T1 = r12;\nconst Register& y0 = r13;\nconst Register& y1 = r14;\nconst Register& y2 = r15;\n\n\nenum {\n _XFER_SIZE = 2*64*4, // 2 blocks, 64 rounds, 4 bytes/round\n _INP_END_SIZE = 8,\n _INP_SIZE = 8,\n _CTX_SIZE = 8,\n _RSP_SIZE = 8,\n\n _XFER = 0,\n _INP_END = _XFER + _XFER_SIZE,\n _INP = _INP_END + _INP_END_SIZE,\n _CTX = _INP + _INP_SIZE,\n _RSP = _CTX + _CTX_SIZE,\n STACK_SIZE = _RSP + _RSP_SIZE\n};\n\n#ifndef _WIN64\n push(rcx); // linux: this is limit, need at the end\n push(rdx); // linux: this is ofs\n#else\n push(r8); // win64: this is ofs\n push(r9); // win64: this is limit, we need them again at the very and\n#endif\n\n\n push(rbx);\n#ifdef _WIN64\n push(rsi);\n push(rdi);\n#endif\n push(rbp);\n push(r12);\n push(r13);\n push(r14);\n push(r15);\n\n movq(rax, rsp);\n subq(rsp, STACK_SIZE);\n andq(rsp, -32);\n movq(Address(rsp, _RSP), rax);\n\n#ifndef _WIN64\n // copy linux params to win64 params, therefore the rest of code will be the same for both\n movq(r9, rcx);\n movq(r8, rdx);\n movq(rdx, rsi);\n movq(rcx, rdi);\n#endif\n\n // setting original assembly ABI\n /** message to encrypt in INP */\n lea(INP, Address(rcx, 0)); // rcx == message (buf) ;; linux: INP = buf = rdi\n /** digest in CTX */\n movq(CTX, rdx); // rdx = digest (state) ;; linux: CTX = state = rsi\n\n /** NUM_BLK is the length of message, need to set it from ofs and limit */\n if (multi_block) {\n\n // Win64: cannot directly update NUM_BLKS, since NUM_BLKS = ofs = r8\n // on entry r8 = ofs\n // on exit r8 = NUM_BLKS\n\n xorq(rax, rax);\n\n bind(compute_size);\n cmpptr(r8, r9); // assume the original ofs <= limit ;; linux: cmp rcx, rdx\n jccb(Assembler::aboveEqual, compute_size_end);\n addq(r8, 64); //;; linux: ofs = rdx\n addq(rax, 64);\n jmpb(compute_size);\n\n bind(compute_size_end);\n movq(NUM_BLKS, rax); // NUM_BLK (r8) ;; linux: NUM_BLK = rdx\n\n cmpq(NUM_BLKS, 0);\n jcc(Assembler::equal, done_hash);\n\n } else {\n xorq(NUM_BLKS, NUM_BLKS);\n addq(NUM_BLKS, 64);\n }//if (!multi_block)\n\n lea(NUM_BLKS, Address(INP, NUM_BLKS, Address::times_1, -64)); // pointer to the last block\n movq(Address(rsp, _INP_END), NUM_BLKS); //\n\n cmpptr(INP, NUM_BLKS); //cmp INP, NUM_BLKS\n jcc(Assembler::equal, only_one_block); //je only_one_block\n\n // load initial digest\n movl(a, Address(CTX, 4*0));\n movl(b, Address(CTX, 4*1));\n movl(c, Address(CTX, 4*2));\n movl(d, Address(CTX, 4*3));\n movl(e, Address(CTX, 4*4));\n movl(f, Address(CTX, 4*5));\n // load g - r10 after it is used as scratch\n movl(h, Address(CTX, 4*7));\n\n pshuffle_byte_flip_mask_addr = pshuffle_byte_flip_mask;\n vmovdqu(BYTE_FLIP_MASK, ExternalAddress(pshuffle_byte_flip_mask_addr +0)); //[PSHUFFLE_BYTE_FLIP_MASK wrt rip]\n vmovdqu(SHUF_00BA, ExternalAddress(pshuffle_byte_flip_mask_addr + 32)); //[_SHUF_00BA wrt rip]\n vmovdqu(SHUF_DC00, ExternalAddress(pshuffle_byte_flip_mask_addr + 64)); //[_SHUF_DC00 wrt rip]\n\n movl(g, Address(CTX, 4*6));\n\n movq(Address(rsp, _CTX), CTX); // store\n\nbind(loop0);\n lea(TBL, ExternalAddress(K256_W));\n\n // assume buffers not aligned\n\n // Load first 16 dwords from two blocks\n vmovdqu(xmm0, Address(INP, 0*32));\n vmovdqu(xmm1, Address(INP, 1*32));\n vmovdqu(xmm2, Address(INP, 2*32));\n vmovdqu(xmm3, Address(INP, 3*32));\n\n // byte swap data\n vpshufb(xmm0, xmm0, BYTE_FLIP_MASK, AVX_256bit);\n vpshufb(xmm1, xmm1, BYTE_FLIP_MASK, AVX_256bit);\n vpshufb(xmm2, xmm2, BYTE_FLIP_MASK, AVX_256bit);\n vpshufb(xmm3, xmm3, BYTE_FLIP_MASK, AVX_256bit);\n\n // transpose data into high/low halves\n vperm2i128(xmm4, xmm0, xmm2, 0x20);\n vperm2i128(xmm5, xmm0, xmm2, 0x31);\n vperm2i128(xmm6, xmm1, xmm3, 0x20);\n vperm2i128(xmm7, xmm1, xmm3, 0x31);\n\nbind(last_block_enter);\n addq(INP, 64);\n movq(Address(rsp, _INP), INP);\n\n //;; schedule 48 input dwords, by doing 3 rounds of 12 each\n xorq(SRND, SRND);\n\nalign(16);\nbind(loop1);\n vpaddd(xmm9, xmm4, Address(TBL, SRND, Address::times_1, 0*32), AVX_256bit);\n vmovdqu(Address(rsp, SRND, Address::times_1, _XFER + 0*32), xmm9);\n sha256_AVX2_one_round_and_sched(xmm4, xmm5, xmm6, xmm7, rax, rbx, rdi, rsi, r8, r9, r10, r11, 0);\n sha256_AVX2_one_round_and_sched(xmm4, xmm5, xmm6, xmm7, r11, rax, rbx, rdi, rsi, r8, r9, r10, 1);\n sha256_AVX2_one_round_and_sched(xmm4, xmm5, xmm6, xmm7, r10, r11, rax, rbx, rdi, rsi, r8, r9, 2);\n sha256_AVX2_one_round_and_sched(xmm4, xmm5, xmm6, xmm7, r9, r10, r11, rax, rbx, rdi, rsi, r8, 3);\n\n vpaddd(xmm9, xmm5, Address(TBL, SRND, Address::times_1, 1*32), AVX_256bit);\n vmovdqu(Address(rsp, SRND, Address::times_1, _XFER + 1*32), xmm9);\n sha256_AVX2_one_round_and_sched(xmm5, xmm6, xmm7, xmm4, r8, r9, r10, r11, rax, rbx, rdi, rsi, 8+0);\n sha256_AVX2_one_round_and_sched(xmm5, xmm6, xmm7, xmm4, rsi, r8, r9, r10, r11, rax, rbx, rdi, 8+1);\n sha256_AVX2_one_round_and_sched(xmm5, xmm6, xmm7, xmm4, rdi, rsi, r8, r9, r10, r11, rax, rbx, 8+2);\n sha256_AVX2_one_round_and_sched(xmm5, xmm6, xmm7, xmm4, rbx, rdi, rsi, r8, r9, r10, r11, rax, 8+3);\n\n vpaddd(xmm9, xmm6, Address(TBL, SRND, Address::times_1, 2*32), AVX_256bit);\n vmovdqu(Address(rsp, SRND, Address::times_1, _XFER + 2*32), xmm9);\n sha256_AVX2_one_round_and_sched(xmm6, xmm7, xmm4, xmm5, rax, rbx, rdi, rsi, r8, r9, r10, r11, 16+0);\n sha256_AVX2_one_round_and_sched(xmm6, xmm7, xmm4, xmm5, r11, rax, rbx, rdi, rsi, r8, r9, r10, 16+1);\n sha256_AVX2_one_round_and_sched(xmm6, xmm7, xmm4, xmm5, r10, r11, rax, rbx, rdi, rsi, r8, r9, 16+2);\n sha256_AVX2_one_round_and_sched(xmm6, xmm7, xmm4, xmm5, r9, r10, r11, rax, rbx, rdi, rsi, r8, 16+3);\n\n vpaddd(xmm9, xmm7, Address(TBL, SRND, Address::times_1, 3*32), AVX_256bit);\n vmovdqu(Address(rsp, SRND, Address::times_1, _XFER + 3*32), xmm9);\n\n sha256_AVX2_one_round_and_sched(xmm7, xmm4, xmm5, xmm6, r8, r9, r10, r11, rax, rbx, rdi, rsi, 24+0);\n sha256_AVX2_one_round_and_sched(xmm7, xmm4, xmm5, xmm6, rsi, r8, r9, r10, r11, rax, rbx, rdi, 24+1);\n sha256_AVX2_one_round_and_sched(xmm7, xmm4, xmm5, xmm6, rdi, rsi, r8, r9, r10, r11, rax, rbx, 24+2);\n sha256_AVX2_one_round_and_sched(xmm7, xmm4, xmm5, xmm6, rbx, rdi, rsi, r8, r9, r10, r11, rax, 24+3);\n\n addq(SRND, 4*32);\n cmpq(SRND, 3 * 4*32);\n jcc(Assembler::below, loop1);\n\nbind(loop2);\n // Do last 16 rounds with no scheduling\n vpaddd(xmm9, xmm4, Address(TBL, SRND, Address::times_1, 0*32), AVX_256bit);\n vmovdqu(Address(rsp, SRND, Address::times_1, _XFER + 0*32), xmm9);\n sha256_AVX2_four_rounds_compute_first(0);\n\n vpaddd(xmm9, xmm5, Address(TBL, SRND, Address::times_1, 1*32), AVX_256bit);\n vmovdqu(Address(rsp, SRND, Address::times_1, _XFER + 1*32), xmm9);\n sha256_AVX2_four_rounds_compute_last(0 + 8);\n\n addq(SRND, 2*32);\n\n vmovdqu(xmm4, xmm6);\n vmovdqu(xmm5, xmm7);\n\n cmpq(SRND, 4 * 4*32);\n jcc(Assembler::below, loop2);\n\n movq(CTX, Address(rsp, _CTX));\n movq(INP, Address(rsp, _INP));\n\n addm(4*0, CTX, a);\n addm(4*1, CTX, b);\n addm(4*2, CTX, c);\n addm(4*3, CTX, d);\n addm(4*4, CTX, e);\n addm(4*5, CTX, f);\n addm(4*6, CTX, g);\n addm(4*7, CTX, h);\n\n cmpq(INP, Address(rsp, _INP_END));\n jcc(Assembler::above, done_hash);\n\n //Do second block using previously scheduled results\n xorq(SRND, SRND);\nalign(16);\nbind(loop3);\n sha256_AVX2_four_rounds_compute_first(4);\n sha256_AVX2_four_rounds_compute_last(4+8);\n\n addq(SRND, 2*32);\n cmpq(SRND, 4 * 4*32);\n jcc(Assembler::below, loop3);\n\n movq(CTX, Address(rsp, _CTX));\n movq(INP, Address(rsp, _INP));\n addq(INP, 64);\n\n addm(4*0, CTX, a);\n addm(4*1, CTX, b);\n addm(4*2, CTX, c);\n addm(4*3, CTX, d);\n addm(4*4, CTX, e);\n addm(4*5, CTX, f);\n addm(4*6, CTX, g);\n addm(4*7, CTX, h);\n\n cmpq(INP, Address(rsp, _INP_END));\n jcc(Assembler::below, loop0);\n jccb(Assembler::above, done_hash);\n\nbind(do_last_block);\n lea(TBL, ExternalAddress(K256_W));\n\n movdqu(xmm4, Address(INP, 0*16));\n movdqu(xmm5, Address(INP, 1*16));\n movdqu(xmm6, Address(INP, 2*16));\n movdqu(xmm7, Address(INP, 3*16));\n\n vpshufb(xmm4, xmm4, xmm13, AVX_128bit);\n vpshufb(xmm5, xmm5, xmm13, AVX_128bit);\n vpshufb(xmm6, xmm6, xmm13, AVX_128bit);\n vpshufb(xmm7, xmm7, xmm13, AVX_128bit);\n\n jmp(last_block_enter);\n\nbind(only_one_block);\n\n // load initial digest ;; table should be preloaded with following values\n movl(a, Address(CTX, 4*0)); // 0x6a09e667\n movl(b, Address(CTX, 4*1)); // 0xbb67ae85\n movl(c, Address(CTX, 4*2)); // 0x3c6ef372\n movl(d, Address(CTX, 4*3)); // 0xa54ff53a\n movl(e, Address(CTX, 4*4)); // 0x510e527f\n movl(f, Address(CTX, 4*5)); // 0x9b05688c\n // load g - r10 after use as scratch\n movl(h, Address(CTX, 4*7)); // 0x5be0cd19\n\n\n pshuffle_byte_flip_mask_addr = pshuffle_byte_flip_mask;\n vmovdqu(BYTE_FLIP_MASK, ExternalAddress(pshuffle_byte_flip_mask_addr + 0)); //[PSHUFFLE_BYTE_FLIP_MASK wrt rip]\n vmovdqu(SHUF_00BA, ExternalAddress(pshuffle_byte_flip_mask_addr + 32)); //[_SHUF_00BA wrt rip]\n vmovdqu(SHUF_DC00, ExternalAddress(pshuffle_byte_flip_mask_addr + 64)); //[_SHUF_DC00 wrt rip]\n\n movl(g, Address(CTX, 4*6)); // 0x1f83d9ab\n\n movq(Address(rsp, _CTX), CTX);\n jmpb(do_last_block);\n\nbind(done_hash);\n\n movq(rsp, Address(rsp, _RSP));\n\n pop(r15);\n pop(r14);\n pop(r13);\n pop(r12);\n pop(rbp);\n#ifdef _WIN64\n pop(rdi);\n pop(rsi);\n#endif\n pop(rbx);\n\n#ifdef _WIN64\n pop(r9);\n pop(r8);\n#else\n pop(rdx);\n pop(rcx);\n#endif\n\n if (multi_block) {\n#ifdef _WIN64\nconst Register& limit_end = r9;\nconst Register& ofs_end = r8;\n#else\nconst Register& limit_end = rcx;\nconst Register& ofs_end = rdx;\n#endif\n movq(rax, ofs_end);\n\nbind(compute_size1);\n cmpptr(rax, limit_end); // assume the original ofs <= limit\n jccb(Assembler::aboveEqual, compute_size_end1);\n addq(rax, 64);\n jmpb(compute_size1);\n\nbind(compute_size_end1);\n }\n}\n\nvoid MacroAssembler::sha512_AVX2_one_round_compute(Register old_h, Register a, Register b, Register c,\n Register d, Register e, Register f, Register g, Register h,\n int iteration)\n{\n\n const Register& y0 = r13;\n const Register& y1 = r14;\n const Register& y2 = r15;\n#ifdef _WIN64\n const Register& y3 = rcx;\n#else\n const Register& y3 = rdi;\n#endif\n const Register& T1 = r12;\n\n if (iteration % 4 > 0) {\n addq(old_h, y2); //h = k + w + h + S0 + S1 + CH = t1 + S0;\n }\n movq(y2, f); //y2 = f; CH\n rorxq(y0, e, 41); //y0 = e >> 41; S1A\n rorxq(y1, e, 18); //y1 = e >> 18; S1B\n xorq(y2, g); //y2 = f^g; CH\n\n xorq(y0, y1); //y0 = (e >> 41) ^ (e >> 18); S1\n rorxq(y1, e, 14); //y1 = (e >> 14); S1\n andq(y2, e); //y2 = (f^g)&e; CH\n\n if (iteration % 4 > 0 ) {\n addq(old_h, y3); //h = t1 + S0 + MAJ\n }\n xorq(y0, y1); //y0 = (e >> 41) ^ (e >> 18) ^ (e >> 14); S1\n rorxq(T1, a, 34); //T1 = a >> 34; S0B\n xorq(y2, g); //y2 = CH = ((f^g)&e) ^g; CH\n rorxq(y1, a, 39); //y1 = a >> 39; S0A\n movq(y3, a); //y3 = a; MAJA\n\n xorq(y1, T1); //y1 = (a >> 39) ^ (a >> 34); S0\n rorxq(T1, a, 28); //T1 = (a >> 28); S0\n addq(h, Address(rsp, (8 * iteration))); //h = k + w + h; --\n orq(y3, c); //y3 = a | c; MAJA\n\n xorq(y1, T1); //y1 = (a >> 39) ^ (a >> 34) ^ (a >> 28); S0\n movq(T1, a); //T1 = a; MAJB\n andq(y3, b); //y3 = (a | c)&b; MAJA\n andq(T1, c); //T1 = a&c; MAJB\n addq(y2, y0); //y2 = S1 + CH; --\n\n addq(d, h); //d = k + w + h + d; --\n orq(y3, T1); //y3 = MAJ = (a | c)&b) | (a&c); MAJ\n addq(h, y1); //h = k + w + h + S0; --\n\n addq(d, y2); //d = k + w + h + d + S1 + CH = d + t1; --\n\n if (iteration % 4 == 3) {\n addq(h, y2); //h = k + w + h + S0 + S1 + CH = t1 + S0; --\n addq(h, y3); //h = t1 + S0 + MAJ; --\n }\n}\n\nvoid MacroAssembler::sha512_AVX2_one_round_and_schedule(\n XMMRegister xmm4, // ymm4\n XMMRegister xmm5, // ymm5\n XMMRegister xmm6, // ymm6\n XMMRegister xmm7, // ymm7\n Register a, //rax\n Register b, //rbx\n Register c, //rdi\n Register d, //rsi\n Register e, //r8\n Register f, //r9\n Register g, //r10\n Register h, //r11\n int iteration)\n{\n\n const Register& y0 = r13;\n const Register& y1 = r14;\n const Register& y2 = r15;\n#ifdef _WIN64\n const Register& y3 = rcx;\n#else\n const Register& y3 = rdi;\n#endif\n const Register& T1 = r12;\n\n if (iteration % 4 == 0) {\n // Extract w[t - 7]\n // xmm0 = W[-7]\n vperm2f128(xmm0, xmm7, xmm6, 3);\n vpalignr(xmm0, xmm0, xmm6, 8, AVX_256bit);\n\n // Calculate w[t - 16] + w[t - 7]\n vpaddq(xmm0, xmm0, xmm4, AVX_256bit); //xmm0 = W[-7] + W[-16]\n // Extract w[t - 15]\n //xmm1 = W[-15]\n vperm2f128(xmm1, xmm5, xmm4, 3);\n vpalignr(xmm1, xmm1, xmm4, 8, AVX_256bit);\n\n // Calculate sigma0\n // Calculate w[t - 15] ror 1\n vpsrlq(xmm2, xmm1, 1, AVX_256bit);\n vpsllq(xmm3, xmm1, (64 - 1), AVX_256bit);\n vpor(xmm3, xmm3, xmm2, AVX_256bit); //xmm3 = W[-15] ror 1\n // Calculate w[t - 15] shr 7\n vpsrlq(xmm8, xmm1, 7, AVX_256bit); //xmm8 = W[-15] >> 7\n\n } else if (iteration % 4 == 1) {\n //Calculate w[t - 15] ror 8\n vpsrlq(xmm2, xmm1, 8, AVX_256bit);\n vpsllq(xmm1, xmm1, (64 - 8), AVX_256bit);\n vpor(xmm1, xmm1, xmm2, AVX_256bit); //xmm1 = W[-15] ror 8\n\n //XOR the three components\n vpxor(xmm3, xmm3, xmm8, AVX_256bit); //xmm3 = W[-15] ror 1 ^ W[-15] >> 7\n vpxor(xmm1, xmm3, xmm1, AVX_256bit); //xmm1 = s0\n\n //Add three components, w[t - 16], w[t - 7] and sigma0\n vpaddq(xmm0, xmm0, xmm1, AVX_256bit); //xmm0 = W[-16] + W[-7] + s0\n\n // Move to appropriate lanes for calculating w[16] and w[17]\n vperm2f128(xmm4, xmm0, xmm0, 0); //xmm4 = W[-16] + W[-7] + s0{ BABA }\n\n //Move to appropriate lanes for calculating w[18] and w[19]\n vpand(xmm0, xmm0, xmm10, AVX_256bit); //xmm0 = W[-16] + W[-7] + s0{ DC00 }\n //Calculate w[16] and w[17] in both 128 bit lanes\n //Calculate sigma1 for w[16] and w[17] on both 128 bit lanes\n vperm2f128(xmm2, xmm7, xmm7, 17); //xmm2 = W[-2] {BABA}\n vpsrlq(xmm8, xmm2, 6, AVX_256bit); //xmm8 = W[-2] >> 6 {BABA}\n\n } else if (iteration % 4 == 2) {\n vpsrlq(xmm3, xmm2, 19, AVX_256bit); //xmm3 = W[-2] >> 19 {BABA}\n vpsllq(xmm1, xmm2, (64 - 19), AVX_256bit); //xmm1 = W[-2] << 19 {BABA}\n vpor(xmm3, xmm3, xmm1, AVX_256bit); //xmm3 = W[-2] ror 19 {BABA}\n vpxor(xmm8, xmm8, xmm3, AVX_256bit);// xmm8 = W[-2] ror 19 ^ W[-2] >> 6 {BABA}\n vpsrlq(xmm3, xmm2, 61, AVX_256bit); //xmm3 = W[-2] >> 61 {BABA}\n vpsllq(xmm1, xmm2, (64 - 61), AVX_256bit); //xmm1 = W[-2] << 61 {BABA}\n vpor(xmm3, xmm3, xmm1, AVX_256bit); //xmm3 = W[-2] ror 61 {BABA}\n vpxor(xmm8, xmm8, xmm3, AVX_256bit); //xmm8 = s1 = (W[-2] ror 19) ^ (W[-2] ror 61) ^ (W[-2] >> 6) { BABA }\n\n //Add sigma1 to the other components to get w[16] and w[17]\n vpaddq(xmm4, xmm4, xmm8, AVX_256bit); //xmm4 = { W[1], W[0], W[1], W[0] }\n\n //Calculate sigma1 for w[18] and w[19] for upper 128 bit lane\n vpsrlq(xmm8, xmm4, 6, AVX_256bit); //xmm8 = W[-2] >> 6 {DC--}\n\n } else if (iteration % 4 == 3){\n vpsrlq(xmm3, xmm4, 19, AVX_256bit); //xmm3 = W[-2] >> 19 {DC--}\n vpsllq(xmm1, xmm4, (64 - 19), AVX_256bit); //xmm1 = W[-2] << 19 {DC--}\n vpor(xmm3, xmm3, xmm1, AVX_256bit); //xmm3 = W[-2] ror 19 {DC--}\n vpxor(xmm8, xmm8, xmm3, AVX_256bit); //xmm8 = W[-2] ror 19 ^ W[-2] >> 6 {DC--}\n vpsrlq(xmm3, xmm4, 61, AVX_256bit); //xmm3 = W[-2] >> 61 {DC--}\n vpsllq(xmm1, xmm4, (64 - 61), AVX_256bit); //xmm1 = W[-2] << 61 {DC--}\n vpor(xmm3, xmm3, xmm1, AVX_256bit); //xmm3 = W[-2] ror 61 {DC--}\n vpxor(xmm8, xmm8, xmm3, AVX_256bit); //xmm8 = s1 = (W[-2] ror 19) ^ (W[-2] ror 61) ^ (W[-2] >> 6) { DC-- }\n\n //Add the sigma0 + w[t - 7] + w[t - 16] for w[18] and w[19] to newly calculated sigma1 to get w[18] and w[19]\n vpaddq(xmm2, xmm0, xmm8, AVX_256bit); //xmm2 = { W[3], W[2], --, -- }\n\n //Form w[19, w[18], w17], w[16]\n vpblendd(xmm4, xmm4, xmm2, 0xF0, AVX_256bit); //xmm4 = { W[3], W[2], W[1], W[0] }\n }\n\n movq(y3, a); //y3 = a; MAJA\n rorxq(y0, e, 41); // y0 = e >> 41; S1A\n rorxq(y1, e, 18); //y1 = e >> 18; S1B\n addq(h, Address(rsp, (iteration * 8))); //h = k + w + h; --\n orq(y3, c); //y3 = a | c; MAJA\n movq(y2, f); //y2 = f; CH\n\n xorq(y2, g); //y2 = f^g; CH\n\n rorxq(T1, a, 34); //T1 = a >> 34; S0B\n xorq(y0, y1); //y0 = (e >> 41) ^ (e >> 18); S1\n\n rorxq(y1, e, 14); //y1 = (e >> 14); S1\n\n andq(y2, e); //y2 = (f^g) & e; CH\n addq(d, h); //d = k + w + h + d; --\n\n andq(y3, b); //y3 = (a | c)&b; MAJA\n xorq(y0, y1); //y0 = (e >> 41) ^ (e >> 18) ^ (e >> 14); S1\n rorxq(y1, a, 39); //y1 = a >> 39; S0A\n\n xorq(y1, T1); //y1 = (a >> 39) ^ (a >> 34); S0\n rorxq(T1, a, 28); //T1 = (a >> 28); S0\n xorq(y2, g); //y2 = CH = ((f^g)&e) ^ g; CH\n\n xorq(y1, T1); //y1 = (a >> 39) ^ (a >> 34) ^ (a >> 28); S0\n movq(T1, a); //T1 = a; MAJB\n\n andq(T1, c); //T1 = a&c; MAJB\n addq(y2, y0); //y2 = S1 + CH; --\n\n orq(y3, T1); //y3 = MAJ = (a | c)&b) | (a&c); MAJ\n addq(h, y1); //h = k + w + h + S0; --\n\n addq(d, y2); //d = k + w + h + d + S1 + CH = d + t1; --\n addq(h, y2); //h = k + w + h + S0 + S1 + CH = t1 + S0; --\n addq(h, y3); //h = t1 + S0 + MAJ; --\n}\n\nvoid MacroAssembler::sha512_AVX2(XMMRegister msg, XMMRegister state0, XMMRegister state1, XMMRegister msgtmp0,\n XMMRegister msgtmp1, XMMRegister msgtmp2, XMMRegister msgtmp3, XMMRegister msgtmp4,\n Register buf, Register state, Register ofs, Register limit, Register rsp,\n bool multi_block, XMMRegister shuf_mask)\n{\n\n Label loop0, loop1, loop2, done_hash,\n compute_block_size, compute_size,\n compute_block_size_end, compute_size_end;\n\n address K512_W = StubRoutines::x86::k512_W_addr();\n address pshuffle_byte_flip_mask_sha512 = StubRoutines::x86::pshuffle_byte_flip_mask_addr_sha512();\n address pshuffle_byte_flip_mask_addr = 0;\n\n const XMMRegister& XFER = xmm0; // YTMP0\n const XMMRegister& BYTE_FLIP_MASK = xmm9; // ymm9\n const XMMRegister& YMM_MASK_LO = xmm10; // ymm10\n#ifdef _WIN64\n const Register& INP = rcx; //1st arg\n const Register& CTX = rdx; //2nd arg\n const Register& NUM_BLKS = r8; //3rd arg\n const Register& c = rdi;\n const Register& d = rsi;\n const Register& e = r8;\n const Register& y3 = rcx;\n const Register& offset = r8;\n const Register& input_limit = r9;\n#else\n const Register& INP = rdi; //1st arg\n const Register& CTX = rsi; //2nd arg\n const Register& NUM_BLKS = rdx; //3rd arg\n const Register& c = rcx;\n const Register& d = r8;\n const Register& e = rdx;\n const Register& y3 = rdi;\n const Register& offset = rdx;\n const Register& input_limit = rcx;\n#endif\n\n const Register& TBL = rbp;\n\n const Register& a = rax;\n const Register& b = rbx;\n\n const Register& f = r9;\n const Register& g = r10;\n const Register& h = r11;\n\n //Local variables as defined in assembly file.\n enum\n {\n _XFER_SIZE = 4 * 8, // resq 4 => reserve 4 quadwords. Hence 4 * 8\n _SRND_SIZE = 8, // resq 1\n _INP_SIZE = 8,\n _INP_END_SIZE = 8,\n _RSP_SAVE_SIZE = 8, // defined as resq 1\n\n#ifdef _WIN64\n _GPR_SAVE_SIZE = 8 * 8, // defined as resq 8\n#else\n _GPR_SAVE_SIZE = 6 * 8 // resq 6\n#endif\n };\n\n enum\n {\n _XFER = 0,\n _SRND = _XFER + _XFER_SIZE, // 32\n _INP = _SRND + _SRND_SIZE, // 40\n _INP_END = _INP + _INP_SIZE, // 48\n _RSP = _INP_END + _INP_END_SIZE, // 56\n _GPR = _RSP + _RSP_SAVE_SIZE, // 64\n _STACK_SIZE = _GPR + _GPR_SAVE_SIZE // 128 for windows and 112 for linux.\n };\n\n//Saving offset and limit as it will help with blocksize calculation for multiblock SHA512.\n#ifdef _WIN64\n push(r8); // win64: this is ofs\n push(r9); // win64: this is limit, we need them again at the very end.\n#else\n push(rdx); // linux : this is ofs, need at the end for multiblock calculation\n push(rcx); // linux: This is the limit.\n#endif\n\n //Allocate Stack Space\n movq(rax, rsp);\n subq(rsp, _STACK_SIZE);\n andq(rsp, -32);\n movq(Address(rsp, _RSP), rax);\n\n //Save GPRs\n movq(Address(rsp, _GPR), rbp);\n movq(Address(rsp, (_GPR + 8)), rbx);\n movq(Address(rsp, (_GPR + 16)), r12);\n movq(Address(rsp, (_GPR + 24)), r13);\n movq(Address(rsp, (_GPR + 32)), r14);\n movq(Address(rsp, (_GPR + 40)), r15);\n\n#ifdef _WIN64\n movq(Address(rsp, (_GPR + 48)), rsi);\n movq(Address(rsp, (_GPR + 56)), rdi);\n#endif\n\n vpblendd(xmm0, xmm0, xmm1, 0xF0, AVX_128bit);\n vpblendd(xmm0, xmm0, xmm1, 0xF0, AVX_256bit);\n\n if (multi_block) {\n xorq(rax, rax);\n bind(compute_block_size);\n cmpptr(offset, input_limit); // Assuming that offset is less than limit.\n jccb(Assembler::aboveEqual, compute_block_size_end);\n addq(offset, 128);\n addq(rax, 128);\n jmpb(compute_block_size);\n\n bind(compute_block_size_end);\n movq(NUM_BLKS, rax);\n\n cmpq(NUM_BLKS, 0);\n jcc(Assembler::equal, done_hash);\n } else {\n xorq(NUM_BLKS, NUM_BLKS); //If single block.\n addq(NUM_BLKS, 128);\n }\n\n addq(NUM_BLKS, INP); //pointer to end of data\n movq(Address(rsp, _INP_END), NUM_BLKS);\n\n //load initial digest\n movq(a, Address(CTX, 8 * 0));\n movq(b, Address(CTX, 8 * 1));\n movq(c, Address(CTX, 8 * 2));\n movq(d, Address(CTX, 8 * 3));\n movq(e, Address(CTX, 8 * 4));\n movq(f, Address(CTX, 8 * 5));\n // load g - r10 after it is used as scratch\n movq(h, Address(CTX, 8 * 7));\n\n pshuffle_byte_flip_mask_addr = pshuffle_byte_flip_mask_sha512;\n vmovdqu(BYTE_FLIP_MASK, ExternalAddress(pshuffle_byte_flip_mask_addr + 0)); //PSHUFFLE_BYTE_FLIP_MASK wrt rip\n vmovdqu(YMM_MASK_LO, ExternalAddress(pshuffle_byte_flip_mask_addr + 32));\n\n movq(g, Address(CTX, 8 * 6));\n\n bind(loop0);\n lea(TBL, ExternalAddress(K512_W));\n\n //byte swap first 16 dwords\n vmovdqu(xmm4, Address(INP, 32 * 0));\n vpshufb(xmm4, xmm4, BYTE_FLIP_MASK, AVX_256bit);\n vmovdqu(xmm5, Address(INP, 32 * 1));\n vpshufb(xmm5, xmm5, BYTE_FLIP_MASK, AVX_256bit);\n vmovdqu(xmm6, Address(INP, 32 * 2));\n vpshufb(xmm6, xmm6, BYTE_FLIP_MASK, AVX_256bit);\n vmovdqu(xmm7, Address(INP, 32 * 3));\n vpshufb(xmm7, xmm7, BYTE_FLIP_MASK, AVX_256bit);\n\n movq(Address(rsp, _INP), INP);\n\n movslq(Address(rsp, _SRND), 4);\n align(16);\n\n //Schedule 64 input dwords, by calling sha512_AVX2_one_round_and_schedule\n bind(loop1);\n vpaddq(xmm0, xmm4, Address(TBL, 0 * 32), AVX_256bit);\n vmovdqu(Address(rsp, _XFER), xmm0);\n //four rounds and schedule\n sha512_AVX2_one_round_and_schedule(xmm4, xmm5, xmm6, xmm7, a, b, c, d, e, f, g, h, 0);\n sha512_AVX2_one_round_and_schedule(xmm4, xmm5, xmm6, xmm7, h, a, b, c, d, e, f, g, 1);\n sha512_AVX2_one_round_and_schedule(xmm4, xmm5, xmm6, xmm7, g, h, a, b, c, d, e, f, 2);\n sha512_AVX2_one_round_and_schedule(xmm4, xmm5, xmm6, xmm7, f, g, h, a, b, c, d, e, 3);\n\n vpaddq(xmm0, xmm5, Address(TBL, 1 * 32), AVX_256bit);\n vmovdqu(Address(rsp, _XFER), xmm0);\n //four rounds and schedule\n sha512_AVX2_one_round_and_schedule(xmm5, xmm6, xmm7, xmm4, e, f, g, h, a, b, c, d, 0);\n sha512_AVX2_one_round_and_schedule(xmm5, xmm6, xmm7, xmm4, d, e, f, g, h, a, b, c, 1);\n sha512_AVX2_one_round_and_schedule(xmm5, xmm6, xmm7, xmm4, c, d, e, f, g, h, a, b, 2);\n sha512_AVX2_one_round_and_schedule(xmm5, xmm6, xmm7, xmm4, b, c, d, e, f, g, h, a, 3);\n\n vpaddq(xmm0, xmm6, Address(TBL, 2 * 32), AVX_256bit);\n vmovdqu(Address(rsp, _XFER), xmm0);\n //four rounds and schedule\n sha512_AVX2_one_round_and_schedule(xmm6, xmm7, xmm4, xmm5, a, b, c, d, e, f, g, h, 0);\n sha512_AVX2_one_round_and_schedule(xmm6, xmm7, xmm4, xmm5, h, a, b, c, d, e, f, g, 1);\n sha512_AVX2_one_round_and_schedule(xmm6, xmm7, xmm4, xmm5, g, h, a, b, c, d, e, f, 2);\n sha512_AVX2_one_round_and_schedule(xmm6, xmm7, xmm4, xmm5, f, g, h, a, b, c, d, e, 3);\n\n vpaddq(xmm0, xmm7, Address(TBL, 3 * 32), AVX_256bit);\n vmovdqu(Address(rsp, _XFER), xmm0);\n addq(TBL, 4 * 32);\n //four rounds and schedule\n sha512_AVX2_one_round_and_schedule(xmm7, xmm4, xmm5, xmm6, e, f, g, h, a, b, c, d, 0);\n sha512_AVX2_one_round_and_schedule(xmm7, xmm4, xmm5, xmm6, d, e, f, g, h, a, b, c, 1);\n sha512_AVX2_one_round_and_schedule(xmm7, xmm4, xmm5, xmm6, c, d, e, f, g, h, a, b, 2);\n sha512_AVX2_one_round_and_schedule(xmm7, xmm4, xmm5, xmm6, b, c, d, e, f, g, h, a, 3);\n\n subq(Address(rsp, _SRND), 1);\n jcc(Assembler::notEqual, loop1);\n\n movslq(Address(rsp, _SRND), 2);\n\n bind(loop2);\n vpaddq(xmm0, xmm4, Address(TBL, 0 * 32), AVX_256bit);\n vmovdqu(Address(rsp, _XFER), xmm0);\n //four rounds and compute.\n sha512_AVX2_one_round_compute(a, a, b, c, d, e, f, g, h, 0);\n sha512_AVX2_one_round_compute(h, h, a, b, c, d, e, f, g, 1);\n sha512_AVX2_one_round_compute(g, g, h, a, b, c, d, e, f, 2);\n sha512_AVX2_one_round_compute(f, f, g, h, a, b, c, d, e, 3);\n\n vpaddq(xmm0, xmm5, Address(TBL, 1 * 32), AVX_256bit);\n vmovdqu(Address(rsp, _XFER), xmm0);\n addq(TBL, 2 * 32);\n // four rounds and compute.\n sha512_AVX2_one_round_compute(e, e, f, g, h, a, b, c, d, 0);\n sha512_AVX2_one_round_compute(d, d, e, f, g, h, a, b, c, 1);\n sha512_AVX2_one_round_compute(c, c, d, e, f, g, h, a, b, 2);\n sha512_AVX2_one_round_compute(b, b, c, d, e, f, g, h, a, 3);\n\n vmovdqu(xmm4, xmm6);\n vmovdqu(xmm5, xmm7);\n\n subq(Address(rsp, _SRND), 1);\n jcc(Assembler::notEqual, loop2);\n\n addmq(8 * 0, CTX, a);\n addmq(8 * 1, CTX, b);\n addmq(8 * 2, CTX, c);\n addmq(8 * 3, CTX, d);\n addmq(8 * 4, CTX, e);\n addmq(8 * 5, CTX, f);\n addmq(8 * 6, CTX, g);\n addmq(8 * 7, CTX, h);\n\n movq(INP, Address(rsp, _INP));\n addq(INP, 128);\n cmpq(INP, Address(rsp, _INP_END));\n jcc(Assembler::notEqual, loop0);\n\n bind(done_hash);\n\n //Restore GPRs\n movq(rbp, Address(rsp, (_GPR + 0)));\n movq(rbx, Address(rsp, (_GPR + 8)));\n movq(r12, Address(rsp, (_GPR + 16)));\n movq(r13, Address(rsp, (_GPR + 24)));\n movq(r14, Address(rsp, (_GPR + 32)));\n movq(r15, Address(rsp, (_GPR + 40)));\n\n#ifdef _WIN64\n movq(rsi, Address(rsp, (_GPR + 48)));\n movq(rdi, Address(rsp, (_GPR + 56)));\n#endif\n\n //Restore Stack Pointer\n movq(rsp, Address(rsp, _RSP));\n\n#ifdef _WIN64\n pop(r9);\n pop(r8);\n#else\n pop(rcx);\n pop(rdx);\n#endif\n\n if (multi_block) {\n#ifdef _WIN64\n const Register& limit_end = r9;\n const Register& ofs_end = r8;\n#else\n const Register& limit_end = rcx;\n const Register& ofs_end = rdx;\n#endif\n movq(rax, ofs_end);\n bind(compute_size);\n cmpptr(rax, limit_end);\n jccb(Assembler::aboveEqual, compute_size_end);\n addq(rax, 128);\n jmpb(compute_size);\n bind(compute_size_end);\n }\n}\n\n#endif //#ifdef _LP64\n\n"} +{"text": "#include \"libm.h\"\n\n#if FLT_EVAL_METHOD==0\n#define EPS FLT_EPSILON\n#elif FLT_EVAL_METHOD==1\n#define EPS DBL_EPSILON\n#elif FLT_EVAL_METHOD==2\n#define EPS LDBL_EPSILON\n#endif\nstatic const float_t toint = 1/EPS;\n\nfloat roundf(float x)\n{\n\tunion {float f; uint32_t i;} u = {x};\n\tint e = u.i >> 23 & 0xff;\n\tfloat_t y;\n\n\tif (e >= 0x7f+23)\n\t\treturn x;\n\tif (u.i >> 31)\n\t\tx = -x;\n\tif (e < 0x7f-1) {\n\t\tFORCE_EVAL(x + toint);\n\t\treturn 0*u.f;\n\t}\n\ty = x + toint - toint - x;\n\tif (y > 0.5f)\n\t\ty = y + x - 1;\n\telse if (y <= -0.5f)\n\t\ty = y + x + 1;\n\telse\n\t\ty = y + x;\n\tif (u.i >> 31)\n\t\ty = -y;\n\treturn y;\n}\n"} +{"text": "/**\n * @file\n *\n * @brief Mutex Initialization Attribute\n * @ingroup POSIXAPI\n */\n\n/*\n * COPYRIGHT (c) 1989-2007.\n * On-Line Applications Research Corporation (OAR).\n *\n * The license and distribution terms for this file may be\n * found in the file LICENSE in this distribution or at\n * http://www.rtems.org/license/LICENSE.\n */\n\n#ifdef HAVE_CONFIG_H\n#include \"config.h\"\n#endif\n\n#include \n#include \n#include \n\n#include \n\n/**\n * 11.3.1 Mutex Initialization Attributes, P1003.1c/Draft 10, p. 81\n */\nint pthread_mutexattr_init(\n pthread_mutexattr_t *attr\n)\n{\n if ( attr == NULL )\n return EINVAL;\n\n *attr = _POSIX_Mutex_Default_attributes;\n return 0;\n}\n"} +{"text": "import React, { Component } from 'react';\nimport { connect } from 'react-redux';\nimport { Sidebar, Segment, Button, Menu, Image, Icon, Header, Label, Form, Input } from 'semantic-ui-react';\nimport ProductList from './ProductList';\nimport { sortByMaxPrice, sortByMinPrice, setMinPrice, setMaxPrice, setBrand, setCategory} from '../actions/filters';\nimport selectProducts from '../selectors/productsFilter';\nimport { getBrands, getCategories } from '../selectors/product';\nimport { isMobile } from 'react-device-detect';\nimport Footer from \"./Footer\";\nimport * as API from '../utils/apiCaller';\n\n\nexport class StorePage extends Component {\n state = { visible: isMobile ? false : true }\n\n sleep(ms){\n return new Promise(resolve => setTimeout(resolve, ms));\n }\n\n componentDidMount() {\n\n let opts = { 'action': 'account' };\n API.callApi(opts)\n .then(function(response) {\n return response.json();\n }).then(function(data) {\n if(data && data.status == 'ok') {\n localStorage.setItem(\"AccountData\", JSON.stringify(data.account));\n } else {\n if (data.status == \"err\" && data.msg == \"could not find user\") {\n sleep(5000);\n API.callApi(opts)\n .then(function(response) {\n return response.json();\n }).then(function(data) {\n if(data && data.status == 'ok') {\n localStorage.setItem(\"AccountData\", JSON.stringify(data.account));\n } else {\n if (data.status == \"err\" && data.msg == \"could not find user\") {\n alert(data.msg);\n localStorage.clear();\n var port = window.location.port;\n if (port == \"\") {\n port = \"80\"\n }\n window.location.replace(\"//\" + window.document.domain + \":\" + port);\n }\n }\n });\n }\n }\n })\n .catch(function () {\n alert(\"[ERROR] DVSA backend does not work properly. Try to delete cache and re-login.\")\n });\n }\n\n toggleVisibility = () => this.setState({ visible: !this.state.visible });\n\n handleSortByMaxPrice = () => { this.props.startSortByMaxPrice(); }\n\n handleSortByMinPrice = () => { this.props.startSortByMinPrice(); }\n\n handleSetMaxPrice = (e) => { this.props.startSetMaxPrice(e.target.value); }\n\n handleSetMinPrice = (e) => { this.props.startSetMinPrice(e.target.value); }\n\n handleSetCategory = (e) => { this.props.startSetCategory(e.target.value); }\n\n handleSetBrand = (e) => { this.props.startSetBrand(e.target.value); }\n\nhandleResetFilter = () => {\n document.getElementById(\"filter-max-input\").reset();\n document.getElementById(\"filter-min-input\").reset();\n document.getElementById(\"filter-category-input\").reset();\n document.getElementById(\"filter-brand-input\").reset();\n this.props.startSetMaxPrice('');\n this.props.startSetMinPrice('');\n this.props.startSetCategory('');\n this.props.startSetBrand('');\n isMobile && this.toggleVisibility();\n}\n\n render() {\n const { visible } = this.state;\n return (\n
\n
\n
\n \n \n

Filter

\n \n Price Low to High\n \n \n Price High to Low\n \n \n
\n \n \n \n
\n
\n \n
\n \n \n \n
\n
\n {/*}\n \n
\n \n \n {\n\n getCategories(this.props.allProducts).map((category, index) => {\n return \n })\n }\n \n
\n
*/}\n \n
\n \n \n {\n getBrands(this.props.allProducts).map((brand, index) => {\n return \n })\n }\n \n
\n
\n \n
\n \n\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n
\n\n )\n }\n}\n\nconst mapStateToProps = (state) => {\n return {\n products: selectProducts(state.products, state.filters),\n allProducts: state.products\n };\n };\n\nconst mapDispatchToProps = (dispatch) => ({\n startSortByMaxPrice: () => dispatch(sortByMaxPrice()),\n startSortByMinPrice: () => dispatch(sortByMinPrice()),\n startSetMinPrice: (price) => dispatch(setMinPrice(price)),\n startSetMaxPrice: (price) => dispatch(setMaxPrice(price)),\n startSetCategory: (category) => dispatch(setCategory(category)),\n startSetBrand: (brand) => dispatch(setBrand(brand))\n});\n\nexport default connect(mapStateToProps, mapDispatchToProps)(StorePage);\n"} +{"text": "// SPDX-License-Identifier: GPL-2.0-only\n/*\n * (C) 2010,2011 Thomas Renninger , Novell Inc\n */\n\n#include \n#include \n#include \n#include \n#include \n#include \n\n#include \"helpers/helpers.h\"\n#include \"idle_monitor/cpupower-monitor.h\"\n\n#define CPUIDLE_STATES_MAX 10\nstatic cstate_t cpuidle_cstates[CPUIDLE_STATES_MAX];\nstruct cpuidle_monitor cpuidle_sysfs_monitor;\n\nstatic unsigned long long **previous_count;\nstatic unsigned long long **current_count;\nstruct timespec start_time;\nstatic unsigned long long timediff;\n\nstatic int cpuidle_get_count_percent(unsigned int id, double *percent,\n\t\t\t\t unsigned int cpu)\n{\n\tunsigned long long statediff = current_count[cpu][id]\n\t\t- previous_count[cpu][id];\n\tdprint(\"%s: - diff: %llu - percent: %f (%u)\\n\",\n\t cpuidle_cstates[id].name, timediff, *percent, cpu);\n\n\tif (timediff == 0)\n\t\t*percent = 0.0;\n\telse\n\t\t*percent = ((100.0 * statediff) / timediff);\n\n\tdprint(\"%s: - timediff: %llu - statediff: %llu - percent: %f (%u)\\n\",\n\t cpuidle_cstates[id].name, timediff, statediff, *percent, cpu);\n\n\treturn 0;\n}\n\nstatic int cpuidle_start(void)\n{\n\tint cpu, state;\n\tclock_gettime(CLOCK_REALTIME, &start_time);\n\tfor (cpu = 0; cpu < cpu_count; cpu++) {\n\t\tfor (state = 0; state < cpuidle_sysfs_monitor.hw_states_num;\n\t\t state++) {\n\t\t\tprevious_count[cpu][state] =\n\t\t\t\tcpuidle_state_time(cpu, state);\n\t\t\tdprint(\"CPU %d - State: %d - Val: %llu\\n\",\n\t\t\t cpu, state, previous_count[cpu][state]);\n\t\t}\n\t};\n\treturn 0;\n}\n\nstatic int cpuidle_stop(void)\n{\n\tint cpu, state;\n\tstruct timespec end_time;\n\tclock_gettime(CLOCK_REALTIME, &end_time);\n\ttimediff = timespec_diff_us(start_time, end_time);\n\n\tfor (cpu = 0; cpu < cpu_count; cpu++) {\n\t\tfor (state = 0; state < cpuidle_sysfs_monitor.hw_states_num;\n\t\t state++) {\n\t\t\tcurrent_count[cpu][state] =\n\t\t\t\tcpuidle_state_time(cpu, state);\n\t\t\tdprint(\"CPU %d - State: %d - Val: %llu\\n\",\n\t\t\t cpu, state, previous_count[cpu][state]);\n\t\t}\n\t};\n\treturn 0;\n}\n\nvoid fix_up_intel_idle_driver_name(char *tmp, int num)\n{\n\t/* fix up cpuidle name for intel idle driver */\n\tif (!strncmp(tmp, \"NHM-\", 4)) {\n\t\tswitch (num) {\n\t\tcase 1:\n\t\t\tstrcpy(tmp, \"C1\");\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tstrcpy(tmp, \"C3\");\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tstrcpy(tmp, \"C6\");\n\t\t\tbreak;\n\t\t}\n\t} else if (!strncmp(tmp, \"SNB-\", 4)) {\n\t\tswitch (num) {\n\t\tcase 1:\n\t\t\tstrcpy(tmp, \"C1\");\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tstrcpy(tmp, \"C3\");\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tstrcpy(tmp, \"C6\");\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tstrcpy(tmp, \"C7\");\n\t\t\tbreak;\n\t\t}\n\t} else if (!strncmp(tmp, \"ATM-\", 4)) {\n\t\tswitch (num) {\n\t\tcase 1:\n\t\t\tstrcpy(tmp, \"C1\");\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tstrcpy(tmp, \"C2\");\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tstrcpy(tmp, \"C4\");\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tstrcpy(tmp, \"C6\");\n\t\t\tbreak;\n\t\t}\n\t}\n}\n\n#ifdef __powerpc__\nvoid map_power_idle_state_name(char *tmp)\n{\n\tif (!strncmp(tmp, \"stop0_lite\", CSTATE_NAME_LEN))\n\t\tstrcpy(tmp, \"stop0L\");\n\telse if (!strncmp(tmp, \"stop1_lite\", CSTATE_NAME_LEN))\n\t\tstrcpy(tmp, \"stop1L\");\n\telse if (!strncmp(tmp, \"stop2_lite\", CSTATE_NAME_LEN))\n\t\tstrcpy(tmp, \"stop2L\");\n}\n#else\nvoid map_power_idle_state_name(char *tmp) { }\n#endif\n\nstatic struct cpuidle_monitor *cpuidle_register(void)\n{\n\tint num;\n\tchar *tmp;\n\tint this_cpu;\n\n\tthis_cpu = sched_getcpu();\n\n\t/* Assume idle state count is the same for all CPUs */\n\tcpuidle_sysfs_monitor.hw_states_num = cpuidle_state_count(this_cpu);\n\n\tif (cpuidle_sysfs_monitor.hw_states_num <= 0)\n\t\treturn NULL;\n\n\tfor (num = 0; num < cpuidle_sysfs_monitor.hw_states_num; num++) {\n\t\ttmp = cpuidle_state_name(this_cpu, num);\n\t\tif (tmp == NULL)\n\t\t\tcontinue;\n\n\t\tmap_power_idle_state_name(tmp);\n\t\tfix_up_intel_idle_driver_name(tmp, num);\n\t\tstrncpy(cpuidle_cstates[num].name, tmp, CSTATE_NAME_LEN - 1);\n\t\tfree(tmp);\n\n\t\ttmp = cpuidle_state_desc(this_cpu, num);\n\t\tif (tmp == NULL)\n\t\t\tcontinue;\n\t\tstrncpy(cpuidle_cstates[num].desc, tmp,\tCSTATE_DESC_LEN - 1);\n\t\tfree(tmp);\n\n\t\tcpuidle_cstates[num].range = RANGE_THREAD;\n\t\tcpuidle_cstates[num].id = num;\n\t\tcpuidle_cstates[num].get_count_percent =\n\t\t\tcpuidle_get_count_percent;\n\t};\n\n\t/* Free this at program termination */\n\tprevious_count = malloc(sizeof(long long *) * cpu_count);\n\tcurrent_count = malloc(sizeof(long long *) * cpu_count);\n\tfor (num = 0; num < cpu_count; num++) {\n\t\tprevious_count[num] = malloc(sizeof(long long) *\n\t\t\t\t\tcpuidle_sysfs_monitor.hw_states_num);\n\t\tcurrent_count[num] = malloc(sizeof(long long) *\n\t\t\t\t\tcpuidle_sysfs_monitor.hw_states_num);\n\t}\n\n\tcpuidle_sysfs_monitor.name_len = strlen(cpuidle_sysfs_monitor.name);\n\treturn &cpuidle_sysfs_monitor;\n}\n\nvoid cpuidle_unregister(void)\n{\n\tint num;\n\n\tfor (num = 0; num < cpu_count; num++) {\n\t\tfree(previous_count[num]);\n\t\tfree(current_count[num]);\n\t}\n\tfree(previous_count);\n\tfree(current_count);\n}\n\nstruct cpuidle_monitor cpuidle_sysfs_monitor = {\n\t.name\t\t\t= \"Idle_Stats\",\n\t.hw_states\t\t= cpuidle_cstates,\n\t.start\t\t\t= cpuidle_start,\n\t.stop\t\t\t= cpuidle_stop,\n\t.do_register\t\t= cpuidle_register,\n\t.unregister\t\t= cpuidle_unregister,\n\t.needs_root\t\t= 0,\n\t.overflow_s\t\t= UINT_MAX,\n};\n"} +{"text": "require 'mspec/runner/formatters/dotted'\n\nclass MethodFormatter < DottedFormatter\n attr_accessor :methods\n\n def initialize(out=nil)\n super\n @methods = Hash.new do |h, k|\n hash = {}\n hash[:examples] = 0\n hash[:expectations] = 0\n hash[:failures] = 0\n hash[:errors] = 0\n hash[:exceptions] = []\n h[k] = hash\n end\n end\n\n # Returns the type of method as a \"class\", \"instance\",\n # or \"unknown\".\n def method_type(sep)\n case sep\n when '.', '::'\n \"class\"\n when '#'\n \"instance\"\n else\n \"unknown\"\n end\n end\n\n # Callback for the MSpec :before event. Parses the\n # describe string into class and method if possible.\n # Resets the tallies so the counts are only for this\n # example.\n def before(state)\n super\n\n # The pattern for a method name is not correctly\n # restrictive but it is simplistic and useful\n # for our purpose.\n /^([A-Za-z_]+\\w*)(\\.|#|::)([^ ]+)/ =~ state.describe\n @key = $1 && $2 && $3 ? \"#{$1}#{$2}#{$3}\" : state.describe\n\n unless methods.key? @key\n h = methods[@key]\n h[:class] = \"#{$1}\"\n h[:method] = \"#{$3}\"\n h[:type] = method_type $2\n h[:description] = state.description\n end\n\n tally.counter.examples = 0\n tally.counter.expectations = 0\n tally.counter.failures = 0\n tally.counter.errors = 0\n\n @exceptions = []\n end\n\n # Callback for the MSpec :after event. Sets or adds to\n # tallies for the example block.\n def after(state)\n h = methods[@key]\n h[:examples] += tally.counter.examples\n h[:expectations] += tally.counter.expectations\n h[:failures] += tally.counter.failures\n h[:errors] += tally.counter.errors\n @exceptions.each do |exc|\n h[:exceptions] << \"#{exc.message}\\n#{exc.backtrace}\\n\"\n end\n end\n\n # Callback for the MSpec :finish event. Prints out the\n # summary information in YAML format for all the methods.\n def finish\n print \"---\\n\"\n\n methods.each do |key, hash|\n print key.inspect, \":\\n\"\n print \" class: \", hash[:class].inspect, \"\\n\"\n print \" method: \", hash[:method].inspect, \"\\n\"\n print \" type: \", hash[:type], \"\\n\"\n print \" description: \", hash[:description].inspect, \"\\n\"\n print \" examples: \", hash[:examples], \"\\n\"\n print \" expectations: \", hash[:expectations], \"\\n\"\n print \" failures: \", hash[:failures], \"\\n\"\n print \" errors: \", hash[:errors], \"\\n\"\n print \" exceptions:\\n\"\n hash[:exceptions].each { |exc| print \" - \", exc.inspect, \"\\n\" }\n end\n end\nend\n"} +{"text": "import tinycolor from 'tinycolor2';\n\nimport {\n navbarVariant,\n logoVariant,\n sidebarVariant,\n navbarItemVariant,\n purple,\n white,\n} from './variables';\n\nexport default Object.assign({},\n navbarVariant(purple, white),\n logoVariant(tinycolor(purple).darken(5).toString()),\n sidebarVariant(purple),\n navbarItemVariant(purple),\n);\n"} +{"text": "[\n {\n \"name\":\"art\",\n \"title\":\"Art\",\n \"items\":[\n {\n \"id\": \"1\",\n \"title\":\"Tooling Up\",\n \"author\":\"Amber Bravo\",\n \"date\":\"June 14 2015\",\n \"primaryColor\":\"#5a7785\",\n \"secondaryColor\":\"#455a64\",\n \"image\":\"https://g-design.storage.googleapis.com/production/v5/assets/tooling-up-header-a13cfd9a.svg\",\n \"desc\":\"How a new generation of prototyping tools at Google will help designers build better software.\",\n \"content\":\"The road from design to production is often hard-won, filled with well-intended design detours, steep learning curves, and the occasional road block. Here’s a common scenario: A team of designers begins building wireframes for a new product. Several weeks, revisions, and pin-ups later, they emerge with a “final,” “shippable” file, which they hand off to the development team. The engineers poke holes in the design, deeming several elements “unbuildable,” and begin rendering out some semblance of the design in code. Several weeks later, they deliver a staging site. The designers are thrilled—this is the first time they’ve seen their design IRL—but are quickly deflated when they realize how much of the design has been lost in translation. The typography is wonky. The animations and interactive elements need to be re-tuned. A volley of annotated emails with screenshots ensues, until finally, the designer and developer sit side-by-side, and visually adjust the design directly in code.\"\n },\n {\n \"id\": \"2\",\n \"title\":\"Expressing Brand in Material\",\n \"author\":\"Viktor Persson & Rachel Been\",\n \"date\":\"July 4 2015\",\n \"primaryColor\":\"#202226\",\n \"secondaryColor\":\"#333\",\n \"image\":\"https://g-design.storage.googleapis.com/production/v5/assets/article_brand_2x1_202226-fc539618.svg\",\n \"desc\":\"Material design offers a system for designing functional and elegant software. How does your brand fit into the framework? We’ve created a step-by-step guide to staying on-brand while going material.\",\n \"content\":\"Nobody knows your brand better than you do. This is why when we set out to create the framework for material design, we were sensitive to the ways in which third-party developers might leverage the system. We wanted material design to give comprehensive guidance for designing effective and elegant UIs — taking a strong position on motion, dimensionality, color, and graphic hierarchy — but with enough latitude to allow for various levels of engagement. You don’t have to adopt every element of the material design system in order for it to be beneficial to your identity system. Whether it’s a custom font, a unique color story, or distinct voice, everything that provides stylistic distinction in a product should be celebrated and supported in the material design framework. We’ve laid out the top brand touchpoints to help illustrate the system’s flexibility and give designers and developers a road map for showcasing their brand identity.\"\n },\n {\n \"id\": \"3\",\n \"title\":\"New Design Tools\",\n \"author\":\"Amber Bravo\",\n \"date\":\"July 29 2015\",\n \"primaryColor\":\"#3e50b4\",\n \"secondaryColor\":\"#303fc3\",\n \"image\":\"https://g-design.storage.googleapis.com/production/v5/assets/150727_GD_Article_ToolingUpFurther_1x1Tile-01-86c8e03e.svg\",\n \"desc\":\"See Also: (More) thoughts on design tools\",\n \"content\":\"This week on Google Design, we published a roundtable discussion with Matias Duarte and the founders of Pixate and RelativeWave, Paul Colton and Max Wiesel. To prepare for the interview, I turned to my design brethren on Medium (and beyond!) to learn more about their experiences working with some of the more popular prototyping tools available today, as well as their hopes and dreams for the next generation of design software. Here are a few of the stories I found helpful for framing the discussion. A thorough account of using Form (pre 1.3) for the first time, from the perspective of a designer who is less familiar with Quarz Composer, with built prototypes to help synthesize the material covered in each section. Also worth reading: Ces’ great tutorial exploring material design in Origami.\"\n }\n ]\n },\n {\n \"name\":\"film\",\n \"title\":\"Film\",\n \"items\":[\n {\n \"id\": \"1\",\n \"title\":\"Design from iOS to Android (and Back Again)\",\n \"author\":\"Roman Nurik & Viltor Persson\",\n \"date\":\"Aug 20 2015\",\n \"primaryColor\":\"#3e50b4\",\n \"secondaryColor\":\"#303F9F\",\n \"image\":\"https://g-design.storage.googleapis.com/production/v5/assets/renditions/Article_iOS_to_Android_Header_3e50b4-f064882f-1240.png\",\n \"desc\":\"A practical guide to designing across platforms\",\n \"content\":\"Designing and developing between platforms is a lot like traveling through different countries. You go through the same motions — sleeping, eating, sightseeing, regardless of where you are — but the customs of the country you’re visiting dictate how you go about doing them. In some countries, it’s ok to push people into the train, or eat a burger with a knife and fork. Similarly, if you developed your product first for iOS, you shouldn’t simply expect that you can port it into Android without issue, because your app will feel lost in translation. It’s important to understand the idioms and behaviors of each platform before you start design and development. That way your users will be able to use and easily understand your app on the platform that is native to them, and you will have the most clear and true version of your product — no matter where it’s used. This guide will walk you through some practical tips for moving from iOS to Android (and back again) without suffering a cultural divide.\"\n },\n {\n \"id\": \"2\",\n \"title\":\"Demystifying Density\",\n \"author\":\"Sebastien Gabriel\",\n \"date\":\"July 10 2015\",\n \"primaryColor\":\"#00ccb8\",\n \"secondaryColor\":\"#00b7a5\",\n \"image\":\"https://g-design.storage.googleapis.com/production/v5/assets/article_dpi_00ccb8-34fdd39e.svg\",\n \"desc\":\"Sebastien Gabriel takes one for the team with his exhaustive guide to DPI & PPI\",\n \"content\":\"Dots Per Inch and Pixels Per Inch, DPI and PPI respectively, are units for measuring the tiny bits of color that come together to form a printed image or an image on a screen. The higher the density of those dots or pixels, the higher the resolution. For most, a rudimentary understanding of DPI or PPI amounts to knowing whether or not an image is clear but small enough to print, email, or post to social media. However, for designers, understanding screen density and ratio is essential to delivering delightful user experiences across devices. Designing for phones, tablets, laptops, watches, and hybrids without a proper knowledge of dpi and ratio is a lot like building a house using the wrong measurement — things are going to look very weird very quickly (and good luck getting through the door!).\"\n },\n {\n \"id\": \"3\",\n \"title\":\"Pixate and Form 1.3\",\n \"author\":\"Google Design\",\n \"date\":\"May 30 2015\",\n \"primaryColor\":\"#eeeeee\",\n \"secondaryColor\":\"#9e9e9e\",\n \"image\":\"https://g-design.storage.googleapis.com/production/v5/assets/pixate-and-form-1-3-header-2061f19f.svg\",\n \"desc\":\"Discover the latest features and start designing native prototypes on your device.\",\n \"content\":\"We’re thrilled to announce that Pixate has joined Google! Pixate adds to our ongoing effort to develop new design and prototyping tools, including Form 1.3. Explore the latest features of both products below, and check out our roundtable conversation with Matias Duarte, VP Design at Google, and the the founders of Pixate and Form. A visual prototyping platform that allows designers to create sophisticated, fluid mobile prototypes that run natively on iOS and Android devices. Creating complete app prototypes or crafting carefully choreographed interactions that look and feel completely real, and sharing them so entire product teams or clients can experience them right on their device.\"\n },\n {\n \"id\": \"4\",\n \"title\":\"Welcome to the New Google Design\",\n \"author\":\"Google Design\",\n \"date\":\"Sep 10 2015\",\n \"primaryColor\":\"#3367d6\",\n \"secondaryColor\":\"#2755CC\",\n \"image\":\"https://g-design.storage.googleapis.com/production/v5/assets/Article_Welcome_Header_2880-ce3ec22d.svg\",\n \"desc\":\"More design, all the time\",\n \"content\":\"Much has happened in the year since we launched Google Design and introduced our material design framework at Google I/O 2014. We hosted FORM, Google’s first-ever design conference in San Francisco and engaged in numerous outreach efforts through workshops, design sprints, and online discussions. We’ve continued to improve and expand on the material design guidelines and have witnessed countless teams both inside and outside Google adopt the framework and ship beautiful, materialized products across platforms. To better capture all this great design work happening at Google and around the community, we’ve completely reconceived Google Design. In addition to all the guidelines and resources you’ve come to rely on, we’ve also released guides for TV, Auto, and Cardboard, our virtual reality product. Our new Icon Library allows you to download our icon font and source from the over 800 material system icons. We’ve also added a whole new layer of written and video content — everything from tutorials, case-studies, interviews, and essays, to a listing of job opportunities and design-related events, like our upcoming FORM conference. The goal is to provide a new perspective on our design process and ample opportunity for cross pollination. Now you can watch an animated color tutorial before you dive into the nitty gritty details in our material design guidelines, or get some practical guidance around designing between platforms. Our Making Material Design series takes you behind-the-scenes to find out what it takes to create a new visual framework for Google. Additionally, we’ve launched new Dribbble and YouTube channels to complement our active Twitter and Google+ presence and can share even more real-time content from our design teams. We hope you enjoy the the new Google Design, and we look forward to hearing your feedback on Twitter and Google+. After all, good design is never done.\"\n }\n ]\n },\n {\n \"name\":\"photography\",\n \"title\":\"Photography\",\n \"items\":[]\n },\n {\n \"name\":\"design\",\n \"title\":\"Design\",\n \"items\":[]\n },\n {\n \"name\":\"topten\",\n \"title\":\"Top Ten\",\n \"items\":[]\n },\n {\n \"name\":\"aday\",\n \"title\":\"A Day in the Life\",\n \"items\":[]\n }\n]"} +{"text": "var convert = require('./convert'),\n func = convert('includes', require('../includes'));\n\nfunc.placeholder = require('./placeholder');\nmodule.exports = func;\n"} +{"text": "\n\n \n \n\n \n\n \n\n \n\n\n"} +{"text": "name: \"2014-austin\" # The name of the event. Four digit year with the city name in lower-case, with no spaces.\nyear: 2014 # The year of the event. Make sure it is in quotes.\ncity: \"Austin\" # The city name of the event. Capitalize it.\nfriendly: \"2014-austin\" # Four digit year and the city name in lower-case. Don't forget the dash!\nstatus: \"past\" # Options are \"past\" or \"current\". Use \"current\" for upcoming.\n\n# All dates are in unquoted 2014-MM-DD, like this: variable: 2016-01-05\nstartdate: 2014-05-05T00:00:00-05:00\nenddate: 2014-05-06T23:59:59-05:00\n\n# Leave CFP dates blank if you don't know yet, or set all three at once.\ncfp_date_start: # start accepting talk proposals.\ncfp_date_end: # close your call for proposals.\ncfp_date_announce: # inform proposers of status\n\n# Location\n#\ncoordinates: \"41.882219, -87.640530\" # The coordinates of your city. Get Latitude and Longitude of a Point: http://itouchmap.com/latlong.html\nlocation: \"yourlocation\" # Defaults to city, but you can make it the venue name.\n#\n\nnav_elements: # List of pages you want to show up in the navigation of your page.\n \n - name: program\n - name: propose\n - name: location\n - name: registration\n - name: sponsor\n - name: contact\n - name: conduct\n\n"} +{"text": "// Copyright 2016 Citra Emulator Project\n// Licensed under GPLv2 or any later version\n// Refer to the license.txt file included.\n\n#pragma once\n\n#include \n#include \n\nnamespace Ui {\nclass ConfigureDebug;\n}\n\nclass ConfigureDebug : public QWidget {\n Q_OBJECT\n\npublic:\n explicit ConfigureDebug(QWidget* parent = nullptr);\n ~ConfigureDebug() override;\n\n void ApplyConfiguration();\n void RetranslateUI();\n void SetConfiguration();\n\n std::unique_ptr ui;\n};\n"} +{"text": "#!/bin/sh\nargs=\"\"\nassembly=\ndebug=false\nwhile test x$1 != x; do\n\tcase $1 in\n\t\t-[ldnm]:*) args=\"$args$1 \" ;;\n\t --debug) debug=true ;;\n\t --no-daemon) debug=true ;;\n\t\t*) assembly=$1; args=\"$args$assembly \";;\n\tesac\n\tshift\ndone\n\nif test x$assembly = x; then\n\techo You must specify at least the assembly name\n\techo \n\techo \"Usage is: $0 [options] service\"\n\techo \n\techo ' -d: Working directory'\n\techo ' -l: Lock file (default is /tmp/.lock)'\n\techo ' -m: Name to show in syslog'\n\techo ' -n: Name of service to start (default is first defined)'\n echo ' --debug Do not send to background nor redirect input/output'\n echo ' --no-daemon Do not send to background nor redirect input/output'\n\techo \n\techo Controlling the service:\n\techo \n\techo ' kill -USR1 `cat ` Pausing service'\n\techo ' kill -USR2 `cat ` Continuing service'\n\techo ' kill `cat ` Ending service'\n\techo \n\texit 1\nfi\n\nexport MONO_DISABLE_SHM=1\nif $debug; then\n exec @bindir@/@mono_interp@ $MONO_OPTIONS @mono_instdir@/@framework_version@/mono-service.exe $args\nelse\n exec @bindir@/@mono_interp@ $MONO_OPTIONS @mono_instdir@/@framework_version@/mono-service.exe $args /dev/null 2>&1 &\nfi\n"} +{"text": "/* $Id$ */\n/***************************************************************************\n * (C) Copyright 2003-2010 - Stendhal *\n ***************************************************************************\n ***************************************************************************\n * *\n * This program is free software; you can redistribute it and/or modify *\n * it under the terms of the GNU General Public License as published by *\n * the Free Software Foundation; either version 2 of the License, or *\n * (at your option) any later version. *\n * *\n ***************************************************************************/\npackage games.stendhal.server.events;\n\nimport marauroa.common.game.Definition.Type;\nimport marauroa.common.game.RPClass;\nimport marauroa.common.game.RPEvent;\n\n/**\n * A graphvis diagram showing the FSM of an NPC\n *\n * @author hendrik\n */\npublic class TransitionGraphEvent extends RPEvent {\n\n\tprivate static final String TRANSITION_GRAPH = \"transition_graph\";\n\tprivate static final String DATA = \"data\";\n\n\t/**\n\t * Creates the rpclass.\n\t */\n\tpublic static void generateRPClass() {\n\t\tfinal RPClass rpclass = new RPClass(TRANSITION_GRAPH);\n\t\trpclass.addAttribute(DATA, Type.LONG_STRING);\n\t}\n\n\t/**\n\t * Creates a new TransitionGraphEvent.\n\t *\n\t * @param data data to display\n\t */\n\tpublic TransitionGraphEvent(String data) {\n\t\tsuper(TRANSITION_GRAPH);\n\t\tput(DATA, data);\n\t}\n}\n"} +{"text": "using System;\nusing Microsoft.AspNetCore.Builder;\nusing Microsoft.AspNetCore.Hosting;\nusing Microsoft.Extensions.DependencyInjection;\nusing Microsoft.Extensions.Options;\n\nnamespace StackExchange.Exceptional\n{\n internal class ExceptionalStartupFilter : IStartupFilter\n { \n /// \n /// Configures exceptional early on, as to catch any errors that happen in Startup.Configure (or equivalent).\n /// \n public Action Configure(Action next) =>\n builder =>\n {\n // Touch settings so that we initialize early\n _ = builder.ApplicationServices.GetService>().Value;\n next(builder);\n };\n }\n}\n"} +{"text": "p0: p0v\n\np1:\n p2:\n p3:\n p4:\n p5: p5v\n\nserver.port: 8080\nname:\nname.name2:\ndisplayName: dv\n\n"} +{"text": "Consul API client\n=================\n\nThis package provides the `api` package which attempts to\nprovide programmatic access to the full Consul API.\n\nCurrently, all of the Consul APIs included in version 0.3 are supported.\n\nDocumentation\n=============\n\nThe full documentation is available on [Godoc](http://godoc.org/github.com/hashicorp/consul/api)\n\nUsage\n=====\n\nBelow is an example of using the Consul client:\n\n```go\n// Get a new client, with KV endpoints\nclient, _ := api.NewClient(api.DefaultConfig())\nkv := client.KV()\n\n// PUT a new KV pair\np := &api.KVPair{Key: \"foo\", Value: []byte(\"test\")}\n_, err := kv.Put(p, nil)\nif err != nil {\n panic(err)\n}\n\n// Lookup the pair\npair, _, err := kv.Get(\"foo\", nil)\nif err != nil {\n panic(err)\n}\nfmt.Printf(\"KV: %v\", pair)\n\n```\n\n"} +{"text": "{\n \"iisSettings\": {\n \"windowsAuthentication\": false,\n \"anonymousAuthentication\": true,\n \"iisExpress\": {\n \"applicationUrl\": \"http://localhost:6100/\",\n \"sslPort\": 0\n }\n },\n \"profiles\": {\n \"IIS Express\": {\n \"commandName\": \"IISExpress\",\n \"launchBrowser\": true,\n \"environmentVariables\": {\n \"ASPNETCORE_ENVIRONMENT\": \"Development\"\n }\n },\n \"SportsStore\": {\n \"commandName\": \"Project\",\n \"launchBrowser\": true,\n \"environmentVariables\": {\n \"ASPNETCORE_ENVIRONMENT\": \"Development\"\n },\n \"applicationUrl\": \"http://localhost:50179\"\n }\n }\n}"} +{"text": "{% extends \"FOSUserBundle::layout.html.twig\" %}\n\n{% block subtitle %}{{ 'resetting.reset.heading'|trans() }}{% endblock %}\n\n{% form_theme form 'LadbCoreBundle:Common:_form-theme.twig.twig' %}\n\n{% block fos_user_content %}\n
\n
\n
\n
\n

{{ 'resetting.reset.heading'|trans() }}

\n
\n {{ form_start(form, { 'action':path('fos_user_resetting_reset', { 'token':token }), 'method':'POST' }) }}\n
\n {{ form_widget(form) }}\n
\n
\n \n
\n {{ form_end(form) }}\n
\n
\n
\n{% endblock fos_user_content %}\n"} +{"text": "namespace ClassLib063\n{\n public class Class060\n {\n public static string Property => \"ClassLib063\";\n }\n}\n"} +{"text": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\n\nadd_task(async function test_clearWindowValues() {\n /** Test for Bug 465223 **/\n\n let uniqueKey1 = \"bug 465223.1\";\n let uniqueKey2 = \"bug 465223.2\";\n let uniqueValue1 = \"unik\" + Date.now();\n let uniqueValue2 = \"pi != \" + Math.random();\n\n // open a window and set a value on it\n let newWin = openDialog(location, \"_blank\", \"chrome,all,dialog=no\");\n await promiseWindowLoaded(newWin);\n ss.setCustomWindowValue(newWin, uniqueKey1, uniqueValue1);\n\n let newState = { windows: [{ tabs: [{ entries: [] }], extData: {} }] };\n newState.windows[0].extData[uniqueKey2] = uniqueValue2;\n await setWindowState(newWin, newState);\n\n is(newWin.gBrowser.tabs.length, 2, \"original tab wasn't overwritten\");\n is(\n ss.getCustomWindowValue(newWin, uniqueKey1),\n uniqueValue1,\n \"window value wasn't overwritten when the tabs weren't\"\n );\n is(\n ss.getCustomWindowValue(newWin, uniqueKey2),\n uniqueValue2,\n \"new window value was correctly added\"\n );\n\n newState.windows[0].extData[uniqueKey2] = uniqueValue1;\n await setWindowState(newWin, newState, true);\n\n is(newWin.gBrowser.tabs.length, 1, \"original tabs were overwritten\");\n is(\n ss.getCustomWindowValue(newWin, uniqueKey1),\n \"\",\n \"window value was cleared\"\n );\n is(\n ss.getCustomWindowValue(newWin, uniqueKey2),\n uniqueValue1,\n \"window value was correctly overwritten\"\n );\n\n // clean up\n await BrowserTestUtils.closeWindow(newWin);\n});\n"} +{"text": "\r\n\r\n\r\n\r\n\r\nModelKMapCriterion\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n
\r\n\r\n\r\n\r\n
\r\n\r\n
\r\n
\r\n
    \r\n
  • Summary: 
  • \r\n
  • Nested | 
  • \r\n
  • Field | 
  • \r\n
  • Constr | 
  • \r\n
  • Method
  • \r\n
\r\n\r\n
\r\n\r\n\r\n
\r\n\r\n\r\n
\r\n
org.deidentifier.arx.gui.model
\r\n

Class ModelKMapCriterion

\r\n
\r\n
\r\n\r\n
\r\n
    \r\n
  • \r\n
    \r\n
    All Implemented Interfaces:
    \r\n
    java.io.Serializable
    \r\n
    \r\n
    \r\n
    \r\n
    public class ModelKMapCriterion\r\nextends ModelImplicitCriterion
    \r\n
    This class implements a model for the k-map criterion.
    \r\n
    \r\n
    Author:
    \r\n
    Fabian Prasser
    \r\n
    See Also:
    \r\n
    Serialized Form
    \r\n
    \r\n
  • \r\n
\r\n
\r\n
\r\n\r\n
\r\n
\r\n
    \r\n
  • \r\n\r\n
      \r\n
    • \r\n\r\n\r\n

      Constructor Detail

      \r\n\r\n\r\n\r\n
        \r\n
      • \r\n

        ModelKMapCriterion

        \r\n
        public ModelKMapCriterion()
        \r\n
        Creates a new instance
        \r\n
      • \r\n
      \r\n\r\n\r\n\r\n
        \r\n
      • \r\n

        ModelKMapCriterion

        \r\n
        public ModelKMapCriterion(int k)
        \r\n
        Creates a new instance
        \r\n
        \r\n
        Parameters:
        \r\n
        k -
        \r\n
        \r\n
      • \r\n
      \r\n
    • \r\n
    \r\n\r\n
      \r\n
    • \r\n\r\n\r\n

      Method Detail

      \r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
        \r\n
      • \r\n

        getEstimator

        \r\n
        public KMap.CellSizeEstimator getEstimator()
        \r\n
        Returns the estimator.
        \r\n
        \r\n
        Returns:
        \r\n
        \r\n
      • \r\n
      \r\n\r\n\r\n\r\n
        \r\n
      • \r\n

        getK

        \r\n
        public int getK()
        \r\n
        Returns k.
        \r\n
        \r\n
        Returns:
        \r\n
        \r\n
      • \r\n
      \r\n\r\n\r\n\r\n
        \r\n
      • \r\n

        getLabel

        \r\n
        public java.lang.String getLabel()
        \r\n
        Description copied from class: ModelCriterion
        \r\n
        Implement this to return a string representation.
        \r\n
        \r\n
        Specified by:
        \r\n
        getLabel in class ModelCriterion
        \r\n
        Returns:
        \r\n
        \r\n
      • \r\n
      \r\n\r\n\r\n\r\n
        \r\n
      • \r\n

        getSignificanceLevel

        \r\n
        public double getSignificanceLevel()
        \r\n
        Returns the significance level.
        \r\n
        \r\n
        Returns:
        \r\n
        \r\n
      • \r\n
      \r\n\r\n\r\n\r\n
        \r\n
      • \r\n

        parse

        \r\n
        public void parse(ModelCriterion criterion,\r\n                  boolean _default)
        \r\n
        Description copied from class: ModelCriterion
        \r\n
        Parse
        \r\n
        \r\n
        Specified by:
        \r\n
        parse in class ModelCriterion
        \r\n
        _default - Defines whether the model represents a typical parameter configuration for the criterion
        \r\n
        \r\n
      • \r\n
      \r\n\r\n\r\n\r\n
        \r\n
      • \r\n

        setEstimator

        \r\n
        public void setEstimator(KMap.CellSizeEstimator estimator)
        \r\n
        Sets the used estimator.
        \r\n
        \r\n
        Parameters:
        \r\n
        estimator -
        \r\n
        \r\n
      • \r\n
      \r\n\r\n\r\n\r\n
        \r\n
      • \r\n

        setK

        \r\n
        public void setK(int k)
        \r\n
        Sets k.
        \r\n
        \r\n
        Parameters:
        \r\n
        k -
        \r\n
        \r\n
      • \r\n
      \r\n\r\n\r\n\r\n
        \r\n
      • \r\n

        setSignificanceLevel

        \r\n
        public void setSignificanceLevel(double significanceLevel)
        \r\n
        Sets the significance level.
        \r\n
        \r\n
        Parameters:
        \r\n
        significanceLevel -
        \r\n
        \r\n
      • \r\n
      \r\n\r\n\r\n\r\n
        \r\n
      • \r\n

        toString

        \r\n
        public java.lang.String toString()
        \r\n
        Description copied from class: ModelCriterion
        \r\n
        Implement this to return a string representation.
        \r\n
        \r\n
        Specified by:
        \r\n
        toString in class ModelCriterion
        \r\n
        \r\n
      • \r\n
      \r\n
    • \r\n
    \r\n
  • \r\n
\r\n
\r\n
\r\n\r\n\r\n
\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n
\r\n
\r\n\r\n\r\n\r\n
\r\n\r\n
\r\n
\r\n
    \r\n
  • Summary: 
  • \r\n
  • Nested | 
  • \r\n
  • Field | 
  • \r\n
  • Constr | 
  • \r\n
  • Method
  • \r\n
\r\n\r\n
\r\n\r\n\r\n
\r\n\r\n\r\n\r\n"} +{"text": "---\nname: \"Google I/O\"\nwebsite: https://events.google.com/io/\nlocation: Mountain View, CA, USA\n\ndate_start: 2017-05-17\ndate_end: 2017-05-19\n---\n"} +{"text": "\n\n\n\n\tCFBundleDevelopmentRegion\n\ten\n\tCFBundleExecutable\n\t$(EXECUTABLE_NAME)\n\tCFBundleIdentifier\n\t$(PRODUCT_BUNDLE_IDENTIFIER)\n\tCFBundleInfoDictionaryVersion\n\t6.0\n\tCFBundleName\n\t$(PRODUCT_NAME)\n\tCFBundlePackageType\n\tAPPL\n\tCFBundleShortVersionString\n\t1.0\n\tCFBundleVersion\n\t1\n\tLSRequiresIPhoneOS\n\t\n\tUILaunchStoryboardName\n\tLaunchScreen\n\tUIMainStoryboardFile\n\tMain\n\tUIRequiredDeviceCapabilities\n\t\n\t\tarmv7\n\t\n\tUISupportedInterfaceOrientations\n\t\n\t\tUIInterfaceOrientationPortrait\n\t\tUIInterfaceOrientationLandscapeLeft\n\t\tUIInterfaceOrientationLandscapeRight\n\t\n\tUISupportedInterfaceOrientations~ipad\n\t\n\t\tUIInterfaceOrientationPortrait\n\t\tUIInterfaceOrientationPortraitUpsideDown\n\t\tUIInterfaceOrientationLandscapeLeft\n\t\tUIInterfaceOrientationLandscapeRight\n\t\n\n\n"} +{"text": "\n\n \n System.ComponentModel.Annotations\n \n \n \n Specifies that an entity member represents a data relationship, such as a foreign key relationship.\n \n \n Initializes a new instance of the class.\n The name of the association. \n A comma-separated list of the property names of the key values on the side of the association.\n A comma-separated list of the property names of the key values on the side of the association.\n \n \n Gets or sets a value that indicates whether the association member represents a foreign key.\n true if the association represents a foreign key; otherwise, false.\n \n \n Gets the name of the association.\n The name of the association.\n \n \n Gets the property names of the key values on the OtherKey side of the association.\n A comma-separated list of the property names that represent the key values on the OtherKey side of the association.\n \n \n Gets a collection of individual key members that are specified in the property.\n A collection of individual key members that are specified in the property.\n \n \n Gets the property names of the key values on the ThisKey side of the association.\n A comma-separated list of the property names that represent the key values on the ThisKey side of the association.\n \n \n Gets a collection of individual key members that are specified in the property.\n A collection of individual key members that are specified in the property.\n \n \n Provides an attribute that compares two properties.\n \n \n Initializes a new instance of the class.\n The property to compare with the current property.\n \n \n Applies formatting to an error message, based on the data field where the error occurred.\n The formatted error message.\n The name of the field that caused the validation failure.\n \n \n Determines whether a specified object is valid.\n true if is valid; otherwise, false.\n The object to validate.\n An object that contains information about the validation request.\n \n \n Gets the property to compare with the current property.\n The other property.\n \n \n Gets the display name of the other property.\n The display name of the other property.\n \n \n Gets a value that indicates whether the attribute requires validation context.\n true if the attribute requires validation context; otherwise, false.\n \n \n Specifies that a property participates in optimistic concurrency checks.\n \n \n Initializes a new instance of the class.\n \n \n Specifies that a data field value is a credit card number.\n \n \n Initializes a new instance of the class.\n \n \n Determines whether the specified credit card number is valid. \n true if the credit card number is valid; otherwise, false.\n The value to validate.\n \n \n Specifies a custom validation method that is used to validate a property or class instance.\n \n \n Initializes a new instance of the class.\n The type that contains the method that performs custom validation.\n The method that performs custom validation.\n \n \n Formats a validation error message.\n An instance of the formatted error message.\n The name to include in the formatted message.\n \n \n Gets the validation method.\n The name of the validation method.\n \n \n Gets the type that performs custom validation.\n The type that performs custom validation.\n \n \n Represents an enumeration of the data types associated with data fields and parameters. \n \n \n Represents a credit card number.\n \n \n Represents a currency value.\n \n \n Represents a custom data type.\n \n \n Represents a date value.\n \n \n Represents an instant in time, expressed as a date and time of day.\n \n \n Represents a continuous time during which an object exists.\n \n \n Represents an e-mail address.\n \n \n Represents an HTML file.\n \n \n Represents a URL to an image.\n \n \n Represents multi-line text.\n \n \n Represent a password value.\n \n \n Represents a phone number value.\n \n \n Represents a postal code.\n \n \n Represents text that is displayed.\n \n \n Represents a time value.\n \n \n Represents file upload data type.\n \n \n Represents a URL value.\n \n \n Specifies the name of an additional type to associate with a data field.\n \n \n Initializes a new instance of the class by using the specified type name.\n The name of the type to associate with the data field.\n \n \n Initializes a new instance of the class by using the specified field template name.\n The name of the custom field template to associate with the data field.\n \n is null or an empty string (\"\"). \n \n \n Gets the name of custom field template that is associated with the data field.\n The name of the custom field template that is associated with the data field.\n \n \n Gets the type that is associated with the data field.\n One of the values.\n \n \n Gets a data-field display format.\n The data-field display format.\n \n \n Returns the name of the type that is associated with the data field.\n The name of the type associated with the data field.\n \n \n Checks that the value of the data field is valid.\n true always.\n The data field value to validate.\n \n \n Provides a general-purpose attribute that lets you specify localizable strings for types and members of entity partial classes.\n \n \n Initializes a new instance of the class.\n \n \n Gets or sets a value that indicates whether UI should be generated automatically in order to display this field.\n true if UI should be generated automatically to display this field; otherwise, false.\n An attempt was made to get the property value before it was set.\n \n \n Gets or sets a value that indicates whether filtering UI is automatically displayed for this field. \n true if UI should be generated automatically to display filtering for this field; otherwise, false.\n An attempt was made to get the property value before it was set.\n \n \n Gets or sets a value that is used to display a description in the UI.\n The value that is used to display a description in the UI.\n \n \n Returns the value of the property.\n The value of if the property has been initialized; otherwise, null.\n \n \n Returns a value that indicates whether UI should be generated automatically in order to display filtering for this field. \n The value of if the property has been initialized; otherwise, null.\n \n \n Returns the value of the property.\n The localized description, if the has been specified and the property represents a resource key; otherwise, the non-localized value of the property.\n The property and the property are initialized, but a public static property that has a name that matches the value could not be found for the property.\n \n \n Returns the value of the property.\n A value that will be used for grouping fields in the UI, if has been initialized; otherwise, null. If the property has been specified and the property represents a resource key, a localized string is returned; otherwise, a non-localized string is returned.\n \n \n Returns a value that is used for field display in the UI.\n The localized string for the property, if the property has been specified and the property represents a resource key; otherwise, the non-localized value of the property.\n The property and the property are initialized, but a public static property that has a name that matches the value could not be found for the property.\n \n \n Returns the value of the property.\n The value of the property, if it has been set; otherwise, null.\n \n \n Returns the value of the property.\n Gets the localized string for the property if the property has been specified and if the property represents a resource key; otherwise, the non-localized value of the property.\n \n \n Returns the value of the property.\n The localized string for the property if the property has been specified and if the property represents a resource key; otherwise, the non-localized value of the value property.\n \n \n Gets or sets a value that is used to group fields in the UI.\n A value that is used to group fields in the UI.\n \n \n Gets or sets a value that is used for display in the UI.\n A value that is used for display in the UI.\n \n \n Gets or sets the order weight of the column.\n The order weight of the column.\n \n \n Gets or sets a value that will be used to set the watermark for prompts in the UI.\n A value that will be used to display a watermark in the UI.\n \n \n Gets or sets the type that contains the resources for the , , , and properties.\n The type of the resource that contains the , , , and properties.\n \n \n Gets or sets a value that is used for the grid column label.\n A value that is for the grid column label.\n \n \n Specifies the column that is displayed in the referred table as a foreign-key column.\n \n \n Initializes a new instance of the class by using the specified column. \n The name of the column to use as the display column.\n \n \n Initializes a new instance of the class by using the specified display and sort columns. \n The name of the column to use as the display column.\n The name of the column to use for sorting.\n \n \n Initializes a new instance of the class by using the specified display column, and the specified sort column and sort order. \n The name of the column to use as the display column.\n The name of the column to use for sorting.\n true to sort in descending order; otherwise, false. The default is false.\n \n \n Gets the name of the column to use as the display field.\n The name of the display column.\n \n \n Gets the name of the column to use for sorting.\n The name of the sort column.\n \n \n Gets a value that indicates whether to sort in descending or ascending order.\n true if the column will be sorted in descending order; otherwise, false.\n \n \n Specifies how data fields are displayed and formatted by ASP.NET Dynamic Data.\n \n \n Initializes a new instance of the class. \n \n \n Gets or sets a value that indicates whether the formatting string that is specified by the property is applied to the field value when the data field is in edit mode.\n true if the formatting string applies to the field value in edit mode; otherwise, false. The default is false.\n \n \n Gets or sets a value that indicates whether empty string values (\"\") are automatically converted to null when the data field is updated in the data source.\n true if empty string values are automatically converted to null; otherwise, false. The default is true.\n \n \n Gets or sets the display format for the field value.\n A formatting string that specifies the display format for the value of the data field. The default is an empty string (\"\"), which indicates that no special formatting is applied to the field value.\n \n \n Gets or sets a value that indicates whether the field should be HTML-encoded.\n true if the field should be HTML-encoded; otherwise, false.\n \n \n Gets or sets the text that is displayed for a field when the field's value is null.\n The text that is displayed for a field when the field's value is null. The default is an empty string (\"\"), which indicates that this property is not set.\n \n \n Indicates whether a data field is editable.\n \n \n Initializes a new instance of the class.\n true to specify that field is editable; otherwise, false.\n \n \n Gets a value that indicates whether a field is editable.\n true if the field is editable; otherwise, false.\n \n \n Gets or sets a value that indicates whether an initial value is enabled.\n true if an initial value is enabled; otherwise, false.\n \n \n Validates an email address.\n \n \n Initializes a new instance of the class.\n \n \n Determines whether the specified value matches the pattern of a valid email address.\n true if the specified value is valid or null; otherwise, false.\n The value to validate.\n \n \n Enables a .NET Framework enumeration to be mapped to a data column.\n \n \n Initializes a new instance of the class.\n The type of the enumeration.\n \n \n Gets or sets the enumeration type.\n The enumeration type.\n \n \n Checks that the value of the data field is valid.\n true if the data field value is valid; otherwise, false.\n The data field value to validate.\n \n \n Validates file name extensions.\n \n \n Initializes a new instance of the class.\n \n \n Gets or sets the file name extensions.\n The file name extensions, or the default file extensions (\".png\", \".jpg\", \".jpeg\", and \".gif\") if the property is not set.\n \n \n Applies formatting to an error message, based on the data field where the error occurred.\n The formatted error message.\n The name of the field that caused the validation failure.\n \n \n Checks that the specified file name extension or extensions is valid.\n true if the file name extension is valid; otherwise, false.\n A comma delimited list of valid file extensions.\n \n \n Represents an attribute that is used to specify the filtering behavior for a column.\n \n \n Initializes a new instance of the class by using the filter UI hint.\n The name of the control to use for filtering.\n \n \n Initializes a new instance of the class by using the filter UI hint and presentation layer name.\n The name of the control to use for filtering.\n The name of the presentation layer that supports this control.\n \n \n Initializes a new instance of the class by using the filter UI hint, presentation layer name, and control parameters.\n The name of the control to use for filtering.\n The name of the presentation layer that supports this control.\n The list of parameters for the control.\n \n \n Gets the name/value pairs that are used as parameters in the control's constructor.\n The name/value pairs that are used as parameters in the control's constructor.\n \n \n Returns a value that indicates whether this attribute instance is equal to a specified object.\n True if the passed object is equal to this attribute instance; otherwise, false.\n The object to compare with this attribute instance.\n \n \n Gets the name of the control to use for filtering.\n The name of the control to use for filtering.\n \n \n Returns the hash code for this attribute instance.\n This attribute insatnce hash code.\n \n \n Gets the name of the presentation layer that supports this control.\n The name of the presentation layer that supports this control.\n \n \n Provides a way for an object to be invalidated.\n \n \n Determines whether the specified object is valid.\n A collection that holds failed-validation information.\n The validation context.\n \n \n Denotes one or more properties that uniquely identify an entity.\n \n \n Initializes a new instance of the class.\n \n \n Specifies the maximum length of array or string data allowed in a property.\n \n \n Initializes a new instance of the class.\n \n \n Initializes a new instance of the class based on the parameter.\n The maximum allowable length of array or string data.\n \n \n Applies formatting to a specified error message.\n A localized string to describe the maximum acceptable length.\n The name to include in the formatted string.\n \n \n Determines whether a specified object is valid.\n true if the value is null, or if the value is less than or equal to the specified maximum length; otherwise, false.\n The object to validate.\n Length is zero or less than negative one.\n \n \n Gets the maximum allowable length of the array or string data.\n The maximum allowable length of the array or string data.\n \n \n Specifies the minimum length of array or string data allowed in a property.\n \n \n Initializes a new instance of the class.\n The length of the array or string data.\n \n \n Applies formatting to a specified error message.\n A localized string to describe the minimum acceptable length.\n The name to include in the formatted string.\n \n \n Determines whether a specified object is valid.\n true if the specified object is valid; otherwise, false.\n The object to validate.\n \n \n Gets or sets the minimum allowable length of the array or string data.\n The minimum allowable length of the array or string data.\n \n \n Specifies that a data field value is a well-formed phone number using a regular expression for phone numbers.\n \n \n Initializes a new instance of the class.\n \n \n Determines whether the specified phone number is in a valid phone number format. \n true if the phone number is valid; otherwise, false.\n The value to validate.\n \n \n Specifies the numeric range constraints for the value of a data field. \n \n \n Initializes a new instance of the class by using the specified minimum and maximum values. \n Specifies the minimum value allowed for the data field value.\n Specifies the maximum value allowed for the data field value.\n \n \n Initializes a new instance of the class by using the specified minimum and maximum values.\n Specifies the minimum value allowed for the data field value.\n Specifies the maximum value allowed for the data field value.\n \n \n Initializes a new instance of the class by using the specified minimum and maximum values and the specific type.\n Specifies the type of the object to test.\n Specifies the minimum value allowed for the data field value.\n Specifies the maximum value allowed for the data field value.\n \n is null.\n \n \n Formats the error message that is displayed when range validation fails.\n The formatted error message.\n The name of the field that caused the validation failure. \n \n \n Checks that the value of the data field is in the specified range.\n true if the specified value is in the range; otherwise, false.\n The data field value to validate.\n The data field value was outside the allowed range.\n \n \n Gets the maximum allowed field value.\n The maximum value that is allowed for the data field.\n \n \n Gets the minimum allowed field value.\n The minimu value that is allowed for the data field.\n \n \n Gets the type of the data field whose value must be validated.\n The type of the data field whose value must be validated.\n \n \n Specifies that a data field value in ASP.NET Dynamic Data must match the specified regular expression.\n \n \n Initializes a new instance of the class.\n The regular expression that is used to validate the data field value. \n \n is null.\n \n \n Formats the error message to display if the regular expression validation fails.\n The formatted error message.\n The name of the field that caused the validation failure.\n \n \n Checks whether the value entered by the user matches the regular expression pattern. \n true if validation is successful; otherwise, false.\n The data field value to validate.\n The data field value did not match the regular expression pattern.\n \n \n Gets the regular expression pattern.\n The pattern to match.\n \n \n Specifies that a data field value is required.\n \n \n Initializes a new instance of the class.\n \n \n Gets or sets a value that indicates whether an empty string is allowed.\n true if an empty string is allowed; otherwise, false. The default value is false.\n \n \n Checks that the value of the required data field is not empty.\n true if validation is successful; otherwise, false.\n The data field value to validate.\n The data field value was null.\n \n \n Specifies whether a class or data column uses scaffolding.\n \n \n Initializes a new instance of using the property.\n The value that specifies whether scaffolding is enabled.\n \n \n Gets or sets the value that specifies whether scaffolding is enabled.\n true, if scaffolding is enabled; otherwise false.\n \n \n Specifies the minimum and maximum length of characters that are allowed in a data field.\n \n \n Initializes a new instance of the class by using a specified maximum length.\n The maximum length of a string. \n \n \n Applies formatting to a specified error message.\n The formatted error message.\n The name of the field that caused the validation failure.\n \n is negative. -or- is less than .\n \n \n Determines whether a specified object is valid.\n true if the specified object is valid; otherwise, false.\n The object to validate.\n \n is negative.-or- is less than .\n \n \n Gets or sets the maximum length of a string.\n The maximum length a string. \n \n \n Gets or sets the minimum length of a string.\n The minimum length of a string.\n \n \n Specifies the data type of the column as a row version.\n \n \n Initializes a new instance of the class.\n \n \n Specifies the template or user control that Dynamic Data uses to display a data field. \n \n \n Initializes a new instance of the class by using a specified user control. \n The user control to use to display the data field. \n \n \n Initializes a new instance of the class using the specified user control and specified presentation layer. \n The user control (field template) to use to display the data field.\n The presentation layer that uses the class. Can be set to \"HTML\", \"Silverlight\", \"WPF\", or \"WinForms\".\n \n \n Initializes a new instance of the class by using the specified user control, presentation layer, and control parameters.\n The user control (field template) to use to display the data field.\n The presentation layer that uses the class. Can be set to \"HTML\", \"Silverlight\", \"WPF\", or \"WinForms\".\n The object to use to retrieve values from any data sources. \n \n is null or it is a constraint key.-or-The value of is not a string. \n \n \n Gets or sets the object to use to retrieve values from any data source.\n A collection of key/value pairs. \n \n \n Gets a value that indicates whether this instance is equal to the specified object.\n true if the specified object is equal to this instance; otherwise, false.\n The object to compare with this instance, or a null reference.\n \n \n Gets the hash code for the current instance of the attribute.\n The attribute instance hash code.\n \n \n Gets or sets the presentation layer that uses the class. \n The presentation layer that is used by this class.\n \n \n Gets or sets the name of the field template to use to display the data field.\n The name of the field template that displays the data field.\n \n \n Provides URL validation.\n \n \n Initializes a new instance of the class.\n \n \n Validates the format of the specified URL.\n true if the URL format is valid or null; otherwise, false.\n The URL to validate.\n \n \n Serves as the base class for all validation attributes.\n The and properties for localized error message are set at the same time that the non-localized property error message is set.\n \n \n Initializes a new instance of the class.\n \n \n Initializes a new instance of the class by using the function that enables access to validation resources.\n The function that enables access to validation resources.\n \n is null.\n \n \n Initializes a new instance of the class by using the error message to associate with a validation control.\n The error message to associate with a validation control.\n \n \n Gets or sets an error message to associate with a validation control if validation fails.\n The error message that is associated with the validation control.\n \n \n Gets or sets the error message resource name to use in order to look up the property value if validation fails.\n The error message resource that is associated with a validation control.\n \n \n Gets or sets the resource type to use for error-message lookup if validation fails.\n The type of error message that is associated with a validation control.\n \n \n Gets the localized validation error message.\n The localized validation error message.\n \n \n Applies formatting to an error message, based on the data field where the error occurred. \n An instance of the formatted error message.\n The name to include in the formatted message.\n \n \n Checks whether the specified value is valid with respect to the current validation attribute.\n An instance of the class. \n The value to validate.\n The context information about the validation operation.\n \n \n Determines whether the specified value of the object is valid. \n true if the specified value is valid; otherwise, false.\n The value of the object to validate. \n \n \n Validates the specified value with respect to the current validation attribute.\n An instance of the class. \n The value to validate.\n The context information about the validation operation.\n \n \n Gets a value that indicates whether the attribute requires validation context.\n true if the attribute requires validation context; otherwise, false.\n \n \n Validates the specified object.\n The object to validate.\n The object that describes the context where the validation checks are performed. This parameter cannot be null.\n Validation failed.\n \n \n Validates the specified object.\n The value of the object to validate.\n The name to include in the error message.\n \n is not valid.\n \n \n Describes the context in which a validation check is performed.\n \n \n Initializes a new instance of the class using the specified object instance\n The object instance to validate. It cannot be null.\n \n \n Initializes a new instance of the class using the specified object and an optional property bag.\n The object instance to validate. It cannot be null\n An optional set of key/value pairs to make available to consumers.\n \n \n Initializes a new instance of the class using the service provider and dictionary of service consumers. \n The object to validate. This parameter is required.\n The object that implements the interface. This parameter is optional.\n A dictionary of key/value pairs to make available to the service consumers. This parameter is optional.\n \n \n Gets or sets the name of the member to validate. \n The name of the member to validate. \n \n \n Returns the service that provides custom validation.\n An instance of the service, or null if the service is not available.\n The type of the service to use for validation.\n \n \n Initializes the using a service provider that can return service instances by type when GetService is called.\n The service provider.\n \n \n Gets the dictionary of key/value pairs that is associated with this context.\n The dictionary of the key/value pairs for this context.\n \n \n Gets or sets the name of the member to validate. \n The name of the member to validate. \n \n \n Gets the object to validate.\n The object to validate.\n \n \n Gets the type of the object to validate.\n The type of the object to validate.\n \n \n Represents the exception that occurs during validation of a data field when the class is used. \n \n \n Initializes a new instance of the class using an error message generated by the system.\n \n \n Initializes a new instance of the class by using a validation result, a validation attribute, and the value of the current exception.\n The list of validation results.\n The attribute that caused the current exception.\n The value of the object that caused the attribute to trigger the validation error.\n \n \n Initializes a new instance of the class using a specified error message.\n A specified message that states the error.\n \n \n Initializes a new instance of the class using a specified error message, a validation attribute, and the value of the current exception.\n The message that states the error.\n The attribute that caused the current exception.\n The value of the object that caused the attribute to trigger validation error.\n \n \n Initializes a new instance of the class using a specified error message and a collection of inner exception instances.\n The error message. \n The collection of validation exceptions.\n \n \n Gets the instance of the class that triggered this exception.\n An instance of the validation attribute type that triggered this exception.\n \n \n Gets the instance that describes the validation error.\n The instance that describes the validation error.\n \n \n Gets the value of the object that causes the class to trigger this exception.\n The value of the object that caused the class to trigger the validation error.\n \n \n Represents a container for the results of a validation request.\n \n \n Initializes a new instance of the class by using a object.\n The validation result object.\n \n \n Initializes a new instance of the class by using an error message.\n The error message.\n \n \n Initializes a new instance of the class by using an error message and a list of members that have validation errors.\n The error message.\n The list of member names that have validation errors.\n \n \n Gets the error message for the validation.\n The error message for the validation.\n \n \n Gets the collection of member names that indicate which fields have validation errors.\n The collection of member names that indicate which fields have validation errors.\n \n \n Represents the success of the validation (true if validation was successful; otherwise, false).\n \n \n Returns a string representation of the current validation result.\n The current validation result.\n \n \n Defines a helper class that can be used to validate objects, properties, and methods when it is included in their associated attributes.\n \n \n Determines whether the specified object is valid using the validation context and validation results collection.\n true if the object validates; otherwise, false.\n The object to validate.\n The context that describes the object to validate.\n A collection to hold each failed validation.\n \n is null.\n \n \n Determines whether the specified object is valid using the validation context, validation results collection, and a value that specifies whether to validate all properties.\n true if the object validates; otherwise, false.\n The object to validate.\n The context that describes the object to validate.\n A collection to hold each failed validation.\n true to validate all properties; if false, only required attributes are validated..\n \n is null.\n \n \n Validates the property.\n true if the property validates; otherwise, false.\n The value to validate.\n The context that describes the property to validate.\n A collection to hold each failed validation. \n \n cannot be assigned to the property.-or-is null.\n \n \n Returns a value that indicates whether the specified value is valid with the specified attributes.\n true if the object validates; otherwise, false.\n The value to validate.\n The context that describes the object to validate.\n A collection to hold failed validations. \n The validation attributes.\n \n \n Determines whether the specified object is valid using the validation context.\n The object to validate.\n The context that describes the object to validate.\n The object is not valid.\n \n is null.\n \n \n Determines whether the specified object is valid using the validation context, and a value that specifies whether to validate all properties.\n The object to validate.\n The context that describes the object to validate.\n true to validate all properties; otherwise, false.\n \n is not valid.\n \n is null.\n \n \n Validates the property.\n The value to validate.\n The context that describes the property to validate.\n \n cannot be assigned to the property.\n The parameter is not valid.\n \n \n Validates the specified attributes.\n The value to validate.\n The context that describes the object to validate.\n The validation attributes.\n The parameter is null.\n The parameter does not validate with the parameter.\n \n \n Represents the database column that a property is mapped to.\n \n \n Initializes a new instance of the class.\n \n \n Initializes a new instance of the class.\n The name of the column the property is mapped to.\n \n \n Gets the name of the column the property is mapped to.\n The name of the column the property is mapped to.\n \n \n Gets or sets the zero-based order of the column the property is mapped to.\n The order of the column.\n \n \n Gets or sets the database provider specific data type of the column the property is mapped to.\n The database provider specific data type of the column the property is mapped to.\n \n \n Denotes that the class is a complex type. Complex types are non-scalar properties of entity types that enable scalar properties to be organized within entities. Complex types do not have keys and cannot be managed by the Entity Framework apart from the parent object.\n \n \n Initializes a new instance of the class.\n \n \n Specifies how the database generates values for a property.\n \n \n Initializes a new instance of the class.\n The database generated option.\n \n \n Gets or sets the pattern used to generate values for the property in the database.\n The database generated option.\n \n \n Represents the pattern used to generate values for a property in the database.\n \n \n The database generates a value when a row is inserted or updated.\n \n \n The database generates a value when a row is inserted.\n \n \n The database does not generate values.\n \n \n Denotes a property used as a foreign key in a relationship. The annotation may be placed on the foreign key property and specify the associated navigation property name, or placed on a navigation property and specify the associated foreign key name.\n \n \n Initializes a new instance of the class.\n If you add the ForeigKey attribute to a foreign key property, you should specify the name of the associated navigation property. If you add the ForeigKey attribute to a navigation property, you should specify the name of the associated foreign key(s). If a navigation property has multiple foreign keys, use comma to separate the list of foreign key names. For more information, see Code First Data Annotations. \n \n \n If you add the ForeigKey attribute to a foreign key property, you should specify the name of the associated navigation property. If you add the ForeigKey attribute to a navigation property, you should specify the name of the associated foreign key(s). If a navigation property has multiple foreign keys, use comma to separate the list of foreign key names. For more information, see Code First Data Annotations. \n The name of the associated navigation property or the associated foreign key property.\n \n \n Specifies the inverse of a navigation property that represents the other end of the same relationship.\n \n \n Initializes a new instance of the class using the specified property.\n The navigation property representing the other end of the same relationship.\n \n \n Gets the navigation property representing the other end of the same relationship.\n The property of the attribute.\n \n \n Denotes that a property or class should be excluded from database mapping.\n \n \n Initializes a new instance of the class.\n \n \n Specifies the database table that a class is mapped to.\n \n \n Initializes a new instance of the class using the specified name of the table.\n The name of the table the class is mapped to.\n \n \n Gets the name of the table the class is mapped to.\n The name of the table the class is mapped to.\n \n \n Gets or sets the schema of the table the class is mapped to.\n The schema of the table the class is mapped to.\n \n \n"} +{"text": "# Copyright 2017 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nsource_set(\"metrics\") {\n sources = [\n \"ukm_recorder_interface.cc\",\n \"ukm_recorder_interface.h\",\n ]\n\n configs += [ \"//build/config/compiler:wexit_time_destructors\" ]\n\n deps = [\n \"//mojo/public/cpp/bindings\",\n \"//services/metrics/public/cpp:metrics_cpp\",\n \"//services/metrics/public/mojom\",\n \"//url\",\n ]\n}\n"} +{"text": "using GraphQL.Types;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\n\nnamespace GraphQLAPI.Types\n{\n public class ItemInputType : InputObjectGraphType\n {\n public ItemInputType()\n {\n Name = \"ItemInput\";\n Field>(\"barcode\");\n Field>(\"title\");\n Field>(\"sellingPrice\");\n }\n }\n}\n"} +{"text": "\n\n\n\n\n"} +{"text": "/* -*- mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- */\n// vim: ft=cpp:expandtab:ts=8:sw=4:softtabstop=4:\n#ident \"$Id$\"\n/*\nCOPYING CONDITIONS NOTICE:\n\n This program is free software; you can redistribute it and/or modify\n it under the terms of version 2 of the GNU General Public License as\n published by the Free Software Foundation, and provided that the\n following conditions are met:\n\n * Redistributions of source code must retain this COPYING\n CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the\n DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the\n PATENT MARKING NOTICE (below), and the PATENT RIGHTS\n GRANT (below).\n\n * Redistributions in binary form must reproduce this COPYING\n CONDITIONS NOTICE, the COPYRIGHT NOTICE (below), the\n DISCLAIMER (below), the UNIVERSITY PATENT NOTICE (below), the\n PATENT MARKING NOTICE (below), and the PATENT RIGHTS\n GRANT (below) in the documentation and/or other materials\n provided with the distribution.\n\n You should have received a copy of the GNU General Public License\n along with this program; if not, write to the Free Software\n Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA\n 02110-1301, USA.\n\nCOPYRIGHT NOTICE:\n\n TokuDB, Tokutek Fractal Tree Indexing Library.\n Copyright (C) 2007-2013 Tokutek, Inc.\n\nDISCLAIMER:\n\n This program is distributed in the hope that it will be useful, but\n WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n General Public License for more details.\n\nUNIVERSITY PATENT NOTICE:\n\n The technology is licensed by the Massachusetts Institute of\n Technology, Rutgers State University of New Jersey, and the Research\n Foundation of State University of New York at Stony Brook under\n United States of America Serial No. 11/760379 and to the patents\n and/or patent applications resulting from it.\n\nPATENT MARKING NOTICE:\n\n This software is covered by US Patent No. 8,185,551.\n This software is covered by US Patent No. 8,489,638.\n\nPATENT RIGHTS GRANT:\n\n \"THIS IMPLEMENTATION\" means the copyrightable works distributed by\n Tokutek as part of the Fractal Tree project.\n\n \"PATENT CLAIMS\" means the claims of patents that are owned or\n licensable by Tokutek, both currently or in the future; and that in\n the absence of this license would be infringed by THIS\n IMPLEMENTATION or by using or running THIS IMPLEMENTATION.\n\n \"PATENT CHALLENGE\" shall mean a challenge to the validity,\n patentability, enforceability and/or non-infringement of any of the\n PATENT CLAIMS or otherwise opposing any of the PATENT CLAIMS.\n\n Tokutek hereby grants to you, for the term and geographical scope of\n the PATENT CLAIMS, a non-exclusive, no-charge, royalty-free,\n irrevocable (except as stated in this section) patent license to\n make, have made, use, offer to sell, sell, import, transfer, and\n otherwise run, modify, and propagate the contents of THIS\n IMPLEMENTATION, where such license applies only to the PATENT\n CLAIMS. This grant does not include claims that would be infringed\n only as a consequence of further modifications of THIS\n IMPLEMENTATION. If you or your agent or licensee institute or order\n or agree to the institution of patent litigation against any entity\n (including a cross-claim or counterclaim in a lawsuit) alleging that\n THIS IMPLEMENTATION constitutes direct or contributory patent\n infringement, or inducement of patent infringement, then any rights\n granted to you under this License shall terminate as of the date\n such litigation is filed. If you or your agent or exclusive\n licensee institute or order or agree to the institution of a PATENT\n CHALLENGE, then Tokutek may terminate any rights granted to you\n under this License.\n*/\n\n#ident \"Copyright (c) 2007-2013 Tokutek Inc. All rights reserved.\"\n#ident \"The technology is licensed by the Massachusetts Institute of Technology, Rutgers State University of New Jersey, and the Research Foundation of State University of New York at Stony Brook under United States of America Serial No. 11/760379 and to the patents and/or patent applications resulting from it.\"\n\n// This test, when run under helgrind, should detect the race problem documented in #3219.\n// The test:\n// checkpointing runs (in one thread)\n// another thread does a brt lookup.\n// We expect to see a lock-acquisition error.\n\n\n#include \"test.h\"\n#include \n\n\nstatic DB_ENV *env;\nstatic DB *db;\n\nstatic void\ninsert(int i, DB_TXN *txn)\n{\n char hello[30], there[30];\n snprintf(hello, sizeof(hello), \"hello%d\", i);\n snprintf(there, sizeof(there), \"there%d\", i);\n DBT key, val;\n int r=db->put(db, txn,\n\t\t dbt_init(&key, hello, strlen(hello)+1),\n\t\t dbt_init(&val, there, strlen(there)+1),\n\t\t 0);\n CKERR(r);\n}\n\nstatic void\nlookup(int i, DB_TXN *txn)\n// Do a lookup, but don't complain if it's not there.\n{\n char hello[30], there[30], expectthere[30];\n snprintf(hello, sizeof(hello), \"hello%d\", i);\n snprintf(expectthere, sizeof(expectthere), \"there%d\", i);\n DBT key, val;\n val.data = there;\n val.ulen = sizeof there;\n val.flags = DB_DBT_USERMEM;\n int r=db->get(db, txn,\n\t\t dbt_init(&key, hello, strlen(hello)+1),\n\t\t &val,\n\t\t 0);\n if (r==0) {\n\tassert(val.data==there);\n\tassert(val.size==strlen(expectthere)+1);\n\t//printf(\"Found %s, expected %s\\n\", there, expectthere);\n\tassert(strcmp(there, expectthere)==0);\n }\n}\n\n#define N_ROWS 1000000\n#define N_TXNS 10000\n#define N_ROWS_PER_TXN 1\n\n#define INITIAL_SIZE 1000\n//#define N_TXNS 10\n//#define PER_TXN 10000\n\nstatic void\nsetup (void) {\n int r;\n toku_os_recursive_delete(TOKU_TEST_FILENAME);\n toku_os_mkdir(TOKU_TEST_FILENAME, S_IRWXU+S_IRWXG+S_IRWXO);\n r = db_env_create(&env, 0); CKERR(r);\n r = env->set_redzone(env, 0); CKERR(r);\n r = env->set_cachesize(env, 0, 128*1024, 1); CKERR(r);\n r = env->open(env, TOKU_TEST_FILENAME, DB_INIT_LOCK|DB_INIT_LOG|DB_INIT_MPOOL|DB_INIT_TXN|DB_CREATE|DB_PRIVATE, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);\n r = db_create(&db, env, 0); CKERR(r);\n r = db->set_pagesize(db, 4096); CKERR(r);\n {\n\tDB_TXN *txn;\n\tr = env->txn_begin(env, 0, &txn, 0); CKERR(r);\n\tr = db->open(db, txn, \"foo.db\", 0, DB_BTREE, DB_CREATE, S_IRWXU+S_IRWXG+S_IRWXO); CKERR(r);\n\tr = txn->commit(txn, 0); CKERR(r);\n }\n {\n\tDB_TXN *txn;\n\tr = env->txn_begin(env, 0, &txn, 0); CKERR(r);\n\tfor (int i=0; icommit(txn, 0); CKERR(r);\n }\n}\n\n\nstatic void\nfinish (void) {\n int r;\n r = db->close(db, 0); CKERR(r);\n r = env->close(env, 0); CKERR(r);\n}\n\n\nvolatile int finished = false;\n\n// Thread A performs checkpoints\nstatic void*\nstart_a (void *arg __attribute__((__unused__))) {\n //r=env->txn_checkpoint(env, 0, 0, 0); CKERR(r);\n while (!finished) {\n\tint r;\n\tr=env->txn_checkpoint(env, 0, 0, 0); CKERR(r);\n\tsleep(1);\n }\n return NULL;\n}\n\n// Thread B performs insertions (eventually they start overwriting the same record).\nstatic void*\nstart_b (void *arg __attribute__((__unused__))) {\n int r;\n for (int j=0; jtxn_begin(env, 0, &txn, 0); CKERR(r);\n\tfor (int i=0; icommit(txn, DB_TXN_NOSYNC); CKERR(r);\n }\n finished = true;\n return NULL;\n}\n\n// Thread C performs lookups\nstatic void*\nstart_c (void *arg __attribute__((__unused__))) {\n int r;\n while (!finished) {\n\tDB_TXN *txn;\n\tr = env->txn_begin(env, 0, &txn, 0); CKERR(r);\n\tlookup(random()%N_ROWS, txn);\n\tr = txn->commit(txn, DB_TXN_NOSYNC); CKERR(r);\n }\n return NULL;\n}\n\n\ntypedef void *(*pthread_fun)(void*);\n\nstatic void\nrun_test (void)\n{\n setup();\n pthread_t t[3];\n pthread_fun funs[3] = {start_a, start_b, start_c};\n finished = false;\n for (int i=0; i<3; i++) {\n\tint r = pthread_create(&t[i], NULL, funs[i], NULL);\n\tassert(r==0);\n }\n for (int i=0; i<3; i++) {\n\tvoid *rv;\n\tint r = pthread_join(t[i], &rv);\n\tassert(r==0 && rv==NULL);\n }\n finish();\n}\n\nint test_main (int argc, char*const argv[]) {\n parse_args(argc, argv);\n run_test();\n if (verbose) printf(\"\\n\");\n return 0;\n}\n"} +{"text": "--TEST--\nphpunit --filter testFalse@false.* DataProviderFilterTest ../../_files/DataProviderFilterTest.php\n--FILE--\n true\n *\n * _.inRange(4, 8);\n * // => true\n *\n * _.inRange(4, 2);\n * // => false\n *\n * _.inRange(2, 2);\n * // => false\n *\n * _.inRange(1.2, 2);\n * // => true\n *\n * _.inRange(5.2, 4);\n * // => false\n */\nfunction inRange(value, start, end) {\n start = +start || 0;\n if (end === undefined) {\n end = start;\n start = 0;\n } else {\n end = +end || 0;\n }\n return value >= nativeMin(start, end) && value < nativeMax(start, end);\n}\n\nmodule.exports = inRange;\n"} +{"text": ".. POT documentation master file, created by\n sphinx-quickstart on Mon Oct 24 11:10:10 2016.\n You can adapt this file completely to your liking, but it should at least\n contain the root `toctree` directive.\n\nPOT: Python Optimal Transport\n=============================\n\nContents\n--------\n\n.. toctree::\n :maxdepth: 1\n\n self\n quickstart\n all\n auto_examples/index\n releases\n\n.. include:: readme.rst\n :start-line: 2\n\n\n\nIndices and tables\n==================\n\n* :ref:`genindex`\n* :ref:`modindex`\n* :ref:`search`\n"} +{"text": "\n \n \n"} +{"text": "{\n \"_args\": [\n [\n \"is-dotfile@1.0.3\",\n \"E:\\\\工作\\\\workpace\\\\web\\\\webpack-demo\"\n ]\n ],\n \"_development\": true,\n \"_from\": \"is-dotfile@1.0.3\",\n \"_id\": \"is-dotfile@1.0.3\",\n \"_inBundle\": false,\n \"_integrity\": \"sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=\",\n \"_location\": \"/is-dotfile\",\n \"_phantomChildren\": {},\n \"_requested\": {\n \"type\": \"version\",\n \"registry\": true,\n \"raw\": \"is-dotfile@1.0.3\",\n \"name\": \"is-dotfile\",\n \"escapedName\": \"is-dotfile\",\n \"rawSpec\": \"1.0.3\",\n \"saveSpec\": null,\n \"fetchSpec\": \"1.0.3\"\n },\n \"_requiredBy\": [\n \"/parse-glob\"\n ],\n \"_resolved\": \"https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz\",\n \"_spec\": \"1.0.3\",\n \"_where\": \"E:\\\\工作\\\\workpace\\\\web\\\\webpack-demo\",\n \"author\": {\n \"name\": \"Jon Schlinkert\",\n \"url\": \"https://github.com/jonschlinkert\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/jonschlinkert/is-dotfile/issues\"\n },\n \"contributors\": [\n {\n \"name\": \"Evan Lowry\",\n \"url\": \"http://exitiumonline.com\"\n },\n {\n \"name\": \"Jon Schlinkert\",\n \"url\": \"http://twitter.com/jonschlinkert\"\n }\n ],\n \"description\": \"Return true if a file path is (or has) a dotfile. Returns false if the path is a dot directory.\",\n \"devDependencies\": {\n \"benchmarked\": \"^0.1.3\",\n \"dotfile-regex\": \"^0.1.2\",\n \"gulp-format-md\": \"^0.1.12\",\n \"mocha\": \"*\"\n },\n \"engines\": {\n \"node\": \">=0.10.0\"\n },\n \"files\": [\n \"index.js\"\n ],\n \"homepage\": \"https://github.com/jonschlinkert/is-dotfile\",\n \"keywords\": [\n \"detect\",\n \"dot\",\n \"dotfile\",\n \"expression\",\n \"file\",\n \"filepath\",\n \"find\",\n \"fs\",\n \"is\",\n \"match\",\n \"path\",\n \"regex\",\n \"regexp\",\n \"regular\"\n ],\n \"license\": \"MIT\",\n \"main\": \"index.js\",\n \"name\": \"is-dotfile\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/jonschlinkert/is-dotfile.git\"\n },\n \"scripts\": {\n \"test\": \"mocha\"\n },\n \"verb\": {\n \"related\": {\n \"list\": [\n \"dotdir-regex\",\n \"dotfile-regex\",\n \"is-dotdir\",\n \"is-glob\"\n ]\n },\n \"toc\": false,\n \"layout\": \"default\",\n \"tasks\": [\n \"readme\"\n ],\n \"plugins\": [\n \"gulp-format-md\"\n ],\n \"lint\": {\n \"reflinks\": true\n }\n },\n \"version\": \"1.0.3\"\n}\n"} +{"text": " '❮ Předchozí',\n 'next' => 'Další ❯',\n\n];\n"} +{"text": "#!/bin/bash\n\n# Copyright (c) 2012 Google Inc. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\ntouch \"${BUILT_PRODUCTS_DIR}/postbuild-file\"\n"} +{"text": "/**\n * SyntaxHighlighter\n * http://alexgorbatchev.com/SyntaxHighlighter\n *\n * SyntaxHighlighter is donationware. If you are using it, please donate.\n * http://alexgorbatchev.com/SyntaxHighlighter/donate.html\n *\n * @version\n * 3.0.83 (July 02 2010)\n * \n * @copyright\n * Copyright (C) 2004-2010 Alex Gorbatchev.\n *\n * @license\n * Dual licensed under the MIT and GPL licenses.\n */\n(function() {\n\nvar sh = SyntaxHighlighter;\n\n/**\n * Provides functionality to dynamically load only the brushes that a needed to render the current page.\n *\n * There are two syntaxes that autoload understands. For example:\n * \n * SyntaxHighlighter.autoloader(\n * [ 'applescript', 'Scripts/shBrushAppleScript.js' ],\n * [ 'actionscript3', 'as3', 'Scripts/shBrushAS3.js' ]\n * );\n *\n * or a more easily comprehendable one:\n *\n * SyntaxHighlighter.autoloader(\n * 'applescript Scripts/shBrushAppleScript.js',\n * 'actionscript3 as3 Scripts/shBrushAS3.js'\n * );\n */\nsh.autoloader = function()\n{\n\tvar list = arguments,\n\t\telements = sh.findElements(),\n\t\tbrushes = {},\n\t\tscripts = {},\n\t\tall = SyntaxHighlighter.all,\n\t\tallCalled = false,\n\t\tallParams = null,\n\t\ti\n\t\t;\n\t\t\n\tSyntaxHighlighter.all = function(params)\n\t{\n\t\tallParams = params;\n\t\tallCalled = true;\n\t};\n\t\n\tfunction addBrush(aliases, url)\n\t{\n\t\tfor (var i = 0; i < aliases.length; i++)\n\t\t\tbrushes[aliases[i]] = url;\n\t};\n\t\n\tfunction getAliases(item)\n\t{\n\t\treturn item.pop\n\t\t\t? item\n\t\t\t: item.split(/\\s+/)\n\t\t\t;\n\t}\n\t\n\t// create table of aliases and script urls\n\tfor (i = 0; i < list.length; i++)\n\t{\n\t\tvar aliases = getAliases(list[i]),\n\t\t\turl = aliases.pop()\n\t\t\t;\n\t\t\t\n\t\taddBrush(aliases, url);\n\t}\n\t\n\t// dynamically add \n\n\n\n\n\n\n\n\n\n
\n\n
\n\n \n \n \n \n \n \n \n \n \n \n
\"CMSIS\n
CMSIS-DSP\n  Verison 1.1.0\n
\n
CMSIS DSP Software Library
\n
\n
\n\n\n
\n \n
\n\n\n
\n \n
\n
\n
\n
\n
\n
\n
\n
\n
\n
\n\n
\n
\n
\n
FIR Lowpass Filter Example
\n
\n
\n
Description:
\n
Removes high frequency signal components from the input using an FIR lowpass filter. The example demonstrates how to configure an FIR filter and then pass data through it in a block-by-block fashion.
\n\"FIRLPF_signalflow.gif\"/\n
\n
\n
Algorithm:
\n
The input signal is a sum of two sine waves: 1 kHz and 15 kHz. This is processed by an FIR lowpass filter with cutoff frequency 6 kHz. The lowpass filter eliminates the 15 kHz signal leaving only the 1 kHz sine wave at the output.
\n
The lowpass filter was designed using MATLAB with a sample rate of 48 kHz and a length of 29 points. The MATLAB code to generate the filter coefficients is shown below:
\n     h = fir1(28, 6/24);\n 
The first argument is the \"order\" of the filter and is always one less than the desired length. The second argument is the normalized cutoff frequency. This is in the range 0 (DC) to 1.0 (Nyquist). A 6 kHz cutoff with a Nyquist frequency of 24 kHz lies at a normalized frequency of 6/24 = 0.25. The CMSIS FIR filter function requires the coefficients to be in time reversed order.
\n     fliplr(h)\n 
The resulting filter coefficients and are shown below. Note that the filter is symmetric (a property of linear phase FIR filters) and the point of symmetry is sample 14. Thus the filter will have a delay of 14 samples for all frequencies.
\n
\n\"FIRLPF_coeffs.gif\"/\n
\n
\n
The frequency response of the filter is shown next. The passband gain of the filter is 1.0 and it reaches 0.5 at the cutoff frequency 6 kHz.
\n
\n\"FIRLPF_response.gif\"/\n
\n
\n
The input signal is shown below. The left hand side shows the signal in the time domain while the right hand side is a frequency domain representation. The two sine wave components can be clearly seen.
\n
\n\"FIRLPF_input.gif\"/\n
\n
\n
The output of the filter is shown below. The 15 kHz component has been eliminated.
\n
\n\"FIRLPF_output.gif\"/\n
\n
\n
Variables Description:
\n
    \n
  • testInput_f32_1kHz_15kHz points to the input data
  • \n
  • refOutput points to the reference output data
  • \n
  • testOutput points to the test output data
  • \n
  • firStateF32 points to state buffer
  • \n
  • firCoeffs32 points to coefficient buffer
  • \n
  • blockSize number of samples processed at a time
  • \n
  • numBlocks number of frames
  • \n
\n
\n
CMSIS DSP Software Library Functions Used:
\n
\n
\n

Refer arm_fir_example_f32.c

\n
\n
\n
\n \n
\n\n\n\n\n"} +{"text": "using System.IO;\n\nnamespace NTMiner {\n public static partial class MinerClientTempPath {\n static MinerClientTempPath() {\n string daemonDirFullName = Path.Combine(TempPath.TempDirFullName, NTKeyword.DaemonDirName);\n string noDevFeeDirFullName = Path.Combine(TempPath.TempDirFullName, NTKeyword.NoDevFeeDirName);\n if (!Directory.Exists(daemonDirFullName)) {\n Directory.CreateDirectory(daemonDirFullName);\n }\n if (!Directory.Exists(noDevFeeDirFullName)) {\n Directory.CreateDirectory(noDevFeeDirFullName);\n }\n DaemonFileFullName = Path.Combine(daemonDirFullName, NTKeyword.NTMinerDaemonFileName);\n NoDevFeeFileFullName = Path.Combine(noDevFeeDirFullName, NTKeyword.NTMinerNoDevFeeFileName);\n DevConsoleFileFullName = Path.Combine(daemonDirFullName, NTKeyword.DevConsoleFileName);\n\n Upgrade();\n }\n\n public static string GetIconFileFullName(string coinIcon) {\n if (string.IsNullOrEmpty(coinIcon)) {\n return string.Empty;\n }\n string iconFileFullName = Path.Combine(CoinIconsDirFullName, coinIcon);\n return iconFileFullName;\n }\n\n public static readonly string DaemonFileFullName;\n public static readonly string NoDevFeeFileFullName;\n\n public static readonly string DevConsoleFileFullName;\n\n private static bool _sIsFirstCallCoinIconDirFullName = true;\n public static string CoinIconsDirFullName {\n get {\n string dirFullName = Path.Combine(TempPath.TempDirFullName, NTKeyword.CoinIconsDirName);\n if (_sIsFirstCallCoinIconDirFullName) {\n if (!Directory.Exists(dirFullName)) {\n Directory.CreateDirectory(dirFullName);\n }\n _sIsFirstCallCoinIconDirFullName = false;\n }\n\n return dirFullName;\n }\n }\n\n private static bool _sIsFirstCallDownloadDirFullName = true;\n public static string DownloadDirFullName {\n get {\n string dirFullName = Path.Combine(TempPath.TempDirFullName, NTKeyword.DownloadDirName);\n if (_sIsFirstCallDownloadDirFullName) {\n if (!Directory.Exists(dirFullName)) {\n Directory.CreateDirectory(dirFullName);\n }\n _sIsFirstCallDownloadDirFullName = false;\n }\n\n return dirFullName;\n }\n }\n\n private static bool _sIsFirstCallKernelsDirFullName = true;\n public static string KernelsDirFullName {\n get {\n string dirFullName = Path.Combine(TempPath.TempDirFullName, NTKeyword.KernelsDirName);\n if (_sIsFirstCallKernelsDirFullName) {\n if (!Directory.Exists(dirFullName)) {\n Directory.CreateDirectory(dirFullName);\n }\n _sIsFirstCallKernelsDirFullName = false;\n }\n\n return dirFullName;\n }\n }\n\n private static bool _sIsFirstCallTempLogsDirFullName = true;\n public static string TempLogsDirFullName {\n get {\n string dirFullName = Path.Combine(TempPath.TempDirFullName, NTKeyword.LogsDirName);\n if (_sIsFirstCallTempLogsDirFullName) {\n if (!Directory.Exists(dirFullName)) {\n Directory.CreateDirectory(dirFullName);\n }\n _sIsFirstCallTempLogsDirFullName = false;\n }\n\n return dirFullName;\n }\n }\n\n private static bool _sIsFirstCallToolsDirFullName = true;\n /// \n /// 在临时目录。因为工具并非常用的程序文件,在用户第一次使用时才会下载。\n /// \n public static string ToolsDirFullName {\n get {\n string dirFullName = Path.Combine(TempPath.TempDirFullName, NTKeyword.ToolsDirName);\n if (_sIsFirstCallToolsDirFullName) {\n if (!Directory.Exists(dirFullName)) {\n Directory.CreateDirectory(dirFullName);\n }\n _sIsFirstCallToolsDirFullName = false;\n }\n\n return dirFullName;\n }\n }\n\n public static string MinerClientFinderFileFullName {\n get {\n string dir = Path.Combine(ToolsDirFullName, \"MinerClientFinder\");\n if (!Directory.Exists(dir)) {\n Directory.CreateDirectory(dir);\n }\n return Path.Combine(dir, NTKeyword.MinerClientFinderFileName);\n }\n }\n\n public static string AtikmdagPatcherFileFullName {\n get {\n string dir = Path.Combine(ToolsDirFullName, \"AtikmdagPatcher\");\n if (!Directory.Exists(dir)) {\n Directory.CreateDirectory(dir);\n }\n return Path.Combine(dir, NTKeyword.AtikmdagPatcherFileName);\n }\n }\n\n public static string SwitchRadeonGpuFileFullName {\n get {\n string dir = Path.Combine(ToolsDirFullName, \"SwitchRadeonGpu\");\n if (!Directory.Exists(dir)) {\n Directory.CreateDirectory(dir);\n }\n return Path.Combine(dir, NTKeyword.SwitchRadeonGpuFileName);\n }\n }\n }\n}\n"} +{"text": "getName().\" requires a named foreign key, \".\n \"but the given foreign key from (\".implode(\", \", $foreignKey->getColumns()).\") onto foreign table \".\n \"'\".$foreignKey->getForeignTableName().\"' (\".implode(\", \", $foreignKey->getForeignColumns()).\") is currently \".\n \"unnamed.\"\n );\n }\n\n static public function alterTableChangeNotSupported($changeName) {\n return new self (\"Alter table change not supported, given '$changeName'\");\n }\n}"} +{"text": "--- !ruby/object:RI::MethodDescription \r\naliases: []\r\n\r\nblock_params: \r\ncomment: \r\nfull_name: MSTestTestRunner#get_command_parameters\r\nis_singleton: false\r\nname: get_command_parameters\r\nparams: ()\r\nvisibility: public\r\n"} +{"text": "using System;\nusing System.Runtime.CompilerServices;\n\nnamespace TerrainTopology\n{\n public class FMath\n {\n public const float EPS = 1e-18f;\n\n public const float PI = (float)Math.PI;\n\n public const float SQRT2 = 1.414213562373095f;\n\n public const float Rad2Deg = 180.0f / PI;\n\n public const float Deg2Rad = PI / 180.0f;\n\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static float SafeAcos(float r)\n {\n return (float)Math.Acos(Math.Min(1.0f, Math.Max(-1.0f, r)));\n }\n\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static float SafeAsin(float r)\n {\n return (float)Math.Asin(Math.Min(1.0f, Math.Max(-1.0f, r)));\n }\n\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static float SafeSqrt(float v)\n {\n if (v <= 0.0f) return 0.0f;\n return (float)Math.Sqrt(v);\n }\n\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static float SafeLog(float v)\n {\n if (v <= 0.0f) return 0.0f;\n return (float)Math.Log(v);\n }\n\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static float SafeLog10(float v)\n {\n if (v <= 0.0) return 0.0f;\n return (float)Math.Log10(v);\n }\n\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static float SafeInvSqrt(float n, float d, float eps = EPS)\n {\n if (d <= 0.0f) return 0.0f;\n d = (float)Math.Sqrt(d);\n if (d < eps) return 0.0f;\n return n / d;\n }\n\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static float SafeInv(float v, float eps = EPS)\n {\n if (Math.Abs(v) < eps) return 0.0f;\n return 1.0f / v;\n }\n\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static float SafeDiv(float n, float d, float eps = EPS)\n {\n if (Math.Abs(d) < eps) return 0.0f;\n return n / d;\n }\n\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n public static float SignOrZero(float v)\n {\n if (v == 0) return 0;\n return Math.Sign(v);\n }\n\n }\n}"} +{"text": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\nusing System.Collections.Generic;\n\nusing Aliyun.Acs.Core;\nusing Aliyun.Acs.Core.Http;\nusing Aliyun.Acs.Core.Transform;\nusing Aliyun.Acs.Core.Utils;\nusing Aliyun.Acs.Green.Transform;\nusing Aliyun.Acs.Green.Transform.V20170823;\n\nnamespace Aliyun.Acs.Green.Model.V20170823\n{\n public class DescribeUpdatePackageResultRequest : RpcAcsRequest\n {\n public DescribeUpdatePackageResultRequest()\n : base(\"Green\", \"2017-08-23\", \"DescribeUpdatePackageResult\", \"green\", \"openAPI\")\n {\n if (this.GetType().GetProperty(\"ProductEndpointMap\") != null && this.GetType().GetProperty(\"ProductEndpointType\") != null)\n {\n this.GetType().GetProperty(\"ProductEndpointMap\").SetValue(this, Endpoint.endpointMap, null);\n this.GetType().GetProperty(\"ProductEndpointType\").SetValue(this, Endpoint.endpointRegionalType, null);\n }\r\n\t\t\tMethod = MethodType.POST;\n }\r\n\r\n\t\tprivate string sourceIp;\r\n\r\n\t\tprivate string lang;\r\n\r\n\t\tprivate string taskId;\r\n\r\n\t\tpublic string SourceIp\r\n\t\t{\r\n\t\t\tget\r\n\t\t\t{\r\n\t\t\t\treturn sourceIp;\r\n\t\t\t}\r\n\t\t\tset\t\r\n\t\t\t{\r\n\t\t\t\tsourceIp = value;\r\n\t\t\t\tDictionaryUtil.Add(QueryParameters, \"SourceIp\", value);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tpublic string Lang\r\n\t\t{\r\n\t\t\tget\r\n\t\t\t{\r\n\t\t\t\treturn lang;\r\n\t\t\t}\r\n\t\t\tset\t\r\n\t\t\t{\r\n\t\t\t\tlang = value;\r\n\t\t\t\tDictionaryUtil.Add(QueryParameters, \"Lang\", value);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tpublic string TaskId\r\n\t\t{\r\n\t\t\tget\r\n\t\t\t{\r\n\t\t\t\treturn taskId;\r\n\t\t\t}\r\n\t\t\tset\t\r\n\t\t\t{\r\n\t\t\t\ttaskId = value;\r\n\t\t\t\tDictionaryUtil.Add(QueryParameters, \"TaskId\", value);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tpublic override bool CheckShowJsonItemName()\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\n\n public override DescribeUpdatePackageResultResponse GetResponse(UnmarshallerContext unmarshallerContext)\n {\n return DescribeUpdatePackageResultResponseUnmarshaller.Unmarshall(unmarshallerContext);\n }\n }\n}\n"} +{"text": "using Microsoft.TeamFoundation.DistributedTask.WebApi;\r\nusing TeamProjectManager.Common;\r\n\r\nnamespace TeamProjectManager.Modules.BuildAndRelease.ServiceEndpoints\r\n{\r\n public class ServiceEndpointInfo\r\n {\r\n public TeamProjectInfo TeamProject { get; private set; }\r\n public ServiceEndpoint ServiceEndpoint { get; private set; }\r\n\r\n public ServiceEndpointInfo(TeamProjectInfo teamProject, ServiceEndpoint serviceEndpoint)\r\n {\r\n this.TeamProject = teamProject;\r\n this.ServiceEndpoint = serviceEndpoint;\r\n }\r\n }\r\n}"} +{"text": "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n LET'S BUILD A COMPILER!\n\n By\n\n Jack W. Crenshaw, Ph.D.\n\n 24 July 1988\n\n\n Part II: EXPRESSION PARSING\n\n\n*****************************************************************\n* *\n* COPYRIGHT NOTICE *\n* *\n* Copyright (C) 1988 Jack W. Crenshaw. All rights reserved. *\n* *\n*****************************************************************\n\n\nGETTING STARTED\n\nIf you've read the introduction document to this series, you will\nalready know what we're about. You will also have copied the\ncradle software into your Turbo Pascal system, and have compiled\nit. So you should be ready to go.\n\n\nThe purpose of this article is for us to learn how to parse and\ntranslate mathematical expressions. What we would like to see as\noutput is a series of assembler-language statements that perform\nthe desired actions. For purposes of definition, an expression\nis the right-hand side of an equation, as in\n\n x = 2*y + 3/(4*z)\n\nIn the early going, I'll be taking things in _VERY_ small steps.\nThat's so that the beginners among you won't get totally lost.\nThere are also some very good lessons to be learned early on,\nthat will serve us well later. For the more experienced readers:\nbear with me. We'll get rolling soon enough.\n\nSINGLE DIGITS\n\nIn keeping with the whole theme of this series (KISS, remember?),\nlet's start with the absolutely most simple case we can think of.\nThat, to me, is an expression consisting of a single digit.\n\nBefore starting to code, make sure you have a baseline copy of\nthe \"cradle\" that I gave last time. We'll be using it again for\nother experiments. Then add this code:\n\n\n{---------------------------------------------------------------}\n{ Parse and Translate a Math Expression }\n\nprocedure Expression;\nbegin\n EmitLn('MOVE #' + GetNum + ',D0')\nend;\n{---------------------------------------------------------------}\n\n\nAnd add the line \"Expression;\" to the main program so that it\nreads:\n \n\n{---------------------------------------------------------------}\nbegin\n Init;\n Expression;\nend.\n{---------------------------------------------------------------}\n\n\nNow run the program. Try any single-digit number as input. You\nshould get a single line of assembler-language output. Now try\nany other character as input, and you'll see that the parser\nproperly reports an error.\n\n\nCONGRATULATIONS! You have just written a working translator!\n\nOK, I grant you that it's pretty limited. But don't brush it off\ntoo lightly. This little \"compiler\" does, on a very limited\nscale, exactly what any larger compiler does: it correctly\nrecognizes legal statements in the input \"language\" that we have\ndefined for it, and it produces correct, executable assembler\ncode, suitable for assembling into object format. Just as\nimportantly, it correctly recognizes statements that are NOT\nlegal, and gives a meaningful error message. Who could ask for\nmore? As we expand our parser, we'd better make sure those two\ncharacteristics always hold true.\n\nThere are some other features of this tiny program worth\nmentioning. First, you can see that we don't separate code\ngeneration from parsing ... as soon as the parser knows what we\nwant done, it generates the object code directly. In a real\ncompiler, of course, the reads in GetChar would be from a disk\nfile, and the writes to another disk file, but this way is much\neasier to deal with while we're experimenting.\n\nAlso note that an expression must leave a result somewhere. I've\nchosen the 68000 register DO. I could have made some other\nchoices, but this one makes sense.\n\n\nBINARY EXPRESSIONS\n\nNow that we have that under our belt, let's branch out a bit.\nAdmittedly, an \"expression\" consisting of only one character is\nnot going to meet our needs for long, so let's see what we can do\nto extend it. Suppose we want to handle expressions of the form:\n\n 1+2\n or 4-3\n or, in general, +/- \n\n(That's a bit of Backus-Naur Form, or BNF.)\n \nTo do this we need a procedure that recognizes a term and leaves\nits result somewhere, and another that recognizes and\ndistinguishes between a '+' and a '-' and generates the\nappropriate code. But if Expression is going to leave its result\nin DO, where should Term leave its result? Answer: the same\nplace. We're going to have to save the first result of Term\nsomewhere before we get the next one.\n\nOK, basically what we want to do is have procedure Term do what\nExpression was doing before. So just RENAME procedure Expression\nas Term, and enter the following new version of Expression:\n\n\n\n\n{---------------------------------------------------------------}\n{ Parse and Translate an Expression }\n\nprocedure Expression;\nbegin\n Term;\n EmitLn('MOVE D0,D1');\n case Look of\n '+': Add;\n '-': Subtract;\n else Expected('Addop');\n end;\nend;\n{--------------------------------------------------------------}\n\n\nNext, just above Expression enter these two procedures:\n\n\n{--------------------------------------------------------------}\n{ Recognize and Translate an Add }\n\nprocedure Add;\nbegin\n Match('+');\n Term;\n EmitLn('ADD D1,D0');\nend;\n\n\n{-------------------------------------------------------------}\n{ Recognize and Translate a Subtract }\n\nprocedure Subtract;\nbegin\n Match('-');\n Term;\n EmitLn('SUB D1,D0');\nend;\n{-------------------------------------------------------------}\n \n\nWhen you're finished with that, the order of the routines should\nbe:\n\n o Term (The OLD Expression)\n o Add\n o Subtract\n o Expression\n\nNow run the program. Try any combination you can think of of two\nsingle digits, separated by a '+' or a '-'. You should get a\nseries of four assembler-language instructions out of each run.\nNow try some expressions with deliberate errors in them. Does\nthe parser catch the errors?\n\nTake a look at the object code generated. There are two\nobservations we can make. First, the code generated is NOT what\nwe would write ourselves. The sequence\n\n MOVE #n,D0\n MOVE D0,D1\n\nis inefficient. If we were writing this code by hand, we would\nprobably just load the data directly to D1.\n\nThere is a message here: code generated by our parser is less\nefficient than the code we would write by hand. Get used to it.\nThat's going to be true throughout this series. It's true of all\ncompilers to some extent. Computer scientists have devoted whole\nlifetimes to the issue of code optimization, and there are indeed\nthings that can be done to improve the quality of code output.\nSome compilers do quite well, but there is a heavy price to pay\nin complexity, and it's a losing battle anyway ... there will\nprobably never come a time when a good assembler-language pro-\ngrammer can't out-program a compiler. Before this session is\nover, I'll briefly mention some ways that we can do a little op-\ntimization, just to show you that we can indeed improve things\nwithout too much trouble. But remember, we're here to learn, not\nto see how tight we can make the object code. For now, and\nreally throughout this series of articles, we'll studiously\nignore optimization and concentrate on getting out code that\nworks.\n\nSpeaking of which: ours DOESN'T! The code is _WRONG_! As things\nare working now, the subtraction process subtracts D1 (which has\nthe FIRST argument in it) from D0 (which has the second). That's\nthe wrong way, so we end up with the wrong sign for the result.\nSo let's fix up procedure Subtract with a sign-changer, so that\nit reads\n\n\n{-------------------------------------------------------------}\n{ Recognize and Translate a Subtract }\n\nprocedure Subtract;\nbegin\n Match('-');\n Term;\n EmitLn('SUB D1,D0');\n EmitLn('NEG D0');\nend;\n{-------------------------------------------------------------}\n\n\nNow our code is even less efficient, but at least it gives the\nright answer! Unfortunately, the rules that give the meaning of\nmath expressions require that the terms in an expression come out\nin an inconvenient order for us. Again, this is just one of\nthose facts of life you learn to live with. This one will come\nback to haunt us when we get to division.\n\nOK, at this point we have a parser that can recognize the sum or\ndifference of two digits. Earlier, we could only recognize a\nsingle digit. But real expressions can have either form (or an\ninfinity of others). For kicks, go back and run the program with\nthe single input line '1'.\n\nDidn't work, did it? And why should it? We just finished\ntelling our parser that the only kinds of expressions that are\nlegal are those with two terms. We must rewrite procedure\nExpression to be a lot more broadminded, and this is where things\nstart to take the shape of a real parser.\n\n\n\n\nGENERAL EXPRESSIONS\n\nIn the REAL world, an expression can consist of one or more\nterms, separated by \"addops\" ('+' or '-'). In BNF, this is\nwritten\n\n ::= [ ]*\n\n\nWe can accomodate this definition of an expression with the\naddition of a simple loop to procedure Expression:\n\n\n{---------------------------------------------------------------}\n{ Parse and Translate an Expression }\n\nprocedure Expression;\nbegin\n Term;\n while Look in ['+', '-'] do begin\n EmitLn('MOVE D0,D1');\n case Look of\n '+': Add;\n '-': Subtract;\n else Expected('Addop');\n end;\n end;\nend;\n{--------------------------------------------------------------}\n\n\nNOW we're getting somewhere! This version handles any number of\nterms, and it only cost us two extra lines of code. As we go on,\nyou'll discover that this is characteristic of top-down parsers\n... it only takes a few lines of code to accomodate extensions to\nthe language. That's what makes our incremental approach\npossible. Notice, too, how well the code of procedure Expression\nmatches the BNF definition. That, too, is characteristic of the\nmethod. As you get proficient in the approach, you'll find that\nyou can turn BNF into parser code just about as fast as you can\ntype!\n\nOK, compile the new version of our parser, and give it a try. As\nusual, verify that the \"compiler\" can handle any legal\nexpression, and will give a meaningful error message for an\nillegal one. Neat, eh? You might note that in our test version,\nany error message comes out sort of buried in whatever code had\nalready been generated. But remember, that's just because we are\nusing the CRT as our \"output file\" for this series of\nexperiments. In a production version, the two outputs would be\nseparated ... one to the output file, and one to the screen.\n\n\nUSING THE STACK\n\nAt this point I'm going to violate my rule that we don't\nintroduce any complexity until it's absolutely necessary, long\nenough to point out a problem with the code we're generating. As\nthings stand now, the parser uses D0 for the \"primary\" register,\nand D1 as a place to store the partial sum. That works fine for\nnow, because as long as we deal with only the \"addops\" '+' and\n'-', any new term can be added in as soon as it is found. But in\ngeneral that isn't true. Consider, for example, the expression\n\n 1+(2-(3+(4-5)))\n \nIf we put the '1' in D1, where do we put the '2'? Since a\ngeneral expression can have any degree of complexity, we're going\nto run out of registers fast!\n\nFortunately, there's a simple solution. Like every modern\nmicroprocessor, the 68000 has a stack, which is the perfect place\nto save a variable number of items. So instead of moving the term\nin D0 to D1, let's just push it onto the stack. For the benefit\nof those unfamiliar with 68000 assembler language, a push is\nwritten\n\n -(SP)\n\nand a pop, (SP)+ .\n\n\nSo let's change the EmitLn in Expression to read:\n\n EmitLn('MOVE D0,-(SP)');\n\nand the two lines in Add and Subtract to\n\n EmitLn('ADD (SP)+,D0')\n\nand EmitLn('SUB (SP)+,D0'),\n\nrespectively. Now try the parser again and make sure we haven't\nbroken it.\n\nOnce again, the generated code is less efficient than before, but\nit's a necessary step, as you'll see.\n\n\nMULTIPLICATION AND DIVISION\n\nNow let's get down to some REALLY serious business. As you all\nknow, there are other math operators than \"addops\" ...\nexpressions can also have multiply and divide operations. You\nalso know that there is an implied operator PRECEDENCE, or\nhierarchy, associated with expressions, so that in an expression\nlike\n\n 2 + 3 * 4,\n\nwe know that we're supposed to multiply FIRST, then add. (See\nwhy we needed the stack?)\n\nIn the early days of compiler technology, people used some rather\ncomplex techniques to insure that the operator precedence rules\nwere obeyed. It turns out, though, that none of this is\nnecessary ... the rules can be accommodated quite nicely by our\ntop-down parsing technique. Up till now, the only form that\nwe've considered for a term is that of a single decimal digit.\n\nMore generally, we can define a term as a PRODUCT of FACTORS;\ni.e.,\n\n ::= [ ::= ()\n\nThis is where the recursion comes in. An expression can contain a\nfactor which contains another expression which contains a factor,\netc., ad infinitum.\n\nComplicated or not, we can take care of this by adding just a few\nlines of Pascal to procedure Factor:\n \n\n{---------------------------------------------------------------}\n{ Parse and Translate a Math Factor }\n\nprocedure Expression; Forward;\n\nprocedure Factor;\nbegin\n if Look = '(' then begin\n Match('(');\n Expression;\n Match(')');\n end\n else\n EmitLn('MOVE #' + GetNum + ',D0');\nend;\n{--------------------------------------------------------------}\n\n\nNote again how easily we can extend the parser, and how well the\nPascal code matches the BNF syntax.\n\nAs usual, compile the new version and make sure that it correctly\nparses legal sentences, and flags illegal ones with an error\nmessage.\n\n\nUNARY MINUS\n\nAt this point, we have a parser that can handle just about any\nexpression, right? OK, try this input sentence:\n\n -1\n\nWOOPS! It doesn't work, does it? Procedure Expression expects\neverything to start with an integer, so it coughs up the leading\nminus sign. You'll find that +3 won't work either, nor will\nsomething like\n\n -(3-2) .\n\nThere are a couple of ways to fix the problem. The easiest\n(although not necessarily the best) way is to stick an imaginary\nleading zero in front of expressions of this type, so that -3\nbecomes 0-3. We can easily patch this into our existing version\nof Expression:\n\n\n\n{---------------------------------------------------------------}\n{ Parse and Translate an Expression }\n\nprocedure Expression;\nbegin\n if IsAddop(Look) then\n EmitLn('CLR D0')\n else\n Term;\n while IsAddop(Look) do begin\n EmitLn('MOVE D0,-(SP)');\n case Look of\n '+': Add;\n '-': Subtract;\n else Expected('Addop');\n end;\n end;\nend;\n{--------------------------------------------------------------}\n \n\nI TOLD you that making changes was easy! This time it cost us\nonly three new lines of Pascal. Note the new reference to\nfunction IsAddop. Since the test for an addop appeared twice, I\nchose to embed it in the new function. The form of IsAddop\nshould be apparent from that for IsAlpha. Here it is:\n\n\n{--------------------------------------------------------------}\n{ Recognize an Addop }\n\nfunction IsAddop(c: char): boolean;\nbegin\n IsAddop := c in ['+', '-'];\nend;\n{--------------------------------------------------------------}\n\n\nOK, make these changes to the program and recompile. You should\nalso include IsAddop in your baseline copy of the cradle. We'll\nbe needing it again later. Now try the input -1 again. Wow!\nThe efficiency of the code is pretty poor ... six lines of code\njust for loading a simple constant ... but at least it's correct.\nRemember, we're not trying to replace Turbo Pascal here.\n\nAt this point we're just about finished with the structure of our\nexpression parser. This version of the program should correctly\nparse and compile just about any expression you care to throw at\nit. It's still limited in that we can only handle factors\ninvolving single decimal digits. But I hope that by now you're\nstarting to get the message that we can accomodate further\nextensions with just some minor changes to the parser. You\nprobably won't be surprised to hear that a variable or even a\nfunction call is just another kind of a factor.\n \nIn the next session, I'll show you just how easy it is to extend\nour parser to take care of these things too, and I'll also show\nyou just how easily we can accomodate multicharacter numbers and\nvariable names. So you see, we're not far at all from a truly\nuseful parser.\n\n\n\n\nA WORD ABOUT OPTIMIZATION\n\nEarlier in this session, I promised to give you some hints as to\nhow we can improve the quality of the generated code. As I said,\nthe production of tight code is not the main purpose of this\nseries of articles. But you need to at least know that we aren't\njust wasting our time here ... that we can indeed modify the\nparser further to make it produce better code, without throwing\naway everything we've done to date. As usual, it turns out that\nSOME optimization is not that difficult to do ... it simply takes\nsome extra code in the parser.\n\nThere are two basic approaches we can take:\n\n o Try to fix up the code after it's generated\n\n This is the concept of \"peephole\" optimization. The general\n idea it that we know what combinations of instructions the\n compiler is going to generate, and we also know which ones\n are pretty bad (such as the code for -1, above). So all we\n do is to scan the produced code, looking for those\n combinations, and replacing them by better ones. It's sort\n of a macro expansion, in reverse, and a fairly\n straightforward exercise in pattern-matching. The only\n complication, really, is that there may be a LOT of such\n combinations to look for. It's called peephole optimization\n simply because it only looks at a small group of instructions\n at a time. Peephole optimization can have a dramatic effect\n on the quality of the code, with little change to the\n structure of the compiler itself. There is a price to pay,\n though, in both the speed, size, and complexity of the\n compiler. Looking for all those combinations calls for a lot\n of IF tests, each one of which is a source of error. And, of\n course, it takes time.\n\n In the classical implementation of a peephole optimizer,\n it's done as a second pass to the compiler. The output code\n is written to disk, and then the optimizer reads and\n processes the disk file again. As a matter of fact, you can\n see that the optimizer could even be a separate PROGRAM from\n the compiler proper. Since the optimizer only looks at the\n code through a small \"window\" of instructions (hence the\n name), a better implementation would be to simply buffer up a\n few lines of output, and scan the buffer after each EmitLn.\n\n o Try to generate better code in the first place\n \n This approach calls for us to look for special cases BEFORE\n we Emit them. As a trivial example, we should be able to\n identify a constant zero, and Emit a CLR instead of a load,\n or even do nothing at all, as in an add of zero, for example.\n Closer to home, if we had chosen to recognize the unary minus\n in Factor instead of in Expression, we could treat constants\n like -1 as ordinary constants, rather then generating them\n from positive ones. None of these things are difficult to\n deal with ... they only add extra tests in the code, which is\n why I haven't included them in our program. The way I see\n it, once we get to the point that we have a working compiler,\n generating useful code that executes, we can always go back\n and tweak the thing to tighten up the code produced. That's\n why there are Release 2.0's in the world.\n\nThere IS one more type of optimization worth mentioning, that\nseems to promise pretty tight code without too much hassle. It's\nmy \"invention\" in the sense that I haven't seen it suggested in\nprint anywhere, though I have no illusions that it's original\nwith me.\n\nThis is to avoid such a heavy use of the stack, by making better\nuse of the CPU registers. Remember back when we were doing only\naddition and subtraction, that we used registers D0 and D1,\nrather than the stack? It worked, because with only those two\noperations, the \"stack\" never needs more than two entries.\n\nWell, the 68000 has eight data registers. Why not use them as a\nprivately managed stack? The key is to recognize that, at any\npoint in its processing, the parser KNOWS how many items are on\nthe stack, so it can indeed manage it properly. We can define a\nprivate \"stack pointer\" that keeps track of which stack level\nwe're at, and addresses the corresponding register. Procedure\nFactor, for example, would not cause data to be loaded into\nregister D0, but into whatever the current \"top-of-stack\"\nregister happened to be.\n\nWhat we're doing in effect is to replace the CPU's RAM stack with\na locally managed stack made up of registers. For most\nexpressions, the stack level will never exceed eight, so we'll\nget pretty good code out. Of course, we also have to deal with\nthose odd cases where the stack level DOES exceed eight, but\nthat's no problem either. We simply let the stack spill over\ninto the CPU stack. For levels beyond eight, the code is no\nworse than what we're generating now, and for levels less than\neight, it's considerably better.\n\nFor the record, I have implemented this concept, just to make\nsure it works before I mentioned it to you. It does. In\npractice, it turns out that you can't really use all eight levels\n... you need at least one register free to reverse the operand\norder for division (sure wish the 68000 had an XTHL, like the\n8080!). For expressions that include function calls, we would\nalso need a register reserved for them. Still, there is a nice\nimprovement in code size for most expressions.\n\nSo, you see, getting better code isn't that difficult, but it\ndoes add complexity to the our translator ... complexity we can\ndo without at this point. For that reason, I STRONGLY suggest\nthat we continue to ignore efficiency issues for the rest of this\nseries, secure in the knowledge that we can indeed improve the\ncode quality without throwing away what we've done.\n\nNext lesson, I'll show you how to deal with variables factors and\nfunction calls. I'll also show you just how easy it is to handle\nmulticharacter tokens and embedded white space.\n\n*****************************************************************\n* *\n* COPYRIGHT NOTICE *\n* *\n* Copyright (C) 1988 Jack W. Crenshaw. All rights reserved. *\n* *\n*****************************************************************\n \n\n\n\n"} +{"text": "// go run mksyscall.go -openbsd -tags openbsd,arm64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm64.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n// +build openbsd,arm64\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(ngid int, gid *_Gid_t) (n int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(ngid int, gid *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {\n\tr0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)\n\twpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {\n\t_, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socket(domain int, typ int, proto int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {\n\t_, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {\n\t_, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Shutdown(s int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {\n\t_, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(mib) > 0 {\n\t\t_p0 = unsafe.Pointer(&mib[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, timeval *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimes(fd int, timeval *[2]Timeval) (err error) {\n\t_, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fcntl(fd int, cmd int, arg int) (val int, err error) {\n\tr0, _, e1 := Syscall(SYS_FCNTL, uintptr(fd), uintptr(cmd), uintptr(arg))\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Madvise(b []byte, behav int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mlockall(flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mprotect(b []byte, prot int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Msync(b []byte, flags int) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlock(b []byte) (err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(b) > 0 {\n\t\t_p0 = unsafe.Pointer(&b[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\t_, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Munlockall() (err error) {\n\t_, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe(p *[2]_C_int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getdents(fd int, buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getcwd(buf []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p0 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ioctl(fd int, req uint, arg uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Access(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Adjtime(delta *Timeval, olddelta *Timeval) (err error) {\n\t_, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chflags(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chmod(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Chroot(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Close(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup(fd int) (nfd int, err error) {\n\tr0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)\n\tnfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Dup2(from int, to int) (err error) {\n\t_, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Exit(code int) {\n\tSyscall(SYS_EXIT, uintptr(code), 0, 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchdir(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchflags(fd int, flags int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmod(fd int, mode uint32) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Flock(fd int, how int) (err error) {\n\t_, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fpathconf(fd int, name int) (val int, err error) {\n\tr0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatfs(fd int, stat *Statfs_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fsync(fd int) (err error) {\n\t_, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (uid int) {\n\tr0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgid(pid int) (pgid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)\n\tpgid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpgrp() (pgrp int) {\n\tr0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)\n\tpgrp = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpid() (pid int) {\n\tr0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)\n\tpid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getppid() (ppid int) {\n\tr0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)\n\tppid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getpriority(which int, who int) (prio int, err error) {\n\tr0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)\n\tprio = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrlimit(which int, lim *Rlimit) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrtable() (rtable int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)\n\trtable = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getrusage(who int, rusage *Rusage) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getsid(pid int) (sid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)\n\tsid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Issetugid() (tainted bool) {\n\tr0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)\n\ttainted = bool(r0 != 0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kill(pid int, signum syscall.Signal) (err error) {\n\t_, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Kqueue() (fd int, err error) {\n\tr0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Link(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Listen(s int, backlog int) (err error) {\n\t_, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdir(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkdirat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifo(path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mkfifoat(dirfd int, path string, mode uint32) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknod(path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Nanosleep(time *Timespec, leftover *Timespec) (err error) {\n\t_, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Open(path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pathconf(path string, name int) (val int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tr0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)\n\tval = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc read(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlink(path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 unsafe.Pointer\n\tif len(buf) > 0 {\n\t\t_p1 = unsafe.Pointer(&buf[0])\n\t} else {\n\t\t_p1 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rename(from string, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(fromfd int, from string, tofd int, to string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(from)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(to)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Revoke(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Rmdir(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seek(fd int, offset int64, whence int) (newoffset int64, err error) {\n\tr0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)\n\tnewoffset = int64(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(n int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (err error) {\n\t_, _, e1 := Syscall6(SYS_SELECT, uintptr(n), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setegid(egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Seteuid(euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setgid(gid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setlogin(name string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(name)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpgid(pid int, pgid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setpriority(which int, who int, prio int) (err error) {\n\t_, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresgid(rgid int, egid int, sgid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresuid(ruid int, euid int, suid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setrlimit(which int, lim *Rlimit) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setrtable(rtable int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setsid() (pid int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)\n\tpid = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Settimeofday(tp *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setuid(uid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Statfs(path string, stat *Statfs_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlink(path string, link string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(link)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Sync() (err error) {\n\t_, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Umask(newmask int) (oldmask int) {\n\tr0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)\n\toldmask = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlink(path string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unlinkat(dirfd int, path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Unmount(path string, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc write(fd int, p []byte) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {\n\tr0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)\n\tret = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc munmap(addr uintptr, length uintptr) (err error) {\n\t_, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc readlen(fd int, buf *byte, nbuf int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc writelen(fd int, buf *byte, nbuf int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"} +{"text": "SetCreator(PDF_CREATOR);\n$pdf->SetAuthor('Nicola Asuni');\n$pdf->SetTitle('TCPDF Example 004');\n$pdf->SetSubject('TCPDF Tutorial');\n$pdf->SetKeywords('TCPDF, PDF, example, test, guide');\n\n// set default header data\n$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 004', PDF_HEADER_STRING);\n\n// set header and footer fonts\n$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));\n$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));\n\n// set default monospaced font\n$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);\n\n//set margins\n$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);\n$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);\n$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);\n\n//set auto page breaks\n$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);\n\n//set image scale factor\n$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);\n\n//set some language-dependent strings\n$pdf->setLanguageArray($l);\n\n// ---------------------------------------------------------\n\n// set font\n$pdf->SetFont('times', '', 11);\n\n// add a page\n$pdf->AddPage();\n\n//Cell($w, $h=0, $txt='', $border=0, $ln=0, $align='', $fill=0, $link='', $stretch=0, $ignore_min_height=false, $calign='T', $valign='M')\n\n// test Cell stretching\n$pdf->Cell(0, 0, 'TEST CELL STRETCH: no stretch', 1, 1, 'C', 0, '', 0);\n$pdf->Cell(0, 0, 'TEST CELL STRETCH: scaling', 1, 1, 'C', 0, '', 1);\n$pdf->Cell(0, 0, 'TEST CELL STRETCH: force scaling', 1, 1, 'C', 0, '', 2);\n$pdf->Cell(0, 0, 'TEST CELL STRETCH: spacing', 1, 1, 'C', 0, '', 3);\n$pdf->Cell(0, 0, 'TEST CELL STRETCH: force spacing', 1, 1, 'C', 0, '', 4);\n\n$pdf->Ln(5);\n\n$pdf->Cell(45, 0, 'TEST CELL STRETCH: scaling', 1, 1, 'C', 0, '', 1);\n$pdf->Cell(45, 0, 'TEST CELL STRETCH: force scaling', 1, 1, 'C', 0, '', 2);\n$pdf->Cell(45, 0, 'TEST CELL STRETCH: spacing', 1, 1, 'C', 0, '', 3);\n$pdf->Cell(45, 0, 'TEST CELL STRETCH: force spacing', 1, 1, 'C', 0, '', 4);\n\n$pdf->AddPage();\n\n// example using general stretching and spacing\n\nfor ($stretching = 90; $stretching <= 110; $stretching += 10) {\n\tfor ($spacing = -0.254; $spacing <= 0.254; $spacing += 0.254) {\n\n\t\t// set general stretching (scaling) value\n\t\t$pdf->setFontStretching($stretching);\n\n\t\t// set general spacing value\n\t\t$pdf->setFontSpacing($spacing);\n\n\t\t$pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, no stretch', 1, 1, 'C', 0, '', 0);\n\t\t$pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, scaling', 1, 1, 'C', 0, '', 1);\n\t\t$pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force scaling', 1, 1, 'C', 0, '', 2);\n\t\t$pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, spacing', 1, 1, 'C', 0, '', 3);\n\t\t$pdf->Cell(0, 0, 'Stretching '.$stretching.'%, Spacing '.sprintf('%+.3F', $spacing).'mm, force spacing', 1, 1, 'C', 0, '', 4);\n\n\t\t$pdf->Ln(2);\n\t}\n}\n\n// ---------------------------------------------------------\n\n//Close and output PDF document\n$pdf->Output('example_004.pdf', 'I');\n\n//============================================================+\n// END OF FILE\n//============================================================+\n"} +{"text": "/**\n * The MIT License (MIT)\n *\n * Copyright (c) 2015 Famous Industries Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n'use strict';\n\nvar Geometry = require('../Geometry');\nvar GeometryHelper = require('../GeometryHelper');\n\n/**\n * This function returns a new static geometry, which is passed\n * custom buffer data.\n *\n * @class Plane\n * @constructor\n *\n * @param {Object} options Parameters that alter the\n * vertex buffers of the generated geometry.\n *\n * @return {Object} constructed geometry\n */\nfunction Plane(options) {\n options = options || {};\n var detailX = options.detailX || options.detail || 1;\n var detailY = options.detailY || options.detail || 1;\n\n var vertices = [];\n var textureCoords = [];\n var normals = [];\n var indices = [];\n\n var i;\n\n for (var y = 0; y <= detailY; y++) {\n var t = y / detailY;\n for (var x = 0; x <= detailX; x++) {\n var s = x / detailX;\n vertices.push(2. * (s - .5), 2 * (t - .5), 0);\n textureCoords.push(s, 1 - t);\n if (x < detailX && y < detailY) {\n i = x + y * (detailX + 1);\n indices.push(i, i + 1, i + detailX + 1);\n indices.push(i + detailX + 1, i + 1, i + detailX + 2);\n }\n }\n }\n\n if (options.backface !== false) {\n GeometryHelper.addBackfaceTriangles(vertices, indices);\n\n // duplicate texture coordinates as well\n\n var len = textureCoords.length;\n for (i = 0; i < len; i++) textureCoords.push(textureCoords[i]);\n }\n\n normals = GeometryHelper.computeNormals(vertices, indices);\n\n options.buffers = [\n { name: 'a_pos', data: vertices },\n { name: 'a_texCoord', data: textureCoords, size: 2 },\n { name: 'a_normals', data: normals },\n { name: 'indices', data: indices, size: 1 }\n ];\n\n return new Geometry(options);\n}\n\nmodule.exports = Plane;\n"} +{"text": "Subject: columbia energy history data\r\nfyi - we will probably be asked what historical information is needed in our\r\nshop from a logistics perspective . i would suggest asking the new ces\r\nemployees to give us a list of what they know we would probably need to deal\r\nwith historical questions on pipeline and customer physical imbalances as\r\nwell as any other information that helps support some of the large customer\r\nand asset transactions .\r\nhave each of them put together a list that we can consolidate and forward to\r\nthe it folks .\r\nthanks - bob\r\n- - - - - - - - - - - - - - - - - - - - - - forwarded by robert superty / hou / ect on 01 / 06 / 2000\r\n07 : 56 am - - - - - - - - - - - - - - - - - - - - - - - - - - -\r\nenron technology\r\nfrom : inja chun 01 / 05 / 2000 01 : 21 pm\r\nto : susan harrison / hou / ect @ ect , bryce baxter / hou / ect @ ect , sheri\r\nthomas / hou / ect @ ect\r\ncc : brent a price / hou / ect @ ect , brenda f herod / hou / ect @ ect , robert\r\nsuperty / hou / ect @ ect , tommy j yanowski / hou / ect @ ect , sally beck / hou / ect @ ect ,\r\nlarrissa sharma / hou / ect @ ect , anthony dayao / hou / ect @ ect , lawrence r\r\ndaze / hou / ect @ ect , richard burchfield / hou / ect @ ect , jpeople @ columbiaenergy . com ,\r\ntommy j yanowski / hou / ect @ ect , beth s perlman / lon / ect @ ect , philippe a\r\nbibi / hou / ect @ ect , mark friedman / hou / ect @ ect , mary solmonson / hou / ect @ ect , bob\r\nklein / hou / ect @ ect , georgeanne hodges / hou / ect @ ect , lisa csikos / hou / ect @ ect ,\r\nrita wynne / hou / ect @ ect\r\nsubject : columbia energy history data\r\nthe following summarizes the decisions made during our user & it joint\r\nmeeting today regarding the handling of ces historical data .\r\na . bryce baxter will coordinate with all user groups to identify ces reports\r\nthat need to be actually printed as hard copy or transfered to files that\r\nwill be accessed via the electronic document management system .\r\nb . jeff peoples will be working with bryce baxter to produce reports using\r\nces system via isdn line at enron building - this will continue to be part of\r\nhis duty until the job is done ( jeff joined ena as a member of sitara group ) .\r\nc . larry daze will be working with jeff peoples and bryce baxter to ensure\r\nall reports are loaded on our edms with proper indexing .\r\nd . no need for manupulating ces history data is necessary ( i . e . downloading\r\non spreadsheets ) . therefore , no data will be kept on the disk other than\r\nedms ."} +{"text": "####Using IKE scanner####\n\n##After unzipping your fw.zip file. Go to the FW/Tools directory\n\ncd /current/bin/FW/Tools\n\n##Make sure ike-scan.rh9 binary and the vender ID file exists\n\nls -l /current/bin/FW/Tools/ike-scan\n\n##Script your window with \"myenv\"\n\n##To perform the scan with redirection, set up your tunnels\n\n-tunnel\nu 555 500 500\n\n##Execute the ike-scanner\n\n./ike-scan -N -d 555 127.0.0.1\n\n##You should get a Key or ID back from the firewall to help you\n##identify the IOS and hardware running\n\n"} +{"text": "#The number of channels we want to process\nnchannels_in = 2\n#Number of frames to be processed in each block.\nfragsize = 64\n#Sampling rate. Has to be the same as the input signal of JACK\nsrate = 44100\n#Again, we want to use the plugin \"mhachain\"\nmhalib = mhachain\n#Here we will only use one plugin \"gain\"\nmha.algos=[ gain ]\n#Set max and min gain factors in dB\nmha.gain.min=-20\nmha.gain.max=20\n#two gain factors (left and right)\nmha.gain.gains=[ -10 10 ]\n#In this example, we load the IO library that connects\n#the MHA to the Jack audio server.\niolib = MHAIOJackdb\n# The following variable is used to select the input sound\n# channel(s), following the usual Jack nomenclature\nio.con_in = [system:capture_1 system:capture_2]\n# con_out sets the output channels\nio.con_out = [system:playback_1 system:playback_2]\n"} +{"text": "package com.tomcat.ocr.idcard;\n\nimport android.content.Context;\nimport android.support.test.InstrumentationRegistry;\nimport android.support.test.runner.AndroidJUnit4;\n\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\n\nimport static org.junit.Assert.*;\n\n/**\n * Instrumented test, which will execute on an Android device.\n *\n * @see Testing documentation\n */\n@RunWith(AndroidJUnit4.class)\npublic class ExampleInstrumentedTest {\n @Test\n public void useAppContext() throws Exception {\n // Context of the app under test.\n Context appContext = InstrumentationRegistry.getTargetContext();\n\n assertEquals(\"com.tomcat.ocr.idcard\", appContext.getPackageName());\n }\n}\n"} +{"text": "# ---- HTTP Server ----------------------------------------------------------\n\n[server:main]\n\nuse = egg:Paste#http\nport = 9009\n\n# The address on which to listen. By default, only listen to localhost\n# (the Tool Shed will not be accessible over the network).\n# Use '0.0.0.0' to listen on all available network interfaces.\n#host = 0.0.0.0\nhost = 127.0.0.1\n\nuse_threadpool = true\nthreadpool_workers = 10\n# Set the number of seconds a thread can work before you should kill it\n# (assuming it will never finish) to 3 hours.\nthreadpool_kill_thread_limit = 10800\n\n# Define the proxy-prefix filter.\n[filter:proxy-prefix]\nuse = egg:PasteDeploy#prefix\nprefix = /shed\n\n# ---- Galaxy Tool Shed -----------------------------------------------------\n\n[app:main]\n\nfilter-with = proxy-prefix\n\n# Specifies the factory for the universe WSGI application\npaste.app_factory = galaxy.webapps.tool_shed.buildapp:app_factory\n\n# Verbosity of console log messages. Acceptable values can be found here:\n# https://docs.python.org/2/library/logging.html#logging-levels\n#log_level = DEBUG\n\n# By default, the Tool Shed uses a SQLite database at 'database/community.sqlite'. You\n# may use a SQLAlchemy connection string to specify an external database\n# instead. This string takes many options which are explained in detail in the\n# config file documentation.\n#database_connection = sqlite:///./database/community.sqlite?isolation_level=IMMEDIATE\n\n# Where the hgweb.config file is stored.\n# The default is the Galaxy installation directory.\n#hgweb_config_dir = None\n\n# Where tool shed repositories are stored.\n#file_path = database/community_files\n\n# Temporary storage for additional datasets,\n# this should be shared through the cluster\n#new_file_path = database/tmp\n\n# File containing old-style genome builds\n#builds_file_path = tool-data/shared/ucsc/builds.txt\n\n# Format string used when showing date and time information.\n# The string may contain:\n# - the directives used by Python time.strftime() function (see\n# https://docs.python.org/2/library/time.html#time.strftime ),\n# - $locale (complete format string for the server locale),\n# - $iso8601 (complete format string as specified by ISO 8601 international\n# standard).\n#pretty_datetime_format = $locale (UTC)\n\n# -- Repository and Tool search\n# Using the script located at scripts/build_ts_whoosh_index.py\n# you can generate search index and allow full text API searching over\n# the repositories and tools within the Tool Shed given that you specify\n# the following two config options.\n#toolshed_search_on = True\n#whoosh_index_dir = database/toolshed_whoosh_indexes\n\n# The following boosts are used to customize this instance's TS search.\n# The higher the boost, the more importance the scoring algorithm gives to the\n# given field.\n\n# For searching repositories at /api/repositories:\n#repo_name_boost = 0.9\n#repo_description_boost = 0.6\n#repo_long_description_boost = 0.5\n#repo_homepage_url_boost = 0.3\n#repo_remote_repository_url_boost = 0.2\n#repo_owner_username_boost = 0.3\n\n# For searching tools at /api/tools\n#tool_name_boost = 1.2\n#tool_description_boost = 0.6\n#tool_help_boost = 0.4\n#tool_repo_owner_username = 0.3\n\n# -- Analytics\n\n# You can enter tracking code here to track visitor's behavior\n# through your Google Analytics account. Example: UA-XXXXXXXX-Y\n#ga_code = None\n\n# -- Users and Security\n\n# The Tool Shed encodes various internal values when these values will be output in\n# some format (for example, in a URL or cookie). You should set a key to be\n# used by the algorithm that encodes and decodes these values. It can be any\n# string. If left unchanged, anyone could construct a cookie that would grant\n# them access to others' sessions.\n# One simple way to generate a value for this is with the shell command:\n# python -c 'import time; print time.time()' | md5sum | cut -f 1 -d ' '\n#id_secret = changethisinproductiontoo\n\n# User authentication can be delegated to an upstream proxy server (usually\n# Apache). The upstream proxy should set a REMOTE_USER header in the request.\n# Enabling remote user disables regular logins. For more information, see:\n# https://wiki.galaxyproject.org/Admin/Config/ApacheProxy\n#use_remote_user = False\n\n# If use_remote_user is enabled, anyone who can log in to the Galaxy host may\n# impersonate any other user by simply sending the appropriate header. Thus a\n# secret shared between the upstream proxy server, and Galaxy is required.\n# If anyone other than the Galaxy user is using the server, then apache/nginx\n# should pass a value in the header 'GX_SECRET' that is identical the one below\n#remote_user_secret = changethisinproductiontoo\n\n# Configuration for debugging middleware\n#debug = False\n\n# Check for WSGI compliance.\n#use_lint = False\n\n# Intercept print statements and show them on the returned page.\n#use_printdebug = True\n\n# NEVER enable this on a public site (even test or QA)\n#use_interactive = true\n\n# Administrative users - set this to a comma-separated list of valid Tool Shed\n# users (email addresses). These users will have access to the Admin section\n# of the server, and will have access to create users, groups, roles,\n# libraries, and more.\n#admin_users = None\n\n# Force everyone to log in (disable anonymous access)\n#require_login = False\n\n# For use by email messages sent from the tool shed\n#smtp_server = smtp.your_tool_shed_server\n#email_from = your_tool_shed_email@server\n\n# If your SMTP server requires a username and password, you can provide them\n# here (password in cleartext here, but if your server supports STARTTLS it\n# will be sent over the network encrypted).\n#smtp_username = None\n#smtp_password = None\n\n# If your SMTP server requires SSL from the beginning of the connection\n#smtp_ssl = False\n\n# The URL linked by the \"Support\" link in the \"Help\" menu.\n#support_url = https://wiki.galaxyproject.org/Support\n\n# Address to join mailing list\n#mailing_join_addr = galaxy-announce-join@bx.psu.edu\n\n# Write thread status periodically to 'heartbeat.log' (careful, uses disk\n# space rapidly!)\n#use_heartbeat = True\n\n# Profiling middleware (cProfile based)\n#use_profile = True\n\n# Enable creation of Galaxy flavor Docker Image\n#enable_galaxy_flavor_docker_image = False\n\n# Show a message box under the masthead.\n#message_box_visible = False\n#message_box_content = None\n#message_box_class = info\n\n# Serving static files (needed if running standalone)\n#static_enabled = True\n#static_cache_time = 360\n#static_dir = static/\n#static_images_dir = static/images\n#static_favicon_dir = static/favicon.ico\n#static_scripts_dir = static/scripts/\n#static_style_dir = static/style/blue\n\n# Sentry (getsentry.com) DSN for catching bugs.\n#sentry_dsn = None"} +{"text": "#!/usr/bin/env python3\n# ====================================\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# ====================================\n\n\"\"\"Script to generate certificate and key file.\"\"\"\nfrom OpenSSL import crypto\nfrom socket import gethostname\nimport argparse\n\n\ndef generate_cert_and_key(cert_name, key_name):\n pub_key = crypto.PKey()\n pub_key.generate_key(crypto.TYPE_RSA, 1024)\n\n cert = crypto.X509() # Self-signed\n cert.get_subject().C = \"US\" # Country code\n cert.get_subject().ST = \"WA\" # State\n cert.get_subject().L = \"Redmond\" # Location\n cert.get_subject().O = \"Microsoft\" # Org\n cert.get_subject().OU = \"AzureAutomation\" # Org unit\n cert.get_subject().CN = gethostname() # Common name\n cert.set_serial_number(666)\n cert.gmtime_adj_notBefore(0) # Now\n cert.gmtime_adj_notAfter(10 * 365 * 24 * 60 * 60) # 10 years from now\n cert.set_issuer(cert.get_subject())\n cert.set_pubkey(pub_key)\n cert.sign(pub_key, 'sha1')\n\n open(cert_name, \"wt\").write(crypto.dump_certificate(crypto.FILETYPE_PEM, cert))\n open(key_name, \"wt\").write(crypto.dump_privatekey(crypto.FILETYPE_PEM, pub_key))\n\n print (\"Certificate thumprint : \" + str(cert.digest(\"sha1\").replace(\":\", \"\")))\n print (cert_name + \" created\")\n print (key_name + \" created\")\n\n\ndef main():\n parser = argparse.ArgumentParser()\n parser.add_argument('-certfilename', help='Certificate file name', default=\"certificate.crt\")\n parser.add_argument('-keyfilename', help='Private key file name', default=\"private.key\")\n args = parser.parse_args()\n generate_cert_and_key(args.certfilename, args.keyfilename)\n\nif __name__ == \"__main__\":\n main()"} +{"text": "[section:fp_facets Facets for Floating-Point Infinities and NaNs]\n\n[import ../../example/nonfinite_facet_sstream.cpp]\n\n[h4 Synopsis]\n\n namespace boost{ namespace math\n {\n // Values for flags.\n const int legacy;\n const int signed_zero;\n const int trap_infinity;\n const int trap_nan;\n\n template<\n class CharType,\n class OutputIterator = std::ostreambuf_iterator\n >\n class nonfinite_num_put : public std::num_put\n {\n public:\n explicit nonfinite_num_put(int flags = 0);\n };\n\n template<\n class CharType,\n class InputIterator = std::istreambuf_iterator\n >\n class nonfinite_num_get : public std::num_get\n {\n public:\n explicit nonfinite_num_get(int flags = 0); // legacy, sign_zero ...\n };\n }} // namespace boost namespace math\n\nTo use these facets\n\n #include \n\n\n[section:facets_intro Introduction]\n\n[h5 The Problem]\n\nThe C++98 standard does not specify how ['infinity] and ['NaN] are represented in text streams.\nAs a result, different platforms use different string representations.\nThis can cause undefined behavior when text files are moved between different platforms.\nSome platforms cannot even input parse their own output!\nSo 'route-tripping' or loopback of output to input is not possible.\nFor instance, the following test fails with MSVC:\n\n stringstream ss;\n double inf = numeric_limits::infinity();\n double r;\n ss << inf; // Write out.\n ss >> r; // Read back in.\n\n cout << \"infinity output was \" << inf << endl; // 1.#INF\n cout << \"infinity input was \" << r << endl; // 1\n\n assert(inf == y); // Fails!\n\n[h5 The Solution]\n\nThe facets `nonfinite_num_put` and `nonfinite_num_get`\nformat and parse all floating-point numbers,\nincluding `infinity` and `NaN`, in a consistent and portable manner.\n\nThe following test succeeds with MSVC.\n\n[nonfinite_facets_sstream_1]\n\n[tip To add two facets, `nonfinite_num_put` and `nonfinite_num_get`,\nyou may have to add one at a time, using a temporary locale.\n\nOr you can create a new locale in one step\n\n`std::locale new_locale(std::locale(std::locale(std::locale(), new boost::math::nonfinite_num_put), new boost::math::nonfinite_num_get));`\n\nand, for example, use it to imbue an input and output stringstream.\n]\n\n[tip To just change an input or output stream, you can concisely write\n`cout.imbue (std::locale(std::locale(), new boost::math::nonfinite_num_put));`\nor\n`cin.imbue (std::locale(std::locale(), new boost::math::nonfinite_num_get));`\n]\n\n[nonfinite_facets_sstream_2]\n\n[h4 C++0X standard for output of infinity and NaN]\n\n[@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf C++0X (final) draft standard]\ndoes not explicitly specify the representation (and input) of nonfinite values,\nleaving it implementation-defined.\nSo without some specific action, input and output of nonfinite values is not portable.\n\n[h4 C99 standard for output of infinity and NaN]\n\nThe [@http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf C99 standard]\n[*does] specify how infinity and NaN\nare formatted by printf and similar output functions,\nand parsed by scanf and similar input functions.\n\nThe following string representations are used:\n\n[table C99 Representation of Infinity and NaN\n[[number] [string]]\n[[Positive infinity][\"inf\" or \"infinity\"]]\n[[Positive NaN][\"nan\" or \"nan(...)\"]]\n[[Negative infinity][\"-inf\" or \"-infinity\"]]\n[[Negative NaN][\"-nan\" or \"-nan(...)\"]]\n]\n\nSo following C99 provides a sensible 'standard' way\nof handling input and output of nonfinites in C++,\nand this implementation follows most of these formats.\n\n[h5 Signaling NaNs]\nA particular type of NaN is the signaling NaN.\nThe usual mechanism of signaling is by raising a floating-point exception.\nSignaling NaNs are defined by\n[@http://en.wikipedia.org/wiki/IEEE_floating-point_standard IEEE 754-2008].\n\nFloating-point values with layout ['s]111 1111 1['a]xx xxxx xxxx xxxx xxxx xxxx\nwhere ['s] is the sign, ['x] is the payload, and bit ['a] determines the type of NaN.\n\nIf bit ['a] = 1, it is a quiet NaN.\n\nIf bit ['a] is zero and the payload ['x] is nonzero, then it is a signaling NaN.\n\nAlthough there has been theoretical interest in the ability of a signaling NaN\nto raise an exception, for example to prevent use of an uninitialised variable,\nin practice there appears to be no useful application of signaling NaNs for\nmost current processors.\n[@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf C++0X 18.3.2.2]\nstill specifies a (implementation-defined) representation for signaling NaN,\nand `static constexpr bool has_signaling_NaN`\na method of checking if a floating-point type has a representation for signaling NaN.\n\nBut in practice, most platforms treat signaling NaNs in the same as quiet NaNs.\nSo, for example, they are represented by \"nan\" on output in\n[@http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1256.pdf C99] format,\nand output as `1.#QNAN` by Microsoft compilers.\n\n[note The C99 standard does not distinguish\nbetween the quiet NaN and signaling NaN values.\nA quiet NaN propagates through almost every arithmetic operation\nwithout raising a floating-point exception;\na signaling NaN generally raises a floating-point exception\nwhen occurring as an arithmetic operand.\n\nC99 specification does not define the behavior of signaling NaNs.\nNaNs created by IEC 60559 operations are always quiet.\nTherefore this implementation follows C99, and treats the signaling NaN bit\nas just a part of the NaN payload field.\nSo this implementation does not distinguish between the two classes of NaN.]\n\n[note An implementation may give zero and non-numeric values (such as infinities and NaNs)\na sign or may leave them unsigned. Wherever such values are unsigned,\nany requirement in the C99 Standard to retrieve the sign shall produce an unspecified sign,\nand any requirement to set the sign shall be ignored.\n\nThis might apply to user-defined types, but in practice built-in floating-point\ntypes `float`, `double` and `long double` have well-behaved signs.]\n\nThe numbers can be of type `float`, `double` and `long double`.\nAn optional + sign can be used with positive numbers (controlled by ios manipulator `showpos`).\nThe function `printf` and similar C++ functions use standard formatting flags\nto put all lower or all upper case\n(controlled by `std::ios` manipulator `uppercase` and `lowercase`).\n\nThe function `scanf` and similar input functions are case-insensitive.\n\nThe dots in `nan(...)` stand for an arbitrary string.\nThe meaning of that string is implementation dependent.\nIt can be used to convey extra information about the NaN, from the 'payload'.\nA particular value of the payload might be used to indicate a ['missing value], for example.\n\nThis library uses the string representations specified by the C99 standard.\n\nAn example of an implementation that optionally includes the NaN payload information is at\n[@http://publib.boulder.ibm.com/infocenter/zos/v1r10/index.jsp?topic=/com.ibm.zos.r10.bpxbd00/fprints.htm AIX NaN fprintf].\nThat implementation specifies for Binary Floating Point NANs:\n\n* A NaN ordinal sequence is a left-parenthesis character '(',\nfollowed by a digit sequence representing\nan integer n, where 1 <= n <= INT_MAX-1,\nfollowed by a right-parenthesis character ')'.\n\n* The integer value, n, is determined by the fraction bits of the NaN argument value as follows:\n\n* For a signalling NaN value, NaN fraction bits are reversed (left to right)\nto produce bits (right to left) of an even integer value, 2*n.\nThen formatted output functions produce a (signalling) NaN ordinal sequence\ncorresponding to the integer value n.\n\n* For a quiet NaN value, NaN fraction bits are reversed (left to right)\nto produce bits (right to left) of an odd integer value, 2*n-1.\nThen formatted output functions produce a (quiet) NaN ordinal sequence\ncorresponding to the integer value n.\n\n[warning This implementation does not (yet) provide output of, or access to, the NaN payload.]\n\n[endsect] [/section:intro Introduction]\n\n[section:reference Reference]\n\n[h5 The Facet `nonfinite_num_put`]\n\n template<\n class CharType, class OutputIterator = std::ostreambuf_iterator\n >\n class nonfinite_num_put;\n\nThe `class nonfinite_num_put`\nis derived from `std::num_put`.\nThus it is a facet that formats numbers.\nThe first template argument is the character type of the formatted strings,\nusually `char` or `wchar_t`.\nThe second template argument is the type of iterator used to write the strings.\nIt is required to be an output iterator.\nUsually the default `std::ostreambuf_iterator` is used.\nThe public interface of the class consists of a single constructor only:\n\n nonfinite_num_put(int flags = 0);\n\nThe flags argument (effectively optional because a default of ` no_flags` is provided)\nis discussed below.\nThe class template `nonfinite_num_put` is defined in the\nheader `boost/math/nonfinite_num_facets.hpp`\nand lives in the namespace `boost::math`.\n\nUnlike the C++ Standard facet `std::num_put`, the facet `nonfinite_num_put`\nformats `infinity` and `NaN` in a consistent and portable manner.\nIt uses the following string representations:\n\n[table\n[[Number][String]]\n[[Positive infinity][inf]]\n[[Positive NaN][nan]]\n[[Negative infinity][-inf]]\n[[Negative NaN][-nan]]\n]\n\nThe numbers can be of type `float`, `double` and `long double`.\nThe strings can be in all lower case or all upper case.\nAn optional + sign can be used with positive numbers.\nThis can be controlled with the `uppercase`, `lowercase`, `showpos` and `noshowpos` manipulators.\nFormatting of integers, boolean values and finite floating-point numbers is simply delegated to the normal `std::num_put`.\n\n\n[h5 Facet `nonfinite_num_get`]\n\n template > class nonfinite_num_get;\n\nThe class `nonfinite_num_get` is derived from `std::num_get`.\nThus it is a facet that parses strings that represent numbers.\nThe first template argument is the character type of the strings,\nusually `char` or `wchar_t`.\nThe second template argument is the type of iterator used to read the strings.\nIt is required to be an input iterator. Usually the default is used.\nThe public interface of the class consists of a single constructor only:\n\n nonfinite_num_get(int flags = 0);\n\nThe flags argument is discussed below.\nThe `class template nonfinite_num_get` is defined\nin the header `boost/math/nonfinite_num_facets.hpp`\nand lives in the `namespace boost::math`.\n\nUnlike the facet `std::num_get`, the facet `nonfinite_num_get` parses strings\nthat represent `infinity` and `NaN` in a consistent and portable manner.\nIt recognizes precisely the string representations specified by the C99 standard:\n\n[table\n[[Number][String]]\n[[Positive infinity][inf, infinity]]\n[[Positive NaN][nan, nan(...)]]\n[[Negative infinity][-inf, -infinity]]\n[[Negative NaN][-nan, -nan(...)]]\n]\n\nThe numbers can be of type `float`, `double` and `long double`.\nThe facet is case-insensitive. An optional + sign can be used with positive numbers.\nThe dots in nan(...) stand for an arbitrary string usually containing the ['NaN payload].\nParsing of strings that represent integers, boolean values\nand finite floating-point numbers is delegated to `std::num_get`.\n\nWhen the facet parses a string that represents `infinity` on a platform that lacks infinity,\nthen the fail bit of the stream is set.\n\nWhen the facet parses a string that represents `NaN` on a platform that lacks NaN,\nthen the fail bit of the stream is set.\n\n[h4 Flags]\n\nThe constructors for `nonfinite_num_put` and `nonfinite_num_get`\ntake an optional bit flags argument.\nThere are four different bit flags:\n\n* legacy\n* signed_zero\n* trap_infinity\n* trap_nan\n\nThe flags can be combined with the OR `operator|`.\n\nThe flags are defined in the header `boost/math/nonfinite_num_facets.hpp`\nand live in the `namespace boost::math`.\n\n[h5 legacy]\n\nThe legacy flag has no effect with the output facet `nonfinite_num_put`.\n\nIf the legacy flag is used with the `nonfinite_num_get` input facet,\nthen the facet will recognize all the following string representations of `infinity` and `NaN`:\n\n[table\n[[Number][String]]\n[[Positive infinity][inf, infinity, one#inf]]\n[[Positive NaN][nan, nan(...), nanq, nans, qnan, snan, one#ind, one#qnan, one#snan]]\n[[Negative infinity][-inf, -infinity, -one#inf]]\n[[Negative NaN][-nan, -nan(...), -nanq, -nans, -qnan, -snan, -one#ind, - one#qnan, -one#snan]]\n]\n\n* The numbers can be of type `float`, `double` and `long double`.\n* The facet is case-insensitive.\n* An optional `+` sign can be used with the positive values.\n* The dots in `nan(...)` stand for an arbitrary string.\n* `one` stands for any string that `std::num_get` parses as the number `1`,\ntypically \"1.#INF\", \"1.QNAN\" but also \"000001.#INF\"...\n\nThe list includes a number of non-standard string representations of infinity and NaN\nthat are used by various existing implementations of the C++ standard library,\nand also string representations used by other programming languages.\n\n[h5 signed_zero]\n\nIf the `signed_zero` flag is used with `nonfinite_num_put`,\nthen the facet will always distinguish between positive and negative zero.\nIt will format positive zero as \"0\" or \"+0\" and negative zero as \"-0\".\nThe string representation of positive zero can be controlled\nwith the `showpos` and `noshowpos` manipulators.\n\nThe `signed_zero flag` has no effect with the input facet `nonfinite_num_get`.\nThe input facet `nonfinite_num_get` always parses \"0\" and \"+0\"\nas positive zero and \"-0\" as negative zero,\nas do most implementations of `std::num_get`.\n\n[note If the `signed_zero` flag is not set (the default), then a negative zero value\nwill be displayed on output in whatever way the platform normally handles it.\nFor most platforms, this it will format positive zero as \"0\" or \"+0\" and negative zero as \"-0\".\nBut setting the `signed_zero` flag may be more portable.]\n\n[tip A negative zero value can be portably produced using the changesign function\n`(changesign)(static_cast(0))` where `ValType` is `float`, `double` or `long double`,\n or a User-Defined floating-point type (UDT) provided that this UDT has a sign\nand that the changesign function is implemented.]\n\n[h5 trap_infinity]\n\nIf the `trap_infinity` flag is used with `nonfinite_num_put`,\nthen the facet will throw an exception of type `std::ios_base::failure`\nwhen an attempt is made to format positive or negative infinity.\nIf the facet is called from a stream insertion operator,\nthen the stream will catch that exception and set either its `fail bit` or its `bad bit`.\nWhich bit is set is platform dependent.\n\nIf the `trap_infinity` flag is used with `nonfinite_num_get`,\nthen the facet will set the `fail bit` of the stream when an attempt is made\nto parse a string that represents positive or negative infinity.\n\n\n(See Design Rationale below for a discussion of this inconsistency.)\n\n[h5 trap_nan]\n\nSame as `trap_infinity`, but positive and negative NaN are trapped instead.\n\n[endsect] [/section:reference Reference]\n\n\n[section:examples Examples]\n\n[h5 Simple example with std::stringstreams]\n\n[nonfinite_facets_sstream_1]\n[nonfinite_facets_sstream_2]\n\n[h5 Use with lexical_cast]\n\n[note From Boost 1.48, lexical_cast no longer uses stringstreams internally,\nand is now able to handle infinities and NaNs natively on most platforms.]\n\nWithout using a new locale that contains the nonfinite facets,\nprevious versions of `lexical_cast` using stringstream were not portable\n(and often failed) if nonfinite values are found.\n\n[nonfinite_facets_sstream_1]\n\nAlthough other examples imbue individual streams with the new locale,\nfor the streams constructed inside lexical_cast,\nit was necesary to assign to a global locale.\n\n locale::global(new_locale);\n\n`lexical_cast` then works as expected, even with infinity and NaNs.\n\n double x = boost::lexical_cast(\"inf\");\n assert(x == std::numeric:limits::infinity());\n\n string s = boost::lexical_cast(numeric_limits::infinity());\n assert(s == \"inf\");\n\n[warning If you use stringstream inside your functions,\nyou may still need to use a global locale to handle nonfinites correctly.\nOr you need to imbue your stringstream with suitable get and put facets.]\n\n[warning You should be aware that the C++ specification does not explicitly require\nthat input from decimal digits strings converts with rounding to the\nnearest representable floating-point binary value.\n(In contrast, decimal digits read by the compiler,\nfor example by an assignment like `double d = 1.234567890123456789`,\nare guaranteed to assign the nearest representable value to double d).\nThis implies that, no matter how many decimal digits you provide,\nthere is a potential uncertainty of 1 least significant bit in the resulting binary value.]\n\nSee [@http://en.wikipedia.org/wiki/Floating_point#Representable_numbers.2C_conversion_and_rounding conversion and rounding]\nfor more information on ['nearest representable] and ['rounding] and\n[@http://www.exploringbinary.com/ Exploring Binary] for much detail on input and round-tripping difficulties.\n\nMost iostream libraries do in fact achieve the desirable\n['nearest representable floating-point binary value] for all values of input.\nHowever one popular STL library does not quite achieve this for 64-bit doubles. See\n[@http://connect.microsoft.com/VisualStudio/feedback/details/98770/decimal-digit-string-input-to-double-may-be-1-bit-wrong\nDecimal digit string input to double may be 1 bit wrong] for the bizarre full details.\n\nIf you are expecting to 'round-trip' `lexical_cast` or `serialization`,\nfor example archiving and loading,\nand want to be [*absolutely certain that you will\nalways get an exactly identical double value binary pattern],\nyou should use the suggested 'workaround' below that is believed to work on all platforms.\n\nYou should output using all potentially significant decimal digits,\nby setting stream precision to `std::numeric_limits::max_digits10`,\n(or for the appropriate floating-point type, if not double)\nand crucially, [*require `scientific` format], not `fixed` or automatic (default), for example:\n\n double output_value = any value;\n std::stringstream s;\n s << setprecison(std::numeric_limits::max_digits10) << scientific << output_value;\n s >> input_value;\n\n\n[h4 Use with serialization archives]\n\nIt is vital that the same locale is used\nwhen an archive is saved and when it is loaded.\nOtherwise, loading the archive may fail.\nBy default, archives are saved and loaded with a classic C locale\nwith a `boost::archive::codecvt_null` facet added.\nNormally you do not have to worry about that.\n\nThe constructors for the archive classes, as a side-effect,\nimbue the stream with such a locale.\nHowever, if you want to use the\nfacets `nonfinite_num_put` and `nonfinite_num_get` with archives,\nthen you have to manage the locale manually.\nThat is done by calling the archive constructor with the flag\n`boost::archive::no_codecvt`, thereby ensuring that the archive constructor\nwill [*not imbue the stream with a new locale].\n\nThe following code shows how to use `nonfinite_num_put` with a `text_oarchive`.\n\n locale default_locale(locale::classic(), new boost::archive::codecvt_null);\n locale my_locale(default_locale, new nonfinite_num_put);\n\n ofstream ofs(\"test.txt\");\n ofs.imbue(my_locale);\n\n boost::archive::text_oarchive oa(ofs, no_codecvt);\n\n double x = numeric_limits::infinity();\n oa & x;\n\nThe same method works with `nonfinite_num_get` and `text_iarchive`.\n\nIf you use the `nonfinite_num_put` with `trap_infinity`\nand/or `trap_nan` flag with a serialization archive,\nthen you must set the exception mask of the stream.\nSerialization archives do not check the stream state.\n\n\n[h5 Other examples]\n\n[@../../example/nonfinite_facet_simple.cpp nonfinite_facet_simple.cpp]\ngive some more simple demonstrations of the difference between using classic C locale\nand constructing a C99 infinty and NaN compliant locale for input and output.\n\nSee [@../../example/nonfinite_facet_sstream.cpp nonfinite_facet_sstream.cpp]\nfor this example of use with `std::stringstream`s.\n\nFor an example of how to enforce the MSVC 'legacy'\n\"1.#INF\" and \"1.#QNAN\" representations of infinity and NaNs,\nfor input and output,\nsee [@../../example/nonfinite_legacy.cpp nonfinite_legacy.cpp].\n\nTreatment of signaling NaN is demonstrated at\n[@../../example/nonfinite_signaling_NaN.cpp]\n\nExample [@../../example/nonfinite_loopback_ok.cpp] shows loopback works OK.\n\nExample [@../../example/nonfinite_num_facet.cpp] shows output and re-input\nof various finite and nonfinite values.\n\nA simple example of trapping nonfinite output is at\n[@../../example/nonfinite_num_facet_trap.cpp nonfinite_num_facet_trap.cpp].\n\nA very basic example of using Boost.Archive is at\n[@../../example/nonfinite_serialization_archives.cpp].\n\nA full demonstration of serialization by Francois Mauger is at\n[@../../example/nonfinite_num_facet_serialization.cpp]\n\n[endsect] [/section:examples Examples]\n\n[section:portability Portability]\n\nThis library uses the floating-point number classification and sign-bit from Boost.Math library,\nand should work on all platforms where that library works.\nSee the portability information for that library.\n\n[endsect] [/section:portability Portability]\n\n[section:rationale Design Rationale]\n\n* The flags are implemented as a const data member of the facet.\nFacets are reference counted, and locales can share facets.\nTherefore changing the flags of a facet would have effects that are hard to predict.\nAn alternative design would be to implement the flags\nusing `std::ios_base::xalloc` and `std::ios_base::iword`.\nThen one could safely modify the flags, and one could define manipulators that do so.\nHowever, for that to work with dynamically linked libraries,\na `.cpp` file would have to be added to the library.\nIt was judged be more desirable to have a header-only library,\nthan to have mutable flags and manipulators.\n\n* The facet `nonfinite_num_put` throws an exception when\nthe `trap_infinity` or `trap_nan` flag is set\nand an attempt is made to format infinity or NaN.\nIt would be better if the facet set the `fail bit` of the stream.\nHowever, facets derived from `std::num_put` do not have access to the stream state.\n\n[endsect] [/section:rationale Design Rationale]\n\n[endsect] [/section:fp_facets Facets for Floating-Point Infinities and NaNs]\n\n[/\n Copyright Johan Rade and Paul A. Bristow 2011.\n Distributed under the Boost Software License, Version 1.0.\n (See accompanying file LICENSE_1_0.txt or copy at\n http://www.boost.org/LICENSE_1_0.txt).\n]\n\n\n\n\n"} +{"text": "import { IconDefinition } from '../types';\ndeclare const UpSquareFilled: IconDefinition;\nexport default UpSquareFilled;\n"} +{"text": "{\n mkDerivation,\n extra-cmake-modules,\n kauth, kcompletion, kconfig, kconfigwidgets, kcoreaddons, ki18n, kiconthemes,\n kservice, kwidgetsaddons, kwindowsystem, plasma-framework, qtscript, qtwebengine,\n qtx11extras\n}:\n\nmkDerivation {\n name = \"libksysguard\";\n patches = [\n ./0001-qdiriterator-follow-symlinks.patch\n ];\n nativeBuildInputs = [ extra-cmake-modules ];\n buildInputs = [\n kauth kconfig ki18n kiconthemes kwindowsystem kcompletion kconfigwidgets\n kcoreaddons kservice kwidgetsaddons plasma-framework qtscript qtx11extras\n qtwebengine\n ];\n outputs = [ \"bin\" \"dev\" \"out\" ];\n}\n"} +{"text": "'use strict';\n\nvar validRegExp = require('../../valid-reg-exp');\n\nmodule.exports = function (string) {\n\tvalidRegExp(this);\n\treturn String(string).split(this);\n};\n"} +{"text": "package org.jboss.seam.log;\n\n/**\n * https://github.com/seam2/jboss-seam/blob/f3077fee9d04b2b3545628cd9e6b58c859feb988/jboss-seam/src/main/java/org/jboss/seam/log/Log.java\n */\npublic interface Log {\n public void trace(Object object, Object... params);\n public void trace(Object object, Throwable t, Object... params);\n public void debug(Object object, Object... params);\n public void debug(Object object, Throwable t, Object... params);\n public void info(Object object, Object... params);\n public void info(Object object, Throwable t, Object... params);\n public void warn(Object object, Object... params);\n public void warn(Object object, Throwable t, Object... params);\n public void error(Object object, Object... params);\n public void error(Object object, Throwable t, Object... params);\n public void fatal(Object object, Object... params);\n public void fatal(Object object, Throwable t, Object... params);\n}\n"} +{"text": "id_data['base'] ) {\n\t\t\tthrow new Exception( 'Expected custom_css id_base.' );\n\t\t}\n\t\tif ( 1 !== count( $this->id_data['keys'] ) || empty( $this->id_data['keys'][0] ) ) {\n\t\t\tthrow new Exception( 'Expected single stylesheet key.' );\n\t\t}\n\t\t$this->stylesheet = $this->id_data['keys'][0];\n\t}\n\n\t/**\n\t * Add filter to preview post value.\n\t *\n\t * @since 4.7.9\n\t *\n\t * @return bool False when preview short-circuits due no change needing to be previewed.\n\t */\n\tpublic function preview() {\n\t\tif ( $this->is_previewed ) {\n\t\t\treturn false;\n\t\t}\n\t\t$this->is_previewed = true;\n\t\tadd_filter( 'wp_get_custom_css', array( $this, 'filter_previewed_wp_get_custom_css' ), 9, 2 );\n\t\treturn true;\n\t}\n\n\t/**\n\t * Filter `wp_get_custom_css` for applying the customized value.\n\t *\n\t * This is used in the preview when `wp_get_custom_css()` is called for rendering the styles.\n\t *\n\t * @since 4.7.0\n\t * @see wp_get_custom_css()\n\t *\n\t * @param string $css Original CSS.\n\t * @param string $stylesheet Current stylesheet.\n\t * @return string CSS.\n\t */\n\tpublic function filter_previewed_wp_get_custom_css( $css, $stylesheet ) {\n\t\tif ( $stylesheet === $this->stylesheet ) {\n\t\t\t$customized_value = $this->post_value( null );\n\t\t\tif ( ! is_null( $customized_value ) ) {\n\t\t\t\t$css = $customized_value;\n\t\t\t}\n\t\t}\n\t\treturn $css;\n\t}\n\n\t/**\n\t * Fetch the value of the setting. Will return the previewed value when `preview()` is called.\n\t *\n\t * @since 4.7.0\n\t * @see WP_Customize_Setting::value()\n\t *\n\t * @return string\n\t */\n\tpublic function value() {\n\t\tif ( $this->is_previewed ) {\n\t\t\t$post_value = $this->post_value( null );\n\t\t\tif ( null !== $post_value ) {\n\t\t\t\treturn $post_value;\n\t\t\t}\n\t\t}\n\t\t$id_base = $this->id_data['base'];\n\t\t$value = '';\n\t\t$post = wp_get_custom_css_post( $this->stylesheet );\n\t\tif ( $post ) {\n\t\t\t$value = $post->post_content;\n\t\t}\n\t\tif ( empty( $value ) ) {\n\t\t\t$value = $this->default;\n\t\t}\n\n\t\t/** This filter is documented in wp-includes/class-wp-customize-setting.php */\n\t\t$value = apply_filters( \"customize_value_{$id_base}\", $value, $this );\n\n\t\treturn $value;\n\t}\n\n\t/**\n\t * Validate CSS.\n\t *\n\t * Checks for imbalanced braces, brackets, and comments.\n\t * Notifications are rendered when the customizer state is saved.\n\t *\n\t * @since 4.7.0\n\t * @since 4.9.0 Checking for balanced characters has been moved client-side via linting in code editor.\n\t *\n\t * @param string $css The input string.\n\t * @return true|WP_Error True if the input was validated, otherwise WP_Error.\n\t */\n\tpublic function validate( $css ) {\n\t\t$validity = new WP_Error();\n\n\t\tif ( preg_match( '#add( 'illegal_markup', __( 'Markup is not allowed in CSS.' ) );\n\t\t}\n\n\t\tif ( empty( $validity->errors ) ) {\n\t\t\t$validity = parent::validate( $css );\n\t\t}\n\t\treturn $validity;\n\t}\n\n\t/**\n\t * Store the CSS setting value in the custom_css custom post type for the stylesheet.\n\t *\n\t * @since 4.7.0\n\t *\n\t * @param string $css The input value.\n\t * @return int|false The post ID or false if the value could not be saved.\n\t */\n\tpublic function update( $css ) {\n\t\tif ( empty( $css ) ) {\n\t\t\t$css = '';\n\t\t}\n\n\t\t$r = wp_update_custom_css_post( $css, array(\n\t\t\t'stylesheet' => $this->stylesheet,\n\t\t) );\n\n\t\tif ( $r instanceof WP_Error ) {\n\t\t\treturn false;\n\t\t}\n\t\t$post_id = $r->ID;\n\n\t\t// Cache post ID in theme mod for performance to avoid additional DB query.\n\t\tif ( $this->manager->get_stylesheet() === $this->stylesheet ) {\n\t\t\tset_theme_mod( 'custom_css_post_id', $post_id );\n\t\t}\n\n\t\treturn $post_id;\n\t}\n}\n"} +{"text": "/*\n * Copyright (C) 2004, 2005 Joe Walnes.\n * Copyright (C) 2006, 2007, 2008, 2011, 2018 XStream Committers.\n * All rights reserved.\n *\n * The software in this package is published under the terms of the BSD\n * style license a copy of which has been included with this distribution in\n * the LICENSE.txt file.\n *\n * Created on 05. September 2004 by Joe Walnes\n */\npackage com.thoughtworks.xstream.io.xml;\n\nimport com.thoughtworks.xstream.io.HierarchicalStreamWriter;\n\nimport junit.framework.TestCase;\n\n\npublic abstract class AbstractXMLWriterTest extends TestCase {\n\n protected HierarchicalStreamWriter writer;\n\n protected abstract void assertXmlProducedIs(String expected);\n\n public void testProducesXmlElements() {\n writer.startNode(\"hello\");\n writer.setValue(\"world\");\n writer.endNode();\n\n assertXmlProducedIs(\"world\");\n }\n\n public void testSupportsNestedElements() {\n\n writer.startNode(\"a\");\n\n writer.startNode(\"b\");\n writer.setValue(\"one\");\n writer.endNode();\n\n writer.startNode(\"b\");\n writer.setValue(\"two\");\n writer.endNode();\n\n writer.startNode(\"c\");\n writer.startNode(\"d\");\n writer.setValue(\"three\");\n writer.endNode();\n writer.endNode();\n\n writer.endNode();\n\n assertXmlProducedIs(\"onetwothree\");\n }\n\n public void testSupportsEmptyTags() {\n writer.startNode(\"empty\");\n writer.endNode();\n\n assertXmlProducedIs(\"\");\n }\n\n public void testSupportsAttributes() {\n writer.startNode(\"person\");\n writer.addAttribute(\"firstname\", \"Joe\");\n writer.addAttribute(\"lastname\", \"Walnes\");\n writer.endNode();\n\n assertXmlProducedIs(\"\");\n }\n\n public void testAttributesAreResettedForNewNode() {\n writer.startNode(\"work\");\n writer.startNode(\"person\");\n writer.addAttribute(\"firstname\", \"Joe\");\n writer.addAttribute(\"lastname\", \"Walnes\");\n writer.endNode();\n writer.startNode(\"project\");\n writer.addAttribute(\"XStream\", \"Codehaus\");\n writer.endNode();\n writer.endNode();\n\n assertXmlProducedIs(\n \"\");\n }\n\n public void testEscapesXmlUnfriendlyCharacters() {\n writer.startNode(\"evil\");\n writer.addAttribute(\"attr\", \"w0000 $ &!;\");\n writer.setValue(\"w0000 $ &!;\");\n writer.endNode();\n\n assertXmlProducedIs(\"w0000 $ <xx> &!;\");\n }\n\n public void testEscapesWhitespaceCharactersInValue() {\n writer.startNode(\"evil\");\n writer.setValue(\" one\\ntwo\\rthree\\r\\nfour\\n\\r five\\tsix \");\n writer.endNode();\n\n assertXmlProducedIs(\"\" //\n + \" one\\n\"\n + \"two three \\n\"\n + \"four\\n\"\n + \" five\\tsix \");\n }\n\n public void testEscapesWhitespaceCharactersInAttribute() {\n writer.startNode(\"evil\");\n writer.addAttribute(\"attr\", \" one\\ntwo\\rthree\\r\\nfour\\n\\r five\\tsix \");\n writer.endNode();\n\n assertXmlProducedIs(\"\");\n }\n\n public void testSupportsEmptyNestedTags() {\n writer.startNode(\"parent\");\n writer.startNode(\"child\");\n writer.endNode();\n writer.endNode();\n\n assertXmlProducedIs(\"\");\n }\n}\n"} +{"text": "/**\n * Yaafe\n *\n * Copyright (c) 2009-2010 Institut Télécom - Télécom Paristech\n * Télécom ParisTech / dept. TSI\n *\n * Author : Benoit Mathieu\n *\n * This file is part of Yaafe.\n *\n * Yaafe is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * Yaafe is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program. If not, see .\n */\n\n#include \"MathUtils.h\"\n\n#include \n#include \n#include \n//#include \"clapack.h\"\n\nusing namespace std;\nusing namespace Eigen;\n\nnamespace YAAFE\n{\n\n int nextpow2(int v) \n {\n int p2 = 1;\n while (v>p2) p2 *= 2;\n return p2;\n }\n\n VectorXd ecalc_hanning(int m, int len)\n {\n VectorXd han(m);\n for (int i=0;i 1 ? displacement : 1);\n int pLen = 1 + nbLPC + displacement;\n int qLen = pLen;\n double ak[pLen];\n ak[0] = 1;\n for (int i = 0; i < nbLPC; i++)\n ak[i + 1] = lpc[i];\n for (int i = 0; i < displacement; i++)\n ak[1 + nbLPC + i] = 0;\n double rootR[pLen];\n double rootI[pLen];\n int nbRoots = 0;\n roots(ak, nbLPC + 1, rootR, rootI, &nbRoots);\n for (int i = 0; i < nbRoots; i++)\n {\n if (pow2(rootR[i]) + pow2(rootI[i]) >= 1)\n {\n cerr\n << \"ERROR: try to compute LSF of polynomial which is not minimum-phase !\"\n << endl;\n break;\n }\n }\n\n // form the sum and difference filters\n double pk[pLen];\n double qk[qLen];\n for (int i = 0; i < pLen; i++)\n {\n pk[i] = ak[i] + ak[pLen - 1 - i];\n qk[i] = ak[i] - ak[pLen - 1 - i];\n }\n\n // If order is even, remove the known roots at z = -1 for P and z = 1 for Q\n // If odd, remove both the roots from Q\n if (pLen % 2 == 1)\n {\n static double qFilt3[] =\n { 1, 0, -1 };\n deconv(qk, qLen, qFilt3, 3);\n qLen -= 2;\n }\n else\n {\n static double pFilt2[] =\n { 1, 1 };\n static double qFilt2[] =\n { 1, -1 };\n deconv(pk, pLen, pFilt2, 2);\n pLen--;\n deconv(qk, qLen, qFilt2, 2);\n qLen--;\n }\n\n // Compute the roots of the polynomials\n int rootIndex = 0;\n roots(pk, pLen, rootR, rootI, &nbRoots);\n for (int i = 0; i < nbRoots; i += 2)\n lsf[rootIndex++] = atan2(rootI[i], rootR[i]);\n roots(qk, qLen, rootR, rootI, &nbRoots);\n for (int i = 0; i < nbRoots; i += 2)\n lsf[rootIndex++] = atan2(rootI[i], rootR[i]);\n // sort lsfs\n std::sort(lsf, lsf + rootIndex);\n for (int i = rootIndex; i < nbLSF; i++)\n lsf[i] = 0;\n // Append the scaling parameter for Schussler LSF\n if (displacement == 0)\n lsf[nbLSF - 1] = pk[0];\n }\n\n void deconv(double* a, int alen, const double* b, int blen)\n {\n for (int i = 0; i < alen; ++i)\n for (int j = 1; j < min(blen, i + 1); j++)\n a[i] -= a[i - j] * b[j];\n }\n\n extern \"C\"\n {\n void dgeev_(char *jobvl, char *jobvr, int *n, double *a, int *lda, double *wr,\n double *wi, double *vl, int *ldvl, double *vr, int *ldvr, double *work,\n int *lwork, int *info);\n }\n\n void roots(const double* ar, int size, double* rootR, double* rootI,\n int* nbRoots)\n {\n // remember input polynomials is ar[0], ar[1], ar[2], ..., ar[size-1]\n\n // Strip trailing zeros, but remember them as roots at zero.\n // int nbRootsZeros;\n // while (size>0 && ar[size-1]==0)\n // {\n // size--;\n // nbRootsZeros++;\n // }\n\n // build companion matrix\n int N = size - 1;\n double* a = new double[N * N];\n memset(a, 0, N*N * sizeof(double));\n for (int i = 0; i < N; i++)\n a[i * N] = -ar[1 + i] / ar[0];\n for (int i = 0; i < N - 1; i++)\n a[(1 + i) + i * N] = 1;\n // allocate work space\n int lWork = 10 * N;\n double work[10 * N];\n int info;\n // call lapack routine\n dgeev_(\"N\", \"N\", &N, a, &N, rootR, rootI, NULL,&N, NULL,&N, work, &lWork,\n &info);\n // release companion matrix\n delete[] a;\n // return nbRoots\n *nbRoots = N;\n }\n#endif\n\n} // YAAFE\n\n"} +{"text": "; inffasx64.asm is a hand tuned assembler version of inffast.c - fast decoding\r\n; version for AMD64 on Windows using Microsoft C compiler\r\n;\r\n; inffasx64.asm is automatically convert from AMD64 portion of inffas86.c\r\n; inffasx64.asm is called by inffas8664.c, which contain more info.\r\n\r\n\r\n; to compile this file, I use option\r\n; ml64.exe /Flinffasx64 /c /Zi inffasx64.asm\r\n; with Microsoft Macro Assembler (x64) for AMD64\r\n;\r\n\r\n; This file compile with Microsoft Macro Assembler (x64) for AMD64\r\n;\r\n; ml64.exe is given with Visual Studio 2005/2008/2010 and Windows WDK\r\n;\r\n; (you can get Windows WDK with ml64 for AMD64 from\r\n; http://www.microsoft.com/whdc/Devtools/wdk/default.mspx for low price)\r\n;\r\n\r\n\r\n.code\r\ninffas8664fnc PROC\r\n\r\n; see http://weblogs.asp.net/oldnewthing/archive/2004/01/14/58579.aspx and\r\n; http://msdn.microsoft.com/library/en-us/kmarch/hh/kmarch/64bitAMD_8e951dd2-ee77-4728-8702-55ce4b5dd24a.xml.asp\r\n;\r\n; All registers must be preserved across the call, except for\r\n; rax, rcx, rdx, r8, r-9, r10, and r11, which are scratch.\r\n\r\n\r\n\tmov [rsp-8],rsi\r\n\tmov [rsp-16],rdi\r\n\tmov [rsp-24],r12\r\n\tmov [rsp-32],r13\r\n\tmov [rsp-40],r14\r\n\tmov [rsp-48],r15\r\n\tmov [rsp-56],rbx\r\n\r\n\tmov rax,rcx\r\n\r\n\tmov\t[rax+8], rbp ; /* save regs rbp and rsp */\r\n\tmov\t[rax], rsp\r\n\r\n\tmov\trsp, rax ; /* make rsp point to &ar */\r\n\r\n\tmov\trsi, [rsp+16] ; /* rsi = in */\r\n\tmov\trdi, [rsp+32] ; /* rdi = out */\r\n\tmov\tr9, [rsp+24] ; /* r9 = last */\r\n\tmov\tr10, [rsp+48] ; /* r10 = end */\r\n\tmov\trbp, [rsp+64] ; /* rbp = lcode */\r\n\tmov\tr11, [rsp+72] ; /* r11 = dcode */\r\n\tmov\trdx, [rsp+80] ; /* rdx = hold */\r\n\tmov\tebx, [rsp+88] ; /* ebx = bits */\r\n\tmov\tr12d, [rsp+100] ; /* r12d = lmask */\r\n\tmov\tr13d, [rsp+104] ; /* r13d = dmask */\r\n ; /* r14d = len */\r\n ; /* r15d = dist */\r\n\r\n\r\n\tcld\r\n\tcmp\tr10, rdi\r\n\tje\tL_one_time ; /* if only one decode left */\r\n\tcmp\tr9, rsi\r\n\r\n jne L_do_loop\r\n\r\n\r\nL_one_time:\r\n\tmov\tr8, r12 ; /* r8 = lmask */\r\n\tcmp\tbl, 32\r\n\tja\tL_get_length_code_one_time\r\n\r\n\tlodsd ; /* eax = *(uint *)in++ */\r\n\tmov\tcl, bl ; /* cl = bits, needs it for shifting */\r\n\tadd\tbl, 32 ; /* bits += 32 */\r\n\tshl\trax, cl\r\n\tor\trdx, rax ; /* hold |= *((uint *)in)++ << bits */\r\n\tjmp\tL_get_length_code_one_time\r\n\r\nALIGN 4\r\nL_while_test:\r\n\tcmp\tr10, rdi\r\n\tjbe\tL_break_loop\r\n\tcmp\tr9, rsi\r\n\tjbe\tL_break_loop\r\n\r\nL_do_loop:\r\n\tmov\tr8, r12 ; /* r8 = lmask */\r\n\tcmp\tbl, 32\r\n\tja\tL_get_length_code ; /* if (32 < bits) */\r\n\r\n\tlodsd ; /* eax = *(uint *)in++ */\r\n\tmov\tcl, bl ; /* cl = bits, needs it for shifting */\r\n\tadd\tbl, 32 ; /* bits += 32 */\r\n\tshl\trax, cl\r\n\tor\trdx, rax ; /* hold |= *((uint *)in)++ << bits */\r\n\r\nL_get_length_code:\r\n\tand\tr8, rdx ; /* r8 &= hold */\r\n\tmov\teax, [rbp+r8*4] ; /* eax = lcode[hold & lmask] */\r\n\r\n\tmov\tcl, ah ; /* cl = this.bits */\r\n\tsub\tbl, ah ; /* bits -= this.bits */\r\n\tshr\trdx, cl ; /* hold >>= this.bits */\r\n\r\n\ttest\tal, al\r\n\tjnz\tL_test_for_length_base ; /* if (op != 0) 45.7% */\r\n\r\n\tmov\tr8, r12 ; /* r8 = lmask */\r\n\tshr\teax, 16 ; /* output this.val char */\r\n\tstosb\r\n\r\nL_get_length_code_one_time:\r\n\tand\tr8, rdx ; /* r8 &= hold */\r\n\tmov\teax, [rbp+r8*4] ; /* eax = lcode[hold & lmask] */\r\n\r\nL_dolen:\r\n\tmov\tcl, ah ; /* cl = this.bits */\r\n\tsub\tbl, ah ; /* bits -= this.bits */\r\n\tshr\trdx, cl ; /* hold >>= this.bits */\r\n\r\n\ttest\tal, al\r\n\tjnz\tL_test_for_length_base ; /* if (op != 0) 45.7% */\r\n\r\n\tshr\teax, 16 ; /* output this.val char */\r\n\tstosb\r\n\tjmp\tL_while_test\r\n\r\nALIGN 4\r\nL_test_for_length_base:\r\n\tmov\tr14d, eax ; /* len = this */\r\n\tshr\tr14d, 16 ; /* len = this.val */\r\n\tmov\tcl, al\r\n\r\n\ttest\tal, 16\r\n\tjz\tL_test_for_second_level_length ; /* if ((op & 16) == 0) 8% */\r\n\tand\tcl, 15 ; /* op &= 15 */\r\n\tjz\tL_decode_distance ; /* if (!op) */\r\n\r\nL_add_bits_to_len:\r\n\tsub\tbl, cl\r\n\txor\teax, eax\r\n\tinc\teax\r\n\tshl\teax, cl\r\n\tdec\teax\r\n\tand\teax, edx ; /* eax &= hold */\r\n\tshr\trdx, cl\r\n\tadd\tr14d, eax ; /* len += hold & mask[op] */\r\n\r\nL_decode_distance:\r\n\tmov\tr8, r13 ; /* r8 = dmask */\r\n\tcmp\tbl, 32\r\n\tja\tL_get_distance_code ; /* if (32 < bits) */\r\n\r\n\tlodsd ; /* eax = *(uint *)in++ */\r\n\tmov\tcl, bl ; /* cl = bits, needs it for shifting */\r\n\tadd\tbl, 32 ; /* bits += 32 */\r\n\tshl\trax, cl\r\n\tor\trdx, rax ; /* hold |= *((uint *)in)++ << bits */\r\n\r\nL_get_distance_code:\r\n\tand\tr8, rdx ; /* r8 &= hold */\r\n\tmov\teax, [r11+r8*4] ; /* eax = dcode[hold & dmask] */\r\n\r\nL_dodist:\r\n\tmov\tr15d, eax ; /* dist = this */\r\n\tshr\tr15d, 16 ; /* dist = this.val */\r\n\tmov\tcl, ah\r\n\tsub\tbl, ah ; /* bits -= this.bits */\r\n\tshr\trdx, cl ; /* hold >>= this.bits */\r\n\tmov\tcl, al ; /* cl = this.op */\r\n\r\n\ttest\tal, 16 ; /* if ((op & 16) == 0) */\r\n\tjz\tL_test_for_second_level_dist\r\n\tand\tcl, 15 ; /* op &= 15 */\r\n\tjz\tL_check_dist_one\r\n\r\nL_add_bits_to_dist:\r\n\tsub\tbl, cl\r\n\txor\teax, eax\r\n\tinc\teax\r\n\tshl\teax, cl\r\n\tdec\teax ; /* (1 << op) - 1 */\r\n\tand\teax, edx ; /* eax &= hold */\r\n\tshr\trdx, cl\r\n\tadd\tr15d, eax ; /* dist += hold & ((1 << op) - 1) */\r\n\r\nL_check_window:\r\n\tmov\tr8, rsi ; /* save in so from can use it's reg */\r\n\tmov\trax, rdi\r\n\tsub\trax, [rsp+40] ; /* nbytes = out - beg */\r\n\r\n\tcmp\teax, r15d\r\n\tjb\tL_clip_window ; /* if (dist > nbytes) 4.2% */\r\n\r\n\tmov\tecx, r14d ; /* ecx = len */\r\n\tmov\trsi, rdi\r\n\tsub\trsi, r15 ; /* from = out - dist */\r\n\r\n\tsar\tecx, 1\r\n\tjnc\tL_copy_two ; /* if len % 2 == 0 */\r\n\r\n\trep movsw\r\n\tmov\tal, [rsi]\r\n\tmov\t[rdi], al\r\n\tinc\trdi\r\n\r\n\tmov\trsi, r8 ; /* move in back to %rsi, toss from */\r\n\tjmp\tL_while_test\r\n\r\nL_copy_two:\r\n\trep movsw\r\n\tmov\trsi, r8 ; /* move in back to %rsi, toss from */\r\n\tjmp\tL_while_test\r\n\r\nALIGN 4\r\nL_check_dist_one:\r\n\tcmp\tr15d, 1 ; /* if dist 1, is a memset */\r\n\tjne\tL_check_window\r\n\tcmp\t[rsp+40], rdi ; /* if out == beg, outside window */\r\n\tje\tL_check_window\r\n\r\n\tmov\tecx, r14d ; /* ecx = len */\r\n\tmov\tal, [rdi-1]\r\n\tmov\tah, al\r\n\r\n\tsar\tecx, 1\r\n\tjnc\tL_set_two\r\n\tmov\t[rdi], al\r\n\tinc\trdi\r\n\r\nL_set_two:\r\n\trep stosw\r\n\tjmp\tL_while_test\r\n\r\nALIGN 4\r\nL_test_for_second_level_length:\r\n\ttest\tal, 64\r\n\tjnz\tL_test_for_end_of_block ; /* if ((op & 64) != 0) */\r\n\r\n\txor\teax, eax\r\n\tinc\teax\r\n\tshl\teax, cl\r\n\tdec\teax\r\n\tand\teax, edx ; /* eax &= hold */\r\n\tadd\teax, r14d ; /* eax += len */\r\n\tmov\teax, [rbp+rax*4] ; /* eax = lcode[val+(hold&mask[op])]*/\r\n\tjmp\tL_dolen\r\n\r\nALIGN 4\r\nL_test_for_second_level_dist:\r\n\ttest\tal, 64\r\n\tjnz\tL_invalid_distance_code ; /* if ((op & 64) != 0) */\r\n\r\n\txor\teax, eax\r\n\tinc\teax\r\n\tshl\teax, cl\r\n\tdec\teax\r\n\tand\teax, edx ; /* eax &= hold */\r\n\tadd\teax, r15d ; /* eax += dist */\r\n\tmov\teax, [r11+rax*4] ; /* eax = dcode[val+(hold&mask[op])]*/\r\n\tjmp\tL_dodist\r\n\r\nALIGN 4\r\nL_clip_window:\r\n\tmov\tecx, eax ; /* ecx = nbytes */\r\n\tmov\teax, [rsp+92] ; /* eax = wsize, prepare for dist cmp */\r\n\tneg\tecx ; /* nbytes = -nbytes */\r\n\r\n\tcmp\teax, r15d\r\n\tjb\tL_invalid_distance_too_far ; /* if (dist > wsize) */\r\n\r\n\tadd\tecx, r15d ; /* nbytes = dist - nbytes */\r\n\tcmp\tdword ptr [rsp+96], 0\r\n\tjne\tL_wrap_around_window ; /* if (write != 0) */\r\n\r\n\tmov\trsi, [rsp+56] ; /* from = window */\r\n\tsub\teax, ecx ; /* eax -= nbytes */\r\n\tadd\trsi, rax ; /* from += wsize - nbytes */\r\n\r\n\tmov\teax, r14d ; /* eax = len */\r\n\tcmp\tr14d, ecx\r\n\tjbe\tL_do_copy ; /* if (nbytes >= len) */\r\n\r\n\tsub\teax, ecx ; /* eax -= nbytes */\r\n\trep movsb\r\n\tmov\trsi, rdi\r\n\tsub\trsi, r15 ; /* from = &out[ -dist ] */\r\n\tjmp\tL_do_copy\r\n\r\nALIGN 4\r\nL_wrap_around_window:\r\n\tmov\teax, [rsp+96] ; /* eax = write */\r\n\tcmp\tecx, eax\r\n\tjbe\tL_contiguous_in_window ; /* if (write >= nbytes) */\r\n\r\n\tmov\tesi, [rsp+92] ; /* from = wsize */\r\n\tadd\trsi, [rsp+56] ; /* from += window */\r\n\tadd\trsi, rax ; /* from += write */\r\n\tsub\trsi, rcx ; /* from -= nbytes */\r\n\tsub\tecx, eax ; /* nbytes -= write */\r\n\r\n\tmov\teax, r14d ; /* eax = len */\r\n\tcmp\teax, ecx\r\n\tjbe\tL_do_copy ; /* if (nbytes >= len) */\r\n\r\n\tsub\teax, ecx ; /* len -= nbytes */\r\n\trep movsb\r\n\tmov\trsi, [rsp+56] ; /* from = window */\r\n\tmov\tecx, [rsp+96] ; /* nbytes = write */\r\n\tcmp\teax, ecx\r\n\tjbe\tL_do_copy ; /* if (nbytes >= len) */\r\n\r\n\tsub\teax, ecx ; /* len -= nbytes */\r\n\trep movsb\r\n\tmov\trsi, rdi\r\n\tsub\trsi, r15 ; /* from = out - dist */\r\n\tjmp\tL_do_copy\r\n\r\nALIGN 4\r\nL_contiguous_in_window:\r\n\tmov\trsi, [rsp+56] ; /* rsi = window */\r\n\tadd\trsi, rax\r\n\tsub\trsi, rcx ; /* from += write - nbytes */\r\n\r\n\tmov\teax, r14d ; /* eax = len */\r\n\tcmp\teax, ecx\r\n\tjbe\tL_do_copy ; /* if (nbytes >= len) */\r\n\r\n\tsub\teax, ecx ; /* len -= nbytes */\r\n\trep movsb\r\n\tmov\trsi, rdi\r\n\tsub\trsi, r15 ; /* from = out - dist */\r\n\tjmp\tL_do_copy ; /* if (nbytes >= len) */\r\n\r\nALIGN 4\r\nL_do_copy:\r\n\tmov\tecx, eax ; /* ecx = len */\r\n\trep movsb\r\n\r\n\tmov\trsi, r8 ; /* move in back to %esi, toss from */\r\n\tjmp\tL_while_test\r\n\r\nL_test_for_end_of_block:\r\n\ttest\tal, 32\r\n\tjz\tL_invalid_literal_length_code\r\n\tmov\tdword ptr [rsp+116], 1\r\n\tjmp\tL_break_loop_with_status\r\n\r\nL_invalid_literal_length_code:\r\n\tmov\tdword ptr [rsp+116], 2\r\n\tjmp\tL_break_loop_with_status\r\n\r\nL_invalid_distance_code:\r\n\tmov\tdword ptr [rsp+116], 3\r\n\tjmp\tL_break_loop_with_status\r\n\r\nL_invalid_distance_too_far:\r\n\tmov\tdword ptr [rsp+116], 4\r\n\tjmp\tL_break_loop_with_status\r\n\r\nL_break_loop:\r\n\tmov\tdword ptr [rsp+116], 0\r\n\r\nL_break_loop_with_status:\r\n; /* put in, out, bits, and hold back into ar and pop esp */\r\n\tmov\t[rsp+16], rsi ; /* in */\r\n\tmov\t[rsp+32], rdi ; /* out */\r\n\tmov\t[rsp+88], ebx ; /* bits */\r\n\tmov\t[rsp+80], rdx ; /* hold */\r\n\r\n\tmov\trax, [rsp] ; /* restore rbp and rsp */\r\n\tmov\trbp, [rsp+8]\r\n\tmov\trsp, rax\r\n\r\n\r\n\r\n\tmov rsi,[rsp-8]\r\n\tmov rdi,[rsp-16]\r\n\tmov r12,[rsp-24]\r\n\tmov r13,[rsp-32]\r\n\tmov r14,[rsp-40]\r\n\tmov r15,[rsp-48]\r\n\tmov rbx,[rsp-56]\r\n\r\n ret 0\r\n; :\r\n; : \"m\" (ar)\r\n; : \"memory\", \"%rax\", \"%rbx\", \"%rcx\", \"%rdx\", \"%rsi\", \"%rdi\",\r\n; \"%r8\", \"%r9\", \"%r10\", \"%r11\", \"%r12\", \"%r13\", \"%r14\", \"%r15\"\r\n; );\r\n\r\ninffas8664fnc \tENDP\r\n;_TEXT\tENDS\r\nEND\r\n"} +{"text": "\n\n\n \n \n foreground\n glyphs\n \n \n background\n glyphs.background\n \n \n\n"} +{"text": "# encoding: UTF-8\n# This file is auto-generated from the current state of the database. Instead\n# of editing this file, please use the migrations feature of Active Record to\n# incrementally modify your database, and then regenerate this schema definition.\n#\n# Note that this schema.rb definition is the authoritative source for your\n# database schema. If you need to create the application database on another\n# system, you should be using db:schema:load, not running all the migrations\n# from scratch. The latter is a flawed and unsustainable approach (the more migrations\n# you'll amass, the slower it'll run and the greater likelihood for issues).\n#\n# It's strongly recommended that you check this file into your version control system.\n\nActiveRecord::Schema.define(version: 20160413131500) do\n\n create_table \"products\", force: :cascade do |t|\n t.string \"title\"\n t.datetime \"created_at\", null: false\n t.datetime \"updated_at\", null: false\n end\n\nend\n"} +{"text": "import 'rxjs-compat/add/observable/dom/webSocket';\n"} +{"text": "{\n \"name\": \"npm-hello\",\n \"version\": \"1.0.0\",\n \"lockfileVersion\": 1\n}\n"} +{"text": "{\n\t\"$schema\": \"http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#\",\n\t\"contentVersion\": \"1.0.0.0\",\n\t\"parameters\": {\n\t\t\"factoryName\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"metadata\": \"Data Factory Name\",\n\t\t\t\"defaultValue\": \"elasticcopywithpolybase\"\n\t\t},\n\t\t\"AzureSqlDatabase_connectionString\": {\n\t\t\t\"type\": \"secureString\",\n\t\t\t\"metadata\": \"Secure string for 'connectionString' of 'AzureSqlDatabase'\"\n\t\t},\n\t\t\"AzureSqlDataWarehouse_connectionString\": {\n\t\t\t\"type\": \"secureString\",\n\t\t\t\"metadata\": \"Secure string for 'connectionString' of 'AzureSqlDataWarehouse'\"\n\t\t},\n\t\t\"AzureStorage_connectionString\": {\n\t\t\t\"type\": \"secureString\",\n\t\t\t\"metadata\": \"Secure string for 'connectionString' of 'AzureStorage'\"\n\t\t}\n\t},\n\t\"variables\": {\n\t\t\"factoryId\": \"[concat('Microsoft.DataFactory/factories/', parameters('factoryName'))]\",\n\t\t\"leftBracket\": \"[\"\n\t},\n\t\"resources\": [\n\t\t{\n\t\t\t\"name\": \"[concat(parameters('factoryName'), '/TableCopy')]\",\n\t\t\t\"type\": \"Microsoft.DataFactory/factories/pipelines\",\n\t\t\t\"apiVersion\": \"2017-09-01-preview\",\n\t\t\t\"properties\": {\n\t\t\t\t\"activities\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"GetCurrentVersion\",\n\t\t\t\t\t\t\"type\": \"Lookup\",\n\t\t\t\t\t\t\"dependsOn\": [],\n\t\t\t\t\t\t\"policy\": {\n\t\t\t\t\t\t\t\"timeout\": \"7.00:00:00\",\n\t\t\t\t\t\t\t\"retry\": 0,\n\t\t\t\t\t\t\t\"retryIntervalInSeconds\": 30,\n\t\t\t\t\t\t\t\"secureOutput\": false\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"typeProperties\": {\n\t\t\t\t\t\t\t\"source\": {\n\t\t\t\t\t\t\t\t\"type\": \"SqlSource\",\n\t\t\t\t\t\t\t\t\"sqlReaderQuery\": \"SELECT TOP 1 CONVERT(VARCHAR(25), CONVERT(VARBINARY(8), @{pipeline().parameters.TrackerKey}), 1) As EndRowVersion FROM @{pipeline().parameters.TableName} ORDER BY @{pipeline().parameters.TrackerKey} DESC\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"dataset\": {\n\t\t\t\t\t\t\t\t\"referenceName\": \"AzureSqlDatabase\",\n\t\t\t\t\t\t\t\t\"type\": \"DatasetReference\",\n\t\t\t\t\t\t\t\t\"parameters\": {\n\t\t\t\t\t\t\t\t\t\"DBName\": \"@pipeline().parameters.DBName\",\n\t\t\t\t\t\t\t\t\t\"TableName\": \"@pipeline().parameters.TableName\",\n\t\t\t\t\t\t\t\t\t\"Structure\": \"@pipeline().parameters.SourceTableStructure\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"GetSavedVersion\",\n\t\t\t\t\t\t\"type\": \"Lookup\",\n\t\t\t\t\t\t\"dependsOn\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"activity\": \"GetCurrentVersion\",\n\t\t\t\t\t\t\t\t\"dependencyConditions\": [\n\t\t\t\t\t\t\t\t\t\"Succeeded\"\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"policy\": {\n\t\t\t\t\t\t\t\"timeout\": \"7.00:00:00\",\n\t\t\t\t\t\t\t\"retry\": 0,\n\t\t\t\t\t\t\t\"retryIntervalInSeconds\": 30,\n\t\t\t\t\t\t\t\"secureOutput\": false\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"typeProperties\": {\n\t\t\t\t\t\t\t\"source\": {\n\t\t\t\t\t\t\t\t\"type\": \"SqlSource\",\n\t\t\t\t\t\t\t\t\"sqlReaderQuery\": \"SELECT TOP 1 CONVERT(VARCHAR(25), CONVERT(VARBINARY(8), [LastCopiedValue]), 1) AS StartRowVersion FROM [dbo].[CopyTracker] WHERE TableName = '@{pipeline().parameters.TableName}' ORDER BY [Id] DESC\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"dataset\": {\n\t\t\t\t\t\t\t\t\"referenceName\": \"AzureSqlDatabase\",\n\t\t\t\t\t\t\t\t\"type\": \"DatasetReference\",\n\t\t\t\t\t\t\t\t\"parameters\": {\n\t\t\t\t\t\t\t\t\t\"DBName\": \"@pipeline().parameters.DBName\",\n\t\t\t\t\t\t\t\t\t\"TableName\": \"CopyTracker\",\n\t\t\t\t\t\t\t\t\t\"Structure\": \"@pipeline().parameters.GetSavedVersionStructure\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"IfInitialCopy\",\n\t\t\t\t\t\t\"type\": \"IfCondition\",\n\t\t\t\t\t\t\"dependsOn\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"activity\": \"GetSavedVersion\",\n\t\t\t\t\t\t\t\t\"dependencyConditions\": [\n\t\t\t\t\t\t\t\t\t\"Succeeded\"\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"typeProperties\": {\n\t\t\t\t\t\t\t\"expression\": {\n\t\t\t\t\t\t\t\t\"value\": \"@equals(coalesce(activity('GetSavedVersion').output?.firstrow?.StartRowVersion,'Initial'),'Initial')\",\n\t\t\t\t\t\t\t\t\"type\": \"Expression\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"ifFalseActivities\": [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"name\": \"IncrementalCopy\",\n\t\t\t\t\t\t\t\t\t\"type\": \"Copy\",\n\t\t\t\t\t\t\t\t\t\"dependsOn\": [],\n\t\t\t\t\t\t\t\t\t\"policy\": {\n\t\t\t\t\t\t\t\t\t\t\"timeout\": \"7.00:00:00\",\n\t\t\t\t\t\t\t\t\t\t\"retry\": 0,\n\t\t\t\t\t\t\t\t\t\t\"retryIntervalInSeconds\": 30,\n\t\t\t\t\t\t\t\t\t\t\"secureOutput\": false\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"typeProperties\": {\n\t\t\t\t\t\t\t\t\t\t\"source\": {\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"SqlSource\",\n\t\t\t\t\t\t\t\t\t\t\t\"sqlReaderQuery\": \"SELECT @{pipeline().parameters.ColumnList} FROM @{pipeline().parameters.TableName} WHERE @{pipeline().parameters.TrackerKey} > CONVERT(VARBINARY(8), @{ activity('GetSavedVersion').output.firstrow.StartRowVersion}, 1) AND @{pipeline().parameters.TrackerKey} <= CONVERT(VARBINARY(8), @{activity('GetCurrentVersion').output.firstrow.EndRowVersion}, 1)\"\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"sink\": {\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"SqlDWSink\",\n\t\t\t\t\t\t\t\t\t\t\t\"writeBatchSize\": 10000,\n\t\t\t\t\t\t\t\t\t\t\t\"allowPolyBase\": true\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"enableStaging\": true,\n\t\t\t\t\t\t\t\t\t\t\"stagingSettings\": {\n\t\t\t\t\t\t\t\t\t\t\t\"linkedServiceName\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\"referenceName\": \"AzureStorage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"LinkedServiceReference\"\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\"path\": \"stagingfolder\"\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"cloudDataMovementUnits\": 0,\n\t\t\t\t\t\t\t\t\t\t\"translator\": {\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"TabularTranslator\",\n\t\t\t\t\t\t\t\t\t\t\t\"columnMappings\": \"@pipeline().Parameters.TableMap\"\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"inputs\": [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\"referenceName\": \"AzureSqlDatabase\",\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"DatasetReference\",\n\t\t\t\t\t\t\t\t\t\t\t\"parameters\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\"DBName\": \"@pipeline().parameters.DBName\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"TableName\": \"@pipeline().parameters.TableName\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"Structure\": \"@pipeline().parameters.SourceTableStructure\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\"outputs\": [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\"referenceName\": \"AzureSqlDataWarehouse\",\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"DatasetReference\",\n\t\t\t\t\t\t\t\t\t\t\t\"parameters\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\"DBName\": \"tenantanalytics-dw\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"TableName\": \"@pipeline().parameters.DestTableName\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"Structure\": \"@pipeline().parameters.DestTableStructure\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\"ifTrueActivities\": [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"name\": \"InitialCopy\",\n\t\t\t\t\t\t\t\t\t\"type\": \"Copy\",\n\t\t\t\t\t\t\t\t\t\"dependsOn\": [],\n\t\t\t\t\t\t\t\t\t\"policy\": {\n\t\t\t\t\t\t\t\t\t\t\"timeout\": \"7.00:00:00\",\n\t\t\t\t\t\t\t\t\t\t\"retry\": 0,\n\t\t\t\t\t\t\t\t\t\t\"retryIntervalInSeconds\": 30,\n\t\t\t\t\t\t\t\t\t\t\"secureOutput\": false\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"typeProperties\": {\n\t\t\t\t\t\t\t\t\t\t\"source\": {\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"SqlSource\",\n\t\t\t\t\t\t\t\t\t\t\t\"sqlReaderQuery\": \"SELECT @{pipeline().parameters.ColumnList} FROM @{pipeline().parameters.TableName} WHERE @{pipeline().parameters.TrackerKey} <= CONVERT(VARBINARY(8), @{activity('GetCurrentVersion').output.firstrow.EndRowVersion}, 1)\"\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"sink\": {\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"SqlDWSink\",\n\t\t\t\t\t\t\t\t\t\t\t\"writeBatchSize\": 10000,\n\t\t\t\t\t\t\t\t\t\t\t\"allowPolyBase\": true\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"enableStaging\": true,\n\t\t\t\t\t\t\t\t\t\t\"stagingSettings\": {\n\t\t\t\t\t\t\t\t\t\t\t\"linkedServiceName\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\"referenceName\": \"AzureStorage\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"LinkedServiceReference\"\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\"path\": \"staggingfolder\"\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"cloudDataMovementUnits\": 0,\n\t\t\t\t\t\t\t\t\t\t\"translator\": {\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"TabularTranslator\",\n\t\t\t\t\t\t\t\t\t\t\t\"columnMappings\": \"@pipeline().Parameters.TableMap\"\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"inputs\": [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\"referenceName\": \"AzureSqlDatabase\",\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"DatasetReference\",\n\t\t\t\t\t\t\t\t\t\t\t\"parameters\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\"DBName\": \"@pipeline().parameters.DBName\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"TableName\": \"@pipeline().parameters.TableName\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"Structure\": \"@pipeline().parameters.SourceTableStructure\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\"outputs\": [\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\"referenceName\": \"AzureSqlDataWarehouse\",\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"DatasetReference\",\n\t\t\t\t\t\t\t\t\t\t\t\"parameters\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\"DBName\": \"tenantanalytics-dw\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"TableName\": \"@pipeline().parameters.DestTableName\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"Structure\": \"@pipeline().parameters.DestTableStructure\"\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"SaveLastCopiedVersion\",\n\t\t\t\t\t\t\"type\": \"SqlServerStoredProcedure\",\n\t\t\t\t\t\t\"dependsOn\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"activity\": \"IfInitialCopy\",\n\t\t\t\t\t\t\t\t\"dependencyConditions\": [\n\t\t\t\t\t\t\t\t\t\"Succeeded\"\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"policy\": {\n\t\t\t\t\t\t\t\"timeout\": \"7.00:00:00\",\n\t\t\t\t\t\t\t\"retry\": 0,\n\t\t\t\t\t\t\t\"retryIntervalInSeconds\": 30,\n\t\t\t\t\t\t\t\"secureOutput\": false\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"typeProperties\": {\n\t\t\t\t\t\t\t\"storedProcedureName\": \"SaveLastCopiedRowVersion\",\n\t\t\t\t\t\t\t\"storedProcedureParameters\": {\n\t\t\t\t\t\t\t\t\"lastCopiedValue\": {\n\t\t\t\t\t\t\t\t\t\"value\": \"@activity('GetCurrentVersion').output.firstrow.EndRowVersion\",\n\t\t\t\t\t\t\t\t\t\"type\": \"String\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"runId\": {\n\t\t\t\t\t\t\t\t\t\"value\": \"@pipeline().RunId\",\n\t\t\t\t\t\t\t\t\t\"type\": \"String\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"tableName\": {\n\t\t\t\t\t\t\t\t\t\"value\": \"@pipeline().parameters.TableName\",\n\t\t\t\t\t\t\t\t\t\"type\": \"String\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"trackerKey\": {\n\t\t\t\t\t\t\t\t\t\"value\": \"@pipeline().parameters.TrackerKey\",\n\t\t\t\t\t\t\t\t\t\"type\": \"String\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"runTimeStamp\": {\n\t\t\t\t\t\t\t\t\t\"value\": \"@pipeline().TriggerTime\",\n\t\t\t\t\t\t\t\t\t\"type\": \"DateTime\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"linkedServiceName\": {\n\t\t\t\t\t\t\t\"referenceName\": \"AzureSqlDatabase\",\n\t\t\t\t\t\t\t\"type\": \"LinkedServiceReference\",\n\t\t\t\t\t\t\t\"parameters\": {\n\t\t\t\t\t\t\t\t\"DBName\": \"@pipeline().parameters.DBName\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"parameters\": {\n\t\t\t\t\t\"DBName\": {\n\t\t\t\t\t\t\"type\": \"String\"\n\t\t\t\t\t},\n\t\t\t\t\t\"TableName\": {\n\t\t\t\t\t\t\"type\": \"String\"\n\t\t\t\t\t},\n\t\t\t\t\t\"TrackerKey\": {\n\t\t\t\t\t\t\"type\": \"String\"\n\t\t\t\t\t},\n\t\t\t\t\t\"DestTableName\": {\n\t\t\t\t\t\t\"type\": \"String\"\n\t\t\t\t\t},\n\t\t\t\t\t\"ColumnList\": {\n\t\t\t\t\t\t\"type\": \"String\"\n\t\t\t\t\t},\n\t\t\t\t\t\"TableMap\": {\n\t\t\t\t\t\t\"type\": \"String\"\n\t\t\t\t\t},\n\t\t\t\t\t\"SourceTableStructure\": {\n\t\t\t\t\t\t\"type\": \"Array\"\n\t\t\t\t\t},\n\t\t\t\t\t\"DestTableStructure\": {\n\t\t\t\t\t\t\"type\": \"Array\"\n\t\t\t\t\t},\n\t\t\t\t\t\"GetSavedVersionStructure\": {\n\t\t\t\t\t\t\"type\": \"Array\",\n\t\t\t\t\t\t\"defaultValue\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"name\": \"VenueId\",\n\t\t\t\t\t\t\t\t\"type\": \"String\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"dependsOn\": [\n\t\t\t\t\"[concat(variables('factoryId'), '/datasets/AzureSqlDatabase')]\",\n\t\t\t\t\"[concat(variables('factoryId'), '/linkedServices/AzureSqlDatabase')]\",\n\t\t\t\t\"[concat(variables('factoryId'), '/datasets/AzureSqlDataWarehouse')]\",\n\t\t\t\t\"[concat(variables('factoryId'), '/linkedServices/AzureStorage')]\"\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"name\": \"[concat(parameters('factoryName'), '/AzureSqlDatabase')]\",\n\t\t\t\"type\": \"Microsoft.DataFactory/factories/datasets\",\n\t\t\t\"apiVersion\": \"2017-09-01-preview\",\n\t\t\t\"properties\": {\n\t\t\t\t\"linkedServiceName\": {\n\t\t\t\t\t\"referenceName\": \"AzureSqlDatabase\",\n\t\t\t\t\t\"type\": \"LinkedServiceReference\",\n\t\t\t\t\t\"parameters\": {\n\t\t\t\t\t\t\"DBName\": \"@dataset().DBName\"\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"parameters\": {\n\t\t\t\t\t\"DBName\": {\n\t\t\t\t\t\t\"type\": \"String\"\n\t\t\t\t\t},\n\t\t\t\t\t\"TableName\": {\n\t\t\t\t\t\t\"type\": \"String\"\n\t\t\t\t\t},\n\t\t\t\t\t\"Structure\": {\n\t\t\t\t\t\t\"type\": \"Array\"\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"type\": \"AzureSqlTable\",\n\t\t\t\t\"structure\": \"@dataset().Structure\",\n\t\t\t\t\"typeProperties\": {\n\t\t\t\t\t\"tableName\": \"@dataset().TableName\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"dependsOn\": [\n\t\t\t\t\"[concat(variables('factoryId'), '/linkedServices/AzureSqlDatabase')]\"\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"name\": \"[concat(parameters('factoryName'), '/AzureSqlDatabase')]\",\n\t\t\t\"type\": \"Microsoft.DataFactory/factories/linkedServices\",\n\t\t\t\"apiVersion\": \"2017-09-01-preview\",\n\t\t\t\"properties\": {\n\t\t\t\t\"type\": \"AzureSqlDatabase\",\n\t\t\t\t\"typeProperties\": {\n\t\t\t\t\t\"connectionString\": {\n\t\t\t\t\t\t\"type\": \"SecureString\",\n\t\t\t\t\t\t\"value\": \"[parameters('AzureSqlDatabase_connectionString')]\"\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"parameters\": {\n\t\t\t\t\t\"DBName\": {\n\t\t\t\t\t\t\"type\": \"String\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"dependsOn\": []\n\t\t},\n\t\t{\n\t\t\t\"name\": \"[concat(parameters('factoryName'), '/AzureSqlDataWarehouse')]\",\n\t\t\t\"type\": \"Microsoft.DataFactory/factories/datasets\",\n\t\t\t\"apiVersion\": \"2017-09-01-preview\",\n\t\t\t\"properties\": {\n\t\t\t\t\"linkedServiceName\": {\n\t\t\t\t\t\"referenceName\": \"AzureSqlDataWarehouse\",\n\t\t\t\t\t\"type\": \"LinkedServiceReference\",\n\t\t\t\t\t\"parameters\": {\n\t\t\t\t\t\t\"DBName\": \"@dataset().DBName\"\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"parameters\": {\n\t\t\t\t\t\"DBName\": {\n\t\t\t\t\t\t\"type\": \"String\"\n\t\t\t\t\t},\n\t\t\t\t\t\"TableName\": {\n\t\t\t\t\t\t\"type\": \"String\"\n\t\t\t\t\t},\n\t\t\t\t\t\"Structure\": {\n\t\t\t\t\t\t\"type\": \"Array\"\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"type\": \"AzureSqlDWTable\",\n\t\t\t\t\"structure\": \"@dataset().Structure\",\n\t\t\t\t\"typeProperties\": {\n\t\t\t\t\t\"tableName\": \"@dataset().TableName\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"dependsOn\": [\n\t\t\t\t\"[concat(variables('factoryId'), '/linkedServices/AzureSqlDataWarehouse')]\"\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"name\": \"[concat(parameters('factoryName'), '/AzureSqlDataWarehouse')]\",\n\t\t\t\"type\": \"Microsoft.DataFactory/factories/linkedServices\",\n\t\t\t\"apiVersion\": \"2017-09-01-preview\",\n\t\t\t\"properties\": {\n\t\t\t\t\"type\": \"AzureSqlDW\",\n\t\t\t\t\"typeProperties\": {\n\t\t\t\t\t\"connectionString\": {\n\t\t\t\t\t\t\"type\": \"SecureString\",\n\t\t\t\t\t\t\"value\": \"[parameters('AzureSqlDataWarehouse_connectionString')]\"\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"parameters\": {\n\t\t\t\t\t\"DBName\": {\n\t\t\t\t\t\t\"type\": \"String\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"dependsOn\": []\n\t\t},\n\t\t{\n\t\t\t\"name\": \"[concat(parameters('factoryName'), '/DBCopy')]\",\n\t\t\t\"type\": \"Microsoft.DataFactory/factories/pipelines\",\n\t\t\t\"apiVersion\": \"2017-09-01-preview\",\n\t\t\t\"properties\": {\n\t\t\t\t\"activities\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"ReadTableConfig\",\n\t\t\t\t\t\t\"type\": \"Lookup\",\n\t\t\t\t\t\t\"dependsOn\": [],\n\t\t\t\t\t\t\"policy\": {\n\t\t\t\t\t\t\t\"timeout\": \"7.00:00:00\",\n\t\t\t\t\t\t\t\"retry\": 0,\n\t\t\t\t\t\t\t\"retryIntervalInSeconds\": 30,\n\t\t\t\t\t\t\t\"secureOutput\": false\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"typeProperties\": {\n\t\t\t\t\t\t\t\"source\": {\n\t\t\t\t\t\t\t\t\"type\": \"BlobSource\",\n\t\t\t\t\t\t\t\t\"recursive\": true\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"dataset\": {\n\t\t\t\t\t\t\t\t\"referenceName\": \"AzureBlob\",\n\t\t\t\t\t\t\t\t\"type\": \"DatasetReference\",\n\t\t\t\t\t\t\t\t\"parameters\": {}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"firstRowOnly\": false\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"CopyTable\",\n\t\t\t\t\t\t\"type\": \"ForEach\",\n\t\t\t\t\t\t\"dependsOn\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"activity\": \"ReadTableConfig\",\n\t\t\t\t\t\t\t\t\"dependencyConditions\": [\n\t\t\t\t\t\t\t\t\t\"Succeeded\"\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"typeProperties\": {\n\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\"value\": \"@activity('ReadTableConfig').output.value\",\n\t\t\t\t\t\t\t\t\"type\": \"Expression\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"isSequential\": false,\n\t\t\t\t\t\t\t\"activities\": [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"name\": \"ExecuteTableCopy\",\n\t\t\t\t\t\t\t\t\t\"type\": \"ExecutePipeline\",\n\t\t\t\t\t\t\t\t\t\"dependsOn\": [],\n\t\t\t\t\t\t\t\t\t\"typeProperties\": {\n\t\t\t\t\t\t\t\t\t\t\"pipeline\": {\n\t\t\t\t\t\t\t\t\t\t\t\"referenceName\": \"TableCopy\",\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"PipelineReference\"\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"waitOnCompletion\": true,\n\t\t\t\t\t\t\t\t\t\t\"parameters\": {\n\t\t\t\t\t\t\t\t\t\t\t\"DBName\": \"@pipeline().parameters.DBName\",\n\t\t\t\t\t\t\t\t\t\t\t\"TableName\": \"@item().sourceTable\",\n\t\t\t\t\t\t\t\t\t\t\t\"TrackerKey\": \"@item().trackerKey\",\n\t\t\t\t\t\t\t\t\t\t\t\"DestTableName\": \"@item().destTableName\",\n\t\t\t\t\t\t\t\t\t\t\t\"ColumnList\": \"@item().sourceColumns\",\n\t\t\t\t\t\t\t\t\t\t\t\"TableMap\": \"@item().tableMap\",\n\t\t\t\t\t\t\t\t\t\t\t\"SourceTableStructure\": \"@item().sourceStructure\",\n\t\t\t\t\t\t\t\t\t\t\t\"DestTableStructure\": \"@item().destStructure\"\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t],\n\t\t\t\t\"parameters\": {\n\t\t\t\t\t\"DBName\": {\n\t\t\t\t\t\t\"type\": \"String\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"dependsOn\": [\n\t\t\t\t\"[concat(variables('factoryId'), '/datasets/AzureBlob')]\",\n\t\t\t\t\"[concat(variables('factoryId'), '/pipelines/TableCopy')]\"\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"name\": \"[concat(parameters('factoryName'), '/AzureBlob')]\",\n\t\t\t\"type\": \"Microsoft.DataFactory/factories/datasets\",\n\t\t\t\"apiVersion\": \"2017-09-01-preview\",\n\t\t\t\"properties\": {\n\t\t\t\t\"linkedServiceName\": {\n\t\t\t\t\t\"referenceName\": \"AzureStorage\",\n\t\t\t\t\t\"type\": \"LinkedServiceReference\"\n\t\t\t\t},\n\t\t\t\t\"type\": \"AzureBlob\",\n\t\t\t\t\"typeProperties\": {\n\t\t\t\t\t\"format\": {\n\t\t\t\t\t\t\"type\": \"JsonFormat\",\n\t\t\t\t\t\t\"filePattern\": \"arrayOfObjects\"\n\t\t\t\t\t},\n\t\t\t\t\t\"fileName\": \"TableConfig.json\",\n\t\t\t\t\t\"folderPath\": \"configfile\"\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"dependsOn\": [\n\t\t\t\t\"[concat(variables('factoryId'), '/linkedServices/AzureStorage')]\"\n\t\t\t]\n\t\t},\n\t\t{\n\t\t\t\"name\": \"[concat(parameters('factoryName'), '/AzureStorage')]\",\n\t\t\t\"type\": \"Microsoft.DataFactory/factories/linkedServices\",\n\t\t\t\"apiVersion\": \"2017-09-01-preview\",\n\t\t\t\"properties\": {\n\t\t\t\t\"type\": \"AzureStorage\",\n\t\t\t\t\"typeProperties\": {\n\t\t\t\t\t\"connectionString\": {\n\t\t\t\t\t\t\"type\": \"SecureString\",\n\t\t\t\t\t\t\"value\": \"[parameters('AzureStorage_connectionString')]\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"dependsOn\": []\n\t\t},\n\t\t{\n\t\t\t\"name\": \"[concat(parameters('factoryName'), '/SQLDBToDW')]\",\n\t\t\t\"type\": \"Microsoft.DataFactory/factories/pipelines\",\n\t\t\t\"apiVersion\": \"2017-09-01-preview\",\n\t\t\t\"properties\": {\n\t\t\t\t\"activities\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"GetDatabases\",\n\t\t\t\t\t\t\"type\": \"Lookup\",\n\t\t\t\t\t\t\"dependsOn\": [],\n\t\t\t\t\t\t\"policy\": {\n\t\t\t\t\t\t\t\"timeout\": \"7.00:00:00\",\n\t\t\t\t\t\t\t\"retry\": 0,\n\t\t\t\t\t\t\t\"retryIntervalInSeconds\": 30,\n\t\t\t\t\t\t\t\"secureOutput\": false\n\t\t\t\t\t\t},\n\t\t\t\t\t\t\"typeProperties\": {\n\t\t\t\t\t\t\t\"source\": {\n\t\t\t\t\t\t\t\t\"type\": \"SqlDWSource\",\n\t\t\t\t\t\t\t\t\"sqlReaderQuery\": \"SELECT [ServerName] ,[DatabaseName] FROM [__ShardManagement].[ShardsGlobal] WHERE [Status] = '1'\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"dataset\": {\n\t\t\t\t\t\t\t\t\"referenceName\": \"AzureSqlDataWarehouse\",\n\t\t\t\t\t\t\t\t\"type\": \"DatasetReference\",\n\t\t\t\t\t\t\t\t\"parameters\": {\n\t\t\t\t\t\t\t\t\t\"DBName\": \"tenantcatalog\",\n\t\t\t\t\t\t\t\t\t\"TableName\": \"[concat(variables('leftBracket'), '__ShardManagement].[ShardsGlobal]')]\",\n\t\t\t\t\t\t\t\t\t\"Structure\": \"@pipeline().parameters.GetDBStructure\"\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"firstRowOnly\": false\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"CopyDB\",\n\t\t\t\t\t\t\"type\": \"ForEach\",\n\t\t\t\t\t\t\"dependsOn\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"activity\": \"GetDatabases\",\n\t\t\t\t\t\t\t\t\"dependencyConditions\": [\n\t\t\t\t\t\t\t\t\t\"Succeeded\"\n\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t],\n\t\t\t\t\t\t\"typeProperties\": {\n\t\t\t\t\t\t\t\"items\": \"@activity('GetDatabases').output.value\",\n\t\t\t\t\t\t\t\"isSequential\": false,\n\t\t\t\t\t\t\t\"activities\": [\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\"name\": \"ExecuteDBCopy\",\n\t\t\t\t\t\t\t\t\t\"type\": \"ExecutePipeline\",\n\t\t\t\t\t\t\t\t\t\"dependsOn\": [ ],\n\t\t\t\t\t\t\t\t\t\"typeProperties\": {\n\t\t\t\t\t\t\t\t\t\t\"pipeline\": {\n\t\t\t\t\t\t\t\t\t\t\t\"referenceName\": \"DBCopy\",\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"PipelineReference\"\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"waitOnCompletion\": true,\n\t\t\t\t\t\t\t\t\t\t\"parameters\": {\n\t\t\t\t\t\t\t\t\t\t\t\"DBName\": \"@item().DatabaseName\"\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\r\n \"name\": \"TransformRawData\",\r\n \"type\": \"SqlServerStoredProcedure\",\r\n \"dependsOn\": [\r\n {\r\n \"activity\": \"CopyDB\",\r\n \"dependencyConditions\": [\r\n \"Completed\"\r\n ]\r\n }\r\n ],\r\n \"policy\": {\r\n \"timeout\": \"7.00:00:00\",\r\n \"retry\": 0,\r\n \"retryIntervalInSeconds\": 30,\r\n \"secureOutput\": false\r\n },\r\n \"typeProperties\": {\r\n \"storedProcedureName\": \"sp_TransformRawData\"\r\n },\r\n \"linkedServiceName\": {\r\n \"referenceName\": \"AzureSqlDataWarehouse\",\r\n \"type\": \"LinkedServiceReference\",\r\n \"parameters\": {\r\n \"DBName\": \"tenantanalytics-dw\"\r\n }\r\n }\r\n }\n\t\t\t\t],\n\t\t\t\t\"parameters\": {\n\t\t\t\t\t\"GetDBStructure\": {\n\t\t\t\t\t\t\"type\": \"Array\",\n\t\t\t\t\t\t\"defaultValue\": [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"name\": \"ServerName\",\n\t\t\t\t\t\t\t\t\"type\": \"String\"\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\"name\": \"DatabaseName\",\n\t\t\t\t\t\t\t\t\"type\": \"String\"\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t]\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t},\n\t\t\t\"dependsOn\": [\n\t\t\t\t\"[concat(variables('factoryId'), '/datasets/AzureSqlDataWarehouse')]\",\n\t\t\t\t\"[concat(variables('factoryId'), '/pipelines/DBCopy')]\"\n\t\t\t]\n\t\t}\n\t]\n}"} +{"text": "---\ntitle: Scaling Out\nisChild: true\nanchor: Scaling Out\n---\n\n## Scaling Out {#scaling-out}\n\n> TODO"} +{"text": "package sprig\n\nimport (\n\t\"fmt\"\n\t\"reflect\"\n\t\"sort\"\n)\n\n// Reflection is used in these functions so that slices and arrays of strings,\n// ints, and other types not implementing []interface{} can be worked with.\n// For example, this is useful if you need to work on the output of regexs.\n\nfunc list(v ...interface{}) []interface{} {\n\treturn v\n}\n\nfunc push(list interface{}, v interface{}) []interface{} {\n\ttp := reflect.TypeOf(list).Kind()\n\tswitch tp {\n\tcase reflect.Slice, reflect.Array:\n\t\tl2 := reflect.ValueOf(list)\n\n\t\tl := l2.Len()\n\t\tnl := make([]interface{}, l)\n\t\tfor i := 0; i < l; i++ {\n\t\t\tnl[i] = l2.Index(i).Interface()\n\t\t}\n\n\t\treturn append(nl, v)\n\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"Cannot push on type %s\", tp))\n\t}\n}\n\nfunc prepend(list interface{}, v interface{}) []interface{} {\n\t//return append([]interface{}{v}, list...)\n\n\ttp := reflect.TypeOf(list).Kind()\n\tswitch tp {\n\tcase reflect.Slice, reflect.Array:\n\t\tl2 := reflect.ValueOf(list)\n\n\t\tl := l2.Len()\n\t\tnl := make([]interface{}, l)\n\t\tfor i := 0; i < l; i++ {\n\t\t\tnl[i] = l2.Index(i).Interface()\n\t\t}\n\n\t\treturn append([]interface{}{v}, nl...)\n\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"Cannot prepend on type %s\", tp))\n\t}\n}\n\nfunc last(list interface{}) interface{} {\n\ttp := reflect.TypeOf(list).Kind()\n\tswitch tp {\n\tcase reflect.Slice, reflect.Array:\n\t\tl2 := reflect.ValueOf(list)\n\n\t\tl := l2.Len()\n\t\tif l == 0 {\n\t\t\treturn nil\n\t\t}\n\n\t\treturn l2.Index(l - 1).Interface()\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"Cannot find last on type %s\", tp))\n\t}\n}\n\nfunc first(list interface{}) interface{} {\n\ttp := reflect.TypeOf(list).Kind()\n\tswitch tp {\n\tcase reflect.Slice, reflect.Array:\n\t\tl2 := reflect.ValueOf(list)\n\n\t\tl := l2.Len()\n\t\tif l == 0 {\n\t\t\treturn nil\n\t\t}\n\n\t\treturn l2.Index(0).Interface()\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"Cannot find first on type %s\", tp))\n\t}\n}\n\nfunc rest(list interface{}) []interface{} {\n\ttp := reflect.TypeOf(list).Kind()\n\tswitch tp {\n\tcase reflect.Slice, reflect.Array:\n\t\tl2 := reflect.ValueOf(list)\n\n\t\tl := l2.Len()\n\t\tif l == 0 {\n\t\t\treturn nil\n\t\t}\n\n\t\tnl := make([]interface{}, l-1)\n\t\tfor i := 1; i < l; i++ {\n\t\t\tnl[i-1] = l2.Index(i).Interface()\n\t\t}\n\n\t\treturn nl\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"Cannot find rest on type %s\", tp))\n\t}\n}\n\nfunc initial(list interface{}) []interface{} {\n\ttp := reflect.TypeOf(list).Kind()\n\tswitch tp {\n\tcase reflect.Slice, reflect.Array:\n\t\tl2 := reflect.ValueOf(list)\n\n\t\tl := l2.Len()\n\t\tif l == 0 {\n\t\t\treturn nil\n\t\t}\n\n\t\tnl := make([]interface{}, l-1)\n\t\tfor i := 0; i < l-1; i++ {\n\t\t\tnl[i] = l2.Index(i).Interface()\n\t\t}\n\n\t\treturn nl\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"Cannot find initial on type %s\", tp))\n\t}\n}\n\nfunc sortAlpha(list interface{}) []string {\n\tk := reflect.Indirect(reflect.ValueOf(list)).Kind()\n\tswitch k {\n\tcase reflect.Slice, reflect.Array:\n\t\ta := strslice(list)\n\t\ts := sort.StringSlice(a)\n\t\ts.Sort()\n\t\treturn s\n\t}\n\treturn []string{strval(list)}\n}\n\nfunc reverse(v interface{}) []interface{} {\n\ttp := reflect.TypeOf(v).Kind()\n\tswitch tp {\n\tcase reflect.Slice, reflect.Array:\n\t\tl2 := reflect.ValueOf(v)\n\n\t\tl := l2.Len()\n\t\t// We do not sort in place because the incoming array should not be altered.\n\t\tnl := make([]interface{}, l)\n\t\tfor i := 0; i < l; i++ {\n\t\t\tnl[l-i-1] = l2.Index(i).Interface()\n\t\t}\n\n\t\treturn nl\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"Cannot find reverse on type %s\", tp))\n\t}\n}\n\nfunc compact(list interface{}) []interface{} {\n\ttp := reflect.TypeOf(list).Kind()\n\tswitch tp {\n\tcase reflect.Slice, reflect.Array:\n\t\tl2 := reflect.ValueOf(list)\n\n\t\tl := l2.Len()\n\t\tnl := []interface{}{}\n\t\tvar item interface{}\n\t\tfor i := 0; i < l; i++ {\n\t\t\titem = l2.Index(i).Interface()\n\t\t\tif !empty(item) {\n\t\t\t\tnl = append(nl, item)\n\t\t\t}\n\t\t}\n\n\t\treturn nl\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"Cannot compact on type %s\", tp))\n\t}\n}\n\nfunc uniq(list interface{}) []interface{} {\n\ttp := reflect.TypeOf(list).Kind()\n\tswitch tp {\n\tcase reflect.Slice, reflect.Array:\n\t\tl2 := reflect.ValueOf(list)\n\n\t\tl := l2.Len()\n\t\tdest := []interface{}{}\n\t\tvar item interface{}\n\t\tfor i := 0; i < l; i++ {\n\t\t\titem = l2.Index(i).Interface()\n\t\t\tif !inList(dest, item) {\n\t\t\t\tdest = append(dest, item)\n\t\t\t}\n\t\t}\n\n\t\treturn dest\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"Cannot find uniq on type %s\", tp))\n\t}\n}\n\nfunc inList(haystack []interface{}, needle interface{}) bool {\n\tfor _, h := range haystack {\n\t\tif reflect.DeepEqual(needle, h) {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunc without(list interface{}, omit ...interface{}) []interface{} {\n\ttp := reflect.TypeOf(list).Kind()\n\tswitch tp {\n\tcase reflect.Slice, reflect.Array:\n\t\tl2 := reflect.ValueOf(list)\n\n\t\tl := l2.Len()\n\t\tres := []interface{}{}\n\t\tvar item interface{}\n\t\tfor i := 0; i < l; i++ {\n\t\t\titem = l2.Index(i).Interface()\n\t\t\tif !inList(omit, item) {\n\t\t\t\tres = append(res, item)\n\t\t\t}\n\t\t}\n\n\t\treturn res\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"Cannot find without on type %s\", tp))\n\t}\n}\n\nfunc has(needle interface{}, haystack interface{}) bool {\n\ttp := reflect.TypeOf(haystack).Kind()\n\tswitch tp {\n\tcase reflect.Slice, reflect.Array:\n\t\tl2 := reflect.ValueOf(haystack)\n\t\tvar item interface{}\n\t\tl := l2.Len()\n\t\tfor i := 0; i < l; i++ {\n\t\t\titem = l2.Index(i).Interface()\n\t\t\tif reflect.DeepEqual(needle, item) {\n\t\t\t\treturn true\n\t\t\t}\n\t\t}\n\n\t\treturn false\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"Cannot find has on type %s\", tp))\n\t}\n}\n\n// $list := [1, 2, 3, 4, 5]\n// slice $list -> list[0:5] = list[:]\n// slice $list 0 3 -> list[0:3] = list[:3]\n// slice $list 3 5 -> list[3:5]\n// slice $list 3 -> list[3:5] = list[3:]\nfunc slice(list interface{}, indices ...interface{}) interface{} {\n\ttp := reflect.TypeOf(list).Kind()\n\tswitch tp {\n\tcase reflect.Slice, reflect.Array:\n\t\tl2 := reflect.ValueOf(list)\n\n\t\tl := l2.Len()\n\t\tif l == 0 {\n\t\t\treturn nil\n\t\t}\n\n\t\tvar start, end int\n\t\tif len(indices) > 0 {\n\t\t\tstart = toInt(indices[0])\n\t\t}\n\t\tif len(indices) < 2 {\n\t\t\tend = l\n\t\t} else {\n\t\t\tend = toInt(indices[1])\n\t\t}\n\n\t\treturn l2.Slice(start, end).Interface()\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"list should be type of slice or array but %s\", tp))\n\t}\n}\n"} +{"text": "/// Copyright (c) 2012 Ecma International. All rights reserved. \n/// Ecma International makes this code available under the terms and conditions set\n/// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the \n/// \"Use Terms\"). Any redistribution of this code must retain the above \n/// copyright and this notice and otherwise comply with the Use Terms.\n/**\n * @path ch08/8.12/8.12.1/8.12.1-1_20.js\n * @description Properties - [[HasOwnProperty]] (literal own getter property)\n */\n\nfunction testcase() {\n\n var o = { get foo() { return 42;} };\n return o.hasOwnProperty(\"foo\");\n\n}\nrunTestCase(testcase);\n"} +{"text": "var utils = require('./utils')\nvar config = require('../config')\nvar isProduction = process.env.NODE_ENV === 'production'\n\nmodule.exports = {\n loaders: utils.cssLoaders({\n sourceMap: isProduction\n ? config.build.productionSourceMap\n : config.dev.cssSourceMap,\n extract: isProduction\n }),\n transformToRequire: {\n video: 'src',\n source: 'src',\n img: 'src',\n image: 'xlink:href'\n }\n}\n"} +{"text": "//\n// Generated by class-dump 3.5 (64 bit) (Debug version compiled Oct 15 2018 10:31:50).\n//\n// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2015 by Steve Nygard.\n//\n\n#import \n\n#import \n\n@class MFEWSConnection, NSString;\n\n@interface MFEWSTransferActionSyncReplayer : ECTransferActionReplayer \n{\n MFEWSConnection *_connection;\n}\n\n- (void).cxx_destruct;\n@property(retain, nonatomic) MFEWSConnection *connection; // @synthesize connection=_connection;\n- (id)_folderIDStringForMailboxURLString:(id)arg1;\n- (id)_folderIDStringForMailbox:(id)arg1;\n- (id)_bodyRequestShape;\n- (id)appendItem:(id)arg1 mailboxURL:(id)arg2;\n- (BOOL)isRecoverableError:(id)arg1;\n- (BOOL)downloadFailed;\n- (id)fetchBodyDataForRemoteID:(id)arg1 mailboxURL:(id)arg2;\n- (BOOL)deleteSourceMessagesFromTransferItems:(id)arg1;\n- (id)moveItems:(id)arg1 destinationMailboxURL:(id)arg2;\n- (id)copyItems:(id)arg1 destinationMailboxURL:(id)arg2;\n- (id)replayActionUsingEWSConnection:(id)arg1;\n\n// Remaining properties\n@property(readonly, copy) NSString *debugDescription;\n@property(readonly, copy) NSString *description;\n@property(readonly) unsigned long long hash;\n@property(readonly) Class superclass;\n\n@end\n\n"} +{"text": "\n\n \n \n"} +{"text": "# Names should be added to this file as\n#\tName or Organization \n# The email address is not required for organizations.\n\n# You can update this list using the following command:\n#\n# $ git shortlog -se | awk '{print $2 \" \" $3 \" \" $4}'\n\n# Please keep the list sorted.\n\nAaron L \nAdrien Bustany \nAmit Krishnan \nAnmol Sethi \nBjørn Erik Pedersen \nBruno Bigras \nCaleb Spare \nCase Nelson \nChris Howey \nChristoffer Buchholz \nDaniel Wagner-Hall \nDave Cheney \nEvan Phoenix \nFrancisco Souza \nHari haran \nJohn C Barstow\nKelvin Fo \nKen-ichirou MATSUZAWA \nMatt Layher \nNathan Youngman \nNickolai Zeldovich \nPatrick \nPaul Hammond \nPawel Knap \nPieter Droogendijk \nPursuit92 \nRiku Voipio \nRob Figueiredo \nRodrigo Chiossi \nSlawek Ligus \nSoge Zhang \nTiffany Jernigan \nTilak Sharma \nTom Payne \nTravis Cline \nTudor Golubenco \nVahe Khachikyan \nYukang \nbronze1man \ndebrando \nhenrikedwards \n铁哥 \n"} +{"text": "// Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef COMPONENTS_DRIVE_JOB_SCHEDULER_H_\n#define COMPONENTS_DRIVE_JOB_SCHEDULER_H_\n\n#include \n\n#include \n#include \n#include \n\n#include \"base/id_map.h\"\n#include \"base/macros.h\"\n#include \"base/observer_list.h\"\n#include \"base/threading/thread_checker.h\"\n#include \"components/drive/drive_uploader.h\"\n#include \"components/drive/job_list.h\"\n#include \"components/drive/job_queue.h\"\n#include \"components/drive/service/drive_service_interface.h\"\n#include \"net/base/network_change_notifier.h\"\n\nclass PrefService;\n\nnamespace drive {\n\nclass EventLogger;\n\n// Priority of a job. Higher values are lower priority.\nenum ContextType {\n USER_INITIATED,\n BACKGROUND,\n // Indicates the number of values of this enum.\n NUM_CONTEXT_TYPES,\n};\n\nstruct ClientContext {\n explicit ClientContext(ContextType in_type) : type(in_type) {}\n ContextType type;\n};\n\n// The JobScheduler is responsible for queuing and scheduling drive jobs.\n// Because jobs are executed concurrently by priority and retried for network\n// failures, there is no guarantee of orderings.\n//\n// Jobs are grouped into two priority levels:\n// - USER_INITIATED jobs are those occur as a result of direct user actions.\n// - BACKGROUND jobs runs in response to state changes, server actions, etc.\n// USER_INITIATED jobs must be handled immediately, thus have higher priority.\n// BACKGROUND jobs run only after all USER_INITIATED jobs have run.\n//\n// Orthogonally, jobs are grouped into two types:\n// - \"File jobs\" transfer the contents of files.\n// - \"Metadata jobs\" operates on file metadata or the directory structure.\n// On WiFi or Ethernet connections, all types of jobs just run.\n// On mobile connections (2G/3G/4G), we don't want large background traffic.\n// USER_INITIATED jobs or metadata jobs will run. BACKGROUND file jobs wait\n// in the queue until the network type changes.\n// On offline case, no jobs run. USER_INITIATED jobs fail immediately.\n// BACKGROUND jobs stay in the queue and wait for network connection.\nclass JobScheduler\n : public net::NetworkChangeNotifier::ConnectionTypeObserver,\n public JobListInterface {\n public:\n JobScheduler(PrefService* pref_service,\n EventLogger* logger,\n DriveServiceInterface* drive_service,\n base::SequencedTaskRunner* blocking_task_runner);\n ~JobScheduler() override;\n\n // JobListInterface overrides.\n std::vector GetJobInfoList() override;\n void AddObserver(JobListObserver* observer) override;\n void RemoveObserver(JobListObserver* observer) override;\n void CancelJob(JobID job_id) override;\n void CancelAllJobs() override;\n\n // Adds a GetAppList operation to the queue.\n // |callback| must not be null.\n void GetAppList(const google_apis::AppListCallback& callback);\n\n // Adds a GetAboutResource operation to the queue.\n // |callback| must not be null.\n void GetAboutResource(const google_apis::AboutResourceCallback& callback);\n\n // Adds a GetAllFileList operation to the queue.\n // |callback| must not be null.\n void GetAllFileList(const google_apis::FileListCallback& callback);\n\n // Adds a GetFileListInDirectory operation to the queue.\n // |callback| must not be null.\n void GetFileListInDirectory(const std::string& directory_resource_id,\n const google_apis::FileListCallback& callback);\n\n // Adds a Search operation to the queue.\n // |callback| must not be null.\n void Search(const std::string& search_query,\n const google_apis::FileListCallback& callback);\n\n // Adds a GetChangeList operation to the queue.\n // |callback| must not be null.\n void GetChangeList(int64_t start_changestamp,\n const google_apis::ChangeListCallback& callback);\n\n // Adds GetRemainingChangeList operation to the queue.\n // |callback| must not be null.\n void GetRemainingChangeList(const GURL& next_link,\n const google_apis::ChangeListCallback& callback);\n\n // Adds GetRemainingFileList operation to the queue.\n // |callback| must not be null.\n void GetRemainingFileList(const GURL& next_link,\n const google_apis::FileListCallback& callback);\n\n // Adds a GetFileResource operation to the queue.\n void GetFileResource(const std::string& resource_id,\n const ClientContext& context,\n const google_apis::FileResourceCallback& callback);\n\n // Adds a GetShareUrl operation to the queue.\n void GetShareUrl(const std::string& resource_id,\n const GURL& embed_origin,\n const ClientContext& context,\n const google_apis::GetShareUrlCallback& callback);\n\n // Adds a TrashResource operation to the queue.\n void TrashResource(const std::string& resource_id,\n const ClientContext& context,\n const google_apis::EntryActionCallback& callback);\n\n // Adds a CopyResource operation to the queue.\n void CopyResource(const std::string& resource_id,\n const std::string& parent_resource_id,\n const std::string& new_title,\n const base::Time& last_modified,\n const google_apis::FileResourceCallback& callback);\n\n // Adds a UpdateResource operation to the queue.\n void UpdateResource(const std::string& resource_id,\n const std::string& parent_resource_id,\n const std::string& new_title,\n const base::Time& last_modified,\n const base::Time& last_viewed_by_me,\n const google_apis::drive::Properties& properties,\n const ClientContext& context,\n const google_apis::FileResourceCallback& callback);\n\n // Adds a AddResourceToDirectory operation to the queue.\n void AddResourceToDirectory(const std::string& parent_resource_id,\n const std::string& resource_id,\n const google_apis::EntryActionCallback& callback);\n\n // Adds a RemoveResourceFromDirectory operation to the queue.\n void RemoveResourceFromDirectory(\n const std::string& parent_resource_id,\n const std::string& resource_id,\n const ClientContext& context,\n const google_apis::EntryActionCallback& callback);\n\n // Adds a AddNewDirectory operation to the queue.\n void AddNewDirectory(const std::string& parent_resource_id,\n const std::string& directory_title,\n const AddNewDirectoryOptions& options,\n const ClientContext& context,\n const google_apis::FileResourceCallback& callback);\n\n // Adds a DownloadFile operation to the queue.\n // The first two arguments |virtual_path| and |expected_file_size| are used\n // only for filling JobInfo for the operation so that observers can get the\n // detail. The actual operation never refers these values.\n JobID DownloadFile(\n const base::FilePath& virtual_path,\n int64_t expected_file_size,\n const base::FilePath& local_cache_path,\n const std::string& resource_id,\n const ClientContext& context,\n const google_apis::DownloadActionCallback& download_action_callback,\n const google_apis::GetContentCallback& get_content_callback);\n\n // Adds an UploadNewFile operation to the queue.\n void UploadNewFile(const std::string& parent_resource_id,\n int64_t expected_file_size,\n const base::FilePath& drive_file_path,\n const base::FilePath& local_file_path,\n const std::string& title,\n const std::string& content_type,\n const UploadNewFileOptions& options,\n const ClientContext& context,\n const google_apis::FileResourceCallback& callback);\n\n // Adds an UploadExistingFile operation to the queue.\n void UploadExistingFile(const std::string& resource_id,\n int64_t expected_file_size,\n const base::FilePath& drive_file_path,\n const base::FilePath& local_file_path,\n const std::string& content_type,\n const UploadExistingFileOptions& options,\n const ClientContext& context,\n const google_apis::FileResourceCallback& callback);\n\n // Adds AddPermission operation to the queue. |callback| must not be null.\n void AddPermission(const std::string& resource_id,\n const std::string& email,\n google_apis::drive::PermissionRole role,\n const google_apis::EntryActionCallback& callback);\n\n private:\n friend class JobSchedulerTest;\n\n enum QueueType {\n METADATA_QUEUE,\n FILE_QUEUE,\n NUM_QUEUES\n };\n\n static const int kMaxJobCount[NUM_QUEUES];\n\n // Represents a single entry in the job map.\n struct JobEntry {\n explicit JobEntry(JobType type);\n ~JobEntry();\n\n // General user-visible information on the job.\n JobInfo job_info;\n\n // Context of the job.\n ClientContext context;\n\n // The number of times the jobs is retried due to server errors.\n int retry_count;\n\n // The callback to start the job. Called each time it is retry.\n base::Callback task;\n\n // The callback to cancel the running job. It is returned from task.Run().\n google_apis::CancelCallback cancel_callback;\n\n // The callback to notify an error to the client of JobScheduler.\n // This is used to notify cancel of a job that is not running yet.\n base::Callback abort_callback;\n\n base::ThreadChecker thread_checker_;\n };\n\n // Parameters for DriveUploader::ResumeUploadFile.\n struct ResumeUploadParams;\n\n // Creates a new job and add it to the job map.\n JobEntry* CreateNewJob(JobType type);\n\n // Adds the specified job to the queue and starts the job loop for the queue\n // if needed.\n void StartJob(JobEntry* job);\n\n // Adds the specified job to the queue.\n void QueueJob(JobID job_id);\n\n // Determines the next job that should run, and starts it.\n void DoJobLoop(QueueType queue_type);\n\n // Returns the lowest acceptable priority level of the operations that is\n // currently allowed to start for the |queue_type|.\n int GetCurrentAcceptedPriority(QueueType queue_type);\n\n // Updates |wait_until_| to throttle requests.\n void UpdateWait();\n\n // Retries the job if needed and returns false. Otherwise returns true.\n bool OnJobDone(JobID job_id, google_apis::DriveApiErrorCode error);\n\n // Callback for job finishing with a FileListCallback.\n void OnGetFileListJobDone(JobID job_id,\n const google_apis::FileListCallback& callback,\n google_apis::DriveApiErrorCode error,\n std::unique_ptr file_list);\n\n // Callback for job finishing with a ChangeListCallback.\n void OnGetChangeListJobDone(\n JobID job_id,\n const google_apis::ChangeListCallback& callback,\n google_apis::DriveApiErrorCode error,\n std::unique_ptr change_list);\n\n // Callback for job finishing with a FileResourceCallback.\n void OnGetFileResourceJobDone(\n JobID job_id,\n const google_apis::FileResourceCallback& callback,\n google_apis::DriveApiErrorCode error,\n std::unique_ptr entry);\n\n // Callback for job finishing with a AboutResourceCallback.\n void OnGetAboutResourceJobDone(\n JobID job_id,\n const google_apis::AboutResourceCallback& callback,\n google_apis::DriveApiErrorCode error,\n std::unique_ptr about_resource);\n\n // Callback for job finishing with a GetShareUrlCallback.\n void OnGetShareUrlJobDone(\n JobID job_id,\n const google_apis::GetShareUrlCallback& callback,\n google_apis::DriveApiErrorCode error,\n const GURL& share_url);\n\n // Callback for job finishing with a AppListCallback.\n void OnGetAppListJobDone(JobID job_id,\n const google_apis::AppListCallback& callback,\n google_apis::DriveApiErrorCode error,\n std::unique_ptr app_list);\n\n // Callback for job finishing with a EntryActionCallback.\n void OnEntryActionJobDone(JobID job_id,\n const google_apis::EntryActionCallback& callback,\n google_apis::DriveApiErrorCode error);\n\n // Callback for job finishing with a DownloadActionCallback.\n void OnDownloadActionJobDone(\n JobID job_id,\n const google_apis::DownloadActionCallback& callback,\n google_apis::DriveApiErrorCode error,\n const base::FilePath& temp_file);\n\n // Callback for job finishing with a UploadCompletionCallback.\n void OnUploadCompletionJobDone(\n JobID job_id,\n const ResumeUploadParams& resume_params,\n const google_apis::FileResourceCallback& callback,\n google_apis::DriveApiErrorCode error,\n const GURL& upload_location,\n std::unique_ptr entry);\n\n // Callback for DriveUploader::ResumeUploadFile().\n void OnResumeUploadFileDone(\n JobID job_id,\n const base::Callback& original_task,\n const google_apis::FileResourceCallback& callback,\n google_apis::DriveApiErrorCode error,\n const GURL& upload_location,\n std::unique_ptr entry);\n\n // Updates the progress status of the specified job.\n void UpdateProgress(JobID job_id, int64_t progress, int64_t total);\n\n // net::NetworkChangeNotifier::ConnectionTypeObserver override.\n void OnConnectionTypeChanged(\n net::NetworkChangeNotifier::ConnectionType type) override;\n\n // Get the type of queue the specified job should be put in.\n QueueType GetJobQueueType(JobType type);\n\n // For testing only. Disables throttling so that testing is faster.\n void SetDisableThrottling(bool disable) { disable_throttling_ = disable; }\n\n // Aborts a job which is not in STATE_RUNNING.\n void AbortNotRunningJob(JobEntry* job, google_apis::DriveApiErrorCode error);\n\n // Notifies updates to observers.\n void NotifyJobAdded(const JobInfo& job_info);\n void NotifyJobDone(const JobInfo& job_info,\n google_apis::DriveApiErrorCode error);\n void NotifyJobUpdated(const JobInfo& job_info);\n\n // Gets information of the queue of the given type as string.\n std::string GetQueueInfo(QueueType type) const;\n\n // Returns a string representation of QueueType.\n static std::string QueueTypeToString(QueueType type);\n\n // The number of times operations have failed in a row, capped at\n // kMaxThrottleCount. This is used to calculate the delay before running the\n // next task.\n int throttle_count_;\n\n // Jobs should not start running until this time. Used for throttling.\n base::Time wait_until_;\n\n // Disables throttling for testing.\n bool disable_throttling_;\n\n // The queues of jobs.\n std::unique_ptr queue_[NUM_QUEUES];\n\n // The list of queued job info indexed by job IDs.\n typedef IDMap JobIDMap;\n JobIDMap job_map_;\n\n // The list of observers for the scheduler.\n base::ObserverList observer_list_;\n\n EventLogger* logger_;\n DriveServiceInterface* drive_service_;\n base::SequencedTaskRunner* blocking_task_runner_;\n std::unique_ptr uploader_;\n\n PrefService* pref_service_;\n\n base::ThreadChecker thread_checker_;\n\n // Note: This should remain the last member so it'll be destroyed and\n // invalidate its weak pointers before any other members are destroyed.\n base::WeakPtrFactory weak_ptr_factory_;\n DISALLOW_COPY_AND_ASSIGN(JobScheduler);\n};\n\n} // namespace drive\n\n#endif // COMPONENTS_DRIVE_JOB_SCHEDULER_H_\n"} +{"text": "import argparse\nimport os\nfrom util import util\nimport pickle\nimport models\nimport data\nimport torch\n\n\nclass BaseOptions():\n \"\"\"This class defines options used during both training and test time.\n\n It also implements several helper functions such as parsing, printing, and saving the options.\n It also gathers additional options defined in functions in both dataset class and model class.\n \"\"\"\n\n def __init__(self):\n self.initialized = False\n\n def initialize(self, parser):\n parser.add_argument('--dataroot', type=str, default=None, help='path to images (should have subfolders trainA, trainB, valA, valB, etc)')\n parser.add_argument('--batch_size', type=int, default=12, help='batch size')\n parser.add_argument('--load_size', type=int, default=128, help='scale images to this size')\n parser.add_argument('--crop_size', type=int, default=128, help='then crop to this size')\n parser.add_argument('--input_nc', type=int, default=1, help='# of input image channels')\n parser.add_argument('--output_nc', type=int, default=3, help='# of output image channels')\n parser.add_argument('--nz_texture', type=int, default=8, help='the dimension of texture code')\n parser.add_argument('--nz_shape', type=int, default=200, help='the dimension of shape code')\n parser.add_argument('--gpu_ids', type=str, default='0', help='gpu ids: e.g. 0 0,1,2, 0,2, -1 for CPU mode')\n parser.add_argument('--name', type=str, default='experiment_name', help='name of the experiment. It decides where to store samples and models')\n parser.add_argument('--model', type=str, default='base', help='choose which model to use: base | shape_gan | texture_real | texture | full | test')\n parser.add_argument('--epoch', type=str, default='latest', help='which epoch to load? set to latest to use latest cached model')\n parser.add_argument('--phase', type=str, default='val', help='train | val | test, etc')\n parser.add_argument('--num_threads', default=6, type=int, help='# sthreads for loading data')\n parser.add_argument('--checkpoints_dir', type=str, default='../../results_texture/', help='models are saved here')\n parser.add_argument('--display_winsize', type=int, default=128, help='display window size')\n # dataset\n parser.add_argument('--dataset_mode', type=str, default='base', help='chooses how datasets are loaded: base | image_and_df | image_and_voxel | df | voxel')\n parser.add_argument('--resize_or_crop', type=str, default='crop_real_im', help='crop_real_im | resize_and_crop | crop | scale_width | scale_width_and_crop')\n parser.add_argument('--serial_batches', action='store_true', help='if true, takes images in order to make batches, otherwise takes them randomly')\n parser.add_argument('--max_dataset_size', type=int, default=float(\"inf\"), help='Maximum number of samples allowed per dataset. If the dataset directory contains more than max_dataset_size, only a subset is loaded.')\n # models\n parser.add_argument('--num_Ds', type=int, default=2, help='the number of discriminators')\n parser.add_argument('--netD', type=str, default='multi', help='selects model to use for netD: single | multi')\n parser.add_argument('--netG', type=str, default='resnet_cat', help='selects model to use for netG: unet | resnet_cat')\n parser.add_argument('--use_dropout', action='store_true', help='use dropout for the generator')\n parser.add_argument('--netE', type=str, default='adaIN', help='selects model to use for netE: resnet | conv | adaIN')\n parser.add_argument('--where_add', type=str, default='all', help='where to add z in the network G: input | all')\n parser.add_argument('--netG_3D', type=str, default='G0', help='selects model to use for netG_3D: G0')\n parser.add_argument('--netD_3D', type=str, default='D0', help='selects model to use for netD_3D: D0')\n parser.add_argument('--norm', type=str, default='inst', help='instance normalization or batch normalization: batch | inst | none')\n parser.add_argument('--nl', type=str, default='relu', help='non-linearity activation: relu | lrelu | elu (we hard-coded lrelu for the discriminator)')\n parser.add_argument('--G_norm_3D', type=str, default='batch3d', help='normalization layer for G: inst3d | batch3d | none')\n parser.add_argument('--D_norm_3D', type=str, default='none', help='normalization layer for D: inst3d | batch3d | none')\n # number of channels in our networks\n parser.add_argument('--nef', type=int, default=64, help='# of encoder filters in the first conv layer')\n parser.add_argument('--ngf', type=int, default=64, help='# of gen filters in the last conv layer')\n parser.add_argument('--ndf', type=int, default=64, help='# of discrim filters in the first conv layer')\n parser.add_argument('--ngf_3d', type=int, default=64, help='# of 3D gen filters in the last conv layer')\n parser.add_argument('--ndf_3d', type=int, default=64, help='# of 3D discrim filters in the first conv layer')\n # extra parameters\n parser.add_argument('--gan_mode', type=str, default='lsgan', help='dcgan | lsgan | wgangp | hinge') # for 2D texture network; not for 3D; use gan_mode_3D for 3D shape\n parser.add_argument('--init_type', type=str, default='kaiming', help='network initialization: normal | xavier | kaiming | orth')\n parser.add_argument('--init_param', type=float, default=0.02, help='scaling factor for normal, xavier and orthogonal.')\n # 3D paramters:\n parser.add_argument('--voxel_res', type=int, default=128, help='the resolution of voxelized data')\n parser.add_argument('--class_3d', type=str, default='car', choices=['car', 'chair'], help='3d model class')\n parser.add_argument('--model3D_dir', type=str, default=None, help='directory to store pretrained 3D model')\n parser.add_argument('--model2D_dir', type=str, default=None, help='directory to store pretrained 2D model')\n parser.add_argument('--use_df', action='store_true', help='use distance function (DF) representation')\n parser.add_argument('--df_th', type=float, default=0.90, help='threshold for rendering distance function (DF)')\n # misc\n parser.add_argument('--no_largest', action='store_true', help='disable using the largest connected component during rendering')\n parser.add_argument('--crop_align', action='store_true', help='if the croping is aligned between real and fake')\n parser.add_argument('--suffix', default='', type=str, help='customized suffix: e.g., {netD}_{netG}_voxel{voxel_res}')\n parser.add_argument('--verbose', action='store_true', help='if specified, print more debugging information')\n parser.add_argument('--print_grad', action='store_true', help='if print grad for 2D and 3D gan loss')\n parser.add_argument('--seed', type=int, default=0, help='seed')\n self.initialized = True\n return parser\n\n def gather_options(self):\n \"\"\"Initialize our parser with basic options(only once).\n Add additional model-specific and dataset-specific options.\n These options are difined in the function\n in model and dataset classes.\n \"\"\"\n if not self.initialized: # check if it has been initialized\n parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)\n parser = self.initialize(parser)\n\n # get the basic options\n opt, _ = parser.parse_known_args()\n\n # modify model-related parser options\n model_name = opt.model\n model_option_setter = models.get_option_setter(model_name)\n parser = model_option_setter(parser, self.isTrain)\n opt, _ = parser.parse_known_args() # parse again with new defaults\n\n # modify dataset-related parser options\n dataset_name = opt.dataset_mode\n dataset_option_setter = data.get_option_setter(dataset_name)\n parser = dataset_option_setter(parser, self.isTrain)\n\n # save and return the parser\n self.parser = parser\n return parser.parse_args()\n\n def print_options(self, opt):\n \"\"\"Print and save options\n\n It will print both current options and default values(if different).\n It will save options into a text file / [checkpoints_dir] / opt.txt\n \"\"\"\n message = ''\n message += '----------------- Options ---------------\\n'\n for k, v in sorted(vars(opt).items()):\n comment = ''\n default = self.parser.get_default(k)\n if v != default:\n comment = '\\t[default: %s]' % str(default)\n message += '{:>25}: {:<30}{}\\n'.format(str(k), str(v), comment)\n message += '----------------- End -------------------'\n print(message)\n\n # save to the disk\n if self.isTrain:\n expr_dir = os.path.join(opt.checkpoints_dir, opt.name)\n util.mkdirs(expr_dir)\n file_name = os.path.join(expr_dir, 'train_opt.txt')\n with open(file_name, 'wt') as opt_file:\n opt_file.write(message)\n opt_file.write('\\n')\n pkl_file = os.path.join(expr_dir, 'train_opt.pkl')\n pickle.dump(opt, open(pkl_file, 'wb'))\n else:\n util.mkdirs(opt.results_dir)\n\n def parse(self):\n \"\"\"Parse our options, create checkpoints directory suffix, and set up gpu device.\"\"\"\n opt = self.gather_options()\n opt.isTrain = self.isTrain # train or test\n\n # process opt.suffix\n if opt.suffix:\n opt.name = (opt.suffix.format(**vars(opt))) if opt.suffix != '' else ''\n\n self.print_options(opt)\n\n # set gpu ids\n str_ids = opt.gpu_ids.split(',')\n opt.gpu_ids = []\n for str_id in str_ids:\n id = int(str_id)\n if id >= 0:\n opt.gpu_ids.append(id)\n if len(opt.gpu_ids) > 0:\n torch.cuda.set_device(opt.gpu_ids[0])\n\n self.opt = opt\n return self.opt\n"} +{"text": "# Copyright 2015 Google Inc. All Rights Reserved.\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n# http://www.apache.org/licenses/LICENSE-2.0\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\"\"\"Creates a dict with a parent so that missing values are sent up.\"\"\"\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport collections\n\n\nclass ChainDict(collections.MutableMapping):\n \"\"\"The Name class.\"\"\"\n\n def __init__(self, parent):\n self._map = {}\n self._parent = parent\n self._dead_count = 0\n\n def __getitem__(self, key):\n if key in self._map:\n return self._map[key]\n elif self._parent:\n return self._parent[key]\n else:\n raise KeyError('Key not found: %s' % key)\n\n def __setitem__(self, key, value):\n self._map[key] = value\n\n def __delitem__(self, key):\n raise Exception('Deleting items not supported.')\n\n def _full_map(self):\n \"\"\"Creates a full mapping of this and all parent key, value pairs.\"\"\"\n result = {}\n if self._parent:\n result.update(self._parent)\n result.update(self._map)\n return result\n\n def __iter__(self):\n return self._full_map().__iter__()\n\n def __len__(self):\n return len(self._full_map())\n"} +{"text": "\n\n\n\n\n\n\n\n\n\n
\n\n
\n\n\n\n"} +{"text": "===============================================================================\n= JSONLab =\n= An open-source MATLAB/Octave JSON encoder and decoder =\n===============================================================================\n\n*Copyright (C) 2011-2015 Qianqian Fang \n*License: BSD License, see License_BSD.txt for details\n*Version: 1.0 (Optimus - Final)\n\n-------------------------------------------------------------------------------\n\nTable of Content:\n\nI. Introduction\nII. Installation\nIII.Using JSONLab\nIV. Known Issues and TODOs\nV. Contribution and feedback\n\n-------------------------------------------------------------------------------\n\nI. Introduction\n\nJSON ([http://www.json.org/ JavaScript Object Notation]) is a highly portable, \nhuman-readable and \"[http://en.wikipedia.org/wiki/JSON fat-free]\" text format \nto represent complex and hierarchical data. It is as powerful as \n[http://en.wikipedia.org/wiki/XML XML], but less verbose. JSON format is widely \nused for data-exchange in applications, and is essential for the wild success \nof [http://en.wikipedia.org/wiki/Ajax_(programming) Ajax] and \n[http://en.wikipedia.org/wiki/Web_2.0 Web2.0]. \n\nUBJSON (Universal Binary JSON) is a binary JSON format, specifically \noptimized for compact file size and better performance while keeping\nthe semantics as simple as the text-based JSON format. Using the UBJSON\nformat allows to wrap complex binary data in a flexible and extensible\nstructure, making it possible to process complex and large dataset \nwithout accuracy loss due to text conversions.\n\nWe envision that both JSON and its binary version will serve as part of \nthe mainstream data-exchange formats for scientific research in the future. \nIt will provide the flexibility and generality achieved by other popular \ngeneral-purpose file specifications, such as\n[http://www.hdfgroup.org/HDF5/whatishdf5.html HDF5], with significantly \nreduced complexity and enhanced performance.\n\nJSONLab is a free and open-source implementation of a JSON/UBJSON encoder \nand a decoder in the native MATLAB language. It can be used to convert a MATLAB \ndata structure (array, struct, cell, struct array and cell array) into \nJSON/UBJSON formatted strings, or to decode a JSON/UBJSON file into MATLAB \ndata structure. JSONLab supports both MATLAB and \n[http://www.gnu.org/software/octave/ GNU Octave] (a free MATLAB clone).\n\n-------------------------------------------------------------------------------\n\nII. Installation\n\nThe installation of JSONLab is no different than any other simple\nMATLAB toolbox. You only need to download/unzip the JSONLab package\nto a folder, and add the folder's path to MATLAB/Octave's path list\nby using the following command:\n\n addpath('/path/to/jsonlab');\n\nIf you want to add this path permanently, you need to type \"pathtool\", \nbrowse to the jsonlab root folder and add to the list, then click \"Save\".\nThen, run \"rehash\" in MATLAB, and type \"which loadjson\", if you see an \noutput, that means JSONLab is installed for MATLAB/Octave.\n\n-------------------------------------------------------------------------------\n\nIII.Using JSONLab\n\nJSONLab provides two functions, loadjson.m -- a MATLAB->JSON decoder, \nand savejson.m -- a MATLAB->JSON encoder, for the text-based JSON, and \ntwo equivallent functions -- loadubjson and saveubjson for the binary \nJSON. The detailed help info for the four functions can be found below:\n\n=== loadjson.m ===\n
\n  data=loadjson(fname,opt)\n     or\n  data=loadjson(fname,'param1',value1,'param2',value2,...)\n \n  parse a JSON (JavaScript Object Notation) file or string\n \n  authors:Qianqian Fang (fangq nmr.mgh.harvard.edu)\n  created on 2011/09/09, including previous works from \n \n          Nedialko Krouchev: http://www.mathworks.com/matlabcentral/fileexchange/25713\n             created on 2009/11/02\n          François Glineur: http://www.mathworks.com/matlabcentral/fileexchange/23393\n             created on  2009/03/22\n          Joel Feenstra:\n          http://www.mathworks.com/matlabcentral/fileexchange/20565\n             created on 2008/07/03\n \n  $Id: loadjson.m 452 2014-11-22 16:43:33Z fangq $\n \n  input:\n       fname: input file name, if fname contains \"{}\" or \"[]\", fname\n              will be interpreted as a JSON string\n       opt: a struct to store parsing options, opt can be replaced by \n            a list of ('param',value) pairs - the param string is equivallent\n            to a field in opt. opt can have the following \n            fields (first in [.|.] is the default)\n \n            opt.SimplifyCell [0|1]: if set to 1, loadjson will call cell2mat\n                          for each element of the JSON data, and group \n                          arrays based on the cell2mat rules.\n            opt.FastArrayParser [1|0 or integer]: if set to 1, use a\n                          speed-optimized array parser when loading an \n                          array object. The fast array parser may \n                          collapse block arrays into a single large\n                          array similar to rules defined in cell2mat; 0 to \n                          use a legacy parser; if set to a larger-than-1\n                          value, this option will specify the minimum\n                          dimension to enable the fast array parser. For\n                          example, if the input is a 3D array, setting\n                          FastArrayParser to 1 will return a 3D array;\n                          setting to 2 will return a cell array of 2D\n                          arrays; setting to 3 will return to a 2D cell\n                          array of 1D vectors; setting to 4 will return a\n                          3D cell array.\n            opt.ShowProgress [0|1]: if set to 1, loadjson displays a progress bar.\n \n  output:\n       dat: a cell array, where {...} blocks are converted into cell arrays,\n            and [...] are converted to arrays\n \n  examples:\n       dat=loadjson('{\"obj\":{\"string\":\"value\",\"array\":[1,2,3]}}')\n       dat=loadjson(['examples' filesep 'example1.json'])\n       dat=loadjson(['examples' filesep 'example1.json'],'SimplifyCell',1)\n
\n\n=== savejson.m ===\n\n
\n  json=savejson(rootname,obj,filename)\n     or\n  json=savejson(rootname,obj,opt)\n  json=savejson(rootname,obj,'param1',value1,'param2',value2,...)\n \n  convert a MATLAB object (cell, struct or array) into a JSON (JavaScript\n  Object Notation) string\n \n  author: Qianqian Fang (fangq nmr.mgh.harvard.edu)\n  created on 2011/09/09\n \n  $Id: savejson.m 458 2014-12-19 22:17:17Z fangq $\n \n  input:\n       rootname: the name of the root-object, when set to '', the root name\n         is ignored, however, when opt.ForceRootName is set to 1 (see below),\n         the MATLAB variable name will be used as the root name.\n       obj: a MATLAB object (array, cell, cell array, struct, struct array).\n       filename: a string for the file name to save the output JSON data.\n       opt: a struct for additional options, ignore to use default values.\n         opt can have the following fields (first in [.|.] is the default)\n \n         opt.FileName [''|string]: a file name to save the output JSON data\n         opt.FloatFormat ['%.10g'|string]: format to show each numeric element\n                          of a 1D/2D array;\n         opt.ArrayIndent [1|0]: if 1, output explicit data array with\n                          precedent indentation; if 0, no indentation\n         opt.ArrayToStruct[0|1]: when set to 0, savejson outputs 1D/2D\n                          array in JSON array format; if sets to 1, an\n                          array will be shown as a struct with fields\n                          \"_ArrayType_\", \"_ArraySize_\" and \"_ArrayData_\"; for\n                          sparse arrays, the non-zero elements will be\n                          saved to _ArrayData_ field in triplet-format i.e.\n                          (ix,iy,val) and \"_ArrayIsSparse_\" will be added\n                          with a value of 1; for a complex array, the \n                          _ArrayData_ array will include two columns \n                          (4 for sparse) to record the real and imaginary \n                          parts, and also \"_ArrayIsComplex_\":1 is added. \n         opt.ParseLogical [0|1]: if this is set to 1, logical array elem\n                          will use true/false rather than 1/0.\n         opt.NoRowBracket [1|0]: if this is set to 1, arrays with a single\n                          numerical element will be shown without a square\n                          bracket, unless it is the root object; if 0, square\n                          brackets are forced for any numerical arrays.\n         opt.ForceRootName [0|1]: when set to 1 and rootname is empty, savejson\n                          will use the name of the passed obj variable as the \n                          root object name; if obj is an expression and \n                          does not have a name, 'root' will be used; if this \n                          is set to 0 and rootname is empty, the root level \n                          will be merged down to the lower level.\n         opt.Inf ['\"$1_Inf_\"'|string]: a customized regular expression pattern\n                          to represent +/-Inf. The matched pattern is '([-+]*)Inf'\n                          and $1 represents the sign. For those who want to use\n                          1e999 to represent Inf, they can set opt.Inf to '$11e999'\n         opt.NaN ['\"_NaN_\"'|string]: a customized regular expression pattern\n                          to represent NaN\n         opt.JSONP [''|string]: to generate a JSONP output (JSON with padding),\n                          for example, if opt.JSONP='foo', the JSON data is\n                          wrapped inside a function call as 'foo(...);'\n         opt.UnpackHex [1|0]: conver the 0x[hex code] output by loadjson \n                          back to the string form\n         opt.SaveBinary [0|1]: 1 - save the JSON file in binary mode; 0 - text mode.\n         opt.Compact [0|1]: 1- out compact JSON format (remove all newlines and tabs)\n \n         opt can be replaced by a list of ('param',value) pairs. The param \n         string is equivallent to a field in opt and is case sensitive.\n  output:\n       json: a string in the JSON format (see http://json.org)\n \n  examples:\n       jsonmesh=struct('MeshNode',[0 0 0;1 0 0;0 1 0;1 1 0;0 0 1;1 0 1;0 1 1;1 1 1],... \n                'MeshTetra',[1 2 4 8;1 3 4 8;1 2 6 8;1 5 6 8;1 5 7 8;1 3 7 8],...\n                'MeshTri',[1 2 4;1 2 6;1 3 4;1 3 7;1 5 6;1 5 7;...\n                           2 8 4;2 8 6;3 8 4;3 8 7;5 8 6;5 8 7],...\n                'MeshCreator','FangQ','MeshTitle','T6 Cube',...\n                'SpecialData',[nan, inf, -inf]);\n       savejson('jmesh',jsonmesh)\n       savejson('',jsonmesh,'ArrayIndent',0,'FloatFormat','\\t%.5g')\n 
\n\n=== loadubjson.m ===\n\n
\n  data=loadubjson(fname,opt)\n     or\n  data=loadubjson(fname,'param1',value1,'param2',value2,...)\n \n  parse a JSON (JavaScript Object Notation) file or string\n \n  authors:Qianqian Fang (fangq nmr.mgh.harvard.edu)\n  created on 2013/08/01\n \n  $Id: loadubjson.m 436 2014-08-05 20:51:40Z fangq $\n \n  input:\n       fname: input file name, if fname contains \"{}\" or \"[]\", fname\n              will be interpreted as a UBJSON string\n       opt: a struct to store parsing options, opt can be replaced by \n            a list of ('param',value) pairs - the param string is equivallent\n            to a field in opt. opt can have the following \n            fields (first in [.|.] is the default)\n \n            opt.SimplifyCell [0|1]: if set to 1, loadubjson will call cell2mat\n                          for each element of the JSON data, and group \n                          arrays based on the cell2mat rules.\n            opt.IntEndian [B|L]: specify the endianness of the integer fields\n                          in the UBJSON input data. B - Big-Endian format for \n                          integers (as required in the UBJSON specification); \n                          L - input integer fields are in Little-Endian order.\n \n  output:\n       dat: a cell array, where {...} blocks are converted into cell arrays,\n            and [...] are converted to arrays\n \n  examples:\n       obj=struct('string','value','array',[1 2 3]);\n       ubjdata=saveubjson('obj',obj);\n       dat=loadubjson(ubjdata)\n       dat=loadubjson(['examples' filesep 'example1.ubj'])\n       dat=loadubjson(['examples' filesep 'example1.ubj'],'SimplifyCell',1)\n
\n\n=== saveubjson.m ===\n\n
\n  json=saveubjson(rootname,obj,filename)\n     or\n  json=saveubjson(rootname,obj,opt)\n  json=saveubjson(rootname,obj,'param1',value1,'param2',value2,...)\n \n  convert a MATLAB object (cell, struct or array) into a Universal \n  Binary JSON (UBJSON) binary string\n \n  author: Qianqian Fang (fangq nmr.mgh.harvard.edu)\n  created on 2013/08/17\n \n  $Id: saveubjson.m 440 2014-09-17 19:59:45Z fangq $\n \n  input:\n       rootname: the name of the root-object, when set to '', the root name\n         is ignored, however, when opt.ForceRootName is set to 1 (see below),\n         the MATLAB variable name will be used as the root name.\n       obj: a MATLAB object (array, cell, cell array, struct, struct array)\n       filename: a string for the file name to save the output UBJSON data\n       opt: a struct for additional options, ignore to use default values.\n         opt can have the following fields (first in [.|.] is the default)\n \n         opt.FileName [''|string]: a file name to save the output JSON data\n         opt.ArrayToStruct[0|1]: when set to 0, saveubjson outputs 1D/2D\n                          array in JSON array format; if sets to 1, an\n                          array will be shown as a struct with fields\n                          \"_ArrayType_\", \"_ArraySize_\" and \"_ArrayData_\"; for\n                          sparse arrays, the non-zero elements will be\n                          saved to _ArrayData_ field in triplet-format i.e.\n                          (ix,iy,val) and \"_ArrayIsSparse_\" will be added\n                          with a value of 1; for a complex array, the \n                          _ArrayData_ array will include two columns \n                          (4 for sparse) to record the real and imaginary \n                          parts, and also \"_ArrayIsComplex_\":1 is added. \n         opt.ParseLogical [1|0]: if this is set to 1, logical array elem\n                          will use true/false rather than 1/0.\n         opt.NoRowBracket [1|0]: if this is set to 1, arrays with a single\n                          numerical element will be shown without a square\n                          bracket, unless it is the root object; if 0, square\n                          brackets are forced for any numerical arrays.\n         opt.ForceRootName [0|1]: when set to 1 and rootname is empty, saveubjson\n                          will use the name of the passed obj variable as the \n                          root object name; if obj is an expression and \n                          does not have a name, 'root' will be used; if this \n                          is set to 0 and rootname is empty, the root level \n                          will be merged down to the lower level.\n         opt.JSONP [''|string]: to generate a JSONP output (JSON with padding),\n                          for example, if opt.JSON='foo', the JSON data is\n                          wrapped inside a function call as 'foo(...);'\n         opt.UnpackHex [1|0]: conver the 0x[hex code] output by loadjson \n                          back to the string form\n \n         opt can be replaced by a list of ('param',value) pairs. The param \n         string is equivallent to a field in opt and is case sensitive.\n  output:\n       json: a binary string in the UBJSON format (see http://ubjson.org)\n \n  examples:\n       jsonmesh=struct('MeshNode',[0 0 0;1 0 0;0 1 0;1 1 0;0 0 1;1 0 1;0 1 1;1 1 1],... \n                'MeshTetra',[1 2 4 8;1 3 4 8;1 2 6 8;1 5 6 8;1 5 7 8;1 3 7 8],...\n                'MeshTri',[1 2 4;1 2 6;1 3 4;1 3 7;1 5 6;1 5 7;...\n                           2 8 4;2 8 6;3 8 4;3 8 7;5 8 6;5 8 7],...\n                'MeshCreator','FangQ','MeshTitle','T6 Cube',...\n                'SpecialData',[nan, inf, -inf]);\n       saveubjson('jsonmesh',jsonmesh)\n       saveubjson('jsonmesh',jsonmesh,'meshdata.ubj')\n
\n\n\n=== examples ===\n\nUnder the \"examples\" folder, you can find several scripts to demonstrate the\nbasic utilities of JSONLab. Running the \"demo_jsonlab_basic.m\" script, you \nwill see the conversions from MATLAB data structure to JSON text and backward.\nIn \"jsonlab_selftest.m\", we load complex JSON files downloaded from the Internet\nand validate the loadjson/savejson functions for regression testing purposes.\nSimilarly, a \"demo_ubjson_basic.m\" script is provided to test the saveubjson\nand loadubjson pairs for various matlab data structures.\n\nPlease run these examples and understand how JSONLab works before you use\nit to process your data.\n\n-------------------------------------------------------------------------------\n\nIV. Known Issues and TODOs\n\nJSONLab has several known limitations. We are striving to make it more general\nand robust. Hopefully in a few future releases, the limitations become less.\n\nHere are the known issues:\n\n# 3D or higher dimensional cell/struct-arrays will be converted to 2D arrays;\n# When processing names containing multi-byte characters, Octave and MATLAB \\\ncan give different field-names; you can use feature('DefaultCharacterSet','latin1') \\\nin MATLAB to get consistant results\n# savejson can not handle class and dataset.\n# saveubjson converts a logical array into a uint8 ([U]) array\n# an unofficial N-D array count syntax is implemented in saveubjson. We are \\\nactively communicating with the UBJSON spec maintainer to investigate the \\\npossibility of making it upstream\n# loadubjson can not parse all UBJSON Specification (Draft 9) compliant \\\nfiles, however, it can parse all UBJSON files produced by saveubjson.\n\n-------------------------------------------------------------------------------\n\nV. Contribution and feedback\n\nJSONLab is an open-source project. This means you can not only use it and modify\nit as you wish, but also you can contribute your changes back to JSONLab so\nthat everyone else can enjoy the improvement. For anyone who want to contribute,\nplease download JSONLab source code from it's subversion repository by using the\nfollowing command:\n\n svn checkout svn://svn.code.sf.net/p/iso2mesh/code/trunk/jsonlab jsonlab\n\nYou can make changes to the files as needed. Once you are satisfied with your\nchanges, and ready to share it with others, please cd the root directory of \nJSONLab, and type\n\n svn diff > yourname_featurename.patch\n\nYou then email the .patch file to JSONLab's maintainer, Qianqian Fang, at\nthe email address shown in the beginning of this file. Qianqian will review \nthe changes and commit it to the subversion if they are satisfactory.\n\nWe appreciate any suggestions and feedbacks from you. Please use iso2mesh's\nmailing list to report any questions you may have with JSONLab:\n\nhttp://groups.google.com/group/iso2mesh-users?hl=en&pli=1\n\n(Subscription to the mailing list is needed in order to post messages).\n"} +{"text": "/**\n * Created by koukuko on 2014/10/14.\n */\nvar h;\nvar system = {tv:{}}; // 辣鸡 真辣鸡\n\nfunction initLeftMenu(){\n // 1. 检查侧边栏\n if ($('#h-menu').length > 0) {\n // 1.1 框架高宽自适应\n $(window).resize(function () {\n $('#h-menu').height($(window).height() - $('#h-bottom-nav').height());\n });\n $(window).resize();\n // 1.3 对激活状态的版块active\n if (typeof forum == 'object' && forum.name) {\n $('#h-menu-content a[href=\"/' + encodeURI(forum.name) + '\"]').parent().addClass('h-active');\n $('#h-menu-content .uk-parent').each(function () {\n $(this).find('.h-active').length > 0 ? $(this).find('.h-nav-parent-header').click() : '';\n })\n } else {\n $('.h-nav-parent-header').click();\n }\n }\n}\n\nfunction initPostForm(){\n // 2. 发帖框\n if ($('#h-post-form').length > 0) {\n //2.1 颜文字注册\n if ($('#h-emot-select')) {\n var emotList = [\"|∀゚\", \"(´゚Д゚`)\", \"(;´Д`)\", \"(`・ω・)\", \"(=゚ω゚)=\", \"| ω・´)\", \"|-` )\", \"|д` )\", \"|ー` )\", \"|∀` )\", \"(つд⊂)\", \"(゚Д゚≡゚Д゚)\", \"(^o^)ノ\", \"(|||゚Д゚)\", \"( ゚∀゚)\", \"( ´∀`)\", \"(*´∀`)\", \"(*゚∇゚)\", \"(*゚ー゚)\", \"( ゚ 3゚)\", \"( ´ー`)\", \"( ・_ゝ・)\", \"( ´_ゝ`)\", \"(*´д`)\", \"(・ー・)\", \"(・∀・)\", \"(ゝ∀・)\", \"(〃∀〃)\", \"(*゚∀゚*)\", \"( ゚∀。)\", \"( `д´)\", \"(`ε´ )\", \"(`ヮ´ )\", \"σ`∀´)\", \" ゚∀゚)σ\", \"゚ ∀゚)ノ\", \"(╬゚д゚)\", \"(|||゚д゚)\", \"( ゚д゚)\", \"Σ( ゚д゚)\", \"( ;゚д゚)\", \"( ;´д`)\", \"( д ) ゚ ゚\", \"( ☉д⊙)\", \"((( ゚д゚)))\", \"( ` ・´)\", \"( ´д`)\", \"( -д-)\", \"(>д<)\", \"・゚( ノд`゚)\", \"( TдT)\", \"( ̄∇ ̄)\", \"( ̄3 ̄)\", \"( ̄��� ̄)\", \"( ̄ .  ̄)\", \"( ̄皿 ̄)\", \"( ̄艸 ̄)\", \"( ̄︿ ̄)\", \"( ̄︶ ̄)\", \"ヾ(´ω゚`)\", \"(*´ω`*)\", \"(・ω・)\", \"( ´・ω)\", \"(`・ω)\", \"(´・ω・`)\", \"(`・ω・´)\", \"( `_っ´)\", \"( `ー´)\", \"( ´_っ`)\", \"( ´ρ`)\", \"( ゚ω゚)\", \"(o゚ω゚o)\", \"( ^ω^)\", \"(。◕∀◕。)\", \"/( ◕‿‿◕ )\\\\\", \"ヾ(´ε`ヾ)\", \"(ノ゚∀゚)ノ\", \"(σ゚д゚)σ\", \"(σ゚∀゚)σ\", \"|д゚ )\", \"┃電柱┃\", \"゚(つд`゚)\", \"゚Å゚ ) \", \"⊂彡☆))д`)\", \"⊂彡☆))д´)\", \"⊂彡☆))∀`)\", \"(´∀((☆ミつ\"];\n var html = '';\n for (var i in emotList) {\n html += '';\n }\n $('#h-emot-select')\n .on('change', function () {\n console.log(this.value);\n $('textarea[name=content]').val($('textarea[name=content]').val() + this.value).focus();\n })\n .html(html);\n }\n\n if(location.href.match(/r\\=(\\d+)/g)){\n var r = /r\\=(\\d+)/g.exec(location.href);\n if(r[1]){\n $('#h-post-form textarea').val('>>No.'+r[1]+\"\\r\\n\");\n }\n }\n }\n\n\n}\n\nfunction initImageBox(){\n // 3. 图片处理\n var rotateArray = [\n 'matrix(1, 0, 0, 1, 0, 0)',\n 'matrix(0, 1, -1, 0, 0, 0)',\n 'matrix(-1, 0, 0, -1, 0, 0)',\n 'matrix(0, -1, 1, 0, 0, 0)'\n ];\n\n if ($('.h-threads-img-box').length > 0) {\n $('.h-threads-img-box').each(function () {\n var self = this;\n var imgElement = $(self).find('.h-threads-img');\n var imgAElement = $(self).find('.h-threads-img-a');\n var imgBoxElement = $(self);\n\n imgAElement.on('click', function () {\n if (imgBoxElement.hasClass('h-active')) {\n imgElement\n .attr('src', imgElement.attr('data-src'))\n .css({\n transform:'',\n top: 0,\n left: 0\n })\n .data('rotate-index',0);\n imgBoxElement\n .removeClass('h-active');\n } else {\n imgBoxElement.addClass('h-active');\n imgElement\n .attr('src', imgAElement.attr('href'));\n\n window.setTimeout(function(){\n imgElement.resize();\n },100);\n }\n return false;\n });\n\n imgElement.on('resize', function () {\n\n var rotateIndex = $(this).data('rotate-index') || 0;\n\n var width = $(this).width();\n var height = $(this).height();\n\n if (rotateIndex == 1 || rotateIndex == 3) {\n var offset = (width - height) / 2;\n imgElement.css({\n top: offset + 'px',\n left: -offset + 'px'\n });\n imgAElement.height(width);\n\n } else {\n $(this).css({\n top: 0,\n left: 0\n });\n imgAElement.height(height);\n }\n\n });\n\n $(self).find('.h-threads-img-tool-small').on('click', function () {\n imgAElement.click();\n });\n\n $(self).find('.h-threads-img-tool-left').on('click', function () {\n var rotateIndex = imgElement.data('rotate-index') || 0;\n\n if (typeof rotateIndex == 'undefined' || !rotateArray.length) {\n return false;\n }\n\n var rotateIndexTarget = rotateIndex - 1;\n if (rotateIndexTarget < 0) rotateIndexTarget = rotateArray.length - 1;\n\n imgElement.data('rotate-index', rotateIndexTarget);\n imgElement.css('transform', rotateArray[rotateIndexTarget]).resize();\n });\n\n $(self).find('.h-threads-img-tool-right').on('click', function () {\n var rotateIndex = imgElement.data('rotate-index') || 0;\n\n if (typeof rotateIndex == 'undefined' || !rotateArray.length) {\n return false;\n }\n\n var rotateIndexTarget = rotateIndex + 1;\n if (rotateIndexTarget == rotateArray.length) rotateIndexTarget = 0;\n\n imgElement.data('rotate-index', rotateIndexTarget);\n imgElement.css('transform', rotateArray[rotateIndexTarget]).resize();\n });\n\n });\n\n }\n}\n\n\nfunction initContent(){\n // 4.绿色引用串显示\n $(\"font[color='#789922']\")\n .filter(function () {\n return /^((>>No\\.)|(>>)|(>))\\d+$/.test($(this).text());\n })\n .on('mouseenter', function (e) {\n var self = this;\n var tid = /\\d+/.exec($(this).text())[0];\n $.get('/homepage/ref?tid='+tid)\n .done(function(data){\n\n if(data.indexOf('')>=0){\n return false;\n }\n\n $(\"#h-ref-view\").off().html(data).css({\n top:$(self).offset().top,\n left:$(self).offset().left\n }).fadeIn(100).one('mouseleave',function(){\n $(this).fadeOut(100);\n })\n });\n });\n\n // 5.主站视频引用\n $('.h-threads-content').each(function(){\n var html = $(this).html();\n var contentIdRegExp = /ac(\\d{2,8})/g;\n var codeRegExp = /```\\(.*?)```/g;\n var hideenRegExp = /\\[h\\](.*?)\\[\\/h\\]/g;\n var isChanged = false;\n\n if(contentIdRegExp.test(html)){\n isChanged = true;\n html = html.replace(contentIdRegExp,'ac$1');\n }\n\n if(codeRegExp.test(html) && typeof forum == 'object' && ['技术宅'].indexOf(forum.name) >= 0){\n isChanged = true;\n html = html.replace(codeRegExp,'
$1
').replace(/\\(.*?)\\<\\/font\\>/g,\"$1\");\n }\n\n if(hideenRegExp.test(html) && typeof forum == 'object' && ['动画','漫画'].indexOf(forum.name) >= 0){\n isChanged = true;\n html = html.replace(hideenRegExp,'$1');\n }\n\n if(isChanged){\n $(this).html(html);\n }\n });\n\n $('a[data-acfun-contentid]').on({\n\n 'mouseenter': function(e){\n var self = this;\n $.getScript('http://api.acfun.tv/apiserver/content/info?cd=1&contentId='+$(this).attr('data-acfun-contentid'))\n .done(function(){\n\n if(system.tv.status != 200){\n return false;\n }\n\n var data = system.tv.data.fullContent;\n\n $('.h-acfun-preview-cover').attr('src',data.cover);\n $('.h-acfun-preview-title').text(data.title).attr('href','http://www.acfun.tv/v/ac'+data.contentId);\n $('.h-acfun-preview-desc').text(data.description);\n $('.h-acfun-preivew-user').text(data.user.username).attr('href','http://www.acfun.tv/u/'+data.user.userId+'.aspx');\n $('.h-acfun-preview-href').text('http://www.acfun.tv/v/ac'+data.contentId).attr('href','http://www.acfun.tv/v/ac'+data.contentId);\n\n $(\"#h-acfun-preview\").off().css({\n top:$(self).offset().top,\n left:$(self).offset().left\n }).fadeIn(100).one('mouseleave',function(){\n $(this).fadeOut(100);\n })\n });\n }\n });\n}\n\nfunction setCookie(cname, cvalue, exdays) {\n var d = new Date();\n d.setTime(d.getTime() + (exdays*24*60*60*1000));\n var expires = \"expires=\"+d.toUTCString();\n document.cookie = cname + \"=\" + cvalue + \"; \" + expires;\n}\n\nfunction getCookie(cname) {\n var name = cname + \"=\";\n var ca = document.cookie.split(';');\n for(var i=0; iPRON-PRON (1; 33% instances), PRON-SCONJ (1; 33% instances), VERB-VERB (1; 33% instances).\n\n\n~~~ conllu\n# visual-style 1\tbgColor:blue\n# visual-style 1\tfgColor:white\n# visual-style 3\tbgColor:blue\n# visual-style 3\tfgColor:white\n# visual-style 3 1 reparandum\tcolor:blue\n1\tI\tI\tPRON\tPERS-P1SG-NOM\tCase=Nom|Number=Sing|Person=1|PronType=Prs\t3\treparandum\t_\t_\n2\t–\t–\tPUNCT\tDash\t_\t1\tpunct\t_\t_\n3\tI\tI\tPRON\tPERS-P1SG-NOM\tCase=Nom|Number=Sing|Person=1|PronType=Prs\t4\tnsubj\t_\t_\n4\tmean\tmean\tVERB\tPRES\tMood=Ind|Tense=Pres|VerbForm=Fin\t0\troot\t_\tSpaceAfter=No\n5\t,\t,\tPUNCT\tComma\t_\t4\tpunct\t_\t_\n6\the\the\tPRON\tPERS-P3SG-NOM\tCase=Nom|Gender=Masc|Number=Sing|Person=3|PronType=Prs\t7\tnsubj\t_\t_\n7\tfaltered\tfalter\tVERB\tPAST\tMood=Ind|Tense=Past|VerbForm=Fin\t4\tparataxis\t_\t_\n8\tas\tas\tSCONJ\t_\t_\t10\tmark\t_\t_\n9\tsparks\tspark\tNOUN\tPL-NOM\tCase=Nom\t10\tnsubj\t_\t_\n10\tflew\tfly\tVERB\tPAST\tMood=Ind|Tense=Past|VerbForm=Fin\t7\tadvcl\t_\t_\n11\tfrom\tfrom\tADP\t_\t_\t15\tcase\t_\t_\n12\tMrs\tMrs\tNOUN\tSG-NOM\tNumber=Sing\t13\tnmod\t_\t_\n13\tWeasley\tweasley\tPROPN\tSG\tNumber=Sing\t15\tnmod:poss\t_\tSpaceAfter=No\n14\t's\t's\tPART\tGEN\t_\t13\tcase\t_\t_\n15\teyes\teye\tNOUN\tPL-NOM\tNumber=Plur\t10\tobl\t_\tSpaceAfter=No\n16\t,\t,\tPUNCT\tComma\t_\t7\tpunct\t_\t_\n17\tthat\tthat\tSCONJ\t_\t_\t19\treparandum\t_\t_\n18\t–\t–\tPUNCT\tDash\t_\t17\tpunct\t_\t_\n19\tthat\tthat\tPRON\tDEM-SG\tNumber=Sing|PronType=Dem\t22\tnsubj\t_\t_\n20\twas\tbe\tAUX\tPAST\tMood=Ind|Number=Sing|Person=1|Tense=Past|VerbForm=Fin\t22\tcop\t_\t_\n21\tvery\tvery\tADV\t_\t_\t22\tadvmod\t_\t_\n22\twrong\twrong\tADJ\tPOS\tDegree=Pos\t4\txcomp\t_\tSpaceAfter=No\n23\t,\t,\tPUNCT\tComma\t_\t24\tpunct\t_\t_\n24\tboys\tboy\tNOUN\tPL-NOM\tNumber=Plur\t22\tvocative\t_\t_\n25\t–\t–\tPUNCT\tDash\t_\t24\tpunct\t_\t_\n26\tvery\tvery\tADV\t_\t_\t27\tadvmod\t_\t_\n27\twrong\twrong\tADJ\tPOS\tDegree=Pos\t22\tappos\t_\t_\n28\tindeed\tindeed\tADV\t_\t_\t27\tadvmod\t_\t_\n\n~~~\n\n\n~~~ conllu\n# visual-style 17\tbgColor:blue\n# visual-style 17\tfgColor:white\n# visual-style 19\tbgColor:blue\n# visual-style 19\tfgColor:white\n# visual-style 19 17 reparandum\tcolor:blue\n1\tI\tI\tPRON\tPERS-P1SG-NOM\tCase=Nom|Number=Sing|Person=1|PronType=Prs\t3\treparandum\t_\t_\n2\t–\t–\tPUNCT\tDash\t_\t1\tpunct\t_\t_\n3\tI\tI\tPRON\tPERS-P1SG-NOM\tCase=Nom|Number=Sing|Person=1|PronType=Prs\t4\tnsubj\t_\t_\n4\tmean\tmean\tVERB\tPRES\tMood=Ind|Tense=Pres|VerbForm=Fin\t0\troot\t_\tSpaceAfter=No\n5\t,\t,\tPUNCT\tComma\t_\t4\tpunct\t_\t_\n6\the\the\tPRON\tPERS-P3SG-NOM\tCase=Nom|Gender=Masc|Number=Sing|Person=3|PronType=Prs\t7\tnsubj\t_\t_\n7\tfaltered\tfalter\tVERB\tPAST\tMood=Ind|Tense=Past|VerbForm=Fin\t4\tparataxis\t_\t_\n8\tas\tas\tSCONJ\t_\t_\t10\tmark\t_\t_\n9\tsparks\tspark\tNOUN\tPL-NOM\tCase=Nom\t10\tnsubj\t_\t_\n10\tflew\tfly\tVERB\tPAST\tMood=Ind|Tense=Past|VerbForm=Fin\t7\tadvcl\t_\t_\n11\tfrom\tfrom\tADP\t_\t_\t15\tcase\t_\t_\n12\tMrs\tMrs\tNOUN\tSG-NOM\tNumber=Sing\t13\tnmod\t_\t_\n13\tWeasley\tweasley\tPROPN\tSG\tNumber=Sing\t15\tnmod:poss\t_\tSpaceAfter=No\n14\t's\t's\tPART\tGEN\t_\t13\tcase\t_\t_\n15\teyes\teye\tNOUN\tPL-NOM\tNumber=Plur\t10\tobl\t_\tSpaceAfter=No\n16\t,\t,\tPUNCT\tComma\t_\t7\tpunct\t_\t_\n17\tthat\tthat\tSCONJ\t_\t_\t19\treparandum\t_\t_\n18\t–\t–\tPUNCT\tDash\t_\t17\tpunct\t_\t_\n19\tthat\tthat\tPRON\tDEM-SG\tNumber=Sing|PronType=Dem\t22\tnsubj\t_\t_\n20\twas\tbe\tAUX\tPAST\tMood=Ind|Number=Sing|Person=1|Tense=Past|VerbForm=Fin\t22\tcop\t_\t_\n21\tvery\tvery\tADV\t_\t_\t22\tadvmod\t_\t_\n22\twrong\twrong\tADJ\tPOS\tDegree=Pos\t4\txcomp\t_\tSpaceAfter=No\n23\t,\t,\tPUNCT\tComma\t_\t24\tpunct\t_\t_\n24\tboys\tboy\tNOUN\tPL-NOM\tNumber=Plur\t22\tvocative\t_\t_\n25\t–\t–\tPUNCT\tDash\t_\t24\tpunct\t_\t_\n26\tvery\tvery\tADV\t_\t_\t27\tadvmod\t_\t_\n27\twrong\twrong\tADJ\tPOS\tDegree=Pos\t22\tappos\t_\t_\n28\tindeed\tindeed\tADV\t_\t_\t27\tadvmod\t_\t_\n\n~~~\n\n\n~~~ conllu\n# visual-style 1\tbgColor:blue\n# visual-style 1\tfgColor:white\n# visual-style 47\tbgColor:blue\n# visual-style 47\tfgColor:white\n# visual-style 47 1 reparandum\tcolor:blue\n1\tMind\tmind\tVERB\tIMP\tMood=Imp|VerbForm=Fin\t47\treparandum\t_\tSpaceAfter=No\n2\t,\t,\tPUNCT\t_\t_\t4\tpunct\t_\t_\n3\the\the\tPRON\tPERS-P3SG-NOM\tCase=Nom|Gender=Masc|Number=Sing|Person=3|PronType=Prs\t4\tnsubj\t_\t_\n4\tbegan\tbegin\tVERB\tPAST\tMood=Ind|Tense=Past|VerbForm=Fin\t47\tparataxis\t_\t_\n5\tagain\tagain\tADV\t_\t_\t4\tadvmod\t_\tSpaceAfter=No\n6\t,\t,\tPUNCT\t_\t_\t4\tpunct\t_\t_\n7\tlifting\tlift\tVERB\tING\tTense=Pres|VerbForm=Part\t4\tadvcl\t_\t_\n8\tone\tone\tNUM\tCARD-SG\tNumType=Card\t9\tnummod\t_\t_\n9\tarm\tarm\tNOUN\tSG-NOM\tNumber=Sing\t7\tobj\t_\t_\n10\tfrom\tfrom\tADP\t_\t_\t12\tcase\t_\t_\n11\tthe\tthe\tDET\tDEF\tDefinite=Def|PronType=Art\t12\tdet\t_\t_\n12\telbow\telbow\tNOUN\tSG-NOM\tNumber=Sing\t7\tobl\t_\tSpaceAfter=No\n13\t,\t,\tPUNCT\t_\t_\t7\tpunct\t_\t_\n14\tthe\tthe\tDET\tDEF\tDefinite=Def|PronType=Art\t15\tdet\t_\t_\n15\tpalm\tpalm\tNOUN\tSG-NOM\tNumber=Sing\t19\tnsubj\t_\t_\n16\tof\tof\tADP\t_\t_\t18\tcase\t_\t_\n17\tthe\tthe\tDET\tDEF\tDefinite=Def|PronType=Art\t19\tdet\t_\t_\n18\thand\thand\tNOUN\tSG-NOM\tNumber=Sing\t15\tnmod\t_\t_\n19\toutwards\toutwards\tADV\t_\t_\t7\tadvcl\t_\tSpaceAfter=No\n20\t,\t,\tPUNCT\t_\t_\t19\tpunct\t_\t_\n21\tso\tso\tSCONJ\t_\t_\t32\tmark\t_\t_\n22\tthat\tthat\tSCONJ\t_\t_\t21\tfixed\t_\tSpaceAfter=No\n23\t,\t,\tPUNCT\t_\t_\t27\tpunct\t_\t_\n24\twith\twith\tSCONJ\t_\t_\t27\tmark\t_\t_\n25\this\the\tPRON\tP3SG-GEN\tGender=Masc|Number=Sing|Person=3|Poss=Yes|PronType=Prs\t26\tnmod:poss\t_\t_\n26\tlegs\tleg\tNOUN\tPL-NOM\tNumber=Plur\t27\tnsubj\t_\t_\n27\tfolded\tfold\tVERB\tPASS\tTense=Past|VerbForm=Part|Voice=Pass\t32\tadvcl\t_\t_\n28\tbefore\tbefore\tADP\t_\t_\t29\tcase\t_\t_\n29\thim\the\tPRON\tPERS-P3SG-ACC\tCase=Acc|Gender=Masc|Number=Sing|Person=3|PronType=Prs\t27\tobl\t_\tSpaceAfter=No\n30\t,\t,\tPUNCT\t_\t_\t27\tpunct\t_\t_\n31\the\the\tPRON\tPERS-P3SG-NOM\tCase=Nom|Gender=Masc|Number=Sing|Person=3|PronType=Prs\t32\tnsubj\t_\t_\n32\thad\thave\tVERB\tPAST\tMood=Ind|Tense=Past|VerbForm=Fin\t7\tadvcl\t_\t_\n33\tthe\tthe\tDET\tDEF\tDefinite=Def|PronType=Art\t34\tdet\t_\t_\n34\tpose\tpose\tNOUN\tSG-NOM\tCase=Nom\t32\tobj\t_\t_\n35\tof\tof\tADP\t_\t_\t37\tcase\t_\t_\n36\ta\ta\tDET\tIND-SG\tDefinite=Ind|PronType=Art\t38\tdet\t_\t_\n37\tBuddha\tBuddha\tPROPN\tSG-NOM\tNumber=Sing\t34\tnmod\t_\t_\n38\tpreaching\tpreach\tVERB\tING\tTense=Pres|VerbForm=Part\t37\tacl\t_\t_\n39\tin\tin\tADP\t_\t_\t41\tcase\t_\t_\n40\tEuropean\teuropean\tADJ\tPOS\tDegree=Pos\t41\tamod\t_\t_\n41\tclothes\tclothes\tNOUN\tPL-NOM\tNumber=Plur\t38\tobl\t_\t_\n42\tand\tand\tCCONJ\t_\t_\t45\tcc\t_\t_\n43\twithout\twithout\tADP\t_\t_\t45\tcase\t_\t_\n44\ta\ta\tDET\tIND-SG\tDefinite=Ind|PronType=Art\t45\tdet\t_\t_\n45\tlotus-flower\tlotus-flower\tNOUN\tSG-NOM\tNumber=Sing\t41\tconj\t_\t_\n46\t–\t–\tPUNCT\t_\t_\t7\tpunct\t_\t_\n47\tMind\tmind\tVERB\tIMP\tMood=Imp|VerbForm=Fin\t53\tdiscourse\t_\tSpaceAfter=No\n48\t,\t,\tPUNCT\t_\t_\t47\tpunct\t_\t_\n49\tnone\tnone\tPRON\tNEG-SG-NOM\tCase=Nom\t53\tnsubj\t_\t_\n50\tof\tof\tADP\t_\t_\t51\tcase\t_\t_\n51\tus\twe\tPRON\tPERS-P1PL-ACC\tCase=Acc|Number=Plur|Person=1|PronType=Prs\t49\tnmod\t_\t_\n52\twould\twould\tAUX\tPAST-AUX\tVerbForm=Fin\t53\taux\t_\t_\n53\tfeel\tfeel\tVERB\tINF\tVerbForm=Inf\t0\troot\t_\t_\n54\texactly\texactly\tADV\t_\t_\t56\tadvmod\t_\t_\n55\tlike\tlike\tADP\t_\t_\t56\tcase\t_\t_\n56\tthis\tthis\tPRON\tDEM-SG\tNumber=Sing|PronType=Dem\t53\tobl\t_\tSpaceAfter=No\n57\t.\t.\tPUNCT\tPeriod\t_\t53\tpunct\t_\t_\n\n~~~\n\n\n"} +{"text": "\n\n\n\n\tCFBundleDevelopmentRegion\n\ten\n\tCFBundleExecutable\n\t$(EXECUTABLE_NAME)\n\tCFBundleIdentifier\n\t$(PRODUCT_BUNDLE_IDENTIFIER)\n\tCFBundleInfoDictionaryVersion\n\t6.0\n\tCFBundleName\n\t$(PRODUCT_NAME)\n\tCFBundlePackageType\n\tAPPL\n\tCFBundleShortVersionString\n\t1.0\n\tCFBundleSignature\n\t????\n\tCFBundleVersion\n\t1\n\tLSRequiresIPhoneOS\n\t\n\tUILaunchStoryboardName\n\tLaunchScreen\n\tUIMainStoryboardFile\n\tMain\n\tUIRequiredDeviceCapabilities\n\t\n\t\tarmv7\n\t\n\tUISupportedInterfaceOrientations\n\t\n\t\tUIInterfaceOrientationPortrait\n\t\tUIInterfaceOrientationLandscapeLeft\n\t\tUIInterfaceOrientationLandscapeRight\n\t\n\tUISupportedInterfaceOrientations~ipad\n\t\n\t\tUIInterfaceOrientationPortrait\n\t\tUIInterfaceOrientationPortraitUpsideDown\n\t\tUIInterfaceOrientationLandscapeLeft\n\t\tUIInterfaceOrientationLandscapeRight\n\t\n\n\n"} +{"text": "\n\n\n \n \n \n \n\n \n \n \n \n\n\n"} +{"text": "\n\n\n"} +{"text": "/*\n * Device Tree Include file for Traverse LS1043S board.\n *\n * Copyright 2014-2015, Freescale Semiconductor\n * Copyright 2017-2018, Traverse Technologies\n *\n * This file is dual-licensed: you can use it either under the terms\n * of the GPLv2 or the X11 license, at your option. Note that this dual\n * licensing only applies to this file, and not this project as a\n * whole.\n *\n * a) This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License as\n * published by the Free Software Foundation; either version 2 of the\n * License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * Or, alternatively,\n *\n * b) Permission is hereby granted, free of charge, to any person\n * obtaining a copy of this software and associated documentation\n * files (the \"Software\"), to deal in the Software without\n * restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following\n * conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n */\n\n/dts-v1/;\n#include \"fsl-ls1043a.dtsi\"\n#include \n#include \n\n/ {\n\tmodel = \"Traverse LS1043S\";\n\tcompatible = \"traverse,ls1043s\";\n\n\taliases {\n\t\tcrypto = &crypto;\n\t\tethernet0 = &EMAC0;\n\t\tethernet1 = &EMAC1;\n\t\tethernet2 = &EMAC2;\n\t\tethernet3 = &EMAC3;\n\t\tethernet4 = &EMAC4;\n\t\tethernet5 = &EMAC5;\n\t};\n\n\tleds {\n\t\tcompatible = \"gpio-leds\";\n\t\tgpio0 {\n\t\t\tlabel = \"ls1043s:green:user0\";\n\t\t\tgpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;\n\t\t};\n\t\tgpio1 {\n\t\t\tlabel = \"ls1043s:green:user1\";\n\t\t\tgpios = <&gpio1 24 GPIO_ACTIVE_HIGH>;\n\t\t};\n\t\t/* LED D17 */\n\t\tgpio2 {\n\t\t\tlabel = \"ls1043s:green:wan\";\n\t\t\tgpios = <&gpio1 26 GPIO_ACTIVE_LOW>;\n\t\t};\n\t\tgpio3 {\n\t\t\tlabel = \"ls1043s:yellow:wan\";\n\t\t\tgpios = <&gpio1 27 GPIO_ACTIVE_LOW>;\n\t\t};\n\t\t/* LED D18 */\n\t\tgpio4 {\n\t\t\tlabel = \"ls1043s:green:mgmt\";\n\t\t\tgpios = <&gpio1 28 GPIO_ACTIVE_LOW>;\n\t\t};\n\t\tgpio5 {\n\t\t\tlabel = \"ls1043s:yellow:mgmt\";\n\t\t\tgpios = <&gpio1 29 GPIO_ACTIVE_LOW>;\n\t\t};\n\t\t/* LED D6 */\n\t\tgpio6 {\n\t\t\tlabel = \"ls1043s:green:user2\";\n\t\t\tgpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;\n\t\t};\n\n\t\t/* SFP+ LEDs - these are for chassis\n\t\t * with lightpipes only\n\t\t */\n\t\tteng_act {\n\t\t\tlabel = \"ls1043s:yellow:10gact\";\n\t\t\tgpios = <&gpio4 0 GPIO_ACTIVE_LOW>;\n\t\t};\n\n\t\tteng_link {\n\t\t\tlabel = \"ls1043s:green:10glink\";\n\t\t\tgpios = <&gpio4 1 GPIO_ACTIVE_LOW>;\n\t\t};\n\t};\n\n\tkeys {\n\t\tcompatible = \"gpio-keys-polled\";\n\t\t#address-cells = <1>;\n\t\t#size-cells = <0>;\n\t\tpoll-interval = <1000>;\n\t\t/* This button may not be loaded on all boards */\n\t\tbutton@0 {\n\t\t\tlabel = \"Front button\";\n\t\t\tlinux,code = ;\n\t\t\tgpios = <&gpio1 25 GPIO_ACTIVE_LOW>;\n\t\t};\n\t\t/* This is wired to header S3 */\n\t\tbutton@1 {\n\t\t\tlabel = \"Rear button\";\n\t\t\tlinux,code = ;\n\t\t\tgpios = <&gpio1 30 GPIO_ACTIVE_LOW>;\n\t\t};\n\t};\n};\n\n&esdhc {\n\tmmc-hs200-1_8v;\n\tsd-uhs-sdr104;\n\tsd-uhs-sdr50;\n\tsd-uhs-sdr25;\n\tsd-uhs-sdr12;\n};\n\n&i2c0 {\n\tstatus = \"okay\";\n\trtc@6f {\n\t\tcompatible = \"intersil,isl1208\";\n\t\treg = <0x6f>;\n\t};\n\n\tsfp_pca9534: pca9534@24 {\n\t\tcompatible = \"ti,tca9534\", \"nxp,pca9534\";\n\t\tgpio-controller;\n\t\t#gpio-cells = <2>;\n\t\treg = <0x24>;\n\t\tgpio-base = <100>;\n\t};\n\n\tcontroller@50 {\n\t\tcompatible = \"traverse,controller\";\n\t\treg = <0x50>;\n\t};\n\n\tds125df111@18 {\n\t\tcompatible = \"ti,ds125df111\";\n\t\treg = <0x18>;\n\t};\n\n\temc1704@4c {\n\t\tcompatible = \"microchip,emc1704\";\n\t\treg = <0x4c>;\n\t};\n\n\tpac1934@16 {\n\t\tcompatible = \"microchip,pac1934\";\n\t\treg = <0x16>;\n\t\t/* Monitoring 3.3V, 5V, Vin/12V (voltage only), Vbat/RTC (voltage only) */\n\t\tshunt-resistors = <4000 12000 0 0>;\n\t};\n\n\tpmic@8 {\n\t\tcompatible = \"freescale,mc34vr500\";\n\t\treg = <0x08>;\n\t};\n};\n\n/* I2C Bus for SFP EEPROM and control\n * These are multiplexed so\n * they don't collide when loaded\n */\n&i2c3 {\n\tstatus = \"okay\";\n\ti2c-switch@70 {\n\t\tcompatible = \"nxp,pca9540\";\n\t\t#address-cells = <1>;\n\t\t#size-cells = <0>;\n\t\treg = <0x70>;\n\n\t\tgigsfp_i2c: i2c@0 {\n\t\t\t#address-cells = <1>;\n\t\t\t#size-cells = <0>;\n\t\t\treg = <0>;\n\t\t};\n\t\ttensfp_i2c: i2c@1 {\n\t\t\t#address-cells = <1>;\n\t\t\t#size-cells = <0>;\n\t\t\treg = <1>;\n\t\t};\n\t};\n};\n\n&ifc {\n\tstatus = \"okay\";\n\t#address-cells = <2>;\n\t#size-cells = <1>;\n\t/* Only NAND flash is used on this board */\n\tranges = <0x0 0x0 0x0 0x7e800000 0x00010000>;\n\n\tnand@1,0 {\n\t\tcompatible = \"fsl,ifc-nand\";\n\t\t#address-cells = <1>;\n\t\t#size-cells = <1>;\n\t\treg = <0x0 0x0 0x10000>;\n\t};\n};\n\n&duart0 {\n\tstatus = \"okay\";\n};\n\n&duart1 {\n\tstatus = \"okay\";\n};\n\n#include \"fsl-ls1043-post.dtsi\"\n\n&fman0 {\n\tEMAC0: ethernet@e0000 {\n\t\tphy-handle = <&qsgmii_phy1>;\n\t\tphy-connection-type = \"qsgmii\";\n\t\tlocal-mac-address = [0A 00 00 00 00 01];\n\t};\n\n\tEMAC1: ethernet@e2000 {\n\t\tphy-handle = <&qsgmii_phy2>;\n\t\tphy-connection-type = \"qsgmii\";\n\t\tlocal-mac-address = [0A 00 00 00 00 02];\n\t};\n\n\tEMAC2: ethernet@e8000 {\n\t\tphy-handle = <&qsgmii_phy3>;\n\t\tphy-connection-type = \"qsgmii\";\n\t\tlocal-mac-address = [0A 00 00 00 00 03];\n\t};\n\n\tEMAC3: ethernet@ea000 {\n\t\tphy-handle = <&qsgmii_phy4>;\n\t\tphy-connection-type = \"qsgmii\";\n\t\tlocal-mac-address = [0A 00 00 00 00 04];\n\t};\n\n\t/* SFP via AR8031\n\t * We treat this as a fixed-link as the\n\t * AR8031 is hard-configured into\n\t * 1000BASE-X mode\n\t * Should MII control be desired, remove\n\t * fixed-link and add\n\t * phy-handle = <&rgmii_phy1>;\n\t */\n\tEMAC4: ethernet@e4000 {\n\t\tphy-connection-type = \"rgmii\";\n\t\tlocal-mac-address = [0A 00 00 00 00 05];\n\t\tfixed-link {\n\t\t\tspeed = <1000>;\n\t\t\tfull-duplex;\n\t\t};\n\t};\n\n\t/* Connection to Expansion (M.2) slot\n\t * Future WAN (i.e xDSL) plugin\n\t */\n\tEMAC5: ethernet@e6000 {\n\t\tphy-connection-type = \"rgmii-id\";\n\t\tlocal-mac-address = [00 00 00 00 00 06];\n\t\tfixed-link {\n\t\t\tspeed = <1000>;\n\t\t\tfull-duplex;\n\t\t};\n\t};\n\n\t/* 10G SFP+ interface\n\t * This can also run at 1.25 and 2.5G with\n\t * the appropriate SerDes protocol setting in RCW\n\t */\n\tTENSFP: ethernet@f0000 {\n\t\tstatus = \"okay\";\n\t\tphy-connection-type = \"xgmii\";\n\t\tfixed-link {\n\t\t\tspeed = <10000>;\n\t\t\tfull-duplex;\n\t\t};\n\t};\n\n\tmdio@fc000 {\n\t\trgmii_phy1: ethernet-phy@2 {\n\t\t\treg = <0x2>;\n\t\t};\n\t\tqsgmii_phy1: ethernet-phy@4 {\n\t\t\treg = <0x4>;\n\t\t};\n\t\tqsgmii_phy2: ethernet-phy@5 {\n\t\t\treg = <0x5>;\n\t\t};\n\t\tqsgmii_phy3: ethernet-phy@6 {\n\t\t\treg = <0x6>;\n\t\t};\n\t\tqsgmii_phy4: ethernet-phy@7 {\n\t\t\treg = <0x7>;\n\t\t};\n\t};\n};\n\n/* No QUICC engine functions on this board -\n * pins are used for other functions (GPIO, I2C etc.)\n */\n&uqe {\n\tstatus = \"disabled\";\n};\n\n/* LS1043S does not use the QorIQ AHCI\n * controller.\n */\n&sata {\n\tstatus = \"disabled\";\n};\n"} +{"text": "//\n// main.m\n// 工厂模式\n//\n// Created by yunna on 2018/12/26.\n// Copyright © 2018年 yunna. All rights reserved.\n//\n\n#import \n#import \"HWPhone.h\"\nint main(int argc, const char * argv[]) {\n @autoreleasepool {\n HWPhone *phone = [HWPhone new];\n [phone sellPhone];\n \n }\n return 0;\n}\n"} +{"text": "///////////////////////////////////////////////////////////////////////////////////\r\n/// OpenGL Mathematics (glm.g-truc.net)\r\n///\r\n/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)\r\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n/// of this software and associated documentation files (the \"Software\"), to deal\r\n/// in the Software without restriction, including without limitation the rights\r\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n/// copies of the Software, and to permit persons to whom the Software is\r\n/// furnished to do so, subject to the following conditions:\r\n/// \r\n/// The above copyright notice and this permission notice shall be included in\r\n/// all copies or substantial portions of the Software.\r\n/// \r\n/// Restrictions:\r\n///\t\tBy making use of the Software for military purposes, you choose to make\r\n///\t\ta Bunny unhappy.\r\n/// \r\n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r\n/// THE SOFTWARE.\r\n///\r\n/// @ref gtx_transform2\r\n/// @file glm/gtx/transform2.inl\r\n/// @date 2005-12-21 / 2011-06-07\r\n/// @author Christophe Riccio\r\n///////////////////////////////////////////////////////////////////////////////////\r\n\r\nnamespace glm\r\n{\r\n\ttemplate \r\n\tGLM_FUNC_QUALIFIER tmat3x3 shearX2D(\r\n\t\tconst tmat3x3& m, \r\n\t\tT s)\r\n\t{\r\n\t\ttmat3x3 r(1);\r\n\t\tr[0][1] = s;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate \r\n\tGLM_FUNC_QUALIFIER tmat3x3 shearY2D(\r\n\t\tconst tmat3x3& m, \r\n\t\tT s)\r\n\t{\r\n\t\ttmat3x3 r(1);\r\n\t\tr[1][0] = s;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate \r\n\tGLM_FUNC_QUALIFIER tmat4x4 shearX3D(\r\n\t\tconst tmat4x4& m, \r\n\t\tT s, \r\n\t\tT t)\r\n\t{\r\n\t\ttmat4x4 r(1);\r\n\t\tr[1][0] = s;\r\n\t\tr[2][0] = t;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate \r\n\tGLM_FUNC_QUALIFIER tmat4x4 shearY3D(\r\n\t\tconst tmat4x4& m, \r\n\t\tT s, \r\n\t\tT t)\r\n\t{\r\n\t\ttmat4x4 r(1);\r\n\t\tr[0][1] = s;\r\n\t\tr[2][1] = t;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate \r\n\tGLM_FUNC_QUALIFIER tmat4x4 shearZ3D(\r\n\t\tconst tmat4x4& m, \r\n\t\tT s, \r\n\t\tT t)\r\n\t{\r\n\t\ttmat4x4 r(1);\r\n\t\tr[0][2] = s;\r\n\t\tr[1][2] = t;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate \r\n\tGLM_FUNC_QUALIFIER tmat3x3 reflect2D(\r\n\t\tconst tmat3x3& m, \r\n\t\tconst tvec3& normal)\r\n\t{\r\n\t\ttmat3x3 r(1);\r\n\t\tr[0][0] = 1 - 2 * normal.x * normal.x;\r\n\t\tr[0][1] = -2 * normal.x * normal.y;\r\n\t\tr[1][0] = -2 * normal.x * normal.y;\r\n\t\tr[1][1] = 1 - 2 * normal.y * normal.y;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate \r\n\tGLM_FUNC_QUALIFIER tmat4x4 reflect3D(\r\n\t\tconst tmat4x4& m, \r\n\t\tconst tvec3& normal)\r\n\t{\r\n\t\ttmat4x4 r(1);\r\n\t\tr[0][0] = 1 - 2 * normal.x * normal.x;\r\n\t\tr[0][1] = -2 * normal.x * normal.y;\r\n\t\tr[0][2] = -2 * normal.x * normal.z;\r\n\r\n\t\tr[1][0] = -2 * normal.x * normal.y;\r\n\t\tr[1][1] = 1 - 2 * normal.y * normal.y;\r\n\t\tr[1][2] = -2 * normal.y * normal.z;\r\n\r\n\t\tr[2][0] = -2 * normal.x * normal.z;\r\n\t\tr[2][1] = -2 * normal.y * normal.z;\r\n\t\tr[2][2] = 1 - 2 * normal.z * normal.z;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate \r\n\tGLM_FUNC_QUALIFIER tmat3x3 proj2D(\r\n\t\tconst tmat3x3& m, \r\n\t\tconst tvec3& normal)\r\n\t{\r\n\t\ttmat3x3 r(1);\r\n\t\tr[0][0] = 1 - normal.x * normal.x;\r\n\t\tr[0][1] = - normal.x * normal.y;\r\n\t\tr[1][0] = - normal.x * normal.y;\r\n\t\tr[1][1] = 1 - normal.y * normal.y;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate \r\n\tGLM_FUNC_QUALIFIER tmat4x4 proj3D(\r\n\t\tconst tmat4x4& m, \r\n\t\tconst tvec3& normal)\r\n\t{\r\n\t\ttmat4x4 r(1);\r\n\t\tr[0][0] = 1 - normal.x * normal.x;\r\n\t\tr[0][1] = - normal.x * normal.y;\r\n\t\tr[0][2] = - normal.x * normal.z;\r\n\t\tr[1][0] = - normal.x * normal.y;\r\n\t\tr[1][1] = 1 - normal.y * normal.y;\r\n\t\tr[1][2] = - normal.y * normal.z;\r\n\t\tr[2][0] = - normal.x * normal.z;\r\n\t\tr[2][1] = - normal.y * normal.z;\r\n\t\tr[2][2] = 1 - normal.z * normal.z;\r\n\t\treturn m * r;\r\n\t}\r\n\r\n\ttemplate \r\n\tGLM_FUNC_QUALIFIER tmat4x4 scaleBias(\r\n\t\tT scale, \r\n\t\tT bias)\r\n\t{\r\n\t\ttmat4x4 result;\r\n\t\tresult[3] = tvec4(tvec3(bias), T(1));\r\n\t\tresult[0][0] = scale;\r\n\t\tresult[1][1] = scale;\r\n\t\tresult[2][2] = scale;\r\n\t\treturn result;\r\n\t}\r\n\r\n\ttemplate \r\n\tGLM_FUNC_QUALIFIER tmat4x4 scaleBias(\r\n\t\tconst tmat4x4& m, \r\n\t\tT scale, \r\n\t\tT bias)\r\n\t{\r\n\t\treturn m * scaleBias(scale, bias);\r\n\t}\r\n}//namespace glm\r\n\r\n"} +{"text": "/*\n Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n For licensing, see LICENSE.md or http://ckeditor.com/license\n*/\nCKEDITOR.plugins.setLang(\"devtools\",\"no\",{title:\"Elementinformasjon\",dialogName:\"Navn på dialogvindu\",tabName:\"Navn på fane\",elementId:\"Element-ID\",elementType:\"Elementtype\"});"} +{"text": "Subject: accounting arrangement at meter 692 - june 2000\r\nstella :\r\nplease put the hplc 012 - 41500 - 02 - 013 transport contract in pops at meter\r\n980692 for june 2000 with the track id 150642 and change the swing rankings\r\nso that all of the gas that flows is allocated to the 213 contract with the\r\nabove referenced track id . if you would do this first thing july 13 th and\r\nlet me know when it is completed i would appreciate it\r\nthanks ,\r\nfred"} +{"text": "\"Space\" = \"Medzera\";\n\"Use old shortcut\" = \"Použiť pôvodnú skratku\";\n\"Type shortcut\" = \"Napísať skratku\";\n\"Click to record shortcut\" = \"Kliknite pre nahratie skratky\";\n\"Pad %@\" = \"Pad %@\";\n\"The key combination %@ can't be used!\" = \"Kombináciu kláves \\\"%@\\\" nie je možné použiť!\";\n\"The key combination \\\"%@\\\" can't be used because %@.\" = \"Kombináciu kláves \\\"%@\\\" nie je možné použiť z dôvodu: %@.\";\n\"The key combination \\\"%@\\\" can't be used because it's already used by a system-wide keyboard shortcut. (If you really want to use this key combination, most shortcuts can be changed in the Keyboard & Mouse panel in System Preferences.)\" = \"Kombináciu kláves \\\"%@\\\" nie je možné použiť pretože sa používa ako systémová skratka. (Ak chcete použiť túto kombináciu kláves, je možné väčšinu klávesových skratiek zmeniť v Systémových nastaveniach v panely Klávesnica)\";\n\"The key combination \\\"%@\\\" can't be used because it's already used by the menu item \\\"%@\\\".\" = \"Kombináciu kláves \\\"%@\\\" nie je možné použiť pretože je používaná pre položku menu \\\"%@\\\".\";\n\"Command + \" = \"Command + \";\n\"Option + \" = \"Option + \";\n\"Shift + \" = \"Shift + \";\n\"Control + \" = \"Control + \";"} +{"text": "/*\n * Copyright (C) 2011 Apple Inc. All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS\n * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\n * THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#include \"config.h\"\n#include \"WebIconDatabase.h\"\n\n#include \"Logging.h\"\n#include \"WebIconDatabaseMessages.h\"\n#include \"WebIconDatabaseProxyMessages.h\"\n#include \"WebProcessPool.h\"\n#include \n#include \n#include \n#include \n\nusing namespace WebCore;\n\nnamespace WebKit {\n\nPassRefPtr WebIconDatabase::create(WebProcessPool* processPool)\n{\n return adoptRef(new WebIconDatabase(*processPool));\n}\n\nWebIconDatabase::~WebIconDatabase()\n{\n}\n\nWebIconDatabase::WebIconDatabase(WebProcessPool& processPool)\n : m_processPool(&processPool)\n , m_urlImportCompleted(false)\n , m_databaseCleanupDisabled(false)\n , m_shouldDerefWhenAppropriate(false)\n{\n m_processPool->addMessageReceiver(Messages::WebIconDatabase::messageReceiverName(), *this);\n}\n\nvoid WebIconDatabase::invalidate()\n{\n setGlobalIconDatabase(nullptr);\n}\n\nvoid WebIconDatabase::setDatabasePath(const String& path)\n{\n if (isOpen()) {\n LOG_ERROR(\"Icon database already has a path and is already open. We don't currently support changing its path and reopening.\");\n return;\n }\n\n m_iconDatabaseImpl = std::make_unique();\n m_iconDatabaseImpl->setClient(this);\n IconDatabase::delayDatabaseCleanup();\n m_databaseCleanupDisabled = true;\n m_iconDatabaseImpl->setEnabled(true);\n\n // FIXME: WebIconDatabases are per-ProcessPool but ProcessPools's don't have their own notion of the current private browsing setting.\n // As we clean up private browsing throughout the stack we need to clean it up here.\n m_iconDatabaseImpl->setPrivateBrowsingEnabled(WebPreferences::anyPagesAreUsingPrivateBrowsing());\n\n if (!m_iconDatabaseImpl->open(directoryName(path), pathGetFileName(path))) {\n LOG_ERROR(\"Unable to open WebKit2 icon database on disk\");\n m_iconDatabaseImpl = nullptr;\n setGlobalIconDatabase(nullptr);\n IconDatabase::allowDatabaseCleanup();\n m_databaseCleanupDisabled = false;\n }\n setGlobalIconDatabase(m_iconDatabaseImpl.get());\n}\n\nvoid WebIconDatabase::enableDatabaseCleanup()\n{\n if (!m_iconDatabaseImpl) {\n LOG_ERROR(\"Cannot enabled Icon Database cleanup - it hasn't been opened yet.\");\n return;\n }\n\n if (!m_databaseCleanupDisabled) {\n LOG_ERROR(\"Attempt to enable database cleanup, but it's already enabled.\");\n ASSERT_NOT_REACHED();\n return;\n }\n\n IconDatabase::allowDatabaseCleanup();\n m_databaseCleanupDisabled = false;\n}\n\nvoid WebIconDatabase::retainIconForPageURL(const String& pageURL)\n{\n if (m_iconDatabaseImpl)\n m_iconDatabaseImpl->retainIconForPageURL(pageURL);\n}\n\nvoid WebIconDatabase::releaseIconForPageURL(const String& pageURL)\n{\n if (m_iconDatabaseImpl)\n m_iconDatabaseImpl->releaseIconForPageURL(pageURL);\n}\n\nvoid WebIconDatabase::setIconURLForPageURL(const String& iconURL, const String& pageURL)\n{\n LOG(IconDatabase, \"WK2 UIProcess setting icon URL %s for page URL %s\", iconURL.ascii().data(), pageURL.ascii().data());\n if (m_iconDatabaseImpl)\n m_iconDatabaseImpl->setIconURLForPageURL(iconURL, pageURL);\n}\n\nvoid WebIconDatabase::setIconDataForIconURL(const IPC::DataReference& iconData, const String& iconURL)\n{\n LOG(IconDatabase, \"WK2 UIProcess setting icon data (%i bytes) for page URL %s\", (int)iconData.size(), iconURL.ascii().data());\n if (!m_iconDatabaseImpl)\n return;\n m_iconDatabaseImpl->setIconDataForIconURL(SharedBuffer::create(iconData.data(), iconData.size()), iconURL);\n}\n\nvoid WebIconDatabase::synchronousIconDataForPageURL(const String&, IPC::DataReference& iconData)\n{\n iconData = IPC::DataReference();\n}\n\nvoid WebIconDatabase::synchronousIconURLForPageURL(const String& pageURL, String& iconURL)\n{\n if (!m_iconDatabaseImpl) {\n iconURL = String();\n return;\n }\n iconURL = m_iconDatabaseImpl->synchronousIconURLForPageURL(pageURL);\n}\n\nvoid WebIconDatabase::synchronousIconDataKnownForIconURL(const String&, bool& iconDataKnown) const\n{\n iconDataKnown = false;\n}\n\nvoid WebIconDatabase::synchronousLoadDecisionForIconURL(const String&, int& loadDecision) const\n{\n loadDecision = static_cast(IconLoadNo);\n}\n\nvoid WebIconDatabase::getLoadDecisionForIconURL(const String& iconURL, uint64_t callbackID)\n{\n LOG(IconDatabase, \"WK2 UIProcess getting load decision for icon URL %s with callback ID %lli\", iconURL.ascii().data(), static_cast(callbackID));\n\n if (!m_processPool)\n return;\n\n if (!m_iconDatabaseImpl || !m_iconDatabaseImpl->isOpen() || iconURL.isEmpty()) {\n // FIXME (Multi-WebProcess): We need to know which connection to send this message to.\n m_processPool->sendToAllProcesses(Messages::WebIconDatabaseProxy::ReceivedIconLoadDecision(static_cast(IconLoadNo), callbackID));\n return;\n }\n \n // If the decision hasn't been read from disk yet, set this url and callback ID aside to be notifed later\n IconLoadDecision decision = m_iconDatabaseImpl->synchronousLoadDecisionForIconURL(iconURL, 0);\n if (decision == IconLoadUnknown) {\n // We should never get an unknown load decision after the URL import has completed.\n ASSERT(!m_urlImportCompleted);\n \n m_pendingLoadDecisionURLMap.set(callbackID, iconURL);\n return;\n }\n\n // FIXME (Multi-WebProcess): We need to know which connection to send this message to.\n m_processPool->sendToAllProcesses(Messages::WebIconDatabaseProxy::ReceivedIconLoadDecision((int)decision, callbackID));\n}\n\nvoid WebIconDatabase::didReceiveIconForPageURL(const String& pageURL)\n{\n notifyIconDataReadyForPageURL(pageURL);\n}\n\nImage* WebIconDatabase::imageForPageURL(const String& pageURL, const IntSize& iconSize)\n{\n if (!m_processPool || !m_iconDatabaseImpl || !m_iconDatabaseImpl->isOpen() || pageURL.isEmpty())\n return nullptr;\n\n // The WebCore IconDatabase ignores the passed in size parameter.\n // If that changes we'll need to rethink how this API is exposed.\n return m_iconDatabaseImpl->synchronousIconForPageURL(pageURL, iconSize);\n}\n\nNativeImagePtr WebIconDatabase::nativeImageForPageURL(const String& pageURL, const IntSize& iconSize)\n{\n if (!m_processPool || !m_iconDatabaseImpl || !m_iconDatabaseImpl->isOpen() || pageURL.isEmpty())\n return nullptr;\n\n return m_iconDatabaseImpl->synchronousNativeIconForPageURL(pageURL, iconSize);\n}\n\nbool WebIconDatabase::isOpen()\n{\n return m_iconDatabaseImpl && m_iconDatabaseImpl->isOpen();\n}\n\nbool WebIconDatabase::isUrlImportCompleted()\n{\n return m_urlImportCompleted;\n}\n\nvoid WebIconDatabase::removeAllIcons()\n{\n m_iconDatabaseImpl->removeAllIcons();\n}\n\nvoid WebIconDatabase::checkIntegrityBeforeOpening()\n{\n IconDatabase::checkIntegrityBeforeOpening();\n}\n\nvoid WebIconDatabase::close()\n{\n if (m_iconDatabaseImpl)\n m_iconDatabaseImpl->close();\n}\n\nvoid WebIconDatabase::initializeIconDatabaseClient(const WKIconDatabaseClientBase* client)\n{\n m_iconDatabaseClient.initialize(client);\n}\n\n// WebCore::IconDatabaseClient\n\nvoid WebIconDatabase::didImportIconURLForPageURL(const String& pageURL)\n{\n didChangeIconForPageURL(pageURL);\n}\n\nvoid WebIconDatabase::didImportIconDataForPageURL(const String& pageURL)\n{\n notifyIconDataReadyForPageURL(pageURL);\n}\n\nvoid WebIconDatabase::didChangeIconForPageURL(const String& pageURL)\n{\n m_iconDatabaseClient.didChangeIconForPageURL(this, API::URL::create(pageURL).ptr());\n}\n\nvoid WebIconDatabase::didRemoveAllIcons()\n{\n m_iconDatabaseClient.didRemoveAllIcons(this);\n}\n\nvoid WebIconDatabase::didFinishURLImport()\n{\n if (!m_processPool)\n return;\n\n ASSERT(!m_urlImportCompleted);\n\n LOG(IconDatabase, \"WK2 UIProcess URL import complete, notifying all %i pending page URL load decisions\", m_pendingLoadDecisionURLMap.size());\n \n for (auto& slot : m_pendingLoadDecisionURLMap) {\n LOG(IconDatabase, \"WK2 UIProcess performing delayed callback on callback ID %i for page url %s\", (int)slot.key, slot.value.ascii().data());\n IconLoadDecision decision = m_iconDatabaseImpl->synchronousLoadDecisionForIconURL(slot.value, nullptr);\n\n // Decisions should never be unknown after the inital import is complete.\n ASSERT(decision != IconLoadUnknown);\n\n // FIXME (Multi-WebProcess): We need to know which connection to send this message to.\n m_processPool->sendToAllProcesses(Messages::WebIconDatabaseProxy::ReceivedIconLoadDecision(static_cast(decision), slot.key));\n }\n\n m_pendingLoadDecisionURLMap.clear();\n\n m_urlImportCompleted = true;\n}\n\nvoid WebIconDatabase::didClose()\n{\n if (!m_shouldDerefWhenAppropriate)\n return;\n\n deref();\n}\n\nvoid WebIconDatabase::derefWhenAppropriate()\n{\n if (m_iconDatabaseImpl && m_iconDatabaseImpl->isOpen()) {\n m_shouldDerefWhenAppropriate = true;\n return;\n }\n\n deref();\n}\n\nvoid WebIconDatabase::notifyIconDataReadyForPageURL(const String& pageURL)\n{\n m_iconDatabaseClient.iconDataReadyForPageURL(this, API::URL::create(pageURL).ptr());\n didChangeIconForPageURL(pageURL);\n}\n\nvoid WebIconDatabase::setPrivateBrowsingEnabled(bool privateBrowsingEnabled)\n{\n if (m_iconDatabaseImpl)\n m_iconDatabaseImpl->setPrivateBrowsingEnabled(privateBrowsingEnabled);\n}\n\nPassRefPtr WebIconDatabase::iconDataForPageURL(const String& pageURL)\n{\n auto* image = imageForPageURL(pageURL);\n if (!image)\n return nullptr;\n\n SharedBuffer* sharedBuffer = image->data();\n if (!sharedBuffer)\n return nullptr;\n\n // Balanced by deref() below.\n sharedBuffer->ref();\n return API::Data::createWithoutCopying(reinterpret_cast(sharedBuffer->data()), sharedBuffer->size(),\n [](unsigned char*, const void* untypedSharedBuffer) {\n // Balanced by ref() above.\n static_cast(const_cast(untypedSharedBuffer))->deref();\n }, sharedBuffer);\n}\n\n} // namespace WebKit\n"} +{"text": "package tests\npackage digest\n\nimport scala.meta.internal.builds.MillDigest\nimport scala.meta.internal.metals.{BuildInfo => V}\nimport scala.meta.io.AbsolutePath\n\nclass MillDigestSuite extends BaseDigestSuite {\n\n override def digestCurrent(\n root: AbsolutePath\n ): Option[String] = MillDigest.current(root)\n\n checkSame(\n \"solo-build.sc\",\n s\"\"\"\n |/build.sc\n |import mill._, scalalib._\n |object foo extends ScalaModule {\n | def scalaVersion = \"${V.scala212}\"\n |}\n \"\"\".stripMargin,\n s\"\"\"\n |/build.sc\n |import mill._, scalalib._\n |object foo extends ScalaModule {\n | def scalaVersion = \"${V.scala212}\"\n |}\n \"\"\".stripMargin\n )\n\n checkSame(\n \"multiline-comment\",\n s\"\"\"\n |/build.sc\n |import mill._, scalalib._\n |object foo extends ScalaModule {\n | def scalaVersion = \"${V.scala212}\"\n |}\n \"\"\".stripMargin,\n s\"\"\"\n |/build.sc\n |import mill._, scalalib._\n | /* This is a multi\n | line comment */\n |object foo extends ScalaModule {\n | def scalaVersion = \"${V.scala212}\"\n |}\n \"\"\".stripMargin\n )\n\n checkSame(\n \"comment\",\n s\"\"\"\n |/build.sc\n |import mill._, scalalib._\n |object foo extends ScalaModule {\n | def scalaVersion = \"${V.scala212}\"\n |}\n \"\"\".stripMargin,\n s\"\"\"\n |/build.sc\n |import mill._, scalalib._\n | // this is a comment\n |object foo extends ScalaModule {\n | def scalaVersion = \"${V.scala212}\"\n |}\n \"\"\".stripMargin\n )\n\n checkSame(\n \"whitespace\",\n s\"\"\"\n |/build.sc\n |import mill._, scalalib._\n |object foo extends ScalaModule {\n | def scalaVersion = \"${V.scala212}\"\n |}\n \"\"\".stripMargin,\n s\"\"\"\n |/build.sc\n |import mill._, scalalib._\n |\n |object foo extends ScalaModule {\n |\n | def scalaVersion = \"${V.scala212}\"\n |}\n \"\"\".stripMargin\n )\n\n checkDiff(\n \"significant-tokens\",\n s\"\"\"\n |/build.sc\n |import mill._, scalalib._\n |object foo extends ScalaModule {\n | def scalaVersion = \"${V.scala212}\"\n |}\n \"\"\".stripMargin,\n \"\"\"\n |/build.sc\n |import mill._, scalalib._\n |object foo extends ScalaModule {\n | def scalaVersion = \"2.12.7\"\n |}\n \"\"\".stripMargin\n )\n\n def project(name: String): String =\n s\"\"\"\n |import mill._, scalalib._\n |object $name extends ScalaModule {\n | def scalaVersion = \"${V.scala212}\"\n |}\n \"\"\".stripMargin\n\n checkDiff(\n \"subproject\",\n s\"\"\"\n |/build.sc\n |import $$file.sub.other\n |${project(\"foo\")}\n |/sub/other.sc\n |${project(\"other\")}\n \"\"\".stripMargin,\n s\"\"\"\n |/build.sc\n |import $$file.sub.other\n |${project(\"foo\")}\n |/sub/other.sc\n |${project(\"renamed\")}\n \"\"\".stripMargin\n )\n\n checkDiff(\n \"subproject-^\",\n s\"\"\"\n |/build.sc\n |import $$file.sub.^.sub.other\n |${project(\"foo\")}\n |/sub/other.sc\n |${project(\"other\")}\n \"\"\".stripMargin,\n s\"\"\"\n |/build.sc\n |import $$file.sub.^.sub.other\n |${project(\"foo\")}\n |/sub/other.sc\n |${project(\"renamed\")}\n \"\"\".stripMargin\n )\n\n checkDiff(\n \"subproject-rename\",\n s\"\"\"\n |/build.sc\n |import $$file.sub.{other => EasierName}\n |${project(\"foo\")}\n |/sub/other.sc\n |${project(\"other\")}\n \"\"\".stripMargin,\n s\"\"\"\n |/build.sc\n |import $$file.sub.{other => EasierName}\n |${project(\"foo\")}\n |/sub/other.sc\n |${project(\"renamed\")}\n \"\"\".stripMargin\n )\n\n checkDiff(\n \"multiple-subprojects\",\n s\"\"\"\n |/build.sc\n |import $$file.sub.other\n |import $$file.sub.sub.other\n |${project(\"foo\")}\n |/sub/other.sc\n |${project(\"bar\")}\n |/sub/sub/other.sc\n |${project(\"man\")}\n \"\"\".stripMargin,\n s\"\"\"\n |/build.sc\n |import $$file.sub.other\n |import $$file.sub.sub.other\n |${project(\"foo\")}\n |/sub/other.sc\n |${project(\"bar\")}\n |/sub/sub/other.sc\n |${project(\"tender\")}\n \"\"\".stripMargin\n )\n\n checkDiff(\n \"line-import\",\n s\"\"\"\n |/build.sc\n |import $$file.sub.other, $$file.sub.sub.other\n |${project(\"foo\")}\n |/sub/other.sc\n |import mill._, scalalib._\n |${project(\"bar\")}\n |/sub/sub/other.sc\n |${project(\"man\")}\n \"\"\".stripMargin,\n s\"\"\"\n |/build.sc\n |import $$file.sub.other, $$file.sub.sub.other\n |${project(\"foo\")}\n |/sub/other.sc\n |import mill._, scalalib._\n |${project(\"bar\")}\n |/sub/sub/other.sc\n |${project(\"tender\")}\n \"\"\".stripMargin\n )\n\n checkDiff(\n \"line-import-coma\",\n s\"\"\"\n |/build.sc\n |import mill._, scalalib._\n |import $$file.sub1.{other, sub2.other}\n |${project(\"foo\")}\n |/sub1/other.sc\n |${project(\"bar\")}\n |/sub1/sub2/other.sc\n |${project(\"man\")}\n \"\"\".stripMargin,\n s\"\"\"\n |/build.sc\n |import mill._, scalalib._\n |import $$file.sub1.{other, sub2.other}\n |${project(\"foo\")}\n |/sub1/other.sc\n |${project(\"bar\")}\n |/sub1/sub2/other.sc\n |${project(\"tender\")}\n \"\"\".stripMargin\n )\n\n checkDiff(\n \"line-import-no-prefix\",\n s\"\"\"\n |/build.sc\n |import $$file.{other, sub2.other}\n |${project(\"foo\")}\n |/other.sc\n |${project(\"bar\")}\n |/sub2/other.sc\n |${project(\"man\")}\n \"\"\".stripMargin,\n s\"\"\"\n |/build.sc\n |import $$file.{other, sub2.other}\n |${project(\"foo\")}\n |/other.sc\n |${project(\"bar\")}\n |/sub2/other.sc\n |${project(\"tender\")}\n \"\"\".stripMargin\n )\n\n checkDiff(\n \"line-import-coma-rename\",\n s\"\"\"\n |/build.sc\n |import $$file.sub1.{other => betterName, sub2.other}\n |${project(\"foo\")}\n |/sub1/other.sc\n |${project(\"bar\")}\n |/sub1/sub2/other.sc\n |${project(\"man\")}\n \"\"\".stripMargin,\n s\"\"\"\n |/build.sc\n |import $$file.sub1.{other => betterName, sub2.other}\n |${project(\"foo\")}\n |/sub1/other.sc\n |${project(\"bar\")}\n |/sub1/sub2/other.sc\n |${project(\"tender\")}\n \"\"\".stripMargin\n )\n}\n"} +{"text": "/*\n\n * l1oip.c low level driver for tunneling layer 1 over IP\n *\n * NOTE: It is not compatible with TDMoIP nor \"ISDN over IP\".\n *\n * Author\tAndreas Eversberg (jolly@eversberg.eu)\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2, or (at your option)\n * any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\n *\n */\n\n/* module parameters:\n * type:\n\tValue 1\t= BRI\n\tValue 2\t= PRI\n\tValue 3 = BRI (multi channel frame, not supported yet)\n\tValue 4 = PRI (multi channel frame, not supported yet)\n\tA multi channel frame reduces overhead to a single frame for all\n\tb-channels, but increases delay.\n\t(NOTE: Multi channel frames are not implemented yet.)\n\n * codec:\n\tValue 0 = transparent (default)\n\tValue 1 = transfer ALAW\n\tValue 2 = transfer ULAW\n\tValue 3 = transfer generic 4 bit compression.\n\n * ulaw:\n\t0 = we use a-Law (default)\n\t1 = we use u-Law\n\n * limit:\n\tlimitation of B-channels to control bandwidth (1...126)\n\tBRI: 1 or 2\n\tPRI: 1-30, 31-126 (126, because dchannel ist not counted here)\n\tAlso limited ressources are used for stack, resulting in less channels.\n\tIt is possible to have more channels than 30 in PRI mode, this must\n\tbe supported by the application.\n\n * ip:\n\tbyte representation of remote ip address (127.0.0.1 -> 127,0,0,1)\n\tIf not given or four 0, no remote address is set.\n\tFor multiple interfaces, concat ip addresses. (127,0,0,1,127,0,0,1)\n\n * port:\n\tport number (local interface)\n\tIf not given or 0, port 931 is used for fist instance, 932 for next...\n\tFor multiple interfaces, different ports must be given.\n\n * remoteport:\n\tport number (remote interface)\n\tIf not given or 0, remote port equals local port\n\tFor multiple interfaces on equal sites, different ports must be given.\n\n * ondemand:\n\t0 = fixed (always transmit packets, even when remote side timed out)\n\t1 = on demand (only transmit packets, when remote side is detected)\n\tthe default is 0\n\tNOTE: ID must also be set for on demand.\n\n * id:\n\toptional value to identify frames. This value must be equal on both\n\tpeers and should be random. If omitted or 0, no ID is transmitted.\n\n * debug:\n\tNOTE: only one debug value must be given for all cards\n\tenable debugging (see l1oip.h for debug options)\n\n\nSpecial mISDN controls:\n\n op = MISDN_CTRL_SETPEER*\n p1 = bytes 0-3 : remote IP address in network order (left element first)\n p2 = bytes 1-2 : remote port in network order (high byte first)\n optional:\n p2 = bytes 3-4 : local port in network order (high byte first)\n\n op = MISDN_CTRL_UNSETPEER*\n\n * Use l1oipctrl for comfortable setting or removing ip address.\n (Layer 1 Over IP CTRL)\n\n\nL1oIP-Protocol\n--------------\n\nFrame Header:\n\n 7 6 5 4 3 2 1 0\n+---------------+\n|Ver|T|I|Coding |\n+---------------+\n| ID byte 3 * |\n+---------------+\n| ID byte 2 * |\n+---------------+\n| ID byte 1 * |\n+---------------+\n| ID byte 0 * |\n+---------------+\n|M| Channel |\n+---------------+\n| Length * |\n+---------------+\n| Time Base MSB |\n+---------------+\n| Time Base LSB |\n+---------------+\n| Data....\t|\n\n...\n\n| |\n+---------------+\n|M| Channel |\n+---------------+\n| Length * |\n+---------------+\n| Time Base MSB |\n+---------------+\n| Time Base LSB |\n+---------------+\n| Data....\t|\n\n...\n\n\n* Only included in some cases.\n\n- Ver = Version\nIf version is missmatch, the frame must be ignored.\n\n- T = Type of interface\nMust be 0 for S0 or 1 for E1.\n\n- I = Id present\nIf bit is set, four ID bytes are included in frame.\n\n- ID = Connection ID\nAdditional ID to prevent Denial of Service attacs. Also it prevents hijacking\nconnections with dynamic IP. The ID should be random and must not be 0.\n\n- Coding = Type of codec\nMust be 0 for no transcoding. Also for D-channel and other HDLC frames.\n 1 and 2 are reserved for explicitly use of a-LAW or u-LAW codec.\n 3 is used for generic table compressor.\n\n- M = More channels to come. If this flag is 1, the following byte contains\nthe length of the channel data. After the data block, the next channel will\nbe defined. The flag for the last channel block (or if only one channel is\ntransmitted), must be 0 and no length is given.\n\n- Channel = Channel number\n0 reserved\n1-3 channel data for S0 (3 is D-channel)\n1-31 channel data for E1 (16 is D-channel)\n32-127 channel data for extended E1 (16 is D-channel)\n\n- The length is used if the M-flag is 1. It is used to find the next channel\ninside frame.\nNOTE: A value of 0 equals 256 bytes of data.\n -> For larger data blocks, a single frame must be used.\n -> For larger streams, a single frame or multiple blocks with same channel ID\n must be used.\n\n- Time Base = Timestamp of first sample in frame\nThe \"Time Base\" is used to rearange packets and to detect packet loss.\nThe 16 bits are sent in network order (MSB first) and count 1/8000 th of a\nsecond. This causes a wrap arround each 8,192 seconds. There is no requirement\nfor the initial \"Time Base\", but 0 should be used for the first packet.\nIn case of HDLC data, this timestamp counts the packet or byte number.\n\n\nTwo Timers:\n\nAfter initialisation, a timer of 15 seconds is started. Whenever a packet is\ntransmitted, the timer is reset to 15 seconds again. If the timer expires, an\nempty packet is transmitted. This keep the connection alive.\n\nWhen a valid packet is received, a timer 65 seconds is started. The interface\nbecome ACTIVE. If the timer expires, the interface becomes INACTIVE.\n\n\nDynamic IP handling:\n\nTo allow dynamic IP, the ID must be non 0. In this case, any packet with the\ncorrect port number and ID will be accepted. If the remote side changes its IP\nthe new IP is used for all transmitted packets until it changes again.\n\n\nOn Demand:\n\nIf the ondemand parameter is given, the remote IP is set to 0 on timeout.\nThis will stop keepalive traffic to remote. If the remote is online again,\ntraffic will continue to the remote address. This is usefull for road warriors.\nThis feature only works with ID set, otherwhise it is highly unsecure.\n\n\nSocket and Thread\n-----------------\n\nThe complete socket opening and closing is done by a thread.\nWhen the thread opened a socket, the hc->socket descriptor is set. Whenever a\npacket shall be sent to the socket, the hc->socket must be checked wheter not\nNULL. To prevent change in socket descriptor, the hc->socket_lock must be used.\nTo change the socket, a recall of l1oip_socket_open() will safely kill the\nsocket process and create a new one.\n\n*/\n\n#define L1OIP_VERSION\t0\t/* 0...3 */\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \"core.h\"\n#include \"l1oip.h\"\n\nstatic const char *l1oip_revision = \"2.00\";\n\nstatic int l1oip_cnt;\nstatic spinlock_t l1oip_lock;\nstatic struct list_head l1oip_ilist;\n\n#define MAX_CARDS\t16\nstatic u_int type[MAX_CARDS];\nstatic u_int codec[MAX_CARDS];\nstatic u_int ip[MAX_CARDS*4];\nstatic u_int port[MAX_CARDS];\nstatic u_int remoteport[MAX_CARDS];\nstatic u_int ondemand[MAX_CARDS];\nstatic u_int limit[MAX_CARDS];\nstatic u_int id[MAX_CARDS];\nstatic int debug;\nstatic int ulaw;\n\nMODULE_AUTHOR(\"Andreas Eversberg\");\nMODULE_LICENSE(\"GPL\");\nmodule_param_array(type, uint, NULL, S_IRUGO | S_IWUSR);\nmodule_param_array(codec, uint, NULL, S_IRUGO | S_IWUSR);\nmodule_param_array(ip, uint, NULL, S_IRUGO | S_IWUSR);\nmodule_param_array(port, uint, NULL, S_IRUGO | S_IWUSR);\nmodule_param_array(remoteport, uint, NULL, S_IRUGO | S_IWUSR);\nmodule_param_array(ondemand, uint, NULL, S_IRUGO | S_IWUSR);\nmodule_param_array(limit, uint, NULL, S_IRUGO | S_IWUSR);\nmodule_param_array(id, uint, NULL, S_IRUGO | S_IWUSR);\nmodule_param(ulaw, uint, S_IRUGO | S_IWUSR);\nmodule_param(debug, uint, S_IRUGO | S_IWUSR);\n\n/*\n * send a frame via socket, if open and restart timer\n */\nstatic int\nl1oip_socket_send(struct l1oip *hc, u8 localcodec, u8 channel, u32 chanmask,\n\tu16 timebase, u8 *buf, int len)\n{\n\tu8 *p;\n\tint multi = 0;\n\tu8 frame[len+32];\n\tstruct socket *socket = NULL;\n\n\tif (debug & DEBUG_L1OIP_MSG)\n\t\tprintk(KERN_DEBUG \"%s: sending data to socket (len = %d)\\n\",\n\t\t\t__func__, len);\n\n\tp = frame;\n\n\t/* restart timer */\n\tif ((int)(hc->keep_tl.expires-jiffies) < 5*HZ) {\n\t\tdel_timer(&hc->keep_tl);\n\t\thc->keep_tl.expires = jiffies + L1OIP_KEEPALIVE*HZ;\n\t\tadd_timer(&hc->keep_tl);\n\t} else\n\t\thc->keep_tl.expires = jiffies + L1OIP_KEEPALIVE*HZ;\n\n\tif (debug & DEBUG_L1OIP_MSG)\n\t\tprintk(KERN_DEBUG \"%s: resetting timer\\n\", __func__);\n\n\t/* drop if we have no remote ip or port */\n\tif (!hc->sin_remote.sin_addr.s_addr || !hc->sin_remote.sin_port) {\n\t\tif (debug & DEBUG_L1OIP_MSG)\n\t\t\tprintk(KERN_DEBUG \"%s: dropping frame, because remote \"\n\t\t\t\t\"IP is not set.\\n\", __func__);\n\t\treturn len;\n\t}\n\n\t/* assemble frame */\n\t*p++ = (L1OIP_VERSION<<6) /* version and coding */\n\t | (hc->pri ? 0x20 : 0x00) /* type */\n\t | (hc->id ? 0x10 : 0x00) /* id */\n\t | localcodec;\n\tif (hc->id) {\n\t\t*p++ = hc->id>>24; /* id */\n\t\t*p++ = hc->id>>16;\n\t\t*p++ = hc->id>>8;\n\t\t*p++ = hc->id;\n\t}\n\t*p++ = (multi == 1) ? 0x80 : 0x00 + channel; /* m-flag, channel */\n\tif (multi == 1)\n\t\t*p++ = len; /* length */\n\t*p++ = timebase>>8; /* time base */\n\t*p++ = timebase;\n\n\tif (buf && len) { /* add data to frame */\n\t\tif (localcodec == 1 && ulaw)\n\t\t\tl1oip_ulaw_to_alaw(buf, len, p);\n\t\telse if (localcodec == 2 && !ulaw)\n\t\t\tl1oip_alaw_to_ulaw(buf, len, p);\n\t\telse if (localcodec == 3)\n\t\t\tlen = l1oip_law_to_4bit(buf, len, p,\n\t\t\t\t&hc->chan[channel].codecstate);\n\t\telse\n\t\t\tmemcpy(p, buf, len);\n\t}\n\tlen += p - frame;\n\n\t/* check for socket in safe condition */\n\tspin_lock(&hc->socket_lock);\n\tif (!hc->socket) {\n\t\tspin_unlock(&hc->socket_lock);\n\t\treturn 0;\n\t}\n\t/* seize socket */\n\tsocket = hc->socket;\n\thc->socket = NULL;\n\tspin_unlock(&hc->socket_lock);\n\t/* send packet */\n\tif (debug & DEBUG_L1OIP_MSG)\n\t\tprintk(KERN_DEBUG \"%s: sending packet to socket (len \"\n\t\t\t\"= %d)\\n\", __func__, len);\n\thc->sendiov.iov_base = frame;\n\thc->sendiov.iov_len = len;\n\tlen = kernel_sendmsg(socket, &hc->sendmsg, &hc->sendiov, 1, len);\n\t/* give socket back */\n\thc->socket = socket; /* no locking required */\n\n\treturn len;\n}\n\n\n/*\n * receive channel data from socket\n */\nstatic void\nl1oip_socket_recv(struct l1oip *hc, u8 remotecodec, u8 channel, u16 timebase,\n\tu8 *buf, int len)\n{\n\tstruct sk_buff *nskb;\n\tstruct bchannel *bch;\n\tstruct dchannel *dch;\n\tu8 *p;\n\tu32 rx_counter;\n\n\tif (len == 0) {\n\t\tif (debug & DEBUG_L1OIP_MSG)\n\t\t\tprintk(KERN_DEBUG \"%s: received empty keepalive data, \"\n\t\t\t\t\"ignoring\\n\", __func__);\n\t\treturn;\n\t}\n\n\tif (debug & DEBUG_L1OIP_MSG)\n\t\tprintk(KERN_DEBUG \"%s: received data, sending to mISDN (%d)\\n\",\n\t\t\t__func__, len);\n\n\tif (channel < 1 || channel > 127) {\n\t\tprintk(KERN_WARNING \"%s: packet error - channel %d out of \"\n\t\t\t\"range\\n\", __func__, channel);\n\t\treturn;\n\t}\n\tdch = hc->chan[channel].dch;\n\tbch = hc->chan[channel].bch;\n\tif (!dch && !bch) {\n\t\tprintk(KERN_WARNING \"%s: packet error - channel %d not in \"\n\t\t\t\"stack\\n\", __func__, channel);\n\t\treturn;\n\t}\n\n\t/* prepare message */\n\tnskb = mI_alloc_skb((remotecodec == 3) ? (len<<1) : len, GFP_ATOMIC);\n\tif (!nskb) {\n\t\tprintk(KERN_ERR \"%s: No mem for skb.\\n\", __func__);\n\t\treturn;\n\t}\n\tp = skb_put(nskb, (remotecodec == 3) ? (len<<1) : len);\n\n\tif (remotecodec == 1 && ulaw)\n\t\tl1oip_alaw_to_ulaw(buf, len, p);\n\telse if (remotecodec == 2 && !ulaw)\n\t\tl1oip_ulaw_to_alaw(buf, len, p);\n\telse if (remotecodec == 3)\n\t\tlen = l1oip_4bit_to_law(buf, len, p);\n\telse\n\t\tmemcpy(p, buf, len);\n\n\t/* send message up */\n\tif (dch && len >= 2) {\n\t\tdch->rx_skb = nskb;\n\t\trecv_Dchannel(dch);\n\t}\n\tif (bch) {\n\t\t/* expand 16 bit sequence number to 32 bit sequence number */\n\t\trx_counter = hc->chan[channel].rx_counter;\n\t\tif (((s16)(timebase - rx_counter)) >= 0) {\n\t\t\t/* time has changed forward */\n\t\t\tif (timebase >= (rx_counter & 0xffff))\n\t\t\t\trx_counter =\n\t\t\t\t\t(rx_counter & 0xffff0000) | timebase;\n\t\t\telse\n\t\t\t\trx_counter = ((rx_counter & 0xffff0000)+0x10000)\n\t\t\t\t\t| timebase;\n\t\t} else {\n\t\t\t/* time has changed backwards */\n\t\t\tif (timebase < (rx_counter & 0xffff))\n\t\t\t\trx_counter =\n\t\t\t\t\t(rx_counter & 0xffff0000) | timebase;\n\t\t\telse\n\t\t\t\trx_counter = ((rx_counter & 0xffff0000)-0x10000)\n\t\t\t\t\t| timebase;\n\t\t}\n\t\thc->chan[channel].rx_counter = rx_counter;\n\n#ifdef REORDER_DEBUG\n\t\tif (hc->chan[channel].disorder_flag) {\n\t\t\tstruct sk_buff *skb;\n\t\t\tint cnt;\n\t\t\tskb = hc->chan[channel].disorder_skb;\n\t\t\thc->chan[channel].disorder_skb = nskb;\n\t\t\tnskb = skb;\n\t\t\tcnt = hc->chan[channel].disorder_cnt;\n\t\t\thc->chan[channel].disorder_cnt = rx_counter;\n\t\t\trx_counter = cnt;\n\t\t}\n\t\thc->chan[channel].disorder_flag ^= 1;\n\t\tif (nskb)\n#endif\n\t\t\tqueue_ch_frame(&bch->ch, PH_DATA_IND, rx_counter, nskb);\n\t}\n}\n\n\n/*\n * parse frame and extract channel data\n */\nstatic void\nl1oip_socket_parse(struct l1oip *hc, struct sockaddr_in *sin, u8 *buf, int len)\n{\n\tu32\t\t\tpacket_id;\n\tu8\t\t\tchannel;\n\tu8\t\t\tremotecodec;\n\tu16\t\t\ttimebase;\n\tint\t\t\tm, mlen;\n\tint\t\t\tlen_start = len; /* initial frame length */\n\tstruct dchannel\t\t*dch = hc->chan[hc->d_idx].dch;\n\n\tif (debug & DEBUG_L1OIP_MSG)\n\t\tprintk(KERN_DEBUG \"%s: received frame, parsing... (%d)\\n\",\n\t\t\t__func__, len);\n\n\t/* check lenght */\n\tif (len < 1+1+2) {\n\t\tprintk(KERN_WARNING \"%s: packet error - length %d below \"\n\t\t\t\"4 bytes\\n\", __func__, len);\n\t\treturn;\n\t}\n\n\t/* check version */\n\tif (((*buf)>>6) != L1OIP_VERSION) {\n\t\tprintk(KERN_WARNING \"%s: packet error - unknown version %d\\n\",\n\t\t\t__func__, buf[0]>>6);\n\t\treturn;\n\t}\n\n\t/* check type */\n\tif (((*buf)&0x20) && !hc->pri) {\n\t\tprintk(KERN_WARNING \"%s: packet error - received E1 packet \"\n\t\t\t\"on S0 interface\\n\", __func__);\n\t\treturn;\n\t}\n\tif (!((*buf)&0x20) && hc->pri) {\n\t\tprintk(KERN_WARNING \"%s: packet error - received S0 packet \"\n\t\t\t\"on E1 interface\\n\", __func__);\n\t\treturn;\n\t}\n\n\t/* get id flag */\n\tpacket_id = (*buf>>4)&1;\n\n\t/* check coding */\n\tremotecodec = (*buf) & 0x0f;\n\tif (remotecodec > 3) {\n\t\tprintk(KERN_WARNING \"%s: packet error - remotecodec %d \"\n\t\t\t\"unsupported\\n\", __func__, remotecodec);\n\t\treturn;\n\t}\n\tbuf++;\n\tlen--;\n\n\t/* check packet_id */\n\tif (packet_id) {\n\t\tif (!hc->id) {\n\t\t\tprintk(KERN_WARNING \"%s: packet error - packet has id \"\n\t\t\t\t\"0x%x, but we have not\\n\", __func__, packet_id);\n\t\t\treturn;\n\t\t}\n\t\tif (len < 4) {\n\t\t\tprintk(KERN_WARNING \"%s: packet error - packet too \"\n\t\t\t\t\"short for ID value\\n\", __func__);\n\t\t\treturn;\n\t\t}\n\t\tpacket_id = (*buf++) << 24;\n\t\tpacket_id += (*buf++) << 16;\n\t\tpacket_id += (*buf++) << 8;\n\t\tpacket_id += (*buf++);\n\t\tlen -= 4;\n\n\t\tif (packet_id != hc->id) {\n\t\t\tprintk(KERN_WARNING \"%s: packet error - ID mismatch, \"\n\t\t\t\t\"got 0x%x, we 0x%x\\n\",\n\t\t\t\t__func__, packet_id, hc->id);\n\t\t\treturn;\n\t\t}\n\t} else {\n\t\tif (hc->id) {\n\t\t\tprintk(KERN_WARNING \"%s: packet error - packet has no \"\n\t\t\t\t\"ID, but we have\\n\", __func__);\n\t\t\treturn;\n\t\t}\n\t}\n\nmultiframe:\n\tif (len < 1) {\n\t\tprintk(KERN_WARNING \"%s: packet error - packet too short, \"\n\t\t\t\"channel expected at position %d.\\n\",\n\t\t\t__func__, len-len_start+1);\n\t\treturn;\n\t}\n\n\t/* get channel and multiframe flag */\n\tchannel = *buf&0x7f;\n\tm = *buf >> 7;\n\tbuf++;\n\tlen--;\n\n\t/* check length on multiframe */\n\tif (m) {\n\t\tif (len < 1) {\n\t\t\tprintk(KERN_WARNING \"%s: packet error - packet too \"\n\t\t\t\t\"short, length expected at position %d.\\n\",\n\t\t\t\t__func__, len_start-len-1);\n\t\t\treturn;\n\t\t}\n\n\t\tmlen = *buf++;\n\t\tlen--;\n\t\tif (mlen == 0)\n\t\t\tmlen = 256;\n\t\tif (len < mlen+3) {\n\t\t\tprintk(KERN_WARNING \"%s: packet error - length %d at \"\n\t\t\t\t\"position %d exceeds total length %d.\\n\",\n\t\t\t\t__func__, mlen, len_start-len-1, len_start);\n\t\t\treturn;\n\t\t}\n\t\tif (len == mlen+3) {\n\t\t\tprintk(KERN_WARNING \"%s: packet error - length %d at \"\n\t\t\t\t\"position %d will not allow additional \"\n\t\t\t\t\"packet.\\n\",\n\t\t\t\t__func__, mlen, len_start-len+1);\n\t\t\treturn;\n\t\t}\n\t} else\n\t\tmlen = len-2; /* single frame, substract timebase */\n\n\tif (len < 2) {\n\t\tprintk(KERN_WARNING \"%s: packet error - packet too short, time \"\n\t\t\t\"base expected at position %d.\\n\",\n\t\t\t__func__, len-len_start+1);\n\t\treturn;\n\t}\n\n\t/* get time base */\n\ttimebase = (*buf++) << 8;\n\ttimebase |= (*buf++);\n\tlen -= 2;\n\n\t/* if inactive, we send up a PH_ACTIVATE and activate */\n\tif (!test_bit(FLG_ACTIVE, &dch->Flags)) {\n\t\tif (debug & (DEBUG_L1OIP_MSG|DEBUG_L1OIP_SOCKET))\n\t\t\tprintk(KERN_DEBUG \"%s: interface become active due to \"\n\t\t\t\t\"received packet\\n\", __func__);\n\t\ttest_and_set_bit(FLG_ACTIVE, &dch->Flags);\n\t\t_queue_data(&dch->dev.D, PH_ACTIVATE_IND, MISDN_ID_ANY, 0,\n\t\t\tNULL, GFP_ATOMIC);\n\t}\n\n\t/* distribute packet */\n\tl1oip_socket_recv(hc, remotecodec, channel, timebase, buf, mlen);\n\tbuf += mlen;\n\tlen -= mlen;\n\n\t/* multiframe */\n\tif (m)\n\t\tgoto multiframe;\n\n\t/* restart timer */\n\tif ((int)(hc->timeout_tl.expires-jiffies) < 5*HZ || !hc->timeout_on) {\n\t\thc->timeout_on = 1;\n\t\tdel_timer(&hc->timeout_tl);\n\t\thc->timeout_tl.expires = jiffies + L1OIP_TIMEOUT*HZ;\n\t\tadd_timer(&hc->timeout_tl);\n\t} else /* only adjust timer */\n\t\thc->timeout_tl.expires = jiffies + L1OIP_TIMEOUT*HZ;\n\n\t/* if ip or source port changes */\n\tif ((hc->sin_remote.sin_addr.s_addr != sin->sin_addr.s_addr)\n\t || (hc->sin_remote.sin_port != sin->sin_port)) {\n\t\tif (debug & DEBUG_L1OIP_SOCKET)\n\t\t\tprintk(KERN_DEBUG \"%s: remote address changes from \"\n\t\t\t\t\"0x%08x to 0x%08x (port %d to %d)\\n\", __func__,\n\t\t\t\tntohl(hc->sin_remote.sin_addr.s_addr),\n\t\t\t\tntohl(sin->sin_addr.s_addr),\n\t\t\t\tntohs(hc->sin_remote.sin_port),\n\t\t\t\tntohs(sin->sin_port));\n\t\thc->sin_remote.sin_addr.s_addr = sin->sin_addr.s_addr;\n\t\thc->sin_remote.sin_port = sin->sin_port;\n\t}\n}\n\n\n/*\n * socket stuff\n */\nstatic int\nl1oip_socket_thread(void *data)\n{\n\tstruct l1oip *hc = (struct l1oip *)data;\n\tint ret = 0;\n\tstruct msghdr msg;\n\tstruct sockaddr_in sin_rx;\n\tunsigned char *recvbuf;\n\tsize_t recvbuf_size = 1500;\n\tint recvlen;\n\tstruct socket *socket = NULL;\n\tDECLARE_COMPLETION_ONSTACK(wait);\n\n\t/* allocate buffer memory */\n\trecvbuf = kmalloc(recvbuf_size, GFP_KERNEL);\n\tif (!recvbuf) {\n\t\tprintk(KERN_ERR \"%s: Failed to alloc recvbuf.\\n\", __func__);\n\t\tret = -ENOMEM;\n\t\tgoto fail;\n\t}\n\n\t/* make daemon */\n\tallow_signal(SIGTERM);\n\n\t/* create socket */\n\tif (sock_create(PF_INET, SOCK_DGRAM, IPPROTO_UDP, &socket)) {\n\t\tprintk(KERN_ERR \"%s: Failed to create socket.\\n\", __func__);\n\t\tret = -EIO;\n\t\tgoto fail;\n\t}\n\n\t/* set incoming address */\n\thc->sin_local.sin_family = AF_INET;\n\thc->sin_local.sin_addr.s_addr = INADDR_ANY;\n\thc->sin_local.sin_port = htons((unsigned short)hc->localport);\n\n\t/* set outgoing address */\n\thc->sin_remote.sin_family = AF_INET;\n\thc->sin_remote.sin_addr.s_addr = htonl(hc->remoteip);\n\thc->sin_remote.sin_port = htons((unsigned short)hc->remoteport);\n\n\t/* bind to incomming port */\n\tif (socket->ops->bind(socket, (struct sockaddr *)&hc->sin_local,\n\t sizeof(hc->sin_local))) {\n\t\tprintk(KERN_ERR \"%s: Failed to bind socket to port %d.\\n\",\n\t\t\t__func__, hc->localport);\n\t\tret = -EINVAL;\n\t\tgoto fail;\n\t}\n\n\t/* check sk */\n\tif (socket->sk == NULL) {\n\t\tprintk(KERN_ERR \"%s: socket->sk == NULL\\n\", __func__);\n\t\tret = -EIO;\n\t\tgoto fail;\n\t}\n\n\t/* build receive message */\n\tmsg.msg_name = &sin_rx;\n\tmsg.msg_namelen = sizeof(sin_rx);\n\tmsg.msg_control = NULL;\n\tmsg.msg_controllen = 0;\n\n\t/* build send message */\n\thc->sendmsg.msg_name = &hc->sin_remote;\n\thc->sendmsg.msg_namelen = sizeof(hc->sin_remote);\n\thc->sendmsg.msg_control = NULL;\n\thc->sendmsg.msg_controllen = 0;\n\n\t/* give away socket */\n\tspin_lock(&hc->socket_lock);\n\thc->socket = socket;\n\tspin_unlock(&hc->socket_lock);\n\n\t/* read loop */\n\tif (debug & DEBUG_L1OIP_SOCKET)\n\t\tprintk(KERN_DEBUG \"%s: socket created and open\\n\",\n\t\t\t__func__);\n\twhile (!signal_pending(current)) {\n\t\tstruct kvec iov = {\n\t\t\t.iov_base = recvbuf,\n\t\t\t.iov_len = recvbuf_size,\n\t\t};\n\t\trecvlen = kernel_recvmsg(socket, &msg, &iov, 1,\n\t\t\t\t\t recvbuf_size, 0);\n\t\tif (recvlen > 0) {\n\t\t\tl1oip_socket_parse(hc, &sin_rx, recvbuf, recvlen);\n\t\t} else {\n\t\t\tif (debug & DEBUG_L1OIP_SOCKET)\n\t\t\t\tprintk(KERN_WARNING\n\t\t\t\t \"%s: broken pipe on socket\\n\", __func__);\n\t\t}\n\t}\n\n\t/* get socket back, check first if in use, maybe by send function */\n\tspin_lock(&hc->socket_lock);\n\t/* if hc->socket is NULL, it is in use until it is given back */\n\twhile (!hc->socket) {\n\t\tspin_unlock(&hc->socket_lock);\n\t\tschedule_timeout(HZ/10);\n\t\tspin_lock(&hc->socket_lock);\n\t}\n\thc->socket = NULL;\n\tspin_unlock(&hc->socket_lock);\n\n\tif (debug & DEBUG_L1OIP_SOCKET)\n\t\tprintk(KERN_DEBUG \"%s: socket thread terminating\\n\",\n\t\t\t__func__);\n\nfail:\n\t/* free recvbuf */\n\tkfree(recvbuf);\n\n\t/* close socket */\n\tif (socket)\n\t\tsock_release(socket);\n\n\t/* if we got killed, signal completion */\n\tcomplete(&hc->socket_complete);\n\thc->socket_thread = NULL; /* show termination of thread */\n\n\tif (debug & DEBUG_L1OIP_SOCKET)\n\t\tprintk(KERN_DEBUG \"%s: socket thread terminated\\n\",\n\t\t\t__func__);\n\treturn ret;\n}\n\nstatic void\nl1oip_socket_close(struct l1oip *hc)\n{\n\tstruct dchannel *dch = hc->chan[hc->d_idx].dch;\n\n\t/* kill thread */\n\tif (hc->socket_thread) {\n\t\tif (debug & DEBUG_L1OIP_SOCKET)\n\t\t\tprintk(KERN_DEBUG \"%s: socket thread exists, \"\n\t\t\t\t\"killing...\\n\", __func__);\n\t\tsend_sig(SIGTERM, hc->socket_thread, 0);\n\t\twait_for_completion(&hc->socket_complete);\n\t}\n\n\t/* if active, we send up a PH_DEACTIVATE and deactivate */\n\tif (test_bit(FLG_ACTIVE, &dch->Flags)) {\n\t\tif (debug & (DEBUG_L1OIP_MSG|DEBUG_L1OIP_SOCKET))\n\t\t\tprintk(KERN_DEBUG \"%s: interface become deactivated \"\n\t\t\t\t\"due to timeout\\n\", __func__);\n\t\ttest_and_clear_bit(FLG_ACTIVE, &dch->Flags);\n\t\t_queue_data(&dch->dev.D, PH_DEACTIVATE_IND, MISDN_ID_ANY, 0,\n\t\t\tNULL, GFP_ATOMIC);\n\t}\n}\n\nstatic int\nl1oip_socket_open(struct l1oip *hc)\n{\n\t/* in case of reopen, we need to close first */\n\tl1oip_socket_close(hc);\n\n\tinit_completion(&hc->socket_complete);\n\n\t/* create receive process */\n\thc->socket_thread = kthread_run(l1oip_socket_thread, hc, \"l1oip_%s\",\n\t\thc->name);\n\tif (IS_ERR(hc->socket_thread)) {\n\t\tint err = PTR_ERR(hc->socket_thread);\n\t\tprintk(KERN_ERR \"%s: Failed (%d) to create socket process.\\n\",\n\t\t\t__func__, err);\n\t\thc->socket_thread = NULL;\n\t\tsock_release(hc->socket);\n\t\treturn err;\n\t}\n\tif (debug & DEBUG_L1OIP_SOCKET)\n\t\tprintk(KERN_DEBUG \"%s: socket thread created\\n\", __func__);\n\n\treturn 0;\n}\n\n\nstatic void\nl1oip_send_bh(struct work_struct *work)\n{\n\tstruct l1oip *hc = container_of(work, struct l1oip, workq);\n\n\tif (debug & (DEBUG_L1OIP_MSG|DEBUG_L1OIP_SOCKET))\n\t\tprintk(KERN_DEBUG \"%s: keepalive timer expired, sending empty \"\n\t\t\t\"frame on dchannel\\n\", __func__);\n\n\t/* send an empty l1oip frame at D-channel */\n\tl1oip_socket_send(hc, 0, hc->d_idx, 0, 0, NULL, 0);\n}\n\n\n/*\n * timer stuff\n */\nstatic void\nl1oip_keepalive(void *data)\n{\n\tstruct l1oip *hc = (struct l1oip *)data;\n\n\tschedule_work(&hc->workq);\n}\n\nstatic void\nl1oip_timeout(void *data)\n{\n\tstruct l1oip\t\t\t*hc = (struct l1oip *)data;\n\tstruct dchannel\t\t*dch = hc->chan[hc->d_idx].dch;\n\n\tif (debug & DEBUG_L1OIP_MSG)\n\t\tprintk(KERN_DEBUG \"%s: timeout timer expired, turn layer one \"\n\t\t\t\"down.\\n\", __func__);\n\n\thc->timeout_on = 0; /* state that timer must be initialized next time */\n\n\t/* if timeout, we send up a PH_DEACTIVATE and deactivate */\n\tif (test_bit(FLG_ACTIVE, &dch->Flags)) {\n\t\tif (debug & (DEBUG_L1OIP_MSG|DEBUG_L1OIP_SOCKET))\n\t\t\tprintk(KERN_DEBUG \"%s: interface become deactivated \"\n\t\t\t\t\"due to timeout\\n\", __func__);\n\t\ttest_and_clear_bit(FLG_ACTIVE, &dch->Flags);\n\t\t_queue_data(&dch->dev.D, PH_DEACTIVATE_IND, MISDN_ID_ANY, 0,\n\t\t\tNULL, GFP_ATOMIC);\n\t}\n\n\t/* if we have ondemand set, we remove ip address */\n\tif (hc->ondemand) {\n\t\tif (debug & DEBUG_L1OIP_MSG)\n\t\t\tprintk(KERN_DEBUG \"%s: on demand causes ip address to \"\n\t\t\t\t\"be removed\\n\", __func__);\n\t\thc->sin_remote.sin_addr.s_addr = 0;\n\t}\n}\n\n\n/*\n * message handling\n */\nstatic int\nhandle_dmsg(struct mISDNchannel *ch, struct sk_buff *skb)\n{\n\tstruct mISDNdevice\t*dev = container_of(ch, struct mISDNdevice, D);\n\tstruct dchannel\t\t*dch = container_of(dev, struct dchannel, dev);\n\tstruct l1oip\t\t\t*hc = dch->hw;\n\tstruct mISDNhead\t*hh = mISDN_HEAD_P(skb);\n\tint\t\t\tret = -EINVAL;\n\tint\t\t\tl, ll;\n\tunsigned char\t\t*p;\n\n\tswitch (hh->prim) {\n\tcase PH_DATA_REQ:\n\t\tif (skb->len < 1) {\n\t\t\tprintk(KERN_WARNING \"%s: skb too small\\n\",\n\t\t\t\t__func__);\n\t\t\tbreak;\n\t\t}\n\t\tif (skb->len > MAX_DFRAME_LEN_L1 || skb->len > L1OIP_MAX_LEN) {\n\t\t\tprintk(KERN_WARNING \"%s: skb too large\\n\",\n\t\t\t\t__func__);\n\t\t\tbreak;\n\t\t}\n\t\t/* send frame */\n\t\tp = skb->data;\n\t\tl = skb->len;\n\t\twhile (l) {\n\t\t\tll = (l < L1OIP_MAX_PERFRAME) ? l : L1OIP_MAX_PERFRAME;\n\t\t\tl1oip_socket_send(hc, 0, dch->slot, 0,\n\t\t\t\thc->chan[dch->slot].tx_counter++, p, ll);\n\t\t\tp += ll;\n\t\t\tl -= ll;\n\t\t}\n\t\tskb_trim(skb, 0);\n\t\tqueue_ch_frame(ch, PH_DATA_CNF, hh->id, skb);\n\t\treturn 0;\n\tcase PH_ACTIVATE_REQ:\n\t\tif (debug & (DEBUG_L1OIP_MSG|DEBUG_L1OIP_SOCKET))\n\t\t\tprintk(KERN_DEBUG \"%s: PH_ACTIVATE channel %d (1..%d)\\n\"\n\t\t\t\t, __func__, dch->slot, hc->b_num+1);\n\t\tskb_trim(skb, 0);\n\t\tif (test_bit(FLG_ACTIVE, &dch->Flags))\n\t\t\tqueue_ch_frame(ch, PH_ACTIVATE_IND, hh->id, skb);\n\t\telse\n\t\t\tqueue_ch_frame(ch, PH_DEACTIVATE_IND, hh->id, skb);\n\t\treturn 0;\n\tcase PH_DEACTIVATE_REQ:\n\t\tif (debug & (DEBUG_L1OIP_MSG|DEBUG_L1OIP_SOCKET))\n\t\t\tprintk(KERN_DEBUG \"%s: PH_DEACTIVATE channel %d \"\n\t\t\t\t\"(1..%d)\\n\", __func__, dch->slot,\n\t\t\t\thc->b_num+1);\n\t\tskb_trim(skb, 0);\n\t\tif (test_bit(FLG_ACTIVE, &dch->Flags))\n\t\t\tqueue_ch_frame(ch, PH_ACTIVATE_IND, hh->id, skb);\n\t\telse\n\t\t\tqueue_ch_frame(ch, PH_DEACTIVATE_IND, hh->id, skb);\n\t\treturn 0;\n\t}\n\tif (!ret)\n\t\tdev_kfree_skb(skb);\n\treturn ret;\n}\n\nstatic int\nchannel_dctrl(struct dchannel *dch, struct mISDN_ctrl_req *cq)\n{\n\tint\tret = 0;\n\tstruct l1oip\t*hc = dch->hw;\n\n\tswitch (cq->op) {\n\tcase MISDN_CTRL_GETOP:\n\t\tcq->op = MISDN_CTRL_SETPEER | MISDN_CTRL_UNSETPEER\n\t\t\t| MISDN_CTRL_GETPEER;\n\t\tbreak;\n\tcase MISDN_CTRL_SETPEER:\n\t\thc->remoteip = (u32)cq->p1;\n\t\thc->remoteport = cq->p2 & 0xffff;\n\t\thc->localport = cq->p2 >> 16;\n\t\tif (!hc->remoteport)\n\t\t\thc->remoteport = hc->localport;\n\t\tif (debug & DEBUG_L1OIP_SOCKET)\n\t\t\tprintk(KERN_DEBUG \"%s: got new ip address from user \"\n\t\t\t\t\"space.\\n\", __func__);\n\t\t\tl1oip_socket_open(hc);\n\t\tbreak;\n\tcase MISDN_CTRL_UNSETPEER:\n\t\tif (debug & DEBUG_L1OIP_SOCKET)\n\t\t\tprintk(KERN_DEBUG \"%s: removing ip address.\\n\",\n\t\t\t\t__func__);\n\t\thc->remoteip = 0;\n\t\tl1oip_socket_open(hc);\n\t\tbreak;\n\tcase MISDN_CTRL_GETPEER:\n\t\tif (debug & DEBUG_L1OIP_SOCKET)\n\t\t\tprintk(KERN_DEBUG \"%s: getting ip address.\\n\",\n\t\t\t\t__func__);\n\t\tcq->p1 = hc->remoteip;\n\t\tcq->p2 = hc->remoteport | (hc->localport << 16);\n\t\tbreak;\n\tdefault:\n\t\tprintk(KERN_WARNING \"%s: unknown Op %x\\n\",\n\t\t __func__, cq->op);\n\t\tret = -EINVAL;\n\t\tbreak;\n\t}\n\treturn ret;\n}\n\nstatic int\nopen_dchannel(struct l1oip *hc, struct dchannel *dch, struct channel_req *rq)\n{\n\tif (debug & DEBUG_HW_OPEN)\n\t\tprintk(KERN_DEBUG \"%s: dev(%d) open from %p\\n\", __func__,\n\t\t dch->dev.id, __builtin_return_address(0));\n\tif (rq->protocol == ISDN_P_NONE)\n\t\treturn -EINVAL;\n\tif ((dch->dev.D.protocol != ISDN_P_NONE) &&\n\t (dch->dev.D.protocol != rq->protocol)) {\n\t\tif (debug & DEBUG_HW_OPEN)\n\t\t\tprintk(KERN_WARNING \"%s: change protocol %x to %x\\n\",\n\t\t\t__func__, dch->dev.D.protocol, rq->protocol);\n\t}\n\tif (dch->dev.D.protocol != rq->protocol)\n\t\tdch->dev.D.protocol = rq->protocol;\n\n\tif (test_bit(FLG_ACTIVE, &dch->Flags)) {\n\t\t_queue_data(&dch->dev.D, PH_ACTIVATE_IND, MISDN_ID_ANY,\n\t\t 0, NULL, GFP_KERNEL);\n\t}\n\trq->ch = &dch->dev.D;\n\tif (!try_module_get(THIS_MODULE))\n\t\tprintk(KERN_WARNING \"%s:cannot get module\\n\", __func__);\n\treturn 0;\n}\n\nstatic int\nopen_bchannel(struct l1oip *hc, struct dchannel *dch, struct channel_req *rq)\n{\n\tstruct bchannel\t*bch;\n\tint\t\tch;\n\n\tif (!test_channelmap(rq->adr.channel, dch->dev.channelmap))\n\t\treturn -EINVAL;\n\tif (rq->protocol == ISDN_P_NONE)\n\t\treturn -EINVAL;\n\tch = rq->adr.channel; /* BRI: 1=B1 2=B2 PRI: 1..15,17.. */\n\tbch = hc->chan[ch].bch;\n\tif (!bch) {\n\t\tprintk(KERN_ERR \"%s:internal error ch %d has no bch\\n\",\n\t\t __func__, ch);\n\t\treturn -EINVAL;\n\t}\n\tif (test_and_set_bit(FLG_OPEN, &bch->Flags))\n\t\treturn -EBUSY; /* b-channel can be only open once */\n\tbch->ch.protocol = rq->protocol;\n\trq->ch = &bch->ch;\n\tif (!try_module_get(THIS_MODULE))\n\t\tprintk(KERN_WARNING \"%s:cannot get module\\n\", __func__);\n\treturn 0;\n}\n\nstatic int\nl1oip_dctrl(struct mISDNchannel *ch, u_int cmd, void *arg)\n{\n\tstruct mISDNdevice\t*dev = container_of(ch, struct mISDNdevice, D);\n\tstruct dchannel\t\t*dch = container_of(dev, struct dchannel, dev);\n\tstruct l1oip\t\t\t*hc = dch->hw;\n\tstruct channel_req\t*rq;\n\tint\t\t\terr = 0;\n\n\tif (dch->debug & DEBUG_HW)\n\t\tprintk(KERN_DEBUG \"%s: cmd:%x %p\\n\",\n\t\t __func__, cmd, arg);\n\tswitch (cmd) {\n\tcase OPEN_CHANNEL:\n\t\trq = arg;\n\t\tswitch (rq->protocol) {\n\t\tcase ISDN_P_TE_S0:\n\t\tcase ISDN_P_NT_S0:\n\t\t\tif (hc->pri) {\n\t\t\t\terr = -EINVAL;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\terr = open_dchannel(hc, dch, rq);\n\t\t\tbreak;\n\t\tcase ISDN_P_TE_E1:\n\t\tcase ISDN_P_NT_E1:\n\t\t\tif (!hc->pri) {\n\t\t\t\terr = -EINVAL;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\terr = open_dchannel(hc, dch, rq);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\terr = open_bchannel(hc, dch, rq);\n\t\t}\n\t\tbreak;\n\tcase CLOSE_CHANNEL:\n\t\tif (debug & DEBUG_HW_OPEN)\n\t\t\tprintk(KERN_DEBUG \"%s: dev(%d) close from %p\\n\",\n\t\t\t __func__, dch->dev.id,\n\t\t\t __builtin_return_address(0));\n\t\tmodule_put(THIS_MODULE);\n\t\tbreak;\n\tcase CONTROL_CHANNEL:\n\t\terr = channel_dctrl(dch, arg);\n\t\tbreak;\n\tdefault:\n\t\tif (dch->debug & DEBUG_HW)\n\t\t\tprintk(KERN_DEBUG \"%s: unknown command %x\\n\",\n\t\t\t __func__, cmd);\n\t\terr = -EINVAL;\n\t}\n\treturn err;\n}\n\nstatic int\nhandle_bmsg(struct mISDNchannel *ch, struct sk_buff *skb)\n{\n\tstruct bchannel\t\t*bch = container_of(ch, struct bchannel, ch);\n\tstruct l1oip\t\t\t*hc = bch->hw;\n\tint\t\t\tret = -EINVAL;\n\tstruct mISDNhead\t*hh = mISDN_HEAD_P(skb);\n\tint\t\t\tl, ll, i;\n\tunsigned char\t\t*p;\n\n\tswitch (hh->prim) {\n\tcase PH_DATA_REQ:\n\t\tif (skb->len <= 0) {\n\t\t\tprintk(KERN_WARNING \"%s: skb too small\\n\",\n\t\t\t\t__func__);\n\t\t\tbreak;\n\t\t}\n\t\tif (skb->len > MAX_DFRAME_LEN_L1 || skb->len > L1OIP_MAX_LEN) {\n\t\t\tprintk(KERN_WARNING \"%s: skb too large\\n\",\n\t\t\t\t__func__);\n\t\t\tbreak;\n\t\t}\n\t\t/* check for AIS / ulaw-silence */\n\t\tp = skb->data;\n\t\tl = skb->len;\n\t\tfor (i = 0; i < l; i++) {\n\t\t\tif (*p++ != 0xff)\n\t\t\t\tbreak;\n\t\t}\n\t\tif (i == l) {\n\t\t\tif (debug & DEBUG_L1OIP_MSG)\n\t\t\t\tprintk(KERN_DEBUG \"%s: got AIS, not sending, \"\n\t\t\t\t\t\"but counting\\n\", __func__);\n\t\t\thc->chan[bch->slot].tx_counter += l;\n\t\t\tskb_trim(skb, 0);\n\t\t\tqueue_ch_frame(ch, PH_DATA_CNF, hh->id, skb);\n\t\t\treturn 0;\n\t\t}\n\t\t/* check for silence */\n\t\tp = skb->data;\n\t\tl = skb->len;\n\t\tfor (i = 0; i < l; i++) {\n\t\t\tif (*p++ != 0x2a)\n\t\t\t\tbreak;\n\t\t}\n\t\tif (i == l) {\n\t\t\tif (debug & DEBUG_L1OIP_MSG)\n\t\t\t\tprintk(KERN_DEBUG \"%s: got silence, not sending\"\n\t\t\t\t\t\", but counting\\n\", __func__);\n\t\t\thc->chan[bch->slot].tx_counter += l;\n\t\t\tskb_trim(skb, 0);\n\t\t\tqueue_ch_frame(ch, PH_DATA_CNF, hh->id, skb);\n\t\t\treturn 0;\n\t\t}\n\n\t\t/* send frame */\n\t\tp = skb->data;\n\t\tl = skb->len;\n\t\twhile (l) {\n\t\t\tll = (l < L1OIP_MAX_PERFRAME) ? l : L1OIP_MAX_PERFRAME;\n\t\t\tl1oip_socket_send(hc, hc->codec, bch->slot, 0,\n\t\t\t\thc->chan[bch->slot].tx_counter, p, ll);\n\t\t\thc->chan[bch->slot].tx_counter += ll;\n\t\t\tp += ll;\n\t\t\tl -= ll;\n\t\t}\n\t\tskb_trim(skb, 0);\n\t\tqueue_ch_frame(ch, PH_DATA_CNF, hh->id, skb);\n\t\treturn 0;\n\tcase PH_ACTIVATE_REQ:\n\t\tif (debug & (DEBUG_L1OIP_MSG|DEBUG_L1OIP_SOCKET))\n\t\t\tprintk(KERN_DEBUG \"%s: PH_ACTIVATE channel %d (1..%d)\\n\"\n\t\t\t\t, __func__, bch->slot, hc->b_num+1);\n\t\thc->chan[bch->slot].codecstate = 0;\n\t\ttest_and_set_bit(FLG_ACTIVE, &bch->Flags);\n\t\tskb_trim(skb, 0);\n\t\tqueue_ch_frame(ch, PH_ACTIVATE_IND, hh->id, skb);\n\t\treturn 0;\n\tcase PH_DEACTIVATE_REQ:\n\t\tif (debug & (DEBUG_L1OIP_MSG|DEBUG_L1OIP_SOCKET))\n\t\t\tprintk(KERN_DEBUG \"%s: PH_DEACTIVATE channel %d \"\n\t\t\t\t\"(1..%d)\\n\", __func__, bch->slot,\n\t\t\t\thc->b_num+1);\n\t\ttest_and_clear_bit(FLG_ACTIVE, &bch->Flags);\n\t\tskb_trim(skb, 0);\n\t\tqueue_ch_frame(ch, PH_DEACTIVATE_IND, hh->id, skb);\n\t\treturn 0;\n\t}\n\tif (!ret)\n\t\tdev_kfree_skb(skb);\n\treturn ret;\n}\n\nstatic int\nchannel_bctrl(struct bchannel *bch, struct mISDN_ctrl_req *cq)\n{\n\tint\t\t\tret = 0;\n\tstruct dsp_features\t*features =\n\t\t(struct dsp_features *)(*((u_long *)&cq->p1));\n\n\tswitch (cq->op) {\n\tcase MISDN_CTRL_GETOP:\n\t\tcq->op = MISDN_CTRL_HW_FEATURES_OP;\n\t\tbreak;\n\tcase MISDN_CTRL_HW_FEATURES: /* fill features structure */\n\t\tif (debug & DEBUG_L1OIP_MSG)\n\t\t\tprintk(KERN_DEBUG \"%s: HW_FEATURE request\\n\",\n\t\t\t __func__);\n\t\t/* create confirm */\n\t\tfeatures->unclocked = 1;\n\t\tfeatures->unordered = 1;\n\t\tbreak;\n\tdefault:\n\t\tprintk(KERN_WARNING \"%s: unknown Op %x\\n\",\n\t\t __func__, cq->op);\n\t\tret = -EINVAL;\n\t\tbreak;\n\t}\n\treturn ret;\n}\n\nstatic int\nl1oip_bctrl(struct mISDNchannel *ch, u_int cmd, void *arg)\n{\n\tstruct bchannel\t*bch = container_of(ch, struct bchannel, ch);\n\tint\t\terr = -EINVAL;\n\n\tif (bch->debug & DEBUG_HW)\n\t\tprintk(KERN_DEBUG \"%s: cmd:%x %p\\n\",\n\t\t __func__, cmd, arg);\n\tswitch (cmd) {\n\tcase CLOSE_CHANNEL:\n\t\ttest_and_clear_bit(FLG_OPEN, &bch->Flags);\n\t\ttest_and_clear_bit(FLG_ACTIVE, &bch->Flags);\n\t\tch->protocol = ISDN_P_NONE;\n\t\tch->peer = NULL;\n\t\tmodule_put(THIS_MODULE);\n\t\terr = 0;\n\t\tbreak;\n\tcase CONTROL_CHANNEL:\n\t\terr = channel_bctrl(bch, arg);\n\t\tbreak;\n\tdefault:\n\t\tprintk(KERN_WARNING \"%s: unknown prim(%x)\\n\",\n\t\t\t__func__, cmd);\n\t}\n\treturn err;\n}\n\n\n/*\n * cleanup module and stack\n */\nstatic void\nrelease_card(struct l1oip *hc)\n{\n\tint\tch;\n\n\tif (timer_pending(&hc->keep_tl))\n\t\tdel_timer(&hc->keep_tl);\n\n\tif (timer_pending(&hc->timeout_tl))\n\t\tdel_timer(&hc->timeout_tl);\n\n\tif (hc->socket_thread)\n\t\tl1oip_socket_close(hc);\n\n\tif (hc->registered && hc->chan[hc->d_idx].dch)\n\t\tmISDN_unregister_device(&hc->chan[hc->d_idx].dch->dev);\n\tfor (ch = 0; ch < 128; ch++) {\n\t\tif (hc->chan[ch].dch) {\n\t\t\tmISDN_freedchannel(hc->chan[ch].dch);\n\t\t\tkfree(hc->chan[ch].dch);\n\t\t}\n\t\tif (hc->chan[ch].bch) {\n\t\t\tmISDN_freebchannel(hc->chan[ch].bch);\n\t\t\tkfree(hc->chan[ch].bch);\n#ifdef REORDER_DEBUG\n\t\t\tif (hc->chan[ch].disorder_skb)\n\t\t\t\tdev_kfree_skb(hc->chan[ch].disorder_skb);\n#endif\n\t\t}\n\t}\n\n\tspin_lock(&l1oip_lock);\n\tlist_del(&hc->list);\n\tspin_unlock(&l1oip_lock);\n\n\tkfree(hc);\n}\n\nstatic void\nl1oip_cleanup(void)\n{\n\tstruct l1oip *hc, *next;\n\n\tlist_for_each_entry_safe(hc, next, &l1oip_ilist, list)\n\t\trelease_card(hc);\n\n\tl1oip_4bit_free();\n}\n\n\n/*\n * module and stack init\n */\nstatic int\ninit_card(struct l1oip *hc, int pri, int bundle)\n{\n\tstruct dchannel\t*dch;\n\tstruct bchannel\t*bch;\n\tint\t\tret;\n\tint\t\ti, ch;\n\n\tspin_lock_init(&hc->socket_lock);\n\thc->idx = l1oip_cnt;\n\thc->pri = pri;\n\thc->d_idx = pri ? 16 : 3;\n\thc->b_num = pri ? 30 : 2;\n\thc->bundle = bundle;\n\tif (hc->pri)\n\t\tsprintf(hc->name, \"l1oip-e1.%d\", l1oip_cnt + 1);\n\telse\n\t\tsprintf(hc->name, \"l1oip-s0.%d\", l1oip_cnt + 1);\n\n\tswitch (codec[l1oip_cnt]) {\n\tcase 0: /* as is */\n\tcase 1: /* alaw */\n\tcase 2: /* ulaw */\n\tcase 3: /* 4bit */\n\t\tbreak;\n\tdefault:\n\t\tprintk(KERN_ERR \"Codec(%d) not supported.\\n\",\n\t\t\tcodec[l1oip_cnt]);\n\t\treturn -EINVAL;\n\t}\n\thc->codec = codec[l1oip_cnt];\n\tif (debug & DEBUG_L1OIP_INIT)\n\t\tprintk(KERN_DEBUG \"%s: using codec %d\\n\",\n\t\t\t__func__, hc->codec);\n\n\tif (id[l1oip_cnt] == 0) {\n\t\tprintk(KERN_WARNING \"Warning: No 'id' value given or \"\n\t\t\t\"0, this is highly unsecure. Please use 32 \"\n\t\t\t\"bit randmom number 0x...\\n\");\n\t}\n\thc->id = id[l1oip_cnt];\n\tif (debug & DEBUG_L1OIP_INIT)\n\t\tprintk(KERN_DEBUG \"%s: using id 0x%x\\n\", __func__, hc->id);\n\n\thc->ondemand = ondemand[l1oip_cnt];\n\tif (hc->ondemand && !hc->id) {\n\t\tprintk(KERN_ERR \"%s: ondemand option only allowed in \"\n\t\t\t\"conjunction with non 0 ID\\n\", __func__);\n\t\treturn -EINVAL;\n\t}\n\n\tif (limit[l1oip_cnt])\n\t\thc->b_num = limit[l1oip_cnt];\n\tif (!pri && hc->b_num > 2) {\n\t\tprintk(KERN_ERR \"Maximum limit for BRI interface is 2 \"\n\t\t\t\"channels.\\n\");\n\t\treturn -EINVAL;\n\t}\n\tif (pri && hc->b_num > 126) {\n\t\tprintk(KERN_ERR \"Maximum limit for PRI interface is 126 \"\n\t\t\t\"channels.\\n\");\n\t\treturn -EINVAL;\n\t}\n\tif (pri && hc->b_num > 30) {\n\t\tprintk(KERN_WARNING \"Maximum limit for BRI interface is 30 \"\n\t\t\t\"channels.\\n\");\n\t\tprintk(KERN_WARNING \"Your selection of %d channels must be \"\n\t\t\t\"supported by application.\\n\", hc->limit);\n\t}\n\n\thc->remoteip = ip[l1oip_cnt<<2] << 24\n\t\t | ip[(l1oip_cnt<<2)+1] << 16\n\t\t | ip[(l1oip_cnt<<2)+2] << 8\n\t\t | ip[(l1oip_cnt<<2)+3];\n\thc->localport = port[l1oip_cnt]?:(L1OIP_DEFAULTPORT+l1oip_cnt);\n\tif (remoteport[l1oip_cnt])\n\t\thc->remoteport = remoteport[l1oip_cnt];\n\telse\n\t\thc->remoteport = hc->localport;\n\tif (debug & DEBUG_L1OIP_INIT)\n\t\tprintk(KERN_DEBUG \"%s: using local port %d remote ip \"\n\t\t\t\"%d.%d.%d.%d port %d ondemand %d\\n\", __func__,\n\t\t\thc->localport, hc->remoteip >> 24,\n\t\t\t(hc->remoteip >> 16) & 0xff,\n\t\t\t(hc->remoteip >> 8) & 0xff, hc->remoteip & 0xff,\n\t\t\thc->remoteport, hc->ondemand);\n\n\tdch = kzalloc(sizeof(struct dchannel), GFP_KERNEL);\n\tif (!dch)\n\t\treturn -ENOMEM;\n\tdch->debug = debug;\n\tmISDN_initdchannel(dch, MAX_DFRAME_LEN_L1, NULL);\n\tdch->hw = hc;\n\tif (pri)\n\t\tdch->dev.Dprotocols = (1 << ISDN_P_TE_E1) | (1 << ISDN_P_NT_E1);\n\telse\n\t\tdch->dev.Dprotocols = (1 << ISDN_P_TE_S0) | (1 << ISDN_P_NT_S0);\n\tdch->dev.Bprotocols = (1 << (ISDN_P_B_RAW & ISDN_P_B_MASK)) |\n\t (1 << (ISDN_P_B_HDLC & ISDN_P_B_MASK));\n\tdch->dev.D.send = handle_dmsg;\n\tdch->dev.D.ctrl = l1oip_dctrl;\n\tdch->dev.nrbchan = hc->b_num;\n\tdch->slot = hc->d_idx;\n\thc->chan[hc->d_idx].dch = dch;\n\ti = 1;\n\tfor (ch = 0; ch < dch->dev.nrbchan; ch++) {\n\t\tif (ch == 15)\n\t\t\ti++;\n\t\tbch = kzalloc(sizeof(struct bchannel), GFP_KERNEL);\n\t\tif (!bch) {\n\t\t\tprintk(KERN_ERR \"%s: no memory for bchannel\\n\",\n\t\t\t __func__);\n\t\t\treturn -ENOMEM;\n\t\t}\n\t\tbch->nr = i + ch;\n\t\tbch->slot = i + ch;\n\t\tbch->debug = debug;\n\t\tmISDN_initbchannel(bch, MAX_DATA_MEM);\n\t\tbch->hw = hc;\n\t\tbch->ch.send = handle_bmsg;\n\t\tbch->ch.ctrl = l1oip_bctrl;\n\t\tbch->ch.nr = i + ch;\n\t\tlist_add(&bch->ch.list, &dch->dev.bchannels);\n\t\thc->chan[i + ch].bch = bch;\n\t\tset_channelmap(bch->nr, dch->dev.channelmap);\n\t}\n\t/* TODO: create a parent device for this driver */\n\tret = mISDN_register_device(&dch->dev, NULL, hc->name);\n\tif (ret)\n\t\treturn ret;\n\thc->registered = 1;\n\n\tif (debug & DEBUG_L1OIP_INIT)\n\t\tprintk(KERN_DEBUG \"%s: Setting up network card(%d)\\n\",\n\t\t\t__func__, l1oip_cnt + 1);\n\tret = l1oip_socket_open(hc);\n\tif (ret)\n\t\treturn ret;\n\n\thc->keep_tl.function = (void *)l1oip_keepalive;\n\thc->keep_tl.data = (ulong)hc;\n\tinit_timer(&hc->keep_tl);\n\thc->keep_tl.expires = jiffies + 2*HZ; /* two seconds first time */\n\tadd_timer(&hc->keep_tl);\n\n\thc->timeout_tl.function = (void *)l1oip_timeout;\n\thc->timeout_tl.data = (ulong)hc;\n\tinit_timer(&hc->timeout_tl);\n\thc->timeout_on = 0; /* state that we have timer off */\n\n\treturn 0;\n}\n\nstatic int __init\nl1oip_init(void)\n{\n\tint\t\tpri, bundle;\n\tstruct l1oip\t\t*hc;\n\tint\t\tret;\n\n\tprintk(KERN_INFO \"mISDN: Layer-1-over-IP driver Rev. %s\\n\",\n\t\tl1oip_revision);\n\n\tINIT_LIST_HEAD(&l1oip_ilist);\n\tspin_lock_init(&l1oip_lock);\n\n\tif (l1oip_4bit_alloc(ulaw))\n\t\treturn -ENOMEM;\n\n\tl1oip_cnt = 0;\n\twhile (l1oip_cnt < MAX_CARDS && type[l1oip_cnt]) {\n\t\tswitch (type[l1oip_cnt] & 0xff) {\n\t\tcase 1:\n\t\t\tpri = 0;\n\t\t\tbundle = 0;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tpri = 1;\n\t\t\tbundle = 0;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tpri = 0;\n\t\t\tbundle = 1;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tpri = 1;\n\t\t\tbundle = 1;\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tprintk(KERN_ERR \"Card type(%d) not supported.\\n\",\n\t\t\t\ttype[l1oip_cnt] & 0xff);\n\t\t\tl1oip_cleanup();\n\t\t\treturn -EINVAL;\n\t\t}\n\n\t\tif (debug & DEBUG_L1OIP_INIT)\n\t\t\tprintk(KERN_DEBUG \"%s: interface %d is %s with %s.\\n\",\n\t\t\t __func__, l1oip_cnt, pri ? \"PRI\" : \"BRI\",\n\t\t\t bundle ? \"bundled IP packet for all B-channels\" :\n\t\t\t \"seperate IP packets for every B-channel\");\n\n\t\thc = kzalloc(sizeof(struct l1oip), GFP_ATOMIC);\n\t\tif (!hc) {\n\t\t\tprintk(KERN_ERR \"No kmem for L1-over-IP driver.\\n\");\n\t\t\tl1oip_cleanup();\n\t\t\treturn -ENOMEM;\n\t\t}\n\t\tINIT_WORK(&hc->workq, (void *)l1oip_send_bh);\n\n\t\tspin_lock(&l1oip_lock);\n\t\tlist_add_tail(&hc->list, &l1oip_ilist);\n\t\tspin_unlock(&l1oip_lock);\n\n\t\tret = init_card(hc, pri, bundle);\n\t\tif (ret) {\n\t\t\tl1oip_cleanup();\n\t\t\treturn ret;\n\t\t}\n\n\t\tl1oip_cnt++;\n\t}\n\tprintk(KERN_INFO \"%d virtual devices registered\\n\", l1oip_cnt);\n\treturn 0;\n}\n\nmodule_init(l1oip_init);\nmodule_exit(l1oip_cleanup);\n\n"} +{"text": "/*\n * Copyright (C) 1999-2001, 2005, 2007 Free Software Foundation, Inc.\n * This file is part of the GNU LIBICONV Library.\n *\n * The GNU LIBICONV Library is free software; you can redistribute it\n * and/or modify it under the terms of the GNU Library General Public\n * License as published by the Free Software Foundation; either version 2\n * of the License, or (at your option) any later version.\n *\n * The GNU LIBICONV Library is distributed in the hope that it will be\n * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Library General Public\n * License along with the GNU LIBICONV Library; see the file COPYING.LIB.\n * If not, write to the Free Software Foundation, Inc., 51 Franklin Street,\n * Fifth Floor, Boston, MA 02110-1301, USA.\n */\n\n/*\n * CP949 is EUC-KR, extended with UHC (Unified Hangul Code).\n *\n * Some variants of CP949 (in JDK, Windows-2000, ICU) also add:\n *\n * 2. Private area mappings:\n *\n * code Unicode\n * 0xC9{A1..FE} U+E000..U+E05D\n * 0xFE{A1..FE} U+E05E..U+E0BB\n *\n * We add them too because, although there are backward compatibility problems\n * when a character from a private area is moved to an official Unicode code\n * point, they are useful for some people in practice.\n */\n\n#include \"uhc_1.h\"\n#include \"uhc_2.h\"\n\nstatic int\ncp949_mbtowc (conv_t conv, ucs4_t *pwc, const unsigned char *s, int n)\n{\n unsigned char c = *s;\n /* Code set 0 (ASCII) */\n if (c < 0x80)\n return ascii_mbtowc(conv,pwc,s,n);\n /* UHC part 1 */\n if (c >= 0x81 && c <= 0xa0)\n return uhc_1_mbtowc(conv,pwc,s,n);\n if (c >= 0xa1 && c < 0xff) {\n if (n < 2)\n return RET_TOOFEW(0);\n {\n unsigned char c2 = s[1];\n if (c2 < 0xa1)\n /* UHC part 2 */\n return uhc_2_mbtowc(conv,pwc,s,n);\n else if (c2 < 0xff && !(c == 0xa2 && c2 == 0xe8)) {\n /* Code set 1 (KS C 5601-1992, now KS X 1001:1998) */\n unsigned char buf[2];\n int ret;\n buf[0] = c-0x80; buf[1] = c2-0x80;\n ret = ksc5601_mbtowc(conv,pwc,buf,2);\n if (ret != RET_ILSEQ)\n return ret;\n /* User-defined characters */\n if (c == 0xc9) {\n *pwc = 0xe000 + (c2 - 0xa1);\n return 2;\n }\n if (c == 0xfe) {\n *pwc = 0xe05e + (c2 - 0xa1);\n return 2;\n }\n }\n }\n }\n return RET_ILSEQ;\n}\n\nstatic int\ncp949_wctomb (conv_t conv, unsigned char *r, ucs4_t wc, int n)\n{\n unsigned char buf[2];\n int ret;\n\n /* Code set 0 (ASCII) */\n ret = ascii_wctomb(conv,r,wc,n);\n if (ret != RET_ILUNI)\n return ret;\n\n /* Code set 1 (KS C 5601-1992, now KS X 1001:1998) */\n if (wc != 0x327e) {\n ret = ksc5601_wctomb(conv,buf,wc,2);\n if (ret != RET_ILUNI) {\n if (ret != 2) abort();\n if (n < 2)\n return RET_TOOSMALL;\n r[0] = buf[0]+0x80;\n r[1] = buf[1]+0x80;\n return 2;\n }\n }\n\n /* UHC */\n if (wc >= 0xac00 && wc < 0xd7a4) {\n if (wc < 0xc8a5)\n return uhc_1_wctomb(conv,r,wc,n);\n else\n return uhc_2_wctomb(conv,r,wc,n);\n }\n\n /* User-defined characters */\n if (wc >= 0xe000 && wc < 0xe0bc) {\n if (n < 2)\n return RET_TOOSMALL;\n if (wc < 0xe05e) {\n r[0] = 0xc9;\n r[1] = wc - 0xe000 + 0xa1;\n } else {\n r[0] = 0xfe;\n r[1] = wc - 0xe05e + 0xa1;\n }\n return 2;\n }\n\n return RET_ILUNI;\n}\n"} +{"text": "1551 1575391503191 httpcache-v1\nMethod: POST\nURL: https://www.notion.so/api/v3/getRecordValues\nBody:+110\n{\n \"requests\": [\n {\n \"id\": \"fa84fd9d-a5ae-4351-979d-9f50ccadbe26\",\n \"table\": \"block\"\n }\n ]\n}\nResponse:+1351\n{\n \"results\": [\n {\n \"role\": \"comment_only\",\n \"value\": {\n \"alive\": true,\n \"content\": [\n \"1e0dbd70-df1a-463b-a564-bbf5c657858f\",\n \"92ffd51d-cc31-4e4d-9bcc-39c7eecf63f4\",\n \"554d6cc4-0f5b-4d29-bc23-b38334069967\",\n \"47f7ae6e-e6e8-4fcc-bca8-e51ed52dcb54\",\n \"13a73ac8-fcf7-4bf2-8914-e59944965fdd\",\n \"12949740-ea29-44f0-9b14-6249759c7af5\"\n ],\n \"created_by\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"created_by_id\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"created_by_table\": \"notion_user\",\n \"created_time\": 1550448142893,\n \"format\": {\n \"page_full_width\": true,\n \"page_small_text\": true\n },\n \"id\": \"fa84fd9d-a5ae-4351-979d-9f50ccadbe26\",\n \"ignore_block_count\": true,\n \"last_edited_by\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"last_edited_by_id\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"last_edited_by_table\": \"notion_user\",\n \"last_edited_time\": 1550448142893,\n \"parent_id\": \"92a41c6c-4c93-4fb6-a347-2f5cf0a7d2db\",\n \"parent_table\": \"block\",\n \"properties\": {\n \"title\": [\n [\n \"Google Sign In with Helper class\"\n ]\n ]\n },\n \"type\": \"page\",\n \"version\": 7\n }\n }\n ]\n}\n28672 1575391503192 httpcache-v1\nMethod: POST\nURL: https://www.notion.so/api/v3/loadPageChunk\nBody:+152\n{\n \"chunkNumber\": 0,\n \"cursor\": {\n \"stack\": []\n },\n \"limit\": 50,\n \"pageId\": \"fa84fd9d-a5ae-4351-979d-9f50ccadbe26\",\n \"verticalColumns\": false\n}\nResponse:+28431\n{\n \"cursor\": {\n \"stack\": []\n },\n \"recordMap\": {\n \"block\": {\n \"12949740-ea29-44f0-9b14-6249759c7af5\": {\n \"role\": \"comment_only\",\n \"value\": {\n \"alive\": true,\n \"created_by\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"created_time\": 1550448142893,\n \"id\": \"12949740-ea29-44f0-9b14-6249759c7af5\",\n \"ignore_block_count\": true,\n \"last_edited_by\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"last_edited_time\": 1550448142893,\n \"parent_id\": \"fa84fd9d-a5ae-4351-979d-9f50ccadbe26\",\n \"parent_table\": \"block\",\n \"properties\": {\n \"language\": [\n [\n \"Plain Text\"\n ]\n ],\n \"title\": [\n [\n \"// [START onactivityresult]\\n @Override\\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\\n super.onActivityResult(requestCode, resultCode, data);\\n\\n // Result returned from launching the Intent from GoogleSignInApi.getSignInIntent(...);\\n if (requestCode == GoogleSignInHelper.RC_SIGN_IN) {\\n GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);\\n if (result.isSuccess()) {\\n googleSignInHelper.getGoogleAccountDetails(result);\\n } else {\\n // Google Sign In failed, update UI appropriately\\n // [START_EXCLUDE]\\n Log.d(TAG, \\\"signInWith Google failed\\\");\\n // [END_EXCLUDE]\\n }\\n }\\n }\\n // [END onactivityresult]\\n\\n// [START signin]\\n public void signIn() {\\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(googleSignInHelper.getGoogleClient());\\n startActivityForResult(signInIntent, GoogleSignInHelper.RC_SIGN_IN);\\n }\\n\\n // [END signin]\"\n ]\n ]\n },\n \"type\": \"code\",\n \"version\": 1\n }\n },\n \"13a73ac8-fcf7-4bf2-8914-e59944965fdd\": {\n \"role\": \"comment_only\",\n \"value\": {\n \"alive\": true,\n \"created_by\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"created_time\": 1550448142893,\n \"id\": \"13a73ac8-fcf7-4bf2-8914-e59944965fdd\",\n \"ignore_block_count\": true,\n \"last_edited_by\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"last_edited_time\": 1550448142893,\n \"parent_id\": \"fa84fd9d-a5ae-4351-979d-9f50ccadbe26\",\n \"parent_table\": \"block\",\n \"properties\": {\n \"title\": [\n [\n \"Add below code to your \"\n ],\n [\n \"OnActivityResult\",\n [\n [\n \"c\"\n ]\n ]\n ],\n [\n \" in Activity file:\"\n ]\n ]\n },\n \"type\": \"text\",\n \"version\": 1\n }\n },\n \"1e0dbd70-df1a-463b-a564-bbf5c657858f\": {\n \"role\": \"comment_only\",\n \"value\": {\n \"alive\": true,\n \"created_by\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"created_time\": 1550448142890,\n \"id\": \"1e0dbd70-df1a-463b-a564-bbf5c657858f\",\n \"ignore_block_count\": true,\n \"last_edited_by\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"last_edited_time\": 1550448142890,\n \"parent_id\": \"fa84fd9d-a5ae-4351-979d-9f50ccadbe26\",\n \"parent_table\": \"block\",\n \"properties\": {\n \"title\": [\n [\n \"Add below to your \"\n ],\n [\n \"build.gradle\",\n [\n [\n \"c\"\n ]\n ]\n ],\n [\n \" out of \"\n ],\n [\n \"android\",\n [\n [\n \"c\"\n ]\n ]\n ],\n [\n \" tag:\"\n ]\n ]\n },\n \"type\": \"text\",\n \"version\": 1\n }\n },\n \"47f7ae6e-e6e8-4fcc-bca8-e51ed52dcb54\": {\n \"role\": \"comment_only\",\n \"value\": {\n \"alive\": true,\n \"created_by\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"created_time\": 1550448142893,\n \"id\": \"47f7ae6e-e6e8-4fcc-bca8-e51ed52dcb54\",\n \"ignore_block_count\": true,\n \"last_edited_by\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"last_edited_time\": 1550448142893,\n \"parent_id\": \"fa84fd9d-a5ae-4351-979d-9f50ccadbe26\",\n \"parent_table\": \"block\",\n \"properties\": {\n \"language\": [\n [\n \"Plain Text\"\n ]\n ],\n \"title\": [\n [\n \"/**\\n * Created by Andy\\n */\\npublic class GoogleSignInHelper implements GoogleApiClient.OnConnectionFailedListener,\\n GoogleApiClient.ConnectionCallbacks {\\n private static final String TAG = GoogleSignInHelper.class.getSimpleName();\\n\\n private static GoogleSignInHelper googleSignInHelper;\\n private AppCompatActivity mActivity;\\n private GoogleApiClient mGoogleApiClient;\\n public static final int RC_SIGN_IN = 9001;\\n private boolean isLoggingOut = false;\\n\\n public static GoogleSignInHelper newInstance(AppCompatActivity mActivity) {\\n if (googleSignInHelper == null) {\\n googleSignInHelper = new GoogleSignInHelper(mActivity, fireBaseAuthHelper);\\n }\\n return googleSignInHelper;\\n }\\n\\n public GoogleSignInHelper(AppCompatActivity mActivity) {\\n this.mActivity = mActivity;\\n initGoogleSignIn();\\n }\\n\\n\\n private void initGoogleSignIn() {\\n // [START config_sign_in]\\n // Configure Google Sign In\\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\\n .requestIdToken(mActivity.getString(R.string.default_web_client_id))\\n .requestEmail()\\n .build();\\n // [END config_sign_in]\\n\\n mGoogleApiClient = new GoogleApiClient.Builder(mActivity)\\n .enableAutoManage(mActivity /* FragmentActivity */, this /* OnConnectionFailedListener */)\\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\\n .addConnectionCallbacks(this)\\n .build();\\n\\n }\\n \\n @Override\\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\\n // An unresolvable error has occurred and Google APIs (including Sign-In) will not\\n // be available.\\n Log.d(TAG, \\\"onConnectionFailed:\\\" + connectionResult);\\n Toast.makeText(mActivity, \\\"Google Play Services error.\\\", Toast.LENGTH_SHORT).show();\\n }\\n\\n public void getGoogleAccountDetails(GoogleSignInResult result) {\\n // Google Sign In was successful, authenticate with FireBase\\n GoogleSignInAccount account = result.getSignInAccount();\\n // You are now logged into Google\\n }\\n public void signOut() {\\n\\n if (mGoogleApiClient.isConnected()) {\\n\\n // Google sign out\\n Auth.GoogleSignInApi.signOut(mGoogleApiClient).setResultCallback(\\n new ResultCallback\\u003cStatus\\u003e() {\\n @Override\\n public void onResult(@NonNull Status status) {\\n isLoggingOut = false;\\n }\\n });\\n } else {\\n isLoggingOut = true;\\n }\\n }\\n\\n public GoogleApiClient getGoogleClient() {\\n return mGoogleApiClient;\\n }\\n\\n @Override\\n public void onConnected(@Nullable Bundle bundle) {\\n Log.w(TAG, \\\"onConnected\\\");\\n if (isLoggingOut) {\\n signOut();\\n }\\n }\\n\\n @Override\\n public void onConnectionSuspended(int i) {\\n Log.w(TAG, \\\"onConnectionSuspended\\\");\\n }\\n}\"\n ]\n ]\n },\n \"type\": \"code\",\n \"version\": 1\n }\n },\n \"554d6cc4-0f5b-4d29-bc23-b38334069967\": {\n \"role\": \"comment_only\",\n \"value\": {\n \"alive\": true,\n \"created_by\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"created_time\": 1550448142893,\n \"id\": \"554d6cc4-0f5b-4d29-bc23-b38334069967\",\n \"ignore_block_count\": true,\n \"last_edited_by\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"last_edited_time\": 1550448142893,\n \"parent_id\": \"fa84fd9d-a5ae-4351-979d-9f50ccadbe26\",\n \"parent_table\": \"block\",\n \"properties\": {\n \"title\": [\n [\n \"Add below helper class to your util package:\"\n ]\n ]\n },\n \"type\": \"text\",\n \"version\": 1\n }\n },\n \"92a41c6c-4c93-4fb6-a347-2f5cf0a7d2db\": {\n \"role\": \"comment_only\",\n \"value\": {\n \"alive\": true,\n \"content\": [\n \"e1cb53b6-6102-44b1-9d34-b91771c53f66\",\n \"fa84fd9d-a5ae-4351-979d-9f50ccadbe26\"\n ],\n \"created_by\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"created_time\": 1550448120000,\n \"format\": {\n \"page_full_width\": true,\n \"page_small_text\": true\n },\n \"id\": \"92a41c6c-4c93-4fb6-a347-2f5cf0a7d2db\",\n \"last_edited_by\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"last_edited_time\": 1550448480000,\n \"parent_id\": \"f90b0a6b-6483-43e2-8dc5-ed6e8f5c0780\",\n \"parent_table\": \"block\",\n \"permissions\": [\n {\n \"role\": \"editor\",\n \"type\": \"user_permission\",\n \"user_id\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\"\n }\n ],\n \"properties\": {\n \"title\": [\n [\n \"Integrate Google Sign In\"\n ]\n ]\n },\n \"type\": \"page\",\n \"version\": 41\n }\n },\n \"92ffd51d-cc31-4e4d-9bcc-39c7eecf63f4\": {\n \"role\": \"comment_only\",\n \"value\": {\n \"alive\": true,\n \"created_by\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"created_time\": 1550448142893,\n \"id\": \"92ffd51d-cc31-4e4d-9bcc-39c7eecf63f4\",\n \"ignore_block_count\": true,\n \"last_edited_by\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"last_edited_time\": 1550448142893,\n \"parent_id\": \"fa84fd9d-a5ae-4351-979d-9f50ccadbe26\",\n \"parent_table\": \"block\",\n \"properties\": {\n \"language\": [\n [\n \"Plain Text\"\n ]\n ],\n \"title\": [\n [\n \"// Apply plug-in to app.\\napply plugin: 'com.google.gms.google-services'\"\n ]\n ]\n },\n \"type\": \"code\",\n \"version\": 1\n }\n },\n \"f90b0a6b-6483-43e2-8dc5-ed6e8f5c0780\": {\n \"role\": \"comment_only\",\n \"value\": {\n \"alive\": true,\n \"content\": [\n \"27fdf592-c1e2-48bf-ad9e-f2f466767a20\",\n \"354073c9-7040-4528-8c35-dbbbf7992ed5\",\n \"40c765e7-6562-4ee9-8ed0-8024e3def515\",\n \"b9098913-7e61-4386-8d02-ca92ab88b324\",\n \"f23a5cf1-4ba4-434a-b57a-4f6b72fa1dfd\",\n \"4b7449f0-077a-4e41-841b-d5c551629808\",\n \"f7aa3cbf-18e0-4aee-8ec1-725bd9ccb0bc\",\n \"b12b5220-f26c-4aeb-8130-af5506f0f546\",\n \"ffa90cd3-3eea-424c-8f80-34de4ba10bac\",\n \"3cf74dd2-01e2-497e-a2e0-ef450e2751fd\",\n \"60c44f62-2826-4f4e-b62c-62999d7b5b08\",\n \"b504a8f4-8c84-4c2e-8acd-bca678ce8ae8\",\n \"58b149d4-6a66-400d-bae4-6d84bc9e8211\",\n \"b81f95e2-9af4-43b2-ae8a-eacf3d61b9e0\",\n \"dad79538-df78-4fb3-ab61-93449f54b92e\",\n \"e5da3f10-048a-4ac6-8dfe-d0f8b834b9b8\",\n \"09fb42bc-c08a-479e-85ec-dcd14413d8e1\",\n \"9cd3cdb2-fb8b-4bc2-916b-a38f0022b43b\",\n \"a2530ba9-8b01-4c7b-ad00-037bf9f232a2\",\n \"20f73399-dea2-4d47-bee6-68060ec883f9\",\n \"3061cbb2-214c-4375-b975-440c3b41e566\",\n \"577ee794-a9c3-4ded-8824-6307ea4044f3\",\n \"e851dd0d-078a-4cf4-b0e2-4fb9a34577ba\",\n \"daef7c65-a1e3-4cb4-a562-7e81aabc337c\",\n \"edbd8f8d-6b57-43d2-9269-0b0cf3e6165c\",\n \"ae4c3948-e722-49ba-a5df-65778b9c1e91\",\n \"b698fa46-dece-4676-a681-eecc1a3388d2\",\n \"7519d0d9-ef43-40c7-bea1-eb520af1f62f\",\n \"f2b20dc9-ee75-45ae-b0ee-88e0ced263c9\",\n \"2d6f6857-e53d-4b60-b433-e156d81c55e5\",\n \"1096b9a5-3f3a-425e-ac66-0adc4166be45\",\n \"6190cb6e-dc43-458e-9fc6-34c0e0c69fa6\",\n \"b33bd62e-4631-43c5-a9ae-ac47eadfb3e0\",\n \"e5dfd590-a7f4-4ea2-b744-e87d7d45fabf\",\n \"e5dbc80b-9ce3-4932-9808-0a7fbefb59b3\",\n \"2bfda67f-291e-4f52-a037-53bdbbc944bc\",\n \"7145866f-7d62-48b0-a57b-66c494eb5a9f\",\n \"3ffccc71-cbb9-4ebc-8ff8-78efb3575845\",\n \"3fe483f2-e060-41f7-9bc7-8fa4711fa6bb\",\n \"826a2947-547d-46b5-8714-0282f94a1967\",\n \"45ae2e3d-3201-45c2-9924-4c3dd873a5c3\",\n \"1ef1aff9-7d3c-456d-abfd-937eb8756547\",\n \"6a6fe5f1-6362-47c6-bac7-61c76a0a464d\",\n \"fad6acf8-b0d5-4770-85ab-bd87a2e5410d\",\n \"f505a59f-f887-4749-88d5-2d8b5be7947f\",\n \"621f346c-f9c6-4d5c-8e6e-6106d643fcce\",\n \"6a7c57a2-8f24-43b5-974d-d38ab99fdee8\",\n \"80a93a9d-a581-423a-8907-8a480a93f52d\",\n \"6ffff372-f722-4664-9978-ad7101e6d3c6\",\n \"cf2c473f-5e00-4648-971f-43398123cc33\",\n \"1930100d-c8dd-4c8d-ab3f-7ad60a4616a4\",\n \"6349c926-1894-426b-9bd7-9ce6b6ce8b2f\",\n \"f5d212d3-d5ba-4aa5-b670-a737a4d6a212\",\n \"19ac457b-73f1-4fa2-960e-88f42ddbee76\",\n \"42ecfc4e-4f11-4487-8d7a-15abe78a4672\",\n \"3d7c457d-2120-4fab-9620-ddd6e746e8ef\",\n \"c170b80b-c39f-46ce-b311-2debae2f2082\",\n \"14ad6c73-b15c-4c75-8f07-1c859944f790\",\n \"16002345-cebc-40e9-8de5-7cc0659be0f3\",\n \"331f90f3-9311-486a-8bcd-c5e4e171ee84\",\n \"2e2716b4-5b9a-4670-8a00-377992b3a547\",\n \"9cbb47b7-a65c-4cc4-865d-1a66536aefa1\",\n \"7bedcd95-c04f-4865-a298-247d34206277\",\n \"8abb0bb2-e8f7-4eec-bab7-3a47c7c1bffd\",\n \"5186a864-9440-434b-b19a-c32d326a3fef\",\n \"e8b25d81-c867-4e20-8829-1264867cb1b8\",\n \"e3584a94-a9f0-4362-8875-ecc7887d08a7\",\n \"47b7faa3-6e5d-420d-8798-507e43f9639f\",\n \"9c91430d-940a-46b8-894c-258836f7d0f4\",\n \"f16ce3be-cc8a-428d-aa92-06106c08bb78\",\n \"322f7adc-aa8e-4dd0-90bc-e3822856448b\",\n \"6f9a7fa3-564a-46a2-a9f0-375a21c8e251\",\n \"c5099681-f7f6-42fc-90d3-a6a0ee90f908\",\n \"92a41c6c-4c93-4fb6-a347-2f5cf0a7d2db\",\n \"199c82a7-fe1c-4163-8405-c17464a5f76c\",\n \"9491365b-e249-4a75-ac25-cc1cc02f408f\",\n \"22af4132-01f0-4467-9bea-e645f470fd96\",\n \"ca11d4e6-9cd7-4136-9232-859b2e1467de\",\n \"c78edde1-b73e-43d7-ab97-ddf82241f21f\",\n \"a50a635e-1226-4210-baec-32b24d8676e4\",\n \"7822bd2e-1f30-4ca7-9aec-dc44e8b70697\",\n \"91c05e15-76e6-4d60-ba05-c776f6f8fda9\",\n \"b608fb79-1b53-486d-8fde-90d4b61fc2f1\",\n \"862b5ddf-f996-490c-9d71-0fcfa7309bad\",\n \"095bece4-4a5b-4544-a96a-9b32ab97785f\",\n \"4ed76ccc-0516-40c8-97cc-501741884fac\",\n \"09da8235-6e71-43ae-825b-1e3ee72d1ad9\",\n \"6068a6db-1477-454d-9131-f7d2eef506e8\",\n \"32904bc0-ceb7-4a01-b5ef-8a0bf7941852\",\n \"6838a528-7474-4647-bef7-4cf6c1e816b5\",\n \"3be0ee0d-3f99-4321-870f-1c84f52188a9\",\n \"761f15e8-3ef3-4bb0-bef6-598eb45647a6\",\n \"d1699fdd-2bda-4161-96bb-2b2502fb6e0a\",\n \"db56e9e4-397a-4b38-a33f-a2324e683304\",\n \"d75c0cae-6a9d-433a-91d1-96901cb34d26\",\n \"95044da4-c747-4fa5-b31f-4fb3ed5adb6c\",\n \"4521a76c-21a4-4542-8b83-322d8ffd692c\",\n \"5472d135-1ceb-48a7-856f-747de64f3e6b\",\n \"c1066830-e268-4ff2-9f0f-37841d485046\",\n \"963e797e-dea4-4392-8454-e58d4d898886\",\n \"016f7476-6abd-4773-ada7-0c01bafd51ea\",\n \"44d0c151-0367-453d-9879-ef7e4d456c6c\",\n \"7a899cd4-cc0a-4ef1-b758-42cf9f5b48b9\",\n \"8011ec06-ee27-49a4-bcbc-493592df26b0\",\n \"574bb08c-f784-4dcb-b2e1-98fb6ef32949\",\n \"e1987a71-9e13-4ebe-855e-e347fd6cc937\",\n \"9b6546ec-87e7-4f0d-97af-9dd8a76e52a2\",\n \"669038f0-8cb0-496b-9673-04b1042e0e5c\",\n \"8dc4486d-cab9-46ba-a583-6946731415e6\",\n \"03c9507a-d4bc-4e38-a41b-437f05849261\",\n \"1e659fc3-474d-4557-a94d-835ee0c85264\",\n \"d6acfbca-5bf9-4a01-93a6-9c974a46400e\",\n \"2ea54c48-49ac-4fde-be2b-e43bbc4bbf66\",\n \"830c8731-8c33-4c19-ae58-4b8ff19d4cc7\",\n \"2d77e910-ecf3-4151-95e5-d2476592ed5f\",\n \"b4ea2393-6248-4273-be5c-b3ff2586a146\",\n \"41515ac4-ab76-4fea-b463-e1a26b6f69bb\",\n \"e8c3ea27-aa2b-44ad-a95b-4ea00469fc83\",\n \"f752bf5b-91bd-44d1-8388-898770ff7adb\",\n \"4d9ab42a-8f21-4c13-9db4-9eecf9315a5d\",\n \"0cd1dd2f-b110-4916-a707-6a988d46c973\",\n \"a52e40c1-3556-4e99-a114-0488389ebe90\",\n \"d5074d5e-8d31-43ae-8069-c4edd1cc1ddb\",\n \"c88c7b1a-46a1-4423-b1b9-859c4b025b3d\",\n \"4748d604-7768-48d9-86be-1ce724d425ce\",\n \"ded10fc3-bae1-4c26-8166-2d92cbfe0f49\",\n \"68e828c6-f314-441c-b64a-ba28f0d1cc35\",\n \"f337f4f5-1ff3-4215-a0a8-1980b7c8d662\",\n \"a4053bc6-4f68-4f49-baf6-41ba500ed7c7\",\n \"94542bbc-752e-48c7-ac75-9b3e818d84eb\",\n \"3ce1e736-2768-4f19-9c41-5c91c15b7dfb\",\n \"51bc39d7-7e67-4f75-bc6d-697297d52287\",\n \"f8d5ea25-5e82-4f79-924b-0049690bfc32\",\n \"77f833e9-2996-4ded-b5af-7e17de12e8bf\",\n \"038616cc-b67b-4c1f-a9ad-af80ec2fb110\",\n \"97ef53c0-5293-453a-aff1-0439da147a44\",\n \"c5f8b539-4640-4ad9-85bc-1c855ef9dfde\",\n \"839cd454-9096-4e4d-9665-a3fb54dd4705\",\n \"c47838e4-3cab-4329-a3c4-d1afd70fdcb9\",\n \"56e44bd4-0e66-480f-b26a-730a862f5652\",\n \"24941973-4747-4d43-8317-8aad489543af\",\n \"d61fb0ab-dd90-4099-b2ec-024f6a2c279f\",\n \"3d365296-5561-464b-9301-04d4f320fea9\",\n \"7948e7ab-b399-4557-8504-4f81f50dc8ec\",\n \"8f925deb-b6fa-4c08-9646-5c7646eb4b89\",\n \"65a401f2-544a-4a8a-ab65-a3071f51031e\",\n \"dc81327b-cb66-4261-865d-bb7d14306f11\",\n \"e624cc34-7c87-4335-9bb5-d350a02910f5\",\n \"f6365667-18d0-4273-9222-c5586157da7d\",\n \"905db9f7-4839-45af-b211-113a4a6999aa\",\n \"96cf5a86-7732-431c-be7c-7c753d92a46a\",\n \"0af82c96-4dd6-4720-a409-bf67041be6e0\",\n \"710dbb9e-bd86-4ba2-a18a-5401a3046ece\",\n \"677b8f26-3ed2-4974-8569-2df0f1293a73\",\n \"3c934d65-d622-4b05-a0d0-bb5e84d75218\",\n \"8dcd9530-0e0f-4f14-b111-afc50cc08324\",\n \"2d086d76-fb34-4b13-bbc7-3d5dc05ef97d\",\n \"a23d145a-771f-4f05-b84c-07d16a56a6aa\",\n \"b240a8de-0f36-4239-9c95-bc79a5dddd40\",\n \"8e556e15-f5fd-43fa-bf95-98cee5a7bc8f\",\n \"82f1624b-f3af-4c45-a893-f8bca5957cf0\",\n \"deb49da5-8f12-4105-b9da-710ff265582f\",\n \"524569ba-6a1f-44a4-8a5d-5439de5b2a40\",\n \"ac526877-fd57-46f4-b83b-972b1c58fad6\",\n \"47e0b249-e53b-4f62-a257-6d0813594d72\",\n \"acd0006b-0353-4ba6-8a0b-87336f61c97d\",\n \"9d26f612-3468-4d2c-a80b-ad718b6e877e\",\n \"4cad6e5b-3f30-4564-8735-751ca7db042c\",\n \"b4034989-a291-40b9-9713-ee02a8ac0da2\",\n \"3360b9ba-8b02-41c9-bd93-6f6a02109330\",\n \"f15f4120-70ca-4a10-be77-f9d582fb8790\",\n \"f1c95c46-1481-4241-a8ee-571b2f83a310\",\n \"8090fbc5-84d0-4f94-b1f9-ed8020f780d3\",\n \"c6e1394e-9cad-4673-bd57-f2405d39c2cf\",\n \"27c2cc4b-0924-448f-ab99-7a67b399c2ab\",\n \"cf75254e-e8e2-41e2-81e9-77d30e203cb5\",\n \"db5df703-aa7a-4910-b457-cd3a922a981e\",\n \"c8ac0909-a19f-471e-a271-487222887abd\",\n \"fe8b6a8a-2e2d-43a0-a149-73689c84f390\",\n \"10d74f61-cdd5-494d-8c51-8312b3ba8de8\",\n \"fdb69422-5411-4296-b9d8-962b4d7831c2\",\n \"110fdb13-f9c4-46fc-9fa4-10ffd91c395f\",\n \"7fd7fa0a-adbb-469e-be55-da9a0c015ed8\",\n \"705eba44-ab0e-462d-9b8d-1773c364e997\",\n \"8678671e-3d0f-4498-ba9e-00f1a91c2dec\",\n \"d0f4d361-3ebe-433f-8d61-aa782fae1629\",\n \"509e8fc8-6805-42af-92e1-71d6eabd0266\",\n \"da4ebfb0-d0f7-4d87-b12a-91812d2c6a04\",\n \"9a1c0f18-5ce2-448f-a802-d53af20a31c1\",\n \"d392164c-cafa-46be-8893-b28c2272b578\",\n \"56de8949-916b-48d9-b3ed-5e5600fc9ca2\",\n \"8fb3ee5c-576a-4bf5-ba7e-b2edb63764dc\",\n \"cf617cc7-abc9-4c02-b109-8817de9e1fe8\",\n \"32623ca4-06d3-4b9b-9941-e741eb577347\",\n \"f44828a7-258c-4f49-a93d-61c1a597943f\",\n \"cc215dc0-9705-46ac-9ab1-1396de51bf7c\",\n \"71e5a001-12f9-41d1-aa62-8c79dd517256\",\n \"0240c422-4914-40ff-84e3-4f91c035951c\",\n \"1ed90bad-9ded-4cad-879b-073029c2669a\",\n \"82649e41-2072-452a-afc0-98a8e55e8d07\",\n \"b08308eb-a210-4991-8937-c9bbd18c4d9c\",\n \"7747dd70-20a4-4759-b346-990b9ab27c0c\",\n \"64e3b499-cbcc-4659-bb34-dbd1bb2f2e94\",\n \"4f2bdf6e-5f2e-4181-9559-dd8fc0fd7782\",\n \"124ec7ef-0d81-4d96-af62-32ba7e181dc2\",\n \"5ae01620-6217-429c-a6ee-f3c90a1813fe\",\n \"cea43ac2-635b-47f0-8e22-31dd43944c2b\",\n \"80ed906b-d3d8-4eff-a382-f3ccfe770fbd\",\n \"a6284cb9-0ec4-4644-ac38-9df2c430d565\",\n \"0e61b3b3-d822-42b9-b2db-e1147a055864\",\n \"e10e6b37-8c81-449f-8b06-953d9e7232e3\",\n \"742574bd-3734-45df-81cb-664bc6fc3d9b\",\n \"f3a57f3d-21ee-498d-99ee-965ce6b883a4\",\n \"73695f31-fd69-4514-b8d6-d72c6cdbb87c\",\n \"ad0c3fdb-eee5-4ba0-bc81-169b78ed8365\",\n \"fd7264ef-c538-432f-848b-1d838ced284a\",\n \"ba1fc3a4-bf86-41a3-98d4-3ca0974b9be8\",\n \"9fe092dc-5c09-4876-b941-b37ae675d813\",\n \"b0ec8c0c-dd90-4b58-b356-37134394c78d\",\n \"015b7891-f102-4c8f-b06d-9269dd58b44d\",\n \"3bbdbd66-d299-4cba-8c12-51c8786d3091\",\n \"2baf451b-0056-4891-8d40-684b89573e1b\",\n \"73f8cadc-ec5d-4f49-a839-67d47b03c77f\",\n \"f0b1f166-bf21-4323-a98c-97cb5ce7179b\",\n \"5430b2ef-658c-4221-aa29-4325b466d13f\",\n \"c80231fa-3653-43c4-83ec-af2060de32e6\",\n \"30d7bc46-2e9e-48f7-935c-807f4d3a3874\",\n \"187a4b2d-7c67-4c5a-b15d-04a9f83933c2\",\n \"021946e3-c36d-4a13-b45d-198da0ecadfc\",\n \"b3067692-7417-4b7d-8599-72f2c733f340\",\n \"58505de6-57ea-4156-83ec-21d3e032fcee\",\n \"90bf0114-63fa-4f8f-beac-8c8844a22459\",\n \"5f4ad035-8ade-4422-a698-42777d881b04\",\n \"1214e547-4439-466c-b7cf-0dfce91ca8a9\",\n \"6f41ff49-d3e3-4067-8644-4ed8b7416461\",\n \"114e231f-0e4f-4f0c-b594-af8e235bb7ba\",\n \"85d3184b-facb-42d7-9fa2-68a756ba59ff\",\n \"242333a5-01c6-4a03-a125-aa9fe7a1566c\",\n \"21c58509-8ad4-4956-93ec-9e01f51f7731\",\n \"a57c3cbd-cbcb-4b79-bbd2-bc492cc4c6de\",\n \"e74c5ca7-a98f-4cee-8a20-402df5f04c12\",\n \"20896cc4-7e6c-4191-90ca-0fcbaf782a1a\",\n \"ac2e3135-2507-45a0-9eb5-eb87267b5aa3\",\n \"f8a97bdd-4988-408e-b26b-09909b8984f4\",\n \"ca128910-13b5-4ca4-bb5d-59b2a0923021\",\n \"608881e1-3112-44fb-8163-a0e1375bdab0\",\n \"011dfad9-c5b2-433c-8550-1f442912c6b3\",\n \"e64074c1-1af7-4c9b-b712-3fc5e62da994\",\n \"5bc3338f-922a-47ff-aae1-08fb7b8dde43\",\n \"19cb62d2-9b26-4a60-aab3-cc40a4aef43a\",\n \"9d27e5e1-c938-4f26-a90d-25a7b894cc4a\",\n \"c4ce4396-9c90-4cec-9485-46cea79f4295\",\n \"af0972ed-d3b8-4ac2-90ab-75ce1bb915d6\",\n \"71277395-eef6-428b-9609-e3637eda9594\",\n \"e659044e-5803-4435-846f-2c49eb9f27ef\",\n \"1132475f-3f52-4abc-8b7e-1d1ad503adaa\",\n \"cbfdead0-07e3-4ff0-960c-65310ce08197\",\n \"c2583e33-3aa5-444b-9369-d1257f91d902\",\n \"b3f557a3-b586-4969-9586-4e7548d1c510\",\n \"174f69df-274c-48fb-87c1-579d48cbd326\",\n \"786f5a33-fe08-45e1-b4a3-d87fee25c003\",\n \"25357792-eaea-49a7-a61f-3c39c0385ebe\",\n \"03d85aeb-9a2e-46de-8eee-c72d3db4f4ec\",\n \"eaf84068-3115-4f77-a190-8dda88806b57\",\n \"2bfa597a-3cc4-4bc0-88a4-357178faaf9e\",\n \"45431a02-f4a1-43f5-b9cb-bde2609e996c\",\n \"9dcef566-3377-416f-9a07-00a81f06c66d\",\n \"0a7e7d49-fbc6-48a3-b125-26138aebe090\",\n \"358395f1-b91c-4d7b-8673-1b3e1c3879f5\",\n \"aa8e64b4-0552-4771-b979-5178b6269656\"\n ],\n \"created_by\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"created_by_id\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"created_by_table\": \"notion_user\",\n \"created_time\": 1550443475316,\n \"format\": {\n \"page_full_width\": true,\n \"page_small_text\": true\n },\n \"id\": \"f90b0a6b-6483-43e2-8dc5-ed6e8f5c0780\",\n \"last_edited_by\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"last_edited_by_id\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"last_edited_by_table\": \"notion_user\",\n \"last_edited_time\": 1571298720000,\n \"parent_id\": \"c74c72f4-6ba6-4002-83c5-0fe2e400a3bc\",\n \"parent_table\": \"block\",\n \"permissions\": [\n {\n \"allow_search_engine_indexing\": false,\n \"role\": \"comment_only\",\n \"type\": \"public_permission\"\n }\n ],\n \"properties\": {\n \"title\": [\n [\n \"Essential Android\"\n ]\n ]\n },\n \"type\": \"page\",\n \"version\": 367\n }\n },\n \"fa84fd9d-a5ae-4351-979d-9f50ccadbe26\": {\n \"role\": \"comment_only\",\n \"value\": {\n \"alive\": true,\n \"content\": [\n \"1e0dbd70-df1a-463b-a564-bbf5c657858f\",\n \"92ffd51d-cc31-4e4d-9bcc-39c7eecf63f4\",\n \"554d6cc4-0f5b-4d29-bc23-b38334069967\",\n \"47f7ae6e-e6e8-4fcc-bca8-e51ed52dcb54\",\n \"13a73ac8-fcf7-4bf2-8914-e59944965fdd\",\n \"12949740-ea29-44f0-9b14-6249759c7af5\"\n ],\n \"created_by\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"created_by_id\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"created_by_table\": \"notion_user\",\n \"created_time\": 1550448142893,\n \"format\": {\n \"page_full_width\": true,\n \"page_small_text\": true\n },\n \"id\": \"fa84fd9d-a5ae-4351-979d-9f50ccadbe26\",\n \"ignore_block_count\": true,\n \"last_edited_by\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"last_edited_by_id\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"last_edited_by_table\": \"notion_user\",\n \"last_edited_time\": 1550448142893,\n \"parent_id\": \"92a41c6c-4c93-4fb6-a347-2f5cf0a7d2db\",\n \"parent_table\": \"block\",\n \"properties\": {\n \"title\": [\n [\n \"Google Sign In with Helper class\"\n ]\n ]\n },\n \"type\": \"page\",\n \"version\": 7\n }\n }\n },\n \"notion_user\": {\n \"bb760e2d-d679-4b64-b2a9-03005b21870a\": {\n \"role\": \"reader\",\n \"value\": {\n \"clipper_onboarding_completed\": true,\n \"email\": \"kkowalczyk@gmail.com\",\n \"family_name\": \"Kowalczyk\",\n \"given_name\": \"Krzysztof\",\n \"id\": \"bb760e2d-d679-4b64-b2a9-03005b21870a\",\n \"mobile_onboarding_completed\": true,\n \"onboarding_completed\": true,\n \"profile_photo\": \"https://s3-us-west-2.amazonaws.com/public.notion-static.com/2dcaa66c-7674-4ff6-9924-601785b63561/head-bw-640x960.png\",\n \"version\": 231\n }\n }\n },\n \"space\": {}\n }\n}\n"} +{"text": "#ifndef __PERF_EVSEL_H\n#define __PERF_EVSEL_H 1\n\n#include \n#include \n#include \n#include \n#include \n#include \"xyarray.h\"\n#include \"symbol.h\"\n#include \"cpumap.h\"\n#include \"counts.h\"\n\nstruct perf_evsel;\n\n/*\n * Per fd, to map back from PERF_SAMPLE_ID to evsel, only used when there are\n * more than one entry in the evlist.\n */\nstruct perf_sample_id {\n\tstruct hlist_node \tnode;\n\tu64\t\t \tid;\n\tstruct perf_evsel\t*evsel;\n\tint\t\t\tidx;\n\tint\t\t\tcpu;\n\tpid_t\t\t\ttid;\n\n\t/* Holds total ID period value for PERF_SAMPLE_READ processing. */\n\tu64\t\t\tperiod;\n};\n\nstruct cgroup_sel;\n\n/*\n * The 'struct perf_evsel_config_term' is used to pass event\n * specific configuration data to perf_evsel__config routine.\n * It is allocated within event parsing and attached to\n * perf_evsel::config_terms list head.\n*/\nenum {\n\tPERF_EVSEL__CONFIG_TERM_PERIOD,\n\tPERF_EVSEL__CONFIG_TERM_FREQ,\n\tPERF_EVSEL__CONFIG_TERM_TIME,\n\tPERF_EVSEL__CONFIG_TERM_CALLGRAPH,\n\tPERF_EVSEL__CONFIG_TERM_STACK_USER,\n\tPERF_EVSEL__CONFIG_TERM_INHERIT,\n\tPERF_EVSEL__CONFIG_TERM_MAX_STACK,\n\tPERF_EVSEL__CONFIG_TERM_OVERWRITE,\n\tPERF_EVSEL__CONFIG_TERM_DRV_CFG,\n\tPERF_EVSEL__CONFIG_TERM_MAX,\n};\n\nstruct perf_evsel_config_term {\n\tstruct list_head\tlist;\n\tint\ttype;\n\tunion {\n\t\tu64\tperiod;\n\t\tu64\tfreq;\n\t\tbool\ttime;\n\t\tchar\t*callgraph;\n\t\tchar\t*drv_cfg;\n\t\tu64\tstack_user;\n\t\tint\tmax_stack;\n\t\tbool\tinherit;\n\t\tbool\toverwrite;\n\t} val;\n};\n\n/** struct perf_evsel - event selector\n *\n * @evlist - evlist this evsel is in, if it is in one.\n * @node - To insert it into evlist->entries or in other list_heads, say in\n * the event parsing routines.\n * @name - Can be set to retain the original event name passed by the user,\n * so that when showing results in tools such as 'perf stat', we\n * show the name used, not some alias.\n * @id_pos: the position of the event id (PERF_SAMPLE_ID or\n * PERF_SAMPLE_IDENTIFIER) in a sample event i.e. in the array of\n * struct sample_event\n * @is_pos: the position (counting backwards) of the event id (PERF_SAMPLE_ID or\n * PERF_SAMPLE_IDENTIFIER) in a non-sample event i.e. if sample_id_all\n * is used there is an id sample appended to non-sample events\n * @priv: And what is in its containing unnamed union are tool specific\n */\nstruct perf_evsel {\n\tstruct list_head\tnode;\n\tstruct perf_evlist\t*evlist;\n\tstruct perf_event_attr\tattr;\n\tchar\t\t\t*filter;\n\tstruct xyarray\t\t*fd;\n\tstruct xyarray\t\t*sample_id;\n\tu64\t\t\t*id;\n\tstruct perf_counts\t*counts;\n\tstruct perf_counts\t*prev_raw_counts;\n\tint\t\t\tidx;\n\tu32\t\t\tids;\n\tchar\t\t\t*name;\n\tdouble\t\t\tscale;\n\tconst char\t\t*unit;\n\tstruct event_format\t*tp_format;\n\toff_t\t\t\tid_offset;\n\tvoid\t\t\t*priv;\n\tu64\t\t\tdb_id;\n\tstruct cgroup_sel\t*cgrp;\n\tvoid\t\t\t*handler;\n\tstruct cpu_map\t\t*cpus;\n\tstruct cpu_map\t\t*own_cpus;\n\tstruct thread_map\t*threads;\n\tunsigned int\t\tsample_size;\n\tint\t\t\tid_pos;\n\tint\t\t\tis_pos;\n\tbool\t\t\tsnapshot;\n\tbool \t\t\tsupported;\n\tbool \t\t\tneeds_swap;\n\tbool\t\t\tno_aux_samples;\n\tbool\t\t\timmediate;\n\tbool\t\t\tsystem_wide;\n\tbool\t\t\ttracking;\n\tbool\t\t\tper_pkg;\n\tbool\t\t\tprecise_max;\n\t/* parse modifier helper */\n\tint\t\t\texclude_GH;\n\tint\t\t\tnr_members;\n\tint\t\t\tsample_read;\n\tunsigned long\t\t*per_pkg_mask;\n\tstruct perf_evsel\t*leader;\n\tchar\t\t\t*group_name;\n\tbool\t\t\tcmdline_group_boundary;\n\tstruct list_head\tconfig_terms;\n\tint\t\t\tbpf_fd;\n};\n\nunion u64_swap {\n\tu64 val64;\n\tu32 val32[2];\n};\n\nstruct cpu_map;\nstruct target;\nstruct thread_map;\nstruct record_opts;\n\nstatic inline struct cpu_map *perf_evsel__cpus(struct perf_evsel *evsel)\n{\n\treturn evsel->cpus;\n}\n\nstatic inline int perf_evsel__nr_cpus(struct perf_evsel *evsel)\n{\n\treturn perf_evsel__cpus(evsel)->nr;\n}\n\nvoid perf_counts_values__scale(struct perf_counts_values *count,\n\t\t\t bool scale, s8 *pscaled);\n\nvoid perf_evsel__compute_deltas(struct perf_evsel *evsel, int cpu, int thread,\n\t\t\t\tstruct perf_counts_values *count);\n\nint perf_evsel__object_config(size_t object_size,\n\t\t\t int (*init)(struct perf_evsel *evsel),\n\t\t\t void (*fini)(struct perf_evsel *evsel));\n\nstruct perf_evsel *perf_evsel__new_idx(struct perf_event_attr *attr, int idx);\n\nstatic inline struct perf_evsel *perf_evsel__new(struct perf_event_attr *attr)\n{\n\treturn perf_evsel__new_idx(attr, 0);\n}\n\nstruct perf_evsel *perf_evsel__newtp_idx(const char *sys, const char *name, int idx);\n\n/*\n * Returns pointer with encoded error via interface.\n */\nstatic inline struct perf_evsel *perf_evsel__newtp(const char *sys, const char *name)\n{\n\treturn perf_evsel__newtp_idx(sys, name, 0);\n}\n\nstruct perf_evsel *perf_evsel__new_cycles(void);\n\nstruct event_format *event_format__new(const char *sys, const char *name);\n\nvoid perf_evsel__init(struct perf_evsel *evsel,\n\t\t struct perf_event_attr *attr, int idx);\nvoid perf_evsel__exit(struct perf_evsel *evsel);\nvoid perf_evsel__delete(struct perf_evsel *evsel);\n\nstruct callchain_param;\n\nvoid perf_evsel__config(struct perf_evsel *evsel,\n\t\t\tstruct record_opts *opts,\n\t\t\tstruct callchain_param *callchain);\nvoid perf_evsel__config_callchain(struct perf_evsel *evsel,\n\t\t\t\t struct record_opts *opts,\n\t\t\t\t struct callchain_param *callchain);\n\nint __perf_evsel__sample_size(u64 sample_type);\nvoid perf_evsel__calc_id_pos(struct perf_evsel *evsel);\n\nbool perf_evsel__is_cache_op_valid(u8 type, u8 op);\n\n#define PERF_EVSEL__MAX_ALIASES 8\n\nextern const char *perf_evsel__hw_cache[PERF_COUNT_HW_CACHE_MAX]\n\t\t\t\t [PERF_EVSEL__MAX_ALIASES];\nextern const char *perf_evsel__hw_cache_op[PERF_COUNT_HW_CACHE_OP_MAX]\n\t\t\t\t\t [PERF_EVSEL__MAX_ALIASES];\nextern const char *perf_evsel__hw_cache_result[PERF_COUNT_HW_CACHE_RESULT_MAX]\n\t\t\t\t\t [PERF_EVSEL__MAX_ALIASES];\nextern const char *perf_evsel__hw_names[PERF_COUNT_HW_MAX];\nextern const char *perf_evsel__sw_names[PERF_COUNT_SW_MAX];\nint __perf_evsel__hw_cache_type_op_res_name(u8 type, u8 op, u8 result,\n\t\t\t\t\t char *bf, size_t size);\nconst char *perf_evsel__name(struct perf_evsel *evsel);\n\nconst char *perf_evsel__group_name(struct perf_evsel *evsel);\nint perf_evsel__group_desc(struct perf_evsel *evsel, char *buf, size_t size);\n\nint perf_evsel__alloc_id(struct perf_evsel *evsel, int ncpus, int nthreads);\nvoid perf_evsel__close_fd(struct perf_evsel *evsel, int ncpus, int nthreads);\n\nvoid __perf_evsel__set_sample_bit(struct perf_evsel *evsel,\n\t\t\t\t enum perf_event_sample_format bit);\nvoid __perf_evsel__reset_sample_bit(struct perf_evsel *evsel,\n\t\t\t\t enum perf_event_sample_format bit);\n\n#define perf_evsel__set_sample_bit(evsel, bit) \\\n\t__perf_evsel__set_sample_bit(evsel, PERF_SAMPLE_##bit)\n\n#define perf_evsel__reset_sample_bit(evsel, bit) \\\n\t__perf_evsel__reset_sample_bit(evsel, PERF_SAMPLE_##bit)\n\nvoid perf_evsel__set_sample_id(struct perf_evsel *evsel,\n\t\t\t bool use_sample_identifier);\n\nint perf_evsel__set_filter(struct perf_evsel *evsel, const char *filter);\nint perf_evsel__append_tp_filter(struct perf_evsel *evsel, const char *filter);\nint perf_evsel__append_addr_filter(struct perf_evsel *evsel,\n\t\t\t\t const char *filter);\nint perf_evsel__apply_filter(struct perf_evsel *evsel, int ncpus, int nthreads,\n\t\t\t const char *filter);\nint perf_evsel__enable(struct perf_evsel *evsel);\nint perf_evsel__disable(struct perf_evsel *evsel);\n\nint perf_evsel__open_per_cpu(struct perf_evsel *evsel,\n\t\t\t struct cpu_map *cpus);\nint perf_evsel__open_per_thread(struct perf_evsel *evsel,\n\t\t\t\tstruct thread_map *threads);\nint perf_evsel__open(struct perf_evsel *evsel, struct cpu_map *cpus,\n\t\t struct thread_map *threads);\nvoid perf_evsel__close(struct perf_evsel *evsel, int ncpus, int nthreads);\n\nstruct perf_sample;\n\nvoid *perf_evsel__rawptr(struct perf_evsel *evsel, struct perf_sample *sample,\n\t\t\t const char *name);\nu64 perf_evsel__intval(struct perf_evsel *evsel, struct perf_sample *sample,\n\t\t const char *name);\n\nstatic inline char *perf_evsel__strval(struct perf_evsel *evsel,\n\t\t\t\t struct perf_sample *sample,\n\t\t\t\t const char *name)\n{\n\treturn perf_evsel__rawptr(evsel, sample, name);\n}\n\nstruct format_field;\n\nu64 format_field__intval(struct format_field *field, struct perf_sample *sample, bool needs_swap);\n\nstruct format_field *perf_evsel__field(struct perf_evsel *evsel, const char *name);\n\n#define perf_evsel__match(evsel, t, c)\t\t\\\n\t(evsel->attr.type == PERF_TYPE_##t &&\t\\\n\t evsel->attr.config == PERF_COUNT_##c)\n\nstatic inline bool perf_evsel__match2(struct perf_evsel *e1,\n\t\t\t\t struct perf_evsel *e2)\n{\n\treturn (e1->attr.type == e2->attr.type) &&\n\t (e1->attr.config == e2->attr.config);\n}\n\n#define perf_evsel__cmp(a, b)\t\t\t\\\n\t((a) &&\t\t\t\t\t\\\n\t (b) &&\t\t\t\t\t\\\n\t (a)->attr.type == (b)->attr.type &&\t\\\n\t (a)->attr.config == (b)->attr.config)\n\nint perf_evsel__read(struct perf_evsel *evsel, int cpu, int thread,\n\t\t struct perf_counts_values *count);\n\nint __perf_evsel__read_on_cpu(struct perf_evsel *evsel,\n\t\t\t int cpu, int thread, bool scale);\n\n/**\n * perf_evsel__read_on_cpu - Read out the results on a CPU and thread\n *\n * @evsel - event selector to read value\n * @cpu - CPU of interest\n * @thread - thread of interest\n */\nstatic inline int perf_evsel__read_on_cpu(struct perf_evsel *evsel,\n\t\t\t\t\t int cpu, int thread)\n{\n\treturn __perf_evsel__read_on_cpu(evsel, cpu, thread, false);\n}\n\n/**\n * perf_evsel__read_on_cpu_scaled - Read out the results on a CPU and thread, scaled\n *\n * @evsel - event selector to read value\n * @cpu - CPU of interest\n * @thread - thread of interest\n */\nstatic inline int perf_evsel__read_on_cpu_scaled(struct perf_evsel *evsel,\n\t\t\t\t\t\t int cpu, int thread)\n{\n\treturn __perf_evsel__read_on_cpu(evsel, cpu, thread, true);\n}\n\nint perf_evsel__parse_sample(struct perf_evsel *evsel, union perf_event *event,\n\t\t\t struct perf_sample *sample);\n\nstatic inline struct perf_evsel *perf_evsel__next(struct perf_evsel *evsel)\n{\n\treturn list_entry(evsel->node.next, struct perf_evsel, node);\n}\n\nstatic inline struct perf_evsel *perf_evsel__prev(struct perf_evsel *evsel)\n{\n\treturn list_entry(evsel->node.prev, struct perf_evsel, node);\n}\n\n/**\n * perf_evsel__is_group_leader - Return whether given evsel is a leader event\n *\n * @evsel - evsel selector to be tested\n *\n * Return %true if @evsel is a group leader or a stand-alone event\n */\nstatic inline bool perf_evsel__is_group_leader(const struct perf_evsel *evsel)\n{\n\treturn evsel->leader == evsel;\n}\n\n/**\n * perf_evsel__is_group_event - Return whether given evsel is a group event\n *\n * @evsel - evsel selector to be tested\n *\n * Return %true iff event group view is enabled and @evsel is a actual group\n * leader which has other members in the group\n */\nstatic inline bool perf_evsel__is_group_event(struct perf_evsel *evsel)\n{\n\tif (!symbol_conf.event_group)\n\t\treturn false;\n\n\treturn perf_evsel__is_group_leader(evsel) && evsel->nr_members > 1;\n}\n\nbool perf_evsel__is_function_event(struct perf_evsel *evsel);\n\nstatic inline bool perf_evsel__is_bpf_output(struct perf_evsel *evsel)\n{\n\tstruct perf_event_attr *attr = &evsel->attr;\n\n\treturn (attr->config == PERF_COUNT_SW_BPF_OUTPUT) &&\n\t\t(attr->type == PERF_TYPE_SOFTWARE);\n}\n\nstruct perf_attr_details {\n\tbool freq;\n\tbool verbose;\n\tbool event_group;\n\tbool force;\n\tbool trace_fields;\n};\n\nint perf_evsel__fprintf(struct perf_evsel *evsel,\n\t\t\tstruct perf_attr_details *details, FILE *fp);\n\n#define EVSEL__PRINT_IP\t\t\t(1<<0)\n#define EVSEL__PRINT_SYM\t\t(1<<1)\n#define EVSEL__PRINT_DSO\t\t(1<<2)\n#define EVSEL__PRINT_SYMOFFSET\t\t(1<<3)\n#define EVSEL__PRINT_ONELINE\t\t(1<<4)\n#define EVSEL__PRINT_SRCLINE\t\t(1<<5)\n#define EVSEL__PRINT_UNKNOWN_AS_ADDR\t(1<<6)\n\nstruct callchain_cursor;\n\nint sample__fprintf_callchain(struct perf_sample *sample, int left_alignment,\n\t\t\t unsigned int print_opts,\n\t\t\t struct callchain_cursor *cursor, FILE *fp);\n\nint sample__fprintf_sym(struct perf_sample *sample, struct addr_location *al,\n\t\t\tint left_alignment, unsigned int print_opts,\n\t\t\tstruct callchain_cursor *cursor, FILE *fp);\n\nbool perf_evsel__fallback(struct perf_evsel *evsel, int err,\n\t\t\t char *msg, size_t msgsize);\nint perf_evsel__open_strerror(struct perf_evsel *evsel, struct target *target,\n\t\t\t int err, char *msg, size_t size);\n\nstatic inline int perf_evsel__group_idx(struct perf_evsel *evsel)\n{\n\treturn evsel->idx - evsel->leader->idx;\n}\n\n#define for_each_group_member(_evsel, _leader) \t\t\t\t\t\\\nfor ((_evsel) = list_entry((_leader)->node.next, struct perf_evsel, node); \t\\\n (_evsel) && (_evsel)->leader == (_leader);\t\t\t\t\t\\\n (_evsel) = list_entry((_evsel)->node.next, struct perf_evsel, node))\n\nstatic inline bool perf_evsel__has_branch_callstack(const struct perf_evsel *evsel)\n{\n\treturn evsel->attr.branch_sample_type & PERF_SAMPLE_BRANCH_CALL_STACK;\n}\n\ntypedef int (*attr__fprintf_f)(FILE *, const char *, const char *, void *);\n\nint perf_event_attr__fprintf(FILE *fp, struct perf_event_attr *attr,\n\t\t\t attr__fprintf_f attr__fprintf, void *priv);\n\nchar *perf_evsel__env_arch(struct perf_evsel *evsel);\n\n#endif /* __PERF_EVSEL_H */\n"} +{"text": "// Copyright (C) 2015-2020 Jonathan Müller \n// This file is subject to the license terms in the LICENSE file\n// found in the top-level directory of this distribution.\n\n#include \"memory_pool.hpp\"\n\n#include \"debugging.hpp\"\n\nusing namespace foonathan::memory;\n\nvoid detail::memory_pool_leak_handler::operator()(std::ptrdiff_t amount)\n{\n get_leak_handler()({FOONATHAN_MEMORY_LOG_PREFIX \"::memory_pool\", this}, amount);\n}\n\n#if FOONATHAN_MEMORY_EXTERN_TEMPLATE\ntemplate class foonathan::memory::memory_pool;\ntemplate class foonathan::memory::memory_pool;\ntemplate class foonathan::memory::memory_pool;\n\ntemplate class foonathan::memory::allocator_traits>;\ntemplate class foonathan::memory::allocator_traits>;\ntemplate class foonathan::memory::allocator_traits>;\n\ntemplate class foonathan::memory::composable_allocator_traits>;\ntemplate class foonathan::memory::composable_allocator_traits>;\ntemplate class foonathan::memory::composable_allocator_traits>;\n#endif\n"} +{"text": "// most Object methods by ES6 should accept primitives\nmodule.exports = function(KEY, exec){\n var $def = require('./$.def')\n , fn = (require('./$.core').Object || {})[KEY] || Object[KEY]\n , exp = {};\n exp[KEY] = exec(fn);\n $def($def.S + $def.F * require('./$.fails')(function(){ fn(1); }), 'Object', exp);\n};"} +{"text": "/* Sirikata\n * NTPTimeSync.hpp\n *\n * Copyright (c) 2009, Ewen Cheslack-Postava\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in\n * the documentation and/or other materials provided with the\n * distribution.\n * * Neither the name of Sirikata nor the names of its contributors may\n * be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS\n * IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\n * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\n * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER\n * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef _SIRIKATA_TIME_SYNC_HPP_\n#define _SIRIKATA_TIME_SYNC_HPP_\n\n#include \n#include \n#include \n\nnamespace Sirikata {\n\n/** Handles synchronization with a central server. */\nclass SIRIKATA_EXPORT NTPTimeSync {\npublic:\n NTPTimeSync();\n\n void start(const String& server);\n void stop();\n\nprivate:\n bool mSyncedOnce;\n bool mDone;\n int ntp_ctl_pipes[2]; // Control data from cbr -> sync.py\n int ntp_data_pipes[2]; // Offset data from sync.py -> cbr\n Thread* mSyncThread;\n}; // class NTPTimeSync\n\n} // namespace Sirikata\n\n#endif //_SIRIKATA_TIME_SYNC_HPP_\n"} +{"text": "using System.Collections.Generic;\n\nnamespace Xabe.FFmpeg\n{\n /// \n /// Stream filter configuration\n /// \n public interface IFilterConfiguration\n {\n /// \n /// Type of filter\n /// \n string FilterType { get; }\n\n /// \n /// Stream filter number\n /// \n int StreamNumber { get; }\n\n /// \n /// Filter with name and values\n /// \n Dictionary Filters { get; }\n }\n}"} +{"text": "# Apple\n\n## Properties\n\nName | Type | Description | Notes\n------------ | ------------- | ------------- | -------------\n**Cultivar** | Pointer to **string** | | [optional] \n\n## Methods\n\n### NewApple\n\n`func NewApple() *Apple`\n\nNewApple instantiates a new Apple object\nThis constructor will assign default values to properties that have it defined,\nand makes sure properties required by API are set, but the set of arguments\nwill change when the set of required properties is changed\n\n### NewAppleWithDefaults\n\n`func NewAppleWithDefaults() *Apple`\n\nNewAppleWithDefaults instantiates a new Apple object\nThis constructor will only assign default values to properties that have it defined,\nbut it doesn't guarantee that properties required by API are set\n\n### GetCultivar\n\n`func (o *Apple) GetCultivar() string`\n\nGetCultivar returns the Cultivar field if non-nil, zero value otherwise.\n\n### GetCultivarOk\n\n`func (o *Apple) GetCultivarOk() (*string, bool)`\n\nGetCultivarOk returns a tuple with the Cultivar field if it's non-nil, zero value otherwise\nand a boolean to check if the value has been set.\n\n### SetCultivar\n\n`func (o *Apple) SetCultivar(v string)`\n\nSetCultivar sets Cultivar field to given value.\n\n### HasCultivar\n\n`func (o *Apple) HasCultivar() bool`\n\nHasCultivar returns a boolean if a field has been set.\n\n\n[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)\n\n\n"} +{"text": "\n\nLevel 1\n"} +{"text": "/**\n * CDEvents\n *\n * Copyright (c) 2010-2013 Aron Cedercrantz\n * http://github.com/rastersize/CDEvents/\n *\n * Permission is hereby granted, free of charge, to any person\n * obtaining a copy of this software and associated documentation\n * files (the \"Software\"), to deal in the Software without\n * restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following\n * conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n */\n\n#import \"CDEvent.h\"\n#import \"compat.h\"\n\n@implementation CDEvent\n\n#pragma mark Properties\n@synthesize identifier\t= _identifier;\n@synthesize date\t\t= _date;\n@synthesize URL\t\t\t= _URL;\n@synthesize flags\t\t= _flags;\n\n\n#pragma mark Class object creators\n+ (CDEvent *)eventWithIdentifier:(NSUInteger)identifier\n\t\t\t\t\t\t\tdate:(NSDate *)date\n\t\t\t\t\t\t\t URL:(NSURL *)URL\n\t\t\t\t\t\t flags:(CDEventFlags)flags\n{\n\treturn [[CDEvent alloc] initWithIdentifier:identifier\n\t\t\t\t\t\t\t\t\t\t date:date\n\t\t\t\t\t\t\t\t\t\t\tURL:URL\n\t\t\t\t\t\t\t\t\t\t flags:flags];\n}\n\n\n#pragma mark Init/dealloc methods\n\n- (id)initWithIdentifier:(NSUInteger)identifier\n\t\t\t\t\tdate:(NSDate *)date\n\t\t\t\t\t URL:(NSURL *)URL\n\t\t\t\t flags:(CDEventFlags)flags\n{\n\tif ((self = [super init])) {\n\t\t_identifier\t= identifier;\n\t\t_flags\t\t= flags;\n\t\t_date\t\t= date;\n\t\t_URL\t\t= URL;\n\t}\n\t\n\treturn self;\n}\n\n\n#pragma mark NSCoding methods\n- (void)encodeWithCoder:(NSCoder *)aCoder\n{\n\t[aCoder encodeObject:[NSNumber numberWithUnsignedInteger:[self identifier]] forKey:@\"identifier\"];\n\t[aCoder encodeObject:[NSNumber numberWithUnsignedInteger:[self flags]] forKey:@\"flags\"];\n\t[aCoder encodeObject:[self date] forKey:@\"date\"];\n\t[aCoder encodeObject:[self URL] forKey:@\"URL\"];\n}\n\n- (id)initWithCoder:(NSCoder *)aDecoder\n{\n\tself = [self initWithIdentifier:[[aDecoder decodeObjectForKey:@\"identifier\"] unsignedIntegerValue]\n\t\t\t\t\t\t\t date:[aDecoder decodeObjectForKey:@\"date\"]\n\t\t\t\t\t\t\t\tURL:[aDecoder decodeObjectForKey:@\"URL\"]\n\t\t\t\t\t\t\t flags:[[aDecoder decodeObjectForKey:@\"flags\"] unsignedIntValue]];\n\t\n\treturn self;\n}\n\n\n#pragma mark NSCopying methods\n- (id)copyWithZone:(NSZone *)zone\n{\n\t// We can do this since we are immutable.\n\treturn self;\n}\n\n#pragma mark Specific flag properties\n- (BOOL)isGenericChange\n{\n\treturn (kFSEventStreamEventFlagNone == _flags);\n}\n\n#define FLAG_CHECK(flags, flag) ((flags) & (flag))\n\n#define FLAG_PROPERTY(name, flag) \\\n- (BOOL)name \\\n{ return (FLAG_CHECK(_flags, flag) ? YES : NO); }\n\nFLAG_PROPERTY(mustRescanSubDirectories, kFSEventStreamEventFlagMustScanSubDirs)\nFLAG_PROPERTY(isUserDropped, kFSEventStreamEventFlagUserDropped)\nFLAG_PROPERTY(isKernelDropped, kFSEventStreamEventFlagKernelDropped)\nFLAG_PROPERTY(isEventIdentifiersWrapped, kFSEventStreamEventFlagEventIdsWrapped)\nFLAG_PROPERTY(isHistoryDone, kFSEventStreamEventFlagHistoryDone)\nFLAG_PROPERTY(isRootChanged, kFSEventStreamEventFlagRootChanged)\nFLAG_PROPERTY(didVolumeMount, kFSEventStreamEventFlagMount)\nFLAG_PROPERTY(didVolumeUnmount, kFSEventStreamEventFlagUnmount)\n\n// file-level events introduced in 10.7\nFLAG_PROPERTY(isCreated, kFSEventStreamEventFlagItemCreated)\nFLAG_PROPERTY(isRemoved, kFSEventStreamEventFlagItemRemoved)\nFLAG_PROPERTY(isInodeMetadataModified, kFSEventStreamEventFlagItemInodeMetaMod)\nFLAG_PROPERTY(isRenamed, kFSEventStreamEventFlagItemRenamed)\nFLAG_PROPERTY(isModified, kFSEventStreamEventFlagItemModified)\nFLAG_PROPERTY(isFinderInfoModified, kFSEventStreamEventFlagItemFinderInfoMod)\nFLAG_PROPERTY(didChangeOwner, kFSEventStreamEventFlagItemChangeOwner)\nFLAG_PROPERTY(isXattrModified, kFSEventStreamEventFlagItemXattrMod)\nFLAG_PROPERTY(isFile, kFSEventStreamEventFlagItemIsFile)\nFLAG_PROPERTY(isDir, kFSEventStreamEventFlagItemIsDir)\nFLAG_PROPERTY(isSymlink, kFSEventStreamEventFlagItemIsSymlink)\n\n#pragma mark Misc\n- (NSString *)description\n{\n\treturn [NSString stringWithFormat:@\"<%@: %p { identifier = %ld, URL = %@, flags = %ld, date = %@ }>\",\n\t\t\t[self className],\n\t\t\tself,\n\t\t\t(unsigned long)[self identifier],\n\t\t\t[self URL],\n\t\t\t(unsigned long)[self flags],\n\t\t\t[self date]];\n}\n\n@end\n"} +{"text": "/* Code to create and access the imageClone table */\n\n/* Copyright (C) 2003 The Regents of the University of California \n * See README in this or parent directory for licensing information. */\n#ifndef IMAGECLONETBL_H\n#define IMAGECLONETBL_H\n#include \"common.h\"\nstruct sqlConnection;\n\nstruct imageCloneTbl\n/* Object for load the image clone table. */\n{\n struct sqlUpdater *updater; /* table updating object */\n};\n\n/* name of the table */\nextern char *IMAGE_CLONE_TBL;\n\nunsigned imageCloneGBParse(char *cloneSpec);\n/* Parse an image clone id from the string take from the genbank\n * /clone field. There are many weird case, some are handled and some are\n * infrequent enough to skip. Several of these weird case to seem to\n * have current IMAGE clones anyway.\n * Returns 0 if not a parsable IMAGE clone spec. */\n\nstruct imageCloneTbl *imageCloneTblNew(struct sqlConnection *conn,\n char *tmpDir, boolean verbEnabled);\n/* Create an object for loading the clone table */\n\nvoid imageCloneTblFree(struct imageCloneTbl **ictPtr);\n/* Free object */\n\nunsigned imageCloneTblGetId(struct sqlConnection *conn, char *acc);\n/* get id for an acc, or 0 if none */\n\nvoid imageCloneTblAdd(struct imageCloneTbl *ict, unsigned imageId,\n char *acc, unsigned type, char direction);\n/* Add an entry to the table */\n\nvoid imageCloneTblMod(struct imageCloneTbl *ict, unsigned imageId,\n char *acc, char direction);\n/* update an entry in the table */\n\nvoid imageCloneTblCommit(struct imageCloneTbl *ict,\n struct sqlConnection *conn);\n/* Commit pending changes */\n\n#endif\n/*\n * Local Variables:\n * c-file-style: \"jkent-c\"\n * End:\n */\n"} +{"text": "import { sourceAcademyURL } from \"../constants\";\nimport lzString from \"lz-string\";\nimport {\n checkLongLineWarning,\n missingRequireWarning,\n missingExampleWarning,\n repeatedNameWarning\n} from \"./warnings.js\";\nimport { recursiveProcessTextLatex, processTextLatex } from \"../parseXmlLatex\";\nimport recursiveProcessPureText from \"./recursiveProcessPureText\";\n\nconst snippetStore = {};\n\nexport const setupSnippetsPdf = node => {\n const snippets = node.getElementsByTagName(\"SNIPPET\");\n for (let i = 0; snippets[i]; i++) {\n const snippet = snippets[i];\n const jsSnippet = snippet.getElementsByTagName(\"JAVASCRIPT\")[0];\n let jsRunSnippet = snippet.getElementsByTagName(\"JAVASCRIPT_RUN\")[0];\n if (!jsRunSnippet) {\n jsRunSnippet = jsSnippet;\n }\n const snippetName = snippet.getElementsByTagName(\"NAME\")[0];\n if (snippetName && jsSnippet) {\n const nameStr = snippetName.firstChild.nodeValue;\n if (snippetStore[nameStr]) {\n repeatedNameWarning(nameStr);\n return;\n }\n const codeArr = [];\n recursiveProcessPureText(jsRunSnippet.firstChild, codeArr);\n const codeStr = codeArr.join(\"\").trim();\n\n const requirements = snippet.getElementsByTagName(\"REQUIRES\");\n const requireNames = [];\n for (let i = 0; requirements[i]; i++) {\n requireNames.push(requirements[i].firstChild.nodeValue);\n }\n\n snippetStore[nameStr] = { codeStr, requireNames };\n }\n }\n};\n\nconst recursiveGetRequires = (name, seen) => {\n if (seen.has(name)) return;\n const snippetEntry = snippetStore[name];\n if (!snippetEntry) {\n missingRequireWarning(name);\n return;\n }\n for (const requirement of snippetEntry.requireNames) {\n recursiveGetRequires(requirement, seen);\n }\n seen.add(name);\n};\n\nexport const processSnippetPdf = (node, writeTo) => {\n if (node.getAttribute(\"HIDE\") == \"yes\") {\n return;\n }\n\n const jsSnippet = node.getElementsByTagName(\"JAVASCRIPT\")[0];\n if (jsSnippet) {\n // JavaScript source for running. Overrides JAVASCRIPT if present.\n let jsRunSnippet = node.getElementsByTagName(\"JAVASCRIPT_RUN\")[0];\n if (!jsRunSnippet) {\n jsRunSnippet = jsSnippet;\n }\n\n const codeArr = [];\n recursiveProcessPureText(jsSnippet.firstChild, codeArr);\n const codeStr = codeArr.join(\"\").trim();\n\n const codeArr_run = [];\n recursiveProcessPureText(jsRunSnippet.firstChild, codeArr_run);\n const codeStr_run = codeArr_run.join(\"\").trim();\n\n // Do warning for very long lines if no latex\n if (node.getAttribute(\"LATEX\") !== \"yes\") {\n checkLongLineWarning(codeStr);\n }\n\n if (node.getAttribute(\"EVAL\") === \"no\") {\n writeTo.push(\"\\n\\\\begin{JavaScript}\\n\");\n writeTo.push(codeStr);\n writeTo.push(\"\\n\\\\end{JavaScript}\\n\");\n } else {\n let reqStr = \"\";\n let reqArr = [];\n const snippetName = node.getElementsByTagName(\"NAME\")[0];\n let nameStr;\n if (snippetName) {\n nameStr = snippetName.firstChild.nodeValue;\n const reqSet = new Set();\n recursiveGetRequires(nameStr, reqSet);\n const examples = node.getElementsByTagName(\"EXAMPLE\");\n for (let i = 0; examples[i]; i++) {\n const exampleString = examples[i].firstChild.nodeValue;\n const exampleNode = snippetStore[exampleString];\n if (exampleNode) {\n const exampleRequires = exampleNode.requireNames;\n for (let j = 0; exampleRequires[j]; j++) {\n recursiveGetRequires(exampleRequires[j], reqSet);\n }\n }\n }\n for (const reqName of reqSet) {\n const snippetEntry = snippetStore[reqName];\n if (snippetEntry && reqName !== nameStr) {\n reqArr.push(snippetEntry.codeStr);\n reqArr.push(\"\\n\");\n }\n }\n reqStr = reqArr.join(\"\");\n } else {\n const requirements = node.getElementsByTagName(\"REQUIRES\");\n for (let i = 0; requirements[i]; i++) {\n const required = requirements[i].firstChild.nodeValue;\n if (snippetStore[required]) {\n reqArr.push(snippetStore[required].codeStr);\n reqArr.push(\"\\n\");\n } else {\n missingRequireWarning(required);\n }\n }\n reqStr = reqArr.join(\"\");\n }\n\n const examples = node.getElementsByTagName(\"EXAMPLE\");\n const exampleArr = [];\n for (let i = 0; examples[i]; i++) {\n const example = examples[i].firstChild.nodeValue;\n if (snippetStore[example]) {\n exampleArr.push(\"\\n\\n\");\n exampleArr.push(snippetStore[example].codeStr);\n reqStr = reqArr.join(\"\");\n } else {\n missingExampleWarning(example);\n }\n }\n const exampleStr = exampleArr.join(\"\");\n\n // make url for source academy link\n const compressed = lzString.compressToEncodedURIComponent(\n reqStr + codeStr_run + exampleStr\n );\n // in this version we dont have access to the current chapter\n const chap = 4; // hard-wire chapter to 4\n let variant = node.getAttribute(\"VARIANT\");\n if (variant) {\n variant = \"variant=\" + variant + \"&\";\n } else {\n variant = \"\";\n }\n const url =\n sourceAcademyURL +\n \"/playground\\\\#chap=\" +\n chap +\n variant +\n \"&prgrm=\" +\n compressed;\n\n const chunks = (codeStr + \"\\n\").match(\n /^((?:.*?[\\r\\n]+){1,36})((?:.|\\n|\\r)*)$/\n );\n\n const lines = codeStr.split(\"\\n\");\n\n lines[0] =\n \"/*!\\\\makebox[0pt][l]{\\\\makebox[1.03\\\\textwidth][r]{\\\\href{\" +\n url +\n \"}{\\\\ensuremath{\\\\blacktriangleright}}}}!*/\" +\n lines[0];\n\n // writeTo.push(\"\\n\\\\marginnote{\\\\href{\" + url + \"}{\\\\ensuremath{\\\\blacktriangleright}}}[2ex]\" + \"\\\\begin{JavaScriptClickable}\\n\");\n writeTo.push(\"\\\\begin{JavaScriptClickable}\\n\");\n writeTo.push(lines.join(\"\\n\"));\n writeTo.push(\"\\\\end{JavaScriptClickable}\\n\");\n\n // // 6 lines plus rest\n // writeTo.push(\n // \"\\n\\\\begin{lrbox}{\\\\lstbox}\\n\\\\begin{JavaScriptClickable}\\n\"\n // );\n // writeTo.push(chunks[1]);\n // writeTo.push(\"\\\\end{JavaScriptClickable}\\n\\\\end{lrbox}\");\n\n // if (chunks[2]) {\n // writeTo.push(\"\\n\\\\begin{JavaScriptClickable}\\n\");\n // writeTo.push(\"/*!\\\\href{\" + url + \"}{\\\\usebox\\\\lstbox}!*/\\n\");\n // writeTo.push(chunks[2]);\n // writeTo.push(\"\\n\\\\end{JavaScriptClickable}\");\n // } else {\n // writeTo.push(\"\\n\\n\\\\href{\" + url + \"}{\\\\usebox\\\\lstbox}\");\n // }\n }\n }\n\n const jsOutputSnippet = node.getElementsByTagName(\"JAVASCRIPT_OUTPUT\")[0];\n\n if (jsOutputSnippet) {\n writeTo.push(\"\\n\\\\begin{JavaScriptOutput}\");\n writeTo.push(jsOutputSnippet.firstChild.nodeValue.trimRight());\n writeTo.push(\"\\\\end{JavaScriptOutput}\");\n }\n\n // writeTo.push(\"\\n\\n\");\n};\n\nexport default processSnippetPdf;\n"} +{"text": "/*\n * Copyright (C) 1999-2001 Harri Porten (porten@kde.org)\n * Copyright (C) 2001 Peter Kelly (pmk@post.com)\n * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Library General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Library General Public License for more details.\n *\n * You should have received a copy of the GNU Library General Public License\n * along with this library; see the file COPYING.LIB. If not, write to\n * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n * Boston, MA 02110-1301, USA.\n *\n */\n\n#ifndef Error_h\n#define Error_h\n\n#include \"JSObject.h\"\n#include \n\nnamespace JSC {\n\n class ExecState;\n class JSGlobalData;\n class JSGlobalObject;\n class JSObject;\n class SourceCode;\n class Structure;\n class UString;\n\n // Methods to create a range of internal errors.\n JSObject* createError(JSGlobalObject*, const UString&);\n JSObject* createEvalError(JSGlobalObject*, const UString&);\n JSObject* createRangeError(JSGlobalObject*, const UString&);\n JSObject* createReferenceError(JSGlobalObject*, const UString&);\n JSObject* createSyntaxError(JSGlobalObject*, const UString&);\n JSObject* createTypeError(JSGlobalObject*, const UString&);\n JSObject* createURIError(JSGlobalObject*, const UString&);\n // ExecState wrappers.\n JSObject* createError(ExecState*, const UString&);\n JSObject* createEvalError(ExecState*, const UString&);\n JSObject* createRangeError(ExecState*, const UString&);\n JSObject* createReferenceError(ExecState*, const UString&);\n JSObject* createSyntaxError(ExecState*, const UString&);\n JSObject* createTypeError(ExecState*, const UString&);\n JSObject* createURIError(ExecState*, const UString&);\n\n // Methods to add \n bool hasErrorInfo(ExecState*, JSObject* error);\n JSObject* addErrorInfo(JSGlobalData*, JSObject* error, int line, const SourceCode&);\n // ExecState wrappers.\n JSObject* addErrorInfo(ExecState*, JSObject* error, int line, const SourceCode&);\n\n // Methods to throw Errors.\n JSValue throwError(ExecState*, JSValue);\n JSObject* throwError(ExecState*, JSObject*);\n\n // Convenience wrappers, create an throw an exception with a default message.\n JSObject* throwTypeError(ExecState*);\n JSObject* throwSyntaxError(ExecState*);\n\n // Convenience wrappers, wrap result as an EncodedJSValue.\n inline EncodedJSValue throwVMError(ExecState* exec, JSValue error) { return JSValue::encode(throwError(exec, error)); }\n inline EncodedJSValue throwVMTypeError(ExecState* exec) { return JSValue::encode(throwTypeError(exec)); }\n\n JSValue createTypeErrorFunction(ExecState* exec, const UString& message);\n \n} // namespace JSC\n\n#endif // Error_h\n"} +{"text": "u8 vshctrl[10029] = \n{\n\t0x7E, 0x50, 0x53, 0x50, 0x07, 0x10, 0x01, 0x00, 0x01, 0x01, 0x56, 0x73, 0x68, 0x43, 0x6F, 0x6E, \n\t0x74, 0x72, 0x6F, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x46, 0x61, 0x00, 0x00, 0x2D, 0x27, 0x00, 0x00, \n\t0x98, 0x1B, 0x00, 0x00, 0xC0, 0x35, 0x00, 0x80, 0x2C, 0x02, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, \n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \n\t0x00, 0x00, 0x00, 0x00, 0x84, 0x3F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x05, 0x03, 0x02, 0x00, 0x00, 0x00, \n\t0x59, 0x56, 0xFE, 0x9C, 0x0C, 0x34, 0x7A, 0xC7, 0x1D, 0x97, 0x9F, 0x6C, 0xC2, 0xD5, 0xA9, 0xE6, \n\t0xD4, 0x36, 0x59, 0x36, 0x7D, 0x12, 0x4A, 0xCA, 0xCE, 0xB1, 0xB8, 0xB8, 0x63, 0x0E, 0x50, 0xD2, \n\t0x8C, 0x85, 0xB8, 0xFC, 0xDB, 0xD0, 0x72, 0x44, 0x77, 0x77, 0x7D, 0x62, 0x7D, 0x61, 0x8F, 0x7C, \n\t0xDD, 0x25, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \n\t0x03, 0x83, 0x40, 0x8C, 0xE4, 0x38, 0xC2, 0x97, 0x0A, 0x8B, 0x5A, 0xD7, 0x37, 0x4C, 0xFE, 0x14, \n\t0xF0, 0x0B, 0x94, 0x4C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \n\t0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x42, 0xF5, 0x41, 0xC4, \n\t0x33, 0xD6, 0x3A, 0x71, 0xE3, 0x48, 0x4A, 0x2A, 0xF3, 0xB3, 0x3D, 0x51, 0x6B, 0xD8, 0xE6, 0x13, \n\t0x72, 0xD9, 0xCA, 0xB1, 0x1E, 0x37, 0x07, 0x2C, 0x01, 0xF4, 0xCD, 0x34, 0x9C, 0x01, 0x17, 0x08, \n\t0x1F, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xED, 0x7C, 0x0F, 0x54, 0x9C, 0xD7, \n\t0x95, 0xDF, 0x9D, 0x6F, 0x3E, 0x60, 0x24, 0x8D, 0xAC, 0x0F, 0x79, 0x2C, 0x23, 0x1B, 0xDB, 0x33, \n\t0xE2, 0x03, 0x4D, 0x24, 0x19, 0x8D, 0xE4, 0xB1, 0x8D, 0xAC, 0x51, 0x18, 0xF1, 0x47, 0x42, 0x09, \n\t0xB2, 0xC7, 0x12, 0xEB, 0x43, 0xF6, 0xB0, 0x15, 0x42, 0x60, 0xA3, 0x96, 0x48, 0x2C, 0x8C, 0xBD, \n\t0x24, 0x47, 0x6D, 0x26, 0x12, 0xEB, 0xB2, 0xBB, 0x63, 0x86, 0x4D, 0x38, 0x09, 0xF1, 0x61, 0x4F, \n\t0x67, 0x6D, 0x92, 0xB0, 0x9B, 0x11, 0x60, 0x87, 0x38, 0x1C, 0x57, 0x89, 0xA9, 0x45, 0x1C, 0xBA, \n\t0xD5, 0x69, 0x95, 0x56, 0x27, 0x55, 0x1C, 0x9A, 0x50, 0x9B, 0x24, 0x64, 0xA3, 0x93, 0xB2, 0x5E, \n\t0xEA, 0xD0, 0x3D, 0x34, 0xF4, 0xDE, 0xF7, 0xFD, 0xBE, 0x61, 0x40, 0xC8, 0x56, 0xB6, 0xDB, 0x9E, \n\t0xF4, 0x74, 0x39, 0x67, 0xFC, 0x9B, 0xFB, 0x7B, 0xF7, 0xBD, 0xEF, 0xBE, 0xF7, 0xEE, 0xBB, 0xEF, \n\t0xBE, 0xF7, 0x8D, 0xFC, 0x99, 0xCA, 0xEA, 0x43, 0x0E, 0x87, 0x83, 0xEC, 0xBF, 0xE4, 0x92, 0x8B, \n\t0x44, 0xEA, 0xBB, 0x97, 0x28, 0xC8, 0x38, 0x7A, 0x80, 0xC8, 0x11, 0x78, 0xC9, 0x08, 0x92, 0x97, \n\t0x79, 0x3F, 0x6D, 0xA1, 0xBB, 0x54, 0x79, 0x3D, 0xF4, 0xC7, 0x1F, 0xA6, 0x58, 0x0D, 0xEB, 0x74, \n\t0x96, 0x12, 0x65, 0xB1, 0x6C, 0xD0, 0xCA, 0xBF, 0x85, 0xA5, 0x6F, 0x6D, 0x27, 0x7A, 0x63, 0xF8, \n\t0xEF, 0xDC, 0xE4, 0xB6, 0x98, 0x37, 0x12, 0x6F, 0xBB, 0xC9, 0xE5, 0xA2, 0x6F, 0x6D, 0x9F, 0x53, \n\t0x65, 0x23, 0xC3, 0xBE, 0x58, 0x8C, 0x79, 0x3D, 0xB4, 0xF0, 0x68, 0xA7, 0xE9, 0xF3, 0xF3, 0x37, \n\t0x7A, 0x65, 0xD8, 0xC5, 0x75, 0xF2, 0x37, 0x92, 0xDB, 0x17, 0x20, 0xF2, 0x75, 0x85, 0x69, 0x33, \n\t0x85, 0x75, 0x9F, 0x97, 0x34, 0x22, 0x2D, 0xD4, 0x5A, 0x5A, 0x16, 0xD7, 0x28, 0x6C, 0x38, 0x49, \n\t0x33, 0x59, 0x7E, 0x69, 0xF3, 0x46, 0xAB, 0x6D, 0x07, 0x55, 0x9A, 0x3E, 0xAF, 0x57, 0xE3, 0x3A, \n\t0x1A, 0xD7, 0x4F, 0x70, 0x3B, 0x09, 0x6E, 0x3F, 0xE1, 0x2B, 0xE1, 0x36, 0xC2, 0x44, 0xF7, 0x6F, \n\t0x24, 0x97, 0xC1, 0xCF, 0xCD, 0x2C, 0x73, 0xD1, 0xB4, 0x53, 0x38, 0xDB, 0xCE, 0x75, 0x14, 0x33, \n\t0x0A, 0x29, 0xCB, 0xBC, 0x03, 0x6D, 0xFA, 0xBC, 0x61, 0xB6, 0x27, 0x6C, 0x48, 0xDB, 0x62, 0xBB, \n\t0x7B, 0xA3, 0x65, 0xBB, 0x7C, 0x97, 0xBA, 0xAA, 0x1F, 0xBF, 0x16, 0x39, 0x2B, 0xA4, 0x3B, 0x5E, \n\t0x19, 0x26, 0xC7, 0xC8, 0xB0, 0xA7, 0xE4, 0xCB, 0xA6, 0xDB, 0xF1, 0xC6, 0xB0, 0xCB, 0xF1, 0xEA, \n\t0x70, 0xB6, 0xF4, 0x81, 0xFB, 0x27, 0x7D, 0xF0, 0x79, 0x93, 0xCE, 0xBB, 0x29, 0xE2, 0xF1, 0xF9, \n\t0xC3, 0xE4, 0xDE, 0x68, 0x8F, 0x47, 0x56, 0xC8, 0x64, 0x7D, 0xA5, 0xC7, 0xE5, 0x22, 0xFB, 0x62, \n\t0x61, 0xDA, 0xC5, 0xDC, 0x46, 0x32, 0x8B, 0x36, 0xF0, 0xB3, 0x0B, 0x7A, 0x7E, 0x2F, 0xAD, 0x9F, \n\t0xCB, 0xDC, 0x1D, 0xF4, 0xE5, 0xED, 0x06, 0xCB, 0xEF, 0x2D, 0x1D, 0x2A, 0xF2, 0x79, 0xF7, 0x6A, \n\t0x4E, 0xEA, 0x34, 0xA5, 0x3C, 0x8B, 0xB2, 0x8A, 0xF8, 0xB9, 0x09, 0x7E, 0x6E, 0x82, 0x6D, 0x49, \n\t0xB0, 0x2D, 0x56, 0xFF, 0x1C, 0xFF, 0xFB, 0x36, 0x06, 0xD7, 0xB0, 0x31, 0xF4, 0x0F, 0x6C, 0x63, \n\t0x92, 0x6D, 0xAC, 0xA5, 0x97, 0xB6, 0xD7, 0xB2, 0x7D, 0xBE, 0x00, 0xDB, 0xC3, 0x36, 0xD5, 0xB1, \n\t0x8D, 0x3A, 0x25, 0x0D, 0x99, 0x07, 0x79, 0xEE, 0x97, 0x88, 0x5C, 0x15, 0xFC, 0x5C, 0xF9, 0xDE, \n\t0xC8, 0x28, 0x73, 0x7D, 0x4F, 0x7A, 0xAE, 0x92, 0xCE, 0x5A, 0xCA, 0x36, 0xB7, 0x88, 0x9D, 0xEC, \n\t0x47, 0xB5, 0x34, 0xB0, 0xFD, 0x7D, 0xB7, 0x7C, 0x87, 0xCD, 0xEC, 0x3F, 0x9D, 0x5C, 0x47, 0x17, \n\t0x5F, 0xCA, 0xA3, 0xB4, 0xBD, 0x0E, 0x72, 0x9A, 0xFC, 0x9C, 0x04, 0x3F, 0x37, 0xE1, 0x33, 0xEA, \n\t0x49, 0xEC, 0xA9, 0x67, 0x7B, 0x66, 0x97, 0xAC, 0x31, 0x73, 0x2B, 0x7F, 0x1C, 0x19, 0x8E, 0x73, \n\t0x5D, 0x83, 0x7D, 0x24, 0x73, 0xBC, 0x72, 0xA9, 0xC2, 0xDC, 0xCD, 0xFE, 0x62, 0x50, 0x60, 0xCB, \n\t0xD2, 0x92, 0x96, 0xF6, 0x9B, 0x82, 0xC0, 0x93, 0xBC, 0x56, 0xCC, 0x22, 0x9F, 0x3F, 0x46, 0xD9, \n\t0x3C, 0x3E, 0x7F, 0xBD, 0xF4, 0x96, 0x69, 0x8D, 0x5D, 0x72, 0x58, 0xC6, 0x85, 0xFB, 0xF4, 0xB2, \n\t0xC8, 0x62, 0xA7, 0x8B, 0xE5, 0xF5, 0x6C, 0xB7, 0x21, 0xFE, 0xC5, 0x7E, 0xE9, 0x82, 0x5F, 0xE6, \n\t0xB1, 0x6F, 0x0D, 0xB2, 0x0D, 0x55, 0xFC, 0x6C, 0x2F, 0x8D, 0x6C, 0xAF, 0x66, 0x3B, 0x44, 0xDF, \n\t0xD7, 0x15, 0x23, 0x93, 0xF5, 0x23, 0x6C, 0x8B, 0xEA, 0x2B, 0xF7, 0xCB, 0x6E, 0x4B, 0x64, 0x2F, \n\t0x97, 0x31, 0xC5, 0xFD, 0x7C, 0x69, 0xD8, 0x64, 0xF4, 0x32, 0xCA, 0xBA, 0x21, 0xDD, 0x69, 0x8A, \n\t0xEE, 0x40, 0x49, 0x99, 0xE9, 0xE1, 0xB6, 0x02, 0xF4, 0xF2, 0x70, 0x89, 0x2A, 0x7B, 0x99, 0xF5, \n\t0x5E, 0x1E, 0xF6, 0xD3, 0xB7, 0x86, 0x47, 0x79, 0xBC, 0x82, 0x8C, 0xDC, 0x76, 0x82, 0x9F, 0x97, \n\t0xA8, 0x82, 0x2D, 0xB5, 0xB0, 0x25, 0x42, 0xDF, 0x1E, 0xF6, 0xCD, 0x71, 0xDF, 0xBD, 0x44, 0x35, \n\t0xFC, 0xFC, 0x6A, 0xFA, 0xE6, 0x70, 0x15, 0xBD, 0x36, 0xEC, 0x1B, 0x9B, 0xA6, 0x0A, 0xFA, 0xC6, \n\t0x70, 0x88, 0xBE, 0x3E, 0x1C, 0x14, 0x3B, 0xFB, 0xC6, 0xD9, 0xCE, 0x24, 0x05, 0xD8, 0xF6, 0x30, \n\t0x8D, 0x0E, 0x5F, 0xE4, 0x76, 0x4B, 0xE8, 0xD5, 0x61, 0x59, 0xE7, 0x63, 0x25, 0x9D, 0xE6, 0x94, \n\t0xCC, 0xCB, 0x60, 0x98, 0x5A, 0xA8, 0x2C, 0x2E, 0x5C, 0x80, 0xB9, 0x6F, 0x33, 0x37, 0xBA, 0xE9, \n\t0x29, 0x93, 0x95, 0xDC, 0xB2, 0x8E, 0xFD, 0x32, 0x4F, 0x31, 0x99, 0x77, 0x2D, 0x54, 0xC5, 0x6B, \n\t0x3E, 0x87, 0xC7, 0x51, 0xE6, 0x43, 0x3E, 0xB5, 0x8F, 0x7E, 0x59, 0xF9, 0x93, 0xE8, 0x3D, 0xE0, \n\t0x20, 0x97, 0xF4, 0xB7, 0x23, 0x83, 0xF3, 0xB1, 0x2C, 0x7D, 0xD5, 0xA9, 0x61, 0xA8, 0x8B, 0xDB, \n\t0x75, 0xD1, 0xEF, 0x0F, 0x49, 0xFB, 0x96, 0x1F, 0x69, 0xA1, 0x48, 0x69, 0x39, 0xC7, 0x10, 0xCD, \n\t0x74, 0x52, 0x83, 0x47, 0xE2, 0xC8, 0x6E, 0x6E, 0xC3, 0x41, 0x3A, 0x8F, 0x59, 0x83, 0x47, 0xE6, \n\t0x4F, 0xE3, 0xEF, 0xD7, 0x10, 0xB3, 0x2E, 0xAA, 0x7A, 0x49, 0xCD, 0xE7, 0x97, 0xD8, 0x52, 0xAF, \n\t0xF9, 0x4A, 0xA6, 0xB5, 0x61, 0x79, 0xA6, 0x43, 0x37, 0xF7, 0xC1, 0x56, 0x41, 0x17, 0x35, 0x76, \n\t0x37, 0x40, 0x6E, 0x80, 0x2C, 0xB6, 0xF6, 0x3F, 0x6A, 0xAF, 0x1D, 0xAF, 0xB6, 0x81, 0x9E, 0x34, \n\t0xEC, 0x35, 0xE5, 0x29, 0x59, 0xE6, 0xDD, 0xF4, 0xA4, 0xC7, 0x97, 0x54, 0x4F, 0x0E, 0x55, 0x70, \n\t0x5F, 0xD7, 0x51, 0x38, 0x22, 0x3A, 0x3B, 0xD0, 0x9E, 0xB4, 0x25, 0xDF, 0x1D, 0xE4, 0x31, 0x6B, \n\t0xF9, 0xD9, 0xF6, 0x38, 0x8C, 0x64, 0xB4, 0x5D, 0x46, 0x61, 0xCF, 0xDB, 0x6F, 0xEB, 0x8A, 0x9F, \n\t0xC8, 0xE0, 0xD7, 0xA9, 0x71, 0xB3, 0xC6, 0x70, 0x3F, 0xC6, 0x30, 0x73, 0xFC, 0x92, 0x0E, 0x89, \n\t0x69, 0xBF, 0x3F, 0x24, 0xFC, 0xD5, 0x8C, 0x7A, 0x01, 0xD6, 0x15, 0x74, 0xB0, 0x7F, 0x4F, 0xF3, \n\t0x18, 0x2C, 0x39, 0xB2, 0xCD, 0x9D, 0x98, 0x13, 0x17, 0xAF, 0x6F, 0x19, 0xCB, 0x77, 0x98, 0xF7, \n\t0xB3, 0xBF, 0xF9, 0xE9, 0x2B, 0x09, 0x89, 0xB1, 0x32, 0xE6, 0xEB, 0xE9, 0x2D, 0xF3, 0xA7, 0x32, \n\t0x66, 0x25, 0x96, 0x2C, 0xEB, 0xEF, 0x1D, 0x35, 0x07, 0xD9, 0x6A, 0xDD, 0xCE, 0xF2, 0x33, 0xD6, \n\t0x23, 0x96, 0xE4, 0xAA, 0xD8, 0xBA, 0xD9, 0xFC, 0x91, 0x9E, 0x6D, 0xDA, 0x71, 0x5A, 0xD5, 0x55, \n\t0x3E, 0xBD, 0x5C, 0x37, 0x0B, 0x75, 0xE7, 0x32, 0xEA, 0xF2, 0x1E, 0x10, 0x91, 0xBA, 0xBE, 0x1E, \n\t0xA2, 0x1F, 0xA1, 0x8E, 0x93, 0xC2, 0x9B, 0x65, 0x0C, 0xAE, 0xF2, 0x58, 0xBD, 0xFD, 0x76, 0x67, \n\t0x50, 0xF6, 0x06, 0x19, 0x3B, 0x07, 0x95, 0xC9, 0xDC, 0x0E, 0x39, 0xD4, 0x9C, 0x9F, 0xDF, 0x22, \n\t0x23, 0x9D, 0x83, 0xB1, 0x4D, 0xCF, 0xAF, 0x77, 0xDC, 0x99, 0x39, 0xC7, 0xEB, 0x16, 0xC6, 0x35, \n\t0xD1, 0x63, 0x3F, 0x4F, 0xB0, 0xDF, 0xF3, 0x7A, 0xF8, 0x26, 0xAF, 0x87, 0xD7, 0x12, 0xEC, 0xE7, \n\t0x09, 0xF6, 0xE9, 0x04, 0xFB, 0x7A, 0x82, 0x7D, 0x3A, 0xC1, 0xFE, 0x9E, 0x08, 0x64, 0xAC, 0x13, \n\t0xD9, 0xD7, 0x64, 0x0F, 0x93, 0x75, 0x2A, 0xEB, 0xC4, 0xCD, 0xEB, 0xC4, 0xC5, 0xBE, 0x7F, 0x51, \n\t0xF9, 0x13, 0xC7, 0x36, 0xF8, 0x8B, 0xAF, 0x27, 0x4C, 0xB6, 0xBF, 0xD8, 0x3E, 0xAF, 0xE6, 0x8E, \n\t0xFD, 0xC2, 0xA5, 0xF6, 0x3B, 0xAF, 0xF6, 0x4B, 0x97, 0xE5, 0xB3, 0xFC, 0xB1, 0xEC, 0xE4, 0xB1, \n\t0xFF, 0x1B, 0x9E, 0x2F, 0x9F, 0xC1, 0xE3, 0xBC, 0xBC, 0x47, 0xA5, 0xCB, 0xFE, 0xDA, 0x0D, 0xFF, \n\t0xF7, 0xC2, 0x6F, 0xBB, 0xC2, 0x6A, 0x6F, 0x5D, 0xCF, 0xA1, 0xE1, 0x1A, 0xAF, 0x31, 0xF1, 0x03, \n\t0xD1, 0x19, 0xDB, 0xFF, 0x64, 0x8A, 0xC8, 0x19, 0x1A, 0xDD, 0xDF, 0x90, 0x12, 0xAE, 0xE5, 0x40, \n\t0x58, 0x61, 0x33, 0xA3, 0x35, 0x1E, 0x61, 0xCD, 0x17, 0xE3, 0x76, 0xF8, 0x39, 0x6E, 0xB5, 0xD7, \n\t0xBD, 0x7A, 0xD3, 0x9E, 0x69, 0xF7, 0x53, 0xFA, 0x24, 0xFB, 0x75, 0x2D, 0x5D, 0x88, 0x15, 0xCB, \n\t0xBA, 0xE3, 0xD8, 0x98, 0x4B, 0x0D, 0x86, 0xAC, 0x7F, 0x69, 0xB3, 0x84, 0xFD, 0xAE, 0x96, 0xE3, \n\t0x7F, 0x96, 0x9A, 0xEB, 0x2C, 0xF3, 0x4F, 0xC8, 0xB2, 0x9B, 0xFD, 0xD2, 0x23, 0x7B, 0x71, 0x2D, \n\t0xE9, 0x45, 0x32, 0xEE, 0x99, 0xFB, 0xB2, 0xFE, 0x21, 0x7B, 0xB5, 0xCF, 0x90, 0x9C, 0x61, 0x84, \n\t0xF7, 0x06, 0x79, 0x6E, 0x79, 0xAC, 0x96, 0x7A, 0x4C, 0xF5, 0x6C, 0xBF, 0x04, 0xF4, 0x6C, 0x73, \n\t0x93, 0x3C, 0x9F, 0xFD, 0x61, 0x4B, 0x7A, 0x0F, 0x73, 0x86, 0xEA, 0x0F, 0x34, 0xC4, 0xED, 0x7D, \n\t0xC0, 0x17, 0x08, 0x93, 0xF8, 0x04, 0x73, 0x29, 0x6E, 0x43, 0xB5, 0x3F, 0xCB, 0xE3, 0x7E, 0x0F, \n\t0xF6, 0x77, 0x9B, 0x4B, 0xEF, 0xF1, 0xC8, 0x55, 0xA4, 0x9F, 0x56, 0x9F, 0x8D, 0x50, 0xED, 0x01, \n\t0xAD, 0x9B, 0xFB, 0xE4, 0xA9, 0x3D, 0xA0, 0x77, 0xBF, 0x2E, 0x73, 0x5B, 0xA4, 0x9B, 0xCC, 0x0D, \n\t0x89, 0x6C, 0xC7, 0x62, 0x2A, 0x12, 0xBF, 0xD5, 0x43, 0x83, 0x1F, 0xB5, 0x72, 0x1B, 0xE1, 0x78, \n\t0x47, 0x30, 0x7D, 0x5D, 0xA4, 0xE6, 0x65, 0x9E, 0xE7, 0x24, 0x73, 0x7D, 0x39, 0x68, 0x4F, 0x51, \n\t0x36, 0x1D, 0x54, 0x6B, 0x8C, 0x87, 0xDE, 0xFC, 0xD5, 0xD2, 0xB6, 0xA7, 0x44, 0xAF, 0x4E, 0x23, \n\t0x97, 0xEC, 0x2F, 0x32, 0x9E, 0xB5, 0x07, 0x2A, 0xE3, 0xD2, 0xEE, 0x3B, 0xF0, 0x79, 0xDB, 0xF7, \n\t0x79, 0xAE, 0x68, 0xAD, 0xF1, 0x12, 0xDB, 0x97, 0xED, 0x1E, 0x19, 0xB6, 0xDA, 0x28, 0x8B, 0xEF, \n\t0x46, 0x5C, 0x18, 0xFC, 0xE8, 0x93, 0x3C, 0x67, 0x56, 0xEC, 0x11, 0xDE, 0xE7, 0x8D, 0x70, 0xA6, \n\t0x77, 0x3E, 0x26, 0x71, 0x23, 0xE0, 0x30, 0x8A, 0x88, 0xB6, 0xA9, 0xFE, 0x48, 0x5F, 0x03, 0xCA, \n\t0x46, 0xA7, 0xB2, 0x43, 0xFA, 0x52, 0x77, 0xA0, 0x3C, 0x45, 0x45, 0x9A, 0x39, 0xB7, 0xA4, 0x6D, \n\t0xD1, 0xD9, 0x76, 0x19, 0xE7, 0x3A, 0x1E, 0xE7, 0xAD, 0x12, 0x3B, 0xB8, 0x8F, 0x75, 0x07, 0xEA, \n\t0x53, 0x76, 0x3F, 0xB5, 0xEC, 0xE5, 0x7E, 0x4A, 0xFF, 0xA4, 0x9F, 0xD2, 0x5F, 0xE9, 0xA7, 0x9B, \n\t0xB6, 0x6D, 0x16, 0xBD, 0x0B, 0xDC, 0xCF, 0x79, 0xF8, 0xA9, 0xDD, 0xCF, 0x99, 0x55, 0xFD, 0xEC, \n\t0xD3, 0x94, 0xFF, 0x93, 0x8C, 0xC7, 0x5A, 0xFD, 0x95, 0x7D, 0xDB, 0xE0, 0x3D, 0xC7, 0xCD, 0x7B, \n\t0x91, 0xAC, 0x3B, 0xE9, 0xB7, 0x87, 0xFB, 0xBF, 0xDC, 0xF7, 0x48, 0xDC, 0xD7, 0xC7, 0x6B, 0xB3, \n\t0x27, 0x49, 0xBE, 0xA4, 0xEC, 0x53, 0xC4, 0xFD, 0xD5, 0xCE, 0xFB, 0xC5, 0x0F, 0xC5, 0x6E, 0x7F, \n\t0x7D, 0x7A, 0x6D, 0x79, 0x1D, 0x59, 0x45, 0xB2, 0x16, 0xEE, 0xE5, 0xBE, 0x1B, 0x3C, 0x6F, 0x79, \n\t0xE0, 0xF3, 0x28, 0x5C, 0x23, 0xB6, 0x73, 0xCC, 0x62, 0x5F, 0x8A, 0x69, 0x01, 0x87, 0x8B, 0xFB, \n\t0xFE, 0x4E, 0x5C, 0xA7, 0x77, 0xE3, 0x2E, 0x9A, 0x89, 0xBB, 0xE9, 0x27, 0x71, 0x83, 0x7E, 0xC6, \n\t0xFD, 0x78, 0x93, 0xFD, 0xEB, 0x72, 0xCA, 0x45, 0x13, 0x29, 0x37, 0x7D, 0x27, 0xF5, 0xFE, 0xD2, \n\t0x2C, 0xB7, 0xF3, 0x96, 0x29, 0xE3, 0x34, 0xF8, 0xD1, 0x53, 0x66, 0xCC, 0xC8, 0x25, 0x9F, 0x51, \n\t0x4E, 0xB2, 0xF7, 0xC8, 0xB8, 0xFE, 0x27, 0x4D, 0x62, 0x7B, 0x79, 0x4A, 0xDA, 0x96, 0x3D, 0xED, \n\t0x07, 0x4B, 0xDB, 0xB6, 0xC8, 0x1C, 0xC8, 0x7A, 0xE6, 0x3E, 0x24, 0xB8, 0x5F, 0x9C, 0x23, 0x7C, \n\t0x7D, 0xC5, 0x7A, 0x94, 0xB5, 0x60, 0xE7, 0x0B, 0x56, 0xFF, 0xCA, 0xE3, 0xD6, 0xBC, 0x1E, 0x56, \n\t0x3E, 0xE7, 0xA0, 0x75, 0xA6, 0x57, 0xC5, 0xE8, 0x86, 0x98, 0x87, 0xFB, 0xE1, 0x20, 0xC9, 0x9F, \n\t0x7E, 0x9E, 0x52, 0x39, 0x56, 0x49, 0x3D, 0x05, 0x1C, 0x5D, 0x62, 0x27, 0xDB, 0x7E, 0x99, 0x6D, \n\t0x9F, 0x60, 0xDB, 0xBF, 0x13, 0xB7, 0x6C, 0x7C, 0x87, 0x6D, 0x7F, 0x97, 0x6D, 0x9F, 0x61, 0xDB, \n\t0x7F, 0xC2, 0xB6, 0x4F, 0x7A, 0xAC, 0x3E, 0x69, 0x21, 0xB1, 0xF5, 0x7F, 0xB2, 0xAD, 0x75, 0x07, \n\t0x8E, 0xB0, 0xCE, 0xCF, 0xCC, 0xD9, 0xA5, 0xAF, 0xB0, 0x6F, 0x9C, 0x32, 0x25, 0xAF, 0x12, 0x5B, \n\t0x24, 0x8F, 0xAA, 0xE7, 0x79, 0xE8, 0xE1, 0x79, 0xF0, 0x25, 0xAD, 0x38, 0xD8, 0xCB, 0xF9, 0x41, \n\t0x27, 0xCF, 0x45, 0x1F, 0xCF, 0x45, 0x9C, 0xE7, 0xA6, 0x8B, 0xE7, 0x26, 0xC6, 0x73, 0x62, 0xC5, \n\t0x29, 0x9E, 0x8B, 0x41, 0x6B, 0x6F, 0x6E, 0x64, 0x1F, 0xCC, 0x52, 0x7B, 0x4F, 0x4C, 0x73, 0xA9, \n\t0xFC, 0xCD, 0xAB, 0x7D, 0x43, 0xD6, 0x44, 0x5F, 0x98, 0x06, 0x29, 0x96, 0x2D, 0x3A, 0x63, 0xFB, \n\t0xCB, 0xE2, 0x5F, 0xE1, 0x38, 0x2E, 0x3A, 0xB2, 0x16, 0x47, 0xF7, 0xEB, 0xDD, 0x77, 0x50, 0x4C, \n\t0x27, 0xDA, 0x1C, 0xBA, 0x81, 0x3A, 0xDC, 0x46, 0x9E, 0xD4, 0xB1, 0xD6, 0xBC, 0x57, 0xAB, 0x74, \n\t0x92, 0x4B, 0x72, 0xED, 0x5F, 0x4A, 0x9E, 0xC1, 0xFA, 0xE2, 0x3F, 0xA3, 0xFB, 0xB5, 0x21, 0xA9, \n\t0x33, 0xB2, 0xBF, 0xAC, 0x7B, 0x33, 0x95, 0xEB, 0x76, 0x7E, 0x90, 0xE2, 0xF6, 0xB7, 0xF1, 0x33, \n\t0x55, 0xDE, 0xC4, 0xED, 0xB7, 0xF0, 0x5A, 0xBF, 0x9F, 0xC7, 0xCE, 0x92, 0x75, 0x15, 0x43, 0x3D, \n\t0xFB, 0x3A, 0x79, 0x4F, 0x39, 0xA8, 0x73, 0x5D, 0xB5, 0xAF, 0x3C, 0xC9, 0xED, 0xB3, 0xDE, 0x90, \n\t0xB4, 0x61, 0xDB, 0xE0, 0x5A, 0x65, 0x83, 0xE4, 0xD1, 0xBF, 0x72, 0x58, 0x3E, 0x34, 0xE9, 0x94, \n\t0xB9, 0x96, 0x3F, 0x23, 0x24, 0x36, 0x8D, 0xC0, 0xA6, 0x11, 0xB6, 0xC9, 0x5E, 0x63, 0x2D, 0xB2, \n\t0xBE, 0x18, 0x47, 0xD9, 0x1E, 0x33, 0x6D, 0x8F, 0x26, 0xF6, 0xC6, 0xBD, 0x19, 0xF6, 0xA5, 0xB8, \n\t0xEE, 0x03, 0xF4, 0x59, 0xD5, 0xFF, 0xE6, 0x03, 0x65, 0xDD, 0x27, 0xD8, 0x3F, 0xAD, 0xB1, 0xB1, \n\t0x6C, 0xF5, 0xB3, 0xAD, 0xBC, 0xD7, 0xEA, 0x29, 0xD5, 0x5F, 0x83, 0xC7, 0x58, 0xEB, 0xCE, 0x56, \n\t0xFD, 0x21, 0x3A, 0x94, 0x63, 0xE7, 0xC1, 0x9A, 0xD9, 0xCA, 0x36, 0x71, 0xD9, 0x50, 0x02, 0xDC, \n\t0x5E, 0xCD, 0x8E, 0x9F, 0x5A, 0xE8, 0x0F, 0xB8, 0xAC, 0x9E, 0xF7, 0x07, 0xD1, 0xE3, 0x67, 0x0C, \n\t0x59, 0xE3, 0x54, 0x11, 0xAF, 0xA0, 0xF3, 0xBA, 0x3C, 0xCB, 0xEE, 0xF3, 0xA3, 0xE9, 0x3E, 0x6F, \n\t0xEB, 0x26, 0x83, 0xFB, 0x31, 0x57, 0x16, 0xA8, 0xA4, 0x72, 0x95, 0x77, 0x04, 0xF7, 0xD9, 0x79, \n\t0x47, 0xD2, 0x19, 0xA0, 0xBD, 0x45, 0x56, 0xCE, 0x5E, 0x58, 0xA4, 0xAB, 0x75, 0x65, 0x84, 0xAC, \n\t0x3C, 0x36, 0xAC, 0xFD, 0x19, 0x3F, 0xB7, 0xE3, 0x40, 0x76, 0x91, 0xF8, 0x81, 0xE0, 0x98, 0x4B, \n\t0x64, 0xBD, 0xE8, 0x45, 0xB6, 0x41, 0x62, 0x95, 0xE8, 0xFD, 0xDB, 0x1C, 0x79, 0x5E, 0x98, 0xF3, \n\t0x13, 0xC3, 0x7C, 0x90, 0xFB, 0x26, 0x56, 0xDE, 0xA5, 0x59, 0xFB, 0x9F, 0x41, 0xDB, 0x8A, 0xDC, \n\t0x54, 0xCE, 0x3E, 0x5D, 0xC1, 0x3E, 0x5D, 0xC9, 0xFE, 0x5C, 0xD4, 0xBD, 0x94, 0x2B, 0xF1, 0x73, \n\t0xDB, 0x90, 0xE4, 0x18, 0x12, 0x73, 0x7C, 0x55, 0x72, 0xD6, 0xDC, 0x36, 0xE4, 0x22, 0xFF, 0x90, \n\t0x9B, 0x3E, 0xC2, 0x9F, 0x72, 0xEE, 0xD3, 0xA1, 0x21, 0xAE, 0x33, 0xB4, 0x95, 0x07, 0x92, 0xEB, \n\t0x0D, 0xC9, 0xF8, 0x4D, 0x29, 0x5B, 0x3A, 0xCD, 0xD5, 0xF3, 0x95, 0xC2, 0x7C, 0xA5, 0x32, 0xE6, \n\t0xAB, 0x99, 0xE7, 0x2B, 0x73, 0x2C, 0x72, 0xD2, 0x63, 0x61, 0xED, 0x83, 0x9C, 0x9F, 0x18, 0xB5, \n\t0x7C, 0x2E, 0x90, 0x3D, 0x50, 0xD6, 0x66, 0x3A, 0xF7, 0x30, 0xEA, 0x35, 0x5E, 0x17, 0x09, 0x5E, \n\t0x23, 0x09, 0x5E, 0x33, 0x09, 0x5E, 0x1F, 0x09, 0x5E, 0x1F, 0x09, 0x5E, 0x2F, 0x89, 0x18, 0x62, \n\t0x5B, 0x72, 0x8D, 0xDC, 0x42, 0xE2, 0x9B, 0xE4, 0x17, 0xE9, 0xDC, 0xA2, 0x67, 0x79, 0x0D, 0x65, \n\t0x23, 0x7F, 0xBB, 0x77, 0x1D, 0xF2, 0x04, 0x8E, 0xB9, 0x1E, 0x59, 0x47, 0x1C, 0xCF, 0x24, 0xFE, \n\t0x8C, 0xED, 0x6F, 0xE0, 0x9C, 0x7A, 0x9B, 0x3A, 0xB7, 0x8C, 0xAD, 0xCA, 0x03, 0x4E, 0x72, 0x9F, \n\t0x57, 0xE4, 0x02, 0x2A, 0x47, 0x5D, 0x99, 0x07, 0xF0, 0x18, 0xA8, 0x3D, 0xFA, 0x22, 0xF2, 0xE4, \n\t0x0F, 0xCA, 0x15, 0x66, 0x33, 0xCE, 0xFA, 0x62, 0xB7, 0x9C, 0xA3, 0xEC, 0xF8, 0xAC, 0xCE, 0x0A, \n\t0x1C, 0x8B, 0xA5, 0x1D, 0xD5, 0x37, 0x0E, 0x7C, 0x2A, 0x3F, 0xEA, 0xB2, 0xF3, 0x23, 0x42, 0x7E, \n\t0x44, 0x9A, 0xB5, 0x8E, 0x24, 0xFF, 0x0C, 0xEB, 0x61, 0xF6, 0x25, 0xC9, 0x8F, 0xAC, 0x1C, 0xC8, \n\t0x9B, 0xCE, 0x81, 0x1E, 0xD3, 0xAD, 0xFC, 0x28, 0x1B, 0x67, 0xA3, 0x0D, 0x18, 0x87, 0xB4, 0x9D, \n\t0x2A, 0xAF, 0x0C, 0x6B, 0xB2, 0x17, 0xA9, 0x5C, 0x0F, 0x67, 0x8C, 0x7D, 0x5C, 0x6F, 0x70, 0x7F, \n\t0x04, 0x7D, 0xF6, 0x6A, 0xB6, 0x9E, 0xE8, 0x58, 0x67, 0xB3, 0x95, 0x71, 0x97, 0xEB, 0xBB, 0x24, \n\t0xE6, 0xCA, 0xB3, 0xD6, 0x2A, 0xB7, 0x63, 0x72, 0xE6, 0x3D, 0x87, 0xBD, 0x1F, 0xD9, 0x73, 0x26, \n\t0x63, 0x91, 0x39, 0x67, 0xD6, 0x99, 0x25, 0x6C, 0x2C, 0x2D, 0xE5, 0x9A, 0xE9, 0x79, 0x53, 0x39, \n\t0x1C, 0xEF, 0x17, 0x3C, 0x5F, 0x7C, 0x56, 0xD9, 0x22, 0xF3, 0x21, 0x73, 0xC6, 0x72, 0xCA, 0xEE, \n\t0x53, 0x0E, 0xF9, 0xB2, 0xA5, 0xEE, 0xEA, 0xF1, 0xFF, 0x11, 0xE6, 0xC8, 0x67, 0xDC, 0x3C, 0x7F, \n\t0x99, 0x73, 0x93, 0xE9, 0x53, 0xB2, 0x77, 0xBA, 0xD4, 0x59, 0x6D, 0x44, 0xED, 0x9B, 0x32, 0x4F, \n\t0xBE, 0x98, 0x35, 0x3F, 0xBE, 0x1E, 0x9E, 0xAB, 0xE4, 0xB2, 0xBD, 0x92, 0xC3, 0x2D, 0x2D, 0xDD, \n\t0x69, 0x76, 0xE9, 0xB2, 0x36, 0xB4, 0x50, 0xFD, 0xBE, 0x72, 0xCE, 0xAF, 0x4F, 0x75, 0x31, 0xF6, \n\t0x39, 0xC9, 0xF9, 0x97, 0x7F, 0xA1, 0x78, 0xE7, 0xEB, 0x6A, 0x3C, 0x79, 0x93, 0xDD, 0xB7, 0x4E, \n\t0xC6, 0x9C, 0xC7, 0x14, 0x6B, 0x62, 0x90, 0xE3, 0x58, 0x01, 0xFB, 0xA0, 0xF4, 0xC1, 0x1A, 0x8F, \n\t0x98, 0x66, 0xEB, 0xAA, 0xFC, 0x06, 0xBA, 0xF6, 0x58, 0x65, 0x51, 0xC3, 0x8E, 0x3B, 0xF9, 0x99, \n\t0xB2, 0x67, 0x0F, 0xE8, 0xD6, 0x39, 0x48, 0xF6, 0x64, 0x2B, 0x6F, 0x62, 0x9E, 0xC7, 0xC0, 0xBE, \n\t0x0F, 0xD2, 0x79, 0x4D, 0xFE, 0x70, 0xA9, 0xDC, 0xB0, 0xF6, 0x2B, 0xC9, 0x63, 0xB2, 0x42, 0x8B, \n\t0x4B, 0x0D, 0x45, 0x75, 0xEC, 0x37, 0xA2, 0xF7, 0x37, 0xBC, 0xB7, 0x6A, 0xBC, 0x2F, 0xDA, 0xCF, \n\t0xBD, 0xA4, 0xFC, 0xA6, 0x5E, 0xB3, 0x65, 0x37, 0x9D, 0xCC, 0x16, 0xD9, 0xB6, 0x47, 0x6C, 0xB9, \n\t0xD5, 0x1E, 0xFC, 0x0E, 0x7C, 0xE1, 0x56, 0xE5, 0xB6, 0x2F, 0x4C, 0x2F, 0x89, 0xCE, 0x37, 0x86, \n\t0x7D, 0x83, 0xCB, 0x63, 0x9D, 0x99, 0xA7, 0x58, 0x6B, 0x98, 0xC7, 0xB8, 0x6F, 0x9A, 0x73, 0x0C, \n\t0xF8, 0x48, 0x92, 0x1C, 0x96, 0x0F, 0xC0, 0x47, 0x64, 0x4C, 0x4A, 0xD8, 0xAE, 0xB0, 0x8C, 0x55, \n\t0x12, 0xFE, 0x62, 0x98, 0x53, 0xEB, 0x97, 0xD7, 0xF9, 0xB2, 0x0F, 0x27, 0x35, 0x5B, 0x7F, 0x3D, \n\t0x27, 0xC6, 0x52, 0x87, 0xDB, 0x4D, 0xB0, 0x0D, 0x6B, 0xDA, 0xC9, 0x67, 0x2F, 0x3E, 0x4B, 0x5B, \n\t0x3E, 0x7D, 0xF9, 0x01, 0x83, 0x3E, 0x48, 0x57, 0xFA, 0xE4, 0x85, 0xFF, 0x28, 0x1F, 0xE9, 0x5B, \n\t0xE9, 0x3F, 0x99, 0xFD, 0xF1, 0xD8, 0x7D, 0x91, 0x7D, 0x3E, 0xC3, 0x7F, 0x7C, 0x61, 0x89, 0x2D, \n\t0xF5, 0xB2, 0x57, 0xAB, 0x3E, 0xF8, 0x02, 0x5E, 0x4D, 0xFA, 0x71, 0xB9, 0x34, 0x37, 0xA3, 0x1F, \n\t0x31, 0xA5, 0x23, 0xF1, 0x74, 0x9D, 0xF4, 0xE1, 0x03, 0xE6, 0x61, 0x36, 0x63, 0x4D, 0x7E, 0xD8, \n\t0x5C, 0xCC, 0xAD, 0x8A, 0x49, 0xF6, 0x39, 0x4D, 0xEC, 0xB6, 0x7C, 0x3D, 0x49, 0x1F, 0x14, 0x8B, \n\t0xAC, 0xF3, 0x3C, 0xC7, 0x53, 0x7F, 0xF8, 0xA6, 0xD8, 0xB2, 0x7A, 0xAD, 0xBD, 0x8F, 0x75, 0xB8, \n\t0x77, 0x03, 0xCE, 0x73, 0x99, 0x73, 0xF4, 0x7F, 0x21, 0x6E, 0x5A, 0x3E, 0x1C, 0xD6, 0x36, 0x8A, \n\t0xBD, 0x81, 0xFA, 0x9B, 0xEC, 0xBD, 0x55, 0x8C, 0x5B, 0xC0, 0x78, 0x7E, 0xEA, 0x16, 0x76, 0xDF, \n\t0x6E, 0xDC, 0xB3, 0xF6, 0x2A, 0xCB, 0x07, 0x3E, 0xCC, 0xD6, 0x75, 0x6A, 0x8F, 0x5A, 0x19, 0xAF, \n\t0x33, 0xF3, 0xFC, 0x39, 0x8C, 0xE5, 0xE0, 0x2D, 0x6C, 0xBA, 0xD5, 0x19, 0xE8, 0xFF, 0x84, 0x2D, \n\t0xF3, 0xB0, 0xE5, 0xC7, 0xBF, 0xA1, 0x2D, 0x6B, 0xDD, 0x0F, 0x90, 0x9D, 0x0B, 0x73, 0xAC, 0xB5, \n\t0xEF, 0x01, 0xA4, 0x1D, 0x75, 0xDF, 0xD1, 0x63, 0xE5, 0x90, 0x72, 0x67, 0x94, 0x85, 0xFD, 0xCC, \n\t0x3E, 0xA3, 0x6C, 0x44, 0x1E, 0x27, 0xB9, 0x8A, 0x9C, 0xF1, 0xDF, 0x53, 0xB9, 0x07, 0xA9, 0xDC, \n\t0x4F, 0x72, 0xD4, 0x4C, 0xD9, 0x9F, 0x21, 0x67, 0xEE, 0xED, 0x22, 0xAF, 0xF6, 0xC1, 0xF7, 0xD0, \n\t0x37, 0xFB, 0x3C, 0x65, 0xE7, 0xF1, 0x37, 0xC5, 0x2B, 0x5E, 0xD3, 0xB2, 0xBE, 0x65, 0x9D, 0xAB, \n\t0x36, 0x39, 0x76, 0x89, 0xAD, 0xCD, 0xFB, 0x32, 0xEC, 0xE7, 0x71, 0x59, 0x9F, 0xB6, 0xB3, 0xAC, \n\t0xFB, 0x57, 0x4B, 0x65, 0xBC, 0x4F, 0x94, 0xED, 0x92, 0xBE, 0x3C, 0xD7, 0x67, 0xDD, 0xD7, 0xEC, \n\t0xAD, 0xE9, 0x0C, 0xBA, 0xB3, 0xAD, 0x1C, 0xEB, 0x62, 0xFA, 0x0E, 0x28, 0x86, 0x7B, 0x37, 0x2B, \n\t0x86, 0xDD, 0x6A, 0x4D, 0x7F, 0x1F, 0x7E, 0xAA, 0xDE, 0x23, 0xB0, 0xBD, 0x51, 0x95, 0x9B, 0xBF, \n\t0x31, 0x3C, 0x85, 0xBC, 0xA8, 0x85, 0x22, 0xEA, 0xEC, 0x3F, 0x9F, 0xFD, 0x65, 0xF3, 0x2A, 0x73, \n\t0xBB, 0x3C, 0xBA, 0xDA, 0x0F, 0x3A, 0xEE, 0xD2, 0x8B, 0x44, 0x5E, 0xDC, 0x60, 0xDD, 0x29, 0xFB, \n\t0xB7, 0x58, 0x72, 0x64, 0x93, 0x25, 0x2F, 0xEE, 0xB7, 0x64, 0x97, 0x61, 0xC9, 0x97, 0x20, 0xEB, \n\t0xB9, 0x96, 0xEC, 0x39, 0x60, 0xC9, 0x03, 0x90, 0x3B, 0x21, 0x1B, 0x77, 0x42, 0x1F, 0xF2, 0x0C, \n\t0xE4, 0x91, 0x8F, 0x5A, 0x72, 0xBF, 0xC7, 0x92, 0xAF, 0x42, 0x0E, 0xDF, 0x65, 0xC9, 0x93, 0x78, \n\t0xFE, 0x22, 0xE4, 0x56, 0x94, 0x77, 0x6D, 0xB1, 0xE4, 0x1A, 0x96, 0xED, 0xBB, 0x09, 0xCF, 0xDD, \n\t0xAA, 0x2F, 0xEA, 0xBE, 0xE2, 0xB9, 0xBB, 0xB3, 0x43, 0xD6, 0x9D, 0xA0, 0xD5, 0x7F, 0x4F, 0xF7, \n\t0x5B, 0xC1, 0xFE, 0x7D, 0x52, 0xE7, 0x8D, 0xE1, 0x57, 0xA5, 0xFE, 0xBE, 0x4E, 0xD3, 0xCE, 0x9D, \n\t0xA4, 0xBD, 0x09, 0xAE, 0x9B, 0x9F, 0xBD, 0xFC, 0x4E, 0x86, 0xFF, 0x83, 0xF7, 0x1A, 0xCE, 0x50, \n\t0xEF, 0xFE, 0xD3, 0x71, 0x07, 0x65, 0x33, 0x9E, 0x32, 0x47, 0xBE, 0xF6, 0x66, 0x50, 0xA7, 0xA6, \n\t0xB8, 0xCF, 0x38, 0xCF, 0x13, 0xF3, 0x0C, 0x9F, 0x0D, 0x9B, 0x39, 0x07, 0x39, 0x32, 0x48, 0x74, \n\t0x64, 0x2C, 0x87, 0x2A, 0x07, 0x75, 0xAA, 0x1C, 0xDB, 0x40, 0x87, 0x07, 0x5D, 0x74, 0x78, 0x6C, \n\t0x13, 0x55, 0x0D, 0xBA, 0xA9, 0x6A, 0xCC, 0xA0, 0xA6, 0x1E, 0xE3, 0x6B, 0x6F, 0x05, 0x7D, 0x81, \n\t0xE7, 0x39, 0x5E, 0x55, 0x26, 0x73, 0xA9, 0xB9, 0x67, 0x69, 0xE9, 0xBB, 0x01, 0x2D, 0xE4, 0x0C, \n\t0x69, 0xC1, 0x6C, 0x2A, 0x0C, 0x5C, 0xA6, 0xB2, 0xA0, 0x33, 0x54, 0x58, 0xF2, 0x2E, 0xF5, 0xFE, \n\t0x30, 0x2B, 0xD8, 0xF3, 0x43, 0x67, 0xD0, 0xE7, 0xFF, 0x43, 0xF6, 0xAD, 0x0B, 0x94, 0x4B, 0x55, \n\t0xEC, 0xFC, 0xCF, 0x73, 0x0E, 0xFA, 0xD5, 0x94, 0xD8, 0xA4, 0xB2, 0xED, 0x3B, 0x63, 0xA9, 0x73, \n\t0x77, 0xC4, 0xD2, 0xF2, 0xF4, 0x92, 0x75, 0xCE, 0x35, 0xD8, 0x07, 0x83, 0xA5, 0xC7, 0x4C, 0x93, \n\t0xFD, 0xC9, 0xBE, 0xA3, 0x97, 0x3D, 0xD3, 0xA3, 0xF2, 0x95, 0x18, 0xDD, 0xAB, 0xEE, 0x20, 0x64, \n\t0x2D, 0xDD, 0x19, 0x0A, 0x94, 0x36, 0x74, 0xE7, 0x29, 0xFF, 0xCB, 0x0A, 0x5D, 0x77, 0xDB, 0xEF, \n\t0x31, 0xE4, 0xEC, 0x34, 0x90, 0x68, 0x3D, 0x70, 0x28, 0x1E, 0x3D, 0x70, 0x98, 0xCF, 0x0A, 0x5F, \n\t0x4E, 0x14, 0x18, 0xCF, 0xD3, 0xCE, 0xF0, 0x79, 0xEA, 0xE3, 0x71, 0x2C, 0xC8, 0xFB, 0x2A, 0x7D, \n\t0xE6, 0x0B, 0x9D, 0xC1, 0x82, 0xBC, 0x66, 0xDA, 0xE9, 0x3D, 0xCF, 0xED, 0xBC, 0x34, 0x9C, 0x4D, \n\t0x31, 0x43, 0x57, 0x77, 0xE5, 0x95, 0xDD, 0x26, 0x55, 0x74, 0xCB, 0x59, 0xE8, 0x3F, 0x72, 0x7B, \n\t0xDC, 0xBE, 0xBA, 0x3F, 0x1D, 0xD8, 0x67, 0xDF, 0x4F, 0x92, 0xEC, 0x69, 0xEA, 0x79, 0xBF, 0x9B, \n\t0x6D, 0xC5, 0x83, 0xB7, 0xB3, 0xAD, 0x1C, 0x69, 0x64, 0xA5, 0x4E, 0x8D, 0xCA, 0xBB, 0x57, 0xE9, \n\t0xC8, 0x3B, 0xAE, 0xF5, 0xB8, 0x9F, 0x51, 0x7E, 0x91, 0x51, 0x47, 0xC7, 0x39, 0xF4, 0x4F, 0xB3, \n\t0xED, 0x3B, 0x43, 0x2D, 0xE4, 0xC7, 0xD9, 0x42, 0xC5, 0xAC, 0x05, 0x8E, 0x43, 0xBC, 0x66, 0xAC, \n\t0xBD, 0xFB, 0xEB, 0xBC, 0x5E, 0x5E, 0x5D, 0xF1, 0x5E, 0xC1, 0x9B, 0xB1, 0x4E, 0xE4, 0x2E, 0x3E, \n\t0x73, 0x9D, 0xC8, 0xFC, 0xB7, 0xF0, 0x99, 0xE9, 0x8A, 0xF3, 0x94, 0xB9, 0xE4, 0xD4, 0x42, 0x4B, \n\t0x4B, 0x65, 0xC1, 0xF3, 0x79, 0x4E, 0x32, 0xF3, 0x24, 0x32, 0x6A, 0xA1, 0x42, 0x41, 0x3E, 0xFF, \n\t0x54, 0x6F, 0xB8, 0x90, 0x8A, 0xF2, 0xE7, 0xDA, 0xBA, 0x0B, 0xA9, 0x45, 0xFE, 0x04, 0x4B, 0xF5, \n\t0xA2, 0xD7, 0xE4, 0xDD, 0x41, 0xA9, 0x51, 0x64, 0x92, 0xD6, 0x2D, 0xED, 0x8B, 0x3D, 0xAD, 0x7C, \n\t0x6E, 0xBA, 0x9E, 0x7E, 0xF7, 0x67, 0xA3, 0x1E, 0x1A, 0x63, 0xAE, 0xE6, 0x9E, 0x4E, 0x75, 0x0F, \n\t0xE2, 0x2F, 0x5D, 0xBE, 0x83, 0xB3, 0xEE, 0xB0, 0xAC, 0x3B, 0xB7, 0xB5, 0xEE, 0x71, 0x54, 0xBC, \n\t0x91, 0x38, 0x14, 0x93, 0x1C, 0x49, 0xE2, 0xCE, 0xF7, 0xD4, 0xFD, 0xEF, 0xA3, 0x39, 0xE4, 0x92, \n\t0x18, 0xB4, 0x81, 0xB4, 0x3F, 0x76, 0x90, 0xF9, 0x39, 0xA2, 0x82, 0xCF, 0xB9, 0x48, 0x7B, 0x91, \n\t0xB6, 0xE9, 0x54, 0xC8, 0x7E, 0xE5, 0x33, 0x34, 0x2B, 0x0E, 0x79, 0x2B, 0xC8, 0x8A, 0x29, 0x44, \n\t0x77, 0x48, 0xBE, 0xC8, 0xFB, 0x9E, 0x7D, 0x47, 0xB8, 0x89, 0xEB, 0x6E, 0xA4, 0xC2, 0xCF, 0xB9, \n\t0xB9, 0xAE, 0x5B, 0xEA, 0xEE, 0xC8, 0xA2, 0x42, 0xFF, 0xCB, 0xAA, 0xAE, 0xCF, 0x5F, 0xA9, 0xEA, \n\t0x19, 0x1B, 0xAD, 0x33, 0x83, 0xC1, 0xF9, 0xE6, 0x9D, 0xAC, 0x2F, 0x73, 0x33, 0xBD, 0x4F, 0xDE, \n\t0x0B, 0x69, 0x2F, 0xEE, 0x30, 0xCA, 0xB4, 0x1F, 0x2F, 0xC9, 0xFD, 0xCA, 0xB1, 0xA2, 0xDB, 0xCA, \n\t0x3D, 0xFA, 0xF4, 0xA0, 0x7D, 0x2F, 0xF7, 0x7A, 0xFA, 0x6E, 0x38, 0xAC, 0xC6, 0x57, 0xDD, 0x63, \n\t0xF6, 0x65, 0x07, 0xD5, 0x7D, 0x61, 0xA9, 0x36, 0xC4, 0x1F, 0x1E, 0xD3, 0xDC, 0xD0, 0xFD, 0xE2, \n\t0x13, 0xD9, 0xBA, 0xF9, 0x7A, 0x7A, 0x3F, 0x92, 0xB9, 0xE6, 0x2F, 0xD9, 0xD6, 0x7B, 0xAF, 0x73, \n\t0xA5, 0xDB, 0x86, 0xF8, 0xA3, 0xC6, 0x7F, 0x76, 0x9F, 0xDC, 0x2D, 0xE6, 0x98, 0xEA, 0x5E, 0xDE, \n\t0x2F, 0xFD, 0x93, 0xFB, 0xD7, 0x6C, 0x73, 0xD1, 0xAE, 0x9B, 0x67, 0xE5, 0x61, 0xF6, 0xB3, 0x5C, \n\t0x54, 0xAF, 0x77, 0x94, 0x96, 0xA7, 0xAC, 0x67, 0xEA, 0xDD, 0xAA, 0x2C, 0x8F, 0x28, 0xCA, 0x63, \n\t0x1B, 0x2D, 0x0D, 0xA7, 0x96, 0x96, 0x9C, 0x2B, 0xEE, 0xDB, 0xEC, 0x77, 0x65, 0xCB, 0xEF, 0x4F, \n\t0x47, 0xD4, 0xBD, 0x68, 0x07, 0xD7, 0x95, 0x3B, 0x4D, 0xF1, 0x2B, 0x0D, 0xEF, 0x70, 0xA5, 0xAD, \n\t0x4B, 0x6E, 0x69, 0xB7, 0x22, 0x6E, 0x7F, 0x3F, 0xC7, 0xDF, 0x7F, 0xCD, 0x28, 0xFA, 0x6B, 0xCD, \n\t0xFF, 0xED, 0xB4, 0x29, 0xED, 0xA5, 0xEF, 0x5A, 0xB9, 0x0F, 0xC2, 0x9D, 0xCB, 0xE4, 0x78, 0x5C, \n\t0x3A, 0xD0, 0x17, 0xA9, 0xCF, 0x9B, 0xA5, 0x5B, 0xFA, 0xB2, 0xD6, 0xF3, 0x7A, 0xF8, 0x79, 0x8D, \n\t0xEC, 0x6B, 0x75, 0x3C, 0x1F, 0xB5, 0xD8, 0xD7, 0x54, 0xBE, 0xE0, 0xB7, 0xEE, 0x1B, 0x24, 0xDF, \n\t0x92, 0xF7, 0x8B, 0xF5, 0xEC, 0x8B, 0xCD, 0xF6, 0xBB, 0xB7, 0x9E, 0x69, 0xE4, 0x50, 0x5E, 0xED, \n\t0x8A, 0x3A, 0xAF, 0x24, 0x9D, 0xF2, 0x7E, 0x31, 0x4C, 0x2F, 0x71, 0xFB, 0x0D, 0x43, 0x2E, 0x85, \n\t0x65, 0x43, 0xAC, 0x9F, 0xE0, 0xB6, 0x13, 0x5C, 0x37, 0xC1, 0xED, 0x27, 0x6A, 0xE1, 0x0B, 0xAD, \n\t0xFC, 0xDC, 0x49, 0x7E, 0xEE, 0x2E, 0x3E, 0x13, 0xF8, 0xD9, 0xD7, 0x4D, 0x7E, 0xBE, 0x97, 0xDB, \n\t0xCF, 0xE3, 0xE7, 0x07, 0xE4, 0x1D, 0x38, 0xEE, 0x9A, 0x25, 0xB7, 0x96, 0x7E, 0xF8, 0x92, 0x72, \n\t0x4F, 0x36, 0x4E, 0xD2, 0x17, 0x19, 0x03, 0x4D, 0xF9, 0xEE, 0xE6, 0x50, 0xB4, 0xB4, 0xB2, 0x3B, \n\t0x46, 0x2F, 0xF9, 0x4D, 0xF1, 0x8F, 0xAD, 0xF2, 0x26, 0x3E, 0x37, 0x14, 0x33, 0xB2, 0xD4, 0xDD, \n\t0x62, 0xAC, 0xD4, 0xEC, 0x2E, 0x30, 0x2A, 0x99, 0xD2, 0xD8, 0xD6, 0xF3, 0xE4, 0xA7, 0x95, 0x77, \n\t0xD1, 0xD1, 0xD2, 0x43, 0xDD, 0xA2, 0x23, 0xF7, 0x9E, 0xB4, 0x55, 0x22, 0x5C, 0xB6, 0xAA, 0x57, \n\t0x60, 0x1C, 0x4A, 0xD7, 0x11, 0x3D, 0xF1, 0x7D, 0xA9, 0x6B, 0xBD, 0x47, 0xAB, 0x5F, 0xF1, 0xCE, \n\t0xD1, 0xC3, 0xE5, 0xE3, 0x38, 0xA3, 0xB9, 0xD4, 0xBD, 0x54, 0x56, 0xE8, 0x4D, 0xC8, 0x6A, 0xFC, \n\t0xD5, 0x19, 0x2D, 0xCB, 0xE4, 0x85, 0xAC, 0xEE, 0xB1, 0x17, 0x54, 0x6E, 0x90, 0x74, 0x8A, 0x3F, \n\t0x4E, 0xE0, 0x5D, 0xD1, 0xDF, 0x2E, 0x59, 0x77, 0x38, 0xCA, 0xB7, 0x75, 0xDD, 0x94, 0x77, 0xD0, \n\t0x24, 0xEF, 0x85, 0x58, 0xEF, 0x2D, 0x9C, 0xED, 0x27, 0x11, 0xBB, 0x6D, 0x9B, 0xC3, 0x32, 0xA7, \n\t0xB7, 0xB0, 0x59, 0xDE, 0x0D, 0x6F, 0xCA, 0x21, 0xF7, 0x20, 0xDB, 0x7C, 0x09, 0xF9, 0x44, 0xB4, \n\t0xB4, 0x82, 0xEB, 0x15, 0xA9, 0xF7, 0x72, 0xB4, 0x55, 0x57, 0xD1, 0xDC, 0xAA, 0x57, 0x61, 0xD5, \n\t0x0B, 0xBC, 0x49, 0xF3, 0xF4, 0x5D, 0xD3, 0xFD, 0x98, 0x65, 0xDF, 0xD7, 0xB8, 0xFE, 0x1C, 0xBD, \n\t0x65, 0xDE, 0x4E, 0xBD, 0x45, 0xAE, 0xE7, 0xCD, 0xA8, 0xB7, 0x70, 0x9B, 0xF5, 0x74, 0xC7, 0x77, \n\t0xCD, 0x60, 0x46, 0x3D, 0x72, 0xDC, 0x5E, 0x3D, 0x37, 0xD7, 0xAB, 0xCA, 0xA8, 0xE7, 0xBA, 0xCD, \n\t0x7A, 0x1E, 0xAE, 0x57, 0xC7, 0xF5, 0x0C, 0xD6, 0x97, 0x7A, 0x52, 0xDF, 0x9E, 0x2B, 0xAB, 0x7E, \n\t0x61, 0xF7, 0x9A, 0x75, 0xC3, 0x95, 0x3C, 0x36, 0x59, 0x2F, 0x2C, 0x52, 0xF6, 0x0B, 0xBA, 0x23, \n\t0xE7, 0x85, 0x71, 0x87, 0xFC, 0x86, 0x40, 0x7F, 0xA1, 0x2C, 0xC2, 0x71, 0x22, 0xF0, 0x15, 0xA2, \n\t0x48, 0x59, 0xD0, 0xE3, 0x70, 0xBE, 0xC0, 0x5E, 0x79, 0xD1, 0x57, 0xF2, 0x5D, 0xB9, 0x4F, 0x0C, \n\t0xE9, 0xF2, 0xDD, 0x3B, 0x23, 0xF7, 0xEB, 0xA6, 0x2F, 0xEF, 0x02, 0xFB, 0x86, 0x76, 0x71, 0xDC, \n\t0x21, 0xF7, 0xFD, 0xDA, 0xC5, 0x3C, 0x87, 0xF3, 0xA2, 0x41, 0x59, 0x17, 0xD9, 0x77, 0x2E, 0xE6, \n\t0x51, 0xCE, 0xC5, 0x7C, 0xD2, 0x2F, 0x7A, 0xC9, 0x79, 0xD1, 0xE4, 0x8F, 0x9B, 0x9E, 0xE7, 0x3E, \n\t0x5C, 0xE0, 0xB8, 0xD0, 0xD9, 0xED, 0xA2, 0x3F, 0xEC, 0xF6, 0x3A, 0xB4, 0x42, 0xAF, 0x43, 0xF8, \n\t0x43, 0xBC, 0x76, 0x2B, 0x52, 0x9B, 0x28, 0x29, 0xF7, 0x73, 0x29, 0xF6, 0x1B, 0x07, 0xAF, 0x39, \n\t0xB9, 0x7F, 0x2F, 0xFC, 0xCD, 0xEE, 0xDF, 0xB3, 0x79, 0xCD, 0x5C, 0x56, 0xB1, 0xA8, 0x83, 0xE3, \n\t0x85, 0x83, 0x4E, 0x99, 0xCB, 0xF1, 0xE1, 0x72, 0x4A, 0xE2, 0x02, 0xAF, 0xBF, 0x04, 0xAF, 0xCB, \n\t0x04, 0xAF, 0xCB, 0x04, 0xAF, 0xCB, 0x04, 0xAF, 0xCB, 0x04, 0xAF, 0xC7, 0x44, 0x1E, 0xD6, 0x6E, \n\t0x49, 0xC6, 0xB9, 0x42, 0xD6, 0xA8, 0x9D, 0xD3, 0xDB, 0xB1, 0xCA, 0xB5, 0x2A, 0x56, 0xF1, 0xD8, \n\t0xC6, 0x63, 0x74, 0xDE, 0xAF, 0xEE, 0x5D, 0x79, 0x7C, 0x33, 0xD7, 0xC5, 0xCF, 0xB1, 0x2E, 0xEC, \n\t0x31, 0x97, 0x7D, 0x31, 0x56, 0x7A, 0x2A, 0xBE, 0x3C, 0x6F, 0x9C, 0x03, 0x97, 0x34, 0x50, 0xC0, \n\t0xE1, 0x2F, 0xFA, 0xCD, 0xEE, 0xEA, 0x3F, 0xBC, 0x9F, 0x1F, 0x74, 0x46, 0x91, 0x38, 0x62, 0x9F, \n\t0x9B, 0x3A, 0x78, 0xBD, 0xAD, 0xEE, 0x57, 0x2E, 0x3F, 0x40, 0xB5, 0xA7, 0xFA, 0x57, 0x16, 0x8F, \n\t0x05, 0x0C, 0x75, 0x11, 0xB8, 0x43, 0xF6, 0x5B, 0xF9, 0x5D, 0x48, 0xC9, 0xF3, 0x64, 0xC5, 0xE4, \n\t0x72, 0xCE, 0x21, 0x27, 0xD8, 0x97, 0x22, 0xBC, 0xEF, 0xBC, 0x4B, 0xB4, 0x47, 0x23, 0x9D, 0x1A, \n\t0xE4, 0x8E, 0x32, 0x62, 0xDF, 0x69, 0x8B, 0x4D, 0x62, 0xE3, 0x96, 0x75, 0x18, 0x0B, 0x6E, 0xCF, \n\t0x7E, 0xA6, 0xCF, 0x78, 0x53, 0x0E, 0x3A, 0xEE, 0x7C, 0x47, 0x38, 0x45, 0xAD, 0x5A, 0xD1, 0x6F, \n\t0x6A, 0xB3, 0xD8, 0x6A, 0xDB, 0x4D, 0x3D, 0x46, 0x51, 0xF6, 0x2A, 0xBB, 0xC5, 0x5E, 0xC9, 0xD7, \n\t0x44, 0xDF, 0xB2, 0xC3, 0xEC, 0x0E, 0xC2, 0x0E, 0x7B, 0x8E, 0x6E, 0x35, 0x56, 0x49, 0x7E, 0x6E, \n\t0x05, 0xC7, 0xED, 0x30, 0xC7, 0xED, 0x10, 0x3F, 0xBF, 0x84, 0x9F, 0x5D, 0xCB, 0xCF, 0xAA, 0xA1, \n\t0x6F, 0x0E, 0x47, 0xE8, 0xB5, 0xE1, 0x6A, 0x8E, 0xED, 0x55, 0x1C, 0xDB, 0xC5, 0x2E, 0xDB, 0x26, \n\t0xC9, 0x5D, 0xE4, 0xBC, 0xB4, 0x22, 0x8E, 0xB3, 0x5D, 0x1C, 0xB9, 0xB3, 0x57, 0xDB, 0x44, 0x5B, \n\t0x8D, 0x74, 0x3F, 0x5E, 0x5F, 0x2F, 0x36, 0xDD, 0xCD, 0x7E, 0x62, 0x64, 0xF8, 0x49, 0x63, 0x5C, \n\t0xC6, 0x95, 0x5E, 0x91, 0xB8, 0xF7, 0x05, 0xFA, 0xB6, 0xDB, 0x8A, 0xD3, 0xFF, 0x5E, 0xDD, 0x1D, \n\t0x85, 0x6F, 0x8A, 0xD3, 0xBE, 0xC1, 0x7A, 0xED, 0xEB, 0xDC, 0x8E, 0x6F, 0x8C, 0x78, 0x6F, 0x90, \n\t0x77, 0x7B, 0x4F, 0x51, 0xBE, 0xE3, 0xE5, 0xB8, 0x9F, 0x1A, 0x76, 0xC9, 0xFB, 0x78, 0xE1, 0xFC, \n\t0x64, 0x98, 0x05, 0x31, 0xA7, 0xF6, 0x60, 0xCC, 0xC3, 0x7B, 0xDB, 0xCB, 0xB2, 0xFF, 0x69, 0x1E, \n\t0x6B, 0xCE, 0xB5, 0x58, 0x69, 0x41, 0xB7, 0x6F, 0x6C, 0x4E, 0x2B, 0x48, 0xF6, 0x68, 0xBE, 0xBC, \n\t0xE7, 0xB8, 0x6E, 0x43, 0xDC, 0x37, 0x38, 0xC2, 0xE7, 0xDD, 0x88, 0x7C, 0x4F, 0xA9, 0x36, 0xF3, \n\t0xA4, 0xCD, 0x56, 0xF6, 0xD1, 0x86, 0xF8, 0x4E, 0xEE, 0x47, 0x10, 0x39, 0xAB, 0x9B, 0x1A, 0x59, \n\t0xD6, 0xB5, 0x12, 0x9E, 0x77, 0x83, 0x1A, 0x94, 0x5F, 0x5E, 0x0B, 0x1D, 0x36, 0x67, 0xA9, 0xD9, \n\t0x1C, 0xA4, 0xA7, 0xF9, 0x4C, 0xF8, 0x66, 0x57, 0x0E, 0x5D, 0xEE, 0xDA, 0x40, 0x13, 0x5D, 0x9B, \n\t0xE8, 0x3B, 0x5D, 0xEC, 0xEB, 0x7D, 0xEC, 0xEB, 0x7D, 0xEC, 0xEB, 0x7D, 0xEC, 0xEB, 0x7D, 0x4E, \n\t0x7A, 0x87, 0xCF, 0x1E, 0xEF, 0xF0, 0xD9, 0xE3, 0x5D, 0x3E, 0x7B, 0xBC, 0xCB, 0x67, 0x8F, 0x19, \n\t0x3E, 0x7B, 0xCC, 0x8C, 0xC9, 0x1A, 0xD8, 0x44, 0x3F, 0xE1, 0xF3, 0xC7, 0x4F, 0xC6, 0x7E, 0x99, \n\t0xF6, 0x7D, 0xDE, 0x03, 0xD9, 0x96, 0x3E, 0x87, 0x61, 0x9D, 0x7D, 0x8C, 0xA7, 0x78, 0xFE, 0xCA, \n\t0xE3, 0xF9, 0x8E, 0xB2, 0xF8, 0xA5, 0xFD, 0x2A, 0x6E, 0x6A, 0x05, 0x12, 0xDF, 0x62, 0x1A, 0xFA, \n\t0x59, 0x49, 0xB7, 0xDB, 0x47, 0x2B, 0xF7, 0x28, 0x8B, 0xDB, 0xFD, 0xB4, 0xFB, 0xB5, 0x13, 0xFD, \n\t0x34, 0xD0, 0xEF, 0x1C, 0x87, 0x95, 0xC3, 0xCF, 0x53, 0x5B, 0x7C, 0x8E, 0x9E, 0x8E, 0x73, 0x3E, \n\t0xAE, 0x7E, 0x53, 0x54, 0x10, 0xD3, 0x79, 0x3D, 0x87, 0xB5, 0xD6, 0xC7, 0xD4, 0x3B, 0x67, 0xB5, \n\t0x9F, 0x16, 0xF4, 0x44, 0x34, 0xD9, 0x83, 0xED, 0x7D, 0x51, 0xF6, 0x44, 0xD9, 0x1B, 0x2F, 0x73, \n\t0x26, 0xF9, 0x60, 0x4F, 0x0D, 0xEB, 0x73, 0x0C, 0x90, 0x5C, 0x8E, 0xED, 0xFB, 0x2B, 0xEC, 0x83, \n\t0x3E, 0x7F, 0x52, 0x4B, 0xEF, 0x8F, 0x7C, 0x46, 0x9E, 0xCC, 0x38, 0xDB, 0xC4, 0x64, 0xCD, 0x8D, \n\t0xBD, 0xC7, 0x7D, 0xF8, 0x5C, 0x46, 0x1F, 0x5E, 0xE5, 0x3E, 0x1C, 0x5B, 0xB3, 0x0F, 0xC6, 0xAA, \n\t0x3E, 0x78, 0xD0, 0x87, 0x1F, 0xE2, 0x1C, 0xB2, 0xC8, 0x7D, 0x58, 0xF8, 0x2D, 0xEF, 0x83, 0x67, \n\t0x55, 0x1F, 0xF2, 0xD0, 0x87, 0x61, 0xF4, 0x41, 0x77, 0xB4, 0xC5, 0xC9, 0xF1, 0xDB, 0xDD, 0x87, \n\t0xBC, 0x55, 0x7D, 0xC8, 0x47, 0x1F, 0x2E, 0xA0, 0x0F, 0x6E, 0xEE, 0x83, 0xEB, 0xB7, 0xBC, 0x0F, \n\t0xF9, 0xAB, 0xFA, 0xE0, 0x45, 0x1F, 0xB6, 0xA3, 0x0F, 0x1E, 0xEE, 0x83, 0xF1, 0xDB, 0xDA, 0x07, \n\t0x8E, 0x13, 0x79, 0x0E, 0x2B, 0x4E, 0xEC, 0xE0, 0xF8, 0xE0, 0x54, 0x36, 0x13, 0x8D, 0xFE, 0x3A, \n\t0x76, 0xBF, 0xC4, 0x14, 0x3B, 0x57, 0x5A, 0xDE, 0x53, 0xAD, 0xFD, 0x54, 0x9D, 0xA9, 0x8C, 0x69, \n\t0x8D, 0x63, 0x7F, 0x82, 0x63, 0x7F, 0x82, 0x63, 0x7F, 0x82, 0x63, 0x7F, 0x82, 0x63, 0x7F, 0x82, \n\t0xF7, 0x87, 0x04, 0xEF, 0x0F, 0x09, 0xDE, 0x1F, 0x12, 0x25, 0xD8, 0x3B, 0xEA, 0x79, 0xEF, 0xC8, \n\t0x1C, 0xB3, 0xFF, 0xB6, 0x4E, 0xEE, 0xDB, 0x1A, 0xE3, 0x99, 0x9C, 0x77, 0xBD, 0x9C, 0x6B, 0x57, \n\t0x72, 0x4F, 0xAE, 0x97, 0xBB, 0xAE, 0x95, 0xDC, 0x79, 0xE6, 0x64, 0xCC, 0xED, 0x33, 0x33, 0x91, \n\t0x27, 0x24, 0xBF, 0x0B, 0xE8, 0x28, 0x95, 0xFC, 0xE9, 0xD5, 0xF4, 0x3D, 0x3C, 0xF5, 0x44, 0x4C, \n\t0x7B, 0xCF, 0xB1, 0x7F, 0x17, 0x21, 0xE7, 0x6B, 0xB5, 0x9F, 0x77, 0x91, 0x63, 0x17, 0xEF, 0x3F, \n\t0x52, 0x27, 0x73, 0x0F, 0xDA, 0x8E, 0xFE, 0x6F, 0x20, 0xEF, 0x16, 0xB9, 0xEF, 0x90, 0xFD, 0x68, \n\t0xE5, 0xFE, 0x73, 0xCA, 0xDA, 0x7F, 0x24, 0x4F, 0x61, 0xEE, 0xBE, 0x0D, 0x6C, 0x8B, 0xE3, 0x58, \n\t0x4A, 0xE6, 0x35, 0xE6, 0x35, 0x68, 0xBD, 0xBC, 0xDF, 0xD9, 0x2A, 0xFA, 0x17, 0x78, 0xBF, 0x79, \n\t0x79, 0x59, 0x37, 0xAF, 0xC1, 0x9A, 0x03, 0x1E, 0x7F, 0xAB, 0x4E, 0x43, 0xEA, 0x26, 0x1D, 0xAF, \n\t0xE8, 0x5C, 0x50, 0xBF, 0xD5, 0xCB, 0xA2, 0x86, 0x1A, 0xB1, 0x2D, 0xCF, 0x71, 0x9E, 0xCB, 0xED, \n\t0x3A, 0xE7, 0x53, 0xF6, 0xFE, 0xBC, 0x63, 0xC3, 0xF2, 0x6F, 0x64, 0x64, 0x5E, 0x6C, 0xFE, 0xC3, \n\t0xEC, 0x95, 0x79, 0xFE, 0xB0, 0xF3, 0xBA, 0xFD, 0x8E, 0x43, 0xEE, 0x92, 0x96, 0x73, 0x8B, 0xC6, \n\t0x6E, 0x95, 0xF3, 0xA9, 0xDF, 0x28, 0x27, 0xD5, 0x5E, 0x2E, 0x63, 0xEF, 0xC1, 0x7D, 0xAE, 0x8C, \n\t0xE9, 0xD2, 0x92, 0xC7, 0xBC, 0x29, 0x47, 0xE2, 0x31, 0x11, 0x9B, 0xD2, 0x39, 0x52, 0xA0, 0x51, \n\t0x8D, 0x8D, 0xB2, 0xE9, 0xB3, 0x1A, 0xF2, 0x25, 0xF1, 0x43, 0x3E, 0x1B, 0x50, 0x59, 0x5C, 0x57, \n\t0xE3, 0xBF, 0x59, 0xE5, 0x48, 0x67, 0xB8, 0x8F, 0xD2, 0x37, 0x3E, 0xF7, 0x76, 0xAB, 0x7B, 0x51, \n\t0x6F, 0x0F, 0xBD, 0x8F, 0xFD, 0x9E, 0xFD, 0xBB, 0x5B, 0xDE, 0xAD, 0xC8, 0xBB, 0x6F, 0x5F, 0x5E, \n\t0x2B, 0xFB, 0xF0, 0xD3, 0xBC, 0x2F, 0x55, 0x71, 0x5C, 0xDF, 0xCE, 0x76, 0x1E, 0xE1, 0xBD, 0xF8, \n\t0x63, 0xF1, 0x00, 0x15, 0x16, 0x5D, 0x7E, 0x20, 0x5B, 0xD9, 0xEE, 0xA2, 0xA2, 0xA1, 0x00, 0x6D, \n\t0x1F, 0x72, 0x53, 0x01, 0x7F, 0x06, 0x39, 0x7F, 0xFC, 0x0B, 0xCE, 0x1F, 0xFF, 0x32, 0xB5, 0xD2, \n\t0x9F, 0x63, 0x1F, 0xFA, 0x1E, 0x65, 0xF6, 0x16, 0x79, 0xD7, 0xF2, 0x7B, 0x8A, 0xE5, 0x5C, 0xC7, \n\t0xC8, 0xC8, 0x1D, 0x37, 0xD8, 0xE3, 0x92, 0x31, 0x3F, 0x6A, 0x0C, 0xB6, 0x6A, 0xB4, 0x3A, 0x07, \n\t0x92, 0xB5, 0x6C, 0xE7, 0x65, 0x7F, 0x9E, 0x31, 0xCF, 0xD6, 0xF9, 0x5F, 0x62, 0xC4, 0x05, 0x5A, \n\t0xC0, 0x38, 0xD8, 0x39, 0x9C, 0x9D, 0xB3, 0x7D, 0xD0, 0x3B, 0x8A, 0x5B, 0xCD, 0xAB, 0xBD, 0x46, \n\t0x8C, 0x8C, 0xB9, 0x94, 0x3E, 0xAE, 0x5B, 0x35, 0x97, 0xF6, 0x6F, 0x57, 0xC5, 0xCE, 0x58, 0x8F, \n\t0xA1, 0x7E, 0x23, 0x45, 0x7F, 0x64, 0x90, 0x65, 0x6B, 0x63, 0xF7, 0x75, 0xD8, 0xFA, 0xED, 0xF4, \n\t0x1D, 0x18, 0x6C, 0x36, 0x9E, 0xD4, 0x96, 0x7D, 0xFC, 0x3C, 0xCD, 0xA5, 0x6D, 0x6F, 0xEC, 0x2E, \n\t0xC8, 0xDB, 0xAB, 0x71, 0x5E, 0xAC, 0xDB, 0xCF, 0xB1, 0x7C, 0xA1, 0x41, 0xFD, 0x4E, 0x59, 0xA7, \n\t0xF2, 0xD4, 0xF2, 0xDC, 0x7C, 0x70, 0xDF, 0x6E, 0x37, 0x87, 0xDF, 0x84, 0x3E, 0xC9, 0x1C, 0xC8, \n\t0x5C, 0x14, 0xA8, 0x3B, 0xBE, 0xE5, 0xF1, 0x77, 0xA5, 0xEF, 0x21, 0x61, 0x4B, 0x5E, 0x39, 0xB9, \n\t0xAC, 0xDC, 0xDD, 0x50, 0x63, 0x9D, 0x91, 0xBB, 0x3B, 0xDD, 0x56, 0x7F, 0x25, 0x4E, 0xB0, 0x4E, \n\t0xEA, 0xC3, 0x72, 0xE7, 0x69, 0xF5, 0xDB, 0xB4, 0xE5, 0xBB, 0x3D, 0xEB, 0xFE, 0xF6, 0x1B, 0xC3, \n\t0xF6, 0xBD, 0x9F, 0xF8, 0xBD, 0x65, 0x37, 0xFB, 0xBB, 0xDC, 0xC7, 0x20, 0x57, 0x56, 0x63, 0xD3, \n\t0x93, 0x55, 0x94, 0x43, 0x49, 0x5D, 0xCA, 0x96, 0xED, 0x7D, 0x89, 0xAC, 0xDF, 0xB5, 0xDC, 0x15, \n\t0x52, 0x3C, 0x74, 0x3F, 0x03, 0xBB, 0xCE, 0x95, 0xBE, 0xD4, 0x1D, 0x2B, 0xE1, 0x2C, 0xDB, 0x97, \n\t0x45, 0x05, 0xC9, 0x7F, 0xC9, 0xED, 0xD5, 0x70, 0x5F, 0x2F, 0xAB, 0xF8, 0x92, 0xA3, 0x7E, 0xFB, \n\t0x6B, 0xA8, 0x7A, 0xCB, 0x6B, 0x60, 0x3C, 0x25, 0x75, 0x7D, 0xEA, 0x58, 0x33, 0x43, 0x72, 0x2F, \n\t0xA6, 0xEE, 0x52, 0xBE, 0x24, 0xF3, 0xF6, 0x79, 0x75, 0x97, 0xF2, 0x3E, 0x7E, 0xEB, 0x21, 0xEB, \n\t0xEE, 0x5C, 0xE9, 0xCB, 0xEC, 0xF7, 0x87, 0x79, 0xCD, 0x99, 0xBC, 0xE6, 0x2A, 0x79, 0xCD, 0x1D, \n\t0xE2, 0x35, 0xB7, 0xAD, 0x28, 0x40, 0xE6, 0x90, 0x2F, 0x2F, 0xCA, 0x0D, 0x1E, 0xE6, 0x75, 0x56, \n\t0xC9, 0xEB, 0xEC, 0x10, 0xC7, 0xC7, 0x53, 0x71, 0x19, 0x27, 0x69, 0xB3, 0xD6, 0xB1, 0xB7, 0x3B, \n\t0x97, 0x9F, 0x5F, 0x4B, 0x1F, 0x29, 0xF2, 0x19, 0x9F, 0xE7, 0xB5, 0x2B, 0xF7, 0x64, 0x46, 0x68, \n\t0xEA, 0xD1, 0x2C, 0x5E, 0xAF, 0xF2, 0xA2, 0xDB, 0xB4, 0xD6, 0xA9, 0xF5, 0xDB, 0x5C, 0xC7, 0x7D, \n\t0x14, 0xDE, 0x2C, 0xEF, 0x6E, 0x44, 0x16, 0x9D, 0x8D, 0x54, 0x51, 0xD4, 0xC6, 0x76, 0xCA, 0x77, \n\t0xA9, 0xCF, 0x6B, 0x9B, 0xE3, 0x64, 0x19, 0xAF, 0xFF, 0xED, 0xDD, 0xD2, 0xCE, 0xE5, 0xDD, 0x1A, \n\t0xAF, 0xAD, 0x37, 0x79, 0x6E, 0x7F, 0x42, 0x3B, 0xC3, 0x82, 0xCD, 0xAC, 0xB3, 0x4D, 0xB5, 0x29, \n\t0xED, 0x49, 0x3B, 0x5D, 0x8F, 0xC9, 0x78, 0x2E, 0xB7, 0x2B, 0xB2, 0xB4, 0x2B, 0xB8, 0xFC, 0x6F, \n\t0x01, 0xAC, 0xB3, 0x9C, 0x1D, 0x63, 0xA5, 0x4F, 0xC4, 0xBE, 0x20, 0xE3, 0x25, 0xBF, 0xA7, 0xB4, \n\t0xC6, 0xAC, 0x41, 0xFD, 0x46, 0xE8, 0x76, 0xDE, 0x1D, 0xDF, 0xAE, 0x8F, 0xDE, 0xCE, 0x79, 0x6D, \n\t0x10, 0xF3, 0x74, 0x5B, 0x71, 0x9F, 0x7D, 0x9C, 0xCF, 0x3B, 0x6B, 0xFE, 0x7E, 0xD0, 0x67, 0xD4, \n\t0x3B, 0xD5, 0x6F, 0xD8, 0xAE, 0xC7, 0xEC, 0xDF, 0xB2, 0x29, 0x99, 0xC8, 0xBA, 0x2B, 0xFC, 0x47, \n\t0xFC, 0x7F, 0x07, 0x33, 0xFE, 0x62, 0xBA, 0xC3, 0x41, 0xC9, 0x87, 0x97, 0x89, 0x51, 0xF5, 0x7D, \n\t0x1D, 0xC7, 0xEC, 0xCD, 0x74, 0xEE, 0x11, 0xA2, 0xC9, 0xBD, 0x44, 0x57, 0x14, 0xC7, 0xDE, 0xC3, \n\t0x9F, 0x09, 0xE6, 0x6A, 0x1F, 0x22, 0x9A, 0xCE, 0xE0, 0x26, 0x99, 0xAB, 0x67, 0x6E, 0x3E, 0xCD, \n\t0x69, 0x74, 0x85, 0xB9, 0x66, 0xE6, 0xDC, 0x8F, 0xD8, 0xDC, 0x1D, 0x74, 0x8D, 0xBF, 0x77, 0x30, \n\t0x67, 0x3E, 0x62, 0x3F, 0xC3, 0x41, 0xEE, 0x47, 0x89, 0x66, 0x99, 0x2B, 0x49, 0xEB, 0xE9, 0x64, \n\t0x30, 0x37, 0xC7, 0x5C, 0x24, 0xCD, 0xB9, 0xC9, 0xCB, 0x9C, 0x11, 0xE4, 0x36, 0x1F, 0x59, 0x7E, \n\t0x46, 0x84, 0xB9, 0xD6, 0x20, 0xDD, 0xF4, 0x97, 0x63, 0x38, 0x1C, 0x4F, 0xB5, 0x37, 0x97, 0x9F, \n\t0x3D, 0x13, 0x6D, 0x3B, 0xDB, 0x72, 0x73, 0x79, 0xE4, 0x5B, 0x44, 0x9D, 0x5C, 0xAF, 0x97, 0x3F, \n\t0xFD, 0xFC, 0x89, 0x3C, 0xBC, 0xB2, 0xFC, 0x87, 0xA9, 0xBD, 0xDF, 0xFF, 0x6A, 0xFB, 0x7D, 0x73, \n\t0xF2, 0xEF, 0xBD, 0xEA, 0x51, 0x76, 0xFC, 0x53, 0xED, 0xD1, 0xA6, 0x4F, 0x96, 0x47, 0xDB, 0x5A, \n\t0x0E, 0x9D, 0x6D, 0xFB, 0x78, 0x53, 0xDB, 0x99, 0x26, 0xAB, 0xE1, 0xF6, 0x53, 0x4D, 0xC7, 0x9A, \n\t0x9E, 0x39, 0xD1, 0xD8, 0x76, 0xFA, 0xB9, 0xA6, 0x36, 0xD4, 0x17, 0x2E, 0x7A, 0x6A, 0x25, 0x57, \n\t0x7D, 0xF6, 0x64, 0x63, 0xF9, 0xD9, 0xB6, 0xA6, 0x95, 0xB5, 0x89, 0x8E, 0x9C, 0x3D, 0x74, 0xBA, \n\t0xA5, 0xE9, 0xE8, 0x33, 0x6D, 0xAB, 0x0A, 0x7E, 0x27, 0x7A, 0xBA, 0xA5, 0x7D, 0x15, 0x57, 0xD3, \n\t0xDC, 0xD6, 0x74, 0xB2, 0xF1, 0xE8, 0xC9, 0x33, 0xAB, 0x78, 0xB6, 0xED, 0x54, 0xCB, 0xE9, 0x86, \n\t0xD5, 0x4D, 0xD3, 0xD1, 0xB3, 0x8D, 0xCF, 0xAE, 0x6E, 0xFB, 0xCA, 0x7F, 0x7F, 0xF1, 0xAE, 0xF9, \n\t0x2B, 0xBD, 0xDB, 0x7F, 0xF9, 0xCD, 0xCB, 0x5B, 0x66, 0x8E, 0xBC, 0xFA, 0xF8, 0xC5, 0xEA, 0xDA, \n\t0xFF, 0x31, 0xF1, 0x27, 0xFF, 0xE4, 0x2B, 0x57, 0x9F, 0x3F, 0xF8, 0x9A, 0x77, 0xC0, 0x5D, 0x94, \n\t0xFC, 0x41, 0xC7, 0xC8, 0xCE, 0xCF, 0x17, 0xCF, 0xBE, 0xF2, 0xCD, 0x27, 0xF6, 0xFE, 0xD7, 0xC1, \n\t0x9F, 0xFE, 0x55, 0xD5, 0x4F, 0x27, 0xF7, 0x2F, 0x3C, 0xF1, 0xC5, 0xA9, 0xD7, 0x77, 0x9E, 0xFD, \n\t0x17, 0x27, 0xFE, 0xDD, 0x1B, 0x5A, 0x49, 0xA1, 0xA3, 0x6F, 0xAE, 0x70, 0xA4, 0xCE, 0xD3, 0xFD, \n\t0xDC, 0xDD, 0xCF, 0xFC, 0xE7, 0x4F, 0x97, 0xBE, 0xF5, 0xE2, 0x1F, 0x5C, 0x7F, 0xE5, 0xE0, 0x1F, \n\t0xFF, 0x87, 0xCB, 0x1F, 0x77, 0x7F, 0xF6, 0x52, 0xE4, 0x5F, 0x19, 0x17, 0x5E, 0x38, 0xF5, 0x4F, \n\t0x53, 0xCE, 0x1B, 0x65, 0x63, 0xDB, 0x7F, 0xB1, 0xDD, 0x7C, 0xE8, 0x0B, 0xCD, 0xFD, 0x3F, 0xFE, \n\t0xB3, 0x57, 0xAB, 0xE9, 0x17, 0xEF, 0x9E, 0x36, 0xD7, 0xFD, 0xE2, 0xC9, 0xFE, 0x4F, 0xBF, 0xA7, \n\t0xD3, 0x57, 0xB3, 0x4F, 0xBC, 0x75, 0x77, 0xEE, 0xEC, 0xA1, 0x9F, 0xA7, 0xE6, 0xC3, 0x5F, 0x1D, \n\t0xFB, 0xBB, 0xCB, 0xDF, 0xFB, 0xD4, 0x9F, 0x7F, 0xFC, 0xED, 0xEF, 0xF7, 0x57, 0xBD, 0xE6, 0x0F, \n\t0xFF, 0xF4, 0x78, 0x69, 0x56, 0xEE, 0x63, 0x8F, 0x7F, 0xEC, 0x07, 0x67, 0x0F, 0xD7, 0x3E, 0x9F, \n\t0xB7, 0xF1, 0xE8, 0xE7, 0xFF, 0xCB, 0xE1, 0xBD, 0x7F, 0xF4, 0xB5, 0xF1, 0xF7, 0xF2, 0xCF, 0xDE, \n\t0x98, 0xDD, 0x31, 0xF5, 0xCA, 0x17, 0x9F, 0x7B, 0x71, 0xB4, 0x65, 0xEB, 0x8F, 0x8F, 0x2D, 0x7D, \n\t0xEE, 0xD9, 0xAF, 0x9D, 0xFC, 0xD7, 0x7F, 0x6B, 0xFC, 0xEA, 0x7B, 0x57, 0x3F, 0xEB, 0xFF, 0xD9, \n\t0xC9, 0xE7, 0x9E, 0x7F, 0xF7, 0x9F, 0x7F, 0xF1, 0xC6, 0xBF, 0x99, 0x8B, 0x34, 0x9E, 0x6E, 0x3F, \n\t0x15, 0x78, 0x6C, 0x77, 0xE4, 0x78, 0xE4, 0xC4, 0xE1, 0x83, 0x47, 0x2B, 0x77, 0x1F, 0xFF, 0xC4, \n\t0xF1, 0x8A, 0x23, 0xC7, 0x76, 0x97, 0x3D, 0xF1, 0x44, 0x4D, 0x71, 0xD9, 0x91, 0xC7, 0xE9, 0x16, \n\t0xE5, 0x95, 0x69, 0x05, 0xFE, 0xFB, 0x64, 0xBB, 0xA5, 0xB1, 0x5B, 0x34, 0xF6, 0x3C, 0x1C, 0xD8, \n\t0x2D, 0x73, 0x11, 0xA9, 0x38, 0x58, 0x53, 0xB9, 0x52, 0x2F, 0x53, 0x50, 0x8D, 0xAD, 0x50, 0x8A, \n\t0x94, 0x71, 0x44, 0xA5, 0x67, 0x5B, 0x1B, 0x4F, 0x46, 0xD9, 0x03, 0x6A, 0x8B, 0x3F, 0xF1, 0xBB, \n\t0x52, 0xE7, 0xE9, 0x96, 0x93, 0xED, 0xCD, 0xDC, 0xFC, 0x3F, 0x6B, 0xDC, 0xDD, 0xD6, 0xD4, 0x70, \n\t0xF6, 0x6C, 0x94, 0xDB, 0x2F, 0x6E, 0x6D, 0xEB, 0xB8, 0xE9, 0xB9, 0xFC, 0xD0, 0x13, 0x27, 0xB8, \n\t0x90, 0x79, 0x98, 0xC0, 0xF2, 0x43, 0x0F, 0xF3, 0x52, 0x24, 0xFE, 0xEF, 0xEE, 0x35, 0xED, 0x2C, \n\t0x6C, 0x2F, 0x2C, 0xCC, 0x78, 0xFA, 0xCA, 0xF6, 0x56, 0x15, 0xAA, 0xF6, 0x8E, 0x97, 0x57, 0xDE, \n\t0xF4, 0xDC, 0xA3, 0xF2, 0x77, 0xE4, 0xF8, 0x13, 0x44, 0x62, 0x64, 0x6B, 0x7B, 0x6B, 0x43, 0xF4, \n\t0xD4, 0x99, 0xA7, 0x8B, 0xA3, 0x1D, 0x51, 0xF8, 0xB5, 0xB8, 0x71, 0x65, 0x47, 0xD3, 0xA9, 0x95, \n\t0xF5, 0xD6, 0xB0, 0x47, 0xF9, 0x1F, 0x5A, 0x2B, 0x6C, 0xCC, 0x28, 0xE7, 0x41, 0xAF, 0xA9, 0x3C, \n\t0xBA, 0xFB, 0x74, 0xFB, 0xD9, 0x53, 0x27, 0x4F, 0x35, 0x37, 0x15, 0x37, 0x9C, 0x3E, 0x73, 0x53, \n\t0x7F, 0xAC, 0xAE, 0x5A, 0x9C, 0xB2, 0x66, 0xF9, 0xBB, 0x74, 0x7E, 0xF5, 0x3C, 0x46, 0x0E, 0x1E, \n\t0x3B, 0x78, 0xB4, 0xF8, 0xF8, 0x21, 0x51, 0x7C, 0xA8, 0x58, 0x3E, 0x56, 0xFD, 0x96, 0x93, 0x67, \n\t0x9E, 0x79, 0xF6, 0xE4, 0x33, 0x4D, 0xB0, 0xFD, 0xC8, 0x13, 0x6A, 0xA9, 0x9D, 0x3C, 0xC3, 0x54, \n\t0xDB, 0xF2, 0xDA, 0x3D, 0xDD, 0x1E, 0x6D, 0xFB, 0xD4, 0x89, 0xE3, 0x4D, 0x6D, 0xCF, 0x9D, 0x3E, \n\t0xD5, 0x04, 0x8E, 0xE8, 0xB9, 0xF6, 0xE6, 0x13, 0x9F, 0x54, 0xEB, 0x87, 0xF5, 0x78, 0x7D, 0x9D, \n\t0x3D, 0xF3, 0xF4, 0x89, 0xD6, 0x96, 0x67, 0x9F, 0x39, 0x7D, 0x26, 0x4D, 0xD3, 0xD9, 0xD6, 0xA6, \n\t0x33, 0xA7, 0xCF, 0x3C, 0x73, 0x13, 0x5F, 0x73, 0xA4, 0xA6, 0x5A, 0xC6, 0xE4, 0xA9, 0xD3, 0x6D, \n\t0xD1, 0x67, 0x4F, 0xB6, 0xF0, 0x88, 0xF3, 0x1A, 0x64, 0x79, 0x2D, 0x8B, 0x97, 0xB9, 0x23, 0xE5, \n\t0x4F, 0x3C, 0x1E, 0x28, 0x8E, 0x3C, 0x7E, 0x78, 0x15, 0xB7, 0xA7, 0x38, 0x72, 0xF4, 0x50, 0x66, \n\t0xDD, 0x23, 0xE5, 0x96, 0xDA, 0x4A, 0x6E, 0xCF, 0x6A, 0xEE, 0xF8, 0xE3, 0x15, 0x81, 0xE2, 0x83, \n\t0x35, 0x1C, 0x47, 0x77, 0x73, 0xA7, 0x4E, 0xB4, 0x34, 0x9C, 0x09, 0x74, 0x14, 0x76, 0x9C, 0x68, \n\t0x3F, 0xFD, 0xE9, 0x26, 0xF9, 0x22, 0xB1, 0xE7, 0xE8, 0xC1, 0xC3, 0x95, 0xC5, 0x18, 0xE0, 0xFF, \n\t0xCF, 0xFF, 0x1E, 0xA2, 0x62, 0x7A, 0x98, 0xF6, 0x92, 0x97, 0x8E, 0xF2, 0xF7, 0x87, 0x14, 0xB7, \n\t0xB4, 0xC6, 0x1F, 0x45, 0x8E, 0x1F, 0x92, 0x7F, 0x1A, 0xDC, 0xCB, 0xE5, 0xB3, 0x84, 0x1F, 0x5F, \n\t0x90, 0xAE, 0xCB, 0x4B, 0x3A, 0x1D, 0x6D, 0xAD, 0x23, 0x5D, 0x73, 0x42, 0x96, 0xCF, 0x66, 0x96, \n\t0xD7, 0x93, 0xF5, 0xEF, 0x80, 0x45, 0xFF, 0x1E, 0x96, 0xB3, 0xF0, 0x3D, 0x8F, 0x3F, 0xDB, 0x33, \n\t0xEA, 0x7B, 0xF9, 0xF3, 0x48, 0x46, 0x39, 0x27, 0x77, 0x54, 0x99, 0x51, 0xBE, 0x8B, 0x3F, 0xD5, \n\t0x5C, 0x1E, 0x66, 0x8C, 0x91, 0xBC, 0x8F, 0x21, 0x92, 0x75, 0x7D, 0xB0, 0x8C, 0x5D, 0xAE, 0x9C, \n\t0x23, 0xD0, 0xE1, 0x27, 0x8E, 0x7D, 0x82, 0x2A, 0x8E, 0x1C, 0x2F, 0x3F, 0x71, 0xA4, 0xC2, 0xC2, \n\t0xA7, 0x2A, 0x8F, 0x1D, 0x3F, 0xF2, 0xC4, 0xE3, 0xC4, 0x4E, 0x57, 0xF9, 0x78, 0xCD, 0xC1, 0xEA, \n\t0x13, 0xD5, 0x95, 0x4F, 0x55, 0x56, 0x93, 0x38, 0x8A, 0xB5, 0x18, 0x45, 0x83, 0x8E, 0x55, 0x1E, \n\t0x16, 0x25, 0xDB, 0x77, 0xE5, 0xDF, 0x33, 0x1F, 0x65, 0x7F, 0xFA, 0x9D, 0xF2, 0x8F, 0x1D, 0xDF, \n\t0x13, 0x08, 0x04, 0xF7, 0xA0, 0x6F, 0x7B, 0x8A, 0x03, 0x6A, 0x6D, 0x3B, 0x32, 0xBE, 0x8B, 0x21, \n\t0x7B, 0xF6, 0x3E, 0x14, 0x7C, 0xF8, 0x91, 0x47, 0x4B, 0xF6, 0x05, 0xFE, 0x7E, 0xDF, 0xFE, 0x41, \n\t0x27, 0xF3, 0x03, 0xFE, 0x1C, 0xF8, 0x64, 0x43, 0xAE, 0x27, 0x2B, 0xC7, 0xB1, 0xFF, 0xEC, 0x39, \n\t0xCC, 0xE1, 0x4F, 0x92, 0xD3, 0x0B, 0x9B, 0x37, 0x0F, 0x12, 0x2D, 0xDC, 0xB7, 0xDC, 0x86, 0xE8, \n\t0xC9, 0xFC, 0xE4, 0x66, 0xB4, 0x27, 0xED, 0xF8, 0xD9, 0x75, 0xC6, 0x1C, 0x37, 0xB7, 0xF7, 0x00, \n\t0xF4, 0xE4, 0x14, 0x1F, 0xE3, 0xDE, 0x4E, 0x07, 0x97, 0xCB, 0x32, 0xF5, 0x76, 0x65, 0xE8, 0x49, \n\t0x8E, 0x32, 0x13, 0x5C, 0xF9, 0xEF, 0xC7, 0x6D, 0xBD, 0x87, 0x57, 0xD9, 0x97, 0x7F, 0xC2, 0xF6, \n\t0x45, 0xEB, 0xDF, 0x9C, 0xDB, 0xF6, 0x95, 0x65, 0xB4, 0x27, 0xF9, 0xCE, 0xFC, 0x2D, 0x9E, 0xFB, \n\t0x44, 0x86, 0x5E, 0x1F, 0xEB, 0x2C, 0xDC, 0x42, 0xEF, 0xF7, 0x32, 0xF4, 0x24, 0x77, 0x5A, 0xE4, \n\t0xCF, 0xE8, 0x1A, 0x7A, 0xCF, 0xAC, 0xB2, 0xCF, 0x64, 0xFB, 0xAE, 0xE3, 0xFB, 0xBA, 0x0C, 0xFB, \n\t0x9E, 0xCD, 0x68, 0x4F, 0xF2, 0xB0, 0x91, 0x87, 0xD7, 0x7E, 0xEE, 0x85, 0x0C, 0x3D, 0xC9, 0xC9, \n\t0xC6, 0xF9, 0x13, 0xCE, 0xD0, 0xB3, 0xC7, 0xE8, 0x4B, 0xAB, 0x9E, 0xBB, 0x78, 0x42, 0xFE, 0x1D, \n\t0x93, 0xF5, 0xE7, 0xCE, 0x78, 0xEE, 0xD7, 0x33, 0xDA, 0x53, 0xF9, 0x2F, 0xE7, 0x95, 0x53, 0x6B, \n\t0x3C, 0xF7, 0xBB, 0xAB, 0xFB, 0x51, 0xBF, 0xFC, 0xAC, 0x3B, 0x32, 0xDA, 0xFB, 0x71, 0x46, 0x7B, \n\t0x92, 0x37, 0x4F, 0xDD, 0xA2, 0xBD, 0x5F, 0x42, 0x4F, 0x5C, 0xAE, 0x96, 0xF3, 0xD7, 0x31, 0xFE, \n\t0x3C, 0xE6, 0x5C, 0xA9, 0x27, 0xE5, 0xEF, 0x03, 0xA5, 0xA8, 0x77, 0x3F, 0xCF, 0x1B, 0x7F, 0xC6, \n\t0xD7, 0xF0, 0xAB, 0x45, 0x3C, 0x9F, 0xF5, 0x0C, 0xF9, 0x7F, 0x0E, 0xC8, 0xFF, 0x9B, 0x20, 0xF3, \n\t0xCF, 0xAE, 0xA2, 0x39, 0xD2, 0x7A, 0x54, 0x0B, 0xBD, 0x5D, 0xDA, 0xB2, 0x9E, 0xED, 0x3B, 0x39, \n\t0x0E, 0x4B, 0xC7, 0xFE, 0x0B, 0x72, 0x7F, 0x37, 0x67, 0x3C, 0xD7, 0x91, 0xA1, 0x2F, 0x36, 0x78, \n\t0x80, 0x32, 0xC6, 0xE2, 0x77, 0xE2, 0xBF, 0xB2, 0x16, 0x42, 0xE0, 0x23, 0xE0, 0x6B, 0xC0, 0x37, \n\t0x82, 0x8F, 0x03, 0xC7, 0x80, 0x57, 0x81, 0xB3, 0xD0, 0x9F, 0x87, 0xBE, 0x3C, 0x50, 0xF8, 0x3C, \n\t0xA0, 0xD7, 0x61, 0x95, 0xF3, 0xC1, 0x5A, 0x95, 0xFB, 0xC1, 0x07, 0xC0, 0x97, 0x80, 0xAF, 0x02, \n\t0x5F, 0x0B, 0x6C, 0x06, 0xC6, 0xA1, 0xD7, 0x07, 0xBD, 0x01, 0xF0, 0x97, 0x80, 0x13, 0x28, 0x9F, \n\t0x44, 0xF9, 0x15, 0xF0, 0xD7, 0xC0, 0x4F, 0x81, 0xBF, 0x01, 0x7E, 0x11, 0xE8, 0xD6, 0xD0, 0x5F, \n\t0x60, 0xB5, 0x86, 0x7E, 0x6B, 0x96, 0x7E, 0x2D, 0xE4, 0x3A, 0xC8, 0x8D, 0xD0, 0x8B, 0x02, 0x63, \n\t0xC0, 0x2E, 0xE8, 0xF5, 0x40, 0xAF, 0x1F, 0xFC, 0x38, 0xF8, 0x2B, 0xE0, 0xAF, 0x81, 0x9F, 0x03, \n\t0x7A, 0x9C, 0x16, 0x9A, 0xC0, 0x7A, 0x60, 0x2B, 0xB0, 0xCB, 0x69, 0xD5, 0xEF, 0x75, 0x5A, 0xF5, \n\t0x47, 0xC0, 0xBB, 0x74, 0x0B, 0x0D, 0xDD, 0x2A, 0xF7, 0xE8, 0x56, 0x79, 0x1E, 0x78, 0x13, 0xBC, \n\t0x1F, 0xFC, 0x2E, 0xF0, 0x41, 0x60, 0x05, 0xCA, 0xAB, 0x50, 0x5E, 0x03, 0xB9, 0x16, 0x72, 0x1D, \n\t0xF4, 0x1A, 0x81, 0x11, 0x94, 0xB7, 0xA0, 0xBC, 0x15, 0x7C, 0x27, 0x30, 0x0E, 0xEC, 0x85, 0x5E, \n\t0x1F, 0xF4, 0x06, 0xC1, 0x5F, 0x02, 0x4E, 0x00, 0xAF, 0x03, 0xA7, 0x81, 0xB3, 0xC0, 0x39, 0xE0, \n\t0x02, 0x50, 0x1A, 0x53, 0x71, 0xD1, 0x7A, 0x99, 0x4C, 0xAE, 0x2C, 0xF8, 0x15, 0xF8, 0x7C, 0xF0, \n\t0x5E, 0xF0, 0x01, 0xF0, 0x41, 0xF0, 0x61, 0xF0, 0xD5, 0xC0, 0x1A, 0x60, 0x1D, 0xF4, 0x6A, 0x81, \n\t0x21, 0x60, 0x3D, 0xEA, 0x35, 0x42, 0x2F, 0x0A, 0xBE, 0x03, 0xFC, 0x39, 0xF0, 0x5D, 0xE0, 0xE3, \n\t0xE0, 0x7B, 0x21, 0xF7, 0x41, 0xEE, 0x87, 0xDE, 0x00, 0x30, 0x85, 0xF2, 0x11, 0x94, 0x8F, 0x82, \n\t0x9F, 0x04, 0x4E, 0x03, 0x17, 0x80, 0xAE, 0x6C, 0xCC, 0x6F, 0x36, 0xE6, 0x37, 0x1B, 0xF3, 0x0B, \n\t0x3E, 0x08, 0xAC, 0x00, 0x56, 0x43, 0x2F, 0x02, 0xBD, 0x1A, 0xF0, 0xCD, 0xC0, 0x0E, 0x60, 0x0C, \n\t0xD8, 0x0F, 0x1C, 0x00, 0xBA, 0x73, 0x30, 0xAE, 0x40, 0x2F, 0xD0, 0x0F, 0x0C, 0xE4, 0x60, 0x5C, \n\t0x73, 0x30, 0xAE, 0xE0, 0xAB, 0x81, 0x35, 0xC0, 0x3A, 0x60, 0x33, 0xB0, 0x15, 0x78, 0x0E, 0xD8, \n\t0x89, 0x76, 0xE2, 0x68, 0xA7, 0x17, 0x7C, 0x1F, 0xE4, 0x7E, 0x94, 0x27, 0x21, 0x0F, 0x40, 0x1E, \n\t0x84, 0x9C, 0x82, 0x3C, 0x02, 0x79, 0x14, 0xF5, 0xD5, 0xBF, 0x9E, 0x11, 0x3F, 0x71, 0x59, 0xBC, \n\t0xC7, 0x65, 0xF1, 0x25, 0xC0, 0x18, 0xB0, 0x0B, 0x7A, 0x71, 0xE8, 0x25, 0x81, 0x3D, 0xE0, 0x53, \n\t0x90, 0x47, 0xA0, 0x7F, 0x1D, 0xFC, 0x14, 0xF8, 0x19, 0xE0, 0x2C, 0xCA, 0xE7, 0x20, 0xCF, 0x03, \n\t0x17, 0xC1, 0xEB, 0xEB, 0xAC, 0x7A, 0xAE, 0x75, 0x16, 0x6F, 0xAC, 0xB3, 0xF8, 0x7C, 0xF0, 0x15, \n\t0x40, 0x2F, 0xCA, 0xFD, 0x28, 0xAF, 0x02, 0x46, 0x50, 0x5E, 0x83, 0xF2, 0x3A, 0xF0, 0x8D, 0xC0, \n\t0x5E, 0x94, 0xF7, 0xA1, 0x3C, 0x09, 0x79, 0x00, 0x72, 0x0A, 0xF2, 0x08, 0xE4, 0x29, 0xD4, 0x9B, \n\t0x86, 0x3C, 0x87, 0xF2, 0x79, 0xC8, 0xD7, 0x21, 0xD3, 0x7A, 0x4B, 0xD6, 0xD7, 0xC3, 0x7E, 0xC8, \n\t0xC6, 0x7A, 0xF8, 0x01, 0x70, 0x17, 0xCA, 0x83, 0x28, 0x2F, 0x81, 0x1C, 0x82, 0x5C, 0x01, 0xBD, \n\t0x6A, 0x60, 0x0D, 0xB0, 0x07, 0x7A, 0xBD, 0xD0, 0x1B, 0x03, 0x7F, 0x15, 0x98, 0xB7, 0x01, 0xEB, \n\t0x7A, 0x83, 0x55, 0x1E, 0xD8, 0x00, 0x3F, 0x02, 0x1F, 0x05, 0xDF, 0x01, 0xF9, 0x1C, 0xE4, 0x29, \n\t0xE8, 0x5D, 0x03, 0x3F, 0x0D, 0xDE, 0x74, 0xC3, 0x6E, 0x37, 0xEC, 0x75, 0xC3, 0x7F, 0xC1, 0xD7, \n\t0x80, 0xAF, 0x05, 0xDF, 0x08, 0xB9, 0x19, 0x72, 0x14, 0x7A, 0x71, 0x60, 0x27, 0xCA, 0x7B, 0x50, \n\t0xDE, 0x0B, 0x7E, 0x1C, 0x7C, 0x1F, 0xF8, 0xAB, 0x90, 0x93, 0x90, 0x07, 0x20, 0x0F, 0x42, 0x1E, \n\t0x85, 0x3C, 0x06, 0x79, 0x02, 0xF2, 0x24, 0xE4, 0xEB, 0x68, 0xF7, 0x1A, 0xF8, 0x29, 0xF0, 0x33, \n\t0xC0, 0x1B, 0x28, 0x9F, 0x83, 0xBC, 0x00, 0xD9, 0xB5, 0xD1, 0xD2, 0x37, 0x36, 0x62, 0x1D, 0x6C, \n\t0x84, 0xDF, 0x01, 0xFD, 0xC0, 0x56, 0xB4, 0xBB, 0x0B, 0x7A, 0x26, 0xEA, 0x05, 0x21, 0x87, 0x20, \n\t0x87, 0x21, 0x57, 0x40, 0xAE, 0x82, 0x5C, 0x03, 0xB9, 0x16, 0x72, 0x23, 0xE4, 0x66, 0xC8, 0xAD, \n\t0x90, 0xA3, 0x90, 0x3B, 0xF1, 0xDC, 0x18, 0xF8, 0x2E, 0xF0, 0x11, 0xC8, 0x3D, 0x90, 0x7B, 0x21, \n\t0xF7, 0x41, 0x1E, 0x40, 0xBD, 0x11, 0xE0, 0x28, 0xF8, 0x31, 0xC8, 0xE3, 0xC0, 0x2B, 0xC0, 0x49, \n\t0xD4, 0xBF, 0x0A, 0xBD, 0xEB, 0xC0, 0x29, 0xF0, 0xD3, 0x90, 0x6F, 0x40, 0xDF, 0x7D, 0x07, 0xC6, \n\t0xEB, 0x0E, 0x8C, 0xD7, 0x1D, 0x18, 0x27, 0x60, 0x09, 0x30, 0x84, 0xF2, 0x0A, 0x60, 0x15, 0xF8, \n\t0x5D, 0xA8, 0x5F, 0x0D, 0x3E, 0x02, 0xBE, 0x0E, 0xD8, 0x0A, 0x9C, 0x00, 0x8E, 0x43, 0x7F, 0x12, \n\t0xFA, 0x57, 0xC0, 0x5F, 0x07, 0xD6, 0xC3, 0xCE, 0x29, 0x94, 0x5F, 0x83, 0xFE, 0x0C, 0xE4, 0x1B, \n\t0x90, 0xE7, 0x20, 0x2F, 0xA0, 0x9E, 0x6B, 0x93, 0xC5, 0xBB, 0x37, 0x61, 0x9F, 0xD8, 0x84, 0x38, \n\t0x0E, 0x6C, 0x06, 0x46, 0xA1, 0xD7, 0x01, 0xBD, 0x4E, 0xF0, 0x7D, 0xE0, 0xFB, 0xC1, 0xF7, 0xD8, \n\t0x71, 0x17, 0x72, 0x0A, 0xE5, 0x23, 0x90, 0xC7, 0x50, 0x6F, 0x14, 0xFC, 0x25, 0xF0, 0xE3, 0xE0, \n\t0xA7, 0x80, 0x33, 0xC0, 0x5D, 0x06, 0xC6, 0x13, 0x18, 0x06, 0x56, 0x01, 0x23, 0x06, 0xF2, 0x2C, \n\t0xC3, 0x6A, 0xA7, 0x1E, 0x7C, 0x0B, 0x30, 0x0A, 0x3C, 0x07, 0x8C, 0x03, 0xFB, 0x81, 0x29, 0xE0, \n\t0x20, 0xDA, 0x19, 0x41, 0x3B, 0xA3, 0xE0, 0xA7, 0x80, 0xF9, 0xB9, 0x98, 0xDF, 0x5C, 0xF8, 0x7F, \n\t0x2E, 0xFC, 0x1D, 0x7C, 0x15, 0xF8, 0x6A, 0xF0, 0x37, 0x20, 0xD7, 0x41, 0xAE, 0x87, 0x5E, 0x0C, \n\t0x78, 0x05, 0x78, 0x1D, 0x7A, 0x53, 0xD0, 0x9B, 0x05, 0x3F, 0x07, 0xB9, 0x73, 0xB3, 0x55, 0xBE, \n\t0x00, 0x99, 0x36, 0x63, 0x7F, 0x07, 0xE6, 0xA3, 0xDC, 0xBB, 0x19, 0xF9, 0x1A, 0xF8, 0x10, 0xB0, \n\t0x0A, 0x58, 0x07, 0x6C, 0x04, 0x46, 0x81, 0x71, 0xD4, 0xAF, 0x07, 0xF6, 0xA2, 0x9D, 0x01, 0x94, \n\t0xA7, 0x80, 0xA3, 0xC0, 0x59, 0x60, 0xF8, 0x4E, 0xC4, 0xE9, 0x3B, 0x91, 0x3F, 0xDC, 0x69, 0xD5, \n\t0x6B, 0x01, 0xDF, 0x01, 0x1C, 0x01, 0xBA, 0x3D, 0x88, 0xD3, 0x1E, 0xC4, 0x69, 0x8F, 0xA5, 0x1F, \n\t0x04, 0x1F, 0x06, 0xB6, 0x02, 0xC7, 0x80, 0x13, 0xC0, 0x2B, 0xC0, 0x6B, 0xC0, 0x59, 0xA0, 0xEB, \n\t0x2E, 0x8C, 0x07, 0x30, 0x1F, 0xD8, 0x08, 0x6C, 0x05, 0x76, 0x00, 0x63, 0xC0, 0x3E, 0xE0, 0x38, \n\t0x70, 0x12, 0x78, 0xCD, 0x6E, 0x6F, 0x0B, 0xDA, 0x03, 0x9A, 0xC0, 0x5D, 0xC0, 0x10, 0xB0, 0x06, \n\t0x58, 0x07, 0x6C, 0x06, 0xF6, 0x03, 0x07, 0x81, 0x23, 0xC0, 0x31, 0xE0, 0x24, 0x70, 0x1A, 0x38, \n\t0x0B, 0x9C, 0x07, 0x06, 0xEE, 0x86, 0xDF, 0xDF, 0x8D, 0xFD, 0xF1, 0x6E, 0xC4, 0x11, 0xF0, 0xD5, \n\t0xE0, 0x23, 0xE0, 0xEB, 0xC0, 0xB7, 0x80, 0x6F, 0x05, 0x1F, 0x05, 0x7F, 0x0E, 0x7C, 0x0C, 0x7C, \n\t0x27, 0xF8, 0x38, 0xF8, 0x1E, 0xF0, 0xBD, 0xE0, 0xFB, 0x81, 0x97, 0x80, 0x73, 0xC0, 0x05, 0xE8, \n\t0x2F, 0x42, 0x5F, 0xCF, 0xC3, 0xBA, 0x00, 0x06, 0x80, 0x25, 0xC0, 0x66, 0x60, 0x6B, 0x1E, 0xE2, \n\t0x47, 0x9E, 0x55, 0x2F, 0x06, 0x3E, 0x0E, 0xBE, 0x07, 0x7C, 0x2F, 0xF8, 0x01, 0x60, 0x3F, 0xCA, \n\t0x07, 0x51, 0x3E, 0x0A, 0x3E, 0x05, 0x7E, 0x0C, 0xFC, 0x04, 0xF8, 0x4B, 0xE0, 0x27, 0xC1, 0x5F, \n\t0x03, 0x7F, 0x05, 0xFC, 0x75, 0xF0, 0x33, 0xE0, 0xA7, 0xC0, 0xCF, 0x82, 0x9F, 0x07, 0x7F, 0x03, \n\t0xFC, 0x02, 0x78, 0x7D, 0xAB, 0xC5, 0x2F, 0x82, 0x77, 0x6D, 0x45, 0xDC, 0x07, 0xEF, 0xDE, 0x6A, \n\t0xF1, 0x79, 0xE0, 0x4D, 0xF0, 0xF9, 0xE0, 0xFD, 0xE0, 0x83, 0xE0, 0x77, 0x81, 0x2F, 0x01, 0x5F, \n\t0x01, 0x3E, 0x04, 0xBE, 0x0A, 0x7C, 0x35, 0xE4, 0x3A, 0xC8, 0xF5, 0xD0, 0x6B, 0x01, 0x7F, 0x0E, \n\t0x7C, 0x27, 0xF8, 0x56, 0xF0, 0x5D, 0xE0, 0x7B, 0xC1, 0xC7, 0xC1, 0xF7, 0x81, 0xEF, 0x07, 0x3F, \n\t0x08, 0x1C, 0x41, 0xF9, 0x28, 0xCA, 0x2F, 0x01, 0x43, 0xF7, 0xC0, 0xDF, 0x80, 0xB5, 0xF7, 0x20, \n\t0x5E, 0xDC, 0x83, 0xE7, 0x42, 0xEE, 0x82, 0xDC, 0x0B, 0xBD, 0x7E, 0xF0, 0x03, 0xE0, 0x07, 0x81, \n\t0x33, 0x28, 0x9F, 0x85, 0x7C, 0x03, 0x7A, 0x3D, 0xC0, 0x39, 0xF0, 0xF3, 0xD0, 0xD3, 0xEF, 0xC5, \n\t0xF8, 0x02, 0xE9, 0x5E, 0x9C, 0x6B, 0xEE, 0xC5, 0x7E, 0x05, 0xDE, 0x0F, 0x0C, 0x00, 0x4D, 0xE8, \n\t0x95, 0x40, 0xAF, 0x02, 0x72, 0x15, 0xE4, 0x6A, 0xE8, 0xD5, 0x01, 0x1B, 0x51, 0x5E, 0x0B, 0x0C, \n\t0x03, 0x83, 0x40, 0x03, 0xD8, 0x8C, 0xFA, 0x7D, 0x90, 0x93, 0x90, 0x07, 0xD1, 0xCE, 0x08, 0xF8, \n\t0x31, 0xF0, 0xD7, 0x20, 0xCF, 0x42, 0xBE, 0x01, 0xBD, 0x39, 0xC8, 0x0B, 0x28, 0xA7, 0x7C, 0xF8, \n\t0x59, 0x3E, 0xFA, 0x0B, 0xCC, 0x03, 0x7A, 0xF2, 0x11, 0x37, 0xA1, 0xE7, 0x85, 0x6C, 0x42, 0x6E, \n\t0x86, 0x5E, 0x1C, 0x38, 0x00, 0xBC, 0x0A, 0x9C, 0x86, 0xFE, 0x0C, 0xF4, 0xFD, 0xF7, 0x21, 0xEE, \n\t0x02, 0x2B, 0xEE, 0x43, 0x7E, 0x02, 0xAC, 0x05, 0xDF, 0x02, 0x6C, 0x05, 0x1F, 0x05, 0x76, 0xDC, \n\t0x07, 0xFF, 0x83, 0xDC, 0x0B, 0xBD, 0x11, 0xC8, 0xA3, 0x90, 0xC7, 0x20, 0x4F, 0x40, 0x9E, 0x84, \n\t0x3C, 0x87, 0xFA, 0xF3, 0x90, 0xE9, 0x7E, 0xF4, 0x1B, 0x68, 0xDC, 0x8F, 0xF9, 0x85, 0x5C, 0x0D, \n\t0xFD, 0x7C, 0xF0, 0x5E, 0xF0, 0x26, 0xE4, 0x8A, 0xFB, 0x31, 0xBF, 0x90, 0x6B, 0x50, 0x5E, 0x07, \n\t0xBE, 0x1E, 0x7C, 0x33, 0xF8, 0x56, 0xF0, 0x51, 0xF0, 0xE7, 0xC0, 0x77, 0x42, 0xEE, 0x81, 0xDC, \n\t0x0B, 0x79, 0x0A, 0xF2, 0x0D, 0x60, 0xC5, 0x03, 0xD8, 0xEF, 0x1F, 0xC0, 0xBA, 0x7C, 0x00, 0x7E, \n\t0x04, 0xBE, 0x19, 0x7C, 0x07, 0xE4, 0x4E, 0xC8, 0xFD, 0xD0, 0x1B, 0x80, 0x3C, 0x08, 0xBC, 0x02, \n\t0xFE, 0x1A, 0x70, 0x06, 0x78, 0x03, 0xB8, 0x08, 0xD4, 0xBD, 0x96, 0xBE, 0xCB, 0x8B, 0x71, 0x02, \n\t0x2E, 0xE0, 0x39, 0x79, 0x28, 0x37, 0xC1, 0x07, 0x81, 0x55, 0xC0, 0x08, 0xB0, 0x16, 0x7A, 0x75, \n\t0xC0, 0x18, 0xF8, 0x2E, 0x60, 0x0F, 0xF8, 0x5E, 0x60, 0x9F, 0x17, 0x7E, 0x0D, 0x79, 0x1C, 0x7A, \n\t0x93, 0x90, 0xAF, 0x00, 0xAF, 0x42, 0x6F, 0x0E, 0xF2, 0x02, 0xF4, 0xC8, 0x07, 0xFF, 0x06, 0xBA, \n\t0x7C, 0x88, 0x8B, 0x90, 0x03, 0x3E, 0xEC, 0x1B, 0x90, 0x43, 0xC0, 0x30, 0xF4, 0xEA, 0x21, 0x37, \n\t0x43, 0xAF, 0x15, 0x72, 0x10, 0x7E, 0x11, 0x85, 0xDC, 0x01, 0xFD, 0x3E, 0xC8, 0x49, 0xE8, 0x0F, \n\t0x02, 0x47, 0xEC, 0xE7, 0x63, 0xFE, 0x47, 0x21, 0xF7, 0x6D, 0x43, 0x1E, 0xBB, 0x0D, 0xF5, 0x20, \n\t0x0F, 0x40, 0x1E, 0xD9, 0x86, 0xFD, 0x05, 0xCF, 0x1B, 0x05, 0x3F, 0x0B, 0xBD, 0x79, 0xC8, 0x54, \n\t0x80, 0xBC, 0xA4, 0x00, 0x79, 0x75, 0x81, 0xC5, 0xE7, 0x03, 0xBD, 0x28, 0xF7, 0x03, 0x4B, 0xA0, \n\t0x17, 0x42, 0x79, 0x0C, 0x72, 0x27, 0xE4, 0x2E, 0xC8, 0x71, 0xC8, 0x7D, 0xA8, 0xD7, 0x05, 0xFB, \n\t0xFB, 0xC1, 0x8F, 0x43, 0xEF, 0x0A, 0xE4, 0xEB, 0xD0, 0x9B, 0x05, 0x7F, 0x03, 0xBC, 0x6E, 0x62, \n\t0xFF, 0x32, 0x91, 0x2F, 0x9A, 0x88, 0x9B, 0x90, 0x83, 0x90, 0x4D, 0xE8, 0x85, 0xC0, 0x87, 0x81, \n\t0xD5, 0x28, 0x8F, 0xA2, 0x3C, 0x06, 0xBE, 0x07, 0x7C, 0x12, 0xFC, 0x00, 0xF8, 0x11, 0xE0, 0x28, \n\t0xCA, 0xC7, 0x20, 0x5F, 0x82, 0x3C, 0x01, 0x74, 0x17, 0x22, 0xAE, 0x17, 0x22, 0x3E, 0x15, 0xC2, \n\t0x7F, 0xC1, 0x97, 0x80, 0xAF, 0x02, 0x46, 0x50, 0x5E, 0x8F, 0xF2, 0x46, 0xF0, 0x51, 0xF0, 0xE7, \n\t0x80, 0x71, 0x60, 0x1F, 0xD0, 0x5D, 0x84, 0xB8, 0x0D, 0xFD, 0x79, 0xC8, 0xA3, 0x90, 0xAF, 0x40, \n\t0x4F, 0xDF, 0x6E, 0xF1, 0xD7, 0xC0, 0x8F, 0x41, 0x9E, 0x87, 0xEC, 0x45, 0x3D, 0xB3, 0x08, 0xF1, \n\t0x03, 0x72, 0x0C, 0x72, 0x17, 0xE4, 0x3E, 0xC8, 0x23, 0x45, 0x58, 0x2F, 0x68, 0x67, 0x0C, 0xFC, \n\t0x75, 0xE8, 0x4D, 0x41, 0xF6, 0xA0, 0xDC, 0xBB, 0x1D, 0xEB, 0x78, 0x3B, 0xE2, 0x34, 0xB0, 0x16, \n\t0xD8, 0x0C, 0x6C, 0x05, 0x76, 0xA0, 0xDE, 0x39, 0xD4, 0xEB, 0x87, 0x9C, 0x84, 0x7C, 0x1D, 0xF2, \n\t0x0C, 0xE4, 0x59, 0xD4, 0xD3, 0xFD, 0xC8, 0x53, 0x80, 0xBB, 0x80, 0x41, 0x60, 0xC8, 0x8F, 0xFD, \n\t0xD0, 0x8F, 0x38, 0x07, 0xB9, 0x11, 0x72, 0x3F, 0xE4, 0x41, 0xC8, 0x29, 0xD4, 0x9B, 0x04, 0x4E, \n\t0x03, 0xE7, 0x80, 0x0B, 0x40, 0xFA, 0x88, 0x55, 0x4F, 0xFF, 0x08, 0xFA, 0x09, 0xD9, 0x0F, 0xB9, \n\t0x1E, 0x72, 0x0B, 0xE4, 0xD6, 0x8F, 0x60, 0x3E, 0x81, 0x03, 0xC0, 0x51, 0xE0, 0x25, 0xE0, 0x04, \n\t0xEA, 0x4D, 0xA2, 0xDE, 0x2C, 0xE4, 0x1B, 0xF6, 0x73, 0x76, 0x58, 0x72, 0x60, 0x07, 0xFC, 0x7D, \n\t0x07, 0xE2, 0x22, 0xB0, 0x19, 0xD8, 0x01, 0x8C, 0x01, 0xBB, 0x50, 0x2F, 0x8E, 0x7A, 0x29, 0xC8, \n\t0x23, 0x90, 0xAF, 0x41, 0x6F, 0x0A, 0xFC, 0x34, 0xF8, 0x59, 0xF0, 0xE7, 0x30, 0x4E, 0xDE, 0x9D, \n\t0x58, 0x77, 0x3B, 0xD1, 0x1F, 0xF0, 0x41, 0xF0, 0x61, 0xF0, 0x61, 0xD8, 0x5D, 0x05, 0xBE, 0x06, \n\t0x7C, 0x04, 0x7C, 0x1D, 0xF8, 0x66, 0xF0, 0x1D, 0x3B, 0xE1, 0x7F, 0xE0, 0x07, 0xC1, 0x8F, 0x42, \n\t0x1E, 0x43, 0xF9, 0x25, 0xC8, 0xD3, 0x90, 0x67, 0x20, 0xCF, 0x43, 0x5F, 0x87, 0xFD, 0xC6, 0x2E, \n\t0xAC, 0xC3, 0x5D, 0xC8, 0x3F, 0xC0, 0x07, 0xC1, 0x47, 0x80, 0x75, 0x28, 0x6F, 0x04, 0xB6, 0x00, \n\t0xA3, 0xBB, 0x90, 0xEF, 0x43, 0xEF, 0x1C, 0xF8, 0x1E, 0xF0, 0xBD, 0xE0, 0xAF, 0x42, 0x9E, 0x82, \n\t0xBC, 0x08, 0x3D, 0xF7, 0x83, 0xB0, 0xE3, 0x41, 0xCC, 0x13, 0xE4, 0x12, 0xC8, 0x91, 0x07, 0x2D, \n\t0xBD, 0x1A, 0xC8, 0x57, 0x61, 0x5F, 0x2D, 0xE4, 0x46, 0x94, 0x2F, 0xA2, 0x9F, 0x2D, 0xE0, 0xFB, \n\t0x80, 0x63, 0x28, 0xBF, 0x81, 0x76, 0x17, 0xC0, 0x7B, 0x8A, 0x11, 0x97, 0x8B, 0x11, 0xFF, 0x8A, \n\t0x11, 0xF7, 0xC0, 0x47, 0x20, 0xD7, 0x40, 0xAE, 0x83, 0x5E, 0x3D, 0xF8, 0x16, 0xF0, 0x51, 0xC8, \n\t0x1D, 0x90, 0x07, 0xA1, 0x37, 0x0A, 0x7E, 0x12, 0xFC, 0x75, 0xF0, 0x53, 0xE0, 0xA7, 0x21, 0xCF, \n\t0x40, 0x5E, 0x80, 0xDE, 0x22, 0x64, 0xDA, 0x8D, 0xFD, 0x05, 0x68, 0xEC, 0x46, 0xDC, 0xDC, 0x8D, \n\t0xF9, 0x02, 0x1F, 0x80, 0x1C, 0x46, 0x79, 0x05, 0xE4, 0x1A, 0x94, 0x77, 0x82, 0xEF, 0x01, 0xDF, \n\t0x0F, 0x7E, 0x0C, 0xFC, 0x25, 0xF0, 0x57, 0x20, 0x5F, 0x85, 0x3C, 0x0D, 0x9C, 0x85, 0xFE, 0x0D, \n\t0xC8, 0x73, 0x90, 0x29, 0x00, 0xFF, 0x0D, 0xC0, 0x7F, 0x03, 0x78, 0x2E, 0xF8, 0x24, 0xF6, 0xCF, \n\t0x46, 0xF0, 0xCD, 0xD0, 0x6B, 0x81, 0xEC, 0xC7, 0xFE, 0x71, 0x0E, 0x72, 0x0C, 0xF5, 0xBA, 0x80, \n\t0x1E, 0xEC, 0x7B, 0x3D, 0x28, 0xAF, 0xC6, 0xFC, 0x8D, 0x42, 0xBE, 0x04, 0xBD, 0x09, 0x60, 0x15, \n\t0xCA, 0xAF, 0xA2, 0x7C, 0x06, 0x7C, 0x07, 0x9E, 0x3B, 0x07, 0x7E, 0x04, 0xB2, 0xB9, 0x07, 0xF9, \n\t0xC7, 0x1E, 0xC4, 0x3D, 0xC8, 0x91, 0x3D, 0xD8, 0x6F, 0x80, 0x8D, 0xE0, 0x5B, 0x20, 0xB7, 0x42, \n\t0x1E, 0x84, 0x9C, 0x82, 0x3C, 0x06, 0xF9, 0x12, 0xE4, 0x4E, 0xB4, 0x3B, 0x01, 0x79, 0x12, 0xE5, \n\t0x57, 0xC1, 0x5F, 0x03, 0x7F, 0x1D, 0xF2, 0x14, 0xE4, 0x39, 0xE8, 0xF9, 0xF7, 0x62, 0x1D, 0xEE, \n\t0xC5, 0xFC, 0xEE, 0x85, 0x5F, 0x82, 0xAF, 0x01, 0x3F, 0x89, 0x79, 0xAB, 0x87, 0xDC, 0x08, 0xBD, \n\t0x19, 0xF0, 0xCD, 0xE0, 0x5B, 0xC0, 0x47, 0x81, 0x5D, 0x68, 0x27, 0x8E, 0xF2, 0x9E, 0xE0, 0xF2, \n\t0xBB, 0x7F, 0xC1, 0x41, 0x60, 0x0A, 0x38, 0x02, 0xBC, 0x04, 0x1C, 0x07, 0x4E, 0x00, 0xAF, 0x02, \n\t0xAF, 0x01, 0xAF, 0x03, 0x67, 0x80, 0xB3, 0xC0, 0x1B, 0xC0, 0x05, 0xE0, 0x22, 0x50, 0x7E, 0xF8, \n\t0x20, 0xE8, 0x06, 0x1A, 0x40, 0x0F, 0xD0, 0x0B, 0x34, 0x81, 0x7E, 0x60, 0x10, 0x58, 0x02, 0x0C, \n\t0x01, 0xAB, 0x80, 0xD5, 0xC0, 0x18, 0xB0, 0x13, 0xD8, 0x05, 0x8C, 0x03, 0x7B, 0x80, 0x83, 0xC0, \n\t0x14, 0x90, 0x8A, 0xA3, 0x4D, 0x1D, 0x51, 0x2A, 0x6E, 0x6B, 0x6A, 0xC1, 0xB7, 0xF6, 0x53, 0x4D, \n\t0xC7, 0xA3, 0xCF, 0x36, 0x40, 0x6A, 0x39, 0xDD, 0x50, 0xDC, 0x74, 0x26, 0x5A, 0x1C, 0x3D, 0xDB, \n\t0x9A, 0x16, 0x2C, 0xED, 0xB4, 0x60, 0xAB, 0x34, 0x44, 0x3F, 0x69, 0x09, 0xED, 0xAA, 0xBA, 0x5D, \n\t0x41, 0xA4, 0xE5, 0x1A, 0x96, 0x94, 0xD6, 0x52, 0x75, 0xDA, 0xCE, 0x36, 0x9E, 0x8C, 0x9E, 0x94, \n\t0x07, 0x5B, 0xBF, 0xFC, 0x3C, 0x72, 0xE6, 0xE9, 0xB3, 0x56, 0x8D, 0x5B, 0x94, 0xA4, 0xD9, 0x63, \n\t0x4D, 0xED, 0xA7, 0x1B, 0xD3, 0x16, 0xAD, 0xC9, 0xA7, 0xB9, 0xC7, 0x4F, 0x37, 0xDA, 0x22, 0x15, \n\t0x5B, 0xFF, 0x6D, 0x6F, 0x68, 0x6F, 0xA7, 0x62, 0xF5, 0x9F, 0xF6, 0xE6, 0xF6, 0x68, 0x5B, 0xF4, \n\t0x64, 0x03, 0xD1, 0xFF, 0x02, 0x3E, 0xD4, 0xCC, 0xC1, 0x46, 0x61, 0x00, 0x00\n};\n\n"} +{"text": "\n\n{#if story === 'composed'}\n \n \n \n \n \n {#each props.headers as header, i (header.key)}\n \n {header.header}\n \n {/each}\n \n \n \n {#each props.rows as row, i}\n \n {#each row.cells as cell, j}\n {cell.value}\n {/each}\n \n {/each}\n \n
\n \n
\n{:else if story === 'sortable'}\n {\n console.log('on:click', detail);\n }}\"\n on:click:header=\"{({ detail }) => {\n console.log('on:click:header', detail);\n }}\"\n on:click:row=\"{({ detail }) => {\n console.log('on:click:row', detail);\n }}\"\n on:click:cell=\"{({ detail }) => {\n console.log('on:click:cell', detail);\n }}\"\n rows=\"{rows}\"\n headers=\"{headers}\"\n />\n{:else}\n {\n console.log('on:click', detail);\n }}\"\n on:click:header=\"{({ detail }) => {\n console.log('on:click:header', detail);\n }}\"\n on:click:row=\"{({ detail }) => {\n console.log('on:click:row', detail);\n }}\"\n on:click:cell=\"{({ detail }) => {\n console.log('on:click:cell', detail);\n }}\"\n rows=\"{rows}\"\n headers=\"{headers}\"\n />\n{/if}\n"} +{"text": "TK_CONST_DATA_ALIGN(const unsigned char image_battery_1[]) = {\n0x02,0x00,0x03,0x01,0xda,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x62,0x61,0x74,0x74,0x65,0x72,0x79,0x5f,\n0x31,0x00,0x72,0x65,0x73,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,\n0x00,0x00,0x00,0x00,0x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,0x44,0x52,\n0x00,0x00,0x00,0x39,0x00,0x00,0x00,0x20,0x08,0x06,0x00,0x00,0x00,0xa8,0xc1,0xd0,0xd6,0x00,0x00,0x01,\n0xa1,0x49,0x44,0x41,0x54,0x58,0x47,0xed,0x59,0xcd,0x4a,0xc3,0x40,0x10,0xfe,0x3e,0xa5,0x57,0x0f,0xbe,\n0x82,0x28,0xa4,0xa5,0x24,0x57,0x0f,0xc9,0x4d,0xdf,0x40,0xf0,0xff,0x54,0x10,0x04,0x9f,0xc0,0xbb,0x47,\n0xf1,0x20,0x78,0x10,0x45,0x68,0x11,0x5f,0xa1,0xe0,0xc9,0xf8,0x00,0x4d,0x0f,0x4d,0xf1,0xe0,0x1b,0x78,\n0x10,0xc4,0x9b,0x1d,0x59,0xdb,0x6a,0x23,0x4d,0x37,0x81,0xc2,0xa6,0x74,0x73,0x09,0x21,0x03,0x33,0xdf,\n0xce,0x37,0xfb,0xed,0xce,0x10,0xfd,0x87,0xae,0x5f,0xae,0x93,0xd8,0x1b,0x7c,0x17,0xfe,0x25,0x22,0x42,\n0xc8,0x51,0x2b,0xec,0x5e,0xeb,0x82,0x25,0x80,0x05,0x2f,0x28,0x3f,0x00,0xd8,0xd2,0x19,0x17,0xf1,0xbf,\n0x48,0xef,0x24,0x0a,0xbb,0x97,0x93,0x62,0xa3,0xe7,0x3b,0xf7,0x20,0x77,0x8a,0x08,0x20,0x6b,0x4c,0x3d,\n0x91,0xe3,0x76,0x18,0x5f,0xa5,0xd9,0x2b,0x90,0xef,0x20,0x97,0xfa,0x06,0xf2,0x25,0xe0,0x05,0x81,0x8f,\n0xac,0x0e,0x0c,0xd9,0xad,0x02,0xd8,0xfd,0xf5,0x2d,0xf2,0xd8,0x0a,0xe3,0x8d,0x4c,0x20,0x45,0xa4,0x11,\n0x85,0xf1,0x81,0xa1,0xc0,0x73,0xb9,0xf5,0x02,0xe7,0x05,0xa0,0x02,0x0b,0xe4,0x02,0x09,0xb9,0x89,0x9e,\n0xe2,0x5a,0x2e,0x6f,0x86,0x8c,0xdd,0xc0,0x69,0x13,0xac,0x5a,0x90,0x43,0xe9,0x18,0xad,0x49,0xb1,0x99,\n0x34,0xc4,0xcb,0x14,0xb7,0x53,0xa5,0x6b,0x65,0xbd,0xb2,0x5c,0x2a,0xc9,0xdb,0xdf,0x4e,0x86,0xd3,0x56,\n0xd8,0x39,0x33,0x0d,0xf9,0x07,0xa4,0xa0,0x0a,0x2a,0xa9,0x4f,0x7f,0x44,0xd0,0x4c,0x48,0xc8,0x38,0xba,\n0x5a,0x90,0x06,0xd3,0x39,0x3f,0x99,0x04,0xaa,0x00,0x21,0x82,0x57,0x12,0xf5,0x91,0x92,0xda,0x07,0xb1,\n0xd2,0x97,0xd0,0x59,0xa7,0x6b,0x8a,0x4e,0xba,0x81,0xd3,0x24,0xb8,0x69,0x41,0x8e,0x96,0x5a,0xa1,0x37,\n0x1e,0x9b,0x49,0x4b,0xd7,0xe4,0x01,0xdd,0xd2,0xd5,0xb4,0x4e,0xce,0x85,0x84,0xd8,0x63,0xdd,0xa0,0xd7,\n0x31,0xf3,0x87,0x81,0x69,0x65,0xd2,0x60,0xd9,0x4d,0x74,0x3d,0xd5,0xab,0x96,0x05,0x69,0x70,0x05,0x6c,\n0x26,0xff,0x2d,0x7e,0xf2,0xd2,0x3c,0x0f,0x2d,0x49,0xd5,0x5c,0x86,0xe0,0x1c,0xe4,0xa7,0x41,0x26,0xea,\n0x5d,0x8b,0xac,0x25,0xba,0xfe,0x19,0xfa,0xae,0x33,0x3f,0x26,0xd0,0xcd,0x43,0x54,0x17,0x68,0xd1,0xf5,\n0x9d,0x06,0xc9,0x6d,0xfd,0x12,0x16,0xcf,0x42,0x37,0x07,0x51,0x11,0x0f,0x5b,0x5d,0xf4,0x02,0xe7,0x0e,\n0xe0,0x61,0xf1,0x60,0x8c,0x8f,0x48,0x8d,0xee,0x20,0xac,0x45,0xcf,0x9d,0x5b,0x5d,0xcc,0xdf,0x03,0x2a,\n0x16,0x83,0x3e,0xf4,0xa2,0xd0,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82,0x00,0x00,\n0x00,0x00,};/*522*/\n"} +{"text": "\n\n\n\nGIO Reference Manual: GPollableOutputStream\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
\nTop  | \n Description  | \n Object Hierarchy  | \n Prerequisites  | \n Known Implementations\n\"Home\"\"Up\"\"Prev\"\"Next\"
\n
\n
\n
\n\n\n
\n

GPollableOutputStream

\n

GPollableOutputStream — Interface for pollable output streams

\n
\n\n
\n

Types and Values

\n
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
 GPollableOutputStream
structGPollableOutputStreamInterface
\n
\n
\n

Object Hierarchy

\n
    GInterface\n    ╰── GPollableOutputStream\n
\n
\n
\n

Prerequisites

\n

\nGPollableOutputStream requires\n GOutputStream.

\n
\n
\n

Known Implementations

\n

\nGPollableOutputStream is implemented by\n GConverterOutputStream, GMemoryOutputStream and GUnixOutputStream.

\n
\n
\n

Includes

\n
#include <gio/gio.h>\n
\n
\n
\n

Description

\n

GPollableOutputStream is implemented by GOutputStreams that\ncan be polled for readiness to write. This can be used when\ninterfacing with a non-GIO API that expects\nUNIX-file-descriptor-style asynchronous I/O rather than GIO-style.

\n
\n
\n

Functions

\n
\n

g_pollable_output_stream_can_poll ()

\n
gboolean\ng_pollable_output_stream_can_poll (GPollableOutputStream *stream);
\n

Checks if stream\n is actually pollable. Some classes may implement\nGPollableOutputStream but have only certain instances of that\nclass be pollable. If this method returns FALSE, then the behavior\nof other GPollableOutputStream methods is undefined.

\n

For any given stream, the value returned by this method is constant;\na stream cannot switch from pollable to non-pollable or vice versa.

\n
\n

Parameters

\n
\n\n\n\n\n\n\n\n\n\n\n

stream

a GPollableOutputStream.

 
\n
\n
\n

Returns

\n

TRUE if stream\nis pollable, FALSE if not.

\n

\n
\n

Since 2.28

\n
\n
\n
\n

g_pollable_output_stream_is_writable ()

\n
gboolean\ng_pollable_output_stream_is_writable (GPollableOutputStream *stream);
\n

Checks if stream\n can be written.

\n

Note that some stream types may not be able to implement this 100%\nreliably, and it is possible that a call to g_output_stream_write()\nafter this returns TRUE would still block. To guarantee\nnon-blocking behavior, you should always use\ng_pollable_output_stream_write_nonblocking(), which will return a\nG_IO_ERROR_WOULD_BLOCK error rather than blocking.

\n
\n

Parameters

\n
\n\n\n\n\n\n\n\n\n\n\n

stream

a GPollableOutputStream.

 
\n
\n
\n

Returns

\n

TRUE if stream\nis writable, FALSE if not. If an error\nhas occurred on stream\n, this will result in\ng_pollable_output_stream_is_writable() returning TRUE, and the\nnext attempt to write will return the error.

\n

\n
\n

Since 2.28

\n
\n
\n
\n

g_pollable_output_stream_create_source ()

\n
GSource *\ng_pollable_output_stream_create_source\n                               (GPollableOutputStream *stream,\n                                GCancellable *cancellable);
\n

Creates a GSource that triggers when stream\n can be written, or\ncancellable\n is triggered or an error occurs. The callback on the\nsource is of the GPollableSourceFunc type.

\n

As with g_pollable_output_stream_is_writable(), it is possible that\nthe stream may not actually be writable even after the source\ntriggers, so you should use g_pollable_output_stream_write_nonblocking()\nrather than g_output_stream_write() from the callback.

\n
\n

Parameters

\n
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

stream

a GPollableOutputStream.

 

cancellable

a GCancellable, or NULL.

[allow-none]
\n
\n
\n

Returns

\n

a new GSource.

\n

[transfer full]

\n
\n

Since 2.28

\n
\n
\n
\n

g_pollable_output_stream_write_nonblocking ()

\n
gssize\ng_pollable_output_stream_write_nonblocking\n                               (GPollableOutputStream *stream,\n                                const void *buffer,\n                                gsize count,\n                                GCancellable *cancellable,\n                                GError **error);
\n

Attempts to write up to count\n bytes from buffer\n to stream\n, as\nwith g_output_stream_write(). If stream\n is not currently writable,\nthis will immediately return G_IO_ERROR_WOULD_BLOCK, and you can\nuse g_pollable_output_stream_create_source() to create a GSource\nthat will be triggered when stream\n is writable.

\n

Note that since this method never blocks, you cannot actually\nuse cancellable\n to cancel it. However, it will return an error\nif cancellable\n has already been cancelled when you call, which\nmay happen if you call this method after a source triggers due\nto having been cancelled.

\n

Virtual: write_nonblocking

\n
\n

Parameters

\n
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

stream

a GPollableOutputStream

 

buffer

a buffer to write\ndata from.

[array length=count][element-type guint8]

count

the number of bytes you want to write

 

cancellable

a GCancellable, or NULL.

[allow-none]

error

GError for error reporting, or NULL to ignore.

 
\n
\n
\n

Returns

\n

the number of bytes written, or -1 on error (including\nG_IO_ERROR_WOULD_BLOCK).

\n

\n
\n
\n
\n
\n

Types and Values

\n
\n

GPollableOutputStream

\n
typedef struct _GPollableOutputStream GPollableOutputStream;
\n

An interface for a GOutputStream that can be polled for readability.

\n

Since 2.28

\n
\n
\n
\n

struct GPollableOutputStreamInterface

\n
struct GPollableOutputStreamInterface {\n  GTypeInterface g_iface;\n\n  /* Virtual Table */\n  gboolean     (*can_poll)          (GPollableOutputStream  *stream);\n\n  gboolean     (*is_writable)       (GPollableOutputStream  *stream);\n  GSource *    (*create_source)     (GPollableOutputStream  *stream,\n\t\t\t\t     GCancellable           *cancellable);\n  gssize       (*write_nonblocking) (GPollableOutputStream  *stream,\n\t\t\t\t     const void             *buffer,\n\t\t\t\t     gsize                   count,\n\t\t\t\t     GError                **error);\n};\n
\n

The interface for pollable output streams.

\n

The default implementation of can_poll\n always returns TRUE.

\n

The default implementation of write_nonblocking\n calls\ng_pollable_output_stream_is_writable(), and then calls\ng_output_stream_write() if it returns TRUE. This means you only\nneed to override it if it is possible that your is_writable\n\nimplementation may return TRUE when the stream is not actually\nwritable.

\n
\n

Members

\n
\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

GTypeInterface g_iface;

The parent interface.

 

can_poll ()

Checks if the GPollableOutputStream instance is actually pollable

 

is_writable ()

Checks if the stream is writable

 

create_source ()

Creates a GSource to poll the stream

 

write_nonblocking ()

Does a non-blocking write or returns\nG_IO_ERROR_WOULD_BLOCK

 
\n
\n

Since 2.28

\n
\n
\n\n
\n
\n
\n Generated by GTK-Doc V1.21.1
\n\n"} +{"text": "AWS4-HMAC-SHA256\n20150830T123600Z\n20150830/us-east-1/service/aws4_request\nd51ced243e649e3de6ef63afbbdcbca03131a21a7103a1583706a64618606a93"} +{"text": "port = $port ?: self::DEFAULT_PORT;\n $this->client = new Client($this->getUrl());\n }\n\n /**\n * Destructor to safely shutdown the node.js server if it is still running\n */\n public function __destruct()\n {\n // Disabled for now\n if (false && $this->running) {\n try {\n $this->stop();\n } catch (\\Exception $e) {}\n }\n }\n\n /**\n * Flush the received requests from the server\n *\n * @return bool Returns TRUE on success or FALSE on failure\n * @throws RuntimeException\n */\n public function flush()\n {\n if (!$this->isRunning()) {\n return false;\n }\n\n return $this->client->delete('guzzle-server/requests')\n ->send()->getStatusCode() == 200;\n }\n\n /**\n * Queue an array of responses or a single response on the server.\n *\n * Any currently queued responses will be overwritten. Subsequent requests\n * on the server will return queued responses in FIFO order.\n *\n * @param array|Response $responses A single or array of Responses to queue\n *\n * @return bool Returns TRUE on success or FALSE on failure\n * @throws BadResponseException\n */\n public function enqueue($responses)\n {\n $data = array();\n foreach ((array) $responses as $response) {\n\n // Create the response object from a string\n if (is_string($response)) {\n $response = Response::fromMessage($response);\n } elseif (!($response instanceof Response)) {\n throw new BadResponseException(\n 'Responses must be strings or implement Response'\n );\n }\n\n $data[] = array(\n 'statusCode' => $response->getStatusCode(),\n 'reasonPhrase' => $response->getReasonPhrase(),\n 'headers' => $response->getHeaders()->getAll(),\n 'body' => $response->getBody(true)\n );\n }\n\n $request = $this->client->put('guzzle-server/responses', null, json_encode($data));\n $request->removeHeader('Expect');\n $response = $request->send();\n\n return $response->getStatusCode() == 200;\n }\n\n /**\n * Check if the server is running\n *\n * @return bool\n */\n public function isRunning()\n {\n if ($this->running) {\n return true;\n } else {\n $fp = @fsockopen('127.0.0.1', $this->port, $errno, $errstr, 1);\n if (!$fp) {\n return false;\n } else {\n fclose($fp);\n return true;\n }\n }\n }\n\n /**\n * Get the URL to the server\n *\n * @return string\n */\n public function getUrl()\n {\n return 'http://127.0.0.1:' . $this->getPort() . '/';\n }\n\n /**\n * Get the port that the server is listening on\n *\n * @return int\n */\n public function getPort()\n {\n return $this->port;\n }\n\n /**\n * Get all of the received requests\n *\n * @param bool $hydrate Set to TRUE to turn the messages into\n * actual {@see RequestInterface} objects. If $hydrate is FALSE,\n * requests will be returned as strings.\n *\n * @return array\n * @throws RuntimeException\n */\n public function getReceivedRequests($hydrate = false)\n {\n $data = array();\n\n if ($this->isRunning()) {\n $response = $this->client->get('guzzle-server/requests')->send();\n $data = array_filter(explode(self::REQUEST_DELIMITER, $response->getBody(true)));\n if ($hydrate) {\n $data = array_map(function($message) {\n return RequestFactory::getInstance()->fromMessage($message);\n }, $data);\n }\n }\n\n return $data;\n }\n\n /**\n * Start running the node.js server in the background\n */\n public function start()\n {\n if (!$this->isRunning()) {\n exec('node ' . __DIR__ . \\DIRECTORY_SEPARATOR . 'server.js ' . $this->port . ' >> /tmp/server.log 2>&1 &');\n // Wait at most 5 seconds for the server the setup before proceeding\n $start = time();\n while (!$this->isRunning() && time() - $start < 5);\n if (!$this->isRunning()) {\n throw new RuntimeException(\n 'Unable to contact server.js. Have you installed node.js '\n . 'v0.5.0+? The node.js executable, node, must also be in '\n . 'your path.'\n );\n }\n }\n\n $this->running = true;\n }\n\n /**\n * Stop running the node.js server\n *\n * @return bool Returns TRUE on success or FALSE on failure\n * @throws RuntimeException\n */\n public function stop()\n {\n if (!$this->isRunning()) {\n return false;\n }\n\n $this->running = false;\n\n return $this->client->delete('guzzle-server')->send()\n ->getStatusCode() == 200;\n }\n}\n"} +{"text": "# -*- coding: utf-8 -*-\nfrom __future__ import absolute_import, division, print_function, unicode_literals\n\nstore_version = 1 # Needed for dynamic plugin loading\n\n__license__ = 'GPL 3'\n__copyright__ = '2011, John Schember '\n__docformat__ = 'restructuredtext en'\n\nfrom contextlib import closing\ntry:\n from urllib.parse import quote_plus\nexcept ImportError:\n from urllib import quote_plus\n\nfrom lxml import html\n\nfrom PyQt5.Qt import QUrl\n\nfrom calibre import browser, url_slash_cleaner\nfrom calibre.gui2 import open_url\nfrom calibre.gui2.store import StorePlugin\nfrom calibre.gui2.store.basic_config import BasicStoreConfig\nfrom calibre.gui2.store.search_result import SearchResult\nfrom calibre.gui2.store.web_store_dialog import WebStoreDialog\n\n\nclass WeightlessBooksStore(BasicStoreConfig, StorePlugin):\n\n def open(self, parent=None, detail_item=None, external=False):\n url = 'http://weightlessbooks.com/'\n\n if external or self.config.get('open_external', False):\n open_url(QUrl(url_slash_cleaner(detail_item if detail_item else url)))\n else:\n d = WebStoreDialog(self.gui, url, parent, detail_item)\n d.setWindowTitle(self.name)\n d.set_tags(self.config.get('tags', ''))\n d.exec_()\n\n def search(self, query, max_results=10, timeout=60):\n url = 'http://weightlessbooks.com/?s=' + quote_plus(query)\n\n br = browser()\n\n counter = max_results\n with closing(br.open(url, timeout=timeout)) as f:\n doc = html.fromstring(f.read())\n for data in doc.xpath('//li[@class=\"product\"]'):\n if counter <= 0:\n break\n\n id = ''.join(data.xpath('.//div[@class=\"cover\"]/a/@href'))\n if not id:\n continue\n\n cover_url = ''.join(data.xpath('.//div[@class=\"cover\"]/a/img/@src'))\n\n price = ''.join(data.xpath('.//div[@class=\"buy_buttons\"]/b[1]/text()'))\n if not price:\n continue\n\n formats = ', '.join(data.xpath('.//select[@class=\"eStore_variation\"]//option//text()'))\n formats = formats.upper()\n\n title = ''.join(data.xpath('.//h3/a/text()'))\n author = ''.join(data.xpath('.//h3//text()'))\n author = author.replace(title, '')\n\n counter -= 1\n\n s = SearchResult()\n s.cover_url = cover_url\n s.title = title.strip()\n s.author = author.strip()\n s.price = price.strip()\n s.detail_item = id.strip()\n s.drm = SearchResult.DRM_UNLOCKED\n s.formats = formats\n\n yield s\n"} +{"text": "#\n# Copyright (C) 2013 OpenWrt.org\n#\n# This is free software, licensed under the GNU General Public License v2.\n# See /LICENSE for more information.\n#\n\nCAN_MENU:=CAN Support\n\ndefine KernelPackage/can\n SUBMENU:=$(CAN_MENU)\n TITLE:=CAN bus support\n KCONFIG:=\\\n\tCONFIG_CAN=m \\\n\tCONFIG_CAN_DEV \\\n\tCONFIG_CAN_CALC_BITTIMING=y \\\n\tCONFIG_CAN_LEDS=y \\\n\tCONFIG_CAN_AT91=n \\\n\tCONFIG_CAN_TI_HECC=n \\\n\tCONFIG_CAN_MCP251X=n \\\n\tCONFIG_CAN_BFIN=n \\\n\tCONFIG_CAN_JANZ_ICAN3=n \\\n\tCONFIG_PCH_CAN=n \\\n\tCONFIG_CAN_GRCAN=n \\\n\tCONFIG_CAN_CC770=n \\\n\tCONFIG_CAN_MSCAN=n \\\n\tCONFIG_CAN_SJA1000=n \\\n\tCONFIG_CAN_SOFTING=n \\\n\tCONFIG_NET_EMATCH_CANID=n \\\n\tCONFIG_CAN_DEBUG_DEVICES=n\n FILES:=$(LINUX_DIR)/drivers/net/can/can-dev.ko \\\n\t $(LINUX_DIR)/net/can/can.ko\n AUTOLOAD:=$(call AutoProbe,can can-dev)\nendef\n\ndefine KernelPackage/can/description\n Kernel module for CAN bus support.\nendef\n\n$(eval $(call KernelPackage,can))\n\n\ndefine AddDepends/can\n SUBMENU:=$(CAN_MENU)\n DEPENDS+=kmod-can $(1)\nendef\n\n\ndefine KernelPackage/can-raw\n TITLE:=Raw CAN Protcol\n KCONFIG:=CONFIG_CAN_RAW\n FILES:=$(LINUX_DIR)/net/can/can-raw.ko\n AUTOLOAD:=$(call AutoProbe,can-raw)\n $(call AddDepends/can)\nendef\n\ndefine KernelPackage/can-raw/description\n The raw CAN protocol option offers access to the CAN bus via\n the BSD socket API.\nendef\n\n$(eval $(call KernelPackage,can-raw))\n\n\ndefine KernelPackage/can-bcm\n TITLE:=Broadcast Manager CAN Protcol\n KCONFIG:=CONFIG_CAN_BCM\n FILES:=$(LINUX_DIR)/net/can/can-bcm.ko\n AUTOLOAD:=$(call AutoProbe,can-bcm)\n $(call AddDepends/can)\nendef\n\ndefine KernelPackage/can-bcm/description\n The Broadcast Manager offers content filtering, timeout monitoring,\n sending of RTR frames, and cyclic CAN messages without permanent user\n interaction.\nendef\n\n$(eval $(call KernelPackage,can-bcm))\n\n\ndefine KernelPackage/can-gw\n TITLE:=CAN Gateway/Router\n KCONFIG:=CONFIG_CAN_GW\n FILES:=$(LINUX_DIR)/net/can/can-gw.ko\n AUTOLOAD:=$(call AutoProbe,can-gw)\n $(call AddDepends/can)\nendef\n\ndefine KernelPackage/can-gw/description\n The CAN Gateway/Router is used to route (and modify) CAN frames.\nendef\n\n$(eval $(call KernelPackage,can-gw))\n\n\ndefine KernelPackage/can-vcan\n TITLE:=Virtual Local CAN Interface (vcan)\n KCONFIG:=CONFIG_CAN_VCAN\n FILES:=$(LINUX_DIR)/drivers/net/can/vcan.ko\n AUTOLOAD:=$(call AutoProbe,vcan)\n $(call AddDepends/can)\nendef\n\ndefine KernelPackage/can-vcan/description\n Similar to the network loopback devices, vcan offers a\n virtual local CAN interface.\nendef\n\n$(eval $(call KernelPackage,can-vcan))\n\n\ndefine KernelPackage/can-slcan\n TITLE:=Serial / USB serial CAN Adaptors (slcan)\n KCONFIG:=CONFIG_CAN_SLCAN\n FILES:=$(LINUX_DIR)/drivers/net/can/slcan.ko\n AUTOLOAD:=$(call AutoProbe,slcan)\n $(call AddDepends/can)\nendef\n\ndefine KernelPackage/can-slcan/description\n CAN driver for several 'low cost' CAN interfaces that are attached\n via serial lines or via USB-to-serial adapters using the LAWICEL\n ASCII protocol.\nendef\n\n$(eval $(call KernelPackage,can-slcan))\n\n\ndefine KernelPackage/can-flexcan\n TITLE:=Support for Freescale FLEXCAN based chips\n KCONFIG:=CONFIG_CAN_FLEXCAN\n FILES:=$(LINUX_DIR)/drivers/net/can/flexcan.ko\n AUTOLOAD:=$(call AutoProbe,flexcan)\n $(call AddDepends/can,@TARGET_imx6)\nendef\n\ndefine KernelPackage/can-flexcan/description\n Freescale FLEXCAN CAN bus controller implementation.\nendef\n\n$(eval $(call KernelPackage,can-flexcan))\n\n\ndefine KernelPackage/can-usb-ems\n TITLE:=EMS CPC-USB/ARM7 CAN/USB interface\n KCONFIG:=CONFIG_CAN_EMS_USB\n FILES:=$(LINUX_DIR)/drivers/net/can/usb/ems_usb.ko\n AUTOLOAD:=$(call AutoProbe,ems_usb)\n $(call AddDepends/can,+kmod-usb-core)\nendef\n\ndefine KernelPackage/can-usb-ems/description\n This driver is for the one channel CPC-USB/ARM7 CAN/USB interface\n from EMS Dr. Thomas Wuensche (http://www.ems-wuensche.de).\nendef\n\n$(eval $(call KernelPackage,can-usb-ems))\n\n\ndefine KernelPackage/can-usb-esd\n TITLE:=ESD USB/2 CAN/USB interface\n KCONFIG:=CONFIG_CAN_ESD_USB2\n FILES:=$(LINUX_DIR)/drivers/net/can/usb/esd_usb2.ko\n AUTOLOAD:=$(call AutoProbe,esd_usb2)\n $(call AddDepends/can,+kmod-usb-core)\nendef\n\ndefine KernelPackage/can-usb-esd/description\n This driver supports the CAN-USB/2 interface\n from esd electronic system design gmbh (http://www.esd.eu).\nendef\n\n$(eval $(call KernelPackage,can-usb-esd))\n\n\ndefine KernelPackage/can-usb-kvaser\n TITLE:=Kvaser CAN/USB interface\n KCONFIG:=CONFIG_CAN_KVASER_USB\n FILES:=$(LINUX_DIR)/drivers/net/can/usb/kvaser_usb.ko\n AUTOLOAD:=$(call AutoProbe,kvaser_usb)\n $(call AddDepends/can,+kmod-usb-core)\nendef\n\ndefine KernelPackage/can-usb-kvaser/description\n This driver adds support for Kvaser CAN/USB devices like Kvaser\n Leaf Light.\nendef\n\n$(eval $(call KernelPackage,can-usb-kvaser))\n\n\ndefine KernelPackage/can-usb-peak\n TITLE:=PEAK PCAN-USB/USB Pro interfaces\n KCONFIG:=CONFIG_CAN_PEAK_USB\n FILES:=$(LINUX_DIR)/drivers/net/can/usb/peak_usb/peak_usb.ko\n AUTOLOAD:=$(call AutoProbe,peak_usb)\n $(call AddDepends/can,+kmod-usb-core)\nendef\n\ndefine KernelPackage/can-usb-peak/description\n This driver supports the PCAN-USB and PCAN-USB Pro adapters\n from PEAK-System Technik (http://www.peak-system.com).\nendef\n\n$(eval $(call KernelPackage,can-usb-peak))\n\n\ndefine KernelPackage/can-usb-8dev\n TITLE:=8 devices USB2CAN interface\n KCONFIG:=CONFIG_CAN_8DEV_USB\n FILES:=$(LINUX_DIR)/drivers/net/can/usb/usb_8dev.ko\n AUTOLOAD:=$(call AutoProbe,usb_8dev)\n $(call AddDepends/can,+kmod-usb-core)\nendef\n\ndefine KernelPackage/can-usb-8dev/description\n This driver supports the USB2CAN interface\n from 8 devices (http://www.8devices.com).\nendef\n\n$(eval $(call KernelPackage,can-usb-8dev))\n\n\ndefine KernelPackage/can-c-can\n TITLE:=BOSCH C_CAN/D_CAN drivers\n KCONFIG:=CONFIG_CAN_C_CAN\n FILES:=$(LINUX_DIR)/drivers/net/can/c_can/c_can.ko\n AUTOLOAD:=$(call AutoProbe,c_can)\n $(call AddDepends/can)\nendef\n\ndefine KernelPackage/can-c-can/description\n This driver adds generic support for the C_CAN/D_CAN chips.\nendef\n\n$(eval $(call KernelPackage,can-c-can))\n\n\ndefine KernelPackage/can-c-can-platform\n TITLE:=Platform Bus based BOSCH C_CAN/D_CAN driver\n KCONFIG:=CONFIG_CAN_C_CAN_PLATFORM\n DEPENDS:=kmod-can-c-can +LINUX_4_1:kmod-regmap\n FILES:=$(LINUX_DIR)/drivers/net/can/c_can/c_can_platform.ko\n AUTOLOAD:=$(call AutoProbe,c_can_platform)\n $(call AddDepends/can)\nendef\n\ndefine KernelPackage/can-c-can-platform/description\n This driver adds support for the C_CAN/D_CAN chips connected\n to the \"platform bus\" (Linux abstraction for directly to the\n processor attached devices) which can be found on various\n boards from ST Microelectronics (http://www.st.com) like the\n SPEAr1310 and SPEAr320 evaluation boards & TI (www.ti.com)\n boards like am335x, dm814x, dm813x and dm811x.\nendef\n\n$(eval $(call KernelPackage,can-c-can-platform))\n\n\ndefine KernelPackage/can-c-can-pci\n TITLE:=PCI Bus based BOSCH C_CAN/D_CAN driver\n KCONFIG:=CONFIG_CAN_C_CAN_PCI\n DEPENDS:=kmod-can-c-can @PCI_SUPPORT\n FILES:=$(LINUX_DIR)/drivers/net/can/c_can/c_can_pci.ko\n AUTOLOAD:=$(call AutoProbe,c_can_pci)\n $(call AddDepends/can)\nendef\n\ndefine KernelPackage/can-c-can-pci/description\n This driver adds support for the C_CAN/D_CAN chips connected\n to the PCI bus.\nendef\n\n$(eval $(call KernelPackage,can-c-can-pci))\n\n"} +{"text": "#region MIT License\n/*Copyright (c) 2012-2013, 2015 Robert Rouhani \n\nSharpFont based on Tao.FreeType, Copyright (c) 2003-2007 Tao Framework Team\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies\nof the Software, and to permit persons to whom the Software is furnished to do\nso, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.*/\n#endregion\n\nusing System;\nusing System.Runtime.InteropServices;\n\nusing SharpFont.Internal;\n\nnamespace SharpFont\n{\n\t/// \n\t/// A structure used to model the metrics of a single glyph. The values are expressed in 26.6 fractional pixel\n\t/// format; if the flag has been used while loading the glyph, values are expressed\n\t/// in font units instead.\n\t/// \n\t/// \n\t/// If not disabled with , the values represent dimensions of the hinted glyph (in\n\t/// case hinting is applicable). \n\t/// \n\tpublic sealed class GlyphMetrics\n\t{\n\t\t#region Fields\n\n\t\tprivate IntPtr reference;\n\t\tprivate GlyphMetricsRec rec;\n\n\t\t#endregion\n\n\t\t#region Constructors\n\n\t\tinternal GlyphMetrics(IntPtr reference)\n\t\t{\n\t\t\tReference = reference;\n\t\t}\n\n\t\tinternal GlyphMetrics(GlyphMetricsRec glyphMetInt)\n\t\t{\n\t\t\tthis.rec = glyphMetInt;\n\t\t}\n\n\t\t#endregion\n\n\t\t#region Properties\n\n\t\t/// \n\t\t/// Gets the glyph's width. If getting metrics from a face loaded with , call\n\t\t/// to get the unscaled value.\n\t\t/// \n\t\tpublic Fixed26Dot6 Width\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn Fixed26Dot6.FromRawValue((int)rec.width);\n\t\t\t}\n\t\t}\n\n\t\t/// \n\t\t/// Gets the glyph's height. If getting metrics from a face loaded with , call\n\t\t/// to get the unscaled value.\n\t\t/// \n\t\tpublic Fixed26Dot6 Height\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn Fixed26Dot6.FromRawValue((int)rec.height);\n\t\t\t}\n\t\t}\n\n\t\t/// \n\t\t/// Gets the left side bearing for horizontal layout. If getting metrics from a face loaded with\n\t\t/// , call to get the unscaled value.\n\t\t/// \n\t\tpublic Fixed26Dot6 HorizontalBearingX\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn Fixed26Dot6.FromRawValue((int)rec.horiBearingX);\n\t\t\t}\n\t\t}\n\n\t\t/// \n\t\t/// Gets the top side bearing for horizontal layout. If getting metrics from a face loaded with\n\t\t/// , call to get the unscaled value.\n\t\t/// \n\t\tpublic Fixed26Dot6 HorizontalBearingY\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn Fixed26Dot6.FromRawValue((int)rec.horiBearingY);\n\t\t\t}\n\t\t}\n\n\t\t/// \n\t\t/// Gets the advance width for horizontal layout. If getting metrics from a face loaded with\n\t\t/// , call to get the unscaled value.\n\t\t/// \n\t\tpublic Fixed26Dot6 HorizontalAdvance\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn Fixed26Dot6.FromRawValue((int)rec.horiAdvance);\n\t\t\t}\n\t\t}\n\n\t\t/// \n\t\t/// Gets the left side bearing for vertical layout. If getting metrics from a face loaded with\n\t\t/// , call to get the unscaled value.\n\t\t/// \n\t\tpublic Fixed26Dot6 VerticalBearingX\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn Fixed26Dot6.FromRawValue((int)rec.vertBearingX);\n\t\t\t}\n\t\t}\n\n\t\t/// \n\t\t/// Gets the top side bearing for vertical layout. Larger positive values mean further below the vertical glyph\n\t\t/// origin. If getting metrics from a face loaded with , call\n\t\t/// to get the unscaled value.\n\t\t/// \n\t\tpublic Fixed26Dot6 VerticalBearingY\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn Fixed26Dot6.FromRawValue((int)rec.vertBearingY);\n\t\t\t}\n\t\t}\n\n\t\t/// \n\t\t/// Gets the advance height for vertical layout. Positive values mean the glyph has a positive advance\n\t\t/// downward. If getting metrics from a face loaded with , call\n\t\t/// to get the unscaled value.\n\t\t/// \n\t\tpublic Fixed26Dot6 VerticalAdvance\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn Fixed26Dot6.FromRawValue((int)rec.vertAdvance);\n\t\t\t}\n\t\t}\n\n\t\tinternal IntPtr Reference\n\t\t{\n\t\t\tget\n\t\t\t{\n\t\t\t\treturn reference;\n\t\t\t}\n\n\t\t\tset\n\t\t\t{\n\t\t\t\treference = value;\n\t\t\t\trec = PInvokeHelper.PtrToStructure(reference);\n\t\t\t}\n\t\t}\n\n\t\t#endregion\n\t}\n}\n"} +{"text": "\n\n"} +{"text": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Désiré Nuentsa-Wakam \n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_PASTIXSUPPORT_H\n#define EIGEN_PASTIXSUPPORT_H\n\nnamespace Eigen { \n\n#if defined(DCOMPLEX)\n #define PASTIX_COMPLEX COMPLEX\n #define PASTIX_DCOMPLEX DCOMPLEX\n#else\n #define PASTIX_COMPLEX std::complex\n #define PASTIX_DCOMPLEX std::complex\n#endif\n\n/** \\ingroup PaStiXSupport_Module\n * \\brief Interface to the PaStix solver\n * \n * This class is used to solve the linear systems A.X = B via the PaStix library. \n * The matrix can be either real or complex, symmetric or not.\n *\n * \\sa TutorialSparseDirectSolvers\n */\ntemplate class PastixLU;\ntemplate class PastixLLT;\ntemplate class PastixLDLT;\n\nnamespace internal\n{\n \n template struct pastix_traits;\n\n template\n struct pastix_traits< PastixLU<_MatrixType> >\n {\n typedef _MatrixType MatrixType;\n typedef typename _MatrixType::Scalar Scalar;\n typedef typename _MatrixType::RealScalar RealScalar;\n typedef typename _MatrixType::StorageIndex StorageIndex;\n };\n\n template\n struct pastix_traits< PastixLLT<_MatrixType,Options> >\n {\n typedef _MatrixType MatrixType;\n typedef typename _MatrixType::Scalar Scalar;\n typedef typename _MatrixType::RealScalar RealScalar;\n typedef typename _MatrixType::StorageIndex StorageIndex;\n };\n\n template\n struct pastix_traits< PastixLDLT<_MatrixType,Options> >\n {\n typedef _MatrixType MatrixType;\n typedef typename _MatrixType::Scalar Scalar;\n typedef typename _MatrixType::RealScalar RealScalar;\n typedef typename _MatrixType::StorageIndex StorageIndex;\n };\n \n void eigen_pastix(pastix_data_t **pastix_data, int pastix_comm, int n, int *ptr, int *idx, float *vals, int *perm, int * invp, float *x, int nbrhs, int *iparm, double *dparm)\n {\n if (n == 0) { ptr = NULL; idx = NULL; vals = NULL; }\n if (nbrhs == 0) {x = NULL; nbrhs=1;}\n s_pastix(pastix_data, pastix_comm, n, ptr, idx, vals, perm, invp, x, nbrhs, iparm, dparm); \n }\n \n void eigen_pastix(pastix_data_t **pastix_data, int pastix_comm, int n, int *ptr, int *idx, double *vals, int *perm, int * invp, double *x, int nbrhs, int *iparm, double *dparm)\n {\n if (n == 0) { ptr = NULL; idx = NULL; vals = NULL; }\n if (nbrhs == 0) {x = NULL; nbrhs=1;}\n d_pastix(pastix_data, pastix_comm, n, ptr, idx, vals, perm, invp, x, nbrhs, iparm, dparm); \n }\n \n void eigen_pastix(pastix_data_t **pastix_data, int pastix_comm, int n, int *ptr, int *idx, std::complex *vals, int *perm, int * invp, std::complex *x, int nbrhs, int *iparm, double *dparm)\n {\n if (n == 0) { ptr = NULL; idx = NULL; vals = NULL; }\n if (nbrhs == 0) {x = NULL; nbrhs=1;}\n c_pastix(pastix_data, pastix_comm, n, ptr, idx, reinterpret_cast(vals), perm, invp, reinterpret_cast(x), nbrhs, iparm, dparm); \n }\n \n void eigen_pastix(pastix_data_t **pastix_data, int pastix_comm, int n, int *ptr, int *idx, std::complex *vals, int *perm, int * invp, std::complex *x, int nbrhs, int *iparm, double *dparm)\n {\n if (n == 0) { ptr = NULL; idx = NULL; vals = NULL; }\n if (nbrhs == 0) {x = NULL; nbrhs=1;}\n z_pastix(pastix_data, pastix_comm, n, ptr, idx, reinterpret_cast(vals), perm, invp, reinterpret_cast(x), nbrhs, iparm, dparm); \n }\n\n // Convert the matrix to Fortran-style Numbering\n template \n void c_to_fortran_numbering (MatrixType& mat)\n {\n if ( !(mat.outerIndexPtr()[0]) ) \n { \n int i;\n for(i = 0; i <= mat.rows(); ++i)\n ++mat.outerIndexPtr()[i];\n for(i = 0; i < mat.nonZeros(); ++i)\n ++mat.innerIndexPtr()[i];\n }\n }\n \n // Convert to C-style Numbering\n template \n void fortran_to_c_numbering (MatrixType& mat)\n {\n // Check the Numbering\n if ( mat.outerIndexPtr()[0] == 1 ) \n { // Convert to C-style numbering\n int i;\n for(i = 0; i <= mat.rows(); ++i)\n --mat.outerIndexPtr()[i];\n for(i = 0; i < mat.nonZeros(); ++i)\n --mat.innerIndexPtr()[i];\n }\n }\n}\n\n// This is the base class to interface with PaStiX functions. \n// Users should not used this class directly. \ntemplate \nclass PastixBase : public SparseSolverBase\n{\n protected:\n typedef SparseSolverBase Base;\n using Base::derived;\n using Base::m_isInitialized;\n public:\n using Base::_solve_impl;\n \n typedef typename internal::pastix_traits::MatrixType _MatrixType;\n typedef _MatrixType MatrixType;\n typedef typename MatrixType::Scalar Scalar;\n typedef typename MatrixType::RealScalar RealScalar;\n typedef typename MatrixType::StorageIndex StorageIndex;\n typedef Matrix Vector;\n typedef SparseMatrix ColSpMatrix;\n enum {\n ColsAtCompileTime = MatrixType::ColsAtCompileTime,\n MaxColsAtCompileTime = MatrixType::MaxColsAtCompileTime\n };\n \n public:\n \n PastixBase() : m_initisOk(false), m_analysisIsOk(false), m_factorizationIsOk(false), m_pastixdata(0), m_size(0)\n {\n init();\n }\n \n ~PastixBase() \n {\n clean();\n }\n \n template\n bool _solve_impl(const MatrixBase &b, MatrixBase &x) const;\n \n /** Returns a reference to the integer vector IPARM of PaStiX parameters\n * to modify the default parameters. \n * The statistics related to the different phases of factorization and solve are saved here as well\n * \\sa analyzePattern() factorize()\n */\n Array& iparm()\n {\n return m_iparm; \n }\n \n /** Return a reference to a particular index parameter of the IPARM vector \n * \\sa iparm()\n */\n \n int& iparm(int idxparam)\n {\n return m_iparm(idxparam);\n }\n \n /** Returns a reference to the double vector DPARM of PaStiX parameters \n * The statistics related to the different phases of factorization and solve are saved here as well\n * \\sa analyzePattern() factorize()\n */\n Array& dparm()\n {\n return m_dparm; \n }\n \n \n /** Return a reference to a particular index parameter of the DPARM vector \n * \\sa dparm()\n */\n double& dparm(int idxparam)\n {\n return m_dparm(idxparam);\n }\n \n inline Index cols() const { return m_size; }\n inline Index rows() const { return m_size; }\n \n /** \\brief Reports whether previous computation was successful.\n *\n * \\returns \\c Success if computation was succesful,\n * \\c NumericalIssue if the PaStiX reports a problem\n * \\c InvalidInput if the input matrix is invalid\n *\n * \\sa iparm() \n */\n ComputationInfo info() const\n {\n eigen_assert(m_isInitialized && \"Decomposition is not initialized.\");\n return m_info;\n }\n \n protected:\n\n // Initialize the Pastix data structure, check the matrix\n void init(); \n \n // Compute the ordering and the symbolic factorization\n void analyzePattern(ColSpMatrix& mat);\n \n // Compute the numerical factorization\n void factorize(ColSpMatrix& mat);\n \n // Free all the data allocated by Pastix\n void clean()\n {\n eigen_assert(m_initisOk && \"The Pastix structure should be allocated first\"); \n m_iparm(IPARM_START_TASK) = API_TASK_CLEAN;\n m_iparm(IPARM_END_TASK) = API_TASK_CLEAN;\n internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, 0, 0, 0, (Scalar*)0,\n m_perm.data(), m_invp.data(), 0, 0, m_iparm.data(), m_dparm.data());\n }\n \n void compute(ColSpMatrix& mat);\n \n int m_initisOk; \n int m_analysisIsOk;\n int m_factorizationIsOk;\n mutable ComputationInfo m_info; \n mutable pastix_data_t *m_pastixdata; // Data structure for pastix\n mutable int m_comm; // The MPI communicator identifier\n mutable Matrix m_iparm; // integer vector for the input parameters\n mutable Matrix m_dparm; // Scalar vector for the input parameters\n mutable Matrix m_perm; // Permutation vector\n mutable Matrix m_invp; // Inverse permutation vector\n mutable int m_size; // Size of the matrix \n}; \n\n /** Initialize the PaStiX data structure. \n *A first call to this function fills iparm and dparm with the default PaStiX parameters\n * \\sa iparm() dparm()\n */\ntemplate \nvoid PastixBase::init()\n{\n m_size = 0; \n m_iparm.setZero(IPARM_SIZE);\n m_dparm.setZero(DPARM_SIZE);\n \n m_iparm(IPARM_MODIFY_PARAMETER) = API_NO;\n pastix(&m_pastixdata, MPI_COMM_WORLD,\n 0, 0, 0, 0,\n 0, 0, 0, 1, m_iparm.data(), m_dparm.data());\n \n m_iparm[IPARM_MATRIX_VERIFICATION] = API_NO;\n m_iparm[IPARM_VERBOSE] = 2;\n m_iparm[IPARM_ORDERING] = API_ORDER_SCOTCH;\n m_iparm[IPARM_INCOMPLETE] = API_NO;\n m_iparm[IPARM_OOC_LIMIT] = 2000;\n m_iparm[IPARM_RHS_MAKING] = API_RHS_B;\n m_iparm(IPARM_MATRIX_VERIFICATION) = API_NO;\n \n m_iparm(IPARM_START_TASK) = API_TASK_INIT;\n m_iparm(IPARM_END_TASK) = API_TASK_INIT;\n internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, 0, 0, 0, (Scalar*)0,\n 0, 0, 0, 0, m_iparm.data(), m_dparm.data());\n \n // Check the returned error\n if(m_iparm(IPARM_ERROR_NUMBER)) {\n m_info = InvalidInput;\n m_initisOk = false;\n }\n else { \n m_info = Success;\n m_initisOk = true;\n }\n}\n\ntemplate \nvoid PastixBase::compute(ColSpMatrix& mat)\n{\n eigen_assert(mat.rows() == mat.cols() && \"The input matrix should be squared\");\n \n analyzePattern(mat); \n factorize(mat);\n \n m_iparm(IPARM_MATRIX_VERIFICATION) = API_NO;\n}\n\n\ntemplate \nvoid PastixBase::analyzePattern(ColSpMatrix& mat)\n{ \n eigen_assert(m_initisOk && \"The initialization of PaSTiX failed\");\n \n // clean previous calls\n if(m_size>0)\n clean();\n \n m_size = internal::convert_index(mat.rows());\n m_perm.resize(m_size);\n m_invp.resize(m_size);\n \n m_iparm(IPARM_START_TASK) = API_TASK_ORDERING;\n m_iparm(IPARM_END_TASK) = API_TASK_ANALYSE;\n internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, m_size, mat.outerIndexPtr(), mat.innerIndexPtr(),\n mat.valuePtr(), m_perm.data(), m_invp.data(), 0, 0, m_iparm.data(), m_dparm.data());\n \n // Check the returned error\n if(m_iparm(IPARM_ERROR_NUMBER))\n {\n m_info = NumericalIssue;\n m_analysisIsOk = false;\n }\n else\n { \n m_info = Success;\n m_analysisIsOk = true;\n }\n}\n\ntemplate \nvoid PastixBase::factorize(ColSpMatrix& mat)\n{\n// if(&m_cpyMat != &mat) m_cpyMat = mat;\n eigen_assert(m_analysisIsOk && \"The analysis phase should be called before the factorization phase\");\n m_iparm(IPARM_START_TASK) = API_TASK_NUMFACT;\n m_iparm(IPARM_END_TASK) = API_TASK_NUMFACT;\n m_size = internal::convert_index(mat.rows());\n \n internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, m_size, mat.outerIndexPtr(), mat.innerIndexPtr(),\n mat.valuePtr(), m_perm.data(), m_invp.data(), 0, 0, m_iparm.data(), m_dparm.data());\n \n // Check the returned error\n if(m_iparm(IPARM_ERROR_NUMBER))\n {\n m_info = NumericalIssue;\n m_factorizationIsOk = false;\n m_isInitialized = false;\n }\n else\n {\n m_info = Success;\n m_factorizationIsOk = true;\n m_isInitialized = true;\n }\n}\n\n/* Solve the system */\ntemplate\ntemplate\nbool PastixBase::_solve_impl(const MatrixBase &b, MatrixBase &x) const\n{\n eigen_assert(m_isInitialized && \"The matrix should be factorized first\");\n EIGEN_STATIC_ASSERT((Dest::Flags&RowMajorBit)==0,\n THIS_METHOD_IS_ONLY_FOR_COLUMN_MAJOR_MATRICES);\n int rhs = 1;\n \n x = b; /* on return, x is overwritten by the computed solution */\n \n for (int i = 0; i < b.cols(); i++){\n m_iparm[IPARM_START_TASK] = API_TASK_SOLVE;\n m_iparm[IPARM_END_TASK] = API_TASK_REFINE;\n \n internal::eigen_pastix(&m_pastixdata, MPI_COMM_WORLD, internal::convert_index(x.rows()), 0, 0, 0,\n m_perm.data(), m_invp.data(), &x(0, i), rhs, m_iparm.data(), m_dparm.data());\n }\n \n // Check the returned error\n m_info = m_iparm(IPARM_ERROR_NUMBER)==0 ? Success : NumericalIssue;\n \n return m_iparm(IPARM_ERROR_NUMBER)==0;\n}\n\n/** \\ingroup PaStiXSupport_Module\n * \\class PastixLU\n * \\brief Sparse direct LU solver based on PaStiX library\n * \n * This class is used to solve the linear systems A.X = B with a supernodal LU \n * factorization in the PaStiX library. The matrix A should be squared and nonsingular\n * PaStiX requires that the matrix A has a symmetric structural pattern. \n * This interface can symmetrize the input matrix otherwise. \n * The vectors or matrices X and B can be either dense or sparse.\n * \n * \\tparam _MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>\n * \\tparam IsStrSym Indicates if the input matrix has a symmetric pattern, default is false\n * NOTE : Note that if the analysis and factorization phase are called separately, \n * the input matrix will be symmetrized at each call, hence it is advised to \n * symmetrize the matrix in a end-user program and set \\p IsStrSym to true\n *\n * \\implsparsesolverconcept\n *\n * \\sa \\ref TutorialSparseDirectSolvers\n * \n */\ntemplate\nclass PastixLU : public PastixBase< PastixLU<_MatrixType> >\n{\n public:\n typedef _MatrixType MatrixType;\n typedef PastixBase > Base;\n typedef typename Base::ColSpMatrix ColSpMatrix;\n typedef typename MatrixType::StorageIndex StorageIndex;\n \n public:\n PastixLU() : Base()\n {\n init();\n }\n \n explicit PastixLU(const MatrixType& matrix):Base()\n {\n init();\n compute(matrix);\n }\n /** Compute the LU supernodal factorization of \\p matrix. \n * iparm and dparm can be used to tune the PaStiX parameters. \n * see the PaStiX user's manual\n * \\sa analyzePattern() factorize()\n */\n void compute (const MatrixType& matrix)\n {\n m_structureIsUptodate = false;\n ColSpMatrix temp;\n grabMatrix(matrix, temp);\n Base::compute(temp);\n }\n /** Compute the LU symbolic factorization of \\p matrix using its sparsity pattern. \n * Several ordering methods can be used at this step. See the PaStiX user's manual. \n * The result of this operation can be used with successive matrices having the same pattern as \\p matrix\n * \\sa factorize()\n */\n void analyzePattern(const MatrixType& matrix)\n {\n m_structureIsUptodate = false;\n ColSpMatrix temp;\n grabMatrix(matrix, temp);\n Base::analyzePattern(temp);\n }\n\n /** Compute the LU supernodal factorization of \\p matrix\n * WARNING The matrix \\p matrix should have the same structural pattern \n * as the same used in the analysis phase.\n * \\sa analyzePattern()\n */ \n void factorize(const MatrixType& matrix)\n {\n ColSpMatrix temp;\n grabMatrix(matrix, temp);\n Base::factorize(temp);\n }\n protected:\n \n void init()\n {\n m_structureIsUptodate = false;\n m_iparm(IPARM_SYM) = API_SYM_NO;\n m_iparm(IPARM_FACTORIZATION) = API_FACT_LU;\n }\n \n void grabMatrix(const MatrixType& matrix, ColSpMatrix& out)\n {\n if(IsStrSym)\n out = matrix;\n else\n {\n if(!m_structureIsUptodate)\n {\n // update the transposed structure\n m_transposedStructure = matrix.transpose();\n \n // Set the elements of the matrix to zero \n for (Index j=0; j\n * \\tparam UpLo The part of the matrix to use : Lower or Upper. The default is Lower as required by PaStiX\n *\n * \\implsparsesolverconcept\n *\n * \\sa \\ref TutorialSparseDirectSolvers\n */\ntemplate\nclass PastixLLT : public PastixBase< PastixLLT<_MatrixType, _UpLo> >\n{\n public:\n typedef _MatrixType MatrixType;\n typedef PastixBase > Base;\n typedef typename Base::ColSpMatrix ColSpMatrix;\n \n public:\n enum { UpLo = _UpLo };\n PastixLLT() : Base()\n {\n init();\n }\n \n explicit PastixLLT(const MatrixType& matrix):Base()\n {\n init();\n compute(matrix);\n }\n\n /** Compute the L factor of the LL^T supernodal factorization of \\p matrix \n * \\sa analyzePattern() factorize()\n */\n void compute (const MatrixType& matrix)\n {\n ColSpMatrix temp;\n grabMatrix(matrix, temp);\n Base::compute(temp);\n }\n\n /** Compute the LL^T symbolic factorization of \\p matrix using its sparsity pattern\n * The result of this operation can be used with successive matrices having the same pattern as \\p matrix\n * \\sa factorize()\n */\n void analyzePattern(const MatrixType& matrix)\n {\n ColSpMatrix temp;\n grabMatrix(matrix, temp);\n Base::analyzePattern(temp);\n }\n /** Compute the LL^T supernodal numerical factorization of \\p matrix \n * \\sa analyzePattern()\n */\n void factorize(const MatrixType& matrix)\n {\n ColSpMatrix temp;\n grabMatrix(matrix, temp);\n Base::factorize(temp);\n }\n protected:\n using Base::m_iparm;\n \n void init()\n {\n m_iparm(IPARM_SYM) = API_SYM_YES;\n m_iparm(IPARM_FACTORIZATION) = API_FACT_LLT;\n }\n \n void grabMatrix(const MatrixType& matrix, ColSpMatrix& out)\n {\n // Pastix supports only lower, column-major matrices \n out.template selfadjointView() = matrix.template selfadjointView();\n internal::c_to_fortran_numbering(out);\n }\n};\n\n/** \\ingroup PaStiXSupport_Module\n * \\class PastixLDLT\n * \\brief A sparse direct supernodal Cholesky (LLT) factorization and solver based on the PaStiX library\n * \n * This class is used to solve the linear systems A.X = B via a LDL^T supernodal Cholesky factorization\n * available in the PaStiX library. The matrix A should be symmetric and positive definite\n * WARNING Selfadjoint complex matrices are not supported in the current version of PaStiX\n * The vectors or matrices X and B can be either dense or sparse\n * \n * \\tparam MatrixType the type of the sparse matrix A, it must be a SparseMatrix<>\n * \\tparam UpLo The part of the matrix to use : Lower or Upper. The default is Lower as required by PaStiX\n *\n * \\implsparsesolverconcept\n *\n * \\sa \\ref TutorialSparseDirectSolvers\n */\ntemplate\nclass PastixLDLT : public PastixBase< PastixLDLT<_MatrixType, _UpLo> >\n{\n public:\n typedef _MatrixType MatrixType;\n typedef PastixBase > Base; \n typedef typename Base::ColSpMatrix ColSpMatrix;\n \n public:\n enum { UpLo = _UpLo };\n PastixLDLT():Base()\n {\n init();\n }\n \n explicit PastixLDLT(const MatrixType& matrix):Base()\n {\n init();\n compute(matrix);\n }\n\n /** Compute the L and D factors of the LDL^T factorization of \\p matrix \n * \\sa analyzePattern() factorize()\n */\n void compute (const MatrixType& matrix)\n {\n ColSpMatrix temp;\n grabMatrix(matrix, temp);\n Base::compute(temp);\n }\n\n /** Compute the LDL^T symbolic factorization of \\p matrix using its sparsity pattern\n * The result of this operation can be used with successive matrices having the same pattern as \\p matrix\n * \\sa factorize()\n */\n void analyzePattern(const MatrixType& matrix)\n { \n ColSpMatrix temp;\n grabMatrix(matrix, temp);\n Base::analyzePattern(temp);\n }\n /** Compute the LDL^T supernodal numerical factorization of \\p matrix \n * \n */\n void factorize(const MatrixType& matrix)\n {\n ColSpMatrix temp;\n grabMatrix(matrix, temp);\n Base::factorize(temp);\n }\n\n protected:\n using Base::m_iparm;\n \n void init()\n {\n m_iparm(IPARM_SYM) = API_SYM_YES;\n m_iparm(IPARM_FACTORIZATION) = API_FACT_LDLT;\n }\n \n void grabMatrix(const MatrixType& matrix, ColSpMatrix& out)\n {\n // Pastix supports only lower, column-major matrices \n out.template selfadjointView() = matrix.template selfadjointView();\n internal::c_to_fortran_numbering(out);\n }\n};\n\n} // end namespace Eigen\n\n#endif\n"} +{"text": "\"\"\"\nMessages API.\n\"\"\"\nfrom flask import abort\nfrom flask import make_response\nfrom flask import request\n\nimport features\nfrom auth import scopes\nfrom auth.permissions import SuperUserPermission\nfrom endpoints.api import (\n ApiResource,\n resource,\n nickname,\n require_fresh_login,\n verify_not_prod,\n validate_json_request,\n require_scope,\n show_if,\n)\nfrom .globalmessages_models_pre_oci import pre_oci_model as model\n\n\n@resource(\"/v1/messages\")\nclass GlobalUserMessages(ApiResource):\n \"\"\"\n Resource for getting a list of super user messages.\n \"\"\"\n\n schemas = {\n \"GetMessage\": {\n \"id\": \"GetMessage\",\n \"type\": \"object\",\n \"description\": \"Messages that a super user has saved in the past\",\n \"properties\": {\n \"message\": {\n \"type\": \"array\",\n \"description\": \"A list of messages\",\n \"itemType\": {\n \"type\": \"object\",\n \"properties\": {\n \"uuid\": {\"type\": \"string\", \"description\": \"The message id\",},\n \"content\": {\"type\": \"string\", \"description\": \"The actual message\",},\n \"media_type\": {\n \"type\": \"string\",\n \"description\": \"The media type of the message\",\n \"enum\": [\"text/plain\", \"text/markdown\"],\n },\n \"severity\": {\n \"type\": \"string\",\n \"description\": \"The severity of the message\",\n \"enum\": [\"info\", \"warning\", \"error\"],\n },\n },\n },\n },\n },\n },\n \"CreateMessage\": {\n \"id\": \"CreateMessage\",\n \"type\": \"object\",\n \"description\": \"Create a new message\",\n \"properties\": {\n \"message\": {\n \"type\": \"object\",\n \"description\": \"A single message\",\n \"required\": [\"content\", \"media_type\", \"severity\",],\n \"properties\": {\n \"content\": {\"type\": \"string\", \"description\": \"The actual message\",},\n \"media_type\": {\n \"type\": \"string\",\n \"description\": \"The media type of the message\",\n \"enum\": [\"text/plain\", \"text/markdown\"],\n },\n \"severity\": {\n \"type\": \"string\",\n \"description\": \"The severity of the message\",\n \"enum\": [\"info\", \"warning\", \"error\"],\n },\n },\n },\n },\n },\n }\n\n @nickname(\"getGlobalMessages\")\n def get(self):\n \"\"\"\n Return a super users messages.\n \"\"\"\n return {\n \"messages\": [m.to_dict() for m in model.get_all_messages()],\n }\n\n @require_fresh_login\n @verify_not_prod\n @nickname(\"createGlobalMessage\")\n @validate_json_request(\"CreateMessage\")\n @require_scope(scopes.SUPERUSER)\n def post(self):\n \"\"\"\n Create a message.\n \"\"\"\n if not features.SUPER_USERS:\n abort(404)\n\n if SuperUserPermission().can():\n message_req = request.get_json()[\"message\"]\n message = model.create_message(\n message_req[\"severity\"], message_req[\"media_type\"], message_req[\"content\"]\n )\n if message is None:\n abort(400)\n return make_response(\"\", 201)\n\n abort(403)\n\n\n@resource(\"/v1/message/\")\n@show_if(features.SUPER_USERS)\nclass GlobalUserMessage(ApiResource):\n \"\"\"\n Resource for managing individual messages.\n \"\"\"\n\n @require_fresh_login\n @verify_not_prod\n @nickname(\"deleteGlobalMessage\")\n @require_scope(scopes.SUPERUSER)\n def delete(self, uuid):\n \"\"\"\n Delete a message.\n \"\"\"\n if SuperUserPermission().can():\n model.delete_message(uuid)\n return make_response(\"\", 204)\n\n abort(403)\n"} +{"text": "config.suffixes = ['.ll', '.c', '.cpp']\n"} +{"text": "### ECS In VPC Example\n\nThe example launches ECS in VPC, vswitch_id parameter is the vswitch id from VPC. It also create disk, and attached the disk on ECS. The variables.tf can let you create specify parameter instances, such as image_id, ecs_type, count etc.\n\n### Get up and running\n\n* Planning phase\n\n\t\tterraform plan \n \t\tvar.availability_zones\n \t\t\t\tEnter a value: {var.availability_zones} /*cn-beijing-b*/\n\t \tvar.datacenter\n\t \t\tEnter a value: {datacenter}\n\t \tvar.vswitch_id\n\t \t\tEnter a value: {vswitch_id}\n\t \t....\n\n* Apply phase\n\n\t\tterraform apply \n\t\t var.availability_zones\n \t\t\t\tEnter a value: {var.availability_zones} /*cn-beijing-b*/\n\t \tvar.datacenter\n\t \t\tEnter a value: {datacenter}\n\t \tvar.vswitch_id\n\t \t\tEnter a value: {vswitch_id}\n\t \t....\n\n* Destroy \n\n\t\tterraform destroy"} +{"text": "\nfrom cement.core import backend\n\n\ndef test_version():\n # ensure that we bump things properly on version changes\n assert backend.VERSION[0] == 3\n assert backend.VERSION[1] == 0\n assert backend.VERSION[2] == 5\n assert backend.VERSION[3] == 'final'\n assert backend.VERSION[4] == 0\n"} +{"text": "\n/* Prefix all pages with mb- for no collisions */\n\n/* Page class for all mobile pages */\n.mb-page {\n position: absolute;\n width: 100%;\n height: 100%;\n -webkit-backface-visibility: none;\n}\n\n/* \n * Slide\n * slide pages horizontally\n */\n@-webkit-keyframes slideInFromRight {\n 0% { -webkit-transform: translate3d(100%, 0, 0); }\n 100% { -webkit-transform: translate3d(0, 0, 0); }\n}\n@-webkit-keyframes slideOutToRight {\n 0% { -webkit-transform: translate3d(0, 0, 0); }\n 100% { -webkit-transform: translate3d(100%, 0, 0); }\n}\n@-webkit-keyframes slideInFromLeft {\n 0% { -webkit-transform: translate3d(-100%,0,0); }\n 100% { -webkit-transform: translate3d(0, 0, 0); }\n}\n@-webkit-keyframes slideOutToLeft {\n 0% { -webkit-transform: translate3d(0,0,0); }\n 100% { -webkit-transform: translate3d(-100%, 0, 0); }\n}\n@keyframes slideInFromRight {\n 0% { transform: translate3d(100%, 0, 0); }\n 100% { transform: translate3d(0, 0, 0); }\n}\n@keyframes slideOutToRight {\n 0% { transform: translate3d(0, 0, 0); }\n 100% { transform: translate3d(100%, 0, 0); }\n}\n@keyframes slideInFromLeft {\n 0% { transform: translate3d(-100%,0,0); }\n 100% { transform: translate3d(0, 0, 0); }\n}\n@keyframes slideOutToLeft {\n 0% { transform: translate3d(0,0,0); }\n 100% { transform: translate3d(-100%, 0, 0); }\n}\n\n.mb-slide {\n -webkit-animation-duration: 0.3s;\n -webkit-animation-timing-function: ease;\n animation-duration: 0.3s;\n animation-timing-function: ease;\n}\n.mb-slide.mb-in {\n -webkit-animation-name: slideInFromRight;\n animation-name: slideInFromRight;\n}\n.mb-slide.mb-in.mb-reverse {\n -webkit-animation-name: slideOutToRight;\n -webkit-transform: translate3d(100%, 0, 0);\n animation-name: slideOutToRight;\n transform: translate3d(100%, 0, 0);\n}\n.mb-slide.mb-out {\n -webkit-animation-name: slideOutToLeft;\n -webkit-transform: translate3d(-100%, 0, 0);\n animation-name: slideOutToLeft;\n transform: translate3d(-100%, 0, 0);\n}\n.mb-slide.mb-out.mb-reverse {\n -webkit-animation-name: slideInFromLeft;\n animation-name: slideInFromLeft;\n}\n\n/*\n * Slide up and down - like modal, but exiting page is animated too.\n */\n\n@-webkit-keyframes slideInFromTop {\n 0% { -webkit-transform: translate3d(0, 100%, 0); }\n 100% { -webkit-transform: translate3d(0, 0, 0); }\n}\n@-webkit-keyframes slideOutToTop {\n 0% { -webkit-transform: translate3d(0, 0, 0); }\n 100% { -webkit-transform: translate3d(0, 100%, 0); }\n}\n@-webkit-keyframes slideInFromBottom {\n 0% { -webkit-transform: translate3d(0,-100%,0); }\n 100% { -webkit-transform: translate3d(0, 0, 0); }\n}\n@-webkit-keyframes slideOutToBottom {\n 0% { -webkit-transform: translate3d(0,0,0); }\n 100% { -webkit-transform: translate3d(0, -100%, 0); }\n}\n@keyframes slideInFromTop {\n 0% { transform: translate3d(0, 100%, 0); }\n 100% { transform: translate3d(0, 0, 0); }\n}\n@keyframes slideOutToTop {\n 0% { transform: translate3d(0, 0, 0); }\n 100% { transform: translate3d(0, 100%, 0); }\n}\n@keyframes slideInFromBottom {\n 0% { transform: translate3d(0,-100%,0); }\n 100% { transform: translate3d(0, 0, 0); }\n}\n@keyframes slideOutToBottom {\n 0% { transform: translate3d(0,0,0); }\n 100% { transform: translate3d(0, -100%, 0); }\n}\n\n.mb-slide-up {\n -webkit-animation-duration: 0.3s;\n -webkit-animation-timing-function: ease;\n animation-duration: 0.3s;\n animation-timing-function: ease;\n}\n.mb-slide-up.mb-in {\n -webkit-animation-name: slideInFromTop;\n animation-name: slideInFromTop;\n}\n.mb-slide-up.mb-in.reverse {\n -webkit-animation-name: slideOutToTop;\n -webkit-transform: translate3d(0,-100%,0);\n animation-name: slideOutToTop;\n transform: translate3d(0,-100%,0);\n}\n.mb-slide-up.mb-out {\n -webkit-animation-name: slideOutToBottom;\n -webkit-transform: translate3d(0,100%,0);\n animation-name: slideOutToBottom;\n transform: translate3d(0,100%,0);\n}\n.mb-slide-up.mb-out.reverse {\n -webkit-animation-name: slideInFromBottom;\n animation-name: slideInFromBottom;\n}\n\n\n/*\n * Modal!\n * slide a page in from the bottom onto a page\n */\n@-webkit-keyframes modalUp {\n 0% { -webkit-transform: translate3d(0, 100%, 0); }\n 100% { -webkit-transform: translate3d(0, 0, 0); }\n}\n@-webkit-keyframes modalDown {\n 0% { -webkit-transform: translate3d(0, 0, 0); }\n 100% { -webkit-transform: translate3d(0, 100%, 0); }\n}\n@keyframes modalUp {\n 0% { transform: translate3d(0, 100%, 0); }\n 100% { transform: translate3d(0, 0, 0); }\n}\n@keyframes modalDown {\n 0% { transform: translate3d(0, 0, 0); }\n 100% { transform: translate3d(0, 100%, 0); }\n}\n.mb-modal {\n z-index: 10;\n -webkit-animation-duration: 0.4s;\n animation-duration: 0.4s;\n}\n.mb-modal.mb-in,\n.mb-modal.mb-out.mb-reverse {\n -webkit-animation-name: modalUp;\n animation-name: modalUp;\n}\n.mb-modal.mb-in.mb-reverse,\n.mb-modal.mb-out {\n z-index: 9; /* Lower than modal-in */\n -webkit-animation-name: modalDown;\n -webkit-transform: translate3d(0, 100%, 0);\n animation-name: modalDown;\n transform: translate3d(0, 100%, 0);\n}\n\n"} +{"text": "/*-\n * <<\n * task\n * ==\n * Copyright (C) 2019 - 2020 sia\n * ==\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * >>\n */\n\npackage com.sia.task.quartz.exception;\n\nimport com.sia.task.quartz.core.Scheduler;\n\n/**\n * Base class for exceptions thrown by the Quartz {@link Scheduler}.\n * \n *

\n * SchedulerExceptions may contain a reference to another\n * Exception, which was the underlying cause of the SchedulerException.\n *

\n *\n * @author @see Quartz\n * @data 2019-06-23 00:02\n * @version V1.0.0\n **/\npublic class SchedulerException extends Exception {\n \n private static final long serialVersionUID = 174841398690789156L;\n\n public SchedulerException() {\n super();\n }\n\n public SchedulerException(String msg) {\n super(msg);\n }\n\n public SchedulerException(Throwable cause) {\n super(cause);\n }\n\n public SchedulerException(String msg, Throwable cause) {\n super(msg, cause);\n }\n\n /**\n *

\n * Return the exception that is the underlying cause of this exception.\n *

\n * \n *

\n * This may be used to find more detail about the cause of the error.\n *

\n * \n * @return the underlying exception, or null if there is not\n * one.\n */\n public Throwable getUnderlyingException() {\n return super.getCause();\n }\n\n @Override\n public String toString() {\n Throwable cause = getUnderlyingException(); \n if (cause == null || cause == this) {\n return super.toString();\n } else {\n return super.toString() + \" [See nested exception: \" + cause + \"]\";\n }\n }\n\n\n}\n"} +{"text": "/*\n * Device Mapper Uevent Support (dm-uevent)\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the\n * Free Software Foundation; either version 2 of the License, or (at your\n * option) any later version.\n *\n * This program is distributed in the hope that it will be useful, but\n * WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n *\n * Copyright IBM Corporation, 2007\n * \tAuthor: Mike Anderson \n */\n#include \n#include \n#include \n#include \n#include \n\n#include \"dm.h\"\n#include \"dm-uevent.h\"\n\n#define DM_MSG_PREFIX \"uevent\"\n\nstatic const struct {\n\tenum dm_uevent_type type;\n\tenum kobject_action action;\n\tchar *name;\n} _dm_uevent_type_names[] = {\n\t{DM_UEVENT_PATH_FAILED, KOBJ_CHANGE, \"PATH_FAILED\"},\n\t{DM_UEVENT_PATH_REINSTATED, KOBJ_CHANGE, \"PATH_REINSTATED\"},\n};\n\nstatic struct kmem_cache *_dm_event_cache;\n\nstruct dm_uevent {\n\tstruct mapped_device *md;\n\tenum kobject_action action;\n\tstruct kobj_uevent_env ku_env;\n\tstruct list_head elist;\n\tchar name[DM_NAME_LEN];\n\tchar uuid[DM_UUID_LEN];\n};\n\nstatic void dm_uevent_free(struct dm_uevent *event)\n{\n\tkmem_cache_free(_dm_event_cache, event);\n}\n\nstatic struct dm_uevent *dm_uevent_alloc(struct mapped_device *md)\n{\n\tstruct dm_uevent *event;\n\n\tevent = kmem_cache_zalloc(_dm_event_cache, GFP_ATOMIC);\n\tif (!event)\n\t\treturn NULL;\n\n\tINIT_LIST_HEAD(&event->elist);\n\tevent->md = md;\n\n\treturn event;\n}\n\nstatic struct dm_uevent *dm_build_path_uevent(struct mapped_device *md,\n\t\t\t\t\t struct dm_target *ti,\n\t\t\t\t\t enum kobject_action action,\n\t\t\t\t\t const char *dm_action,\n\t\t\t\t\t const char *path,\n\t\t\t\t\t unsigned nr_valid_paths)\n{\n\tstruct dm_uevent *event;\n\n\tevent = dm_uevent_alloc(md);\n\tif (!event) {\n\t\tDMERR(\"%s: dm_uevent_alloc() failed\", __func__);\n\t\tgoto err_nomem;\n\t}\n\n\tevent->action = action;\n\n\tif (add_uevent_var(&event->ku_env, \"DM_TARGET=%s\", ti->type->name)) {\n\t\tDMERR(\"%s: add_uevent_var() for DM_TARGET failed\",\n\t\t __func__);\n\t\tgoto err_add;\n\t}\n\n\tif (add_uevent_var(&event->ku_env, \"DM_ACTION=%s\", dm_action)) {\n\t\tDMERR(\"%s: add_uevent_var() for DM_ACTION failed\",\n\t\t __func__);\n\t\tgoto err_add;\n\t}\n\n\tif (add_uevent_var(&event->ku_env, \"DM_SEQNUM=%u\",\n\t\t\t dm_next_uevent_seq(md))) {\n\t\tDMERR(\"%s: add_uevent_var() for DM_SEQNUM failed\",\n\t\t __func__);\n\t\tgoto err_add;\n\t}\n\n\tif (add_uevent_var(&event->ku_env, \"DM_PATH=%s\", path)) {\n\t\tDMERR(\"%s: add_uevent_var() for DM_PATH failed\", __func__);\n\t\tgoto err_add;\n\t}\n\n\tif (add_uevent_var(&event->ku_env, \"DM_NR_VALID_PATHS=%d\",\n\t\t\t nr_valid_paths)) {\n\t\tDMERR(\"%s: add_uevent_var() for DM_NR_VALID_PATHS failed\",\n\t\t __func__);\n\t\tgoto err_add;\n\t}\n\n\treturn event;\n\nerr_add:\n\tdm_uevent_free(event);\nerr_nomem:\n\treturn ERR_PTR(-ENOMEM);\n}\n\n/**\n * dm_send_uevents - send uevents for given list\n *\n * @events:\tlist of events to send\n * @kobj:\tkobject generating event\n *\n */\nvoid dm_send_uevents(struct list_head *events, struct kobject *kobj)\n{\n\tint r;\n\tstruct dm_uevent *event, *next;\n\n\tlist_for_each_entry_safe(event, next, events, elist) {\n\t\tlist_del_init(&event->elist);\n\n\t\t/*\n\t\t * When a device is being removed this copy fails and we\n\t\t * discard these unsent events.\n\t\t */\n\t\tif (dm_copy_name_and_uuid(event->md, event->name,\n\t\t\t\t\t event->uuid)) {\n\t\t\tDMINFO(\"%s: skipping sending uevent for lost device\",\n\t\t\t __func__);\n\t\t\tgoto uevent_free;\n\t\t}\n\n\t\tif (add_uevent_var(&event->ku_env, \"DM_NAME=%s\", event->name)) {\n\t\t\tDMERR(\"%s: add_uevent_var() for DM_NAME failed\",\n\t\t\t __func__);\n\t\t\tgoto uevent_free;\n\t\t}\n\n\t\tif (add_uevent_var(&event->ku_env, \"DM_UUID=%s\", event->uuid)) {\n\t\t\tDMERR(\"%s: add_uevent_var() for DM_UUID failed\",\n\t\t\t __func__);\n\t\t\tgoto uevent_free;\n\t\t}\n\n\t\tr = kobject_uevent_env(kobj, event->action, event->ku_env.envp);\n\t\tif (r)\n\t\t\tDMERR(\"%s: kobject_uevent_env failed\", __func__);\nuevent_free:\n\t\tdm_uevent_free(event);\n\t}\n}\nEXPORT_SYMBOL_GPL(dm_send_uevents);\n\n/**\n * dm_path_uevent - called to create a new path event and queue it\n *\n * @event_type:\tpath event type enum\n * @ti:\t\t\tpointer to a dm_target\n * @path:\t\tstring containing pathname\n * @nr_valid_paths:\tnumber of valid paths remaining\n *\n */\nvoid dm_path_uevent(enum dm_uevent_type event_type, struct dm_target *ti,\n\t\t const char *path, unsigned nr_valid_paths)\n{\n\tstruct mapped_device *md = dm_table_get_md(ti->table);\n\tstruct dm_uevent *event;\n\n\tif (event_type >= ARRAY_SIZE(_dm_uevent_type_names)) {\n\t\tDMERR(\"%s: Invalid event_type %d\", __func__, event_type);\n\t\treturn;\n\t}\n\n\tevent = dm_build_path_uevent(md, ti,\n\t\t\t\t _dm_uevent_type_names[event_type].action,\n\t\t\t\t _dm_uevent_type_names[event_type].name,\n\t\t\t\t path, nr_valid_paths);\n\tif (IS_ERR(event))\n\t\treturn;\n\n\tdm_uevent_add(md, &event->elist);\n}\nEXPORT_SYMBOL_GPL(dm_path_uevent);\n\nint dm_uevent_init(void)\n{\n\t_dm_event_cache = KMEM_CACHE(dm_uevent, 0);\n\tif (!_dm_event_cache)\n\t\treturn -ENOMEM;\n\n\tDMINFO(\"version 1.0.3\");\n\n\treturn 0;\n}\n\nvoid dm_uevent_exit(void)\n{\n\tkmem_cache_destroy(_dm_event_cache);\n}\n"} +{"text": "/* crypto/x509/x509_set.c */\n/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)\n * All rights reserved.\n *\n * This package is an SSL implementation written\n * by Eric Young (eay@cryptsoft.com).\n * The implementation was written so as to conform with Netscapes SSL.\n * \n * This library is free for commercial and non-commercial use as long as\n * the following conditions are aheared to. The following conditions\n * apply to all code found in this distribution, be it the RC4, RSA,\n * lhash, DES, etc., code; not just the SSL code. The SSL documentation\n * included with this distribution is covered by the same copyright terms\n * except that the holder is Tim Hudson (tjh@cryptsoft.com).\n * \n * Copyright remains Eric Young's, and as such any Copyright notices in\n * the code are not to be removed.\n * If this package is used in a product, Eric Young should be given attribution\n * as the author of the parts of the library used.\n * This can be in the form of a textual message at program startup or\n * in documentation (online or textual) provided with the package.\n * \n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n * must display the following acknowledgement:\n * \"This product includes cryptographic software written by\n * Eric Young (eay@cryptsoft.com)\"\n * The word 'cryptographic' can be left out if the rouines from the library\n * being used are not cryptographic related :-).\n * 4. If you include any Windows specific code (or a derivative thereof) from \n * the apps directory (application code) you must include an acknowledgement:\n * \"This product includes software written by Tim Hudson (tjh@cryptsoft.com)\"\n * \n * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n * \n * The licence and distribution terms for any publically available version or\n * derivative of this code cannot be changed. i.e. this code cannot simply be\n * copied and put under another distribution licence\n * [including the GNU Public Licence.]\n */\n\n#include \n#include \"cryptlib.h\"\n#include \n#include \n#include \n#include \n\nint X509_set_version(X509 *x, long version)\n\t{\n\tif (x == NULL) return(0);\n\tif (x->cert_info->version == NULL)\n\t\t{\n\t\tif ((x->cert_info->version=M_ASN1_INTEGER_new()) == NULL)\n\t\t\treturn(0);\n\t\t}\n\treturn(ASN1_INTEGER_set(x->cert_info->version,version));\n\t}\n\nint X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial)\n\t{\n\tASN1_INTEGER *in;\n\n\tif (x == NULL) return(0);\n\tin=x->cert_info->serialNumber;\n\tif (in != serial)\n\t\t{\n\t\tin=M_ASN1_INTEGER_dup(serial);\n\t\tif (in != NULL)\n\t\t\t{\n\t\t\tM_ASN1_INTEGER_free(x->cert_info->serialNumber);\n\t\t\tx->cert_info->serialNumber=in;\n\t\t\t}\n\t\t}\n\treturn(in != NULL);\n\t}\n\nint X509_set_issuer_name(X509 *x, X509_NAME *name)\n\t{\n\tif ((x == NULL) || (x->cert_info == NULL)) return(0);\n\treturn(X509_NAME_set(&x->cert_info->issuer,name));\n\t}\n\nint X509_set_subject_name(X509 *x, X509_NAME *name)\n\t{\n\tif ((x == NULL) || (x->cert_info == NULL)) return(0);\n\treturn(X509_NAME_set(&x->cert_info->subject,name));\n\t}\n\nint X509_set_notBefore(X509 *x, const ASN1_TIME *tm)\n\t{\n\tASN1_TIME *in;\n\n\tif ((x == NULL) || (x->cert_info->validity == NULL)) return(0);\n\tin=x->cert_info->validity->notBefore;\n\tif (in != tm)\n\t\t{\n\t\tin=M_ASN1_TIME_dup(tm);\n\t\tif (in != NULL)\n\t\t\t{\n\t\t\tM_ASN1_TIME_free(x->cert_info->validity->notBefore);\n\t\t\tx->cert_info->validity->notBefore=in;\n\t\t\t}\n\t\t}\n\treturn(in != NULL);\n\t}\n\nint X509_set_notAfter(X509 *x, const ASN1_TIME *tm)\n\t{\n\tASN1_TIME *in;\n\n\tif ((x == NULL) || (x->cert_info->validity == NULL)) return(0);\n\tin=x->cert_info->validity->notAfter;\n\tif (in != tm)\n\t\t{\n\t\tin=M_ASN1_TIME_dup(tm);\n\t\tif (in != NULL)\n\t\t\t{\n\t\t\tM_ASN1_TIME_free(x->cert_info->validity->notAfter);\n\t\t\tx->cert_info->validity->notAfter=in;\n\t\t\t}\n\t\t}\n\treturn(in != NULL);\n\t}\n\nint X509_set_pubkey(X509 *x, EVP_PKEY *pkey)\n\t{\n\tif ((x == NULL) || (x->cert_info == NULL)) return(0);\n\treturn(X509_PUBKEY_set(&(x->cert_info->key),pkey));\n\t}\n\n\n\n"} +{"text": "\n\n \n \n \n \n \n\n"} +{"text": "/* QLogic qed NIC Driver\n * Copyright (c) 2015-2017 QLogic Corporation\n *\n * This software is available to you under a choice of one of two\n * licenses. You may choose to be licensed under the terms of the GNU\n * General Public License (GPL) Version 2, available from the file\n * COPYING in the main directory of this source tree, or the\n * OpenIB.org BSD license below:\n *\n * Redistribution and use in source and binary forms, with or\n * without modification, are permitted provided that the following\n * conditions are met:\n *\n * - Redistributions of source code must retain the above\n * copyright notice, this list of conditions and the following\n * disclaimer.\n *\n * - Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and /or other materials\n * provided with the distribution.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \n#include \"qed.h\"\n#include \"qed_cxt.h\"\n#include \"qed_dev_api.h\"\n#include \"qed_hsi.h\"\n#include \"qed_hw.h\"\n#include \"qed_int.h\"\n#include \"qed_iscsi.h\"\n#include \"qed_ll2.h\"\n#include \"qed_mcp.h\"\n#include \"qed_sp.h\"\n#include \"qed_sriov.h\"\n#include \"qed_reg_addr.h\"\n\nstatic int\nqed_iscsi_async_event(struct qed_hwfn *p_hwfn,\n\t\t u8 fw_event_code,\n\t\t u16 echo, union event_ring_data *data, u8 fw_return_code)\n{\n\tif (p_hwfn->p_iscsi_info->event_cb) {\n\t\tstruct qed_iscsi_info *p_iscsi = p_hwfn->p_iscsi_info;\n\n\t\treturn p_iscsi->event_cb(p_iscsi->event_context,\n\t\t\t\t\t fw_event_code, data);\n\t} else {\n\t\tDP_NOTICE(p_hwfn, \"iSCSI async completion is not set\\n\");\n\t\treturn -EINVAL;\n\t}\n}\n\nstruct qed_iscsi_conn {\n\tstruct list_head list_entry;\n\tbool free_on_delete;\n\n\tu16 conn_id;\n\tu32 icid;\n\tu32 fw_cid;\n\n\tu8 layer_code;\n\tu8 offl_flags;\n\tu8 connect_mode;\n\tu32 initial_ack;\n\tdma_addr_t sq_pbl_addr;\n\tstruct qed_chain r2tq;\n\tstruct qed_chain xhq;\n\tstruct qed_chain uhq;\n\n\tstruct tcp_upload_params *tcp_upload_params_virt_addr;\n\tdma_addr_t tcp_upload_params_phys_addr;\n\tstruct scsi_terminate_extra_params *queue_cnts_virt_addr;\n\tdma_addr_t queue_cnts_phys_addr;\n\tdma_addr_t syn_phy_addr;\n\n\tu16 syn_ip_payload_length;\n\tu8 local_mac[6];\n\tu8 remote_mac[6];\n\tu16 vlan_id;\n\tu8 tcp_flags;\n\tu8 ip_version;\n\tu32 remote_ip[4];\n\tu32 local_ip[4];\n\tu8 ka_max_probe_cnt;\n\tu8 dup_ack_theshold;\n\tu32 rcv_next;\n\tu32 snd_una;\n\tu32 snd_next;\n\tu32 snd_max;\n\tu32 snd_wnd;\n\tu32 rcv_wnd;\n\tu32 snd_wl1;\n\tu32 cwnd;\n\tu32 ss_thresh;\n\tu16 srtt;\n\tu16 rtt_var;\n\tu32 ts_time;\n\tu32 ts_recent;\n\tu32 ts_recent_age;\n\tu32 total_rt;\n\tu32 ka_timeout_delta;\n\tu32 rt_timeout_delta;\n\tu8 dup_ack_cnt;\n\tu8 snd_wnd_probe_cnt;\n\tu8 ka_probe_cnt;\n\tu8 rt_cnt;\n\tu32 flow_label;\n\tu32 ka_timeout;\n\tu32 ka_interval;\n\tu32 max_rt_time;\n\tu32 initial_rcv_wnd;\n\tu8 ttl;\n\tu8 tos_or_tc;\n\tu16 remote_port;\n\tu16 local_port;\n\tu16 mss;\n\tu8 snd_wnd_scale;\n\tu8 rcv_wnd_scale;\n\tu32 ts_ticks_per_second;\n\tu16 da_timeout_value;\n\tu8 ack_frequency;\n\n\tu8 update_flag;\n\tu8 default_cq;\n\tu32 max_seq_size;\n\tu32 max_recv_pdu_length;\n\tu32 max_send_pdu_length;\n\tu32 first_seq_length;\n\tu32 exp_stat_sn;\n\tu32 stat_sn;\n\tu16 physical_q0;\n\tu16 physical_q1;\n\tu8 abortive_dsconnect;\n};\n\nstatic int\nqed_sp_iscsi_func_start(struct qed_hwfn *p_hwfn,\n\t\t\tenum spq_mode comp_mode,\n\t\t\tstruct qed_spq_comp_cb *p_comp_addr,\n\t\t\tvoid *event_context, iscsi_event_cb_t async_event_cb)\n{\n\tstruct iscsi_init_ramrod_params *p_ramrod = NULL;\n\tstruct scsi_init_func_queues *p_queue = NULL;\n\tstruct qed_iscsi_pf_params *p_params = NULL;\n\tstruct iscsi_spe_func_init *p_init = NULL;\n\tstruct qed_spq_entry *p_ent = NULL;\n\tstruct qed_sp_init_data init_data;\n\tint rc = 0;\n\tu32 dval;\n\tu16 val;\n\tu8 i;\n\n\t/* Get SPQ entry */\n\tmemset(&init_data, 0, sizeof(init_data));\n\tinit_data.cid = qed_spq_get_cid(p_hwfn);\n\tinit_data.opaque_fid = p_hwfn->hw_info.opaque_fid;\n\tinit_data.comp_mode = comp_mode;\n\tinit_data.p_comp_data = p_comp_addr;\n\n\trc = qed_sp_init_request(p_hwfn, &p_ent,\n\t\t\t\t ISCSI_RAMROD_CMD_ID_INIT_FUNC,\n\t\t\t\t PROTOCOLID_ISCSI, &init_data);\n\tif (rc)\n\t\treturn rc;\n\n\tp_ramrod = &p_ent->ramrod.iscsi_init;\n\tp_init = &p_ramrod->iscsi_init_spe;\n\tp_params = &p_hwfn->pf_params.iscsi_pf_params;\n\tp_queue = &p_init->q_params;\n\n\t/* Sanity */\n\tif (p_params->num_queues > p_hwfn->hw_info.feat_num[QED_ISCSI_CQ]) {\n\t\tDP_ERR(p_hwfn,\n\t\t \"Cannot satisfy CQ amount. Queues requested %d, CQs available %d. Aborting function start\\n\",\n\t\t p_params->num_queues,\n\t\t p_hwfn->hw_info.feat_num[QED_ISCSI_CQ]);\n\t\treturn -EINVAL;\n\t}\n\n\tSET_FIELD(p_init->hdr.flags,\n\t\t ISCSI_SLOW_PATH_HDR_LAYER_CODE, ISCSI_SLOW_PATH_LAYER_CODE);\n\tp_init->hdr.op_code = ISCSI_RAMROD_CMD_ID_INIT_FUNC;\n\n\tval = p_params->half_way_close_timeout;\n\tp_init->half_way_close_timeout = cpu_to_le16(val);\n\tp_init->num_sq_pages_in_ring = p_params->num_sq_pages_in_ring;\n\tp_init->num_r2tq_pages_in_ring = p_params->num_r2tq_pages_in_ring;\n\tp_init->num_uhq_pages_in_ring = p_params->num_uhq_pages_in_ring;\n\tp_init->ooo_enable = p_params->ooo_enable;\n\tp_init->ll2_rx_queue_id = p_hwfn->hw_info.resc_start[QED_LL2_QUEUE] +\n\t\t\t\t p_params->ll2_ooo_queue_id;\n\tp_init->func_params.log_page_size = p_params->log_page_size;\n\tval = p_params->num_tasks;\n\tp_init->func_params.num_tasks = cpu_to_le16(val);\n\tp_init->debug_mode.flags = p_params->debug_mode;\n\n\tDMA_REGPAIR_LE(p_queue->glbl_q_params_addr,\n\t\t p_params->glbl_q_params_addr);\n\n\tval = p_params->cq_num_entries;\n\tp_queue->cq_num_entries = cpu_to_le16(val);\n\tval = p_params->cmdq_num_entries;\n\tp_queue->cmdq_num_entries = cpu_to_le16(val);\n\tp_queue->num_queues = p_params->num_queues;\n\tdval = (u8)p_hwfn->hw_info.resc_start[QED_CMDQS_CQS];\n\tp_queue->queue_relative_offset = (u8)dval;\n\tp_queue->cq_sb_pi = p_params->gl_rq_pi;\n\tp_queue->cmdq_sb_pi = p_params->gl_cmd_pi;\n\n\tfor (i = 0; i < p_params->num_queues; i++) {\n\t\tval = qed_get_igu_sb_id(p_hwfn, i);\n\t\tp_queue->cq_cmdq_sb_num_arr[i] = cpu_to_le16(val);\n\t}\n\n\tp_queue->bdq_resource_id = (u8)RESC_START(p_hwfn, QED_BDQ);\n\n\tDMA_REGPAIR_LE(p_queue->bdq_pbl_base_address[BDQ_ID_RQ],\n\t\t p_params->bdq_pbl_base_addr[BDQ_ID_RQ]);\n\tp_queue->bdq_pbl_num_entries[BDQ_ID_RQ] =\n\t p_params->bdq_pbl_num_entries[BDQ_ID_RQ];\n\tval = p_params->bdq_xoff_threshold[BDQ_ID_RQ];\n\tp_queue->bdq_xoff_threshold[BDQ_ID_RQ] = cpu_to_le16(val);\n\tval = p_params->bdq_xon_threshold[BDQ_ID_RQ];\n\tp_queue->bdq_xon_threshold[BDQ_ID_RQ] = cpu_to_le16(val);\n\n\tDMA_REGPAIR_LE(p_queue->bdq_pbl_base_address[BDQ_ID_IMM_DATA],\n\t\t p_params->bdq_pbl_base_addr[BDQ_ID_IMM_DATA]);\n\tp_queue->bdq_pbl_num_entries[BDQ_ID_IMM_DATA] =\n\t p_params->bdq_pbl_num_entries[BDQ_ID_IMM_DATA];\n\tval = p_params->bdq_xoff_threshold[BDQ_ID_IMM_DATA];\n\tp_queue->bdq_xoff_threshold[BDQ_ID_IMM_DATA] = cpu_to_le16(val);\n\tval = p_params->bdq_xon_threshold[BDQ_ID_IMM_DATA];\n\tp_queue->bdq_xon_threshold[BDQ_ID_IMM_DATA] = cpu_to_le16(val);\n\tval = p_params->rq_buffer_size;\n\tp_queue->rq_buffer_size = cpu_to_le16(val);\n\tif (p_params->is_target) {\n\t\tSET_FIELD(p_queue->q_validity,\n\t\t\t SCSI_INIT_FUNC_QUEUES_RQ_VALID, 1);\n\t\tif (p_queue->bdq_pbl_num_entries[BDQ_ID_IMM_DATA])\n\t\t\tSET_FIELD(p_queue->q_validity,\n\t\t\t\t SCSI_INIT_FUNC_QUEUES_IMM_DATA_VALID, 1);\n\t\tSET_FIELD(p_queue->q_validity,\n\t\t\t SCSI_INIT_FUNC_QUEUES_CMD_VALID, 1);\n\t} else {\n\t\tSET_FIELD(p_queue->q_validity,\n\t\t\t SCSI_INIT_FUNC_QUEUES_RQ_VALID, 1);\n\t}\n\tp_ramrod->tcp_init.two_msl_timer = cpu_to_le32(p_params->two_msl_timer);\n\tval = p_params->tx_sws_timer;\n\tp_ramrod->tcp_init.tx_sws_timer = cpu_to_le16(val);\n\tp_ramrod->tcp_init.maxfinrt = p_params->max_fin_rt;\n\n\tp_hwfn->p_iscsi_info->event_context = event_context;\n\tp_hwfn->p_iscsi_info->event_cb = async_event_cb;\n\n\tqed_spq_register_async_cb(p_hwfn, PROTOCOLID_ISCSI,\n\t\t\t\t qed_iscsi_async_event);\n\n\treturn qed_spq_post(p_hwfn, p_ent, NULL);\n}\n\nstatic int qed_sp_iscsi_conn_offload(struct qed_hwfn *p_hwfn,\n\t\t\t\t struct qed_iscsi_conn *p_conn,\n\t\t\t\t enum spq_mode comp_mode,\n\t\t\t\t struct qed_spq_comp_cb *p_comp_addr)\n{\n\tstruct iscsi_spe_conn_offload *p_ramrod = NULL;\n\tstruct tcp_offload_params_opt2 *p_tcp2 = NULL;\n\tstruct tcp_offload_params *p_tcp = NULL;\n\tstruct qed_spq_entry *p_ent = NULL;\n\tstruct qed_sp_init_data init_data;\n\tdma_addr_t r2tq_pbl_addr;\n\tdma_addr_t xhq_pbl_addr;\n\tdma_addr_t uhq_pbl_addr;\n\tu16 physical_q;\n\tint rc = 0;\n\tu32 dval;\n\tu16 wval;\n\tu8 i;\n\tu16 *p;\n\n\t/* Get SPQ entry */\n\tmemset(&init_data, 0, sizeof(init_data));\n\tinit_data.cid = p_conn->icid;\n\tinit_data.opaque_fid = p_hwfn->hw_info.opaque_fid;\n\tinit_data.comp_mode = comp_mode;\n\tinit_data.p_comp_data = p_comp_addr;\n\n\trc = qed_sp_init_request(p_hwfn, &p_ent,\n\t\t\t\t ISCSI_RAMROD_CMD_ID_OFFLOAD_CONN,\n\t\t\t\t PROTOCOLID_ISCSI, &init_data);\n\tif (rc)\n\t\treturn rc;\n\n\tp_ramrod = &p_ent->ramrod.iscsi_conn_offload;\n\n\t/* Transmission PQ is the first of the PF */\n\tphysical_q = qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_OFLD);\n\tp_conn->physical_q0 = cpu_to_le16(physical_q);\n\tp_ramrod->iscsi.physical_q0 = cpu_to_le16(physical_q);\n\n\t/* iSCSI Pure-ACK PQ */\n\tphysical_q = qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_ACK);\n\tp_conn->physical_q1 = cpu_to_le16(physical_q);\n\tp_ramrod->iscsi.physical_q1 = cpu_to_le16(physical_q);\n\n\tp_ramrod->hdr.op_code = ISCSI_RAMROD_CMD_ID_OFFLOAD_CONN;\n\tSET_FIELD(p_ramrod->hdr.flags, ISCSI_SLOW_PATH_HDR_LAYER_CODE,\n\t\t p_conn->layer_code);\n\n\tp_ramrod->conn_id = cpu_to_le16(p_conn->conn_id);\n\tp_ramrod->fw_cid = cpu_to_le32(p_conn->icid);\n\n\tDMA_REGPAIR_LE(p_ramrod->iscsi.sq_pbl_addr, p_conn->sq_pbl_addr);\n\n\tr2tq_pbl_addr = qed_chain_get_pbl_phys(&p_conn->r2tq);\n\tDMA_REGPAIR_LE(p_ramrod->iscsi.r2tq_pbl_addr, r2tq_pbl_addr);\n\n\txhq_pbl_addr = qed_chain_get_pbl_phys(&p_conn->xhq);\n\tDMA_REGPAIR_LE(p_ramrod->iscsi.xhq_pbl_addr, xhq_pbl_addr);\n\n\tuhq_pbl_addr = qed_chain_get_pbl_phys(&p_conn->uhq);\n\tDMA_REGPAIR_LE(p_ramrod->iscsi.uhq_pbl_addr, uhq_pbl_addr);\n\n\tp_ramrod->iscsi.initial_ack = cpu_to_le32(p_conn->initial_ack);\n\tp_ramrod->iscsi.flags = p_conn->offl_flags;\n\tp_ramrod->iscsi.default_cq = p_conn->default_cq;\n\tp_ramrod->iscsi.stat_sn = cpu_to_le32(p_conn->stat_sn);\n\n\tif (!GET_FIELD(p_ramrod->iscsi.flags,\n\t\t ISCSI_CONN_OFFLOAD_PARAMS_TCP_ON_CHIP_1B)) {\n\t\tp_tcp = &p_ramrod->tcp;\n\n\t\tp = (u16 *)p_conn->local_mac;\n\t\tp_tcp->local_mac_addr_hi = swab16(get_unaligned(p));\n\t\tp_tcp->local_mac_addr_mid = swab16(get_unaligned(p + 1));\n\t\tp_tcp->local_mac_addr_lo = swab16(get_unaligned(p + 2));\n\n\t\tp = (u16 *)p_conn->remote_mac;\n\t\tp_tcp->remote_mac_addr_hi = swab16(get_unaligned(p));\n\t\tp_tcp->remote_mac_addr_mid = swab16(get_unaligned(p + 1));\n\t\tp_tcp->remote_mac_addr_lo = swab16(get_unaligned(p + 2));\n\n\t\tp_tcp->vlan_id = cpu_to_le16(p_conn->vlan_id);\n\n\t\tp_tcp->flags = p_conn->tcp_flags;\n\t\tp_tcp->ip_version = p_conn->ip_version;\n\t\tfor (i = 0; i < 4; i++) {\n\t\t\tdval = p_conn->remote_ip[i];\n\t\t\tp_tcp->remote_ip[i] = cpu_to_le32(dval);\n\t\t\tdval = p_conn->local_ip[i];\n\t\t\tp_tcp->local_ip[i] = cpu_to_le32(dval);\n\t\t}\n\t\tp_tcp->ka_max_probe_cnt = p_conn->ka_max_probe_cnt;\n\t\tp_tcp->dup_ack_theshold = p_conn->dup_ack_theshold;\n\n\t\tp_tcp->rcv_next = cpu_to_le32(p_conn->rcv_next);\n\t\tp_tcp->snd_una = cpu_to_le32(p_conn->snd_una);\n\t\tp_tcp->snd_next = cpu_to_le32(p_conn->snd_next);\n\t\tp_tcp->snd_max = cpu_to_le32(p_conn->snd_max);\n\t\tp_tcp->snd_wnd = cpu_to_le32(p_conn->snd_wnd);\n\t\tp_tcp->rcv_wnd = cpu_to_le32(p_conn->rcv_wnd);\n\t\tp_tcp->snd_wl1 = cpu_to_le32(p_conn->snd_wl1);\n\t\tp_tcp->cwnd = cpu_to_le32(p_conn->cwnd);\n\t\tp_tcp->ss_thresh = cpu_to_le32(p_conn->ss_thresh);\n\t\tp_tcp->srtt = cpu_to_le16(p_conn->srtt);\n\t\tp_tcp->rtt_var = cpu_to_le16(p_conn->rtt_var);\n\t\tp_tcp->ts_recent = cpu_to_le32(p_conn->ts_recent);\n\t\tp_tcp->ts_recent_age = cpu_to_le32(p_conn->ts_recent_age);\n\t\tp_tcp->total_rt = cpu_to_le32(p_conn->total_rt);\n\t\tdval = p_conn->ka_timeout_delta;\n\t\tp_tcp->ka_timeout_delta = cpu_to_le32(dval);\n\t\tdval = p_conn->rt_timeout_delta;\n\t\tp_tcp->rt_timeout_delta = cpu_to_le32(dval);\n\t\tp_tcp->dup_ack_cnt = p_conn->dup_ack_cnt;\n\t\tp_tcp->snd_wnd_probe_cnt = p_conn->snd_wnd_probe_cnt;\n\t\tp_tcp->ka_probe_cnt = p_conn->ka_probe_cnt;\n\t\tp_tcp->rt_cnt = p_conn->rt_cnt;\n\t\tp_tcp->flow_label = cpu_to_le32(p_conn->flow_label);\n\t\tp_tcp->ka_timeout = cpu_to_le32(p_conn->ka_timeout);\n\t\tp_tcp->ka_interval = cpu_to_le32(p_conn->ka_interval);\n\t\tp_tcp->max_rt_time = cpu_to_le32(p_conn->max_rt_time);\n\t\tdval = p_conn->initial_rcv_wnd;\n\t\tp_tcp->initial_rcv_wnd = cpu_to_le32(dval);\n\t\tp_tcp->ttl = p_conn->ttl;\n\t\tp_tcp->tos_or_tc = p_conn->tos_or_tc;\n\t\tp_tcp->remote_port = cpu_to_le16(p_conn->remote_port);\n\t\tp_tcp->local_port = cpu_to_le16(p_conn->local_port);\n\t\tp_tcp->mss = cpu_to_le16(p_conn->mss);\n\t\tp_tcp->snd_wnd_scale = p_conn->snd_wnd_scale;\n\t\tp_tcp->rcv_wnd_scale = p_conn->rcv_wnd_scale;\n\t\twval = p_conn->da_timeout_value;\n\t\tp_tcp->da_timeout_value = cpu_to_le16(wval);\n\t\tp_tcp->ack_frequency = p_conn->ack_frequency;\n\t\tp_tcp->connect_mode = p_conn->connect_mode;\n\t} else {\n\t\tp_tcp2 =\n\t\t &((struct iscsi_spe_conn_offload_option2 *)p_ramrod)->tcp;\n\n\t\tp = (u16 *)p_conn->local_mac;\n\t\tp_tcp2->local_mac_addr_hi = swab16(get_unaligned(p));\n\t\tp_tcp2->local_mac_addr_mid = swab16(get_unaligned(p + 1));\n\t\tp_tcp2->local_mac_addr_lo = swab16(get_unaligned(p + 2));\n\n\t\tp = (u16 *)p_conn->remote_mac;\n\t\tp_tcp2->remote_mac_addr_hi = swab16(get_unaligned(p));\n\t\tp_tcp2->remote_mac_addr_mid = swab16(get_unaligned(p + 1));\n\t\tp_tcp2->remote_mac_addr_lo = swab16(get_unaligned(p + 2));\n\n\t\tp_tcp2->vlan_id = cpu_to_le16(p_conn->vlan_id);\n\t\tp_tcp2->flags = p_conn->tcp_flags;\n\n\t\tp_tcp2->ip_version = p_conn->ip_version;\n\t\tfor (i = 0; i < 4; i++) {\n\t\t\tdval = p_conn->remote_ip[i];\n\t\t\tp_tcp2->remote_ip[i] = cpu_to_le32(dval);\n\t\t\tdval = p_conn->local_ip[i];\n\t\t\tp_tcp2->local_ip[i] = cpu_to_le32(dval);\n\t\t}\n\n\t\tp_tcp2->flow_label = cpu_to_le32(p_conn->flow_label);\n\t\tp_tcp2->ttl = p_conn->ttl;\n\t\tp_tcp2->tos_or_tc = p_conn->tos_or_tc;\n\t\tp_tcp2->remote_port = cpu_to_le16(p_conn->remote_port);\n\t\tp_tcp2->local_port = cpu_to_le16(p_conn->local_port);\n\t\tp_tcp2->mss = cpu_to_le16(p_conn->mss);\n\t\tp_tcp2->rcv_wnd_scale = p_conn->rcv_wnd_scale;\n\t\tp_tcp2->connect_mode = p_conn->connect_mode;\n\t\twval = p_conn->syn_ip_payload_length;\n\t\tp_tcp2->syn_ip_payload_length = cpu_to_le16(wval);\n\t\tp_tcp2->syn_phy_addr_lo = DMA_LO_LE(p_conn->syn_phy_addr);\n\t\tp_tcp2->syn_phy_addr_hi = DMA_HI_LE(p_conn->syn_phy_addr);\n\t}\n\n\treturn qed_spq_post(p_hwfn, p_ent, NULL);\n}\n\nstatic int qed_sp_iscsi_conn_update(struct qed_hwfn *p_hwfn,\n\t\t\t\t struct qed_iscsi_conn *p_conn,\n\t\t\t\t enum spq_mode comp_mode,\n\t\t\t\t struct qed_spq_comp_cb *p_comp_addr)\n{\n\tstruct iscsi_conn_update_ramrod_params *p_ramrod = NULL;\n\tstruct qed_spq_entry *p_ent = NULL;\n\tstruct qed_sp_init_data init_data;\n\tint rc = -EINVAL;\n\tu32 dval;\n\n\t/* Get SPQ entry */\n\tmemset(&init_data, 0, sizeof(init_data));\n\tinit_data.cid = p_conn->icid;\n\tinit_data.opaque_fid = p_hwfn->hw_info.opaque_fid;\n\tinit_data.comp_mode = comp_mode;\n\tinit_data.p_comp_data = p_comp_addr;\n\n\trc = qed_sp_init_request(p_hwfn, &p_ent,\n\t\t\t\t ISCSI_RAMROD_CMD_ID_UPDATE_CONN,\n\t\t\t\t PROTOCOLID_ISCSI, &init_data);\n\tif (rc)\n\t\treturn rc;\n\n\tp_ramrod = &p_ent->ramrod.iscsi_conn_update;\n\tp_ramrod->hdr.op_code = ISCSI_RAMROD_CMD_ID_UPDATE_CONN;\n\tSET_FIELD(p_ramrod->hdr.flags,\n\t\t ISCSI_SLOW_PATH_HDR_LAYER_CODE, p_conn->layer_code);\n\n\tp_ramrod->conn_id = cpu_to_le16(p_conn->conn_id);\n\tp_ramrod->fw_cid = cpu_to_le32(p_conn->icid);\n\tp_ramrod->flags = p_conn->update_flag;\n\tp_ramrod->max_seq_size = cpu_to_le32(p_conn->max_seq_size);\n\tdval = p_conn->max_recv_pdu_length;\n\tp_ramrod->max_recv_pdu_length = cpu_to_le32(dval);\n\tdval = p_conn->max_send_pdu_length;\n\tp_ramrod->max_send_pdu_length = cpu_to_le32(dval);\n\tdval = p_conn->first_seq_length;\n\tp_ramrod->first_seq_length = cpu_to_le32(dval);\n\tp_ramrod->exp_stat_sn = cpu_to_le32(p_conn->exp_stat_sn);\n\n\treturn qed_spq_post(p_hwfn, p_ent, NULL);\n}\n\nstatic int\nqed_sp_iscsi_mac_update(struct qed_hwfn *p_hwfn,\n\t\t\tstruct qed_iscsi_conn *p_conn,\n\t\t\tenum spq_mode comp_mode,\n\t\t\tstruct qed_spq_comp_cb *p_comp_addr)\n{\n\tstruct iscsi_spe_conn_mac_update *p_ramrod = NULL;\n\tstruct qed_spq_entry *p_ent = NULL;\n\tstruct qed_sp_init_data init_data;\n\tint rc = -EINVAL;\n\tu8 ucval;\n\n\t/* Get SPQ entry */\n\tmemset(&init_data, 0, sizeof(init_data));\n\tinit_data.cid = p_conn->icid;\n\tinit_data.opaque_fid = p_hwfn->hw_info.opaque_fid;\n\tinit_data.comp_mode = comp_mode;\n\tinit_data.p_comp_data = p_comp_addr;\n\n\trc = qed_sp_init_request(p_hwfn, &p_ent,\n\t\t\t\t ISCSI_RAMROD_CMD_ID_MAC_UPDATE,\n\t\t\t\t PROTOCOLID_ISCSI, &init_data);\n\tif (rc)\n\t\treturn rc;\n\n\tp_ramrod = &p_ent->ramrod.iscsi_conn_mac_update;\n\tp_ramrod->hdr.op_code = ISCSI_RAMROD_CMD_ID_MAC_UPDATE;\n\tSET_FIELD(p_ramrod->hdr.flags,\n\t\t ISCSI_SLOW_PATH_HDR_LAYER_CODE, p_conn->layer_code);\n\n\tp_ramrod->conn_id = cpu_to_le16(p_conn->conn_id);\n\tp_ramrod->fw_cid = cpu_to_le32(p_conn->icid);\n\tucval = p_conn->remote_mac[1];\n\t((u8 *)(&p_ramrod->remote_mac_addr_hi))[0] = ucval;\n\tucval = p_conn->remote_mac[0];\n\t((u8 *)(&p_ramrod->remote_mac_addr_hi))[1] = ucval;\n\tucval = p_conn->remote_mac[3];\n\t((u8 *)(&p_ramrod->remote_mac_addr_mid))[0] = ucval;\n\tucval = p_conn->remote_mac[2];\n\t((u8 *)(&p_ramrod->remote_mac_addr_mid))[1] = ucval;\n\tucval = p_conn->remote_mac[5];\n\t((u8 *)(&p_ramrod->remote_mac_addr_lo))[0] = ucval;\n\tucval = p_conn->remote_mac[4];\n\t((u8 *)(&p_ramrod->remote_mac_addr_lo))[1] = ucval;\n\n\treturn qed_spq_post(p_hwfn, p_ent, NULL);\n}\n\nstatic int qed_sp_iscsi_conn_terminate(struct qed_hwfn *p_hwfn,\n\t\t\t\t struct qed_iscsi_conn *p_conn,\n\t\t\t\t enum spq_mode comp_mode,\n\t\t\t\t struct qed_spq_comp_cb *p_comp_addr)\n{\n\tstruct iscsi_spe_conn_termination *p_ramrod = NULL;\n\tstruct qed_spq_entry *p_ent = NULL;\n\tstruct qed_sp_init_data init_data;\n\tint rc = -EINVAL;\n\n\t/* Get SPQ entry */\n\tmemset(&init_data, 0, sizeof(init_data));\n\tinit_data.cid = p_conn->icid;\n\tinit_data.opaque_fid = p_hwfn->hw_info.opaque_fid;\n\tinit_data.comp_mode = comp_mode;\n\tinit_data.p_comp_data = p_comp_addr;\n\n\trc = qed_sp_init_request(p_hwfn, &p_ent,\n\t\t\t\t ISCSI_RAMROD_CMD_ID_TERMINATION_CONN,\n\t\t\t\t PROTOCOLID_ISCSI, &init_data);\n\tif (rc)\n\t\treturn rc;\n\n\tp_ramrod = &p_ent->ramrod.iscsi_conn_terminate;\n\tp_ramrod->hdr.op_code = ISCSI_RAMROD_CMD_ID_TERMINATION_CONN;\n\tSET_FIELD(p_ramrod->hdr.flags,\n\t\t ISCSI_SLOW_PATH_HDR_LAYER_CODE, p_conn->layer_code);\n\n\tp_ramrod->conn_id = cpu_to_le16(p_conn->conn_id);\n\tp_ramrod->fw_cid = cpu_to_le32(p_conn->icid);\n\tp_ramrod->abortive = p_conn->abortive_dsconnect;\n\n\tDMA_REGPAIR_LE(p_ramrod->query_params_addr,\n\t\t p_conn->tcp_upload_params_phys_addr);\n\tDMA_REGPAIR_LE(p_ramrod->queue_cnts_addr, p_conn->queue_cnts_phys_addr);\n\n\treturn qed_spq_post(p_hwfn, p_ent, NULL);\n}\n\nstatic int qed_sp_iscsi_conn_clear_sq(struct qed_hwfn *p_hwfn,\n\t\t\t\t struct qed_iscsi_conn *p_conn,\n\t\t\t\t enum spq_mode comp_mode,\n\t\t\t\t struct qed_spq_comp_cb *p_comp_addr)\n{\n\tstruct iscsi_slow_path_hdr *p_ramrod = NULL;\n\tstruct qed_spq_entry *p_ent = NULL;\n\tstruct qed_sp_init_data init_data;\n\tint rc = -EINVAL;\n\n\t/* Get SPQ entry */\n\tmemset(&init_data, 0, sizeof(init_data));\n\tinit_data.cid = p_conn->icid;\n\tinit_data.opaque_fid = p_hwfn->hw_info.opaque_fid;\n\tinit_data.comp_mode = comp_mode;\n\tinit_data.p_comp_data = p_comp_addr;\n\n\trc = qed_sp_init_request(p_hwfn, &p_ent,\n\t\t\t\t ISCSI_RAMROD_CMD_ID_CLEAR_SQ,\n\t\t\t\t PROTOCOLID_ISCSI, &init_data);\n\tif (rc)\n\t\treturn rc;\n\n\tp_ramrod = &p_ent->ramrod.iscsi_empty;\n\tp_ramrod->op_code = ISCSI_RAMROD_CMD_ID_CLEAR_SQ;\n\tSET_FIELD(p_ramrod->flags,\n\t\t ISCSI_SLOW_PATH_HDR_LAYER_CODE, p_conn->layer_code);\n\n\treturn qed_spq_post(p_hwfn, p_ent, NULL);\n}\n\nstatic int qed_sp_iscsi_func_stop(struct qed_hwfn *p_hwfn,\n\t\t\t\t enum spq_mode comp_mode,\n\t\t\t\t struct qed_spq_comp_cb *p_comp_addr)\n{\n\tstruct iscsi_spe_func_dstry *p_ramrod = NULL;\n\tstruct qed_spq_entry *p_ent = NULL;\n\tstruct qed_sp_init_data init_data;\n\tint rc = 0;\n\n\t/* Get SPQ entry */\n\tmemset(&init_data, 0, sizeof(init_data));\n\tinit_data.cid = qed_spq_get_cid(p_hwfn);\n\tinit_data.opaque_fid = p_hwfn->hw_info.opaque_fid;\n\tinit_data.comp_mode = comp_mode;\n\tinit_data.p_comp_data = p_comp_addr;\n\n\trc = qed_sp_init_request(p_hwfn, &p_ent,\n\t\t\t\t ISCSI_RAMROD_CMD_ID_DESTROY_FUNC,\n\t\t\t\t PROTOCOLID_ISCSI, &init_data);\n\tif (rc)\n\t\treturn rc;\n\n\tp_ramrod = &p_ent->ramrod.iscsi_destroy;\n\tp_ramrod->hdr.op_code = ISCSI_RAMROD_CMD_ID_DESTROY_FUNC;\n\n\trc = qed_spq_post(p_hwfn, p_ent, NULL);\n\n\tqed_spq_unregister_async_cb(p_hwfn, PROTOCOLID_ISCSI);\n\treturn rc;\n}\n\nstatic void __iomem *qed_iscsi_get_db_addr(struct qed_hwfn *p_hwfn, u32 cid)\n{\n\treturn (u8 __iomem *)p_hwfn->doorbells +\n\t\t\t qed_db_addr(cid, DQ_DEMS_LEGACY);\n}\n\nstatic void __iomem *qed_iscsi_get_primary_bdq_prod(struct qed_hwfn *p_hwfn,\n\t\t\t\t\t\t u8 bdq_id)\n{\n\tif (RESC_NUM(p_hwfn, QED_BDQ)) {\n\t\treturn (u8 __iomem *)p_hwfn->regview +\n\t\t GTT_BAR0_MAP_REG_MSDM_RAM +\n\t\t MSTORM_SCSI_BDQ_EXT_PROD_OFFSET(RESC_START(p_hwfn,\n\t\t\t\t\t\t\t\t QED_BDQ),\n\t\t\t\t\t\t bdq_id);\n\t} else {\n\t\tDP_NOTICE(p_hwfn, \"BDQ is not allocated!\\n\");\n\t\treturn NULL;\n\t}\n}\n\nstatic void __iomem *qed_iscsi_get_secondary_bdq_prod(struct qed_hwfn *p_hwfn,\n\t\t\t\t\t\t u8 bdq_id)\n{\n\tif (RESC_NUM(p_hwfn, QED_BDQ)) {\n\t\treturn (u8 __iomem *)p_hwfn->regview +\n\t\t GTT_BAR0_MAP_REG_TSDM_RAM +\n\t\t TSTORM_SCSI_BDQ_EXT_PROD_OFFSET(RESC_START(p_hwfn,\n\t\t\t\t\t\t\t\t QED_BDQ),\n\t\t\t\t\t\t bdq_id);\n\t} else {\n\t\tDP_NOTICE(p_hwfn, \"BDQ is not allocated!\\n\");\n\t\treturn NULL;\n\t}\n}\n\nstatic int qed_iscsi_setup_connection(struct qed_hwfn *p_hwfn,\n\t\t\t\t struct qed_iscsi_conn *p_conn)\n{\n\tif (!p_conn->queue_cnts_virt_addr)\n\t\tgoto nomem;\n\tmemset(p_conn->queue_cnts_virt_addr, 0,\n\t sizeof(*p_conn->queue_cnts_virt_addr));\n\n\tif (!p_conn->tcp_upload_params_virt_addr)\n\t\tgoto nomem;\n\tmemset(p_conn->tcp_upload_params_virt_addr, 0,\n\t sizeof(*p_conn->tcp_upload_params_virt_addr));\n\n\tif (!p_conn->r2tq.p_virt_addr)\n\t\tgoto nomem;\n\tqed_chain_pbl_zero_mem(&p_conn->r2tq);\n\n\tif (!p_conn->uhq.p_virt_addr)\n\t\tgoto nomem;\n\tqed_chain_pbl_zero_mem(&p_conn->uhq);\n\n\tif (!p_conn->xhq.p_virt_addr)\n\t\tgoto nomem;\n\tqed_chain_pbl_zero_mem(&p_conn->xhq);\n\n\treturn 0;\nnomem:\n\treturn -ENOMEM;\n}\n\nstatic int qed_iscsi_allocate_connection(struct qed_hwfn *p_hwfn,\n\t\t\t\t\t struct qed_iscsi_conn **p_out_conn)\n{\n\tu16 uhq_num_elements = 0, xhq_num_elements = 0, r2tq_num_elements = 0;\n\tstruct scsi_terminate_extra_params *p_q_cnts = NULL;\n\tstruct qed_iscsi_pf_params *p_params = NULL;\n\tstruct tcp_upload_params *p_tcp = NULL;\n\tstruct qed_iscsi_conn *p_conn = NULL;\n\tint rc = 0;\n\n\t/* Try finding a free connection that can be used */\n\tspin_lock_bh(&p_hwfn->p_iscsi_info->lock);\n\tif (!list_empty(&p_hwfn->p_iscsi_info->free_list))\n\t\tp_conn = list_first_entry(&p_hwfn->p_iscsi_info->free_list,\n\t\t\t\t\t struct qed_iscsi_conn, list_entry);\n\tif (p_conn) {\n\t\tlist_del(&p_conn->list_entry);\n\t\tspin_unlock_bh(&p_hwfn->p_iscsi_info->lock);\n\t\t*p_out_conn = p_conn;\n\t\treturn 0;\n\t}\n\tspin_unlock_bh(&p_hwfn->p_iscsi_info->lock);\n\n\t/* Need to allocate a new connection */\n\tp_params = &p_hwfn->pf_params.iscsi_pf_params;\n\n\tp_conn = kzalloc(sizeof(*p_conn), GFP_KERNEL);\n\tif (!p_conn)\n\t\treturn -ENOMEM;\n\n\tp_q_cnts = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,\n\t\t\t\t sizeof(*p_q_cnts),\n\t\t\t\t &p_conn->queue_cnts_phys_addr,\n\t\t\t\t GFP_KERNEL);\n\tif (!p_q_cnts)\n\t\tgoto nomem_queue_cnts_param;\n\tp_conn->queue_cnts_virt_addr = p_q_cnts;\n\n\tp_tcp = dma_alloc_coherent(&p_hwfn->cdev->pdev->dev,\n\t\t\t\t sizeof(*p_tcp),\n\t\t\t\t &p_conn->tcp_upload_params_phys_addr,\n\t\t\t\t GFP_KERNEL);\n\tif (!p_tcp)\n\t\tgoto nomem_upload_param;\n\tp_conn->tcp_upload_params_virt_addr = p_tcp;\n\n\tr2tq_num_elements = p_params->num_r2tq_pages_in_ring *\n\t\t\t QED_CHAIN_PAGE_SIZE / 0x80;\n\trc = qed_chain_alloc(p_hwfn->cdev,\n\t\t\t QED_CHAIN_USE_TO_CONSUME_PRODUCE,\n\t\t\t QED_CHAIN_MODE_PBL,\n\t\t\t QED_CHAIN_CNT_TYPE_U16,\n\t\t\t r2tq_num_elements, 0x80, &p_conn->r2tq, NULL);\n\tif (rc)\n\t\tgoto nomem_r2tq;\n\n\tuhq_num_elements = p_params->num_uhq_pages_in_ring *\n\t\t\t QED_CHAIN_PAGE_SIZE / sizeof(struct iscsi_uhqe);\n\trc = qed_chain_alloc(p_hwfn->cdev,\n\t\t\t QED_CHAIN_USE_TO_CONSUME_PRODUCE,\n\t\t\t QED_CHAIN_MODE_PBL,\n\t\t\t QED_CHAIN_CNT_TYPE_U16,\n\t\t\t uhq_num_elements,\n\t\t\t sizeof(struct iscsi_uhqe), &p_conn->uhq, NULL);\n\tif (rc)\n\t\tgoto nomem_uhq;\n\n\txhq_num_elements = uhq_num_elements;\n\trc = qed_chain_alloc(p_hwfn->cdev,\n\t\t\t QED_CHAIN_USE_TO_CONSUME_PRODUCE,\n\t\t\t QED_CHAIN_MODE_PBL,\n\t\t\t QED_CHAIN_CNT_TYPE_U16,\n\t\t\t xhq_num_elements,\n\t\t\t sizeof(struct iscsi_xhqe), &p_conn->xhq, NULL);\n\tif (rc)\n\t\tgoto nomem;\n\n\tp_conn->free_on_delete = true;\n\t*p_out_conn = p_conn;\n\treturn 0;\n\nnomem:\n\tqed_chain_free(p_hwfn->cdev, &p_conn->uhq);\nnomem_uhq:\n\tqed_chain_free(p_hwfn->cdev, &p_conn->r2tq);\nnomem_r2tq:\n\tdma_free_coherent(&p_hwfn->cdev->pdev->dev,\n\t\t\t sizeof(struct tcp_upload_params),\n\t\t\t p_conn->tcp_upload_params_virt_addr,\n\t\t\t p_conn->tcp_upload_params_phys_addr);\nnomem_upload_param:\n\tdma_free_coherent(&p_hwfn->cdev->pdev->dev,\n\t\t\t sizeof(struct scsi_terminate_extra_params),\n\t\t\t p_conn->queue_cnts_virt_addr,\n\t\t\t p_conn->queue_cnts_phys_addr);\nnomem_queue_cnts_param:\n\tkfree(p_conn);\n\n\treturn -ENOMEM;\n}\n\nstatic int qed_iscsi_acquire_connection(struct qed_hwfn *p_hwfn,\n\t\t\t\t\tstruct qed_iscsi_conn *p_in_conn,\n\t\t\t\t\tstruct qed_iscsi_conn **p_out_conn)\n{\n\tstruct qed_iscsi_conn *p_conn = NULL;\n\tint rc = 0;\n\tu32 icid;\n\n\tspin_lock_bh(&p_hwfn->p_iscsi_info->lock);\n\trc = qed_cxt_acquire_cid(p_hwfn, PROTOCOLID_ISCSI, &icid);\n\tspin_unlock_bh(&p_hwfn->p_iscsi_info->lock);\n\tif (rc)\n\t\treturn rc;\n\n\t/* Use input connection or allocate a new one */\n\tif (p_in_conn)\n\t\tp_conn = p_in_conn;\n\telse\n\t\trc = qed_iscsi_allocate_connection(p_hwfn, &p_conn);\n\n\tif (!rc)\n\t\trc = qed_iscsi_setup_connection(p_hwfn, p_conn);\n\n\tif (rc) {\n\t\tspin_lock_bh(&p_hwfn->p_iscsi_info->lock);\n\t\tqed_cxt_release_cid(p_hwfn, icid);\n\t\tspin_unlock_bh(&p_hwfn->p_iscsi_info->lock);\n\t\treturn rc;\n\t}\n\n\tp_conn->icid = icid;\n\tp_conn->conn_id = (u16)icid;\n\tp_conn->fw_cid = (p_hwfn->hw_info.opaque_fid << 16) | icid;\n\n\t*p_out_conn = p_conn;\n\n\treturn rc;\n}\n\nstatic void qed_iscsi_release_connection(struct qed_hwfn *p_hwfn,\n\t\t\t\t\t struct qed_iscsi_conn *p_conn)\n{\n\tspin_lock_bh(&p_hwfn->p_iscsi_info->lock);\n\tlist_add_tail(&p_conn->list_entry, &p_hwfn->p_iscsi_info->free_list);\n\tqed_cxt_release_cid(p_hwfn, p_conn->icid);\n\tspin_unlock_bh(&p_hwfn->p_iscsi_info->lock);\n}\n\nvoid qed_iscsi_free_connection(struct qed_hwfn *p_hwfn,\n\t\t\t struct qed_iscsi_conn *p_conn)\n{\n\tqed_chain_free(p_hwfn->cdev, &p_conn->xhq);\n\tqed_chain_free(p_hwfn->cdev, &p_conn->uhq);\n\tqed_chain_free(p_hwfn->cdev, &p_conn->r2tq);\n\tdma_free_coherent(&p_hwfn->cdev->pdev->dev,\n\t\t\t sizeof(struct tcp_upload_params),\n\t\t\t p_conn->tcp_upload_params_virt_addr,\n\t\t\t p_conn->tcp_upload_params_phys_addr);\n\tdma_free_coherent(&p_hwfn->cdev->pdev->dev,\n\t\t\t sizeof(struct scsi_terminate_extra_params),\n\t\t\t p_conn->queue_cnts_virt_addr,\n\t\t\t p_conn->queue_cnts_phys_addr);\n\tkfree(p_conn);\n}\n\nint qed_iscsi_alloc(struct qed_hwfn *p_hwfn)\n{\n\tstruct qed_iscsi_info *p_iscsi_info;\n\n\tp_iscsi_info = kzalloc(sizeof(*p_iscsi_info), GFP_KERNEL);\n\tif (!p_iscsi_info)\n\t\treturn -ENOMEM;\n\n\tINIT_LIST_HEAD(&p_iscsi_info->free_list);\n\n\tp_hwfn->p_iscsi_info = p_iscsi_info;\n\treturn 0;\n}\n\nvoid qed_iscsi_setup(struct qed_hwfn *p_hwfn)\n{\n\tspin_lock_init(&p_hwfn->p_iscsi_info->lock);\n}\n\nvoid qed_iscsi_free(struct qed_hwfn *p_hwfn)\n{\n\tstruct qed_iscsi_conn *p_conn = NULL;\n\n\tif (!p_hwfn->p_iscsi_info)\n\t\treturn;\n\n\twhile (!list_empty(&p_hwfn->p_iscsi_info->free_list)) {\n\t\tp_conn = list_first_entry(&p_hwfn->p_iscsi_info->free_list,\n\t\t\t\t\t struct qed_iscsi_conn, list_entry);\n\t\tif (p_conn) {\n\t\t\tlist_del(&p_conn->list_entry);\n\t\t\tqed_iscsi_free_connection(p_hwfn, p_conn);\n\t\t}\n\t}\n\n\tkfree(p_hwfn->p_iscsi_info);\n\tp_hwfn->p_iscsi_info = NULL;\n}\n\nstatic void _qed_iscsi_get_tstats(struct qed_hwfn *p_hwfn,\n\t\t\t\t struct qed_ptt *p_ptt,\n\t\t\t\t struct qed_iscsi_stats *p_stats)\n{\n\tstruct tstorm_iscsi_stats_drv tstats;\n\tu32 tstats_addr;\n\n\tmemset(&tstats, 0, sizeof(tstats));\n\ttstats_addr = BAR0_MAP_REG_TSDM_RAM +\n\t\t TSTORM_ISCSI_RX_STATS_OFFSET(p_hwfn->rel_pf_id);\n\tqed_memcpy_from(p_hwfn, p_ptt, &tstats, tstats_addr, sizeof(tstats));\n\n\tp_stats->iscsi_rx_bytes_cnt =\n\t HILO_64_REGPAIR(tstats.iscsi_rx_bytes_cnt);\n\tp_stats->iscsi_rx_packet_cnt =\n\t HILO_64_REGPAIR(tstats.iscsi_rx_packet_cnt);\n\tp_stats->iscsi_rx_new_ooo_isle_events_cnt =\n\t HILO_64_REGPAIR(tstats.iscsi_rx_new_ooo_isle_events_cnt);\n\tp_stats->iscsi_cmdq_threshold_cnt =\n\t le32_to_cpu(tstats.iscsi_cmdq_threshold_cnt);\n\tp_stats->iscsi_rq_threshold_cnt =\n\t le32_to_cpu(tstats.iscsi_rq_threshold_cnt);\n\tp_stats->iscsi_immq_threshold_cnt =\n\t le32_to_cpu(tstats.iscsi_immq_threshold_cnt);\n}\n\nstatic void _qed_iscsi_get_mstats(struct qed_hwfn *p_hwfn,\n\t\t\t\t struct qed_ptt *p_ptt,\n\t\t\t\t struct qed_iscsi_stats *p_stats)\n{\n\tstruct mstorm_iscsi_stats_drv mstats;\n\tu32 mstats_addr;\n\n\tmemset(&mstats, 0, sizeof(mstats));\n\tmstats_addr = BAR0_MAP_REG_MSDM_RAM +\n\t\t MSTORM_ISCSI_RX_STATS_OFFSET(p_hwfn->rel_pf_id);\n\tqed_memcpy_from(p_hwfn, p_ptt, &mstats, mstats_addr, sizeof(mstats));\n\n\tp_stats->iscsi_rx_dropped_pdus_task_not_valid =\n\t HILO_64_REGPAIR(mstats.iscsi_rx_dropped_pdus_task_not_valid);\n}\n\nstatic void _qed_iscsi_get_ustats(struct qed_hwfn *p_hwfn,\n\t\t\t\t struct qed_ptt *p_ptt,\n\t\t\t\t struct qed_iscsi_stats *p_stats)\n{\n\tstruct ustorm_iscsi_stats_drv ustats;\n\tu32 ustats_addr;\n\n\tmemset(&ustats, 0, sizeof(ustats));\n\tustats_addr = BAR0_MAP_REG_USDM_RAM +\n\t\t USTORM_ISCSI_RX_STATS_OFFSET(p_hwfn->rel_pf_id);\n\tqed_memcpy_from(p_hwfn, p_ptt, &ustats, ustats_addr, sizeof(ustats));\n\n\tp_stats->iscsi_rx_data_pdu_cnt =\n\t HILO_64_REGPAIR(ustats.iscsi_rx_data_pdu_cnt);\n\tp_stats->iscsi_rx_r2t_pdu_cnt =\n\t HILO_64_REGPAIR(ustats.iscsi_rx_r2t_pdu_cnt);\n\tp_stats->iscsi_rx_total_pdu_cnt =\n\t HILO_64_REGPAIR(ustats.iscsi_rx_total_pdu_cnt);\n}\n\nstatic void _qed_iscsi_get_xstats(struct qed_hwfn *p_hwfn,\n\t\t\t\t struct qed_ptt *p_ptt,\n\t\t\t\t struct qed_iscsi_stats *p_stats)\n{\n\tstruct xstorm_iscsi_stats_drv xstats;\n\tu32 xstats_addr;\n\n\tmemset(&xstats, 0, sizeof(xstats));\n\txstats_addr = BAR0_MAP_REG_XSDM_RAM +\n\t\t XSTORM_ISCSI_TX_STATS_OFFSET(p_hwfn->rel_pf_id);\n\tqed_memcpy_from(p_hwfn, p_ptt, &xstats, xstats_addr, sizeof(xstats));\n\n\tp_stats->iscsi_tx_go_to_slow_start_event_cnt =\n\t HILO_64_REGPAIR(xstats.iscsi_tx_go_to_slow_start_event_cnt);\n\tp_stats->iscsi_tx_fast_retransmit_event_cnt =\n\t HILO_64_REGPAIR(xstats.iscsi_tx_fast_retransmit_event_cnt);\n}\n\nstatic void _qed_iscsi_get_ystats(struct qed_hwfn *p_hwfn,\n\t\t\t\t struct qed_ptt *p_ptt,\n\t\t\t\t struct qed_iscsi_stats *p_stats)\n{\n\tstruct ystorm_iscsi_stats_drv ystats;\n\tu32 ystats_addr;\n\n\tmemset(&ystats, 0, sizeof(ystats));\n\tystats_addr = BAR0_MAP_REG_YSDM_RAM +\n\t\t YSTORM_ISCSI_TX_STATS_OFFSET(p_hwfn->rel_pf_id);\n\tqed_memcpy_from(p_hwfn, p_ptt, &ystats, ystats_addr, sizeof(ystats));\n\n\tp_stats->iscsi_tx_data_pdu_cnt =\n\t HILO_64_REGPAIR(ystats.iscsi_tx_data_pdu_cnt);\n\tp_stats->iscsi_tx_r2t_pdu_cnt =\n\t HILO_64_REGPAIR(ystats.iscsi_tx_r2t_pdu_cnt);\n\tp_stats->iscsi_tx_total_pdu_cnt =\n\t HILO_64_REGPAIR(ystats.iscsi_tx_total_pdu_cnt);\n}\n\nstatic void _qed_iscsi_get_pstats(struct qed_hwfn *p_hwfn,\n\t\t\t\t struct qed_ptt *p_ptt,\n\t\t\t\t struct qed_iscsi_stats *p_stats)\n{\n\tstruct pstorm_iscsi_stats_drv pstats;\n\tu32 pstats_addr;\n\n\tmemset(&pstats, 0, sizeof(pstats));\n\tpstats_addr = BAR0_MAP_REG_PSDM_RAM +\n\t\t PSTORM_ISCSI_TX_STATS_OFFSET(p_hwfn->rel_pf_id);\n\tqed_memcpy_from(p_hwfn, p_ptt, &pstats, pstats_addr, sizeof(pstats));\n\n\tp_stats->iscsi_tx_bytes_cnt =\n\t HILO_64_REGPAIR(pstats.iscsi_tx_bytes_cnt);\n\tp_stats->iscsi_tx_packet_cnt =\n\t HILO_64_REGPAIR(pstats.iscsi_tx_packet_cnt);\n}\n\nstatic int qed_iscsi_get_stats(struct qed_hwfn *p_hwfn,\n\t\t\t struct qed_iscsi_stats *stats)\n{\n\tstruct qed_ptt *p_ptt;\n\n\tmemset(stats, 0, sizeof(*stats));\n\n\tp_ptt = qed_ptt_acquire(p_hwfn);\n\tif (!p_ptt) {\n\t\tDP_ERR(p_hwfn, \"Failed to acquire ptt\\n\");\n\t\treturn -EAGAIN;\n\t}\n\n\t_qed_iscsi_get_tstats(p_hwfn, p_ptt, stats);\n\t_qed_iscsi_get_mstats(p_hwfn, p_ptt, stats);\n\t_qed_iscsi_get_ustats(p_hwfn, p_ptt, stats);\n\n\t_qed_iscsi_get_xstats(p_hwfn, p_ptt, stats);\n\t_qed_iscsi_get_ystats(p_hwfn, p_ptt, stats);\n\t_qed_iscsi_get_pstats(p_hwfn, p_ptt, stats);\n\n\tqed_ptt_release(p_hwfn, p_ptt);\n\n\treturn 0;\n}\n\nstruct qed_hash_iscsi_con {\n\tstruct hlist_node node;\n\tstruct qed_iscsi_conn *con;\n};\n\nstatic int qed_fill_iscsi_dev_info(struct qed_dev *cdev,\n\t\t\t\t struct qed_dev_iscsi_info *info)\n{\n\tstruct qed_hwfn *hwfn = QED_LEADING_HWFN(cdev);\n\n\tint rc;\n\n\tmemset(info, 0, sizeof(*info));\n\trc = qed_fill_dev_info(cdev, &info->common);\n\n\tinfo->primary_dbq_rq_addr =\n\t qed_iscsi_get_primary_bdq_prod(hwfn, BDQ_ID_RQ);\n\tinfo->secondary_bdq_rq_addr =\n\t qed_iscsi_get_secondary_bdq_prod(hwfn, BDQ_ID_RQ);\n\n\tinfo->num_cqs = FEAT_NUM(hwfn, QED_ISCSI_CQ);\n\n\treturn rc;\n}\n\nstatic void qed_register_iscsi_ops(struct qed_dev *cdev,\n\t\t\t\t struct qed_iscsi_cb_ops *ops, void *cookie)\n{\n\tcdev->protocol_ops.iscsi = ops;\n\tcdev->ops_cookie = cookie;\n}\n\nstatic struct qed_hash_iscsi_con *qed_iscsi_get_hash(struct qed_dev *cdev,\n\t\t\t\t\t\t u32 handle)\n{\n\tstruct qed_hash_iscsi_con *hash_con = NULL;\n\n\tif (!(cdev->flags & QED_FLAG_STORAGE_STARTED))\n\t\treturn NULL;\n\n\thash_for_each_possible(cdev->connections, hash_con, node, handle) {\n\t\tif (hash_con->con->icid == handle)\n\t\t\tbreak;\n\t}\n\n\tif (!hash_con || (hash_con->con->icid != handle))\n\t\treturn NULL;\n\n\treturn hash_con;\n}\n\nstatic int qed_iscsi_stop(struct qed_dev *cdev)\n{\n\tint rc;\n\n\tif (!(cdev->flags & QED_FLAG_STORAGE_STARTED)) {\n\t\tDP_NOTICE(cdev, \"iscsi already stopped\\n\");\n\t\treturn 0;\n\t}\n\n\tif (!hash_empty(cdev->connections)) {\n\t\tDP_NOTICE(cdev,\n\t\t\t \"Can't stop iscsi - not all connections were returned\\n\");\n\t\treturn -EINVAL;\n\t}\n\n\t/* Stop the iscsi */\n\trc = qed_sp_iscsi_func_stop(QED_LEADING_HWFN(cdev),\n\t\t\t\t QED_SPQ_MODE_EBLOCK, NULL);\n\tcdev->flags &= ~QED_FLAG_STORAGE_STARTED;\n\n\treturn rc;\n}\n\nstatic int qed_iscsi_start(struct qed_dev *cdev,\n\t\t\t struct qed_iscsi_tid *tasks,\n\t\t\t void *event_context,\n\t\t\t iscsi_event_cb_t async_event_cb)\n{\n\tint rc;\n\tstruct qed_tid_mem *tid_info;\n\n\tif (cdev->flags & QED_FLAG_STORAGE_STARTED) {\n\t\tDP_NOTICE(cdev, \"iscsi already started;\\n\");\n\t\treturn 0;\n\t}\n\n\trc = qed_sp_iscsi_func_start(QED_LEADING_HWFN(cdev),\n\t\t\t\t QED_SPQ_MODE_EBLOCK, NULL, event_context,\n\t\t\t\t async_event_cb);\n\tif (rc) {\n\t\tDP_NOTICE(cdev, \"Failed to start iscsi\\n\");\n\t\treturn rc;\n\t}\n\n\tcdev->flags |= QED_FLAG_STORAGE_STARTED;\n\thash_init(cdev->connections);\n\n\tif (!tasks)\n\t\treturn 0;\n\n\ttid_info = kzalloc(sizeof(*tid_info), GFP_KERNEL);\n\n\tif (!tid_info) {\n\t\tqed_iscsi_stop(cdev);\n\t\treturn -ENOMEM;\n\t}\n\n\trc = qed_cxt_get_tid_mem_info(QED_LEADING_HWFN(cdev),\n\t\t\t\t tid_info);\n\tif (rc) {\n\t\tDP_NOTICE(cdev, \"Failed to gather task information\\n\");\n\t\tqed_iscsi_stop(cdev);\n\t\tkfree(tid_info);\n\t\treturn rc;\n\t}\n\n\t/* Fill task information */\n\ttasks->size = tid_info->tid_size;\n\ttasks->num_tids_per_block = tid_info->num_tids_per_block;\n\tmemcpy(tasks->blocks, tid_info->blocks,\n\t MAX_TID_BLOCKS_ISCSI * sizeof(u8 *));\n\n\tkfree(tid_info);\n\n\treturn 0;\n}\n\nstatic int qed_iscsi_acquire_conn(struct qed_dev *cdev,\n\t\t\t\t u32 *handle,\n\t\t\t\t u32 *fw_cid, void __iomem **p_doorbell)\n{\n\tstruct qed_hash_iscsi_con *hash_con;\n\tint rc;\n\n\t/* Allocate a hashed connection */\n\thash_con = kzalloc(sizeof(*hash_con), GFP_ATOMIC);\n\tif (!hash_con)\n\t\treturn -ENOMEM;\n\n\t/* Acquire the connection */\n\trc = qed_iscsi_acquire_connection(QED_LEADING_HWFN(cdev), NULL,\n\t\t\t\t\t &hash_con->con);\n\tif (rc) {\n\t\tDP_NOTICE(cdev, \"Failed to acquire Connection\\n\");\n\t\tkfree(hash_con);\n\t\treturn rc;\n\t}\n\n\t/* Added the connection to hash table */\n\t*handle = hash_con->con->icid;\n\t*fw_cid = hash_con->con->fw_cid;\n\thash_add(cdev->connections, &hash_con->node, *handle);\n\n\tif (p_doorbell)\n\t\t*p_doorbell = qed_iscsi_get_db_addr(QED_LEADING_HWFN(cdev),\n\t\t\t\t\t\t *handle);\n\n\treturn 0;\n}\n\nstatic int qed_iscsi_release_conn(struct qed_dev *cdev, u32 handle)\n{\n\tstruct qed_hash_iscsi_con *hash_con;\n\n\thash_con = qed_iscsi_get_hash(cdev, handle);\n\tif (!hash_con) {\n\t\tDP_NOTICE(cdev, \"Failed to find connection for handle %d\\n\",\n\t\t\t handle);\n\t\treturn -EINVAL;\n\t}\n\n\thlist_del(&hash_con->node);\n\tqed_iscsi_release_connection(QED_LEADING_HWFN(cdev), hash_con->con);\n\tkfree(hash_con);\n\n\treturn 0;\n}\n\nstatic int qed_iscsi_offload_conn(struct qed_dev *cdev,\n\t\t\t\t u32 handle,\n\t\t\t\t struct qed_iscsi_params_offload *conn_info)\n{\n\tstruct qed_hash_iscsi_con *hash_con;\n\tstruct qed_iscsi_conn *con;\n\n\thash_con = qed_iscsi_get_hash(cdev, handle);\n\tif (!hash_con) {\n\t\tDP_NOTICE(cdev, \"Failed to find connection for handle %d\\n\",\n\t\t\t handle);\n\t\treturn -EINVAL;\n\t}\n\n\t/* Update the connection with information from the params */\n\tcon = hash_con->con;\n\n\tether_addr_copy(con->local_mac, conn_info->src.mac);\n\tether_addr_copy(con->remote_mac, conn_info->dst.mac);\n\tmemcpy(con->local_ip, conn_info->src.ip, sizeof(con->local_ip));\n\tmemcpy(con->remote_ip, conn_info->dst.ip, sizeof(con->remote_ip));\n\tcon->local_port = conn_info->src.port;\n\tcon->remote_port = conn_info->dst.port;\n\n\tcon->layer_code = conn_info->layer_code;\n\tcon->sq_pbl_addr = conn_info->sq_pbl_addr;\n\tcon->initial_ack = conn_info->initial_ack;\n\tcon->vlan_id = conn_info->vlan_id;\n\tcon->tcp_flags = conn_info->tcp_flags;\n\tcon->ip_version = conn_info->ip_version;\n\tcon->default_cq = conn_info->default_cq;\n\tcon->ka_max_probe_cnt = conn_info->ka_max_probe_cnt;\n\tcon->dup_ack_theshold = conn_info->dup_ack_theshold;\n\tcon->rcv_next = conn_info->rcv_next;\n\tcon->snd_una = conn_info->snd_una;\n\tcon->snd_next = conn_info->snd_next;\n\tcon->snd_max = conn_info->snd_max;\n\tcon->snd_wnd = conn_info->snd_wnd;\n\tcon->rcv_wnd = conn_info->rcv_wnd;\n\tcon->snd_wl1 = conn_info->snd_wl1;\n\tcon->cwnd = conn_info->cwnd;\n\tcon->ss_thresh = conn_info->ss_thresh;\n\tcon->srtt = conn_info->srtt;\n\tcon->rtt_var = conn_info->rtt_var;\n\tcon->ts_time = conn_info->ts_time;\n\tcon->ts_recent = conn_info->ts_recent;\n\tcon->ts_recent_age = conn_info->ts_recent_age;\n\tcon->total_rt = conn_info->total_rt;\n\tcon->ka_timeout_delta = conn_info->ka_timeout_delta;\n\tcon->rt_timeout_delta = conn_info->rt_timeout_delta;\n\tcon->dup_ack_cnt = conn_info->dup_ack_cnt;\n\tcon->snd_wnd_probe_cnt = conn_info->snd_wnd_probe_cnt;\n\tcon->ka_probe_cnt = conn_info->ka_probe_cnt;\n\tcon->rt_cnt = conn_info->rt_cnt;\n\tcon->flow_label = conn_info->flow_label;\n\tcon->ka_timeout = conn_info->ka_timeout;\n\tcon->ka_interval = conn_info->ka_interval;\n\tcon->max_rt_time = conn_info->max_rt_time;\n\tcon->initial_rcv_wnd = conn_info->initial_rcv_wnd;\n\tcon->ttl = conn_info->ttl;\n\tcon->tos_or_tc = conn_info->tos_or_tc;\n\tcon->remote_port = conn_info->remote_port;\n\tcon->local_port = conn_info->local_port;\n\tcon->mss = conn_info->mss;\n\tcon->snd_wnd_scale = conn_info->snd_wnd_scale;\n\tcon->rcv_wnd_scale = conn_info->rcv_wnd_scale;\n\tcon->ts_ticks_per_second = conn_info->ts_ticks_per_second;\n\tcon->da_timeout_value = conn_info->da_timeout_value;\n\tcon->ack_frequency = conn_info->ack_frequency;\n\n\t/* Set default values on other connection fields */\n\tcon->offl_flags = 0x1;\n\n\treturn qed_sp_iscsi_conn_offload(QED_LEADING_HWFN(cdev), con,\n\t\t\t\t\t QED_SPQ_MODE_EBLOCK, NULL);\n}\n\nstatic int qed_iscsi_update_conn(struct qed_dev *cdev,\n\t\t\t\t u32 handle,\n\t\t\t\t struct qed_iscsi_params_update *conn_info)\n{\n\tstruct qed_hash_iscsi_con *hash_con;\n\tstruct qed_iscsi_conn *con;\n\n\thash_con = qed_iscsi_get_hash(cdev, handle);\n\tif (!hash_con) {\n\t\tDP_NOTICE(cdev, \"Failed to find connection for handle %d\\n\",\n\t\t\t handle);\n\t\treturn -EINVAL;\n\t}\n\n\t/* Update the connection with information from the params */\n\tcon = hash_con->con;\n\tcon->update_flag = conn_info->update_flag;\n\tcon->max_seq_size = conn_info->max_seq_size;\n\tcon->max_recv_pdu_length = conn_info->max_recv_pdu_length;\n\tcon->max_send_pdu_length = conn_info->max_send_pdu_length;\n\tcon->first_seq_length = conn_info->first_seq_length;\n\tcon->exp_stat_sn = conn_info->exp_stat_sn;\n\n\treturn qed_sp_iscsi_conn_update(QED_LEADING_HWFN(cdev), con,\n\t\t\t\t\tQED_SPQ_MODE_EBLOCK, NULL);\n}\n\nstatic int qed_iscsi_clear_conn_sq(struct qed_dev *cdev, u32 handle)\n{\n\tstruct qed_hash_iscsi_con *hash_con;\n\n\thash_con = qed_iscsi_get_hash(cdev, handle);\n\tif (!hash_con) {\n\t\tDP_NOTICE(cdev, \"Failed to find connection for handle %d\\n\",\n\t\t\t handle);\n\t\treturn -EINVAL;\n\t}\n\n\treturn qed_sp_iscsi_conn_clear_sq(QED_LEADING_HWFN(cdev),\n\t\t\t\t\t hash_con->con,\n\t\t\t\t\t QED_SPQ_MODE_EBLOCK, NULL);\n}\n\nstatic int qed_iscsi_destroy_conn(struct qed_dev *cdev,\n\t\t\t\t u32 handle, u8 abrt_conn)\n{\n\tstruct qed_hash_iscsi_con *hash_con;\n\n\thash_con = qed_iscsi_get_hash(cdev, handle);\n\tif (!hash_con) {\n\t\tDP_NOTICE(cdev, \"Failed to find connection for handle %d\\n\",\n\t\t\t handle);\n\t\treturn -EINVAL;\n\t}\n\n\thash_con->con->abortive_dsconnect = abrt_conn;\n\n\treturn qed_sp_iscsi_conn_terminate(QED_LEADING_HWFN(cdev),\n\t\t\t\t\t hash_con->con,\n\t\t\t\t\t QED_SPQ_MODE_EBLOCK, NULL);\n}\n\nstatic int qed_iscsi_stats(struct qed_dev *cdev, struct qed_iscsi_stats *stats)\n{\n\treturn qed_iscsi_get_stats(QED_LEADING_HWFN(cdev), stats);\n}\n\nstatic int qed_iscsi_change_mac(struct qed_dev *cdev,\n\t\t\t\tu32 handle, const u8 *mac)\n{\n\tstruct qed_hash_iscsi_con *hash_con;\n\n\thash_con = qed_iscsi_get_hash(cdev, handle);\n\tif (!hash_con) {\n\t\tDP_NOTICE(cdev, \"Failed to find connection for handle %d\\n\",\n\t\t\t handle);\n\t\treturn -EINVAL;\n\t}\n\n\treturn qed_sp_iscsi_mac_update(QED_LEADING_HWFN(cdev),\n\t\t\t\t hash_con->con,\n\t\t\t\t QED_SPQ_MODE_EBLOCK, NULL);\n}\n\nvoid qed_get_protocol_stats_iscsi(struct qed_dev *cdev,\n\t\t\t\t struct qed_mcp_iscsi_stats *stats)\n{\n\tstruct qed_iscsi_stats proto_stats;\n\n\t/* Retrieve FW statistics */\n\tmemset(&proto_stats, 0, sizeof(proto_stats));\n\tif (qed_iscsi_stats(cdev, &proto_stats)) {\n\t\tDP_VERBOSE(cdev, QED_MSG_STORAGE,\n\t\t\t \"Failed to collect ISCSI statistics\\n\");\n\t\treturn;\n\t}\n\n\t/* Translate FW statistics into struct */\n\tstats->rx_pdus = proto_stats.iscsi_rx_total_pdu_cnt;\n\tstats->tx_pdus = proto_stats.iscsi_tx_total_pdu_cnt;\n\tstats->rx_bytes = proto_stats.iscsi_rx_bytes_cnt;\n\tstats->tx_bytes = proto_stats.iscsi_tx_bytes_cnt;\n}\n\nstatic const struct qed_iscsi_ops qed_iscsi_ops_pass = {\n\t.common = &qed_common_ops_pass,\n\t.ll2 = &qed_ll2_ops_pass,\n\t.fill_dev_info = &qed_fill_iscsi_dev_info,\n\t.register_ops = &qed_register_iscsi_ops,\n\t.start = &qed_iscsi_start,\n\t.stop = &qed_iscsi_stop,\n\t.acquire_conn = &qed_iscsi_acquire_conn,\n\t.release_conn = &qed_iscsi_release_conn,\n\t.offload_conn = &qed_iscsi_offload_conn,\n\t.update_conn = &qed_iscsi_update_conn,\n\t.destroy_conn = &qed_iscsi_destroy_conn,\n\t.clear_sq = &qed_iscsi_clear_conn_sq,\n\t.get_stats = &qed_iscsi_stats,\n\t.change_mac = &qed_iscsi_change_mac,\n};\n\nconst struct qed_iscsi_ops *qed_get_iscsi_ops(void)\n{\n\treturn &qed_iscsi_ops_pass;\n}\nEXPORT_SYMBOL(qed_get_iscsi_ops);\n\nvoid qed_put_iscsi_ops(void)\n{\n}\nEXPORT_SYMBOL(qed_put_iscsi_ops);\n"} +{"text": "'use strict';\nconst kTimeout = 100;\nconst kTimeoutRange = 115;\nconst kError = 0.98;\nlet ivm = require('isolated-vm');\nlet isolate = new ivm.Isolate;\nlet context = isolate.createContextSync();\n\nfunction spin(timeout) {\n\tlet d = Date.now() + timeout + 2;\n\twhile (Date.now() < d);\n}\n\nfunction hrToFloat(hr) {\n\tlet time = (hr[0] + hr[1] / 1e9) * 1000;\n\tif (time > 1000) {\n\t\tconsole.log('time is too high');\n\t}\n\treturn time;\n}\n\nfunction checkRange(val, min, max) {\n\treturn val <= max / kError && val >= min * kError;\n}\n\n// Synchronous timers\ncontext.global.setSync('defaultIsolateSpin', new ivm.Reference(spin));\ncontext.global.setSync('recurse', new ivm.Reference(function(code) {\n\tisolate.compileScriptSync(code).runSync(context);\n}));\nisolate.compileScriptSync(''+ spin).runSync(context);\nisolate.compileScriptSync(`\n\tspin(${kTimeout});\n\tdefaultIsolateSpin.applySync(undefined, [ ${kTimeout} ]);\n\trecurse.applySync(undefined, [ 'spin(${kTimeout});' ]);\n`).runSync(context);\n\nif (!checkRange(hrToFloat(isolate.cpuTime), kTimeout * 2, kTimeoutRange * 2)) {\n\tconsole.log('cpu time wrong');\n}\nif (!checkRange(hrToFloat(isolate.wallTime), kTimeout * 3, kTimeoutRange * 3)) {\n\tconsole.log('wall time wrong');\n}\n\n// Asynchronous time\nlet initialCpu = hrToFloat(isolate.cpuTime);\nlet lastCpu;\nlet initialWall = hrToFloat(isolate.wallTime);\nisolate.compileScriptSync(`spin(${kTimeout}); defaultIsolateSpin.applySync(undefined, [ ${kTimeout} ] );`).run(context);\nlet d = Date.now() + kTimeoutRange * 2;\nlet passedCpu = false;\nwhile (Date.now() < d && !passedCpu) {\n\tlet cpuTime = hrToFloat(isolate.cpuTime);\n\t// Ensures cpu is ticking up while the spin() loop runs in another thread\n\tif (lastCpu === undefined) {\n\t\tlastCpu = cpuTime;\n\t} else if (lastCpu !== cpuTime) {\n\t\tpassedCpu = true;\n\t}\n}\nif (!passedCpu) {\n\tconsole.log('Async CPU time not updating');\n}\n\nd = Date.now() + kTimeout * 4;\nlet interval = setInterval(function() {\n\tif (Date.now() > d) {\n\t\tclearInterval(interval);\n\t}\n\tif (checkRange(hrToFloat(isolate.wallTime) - initialWall, kTimeout * 2, kTimeoutRange * 2)) {\n\t\tclearInterval(interval);\n\t\tif (checkRange(hrToFloat(isolate.cpuTime) - initialCpu, kTimeout, kTimeoutRange)) {\n\t\t\tconsole.log('pass');\n\t\t}\n\t}\n}, 10);\n"} +{"text": "\n/// Put the interfaces in a module, to avoid global namespace pollution\nmodule Test\n{\n /// A very simple interface\n interface Hello\n {\n /// Attribute to hold a sleep time in seconds\n /// for the Hello servant\n attribute short sleep_sec;\n\n /// Return a simple string\n string get_string (in long cl);\n\n /// A method to shutdown the ORB\n /**\n * This method is used to simplify the test shutdown process\n */\n oneway void shutdown ();\n };\n};\n"} +{"text": ":101E000001C0B2C011248FE592E09EBF8DBF84B7A0\r\n:101E1000882361F0982F9A70923041F081FF02C0C0\r\n:101E200097EF94BF282E80E0BAD0EAC085E08EBD3F\r\n:101E300082E08BB988E18AB986E880BD8CE089B9F7\r\n:101E40008EE0ADD0B89A84E028E43AEF40E851E063\r\n:101E50003DBD2CBD48BF08B607FEFDCF98B3952702\r\n:101E600098BBA8955F9902C0815091F791D08134B9\r\n:101E700079F48ED0182F97D0123811F480E004C076\r\n:101E800088E0113809F083E07FD080E17DD0EECF8B\r\n:101E9000823419F484E18FD0F8CF853411F485E0D1\r\n:101EA000FACF853541F474D0C82F72D0D82FCC0F1B\r\n:101EB000DD1F79D0EACF863519F484E07CD0DECFFF\r\n:101EC000843699F565D064D0182F62D0D82E012FB2\r\n:101ED00090E6E92EF12C57018FEFA81AB80A58D0D6\r\n:101EE000F701808301507501B1F75DD0F5E4DF1291\r\n:101EF00001C0FFCF50E040E063E0CE0135D07E016D\r\n:101F000080E6C82ED12CF601419151916F0161E01C\r\n:101F1000C7012AD0F2E0EF0EF11C1250A1F750E0F9\r\n:101F200040E065E0CE0120D0B0CF843771F430D0EE\r\n:101F30002FD0F82E2DD037D08E01F80185918F014A\r\n:101F400023D0FA94F110F9CFA0CF853739F42BD0F4\r\n:101F50008EE11AD083E918D086E096CF813509F05A\r\n:101F6000A8CF88E01CD0A5CFFC010A0167BFE89587\r\n:101F7000112407B600FCFDCF667029F0452B19F43B\r\n:101F800081E187BFE89508955D9BFECF8CB90895E8\r\n:101F90005F9BFECF5C9901C0A8958CB1089598E134\r\n:101FA00091BD81BD0895F4DF803219F088E0F7DF3C\r\n:101FB000FFCF84E1E9CFCF93C82FEADFC150E9F723\r\n:041FC000CF91F1CFFD\r\n:021FFE000008D9\r\n:0400000300001E00DB\r\n:00000001FF\r\n"} +{"text": "/******************************************************************************\n ** Copyright (c) 2006-2018, Calaos. All Rights Reserved.\n **\n ** This file is part of Calaos.\n **\n ** Calaos is free software; you can redistribute it and/or modify\n ** it under the terms of the GNU General Public License as published by\n ** the Free Software Foundation; either version 3 of the License, or\n ** (at your option) any later version.\n **\n ** Calaos is distributed in the hope that it will be useful,\n ** but WITHOUT ANY WARRANTY; without even the implied warranty of\n ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n ** GNU General Public License for more details.\n **\n ** You should have received a copy of the GNU General Public License\n ** along with Foobar; if not, write to the Free Software\n ** Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\n **\n ******************************************************************************/\n#ifndef xPLOutputAnalog_H\n#define xPLOutputAnalog_H\n\n#include \"OutputAnalog.h\"\n#include \"xPLController.h\"\n\nnamespace Calaos\n{\n\nclass xPLOutputAnalog : public OutputAnalog\n{\nprotected:\n void set_value_real(double val);\n\npublic:\n xPLOutputAnalog(Params &p);\n virtual ~xPLOutputAnalog();\n};\n\n}\n\n#endif\n"} +{"text": "Apache Stratos - Stratos Docker Images\n======================================\n\nThis folder contains docker image files for installing stratos.\n\n### Building\n\nTo build mysql, activemq and stratos images:\n\n`mvn install -Pdocker-build`\n\nThe above command requires you to be able to execute the docker command without sudo usually by being in the 'docker' group.\n\n\n### Upload to registry.hub.docker.com\n\nTo upload images:\n\n`mvn install -Pdocker-push`\n\n### Running\n\nTake a look at the Stratos wiki: https://cwiki.apache.org/confluence/display/STRATOS/Running+Stratos+inside+docker\n"} +{"text": "\n'use strict';\n\nvar GetIntrinsic = require('../GetIntrinsic');\n\nvar $TypeError = GetIntrinsic('%TypeError%');\nvar $parseInt = GetIntrinsic('%parseInt%');\n\nvar inspect = require('object-inspect');\n\nvar regexTester = require('../helpers/regexTester');\nvar callBound = require('../helpers/callBound');\nvar every = require('../helpers/every');\n\nvar isDigit = regexTester(/^[0-9]$/);\n\nvar $charAt = callBound('String.prototype.charAt');\nvar $strSlice = callBound('String.prototype.slice');\n\nvar IsArray = require('./IsArray');\nvar IsInteger = require('./IsInteger');\nvar Type = require('./Type');\n\nvar canDistinguishSparseFromUndefined = 0 in [undefined]; // IE 6 - 8 have a bug where this returns false\n\nvar isStringOrHole = function (capture, index, arr) {\n\treturn Type(capture) === 'String' || (canDistinguishSparseFromUndefined ? !(index in arr) : Type(capture) === 'Undefined');\n};\n\n// https://www.ecma-international.org/ecma-262/6.0/#sec-getsubstitution\n\n// eslint-disable-next-line max-statements, max-params, max-lines-per-function\nmodule.exports = function GetSubstitution(matched, str, position, captures, replacement) {\n\tif (Type(matched) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `matched` must be a String');\n\t}\n\tvar matchLength = matched.length;\n\n\tif (Type(str) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `str` must be a String');\n\t}\n\tvar stringLength = str.length;\n\n\tif (!IsInteger(position) || position < 0 || position > stringLength) {\n\t\tthrow new $TypeError('Assertion failed: `position` must be a nonnegative integer, and less than or equal to the length of `string`, got ' + inspect(position));\n\t}\n\n\tif (!IsArray(captures) || !every(captures, isStringOrHole)) {\n\t\tthrow new $TypeError('Assertion failed: `captures` must be a List of Strings, got ' + inspect(captures));\n\t}\n\n\tif (Type(replacement) !== 'String') {\n\t\tthrow new $TypeError('Assertion failed: `replacement` must be a String');\n\t}\n\n\tvar tailPos = position + matchLength;\n\tvar m = captures.length;\n\n\tvar result = '';\n\tfor (var i = 0; i < replacement.length; i += 1) {\n\t\t// if this is a $, and it's not the end of the replacement\n\t\tvar current = $charAt(replacement, i);\n\t\tvar isLast = (i + 1) >= replacement.length;\n\t\tvar nextIsLast = (i + 2) >= replacement.length;\n\t\tif (current === '$' && !isLast) {\n\t\t\tvar next = $charAt(replacement, i + 1);\n\t\t\tif (next === '$') {\n\t\t\t\tresult += '$';\n\t\t\t\ti += 1;\n\t\t\t} else if (next === '&') {\n\t\t\t\tresult += matched;\n\t\t\t\ti += 1;\n\t\t\t} else if (next === '`') {\n\t\t\t\tresult += position === 0 ? '' : $strSlice(str, 0, position - 1);\n\t\t\t\ti += 1;\n\t\t\t} else if (next === \"'\") {\n\t\t\t\tresult += tailPos >= stringLength ? '' : $strSlice(str, tailPos);\n\t\t\t\ti += 1;\n\t\t\t} else {\n\t\t\t\tvar nextNext = nextIsLast ? null : $charAt(replacement, i + 2);\n\t\t\t\tif (isDigit(next) && next !== '0' && (nextIsLast || !isDigit(nextNext))) {\n\t\t\t\t\t// $1 through $9, and not followed by a digit\n\t\t\t\t\tvar n = $parseInt(next, 10);\n\t\t\t\t\t// if (n > m, impl-defined)\n\t\t\t\t\tresult += (n <= m && Type(captures[n - 1]) === 'Undefined') ? '' : captures[n - 1];\n\t\t\t\t\ti += 1;\n\t\t\t\t} else if (isDigit(next) && (nextIsLast || isDigit(nextNext))) {\n\t\t\t\t\t// $00 through $99\n\t\t\t\t\tvar nn = next + nextNext;\n\t\t\t\t\tvar nnI = $parseInt(nn, 10) - 1;\n\t\t\t\t\t// if nn === '00' or nn > m, impl-defined\n\t\t\t\t\tresult += (nn <= m && Type(captures[nnI]) === 'Undefined') ? '' : captures[nnI];\n\t\t\t\t\ti += 2;\n\t\t\t\t} else {\n\t\t\t\t\tresult += '$';\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t// the final $, or else not a $\n\t\t\tresult += $charAt(replacement, i);\n\t\t}\n\t}\n\treturn result;\n};\n"} +{"text": "package com.objectmentor.library.services;\n\nimport junit.framework.TestCase;\n\nimport com.objectmentor.library.models.Media;\n\npublic class IsbnServiceTest extends TestCase {\n public void testLookupBook() throws Exception {\n IsbnService wc = new IsbnService();\n Media theAlchemist = wc.findBookByIsbn(\"0061122416\");\n assertNotNull(theAlchemist);\n assertEquals(\"Title61122416\", theAlchemist.getTitle());\n }\n\n}\n"} +{"text": "objectManager = \\Magento\\TestFramework\\Helper\\Bootstrap::getObjectManager();\n }\n\n /**\n * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php\n */\n public function testTierPricesForGeneralGroup()\n {\n $productSku = 'simple';\n $productRepository = $this->objectManager->get(ProductRepositoryInterface::class);\n $product = $productRepository->get($productSku, false, null, true);\n $tierPriceData =[\n [\n 'customer_group_id' => 1,\n 'percentage_value'=> null,\n 'qty'=> 2,\n 'value'=> 8\n ]\n ];\n\n $this->saveTierPrices($product, $tierPriceData);\n $query = $this->getProductSearchQuery($productSku);\n $response = $this->graphQlQuery($query);\n\n $expectedResponse = [];\n $this->assertEmpty($response['products']['items'][0]['tier_prices']);\n $this->assertResponseFields($response['products']['items'][0]['tier_prices'], $expectedResponse);\n }\n\n /**\n * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php\n */\n public function testTierPricesForGeneralAndAllCustomerGroups()\n {\n $productSku = 'simple';\n $productRepository = $this->objectManager->get(ProductRepositoryInterface::class);\n $product = $productRepository->get($productSku, false, null, true);\n $tierPriceData = [\n [\n 'customer_group_id' => \\Magento\\Customer\\Model\\Group::CUST_GROUP_ALL,\n 'percentage_value'=> null,\n 'qty'=> 2,\n 'value'=> 6\n ],\n [\n 'customer_group_id' => 1,\n 'percentage_value'=> null,\n 'qty'=> 2,\n 'value'=> 8\n ]\n ];\n\n $this->saveTierPrices($product, $tierPriceData);\n $query = $this->getProductSearchQuery($productSku);\n $response = $this->graphQlQuery($query);\n $this->assertNotEmpty($response['products']['items'][0]['tier_prices']);\n $this->assertArrayHasKey('tier_prices', $response['products']['items'][0]);\n\n $expectedResponse = [\n [\n 'customer_group_id' => \\Magento\\Customer\\Model\\Group::CUST_GROUP_ALL,\n 'percentage_value'=> null,\n 'qty'=> 2,\n 'value'=> 6\n ]\n ];\n $this->assertResponseFields($response['products']['items'][0]['tier_prices'], $expectedResponse);\n }\n\n /**\n * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php\n */\n public function testTierPricesForNotLoggedInGroupOnly()\n {\n $productSku = 'simple';\n $productRepository = $this->objectManager->get(ProductRepositoryInterface::class);\n $product = $productRepository->get($productSku, false, null, true);\n\n $tierPriceData = [\n [\n 'customer_group_id' => \\Magento\\Customer\\Model\\Group::NOT_LOGGED_IN_ID,\n 'percentage_value'=> null,\n 'qty'=> 4,\n 'value'=> 6\n ]\n ];\n\n $this->saveTierPrices($product, $tierPriceData);\n $query = $this->getProductSearchQuery($productSku);\n $response = $this->graphQlQuery($query);\n $this->assertNotEmpty($response['products']['items'][0]['tier_prices']);\n $this->assertArrayHasKey('tier_prices', $response['products']['items'][0]);\n\n $expectedResponse = [\n [\n 'customer_group_id' => \\Magento\\Customer\\Model\\Group::NOT_LOGGED_IN_ID,\n 'percentage_value'=> null,\n 'qty'=> 4,\n 'value'=> 6\n ]\n ];\n $this->assertResponseFields($response['products']['items'][0]['tier_prices'], $expectedResponse);\n $this->assertCount(1, $response['products']['items'][0]['tier_prices']);\n }\n\n /**\n * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php\n */\n public function testTierPricesForNotLoggedInAndGeneralGroups()\n {\n $productSku = 'simple';\n $productRepository = $this->objectManager->get(ProductRepositoryInterface::class);\n $product = $productRepository->get($productSku, false, null, true);\n\n $tierPriceData = [\n [\n 'customer_group_id' => \\Magento\\Customer\\Model\\Group::NOT_LOGGED_IN_ID,\n 'percentage_value'=> null,\n 'qty'=> 6,\n 'value'=> 6.5\n ],\n [\n 'customer_group_id' => 1,\n 'percentage_value'=> null,\n 'qty'=> 5,\n 'value'=> 6\n ]\n ];\n\n $this->saveTierPrices($product, $tierPriceData);\n $query = $this->getProductSearchQuery($productSku);\n $response = $this->graphQlQuery($query);\n $this->assertNotEmpty($response['products']['items'][0]['tier_prices']);\n $this->assertArrayHasKey('tier_prices', $response['products']['items'][0]);\n\n $expectedResponse = [\n [\n 'customer_group_id' => \\Magento\\Customer\\Model\\Group::NOT_LOGGED_IN_ID,\n 'percentage_value'=> null,\n 'qty'=> 6,\n 'value'=> 6.5\n ]\n ];\n $this->assertResponseFields($response['products']['items'][0]['tier_prices'], $expectedResponse);\n $this->assertCount(1, $response['products']['items'][0]['tier_prices']);\n }\n\n /**\n * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php\n */\n public function testTierPricesForAllCustomerGroupsOnly()\n {\n $productSku = 'simple';\n $productRepository = $this->objectManager->get(ProductRepositoryInterface::class);\n $product = $productRepository->get($productSku, false, null, true);\n\n $tierPriceData = [\n [\n 'customer_group_id' => \\Magento\\Customer\\Model\\Group::CUST_GROUP_ALL,\n 'percentage_value'=> null,\n 'qty'=> 6,\n 'value'=> 5\n ],\n\n ];\n\n $this->saveTierPrices($product, $tierPriceData);\n $query = $this->getProductSearchQuery($productSku);\n $response = $this->graphQlQuery($query);\n $this->assertNotEmpty($response['products']['items'][0]['tier_prices']);\n $this->assertArrayHasKey('tier_prices', $response['products']['items'][0]);\n\n $expectedResponse = [\n [\n 'customer_group_id' => \\Magento\\Customer\\Model\\Group::CUST_GROUP_ALL,\n 'percentage_value'=> null,\n 'qty'=> 6,\n 'value'=> 5\n ]\n ];\n $this->assertResponseFields($response['products']['items'][0]['tier_prices'], $expectedResponse);\n $this->assertCount(1, $response['products']['items'][0]['tier_prices']);\n }\n\n /**\n * @magentoApiDataFixture Magento/Catalog/_files/product_simple.php\n */\n public function testTierPricesForAllCustomerGroupsAndNotLoggedInGroup()\n {\n $productSku = 'simple';\n $productRepository = $this->objectManager->get(ProductRepositoryInterface::class);\n $product = $productRepository->get($productSku, false, null, true);\n\n $tierPriceData = [\n [\n 'customer_group_id' => \\Magento\\Customer\\Model\\Group::CUST_GROUP_ALL,\n 'percentage_value'=> null,\n 'qty'=> 2,\n 'value'=> 8\n ],\n [\n 'customer_group_id' => \\Magento\\Customer\\Model\\Group::NOT_LOGGED_IN_ID,\n 'percentage_value'=> null,\n 'qty'=> 4,\n 'value'=> 6.5\n ],\n ];\n\n $this->saveTierPrices($product, $tierPriceData);\n $query = $this->getProductSearchQuery($productSku);\n $response = $this->graphQlQuery($query);\n $this->assertNotEmpty($response['products']['items'][0]['tier_prices']);\n $this->assertArrayHasKey('tier_prices', $response['products']['items'][0]);\n $expectedResponse = [\n [\n 'customer_group_id' => \\Magento\\Customer\\Model\\Group::CUST_GROUP_ALL,\n 'percentage_value'=> null,\n 'qty'=> 2,\n 'value'=> 8\n ],\n [\n 'customer_group_id' => \\Magento\\Customer\\Model\\Group::NOT_LOGGED_IN_ID,\n 'percentage_value'=> null,\n 'qty'=> 4,\n 'value'=> 6.5\n ]\n ];\n\n $this->assertResponseFields($response['products']['items'][0]['tier_prices'], $expectedResponse);\n $this->assertCount(2, $response['products']['items'][0]['tier_prices']);\n }\n\n /**\n * @param ProductInterface $product\n * @param array $tierPriceData\n */\n private function saveTierPrices($product, $tierPriceData)\n {\n $tierPrices = [];\n /** @var ProductTierPriceInterfaceFactory $tierPriceFactory */\n $tierPriceFactory = $this->objectManager\n ->get(\\Magento\\Catalog\\Api\\Data\\ProductTierPriceInterfaceFactory::class);\n foreach ($tierPriceData as $tierPrice) {\n $tierPrices[] = $tierPriceFactory->create(\n [\n 'data' => $tierPrice\n ]\n );\n }\n $product->setTierPrices($tierPrices);\n $product->save();\n }\n\n /**\n * @param string $maskedQuoteId\n * @return string\n */\n private function getProductSearchQuery(string $productSku): string\n {\n return <<) {\n }\n\n cancel() {\n this.dialogRef.close();\n }\n\n submit() {\n this.dialogRef.close(true);\n }\n}\n"} +{"text": "
\n\n\n>意大利精彩科技活动精选清单\n\n该列表包含在意大利发生的令人敬畏的(与技术相关的)事件,例如:会议,聚会,研讨会和聚会 \n\n 欢迎捐款. 通过拉取请求添加链接或创建问题以开始讨论.\n- [What is an awesome list?](https://github.com/sindresorhus/awesome)\n- [Contribution guide](https://github.com/ildoc/awesome-italy-events/blob/master/contributing.md)\n\n可用数据格式: [json](https://github.com/ildoc/awesome-italy-events/blob/master/data/2020.json) - [ics](https://github.com/ildoc/awesome-italy-events/blob/master/data/2020.ics)\n\nEditions: [2019](https://github.com/ildoc/awesome-italy-events/blob/master/archive/2019.md) [2020](https://github.com/ildoc/awesome-italy-events/blob/master/README.md) [2021](https://github.com/ildoc/awesome-italy-events/blob/master/2021.md)\n\n---\n\n 要添加活动吗? 寄一个 [pull request](https://github.com/ildoc/awesome-italy-events/blob/master/contributing.md) 或给我发推文 [@il_doc](https://twitter.com/il_doc).\n\n\n---\n\n## January\n- 14 - [Milano Live Coding](https://www.eventbrite.it/e/biglietti-milano-live-coding-14-gennaio-2020-87088150001) -Milano-使用three.js进行创意编码.\n- 21 - [Torino Hacknight](http://torino.hacknight.it/) -Torino-有关Userbase的开源hackaton.\n- 25 - [Modena Tech Summit](https://www.modenatechsummit.it/) -Modena-有关所有IT世界的技术大会.\n- 25-26 - [Hackafork](https://www.hackathon.com/event/hackafork-82168184251) -Fornovo di Taro-第一批食品专用的意大利hackaton.\n- 27-28 - [Microsoft Ignite](https://www.microsoft.com/en-us/ignite) -米兰-微软年度会议.\n-2月31日- [Global Game Jam](https://globalgamejam.org/) -多个地点-一个周末聚会并创建游戏.\n\n## February\n- 1 - [Agile Venture Milano 2020](https://www.agilemovement.it/venture/2020/milano/) -米兰-新兴技术领域的敏捷.\n- 2-7 - [IxDA](https://interaction20.ixda.org/) -米兰-专门设计研讨会和讲座.\n- 4-7 - [ITASEC 2020](https://itasec.it/) -安科纳-网络安全意大利语会议.\n- 15 - [Global Power Platform Bootcamp 2020](https://www.eventbrite.it/e/biglietti-global-power-platform-bootcamp-2020-milan-88686085469) -Milano-Microsoft的Power Platform重点活动.\n- 21 - [ServerlessDays 2020](https://rome.serverlessdays.io/) -Milano-有关无服务器技术的面向开发人员的会议.\n\n## March\n- 4 - [A4I Agile for Innovation](https://www.agileforinnovation.com/) -米兰-敏捷概念如何在IT等领域发展.\n- 25-26 - [European Immersive Computing Summit 2020](https://eicsummit.com/) -米兰-欧洲新兴技术峰会.\n- 31 - [neo4j GraphTour](https://neo4j.com/graphtour/rome/) -罗姆人(Roma)-有关图形技术的全天课程.\n\n## April\n- 1 - [COBOL Day](https://2020.cobolday.it/) -维罗纳-COBOL专门会议.\n- 2 - [Ruby Day](https://2020.rubyday.it/) -维罗纳-Ruby专用会议.\n- 2 - [BeConnected Day 2020](https://www.eventbrite.it/e/registrazione-beconnected-day-2020-92290708995) -米兰-智能通讯和现代化工作场所.\n- 3 - [VueDay](https://2020.vueday.it/) -维罗纳-Vue专用会议.\n- 6 - [Code Beam Lite](https://codesync.global/conferences/code-beam-lite-italy-2020/) -博洛尼亚-关于Erlang生态系统的会议.\n- 18-19 - [DevFest](https://devfest.gdgpisa.it/) -比萨-有关Google相关技术的会议.\n- 24 - [Global Azure Milan 2020](https://join.globalazure.net/events/48) -米兰-Azure和云计算.\n- 27-28 - [Incontro DevOps](https://2020.incontrodevops.it/) -博洛尼亚-为期2天的DevOps会议.\n- 28-29 - [ItaliaSec](https://cyberseries.io/italiasec/) -米兰-这项具有开创意义的峰会是为高级安全领导而设计的.\n\n## May\n- 12-13 - [JSDay](https://2020.jsday.it/) -维罗纳-JavaScript专用会议.\n- 14 - [Pi Day HackParty](https://picampus.it/pi-day-2020/) -罗马-参加马拉松比赛.\n- 14-15 - [PHP Day](https://2020.phpday.it/) -Verona-PHP专用会议.\n- 16 - [Voxxed Days](https://voxxeddays.com/milan/) -Milano-开发者大会(主要与Java相关).\n- 23 - [Agile Venture Vimercate](https://agilemovement.it/2019/11/01/agile-venture-vimercate-2020/) -Vimercate-敏捷的测试方法.\n- 27-30 - [eRum 2020](https://2020.erum.io/) -米兰-每两年召开一次欧洲R用户会议.\n- 30 - [Agile People Day](https://www.agilepeopleday.com/) -博洛尼亚-过程和工具上的个人和互动.\n- 30 - [HackInBo](https://www.hackinbo.it/) -博洛尼亚-免费INFOSEC事件.\n\n## June\n- 5 - [Serverless Days](https://milan.serverlessdays.io/) -Milano-有关无服务器技术的面向开发人员的会议.\n- 6 - [Coderful](https://www.coderful.io/) -卡塔尼亚-前端会议.\n- 11-12 - [Codemotion](https://events.codemotion.com/conferences/rome/2020/) -罗马-意大利最大的技术会议.\n- 11-12 - [Angular Day](https://2020.angularday.it/) -维罗纳-Angular的全国会议.\n- 11-12 - [PGDay.IT](https://2020.pgday.it) -贝加莫-PostgreSQL意大利语会议.\n- 13 - [Italian C++ Conference](https://www.italiancpp.org/event/itcppcon20/) -罗马-意大利C ++会议.\n- 18 - [CloudConf 2020](https://2020.cloudconf.it/) -都灵-欧洲有关云的最重要会议.\n- 19-20 - [CSSDay 2020](https://2020.cssday.it/) -Faenza(RA)-前端开发人员和设计师专用会议.\n\n## July\n- 9-12 - [Hackmeeting](https://www.hackmeeting.org/hackit20/) -罗马-意大利数字反文化年会.\n- 29-2 - [IHC 2020](https://www.ihc.camp/2020/) -Padova-两年一度的意大利黑客营.\n\n## August\n\n## September\n- 11-12 - [Agile Business Day](https://www.agilebusinessday.com/en/agile-business-day-2-2/) -威尼斯-敏捷的业务,技术和人员方面.\n- 26 - [RomHack](https://www.romhack.io/) -��姆人-网络安全公约.\n\n## October\n- 9-11 - [Agile People Camp](https://agilemovement.it/agilepeoplecamp/) -蒙特格罗托温泉(PD)-敏捷的人文一面.\n- 16 - [ReactJSDay](http://reactjsday.it/) -维罗纳-React的全国会议.\n- 16-17 - [RustLab 2020](https://www.rustlab.it/) -Firenze-关于Rust的独特的意大利会议.\n- 18-20 - [GoLab](https://golab.io/) -Firenze-第一次Go上的意大利会议.\n- 22-23 - [ContainerDay](https://www.containerday.it/) -Bologna-致力于虚拟化最佳实践的意大利会议.\n\n## November\n- 5-8 - [PyCon XI](https://www.pycon.it/) -Firenze-Python的全国性会议.\n- 20-21 - [QtDay 2020](https://www.qtday.it/) -Firenze-关于Qt的独特的意大利会议.\n- 27-28 - [DroidCon](https://it.droidcon.com/2020/it) -Torino-意大利最大的Android活动.\n\n## December\n\n---\n\n## License\n[![CC-BY-SA-4.0](https://upload.wikimedia.org/wikipedia/commons/d/d0/CC-BY-SA_icon.svg)](http://creativecommons.org/licenses/by-sa/4.0/)\n"} +{"text": "---\ntitle: \"C# Client API\"\ndescription: \"C# Client API\"\nmenu:\n riak_ts-1.5.0:\n name: \"C#\"\n identifier: \"ts_csharp_api\"\n weight: 401\n parent: \"develop\"\nproject: \"riak_ts\"\nproject_version: \"1.5.0\"\ntoc: true\naliases:\n - /riakts/1.5.0/developing/csharp/\ncanonical_link: \"https://docs.basho.com/riak/ts/latest/developing/csharp\"\n---\n\n\nYou can develop applications and tools using Riak TS with the Riak .NET client.\nThis document covers the .NET API for Riak TS.\n\n\n## Overview\n\nThe `RiakClient.Commands.TS` namespace covers the public API for Riak TS in the .NET client.\n\nLanguage | Source | Documentation | Download\n:--------|:-------|:--------------|:--------\nC# | [riak-dotnet-client](https://github.com/basho/riak-dotnet-client) | [api docs](http://basho.github.io/riak-dotnet-client-api/), [wiki](https://github.com/basho/riak-dotnet-client/wiki) | [NuGet package](http://www.nuget.org/List/Packages/RiakClient), [GitHub Releases](https://github.com/basho/riak-dotnet-client/releases)\n\n\n## Data Types\n\n * `Cell` - Holds a single piece of data.\n * `Row` - Holds a collection of Cells.\n * `Column` - A metadata description of a column definition in a Riak TS table.\n\n\n### Data Type Details\n\n#### `Cell`\n\nA cell contains a piece of data for a row in a Riak TS table.\n\n>**Note:** Cells are immutable once created.\n\nUse the `Cell` implementation that takes a generic type to define the data type. The following .NET types can be saved into Riak TS:\n\n* `string`\n* `byte[]` - will be interpreted as UTF-8 encoded string data.\n* All integer types. Will be returned as `long` values.\n* `DateTime` - stored as UTC timestamp with millisecond resolution. Will be returned as UTC `DateTime` value.\n* `bool` - a true/false value.\n\n\n##### Constructors\n\nCell constructors accept a value matching the generic type of the class:\n\n * `var c = new Cell(\"string value\")`\n * `var c = new Cell(bytesOfUtf8Data)`\n * `var c = new Cell(123456)` - other integer types are allowed\n * `var c = new Cell(12.34F)`\n * `var c = new Cell(56.78)`\n * `var c = new Cell(false)`\n * `var c = new Cell(DateTime.Now)` - will be converted to UTC for you\n * `var c = new Cell()` - represents a `null` value\n * `var c = Cell.Null` - also represents a `null` value\n\n\n#### `Row`\n\nA row contains a collection of cells.\n\n>**Note:** Rows are immutable once created.\n\n\n#### `Column`\n\nThe column is a metadata description of a column definition in a Riak TS table, and contains both a column name and type.\n\n\n##### Constructor\n\n`Column(string name, ColumnType type)`\n\n```\npublic enum ColumnType\n{\n Varchar,\n Int64,\n Double,\n Timestamp,\n Boolean\n}\n```\n\n## Command Classes Index\n\nAll command classes have a static inner `Builder` class to create and build each command.\n\n* `Delete` - Deletes a single row by it's key values.\n* `Get` - Gets a single row by it's key values.\n* `Query` - Allows you to query a Riak TS table with the given query string.\n* `Store` - Stores data in the Riak TS table.\n* `ListKeys` - Lists the primary keys of all the rows in a Riak TS table.\n\n>**Warning:** `ListKeys` is a very expensive operation.\n\n\n### Command Class Details\n\nEach command is created through a static `Builder` subclass. This pattern ensures the commands are created as correctly as possible. To create the command from the builder, call the `.Build()` method.\n\nTo execute any command, you must have an instance of a `RiakClient` object. You then pass the command object as a parameter into the `Execute()` or `ExecuteAsync()` methods.\n\n\n#### `Delete`\n\nDeletes a single row by its key values.\n\n\n##### Builder\n\nThe builder for `Delete` takes the table name and a `Row` that identify the primary key. The order of the cells within the `Row` instance must match the order of the values in the primary key.\n\n * `WithTable(string table)`\n * `WithKey(Row key)`\n\nThere is also an instance method to specify a command timeout in milliseconds:\n\n * `WithTimeout(int timeout)`\n\n\n##### Return Value\n\n * `Response`\n\n\n#### `Get`\n\nGets a single row by its key values.\n\n\n##### Builder\n\nThe builder for `Get` takes the table name and a `Row` that identify the primary key. The order of the cells within the `Row` instance must match the order of the values in the primary key.\n\n * `WithTable(string table)`\n * `WithKey(Row key)`\n\nThere is also an instance method to specify a command timeout in milliseconds:\n\n * `WithTimeout(int timeout)`\n\n\n##### Return Value\n\n* `GetResponse` - 1 row if a match was found; 0 rows if no match was found.\n\n\n#### `ListKeys`\n\nLists the primary keys of all the rows in a Riak TS table via streaming.\n\n\n##### Builder\n\nThe builder takes the table name to list keys from:\n\n * `WithTable(string table)`\n\nYou may also specify a callback that will be called every time data is available from the streaming operation. If no callback is specified rows will be buffered completely in memory until the operation completes:\n\n * `WithCallback(Action callback)`\n\nThere is also an instance method to specify a command timeout in milliseconds:\n\n * `WithTimeout(int timeout)`\n\n\n##### Return Value\n\n* `ListKeysResponse` - will contain the complete set of rows if no callback specified, otherwise an empty set of rows since they will have all been delivered via the callback.\n\n\n#### `Query`\n\nAllows you to query a Riak TS table with the given query string.\n\n```csharp\nvar qfmt = \"SELECT * FROM GeoCheckin WHERE time > {0} and time < {1} and region = 'Pacific' and state = 'Washington'\";\nvar q = string.Format(\n qfmt,\n DateTimeUtil.ToUnixTimeMillis(TenMinsAgo),\n DateTimeUtil.ToUnixTimeMillis(Now));\n\nvar cmd = new Query.Builder()\n .WithTable(\"GeoCheckin\")\n .WithQuery(q)\n .Build();\n\nRiakResult rslt = client.Execute(cmd);\n```\n"} +{"text": "/**\n * Designed and developed by Aidan Follestad (@afollestad)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage com.bernaferrari.base.livedata\n\nimport androidx.lifecycle.LiveData\nimport androidx.lifecycle.MediatorLiveData\nimport androidx.lifecycle.Observer\n\n/** @author Aidan Follestad (@afollestad) */\nclass DistinctLiveData(source1: LiveData) : MediatorLiveData() {\n\n private var isInitialized = false\n private var lastValue: T? = null\n\n init {\n super.addSource(source1) {\n if (!isInitialized) {\n value = it\n isInitialized = true\n lastValue = it\n } else if (lastValue != it) {\n value = it\n lastValue = it\n }\n }\n }\n\n override fun addSource(\n source: LiveData,\n onChanged: Observer\n ) {\n throw UnsupportedOperationException()\n }\n\n override fun removeSource(toRemote: LiveData) {\n throw UnsupportedOperationException()\n }\n}\n\n/**\n * Wraps the receiving LiveData instance with a [DistinctLiveData], filtering out duplicates.\n */\nfun LiveData.distinct(): MediatorLiveData = DistinctLiveData(this)\n"} +{"text": "/*\n * Vector2.cpp\n * HRVO Library\n *\n * Copyright (c) 2009-2015 University of North Carolina at Chapel Hill.\n * All rights reserved.\n *\n * Permission to use, copy, modify, and distribute this software and its\n * documentation for educational, non-commercial research, and non-profit\n * purposes, without fee, and without a written agreement is hereby granted,\n * provided that the above copyright notice, this paragraph, and the following\n * four paragraphs appear in all copies.\n *\n * Permission to incorporate this software into commercial products may be\n * obtained by contacting the authors or the Office of\n * Technology Development at the University of North Carolina at Chapel Hill\n * .\n *\n * This software program and documentation are copyrighted by the University of\n * North Carolina at Chapel Hill. The software program and documentation are\n * supplied \"as is,\" without any accompanying services from the University of\n * North Carolina at Chapel Hill or the authors. The University of North\n * Carolina at Chapel Hill and the authors do not warrant that the operation of\n * the program will be uninterrupted or error-free. The end-user understands\n * that the program was developed for research purposes and is advised not to\n * rely exclusively on the program for any reason.\n *\n * IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL OR THE\n * AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR\n * CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS\n * SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF NORTH CAROLINA AT\n * CHAPEL HILL OR THE AUTHORS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH\n * DAMAGE.\n *\n * THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE AUTHORS SPECIFICALLY\n * DISCLAIM ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY\n * STATUTORY WARRANTY OF NON-INFRINGEMENT. THE SOFTWARE PROVIDED HEREUNDER IS ON\n * AN \"AS IS\" BASIS, AND THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL AND THE\n * AUTHORS HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,\n * ENHANCEMENTS, OR MODIFICATIONS.\n *\n * Please send all bug reports to .\n *\n * The authors may be contacted via:\n *\n * Jamie Snape, Jur van den Berg, Stephen J. Guy, and Dinesh Manocha\n * Dept. of Computer Science\n * 201 S. Columbia St.\n * Frederick P. Brooks, Jr. Computer Science Bldg.\n * Chapel Hill, N.C. 27599-3175\n * United States of America\n *\n * \n */\n\n/**\n * \\file Vector2.cpp\n * \\brief Defines the Vector2 class.\n */\n\n#ifndef HRVO_VECTOR2_H_\n#include \"Vector2.h\"\n#endif\n\n#include \n\nnamespace hrvo {\n\tstd::ostream &operator<<(std::ostream &stream, const Vector2 &vector)\n\t{\n\t\tstream << vector.getX() << \" \" << vector.getY();\n\n\t\treturn stream;\n\t}\n}\n"} +{"text": "// RUN: %clang_cc1 -fsyntax-only %s -std=c++11 -ast-dump -ast-dump-filter AutoVar | FileCheck %s\n\nnamespace {\n class foo {\n };\n}\n\n#pragma GCC visibility push(hidden)\nauto AutoVar = foo();\n\n// CHECK: VarDecl {{.*}} AutoVar\n// CHECK-NOT: VisibilityAttr\n"} +{"text": "/*\n * Copyright (C) 2016-2020 phantom.bot\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see .\n */\npackage tv.phantombot.event.irc.message;\n\nimport java.util.Map;\n\nimport tv.phantombot.twitch.irc.TwitchSession;\n\npublic class IrcChannelMessageEvent extends IrcMessageEvent {\n\n /**\n * Class constructor.\n *\n * @param {TwitchSession} session\n * @param {String} sender\n * @param {String} message\n */\n public IrcChannelMessageEvent(TwitchSession session, String sender, String message) {\n super(session, sender, message);\n }\n\n /**\n * Class constructor.\n *\n * @param {TwitchSession} session\n * @param {String} sender\n * @param {String} message\n * @param {Map} tags\n */\n public IrcChannelMessageEvent(TwitchSession session, String sender, String message, Map tags) {\n super(session, sender, message, tags);\n }\n}\n"} +{"text": "\nvar ReturnReport = {\n PageClick: function (pageIndex, pageSize) {\n pageIndex = pageIndex == undefined ? 1 : pageIndex;\n pageSize = pageSize == undefined ? 10 : pageSize;\n var queryTime = $(\"#liStatusGroup\").find(\".active\").find(\"input:hidden\").val();\n var param = {};\n param[\"QueryTime\"] = queryTime;\n param[\"PageSize\"] = pageSize;\n param[\"PageIndex\"] = pageIndex;\n\n $.gitAjax({\n url: \"/Report/ReportAjax/ReturnReportList\",\n data: param,\n type: \"post\",\n dataType: \"json\",\n success: function (result) {\n var json = result;\n var html = \"\";\n var htmlDetail = \"\";\n if (json.Data != undefined && json.Data.List != undefined && json.Data.List.length > 0) {\n $(json.Data.List).each(function (i, item) {\n html += \"\";\n html += \"\" + item.ProductNum + \"\";\n html += \"\" + item.BarCode + \"\";\n html += \"\" + item.ProductName + \"\";\n html += \"\" + item.Num + \"\";\n html += \"\" + item.Amount + \"\";\n html += \"\";\n html += git.ToDecimal(item.NumPCT, 2) + \"%\";\n html += \"\";\n html += \"\";\n });\n }\n $(\"#tabInfo tbody\").html(html);\n $(\"#mypager\").pager({ pagenumber: pageIndex, recordCount: result.RowCount, pageSize: pageSize, buttonClickCallback: ReturnReport.PageClick });\n }\n });\n },\n //显示订单数量排名前十的客户\n ReturnReportTOP10: function (pageIndex, pageSize) {\n pageIndex = pageIndex == undefined ? 1 : pageIndex;\n pageSize = pageSize == undefined ? 10 : pageSize;\n var queryTime = $(\"#liStatusGroup\").find(\".active\").find(\"input:hidden\").val();\n var param = {};\n param[\"QueryTime\"] = queryTime;\n param[\"PageSize\"] = pageSize;\n param[\"PageIndex\"] = pageIndex;\n\n $.gitAjax({\n url: \"/Report/ReportAjax/ReturnTOP10Num\",\n data: param,\n type: \"post\",\n dataType: \"json\",\n success: function (result) {\n var json = result;\n var html = \"\";\n if (json.Data != undefined && json.Data.List != undefined && json.Data.List.length > 0) {\n $(json.Data.List).each(function (i, item) {\n html += \"\";\n html += \"\" + parseInt(i + 1) + \"\";\n html += \"\" + item.ProductName + \"\";\n html += \"\" + item.TotalNum + \"\";\n html += \"\";\n });\n }\n $(\"#tabInfoDetail tbody\").html(html);\n\n var so = new SWFObject(\"/Theme/plugins/ampie/ampie.swf\", \"InStorageAmpie\", \"100%\", \"400\", \"8\", \"#FFFFFF\");\n so.addVariable(\"path\", \"/Theme/plugins/ampie/\");\n so.addVariable(\"settings_file\", encodeURIComponent(\"/Theme/plugins/ampie/kampie_settings.xml\"));\n so.addVariable(\"chart_data\", encodeURIComponent(result.InStorageData));\n so.write(\"ampieDIV\");\n }\n });\n },\n TabClick: function () {\n $(\"#liStatusGroup\").children(\"li\").click(function () {\n $(\"#liStatusGroup\").children(\"li\").removeClass(\"active\");\n $(this).addClass(\"active\");\n ReturnReport.PageClick(1, 10);\n ReturnReport.ReturnReportTOP10(1, 10);\n });\n }\n};"} +{"text": "/*\n * Copyright 2000-2014 JetBrains s.r.o.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.jetbrains.java.decompiler.code.optinstructions;\n\nimport org.jetbrains.java.decompiler.code.Instruction;\n\nimport java.io.DataOutputStream;\nimport java.io.IOException;\n\npublic class LDC extends Instruction {\n\n public void writeToStream(DataOutputStream out, int offset) throws IOException {\n out.writeByte(opc_ldc);\n out.writeByte(getOperand(0));\n }\n\n public int length() {\n return 2;\n }\n}\n"} +{"text": "/**\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.activemq.transport.udp;\n\nimport java.io.IOException;\nimport java.net.SocketAddress;\n\nimport org.apache.activemq.Service;\nimport org.apache.activemq.command.Command;\nimport org.apache.activemq.transport.reliable.ReplayBuffer;\nimport org.apache.activemq.transport.reliable.Replayer;\n\n/**\n *\n * \n */\npublic interface CommandChannel extends Replayer, Service {\n\n Command read() throws IOException;\n\n void write(Command command, SocketAddress address) throws IOException;\n\n int getDatagramSize();\n\n /**\n * Sets the default size of a datagram on the network.\n */\n void setDatagramSize(int datagramSize);\n\n DatagramHeaderMarshaller getHeaderMarshaller();\n\n void setHeaderMarshaller(DatagramHeaderMarshaller headerMarshaller);\n\n void setTargetAddress(SocketAddress address);\n\n void setReplayAddress(SocketAddress address);\n\n void setReplayBuffer(ReplayBuffer replayBuffer);\n \n public int getReceiveCounter();\n\n}\n"} +{"text": "'use strict';\n\nvar util = require('util');\nvar _ = require('underscore');\n_.str = require('underscore.string');\n\n// Constants\nvar $$ = require('../const');\n\nvar HelpFormatter = require('./formatter.js');\n\n/**\n * new RawDescriptionHelpFormatter(options)\n * new ArgumentParser({formatterClass: argparse.RawDescriptionHelpFormatter, ...})\n *\n * Help message formatter which adds default values to argument help.\n *\n * Only the name of this class is considered a public API. All the methods\n * provided by the class are considered an implementation detail.\n **/\n\nvar ArgumentDefaultsHelpFormatter = function ArgumentDefaultsHelpFormatter(options) {\n HelpFormatter.call(this, options);\n};\n\nutil.inherits(ArgumentDefaultsHelpFormatter, HelpFormatter);\n\nArgumentDefaultsHelpFormatter.prototype._getHelpString = function (action) {\n var help = action.help;\n if (action.help.indexOf('%(defaultValue)s') === -1) {\n if (action.defaultValue !== $$.SUPPRESS) {\n var defaulting_nargs = [$$.OPTIONAL, $$.ZERO_OR_MORE];\n if (action.isOptional() || (defaulting_nargs.indexOf(action.nargs) >= 0)) {\n help += ' (default: %(defaultValue)s)';\n }\n }\n }\n return help;\n};\n\nmodule.exports.ArgumentDefaultsHelpFormatter = ArgumentDefaultsHelpFormatter;\n\n/**\n * new RawDescriptionHelpFormatter(options)\n * new ArgumentParser({formatterClass: argparse.RawDescriptionHelpFormatter, ...})\n *\n * Help message formatter which retains any formatting in descriptions.\n *\n * Only the name of this class is considered a public API. All the methods\n * provided by the class are considered an implementation detail.\n **/\n\nvar RawDescriptionHelpFormatter = function RawDescriptionHelpFormatter(options) {\n HelpFormatter.call(this, options);\n};\n\nutil.inherits(RawDescriptionHelpFormatter, HelpFormatter);\n\nRawDescriptionHelpFormatter.prototype._fillText = function (text, width, indent) {\n var lines = text.split('\\n');\n lines = lines.map(function (line) {\n return _.str.rtrim(indent + line);\n });\n return lines.join('\\n');\n};\nmodule.exports.RawDescriptionHelpFormatter = RawDescriptionHelpFormatter;\n\n/**\n * new RawTextHelpFormatter(options)\n * new ArgumentParser({formatterClass: argparse.RawTextHelpFormatter, ...})\n *\n * Help message formatter which retains formatting of all help text.\n *\n * Only the name of this class is considered a public API. All the methods\n * provided by the class are considered an implementation detail.\n **/\n\nvar RawTextHelpFormatter = function RawTextHelpFormatter(options) {\n RawDescriptionHelpFormatter.call(this, options);\n};\n\nutil.inherits(RawTextHelpFormatter, RawDescriptionHelpFormatter);\n\nRawTextHelpFormatter.prototype._splitLines = function (text) {\n return text.split('\\n');\n};\n\nmodule.exports.RawTextHelpFormatter = RawTextHelpFormatter;\n"} +{"text": "struct MBC5 : Mapper {\n Node::Rumble rumble;\n auto load(Node::Object) -> void override;\n\n auto read(uint16 address) -> uint8;\n auto write(uint16 address, uint8 data) -> void;\n auto power() -> void;\n auto serialize(serializer&) -> void;\n\n struct IO {\n struct ROM {\n uint9 bank = 0x01;\n } rom;\n struct RAM {\n uint1 enable;\n uint4 bank;\n } ram;\n } io;\n} mbc5;\n"} +{"text": "/*\n * Mesa 3-D graphics library\n *\n * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included\n * in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n *\n * Authors:\n * Brian Paul Keith Whitwell \n */\n\n/*\n * Regarding GL_NV_texgen_reflection:\n *\n * Portions of this software may use or implement intellectual\n * property owned and licensed by NVIDIA Corporation. NVIDIA disclaims\n * any and all warranties with respect to such intellectual property,\n * including any use thereof or modifications thereto.\n */\n\n#include \"main/errors.h\"\n#include \"main/glheader.h\"\n#include \"main/macros.h\"\n\n#include \"main/mtypes.h\"\n\n#include \"math/m_xform.h\"\n\n#include \"t_context.h\"\n#include \"t_pipeline.h\"\n\n\n/***********************************************************************\n * Automatic texture coordinate generation (texgen) code.\n */\n\n\nstruct texgen_stage_data;\n\ntypedef void (*texgen_func)( struct gl_context *ctx,\n\t\t\t struct texgen_stage_data *store,\n\t\t\t GLuint unit);\n\n\nstruct texgen_stage_data {\n\n /* Per-texunit derived state.\n */\n GLuint TexgenSize[MAX_TEXTURE_COORD_UNITS];\n texgen_func TexgenFunc[MAX_TEXTURE_COORD_UNITS];\n\n /* Temporary values used in texgen.\n */\n GLfloat (*tmp_f)[3];\n GLfloat *tmp_m;\n\n /* Buffered outputs of the stage.\n */\n GLvector4f texcoord[MAX_TEXTURE_COORD_UNITS];\n};\n\n\n#define TEXGEN_STAGE_DATA(stage) ((struct texgen_stage_data *)stage->privatePtr)\n\n\n\nstatic GLuint all_bits[5] = {\n 0,\n VEC_SIZE_1,\n VEC_SIZE_2,\n VEC_SIZE_3,\n VEC_SIZE_4,\n};\n\n#define VEC_SIZE_FLAGS (VEC_SIZE_1|VEC_SIZE_2|VEC_SIZE_3|VEC_SIZE_4)\n\n#define TEXGEN_NEED_M (TEXGEN_SPHERE_MAP)\n#define TEXGEN_NEED_F (TEXGEN_SPHERE_MAP | \\\n\t\t\t\t TEXGEN_REFLECTION_MAP_NV)\n\n\n\nstatic void build_m3( GLfloat f[][3], GLfloat m[],\n\t\t const GLvector4f *normal,\n\t\t const GLvector4f *eye )\n{\n GLuint stride = eye->stride;\n GLfloat *coord = (GLfloat *)eye->start;\n GLuint count = eye->count;\n const GLfloat *norm = normal->start;\n GLuint i;\n\n for (i=0;istride)) {\n GLfloat u[3], two_nu, fx, fy, fz;\n COPY_3V( u, coord );\n NORMALIZE_3FV( u );\n two_nu = 2.0F * DOT3(norm,u);\n fx = f[i][0] = u[0] - norm[0] * two_nu;\n fy = f[i][1] = u[1] - norm[1] * two_nu;\n fz = f[i][2] = u[2] - norm[2] * two_nu;\n m[i] = fx * fx + fy * fy + (fz + 1.0F) * (fz + 1.0F);\n if (m[i] != 0.0F) {\n\t m[i] = 0.5F * (1.0f / sqrtf(m[i]));\n }\n }\n}\n\n\n\nstatic void build_m2( GLfloat f[][3], GLfloat m[],\n\t\t const GLvector4f *normal,\n\t\t const GLvector4f *eye )\n{\n GLuint stride = eye->stride;\n GLfloat *coord = eye->start;\n GLuint count = eye->count;\n\n GLfloat *norm = normal->start;\n GLuint i;\n\n for (i=0;istride)) {\n GLfloat u[3], two_nu, fx, fy, fz;\n COPY_2V( u, coord );\n u[2] = 0;\n NORMALIZE_3FV( u );\n two_nu = 2.0F * DOT3(norm,u);\n fx = f[i][0] = u[0] - norm[0] * two_nu;\n fy = f[i][1] = u[1] - norm[1] * two_nu;\n fz = f[i][2] = u[2] - norm[2] * two_nu;\n m[i] = fx * fx + fy * fy + (fz + 1.0F) * (fz + 1.0F);\n if (m[i] != 0.0F) {\n\t m[i] = 0.5F * (1.0f / sqrtf(m[i]));\n }\n }\n}\n\n\n\ntypedef void (*build_m_func)( GLfloat f[][3],\n\t\t\t GLfloat m[],\n\t\t\t const GLvector4f *normal,\n\t\t\t const GLvector4f *eye );\n\n\nstatic build_m_func build_m_tab[5] = {\n NULL,\n NULL,\n build_m2,\n build_m3,\n build_m3\n};\n\n\n/* This is unusual in that we respect the stride of the output vector\n * (f). This allows us to pass in either a texcoord vector4f, or a\n * temporary vector3f.\n */\nstatic void build_f3( GLfloat *f,\n\t\t GLuint fstride,\n\t\t const GLvector4f *normal,\n\t\t const GLvector4f *eye )\n{\n GLuint stride = eye->stride;\n GLfloat *coord = eye->start;\n GLuint count = eye->count;\n\n GLfloat *norm = normal->start;\n GLuint i;\n\n for (i=0;istride);\n }\n}\n\n\nstatic void build_f2( GLfloat *f,\n\t\t GLuint fstride,\n\t\t const GLvector4f *normal,\n\t\t const GLvector4f *eye )\n{\n GLuint stride = eye->stride;\n GLfloat *coord = eye->start;\n GLuint count = eye->count;\n GLfloat *norm = normal->start;\n GLuint i;\n\n for (i=0;istride);\n }\n}\n\ntypedef void (*build_f_func)( GLfloat *f,\n\t\t\t GLuint fstride,\n\t\t\t const GLvector4f *normal_vec,\n\t\t\t const GLvector4f *eye );\n\n\n\n/* Just treat 4-vectors as 3-vectors.\n */\nstatic build_f_func build_f_tab[5] = {\n NULL,\n NULL,\n build_f2,\n build_f3,\n build_f3\n};\n\n\n\n/* Special case texgen functions.\n */\nstatic void texgen_reflection_map_nv( struct gl_context *ctx,\n\t\t\t\t struct texgen_stage_data *store,\n\t\t\t\t GLuint unit )\n{\n struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;\n GLvector4f *in = VB->AttribPtr[VERT_ATTRIB_TEX0 + unit];\n GLvector4f *out = &store->texcoord[unit];\n\n build_f_tab[VB->EyePtr->size]( out->start,\n\t\t\t\t out->stride,\n\t\t\t\t VB->AttribPtr[_TNL_ATTRIB_NORMAL],\n\t\t\t\t VB->EyePtr );\n\n out->flags |= (in->flags & VEC_SIZE_FLAGS) | VEC_SIZE_3;\n out->count = VB->Count;\n out->size = MAX2(in->size, 3);\n if (in->size == 4)\n _mesa_copy_tab[0x8]( out, in );\n}\n\n\n\nstatic void texgen_normal_map_nv( struct gl_context *ctx,\n\t\t\t\t struct texgen_stage_data *store,\n\t\t\t\t GLuint unit )\n{\n struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;\n GLvector4f *in = VB->AttribPtr[VERT_ATTRIB_TEX0 + unit];\n GLvector4f *out = &store->texcoord[unit];\n GLvector4f *normal = VB->AttribPtr[_TNL_ATTRIB_NORMAL];\n GLfloat (*texcoord)[4] = (GLfloat (*)[4])out->start;\n GLuint count = VB->Count;\n GLuint i;\n const GLfloat *norm = normal->start;\n\n for (i=0;istride)) {\n texcoord[i][0] = norm[0];\n texcoord[i][1] = norm[1];\n texcoord[i][2] = norm[2];\n }\n\n\n out->flags |= (in->flags & VEC_SIZE_FLAGS) | VEC_SIZE_3;\n out->count = count;\n out->size = MAX2(in->size, 3);\n if (in->size == 4)\n _mesa_copy_tab[0x8]( out, in );\n}\n\n\nstatic void texgen_sphere_map( struct gl_context *ctx,\n\t\t\t struct texgen_stage_data *store,\n\t\t\t GLuint unit )\n{\n struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;\n GLvector4f *in = VB->AttribPtr[VERT_ATTRIB_TEX0 + unit];\n GLvector4f *out = &store->texcoord[unit];\n GLfloat (*texcoord)[4] = (GLfloat (*)[4]) out->start;\n GLuint count = VB->Count;\n GLuint i;\n GLfloat (*f)[3] = store->tmp_f;\n GLfloat *m = store->tmp_m;\n\n (build_m_tab[VB->EyePtr->size])( store->tmp_f,\n\t\t\t\t store->tmp_m,\n\t\t\t\t VB->AttribPtr[_TNL_ATTRIB_NORMAL],\n\t\t\t\t VB->EyePtr );\n\n out->size = MAX2(in->size,2);\n\n for (i=0;icount = count;\n out->flags |= (in->flags & VEC_SIZE_FLAGS) | VEC_SIZE_2;\n if (in->size > 2)\n _mesa_copy_tab[all_bits[in->size] & ~0x3]( out, in );\n}\n\n\n\nstatic void texgen( struct gl_context *ctx,\n\t\t struct texgen_stage_data *store,\n\t\t GLuint unit )\n{\n TNLcontext *tnl = TNL_CONTEXT(ctx);\n struct vertex_buffer *VB = &tnl->vb;\n GLvector4f *in = VB->AttribPtr[VERT_ATTRIB_TEX0 + unit];\n GLvector4f *out = &store->texcoord[unit];\n const struct gl_fixedfunc_texture_unit *texUnit =\n &ctx->Texture.FixedFuncUnit[unit];\n const GLvector4f *obj = VB->AttribPtr[_TNL_ATTRIB_POS];\n const GLvector4f *eye = VB->EyePtr;\n const GLvector4f *normal = VB->AttribPtr[_TNL_ATTRIB_NORMAL];\n const GLfloat *m = store->tmp_m;\n const GLuint count = VB->Count;\n GLfloat (*texcoord)[4] = (GLfloat (*)[4])out->data;\n GLfloat (*f)[3] = store->tmp_f;\n GLuint copy;\n\n if (texUnit->_GenFlags & TEXGEN_NEED_M) {\n build_m_tab[eye->size]( store->tmp_f, store->tmp_m, normal, eye );\n } else if (texUnit->_GenFlags & TEXGEN_NEED_F) {\n build_f_tab[eye->size]( (GLfloat *)store->tmp_f, 3, normal, eye );\n }\n\n\n out->size = MAX2(in->size, store->TexgenSize[unit]);\n out->flags |= (in->flags & VEC_SIZE_FLAGS) | texUnit->TexGenEnabled;\n out->count = count;\n\n copy = (all_bits[in->size] & ~texUnit->TexGenEnabled);\n if (copy)\n _mesa_copy_tab[copy]( out, in );\n\n if (texUnit->TexGenEnabled & S_BIT) {\n GLuint i;\n switch (texUnit->GenS.Mode) {\n case GL_OBJECT_LINEAR:\n\t _mesa_dotprod_tab[obj->size]( (GLfloat *)out->data,\n\t\t\t\t sizeof(out->data[0]), obj,\n\t\t\t\t texUnit->GenS.ObjectPlane );\n\t break;\n case GL_EYE_LINEAR:\n\t _mesa_dotprod_tab[eye->size]( (GLfloat *)out->data,\n\t\t\t\t sizeof(out->data[0]), eye,\n\t\t\t\t texUnit->GenS.EyePlane );\n\t break;\n case GL_SPHERE_MAP:\n for (i = 0; i < count; i++)\n texcoord[i][0] = f[i][0] * m[i] + 0.5F;\n\t break;\n case GL_REFLECTION_MAP_NV:\n\t for (i=0;istart;\n\t for (i=0;istride)) {\n\t texcoord[i][0] = norm[0];\n\t }\n\t break;\n }\n default:\n\t _mesa_problem(ctx, \"Bad S texgen\");\n }\n }\n\n if (texUnit->TexGenEnabled & T_BIT) {\n GLuint i;\n switch (texUnit->GenT.Mode) {\n case GL_OBJECT_LINEAR:\n\t _mesa_dotprod_tab[obj->size]( &(out->data[0][1]),\n\t\t\t\t sizeof(out->data[0]), obj,\n\t\t\t\t texUnit->GenT.ObjectPlane );\n\t break;\n case GL_EYE_LINEAR:\n\t _mesa_dotprod_tab[eye->size]( &(out->data[0][1]),\n\t\t\t\t sizeof(out->data[0]), eye,\n\t\t\t\t texUnit->GenT.EyePlane );\n\t break;\n case GL_SPHERE_MAP:\n for (i = 0; i < count; i++)\n texcoord[i][1] = f[i][1] * m[i] + 0.5F;\n\t break;\n case GL_REFLECTION_MAP_NV:\n\t for (i=0;istart;\n\t for (i=0;istride)) {\n\t texcoord[i][1] = norm[1];\n\t }\n\t break;\n }\n default:\n\t _mesa_problem(ctx, \"Bad T texgen\");\n }\n }\n\n if (texUnit->TexGenEnabled & R_BIT) {\n GLuint i;\n switch (texUnit->GenR.Mode) {\n case GL_OBJECT_LINEAR:\n\t _mesa_dotprod_tab[obj->size]( &(out->data[0][2]),\n\t\t\t\t sizeof(out->data[0]), obj,\n\t\t\t\t texUnit->GenR.ObjectPlane );\n\t break;\n case GL_EYE_LINEAR:\n\t _mesa_dotprod_tab[eye->size]( &(out->data[0][2]),\n\t\t\t\t sizeof(out->data[0]), eye,\n\t\t\t\t texUnit->GenR.EyePlane );\n\t break;\n case GL_REFLECTION_MAP_NV:\n\t for (i=0;istart;\n\t for (i=0;istride)) {\n\t texcoord[i][2] = norm[2];\n\t }\n\t break;\n }\n default:\n\t _mesa_problem(ctx, \"Bad R texgen\");\n }\n }\n\n if (texUnit->TexGenEnabled & Q_BIT) {\n switch (texUnit->GenQ.Mode) {\n case GL_OBJECT_LINEAR:\n\t _mesa_dotprod_tab[obj->size]( &(out->data[0][3]),\n\t\t\t\t sizeof(out->data[0]), obj,\n\t\t\t\t texUnit->GenQ.ObjectPlane );\n\t break;\n case GL_EYE_LINEAR:\n\t _mesa_dotprod_tab[eye->size]( &(out->data[0][3]),\n\t\t\t\t sizeof(out->data[0]), eye,\n\t\t\t\t texUnit->GenQ.EyePlane );\n\t break;\n default:\n\t _mesa_problem(ctx, \"Bad Q texgen\");\n }\n }\n}\n\n\n\n\nstatic GLboolean run_texgen_stage( struct gl_context *ctx,\n\t\t\t\t struct tnl_pipeline_stage *stage )\n{\n struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;\n struct texgen_stage_data *store = TEXGEN_STAGE_DATA(stage);\n GLuint i;\n\n if (!ctx->Texture._TexGenEnabled || ctx->VertexProgram._Current)\n return GL_TRUE;\n\n for (i = 0 ; i < ctx->Const.MaxTextureCoordUnits ; i++) {\n struct gl_fixedfunc_texture_unit *texUnit =\n &ctx->Texture.FixedFuncUnit[i];\n\n if (texUnit->TexGenEnabled) {\n\t store->TexgenFunc[i]( ctx, store, i );\n\n VB->AttribPtr[VERT_ATTRIB_TEX0 + i] = &store->texcoord[i];\n }\n }\n\n return GL_TRUE;\n}\n\n\nstatic void validate_texgen_stage( struct gl_context *ctx,\n\t\t\t\t struct tnl_pipeline_stage *stage )\n{\n struct texgen_stage_data *store = TEXGEN_STAGE_DATA(stage);\n GLuint i;\n\n if (!ctx->Texture._TexGenEnabled || ctx->VertexProgram._Current)\n return;\n\n for (i = 0 ; i < ctx->Const.MaxTextureCoordUnits ; i++) {\n struct gl_fixedfunc_texture_unit *texUnit =\n &ctx->Texture.FixedFuncUnit[i];\n\n if (texUnit->TexGenEnabled) {\n\t GLuint sz;\n\n\t if (texUnit->TexGenEnabled & Q_BIT)\n\t sz = 4;\n\t else if (texUnit->TexGenEnabled & R_BIT)\n\t sz = 3;\n\t else if (texUnit->TexGenEnabled & T_BIT)\n\t sz = 2;\n\t else\n\t sz = 1;\n\n\t store->TexgenSize[i] = sz;\n\t store->TexgenFunc[i] = texgen; /* general solution */\n\n /* look for special texgen cases */\n\t if (texUnit->TexGenEnabled == (S_BIT|T_BIT|R_BIT)) {\n\t if (texUnit->_GenFlags == TEXGEN_REFLECTION_MAP_NV) {\n\t store->TexgenFunc[i] = texgen_reflection_map_nv;\n\t }\n\t else if (texUnit->_GenFlags == TEXGEN_NORMAL_MAP_NV) {\n\t store->TexgenFunc[i] = texgen_normal_map_nv;\n\t }\n\t }\n\t else if (texUnit->TexGenEnabled == (S_BIT|T_BIT) &&\n\t\t texUnit->_GenFlags == TEXGEN_SPHERE_MAP) {\n\t store->TexgenFunc[i] = texgen_sphere_map;\n\t }\n }\n }\n}\n\n\n\n\n\n/* Called the first time stage->run() is invoked.\n */\nstatic GLboolean alloc_texgen_data( struct gl_context *ctx,\n\t\t\t\t struct tnl_pipeline_stage *stage )\n{\n struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;\n struct texgen_stage_data *store;\n GLuint i;\n\n stage->privatePtr = calloc(1, sizeof(*store));\n store = TEXGEN_STAGE_DATA(stage);\n if (!store)\n return GL_FALSE;\n\n for (i = 0 ; i < ctx->Const.MaxTextureCoordUnits ; i++)\n _mesa_vector4f_alloc( &store->texcoord[i], 0, VB->Size, 32 );\n\n store->tmp_f = malloc(VB->Size * sizeof(GLfloat) * 3);\n store->tmp_m = malloc(VB->Size * sizeof(GLfloat));\n\n return GL_TRUE;\n}\n\n\nstatic void free_texgen_data( struct tnl_pipeline_stage *stage )\n\n{\n struct texgen_stage_data *store = TEXGEN_STAGE_DATA(stage);\n GLuint i;\n\n if (store) {\n for (i = 0 ; i < MAX_TEXTURE_COORD_UNITS ; i++)\n\t if (store->texcoord[i].data)\n\t _mesa_vector4f_free( &store->texcoord[i] );\n\n\n free( store->tmp_f );\n free( store->tmp_m );\n free( store );\n stage->privatePtr = NULL;\n }\n}\n\n\n\nconst struct tnl_pipeline_stage _tnl_texgen_stage =\n{\n \"texgen\",\t\t\t/* name */\n NULL,\t\t\t/* private data */\n alloc_texgen_data,\t\t/* destructor */\n free_texgen_data,\t\t/* destructor */\n validate_texgen_stage,\t\t/* check */\n run_texgen_stage\t\t/* run -- initially set to alloc data */\n};\n"} +{"text": "#include \"globals.h\"\r\n\r\n/////////////////////////////////////////////////////////////////////////\r\n// SAPI5 TTSAPP\r\n//\r\n// Dialog box application used to manually verify SAPI5 TTS methods\r\n// \r\n//\r\n// Revision History:\r\n// 06/18/99 Created\r\n//Copyright (c) Microsoft Corporation. All rights reserved.\r\n//\r\n/////////////////////////////////////////////////////////////////////////\r\n\r\n//\r\n// Function prototypes\r\n//\r\nint WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpszCmdLine, int nCmdShow );\r\n\r\n// ---------------------------------------------------------------------------\r\n// WinMain\r\n// ---------------------------------------------------------------------------\r\n// Description: Program entry point.\r\n// Arguments:\r\n// HINSTANCE [in] Program instance handle.\r\n// HINSTANCE [in] Unused in Win32.\r\n// LPSTR [in] Program command line.\r\n// int [in] Command to pass to ShowWindow().\r\n// Returns:\r\n// int 0 if all goes well.\r\n\r\nint WINAPI WinMain( HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpszCmdLine, int nCmdShow )\r\n{\r\n HWND hWnd = NULL;\r\n HWND hChild = NULL;\r\n WNDCLASSEX wc;\r\n HRESULT hr = S_OK;\r\n \r\n\t// Initialize the Win95 control library\r\n\tInitCommonControls();\r\n\r\n\t// Load the library containing the rich edit control\r\n\tHMODULE hMod = LoadLibrary( TEXT( \"riched20.dll\" ) );\r\n\tif( !hMod )\r\n\t{\r\n\t\tMessageBox( NULL, _T(\"Couldn't find riched32.dll. Shutting down!\"), \r\n\t\t\t\t\t_T(\"Error - Missing dll\"), MB_OK );\r\n\t}\r\n\r\n\tif ( hMod )\r\n\t{\r\n\t // Initialize COM library on the current thread and identify the concurrency model as\r\n\t\t// single-thread apartment (STA). Applications must initialize the COM library before they\r\n\t\t// can call COM library functions other than CoGetMalloc and memory allocation functions.\r\n\t\t// New application developers may choose to use CoInitializeEx rather than CoInitialize, allowing\r\n\t\t// them to set the concurrency model to apartment or multi-threaded.\r\n\t CoInitialize( NULL );\r\n\r\n\t // Register the child window class\r\n\t ZeroMemory( &wc, sizeof( wc ) );\r\n\t wc.cbSize = sizeof( wc );\r\n\t wc.style = CS_HREDRAW | CS_VREDRAW;\r\n\t wc.lpfnWndProc = ChildWndProc;\r\n\t wc.hInstance = hInst;\r\n\t wc.hIcon = LoadIcon( hInst, (LPCTSTR) IDI_APPICON );\r\n\t wc.hCursor = LoadCursor( NULL, IDC_CROSS );\r\n\t wc.hbrBackground = GetSysColorBrush( COLOR_3DFACE );\r\n\t wc.lpszMenuName = NULL;\r\n\t wc.lpszClassName = CHILD_CLASS;\r\n\t wc.hIconSm = LoadIcon( hInst, (LPCTSTR) IDI_APPICON );\r\n\r\n\t if( RegisterClassEx( &wc ) )\r\n\t {\r\n\t CTTSApp DlgClass( hInst );\r\n\t hr = DlgClass.InitSapi();\r\n\t \r\n\t if( SUCCEEDED( hr ) )\r\n\t {\r\n\t // Create the main dialog\r\n\t DialogBoxParam( hInst, MAKEINTRESOURCE(IDD_MAIN), NULL, (DLGPROC)CTTSApp::DlgProcMain, \r\n\t (LPARAM)&DlgClass );\r\n\t }\r\n\t else\r\n\t {\r\n\t // Error - shut down\r\n\t MessageBox( NULL, \r\n\t _T(\"Error initializing TTSApp. Shutting down.\"), \r\n\t _T(\"Error\"), MB_OK );\r\n\t } \r\n\t }\r\n\t\r\n\t\tFreeLibrary( hMod );\r\n\t}\r\n\r\n\t// Unload COM\r\n\tCoUninitialize();\r\n\r\n\t// Return 0\r\n\treturn 0;\r\n\t\r\n}\r\n"} +{"text": "package types\n\nfunc (m *Any) ProtoSize() (n int) { return m.Size() }\nfunc (m *Api) ProtoSize() (n int) { return m.Size() }\nfunc (m *Method) ProtoSize() (n int) { return m.Size() }\nfunc (m *Mixin) ProtoSize() (n int) { return m.Size() }\nfunc (m *Duration) ProtoSize() (n int) { return m.Size() }\nfunc (m *Empty) ProtoSize() (n int) { return m.Size() }\nfunc (m *FieldMask) ProtoSize() (n int) { return m.Size() }\nfunc (m *SourceContext) ProtoSize() (n int) { return m.Size() }\nfunc (m *Struct) ProtoSize() (n int) { return m.Size() }\nfunc (m *Value) ProtoSize() (n int) { return m.Size() }\nfunc (m *Value_NullValue) ProtoSize() (n int) { return m.Size() }\nfunc (m *Value_NumberValue) ProtoSize() (n int) { return m.Size() }\nfunc (m *Value_StringValue) ProtoSize() (n int) { return m.Size() }\nfunc (m *Value_BoolValue) ProtoSize() (n int) { return m.Size() }\nfunc (m *Value_StructValue) ProtoSize() (n int) { return m.Size() }\nfunc (m *Value_ListValue) ProtoSize() (n int) { return m.Size() }\nfunc (m *ListValue) ProtoSize() (n int) { return m.Size() }\nfunc (m *Timestamp) ProtoSize() (n int) { return m.Size() }\nfunc (m *Type) ProtoSize() (n int) { return m.Size() }\nfunc (m *Field) ProtoSize() (n int) { return m.Size() }\nfunc (m *Enum) ProtoSize() (n int) { return m.Size() }\nfunc (m *EnumValue) ProtoSize() (n int) { return m.Size() }\nfunc (m *Option) ProtoSize() (n int) { return m.Size() }\nfunc (m *DoubleValue) ProtoSize() (n int) { return m.Size() }\nfunc (m *FloatValue) ProtoSize() (n int) { return m.Size() }\nfunc (m *Int64Value) ProtoSize() (n int) { return m.Size() }\nfunc (m *UInt64Value) ProtoSize() (n int) { return m.Size() }\nfunc (m *Int32Value) ProtoSize() (n int) { return m.Size() }\nfunc (m *UInt32Value) ProtoSize() (n int) { return m.Size() }\nfunc (m *BoolValue) ProtoSize() (n int) { return m.Size() }\nfunc (m *StringValue) ProtoSize() (n int) { return m.Size() }\nfunc (m *BytesValue) ProtoSize() (n int) { return m.Size() }\n"} +{"text": "/**\n * Norwegian translation for bootstrap-datetimepicker\n * Rune Warhuus \n */\n;(function($){\n\t$.fn.datetimepicker.dates['no'] = {\n\t\tdays: [\"Søndag\", \"Mandag\", \"Tirsdag\", \"Onsdag\", \"Torsdag\", \"Fredag\", \"Lørdag\", \"Søndag\"],\n\t\tdaysShort: [\"Søn\", \"Man\", \"Tir\", \"Ons\", \"Tor\", \"Fre\", \"Lør\", \"Søn\"],\n\t\tdaysMin: [\"Sø\", \"Ma\", \"Ti\", \"On\", \"To\", \"Fr\", \"Lø\", \"Sø\"],\n\t\tmonths: [\"Januar\", \"Februar\", \"Mars\", \"April\", \"Mai\", \"Juni\", \"Juli\", \"August\", \"September\", \"Oktober\", \"November\", \"Desember\"],\n\t\tmonthsShort: [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"Mai\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Okt\", \"Nov\", \"Des\"],\n\t\ttoday: \"I Dag\",\n\t\tsuffix: [],\n\t\tmeridiem: []\n\t};\n}(jQuery));\n"} +{"text": "//This is brl/bpro/core/brad_pro/processes/brad_convert_reflectance_to_digital_count_process.cxx\n//:\n// \\file\n#include \n#include \n#include \n#include \n#include \n#ifdef _MSC_VER\n# include \"vcl_msvc_warnings.h\"\n#endif\n#include \"vil/vil_image_view_base.h\"\n#include \"vil/vil_image_view.h\"\n#include \"vil/vil_convert.h\"\n#include \"vil/vil_math.h\"\n#include \"vnl/vnl_math.h\"\n#include \n#include \n#include \n\n//:sets input and output types\nbool brad_convert_reflectance_to_digital_count_process_cons(bprb_func_process& pro)\n{\n //inputs\n //0: image with pixel values corresponding to reflectance values\n //1: image metadata\n //2: mean_reflectance value\n //3: normalize values? If TRUE, output image will floating point with input[4] mapped to 1.0\n //4: maximum digital count value (default 2047)\n //5: average airlight? If TRUE, will use all visible band to compute an average airlight value\n\n std::vector input_types_(6);\n input_types_[0] = \"vil_image_view_base_sptr\";\n input_types_[1] = \"brad_image_metadata_sptr\";\n input_types_[2] = \"float\";\n input_types_[3] = \"bool\";\n input_types_[4] = \"unsigned\";\n input_types_[5] = \"bool\";\n\n if (!pro.set_input_types(input_types_))\n return false;\n\n //output: digital count of original image - normalized to (0,1) if input 3 is set to TRUE\n std::vector output_types_(1);\n output_types_[0] = \"vil_image_view_base_sptr\";\n\n if (!pro.set_output_types(output_types_))\n return false;\n\n // set default normalization constant\n pro.set_input(4, new brdb_value_t(2047));\n\n return true;\n}\n\nbool brad_convert_reflectance_to_digital_count_process(bprb_func_process& pro)\n{\n //check number of inputs\n if (!pro.verify_inputs())\n {\n std::cout << pro.name() << \" Invalid inputs\" << std::endl;\n return false;\n }\n\n //get the inputs\n vil_image_view_base_sptr reflectance_img_base = pro.get_input(0);\n brad_image_metadata_sptr mdata = pro.get_input(1);\n auto mean_reflectance = pro.get_input(2);\n bool do_normalization = pro.get_input(3);\n auto max_digital_count = pro.get_input(4);\n bool average_airlight = pro.get_input(5);\n\n //check inputs validity\n if (!reflectance_img_base) {\n std::cout << pro.name() <<\" :-- image is null!\\n\";\n return false;\n }\n\n if (reflectance_img_base->pixel_format() != VIL_PIXEL_FORMAT_FLOAT) {\n std::cerr << \"ERROR: brad_convert_reflectance_to_digital_count: expecting floating point image\\n\";\n return false;\n }\n auto* reflectance_img = dynamic_cast*>(reflectance_img_base.ptr());\n if (!reflectance_img) {\n std::cerr << \"ERROR: brad_convert_reflectance_to_digital_count: error casting to float image\\n\";\n return false;\n }\n\n unsigned int ni = reflectance_img->ni();\n unsigned int nj = reflectance_img->nj();\n unsigned int np = reflectance_img->nplanes();\n\n vil_image_view toa_radiance_img(ni, nj, np);\n toa_radiance_img.fill(0.0f);\n bool is_normalization = true;\n if (mean_reflectance <= 0.0)\n is_normalization = false;\n\n // convert surface reflectance to ToA reflectance\n brad_undo_reflectance_estimate(*reflectance_img, *mdata, mean_reflectance, toa_radiance_img, average_airlight, is_normalization);\n\n // convert ToA reflecatance to ToA radiance\n std::vector solar_irradiance_val = mdata->normal_sun_irradiance_values_;\n if (np != solar_irradiance_val.size()) {\n std::cerr << pro.name() << \"ERROR: Mismatch of image plane numebr to the length of solar irradiance. \"\n << \"Image plane number: \" << np\n << \", solar irradiance value length: \" << solar_irradiance_val.size() << \"!!!\\n\";\n return false;\n }\n double sun_dot_norm = std::sin(mdata->sun_elevation_ * vnl_math::pi_over_180) / vnl_math::pi;\n for (unsigned ii = 0; ii < np; ii++)\n {\n double band_norm = solar_irradiance_val[ii] * sun_dot_norm;\n vil_image_view band = vil_plane(toa_radiance_img, ii);\n vil_math_scale_values(band, band_norm);\n }\n // convert ToA radiance to DG\n std::vector gain = mdata->gains_;\n std::vector offset = mdata->offsets_;\n std::vector abscal = mdata->abscal_;\n std::vector effect_band = mdata->effect_band_width_;\n if (np != abscal.size() || np != effect_band.size() ) {\n std::cerr << pro.name() << \"ERROR: Mismatch of image plane number to the length of band dependent AbsCalFactor/EffectBandWidth. \"\n << \"Image plane numebr: \" << np\n << \", gain length: \" << abscal.size() << \", offset length: \" << effect_band.size() << \"!!!\\n\";\n return false;\n }\n if (np != gain.size() || np != offset.size()) {\n std::cerr << pro.name() << \"ERROR: Mismatch of image plane number to the length of band dependent gain/offset. \"\n << \"Image plane numebr: \" << np\n << \", gain length: \" << gain.size() << \", offset length: \" << offset.size() << \"!!!\\n\";\n return false;\n }\n for (unsigned ii = 0; ii < np; ii++)\n {\n double abs_cal_factor = abscal[ii] / effect_band[ii];\n double band_norm = 1.0 / (gain[ii] * abs_cal_factor);\n vil_image_view band = vil_plane(toa_radiance_img, ii);\n vil_math_scale_and_offset_values(band, band_norm, -offset[ii]);\n }\n\n vil_image_view_base_sptr output_img = nullptr;\n if (do_normalization) {\n auto *output_img_float = new vil_image_view(ni,nj);\n vil_convert_stretch_range_limited(toa_radiance_img,*output_img_float,0.0f,(float)max_digital_count,0.0f,1.0f);\n output_img = output_img_float;\n }\n else {\n auto *output_img_uint16 = new vil_image_view(ni,nj);\n vil_convert_stretch_range_limited(toa_radiance_img,*output_img_uint16, 0.0f, (float)max_digital_count,(vxl_uint_16)0, (vxl_uint_16)max_digital_count);\n output_img = output_img_uint16;\n }\n\n pro.set_output_val(0, output_img);\n\n return true;\n}\n"} +{"text": "\\name{plot.map2stan}\n\\alias{plot.map2stan}\n%- Also NEED an '\\alias' for EACH other topic documented here.\n\\title{Trace plot of map2stan chains}\n\\description{\n Shows trace plots for Stan samples produced by a \\code{map2stan} fit, annotated by number of effective samples. Automatic paging and adjustable number of columns and rows per page.\n}\n\\usage{\nplot( object , pars , col=rethink_palette , alpha=1 , bg=gray(0.7,0.5) , ask=TRUE , window , n_cols=3 , max_rows=5 , ... )\n}\n%- maybe also 'usage' for other objects documented here.\n\\arguments{\n \\item{object}{map2stan model fit}\n \\item{pars}{Character vector of parameters to display}\n \\item{col}{Vector of colors to use for chains. Recycled.}\n \\item{alpha}{alpha transparency of chains}\n \\item{bg}{Background fill for warmup samples}\n \\item{ask}{Whether to pause for paging. Default is \\code{TRUE}.}\n \\item{window}{Range of samples to display. Default is all samples.}\n \\item{n_cols}{Number of columns per page}\n \\item{max_rows}{Maximum number of rows per page}\n \\item{...}{Additional arguments to pass to plot commands}\n}\n\\details{\n This is the default trace plot method for \\code{\\link{map2stan}} model fits. \n}\n\\value{\n}\n\\references{}\n\\author{Richard McElreath}\n\\seealso{}\n\\examples{\n}\n% Add one or more standard keywords, see file 'KEYWORDS' in the\n% R documentation directory.\n\\keyword{ }\n\n"} +{"text": "\n\n Downloads\n Installed\n An error occurred\n Download paused\n Downloading\n Installing\n Ready to install\n\n Updates\n Update all\n Updating\n Update paused\n An error occurred\n\n Ignore update\n yes\n no\n\n Unknown Error\n\n"} +{"text": "# Video\n\n## Base Concepts\n\n### ripping\n\nTaking the DVD from the DVD to files in computer.\n\n### Transcoding\n\nTransforming the DVD contents to another, generally smaller and single file, format such as `avi`.\n\nTranscoding may be a time consuming process, since it means to do complete data format conversion usually on large files and as of 2013 takes times in the 1h - 4h range.\n\n### Title\n\nA DVD can contain one or many titles. Usually each title contains one entire continuous film sequence such as the main film or an extra such as an interview with the director.\n\n### Subtitles\n\nSubtitles are often stored in DVDs as images the format pair: idx + sub.\n\nIf you want srts, which is a text-only, smaller and human editable format on a text editor, first extract the VobSub pairs from the container (via mkvextract for example for mkv containers) and then use a tool such as `vobsub2srt` which will do OCR on the images.\n\n### Multiplexing\n\nTODO\n\n## DVD regions\n\nDVDs have regions: \n\nThis serves only to control copyright.\n\nDVD readers have a limited number of region changes, sometimes around 5.\n\nFor certain DVD readers, after this number of changes, *you cannot change it anymore*!\n\n## Capture\n\n### guvcview\n\nView and record video audio from a webcam.\n\n## Players\n\n### VLC\n\nGreat cross platform video player\n\n## Editors\n\nAll editors we have tried so far were buggy. Good luck!\n\n### PiTiV\n\nGNOME based.\n\nLess buggy of the options we tried so far.\n\nLatest release 0.93 is the first that leaves alpha and enters beta.\n\n### OpenSHOT\n\nGenerally simple good. Downsides:\n\n- video preview refreshes too slowly.\n- corrupted ogv inputs on the combined output\n\n### Cinelerra\n\nFails to open ogv.\n\nVery non standard interface, four separate windows...\n\n## Formats\n\n### MPEG-1\n\n\n\nLossy.\n\nAudio and video standard family.\n\nExtensions:\n\n- `.mp3` for audio\n- `.mpg` for audio / video\n\n### H.264/MPEG-4 AVC\n\nLossy.\n\nAn important open source library implementation is the x264 library.\n\n### Theora\n\nFree lossy compression format: no patents by the \n\nOften used with other patent free formats Vorbis and the Ogg container.\n\n## Utilities and libraries\n\nMany utilities are front-ends to libraries provided by a single project.\n\n### libav\n\n### ffmpeg\n\nLarge open source project to offer tools that deal with many, many video formats and containers.\n\nAlso the name of an utility to convert between formats, which has been renamed to `avconv` and deprecated the old name, presumably because it does much more than MPEG now, and is linked to `libav`.\n\n### mkvtools\n\nSee info about a:\n\n mkvinfo 1.mkv\n\nExtracts tracks 3 and 4:\n\n mkvextract tracks 1.mkv 3:ita 4:eng\n\nSave 3 to `eng.$ext` or str, 3 to `chi.$ext`\n\nWhere ext is the extension of the contained audio\n\nWe know those are subtitles from `mkinfo`.\n\n- `3:asdf` means track 3, `asdf` is the output name\n\nThe type is that contained in the tracks, not necessarily srt,\n\nThe output may be an VobSub idx + sub or srt depending on what is contained in the mkv. If you want srt from VobSub, try vobsub2srt.\n\n### Ogg Video Tools\n\nTools for ogg manipulation.\n\nUbuntu package name: `oggvideotools`\n\nConcatenate ogv containers:\n\n oggCat output.ogv a.ogv b.ogv\n\nBroken on Ubuntu 12.04, claims to have been corrected on 12.10: \n\n### x264\n\nCodec library for the `H.264/MPEG-4 AVC` format.\n\n## Subtitle utilities\n\n### vobsub2srt\n\nUses Tesseract for the OCR: this means you must install Tesseract languages.\n\nMake sure that the `lang` name matches that of the Tesseract languages installed. For example, for Chinese, there was confusion between `zh` and `ch` and it may be necessary to do some corrective symlinking.\n\nFor a language to be recognized, you must have the Tesseract language installed.\n\nList available languages inside `eng.sub` and `eng.idx` pair:\n\n vobsub2srt --langlist eng\n\nTODO: a sub idx pair can contain multiple languages? Id contains metadata indicating the language?\n\nConvert an `eng.sub` and `eng.idx` to `eng.srt`:\n\n vobsub2srt --lang en eng\n\n`en` or `0` were taken from `--langlist`\n\nDon't know what to do if two subs for the same language such as simplified and traditional Chinese, both of which get `zh` output goes to `a.str`.\n\nDon't forget to rename output as as a.eng.srt before going to the next language.\n\n### srtmerge\n\nMerge two srt files.\n\nInstall via pip:\n\n suto pip install srtmerge\n\nSubtitles that happen at the same time are put one on top of the other.\n\nGreat for language learning.\n\n srtmerge a b ab\n\n## Get video information\n\n\n\nhttp://stackoverflow.com/questions/3199489/meaning-of-ffmpeg-output-tbc-tbn-tbr\n\n## Step frames\n\n## Take screenshot of current frame\n\n\n"} +{"text": "(function ($) {\n $.extend($.summernote.lang, {\n 'ca-ES': {\n font: {\n bold: 'Negreta',\n italic: 'Cursiva',\n underline: 'Subratllat',\n clear: 'Treure estil de lletra',\n height: 'Alçada de línia',\n name: 'Font',\n strikethrough: 'Ratllat',\n subscript: 'Subíndex',\n superscript: 'Superíndex',\n size: 'Mida de lletra'\n },\n image: {\n image: 'Imatge',\n insert: 'Inserir imatge',\n resizeFull: 'Redimensionar a mida completa',\n resizeHalf: 'Redimensionar a la meitat',\n resizeQuarter: 'Redimensionar a un quart',\n floatLeft: 'Alinear a l\\'esquerra',\n floatRight: 'Alinear a la dreta',\n floatNone: 'No alinear',\n shapeRounded: 'Forma: Arrodonit',\n shapeCircle: 'Forma: Cercle',\n shapeThumbnail: 'Forma: Marc',\n shapeNone: 'Forma: Cap',\n dragImageHere: 'Arrossegueu una imatge o text aquí',\n dropImage: 'Deixa anar aquí una imatge o un text',\n selectFromFiles: 'Seleccioneu des dels arxius',\n maximumFileSize: 'Mida màxima de l\\'arxiu',\n maximumFileSizeError: 'La mida màxima de l\\'arxiu s\\'ha superat.',\n url: 'URL de la imatge',\n remove: 'Eliminar imatge'\n },\n video: {\n video: 'Vídeo',\n videoLink: 'Enllaç del vídeo',\n insert: 'Inserir vídeo',\n url: 'URL del vídeo?',\n providers: '(YouTube, Vimeo, Vine, Instagram, DailyMotion o Youku)'\n },\n link: {\n link: 'Enllaç',\n insert: 'Inserir enllaç',\n unlink: 'Treure enllaç',\n edit: 'Editar',\n textToDisplay: 'Text per mostrar',\n url: 'Cap a quina URL porta l\\'enllaç?',\n openInNewWindow: 'Obrir en una finestra nova'\n },\n table: {\n table: 'Taula'\n },\n hr: {\n insert: 'Inserir línia horitzontal'\n },\n style: {\n style: 'Estil',\n p: 'p',\n blockquote: 'Cita',\n pre: 'Codi',\n h1: 'Títol 1',\n h2: 'Títol 2',\n h3: 'Títol 3',\n h4: 'Títol 4',\n h5: 'Títol 5',\n h6: 'Títol 6'\n },\n lists: {\n unordered: 'Llista desendreçada',\n ordered: 'Llista endreçada'\n },\n options: {\n help: 'Ajut',\n fullscreen: 'Pantalla sencera',\n codeview: 'Veure codi font'\n },\n paragraph: {\n paragraph: 'Paràgraf',\n outdent: 'Menys tabulació',\n indent: 'Més tabulació',\n left: 'Alinear a l\\'esquerra',\n center: 'Alinear al mig',\n right: 'Alinear a la dreta',\n justify: 'Justificar'\n },\n color: {\n recent: 'Últim color',\n more: 'Més colors',\n background: 'Color de fons',\n foreground: 'Color de lletra',\n transparent: 'Transparent',\n setTransparent: 'Establir transparent',\n reset: 'Restablir',\n resetToDefault: 'Restablir per defecte'\n },\n shortcut: {\n shortcuts: 'Dreceres de teclat',\n close: 'Tancar',\n textFormatting: 'Format de text',\n action: 'Acció',\n paragraphFormatting: 'Format de paràgraf',\n documentStyle: 'Estil del document',\n extraKeys: 'Tecles adicionals'\n },\n help : {\n 'insertParagraph': 'Inserir paràgraf',\n 'undo': 'Desfer l\\'última acció',\n 'redo': 'Refer l\\'última acció',\n 'tab': 'Tabular',\n 'untab': 'Eliminar tabulació',\n 'bold': 'Establir estil negreta',\n 'italic': 'Establir estil cursiva',\n 'underline': 'Establir estil subratllat',\n 'strikethrough': 'Establir estil ratllat',\n 'removeFormat': 'Netejar estil',\n 'justifyLeft': 'Alinear a l\\'esquerra',\n 'justifyCenter': 'Alinear al centre',\n 'justifyRight': 'Alinear a la dreta',\n 'justifyFull': 'Justificar',\n 'insertUnorderedList': 'Inserir llista desendreçada',\n 'insertOrderedList': 'Inserir llista endreçada',\n 'outdent': 'Reduïr tabulació del paràgraf',\n 'indent': 'Augmentar tabulació del paràgraf',\n 'formatPara': 'Canviar l\\'estil del bloc com a un paràgraf (etiqueta P)',\n 'formatH1': 'Canviar l\\'estil del bloc com a un H1',\n 'formatH2': 'Canviar l\\'estil del bloc com a un H2',\n 'formatH3': 'Canviar l\\'estil del bloc com a un H3',\n 'formatH4': 'Canviar l\\'estil del bloc com a un H4',\n 'formatH5': 'Canviar l\\'estil del bloc com a un H5',\n 'formatH6': 'Canviar l\\'estil del bloc com a un H6',\n 'insertHorizontalRule': 'Inserir una línia horitzontal',\n 'linkDialog.show': 'Mostrar panel d\\'enllaços'\n },\n history: {\n undo: 'Desfer',\n redo: 'Refer'\n },\n specialChar: {\n specialChar: 'CARÀCTERS ESPECIALS',\n select: 'Selecciona caràcters especials'\n }\n }\n });\n})(jQuery);\n"} +{"text": ".shared-style-target {\n border-left-width: 2px;\n border-left-style: solid;\n border-left-color: blue;\n}\n"} +{"text": "define_actor :l do\n\n has_behaviors do\n positioned\n colored color: 'orange.png'\n end\n\n has_attributes blocks: [ [\n [0 , 0],\n [0,-1],\n [-1, 0],\n [-2, 0]\n ], [\n [0 , 0],\n [1, 0],\n [0, -1],\n [0, -2]\n ], [\n [0 , 0],\n [1, 0],\n [2, 0],\n [0, 1]\n ], [\n [0 , 0],\n [-1, 0],\n [0, 1],\n [0, 2]\n ]],\n current_rotation: 0,\n grid_position: Struct.new(:x, :y).new(0, 0),\n view: :piece_view\n\nend\n"} +{"text": "require('../../modules/es7.math.signbit');\n\nmodule.exports = require('../../modules/_core').Math.signbit;\n"} +{"text": "
\n \n {{#if model.smallImg}}\n \n \n {{else}}\n \n {{/if}}\n\n\n\n \n
\n\n
\n
\n
\n
\n\n\n {{#unless model.imgUrl}}\n \n {{/unless}}\n {{{model.title}}}
\n\n\n\n \n
\n"} +{"text": "/* Arabic Translation for jQuery UI date picker plugin. */\n/* Used in most of Arab countries, primarily in Bahrain, Kuwait, Oman, Qatar, Saudi Arabia and the United Arab Emirates, Egypt, Sudan and Yemen. */\n/* Written by Mohammed Alshehri -- m@dralshehri.com */\n\n(function( factory ) {\n\tif ( typeof define === \"function\" && define.amd ) {\n\n\t\t// AMD. Register as an anonymous module.\n\t\tdefine([ \"../datepicker\" ], factory );\n\t} else {\n\n\t\t// Browser globals\n\t\tfactory( jQuery.datepicker );\n\t}\n}(function( datepicker ) {\n\ndatepicker.regional['ar'] = {\n\tcloseText: 'إغلاق',\n\tprevText: '<السابق',\n\tnextText: 'التالي>',\n\tcurrentText: 'اليوم',\n\tmonthNames: ['يناير', 'فبراير', 'مارس', 'أبريل', 'مايو', 'يونيو',\n\t'يوليو', 'أغسطس', 'سبتمبر', 'أكتوبر', 'نوفمبر', 'ديسمبر'],\n\tmonthNamesShort: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'],\n\tdayNames: ['الأحد', 'الاثنين', 'الثلاثاء', 'الأربعاء', 'الخميس', 'الجمعة', 'السبت'],\n\tdayNamesShort: ['أحد', 'اثنين', 'ثلاثاء', 'أربعاء', 'خميس', 'جمعة', 'سبت'],\n\tdayNamesMin: ['ح', 'ن', 'ث', 'ر', 'خ', 'ج', 'س'],\n\tweekHeader: 'أسبوع',\n\tdateFormat: 'dd/mm/yy',\n\tfirstDay: 0,\n\t\tisRTL: true,\n\tshowMonthAfterYear: false,\n\tyearSuffix: ''};\ndatepicker.setDefaults(datepicker.regional['ar']);\n\nreturn datepicker.regional['ar'];\n\n}));\n"} +{"text": "', 0);\r\nadd_stylesheet('', 0);\r\n?>\r\n\r\n\r\n"} +{"text": "#pragma once\r\n#include \r\n\r\nvoid HOOKFUNC on_dec_ready(char* buffer);\r\nvoid HOOKFUNC on_dec_complete(Registers* regs);"} +{"text": "/* Generated by RuntimeBrowser.\n */\n\n@protocol INUIIntentBackgroundHandlingAssertion\n\n@required\n\n- (void)invalidate;\n\n@end\n"} +{"text": "/* *********************************************************************** *\n * project: org.matsim.*\n * *\n * *********************************************************************** *\n * *\n * copyright : (C) 2014 by the members listed in the COPYING, *\n * LICENSE and WARRANTY file. *\n * email : info at matsim dot org *\n * *\n * *********************************************************************** *\n * *\n * This program is free software; you can redistribute it and/or modify *\n * it under the terms of the GNU General Public License as published by *\n * the Free Software Foundation; either version 2 of the License, or *\n * (at your option) any later version. *\n * See also COPYING, LICENSE and WARRANTY file *\n * *\n * *********************************************************************** */\n\npackage org.matsim.contrib.dvrp.passenger;\n\nimport java.util.Map;\n\nimport org.matsim.api.core.v01.Id;\nimport org.matsim.contrib.dvrp.optimizer.Request;\nimport org.matsim.contrib.dvrp.schedule.StayTask;\nimport org.matsim.contrib.dynagent.DynAgent;\nimport org.matsim.contrib.dynagent.FirstLastSimStepDynActivity;\n\npublic class MultiPassengerDropoffActivity extends FirstLastSimStepDynActivity {\n\tprivate final PassengerHandler passengerHandler;\n\tprivate final DynAgent driver;\n\tprivate final Map, ? extends PassengerRequest> requests;\n\n\tprivate final double departureTime;\n\n\tpublic MultiPassengerDropoffActivity(PassengerHandler passengerHandler, DynAgent driver, StayTask dropoffTask,\n\t\t\tMap, ? extends PassengerRequest> requests, String activityType) {\n\t\tsuper(activityType);\n\n\t\tthis.passengerHandler = passengerHandler;\n\t\tthis.driver = driver;\n\t\tthis.requests = requests;\n\n\t\tdepartureTime = dropoffTask.getEndTime();\n\t}\n\n\t@Override\n\tprotected boolean isLastStep(double now) {\n\t\treturn now >= departureTime;\n\t}\n\n\t@Override\n\tprotected void afterLastStep(double now) {\n\t\t// dropoff at the end of stop activity\n\t\tfor (PassengerRequest request : requests.values()) {\n\t\t\tpassengerHandler.dropOffPassenger(driver, request, now);\n\t\t}\n\t}\n}\n"} +{"text": "#if !defined(BOOST_PP_IS_ITERATING)\r\n\r\n// Copyright David Abrahams 2002.\r\n// Distributed under the Boost Software License, Version 1.0. (See\r\n// accompanying file LICENSE_1_0.txt or copy at\r\n// http://www.boost.org/LICENSE_1_0.txt)\r\n# ifndef CALL_METHOD_DWA2002411_HPP\r\n# define CALL_METHOD_DWA2002411_HPP\r\n\r\n# include \r\n\r\n# include \r\n\r\n# include \r\n# include \r\n# include \r\n# include \r\n\r\n# include \r\n# include \r\n# include \r\n# include \r\n# include \r\n# include \r\n\r\nnamespace boost { namespace python {\r\n\r\n# define BOOST_PYTHON_FAST_ARG_TO_PYTHON_GET(z, n, _) \\\r\n , converter::arg_to_python(a##n).get()\r\n\r\n# define BOOST_PP_ITERATION_PARAMS_1 (3, (0, BOOST_PYTHON_MAX_ARITY, ))\r\n# include BOOST_PP_ITERATE()\r\n\r\n# undef BOOST_PYTHON_FAST_ARG_TO_PYTHON_GET\r\n\r\n}} // namespace boost::python\r\n\r\n# endif // CALL_METHOD_DWA2002411_HPP\r\n\r\n// For gcc 4.4 compatability, we must include the\r\n// BOOST_PP_ITERATION_DEPTH test inside an #else clause.\r\n#else // BOOST_PP_IS_ITERATING\r\n#if BOOST_PP_ITERATION_DEPTH() == 1\r\n# if !(BOOST_WORKAROUND(__MWERKS__, > 0x3100) \\\r\n && BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3201)))\r\n# line BOOST_PP_LINE(__LINE__, call_method.hpp)\r\n# endif \r\n\r\n# define N BOOST_PP_ITERATION()\r\n\r\ntemplate <\r\n class R\r\n BOOST_PP_ENUM_TRAILING_PARAMS_Z(1, N, class A)\r\n >\r\ntypename detail::returnable::type\r\ncall_method(PyObject* self, char const* name\r\n BOOST_PP_COMMA_IF(N) BOOST_PP_ENUM_BINARY_PARAMS_Z(1, N, A, const& a)\r\n , boost::type* = 0\r\n )\r\n{\r\n PyObject* const result = \r\n PyEval_CallMethod(\r\n self\r\n , const_cast(name)\r\n , const_cast(\"(\" BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_FIXED, \"O\") \")\")\r\n BOOST_PP_REPEAT_1ST(N, BOOST_PYTHON_FAST_ARG_TO_PYTHON_GET, nil)\r\n );\r\n \r\n // This conversion *must not* be done in the same expression as\r\n // the call, because, in the special case where the result is a\r\n // reference a Python object which was created by converting a C++\r\n // argument for passing to PyEval_CallFunction, its reference\r\n // count will be 2 until the end of the full expression containing\r\n // the conversion, and that interferes with dangling\r\n // pointer/reference detection.\r\n converter::return_from_python converter;\r\n return converter(result);\r\n}\r\n\r\n# undef N\r\n\r\n#endif // BOOST_PP_ITERATION_DEPTH()\r\n#endif // BOOST_PP_IS_ITERATING\r\n"} +{"text": "package(default_visibility = [\"//visibility:public\"])\n\nlicenses([\"notice\"])\n\nload(\n \"@io_bazel_rules_go//go:def.bzl\",\n \"go_library\",\n)\n\ngo_library(\n name = \"go_default_library\",\n srcs = [\"install.go\"],\n tags = [\"automanaged\"],\n deps = [\n \"//pkg/api:go_default_library\",\n \"//pkg/apis/rbac:go_default_library\",\n \"//pkg/apis/rbac/v1alpha1:go_default_library\",\n \"//pkg/apis/rbac/v1beta1:go_default_library\",\n \"//vendor/k8s.io/apimachinery/pkg/apimachinery/announced:go_default_library\",\n \"//vendor/k8s.io/apimachinery/pkg/apimachinery/registered:go_default_library\",\n \"//vendor/k8s.io/apimachinery/pkg/runtime:go_default_library\",\n \"//vendor/k8s.io/apimachinery/pkg/util/sets:go_default_library\",\n ],\n)\n\nfilegroup(\n name = \"package-srcs\",\n srcs = glob([\"**\"]),\n tags = [\"automanaged\"],\n visibility = [\"//visibility:private\"],\n)\n\nfilegroup(\n name = \"all-srcs\",\n srcs = [\":package-srcs\"],\n tags = [\"automanaged\"],\n)\n"} +{"text": "package com.ycbjie.news.api;\n\nimport com.ycbjie.news.model.TxNewsBean;\n\nimport io.reactivex.Observable;\nimport retrofit2.http.GET;\nimport retrofit2.http.Query;\n\n/**\n * Created by PC on 2017/8/22.\n * 作者:PC\n */\n\npublic interface TxNewsApi {\n\n /**\n * 获取新闻数据\n * http://api.tianapi.com/social/?key=APIKEY&num=10 社会新��\n * http://api.tianapi.com/guonei/?key=APIKEY&num=10 国内新闻\n * http://api.tianapi.com/huabian/?key=APIKEY&num=10\t 娱乐新闻\n * http://api.tianapi.com/tiyu/?key=APIKEY&num=10 体育新闻\n * http://api.tianapi.com/nba/?key=APIKEY&num=10 NBA新闻\n * http://api.tianapi.com/startup/?key=APIKEY&num=10 创业新闻\n * http://api.tianapi.com/military/?key=APIKEY&num=10 军事新闻\n * http://api.tianapi.com/travel/?key=APIKEY&num=10 旅游咨询\n * http://api.tianapi.com/health/?key=APIKEY&num=10 健康知识\n * http://api.tianapi.com/qiwen/?key=APIKEY&num=10 奇闻异事\n */\n @GET(\"/social/\")\n Observable getTxNews(@Query(\"key\") String key,\n @Query(\"num\") int num);\n\n\n @GET(\"/guonei/\")\n Observable getTxGnNews(@Query(\"key\") String key,\n @Query(\"num\") int num);\n\n @GET(\"/huabian/\")\n Observable getTxHbNews(@Query(\"key\") String key,\n @Query(\"num\") int num);\n\n\n @GET(\"/tiyu/\")\n Observable getTxTyNews(@Query(\"key\") String key,\n @Query(\"num\") int num);\n\n @GET(\"/nba/\")\n Observable getTxNbaNews(@Query(\"key\") String key,\n @Query(\"num\") int num);\n\n\n @GET(\"/startup/\")\n Observable getTxSuNews(@Query(\"key\") String key,\n @Query(\"num\") int num);\n\n @GET(\"/military/\")\n Observable getTxMiNews(@Query(\"key\") String key,\n @Query(\"num\") int num);\n\n\n @GET(\"/travel/\")\n Observable getTxTrNews(@Query(\"key\") String key,\n @Query(\"num\") int num);\n\n @GET(\"/health/\")\n Observable getTxHeNews(@Query(\"key\") String key,\n @Query(\"num\") int num);\n\n @GET(\"/qiwen/\")\n Observable getTxQwNews(@Query(\"key\") String key,\n @Query(\"num\") int num);\n}\n"} +{"text": "\n# (Non-deterministic) finite state automata \n\napi FSA =\napi\n type Symbol = Int\n type ruleno = Int\n type groupid = Int\n type nfa \n type node\n package int_set: Set where type key::Key = Int\n\n my intsetToString: int_set::set -> String\n\n # methods for constructing an nfa \n my nfa: { min: Symbol, max: Symbol } -> nfa\n my newNode: nfa -> node\n my setDelta: node * Symbol * node -> node # transition node \n my setEpsilon: node * node -> node # epsilon node \n my setOr: node * List( node ) -> node # Disjunction \n my setAccept: node * ruleno -> node # Accept state \n my setBeginGroup: node * groupid * node -> node \n my setEndGroup: node * groupid * node -> node \n my setError: node -> node\n\n # Compute the epsilon closure \n my computeClosure: nfa -> Void\n\n # query methods \n my closure: nfa -> node -> int_set::set\n my move: nfa -> int_set::set -> List (Symbol * int_set::set)\n my acceptingAll: nfa -> int_set::set -> int_set::set # set of rulenos \n my accepting: nfa -> int_set::set -> Null_Or( ruleno )\n\n # Get the begin groups and end groups that can occur in this state \n # These are indexed by the group ids.\n\n my groupings: nfa -> int_set::set -> List( groupid ) * List( groupid )\nend\n"} +{"text": "{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"Ic4_occAAiAT\"\n },\n \"source\": [\n \"##### Copyright 2018 The TensorFlow Authors. \"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"cellView\": \"form\",\n \"id\": \"ioaprt5q5US7\"\n },\n \"outputs\": [],\n \"source\": [\n \"#@title Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n\",\n \"# you may not use this file except in compliance with the License.\\n\",\n \"# You may obtain a copy of the License at\\n\",\n \"#\\n\",\n \"# https://www.apache.org/licenses/LICENSE-2.0\\n\",\n \"#\\n\",\n \"# Unless required by applicable law or agreed to in writing, software\\n\",\n \"# distributed under the License is distributed on an \\\"AS IS\\\" BASIS,\\n\",\n \"# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n\",\n \"# See the License for the specific language governing permissions and\\n\",\n \"# limitations under the License.\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"cellView\": \"form\",\n \"id\": \"yCl0eTNH5RS3\"\n },\n \"outputs\": [],\n \"source\": [\n \"#@title MIT License\\n\",\n \"#\\n\",\n \"# Copyright (c) 2017 François Chollet\\n\",\n \"#\\n\",\n \"# Permission is hereby granted, free of charge, to any person obtaining a\\n\",\n \"# copy of this software and associated documentation files (the \\\"Software\\\"),\\n\",\n \"# to deal in the Software without restriction, including without limitation\\n\",\n \"# the rights to use, copy, modify, merge, publish, distribute, sublicense,\\n\",\n \"# and/or sell copies of the Software, and to permit persons to whom the\\n\",\n \"# Software is furnished to do so, subject to the following conditions:\\n\",\n \"#\\n\",\n \"# The above copyright notice and this permission notice shall be included in\\n\",\n \"# all copies or substantial portions of the Software.\\n\",\n \"#\\n\",\n \"# THE SOFTWARE IS PROVIDED \\\"AS IS\\\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\\n\",\n \"# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\\n\",\n \"# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\\n\",\n \"# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\\n\",\n \"# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\\n\",\n \"# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\\n\",\n \"# DEALINGS IN THE SOFTWARE.\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"ItXfxkxvosLH\"\n },\n \"source\": [\n \"# Classificazione di testo con testo pre-elaborato: Recensioni di film\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"hKY4XMc9o8iB\"\n },\n \"source\": [\n \"\\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \" \\n\",\n \"
\\n\",\n \" Visualizza su TensorFlow.org\\n\",\n \" \\n\",\n \" Esegui in Google Colab\\n\",\n \" \\n\",\n \" Visualizza il sorgente su GitHub\\n\",\n \" \\n\",\n \" Scarica il notebook\\n\",\n \"
\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"BYzaKBe8YXg0\"\n },\n \"source\": [\n \"Note: La nostra comunità di Tensorflow ha tradotto questi documenti. Poichè queste traduzioni sono *best-effort*, non è garantito che rispecchino in maniera precisa e aggiornata la [documentazione ufficiale in inglese](https://www.tensorflow.org/?hl=en). \\n\",\n \"Se avete suggerimenti per migliorare questa traduzione, mandate per favore una pull request al repository Github [tensorflow/docs](https://github.com/tensorflow/docs). \\n\",\n \"Per proporsi come volontari alla scrittura o alla review delle traduzioni della comunità contattate la \\n\",\n \"[mailing list docs@tensorflow.org](https://groups.google.com/a/tensorflow.org/forum/#!forum/docs).\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"Eg62Pmz3o83v\"\n },\n \"source\": [\n \"Questo notebook classifica recensioni di film come *positive* o *negative* usando il testo delle revisioni. Questo è un esempio di classificazione *binaria*—o a due classi, un importante tipo di problema di machine learning largamente applicabile.\\n\",\n \"\\n\",\n \"Useremo il [dataset IMDB](https://www.tensorflow.org/datasets/catalog/imdb_reviews) che contiene il testo di 50.000 recensioni di film dall'[Internet Movie Database](https://www.imdb.com/). Esse sono divise in 25,000 recensioni per l'addestramento e 25,000 revisioni per la verifica. Gli insiemi di addestramento e verifica sono *bilanciati*, nel senso che essi contengono un eguale numero di recensioni positive e negative.\\n\",\n \"\\n\",\n \"Questo notebook usa [tf.keras](https://www.tensorflow.org/guide/keras), una API di alto livello per costruire e addestrare modelli in TensorFlow. Per un tutorial più avanzato di classificazione del testo che usa `tf.keras`, vedere la [MLCC Text Classification Guide](https://developers.google.com/machine-learning/guides/text-classification/).\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"8vdyFn79gt1L\"\n },\n \"source\": [\n \"## Setup\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"id\": \"Nh0KjNGMWNlL\"\n },\n \"outputs\": [],\n \"source\": [\n \"from __future__ import absolute_import, division, print_function, unicode_literals\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"id\": \"8RZOuS9LWQvv\"\n },\n \"outputs\": [],\n \"source\": [\n \"try:\\n\",\n \" # %tensorflow_version only exists in Colab.\\n\",\n \" %tensorflow_version 2.x\\n\",\n \" !pip install tf-nightly\\n\",\n \"except Exception:\\n\",\n \" pass\\n\",\n \"import tensorflow as tf\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"id\": \"2ew7HTbPpCJH\"\n },\n \"outputs\": [],\n \"source\": [\n \"from tensorflow import keras\\n\",\n \"\\n\",\n \"!pip install tensorflow-datasets\\n\",\n \"import tensorflow_datasets as tfds\\n\",\n \"tfds.disable_progress_bar()\\n\",\n \"\\n\",\n \"import numpy as np\\n\",\n \"\\n\",\n \"print(tf.__version__)\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"iAsKG535pHep\"\n },\n \"source\": [\n \"\\n\",\n \"\\n\",\n \"## Scarichiamo il dataset IMDB\\n\",\n \"\\n\",\n \"Il dataset di recensioni di film IMDB viene compattato in `tfds`. Esso è stato già pre-elaborato in modo che le recensioni (sequenze di parole) sono state convertite in sequenze di interi, ove ciascun intero rappresenta una particolare parola in un vocabolario.\\n\",\n \"\\n\",\n \"Il codice che segue scarica il dataset IMDB sulla vostra macchina (o usa una copia locale se lo avete scaricato in precedenza):\\n\",\n \"\\n\",\n \"Per codificare il vostro testo vedere il [tutorial sul caricamento di testo](../load_data/text.ipynb)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"id\": \"wbIQ2wSeXSme\"\n },\n \"outputs\": [],\n \"source\": [\n \"(train_data, test_data), info = tfds.load(\\n\",\n \" # Use the version pre-encoded with an ~8k vocabulary.\\n\",\n \" 'imdb_reviews/subwords8k', \\n\",\n \" # Return the train/test datasets as a tuple.\\n\",\n \" split = (tfds.Split.TRAIN, tfds.Split.TEST),\\n\",\n \" # Return (example, label) pairs from the dataset (instead of a dictionary).\\n\",\n \" as_supervised=True,\\n\",\n \" # Also return the `info` structure. \\n\",\n \" with_info=True)\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"qvA8HYDJj8OU\"\n },\n \"source\": [\n \"\\n\",\n \"\\n\",\n \"## Proviamo il codificatore\\n\",\n \"\\n\",\n \" Il dataset `info` include il codificatore di testo (un `tfds.features.text.SubwordTextEncoder`).\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"id\": \"EplYp5pNnW1S\"\n },\n \"outputs\": [],\n \"source\": [\n \"encoder = info.features['text'].encoder\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"id\": \"e7ACuHM5hFp3\"\n },\n \"outputs\": [],\n \"source\": [\n \"print ('Vocabulary size: {}'.format(encoder.vocab_size))\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"tAfGg8YRe6fu\"\n },\n \"source\": [\n \"Questo codificatore di testo codifica reversibilmente ogni stringa:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"id\": \"Bq6xDmf2SAs-\"\n },\n \"outputs\": [],\n \"source\": [\n \"sample_string = 'Hello TensorFlow.'\\n\",\n \"\\n\",\n \"encoded_string = encoder.encode(sample_string)\\n\",\n \"print ('Encoded string is {}'.format(encoded_string))\\n\",\n \"\\n\",\n \"original_string = encoder.decode(encoded_string)\\n\",\n \"print ('The original string: \\\"{}\\\"'.format(original_string))\\n\",\n \"\\n\",\n \"assert original_string == sample_string\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"TbhM970AVA8w\"\n },\n \"source\": [\n \"Il codificatore codifica la stringa spezzandola in sotto-parole o caratteri se la parola non è presente nel suo vocabolario. In questo modo, più una stringa somiglia al dataset, più corta sarà la rappresentazione codificata.\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"id\": \"GUIRWSO8yxT5\"\n },\n \"outputs\": [],\n \"source\": [\n \"for ts in encoded_string:\\n\",\n \" print ('{} ----> {}'.format(ts, encoder.decode([ts])))\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"l50X3GfjpU4r\"\n },\n \"source\": [\n \"## Esploriamo i dati\\n\",\n \"\\n\",\n \"Prendiamoci un momento per capire il formato dei dati. Il dataset è pre-elaborato: ogni esempio è un vettore di interi che rappresenta le parole della recensione del film. \\n\",\n \"\\n\",\n \"I testi delle recensioni sono stati convertiti in interi, dove ciascun intero rappresenta un particolare frammento di parola nel vocabolario. \\n\",\n \"\\n\",\n \"Ogni etichetta è un valore intero tra 0 e 1, dove 0 è una recensione negativa, e 1 una recensione positiva.\\n\",\n \"\\n\",\n \"Qui ciò a cui somiglia la prima recensione:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"id\": \"cxnWQJijdGA1\"\n },\n \"outputs\": [],\n \"source\": [\n \"for train_example, train_label in train_data.take(1):\\n\",\n \" print('Encoded text:', train_example[:10].numpy())\\n\",\n \" print('Label:', train_label.numpy())\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"wy0v9Hs4v41q\"\n },\n \"source\": [\n \"La struttura `info` contiene il codificatore/decodificatore. Il decodificatore può essere usato per recuperare il testo originale:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"id\": \"34VUXtgxsVpf\"\n },\n \"outputs\": [],\n \"source\": [\n \"encoder.decode(train_example)\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"qJmTiO0IYAjm\"\n },\n \"source\": [\n \"## Prepariamo i dati per l'addestramento\\n\",\n \"\\n\",\n \"Vorrete creare lotti di dati di addestramento per il vostro modello. Le recensioni sono tutte di lunghezza diversa, così usiamo `padded_batch` per riempire di zeri le sequenze durante la suddivisione in lotti:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"id\": \"SDRI_s_tX1Hk\"\n },\n \"outputs\": [],\n \"source\": [\n \"BUFFER_SIZE = 1000\\n\",\n \"\\n\",\n \"train_batches = (\\n\",\n \" train_data\\n\",\n \" .shuffle(BUFFER_SIZE)\\n\",\n \" .padded_batch(32))\\n\",\n \"\\n\",\n \"test_batches = (\\n\",\n \" test_data\\n\",\n \" .padded_batch(32))\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"9D9pIr0JwvRl\"\n },\n \"source\": [\n \"Ogni lotto avrà una forma del tipo `(batch_size, sequence_length)` e dato che il riempimento è dinamico, ogni lotto avrà una lunghezza diversa:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"id\": \"sXXne4DreQfv\"\n },\n \"outputs\": [],\n \"source\": [\n \"for example_batch, label_batch in train_batches.take(2):\\n\",\n \" print(\\\"Batch shape:\\\", example_batch.shape)\\n\",\n \" print(\\\"label shape:\\\", label_batch.shape)\\n\",\n \" \"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"LLC02j2g-llC\"\n },\n \"source\": [\n \"## Costruiamo il modello\\n\",\n \"\\n\",\n \"La rete neurale viene creata impilando livelli—ciò richiede due decisioni architetturali principali:\\n\",\n \"\\n\",\n \"* Quanti livelli usare nel modello?\\n\",\n \"* Quante *unità nascoste* usare in ciascun livello?\\n\",\n \"\\n\",\n \"In questo esempio, i dati di input sono costituiti da un vettore di parole-indici. Le etichette da prevedere sono 0 oppure 1. Costruiamo un modello in stile \\\"Continuous bag-of-words\\\" per questo problema:\\n\",\n \"\\n\",\n \"Attenzione: Questo modello non usa la mascheratura, così il riempimento di zeri viene utilizzato come parte dell'input, così la lunghezza del riempimento può influire sull'output. Per evitare ciò, vedere la [guida al riempimento e mascheramento](../../guide/keras/masking_and_padding).\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"id\": \"xpKOoWgu-llD\"\n },\n \"outputs\": [],\n \"source\": [\n \"model = keras.Sequential([\\n\",\n \" keras.layers.Embedding(encoder.vocab_size, 16),\\n\",\n \" keras.layers.GlobalAveragePooling1D(),\\n\",\n \" keras.layers.Dense(1)])\\n\",\n \"\\n\",\n \"model.summary()\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"6PbKQ6mucuKL\"\n },\n \"source\": [\n \"I livelli sono impilati in sequenza per implementare il classificatore:\\n\",\n \"\\n\",\n \"1. Il primo livello è un livello `Incorporamento`. Questo livello prende il vocabolario codificato in interi e guarda il vettore di incorporamento per ogni parola-indice. Questi vettori sono assimilati durante l'addestramento del modello. I vettori aggiungono una dimensione al vettore di output. Le dimensioni risultanti sono: `(batch, sequence, embedding)`.\\n\",\n \"2. Successivamente, un livello `GlobalAveragePooling1D` restituisce in output un vettore di lunghezza fissa per ogni esempio mediando sulle dimensioni della sequenza. Ciò permette al modello di gestire input di lunghezza variabile, nel modo più semplice possibile.\\n\",\n \"3. Questo vettore di output a lunghezza fissa viene passato attraverso un livello completamente connesso (`Denso`) con 16 unità nascoste.\\n\",\n \"4. L'ultimo livello è connesso densamente ed ha un solo nodo di output. Usando la funzione di attivazione `sigmoid`, questo valore è un decimale tra 0 e 1, che rappresenta una probabilità, o un livello di confidenza.\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"0XMwnDOp-llH\"\n },\n \"source\": [\n \"### Unità nascoste\\n\",\n \"\\n\",\n \"Il modello di cui sopra ha due livelli intermedi o \\\"nascosti\\\", tra l'input e l'output. Il numero di output (unità, nodi o neuroni) è la dimensione dello spazio di rappresentazione del livello. In altre parole, l'ammontare della libertà di cui dispone la rete quando durante l'apprendimento di una rappresentazione interna.\\n\",\n \"\\n\",\n \"Se un modello ha più di un'unità nascosta (uno spazio di rappresentazione dimensionale più grande), e/o più livelli, allora la rete può apprendere rappresentazioni più complesse. Comunque, ciò rende la rete computazionalmente più costosa e può condurre all'apprendimento di pattern indesiderati—pattern che aumentano le prestazioni sui dati di addestramento ma non sui dati di test. Questo (fenomeno n.d.r.) viene chiamato *overfitting* (sovradattamento n.d.t.), e verrà esplorato in seguito.\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"L4EqVWg4-llM\"\n },\n \"source\": [\n \"### Funzione obiettivo e ottimizzatore\\n\",\n \"\\n\",\n \"Un modello, per l'addestramento, ha bisogno di una funzione obiettivo e di un ottimizzatore. Essendo questo un problema di classificazione binaria e l'output del modello una probabilità (un livello a unità singola con un'attivazione sigmoid), useremo la funzione obiettivo `binary_crossentropy`.\\n\",\n \"\\n\",\n \"Questa non è l'unica scelta possibile per una funzione obiettivo, potreste, per esempio, scegliere la `mean_squared_error`. In generale, però, `binary_crossentropy` è migliore per gestire probabilità—essa misura la \\\"distanza\\\" tra distribuzioni di probabilità o, nel nostro caso, tra la distribuzione dei dati reali e le previsioni.\\n\",\n \"\\n\",\n \"Nel seguito, quando esploreremo i problemi di regressione (diciamo, per prevedere il prezzo di una casa), vedremo come usare un'altra funzione obiettivo chiamata scarto quadratico medio.\\n\",\n \"\\n\",\n \"Adesso, configuriamo il modello per usare un ottimizzatore ed una funzione obiettivo:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"id\": \"Mr0GP-cQ-llN\"\n },\n \"outputs\": [],\n \"source\": [\n \"model.compile(optimizer='adam',\\n\",\n \" loss=tf.losses.BinaryCrossentropy(from_logits=True),\\n\",\n \" metrics=['accuracy'])\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"35jv_fzP-llU\"\n },\n \"source\": [\n \"## Addestriamo il modello\\n\",\n \"\\n\",\n \"Addestrare il modello passando l'oggetto `Dataset` alla funzione di allenamento del modello. Impostare il numero di epoche.\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"id\": \"tXSGrjWZ-llW\"\n },\n \"outputs\": [],\n \"source\": [\n \"history = model.fit(train_batches,\\n\",\n \" epochs=10,\\n\",\n \" validation_data=test_batches,\\n\",\n \" validation_steps=30)\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"9EEGuDVuzb5r\"\n },\n \"source\": [\n \"## Valutiamo il modello\\n\",\n \"\\n\",\n \"E andiamo a vedere come si comporta il modello. Saranno restituiti due valori. loss (Perdita n.d.t.) (un numero che rappresenta il nostro errore, per cui valori piccoli sono migliori), e accuracy (accuratezza n.d.t).\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"id\": \"zOMKywn4zReN\"\n },\n \"outputs\": [],\n \"source\": [\n \"loss, accuracy = model.evaluate(test_batches)\\n\",\n \"\\n\",\n \"print(\\\"Loss: \\\", loss)\\n\",\n \"print(\\\"Accuracy: \\\", accuracy)\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"z1iEXVTR0Z2t\"\n },\n \"source\": [\n \"Questo approccio abbastanza ingenuo raggiunge un'accuratezza di circa l'87%. Con approcci più avanzati, il modello potrebbe avvicinarsi al 95%.\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"5KggXVeL-llZ\"\n },\n \"source\": [\n \"## Creiamo un grafico di accuratezza e obiettivo nel tempo\\n\",\n \"\\n\",\n \"`model.fit()` restituisce un oggetto `History` che contiene un registro con tutto ciò che è accaduto durante l'addestramento:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"id\": \"VcvSXvhp-llb\"\n },\n \"outputs\": [],\n \"source\": [\n \"history_dict = history.history\\n\",\n \"history_dict.keys()\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"nRKsqL40-lle\"\n },\n \"source\": [\n \"Ci sono quattro sezioni: una per ogni metrica monitorata durante l'addestramento e la validazione. Possiamo usare queste per tracciare il confronto tra l'obiettivo in addestramento e in validazione, così come l'accuratezza in addestramento e validazione:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"id\": \"nGoYf2Js-lle\"\n },\n \"outputs\": [],\n \"source\": [\n \"import matplotlib.pyplot as plt\\n\",\n \"\\n\",\n \"acc = history_dict['accuracy']\\n\",\n \"val_acc = history_dict['val_accuracy']\\n\",\n \"loss = history_dict['loss']\\n\",\n \"val_loss = history_dict['val_loss']\\n\",\n \"\\n\",\n \"epochs = range(1, len(acc) + 1)\\n\",\n \"\\n\",\n \"# \\\"bo\\\" is for \\\"blue dot\\\"\\n\",\n \"plt.plot(epochs, loss, 'bo', label='Training loss')\\n\",\n \"# b is for \\\"solid blue line\\\"\\n\",\n \"plt.plot(epochs, val_loss, 'b', label='Validation loss')\\n\",\n \"plt.title('Training and validation loss')\\n\",\n \"plt.xlabel('Epochs')\\n\",\n \"plt.ylabel('Loss')\\n\",\n \"plt.legend()\\n\",\n \"\\n\",\n \"plt.show()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"id\": \"6hXx-xOv-llh\"\n },\n \"outputs\": [],\n \"source\": [\n \"plt.clf() # clear figure\\n\",\n \"\\n\",\n \"plt.plot(epochs, acc, 'bo', label='Training acc')\\n\",\n \"plt.plot(epochs, val_acc, 'b', label='Validation acc')\\n\",\n \"plt.title('Training and validation accuracy')\\n\",\n \"plt.xlabel('Epochs')\\n\",\n \"plt.ylabel('Accuracy')\\n\",\n \"plt.legend(loc='lower right')\\n\",\n \"\\n\",\n \"plt.show()\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {\n \"id\": \"oFEmZ5zq-llk\"\n },\n \"source\": [\n \"In questo grafico, i punti rappresentano la perita e l'accuratezza in addestramento, mentre le linee continue sono l'obiettivo e l'accuratezza in validazione.\\n\",\n \"\\n\",\n \"Notate che l'obiettivo in addestramento *decresce* con le epoche e l'accuratezza *cresce* con le epoche. Questo è quello che ci si attende quando si usa un'ottimizzazione a gradiente discendente—esso dovrebbe minimizzare la quantità obiettivo ad ogni iterazione.\\n\",\n \"\\n\",\n \"Questo non accade per obiettivo e accuratezza in validazione—esse sembrano avere un picco dopo circa venti epoche. Questo è un esempio di sovradattamento: il modello ha prestazioni migliori sui dati di addestramento che su dati che non ha mai visto prima. Dopo questo punto, il modello sovra-ottimizza ed impara rappresentazioni *specifiche* dei dati di addestramento che non *generalizzano* sui dati di test.\\n\",\n \"\\n\",\n \"Per questo caso particolare, non possiamo prevenire il sovradattamento fermando semplicemente l'addestramento dopo più o meno venti epoche. Nel seguito, vedremo come farlo automaticamente con una callback.\"\n ]\n }\n ],\n \"metadata\": {\n \"colab\": {\n \"collapsed_sections\": [],\n \"name\": \"text_classification.ipynb\",\n \"toc_visible\": true\n },\n \"kernelspec\": {\n \"display_name\": \"Python 3\",\n \"name\": \"python3\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 0\n}\n"} +{"text": "unit uMeetingDM;\n\ninterface\n\nuses\n Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,\n Dialogs, uAbstractDataModule, FMTBcd, DBClient, Provider, DB, DateUtils,\n FireDAC.Stan.Intf, FireDAC.Stan.Option, FireDAC.Stan.Param,\n FireDAC.Stan.Error, FireDAC.DatS, FireDAC.Phys.Intf, FireDAC.DApt.Intf,\n FireDAC.Stan.Async, FireDAC.DApt, FireDAC.Comp.DataSet, FireDAC.Comp.Client,\n FireDAC.DBX.Migrate;\n\ntype\n TMeetingDM = class(TAbstractDataModule)\n sqlControlMEETING_ID: TIntegerField;\n sqlControlTOPIC: TStringField;\n sqlControlDURATION: TIntegerField;\n sqlControlSTARTDATE: TDateField;\n sqlControlSTARTTIME: TTimeField;\n sqlControlUSER_ID: TIntegerField;\n sqlControlNAME_USER: TStringField;\n sqlControlROOM_ID: TIntegerField;\n sqlControlNAME_ROOM: TStringField;\n cdsControlMEETING_ID: TIntegerField;\n cdsControlTOPIC: TStringField;\n cdsControlDURATION: TIntegerField;\n cdsControlSTARTDATE: TDateField;\n cdsControlSTARTTIME: TTimeField;\n cdsControlUSER_ID: TIntegerField;\n cdsControlNAME_USER: TStringField;\n cdsControlROOM_ID: TIntegerField;\n cdsControlNAME_ROOM: TStringField;\n sqlParticipants: TFDQuery;\n cdsParticipants: TClientDataSet;\n cdsParticipantsUSER_ID: TIntegerField;\n cdsParticipantsNAME: TStringField;\n cdsParticipantsMEETING_ID: TIntegerField;\n sqlSearchPart: TFDQuery;\n cdsSearchPart: TClientDataSet;\n sqlSearchPartUSER_ID: TIntegerField;\n sqlSearchPartNAME: TStringField;\n cdsSearchPartUSER_ID: TIntegerField;\n cdsSearchPartNAME: TStringField;\n sqlParticipantsMEETING_ID: TIntegerField;\n sqlParticipantsUSER_ID: TIntegerField;\n sqlParticipantsUSER_NAME: TStringField;\n dspSearchPart: TDataSetProvider;\n dspParticipants: TDataSetProvider;\n sqlControlLASTCHANGE: TSQLTimeStampField;\n cdsControlLASTCHANGE: TSQLTimeStampField;\n procedure dspControlBeforeUpdateRecord(Sender: TObject; SourceDS: TDataSet;\n DeltaDS: TCustomClientDataSet; UpdateKind: TUpdateKind;\n var Applied: Boolean);\n procedure cdsControlNewRecord(DataSet: TDataSet);\n procedure cdsControlBeforePost(DataSet: TDataSet);\n procedure cdsControlBeforeDelete(DataSet: TDataSet);\n procedure cdsControlBeforeEdit(DataSet: TDataSet);\n procedure cdsControlAfterScroll(DataSet: TDataSet);\n procedure cdsControlDURATIONChange(Sender: TField);\n procedure dspControlAfterUpdateRecord(Sender: TObject; SourceDS: TDataSet;\n DeltaDS: TCustomClientDataSet; UpdateKind: TUpdateKind);\n private\n { Private declarations }\n public\n { Public declarations }\n end;\n\nimplementation\n\nuses\n uMainDM, uUserControl, uMeetingControl, uMsgControl;\n\n{$R *.dfm}\n\nprocedure TMeetingDM.cdsControlAfterScroll(DataSet: TDataSet);\nbegin\n inherited;\n cdsSearchPart.Close;\n cdsSearchPart.Params.ParamByName('MEETING_ID').AsInteger :=\n DataSet.FieldByName('MEETING_ID').AsInteger;\n cdsSearchPart.Open;\n\n cdsParticipants.Close;\n cdsParticipants.Params.ParamByName('MEETING_ID').AsInteger :=\n DataSet.FieldByName('MEETING_ID').AsInteger;\n cdsParticipants.Open;\nend;\n\nprocedure TMeetingDM.cdsControlBeforeDelete(DataSet: TDataSet);\nbegin\n if not TMeetingControl.GetInstance.CheckMeetingOwner then\n raise Exception.Create\n ('This operation is granted to the meeting owner only!');\n inherited;\nend;\n\nprocedure TMeetingDM.cdsControlBeforeEdit(DataSet: TDataSet);\nbegin\n if not TMeetingControl.GetInstance.CheckMeetingOwner then\n raise Exception.Create\n ('This operation is granted to the meeting owner only!');\n inherited;\nend;\n\nprocedure TMeetingDM.cdsControlBeforePost(DataSet: TDataSet);\nbegin\n inherited;\n CheckRequiredFields(DataSet);\n\n if not TMeetingControl.GetInstance.CheckNumberOfParts then\n raise Exception.Create('At least two participants must be selected!');\n\n { Generating MeetingID }\n if DataSet.State = dsInsert then\n begin\n DataSet.FieldByName('MEETING_ID').AsInteger := GenerateID('GEN_MEETING_ID');\n cdsParticipants.First;\n While not cdsParticipants.Eof do\n begin\n cdsParticipants.Edit;\n cdsParticipants.FieldByName('MEETING_ID').AsInteger :=\n DataSet.FieldByName('MEETING_ID').AsInteger;\n cdsParticipants.Post;\n cdsParticipants.Next;\n end;\n end;\n\n { Logging date/time when meeting was changed }\n DataSet.FieldByName('LASTCHANGE').AsDateTime := Now;\nend;\n\nprocedure TMeetingDM.cdsControlDURATIONChange(Sender: TField);\nbegin\n inherited;\n if cdsControl.State in [dsInsert, dsEdit] then\n begin\n cdsControl.FieldByName('STARTTIME').AsString := '';\n cdsControl.FieldByName('ROOM_ID').AsString := '';\n cdsControl.FieldByName('ROOM_NAME').AsString := '';\n end;\nend;\n\nprocedure TMeetingDM.cdsControlNewRecord(DataSet: TDataSet);\nbegin\n inherited;\n { Meeting Owner }\n cdsControl.FieldByName('USER_ID').AsInteger :=\n TUserControl.GetInstance.fUserID;\n cdsControlSTARTDATE.AsDateTime := Date;\nend;\n\nprocedure TMeetingDM.dspControlAfterUpdateRecord(Sender: TObject;\n SourceDS: TDataSet; DeltaDS: TCustomClientDataSet; UpdateKind: TUpdateKind);\nbegin\n inherited;\n if UpdateKind = ukInsert then\n cdsParticipants.ApplyUpdates(0);\nend;\n\nprocedure TMeetingDM.dspControlBeforeUpdateRecord(Sender: TObject;\n SourceDS: TDataSet; DeltaDS: TCustomClientDataSet; UpdateKind: TUpdateKind;\n var Applied: Boolean);\nbegin\n inherited;\n if SourceDS.Name = 'sqlControl' then\n begin\n { Validating meeting room }\n if not TMeetingControl.GetInstance.ValidateMeetingRoom\n (DeltaDS.FieldByName('MEETING_ID').AsInteger,\n DeltaDS.FieldByName('ROOM_ID').AsInteger, DeltaDS.FieldByName('STARTDATE')\n .AsDateTime, DeltaDS.FieldByName('STARTTIME').AsDateTime,\n DeltaDS.FieldByName('DURATION').AsInteger) then\n raise Exception.Create('There is no more availability for this room!');\n\n cdsParticipants.First;\n While not cdsParticipants.Eof do\n begin\n\n { Validating meeting participants }\n if (UpdateKind = ukInsert) or (UpdateKind = ukModify) then\n if not TMeetingControl.GetInstance.ValidateParticipants\n (DeltaDS.FieldByName('MEETING_ID').AsInteger,\n cdsParticipants.FieldByName('USER_ID').AsInteger,\n DeltaDS.FieldByName('STARTDATE').AsDateTime,\n DeltaDS.FieldByName('STARTTIME').AsDateTime,\n DeltaDS.FieldByName('DURATION').AsInteger) then\n raise Exception.Create('There is no more availability for user ' +\n cdsParticipants.FieldByName('USER_NAME').AsString + '!');\n\n { Sending meeting notification }\n TMeetingControl.GetInstance.SendMeetingNotification\n (cdsParticipants.FieldByName('USER_ID').AsInteger,\n DeltaDS.FieldByName('STARTDATE').AsDateTime,\n DeltaDS.FieldByName('STARTTIME').AsDateTime,\n DeltaDS.FieldByName('DURATION').AsInteger,\n DeltaDS.FieldByName('ROOM_NAME').AsString, DeltaDS.FieldByName('TOPIC')\n .AsString, Integer(UpdateKind));\n\n { If the meeting was canceled then remove participants }\n if UpdateKind = ukDelete then\n cdsParticipants.Delete\n else\n cdsParticipants.Next;\n end;\n\n if UpdateKind in [ukModify, ukDelete] then\n cdsParticipants.ApplyUpdates(0);\n end;\nend;\n\nend.\n"} +{"text": "plugins[$plugin->getMethod()] = $plugin;\n\n return $this;\n }\n\n /**\n * Find a specific plugin.\n *\n * @param string $method\n *\n * @throws PluginNotFoundException\n *\n * @return PluginInterface\n */\n protected function findPlugin($method)\n {\n if ( ! isset($this->plugins[$method])) {\n throw new PluginNotFoundException('Plugin not found for method: ' . $method);\n }\n\n return $this->plugins[$method];\n }\n\n /**\n * Invoke a plugin by method name.\n *\n * @param string $method\n * @param array $arguments\n * @param FilesystemInterface $filesystem\n *\n * @throws PluginNotFoundException\n *\n * @return mixed\n */\n protected function invokePlugin($method, array $arguments, FilesystemInterface $filesystem)\n {\n $plugin = $this->findPlugin($method);\n $plugin->setFilesystem($filesystem);\n $callback = [$plugin, 'handle'];\n\n return call_user_func_array($callback, $arguments);\n }\n\n /**\n * Plugins pass-through.\n *\n * @param string $method\n * @param array $arguments\n *\n * @throws BadMethodCallException\n *\n * @return mixed\n */\n public function __call($method, array $arguments)\n {\n try {\n return $this->invokePlugin($method, $arguments, $this);\n } catch (PluginNotFoundException $e) {\n throw new BadMethodCallException(\n 'Call to undefined method '\n . get_class($this)\n . '::' . $method\n );\n }\n }\n}\n"} +{"text": "FROM ubuntu:16.04\n\nMAINTAINER Couchbase Docker Team \n\n# Install dependencies:\n# runit: for container process management\n# wget: for downloading .deb\n# chrpath: for fixing curl, below\n# tzdata: timezone info used by some N1QL functions\n# Additional dependencies for system commands used by cbcollect_info:\n# lsof: lsof\n# lshw: lshw\n# sysstat: iostat, sar, mpstat\n# net-tools: ifconfig, arp, netstat\n# numactl: numactl\nRUN apt-get update && \\\n apt-get install -yq runit wget chrpath tzdata \\\n lsof lshw sysstat net-tools numactl python-httplib2 && \\\n apt-get autoremove && apt-get clean && \\\n rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*\n\nARG CB_VERSION=6.0.0\nARG CB_RELEASE_URL=https://packages.couchbase.com/releases/6.0.0\nARG CB_PACKAGE=couchbase-server-community_6.0.0-ubuntu16.04_amd64.deb\nARG CB_SHA256=949b1ded72776a557b9cd3ac89253a4fe6aed079966a4057c5aec41ae5a30ece\n\nENV PATH=$PATH:/opt/couchbase/bin:/opt/couchbase/bin/tools:/opt/couchbase/bin/install\n\n# Create Couchbase user with UID 1000 (necessary to match default\n# boot2docker UID)\nRUN groupadd -g 1000 couchbase && useradd couchbase -u 1000 -g couchbase -M\n\n# Install couchbase\nRUN export INSTALL_DONT_START_SERVER=1 && \\\n wget -N --no-verbose $CB_RELEASE_URL/$CB_PACKAGE && \\\n echo \"$CB_SHA256 $CB_PACKAGE\" | sha256sum -c - && \\\n dpkg -i ./$CB_PACKAGE && rm -f ./$CB_PACKAGE\n\n# Add runit script for couchbase-server\nCOPY scripts/run /etc/service/couchbase-server/run\nRUN chown -R couchbase:couchbase /etc/service\n\n# Add dummy script for commands invoked by cbcollect_info that\n# make no sense in a Docker container\nCOPY scripts/dummy.sh /usr/local/bin/\nRUN ln -s dummy.sh /usr/local/bin/iptables-save && \\\n ln -s dummy.sh /usr/local/bin/lvdisplay && \\\n ln -s dummy.sh /usr/local/bin/vgdisplay && \\\n ln -s dummy.sh /usr/local/bin/pvdisplay\n\n# Fix curl RPATH\nRUN chrpath -r '$ORIGIN/../lib' /opt/couchbase/bin/curl\n\n# Add bootstrap script\nCOPY scripts/entrypoint.sh /\nENTRYPOINT [\"/entrypoint.sh\"]\nCMD [\"couchbase-server\"]\n\n# 8091: Couchbase Web console, REST/HTTP interface\n# 8092: Views, queries, XDCR\n# 8093: Query services (4.0+)\n# 8094: Full-text Search (4.5+)\n# 8095: Analytics (5.5+)\n# 8096: Eventing (5.5+)\n# 11207: Smart client library data node access (SSL)\n# 11210: Smart client library/moxi data node access\n# 11211: Legacy non-smart client library data node access\n# 18091: Couchbase Web console, REST/HTTP interface (SSL)\n# 18092: Views, query, XDCR (SSL)\n# 18093: Query services (SSL) (4.0+)\n# 18094: Full-text Search (SSL) (4.5+)\n# 18095: Analytics (SSL) (5.5+)\n# 18096: Eventing (SSL) (5.5+)\nEXPOSE 8091 8092 8093 8094 8095 8096 11207 11210 11211 18091 18092 18093 18094 18095 18096\nVOLUME /opt/couchbase/var\n\n"} +{"text": "\r\n\r\n \r\n False\r\n False\r\n False\r\n True\r\n False\r\n $02000000\r\n $00FF9933\r\n \r\n \r\n False\r\n False\r\n False\r\n False\r\n False\r\n $00FF0000\r\n $00C1D5E3\r\n \r\n \r\n False\r\n False\r\n False\r\n False\r\n False\r\n $00000080\r\n $00C1D5E3\r\n \r\n \r\n False\r\n False\r\n False\r\n False\r\n False\r\n $00FF0000\r\n $00C1D5E3\r\n \r\n \r\n True\r\n False\r\n False\r\n False\r\n False\r\n $02000000\r\n $00619DB8\r\n \r\n \r\n True\r\n False\r\n False\r\n False\r\n False\r\n $00808000\r\n $00C1D5E3\r\n \r\n \r\n False\r\n False\r\n False\r\n False\r\n False\r\n $02000000\r\n $00C1D5E3\r\n \r\n \r\n False\r\n False\r\n False\r\n False\r\n False\r\n $00800080\r\n $00C1D5E3\r\n \r\n \r\n False\r\n False\r\n False\r\n True\r\n False\r\n clBlack\r\n $00CCFFCC\r\n \r\n \r\n False\r\n False\r\n False\r\n True\r\n False\r\n clBlack\r\n $00FFC7C7\r\n \r\n \r\n False\r\n False\r\n False\r\n True\r\n False\r\n clBlack\r\n $00AAFFFF\r\n \r\n \r\n False\r\n False\r\n False\r\n False\r\n False\r\n clGray\r\n $00FFC7C7\r\n \r\n \r\n False\r\n False\r\n False\r\n False\r\n False\r\n clBlack\r\n $00FFC7C7\r\n \r\n \r\n False\r\n False\r\n False\r\n False\r\n False\r\n clWhite\r\n clRed\r\n \r\n \r\n False\r\n False\r\n False\r\n False\r\n False\r\n clBlack\r\n $009999CC\r\n \r\n \r\n True\r\n False\r\n False\r\n False\r\n False\r\n $00FF0000\r\n $00C1D5E3\r\n \r\n \r\n False\r\n False\r\n False\r\n False\r\n False\r\n $00CC9999\r\n clWhite\r\n \r\n \r\n True\r\n False\r\n False\r\n False\r\n False\r\n $00FF0000\r\n $00C1D5E3\r\n \r\n \r\n False\r\n False\r\n False\r\n False\r\n False\r\n $00FF0000\r\n $00C1D5E3\r\n \r\n \r\n False\r\n False\r\n False\r\n False\r\n False\r\n $02000000\r\n $00C1D5E3\r\n \r\n \r\n False\r\n False\r\n False\r\n False\r\n False\r\n $000000FF\r\n $00C1D5E3\r\n \r\n \r\n False\r\n False\r\n False\r\n False\r\n False\r\n clWhite\r\n clGreen\r\n \r\n \r\n False\r\n False\r\n False\r\n True\r\n False\r\n $02000000\r\n $00FF9933\r\n \r\n \r\n False\r\n False\r\n False\r\n False\r\n False\r\n $02000000\r\n $00C1D5E3\r\n \r\n \r\n False\r\n False\r\n False\r\n True\r\n False\r\n $02000000\r\n $00FF9933\r\n \r\n \r\n False\r\n False\r\n False\r\n False\r\n False\r\n clLime\r\n clYellow\r\n \r\n \r\n True\r\n False\r\n False\r\n False\r\n False\r\n $00FF0000\r\n $00C1D5E3\r\n \r\n \r\n True\r\n False\r\n False\r\n False\r\n False\r\n $00FF0000\r\n $00C1D5E3\r\n \r\n \r\n <Bold>False</Bold>\r\n <Italic>False</Italic>\r\n <Underline>False</Underline>\r\n <DefaultForeground>False</DefaultForeground>\r\n <DefaultBackground>False</DefaultBackground>\r\n <ForegroundColorNew>$02000000</ForegroundColorNew>\r\n <BackgroundColorNew>$00C1D5E3</BackgroundColorNew>\r\n </PlainText>\r\n <Preprocessor>\r\n <Bold>False</Bold>\r\n <Italic>False</Italic>\r\n <Underline>False</Underline>\r\n <DefaultForeground>False</DefaultForeground>\r\n <DefaultBackground>False</DefaultBackground>\r\n <ForegroundColorNew>$00000080</ForegroundColorNew>\r\n <BackgroundColorNew>$00C1D5E3</BackgroundColorNew>\r\n </Preprocessor>\r\n <ReservedWord>\r\n <Bold>False</Bold>\r\n <Italic>False</Italic>\r\n <Underline>False</Underline>\r\n <DefaultForeground>False</DefaultForeground>\r\n <DefaultBackground>False</DefaultBackground>\r\n <ForegroundColorNew>$0010259A</ForegroundColorNew>\r\n <BackgroundColorNew>$00C1D5E3</BackgroundColorNew>\r\n </ReservedWord>\r\n <RightMargin>\r\n <Bold>False</Bold>\r\n <Italic>False</Italic>\r\n <Underline>False</Underline>\r\n <DefaultForeground>False</DefaultForeground>\r\n <DefaultBackground>False</DefaultBackground>\r\n <ForegroundColorNew>$02000000</ForegroundColorNew>\r\n <BackgroundColorNew>$004A8AA6</BackgroundColorNew>\r\n </RightMargin>\r\n <Scripts>\r\n <Bold>False</Bold>\r\n <Italic>False</Italic>\r\n <Underline>False</Underline>\r\n <DefaultForeground>False</DefaultForeground>\r\n <DefaultBackground>True</DefaultBackground>\r\n <ForegroundColorNew>clPurple</ForegroundColorNew>\r\n <BackgroundColorNew>clWhite</BackgroundColorNew>\r\n </Scripts>\r\n <SearchMatch>\r\n <Bold>False</Bold>\r\n <Italic>False</Italic>\r\n <Underline>False</Underline>\r\n <DefaultForeground>False</DefaultForeground>\r\n <DefaultBackground>False</DefaultBackground>\r\n <ForegroundColorNew>$02000000</ForegroundColorNew>\r\n <BackgroundColorNew>$00FF9933</BackgroundColorNew>\r\n </SearchMatch>\r\n <String>\r\n <Bold>True</Bold>\r\n <Italic>False</Italic>\r\n <Underline>False</Underline>\r\n <DefaultForeground>False</DefaultForeground>\r\n <DefaultBackground>False</DefaultBackground>\r\n <ForegroundColorNew>$00808000</ForegroundColorNew>\r\n <BackgroundColorNew>$00C1D5E3</BackgroundColorNew>\r\n </String>\r\n <Symbol>\r\n <Bold>False</Bold>\r\n <Italic>False</Italic>\r\n <Underline>False</Underline>\r\n <DefaultForeground>False</DefaultForeground>\r\n <DefaultBackground>False</DefaultBackground>\r\n <ForegroundColorNew>$02000000</ForegroundColorNew>\r\n <BackgroundColorNew>$00C1D5E3</BackgroundColorNew>\r\n </Symbol>\r\n <SyncEditBackground>\r\n <Bold>False</Bold>\r\n <Italic>False</Italic>\r\n <Underline>False</Underline>\r\n <DefaultForeground>True</DefaultForeground>\r\n <DefaultBackground>False</DefaultBackground>\r\n <ForegroundColorNew>clBlack</ForegroundColorNew>\r\n <BackgroundColorNew>$00FAFFE6</BackgroundColorNew>\r\n </SyncEditBackground>\r\n <SyncEditHighlight>\r\n <Bold>False</Bold>\r\n <Italic>False</Italic>\r\n <Underline>False</Underline>\r\n <DefaultForeground>False</DefaultForeground>\r\n <DefaultBackground>False</DefaultBackground>\r\n <ForegroundColorNew>clBlue</ForegroundColorNew>\r\n <BackgroundColorNew>clWhite</BackgroundColorNew>\r\n </SyncEditHighlight>\r\n <Tags>\r\n <Bold>True</Bold>\r\n <Italic>False</Italic>\r\n <Underline>False</Underline>\r\n <DefaultForeground>False</DefaultForeground>\r\n <DefaultBackground>True</DefaultBackground>\r\n <ForegroundColorNew>clNavy</ForegroundColorNew>\r\n <BackgroundColorNew>clWhite</BackgroundColorNew>\r\n </Tags>\r\n <Whitespace>\r\n <Bold>False</Bold>\r\n <Italic>False</Italic>\r\n <Underline>False</Underline>\r\n <DefaultForeground>False</DefaultForeground>\r\n <DefaultBackground>False</DefaultBackground>\r\n <ForegroundColorNew>$02000000</ForegroundColorNew>\r\n <BackgroundColorNew>$00C1D5E3</BackgroundColorNew>\r\n </Whitespace>\r\n</DelphiIDETheme>\r\n"} +{"text": "{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"Uma correlação de zero indica que não há uma correlação **linear** entre as duas variáveis. Porém pode haver vários tipos de realações. Exemplo:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"import scipy.stats as ss\\n\",\n \"from scipy.stats import norm\\n\",\n \"import numpy as np\\n\",\n \"import matplotlib.pyplot as plt\\n\",\n \"import seaborn as sns\\n\",\n \"import pandas as pd\\n\",\n \"\\n\",\n \"%matplotlib inline\\n\",\n \"%config InlineBackend.figure_formats=['svg']\\n\",\n \"\\n\",\n \"df = pd.DataFrame([[-5,5],\\n\",\n \" [-4,4],\\n\",\n \" [-3,3],\\n\",\n \" [-2,2],\\n\",\n \" [-1,1],\\n\",\n \" [0,0],\\n\",\n \" [1,1],\\n\",\n \" [2,2],\\n\",\n \" [3,3],\\n\",\n \" [5,5],\\n\",\n \" [4,4]], columns=['x','y'])\\n\",\n \"sns.set(color_codes=True)\\n\",\n \"sns.jointplot(x='x', y='y', data=df, kind='reg')\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"Correlação = 0, onde cada elemento de y é o valor absoluto (em módulo) de x.\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"Uma correlação de pearson procura relação entre a diferença de cada observação e sua média contra cada observação da outra variavel contra sua média.\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"Além disso, correlação não diz nada sobre o tamanho nominal da relação. Exemplo:\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"df = pd.DataFrame([[-2,99.98],\\n\",\n \" [-1,99.99],\\n\",\n \" [0,100],\\n\",\n \" [1,100.01],\\n\",\n \" [2,100.02]], columns=['x','y'])\\n\",\n \"sns.jointplot(x='x', y='y', data=df, kind='reg')\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"Assim, além da correlação de pearson há outros tipos de correlações como de **Spearman** e **Kendall** que podem capturar funções não lineares se as distribuições forem monoticas, ou seja, se independente da forma da função o \\\"ranking\\\" das variaveis for a correlação de interesse.\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"metadata\": {},\n \"source\": [\n \"Por último, é sempre bom lembrar que correlação **NÃO** implica causalidade, como veremos nas próximas aulas.\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"Python 3\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.7.3\"\n },\n \"toc\": {\n \"base_numbering\": 1,\n \"nav_menu\": {},\n \"number_sections\": true,\n \"sideBar\": true,\n \"skip_h1_title\": false,\n \"title_cell\": \"Table of Contents\",\n \"title_sidebar\": \"Contents\",\n \"toc_cell\": false,\n \"toc_position\": {},\n \"toc_section_display\": true,\n \"toc_window_display\": false\n },\n \"varInspector\": {\n \"cols\": {\n \"lenName\": 16,\n \"lenType\": 16,\n \"lenVar\": 40\n },\n \"kernels_config\": {\n \"python\": {\n \"delete_cmd_postfix\": \"\",\n \"delete_cmd_prefix\": \"del \",\n \"library\": \"var_list.py\",\n \"varRefreshCmd\": \"print(var_dic_list())\"\n },\n \"r\": {\n \"delete_cmd_postfix\": \") \",\n \"delete_cmd_prefix\": \"rm(\",\n \"library\": \"var_list.r\",\n \"varRefreshCmd\": \"cat(var_dic_list()) \"\n }\n },\n \"types_to_exclude\": [\n \"module\",\n \"function\",\n \"builtin_function_or_method\",\n \"instance\",\n \"_Feature\"\n ],\n \"window_display\": false\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"} +{"text": "--\n--\tpsql configuration file\n--\n-- This file is read before the .psqlrc file in the user's home directory.\n--\n-- Copy this to your sysconf directory (typically /usr/local/pgsql/etc) and\n-- rename it psqlrc.\n"} +{"text": "/*\n * uDig - User Friendly Desktop Internet GIS client\n * (C) HydroloGIS - www.hydrologis.com \n *\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * (http://www.eclipse.org/legal/epl-v10.html), and the HydroloGIS BSD\n * License v1.0 (http://udig.refractions.net/files/hsd3-v10.html).\n */\npackage org.locationtech.udig.printing.ui.internal;\n\nimport org.locationtech.udig.printing.model.Page;\nimport org.locationtech.udig.printing.ui.internal.editor.PageEditor;\nimport org.locationtech.udig.printing.ui.internal.editor.PageEditorInput;\nimport org.locationtech.udig.project.ui.UDIGEditorInput;\n\nimport org.eclipse.draw2d.geometry.Dimension;\nimport org.eclipse.gef.editparts.ZoomManager;\nimport org.eclipse.jface.action.Action;\nimport org.eclipse.jface.action.IAction;\nimport org.eclipse.jface.viewers.ISelection;\nimport org.eclipse.ui.IEditorActionDelegate;\nimport org.eclipse.ui.IEditorPart;\nimport org.eclipse.ui.IWorkbenchWindow;\nimport org.eclipse.ui.PlatformUI;\n\n/**\n * Action to zoom in the print page.\n * \n * @author Andrea Antonello (www.hydrologis.com)\n *\n */\npublic class ZoomInAction extends Action implements IEditorActionDelegate {\n\n public ZoomInAction() {\n super();\n }\n\n public void setActiveEditor( IAction action, IEditorPart targetEditor ) {\n }\n\n public void run( IAction action ) {\n run();\n }\n\n public void run() {\n\n Page page = null;\n IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();\n UDIGEditorInput editorInput = (UDIGEditorInput) workbenchWindow.getActivePage()\n .getActiveEditor().getEditorInput();\n if (editorInput instanceof PageEditorInput) {\n page = (Page) ((PageEditorInput) editorInput).getProjectElement();\n }\n if (page == null) {\n throw new RuntimeException(Messages.PrintAction_pageError);\n }\n\n Dimension pSize = page.getSize();\n\n float factor = (float) pSize.height / (float) pSize.width;\n float xPlus = 10f;\n float yPlus = xPlus * factor;\n int w = pSize.width + (int) xPlus;\n int h = pSize.height + (int) yPlus;\n page.setSize(new Dimension(w, h));\n\n // IWorkbenchWindow workbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();\n // IEditorPart activeEditor = workbenchWindow.getActivePage().getActiveEditor();\n // PageEditor pageEditor = (PageEditor) activeEditor;\n // ZoomManager zoomManager = (ZoomManager) pageEditor.getAdapter(ZoomManager.class);\n // double next = zoomManager.getNextZoomLevel();\n // zoomManager.setZoom(next);\n }\n\n public void selectionChanged( IAction action, ISelection selection ) {\n }\n\n}\n"} +{"text": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<!-- NewPage -->\n<html lang=\"zh\">\n<head>\n<!-- Generated by javadoc (1.8.0_92) on Sat Sep 14 20:49:21 CST 2019 -->\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n<title>ImageEngine</title>\n<meta name=\"date\" content=\"2019-09-14\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"../../../stylesheet.css\" title=\"Style\">\n<script type=\"text/javascript\" src=\"../../../script.js\"></script>\n</head>\n<body>\n<script type=\"text/javascript\"><!--\n try {\n if (location.href.indexOf('is-external=true') == -1) {\n parent.document.title=\"ImageEngine\";\n }\n }\n catch(err) {\n }\n//-->\nvar methods = {\"i0\":9};\nvar tabs = {65535:[\"t0\",\"所有方法\"],1:[\"t1\",\"静态方法\"],8:[\"t4\",\"具体方法\"]};\nvar altColor = \"altColor\";\nvar rowColor = \"rowColor\";\nvar tableTab = \"tableTab\";\nvar activeTableTab = \"activeTableTab\";\n</script>\n<noscript>\n<div>您的浏览器已禁用 JavaScript。</div>\n</noscript>\n<!-- ========= START OF TOP NAVBAR ======= -->\n<div class=\"topNav\"><a name=\"navbar.top\">\n<!-- -->\n</a>\n<div class=\"skipNav\"><a href=\"#skip.navbar.top\" title=\"跳过导航链接\">跳过导航链接</a></div>\n<a name=\"navbar.top.firstrow\">\n<!-- -->\n</a>\n<ul class=\"navList\" title=\"导航\">\n<li><a href=\"../../../overview-summary.html\">概览</a></li>\n<li><a href=\"package-summary.html\">程序包</a></li>\n<li class=\"navBarCell1Rev\">类</li>\n<li><a href=\"package-tree.html\">树</a></li>\n<li><a href=\"../../../deprecated-list.html\">已过时</a></li>\n<li><a href=\"../../../index-files/index-1.html\">索引</a></li>\n<li><a href=\"../../../help-doc.html\">帮助</a></li>\n</ul>\n</div>\n<div class=\"subNav\">\n<ul class=\"navList\">\n<li>上一个类</li>\n<li><a href=\"../../../com/coorchice/library/ImageEngine.Callback.html\" title=\"com.coorchice.library中的接口\"><span class=\"typeNameLink\">下一个类</span></a></li>\n</ul>\n<ul class=\"navList\">\n<li><a href=\"../../../index.html?com/coorchice/library/ImageEngine.html\" target=\"_top\">框架</a></li>\n<li><a href=\"ImageEngine.html\" target=\"_top\">无框架</a></li>\n</ul>\n<ul class=\"navList\" id=\"allclasses_navbar_top\">\n<li><a href=\"../../../allclasses-noframe.html\">所有类</a></li>\n</ul>\n<div>\n<script type=\"text/javascript\"><!--\n allClassesLink = document.getElementById(\"allclasses_navbar_top\");\n if(window==top) {\n allClassesLink.style.display = \"block\";\n }\n else {\n allClassesLink.style.display = \"none\";\n }\n //-->\n</script>\n</div>\n<div>\n<ul class=\"subNavList\">\n<li>概要:&nbsp;</li>\n<li><a href=\"#nested.class.summary\">嵌套</a>&nbsp;|&nbsp;</li>\n<li>字段&nbsp;|&nbsp;</li>\n<li>构造器&nbsp;|&nbsp;</li>\n<li><a href=\"#method.summary\">方法</a></li>\n</ul>\n<ul class=\"subNavList\">\n<li>详细资料:&nbsp;</li>\n<li>字段&nbsp;|&nbsp;</li>\n<li>构造器&nbsp;|&nbsp;</li>\n<li><a href=\"#method.detail\">方法</a></li>\n</ul>\n</div>\n<a name=\"skip.navbar.top\">\n<!-- -->\n</a></div>\n<!-- ========= END OF TOP NAVBAR ========= -->\n<!-- ======== START OF CLASS DATA ======== -->\n<div class=\"header\">\n<div class=\"subTitle\">com.coorchice.library</div>\n<h2 title=\"类 ImageEngine\" class=\"title\">类 ImageEngine</h2>\n</div>\n<div class=\"contentContainer\">\n<ul class=\"inheritance\">\n<li>java.lang.Object</li>\n<li>\n<ul class=\"inheritance\">\n<li>com.coorchice.library.ImageEngine</li>\n</ul>\n</li>\n</ul>\n<div class=\"description\">\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<hr>\n<br>\n<pre>public class <span class=\"typeNameLabel\">ImageEngine</span>\nextends java.lang.Object</pre>\n<div class=\"block\">SuperTextView的图片加载引擎</div>\n</li>\n</ul>\n</div>\n<div class=\"summary\">\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<!-- ======== NESTED CLASS SUMMARY ======== -->\n<ul class=\"blockList\">\n<li class=\"blockList\"><a name=\"nested.class.summary\">\n<!-- -->\n</a>\n<h3>嵌套类概要</h3>\n<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"嵌套类概要表, 列表嵌套类和解释\">\n<caption><span>嵌套类</span><span class=\"tabEnd\">&nbsp;</span></caption>\n<tr>\n<th class=\"colFirst\" scope=\"col\">限定符和类型</th>\n<th class=\"colLast\" scope=\"col\">类和说明</th>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>static interface&nbsp;</code></td>\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../../com/coorchice/library/ImageEngine.Callback.html\" title=\"com.coorchice.library中的接口\">ImageEngine.Callback</a></span></code>&nbsp;</td>\n</tr>\n</table>\n</li>\n</ul>\n<!-- ========== METHOD SUMMARY =========== -->\n<ul class=\"blockList\">\n<li class=\"blockList\"><a name=\"method.summary\">\n<!-- -->\n</a>\n<h3>方法概要</h3>\n<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"方法概要表, 列表方法和解释\">\n<caption><span id=\"t0\" class=\"activeTableTab\"><span>所有方法</span><span class=\"tabEnd\">&nbsp;</span></span><span id=\"t1\" class=\"tableTab\"><span><a href=\"javascript:show(1);\">静态方法</a></span><span class=\"tabEnd\">&nbsp;</span></span><span id=\"t4\" class=\"tableTab\"><span><a href=\"javascript:show(8);\">具体方法</a></span><span class=\"tabEnd\">&nbsp;</span></span></caption>\n<tr>\n<th class=\"colFirst\" scope=\"col\">限定符和类型</th>\n<th class=\"colLast\" scope=\"col\">方法和说明</th>\n</tr>\n<tr id=\"i0\" class=\"altColor\">\n<td class=\"colFirst\"><code>static void</code></td>\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../../com/coorchice/library/ImageEngine.html#install-com.coorchice.library.image_engine.Engine-\">install</a></span>(<a href=\"../../../com/coorchice/library/image_engine/Engine.html\" title=\"com.coorchice.library.image_engine中的接口\">Engine</a>&nbsp;engine)</code>\n<div class=\"block\">必须先安装一个引擎。</div>\n</td>\n</tr>\n</table>\n<ul class=\"blockList\">\n<li class=\"blockList\"><a name=\"methods.inherited.from.class.java.lang.Object\">\n<!-- -->\n</a>\n<h3>从类继承的方法&nbsp;java.lang.Object</h3>\n<code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</div>\n<div class=\"details\">\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<!-- ============ METHOD DETAIL ========== -->\n<ul class=\"blockList\">\n<li class=\"blockList\"><a name=\"method.detail\">\n<!-- -->\n</a>\n<h3>方法详细资料</h3>\n<a name=\"install-com.coorchice.library.image_engine.Engine-\">\n<!-- -->\n</a>\n<ul class=\"blockListLast\">\n<li class=\"blockList\">\n<h4>install</h4>\n<pre>public static&nbsp;void&nbsp;install(<a href=\"../../../com/coorchice/library/image_engine/Engine.html\" title=\"com.coorchice.library.image_engine中的接口\">Engine</a>&nbsp;engine)</pre>\n<div class=\"block\">必须先安装一个引擎。后安装的Engine总是会替换前面的。\n 默认情况下,SuperTextView有一个十分简易的Engine,建议开发者根据项目所使用的图片框架实现一个<a href=\"../../../com/coorchice/library/image_engine/Engine.html\" title=\"com.coorchice.library.image_engine中的接口\"><code>Engine</code></a>。\n 建议开发者在<code>Application.onCreate()</code>中进行配置。</div>\n<dl>\n<dt><span class=\"paramLabel\">参数:</span></dt>\n<dd><code>engine</code> - 图片加载引擎</dd>\n</dl>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</div>\n</div>\n<!-- ========= END OF CLASS DATA ========= -->\n<!-- ======= START OF BOTTOM NAVBAR ====== -->\n<div class=\"bottomNav\"><a name=\"navbar.bottom\">\n<!-- -->\n</a>\n<div class=\"skipNav\"><a href=\"#skip.navbar.bottom\" title=\"跳过导航链接\">跳过导航链接</a></div>\n<a name=\"navbar.bottom.firstrow\">\n<!-- -->\n</a>\n<ul class=\"navList\" title=\"导航\">\n<li><a href=\"../../../overview-summary.html\">概览</a></li>\n<li><a href=\"package-summary.html\">程序包</a></li>\n<li class=\"navBarCell1Rev\">类</li>\n<li><a href=\"package-tree.html\">树</a></li>\n<li><a href=\"../../../deprecated-list.html\">已过时</a></li>\n<li><a href=\"../../../index-files/index-1.html\">索引</a></li>\n<li><a href=\"../../../help-doc.html\">帮助</a></li>\n</ul>\n</div>\n<div class=\"subNav\">\n<ul class=\"navList\">\n<li>上一个类</li>\n<li><a href=\"../../../com/coorchice/library/ImageEngine.Callback.html\" title=\"com.coorchice.library中的接口\"><span class=\"typeNameLink\">下一个类</span></a></li>\n</ul>\n<ul class=\"navList\">\n<li><a href=\"../../../index.html?com/coorchice/library/ImageEngine.html\" target=\"_top\">框架</a></li>\n<li><a href=\"ImageEngine.html\" target=\"_top\">无框架</a></li>\n</ul>\n<ul class=\"navList\" id=\"allclasses_navbar_bottom\">\n<li><a href=\"../../../allclasses-noframe.html\">所有类</a></li>\n</ul>\n<div>\n<script type=\"text/javascript\"><!--\n allClassesLink = document.getElementById(\"allclasses_navbar_bottom\");\n if(window==top) {\n allClassesLink.style.display = \"block\";\n }\n else {\n allClassesLink.style.display = \"none\";\n }\n //-->\n</script>\n</div>\n<div>\n<ul class=\"subNavList\">\n<li>概要:&nbsp;</li>\n<li><a href=\"#nested.class.summary\">嵌套</a>&nbsp;|&nbsp;</li>\n<li>字段&nbsp;|&nbsp;</li>\n<li>构造器&nbsp;|&nbsp;</li>\n<li><a href=\"#method.summary\">方法</a></li>\n</ul>\n<ul class=\"subNavList\">\n<li>详细资料:&nbsp;</li>\n<li>字段&nbsp;|&nbsp;</li>\n<li>构造器&nbsp;|&nbsp;</li>\n<li><a href=\"#method.detail\">方法</a></li>\n</ul>\n</div>\n<a name=\"skip.navbar.bottom\">\n<!-- -->\n</a></div>\n<!-- ======== END OF BOTTOM NAVBAR ======= -->\n</body>\n</html>\n"} +{"text": "{\n \"jsonSchemaSemanticVersion\": \"1.0.0\",\n \"imports\": [\n {\n \"corpusPath\": \"cdm:/foundations.1.1.cdm.json\"\n },\n {\n \"corpusPath\": \"/core/operationsCommon/Common.1.0.cdm.json\",\n \"moniker\": \"base_Common\"\n },\n {\n \"corpusPath\": \"/core/operationsCommon/DataEntityView.1.0.cdm.json\",\n \"moniker\": \"base_DataEntityView\"\n },\n {\n \"corpusPath\": \"/core/operationsCommon/Tables/Finance/Ledger/Main/CompanyInfo.1.0.cdm.json\"\n }\n ],\n \"definitions\": [\n {\n \"entityName\": \"smmContactGreetingsGroup\",\n \"extendsEntity\": \"base_Common/Common\",\n \"exhibitsTraits\": [\n {\n \"traitReference\": \"is.CDM.entityVersion\",\n \"arguments\": [\n {\n \"name\": \"versionNumber\",\n \"value\": \"1.0\"\n }\n ]\n }\n ],\n \"hasAttributes\": [\n {\n \"name\": \"GreetingId\",\n \"dataType\": \"smmContactGreetingId\",\n \"description\": \"\"\n },\n {\n \"name\": \"DataAreaId\",\n \"dataType\": \"string\",\n \"isReadOnly\": true\n },\n {\n \"entity\": {\n \"entityReference\": \"CompanyInfo\"\n },\n \"name\": \"Relationship_CompanyRelationship\",\n \"resolutionGuidance\": {\n \"entityByReference\": {\n \"allowReference\": true\n }\n }\n }\n ],\n \"displayName\": \"Complimentary close\"\n },\n {\n \"dataTypeName\": \"smmContactGreetingId\",\n \"extendsDataType\": \"string\"\n }\n ]\n}"} +{"text": "// Code generated by protoc-gen-gogo.\n// source: combos/marshaler/casttype.proto\n// DO NOT EDIT!\n\n/*\nPackage casttype is a generated protocol buffer package.\n\nIt is generated from these files:\n\tcombos/marshaler/casttype.proto\n\nIt has these top-level messages:\n\tCastaway\n\tWilson\n*/\npackage casttype\n\nimport testing \"testing\"\nimport math_rand \"math/rand\"\nimport time \"time\"\nimport github_com_gogo_protobuf_proto \"github.com/gogo/protobuf/proto\"\nimport github_com_gogo_protobuf_jsonpb \"github.com/gogo/protobuf/jsonpb\"\nimport fmt \"fmt\"\nimport go_parser \"go/parser\"\nimport proto \"github.com/gogo/protobuf/proto\"\nimport math \"math\"\nimport _ \"github.com/gogo/protobuf/gogoproto\"\n\n// Reference imports to suppress errors if they are not otherwise used.\nvar _ = proto.Marshal\nvar _ = fmt.Errorf\nvar _ = math.Inf\n\nfunc TestCastawayProto(t *testing.T) {\n\tseed := time.Now().UnixNano()\n\tpopr := math_rand.New(math_rand.NewSource(seed))\n\tp := NewPopulatedCastaway(popr, false)\n\tdata, err := github_com_gogo_protobuf_proto.Marshal(p)\n\tif err != nil {\n\t\tt.Fatalf(\"seed = %d, err = %v\", seed, err)\n\t}\n\tmsg := &Castaway{}\n\tif err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil {\n\t\tt.Fatalf(\"seed = %d, err = %v\", seed, err)\n\t}\n\tlittlefuzz := make([]byte, len(data))\n\tcopy(littlefuzz, data)\n\tfor i := range data {\n\t\tdata[i] = byte(popr.Intn(256))\n\t}\n\tif err := p.VerboseEqual(msg); err != nil {\n\t\tt.Fatalf(\"seed = %d, %#v !VerboseProto %#v, since %v\", seed, msg, p, err)\n\t}\n\tif !p.Equal(msg) {\n\t\tt.Fatalf(\"seed = %d, %#v !Proto %#v\", seed, msg, p)\n\t}\n\tif len(littlefuzz) > 0 {\n\t\tfuzzamount := 100\n\t\tfor i := 0; i < fuzzamount; i++ {\n\t\t\tlittlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))\n\t\t\tlittlefuzz = append(littlefuzz, byte(popr.Intn(256)))\n\t\t}\n\t\t// shouldn't panic\n\t\t_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)\n\t}\n}\n\nfunc TestCastawayMarshalTo(t *testing.T) {\n\tseed := time.Now().UnixNano()\n\tpopr := math_rand.New(math_rand.NewSource(seed))\n\tp := NewPopulatedCastaway(popr, false)\n\tsize := p.Size()\n\tdata := make([]byte, size)\n\tfor i := range data {\n\t\tdata[i] = byte(popr.Intn(256))\n\t}\n\t_, err := p.MarshalTo(data)\n\tif err != nil {\n\t\tt.Fatalf(\"seed = %d, err = %v\", seed, err)\n\t}\n\tmsg := &Castaway{}\n\tif err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil {\n\t\tt.Fatalf(\"seed = %d, err = %v\", seed, err)\n\t}\n\tfor i := range data {\n\t\tdata[i] = byte(popr.Intn(256))\n\t}\n\tif err := p.VerboseEqual(msg); err != nil {\n\t\tt.Fatalf(\"seed = %d, %#v !VerboseProto %#v, since %v\", seed, msg, p, err)\n\t}\n\tif !p.Equal(msg) {\n\t\tt.Fatalf(\"seed = %d, %#v !Proto %#v\", seed, msg, p)\n\t}\n}\n\nfunc BenchmarkCastawayProtoMarshal(b *testing.B) {\n\tpopr := math_rand.New(math_rand.NewSource(616))\n\ttotal := 0\n\tpops := make([]*Castaway, 10000)\n\tfor i := 0; i < 10000; i++ {\n\t\tpops[i] = NewPopulatedCastaway(popr, false)\n\t}\n\tb.ResetTimer()\n\tfor i := 0; i < b.N; i++ {\n\t\tdata, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000])\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\ttotal += len(data)\n\t}\n\tb.SetBytes(int64(total / b.N))\n}\n\nfunc BenchmarkCastawayProtoUnmarshal(b *testing.B) {\n\tpopr := math_rand.New(math_rand.NewSource(616))\n\ttotal := 0\n\tdatas := make([][]byte, 10000)\n\tfor i := 0; i < 10000; i++ {\n\t\tdata, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedCastaway(popr, false))\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\tdatas[i] = data\n\t}\n\tmsg := &Castaway{}\n\tb.ResetTimer()\n\tfor i := 0; i < b.N; i++ {\n\t\ttotal += len(datas[i%10000])\n\t\tif err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}\n\tb.SetBytes(int64(total / b.N))\n}\n\nfunc TestWilsonProto(t *testing.T) {\n\tseed := time.Now().UnixNano()\n\tpopr := math_rand.New(math_rand.NewSource(seed))\n\tp := NewPopulatedWilson(popr, false)\n\tdata, err := github_com_gogo_protobuf_proto.Marshal(p)\n\tif err != nil {\n\t\tt.Fatalf(\"seed = %d, err = %v\", seed, err)\n\t}\n\tmsg := &Wilson{}\n\tif err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil {\n\t\tt.Fatalf(\"seed = %d, err = %v\", seed, err)\n\t}\n\tlittlefuzz := make([]byte, len(data))\n\tcopy(littlefuzz, data)\n\tfor i := range data {\n\t\tdata[i] = byte(popr.Intn(256))\n\t}\n\tif err := p.VerboseEqual(msg); err != nil {\n\t\tt.Fatalf(\"seed = %d, %#v !VerboseProto %#v, since %v\", seed, msg, p, err)\n\t}\n\tif !p.Equal(msg) {\n\t\tt.Fatalf(\"seed = %d, %#v !Proto %#v\", seed, msg, p)\n\t}\n\tif len(littlefuzz) > 0 {\n\t\tfuzzamount := 100\n\t\tfor i := 0; i < fuzzamount; i++ {\n\t\t\tlittlefuzz[popr.Intn(len(littlefuzz))] = byte(popr.Intn(256))\n\t\t\tlittlefuzz = append(littlefuzz, byte(popr.Intn(256)))\n\t\t}\n\t\t// shouldn't panic\n\t\t_ = github_com_gogo_protobuf_proto.Unmarshal(littlefuzz, msg)\n\t}\n}\n\nfunc TestWilsonMarshalTo(t *testing.T) {\n\tseed := time.Now().UnixNano()\n\tpopr := math_rand.New(math_rand.NewSource(seed))\n\tp := NewPopulatedWilson(popr, false)\n\tsize := p.Size()\n\tdata := make([]byte, size)\n\tfor i := range data {\n\t\tdata[i] = byte(popr.Intn(256))\n\t}\n\t_, err := p.MarshalTo(data)\n\tif err != nil {\n\t\tt.Fatalf(\"seed = %d, err = %v\", seed, err)\n\t}\n\tmsg := &Wilson{}\n\tif err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil {\n\t\tt.Fatalf(\"seed = %d, err = %v\", seed, err)\n\t}\n\tfor i := range data {\n\t\tdata[i] = byte(popr.Intn(256))\n\t}\n\tif err := p.VerboseEqual(msg); err != nil {\n\t\tt.Fatalf(\"seed = %d, %#v !VerboseProto %#v, since %v\", seed, msg, p, err)\n\t}\n\tif !p.Equal(msg) {\n\t\tt.Fatalf(\"seed = %d, %#v !Proto %#v\", seed, msg, p)\n\t}\n}\n\nfunc BenchmarkWilsonProtoMarshal(b *testing.B) {\n\tpopr := math_rand.New(math_rand.NewSource(616))\n\ttotal := 0\n\tpops := make([]*Wilson, 10000)\n\tfor i := 0; i < 10000; i++ {\n\t\tpops[i] = NewPopulatedWilson(popr, false)\n\t}\n\tb.ResetTimer()\n\tfor i := 0; i < b.N; i++ {\n\t\tdata, err := github_com_gogo_protobuf_proto.Marshal(pops[i%10000])\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\ttotal += len(data)\n\t}\n\tb.SetBytes(int64(total / b.N))\n}\n\nfunc BenchmarkWilsonProtoUnmarshal(b *testing.B) {\n\tpopr := math_rand.New(math_rand.NewSource(616))\n\ttotal := 0\n\tdatas := make([][]byte, 10000)\n\tfor i := 0; i < 10000; i++ {\n\t\tdata, err := github_com_gogo_protobuf_proto.Marshal(NewPopulatedWilson(popr, false))\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t\tdatas[i] = data\n\t}\n\tmsg := &Wilson{}\n\tb.ResetTimer()\n\tfor i := 0; i < b.N; i++ {\n\t\ttotal += len(datas[i%10000])\n\t\tif err := github_com_gogo_protobuf_proto.Unmarshal(datas[i%10000], msg); err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}\n\tb.SetBytes(int64(total / b.N))\n}\n\nfunc TestCastawayJSON(t *testing.T) {\n\tseed := time.Now().UnixNano()\n\tpopr := math_rand.New(math_rand.NewSource(seed))\n\tp := NewPopulatedCastaway(popr, true)\n\tmarshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}\n\tjsondata, err := marshaler.MarshalToString(p)\n\tif err != nil {\n\t\tt.Fatalf(\"seed = %d, err = %v\", seed, err)\n\t}\n\tmsg := &Castaway{}\n\terr = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)\n\tif err != nil {\n\t\tt.Fatalf(\"seed = %d, err = %v\", seed, err)\n\t}\n\tif err := p.VerboseEqual(msg); err != nil {\n\t\tt.Fatalf(\"seed = %d, %#v !VerboseProto %#v, since %v\", seed, msg, p, err)\n\t}\n\tif !p.Equal(msg) {\n\t\tt.Fatalf(\"seed = %d, %#v !Json Equal %#v\", seed, msg, p)\n\t}\n}\nfunc TestWilsonJSON(t *testing.T) {\n\tseed := time.Now().UnixNano()\n\tpopr := math_rand.New(math_rand.NewSource(seed))\n\tp := NewPopulatedWilson(popr, true)\n\tmarshaler := github_com_gogo_protobuf_jsonpb.Marshaler{}\n\tjsondata, err := marshaler.MarshalToString(p)\n\tif err != nil {\n\t\tt.Fatalf(\"seed = %d, err = %v\", seed, err)\n\t}\n\tmsg := &Wilson{}\n\terr = github_com_gogo_protobuf_jsonpb.UnmarshalString(jsondata, msg)\n\tif err != nil {\n\t\tt.Fatalf(\"seed = %d, err = %v\", seed, err)\n\t}\n\tif err := p.VerboseEqual(msg); err != nil {\n\t\tt.Fatalf(\"seed = %d, %#v !VerboseProto %#v, since %v\", seed, msg, p, err)\n\t}\n\tif !p.Equal(msg) {\n\t\tt.Fatalf(\"seed = %d, %#v !Json Equal %#v\", seed, msg, p)\n\t}\n}\nfunc TestCastawayProtoText(t *testing.T) {\n\tseed := time.Now().UnixNano()\n\tpopr := math_rand.New(math_rand.NewSource(seed))\n\tp := NewPopulatedCastaway(popr, true)\n\tdata := github_com_gogo_protobuf_proto.MarshalTextString(p)\n\tmsg := &Castaway{}\n\tif err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil {\n\t\tt.Fatalf(\"seed = %d, err = %v\", seed, err)\n\t}\n\tif err := p.VerboseEqual(msg); err != nil {\n\t\tt.Fatalf(\"seed = %d, %#v !VerboseProto %#v, since %v\", seed, msg, p, err)\n\t}\n\tif !p.Equal(msg) {\n\t\tt.Fatalf(\"seed = %d, %#v !Proto %#v\", seed, msg, p)\n\t}\n}\n\nfunc TestCastawayProtoCompactText(t *testing.T) {\n\tseed := time.Now().UnixNano()\n\tpopr := math_rand.New(math_rand.NewSource(seed))\n\tp := NewPopulatedCastaway(popr, true)\n\tdata := github_com_gogo_protobuf_proto.CompactTextString(p)\n\tmsg := &Castaway{}\n\tif err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil {\n\t\tt.Fatalf(\"seed = %d, err = %v\", seed, err)\n\t}\n\tif err := p.VerboseEqual(msg); err != nil {\n\t\tt.Fatalf(\"seed = %d, %#v !VerboseProto %#v, since %v\", seed, msg, p, err)\n\t}\n\tif !p.Equal(msg) {\n\t\tt.Fatalf(\"seed = %d, %#v !Proto %#v\", seed, msg, p)\n\t}\n}\n\nfunc TestWilsonProtoText(t *testing.T) {\n\tseed := time.Now().UnixNano()\n\tpopr := math_rand.New(math_rand.NewSource(seed))\n\tp := NewPopulatedWilson(popr, true)\n\tdata := github_com_gogo_protobuf_proto.MarshalTextString(p)\n\tmsg := &Wilson{}\n\tif err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil {\n\t\tt.Fatalf(\"seed = %d, err = %v\", seed, err)\n\t}\n\tif err := p.VerboseEqual(msg); err != nil {\n\t\tt.Fatalf(\"seed = %d, %#v !VerboseProto %#v, since %v\", seed, msg, p, err)\n\t}\n\tif !p.Equal(msg) {\n\t\tt.Fatalf(\"seed = %d, %#v !Proto %#v\", seed, msg, p)\n\t}\n}\n\nfunc TestWilsonProtoCompactText(t *testing.T) {\n\tseed := time.Now().UnixNano()\n\tpopr := math_rand.New(math_rand.NewSource(seed))\n\tp := NewPopulatedWilson(popr, true)\n\tdata := github_com_gogo_protobuf_proto.CompactTextString(p)\n\tmsg := &Wilson{}\n\tif err := github_com_gogo_protobuf_proto.UnmarshalText(data, msg); err != nil {\n\t\tt.Fatalf(\"seed = %d, err = %v\", seed, err)\n\t}\n\tif err := p.VerboseEqual(msg); err != nil {\n\t\tt.Fatalf(\"seed = %d, %#v !VerboseProto %#v, since %v\", seed, msg, p, err)\n\t}\n\tif !p.Equal(msg) {\n\t\tt.Fatalf(\"seed = %d, %#v !Proto %#v\", seed, msg, p)\n\t}\n}\n\nfunc TestCasttypeDescription(t *testing.T) {\n\tCasttypeDescription()\n}\nfunc TestCastawayVerboseEqual(t *testing.T) {\n\tpopr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))\n\tp := NewPopulatedCastaway(popr, false)\n\tdata, err := github_com_gogo_protobuf_proto.Marshal(p)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tmsg := &Castaway{}\n\tif err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil {\n\t\tpanic(err)\n\t}\n\tif err := p.VerboseEqual(msg); err != nil {\n\t\tt.Fatalf(\"%#v !VerboseEqual %#v, since %v\", msg, p, err)\n\t}\n}\nfunc TestWilsonVerboseEqual(t *testing.T) {\n\tpopr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))\n\tp := NewPopulatedWilson(popr, false)\n\tdata, err := github_com_gogo_protobuf_proto.Marshal(p)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\tmsg := &Wilson{}\n\tif err := github_com_gogo_protobuf_proto.Unmarshal(data, msg); err != nil {\n\t\tpanic(err)\n\t}\n\tif err := p.VerboseEqual(msg); err != nil {\n\t\tt.Fatalf(\"%#v !VerboseEqual %#v, since %v\", msg, p, err)\n\t}\n}\nfunc TestCastawayFace(t *testing.T) {\n\tpopr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))\n\tp := NewPopulatedCastaway(popr, true)\n\tmsg := p.TestProto()\n\tif !p.Equal(msg) {\n\t\tt.Fatalf(\"%#v !Face Equal %#v\", msg, p)\n\t}\n}\nfunc TestWilsonFace(t *testing.T) {\n\tpopr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))\n\tp := NewPopulatedWilson(popr, true)\n\tmsg := p.TestProto()\n\tif !p.Equal(msg) {\n\t\tt.Fatalf(\"%#v !Face Equal %#v\", msg, p)\n\t}\n}\nfunc TestCastawayGoString(t *testing.T) {\n\tpopr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))\n\tp := NewPopulatedCastaway(popr, false)\n\ts1 := p.GoString()\n\ts2 := fmt.Sprintf(\"%#v\", p)\n\tif s1 != s2 {\n\t\tt.Fatalf(\"GoString want %v got %v\", s1, s2)\n\t}\n\t_, err := go_parser.ParseExpr(s1)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\nfunc TestWilsonGoString(t *testing.T) {\n\tpopr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))\n\tp := NewPopulatedWilson(popr, false)\n\ts1 := p.GoString()\n\ts2 := fmt.Sprintf(\"%#v\", p)\n\tif s1 != s2 {\n\t\tt.Fatalf(\"GoString want %v got %v\", s1, s2)\n\t}\n\t_, err := go_parser.ParseExpr(s1)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\nfunc TestCastawaySize(t *testing.T) {\n\tseed := time.Now().UnixNano()\n\tpopr := math_rand.New(math_rand.NewSource(seed))\n\tp := NewPopulatedCastaway(popr, true)\n\tsize2 := github_com_gogo_protobuf_proto.Size(p)\n\tdata, err := github_com_gogo_protobuf_proto.Marshal(p)\n\tif err != nil {\n\t\tt.Fatalf(\"seed = %d, err = %v\", seed, err)\n\t}\n\tsize := p.Size()\n\tif len(data) != size {\n\t\tt.Errorf(\"seed = %d, size %v != marshalled size %v\", seed, size, len(data))\n\t}\n\tif size2 != size {\n\t\tt.Errorf(\"seed = %d, size %v != before marshal proto.Size %v\", seed, size, size2)\n\t}\n\tsize3 := github_com_gogo_protobuf_proto.Size(p)\n\tif size3 != size {\n\t\tt.Errorf(\"seed = %d, size %v != after marshal proto.Size %v\", seed, size, size3)\n\t}\n}\n\nfunc BenchmarkCastawaySize(b *testing.B) {\n\tpopr := math_rand.New(math_rand.NewSource(616))\n\ttotal := 0\n\tpops := make([]*Castaway, 1000)\n\tfor i := 0; i < 1000; i++ {\n\t\tpops[i] = NewPopulatedCastaway(popr, false)\n\t}\n\tb.ResetTimer()\n\tfor i := 0; i < b.N; i++ {\n\t\ttotal += pops[i%1000].Size()\n\t}\n\tb.SetBytes(int64(total / b.N))\n}\n\nfunc TestWilsonSize(t *testing.T) {\n\tseed := time.Now().UnixNano()\n\tpopr := math_rand.New(math_rand.NewSource(seed))\n\tp := NewPopulatedWilson(popr, true)\n\tsize2 := github_com_gogo_protobuf_proto.Size(p)\n\tdata, err := github_com_gogo_protobuf_proto.Marshal(p)\n\tif err != nil {\n\t\tt.Fatalf(\"seed = %d, err = %v\", seed, err)\n\t}\n\tsize := p.Size()\n\tif len(data) != size {\n\t\tt.Errorf(\"seed = %d, size %v != marshalled size %v\", seed, size, len(data))\n\t}\n\tif size2 != size {\n\t\tt.Errorf(\"seed = %d, size %v != before marshal proto.Size %v\", seed, size, size2)\n\t}\n\tsize3 := github_com_gogo_protobuf_proto.Size(p)\n\tif size3 != size {\n\t\tt.Errorf(\"seed = %d, size %v != after marshal proto.Size %v\", seed, size, size3)\n\t}\n}\n\nfunc BenchmarkWilsonSize(b *testing.B) {\n\tpopr := math_rand.New(math_rand.NewSource(616))\n\ttotal := 0\n\tpops := make([]*Wilson, 1000)\n\tfor i := 0; i < 1000; i++ {\n\t\tpops[i] = NewPopulatedWilson(popr, false)\n\t}\n\tb.ResetTimer()\n\tfor i := 0; i < b.N; i++ {\n\t\ttotal += pops[i%1000].Size()\n\t}\n\tb.SetBytes(int64(total / b.N))\n}\n\nfunc TestCastawayStringer(t *testing.T) {\n\tpopr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))\n\tp := NewPopulatedCastaway(popr, false)\n\ts1 := p.String()\n\ts2 := fmt.Sprintf(\"%v\", p)\n\tif s1 != s2 {\n\t\tt.Fatalf(\"String want %v got %v\", s1, s2)\n\t}\n}\nfunc TestWilsonStringer(t *testing.T) {\n\tpopr := math_rand.New(math_rand.NewSource(time.Now().UnixNano()))\n\tp := NewPopulatedWilson(popr, false)\n\ts1 := p.String()\n\ts2 := fmt.Sprintf(\"%v\", p)\n\tif s1 != s2 {\n\t\tt.Fatalf(\"String want %v got %v\", s1, s2)\n\t}\n}\n\n//These tests are generated by github.com/gogo/protobuf/plugin/testgen\n"} +{"text": "// SPDX-License-Identifier: GPL-2.0\n/* Copyright (c) 2019 Facebook */\n\n#include <sys/socket.h>\n#include <sys/epoll.h>\n#include <netinet/in.h>\n#include <arpa/inet.h>\n#include <unistd.h>\n#include <stdlib.h>\n#include <string.h>\n#include <errno.h>\n\n#include <bpf/bpf.h>\n#include <bpf/libbpf.h>\n\n#include \"cgroup_helpers.h\"\n#include \"bpf_rlimit.h\"\n\nenum bpf_addr_array_idx {\n\tADDR_SRV_IDX,\n\tADDR_CLI_IDX,\n\t__NR_BPF_ADDR_ARRAY_IDX,\n};\n\nenum bpf_result_array_idx {\n\tEGRESS_SRV_IDX,\n\tEGRESS_CLI_IDX,\n\tINGRESS_LISTEN_IDX,\n\t__NR_BPF_RESULT_ARRAY_IDX,\n};\n\nenum bpf_linum_array_idx {\n\tEGRESS_LINUM_IDX,\n\tINGRESS_LINUM_IDX,\n\t__NR_BPF_LINUM_ARRAY_IDX,\n};\n\nstruct bpf_spinlock_cnt {\n\tstruct bpf_spin_lock lock;\n\t__u32 cnt;\n};\n\n#define CHECK(condition, tag, format...) ({\t\t\t\t\\\n\tint __ret = !!(condition);\t\t\t\t\t\\\n\tif (__ret) {\t\t\t\t\t\t\t\\\n\t\tprintf(\"%s(%d):FAIL:%s \", __func__, __LINE__, tag);\t\\\n\t\tprintf(format);\t\t\t\t\t\t\\\n\t\tprintf(\"\\n\");\t\t\t\t\t\t\\\n\t\texit(-1);\t\t\t\t\t\t\\\n\t}\t\t\t\t\t\t\t\t\\\n})\n\n#define TEST_CGROUP \"/test-bpf-sock-fields\"\n#define DATA \"Hello BPF!\"\n#define DATA_LEN sizeof(DATA)\n\nstatic struct sockaddr_in6 srv_sa6, cli_sa6;\nstatic int sk_pkt_out_cnt10_fd;\nstatic int sk_pkt_out_cnt_fd;\nstatic int linum_map_fd;\nstatic int addr_map_fd;\nstatic int tp_map_fd;\nstatic int sk_map_fd;\n\nstatic __u32 addr_srv_idx = ADDR_SRV_IDX;\nstatic __u32 addr_cli_idx = ADDR_CLI_IDX;\n\nstatic __u32 egress_srv_idx = EGRESS_SRV_IDX;\nstatic __u32 egress_cli_idx = EGRESS_CLI_IDX;\nstatic __u32 ingress_listen_idx = INGRESS_LISTEN_IDX;\n\nstatic __u32 egress_linum_idx = EGRESS_LINUM_IDX;\nstatic __u32 ingress_linum_idx = INGRESS_LINUM_IDX;\n\nstatic void init_loopback6(struct sockaddr_in6 *sa6)\n{\n\tmemset(sa6, 0, sizeof(*sa6));\n\tsa6->sin6_family = AF_INET6;\n\tsa6->sin6_addr = in6addr_loopback;\n}\n\nstatic void print_sk(const struct bpf_sock *sk)\n{\n\tchar src_ip4[24], dst_ip4[24];\n\tchar src_ip6[64], dst_ip6[64];\n\n\tinet_ntop(AF_INET, &sk->src_ip4, src_ip4, sizeof(src_ip4));\n\tinet_ntop(AF_INET6, &sk->src_ip6, src_ip6, sizeof(src_ip6));\n\tinet_ntop(AF_INET, &sk->dst_ip4, dst_ip4, sizeof(dst_ip4));\n\tinet_ntop(AF_INET6, &sk->dst_ip6, dst_ip6, sizeof(dst_ip6));\n\n\tprintf(\"state:%u bound_dev_if:%u family:%u type:%u protocol:%u mark:%u priority:%u \"\n\t \"src_ip4:%x(%s) src_ip6:%x:%x:%x:%x(%s) src_port:%u \"\n\t \"dst_ip4:%x(%s) dst_ip6:%x:%x:%x:%x(%s) dst_port:%u\\n\",\n\t sk->state, sk->bound_dev_if, sk->family, sk->type, sk->protocol,\n\t sk->mark, sk->priority,\n\t sk->src_ip4, src_ip4,\n\t sk->src_ip6[0], sk->src_ip6[1], sk->src_ip6[2], sk->src_ip6[3],\n\t src_ip6, sk->src_port,\n\t sk->dst_ip4, dst_ip4,\n\t sk->dst_ip6[0], sk->dst_ip6[1], sk->dst_ip6[2], sk->dst_ip6[3],\n\t dst_ip6, ntohs(sk->dst_port));\n}\n\nstatic void print_tp(const struct bpf_tcp_sock *tp)\n{\n\tprintf(\"snd_cwnd:%u srtt_us:%u rtt_min:%u snd_ssthresh:%u rcv_nxt:%u \"\n\t \"snd_nxt:%u snd:una:%u mss_cache:%u ecn_flags:%u \"\n\t \"rate_delivered:%u rate_interval_us:%u packets_out:%u \"\n\t \"retrans_out:%u total_retrans:%u segs_in:%u data_segs_in:%u \"\n\t \"segs_out:%u data_segs_out:%u lost_out:%u sacked_out:%u \"\n\t \"bytes_received:%llu bytes_acked:%llu\\n\",\n\t tp->snd_cwnd, tp->srtt_us, tp->rtt_min, tp->snd_ssthresh,\n\t tp->rcv_nxt, tp->snd_nxt, tp->snd_una, tp->mss_cache,\n\t tp->ecn_flags, tp->rate_delivered, tp->rate_interval_us,\n\t tp->packets_out, tp->retrans_out, tp->total_retrans,\n\t tp->segs_in, tp->data_segs_in, tp->segs_out,\n\t tp->data_segs_out, tp->lost_out, tp->sacked_out,\n\t tp->bytes_received, tp->bytes_acked);\n}\n\nstatic void check_result(void)\n{\n\tstruct bpf_tcp_sock srv_tp, cli_tp, listen_tp;\n\tstruct bpf_sock srv_sk, cli_sk, listen_sk;\n\t__u32 ingress_linum, egress_linum;\n\tint err;\n\n\terr = bpf_map_lookup_elem(linum_map_fd, &egress_linum_idx,\n\t\t\t\t &egress_linum);\n\tCHECK(err == -1, \"bpf_map_lookup_elem(linum_map_fd)\",\n\t \"err:%d errno:%d\", err, errno);\n\n\terr = bpf_map_lookup_elem(linum_map_fd, &ingress_linum_idx,\n\t\t\t\t &ingress_linum);\n\tCHECK(err == -1, \"bpf_map_lookup_elem(linum_map_fd)\",\n\t \"err:%d errno:%d\", err, errno);\n\n\terr = bpf_map_lookup_elem(sk_map_fd, &egress_srv_idx, &srv_sk);\n\tCHECK(err == -1, \"bpf_map_lookup_elem(sk_map_fd, &egress_srv_idx)\",\n\t \"err:%d errno:%d\", err, errno);\n\terr = bpf_map_lookup_elem(tp_map_fd, &egress_srv_idx, &srv_tp);\n\tCHECK(err == -1, \"bpf_map_lookup_elem(tp_map_fd, &egress_srv_idx)\",\n\t \"err:%d errno:%d\", err, errno);\n\n\terr = bpf_map_lookup_elem(sk_map_fd, &egress_cli_idx, &cli_sk);\n\tCHECK(err == -1, \"bpf_map_lookup_elem(sk_map_fd, &egress_cli_idx)\",\n\t \"err:%d errno:%d\", err, errno);\n\terr = bpf_map_lookup_elem(tp_map_fd, &egress_cli_idx, &cli_tp);\n\tCHECK(err == -1, \"bpf_map_lookup_elem(tp_map_fd, &egress_cli_idx)\",\n\t \"err:%d errno:%d\", err, errno);\n\n\terr = bpf_map_lookup_elem(sk_map_fd, &ingress_listen_idx, &listen_sk);\n\tCHECK(err == -1, \"bpf_map_lookup_elem(sk_map_fd, &ingress_listen_idx)\",\n\t \"err:%d errno:%d\", err, errno);\n\terr = bpf_map_lookup_elem(tp_map_fd, &ingress_listen_idx, &listen_tp);\n\tCHECK(err == -1, \"bpf_map_lookup_elem(tp_map_fd, &ingress_listen_idx)\",\n\t \"err:%d errno:%d\", err, errno);\n\n\tprintf(\"listen_sk: \");\n\tprint_sk(&listen_sk);\n\tprintf(\"\\n\");\n\n\tprintf(\"srv_sk: \");\n\tprint_sk(&srv_sk);\n\tprintf(\"\\n\");\n\n\tprintf(\"cli_sk: \");\n\tprint_sk(&cli_sk);\n\tprintf(\"\\n\");\n\n\tprintf(\"listen_tp: \");\n\tprint_tp(&listen_tp);\n\tprintf(\"\\n\");\n\n\tprintf(\"srv_tp: \");\n\tprint_tp(&srv_tp);\n\tprintf(\"\\n\");\n\n\tprintf(\"cli_tp: \");\n\tprint_tp(&cli_tp);\n\tprintf(\"\\n\");\n\n\tCHECK(listen_sk.state != 10 ||\n\t listen_sk.family != AF_INET6 ||\n\t listen_sk.protocol != IPPROTO_TCP ||\n\t memcmp(listen_sk.src_ip6, &in6addr_loopback,\n\t\t sizeof(listen_sk.src_ip6)) ||\n\t listen_sk.dst_ip6[0] || listen_sk.dst_ip6[1] ||\n\t listen_sk.dst_ip6[2] || listen_sk.dst_ip6[3] ||\n\t listen_sk.src_port != ntohs(srv_sa6.sin6_port) ||\n\t listen_sk.dst_port,\n\t \"Unexpected listen_sk\",\n\t \"Check listen_sk output. ingress_linum:%u\",\n\t ingress_linum);\n\n\tCHECK(srv_sk.state == 10 ||\n\t !srv_sk.state ||\n\t srv_sk.family != AF_INET6 ||\n\t srv_sk.protocol != IPPROTO_TCP ||\n\t memcmp(srv_sk.src_ip6, &in6addr_loopback,\n\t\t sizeof(srv_sk.src_ip6)) ||\n\t memcmp(srv_sk.dst_ip6, &in6addr_loopback,\n\t\t sizeof(srv_sk.dst_ip6)) ||\n\t srv_sk.src_port != ntohs(srv_sa6.sin6_port) ||\n\t srv_sk.dst_port != cli_sa6.sin6_port,\n\t \"Unexpected srv_sk\", \"Check srv_sk output. egress_linum:%u\",\n\t egress_linum);\n\n\tCHECK(cli_sk.state == 10 ||\n\t !cli_sk.state ||\n\t cli_sk.family != AF_INET6 ||\n\t cli_sk.protocol != IPPROTO_TCP ||\n\t memcmp(cli_sk.src_ip6, &in6addr_loopback,\n\t\t sizeof(cli_sk.src_ip6)) ||\n\t memcmp(cli_sk.dst_ip6, &in6addr_loopback,\n\t\t sizeof(cli_sk.dst_ip6)) ||\n\t cli_sk.src_port != ntohs(cli_sa6.sin6_port) ||\n\t cli_sk.dst_port != srv_sa6.sin6_port,\n\t \"Unexpected cli_sk\", \"Check cli_sk output. egress_linum:%u\",\n\t egress_linum);\n\n\tCHECK(listen_tp.data_segs_out ||\n\t listen_tp.data_segs_in ||\n\t listen_tp.total_retrans ||\n\t listen_tp.bytes_acked,\n\t \"Unexpected listen_tp\", \"Check listen_tp output. ingress_linum:%u\",\n\t ingress_linum);\n\n\tCHECK(srv_tp.data_segs_out != 2 ||\n\t srv_tp.data_segs_in ||\n\t srv_tp.snd_cwnd != 10 ||\n\t srv_tp.total_retrans ||\n\t srv_tp.bytes_acked != 2 * DATA_LEN,\n\t \"Unexpected srv_tp\", \"Check srv_tp output. egress_linum:%u\",\n\t egress_linum);\n\n\tCHECK(cli_tp.data_segs_out ||\n\t cli_tp.data_segs_in != 2 ||\n\t cli_tp.snd_cwnd != 10 ||\n\t cli_tp.total_retrans ||\n\t cli_tp.bytes_received != 2 * DATA_LEN,\n\t \"Unexpected cli_tp\", \"Check cli_tp output. egress_linum:%u\",\n\t egress_linum);\n}\n\nstatic void check_sk_pkt_out_cnt(int accept_fd, int cli_fd)\n{\n\tstruct bpf_spinlock_cnt pkt_out_cnt = {}, pkt_out_cnt10 = {};\n\tint err;\n\n\tpkt_out_cnt.cnt = ~0;\n\tpkt_out_cnt10.cnt = ~0;\n\terr = bpf_map_lookup_elem(sk_pkt_out_cnt_fd, &accept_fd, &pkt_out_cnt);\n\tif (!err)\n\t\terr = bpf_map_lookup_elem(sk_pkt_out_cnt10_fd, &accept_fd,\n\t\t\t\t\t &pkt_out_cnt10);\n\n\t/* The bpf prog only counts for fullsock and\n\t * passive conneciton did not become fullsock until 3WHS\n\t * had been finished.\n\t * The bpf prog only counted two data packet out but we\n\t * specially init accept_fd's pkt_out_cnt by 2 in\n\t * init_sk_storage(). Hence, 4 here.\n\t */\n\tCHECK(err || pkt_out_cnt.cnt != 4 || pkt_out_cnt10.cnt != 40,\n\t \"bpf_map_lookup_elem(sk_pkt_out_cnt, &accept_fd)\",\n\t \"err:%d errno:%d pkt_out_cnt:%u pkt_out_cnt10:%u\",\n\t err, errno, pkt_out_cnt.cnt, pkt_out_cnt10.cnt);\n\n\tpkt_out_cnt.cnt = ~0;\n\tpkt_out_cnt10.cnt = ~0;\n\terr = bpf_map_lookup_elem(sk_pkt_out_cnt_fd, &cli_fd, &pkt_out_cnt);\n\tif (!err)\n\t\terr = bpf_map_lookup_elem(sk_pkt_out_cnt10_fd, &cli_fd,\n\t\t\t\t\t &pkt_out_cnt10);\n\t/* Active connection is fullsock from the beginning.\n\t * 1 SYN and 1 ACK during 3WHS\n\t * 2 Acks on data packet.\n\t *\n\t * The bpf_prog initialized it to 0xeB9F.\n\t */\n\tCHECK(err || pkt_out_cnt.cnt != 0xeB9F + 4 ||\n\t pkt_out_cnt10.cnt != 0xeB9F + 40,\n\t \"bpf_map_lookup_elem(sk_pkt_out_cnt, &cli_fd)\",\n\t \"err:%d errno:%d pkt_out_cnt:%u pkt_out_cnt10:%u\",\n\t err, errno, pkt_out_cnt.cnt, pkt_out_cnt10.cnt);\n}\n\nstatic void init_sk_storage(int sk_fd, __u32 pkt_out_cnt)\n{\n\tstruct bpf_spinlock_cnt scnt = {};\n\tint err;\n\n\tscnt.cnt = pkt_out_cnt;\n\terr = bpf_map_update_elem(sk_pkt_out_cnt_fd, &sk_fd, &scnt,\n\t\t\t\t BPF_NOEXIST);\n\tCHECK(err, \"bpf_map_update_elem(sk_pkt_out_cnt_fd)\",\n\t \"err:%d errno:%d\", err, errno);\n\n\tscnt.cnt *= 10;\n\terr = bpf_map_update_elem(sk_pkt_out_cnt10_fd, &sk_fd, &scnt,\n\t\t\t\t BPF_NOEXIST);\n\tCHECK(err, \"bpf_map_update_elem(sk_pkt_out_cnt10_fd)\",\n\t \"err:%d errno:%d\", err, errno);\n}\n\nstatic void test(void)\n{\n\tint listen_fd, cli_fd, accept_fd, epfd, err;\n\tstruct epoll_event ev;\n\tsocklen_t addrlen;\n\tint i;\n\n\taddrlen = sizeof(struct sockaddr_in6);\n\tev.events = EPOLLIN;\n\n\tepfd = epoll_create(1);\n\tCHECK(epfd == -1, \"epoll_create()\", \"epfd:%d errno:%d\", epfd, errno);\n\n\t/* Prepare listen_fd */\n\tlisten_fd = socket(AF_INET6, SOCK_STREAM | SOCK_NONBLOCK, 0);\n\tCHECK(listen_fd == -1, \"socket()\", \"listen_fd:%d errno:%d\",\n\t listen_fd, errno);\n\n\tinit_loopback6(&srv_sa6);\n\terr = bind(listen_fd, (struct sockaddr *)&srv_sa6, sizeof(srv_sa6));\n\tCHECK(err, \"bind(listen_fd)\", \"err:%d errno:%d\", err, errno);\n\n\terr = getsockname(listen_fd, (struct sockaddr *)&srv_sa6, &addrlen);\n\tCHECK(err, \"getsockname(listen_fd)\", \"err:%d errno:%d\", err, errno);\n\n\terr = listen(listen_fd, 1);\n\tCHECK(err, \"listen(listen_fd)\", \"err:%d errno:%d\", err, errno);\n\n\t/* Prepare cli_fd */\n\tcli_fd = socket(AF_INET6, SOCK_STREAM | SOCK_NONBLOCK, 0);\n\tCHECK(cli_fd == -1, \"socket()\", \"cli_fd:%d errno:%d\", cli_fd, errno);\n\n\tinit_loopback6(&cli_sa6);\n\terr = bind(cli_fd, (struct sockaddr *)&cli_sa6, sizeof(cli_sa6));\n\tCHECK(err, \"bind(cli_fd)\", \"err:%d errno:%d\", err, errno);\n\n\terr = getsockname(cli_fd, (struct sockaddr *)&cli_sa6, &addrlen);\n\tCHECK(err, \"getsockname(cli_fd)\", \"err:%d errno:%d\",\n\t err, errno);\n\n\t/* Update addr_map with srv_sa6 and cli_sa6 */\n\terr = bpf_map_update_elem(addr_map_fd, &addr_srv_idx, &srv_sa6, 0);\n\tCHECK(err, \"map_update\", \"err:%d errno:%d\", err, errno);\n\n\terr = bpf_map_update_elem(addr_map_fd, &addr_cli_idx, &cli_sa6, 0);\n\tCHECK(err, \"map_update\", \"err:%d errno:%d\", err, errno);\n\n\t/* Connect from cli_sa6 to srv_sa6 */\n\terr = connect(cli_fd, (struct sockaddr *)&srv_sa6, addrlen);\n\tprintf(\"srv_sa6.sin6_port:%u cli_sa6.sin6_port:%u\\n\\n\",\n\t ntohs(srv_sa6.sin6_port), ntohs(cli_sa6.sin6_port));\n\tCHECK(err && errno != EINPROGRESS,\n\t \"connect(cli_fd)\", \"err:%d errno:%d\", err, errno);\n\n\tev.data.fd = listen_fd;\n\terr = epoll_ctl(epfd, EPOLL_CTL_ADD, listen_fd, &ev);\n\tCHECK(err, \"epoll_ctl(EPOLL_CTL_ADD, listen_fd)\", \"err:%d errno:%d\",\n\t err, errno);\n\n\t/* Accept the connection */\n\t/* Have some timeout in accept(listen_fd). Just in case. */\n\terr = epoll_wait(epfd, &ev, 1, 1000);\n\tCHECK(err != 1 || ev.data.fd != listen_fd,\n\t \"epoll_wait(listen_fd)\",\n\t \"err:%d errno:%d ev.data.fd:%d listen_fd:%d\",\n\t err, errno, ev.data.fd, listen_fd);\n\n\taccept_fd = accept(listen_fd, NULL, NULL);\n\tCHECK(accept_fd == -1, \"accept(listen_fd)\", \"accept_fd:%d errno:%d\",\n\t accept_fd, errno);\n\tclose(listen_fd);\n\n\tev.data.fd = cli_fd;\n\terr = epoll_ctl(epfd, EPOLL_CTL_ADD, cli_fd, &ev);\n\tCHECK(err, \"epoll_ctl(EPOLL_CTL_ADD, cli_fd)\", \"err:%d errno:%d\",\n\t err, errno);\n\n\tinit_sk_storage(accept_fd, 2);\n\n\tfor (i = 0; i < 2; i++) {\n\t\t/* Send some data from accept_fd to cli_fd */\n\t\terr = send(accept_fd, DATA, DATA_LEN, 0);\n\t\tCHECK(err != DATA_LEN, \"send(accept_fd)\", \"err:%d errno:%d\",\n\t\t err, errno);\n\n\t\t/* Have some timeout in recv(cli_fd). Just in case. */\n\t\terr = epoll_wait(epfd, &ev, 1, 1000);\n\t\tCHECK(err != 1 || ev.data.fd != cli_fd,\n\t\t \"epoll_wait(cli_fd)\", \"err:%d errno:%d ev.data.fd:%d cli_fd:%d\",\n\t\t err, errno, ev.data.fd, cli_fd);\n\n\t\terr = recv(cli_fd, NULL, 0, MSG_TRUNC);\n\t\tCHECK(err, \"recv(cli_fd)\", \"err:%d errno:%d\", err, errno);\n\t}\n\n\tcheck_sk_pkt_out_cnt(accept_fd, cli_fd);\n\n\tclose(epfd);\n\tclose(accept_fd);\n\tclose(cli_fd);\n\n\tcheck_result();\n}\n\nint main(int argc, char **argv)\n{\n\tstruct bpf_prog_load_attr attr = {\n\t\t.file = \"test_sock_fields_kern.o\",\n\t\t.prog_type = BPF_PROG_TYPE_CGROUP_SKB,\n\t\t.prog_flags = BPF_F_TEST_RND_HI32,\n\t};\n\tint cgroup_fd, egress_fd, ingress_fd, err;\n\tstruct bpf_program *ingress_prog;\n\tstruct bpf_object *obj;\n\tstruct bpf_map *map;\n\n\terr = setup_cgroup_environment();\n\tCHECK(err, \"setup_cgroup_environment()\", \"err:%d errno:%d\",\n\t err, errno);\n\n\tatexit(cleanup_cgroup_environment);\n\n\t/* Create a cgroup, get fd, and join it */\n\tcgroup_fd = create_and_get_cgroup(TEST_CGROUP);\n\tCHECK(cgroup_fd == -1, \"create_and_get_cgroup()\",\n\t \"cgroup_fd:%d errno:%d\", cgroup_fd, errno);\n\n\terr = join_cgroup(TEST_CGROUP);\n\tCHECK(err, \"join_cgroup\", \"err:%d errno:%d\", err, errno);\n\n\terr = bpf_prog_load_xattr(&attr, &obj, &egress_fd);\n\tCHECK(err, \"bpf_prog_load_xattr()\", \"err:%d\", err);\n\n\tingress_prog = bpf_object__find_program_by_title(obj,\n\t\t\t\t\t\t\t \"cgroup_skb/ingress\");\n\tCHECK(!ingress_prog,\n\t \"bpf_object__find_program_by_title(cgroup_skb/ingress)\",\n\t \"not found\");\n\tingress_fd = bpf_program__fd(ingress_prog);\n\n\terr = bpf_prog_attach(egress_fd, cgroup_fd, BPF_CGROUP_INET_EGRESS, 0);\n\tCHECK(err == -1, \"bpf_prog_attach(CPF_CGROUP_INET_EGRESS)\",\n\t \"err:%d errno%d\", err, errno);\n\n\terr = bpf_prog_attach(ingress_fd, cgroup_fd,\n\t\t\t BPF_CGROUP_INET_INGRESS, 0);\n\tCHECK(err == -1, \"bpf_prog_attach(CPF_CGROUP_INET_INGRESS)\",\n\t \"err:%d errno%d\", err, errno);\n\tclose(cgroup_fd);\n\n\tmap = bpf_object__find_map_by_name(obj, \"addr_map\");\n\tCHECK(!map, \"cannot find addr_map\", \"(null)\");\n\taddr_map_fd = bpf_map__fd(map);\n\n\tmap = bpf_object__find_map_by_name(obj, \"sock_result_map\");\n\tCHECK(!map, \"cannot find sock_result_map\", \"(null)\");\n\tsk_map_fd = bpf_map__fd(map);\n\n\tmap = bpf_object__find_map_by_name(obj, \"tcp_sock_result_map\");\n\tCHECK(!map, \"cannot find tcp_sock_result_map\", \"(null)\");\n\ttp_map_fd = bpf_map__fd(map);\n\n\tmap = bpf_object__find_map_by_name(obj, \"linum_map\");\n\tCHECK(!map, \"cannot find linum_map\", \"(null)\");\n\tlinum_map_fd = bpf_map__fd(map);\n\n\tmap = bpf_object__find_map_by_name(obj, \"sk_pkt_out_cnt\");\n\tCHECK(!map, \"cannot find sk_pkt_out_cnt\", \"(null)\");\n\tsk_pkt_out_cnt_fd = bpf_map__fd(map);\n\n\tmap = bpf_object__find_map_by_name(obj, \"sk_pkt_out_cnt10\");\n\tCHECK(!map, \"cannot find sk_pkt_out_cnt10\", \"(null)\");\n\tsk_pkt_out_cnt10_fd = bpf_map__fd(map);\n\n\ttest();\n\n\tbpf_object__close(obj);\n\tcleanup_cgroup_environment();\n\n\tprintf(\"PASS\\n\");\n\n\treturn 0;\n}\n"} +{"text": "// Copyright 2008, Google Inc.\n// All rights reserved.\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n//\n// Google Test filepath utilities\n//\n// This file tests classes and functions used internally by\n// Google Test. They are subject to change without notice.\n//\n// This file is #included from gtest-internal.h.\n// Do not #include this file anywhere else!\n\n#include \"gtest/internal/gtest-filepath.h\"\n#include \"gtest/gtest.h\"\n#include \"src/gtest-internal-inl.h\"\n\n#if GTEST_OS_WINDOWS_MOBILE\n# include <windows.h> // NOLINT\n#elif GTEST_OS_WINDOWS\n# include <direct.h> // NOLINT\n#endif // GTEST_OS_WINDOWS_MOBILE\n\nnamespace testing {\nnamespace internal {\nnamespace {\n\n#if GTEST_OS_WINDOWS_MOBILE\n// FIXME: Move these to the POSIX adapter section in\n// gtest-port.h.\n\n// Windows CE doesn't have the remove C function.\nint remove(const char* path) {\n LPCWSTR wpath = String::AnsiToUtf16(path);\n int ret = DeleteFile(wpath) ? 0 : -1;\n delete [] wpath;\n return ret;\n}\n// Windows CE doesn't have the _rmdir C function.\nint _rmdir(const char* path) {\n FilePath filepath(path);\n LPCWSTR wpath = String::AnsiToUtf16(\n filepath.RemoveTrailingPathSeparator().c_str());\n int ret = RemoveDirectory(wpath) ? 0 : -1;\n delete [] wpath;\n return ret;\n}\n\n#else\n\nTEST(GetCurrentDirTest, ReturnsCurrentDir) {\n const FilePath original_dir = FilePath::GetCurrentDir();\n EXPECT_FALSE(original_dir.IsEmpty());\n\n posix::ChDir(GTEST_PATH_SEP_);\n const FilePath cwd = FilePath::GetCurrentDir();\n posix::ChDir(original_dir.c_str());\n\n# if GTEST_OS_WINDOWS\n\n // Skips the \":\".\n const char* const cwd_without_drive = strchr(cwd.c_str(), ':');\n ASSERT_TRUE(cwd_without_drive != NULL);\n EXPECT_STREQ(GTEST_PATH_SEP_, cwd_without_drive + 1);\n\n# else\n\n EXPECT_EQ(GTEST_PATH_SEP_, cwd.string());\n\n# endif\n}\n\n#endif // GTEST_OS_WINDOWS_MOBILE\n\nTEST(IsEmptyTest, ReturnsTrueForEmptyPath) {\n EXPECT_TRUE(FilePath(\"\").IsEmpty());\n}\n\nTEST(IsEmptyTest, ReturnsFalseForNonEmptyPath) {\n EXPECT_FALSE(FilePath(\"a\").IsEmpty());\n EXPECT_FALSE(FilePath(\".\").IsEmpty());\n EXPECT_FALSE(FilePath(\"a/b\").IsEmpty());\n EXPECT_FALSE(FilePath(\"a\\\\b\\\\\").IsEmpty());\n}\n\n// RemoveDirectoryName \"\" -> \"\"\nTEST(RemoveDirectoryNameTest, WhenEmptyName) {\n EXPECT_EQ(\"\", FilePath(\"\").RemoveDirectoryName().string());\n}\n\n// RemoveDirectoryName \"afile\" -> \"afile\"\nTEST(RemoveDirectoryNameTest, ButNoDirectory) {\n EXPECT_EQ(\"afile\",\n FilePath(\"afile\").RemoveDirectoryName().string());\n}\n\n// RemoveDirectoryName \"/afile\" -> \"afile\"\nTEST(RemoveDirectoryNameTest, RootFileShouldGiveFileName) {\n EXPECT_EQ(\"afile\",\n FilePath(GTEST_PATH_SEP_ \"afile\").RemoveDirectoryName().string());\n}\n\n// RemoveDirectoryName \"adir/\" -> \"\"\nTEST(RemoveDirectoryNameTest, WhereThereIsNoFileName) {\n EXPECT_EQ(\"\",\n FilePath(\"adir\" GTEST_PATH_SEP_).RemoveDirectoryName().string());\n}\n\n// RemoveDirectoryName \"adir/afile\" -> \"afile\"\nTEST(RemoveDirectoryNameTest, ShouldGiveFileName) {\n EXPECT_EQ(\"afile\",\n FilePath(\"adir\" GTEST_PATH_SEP_ \"afile\").RemoveDirectoryName().string());\n}\n\n// RemoveDirectoryName \"adir/subdir/afile\" -> \"afile\"\nTEST(RemoveDirectoryNameTest, ShouldAlsoGiveFileName) {\n EXPECT_EQ(\"afile\",\n FilePath(\"adir\" GTEST_PATH_SEP_ \"subdir\" GTEST_PATH_SEP_ \"afile\")\n .RemoveDirectoryName().string());\n}\n\n#if GTEST_HAS_ALT_PATH_SEP_\n\n// Tests that RemoveDirectoryName() works with the alternate separator\n// on Windows.\n\n// RemoveDirectoryName(\"/afile\") -> \"afile\"\nTEST(RemoveDirectoryNameTest, RootFileShouldGiveFileNameForAlternateSeparator) {\n EXPECT_EQ(\"afile\", FilePath(\"/afile\").RemoveDirectoryName().string());\n}\n\n// RemoveDirectoryName(\"adir/\") -> \"\"\nTEST(RemoveDirectoryNameTest, WhereThereIsNoFileNameForAlternateSeparator) {\n EXPECT_EQ(\"\", FilePath(\"adir/\").RemoveDirectoryName().string());\n}\n\n// RemoveDirectoryName(\"adir/afile\") -> \"afile\"\nTEST(RemoveDirectoryNameTest, ShouldGiveFileNameForAlternateSeparator) {\n EXPECT_EQ(\"afile\", FilePath(\"adir/afile\").RemoveDirectoryName().string());\n}\n\n// RemoveDirectoryName(\"adir/subdir/afile\") -> \"afile\"\nTEST(RemoveDirectoryNameTest, ShouldAlsoGiveFileNameForAlternateSeparator) {\n EXPECT_EQ(\"afile\",\n FilePath(\"adir/subdir/afile\").RemoveDirectoryName().string());\n}\n\n#endif\n\n// RemoveFileName \"\" -> \"./\"\nTEST(RemoveFileNameTest, EmptyName) {\n#if GTEST_OS_WINDOWS_MOBILE\n // On Windows CE, we use the root as the current directory.\n EXPECT_EQ(GTEST_PATH_SEP_, FilePath(\"\").RemoveFileName().string());\n#else\n EXPECT_EQ(\".\" GTEST_PATH_SEP_, FilePath(\"\").RemoveFileName().string());\n#endif\n}\n\n// RemoveFileName \"adir/\" -> \"adir/\"\nTEST(RemoveFileNameTest, ButNoFile) {\n EXPECT_EQ(\"adir\" GTEST_PATH_SEP_,\n FilePath(\"adir\" GTEST_PATH_SEP_).RemoveFileName().string());\n}\n\n// RemoveFileName \"adir/afile\" -> \"adir/\"\nTEST(RemoveFileNameTest, GivesDirName) {\n EXPECT_EQ(\"adir\" GTEST_PATH_SEP_,\n FilePath(\"adir\" GTEST_PATH_SEP_ \"afile\").RemoveFileName().string());\n}\n\n// RemoveFileName \"adir/subdir/afile\" -> \"adir/subdir/\"\nTEST(RemoveFileNameTest, GivesDirAndSubDirName) {\n EXPECT_EQ(\"adir\" GTEST_PATH_SEP_ \"subdir\" GTEST_PATH_SEP_,\n FilePath(\"adir\" GTEST_PATH_SEP_ \"subdir\" GTEST_PATH_SEP_ \"afile\")\n .RemoveFileName().string());\n}\n\n// RemoveFileName \"/afile\" -> \"/\"\nTEST(RemoveFileNameTest, GivesRootDir) {\n EXPECT_EQ(GTEST_PATH_SEP_,\n FilePath(GTEST_PATH_SEP_ \"afile\").RemoveFileName().string());\n}\n\n#if GTEST_HAS_ALT_PATH_SEP_\n\n// Tests that RemoveFileName() works with the alternate separator on\n// Windows.\n\n// RemoveFileName(\"adir/\") -> \"adir/\"\nTEST(RemoveFileNameTest, ButNoFileForAlternateSeparator) {\n EXPECT_EQ(\"adir\" GTEST_PATH_SEP_,\n FilePath(\"adir/\").RemoveFileName().string());\n}\n\n// RemoveFileName(\"adir/afile\") -> \"adir/\"\nTEST(RemoveFileNameTest, GivesDirNameForAlternateSeparator) {\n EXPECT_EQ(\"adir\" GTEST_PATH_SEP_,\n FilePath(\"adir/afile\").RemoveFileName().string());\n}\n\n// RemoveFileName(\"adir/subdir/afile\") -> \"adir/subdir/\"\nTEST(RemoveFileNameTest, GivesDirAndSubDirNameForAlternateSeparator) {\n EXPECT_EQ(\"adir\" GTEST_PATH_SEP_ \"subdir\" GTEST_PATH_SEP_,\n FilePath(\"adir/subdir/afile\").RemoveFileName().string());\n}\n\n// RemoveFileName(\"/afile\") -> \"\\\"\nTEST(RemoveFileNameTest, GivesRootDirForAlternateSeparator) {\n EXPECT_EQ(GTEST_PATH_SEP_, FilePath(\"/afile\").RemoveFileName().string());\n}\n\n#endif\n\nTEST(MakeFileNameTest, GenerateWhenNumberIsZero) {\n FilePath actual = FilePath::MakeFileName(FilePath(\"foo\"), FilePath(\"bar\"),\n 0, \"xml\");\n EXPECT_EQ(\"foo\" GTEST_PATH_SEP_ \"bar.xml\", actual.string());\n}\n\nTEST(MakeFileNameTest, GenerateFileNameNumberGtZero) {\n FilePath actual = FilePath::MakeFileName(FilePath(\"foo\"), FilePath(\"bar\"),\n 12, \"xml\");\n EXPECT_EQ(\"foo\" GTEST_PATH_SEP_ \"bar_12.xml\", actual.string());\n}\n\nTEST(MakeFileNameTest, GenerateFileNameWithSlashNumberIsZero) {\n FilePath actual = FilePath::MakeFileName(FilePath(\"foo\" GTEST_PATH_SEP_),\n FilePath(\"bar\"), 0, \"xml\");\n EXPECT_EQ(\"foo\" GTEST_PATH_SEP_ \"bar.xml\", actual.string());\n}\n\nTEST(MakeFileNameTest, GenerateFileNameWithSlashNumberGtZero) {\n FilePath actual = FilePath::MakeFileName(FilePath(\"foo\" GTEST_PATH_SEP_),\n FilePath(\"bar\"), 12, \"xml\");\n EXPECT_EQ(\"foo\" GTEST_PATH_SEP_ \"bar_12.xml\", actual.string());\n}\n\nTEST(MakeFileNameTest, GenerateWhenNumberIsZeroAndDirIsEmpty) {\n FilePath actual = FilePath::MakeFileName(FilePath(\"\"), FilePath(\"bar\"),\n 0, \"xml\");\n EXPECT_EQ(\"bar.xml\", actual.string());\n}\n\nTEST(MakeFileNameTest, GenerateWhenNumberIsNotZeroAndDirIsEmpty) {\n FilePath actual = FilePath::MakeFileName(FilePath(\"\"), FilePath(\"bar\"),\n 14, \"xml\");\n EXPECT_EQ(\"bar_14.xml\", actual.string());\n}\n\nTEST(ConcatPathsTest, WorksWhenDirDoesNotEndWithPathSep) {\n FilePath actual = FilePath::ConcatPaths(FilePath(\"foo\"),\n FilePath(\"bar.xml\"));\n EXPECT_EQ(\"foo\" GTEST_PATH_SEP_ \"bar.xml\", actual.string());\n}\n\nTEST(ConcatPathsTest, WorksWhenPath1EndsWithPathSep) {\n FilePath actual = FilePath::ConcatPaths(FilePath(\"foo\" GTEST_PATH_SEP_),\n FilePath(\"bar.xml\"));\n EXPECT_EQ(\"foo\" GTEST_PATH_SEP_ \"bar.xml\", actual.string());\n}\n\nTEST(ConcatPathsTest, Path1BeingEmpty) {\n FilePath actual = FilePath::ConcatPaths(FilePath(\"\"),\n FilePath(\"bar.xml\"));\n EXPECT_EQ(\"bar.xml\", actual.string());\n}\n\nTEST(ConcatPathsTest, Path2BeingEmpty) {\n FilePath actual = FilePath::ConcatPaths(FilePath(\"foo\"), FilePath(\"\"));\n EXPECT_EQ(\"foo\" GTEST_PATH_SEP_, actual.string());\n}\n\nTEST(ConcatPathsTest, BothPathBeingEmpty) {\n FilePath actual = FilePath::ConcatPaths(FilePath(\"\"),\n FilePath(\"\"));\n EXPECT_EQ(\"\", actual.string());\n}\n\nTEST(ConcatPathsTest, Path1ContainsPathSep) {\n FilePath actual = FilePath::ConcatPaths(FilePath(\"foo\" GTEST_PATH_SEP_ \"bar\"),\n FilePath(\"foobar.xml\"));\n EXPECT_EQ(\"foo\" GTEST_PATH_SEP_ \"bar\" GTEST_PATH_SEP_ \"foobar.xml\",\n actual.string());\n}\n\nTEST(ConcatPathsTest, Path2ContainsPathSep) {\n FilePath actual = FilePath::ConcatPaths(\n FilePath(\"foo\" GTEST_PATH_SEP_),\n FilePath(\"bar\" GTEST_PATH_SEP_ \"bar.xml\"));\n EXPECT_EQ(\"foo\" GTEST_PATH_SEP_ \"bar\" GTEST_PATH_SEP_ \"bar.xml\",\n actual.string());\n}\n\nTEST(ConcatPathsTest, Path2EndsWithPathSep) {\n FilePath actual = FilePath::ConcatPaths(FilePath(\"foo\"),\n FilePath(\"bar\" GTEST_PATH_SEP_));\n EXPECT_EQ(\"foo\" GTEST_PATH_SEP_ \"bar\" GTEST_PATH_SEP_, actual.string());\n}\n\n// RemoveTrailingPathSeparator \"\" -> \"\"\nTEST(RemoveTrailingPathSeparatorTest, EmptyString) {\n EXPECT_EQ(\"\", FilePath(\"\").RemoveTrailingPathSeparator().string());\n}\n\n// RemoveTrailingPathSeparator \"foo\" -> \"foo\"\nTEST(RemoveTrailingPathSeparatorTest, FileNoSlashString) {\n EXPECT_EQ(\"foo\", FilePath(\"foo\").RemoveTrailingPathSeparator().string());\n}\n\n// RemoveTrailingPathSeparator \"foo/\" -> \"foo\"\nTEST(RemoveTrailingPathSeparatorTest, ShouldRemoveTrailingSeparator) {\n EXPECT_EQ(\"foo\",\n FilePath(\"foo\" GTEST_PATH_SEP_).RemoveTrailingPathSeparator().string());\n#if GTEST_HAS_ALT_PATH_SEP_\n EXPECT_EQ(\"foo\", FilePath(\"foo/\").RemoveTrailingPathSeparator().string());\n#endif\n}\n\n// RemoveTrailingPathSeparator \"foo/bar/\" -> \"foo/bar/\"\nTEST(RemoveTrailingPathSeparatorTest, ShouldRemoveLastSeparator) {\n EXPECT_EQ(\"foo\" GTEST_PATH_SEP_ \"bar\",\n FilePath(\"foo\" GTEST_PATH_SEP_ \"bar\" GTEST_PATH_SEP_)\n .RemoveTrailingPathSeparator().string());\n}\n\n// RemoveTrailingPathSeparator \"foo/bar\" -> \"foo/bar\"\nTEST(RemoveTrailingPathSeparatorTest, ShouldReturnUnmodified) {\n EXPECT_EQ(\"foo\" GTEST_PATH_SEP_ \"bar\",\n FilePath(\"foo\" GTEST_PATH_SEP_ \"bar\")\n .RemoveTrailingPathSeparator().string());\n}\n\nTEST(DirectoryTest, RootDirectoryExists) {\n#if GTEST_OS_WINDOWS // We are on Windows.\n char current_drive[_MAX_PATH]; // NOLINT\n current_drive[0] = static_cast<char>(_getdrive() + 'A' - 1);\n current_drive[1] = ':';\n current_drive[2] = '\\\\';\n current_drive[3] = '\\0';\n EXPECT_TRUE(FilePath(current_drive).DirectoryExists());\n#else\n EXPECT_TRUE(FilePath(\"/\").DirectoryExists());\n#endif // GTEST_OS_WINDOWS\n}\n\n#if GTEST_OS_WINDOWS\nTEST(DirectoryTest, RootOfWrongDriveDoesNotExists) {\n const int saved_drive_ = _getdrive();\n // Find a drive that doesn't exist. Start with 'Z' to avoid common ones.\n for (char drive = 'Z'; drive >= 'A'; drive--)\n if (_chdrive(drive - 'A' + 1) == -1) {\n char non_drive[_MAX_PATH]; // NOLINT\n non_drive[0] = drive;\n non_drive[1] = ':';\n non_drive[2] = '\\\\';\n non_drive[3] = '\\0';\n EXPECT_FALSE(FilePath(non_drive).DirectoryExists());\n break;\n }\n _chdrive(saved_drive_);\n}\n#endif // GTEST_OS_WINDOWS\n\n#if !GTEST_OS_WINDOWS_MOBILE\n// Windows CE _does_ consider an empty directory to exist.\nTEST(DirectoryTest, EmptyPathDirectoryDoesNotExist) {\n EXPECT_FALSE(FilePath(\"\").DirectoryExists());\n}\n#endif // !GTEST_OS_WINDOWS_MOBILE\n\nTEST(DirectoryTest, CurrentDirectoryExists) {\n#if GTEST_OS_WINDOWS // We are on Windows.\n# ifndef _WIN32_CE // Windows CE doesn't have a current directory.\n\n EXPECT_TRUE(FilePath(\".\").DirectoryExists());\n EXPECT_TRUE(FilePath(\".\\\\\").DirectoryExists());\n\n# endif // _WIN32_CE\n#else\n EXPECT_TRUE(FilePath(\".\").DirectoryExists());\n EXPECT_TRUE(FilePath(\"./\").DirectoryExists());\n#endif // GTEST_OS_WINDOWS\n}\n\n// \"foo/bar\" == foo//bar\" == \"foo///bar\"\nTEST(NormalizeTest, MultipleConsecutiveSepaparatorsInMidstring) {\n EXPECT_EQ(\"foo\" GTEST_PATH_SEP_ \"bar\",\n FilePath(\"foo\" GTEST_PATH_SEP_ \"bar\").string());\n EXPECT_EQ(\"foo\" GTEST_PATH_SEP_ \"bar\",\n FilePath(\"foo\" GTEST_PATH_SEP_ GTEST_PATH_SEP_ \"bar\").string());\n EXPECT_EQ(\"foo\" GTEST_PATH_SEP_ \"bar\",\n FilePath(\"foo\" GTEST_PATH_SEP_ GTEST_PATH_SEP_\n GTEST_PATH_SEP_ \"bar\").string());\n}\n\n// \"/bar\" == //bar\" == \"///bar\"\nTEST(NormalizeTest, MultipleConsecutiveSepaparatorsAtStringStart) {\n EXPECT_EQ(GTEST_PATH_SEP_ \"bar\",\n FilePath(GTEST_PATH_SEP_ \"bar\").string());\n EXPECT_EQ(GTEST_PATH_SEP_ \"bar\",\n FilePath(GTEST_PATH_SEP_ GTEST_PATH_SEP_ \"bar\").string());\n EXPECT_EQ(GTEST_PATH_SEP_ \"bar\",\n FilePath(GTEST_PATH_SEP_ GTEST_PATH_SEP_ GTEST_PATH_SEP_ \"bar\").string());\n}\n\n// \"foo/\" == foo//\" == \"foo///\"\nTEST(NormalizeTest, MultipleConsecutiveSepaparatorsAtStringEnd) {\n EXPECT_EQ(\"foo\" GTEST_PATH_SEP_,\n FilePath(\"foo\" GTEST_PATH_SEP_).string());\n EXPECT_EQ(\"foo\" GTEST_PATH_SEP_,\n FilePath(\"foo\" GTEST_PATH_SEP_ GTEST_PATH_SEP_).string());\n EXPECT_EQ(\"foo\" GTEST_PATH_SEP_,\n FilePath(\"foo\" GTEST_PATH_SEP_ GTEST_PATH_SEP_ GTEST_PATH_SEP_).string());\n}\n\n#if GTEST_HAS_ALT_PATH_SEP_\n\n// Tests that separators at the end of the string are normalized\n// regardless of their combination (e.g. \"foo\\\" ==\"foo/\\\" ==\n// \"foo\\\\/\").\nTEST(NormalizeTest, MixAlternateSeparatorAtStringEnd) {\n EXPECT_EQ(\"foo\" GTEST_PATH_SEP_,\n FilePath(\"foo/\").string());\n EXPECT_EQ(\"foo\" GTEST_PATH_SEP_,\n FilePath(\"foo\" GTEST_PATH_SEP_ \"/\").string());\n EXPECT_EQ(\"foo\" GTEST_PATH_SEP_,\n FilePath(\"foo//\" GTEST_PATH_SEP_).string());\n}\n\n#endif\n\nTEST(AssignmentOperatorTest, DefaultAssignedToNonDefault) {\n FilePath default_path;\n FilePath non_default_path(\"path\");\n non_default_path = default_path;\n EXPECT_EQ(\"\", non_default_path.string());\n EXPECT_EQ(\"\", default_path.string()); // RHS var is unchanged.\n}\n\nTEST(AssignmentOperatorTest, NonDefaultAssignedToDefault) {\n FilePath non_default_path(\"path\");\n FilePath default_path;\n default_path = non_default_path;\n EXPECT_EQ(\"path\", default_path.string());\n EXPECT_EQ(\"path\", non_default_path.string()); // RHS var is unchanged.\n}\n\nTEST(AssignmentOperatorTest, ConstAssignedToNonConst) {\n const FilePath const_default_path(\"const_path\");\n FilePath non_default_path(\"path\");\n non_default_path = const_default_path;\n EXPECT_EQ(\"const_path\", non_default_path.string());\n}\n\nclass DirectoryCreationTest : public Test {\n protected:\n virtual void SetUp() {\n testdata_path_.Set(FilePath(\n TempDir() + GetCurrentExecutableName().string() +\n \"_directory_creation\" GTEST_PATH_SEP_ \"test\" GTEST_PATH_SEP_));\n testdata_file_.Set(testdata_path_.RemoveTrailingPathSeparator());\n\n unique_file0_.Set(FilePath::MakeFileName(testdata_path_, FilePath(\"unique\"),\n 0, \"txt\"));\n unique_file1_.Set(FilePath::MakeFileName(testdata_path_, FilePath(\"unique\"),\n 1, \"txt\"));\n\n remove(testdata_file_.c_str());\n remove(unique_file0_.c_str());\n remove(unique_file1_.c_str());\n posix::RmDir(testdata_path_.c_str());\n }\n\n virtual void TearDown() {\n remove(testdata_file_.c_str());\n remove(unique_file0_.c_str());\n remove(unique_file1_.c_str());\n posix::RmDir(testdata_path_.c_str());\n }\n\n void CreateTextFile(const char* filename) {\n FILE* f = posix::FOpen(filename, \"w\");\n fprintf(f, \"text\\n\");\n fclose(f);\n }\n\n // Strings representing a directory and a file, with identical paths\n // except for the trailing separator character that distinquishes\n // a directory named 'test' from a file named 'test'. Example names:\n FilePath testdata_path_; // \"/tmp/directory_creation/test/\"\n FilePath testdata_file_; // \"/tmp/directory_creation/test\"\n FilePath unique_file0_; // \"/tmp/directory_creation/test/unique.txt\"\n FilePath unique_file1_; // \"/tmp/directory_creation/test/unique_1.txt\"\n};\n\nTEST_F(DirectoryCreationTest, CreateDirectoriesRecursively) {\n EXPECT_FALSE(testdata_path_.DirectoryExists()) << testdata_path_.string();\n EXPECT_TRUE(testdata_path_.CreateDirectoriesRecursively());\n EXPECT_TRUE(testdata_path_.DirectoryExists());\n}\n\nTEST_F(DirectoryCreationTest, CreateDirectoriesForAlreadyExistingPath) {\n EXPECT_FALSE(testdata_path_.DirectoryExists()) << testdata_path_.string();\n EXPECT_TRUE(testdata_path_.CreateDirectoriesRecursively());\n // Call 'create' again... should still succeed.\n EXPECT_TRUE(testdata_path_.CreateDirectoriesRecursively());\n}\n\nTEST_F(DirectoryCreationTest, CreateDirectoriesAndUniqueFilename) {\n FilePath file_path(FilePath::GenerateUniqueFileName(testdata_path_,\n FilePath(\"unique\"), \"txt\"));\n EXPECT_EQ(unique_file0_.string(), file_path.string());\n EXPECT_FALSE(file_path.FileOrDirectoryExists()); // file not there\n\n testdata_path_.CreateDirectoriesRecursively();\n EXPECT_FALSE(file_path.FileOrDirectoryExists()); // file still not there\n CreateTextFile(file_path.c_str());\n EXPECT_TRUE(file_path.FileOrDirectoryExists());\n\n FilePath file_path2(FilePath::GenerateUniqueFileName(testdata_path_,\n FilePath(\"unique\"), \"txt\"));\n EXPECT_EQ(unique_file1_.string(), file_path2.string());\n EXPECT_FALSE(file_path2.FileOrDirectoryExists()); // file not there\n CreateTextFile(file_path2.c_str());\n EXPECT_TRUE(file_path2.FileOrDirectoryExists());\n}\n\nTEST_F(DirectoryCreationTest, CreateDirectoriesFail) {\n // force a failure by putting a file where we will try to create a directory.\n CreateTextFile(testdata_file_.c_str());\n EXPECT_TRUE(testdata_file_.FileOrDirectoryExists());\n EXPECT_FALSE(testdata_file_.DirectoryExists());\n EXPECT_FALSE(testdata_file_.CreateDirectoriesRecursively());\n}\n\nTEST(NoDirectoryCreationTest, CreateNoDirectoriesForDefaultXmlFile) {\n const FilePath test_detail_xml(\"test_detail.xml\");\n EXPECT_FALSE(test_detail_xml.CreateDirectoriesRecursively());\n}\n\nTEST(FilePathTest, DefaultConstructor) {\n FilePath fp;\n EXPECT_EQ(\"\", fp.string());\n}\n\nTEST(FilePathTest, CharAndCopyConstructors) {\n const FilePath fp(\"spicy\");\n EXPECT_EQ(\"spicy\", fp.string());\n\n const FilePath fp_copy(fp);\n EXPECT_EQ(\"spicy\", fp_copy.string());\n}\n\nTEST(FilePathTest, StringConstructor) {\n const FilePath fp(std::string(\"cider\"));\n EXPECT_EQ(\"cider\", fp.string());\n}\n\nTEST(FilePathTest, Set) {\n const FilePath apple(\"apple\");\n FilePath mac(\"mac\");\n mac.Set(apple); // Implement Set() since overloading operator= is forbidden.\n EXPECT_EQ(\"apple\", mac.string());\n EXPECT_EQ(\"apple\", apple.string());\n}\n\nTEST(FilePathTest, ToString) {\n const FilePath file(\"drink\");\n EXPECT_EQ(\"drink\", file.string());\n}\n\nTEST(FilePathTest, RemoveExtension) {\n EXPECT_EQ(\"app\", FilePath(\"app.cc\").RemoveExtension(\"cc\").string());\n EXPECT_EQ(\"app\", FilePath(\"app.exe\").RemoveExtension(\"exe\").string());\n EXPECT_EQ(\"APP\", FilePath(\"APP.EXE\").RemoveExtension(\"exe\").string());\n}\n\nTEST(FilePathTest, RemoveExtensionWhenThereIsNoExtension) {\n EXPECT_EQ(\"app\", FilePath(\"app\").RemoveExtension(\"exe\").string());\n}\n\nTEST(FilePathTest, IsDirectory) {\n EXPECT_FALSE(FilePath(\"cola\").IsDirectory());\n EXPECT_TRUE(FilePath(\"koala\" GTEST_PATH_SEP_).IsDirectory());\n#if GTEST_HAS_ALT_PATH_SEP_\n EXPECT_TRUE(FilePath(\"koala/\").IsDirectory());\n#endif\n}\n\nTEST(FilePathTest, IsAbsolutePath) {\n EXPECT_FALSE(FilePath(\"is\" GTEST_PATH_SEP_ \"relative\").IsAbsolutePath());\n EXPECT_FALSE(FilePath(\"\").IsAbsolutePath());\n#if GTEST_OS_WINDOWS\n EXPECT_TRUE(FilePath(\"c:\\\\\" GTEST_PATH_SEP_ \"is_not\"\n GTEST_PATH_SEP_ \"relative\").IsAbsolutePath());\n EXPECT_FALSE(FilePath(\"c:foo\" GTEST_PATH_SEP_ \"bar\").IsAbsolutePath());\n EXPECT_TRUE(FilePath(\"c:/\" GTEST_PATH_SEP_ \"is_not\"\n GTEST_PATH_SEP_ \"relative\").IsAbsolutePath());\n#else\n EXPECT_TRUE(FilePath(GTEST_PATH_SEP_ \"is_not\" GTEST_PATH_SEP_ \"relative\")\n .IsAbsolutePath());\n#endif // GTEST_OS_WINDOWS\n}\n\nTEST(FilePathTest, IsRootDirectory) {\n#if GTEST_OS_WINDOWS\n EXPECT_TRUE(FilePath(\"a:\\\\\").IsRootDirectory());\n EXPECT_TRUE(FilePath(\"Z:/\").IsRootDirectory());\n EXPECT_TRUE(FilePath(\"e://\").IsRootDirectory());\n EXPECT_FALSE(FilePath(\"\").IsRootDirectory());\n EXPECT_FALSE(FilePath(\"b:\").IsRootDirectory());\n EXPECT_FALSE(FilePath(\"b:a\").IsRootDirectory());\n EXPECT_FALSE(FilePath(\"8:/\").IsRootDirectory());\n EXPECT_FALSE(FilePath(\"c|/\").IsRootDirectory());\n#else\n EXPECT_TRUE(FilePath(\"/\").IsRootDirectory());\n EXPECT_TRUE(FilePath(\"//\").IsRootDirectory());\n EXPECT_FALSE(FilePath(\"\").IsRootDirectory());\n EXPECT_FALSE(FilePath(\"\\\\\").IsRootDirectory());\n EXPECT_FALSE(FilePath(\"/x\").IsRootDirectory());\n#endif\n}\n\n} // namespace\n} // namespace internal\n} // namespace testing\n"} +{"text": "// TicketDesk - Attribution notice\n// Contributor(s):\n//\n// Stephen Redd (https://github.com/stephenredd)\n//\n// This file is distributed under the terms of the Microsoft Public \n// License (Ms-PL). See http://opensource.org/licenses/MS-PL\n// for the complete terms of use. \n//\n// For any distribution that contains code from this file, this notice of \n// attribution must remain intact, and a copy of the license must be \n// provided to the recipient.\n\nusing System.ComponentModel.DataAnnotations;\nusing System.ComponentModel.DataAnnotations.Schema;\n\nnamespace TicketDesk.Domain.Model\n{\n public class ApplicationSetting\n {\n public ApplicationSetting()\n {\n //To ensure that missing database values for settings do not completely brick the\n // entire instance, make sure all default settings are initialized in the ctor\n ApplicationName = \"TicketDesk\";\n Permissions = new ApplicationPermissionsSetting();\n SelectLists = new ApplicationSelectListSetting();\n SecuritySettings = new ApplicationSecuritySetting();\n ClientSettings = new ClientSetting();\n }\n\n [Key]\n [DatabaseGenerated(DatabaseGeneratedOption.None)]\n [Display(AutoGenerateField = false)]\n public string ApplicationName { get; set; }\n\n public ApplicationPermissionsSetting Permissions { get; set; }\n\n public ApplicationSelectListSetting SelectLists { get; set; }\n\n public ApplicationSecuritySetting SecuritySettings { get; set; }\n\n public ClientSetting ClientSettings { get; set; }\n \n }\n\n}\n"} +{"text": "import math\n\nimport torch\nfrom torch._six import inf\nfrom torch.distributions import constraints\nfrom torch.distributions.transforms import AbsTransform\nfrom torch.distributions.cauchy import Cauchy\nfrom torch.distributions.transformed_distribution import TransformedDistribution\n\n\nclass HalfCauchy(TransformedDistribution):\n r\"\"\"\n Creates a half-normal distribution parameterized by `scale` where::\n\n X ~ Cauchy(0, scale)\n Y = |X| ~ HalfCauchy(scale)\n\n Example::\n\n >>> m = HalfCauchy(torch.tensor([1.0]))\n >>> m.sample() # half-cauchy distributed with scale=1\n tensor([ 2.3214])\n\n Args:\n scale (float or Tensor): scale of the full Cauchy distribution\n \"\"\"\n arg_constraints = {'scale': constraints.positive}\n support = constraints.positive\n has_rsample = True\n\n def __init__(self, scale, validate_args=None):\n base_dist = Cauchy(0, scale)\n super(HalfCauchy, self).__init__(base_dist, AbsTransform(),\n validate_args=validate_args)\n\n def expand(self, batch_shape, _instance=None):\n new = self._get_checked_instance(HalfCauchy, _instance)\n return super(HalfCauchy, self).expand(batch_shape, _instance=new)\n\n @property\n def scale(self):\n return self.base_dist.scale\n\n @property\n def mean(self):\n return self.base_dist.mean\n\n @property\n def variance(self):\n return self.base_dist.variance\n\n def log_prob(self, value):\n log_prob = self.base_dist.log_prob(value) + math.log(2)\n log_prob[value.expand(log_prob.shape) < 0] = -inf\n return log_prob\n\n def cdf(self, value):\n return 2 * self.base_dist.cdf(value) - 1\n\n def icdf(self, prob):\n return self.base_dist.icdf((prob + 1) / 2)\n\n def entropy(self):\n return self.base_dist.entropy() - math.log(2)\n"} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!-- Copyright (C) 2011 The Android Open Source Project\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n-->\n\n<FrameLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:id=\"@+id/frame_layout_rtl\"\n android:layout_width=\"fill_parent\"\n android:layout_height=\"fill_parent\">\n\n <FrameLayout android:layout_width=\"match_parent\"\n android:layout_height=\"match_parent\"\n android:layoutDirection=\"rtl\"\n android:background=\"#FF000000\">\n\n <FrameLayout\n android:layout_width=\"100dp\"\n android:layout_height=\"100dp\"\n android:layout_gravity=\"right|center_vertical\"\n android:background=\"#FFFF0000\">\n </FrameLayout>\n\n <FrameLayout\n android:layout_width=\"100dp\"\n android:layout_height=\"100dp\"\n android:layout_gravity=\"left|center_vertical\"\n android:background=\"#FF00FF00\">\n </FrameLayout>\n\n <FrameLayout\n android:layout_width=\"100dp\"\n android:layout_height=\"100dp\"\n android:layout_gravity=\"top|center_horizontal\"\n android:background=\"#FF0000FF\">\n </FrameLayout>\n\n <FrameLayout\n android:layout_width=\"100dp\"\n android:layout_height=\"100dp\"\n android:layout_gravity=\"bottom|center_horizontal\"\n android:background=\"#FF00FFFF\">\n </FrameLayout>\n\n <FrameLayout\n android:layout_width=\"100dp\"\n android:layout_height=\"100dp\"\n android:layout_gravity=\"top|start\"\n android:background=\"#FFFFFFFF\">\n </FrameLayout>\n\n <FrameLayout\n android:layout_width=\"100dp\"\n android:layout_height=\"100dp\"\n android:layout_gravity=\"top|end\"\n android:background=\"#FFFFFF00\">\n </FrameLayout>\n\n <FrameLayout\n android:layout_width=\"100dp\"\n android:layout_height=\"100dp\"\n android:layout_gravity=\"bottom|start\"\n android:background=\"#FFFFFFFF\">\n </FrameLayout>\n\n <FrameLayout\n android:layout_width=\"100dp\"\n android:layout_height=\"100dp\"\n android:layout_gravity=\"bottom|end\"\n android:background=\"#FFFFFF00\">\n </FrameLayout>\n\n <FrameLayout\n android:layout_width=\"100dp\"\n android:layout_height=\"100dp\"\n android:layout_gravity=\"center_horizontal|center_vertical\"\n android:background=\"#FF888888\">\n </FrameLayout>\n\n </FrameLayout>\n\n</FrameLayout>\n"} +{"text": "#\n# Makefile for ATA over Ethernet\n#\n\nobj-$(CONFIG_ATA_OVER_ETH)\t+= aoe.o\naoe-y := aoeblk.o aoechr.o aoecmd.o aoedev.o aoemain.o aoenet.o\n"} +{"text": "# Copyright 2018-2020 Xanadu Quantum Technologies Inc.\n\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n\n# http://www.apache.org/licenses/LICENSE-2.0\n\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\"\"\"\nUnit tests for the available built-in discrete-variable quantum operations.\n\"\"\"\nimport pytest\nimport functools\nimport numpy as np\nfrom numpy.linalg import multi_dot\n\nimport pennylane as qml\nfrom pennylane.wires import Wires\n\nfrom gate_data import I, X, Y, Z, H, CNOT, SWAP, CZ, S, T, CSWAP, Toffoli\n\n\n# Standard observables, their matrix representation, and eigenvlaues\nOBSERVABLES = [\n (qml.PauliX, X, [1, -1]),\n (qml.PauliY, Y, [1, -1]),\n (qml.PauliZ, Z, [1, -1]),\n (qml.Hadamard, H, [1, -1]),\n (qml.Identity, I, [1, 1]),\n]\n\n# Hermitian matrices, their corresponding eigenvalues and eigenvectors.\nEIGVALS_TEST_DATA = [\n (np.array([[1, 0], [0, 1]]), np.array([1.0, 1.0]), np.array([[1.0, 0.0], [0.0, 1.0]])),\n (\n np.array([[0, 1], [1, 0]]),\n np.array([-1.0, 1.0]),\n np.array([[-0.70710678, 0.70710678], [0.70710678, 0.70710678]]),\n ),\n (\n np.array([[0, -1j], [1j, 0]]),\n np.array([-1.0, 1.0]),\n np.array(\n [[-0.70710678 + 0.0j, -0.70710678 + 0.0j], [0.0 + 0.70710678j, 0.0 - 0.70710678j]]\n ),\n ),\n (np.array([[1, 0], [0, -1]]), np.array([-1.0, 1.0]), np.array([[0.0, 1.0], [1.0, 0.0]])),\n (\n 1 / np.sqrt(2) * np.array([[1, 1], [1, -1]]),\n np.array([-1.0, 1.0]),\n np.array([[0.38268343, -0.92387953], [-0.92387953, -0.38268343]]),\n ),\n]\n\nEIGVALS_TEST_DATA_MULTI_WIRES = [functools.reduce(np.kron, [Y, I, Z])]\n\n\n@pytest.mark.usefixtures(\"tear_down_hermitian\")\nclass TestObservables:\n \"\"\"Tests for observables\"\"\"\n\n @pytest.mark.parametrize(\"obs, mat, eigs\", OBSERVABLES)\n def test_diagonalization(self, obs, mat, eigs, tol):\n \"\"\"Test the method transforms standard observables into the Z-gate.\"\"\"\n ob = obs(wires=0)\n A = ob.matrix\n\n diag_gates = ob.diagonalizing_gates()\n U = np.eye(2)\n\n if diag_gates:\n mats = [i.matrix for i in diag_gates]\n # Need to revert the order in which the matrices are applied such that they adhere to the order\n # of matrix multiplication\n # E.g. for PauliY: [PauliZ(wires=self.wires), S(wires=self.wires), Hadamard(wires=self.wires)]\n # becomes Hadamard @ S @ PauliZ, where @ stands for matrix multiplication\n mats = mats[::-1]\n U = multi_dot([np.eye(2)] + mats)\n\n res = U @ A @ U.conj().T\n expected = np.diag(eigs)\n assert np.allclose(res, expected, atol=tol, rtol=0)\n\n @pytest.mark.parametrize(\"obs, mat, eigs\", OBSERVABLES)\n def test_eigvals(self, obs, mat, eigs, tol):\n \"\"\"Test eigenvalues of standard observables are correct\"\"\"\n obs = obs(wires=0)\n res = obs.eigvals\n assert np.allclose(res, eigs, atol=tol, rtol=0)\n\n @pytest.mark.parametrize(\"obs, mat, eigs\", OBSERVABLES)\n def test_matrices(self, obs, mat, eigs, tol):\n \"\"\"Test matrices of standard observables are correct\"\"\"\n obs = obs(wires=0)\n res = obs.matrix\n assert np.allclose(res, mat, atol=tol, rtol=0)\n\n @pytest.mark.parametrize(\"observable, eigvals, eigvecs\", EIGVALS_TEST_DATA)\n def test_hermitian_eigegendecomposition_single_wire(self, observable, eigvals, eigvecs, tol):\n \"\"\"Tests that the eigendecomposition property of the Hermitian class returns the correct results\n for a single wire.\"\"\"\n\n eigendecomp = qml.Hermitian(observable, wires=0).eigendecomposition\n assert np.allclose(eigendecomp[\"eigval\"], eigvals, atol=tol, rtol=0)\n assert np.allclose(eigendecomp[\"eigvec\"], eigvecs, atol=tol, rtol=0)\n\n key = tuple(observable.flatten().tolist())\n assert np.allclose(qml.Hermitian._eigs[key][\"eigval\"], eigvals, atol=tol, rtol=0)\n assert np.allclose(qml.Hermitian._eigs[key][\"eigvec\"], eigvecs, atol=tol, rtol=0)\n assert len(qml.Hermitian._eigs) == 1\n\n @pytest.mark.parametrize(\"observable\", EIGVALS_TEST_DATA_MULTI_WIRES)\n def test_hermitian_eigegendecomposition_multiple_wires(self, observable, tol):\n \"\"\"Tests that the eigendecomposition property of the Hermitian class returns the correct results\n for multiple wires.\"\"\"\n\n num_wires = int(np.log2(len(observable)))\n eigendecomp = qml.Hermitian(observable, wires=list(range(num_wires))).eigendecomposition\n\n eigvals, eigvecs = np.linalg.eigh(observable)\n\n assert np.allclose(eigendecomp[\"eigval\"], eigvals, atol=tol, rtol=0)\n assert np.allclose(eigendecomp[\"eigvec\"], eigvecs, atol=tol, rtol=0)\n\n key = tuple(observable.flatten().tolist())\n assert np.allclose(qml.Hermitian._eigs[key][\"eigval\"], eigvals, atol=tol, rtol=0)\n assert np.allclose(qml.Hermitian._eigs[key][\"eigvec\"], eigvecs, atol=tol, rtol=0)\n assert len(qml.Hermitian._eigs) == 1\n\n @pytest.mark.parametrize(\"obs1\", EIGVALS_TEST_DATA)\n @pytest.mark.parametrize(\"obs2\", EIGVALS_TEST_DATA)\n def test_hermitian_eigvals_eigvecs_two_different_observables(self, obs1, obs2, tol):\n \"\"\"Tests that the eigvals method of the Hermitian class returns the correct results\n for two observables.\"\"\"\n if np.all(obs1[0] == obs2[0]):\n pytest.skip(\"Test only runs for pairs of differing observable\")\n\n observable_1 = obs1[0]\n observable_1_eigvals = obs1[1]\n observable_1_eigvecs = obs1[2]\n\n key = tuple(observable_1.flatten().tolist())\n\n qml.Hermitian(observable_1, 0).eigvals\n assert np.allclose(\n qml.Hermitian._eigs[key][\"eigval\"], observable_1_eigvals, atol=tol, rtol=0\n )\n assert np.allclose(\n qml.Hermitian._eigs[key][\"eigvec\"], observable_1_eigvecs, atol=tol, rtol=0\n )\n assert len(qml.Hermitian._eigs) == 1\n\n observable_2 = obs2[0]\n observable_2_eigvals = obs2[1]\n observable_2_eigvecs = obs2[2]\n\n key_2 = tuple(observable_2.flatten().tolist())\n\n qml.Hermitian(observable_2, 0).eigvals\n assert np.allclose(\n qml.Hermitian._eigs[key_2][\"eigval\"], observable_2_eigvals, atol=tol, rtol=0\n )\n assert np.allclose(\n qml.Hermitian._eigs[key_2][\"eigvec\"], observable_2_eigvecs, atol=tol, rtol=0\n )\n assert len(qml.Hermitian._eigs) == 2\n\n @pytest.mark.parametrize(\"observable, eigvals, eigvecs\", EIGVALS_TEST_DATA)\n def test_hermitian_eigvals_eigvecs_same_observable_twice(\n self, observable, eigvals, eigvecs, tol\n ):\n \"\"\"Tests that the eigvals method of the Hermitian class keeps the same dictionary entries upon multiple calls.\"\"\"\n key = tuple(observable.flatten().tolist())\n\n qml.Hermitian(observable, 0).eigvals\n assert np.allclose(qml.Hermitian._eigs[key][\"eigval\"], eigvals, atol=tol, rtol=0)\n assert np.allclose(qml.Hermitian._eigs[key][\"eigvec\"], eigvecs, atol=tol, rtol=0)\n assert len(qml.Hermitian._eigs) == 1\n\n qml.Hermitian(observable, 0).eigvals\n assert np.allclose(qml.Hermitian._eigs[key][\"eigval\"], eigvals, atol=tol, rtol=0)\n assert np.allclose(qml.Hermitian._eigs[key][\"eigvec\"], eigvecs, atol=tol, rtol=0)\n assert len(qml.Hermitian._eigs) == 1\n\n @pytest.mark.parametrize(\"observable, eigvals, eigvecs\", EIGVALS_TEST_DATA)\n def test_hermitian_diagonalizing_gates(self, observable, eigvals, eigvecs, tol):\n \"\"\"Tests that the diagonalizing_gates method of the Hermitian class returns the correct results.\"\"\"\n qubit_unitary = qml.Hermitian(observable, wires=[0]).diagonalizing_gates()\n\n key = tuple(observable.flatten().tolist())\n assert np.allclose(qml.Hermitian._eigs[key][\"eigval\"], eigvals, atol=tol, rtol=0)\n assert np.allclose(qml.Hermitian._eigs[key][\"eigvec\"], eigvecs, atol=tol, rtol=0)\n\n assert np.allclose(qubit_unitary[0].data, eigvecs.conj().T, atol=tol, rtol=0)\n assert len(qml.Hermitian._eigs) == 1\n\n @pytest.mark.parametrize(\"obs1\", EIGVALS_TEST_DATA)\n @pytest.mark.parametrize(\"obs2\", EIGVALS_TEST_DATA)\n def test_hermitian_diagonalizing_gates_two_different_observables(self, obs1, obs2, tol):\n \"\"\"Tests that the diagonalizing_gates method of the Hermitian class returns the correct results\n for two observables.\"\"\"\n if np.all(obs1[0] == obs2[0]):\n pytest.skip(\"Test only runs for pairs of differing observable\")\n\n observable_1 = obs1[0]\n observable_1_eigvals = obs1[1]\n observable_1_eigvecs = obs1[2]\n\n qubit_unitary = qml.Hermitian(observable_1, wires=[0]).diagonalizing_gates()\n\n key = tuple(observable_1.flatten().tolist())\n assert np.allclose(\n qml.Hermitian._eigs[key][\"eigval\"], observable_1_eigvals, atol=tol, rtol=0\n )\n assert np.allclose(\n qml.Hermitian._eigs[key][\"eigvec\"], observable_1_eigvecs, atol=tol, rtol=0\n )\n\n assert np.allclose(qubit_unitary[0].data, observable_1_eigvecs.conj().T, atol=tol, rtol=0)\n assert len(qml.Hermitian._eigs) == 1\n\n observable_2 = obs2[0]\n observable_2_eigvals = obs2[1]\n observable_2_eigvecs = obs2[2]\n\n qubit_unitary_2 = qml.Hermitian(observable_2, wires=[0]).diagonalizing_gates()\n\n key = tuple(observable_2.flatten().tolist())\n assert np.allclose(\n qml.Hermitian._eigs[key][\"eigval\"], observable_2_eigvals, atol=tol, rtol=0\n )\n assert np.allclose(\n qml.Hermitian._eigs[key][\"eigvec\"], observable_2_eigvecs, atol=tol, rtol=0\n )\n\n assert np.allclose(\n qubit_unitary_2[0].data, observable_2_eigvecs.conj().T, atol=tol, rtol=0\n )\n assert len(qml.Hermitian._eigs) == 2\n\n @pytest.mark.parametrize(\"observable, eigvals, eigvecs\", EIGVALS_TEST_DATA)\n def test_hermitian_diagonalizing_gatesi_same_observable_twice(\n self, observable, eigvals, eigvecs, tol\n ):\n \"\"\"Tests that the diagonalizing_gates method of the Hermitian class keeps the same dictionary entries upon multiple calls.\"\"\"\n qubit_unitary = qml.Hermitian(observable, wires=[0]).diagonalizing_gates()\n\n key = tuple(observable.flatten().tolist())\n assert np.allclose(qml.Hermitian._eigs[key][\"eigval\"], eigvals, atol=tol, rtol=0)\n assert np.allclose(qml.Hermitian._eigs[key][\"eigvec\"], eigvecs, atol=tol, rtol=0)\n\n assert np.allclose(qubit_unitary[0].data, eigvecs.conj().T, atol=tol, rtol=0)\n assert len(qml.Hermitian._eigs) == 1\n\n qubit_unitary = qml.Hermitian(observable, wires=[0]).diagonalizing_gates()\n\n key = tuple(observable.flatten().tolist())\n assert np.allclose(qml.Hermitian._eigs[key][\"eigval\"], eigvals, atol=tol, rtol=0)\n assert np.allclose(qml.Hermitian._eigs[key][\"eigvec\"], eigvecs, atol=tol, rtol=0)\n\n assert np.allclose(qubit_unitary[0].data, eigvecs.conj().T, atol=tol, rtol=0)\n assert len(qml.Hermitian._eigs) == 1\n\n @pytest.mark.parametrize(\"observable, eigvals, eigvecs\", EIGVALS_TEST_DATA)\n def test_hermitian_diagonalizing_gates_integration(self, observable, eigvals, eigvecs, tol):\n \"\"\"Tests that the diagonalizing_gates method of the Hermitian class\n diagonalizes the given observable.\"\"\"\n tensor_obs = np.kron(observable, observable)\n eigvals = np.kron(eigvals, eigvals)\n\n diag_gates = qml.Hermitian(tensor_obs, wires=[0, 1]).diagonalizing_gates()\n\n assert len(diag_gates) == 1\n\n U = diag_gates[0].parameters[0]\n x = U @ tensor_obs @ U.conj().T\n assert np.allclose(np.diag(np.sort(eigvals)), x, atol=tol, rtol=0)\n\n def test_hermitian_matrix(self, tol):\n \"\"\"Test that the hermitian matrix method produces the correct output.\"\"\"\n H = np.array([[1, 1], [1, -1]]) / np.sqrt(2)\n out = qml.Hermitian(H, wires=0).matrix\n\n # verify output type\n assert isinstance(out, np.ndarray)\n\n # verify equivalent to input state\n assert np.allclose(out, H, atol=tol, rtol=0)\n\n def test_hermitian_exceptions(self):\n \"\"\"Tests that the hermitian matrix method raises the proper errors.\"\"\"\n H = np.array([[1, 1], [1, -1]]) / np.sqrt(2)\n\n # test non-square matrix\n with pytest.raises(ValueError, match=\"must be a square matrix\"):\n qml.Hermitian(H[1:], wires=0).matrix\n\n # test non-Hermitian matrix\n H2 = H.copy()\n H2[0, 1] = 2\n with pytest.raises(ValueError, match=\"must be Hermitian\"):\n qml.Hermitian(H2, wires=0).matrix\n\n\n# Non-parametrized operations and their matrix representation\nNON_PARAMETRIZED_OPERATIONS = [\n (qml.CNOT, CNOT),\n (qml.SWAP, SWAP),\n (qml.CZ, CZ),\n (qml.S, S),\n (qml.T, T),\n (qml.CSWAP, CSWAP),\n (qml.Toffoli, Toffoli),\n]\n\n\nclass TestOperations:\n \"\"\"Tests for the operations\"\"\"\n\n @pytest.mark.parametrize(\"ops, mat\", NON_PARAMETRIZED_OPERATIONS)\n def test_matrices(self, ops, mat, tol):\n \"\"\"Test matrices of non-parametrized operations are correct\"\"\"\n op = ops(wires=range(ops.num_wires))\n res = op.matrix\n assert np.allclose(res, mat, atol=tol, rtol=0)\n\n def test_x_decomposition(self, tol):\n \"\"\"Tests that the decomposition of the PauliX is correct\"\"\"\n op = qml.PauliX(wires=0)\n res = op.decomposition(0)\n\n assert len(res) == 3\n\n assert res[0].name == \"PhaseShift\"\n\n assert res[0].wires == qml.wires.Wires([0])\n assert res[0].data[0] == np.pi / 2\n\n assert res[1].name == \"RX\"\n assert res[1].wires == qml.wires.Wires([0])\n assert res[1].data[0] == np.pi\n\n assert res[2].name == \"PhaseShift\"\n assert res[2].wires == qml.wires.Wires([0])\n assert res[2].data[0] == np.pi / 2\n\n decomposed_matrix = np.linalg.multi_dot([i.matrix for i in reversed(res)])\n assert np.allclose(decomposed_matrix, op.matrix, atol=tol, rtol=0)\n\n def test_y_decomposition(self, tol):\n \"\"\"Tests that the decomposition of the PauliY is correct\"\"\"\n op = qml.PauliY(wires=0)\n res = op.decomposition(0)\n\n assert len(res) == 3\n\n assert res[0].name == \"PhaseShift\"\n\n assert res[0].wires == Wires([0])\n assert res[0].data[0] == np.pi / 2\n\n assert res[1].name == \"RY\"\n assert res[1].wires == Wires([0])\n assert res[1].data[0] == np.pi\n\n assert res[2].name == \"PhaseShift\"\n assert res[2].wires == Wires([0])\n assert res[2].data[0] == np.pi / 2\n\n decomposed_matrix = np.linalg.multi_dot([i.matrix for i in reversed(res)])\n assert np.allclose(decomposed_matrix, op.matrix, atol=tol, rtol=0)\n\n def test_z_decomposition(self, tol):\n \"\"\"Tests that the decomposition of the PauliZ is correct\"\"\"\n op = qml.PauliZ(wires=0)\n res = op.decomposition(0)\n\n assert len(res) == 1\n\n assert res[0].name == \"PhaseShift\"\n\n assert res[0].wires == Wires([0])\n assert res[0].data[0] == np.pi\n\n decomposed_matrix = res[0].matrix\n assert np.allclose(decomposed_matrix, op.matrix, atol=tol, rtol=0)\n\n def test_s_decomposition(self, tol):\n \"\"\"Tests that the decomposition of the S gate is correct\"\"\"\n op = qml.S(wires=0)\n res = op.decomposition(0)\n\n assert len(res) == 1\n\n assert res[0].name == \"PhaseShift\"\n\n assert res[0].wires == Wires([0])\n assert res[0].data[0] == np.pi / 2\n\n decomposed_matrix = res[0].matrix\n assert np.allclose(decomposed_matrix, op.matrix, atol=tol, rtol=0)\n\n def test_t_decomposition(self, tol):\n \"\"\"Tests that the decomposition of the T gate is correct\"\"\"\n op = qml.T(wires=0)\n res = op.decomposition(0)\n\n assert len(res) == 1\n\n assert res[0].name == \"PhaseShift\"\n\n assert res[0].wires == Wires([0])\n assert res[0].data[0] == np.pi / 4\n\n decomposed_matrix = res[0].matrix\n assert np.allclose(decomposed_matrix, op.matrix, atol=tol, rtol=0)\n\n def test_hadamard_decomposition(self, tol):\n \"\"\"Tests that the decomposition of the Hadamard gate is correct\"\"\"\n op = qml.Hadamard(wires=0)\n res = op.decomposition(0)\n\n assert len(res) == 3\n\n assert res[0].name == \"PhaseShift\"\n\n assert res[0].wires == Wires([0])\n assert res[0].data[0] == np.pi / 2\n\n assert res[1].name == \"RX\"\n assert res[1].wires == Wires([0])\n assert res[0].data[0] == np.pi / 2\n\n assert res[2].name == \"PhaseShift\"\n assert res[2].wires == Wires([0])\n assert res[0].data[0] == np.pi / 2\n\n decomposed_matrix = np.linalg.multi_dot([i.matrix for i in reversed(res)])\n assert np.allclose(decomposed_matrix, op.matrix, atol=tol, rtol=0)\n\n def test_phase_decomposition(self, tol):\n \"\"\"Tests that the decomposition of the Phase gate is correct\"\"\"\n phi = 0.3\n op = qml.PhaseShift(phi, wires=0)\n res = op.decomposition(phi, 0)\n\n assert len(res) == 1\n\n assert res[0].name == \"RZ\"\n\n assert res[0].wires == Wires([0])\n assert res[0].data[0] == 0.3\n\n decomposed_matrix = res[0].matrix\n global_phase = (decomposed_matrix[op.matrix != 0] / op.matrix[op.matrix != 0])[0]\n\n assert np.allclose(decomposed_matrix, global_phase * op.matrix, atol=tol, rtol=0)\n\n def test_CY_decomposition(self, tol):\n \"\"\"Tests that the decomposition of the CY gate is correct\"\"\"\n op = qml.CY(wires=[0, 1])\n res = op.decomposition(op.wires)\n\n mats = []\n for i in reversed(res):\n if len(i.wires) == 1:\n mats.append(np.kron(i.matrix, np.eye(2)))\n else:\n mats.append(i.matrix)\n\n decomposed_matrix = np.linalg.multi_dot(mats)\n assert np.allclose(decomposed_matrix, op.matrix, atol=tol, rtol=0)\n\n def test_phase_shift(self, tol):\n \"\"\"Test phase shift is correct\"\"\"\n\n # test identity for theta=0\n assert np.allclose(qml.PhaseShift._matrix(0), np.identity(2), atol=tol, rtol=0)\n assert np.allclose(qml.U1._matrix(0), np.identity(2), atol=tol, rtol=0)\n\n # test arbitrary phase shift\n phi = 0.5432\n expected = np.array([[1, 0], [0, np.exp(1j * phi)]])\n assert np.allclose(qml.PhaseShift._matrix(phi), expected, atol=tol, rtol=0)\n assert np.allclose(qml.U1._matrix(phi), expected, atol=tol, rtol=0)\n\n def test_x_rotation(self, tol):\n \"\"\"Test x rotation is correct\"\"\"\n\n # test identity for theta=0\n assert np.allclose(qml.RX._matrix(0), np.identity(2), atol=tol, rtol=0)\n\n # test identity for theta=pi/2\n expected = np.array([[1, -1j], [-1j, 1]]) / np.sqrt(2)\n assert np.allclose(qml.RX._matrix(np.pi / 2), expected, atol=tol, rtol=0)\n\n # test identity for theta=pi\n expected = -1j * np.array([[0, 1], [1, 0]])\n assert np.allclose(qml.RX._matrix(np.pi), expected, atol=tol, rtol=0)\n\n def test_y_rotation(self, tol):\n \"\"\"Test y rotation is correct\"\"\"\n\n # test identity for theta=0\n assert np.allclose(qml.RY._matrix(0), np.identity(2), atol=tol, rtol=0)\n\n # test identity for theta=pi/2\n expected = np.array([[1, -1], [1, 1]]) / np.sqrt(2)\n assert np.allclose(qml.RY._matrix(np.pi / 2), expected, atol=tol, rtol=0)\n\n # test identity for theta=pi\n expected = np.array([[0, -1], [1, 0]])\n assert np.allclose(qml.RY._matrix(np.pi), expected, atol=tol, rtol=0)\n\n def test_z_rotation(self, tol):\n \"\"\"Test z rotation is correct\"\"\"\n\n # test identity for theta=0\n assert np.allclose(qml.RZ._matrix(0), np.identity(2), atol=tol, rtol=0)\n\n # test identity for theta=pi/2\n expected = np.diag(np.exp([-1j * np.pi / 4, 1j * np.pi / 4]))\n assert np.allclose(qml.RZ._matrix(np.pi / 2), expected, atol=tol, rtol=0)\n\n # test identity for theta=pi\n assert np.allclose(qml.RZ._matrix(np.pi), -1j * Z, atol=tol, rtol=0)\n\n def test_arbitrary_rotation(self, tol):\n \"\"\"Test arbitrary single qubit rotation is correct\"\"\"\n\n # test identity for phi,theta,omega=0\n assert np.allclose(qml.Rot._matrix(0, 0, 0), np.identity(2), atol=tol, rtol=0)\n\n # expected result\n def arbitrary_rotation(x, y, z):\n \"\"\"arbitrary single qubit rotation\"\"\"\n c = np.cos(y / 2)\n s = np.sin(y / 2)\n return np.array(\n [\n [np.exp(-0.5j * (x + z)) * c, -np.exp(0.5j * (x - z)) * s],\n [np.exp(-0.5j * (x - z)) * s, np.exp(0.5j * (x + z)) * c],\n ]\n )\n\n a, b, c = 0.432, -0.152, 0.9234\n assert np.allclose(qml.Rot._matrix(a, b, c), arbitrary_rotation(a, b, c), atol=tol, rtol=0)\n\n def test_C_x_rotation(self, tol):\n \"\"\"Test controlled x rotation is correct\"\"\"\n\n # test identity for theta=0\n assert np.allclose(qml.CRX._matrix(0), np.identity(4), atol=tol, rtol=0)\n\n # test identity for theta=pi/2\n expected = np.array(\n [\n [1, 0, 0, 0],\n [0, 1, 0, 0],\n [0, 0, 1 / np.sqrt(2), -1j / np.sqrt(2)],\n [0, 0, -1j / np.sqrt(2), 1 / np.sqrt(2)],\n ]\n )\n assert np.allclose(qml.CRX._matrix(np.pi / 2), expected, atol=tol, rtol=0)\n\n # test identity for theta=pi\n expected = np.array([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, -1j], [0, 0, -1j, 0]])\n assert np.allclose(qml.CRX._matrix(np.pi), expected, atol=tol, rtol=0)\n\n def test_C_y_rotation(self, tol):\n \"\"\"Test controlled y rotation is correct\"\"\"\n\n # test identity for theta=0\n assert np.allclose(qml.CRY._matrix(0), np.identity(4), atol=tol, rtol=0)\n\n # test identity for theta=pi/2\n expected = np.array(\n [\n [1, 0, 0, 0],\n [0, 1, 0, 0],\n [0, 0, 1 / np.sqrt(2), -1 / np.sqrt(2)],\n [0, 0, 1 / np.sqrt(2), 1 / np.sqrt(2)],\n ]\n )\n assert np.allclose(qml.CRY._matrix(np.pi / 2), expected, atol=tol, rtol=0)\n\n # test identity for theta=pi\n expected = np.array([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, -1], [0, 0, 1, 0]])\n assert np.allclose(qml.CRY._matrix(np.pi), expected, atol=tol, rtol=0)\n\n def test_C_z_rotation(self, tol):\n \"\"\"Test controlled z rotation is correct\"\"\"\n\n # test identity for theta=0\n assert np.allclose(qml.CRZ._matrix(0), np.identity(4), atol=tol, rtol=0)\n\n # test identity for theta=pi/2\n expected = np.array(\n [\n [1, 0, 0, 0],\n [0, 1, 0, 0],\n [0, 0, np.exp(-1j * np.pi / 4), 0],\n [0, 0, 0, np.exp(1j * np.pi / 4)],\n ]\n )\n assert np.allclose(qml.CRZ._matrix(np.pi / 2), expected, atol=tol, rtol=0)\n\n # test identity for theta=pi\n expected = np.array([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, -1j, 0], [0, 0, 0, 1j]])\n assert np.allclose(qml.CRZ._matrix(np.pi), expected, atol=tol, rtol=0)\n\n def test_controlled_arbitrary_rotation(self, tol):\n \"\"\"Test controlled arbitrary rotation is correct\"\"\"\n\n # test identity for phi,theta,omega=0\n assert np.allclose(qml.CRot._matrix(0, 0, 0), np.identity(4), atol=tol, rtol=0)\n\n # test identity for phi,theta,omega=pi\n expected = np.array([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 0, -1], [0, 0, 1, 0]])\n assert np.allclose(qml.CRot._matrix(np.pi, np.pi, np.pi), expected, atol=tol, rtol=0)\n\n def arbitrary_Crotation(x, y, z):\n \"\"\"controlled arbitrary single qubit rotation\"\"\"\n c = np.cos(y / 2)\n s = np.sin(y / 2)\n return np.array(\n [\n [1, 0, 0, 0],\n [0, 1, 0, 0],\n [0, 0, np.exp(-0.5j * (x + z)) * c, -np.exp(0.5j * (x - z)) * s],\n [0, 0, np.exp(-0.5j * (x - z)) * s, np.exp(0.5j * (x + z)) * c],\n ]\n )\n\n a, b, c = 0.432, -0.152, 0.9234\n assert np.allclose(\n qml.CRot._matrix(a, b, c), arbitrary_Crotation(a, b, c), atol=tol, rtol=0\n )\n\n def test_U2_gate(self, tol):\n \"\"\"Test U2 gate matrix matches the documentation\"\"\"\n phi = 0.432\n lam = -0.12\n res = qml.U2._matrix(phi, lam)\n expected = np.array(\n [[1, -np.exp(1j * lam)], [np.exp(1j * phi), np.exp(1j * (phi + lam))]]\n ) / np.sqrt(2)\n assert np.allclose(res, expected, atol=tol, rtol=0)\n\n def test_U3_gate(self, tol):\n \"\"\"Test U3 gate matrix matches the documentation\"\"\"\n theta = 0.65\n phi = 0.432\n lam = -0.12\n\n res = qml.U3._matrix(theta, phi, lam)\n expected = np.array(\n [\n [np.cos(theta / 2), -np.exp(1j * lam) * np.sin(theta / 2)],\n [\n np.exp(1j * phi) * np.sin(theta / 2),\n np.exp(1j * (phi + lam)) * np.cos(theta / 2),\n ],\n ]\n )\n\n assert np.allclose(res, expected, atol=tol, rtol=0)\n\n def test_qubit_unitary(self, tol):\n \"\"\"Test that the unitary operator produces the correct output.\"\"\"\n U = np.array([[1, 1], [1, -1]]) / np.sqrt(2)\n out = qml.QubitUnitary(U, wires=0).matrix\n\n # verify output type\n assert isinstance(out, np.ndarray)\n\n # verify equivalent to input state\n assert np.allclose(out, U, atol=tol, rtol=0)\n\n def test_qubit_unitary_exceptions(self):\n \"\"\"Tests that the unitary operator raises the proper errors.\"\"\"\n U = np.array([[1, 1], [1, -1]]) / np.sqrt(2)\n\n # test non-square matrix\n with pytest.raises(ValueError, match=\"must be a square matrix\"):\n qml.QubitUnitary(U[1:], wires=0).matrix\n\n # test non-unitary matrix\n U3 = U.copy()\n U3[0, 0] += 0.5\n with pytest.raises(ValueError, match=\"must be unitary\"):\n qml.QubitUnitary(U3, wires=0).matrix\n\n\nPAULI_ROT_PARAMETRIC_MATRIX_TEST_DATA = [\n (\n \"XY\",\n lambda theta: np.array(\n [\n [np.cos(theta / 2), 0, 0, -np.sin(theta / 2)],\n [0, np.cos(theta / 2), np.sin(theta / 2), 0],\n [0, -np.sin(theta / 2), np.cos(theta / 2), 0],\n [np.sin(theta / 2), 0, 0, np.cos(theta / 2)],\n ],\n dtype=complex,\n ),\n ),\n (\n \"ZZ\",\n lambda theta: np.diag(\n [\n np.exp(-1j * theta / 2),\n np.exp(1j * theta / 2),\n np.exp(1j * theta / 2),\n np.exp(-1j * theta / 2),\n ],\n ),\n ),\n (\n \"XI\",\n lambda theta: np.array(\n [\n [np.cos(theta / 2), 0, -1j * np.sin(theta / 2), 0],\n [0, np.cos(theta / 2), 0, -1j * np.sin(theta / 2)],\n [-1j * np.sin(theta / 2), 0, np.cos(theta / 2), 0],\n [0, -1j * np.sin(theta / 2), 0, np.cos(theta / 2)],\n ],\n ),\n ),\n (\"X\", qml.RX._matrix),\n (\"Y\", qml.RY._matrix),\n (\"Z\", qml.RZ._matrix),\n]\n\nPAULI_ROT_MATRIX_TEST_DATA = [\n (\n np.pi,\n \"XIZ\",\n np.array(\n [\n [0, 0, 0, 0, -1j, 0, 0, 0],\n [0, 0, 0, 0, 0, 1j, 0, 0],\n [0, 0, 0, 0, 0, 0, -1j, 0],\n [0, 0, 0, 0, 0, 0, 0, 1j],\n [-1j, 0, 0, 0, 0, 0, 0, 0],\n [0, 1j, 0, 0, 0, 0, 0, 0],\n [0, 0, -1j, 0, 0, 0, 0, 0],\n [0, 0, 0, 1j, 0, 0, 0, 0],\n ]\n ),\n ),\n (\n np.pi / 3,\n \"XYZ\",\n np.array(\n [\n [np.sqrt(3) / 2, 0, 0, 0, 0, 0, -(1 / 2), 0],\n [0, np.sqrt(3) / 2, 0, 0, 0, 0, 0, 1 / 2],\n [0, 0, np.sqrt(3) / 2, 0, 1 / 2, 0, 0, 0],\n [0, 0, 0, np.sqrt(3) / 2, 0, -(1 / 2), 0, 0],\n [0, 0, -(1 / 2), 0, np.sqrt(3) / 2, 0, 0, 0],\n [0, 0, 0, 1 / 2, 0, np.sqrt(3) / 2, 0, 0],\n [1 / 2, 0, 0, 0, 0, 0, np.sqrt(3) / 2, 0],\n [0, -(1 / 2), 0, 0, 0, 0, 0, np.sqrt(3) / 2],\n ]\n ),\n ),\n]\n\n\nclass TestPauliRot:\n \"\"\"Test the PauliRot operation.\"\"\"\n\n @pytest.mark.parametrize(\"theta\", np.linspace(0, 2 * np.pi, 7))\n @pytest.mark.parametrize(\n \"pauli_word,expected_matrix\", PAULI_ROT_PARAMETRIC_MATRIX_TEST_DATA,\n )\n def test_PauliRot_matrix_parametric(self, theta, pauli_word, expected_matrix, tol):\n \"\"\"Test parametrically that the PauliRot matrix is correct.\"\"\"\n\n res = qml.PauliRot._matrix(theta, pauli_word)\n expected = expected_matrix(theta)\n\n assert np.allclose(res, expected, atol=tol, rtol=0)\n\n @pytest.mark.parametrize(\n \"theta,pauli_word,expected_matrix\", PAULI_ROT_MATRIX_TEST_DATA,\n )\n def test_PauliRot_matrix(self, theta, pauli_word, expected_matrix, tol):\n \"\"\"Test non-parametrically that the PauliRot matrix is correct.\"\"\"\n\n res = qml.PauliRot._matrix(theta, pauli_word)\n expected = expected_matrix\n\n assert np.allclose(res, expected, atol=tol, rtol=0)\n\n @pytest.mark.parametrize(\n \"theta,pauli_word,compressed_pauli_word,wires,compressed_wires\",\n [\n (np.pi, \"XIZ\", \"XZ\", [0, 1, 2], [0, 2]),\n (np.pi / 3, \"XIYIZI\", \"XYZ\", [0, 1, 2, 3, 4, 5], [0, 2, 4]),\n (np.pi / 7, \"IXI\", \"X\", [0, 1, 2], [1]),\n (np.pi / 9, \"IIIIIZI\", \"Z\", [0, 1, 2, 3, 4, 5, 6], [5]),\n (np.pi / 11, \"XYZIII\", \"XYZ\", [0, 1, 2, 3, 4, 5], [0, 1, 2]),\n (np.pi / 11, \"IIIXYZ\", \"XYZ\", [0, 1, 2, 3, 4, 5], [3, 4, 5]),\n ],\n )\n def test_PauliRot_matrix_identity(\n self, theta, pauli_word, compressed_pauli_word, wires, compressed_wires, tol\n ):\n \"\"\"Test PauliRot matrix correctly accounts for identities.\"\"\"\n\n res = qml.PauliRot._matrix(theta, pauli_word)\n expected = qml.utils.expand(\n qml.PauliRot._matrix(theta, compressed_pauli_word), compressed_wires, wires\n )\n\n assert np.allclose(res, expected, atol=tol, rtol=0)\n\n def test_PauliRot_decomposition_ZZ(self):\n \"\"\"Test that the decomposition for a ZZ rotation is correct.\"\"\"\n\n theta = 0.4\n op = qml.PauliRot(theta, \"ZZ\", wires=[0, 1])\n decomp_ops = op.decomposition(theta, \"ZZ\", wires=[0, 1])\n\n assert len(decomp_ops) == 1\n\n assert decomp_ops[0].name == \"MultiRZ\"\n\n assert decomp_ops[0].wires == Wires([0, 1])\n assert decomp_ops[0].data[0] == theta\n\n def test_PauliRot_decomposition_XY(self):\n \"\"\"Test that the decomposition for a XY rotation is correct.\"\"\"\n\n theta = 0.4\n op = qml.PauliRot(theta, \"XY\", wires=[0, 1])\n decomp_ops = op.decomposition(theta, \"XY\", wires=[0, 1])\n\n assert len(decomp_ops) == 5\n\n assert decomp_ops[0].name == \"Hadamard\"\n assert decomp_ops[0].wires == Wires([0])\n\n assert decomp_ops[1].name == \"RX\"\n\n assert decomp_ops[1].wires == Wires([1])\n assert decomp_ops[1].data[0] == np.pi / 2\n\n assert decomp_ops[2].name == \"MultiRZ\"\n assert decomp_ops[2].wires == Wires([0, 1])\n assert decomp_ops[2].data[0] == theta\n\n\n assert decomp_ops[3].name == \"Hadamard\"\n assert decomp_ops[3].wires == Wires([0])\n\n assert decomp_ops[4].name == \"RX\"\n\n assert decomp_ops[4].wires == Wires([1])\n assert decomp_ops[4].data[0] == -np.pi / 2\n\n def test_PauliRot_decomposition_XIYZ(self):\n \"\"\"Test that the decomposition for a XIYZ rotation is correct.\"\"\"\n\n theta = 0.4\n op = qml.PauliRot(theta, \"XIYZ\", wires=[0, 1, 2, 3])\n decomp_ops = op.decomposition(theta, \"XIYZ\", wires=[0, 1, 2, 3])\n\n assert len(decomp_ops) == 5\n\n assert decomp_ops[0].name == \"Hadamard\"\n assert decomp_ops[0].wires == Wires([0])\n\n assert decomp_ops[1].name == \"RX\"\n\n assert decomp_ops[1].wires == Wires([2])\n assert decomp_ops[1].data[0] == np.pi / 2\n\n assert decomp_ops[2].name == \"MultiRZ\"\n assert decomp_ops[2].wires == Wires([0, 2, 3])\n assert decomp_ops[2].data[0] == theta\n\n assert decomp_ops[3].name == \"Hadamard\"\n assert decomp_ops[3].wires == Wires([0])\n\n assert decomp_ops[4].name == \"RX\"\n\n assert decomp_ops[4].wires == Wires([2])\n assert decomp_ops[4].data[0] == -np.pi / 2\n\n @pytest.mark.parametrize(\"angle\", np.linspace(0, 2 * np.pi, 7))\n def test_differentiability(self, angle):\n \"\"\"Test that differentiation of PauliRot works.\"\"\"\n\n dev = qml.device(\"default.qubit\", wires=2)\n\n @qml.qnode(dev)\n def circuit(theta):\n qml.PauliRot(theta, \"XX\", wires=[0, 1])\n\n return qml.expval(qml.PauliZ(0))\n\n res = circuit(angle)\n gradient = np.squeeze(circuit.jacobian(angle))\n\n assert gradient == 0.5 * (circuit(angle + np.pi / 2) - circuit(angle - np.pi / 2))\n\n @pytest.mark.parametrize(\"angle\", np.linspace(0, 2 * np.pi, 7))\n def test_decomposition_integration(self, angle, tol):\n \"\"\"Test that the decompositon of PauliRot yields the same results.\"\"\"\n\n dev = qml.device(\"default.qubit\", wires=2)\n\n @qml.qnode(dev)\n def circuit(theta):\n qml.PauliRot(theta, \"XX\", wires=[0, 1])\n\n return qml.expval(qml.PauliZ(0))\n\n @qml.qnode(dev)\n def decomp_circuit(theta):\n qml.PauliRot.decomposition(theta, \"XX\", wires=[0, 1])\n\n return qml.expval(qml.PauliZ(0))\n\n assert circuit(angle) == pytest.approx(decomp_circuit(angle), abs=tol)\n assert np.squeeze(circuit.jacobian(angle)) == pytest.approx(\n np.squeeze(decomp_circuit.jacobian(angle)), abs=tol\n )\n\n def test_matrix_incorrect_pauli_word_error(self):\n \"\"\"Test that _matrix throws an error if a wrong Pauli word is supplied.\"\"\"\n\n with pytest.raises(\n ValueError,\n match='The given Pauli word \".*\" contains characters that are not allowed.'\n \" Allowed characters are I, X, Y and Z\",\n ):\n qml.PauliRot._matrix(0.3, \"IXYZV\")\n\n def test_init_incorrect_pauli_word_error(self):\n \"\"\"Test that __init__ throws an error if a wrong Pauli word is supplied.\"\"\"\n\n with pytest.raises(\n ValueError,\n match='The given Pauli word \".*\" contains characters that are not allowed.'\n \" Allowed characters are I, X, Y and Z\",\n ):\n qml.PauliRot(0.3, \"IXYZV\", wires=[0, 1, 2, 3, 4])\n\n @pytest.mark.parametrize(\"pauli_word,wires\", [(\"XYZ\", [0, 1]), (\"XYZ\", [0, 1, 2, 3]),])\n def test_init_incorrect_pauli_word_length_error(self, pauli_word, wires):\n \"\"\"Test that __init__ throws an error if a Pauli word of wrong length is supplied.\"\"\"\n\n with pytest.raises(\n ValueError,\n match=\"The given Pauli word has length .*, length .* was expected for wires .*\",\n ):\n qml.PauliRot(0.3, pauli_word, wires=wires)\n\n\nclass TestMultiRZ:\n \"\"\"Test the MultiRZ operation.\"\"\"\n\n @pytest.mark.parametrize(\"theta\", np.linspace(0, 2 * np.pi, 7))\n @pytest.mark.parametrize(\n \"wires,expected_matrix\",\n [\n ([0], qml.RZ._matrix),\n ([0, 1], lambda theta: np.diag(np.exp(1j * np.array([-1, 1, 1, -1]) * theta / 2),),),\n (\n [0, 1, 2],\n lambda theta: np.diag(\n np.exp(1j * np.array([-1, 1, 1, -1, 1, -1, -1, 1]) * theta / 2),\n ),\n ),\n ],\n )\n def test_MultiRZ_matrix_parametric(self, theta, wires, expected_matrix, tol):\n \"\"\"Test parametrically that the MultiRZ matrix is correct.\"\"\"\n\n res = qml.MultiRZ._matrix(theta, len(wires))\n expected = expected_matrix(theta)\n\n assert np.allclose(res, expected, atol=tol, rtol=0)\n\n def test_MultiRZ_decomposition_ZZ(self):\n \"\"\"Test that the decomposition for a ZZ rotation is correct.\"\"\"\n\n theta = 0.4\n op = qml.MultiRZ(theta, wires=[0, 1])\n decomp_ops = op.decomposition(theta, wires=[0, 1])\n\n assert decomp_ops[0].name == \"CNOT\"\n assert decomp_ops[0].wires == Wires([1, 0])\n\n assert decomp_ops[1].name == \"RZ\"\n\n assert decomp_ops[1].wires == Wires([0])\n assert decomp_ops[1].data[0] == theta\n\n assert decomp_ops[2].name == \"CNOT\"\n assert decomp_ops[2].wires == Wires([1, 0])\n\n def test_MultiRZ_decomposition_ZZZ(self):\n \"\"\"Test that the decomposition for a ZZZ rotation is correct.\"\"\"\n\n theta = 0.4\n op = qml.MultiRZ(theta, wires=[0, 2, 3])\n decomp_ops = op.decomposition(theta, wires=[0, 2, 3])\n\n assert decomp_ops[0].name == \"CNOT\"\n assert decomp_ops[0].wires == Wires([3, 2])\n\n assert decomp_ops[1].name == \"CNOT\"\n assert decomp_ops[1].wires == Wires([2, 0])\n\n assert decomp_ops[2].name == \"RZ\"\n\n assert decomp_ops[2].wires == Wires([0])\n assert decomp_ops[2].data[0] == theta\n\n assert decomp_ops[3].name == \"CNOT\"\n assert decomp_ops[3].wires == Wires([2, 0])\n\n assert decomp_ops[4].name == \"CNOT\"\n assert decomp_ops[4].wires == Wires([3, 2])\n\n @pytest.mark.parametrize(\"angle\", np.linspace(0, 2 * np.pi, 7))\n def test_differentiability(self, angle):\n \"\"\"Test that differentiation of MultiRZ works.\"\"\"\n\n dev = qml.device(\"default.qubit\", wires=2)\n\n @qml.qnode(dev)\n def circuit(theta):\n qml.Hadamard(0)\n qml.MultiRZ(theta, wires=[0, 1])\n\n return qml.expval(qml.PauliX(0))\n\n res = circuit(angle)\n gradient = np.squeeze(circuit.jacobian(angle))\n\n assert gradient == 0.5 * (circuit(angle + np.pi / 2) - circuit(angle - np.pi / 2))\n\n @pytest.mark.parametrize(\"angle\", np.linspace(0, 2 * np.pi, 7))\n def test_decomposition_integration(self, angle, tol):\n \"\"\"Test that the decompositon of MultiRZ yields the same results.\"\"\"\n\n dev = qml.device(\"default.qubit\", wires=2)\n\n @qml.qnode(dev)\n def circuit(theta):\n qml.Hadamard(0)\n qml.MultiRZ(theta, wires=[0, 1])\n\n return qml.expval(qml.PauliX(0))\n\n @qml.qnode(dev)\n def decomp_circuit(theta):\n qml.Hadamard(0)\n qml.MultiRZ.decomposition(theta, wires=[0, 1])\n\n return qml.expval(qml.PauliX(0))\n\n assert circuit(angle) == pytest.approx(decomp_circuit(angle), abs=tol)\n assert np.squeeze(circuit.jacobian(angle)) == pytest.approx(\n np.squeeze(decomp_circuit.jacobian(angle)), abs=tol\n )\n\n\nclass TestDiagonalQubitUnitary:\n \"\"\"Test the DiagonalQubitUnitary operation.\"\"\"\n\n def test_decomposition(self):\n \"\"\"Test that DiagonalQubitUnitary falls back to QubitUnitary.\"\"\"\n D = np.array([1j, 1, 1, -1, -1j, 1j, 1, -1])\n\n decomp = qml.DiagonalQubitUnitary.decomposition(D, [0, 1, 2])\n\n assert decomp[0].name == \"QubitUnitary\"\n assert decomp[0].wires == Wires([0, 1, 2])\n assert np.allclose(decomp[0].data[0], np.diag(D))\n\n\ndef test_identity_eigvals(tol):\n \"\"\"Test identity eigenvalues are correct\"\"\"\n res = qml.Identity._eigvals()\n expected = np.array([1, 1])\n assert np.allclose(res, expected, atol=tol, rtol=0)\n"} +{"text": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.apache.camel.component.jetty;\n\nimport java.net.URISyntaxException;\n\nimport org.apache.camel.Exchange;\nimport org.apache.camel.Processor;\nimport org.apache.camel.builder.RouteBuilder;\nimport org.apache.camel.support.jsse.KeyManagersParameters;\nimport org.apache.camel.support.jsse.KeyStoreParameters;\nimport org.apache.camel.support.jsse.SSLContextParameters;\n\npublic class HttpsRouteAliasTest extends HttpsRouteTest {\n\n @Override\n protected RouteBuilder createRouteBuilder() throws Exception {\n return new RouteBuilder() {\n public void configure() throws URISyntaxException {\n JettyHttpComponent jetty = context.getComponent(\"jetty\", JettyHttpComponent.class);\n\n KeyStoreParameters ksp = new KeyStoreParameters();\n ksp.setResource(this.getClass().getClassLoader().getResource(\"jsse/localhost-alias.p12\").toString());\n ksp.setPassword(pwd);\n\n KeyManagersParameters kmp = new KeyManagersParameters();\n kmp.setKeyPassword(pwd);\n kmp.setKeyStore(ksp);\n\n SSLContextParameters sslContextParameters = new SSLContextParameters();\n sslContextParameters.setKeyManagers(kmp);\n\n // Specify \"server\" cert alias\n sslContextParameters.setCertAlias(\"server\");\n\n jetty.setSslContextParameters(sslContextParameters);\n\n setSSLProps(jetty, \"\", \"asdfasdfasdfdasfs\", \"sadfasdfasdfas\");\n\n from(\"jetty:https://localhost:\" + port1 + \"/test\").to(\"mock:a\");\n\n Processor proc = new Processor() {\n public void process(Exchange exchange) throws Exception {\n exchange.getMessage().setBody(\"<b>Hello World</b>\");\n }\n };\n from(\"jetty:https://localhost:\" + port1 + \"/hello\").process(proc);\n\n from(\"jetty:https://localhost:\" + port2 + \"/test\").to(\"mock:b\");\n }\n };\n }\n}\n"} +{"text": "//\n// TPCSettingSubCell.swift\n// WKCC\n//\n// Created by tripleCC on 15/11/28.\n// Copyright © 2015年 tripleCC. All rights reserved.\n//\n\nimport UIKit\n\nclass TPCSettingSubCell: UITableViewCell {\n\n @IBOutlet weak var selectedButton: TPCSystemButton! {\n didSet {\n selectedButton.userInteractionEnabled = false\n }\n }\n \n required init?(coder aDecoder: NSCoder) {\n super.init(coder: aDecoder)\n textLabel?.font = TPCConfiguration.settingCellLableFont\n textLabel?.textColor = UIColor.grayColor()\n textLabel?.backgroundColor = UIColor.clearColor()\n selectionStyle = .None\n }\n \n override func awakeFromNib() {\n super.awakeFromNib()\n // Initialization code\n }\n\n override func setSelected(selected: Bool, animated: Bool) {\n super.setSelected(selected, animated: animated)\n\n // Configure the view for the selected state\n }\n\n}\n"} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML+RDFa 1.0//EN\" \"http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\"\n xmlns:rdf=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\"\n xmlns:owl=\"http://www.w3.org/2002/07/owl#\"\n xmlns:rdfs=\"http://www.w3.org/2000/01/rdf-schema#\"\n xmlns:dc=\"http://purl.org/dc/terms/\"\n xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\n xmlns:spdx=\"http://spdx.org/rdf/terms#\">\n\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n <link rel=\"shortcut icon\" href=\"sites/all/themes/cpstandard/favicon.ico\" type=\"image/vnd.microsoft.icon\" />\n\n <title>Creative Commons Attribution Non Commercial No Derivatives 2.5 Generic | Software Package Data Exchange (SPDX)</title>\n\n <link rel=\"shortcut icon\" href=\"sites/all/themes/cpstandard/favicon.ico\" type=\"image/vnd.microsoft.icon\" />\n <link type=\"text/css\" rel=\"stylesheet\" media=\"all\" href=\"sites/all/themes/cpstandard/css/style.css\" />\n <link type=\"text/css\" rel=\"stylesheet\" media=\"all\" href=\"sites/all/themes/cpstandard/css/colors.css\" />\n <link href=\"//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css\" rel=\"stylesheet\" />\n <!-- GOOGLE FONTS -->\n <link href='//fonts.googleapis.com/css?family=Roboto:400,400italic,300,300italic,100italic,100,500,500italic,700,700italic,900,900italic' rel='stylesheet' type='text/css' />\n\n <style type=\"text/css\">\n\n .page {\n color: #58595b;\n }\n\n #header {\n border-bottom: 3px solid #4597cb;\n padding-bottom: 50px;\n }\n\n .breadcrumb {\n margin-top: 25px;\n }\n\n #content-header h1 {\n color: #58595b;\n }\n\n .page h2, h3, h4, h5 {\n color: #4597cb;\n }\n \n .page h1 {\n font-size: 2em;\n }\n\n .page h2 {\n font-size: 1.5em;\n }\n\n a, a:visited, a:hover {\n color: #4597cb;\n }\n\n #footer-copyright {\n margin-top: 25px;\n }\n \n .replacable-license-text {\n color: #CC0000;\n }\n \n .replacable-license-text p var {\n color: #CC0000;\n }\n \n .optional-license-text {\n color: #0000cc;\n }\n \n .optional-license-text p var {\n color: #0000cc;\n }\n ul, ol, li {\n margin: 10px 0 10px 0;\n\t }\n </style>\n\n <script type=\"text/javascript\">\n\n var _gaq = _gaq || [];\n _gaq.push(['_setAccount', 'UA-3676394-2']);\n _gaq.push(['_trackPageview']);\n\n (function() {\n var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;\n ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';\n var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n })();\n\n </script>\n\n </head>\n\n <body typeof=\"spdx:License\">\n\n <div id=\"lf-header\" class=\"collaborative-projects\">\n <div class=\"gray-diagonal\">\n <div class=\"container\">\n <a id=\"collaborative-projects-logo\" href=\"http://collabprojects.linuxfoundation.org\">Linux Foundation Collaborative Projects</a>\n </div>\n </div>\n </div>\n\n <div id=\"header\">\n <div id=\"header-inner\">\n <a href=\"/\" title=\"Home\" rel=\"home\" id=\"logo\">\n <img src=\"https://spdx.org/sites/cpstandard/files/logo_spdx_250.png\" alt=\"Home\" />\n </a>\n \n <div id=\"name-and-slogan\">\n <div id=\"site-name\">\n <h1><a href=\"/\" title=\"Home\" rel=\"home\">Software Package Data Exchange (SPDX)</a></h1>\n </div> \n </div>\n \n </div>\n </div> <!-- /header -->\n\n <div id=\"highlighted\"> \n <div class=\"region region-highlighted\">\n </div>\n </div>\n\n <div id=\"page\" class=\"page\">\n\n <div class=\"breadcrumb\"><a href=\"/\">Home</a> » <a href=\"/licenses\">Licenses</a></div>\n\n <h1 property=\"dc:title\">Creative Commons Attribution Non Commercial No Derivatives 2.5 Generic</h1>\n <div style=\"display:none;\"><code property=\"spdx:deprecated\">false</code></div>\n <h2>Full name</h2>\n <p style=\"margin-left: 20px;\"><code property=\"spdx:name\">Creative Commons Attribution Non Commercial No Derivatives 2.5 Generic</code></p>\n\n <h2>Short identifier</h2>\n <p style=\"margin-left: 20px;\"><code property=\"spdx:licenseId\">CC-BY-NC-ND-2.5</code></p>\n\n <h2>Other web pages for this license</h2>\n <div style=\"margin-left: 20px;\">\n <ul>\n <li><a href=\"https://creativecommons.org/licenses/by-nc-nd/2.5/legalcode\" rel=\"rdfs:seeAlso\">https://creativecommons.org/licenses/by-nc-nd/2.5/legalcode</a></li>\n </ul>\n </div>\n \n <div property=\"spdx:isOsiApproved\" style=\"display: none;\">false</div>\n\n <h2 id=\"notes\">Notes</h2>\n <p style=\"margin-left: 20px;\">None</p>\n\n <h2 id=\"licenseText\">Text</h2>\n\n <div property=\"spdx:licenseText\" class=\"license-text\">\n \n <div class=\"optional-license-text\">\n <p>Creative Commons Attribution-NonCommercial-NoDerivs 2.5</p>\n\n </div>\n <div class=\"optional-license-text\">\n <p>CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS\n LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON\n AN &quot;AS-IS&quot; BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED,\n AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE.</p>\n\n <p>License</p>\n\n </div>\n\n <p>THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE\n (&quot;CCPL&quot; OR &quot;LICENSE&quot;). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE\n LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS\n PROHIBITED.</p>\n\n <p>BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS\n LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH\n TERMS AND CONDITIONS.</p>\n\n \n<ul style=\"list-style:none\">\n<li>\n \n<var class=\"replacable-license-text\">1.</var>\n Definitions\n \n<ul style=\"list-style:none\">\n<li>\n \n<var class=\"replacable-license-text\">a.</var>\n &quot;Collective Work&quot; means a work, such as a periodical issue, anthology or\n encyclopedia, in which the Work in its entirety in unmodified form, along with a number of\n other contributions, constituting separate and independent works in themselves, are\n assembled into a collective whole. A work that constitutes a Collective Work will not be\n considered a Derivative Work (as defined below) for the purposes of this License.\n </li>\n<li>\n \n<var class=\"replacable-license-text\">b.</var>\n &quot;Derivative Work&quot; means a work based upon the Work or upon the Work and other\n pre-existing works, such as a translation, musical arrangement, dramatization,\n fictionalization, motion picture version, sound recording, art reproduction, abridgment,\n condensation, or any other form in which the Work may be recast, transformed, or adapted,\n except that a work that constitutes a Collective Work will not be considered a Derivative\n Work for the purpose of this License. For the avoidance of doubt, where the Work is a\n musical composition or sound recording, the synchronization of the Work in timed-relation\n with a moving image (&quot;synching&quot;) will be considered a Derivative Work for the\n purpose of this License.\n </li>\n<li>\n \n<var class=\"replacable-license-text\">c.</var>\n &quot;Licensor&quot; means the individual or entity that offers the Work under the terms of\n this License.\n </li>\n<li>\n \n<var class=\"replacable-license-text\">d.</var>\n &quot;Original Author&quot; means the individual or entity who created the Work.\n </li>\n<li>\n \n<var class=\"replacable-license-text\">e.</var>\n &quot;Work&quot; means the copyrightable work of authorship offered under the terms of this License.\n </li>\n<li>\n \n<var class=\"replacable-license-text\">f.</var>\n &quot;You&quot; means an individual or entity exercising rights under this License who has\n not previously violated the terms of this License with respect to the Work, or who has\n received express permission from the Licensor to exercise rights under this License\n despite a previous violation.\n </li>\n</ul>\n </li>\n<li>\n \n<var class=\"replacable-license-text\">2.</var>\n Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights\n arising from fair use, first sale or other limitations on the exclusive rights of the\n copyright owner under copyright law or other applicable laws.\n </li>\n<li>\n \n<var class=\"replacable-license-text\">3.</var>\n License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a\n worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable\n copyright) license to exercise the rights in the Work as stated below:\n \n<ul style=\"list-style:none\">\n<li>\n \n<var class=\"replacable-license-text\">a.</var>\n to reproduce the Work, to incorporate the Work into one or more Collective Works, and to\n reproduce the Work as incorporated in the Collective Works;\n </li>\n<li>\n \n<var class=\"replacable-license-text\">b.</var>\n to distribute copies or phonorecords of, display publicly, perform publicly, and perform\n publicly by means of a digital audio transmission the Work including as incorporated in\n Collective Works;\n </li>\n</ul>\n <p>The above rights may be exercised in all media and formats whether now known or hereafter\n devised. The above rights include the right to make such modifications as are technically\n necessary to exercise the rights in other media and formats, but otherwise you have no\n rights to make Derivative Works. All rights not expressly granted by Licensor are hereby\n reserved, including but not limited to the rights set forth in Sections 4(d) and 4(e).</p>\n\n </li>\n<li>\n \n<var class=\"replacable-license-text\">4.</var>\n Restrictions.The license granted in Section 3 above is expressly made subject to and limited by\n the following restrictions:\n \n<ul style=\"list-style:none\">\n<li>\n \n<var class=\"replacable-license-text\">a.</var>\n You may distribute, publicly display, publicly perform, or publicly digitally perform the\n Work only under the terms of this License, and You must include a copy of, or the Uniform\n Resource Identifier for, this License with every copy or phonorecord of the Work You\n distribute, publicly display, publicly perform, or publicly digitally perform. You may not\n offer or impose any terms on the Work that alter or restrict the terms of this License or\n the recipients&apos; exercise of the rights granted hereunder. You may not sublicense the\n Work. You must keep intact all notices that refer to this License and to the disclaimer of\n warranties. You may not distribute, publicly display, publicly perform, or publicly\n digitally perform the Work with any technological measures that control access or use of\n the Work in a manner inconsistent with the terms of this License Agreement. The above\n applies to the Work as incorporated in a Collective Work, but this does not require the\n Collective Work apart from the Work itself to be made subject to the terms of this\n License. If You create a Collective Work, upon notice from any Licensor You must, to the\n extent practicable, remove from the Collective Work any credit as required by clause 4(c),\n as requested.\n </li>\n<li>\n \n<var class=\"replacable-license-text\">b.</var>\n You may not exercise any of the rights granted to You in Section 3 above in any manner that\n is primarily intended for or directed toward commercial advantage or private monetary\n compensation. The exchange of the Work for other copyrighted works by means of digital\n file-sharing or otherwise shall not be considered to be intended for or directed toward\n commercial advantage or private monetary compensation, provided there is no payment of any\n monetary compensation in connection with the exchange of copyrighted works.\n </li>\n<li>\n \n<var class=\"replacable-license-text\">c.</var>\n If you distribute, publicly display, publicly perform, or publicly digitally perform the\n Work, You must keep intact all copyright notices for the Work and provide, reasonable to\n the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym,\n if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate\n another party or parties (e.g. a sponsor institute, publishing entity, journal) for\n attribution in Licensor&apos;s copyright notice, terms of service or by other reasonable\n means, the name of such party or parties; the title of the Work if supplied; and to the\n extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor\n specifies to be associated with the Work, unless such URI does not refer to the copyright\n notice or licensing information for the Work. Such credit may be implemented in any\n reasonable manner; provided, however, that in the case of a Collective Work, at a minimum\n such credit will appear where any other comparable authorship credit appears and in a\n manner at least as prominent as such other comparable authorship credit.\n </li>\n<li>\n \n<var class=\"replacable-license-text\">d.</var>\n For the avoidance of doubt, where the Work is a musical composition:\n \n<ul style=\"list-style:none\">\n<li>\n \n<var class=\"replacable-license-text\">i.</var>\n Performance Royalties Under Blanket Licenses. Licensor reserves the exclusive right to\n collect, whether individually or via a performance rights society (e.g. ASCAP, BMI,\n SESAC), royalties for the public performance or public digital performance (e.g.\n webcast) of the Work if that performance is primarily intended for or directed toward\n commercial advantage or private monetary compensation.\n </li>\n<li>\n \n<var class=\"replacable-license-text\">ii.</var>\n Mechanical Rights and Statutory Royalties. Licensor reserves the exclusive right to\n collect, whether individually or via a music rights agency or designated agent (e.g.\n Harry Fox Agency), royalties for any phonorecord You create from the Work (&quot;cover\n version&quot;) and distribute, subject to the compulsory license created by 17 USC\n Section 115 of the US Copyright Act (or the equivalent in other jurisdictions), if\n Your distribution of such cover version is primarily intended for or directed toward\n commercial advantage or private monetary compensation.\n </li>\n</ul>\n </li>\n<li>\n \n<var class=\"replacable-license-text\">e.</var>\n Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a\n sound recording, Licensor reserves the exclusive right to collect, whether individually or\n via a performance-rights society (e.g. SoundExchange), royalties for the public digital\n performance (e.g. webcast) of the Work, subject to the compulsory license created by 17\n USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions), if\n Your public digital performance is primarily intended for or directed toward commercial\n advantage or private monetary compensation.\n </li>\n</ul>\n </li>\n<li>\n \n<var class=\"replacable-license-text\">5.</var>\n Representations, Warranties and Disclaimer\n <p>UNLESS OTHERWISE MUTUALLY AGREED BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND\n MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED,\n STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,\n FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS,\n ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME\n JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT\n APPLY TO YOU.</p>\n\n </li>\n<li>\n \n<var class=\"replacable-license-text\">6.</var>\n Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL\n LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL,\n PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF\n LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n </li>\n<li>\n \n<var class=\"replacable-license-text\">7.</var>\n Termination\n \n<ul style=\"list-style:none\">\n<li>\n \n<var class=\"replacable-license-text\">a.</var>\n This License and the rights granted hereunder will terminate automatically upon any breach by\n You of the terms of this License. Individuals or entities who have received Collective\n Works from You under this License, however, will not have their licenses terminated\n provided such individuals or entities remain in full compliance with those licenses.\n Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.\n </li>\n<li>\n \n<var class=\"replacable-license-text\">b.</var>\n Subject to the above terms and conditions, the license granted here is perpetual (for the\n duration of the applicable copyright in the Work). Notwithstanding the above, Licensor\n reserves the right to release the Work under different license terms or to stop\n distributing the Work at any time; provided, however that any such election will not serve\n to withdraw this License (or any other license that has been, or is required to be,\n granted under the terms of this License), and this License will continue in full force and\n effect unless terminated as stated above.\n </li>\n</ul>\n </li>\n<li>\n \n<var class=\"replacable-license-text\">8.</var>\n Miscellaneous\n \n<ul style=\"list-style:none\">\n<li>\n \n<var class=\"replacable-license-text\">a.</var>\n Each time You distribute or publicly digitally perform the Work or a Collective Work, the\n Licensor offers to the recipient a license to the Work on the same terms and conditions as\n the license granted to You under this License.\n </li>\n<li>\n \n<var class=\"replacable-license-text\">b.</var>\n If any provision of this License is invalid or unenforceable under applicable law, it shall\n not affect the validity or enforceability of the remainder of the terms of this License,\n and without further action by the parties to this agreement, such provision shall be\n reformed to the minimum extent necessary to make such provision valid and enforceable.\n </li>\n<li>\n \n<var class=\"replacable-license-text\">c.</var>\n No term or provision of this License shall be deemed waived and no breach consented to unless\n such waiver or consent shall be in writing and signed by the party to be charged with such\n waiver or consent.\n </li>\n<li>\n \n<var class=\"replacable-license-text\">d.</var>\n This License constitutes the entire agreement between the parties with respect to the Work\n licensed here. There are no understandings, agreements or representations with respect to\n the Work not specified here. Licensor shall not be bound by any additional provisions that\n may appear in any communication from You. This License may not be modified without the\n mutual written agreement of the Licensor and You.\n </li>\n</ul>\n </li>\n</ul>\n <p>Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the\n Work. Creative Commons will not be liable to You or any party on any legal theory for any damages\n whatsoever, including without limitation any general, special, incidental or consequential damages\n arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative\n Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and\n obligations of Licensor.</p>\n\n <p>Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL,\n neither party will use the trademark &quot;Creative Commons&quot; or any related trademark or logo of\n Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in\n compliance with Creative Commons&apos; then-current trademark usage guidelines, as may be published on\n its website or otherwise made available upon request from time to time.</p>\n\n <p>Creative Commons may be contacted at http://creativecommons.org/.</p>\n\n \n </div>\n\n <h2 id=\"licenseHeader\">Standard License Header</h2>\n <div property=\"spdx:standardLicenseHeader\" class=\"license-text\">\n <p style=\"font-style: italic\">There is no standard license header for the license</p>\n \n </div>\n <div property=\"spdx:standardLicenseTemplate\" style=\"display: none;\">\n &lt;&lt;beginOptional&gt;&gt; Creative Commons Attribution-NonCommercial-NoDerivs 2.5&lt;&lt;endOptional&gt;&gt;&lt;&lt;beginOptional&gt;&gt; CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN &quot;AS-IS&quot; BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE.&#10;&#10;License&lt;&lt;endOptional&gt;&gt;&#10;&#10;THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE (&quot;CCPL&quot; OR &quot;LICENSE&quot;). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.&#10;&#10;BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;1.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; Definitions&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;a.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; &quot;Collective Work&quot; means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License.&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;b.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; &quot;Derivative Work&quot; means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image (&quot;synching&quot;) will be considered a Derivative Work for the purpose of this License.&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;c.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; &quot;Licensor&quot; means the individual or entity that offers the Work under the terms of this License.&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;d.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; &quot;Original Author&quot; means the individual or entity who created the Work.&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;e.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; &quot;Work&quot; means the copyrightable work of authorship offered under the terms of this License.&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;f.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; &quot;You&quot; means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;2.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws.&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;3.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;a.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works;&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;b.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works;&#10;&#10; The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats, but otherwise you have no rights to make Derivative Works. All rights not expressly granted by Licensor are hereby reserved, including but not limited to the rights set forth in Sections 4(d) and 4(e).&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;4.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;a.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(c), as requested.&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;b.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; You may not exercise any of the rights granted to You in Section 3 above in any manner that is primarily intended for or directed toward commercial advantage or private monetary compensation. The exchange of the Work for other copyrighted works by means of digital file-sharing or otherwise shall not be considered to be intended for or directed toward commercial advantage or private monetary compensation, provided there is no payment of any monetary compensation in connection with the exchange of copyrighted works.&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;c.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; If you distribute, publicly display, publicly perform, or publicly digitally perform the Work, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; and to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work. Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit.&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;d.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; For the avoidance of doubt, where the Work is a musical composition:&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;i.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; Performance Royalties Under Blanket Licenses. Licensor reserves the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work if that performance is primarily intended for or directed toward commercial advantage or private monetary compensation.&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;ii.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; Mechanical Rights and Statutory Royalties. Licensor reserves the exclusive right to collect, whether individually or via a music rights agency or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work (&quot;cover version&quot;) and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions), if Your distribution of such cover version is primarily intended for or directed toward commercial advantage or private monetary compensation.&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;e.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor reserves the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions), if Your public digital performance is primarily intended for or directed toward commercial advantage or private monetary compensation.&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;5.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; Representations, Warranties and Disclaimer&#10;&#10; UNLESS OTHERWISE MUTUALLY AGREED BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;6.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;7.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; Termination&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;a.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;b.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;8.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; Miscellaneous&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;a.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;b.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;c.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.&#10;&#10; &lt;&lt;var;name=&quot;bullet&quot;;original=&quot;d.&quot;;match=&quot;.{0,20}&quot;&gt;&gt; This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.&#10;&#10;Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor.&#10;&#10;Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark &quot;Creative Commons&quot; or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time.&#10;&#10;Creative Commons may be contacted at http://creativecommons.org/.\n </div>\n\n </div> <!-- /page -->\n\n <div class=\"collaborative-projects\">\n <div class=\"gray-diagonal\">\n <div class=\"container\">\n <div id=\"footer-copyright\">\n <p>&#169; 2018 SPDX Workgroup a Linux Foundation Project. All Rights Reserved. </p>\n <p>Linux Foundation is a registered trademark of The Linux Foundation. Linux is a registered <a href=\"http://www.linuxfoundation.org/programs/legal/trademark\" title=\"Linux Mark Institute\">trademark</a> of Linus Torvalds.</p>\n <p>Please see our <a href=\"http://www.linuxfoundation.org/privacy\">privacy policy</a> and <a href=\"http://www.linuxfoundation.org/terms\">terms of use</a>.</p>\n </div>\n </div>\n </div>\n </div>\n\n <div id=\"top-page-link\">\n <a href=\"#\"><i class=\"fa fa-arrow-circle-up\"></i><span>top of page</span></a>\n </div>\n\n </body>\n</html>\n"} +{"text": "package org.eclipse.fx.drift.internal;\n\nimport java.nio.ByteBuffer;\nimport java.nio.channels.FileChannel;\n\nimport sun.misc.Unsafe;\n\npublic class MainMemorySharedTexture {\n\n\t\n\tpublic static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\n\t\t\n\t}\n}\n"} +{"text": "#include \"sage3basic.h\"\n#include \"AnalysisAstAnnotator.h\"\n\n#include <iostream>\n\nusing namespace std;\nusing namespace CodeThorn;\n\nAnalysisAstAnnotator::AnalysisAstAnnotator(Labeler* labeler):AstAnnotator(labeler) {\n}\n\nAnalysisAstAnnotator::AnalysisAstAnnotator(Labeler* labeler, VariableIdMapping* variableIdMapping):AstAnnotator(labeler,variableIdMapping) {\n}\n\nvoid AnalysisAstAnnotator::annotateAnalysisPrePostInfoAsComments(SgNode* node, string analysisInfoTypeDescription, DFAnalysisBase* analysis) {\n RoseAst ast(node);\n for(RoseAst::iterator i=ast.begin(); i!=ast.end();++i) {\n if(SgStatement* stmt=dynamic_cast<SgStatement*>(*i)) {\n if(isSgCtorInitializerList(*i)) {\n //std::cerr << \"WARNING: attaching comments to AST nodes of type SgCtorInitializerList not possible. We are skipping this annotation and continue.\"<<std::endl;\n continue;\n }\n // exclude branch/loop statement root nodes because they are not\n // included in the ICFG (instead conditions and blocks are\n // included)\n if(SgNodeHelper::isCondStmt(stmt)) {\n continue;\n }\n ROSE_ASSERT(_labeler);\n //cout << \"@\"<<stmt<<\" \"<<stmt->class_name()<<\" FOUND LABEL: \"<<_labeler->getLabel(stmt)<<endl;\n Label label=_labeler->getLabel(stmt);\n if(label!=Labeler::NO_LABEL && !_labeler->isBlockBeginLabel(label) && !_labeler->isBlockEndLabel(label)) {\n string labelString=_labeler->labelToString(label);\n string preLabelString=labelString;\n string postLabelString=labelString; // default (only different for nodes with 2 or more associated labels)\n string commentStart=\"// \";\n string preInfoString;\n string postInfoString;\n if(!_variableIdMapping) {\n preInfoString=analysis->getPreInfo(label)->toString();\n postInfoString=analysis->getPostInfo(label)->toString();\n } else {\n if(analysis->getLabeler()->isFunctionCallLabel(label)) {\n // special case of function call annotation. Since the\n // function call is represented by two node in the ICFG\n // that are both associated with the AST function call\n // node, the annotation is generated for the call node\n // before the call (pre+post using the preInfoString), and\n // for the callreturn node after the call (pre+post using\n // the postInfoString).\n stringstream ss1;\n preLabelString=_labeler->labelToString(label);\n analysis->getPreInfo(label)->toStream(ss1,_variableIdMapping);\n ss1<<\", \";\n analysis->getPostInfo(label)->toStream(ss1,_variableIdMapping);\n preInfoString=ss1.str();\n Label fcReturnLabel=analysis->getLabeler()->functionCallReturnLabel(stmt);\n labelString+=(\", \"+_labeler->labelToString(fcReturnLabel));\n stringstream ss2;\n postLabelString=_labeler->labelToString(fcReturnLabel);\n analysis->getPreInfo(fcReturnLabel)->toStream(ss2,_variableIdMapping);\n ss2<<\", \";\n analysis->getPostInfo(fcReturnLabel)->toStream(ss2,_variableIdMapping);\n postInfoString=ss2.str();\n } else {\n stringstream ss1;\n analysis->getPreInfo(label)->toStream(ss1,_variableIdMapping);\n preInfoString=ss1.str();\n stringstream ss2;\n analysis->getPostInfo(label)->toStream(ss2,_variableIdMapping);\n postInfoString=ss2.str();\n }\n }\n PreprocessingInfo::RelativePositionType ppInfo1;\n PreprocessingInfo::RelativePositionType ppInfo2;\n if(analysis->isForwardAnalysis()) {\n ppInfo1=PreprocessingInfo::before;\n ppInfo2=PreprocessingInfo::after;\n } else {\n ppInfo1=PreprocessingInfo::after;\n ppInfo2=PreprocessingInfo::before;\n }\n string commentString;\n bool isFunCall=analysis->getLabeler()->isFunctionCallLabel(label);\n insertComment(commentStart+preLabelString+\" \"+analysisInfoTypeDescription+\"-\"+(isFunCall?\"in/out\":\"in \")+\": \"+preInfoString,ppInfo1,stmt);\n\n // TODO: workaround for ROSE's wrong comment unparsing of \"case x:\" (unparses after the block, not right after the case)\n if(!isSgCaseOptionStmt(stmt)&&!isSgDefaultOptionStmt(stmt)) {\n insertComment(commentStart+postLabelString+\" \"+analysisInfoTypeDescription+\"-\"+(isFunCall?\"in/out\":\"out \")+\": \"+postInfoString,ppInfo2,stmt);\n }\n\n }\n }\n }\n}\n"} +{"text": "/*\n * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)\n * All rights reserved.\n *\n * This software may be modified and distributed under the terms of the\n * BSD-3-Clause license. See the accompanying LICENSE file for details.\n */\n\n// This is an automatically generated file.\n\n#ifndef YARP_ROSMSG_deprecated2_tf2_msgs_FrameGraphReply_h\n#define YARP_ROSMSG_deprecated2_tf2_msgs_FrameGraphReply_h\n\n#include <yarp/conf/system.h>\n\nYARP_COMPILER_DEPRECATED_WARNING(<tf2_msgs/FrameGraphReply.h> header is deprecated. Use <yarp/rosmsg/tf2_msgs/FrameGraphReply.h> instead)\n\n#include <yarp/rosmsg/tf2_msgs/FrameGraphReply.h>\n#include <tf2_msgs_FrameGraphReply.h>\n#include <yarp/conf/api.h>\n\nnamespace tf2_msgs {\n\nYARP_DEPRECATED typedef yarp::rosmsg::tf2_msgs::FrameGraphReply FrameGraphReply;\n\n} // namespace tf2_msgs\n\n#endif // YARP_ROSMSG_deprecated2_tf2_msgs_FrameGraphReply_h\n"} +{"text": "<?xml version=\"1.0\" encoding=\"ascii\"?>\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n \"DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\n<head>\n <title>lxml.html.diff.tag_token</title>\n <link rel=\"stylesheet\" href=\"epydoc.css\" type=\"text/css\" />\n <script type=\"text/javascript\" src=\"epydoc.js\"></script>\n</head>\n\n<body bgcolor=\"white\" text=\"black\" link=\"blue\" vlink=\"#204080\"\n alink=\"#204080\">\n<!-- ==================== NAVIGATION BAR ==================== -->\n<table class=\"navbar\" border=\"0\" width=\"100%\" cellpadding=\"0\"\n bgcolor=\"#a0c0ff\" cellspacing=\"0\">\n <tr valign=\"middle\">\n <!-- Home link -->\n <th>&nbsp;&nbsp;&nbsp;<a\n href=\"lxml-module.html\">Home</a>&nbsp;&nbsp;&nbsp;</th>\n\n <!-- Tree link -->\n <th>&nbsp;&nbsp;&nbsp;<a\n href=\"module-tree.html\">Trees</a>&nbsp;&nbsp;&nbsp;</th>\n\n <!-- Index link -->\n <th>&nbsp;&nbsp;&nbsp;<a\n href=\"identifier-index.html\">Indices</a>&nbsp;&nbsp;&nbsp;</th>\n\n <!-- Help link -->\n <th>&nbsp;&nbsp;&nbsp;<a\n href=\"help.html\">Help</a>&nbsp;&nbsp;&nbsp;</th>\n\n <!-- Project homepage -->\n <th class=\"navbar\" align=\"right\" width=\"100%\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n <tr><th class=\"navbar\" align=\"center\"\n ><a class=\"navbar\" target=\"_top\" href=\"/\">lxml API</a></th>\n </tr></table></th>\n </tr>\n</table>\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">\n <tr valign=\"top\">\n <td width=\"100%\">\n <span class=\"breadcrumbs\">\n <a href=\"lxml-module.html\">Package&nbsp;lxml</a> ::\n <a href=\"lxml.html-module.html\">Package&nbsp;html</a> ::\n <a href=\"lxml.html.diff-module.html\">Module&nbsp;diff</a> ::\n Class&nbsp;tag_token\n </span>\n </td>\n <td>\n <table cellpadding=\"0\" cellspacing=\"0\">\n <!-- hide/show private -->\n <tr><td align=\"right\"><span class=\"options\">[<a href=\"javascript:void(0);\" class=\"privatelink\"\n onclick=\"toggle_private();\">hide&nbsp;private</a>]</span></td></tr>\n <tr><td align=\"right\"><span class=\"options\"\n >[<a href=\"frames.html\" target=\"_top\">frames</a\n >]&nbsp;|&nbsp;<a href=\"lxml.html.diff.tag_token-class.html\"\n target=\"_top\">no&nbsp;frames</a>]</span></td></tr>\n </table>\n </td>\n </tr>\n</table>\n<!-- ==================== CLASS DESCRIPTION ==================== -->\n<h1 class=\"epydoc\">Class tag_token</h1><p class=\"nomargin-top\"><span class=\"codelink\"><a href=\"lxml.html.diff-pysrc.html#tag_token\">source&nbsp;code</a></span></p>\n<pre class=\"base-tree\">\nobject --+ \n | \nbasestring --+ \n | \n unicode --+ \n | \n <a href=\"lxml.html.diff.token-class.html\" onclick=\"show_private();\">token</a> --+\n |\n <strong class=\"uidshort\">tag_token</strong>\n</pre>\n\n<hr />\nRepresents a token that is actually a tag. Currently this is just\nthe &lt;img&gt; tag, which takes up visible space just like a word but\nis only represented in a document by a tag.\n\n<!-- ==================== INSTANCE METHODS ==================== -->\n<a name=\"section-InstanceMethods\"></a>\n<table class=\"summary\" border=\"1\" cellpadding=\"3\"\n cellspacing=\"0\" width=\"100%\" bgcolor=\"white\">\n<tr bgcolor=\"#70b0f0\" class=\"table-header\">\n <td colspan=\"2\" class=\"table-header\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n <tr valign=\"top\">\n <td align=\"left\"><span class=\"table-header\">Instance Methods</span></td>\n <td align=\"right\" valign=\"top\"\n ><span class=\"options\">[<a href=\"#section-InstanceMethods\"\n class=\"privatelink\" onclick=\"toggle_private();\"\n >hide private</a>]</span></td>\n </tr>\n </table>\n </td>\n</tr>\n<tr>\n <td width=\"15%\" align=\"right\" valign=\"top\" class=\"summary\">\n <span class=\"summary-type\">&nbsp;</span>\n </td><td class=\"summary\">\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr>\n <td><span class=\"summary-sig\"><a href=\"lxml.html.diff.tag_token-class.html#__repr__\" class=\"summary-sig-name\">__repr__</a>(<span class=\"summary-sig-arg\">self</span>)</span><br />\n repr(x)</td>\n <td align=\"right\" valign=\"top\">\n <span class=\"codelink\"><a href=\"lxml.html.diff-pysrc.html#tag_token.__repr__\">source&nbsp;code</a></span>\n \n </td>\n </tr>\n </table>\n \n </td>\n </tr>\n<tr>\n <td width=\"15%\" align=\"right\" valign=\"top\" class=\"summary\">\n <span class=\"summary-type\">&nbsp;</span>\n </td><td class=\"summary\">\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr>\n <td><span class=\"summary-sig\"><a href=\"lxml.html.diff.tag_token-class.html#html\" class=\"summary-sig-name\">html</a>(<span class=\"summary-sig-arg\">self</span>)</span></td>\n <td align=\"right\" valign=\"top\">\n <span class=\"codelink\"><a href=\"lxml.html.diff-pysrc.html#tag_token.html\">source&nbsp;code</a></span>\n \n </td>\n </tr>\n </table>\n \n </td>\n </tr>\n <tr>\n <td colspan=\"2\" class=\"summary\">\n <p class=\"indent-wrapped-lines\"><b>Inherited from <code>unicode</code></b>:\n <code>__add__</code>,\n <code>__contains__</code>,\n <code>__eq__</code>,\n <code>__format__</code>,\n <code>__ge__</code>,\n <code>__getattribute__</code>,\n <code>__getitem__</code>,\n <code>__getnewargs__</code>,\n <code>__getslice__</code>,\n <code>__gt__</code>,\n <code>__hash__</code>,\n <code>__le__</code>,\n <code>__len__</code>,\n <code>__lt__</code>,\n <code>__mod__</code>,\n <code>__mul__</code>,\n <code>__ne__</code>,\n <code>__rmod__</code>,\n <code>__rmul__</code>,\n <code>__sizeof__</code>,\n <code>__str__</code>,\n <code>capitalize</code>,\n <code>center</code>,\n <code>count</code>,\n <code>decode</code>,\n <code>encode</code>,\n <code>endswith</code>,\n <code>expandtabs</code>,\n <code>find</code>,\n <code>format</code>,\n <code>index</code>,\n <code>isalnum</code>,\n <code>isalpha</code>,\n <code>isdecimal</code>,\n <code>isdigit</code>,\n <code>islower</code>,\n <code>isnumeric</code>,\n <code>isspace</code>,\n <code>istitle</code>,\n <code>isupper</code>,\n <code>join</code>,\n <code>ljust</code>,\n <code>lower</code>,\n <code>lstrip</code>,\n <code>partition</code>,\n <code>replace</code>,\n <code>rfind</code>,\n <code>rindex</code>,\n <code>rjust</code>,\n <code>rpartition</code>,\n <code>rsplit</code>,\n <code>rstrip</code>,\n <code>split</code>,\n <code>splitlines</code>,\n <code>startswith</code>,\n <code>strip</code>,\n <code>swapcase</code>,\n <code>title</code>,\n <code>translate</code>,\n <code>upper</code>,\n <code>zfill</code>\n </p>\n <div class=\"private\"> <p class=\"indent-wrapped-lines\"><b>Inherited from <code>unicode</code></b> (private):\n <code>_formatter_field_name_split</code>,\n <code>_formatter_parser</code>\n </p></div>\n <p class=\"indent-wrapped-lines\"><b>Inherited from <code>object</code></b>:\n <code>__delattr__</code>,\n <code>__init__</code>,\n <code>__reduce__</code>,\n <code>__reduce_ex__</code>,\n <code>__setattr__</code>,\n <code>__subclasshook__</code>\n </p>\n </td>\n </tr>\n</table>\n<!-- ==================== STATIC METHODS ==================== -->\n<a name=\"section-StaticMethods\"></a>\n<table class=\"summary\" border=\"1\" cellpadding=\"3\"\n cellspacing=\"0\" width=\"100%\" bgcolor=\"white\">\n<tr bgcolor=\"#70b0f0\" class=\"table-header\">\n <td colspan=\"2\" class=\"table-header\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n <tr valign=\"top\">\n <td align=\"left\"><span class=\"table-header\">Static Methods</span></td>\n <td align=\"right\" valign=\"top\"\n ><span class=\"options\">[<a href=\"#section-StaticMethods\"\n class=\"privatelink\" onclick=\"toggle_private();\"\n >hide private</a>]</span></td>\n </tr>\n </table>\n </td>\n</tr>\n<tr>\n <td width=\"15%\" align=\"right\" valign=\"top\" class=\"summary\">\n <span class=\"summary-type\">a new object with type S, a subtype of T</span>\n </td><td class=\"summary\">\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr>\n <td><span class=\"summary-sig\"><a href=\"lxml.html.diff.tag_token-class.html#__new__\" class=\"summary-sig-name\">__new__</a>(<span class=\"summary-sig-arg\">cls</span>,\n <span class=\"summary-sig-arg\">tag</span>,\n <span class=\"summary-sig-arg\">data</span>,\n <span class=\"summary-sig-arg\">html_repr</span>,\n <span class=\"summary-sig-arg\">pre_tags</span>=<span class=\"summary-sig-default\">None</span>,\n <span class=\"summary-sig-arg\">post_tags</span>=<span class=\"summary-sig-default\">None</span>,\n <span class=\"summary-sig-arg\">trailing_whitespace</span>=<span class=\"summary-sig-default\"><code class=\"variable-quote\">'</code><code class=\"variable-string\"></code><code class=\"variable-quote\">'</code></span>)</span></td>\n <td align=\"right\" valign=\"top\">\n <span class=\"codelink\"><a href=\"lxml.html.diff-pysrc.html#tag_token.__new__\">source&nbsp;code</a></span>\n \n </td>\n </tr>\n </table>\n \n </td>\n </tr>\n</table>\n<!-- ==================== CLASS VARIABLES ==================== -->\n<a name=\"section-ClassVariables\"></a>\n<table class=\"summary\" border=\"1\" cellpadding=\"3\"\n cellspacing=\"0\" width=\"100%\" bgcolor=\"white\">\n<tr bgcolor=\"#70b0f0\" class=\"table-header\">\n <td colspan=\"2\" class=\"table-header\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n <tr valign=\"top\">\n <td align=\"left\"><span class=\"table-header\">Class Variables</span></td>\n <td align=\"right\" valign=\"top\"\n ><span class=\"options\">[<a href=\"#section-ClassVariables\"\n class=\"privatelink\" onclick=\"toggle_private();\"\n >hide private</a>]</span></td>\n </tr>\n </table>\n </td>\n</tr>\n <tr>\n <td colspan=\"2\" class=\"summary\">\n <p class=\"indent-wrapped-lines\"><b>Inherited from <code><a href=\"lxml.html.diff.token-class.html\" onclick=\"show_private();\">token</a></code></b>:\n <code><a href=\"lxml.html.diff.token-class.html#hide_when_equal\">hide_when_equal</a></code>\n </p>\n </td>\n </tr>\n</table>\n<!-- ==================== PROPERTIES ==================== -->\n<a name=\"section-Properties\"></a>\n<table class=\"summary\" border=\"1\" cellpadding=\"3\"\n cellspacing=\"0\" width=\"100%\" bgcolor=\"white\">\n<tr bgcolor=\"#70b0f0\" class=\"table-header\">\n <td colspan=\"2\" class=\"table-header\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n <tr valign=\"top\">\n <td align=\"left\"><span class=\"table-header\">Properties</span></td>\n <td align=\"right\" valign=\"top\"\n ><span class=\"options\">[<a href=\"#section-Properties\"\n class=\"privatelink\" onclick=\"toggle_private();\"\n >hide private</a>]</span></td>\n </tr>\n </table>\n </td>\n</tr>\n <tr>\n <td colspan=\"2\" class=\"summary\">\n <p class=\"indent-wrapped-lines\"><b>Inherited from <code>object</code></b>:\n <code>__class__</code>\n </p>\n </td>\n </tr>\n</table>\n<!-- ==================== METHOD DETAILS ==================== -->\n<a name=\"section-MethodDetails\"></a>\n<table class=\"details\" border=\"1\" cellpadding=\"3\"\n cellspacing=\"0\" width=\"100%\" bgcolor=\"white\">\n<tr bgcolor=\"#70b0f0\" class=\"table-header\">\n <td colspan=\"2\" class=\"table-header\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n <tr valign=\"top\">\n <td align=\"left\"><span class=\"table-header\">Method Details</span></td>\n <td align=\"right\" valign=\"top\"\n ><span class=\"options\">[<a href=\"#section-MethodDetails\"\n class=\"privatelink\" onclick=\"toggle_private();\"\n >hide private</a>]</span></td>\n </tr>\n </table>\n </td>\n</tr>\n</table>\n<a name=\"__new__\"></a>\n<div>\n<table class=\"details\" border=\"1\" cellpadding=\"3\"\n cellspacing=\"0\" width=\"100%\" bgcolor=\"white\">\n<tr><td>\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr valign=\"top\"><td>\n <h3 class=\"epydoc\"><span class=\"sig\"><span class=\"sig-name\">__new__</span>(<span class=\"sig-arg\">cls</span>,\n <span class=\"sig-arg\">tag</span>,\n <span class=\"sig-arg\">data</span>,\n <span class=\"sig-arg\">html_repr</span>,\n <span class=\"sig-arg\">pre_tags</span>=<span class=\"sig-default\">None</span>,\n <span class=\"sig-arg\">post_tags</span>=<span class=\"sig-default\">None</span>,\n <span class=\"sig-arg\">trailing_whitespace</span>=<span class=\"sig-default\"><code class=\"variable-quote\">'</code><code class=\"variable-string\"></code><code class=\"variable-quote\">'</code></span>)</span>\n <br /><em class=\"fname\">Static Method</em>\n </h3>\n </td><td align=\"right\" valign=\"top\"\n ><span class=\"codelink\"><a href=\"lxml.html.diff-pysrc.html#tag_token.__new__\">source&nbsp;code</a></span>&nbsp;\n </td>\n </tr></table>\n \n \n <dl class=\"fields\">\n <dt>Returns: a new object with type S, a subtype of T</dt>\n <dt>Overrides:\n object.__new__\n <dd><em class=\"note\">(inherited documentation)</em></dd>\n </dt>\n </dl>\n</td></tr></table>\n</div>\n<a name=\"__repr__\"></a>\n<div>\n<table class=\"details\" border=\"1\" cellpadding=\"3\"\n cellspacing=\"0\" width=\"100%\" bgcolor=\"white\">\n<tr><td>\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr valign=\"top\"><td>\n <h3 class=\"epydoc\"><span class=\"sig\"><span class=\"sig-name\">__repr__</span>(<span class=\"sig-arg\">self</span>)</span>\n <br /><em class=\"fname\">(Representation operator)</em>\n </h3>\n </td><td align=\"right\" valign=\"top\"\n ><span class=\"codelink\"><a href=\"lxml.html.diff-pysrc.html#tag_token.__repr__\">source&nbsp;code</a></span>&nbsp;\n </td>\n </tr></table>\n \n repr(x)\n <dl class=\"fields\">\n <dt>Overrides:\n object.__repr__\n <dd><em class=\"note\">(inherited documentation)</em></dd>\n </dt>\n </dl>\n</td></tr></table>\n</div>\n<a name=\"html\"></a>\n<div>\n<table class=\"details\" border=\"1\" cellpadding=\"3\"\n cellspacing=\"0\" width=\"100%\" bgcolor=\"white\">\n<tr><td>\n <table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n <tr valign=\"top\"><td>\n <h3 class=\"epydoc\"><span class=\"sig\"><span class=\"sig-name\">html</span>(<span class=\"sig-arg\">self</span>)</span>\n </h3>\n </td><td align=\"right\" valign=\"top\"\n ><span class=\"codelink\"><a href=\"lxml.html.diff-pysrc.html#tag_token.html\">source&nbsp;code</a></span>&nbsp;\n </td>\n </tr></table>\n \n \n <dl class=\"fields\">\n <dt>Overrides:\n <a href=\"lxml.html.diff.token-class.html#html\">token.html</a>\n </dt>\n </dl>\n</td></tr></table>\n</div>\n<br />\n<!-- ==================== NAVIGATION BAR ==================== -->\n<table class=\"navbar\" border=\"0\" width=\"100%\" cellpadding=\"0\"\n bgcolor=\"#a0c0ff\" cellspacing=\"0\">\n <tr valign=\"middle\">\n <!-- Home link -->\n <th>&nbsp;&nbsp;&nbsp;<a\n href=\"lxml-module.html\">Home</a>&nbsp;&nbsp;&nbsp;</th>\n\n <!-- Tree link -->\n <th>&nbsp;&nbsp;&nbsp;<a\n href=\"module-tree.html\">Trees</a>&nbsp;&nbsp;&nbsp;</th>\n\n <!-- Index link -->\n <th>&nbsp;&nbsp;&nbsp;<a\n href=\"identifier-index.html\">Indices</a>&nbsp;&nbsp;&nbsp;</th>\n\n <!-- Help link -->\n <th>&nbsp;&nbsp;&nbsp;<a\n href=\"help.html\">Help</a>&nbsp;&nbsp;&nbsp;</th>\n\n <!-- Project homepage -->\n <th class=\"navbar\" align=\"right\" width=\"100%\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n <tr><th class=\"navbar\" align=\"center\"\n ><a class=\"navbar\" target=\"_top\" href=\"/\">lxml API</a></th>\n </tr></table></th>\n </tr>\n</table>\n<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%%\">\n <tr>\n <td align=\"left\" class=\"footer\">\n Generated by Epydoc 3.0.1 on Thu Aug 28 16:41:20 2014\n </td>\n <td align=\"right\" class=\"footer\">\n <a target=\"mainFrame\" href=\"http://epydoc.sourceforge.net\"\n >http://epydoc.sourceforge.net</a>\n </td>\n </tr>\n</table>\n\n<script type=\"text/javascript\">\n <!--\n // Private objects are initially displayed (because if\n // javascript is turned off then we want them to be\n // visible); but by default, we want to hide them. So hide\n // them unless we have a cookie that says to show them.\n checkCookie();\n // -->\n</script>\n</body>\n</html>\n"} +{"text": "// Python Tools for Visual Studio\n// Copyright(c) Microsoft Corporation\n// All rights reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the License); you may not use\n// this file except in compliance with the License. You may obtain a copy of the\n// License at http://www.apache.org/licenses/LICENSE-2.0\n//\n// THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS\n// OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY\n// IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\n// MERCHANTABILITY OR NON-INFRINGEMENT.\n//\n// See the Apache Version 2.0 License for specific language governing\n// permissions and limitations under the License.\n\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.IO;\nusing System.Linq;\nusing System.Text.RegularExpressions;\nusing System.Threading;\nusing System.Threading.Tasks;\nusing Microsoft.PythonTools.Analysis;\nusing Microsoft.PythonTools.Infrastructure;\nusing Newtonsoft.Json;\nusing Newtonsoft.Json.Linq;\n\nnamespace Microsoft.PythonTools.Interpreter {\n sealed class PipPackageManager : IPackageManager, IDisposable {\n private IPythonInterpreterFactory _factory;\n private PipPackageCache _cache;\n private readonly List<PackageSpec> _packages;\n private CancellationTokenSource _currentRefresh;\n private bool _isReady, _everCached;\n\n private List<FileSystemWatcher> _libWatchers;\n private Timer _refreshIsCurrentTrigger;\n\n private readonly PipPackageManagerCommands _commands;\n private readonly ICondaLocatorProvider _condaLocatorProvider;\n internal readonly SemaphoreSlim _working = new SemaphoreSlim(1);\n\n private bool _pipListHasFormatOption;\n private int _suppressCount;\n private bool _isDisposed;\n\n // Prevent too many concurrent executions to avoid exhausting disk IO\n private static readonly SemaphoreSlim _concurrencyLock = new SemaphoreSlim(4);\n\n private static readonly KeyValuePair<string, string>[] UnbufferedEnv = new[] {\n new KeyValuePair<string, string>(\"PYTHONUNBUFFERED\", \"1\")\n };\n\n private static readonly Regex PackageNameRegex = new Regex(\n \"^(?!__pycache__)(?<name>[a-z0-9_]+)(-.+)?\",\n RegexOptions.Compiled | RegexOptions.CultureInvariant | RegexOptions.IgnoreCase);\n\n public PipPackageManager(\n IPythonInterpreterFactory factory,\n PipPackageManagerCommands commands,\n int priority,\n ICondaLocatorProvider condaLocatorProvider\n ) {\n _packages = new List<PackageSpec>();\n _pipListHasFormatOption = true;\n\n if (factory == null) {\n throw new ArgumentNullException(nameof(factory));\n }\n if (!File.Exists(factory.Configuration?.InterpreterPath)) {\n throw new NotSupportedException();\n }\n\n _factory = factory;\n _commands = commands ?? new PipPackageManagerCommands();\n Priority = priority;\n _condaLocatorProvider = condaLocatorProvider;\n _cache = PipPackageCache.GetCache();\n }\n\n public string UniqueKey => \"pip\";\n public int Priority { get; }\n\n public IPythonInterpreterFactory Factory => _factory;\n\n public void Dispose() {\n if (_isDisposed) {\n return;\n }\n _isDisposed = true;\n\n DisableNotifications();\n _working.Dispose();\n }\n\n private void AbortOnInvalidConfiguration() {\n if (_factory == null || _factory.Configuration == null ||\n string.IsNullOrEmpty(_factory.Configuration.InterpreterPath)) {\n throw new InvalidOperationException(Strings.MisconfiguredEnvironment);\n }\n }\n\n private async Task AbortIfNotReady(CancellationToken cancellationToken) {\n if (!IsReady) {\n await UpdateIsReadyAsync(false, cancellationToken);\n if (!IsReady) {\n throw new InvalidOperationException(Strings.MisconfiguredPip.FormatUI((_factory?.Configuration as VisualStudioInterpreterConfiguration)?.PrefixPath ?? \"<null>\"));\n }\n }\n }\n\n private async Task<KeyValuePair<string, string>[]> GetEnvironmentVariables() {\n var prefixPath = _factory.Configuration.GetPrefixPath();\n if (_condaLocatorProvider != null && Directory.Exists(prefixPath) && CondaUtils.IsCondaEnvironment(prefixPath)) {\n var rootConda = _condaLocatorProvider.FindLocator()?.CondaExecutablePath;\n if (File.Exists(rootConda)) {\n var env = await CondaUtils.GetActivationEnvironmentVariablesForPrefixAsync(rootConda, prefixPath);\n return env.Union(UnbufferedEnv).ToArray();\n } else {\n // Normally, the root is required for this environment to have been discovered,\n // but it could be that the user added this as a custom environment and then\n // uninstalled the root. When that's the case, there is no way to activate,\n // so proceed without activation env variables.\n return UnbufferedEnv;\n }\n } else {\n // Not a conda environment, no activation necessary.\n return UnbufferedEnv;\n }\n }\n\n private Task<bool> ShouldElevate(IPackageManagerUI ui, string operation) {\n return ui == null ? Task.FromResult(false) : ui.ShouldElevateAsync(this, operation);\n }\n\n public bool IsReady {\n get {\n return _isReady;\n }\n private set {\n if (_isReady != value) {\n _isReady = value;\n IsReadyChanged?.Invoke(this, EventArgs.Empty);\n }\n }\n }\n public event EventHandler IsReadyChanged;\n\n private async Task UpdateIsReadyAsync(bool alreadyHasLock, CancellationToken cancellationToken) {\n IDisposable workingLock = null;\n if (!alreadyHasLock) {\n try {\n workingLock = await _working.LockAsync(cancellationToken);\n } catch (ObjectDisposedException ex) {\n throw new OperationCanceledException(\"Package manager has already closed\", ex);\n }\n }\n try {\n var envVars = await GetEnvironmentVariables();\n\n using (var proc = ProcessOutput.Run(\n _factory.Configuration.InterpreterPath,\n _commands.CheckIsReady(),\n _factory.Configuration.GetPrefixPath(),\n envVars,\n false,\n null\n )) {\n try {\n IsReady = (await proc == 0);\n } catch (OperationCanceledException) {\n IsReady = false;\n return;\n }\n }\n } finally {\n workingLock?.Dispose();\n }\n }\n\n public async Task PrepareAsync(IPackageManagerUI ui, CancellationToken cancellationToken) {\n if (IsReady) {\n return;\n }\n\n AbortOnInvalidConfiguration();\n\n await UpdateIsReadyAsync(false, cancellationToken);\n if (IsReady) {\n return;\n }\n\n var operation = \"pip_downloader.py\";\n using (await _working.LockAsync(cancellationToken)) {\n ui?.OnOperationStarted(this, operation);\n ui?.OnOutputTextReceived(this, Strings.InstallingPipStarted);\n\n var envVars = await GetEnvironmentVariables();\n\n using (var proc = ProcessOutput.Run(\n _factory.Configuration.InterpreterPath,\n _commands.Prepare(),\n _factory.Configuration.GetPrefixPath(),\n envVars,\n false,\n PackageManagerUIRedirector.Get(this, ui),\n elevate: await ShouldElevate(ui, operation)\n )) {\n try {\n IsReady = (await proc == 0);\n } catch (OperationCanceledException) {\n IsReady = false;\n }\n }\n\n ui?.OnOutputTextReceived(this, IsReady ? Strings.InstallingPipSuccess : Strings.InstallingPackageFailed);\n ui?.OnOperationFinished(this, operation, IsReady);\n }\n }\n\n public async Task<bool> ExecuteAsync(string arguments, IPackageManagerUI ui, CancellationToken cancellationToken) {\n AbortOnInvalidConfiguration();\n await AbortIfNotReady(cancellationToken);\n\n using (await _working.LockAsync(cancellationToken)) {\n bool success = false;\n\n var args = string.Join(\" \", _commands.Base().Select(ProcessOutput.QuoteSingleArgument)) + \" \" + arguments;\n var operation = args.Trim();\n ui?.OnOutputTextReceived(this, operation);\n ui?.OnOperationStarted(this, Strings.ExecutingCommandStarted.FormatUI(arguments));\n\n var envVars = await GetEnvironmentVariables();\n\n try {\n using (var output = ProcessOutput.Run(\n _factory.Configuration.InterpreterPath,\n new[] { args.Trim() },\n _factory.Configuration.GetPrefixPath(),\n envVars,\n false,\n PackageManagerUIRedirector.Get(this, ui),\n quoteArgs: false,\n elevate: await ShouldElevate(ui, operation)\n )) {\n if (!output.IsStarted) {\n return false;\n }\n var exitCode = await output;\n success = exitCode == 0;\n }\n return success;\n } catch (IOException) {\n return false;\n } finally {\n if (!success) {\n // Check whether we failed because pip is missing\n UpdateIsReadyAsync(true, CancellationToken.None).DoNotWait();\n }\n\n var msg = success ? Strings.ExecutingCommandSucceeded : Strings.ExecutingCommandFailed;\n ui?.OnOutputTextReceived(this, msg.FormatUI(arguments));\n ui?.OnOperationFinished(this, operation, success);\n await CacheInstalledPackagesAsync(true, false, cancellationToken);\n }\n }\n }\n\n public async Task<bool> InstallAsync(PackageSpec package, IPackageManagerUI ui, CancellationToken cancellationToken) {\n AbortOnInvalidConfiguration();\n await AbortIfNotReady(cancellationToken);\n\n bool success = false;\n\n var args = _commands.Install(package.FullSpec).ToArray();\n var operation = string.Join(\" \", args);\n var name = string.IsNullOrEmpty(package.Name) ? package.FullSpec : package.Name;\n\n using (await _working.LockAsync(cancellationToken)) {\n ui?.OnOperationStarted(this, operation);\n ui?.OnOutputTextReceived(this, Strings.InstallingPackageStarted.FormatUI(name));\n\n var envVars = await GetEnvironmentVariables();\n\n try {\n using (var output = ProcessOutput.Run(\n _factory.Configuration.InterpreterPath,\n args,\n _factory.Configuration.GetPrefixPath(),\n envVars,\n false,\n PackageManagerUIRedirector.Get(this, ui),\n quoteArgs: false,\n elevate: await ShouldElevate(ui, operation)\n )) {\n if (!output.IsStarted) {\n return false;\n }\n var exitCode = await output;\n success = exitCode == 0;\n }\n return success;\n } catch (IOException) {\n return false;\n } finally {\n if (!success) {\n // Check whether we failed because pip is missing\n UpdateIsReadyAsync(true, CancellationToken.None).DoNotWait();\n }\n\n var msg = success ? Strings.InstallingPackageSuccess : Strings.InstallingPackageFailed;\n ui?.OnOutputTextReceived(this, msg.FormatUI(name));\n ui?.OnOperationFinished(this, operation, success);\n await CacheInstalledPackagesAsync(true, false, cancellationToken);\n }\n }\n }\n\n public async Task<bool> UninstallAsync(PackageSpec package, IPackageManagerUI ui, CancellationToken cancellationToken) {\n AbortOnInvalidConfiguration();\n await AbortIfNotReady(cancellationToken);\n\n bool success = false;\n var args = _commands.Uninstall(package.FullSpec).ToArray();\n var operation = string.Join(\" \", args);\n var name = string.IsNullOrEmpty(package.Name) ? package.FullSpec : package.Name;\n\n try {\n using (await _working.LockAsync(cancellationToken)) {\n ui?.OnOperationStarted(this, operation);\n ui?.OnOutputTextReceived(this, Strings.UninstallingPackageStarted.FormatUI(name));\n\n var envVars = await GetEnvironmentVariables();\n\n using (var output = ProcessOutput.Run(\n _factory.Configuration.InterpreterPath,\n args,\n _factory.Configuration.GetPrefixPath(),\n envVars,\n false,\n PackageManagerUIRedirector.Get(this, ui),\n elevate: await ShouldElevate(ui, operation)\n )) {\n if (!output.IsStarted) {\n // The finally block handles output\n return false;\n }\n var exitCode = await output;\n success = exitCode == 0;\n }\n return success;\n }\n } catch (IOException) {\n return false;\n } finally {\n if (!success) {\n // Check whether we failed because pip is missing\n UpdateIsReadyAsync(false, CancellationToken.None).DoNotWait();\n }\n\n if (IsReady) {\n await CacheInstalledPackagesAsync(false, false, cancellationToken);\n if (!success) {\n // Double check whether the package has actually\n // been uninstalled, to avoid reporting errors \n // where, for all practical purposes, there is no\n // error.\n if (!(await GetInstalledPackageAsync(package, cancellationToken)).IsValid) {\n success = true;\n }\n }\n }\n\n var msg = success ? Strings.UninstallingPackageSuccess : Strings.UninstallingPackageFailed;\n ui?.OnOutputTextReceived(this, msg.FormatUI(name));\n ui?.OnOperationFinished(this, operation, success);\n }\n }\n\n public event EventHandler InstalledPackagesChanged;\n public event EventHandler InstalledFilesChanged;\n\n private bool SupportsDashMPip => _factory.Configuration.Version > new Version(2, 7);\n\n public string ExtensionDisplayName => Strings.PipExtensionDisplayName;\n\n public string IndexDisplayName => Strings.PipDefaultIndexName;\n\n public string SearchHelpText => Strings.PipExtensionSearchPyPILabel;\n\n public string GetInstallCommandDisplayName(string searchQuery) {\n if (string.IsNullOrEmpty(searchQuery)) {\n return string.Empty;\n }\n\n return Strings.PipExtensionPipInstallFrom.FormatUI(searchQuery);\n }\n\n public bool CanUninstall(PackageSpec package) {\n return true;\n }\n\n private async Task CacheInstalledPackagesAsync(\n bool alreadyHasLock,\n bool alreadyHasConcurrencyLock,\n CancellationToken cancellationToken\n ) {\n if (!IsReady) {\n await UpdateIsReadyAsync(alreadyHasLock, cancellationToken);\n if (!IsReady) {\n return;\n }\n }\n\n List<PackageSpec> packages = null;\n\n var workingLock = alreadyHasLock ? null : await _working.LockAsync(cancellationToken);\n try {\n var args = _pipListHasFormatOption ? _commands.ListJson() : _commands.List();\n\n var concurrencyLock = alreadyHasConcurrencyLock ? null : await _concurrencyLock.LockAsync(cancellationToken);\n try {\n var envVars = await GetEnvironmentVariables();\n\n using (var proc = ProcessOutput.Run(\n _factory.Configuration.InterpreterPath,\n args,\n _factory.Configuration.GetPrefixPath(),\n envVars,\n false,\n null\n )) {\n try {\n if ((await proc) == 0) {\n if (_pipListHasFormatOption) {\n try {\n var data = JToken.ReadFrom(new JsonTextReader(new StringListReader(proc.StandardOutputLines)));\n packages = data\n .Select(j => new PackageSpec(j.Value<string>(\"name\"), j.Value<string>(\"version\")))\n .Where(p => p.IsValid)\n .OrderBy(p => p.Name)\n .ToList();\n } catch (JsonException ex) {\n Debug.WriteLine(\"Failed to parse: {0}\".FormatInvariant(ex.Message));\n foreach (var l in proc.StandardOutputLines) {\n Debug.WriteLine(l);\n }\n }\n } else {\n packages = proc.StandardOutputLines\n .Select(i => PackageSpec.FromPipList(i))\n .Where(p => p.IsValid)\n .OrderBy(p => p.Name)\n .ToList();\n }\n } else if (_pipListHasFormatOption) {\n // Actually, pip probably doesn't have the --format option\n Debug.WriteLine(\"{0} does not support --format\".FormatInvariant(_factory.Configuration.InterpreterPath));\n _pipListHasFormatOption = false;\n await CacheInstalledPackagesAsync(true, true, cancellationToken);\n return;\n } else {\n }\n } catch (OperationCanceledException) {\n // Process failed to run\n Debug.WriteLine(\"Failed to run pip to collect packages\");\n foreach (var line in proc.StandardOutputLines) {\n Debug.WriteLine(line);\n }\n }\n }\n\n if (packages == null) {\n // Pip failed, so return a directory listing\n var paths = await PythonLibraryPath.GetDatabaseSearchPathsAsync(_factory.Configuration, null);\n\n packages = await Task.Run(() => paths.Where(p => !p.IsStandardLibrary && Directory.Exists(p.Path))\n .SelectMany(p => PathUtils.EnumerateDirectories(p.Path, recurse: false))\n .Select(path => Path.GetFileName(path))\n .Select(name => PackageNameRegex.Match(name))\n .Where(match => match.Success)\n .Select(match => new PackageSpec(match.Groups[\"name\"].Value))\n .Where(p => p.IsValid)\n .OrderBy(p => p.Name)\n .ToList());\n }\n } finally {\n concurrencyLock?.Dispose();\n }\n\n // Outside of concurrency lock, still in working lock\n\n _packages.Clear();\n _packages.AddRange(packages);\n _everCached = true;\n } finally {\n workingLock?.Dispose();\n }\n\n InstalledPackagesChanged?.Invoke(this, EventArgs.Empty);\n _factory.NotifyImportNamesChanged();\n }\n\n public async Task<IList<PackageSpec>> GetInstalledPackagesAsync(CancellationToken cancellationToken) {\n using (await _working.LockAsync(cancellationToken)) {\n if (!_everCached) {\n await CacheInstalledPackagesAsync(true, false, cancellationToken);\n }\n return _packages.ToArray();\n }\n }\n\n public async Task<PackageSpec> GetInstalledPackageAsync(PackageSpec package, CancellationToken cancellationToken) {\n if (!package.IsValid) {\n return package;\n }\n using (await _working.LockAsync(cancellationToken)) {\n if (!_everCached) {\n await CacheInstalledPackagesAsync(true, false, cancellationToken);\n }\n return _packages.FirstOrDefault(p => p.Name == package.Name) ?? new PackageSpec(null);\n }\n }\n\n public Task<IList<PackageSpec>> GetInstallablePackagesAsync(CancellationToken cancellationToken) {\n if (_cache == null) {\n return Task.FromResult<IList<PackageSpec>>(Array.Empty<PackageSpec>());\n }\n return _cache.GetAllPackagesAsync(cancellationToken);\n }\n\n public async Task<PackageSpec> GetInstallablePackageAsync(PackageSpec package, CancellationToken cancellationToken) {\n if (!package.IsValid) {\n return package;\n }\n return await _cache.GetPackageInfoAsync(package, cancellationToken);\n }\n\n private sealed class Suppressed : IDisposable {\n private readonly PipPackageManager _manager;\n\n public Suppressed(PipPackageManager manager) {\n _manager = manager;\n }\n\n public void Dispose() {\n if (Interlocked.Decrement(ref _manager._suppressCount) == 0) {\n _manager.WatchingLibrary = true;\n }\n }\n }\n\n public void EnableNotifications() {\n if (_libWatchers == null) {\n _libWatchers = new List<FileSystemWatcher>();\n _refreshIsCurrentTrigger = new Timer(RefreshIsCurrentTimer_Elapsed);\n CreateLibraryWatchers().DoNotWait();\n\n UpdateIsReadyAsync(false, CancellationToken.None)\n .SilenceException<OperationCanceledException>()\n .DoNotWait();\n }\n }\n\n public void DisableNotifications() {\n if (_libWatchers != null) {\n lock (_libWatchers) {\n foreach (var w in _libWatchers) {\n w.EnableRaisingEvents = false;\n w.Dispose();\n }\n }\n _refreshIsCurrentTrigger.Dispose();\n }\n }\n\n public IDisposable SuppressNotifications() {\n WatchingLibrary = false;\n Interlocked.Increment(ref _suppressCount);\n return new Suppressed(this);\n }\n\n private bool WatchingLibrary {\n get {\n if (_libWatchers == null) {\n return false;\n }\n lock (_libWatchers) {\n return _libWatchers.Any(w => w.EnableRaisingEvents);\n }\n }\n set {\n if (_libWatchers == null) {\n return;\n }\n\n lock (_libWatchers) {\n bool clearAll = false;\n\n try {\n foreach (var w in _libWatchers) {\n if (w.EnableRaisingEvents == value) {\n continue;\n }\n w.EnableRaisingEvents = value;\n }\n } catch (IOException) {\n // May occur if the library has been deleted while the\n // watcher was disabled.\n clearAll = true;\n } catch (ObjectDisposedException) {\n clearAll = true;\n }\n\n if (clearAll) {\n foreach (var w in _libWatchers) {\n w.EnableRaisingEvents = false;\n w.Dispose();\n }\n _libWatchers.Clear();\n }\n }\n }\n }\n\n private async Task CreateLibraryWatchers() {\n Debug.Assert(_libWatchers != null, \"Should not create watchers when suppressed\");\n\n IReadOnlyList<string> paths = null;\n\n if (_factory.Configuration.SearchPaths.Any()) {\n paths = _factory.Configuration.SearchPaths;\n }\n\n if (paths == null) {\n try {\n paths = (await PythonLibraryPath.GetDatabaseSearchPathsAsync(_factory.Configuration, null))\n .Select(p => p.Path)\n .ToArray();\n } catch (InvalidOperationException) {\n return;\n }\n }\n\n paths = paths\n .Where(Directory.Exists)\n .OrderBy(p => p.Length)\n .ToList();\n\n var watching = new List<string>();\n var watchers = new List<FileSystemWatcher>();\n\n foreach (var path in paths) {\n if (watching.Any(p => PathUtils.IsSubpathOf(p, path))) {\n continue;\n }\n\n FileSystemWatcher watcher = null;\n try {\n watcher = new FileSystemWatcher {\n IncludeSubdirectories = true,\n Path = path,\n NotifyFilter = NotifyFilters.FileName | NotifyFilters.DirectoryName | NotifyFilters.LastWrite\n };\n watcher.Created += OnChanged;\n watcher.Deleted += OnChanged;\n watcher.Changed += OnChanged;\n watcher.Renamed += OnRenamed;\n watcher.EnableRaisingEvents = true;\n\n watching.Add(path);\n watchers.Add(watcher);\n } catch (IOException) {\n // Raced with directory deletion. We normally handle the\n // library being deleted by disposing the watcher, but this\n // occurs in response to an event from the watcher. Because\n // we never got to start watching, we will just dispose\n // immediately.\n watcher?.Dispose();\n } catch (ArgumentException ex) {\n watcher?.Dispose();\n Debug.WriteLine(\"Error starting FileSystemWatcher:\\r\\n{0}\", ex);\n }\n }\n\n List<FileSystemWatcher> oldWatchers;\n lock (_libWatchers) {\n oldWatchers = _libWatchers.ToList();\n _libWatchers.Clear();\n _libWatchers.AddRange(watchers);\n }\n\n foreach (var oldWatcher in oldWatchers) {\n oldWatcher.EnableRaisingEvents = false;\n oldWatcher.Dispose();\n }\n }\n\n private async void RefreshIsCurrentTimer_Elapsed(object state) {\n if (_isDisposed) {\n return;\n }\n\n try {\n _refreshIsCurrentTrigger.Change(Timeout.Infinite, Timeout.Infinite);\n } catch (ObjectDisposedException) {\n }\n\n InstalledFilesChanged?.Invoke(this, EventArgs.Empty);\n _factory.NotifyImportNamesChanged();\n\n var cts = new CancellationTokenSource();\n var cancellationToken = cts.Token;\n var oldCts = Interlocked.Exchange(ref _currentRefresh, cts);\n try {\n oldCts?.Cancel();\n oldCts?.Dispose();\n } catch (ObjectDisposedException) {\n }\n\n try {\n await CacheInstalledPackagesAsync(false, false, cancellationToken);\n } catch (OperationCanceledException) {\n } catch (FileNotFoundException) {\n // Happens if we attempt to refresh an environment that was just deleted\n } catch (Exception ex) when (!ex.IsCriticalException()) {\n Debug.Fail(ex.ToUnhandledExceptionMessage(GetType()));\n }\n }\n\n public void NotifyPackagesChanged() {\n try {\n _refreshIsCurrentTrigger.Change(100, Timeout.Infinite);\n } catch (ObjectDisposedException) {\n }\n }\n\n private void OnRenamed(object sender, RenamedEventArgs e) {\n if (Directory.Exists(e.FullPath) ||\n ModulePath.IsPythonFile(e.FullPath, false, true, false) ||\n ModulePath.IsPythonFile(e.OldFullPath, false, true, false)) {\n try {\n _refreshIsCurrentTrigger.Change(1000, Timeout.Infinite);\n } catch (ObjectDisposedException) {\n }\n }\n }\n\n private void OnChanged(object sender, FileSystemEventArgs e) {\n if ((Directory.Exists(e.FullPath) && \n !PathUtils.GetFileOrDirectoryName(e.FullPath).Equals(\"__pycache__\", StringComparison.OrdinalIgnoreCase)) ||\n ModulePath.IsPythonFile(e.FullPath, false, true, false)\n ) {\n try {\n _refreshIsCurrentTrigger.Change(1000, Timeout.Infinite);\n } catch (ObjectDisposedException) {\n }\n }\n }\n }\n}\n"} +{"text": "/// <reference path=\"jquery-1.6.2.js\" />\n/// <reference path=\"jquery-ui-1.8.11.js\" />\n/// <reference path=\"jquery.validate.js\" />\n/// <reference path=\"jquery.validate.unobtrusive.js\" />\n/// <reference path=\"knockout-2.0.0.debug.js\" />\n/// <reference path=\"modernizr-2.0.6-development-only.js\" />"} +{"text": "[[mongo.logging]]\n= Logging support\n\nAn appender for Log4j is provided in the maven module \"spring-data-mongodb-log4j\". Note, there is no dependency on other Spring Mongo modules, only the MongoDB driver.\n\n[[mongodb:logging-configuration]]\n== MongoDB Log4j Configuration\n\nHere is an example configuration\n\n[source]\n----\nlog4j.rootCategory=INFO, stdout\n\nlog4j.appender.stdout=org.springframework.data.document.mongodb.log4j.MongoLog4jAppender\nlog4j.appender.stdout.layout=org.apache.log4j.PatternLayout\nlog4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n\nlog4j.appender.stdout.host = localhost\nlog4j.appender.stdout.port = 27017\nlog4j.appender.stdout.database = logs\nlog4j.appender.stdout.collectionPattern = %X{year}%X{month}\nlog4j.appender.stdout.applicationId = my.application\nlog4j.appender.stdout.warnOrHigherWriteConcern = FSYNC_SAFE\n\nlog4j.category.org.apache.activemq=ERROR\nlog4j.category.org.springframework.batch=DEBUG\nlog4j.category.org.springframework.data.document.mongodb=DEBUG\nlog4j.category.org.springframework.transaction=INFO\n----\n\nThe important configuration to look at aside from host and port is the database and collectionPattern. The variables year, month, day and hour are available for you to use in forming a collection name. This is to support the common convention of grouping log information in a collection that corresponds to a specific time period, for example a collection per day.\n\nThere is also an applicationId which is put into the stored message. The document stored from logging as the following keys: level, name, applicationId, timestamp, properties, traceback, and message.\n"} +{"text": "/*\n * SonarQube\n * Copyright (C) 2009-2020 SonarSource SA\n * mailto:info AT sonarsource DOT com\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n */\npackage org.sonar.server.component.index;\n\nimport org.junit.Rule;\nimport org.junit.Test;\nimport org.junit.rules.ExpectedException;\n\nimport static org.assertj.core.api.Assertions.assertThat;\n\npublic class SuggestionQueryTest {\n\n @Rule\n public ExpectedException expectedException = ExpectedException.none();\n\n @Test\n public void should_fail_with_IAE_if_query_is_empty() {\n expectedException.expect(IllegalArgumentException.class);\n expectedException.expectMessage(\"Query must be at least two characters long\");\n\n SuggestionQuery.builder().setQuery(\"\");\n }\n\n @Test\n public void should_fail_with_IAE_if_query_is_one_character_long() {\n expectedException.expect(IllegalArgumentException.class);\n expectedException.expectMessage(\"Query must be at least two characters long\");\n\n SuggestionQuery.builder().setQuery(\"a\");\n }\n\n @Test\n public void should_support_query_with_two_characters_long() {\n SuggestionQuery query = SuggestionQuery.builder().setQuery(\"ab\").build();\n\n assertThat(query.getQuery()).isEqualTo(\"ab\");\n }\n\n @Test\n public void should_fail_with_IAE_if_limit_is_negative() {\n SuggestionQuery.Builder query = SuggestionQuery.builder().setQuery(\"ab\");\n\n expectedException.expect(IllegalArgumentException.class);\n expectedException.expectMessage(\"Limit has to be strictly positive\");\n\n query.setLimit(-1);\n }\n\n @Test\n public void should_fail_with_IAE_if_limit_is_zero() {\n SuggestionQuery.Builder query = SuggestionQuery.builder().setQuery(\"ab\");\n\n expectedException.expect(IllegalArgumentException.class);\n expectedException.expectMessage(\"Limit has to be strictly positive\");\n\n query.setLimit(0);\n }\n\n @Test\n public void should_support_positive_limit() {\n SuggestionQuery query = SuggestionQuery.builder().setQuery(\"ab\")\n .setLimit(1).build();\n\n assertThat(query.getLimit()).isEqualTo(1);\n }\n}\n"} +{"text": "/// Copyright (c) 2012 Ecma International. All rights reserved. \n/**\n * @path ch15/15.2/15.2.3/15.2.3.6/15.2.3.6-4-541.js\n * @description ES5 Attributes - property ([[Get]] is a Function, [[Set]] is a Function, [[Enumerable]] is true, [[Configurable]] is false) is enumerable\n */\n\n\nfunction testcase() {\n var obj = {};\n\n var getFunc = function () {\n return 1001;\n };\n\n var verifySetFunc = \"data\";\n var setFunc = function (value) {\n verifySetFunc = value;\n };\n\n Object.defineProperty(obj, \"prop\", {\n get: getFunc,\n set: setFunc,\n enumerable: true,\n configurable: false\n });\n\n var propertyDefineCorrect = obj.hasOwnProperty(\"prop\");\n var desc = Object.getOwnPropertyDescriptor(obj, \"prop\");\n\n for (var p in obj) {\n if (p === \"prop\") {\n return propertyDefineCorrect && desc.enumerable === true;\n }\n }\n\n return false;\n }\nrunTestCase(testcase);\n"} +{"text": "#ifndef __MEMBER_H__\n#define __MEMBER_H__\n\n#include <string>\n\nclass Member\n{\n\tconst std::string name;\n\tconst int age;\npublic:\n\tMember(const std::string __name = \"???\", const int __age = 0);\n\tvoid printInfo()const;\n};\n\n#endif //__MEMBER_H__"} +{"text": "Handle Error!\nMessage :Error (R24) : Using uninitialized variable : test\nadd attribute\ndone\n10"} +{"text": "<?php\n\nnamespace Spatie\\SchemaOrg;\n\nuse \\Spatie\\SchemaOrg\\Contracts\\GovernmentOfficeContract;\nuse \\Spatie\\SchemaOrg\\Contracts\\LocalBusinessContract;\nuse \\Spatie\\SchemaOrg\\Contracts\\OrganizationContract;\nuse \\Spatie\\SchemaOrg\\Contracts\\PlaceContract;\nuse \\Spatie\\SchemaOrg\\Contracts\\ThingContract;\n\n/**\n * A government office&#x2014;for example, an IRS or DMV office.\n *\n * @see https://schema.org/GovernmentOffice\n *\n */\nclass GovernmentOffice extends BaseType implements GovernmentOfficeContract, LocalBusinessContract, OrganizationContract, PlaceContract, ThingContract\n{\n /**\n * For a [[NewsMediaOrganization]] or other news-related [[Organization]], a\n * statement about public engagement activities (for news media, the\n * newsroom’s), including involving the public - digitally or otherwise --\n * in coverage decisions, reporting and activities after publication.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\CreativeWorkContract|\\Spatie\\SchemaOrg\\Contracts\\CreativeWorkContract[]|string|string[] $actionableFeedbackPolicy\n *\n * @return static\n *\n * @see https://schema.org/actionableFeedbackPolicy\n * @see http://pending.schema.org\n */\n public function actionableFeedbackPolicy($actionableFeedbackPolicy)\n {\n return $this->setProperty('actionableFeedbackPolicy', $actionableFeedbackPolicy);\n }\n\n /**\n * A property-value pair representing an additional characteristics of the\n * entitity, e.g. a product feature or another characteristic for which\n * there is no matching property in schema.org.\n * \n * Note: Publishers should be aware that applications designed to use\n * specific schema.org properties (e.g. https://schema.org/width,\n * https://schema.org/color, https://schema.org/gtin13, ...) will typically\n * expect such data to be provided using those properties, rather than using\n * the generic property/value mechanism.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\PropertyValueContract|\\Spatie\\SchemaOrg\\Contracts\\PropertyValueContract[] $additionalProperty\n *\n * @return static\n *\n * @see https://schema.org/additionalProperty\n */\n public function additionalProperty($additionalProperty)\n {\n return $this->setProperty('additionalProperty', $additionalProperty);\n }\n\n /**\n * An additional type for the item, typically used for adding more specific\n * types from external vocabularies in microdata syntax. This is a\n * relationship between something and a class that the thing is in. In RDFa\n * syntax, it is better to use the native RDFa syntax - the 'typeof'\n * attribute - for multiple types. Schema.org tools may have only weaker\n * understanding of extra types, in particular those defined externally.\n *\n * @param string|string[] $additionalType\n *\n * @return static\n *\n * @see https://schema.org/additionalType\n */\n public function additionalType($additionalType)\n {\n return $this->setProperty('additionalType', $additionalType);\n }\n\n /**\n * Physical address of the item.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\PostalAddressContract|\\Spatie\\SchemaOrg\\Contracts\\PostalAddressContract[]|string|string[] $address\n *\n * @return static\n *\n * @see https://schema.org/address\n */\n public function address($address)\n {\n return $this->setProperty('address', $address);\n }\n\n /**\n * The overall rating, based on a collection of reviews or ratings, of the\n * item.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\AggregateRatingContract|\\Spatie\\SchemaOrg\\Contracts\\AggregateRatingContract[] $aggregateRating\n *\n * @return static\n *\n * @see https://schema.org/aggregateRating\n */\n public function aggregateRating($aggregateRating)\n {\n return $this->setProperty('aggregateRating', $aggregateRating);\n }\n\n /**\n * An alias for the item.\n *\n * @param string|string[] $alternateName\n *\n * @return static\n *\n * @see https://schema.org/alternateName\n */\n public function alternateName($alternateName)\n {\n return $this->setProperty('alternateName', $alternateName);\n }\n\n /**\n * Alumni of an organization.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\PersonContract|\\Spatie\\SchemaOrg\\Contracts\\PersonContract[] $alumni\n *\n * @return static\n *\n * @see https://schema.org/alumni\n */\n public function alumni($alumni)\n {\n return $this->setProperty('alumni', $alumni);\n }\n\n /**\n * An amenity feature (e.g. a characteristic or service) of the\n * Accommodation. This generic property does not make a statement about\n * whether the feature is included in an offer for the main accommodation or\n * available at extra costs.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\LocationFeatureSpecificationContract|\\Spatie\\SchemaOrg\\Contracts\\LocationFeatureSpecificationContract[] $amenityFeature\n *\n * @return static\n *\n * @see https://schema.org/amenityFeature\n * @link https://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#STI_Accommodation_Ontology\n */\n public function amenityFeature($amenityFeature)\n {\n return $this->setProperty('amenityFeature', $amenityFeature);\n }\n\n /**\n * The geographic area where a service or offered item is provided.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\AdministrativeAreaContract|\\Spatie\\SchemaOrg\\Contracts\\AdministrativeAreaContract[]|\\Spatie\\SchemaOrg\\Contracts\\GeoShapeContract|\\Spatie\\SchemaOrg\\Contracts\\GeoShapeContract[]|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract[]|string|string[] $areaServed\n *\n * @return static\n *\n * @see https://schema.org/areaServed\n */\n public function areaServed($areaServed)\n {\n return $this->setProperty('areaServed', $areaServed);\n }\n\n /**\n * An award won by or for this item.\n *\n * @param string|string[] $award\n *\n * @return static\n *\n * @see https://schema.org/award\n */\n public function award($award)\n {\n return $this->setProperty('award', $award);\n }\n\n /**\n * Awards won by or for this item.\n *\n * @param string|string[] $awards\n *\n * @return static\n *\n * @see https://schema.org/awards\n */\n public function awards($awards)\n {\n return $this->setProperty('awards', $awards);\n }\n\n /**\n * A short textual code (also called \"store code\") that uniquely identifies\n * a place of business. The code is typically assigned by the\n * parentOrganization and used in structured URLs.\n * \n * For example, in the URL\n * http://www.starbucks.co.uk/store-locator/etc/detail/3047 the code \"3047\"\n * is a branchCode for a particular branch.\n *\n * @param string|string[] $branchCode\n *\n * @return static\n *\n * @see https://schema.org/branchCode\n */\n public function branchCode($branchCode)\n {\n return $this->setProperty('branchCode', $branchCode);\n }\n\n /**\n * The larger organization that this local business is a branch of, if any.\n * Not to be confused with (anatomical)[[branch]].\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\OrganizationContract|\\Spatie\\SchemaOrg\\Contracts\\OrganizationContract[] $branchOf\n *\n * @return static\n *\n * @see https://schema.org/branchOf\n */\n public function branchOf($branchOf)\n {\n return $this->setProperty('branchOf', $branchOf);\n }\n\n /**\n * The brand(s) associated with a product or service, or the brand(s)\n * maintained by an organization or business person.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\BrandContract|\\Spatie\\SchemaOrg\\Contracts\\BrandContract[]|\\Spatie\\SchemaOrg\\Contracts\\OrganizationContract|\\Spatie\\SchemaOrg\\Contracts\\OrganizationContract[] $brand\n *\n * @return static\n *\n * @see https://schema.org/brand\n */\n public function brand($brand)\n {\n return $this->setProperty('brand', $brand);\n }\n\n /**\n * A contact point for a person or organization.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\ContactPointContract|\\Spatie\\SchemaOrg\\Contracts\\ContactPointContract[] $contactPoint\n *\n * @return static\n *\n * @see https://schema.org/contactPoint\n */\n public function contactPoint($contactPoint)\n {\n return $this->setProperty('contactPoint', $contactPoint);\n }\n\n /**\n * A contact point for a person or organization.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\ContactPointContract|\\Spatie\\SchemaOrg\\Contracts\\ContactPointContract[] $contactPoints\n *\n * @return static\n *\n * @see https://schema.org/contactPoints\n */\n public function contactPoints($contactPoints)\n {\n return $this->setProperty('contactPoints', $contactPoints);\n }\n\n /**\n * The basic containment relation between a place and one that contains it.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\PlaceContract|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract[] $containedIn\n *\n * @return static\n *\n * @see https://schema.org/containedIn\n */\n public function containedIn($containedIn)\n {\n return $this->setProperty('containedIn', $containedIn);\n }\n\n /**\n * The basic containment relation between a place and one that contains it.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\PlaceContract|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract[] $containedInPlace\n *\n * @return static\n *\n * @see https://schema.org/containedInPlace\n */\n public function containedInPlace($containedInPlace)\n {\n return $this->setProperty('containedInPlace', $containedInPlace);\n }\n\n /**\n * The basic containment relation between a place and another that it\n * contains.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\PlaceContract|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract[] $containsPlace\n *\n * @return static\n *\n * @see https://schema.org/containsPlace\n */\n public function containsPlace($containsPlace)\n {\n return $this->setProperty('containsPlace', $containsPlace);\n }\n\n /**\n * For an [[Organization]] (e.g. [[NewsMediaOrganization]]), a statement\n * describing (in news media, the newsroom’s) disclosure and correction\n * policy for errors.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\CreativeWorkContract|\\Spatie\\SchemaOrg\\Contracts\\CreativeWorkContract[]|string|string[] $correctionsPolicy\n *\n * @return static\n *\n * @see https://schema.org/correctionsPolicy\n * @see http://pending.schema.org\n */\n public function correctionsPolicy($correctionsPolicy)\n {\n return $this->setProperty('correctionsPolicy', $correctionsPolicy);\n }\n\n /**\n * The currency accepted.\n * \n * Use standard formats: [ISO 4217 currency\n * format](http://en.wikipedia.org/wiki/ISO_4217) e.g. \"USD\"; [Ticker\n * symbol](https://en.wikipedia.org/wiki/List_of_cryptocurrencies) for\n * cryptocurrencies e.g. \"BTC\"; well known names for [Local Exchange\n * Tradings\n * Systems](https://en.wikipedia.org/wiki/Local_exchange_trading_system)\n * (LETS) and other currency types e.g. \"Ithaca HOUR\".\n *\n * @param string|string[] $currenciesAccepted\n *\n * @return static\n *\n * @see https://schema.org/currenciesAccepted\n */\n public function currenciesAccepted($currenciesAccepted)\n {\n return $this->setProperty('currenciesAccepted', $currenciesAccepted);\n }\n\n /**\n * A relationship between an organization and a department of that\n * organization, also described as an organization (allowing different urls,\n * logos, opening hours). For example: a store with a pharmacy, or a bakery\n * with a cafe.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\OrganizationContract|\\Spatie\\SchemaOrg\\Contracts\\OrganizationContract[] $department\n *\n * @return static\n *\n * @see https://schema.org/department\n */\n public function department($department)\n {\n return $this->setProperty('department', $department);\n }\n\n /**\n * A description of the item.\n *\n * @param string|string[] $description\n *\n * @return static\n *\n * @see https://schema.org/description\n */\n public function description($description)\n {\n return $this->setProperty('description', $description);\n }\n\n /**\n * A sub property of description. A short description of the item used to\n * disambiguate from other, similar items. Information from other properties\n * (in particular, name) may be necessary for the description to be useful\n * for disambiguation.\n *\n * @param string|string[] $disambiguatingDescription\n *\n * @return static\n *\n * @see https://schema.org/disambiguatingDescription\n */\n public function disambiguatingDescription($disambiguatingDescription)\n {\n return $this->setProperty('disambiguatingDescription', $disambiguatingDescription);\n }\n\n /**\n * The date that this organization was dissolved.\n *\n * @param \\DateTimeInterface|\\DateTimeInterface[] $dissolutionDate\n *\n * @return static\n *\n * @see https://schema.org/dissolutionDate\n */\n public function dissolutionDate($dissolutionDate)\n {\n return $this->setProperty('dissolutionDate', $dissolutionDate);\n }\n\n /**\n * Statement on diversity policy by an [[Organization]] e.g. a\n * [[NewsMediaOrganization]]. For a [[NewsMediaOrganization]], a statement\n * describing the newsroom’s diversity policy on both staffing and\n * sources, typically providing staffing data.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\CreativeWorkContract|\\Spatie\\SchemaOrg\\Contracts\\CreativeWorkContract[]|string|string[] $diversityPolicy\n *\n * @return static\n *\n * @see https://schema.org/diversityPolicy\n * @see http://pending.schema.org\n */\n public function diversityPolicy($diversityPolicy)\n {\n return $this->setProperty('diversityPolicy', $diversityPolicy);\n }\n\n /**\n * For an [[Organization]] (often but not necessarily a\n * [[NewsMediaOrganization]]), a report on staffing diversity issues. In a\n * news context this might be for example ASNE or RTDNA (US) reports, or\n * self-reported.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\ArticleContract|\\Spatie\\SchemaOrg\\Contracts\\ArticleContract[]|string|string[] $diversityStaffingReport\n *\n * @return static\n *\n * @see https://schema.org/diversityStaffingReport\n * @see http://pending.schema.org\n */\n public function diversityStaffingReport($diversityStaffingReport)\n {\n return $this->setProperty('diversityStaffingReport', $diversityStaffingReport);\n }\n\n /**\n * The Dun & Bradstreet DUNS number for identifying an organization or\n * business person.\n *\n * @param string|string[] $duns\n *\n * @return static\n *\n * @see https://schema.org/duns\n * @link http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsTerms\n */\n public function duns($duns)\n {\n return $this->setProperty('duns', $duns);\n }\n\n /**\n * Email address.\n *\n * @param string|string[] $email\n *\n * @return static\n *\n * @see https://schema.org/email\n */\n public function email($email)\n {\n return $this->setProperty('email', $email);\n }\n\n /**\n * Someone working for this organization.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\PersonContract|\\Spatie\\SchemaOrg\\Contracts\\PersonContract[] $employee\n *\n * @return static\n *\n * @see https://schema.org/employee\n */\n public function employee($employee)\n {\n return $this->setProperty('employee', $employee);\n }\n\n /**\n * People working for this organization.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\PersonContract|\\Spatie\\SchemaOrg\\Contracts\\PersonContract[] $employees\n *\n * @return static\n *\n * @see https://schema.org/employees\n */\n public function employees($employees)\n {\n return $this->setProperty('employees', $employees);\n }\n\n /**\n * Statement about ethics policy, e.g. of a [[NewsMediaOrganization]]\n * regarding journalistic and publishing practices, or of a [[Restaurant]],\n * a page describing food source policies. In the case of a\n * [[NewsMediaOrganization]], an ethicsPolicy is typically a statement\n * describing the personal, organizational, and corporate standards of\n * behavior expected by the organization.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\CreativeWorkContract|\\Spatie\\SchemaOrg\\Contracts\\CreativeWorkContract[]|string|string[] $ethicsPolicy\n *\n * @return static\n *\n * @see https://schema.org/ethicsPolicy\n * @see http://pending.schema.org\n * @link https://github.com/schemaorg/schemaorg/issues/1525\n */\n public function ethicsPolicy($ethicsPolicy)\n {\n return $this->setProperty('ethicsPolicy', $ethicsPolicy);\n }\n\n /**\n * Upcoming or past event associated with this place, organization, or\n * action.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\EventContract|\\Spatie\\SchemaOrg\\Contracts\\EventContract[] $event\n *\n * @return static\n *\n * @see https://schema.org/event\n */\n public function event($event)\n {\n return $this->setProperty('event', $event);\n }\n\n /**\n * Upcoming or past events associated with this place or organization.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\EventContract|\\Spatie\\SchemaOrg\\Contracts\\EventContract[] $events\n *\n * @return static\n *\n * @see https://schema.org/events\n */\n public function events($events)\n {\n return $this->setProperty('events', $events);\n }\n\n /**\n * The fax number.\n *\n * @param string|string[] $faxNumber\n *\n * @return static\n *\n * @see https://schema.org/faxNumber\n */\n public function faxNumber($faxNumber)\n {\n return $this->setProperty('faxNumber', $faxNumber);\n }\n\n /**\n * A person who founded this organization.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\PersonContract|\\Spatie\\SchemaOrg\\Contracts\\PersonContract[] $founder\n *\n * @return static\n *\n * @see https://schema.org/founder\n */\n public function founder($founder)\n {\n return $this->setProperty('founder', $founder);\n }\n\n /**\n * A person who founded this organization.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\PersonContract|\\Spatie\\SchemaOrg\\Contracts\\PersonContract[] $founders\n *\n * @return static\n *\n * @see https://schema.org/founders\n */\n public function founders($founders)\n {\n return $this->setProperty('founders', $founders);\n }\n\n /**\n * The date that this organization was founded.\n *\n * @param \\DateTimeInterface|\\DateTimeInterface[] $foundingDate\n *\n * @return static\n *\n * @see https://schema.org/foundingDate\n */\n public function foundingDate($foundingDate)\n {\n return $this->setProperty('foundingDate', $foundingDate);\n }\n\n /**\n * The place where the Organization was founded.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\PlaceContract|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract[] $foundingLocation\n *\n * @return static\n *\n * @see https://schema.org/foundingLocation\n */\n public function foundingLocation($foundingLocation)\n {\n return $this->setProperty('foundingLocation', $foundingLocation);\n }\n\n /**\n * A person or organization that supports (sponsors) something through some\n * kind of financial contribution.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\OrganizationContract|\\Spatie\\SchemaOrg\\Contracts\\OrganizationContract[]|\\Spatie\\SchemaOrg\\Contracts\\PersonContract|\\Spatie\\SchemaOrg\\Contracts\\PersonContract[] $funder\n *\n * @return static\n *\n * @see https://schema.org/funder\n */\n public function funder($funder)\n {\n return $this->setProperty('funder', $funder);\n }\n\n /**\n * The geo coordinates of the place.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\GeoCoordinatesContract|\\Spatie\\SchemaOrg\\Contracts\\GeoCoordinatesContract[]|\\Spatie\\SchemaOrg\\Contracts\\GeoShapeContract|\\Spatie\\SchemaOrg\\Contracts\\GeoShapeContract[] $geo\n *\n * @return static\n *\n * @see https://schema.org/geo\n */\n public function geo($geo)\n {\n return $this->setProperty('geo', $geo);\n }\n\n /**\n * Represents a relationship between two geometries (or the places they\n * represent), relating a containing geometry to a contained geometry. \"a\n * contains b iff no points of b lie in the exterior of a, and at least one\n * point of the interior of b lies in the interior of a\". As defined in\n * [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\GeospatialGeometryContract|\\Spatie\\SchemaOrg\\Contracts\\GeospatialGeometryContract[]|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract[] $geoContains\n *\n * @return static\n *\n * @see https://schema.org/geoContains\n */\n public function geoContains($geoContains)\n {\n return $this->setProperty('geoContains', $geoContains);\n }\n\n /**\n * Represents a relationship between two geometries (or the places they\n * represent), relating a geometry to another that covers it. As defined in\n * [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\GeospatialGeometryContract|\\Spatie\\SchemaOrg\\Contracts\\GeospatialGeometryContract[]|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract[] $geoCoveredBy\n *\n * @return static\n *\n * @see https://schema.org/geoCoveredBy\n */\n public function geoCoveredBy($geoCoveredBy)\n {\n return $this->setProperty('geoCoveredBy', $geoCoveredBy);\n }\n\n /**\n * Represents a relationship between two geometries (or the places they\n * represent), relating a covering geometry to a covered geometry. \"Every\n * point of b is a point of (the interior or boundary of) a\". As defined in\n * [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\GeospatialGeometryContract|\\Spatie\\SchemaOrg\\Contracts\\GeospatialGeometryContract[]|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract[] $geoCovers\n *\n * @return static\n *\n * @see https://schema.org/geoCovers\n */\n public function geoCovers($geoCovers)\n {\n return $this->setProperty('geoCovers', $geoCovers);\n }\n\n /**\n * Represents a relationship between two geometries (or the places they\n * represent), relating a geometry to another that crosses it: \"a crosses b:\n * they have some but not all interior points in common, and the dimension\n * of the intersection is less than that of at least one of them\". As\n * defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\GeospatialGeometryContract|\\Spatie\\SchemaOrg\\Contracts\\GeospatialGeometryContract[]|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract[] $geoCrosses\n *\n * @return static\n *\n * @see https://schema.org/geoCrosses\n */\n public function geoCrosses($geoCrosses)\n {\n return $this->setProperty('geoCrosses', $geoCrosses);\n }\n\n /**\n * Represents spatial relations in which two geometries (or the places they\n * represent) are topologically disjoint: they have no point in common. They\n * form a set of disconnected geometries.\" (a symmetric relationship, as\n * defined in [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM))\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\GeospatialGeometryContract|\\Spatie\\SchemaOrg\\Contracts\\GeospatialGeometryContract[]|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract[] $geoDisjoint\n *\n * @return static\n *\n * @see https://schema.org/geoDisjoint\n */\n public function geoDisjoint($geoDisjoint)\n {\n return $this->setProperty('geoDisjoint', $geoDisjoint);\n }\n\n /**\n * Represents spatial relations in which two geometries (or the places they\n * represent) are topologically equal, as defined in\n * [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM). \"Two geometries are\n * topologically equal if their interiors intersect and no part of the\n * interior or boundary of one geometry intersects the exterior of the\n * other\" (a symmetric relationship)\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\GeospatialGeometryContract|\\Spatie\\SchemaOrg\\Contracts\\GeospatialGeometryContract[]|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract[] $geoEquals\n *\n * @return static\n *\n * @see https://schema.org/geoEquals\n */\n public function geoEquals($geoEquals)\n {\n return $this->setProperty('geoEquals', $geoEquals);\n }\n\n /**\n * Represents spatial relations in which two geometries (or the places they\n * represent) have at least one point in common. As defined in\n * [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\GeospatialGeometryContract|\\Spatie\\SchemaOrg\\Contracts\\GeospatialGeometryContract[]|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract[] $geoIntersects\n *\n * @return static\n *\n * @see https://schema.org/geoIntersects\n */\n public function geoIntersects($geoIntersects)\n {\n return $this->setProperty('geoIntersects', $geoIntersects);\n }\n\n /**\n * Represents a relationship between two geometries (or the places they\n * represent), relating a geometry to another that geospatially overlaps it,\n * i.e. they have some but not all points in common. As defined in\n * [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\GeospatialGeometryContract|\\Spatie\\SchemaOrg\\Contracts\\GeospatialGeometryContract[]|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract[] $geoOverlaps\n *\n * @return static\n *\n * @see https://schema.org/geoOverlaps\n */\n public function geoOverlaps($geoOverlaps)\n {\n return $this->setProperty('geoOverlaps', $geoOverlaps);\n }\n\n /**\n * Represents spatial relations in which two geometries (or the places they\n * represent) touch: they have at least one boundary point in common, but no\n * interior points.\" (a symmetric relationship, as defined in\n * [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM) )\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\GeospatialGeometryContract|\\Spatie\\SchemaOrg\\Contracts\\GeospatialGeometryContract[]|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract[] $geoTouches\n *\n * @return static\n *\n * @see https://schema.org/geoTouches\n */\n public function geoTouches($geoTouches)\n {\n return $this->setProperty('geoTouches', $geoTouches);\n }\n\n /**\n * Represents a relationship between two geometries (or the places they\n * represent), relating a geometry to one that contains it, i.e. it is\n * inside (i.e. within) its interior. As defined in\n * [DE-9IM](https://en.wikipedia.org/wiki/DE-9IM).\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\GeospatialGeometryContract|\\Spatie\\SchemaOrg\\Contracts\\GeospatialGeometryContract[]|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract[] $geoWithin\n *\n * @return static\n *\n * @see https://schema.org/geoWithin\n */\n public function geoWithin($geoWithin)\n {\n return $this->setProperty('geoWithin', $geoWithin);\n }\n\n /**\n * The [Global Location Number](http://www.gs1.org/gln) (GLN, sometimes also\n * referred to as International Location Number or ILN) of the respective\n * organization, person, or place. The GLN is a 13-digit number used to\n * identify parties and physical locations.\n *\n * @param string|string[] $globalLocationNumber\n *\n * @return static\n *\n * @see https://schema.org/globalLocationNumber\n * @link http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsTerms\n */\n public function globalLocationNumber($globalLocationNumber)\n {\n return $this->setProperty('globalLocationNumber', $globalLocationNumber);\n }\n\n /**\n * A credential awarded to the Person or Organization.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\EducationalOccupationalCredentialContract|\\Spatie\\SchemaOrg\\Contracts\\EducationalOccupationalCredentialContract[] $hasCredential\n *\n * @return static\n *\n * @see https://schema.org/hasCredential\n * @see http://pending.schema.org\n * @link https://github.com/schemaorg/schemaorg/issues/2289\n */\n public function hasCredential($hasCredential)\n {\n return $this->setProperty('hasCredential', $hasCredential);\n }\n\n /**\n * Indicates whether some facility (e.g. [[FoodEstablishment]],\n * [[CovidTestingFacility]]) offers a service that can be used by driving\n * through in a car. In the case of [[CovidTestingFacility]] such facilities\n * could potentially help with social distancing from other\n * potentially-infected users.\n *\n * @param bool|bool[] $hasDriveThroughService\n *\n * @return static\n *\n * @see https://schema.org/hasDriveThroughService\n * @see http://pending.schema.org\n * @link https://github.com/schemaorg/schemaorg/issues/2490\n */\n public function hasDriveThroughService($hasDriveThroughService)\n {\n return $this->setProperty('hasDriveThroughService', $hasDriveThroughService);\n }\n\n /**\n * A URL to a map of the place.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\MapContract|\\Spatie\\SchemaOrg\\Contracts\\MapContract[]|string|string[] $hasMap\n *\n * @return static\n *\n * @see https://schema.org/hasMap\n */\n public function hasMap($hasMap)\n {\n return $this->setProperty('hasMap', $hasMap);\n }\n\n /**\n * Indicates a MerchantReturnPolicy that may be applicable.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\MerchantReturnPolicyContract|\\Spatie\\SchemaOrg\\Contracts\\MerchantReturnPolicyContract[] $hasMerchantReturnPolicy\n *\n * @return static\n *\n * @see https://schema.org/hasMerchantReturnPolicy\n * @see http://pending.schema.org\n * @link https://github.com/schemaorg/schemaorg/issues/2288\n */\n public function hasMerchantReturnPolicy($hasMerchantReturnPolicy)\n {\n return $this->setProperty('hasMerchantReturnPolicy', $hasMerchantReturnPolicy);\n }\n\n /**\n * Indicates an OfferCatalog listing for this Organization, Person, or\n * Service.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\OfferCatalogContract|\\Spatie\\SchemaOrg\\Contracts\\OfferCatalogContract[] $hasOfferCatalog\n *\n * @return static\n *\n * @see https://schema.org/hasOfferCatalog\n */\n public function hasOfferCatalog($hasOfferCatalog)\n {\n return $this->setProperty('hasOfferCatalog', $hasOfferCatalog);\n }\n\n /**\n * Points-of-Sales operated by the organization or person.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\PlaceContract|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract[] $hasPOS\n *\n * @return static\n *\n * @see https://schema.org/hasPOS\n * @link http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsTerms\n */\n public function hasPOS($hasPOS)\n {\n return $this->setProperty('hasPOS', $hasPOS);\n }\n\n /**\n * Indicates a ProductReturnPolicy that may be applicable.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\ProductReturnPolicyContract|\\Spatie\\SchemaOrg\\Contracts\\ProductReturnPolicyContract[] $hasProductReturnPolicy\n *\n * @return static\n *\n * @see https://schema.org/hasProductReturnPolicy\n * @see http://attic.schema.org\n * @link https://github.com/schemaorg/schemaorg/issues/2288\n */\n public function hasProductReturnPolicy($hasProductReturnPolicy)\n {\n return $this->setProperty('hasProductReturnPolicy', $hasProductReturnPolicy);\n }\n\n /**\n * The identifier property represents any kind of identifier for any kind of\n * [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides\n * dedicated properties for representing many of these, either as textual\n * strings or as URL (URI) links. See [background\n * notes](/docs/datamodel.html#identifierBg) for more details.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\PropertyValueContract|\\Spatie\\SchemaOrg\\Contracts\\PropertyValueContract[]|string|string[] $identifier\n *\n * @return static\n *\n * @see https://schema.org/identifier\n */\n public function identifier($identifier)\n {\n return $this->setProperty('identifier', $identifier);\n }\n\n /**\n * An image of the item. This can be a [[URL]] or a fully described\n * [[ImageObject]].\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\ImageObjectContract|\\Spatie\\SchemaOrg\\Contracts\\ImageObjectContract[]|string|string[] $image\n *\n * @return static\n *\n * @see https://schema.org/image\n */\n public function image($image)\n {\n return $this->setProperty('image', $image);\n }\n\n /**\n * The number of interactions for the CreativeWork using the WebSite or\n * SoftwareApplication. The most specific child type of InteractionCounter\n * should be used.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\InteractionCounterContract|\\Spatie\\SchemaOrg\\Contracts\\InteractionCounterContract[] $interactionStatistic\n *\n * @return static\n *\n * @see https://schema.org/interactionStatistic\n * @link https://github.com/schemaorg/schemaorg/issues/2421\n */\n public function interactionStatistic($interactionStatistic)\n {\n return $this->setProperty('interactionStatistic', $interactionStatistic);\n }\n\n /**\n * A flag to signal that the item, event, or place is accessible for free.\n *\n * @param bool|bool[] $isAccessibleForFree\n *\n * @return static\n *\n * @see https://schema.org/isAccessibleForFree\n */\n public function isAccessibleForFree($isAccessibleForFree)\n {\n return $this->setProperty('isAccessibleForFree', $isAccessibleForFree);\n }\n\n /**\n * The International Standard of Industrial Classification of All Economic\n * Activities (ISIC), Revision 4 code for a particular organization,\n * business person, or place.\n *\n * @param string|string[] $isicV4\n *\n * @return static\n *\n * @see https://schema.org/isicV4\n * @link http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsTerms\n */\n public function isicV4($isicV4)\n {\n return $this->setProperty('isicV4', $isicV4);\n }\n\n /**\n * Of a [[Person]], and less typically of an [[Organization]], to indicate a\n * topic that is known about - suggesting possible expertise but not\n * implying it. We do not distinguish skill levels here, or relate this to\n * educational content, events, objectives or [[JobPosting]] descriptions.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\ThingContract|\\Spatie\\SchemaOrg\\Contracts\\ThingContract[]|string|string[] $knowsAbout\n *\n * @return static\n *\n * @see https://schema.org/knowsAbout\n * @see http://pending.schema.org\n */\n public function knowsAbout($knowsAbout)\n {\n return $this->setProperty('knowsAbout', $knowsAbout);\n }\n\n /**\n * Of a [[Person]], and less typically of an [[Organization]], to indicate a\n * known language. We do not distinguish skill levels or\n * reading/writing/speaking/signing here. Use language codes from the [IETF\n * BCP 47 standard](http://tools.ietf.org/html/bcp47).\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\LanguageContract|\\Spatie\\SchemaOrg\\Contracts\\LanguageContract[]|string|string[] $knowsLanguage\n *\n * @return static\n *\n * @see https://schema.org/knowsLanguage\n * @see http://pending.schema.org\n */\n public function knowsLanguage($knowsLanguage)\n {\n return $this->setProperty('knowsLanguage', $knowsLanguage);\n }\n\n /**\n * The latitude of a location. For example ```37.42242``` ([WGS\n * 84](https://en.wikipedia.org/wiki/World_Geodetic_System)).\n *\n * @param float|float[]|int|int[]|string|string[] $latitude\n *\n * @return static\n *\n * @see https://schema.org/latitude\n */\n public function latitude($latitude)\n {\n return $this->setProperty('latitude', $latitude);\n }\n\n /**\n * The official name of the organization, e.g. the registered company name.\n *\n * @param string|string[] $legalName\n *\n * @return static\n *\n * @see https://schema.org/legalName\n * @link http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsTerms\n */\n public function legalName($legalName)\n {\n return $this->setProperty('legalName', $legalName);\n }\n\n /**\n * An organization identifier that uniquely identifies a legal entity as\n * defined in ISO 17442.\n *\n * @param string|string[] $leiCode\n *\n * @return static\n *\n * @see https://schema.org/leiCode\n */\n public function leiCode($leiCode)\n {\n return $this->setProperty('leiCode', $leiCode);\n }\n\n /**\n * The location of for example where the event is happening, an organization\n * is located, or where an action takes place.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\PlaceContract|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract[]|\\Spatie\\SchemaOrg\\Contracts\\PostalAddressContract|\\Spatie\\SchemaOrg\\Contracts\\PostalAddressContract[]|\\Spatie\\SchemaOrg\\Contracts\\VirtualLocationContract|\\Spatie\\SchemaOrg\\Contracts\\VirtualLocationContract[]|string|string[] $location\n *\n * @return static\n *\n * @see https://schema.org/location\n */\n public function location($location)\n {\n return $this->setProperty('location', $location);\n }\n\n /**\n * An associated logo.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\ImageObjectContract|\\Spatie\\SchemaOrg\\Contracts\\ImageObjectContract[]|string|string[] $logo\n *\n * @return static\n *\n * @see https://schema.org/logo\n * @link http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsTerms\n */\n public function logo($logo)\n {\n return $this->setProperty('logo', $logo);\n }\n\n /**\n * The longitude of a location. For example ```-122.08585``` ([WGS\n * 84](https://en.wikipedia.org/wiki/World_Geodetic_System)).\n *\n * @param float|float[]|int|int[]|string|string[] $longitude\n *\n * @return static\n *\n * @see https://schema.org/longitude\n */\n public function longitude($longitude)\n {\n return $this->setProperty('longitude', $longitude);\n }\n\n /**\n * Indicates a page (or other CreativeWork) for which this thing is the main\n * entity being described. See [background\n * notes](/docs/datamodel.html#mainEntityBackground) for details.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\CreativeWorkContract|\\Spatie\\SchemaOrg\\Contracts\\CreativeWorkContract[]|string|string[] $mainEntityOfPage\n *\n * @return static\n *\n * @see https://schema.org/mainEntityOfPage\n */\n public function mainEntityOfPage($mainEntityOfPage)\n {\n return $this->setProperty('mainEntityOfPage', $mainEntityOfPage);\n }\n\n /**\n * A pointer to products or services offered by the organization or person.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\OfferContract|\\Spatie\\SchemaOrg\\Contracts\\OfferContract[] $makesOffer\n *\n * @return static\n *\n * @see https://schema.org/makesOffer\n * @link http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsTerms\n */\n public function makesOffer($makesOffer)\n {\n return $this->setProperty('makesOffer', $makesOffer);\n }\n\n /**\n * A URL to a map of the place.\n *\n * @param string|string[] $map\n *\n * @return static\n *\n * @see https://schema.org/map\n */\n public function map($map)\n {\n return $this->setProperty('map', $map);\n }\n\n /**\n * A URL to a map of the place.\n *\n * @param string|string[] $maps\n *\n * @return static\n *\n * @see https://schema.org/maps\n */\n public function maps($maps)\n {\n return $this->setProperty('maps', $maps);\n }\n\n /**\n * The total number of individuals that may attend an event or venue.\n *\n * @param int|int[] $maximumAttendeeCapacity\n *\n * @return static\n *\n * @see https://schema.org/maximumAttendeeCapacity\n */\n public function maximumAttendeeCapacity($maximumAttendeeCapacity)\n {\n return $this->setProperty('maximumAttendeeCapacity', $maximumAttendeeCapacity);\n }\n\n /**\n * A member of an Organization or a ProgramMembership. Organizations can be\n * members of organizations; ProgramMembership is typically for individuals.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\OrganizationContract|\\Spatie\\SchemaOrg\\Contracts\\OrganizationContract[]|\\Spatie\\SchemaOrg\\Contracts\\PersonContract|\\Spatie\\SchemaOrg\\Contracts\\PersonContract[] $member\n *\n * @return static\n *\n * @see https://schema.org/member\n */\n public function member($member)\n {\n return $this->setProperty('member', $member);\n }\n\n /**\n * An Organization (or ProgramMembership) to which this Person or\n * Organization belongs.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\OrganizationContract|\\Spatie\\SchemaOrg\\Contracts\\OrganizationContract[]|\\Spatie\\SchemaOrg\\Contracts\\ProgramMembershipContract|\\Spatie\\SchemaOrg\\Contracts\\ProgramMembershipContract[] $memberOf\n *\n * @return static\n *\n * @see https://schema.org/memberOf\n */\n public function memberOf($memberOf)\n {\n return $this->setProperty('memberOf', $memberOf);\n }\n\n /**\n * A member of this organization.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\OrganizationContract|\\Spatie\\SchemaOrg\\Contracts\\OrganizationContract[]|\\Spatie\\SchemaOrg\\Contracts\\PersonContract|\\Spatie\\SchemaOrg\\Contracts\\PersonContract[] $members\n *\n * @return static\n *\n * @see https://schema.org/members\n */\n public function members($members)\n {\n return $this->setProperty('members', $members);\n }\n\n /**\n * The North American Industry Classification System (NAICS) code for a\n * particular organization or business person.\n *\n * @param string|string[] $naics\n *\n * @return static\n *\n * @see https://schema.org/naics\n * @link http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsTerms\n */\n public function naics($naics)\n {\n return $this->setProperty('naics', $naics);\n }\n\n /**\n * The name of the item.\n *\n * @param string|string[] $name\n *\n * @return static\n *\n * @see https://schema.org/name\n */\n public function name($name)\n {\n return $this->setProperty('name', $name);\n }\n\n /**\n * nonprofit Status indicates the legal status of a non-profit organization\n * in its primary place of business.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\NonprofitTypeContract|\\Spatie\\SchemaOrg\\Contracts\\NonprofitTypeContract[] $nonprofitStatus\n *\n * @return static\n *\n * @see https://schema.org/nonprofitStatus\n * @see http://pending.schema.org\n * @link https://github.com/schemaorg/schemaorg/issues/2543\n */\n public function nonprofitStatus($nonprofitStatus)\n {\n return $this->setProperty('nonprofitStatus', $nonprofitStatus);\n }\n\n /**\n * The number of employees in an organization e.g. business.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\QuantitativeValueContract|\\Spatie\\SchemaOrg\\Contracts\\QuantitativeValueContract[] $numberOfEmployees\n *\n * @return static\n *\n * @see https://schema.org/numberOfEmployees\n */\n public function numberOfEmployees($numberOfEmployees)\n {\n return $this->setProperty('numberOfEmployees', $numberOfEmployees);\n }\n\n /**\n * The general opening hours for a business. Opening hours can be specified\n * as a weekly time range, starting with days, then times per day. Multiple\n * days can be listed with commas ',' separating each day. Day or time\n * ranges are specified using a hyphen '-'.\n * \n * * Days are specified using the following two-letter combinations:\n * ```Mo```, ```Tu```, ```We```, ```Th```, ```Fr```, ```Sa```, ```Su```.\n * * Times are specified using 24:00 time. For example, 3pm is specified as\n * ```15:00```. \n * * Here is an example: ```<time itemprop=\"openingHours\" datetime=\"Tu,Th\n * 16:00-20:00\">Tuesdays and Thursdays 4-8pm</time>```.\n * * If a business is open 7 days a week, then it can be specified as\n * ```<time itemprop=\"openingHours\" datetime=\"Mo-Su\">Monday through Sunday,\n * all day</time>```.\n *\n * @param string|string[] $openingHours\n *\n * @return static\n *\n * @see https://schema.org/openingHours\n */\n public function openingHours($openingHours)\n {\n return $this->setProperty('openingHours', $openingHours);\n }\n\n /**\n * The opening hours of a certain place.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\OpeningHoursSpecificationContract|\\Spatie\\SchemaOrg\\Contracts\\OpeningHoursSpecificationContract[] $openingHoursSpecification\n *\n * @return static\n *\n * @see https://schema.org/openingHoursSpecification\n * @link http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsTerms\n */\n public function openingHoursSpecification($openingHoursSpecification)\n {\n return $this->setProperty('openingHoursSpecification', $openingHoursSpecification);\n }\n\n /**\n * For an [[Organization]] (often but not necessarily a\n * [[NewsMediaOrganization]]), a description of organizational ownership\n * structure; funding and grants. In a news/media setting, this is with\n * particular reference to editorial independence. Note that the\n * [[funder]] is also available and can be used to make basic funder\n * information machine-readable.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\AboutPageContract|\\Spatie\\SchemaOrg\\Contracts\\AboutPageContract[]|\\Spatie\\SchemaOrg\\Contracts\\CreativeWorkContract|\\Spatie\\SchemaOrg\\Contracts\\CreativeWorkContract[]|string|string[] $ownershipFundingInfo\n *\n * @return static\n *\n * @see https://schema.org/ownershipFundingInfo\n * @see http://pending.schema.org\n */\n public function ownershipFundingInfo($ownershipFundingInfo)\n {\n return $this->setProperty('ownershipFundingInfo', $ownershipFundingInfo);\n }\n\n /**\n * Products owned by the organization or person.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\OwnershipInfoContract|\\Spatie\\SchemaOrg\\Contracts\\OwnershipInfoContract[]|\\Spatie\\SchemaOrg\\Contracts\\ProductContract|\\Spatie\\SchemaOrg\\Contracts\\ProductContract[] $owns\n *\n * @return static\n *\n * @see https://schema.org/owns\n * @link http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsTerms\n */\n public function owns($owns)\n {\n return $this->setProperty('owns', $owns);\n }\n\n /**\n * The larger organization that this organization is a [[subOrganization]]\n * of, if any.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\OrganizationContract|\\Spatie\\SchemaOrg\\Contracts\\OrganizationContract[] $parentOrganization\n *\n * @return static\n *\n * @see https://schema.org/parentOrganization\n */\n public function parentOrganization($parentOrganization)\n {\n return $this->setProperty('parentOrganization', $parentOrganization);\n }\n\n /**\n * Cash, Credit Card, Cryptocurrency, Local Exchange Tradings System, etc.\n *\n * @param string|string[] $paymentAccepted\n *\n * @return static\n *\n * @see https://schema.org/paymentAccepted\n */\n public function paymentAccepted($paymentAccepted)\n {\n return $this->setProperty('paymentAccepted', $paymentAccepted);\n }\n\n /**\n * A photograph of this place.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\ImageObjectContract|\\Spatie\\SchemaOrg\\Contracts\\ImageObjectContract[]|\\Spatie\\SchemaOrg\\Contracts\\PhotographContract|\\Spatie\\SchemaOrg\\Contracts\\PhotographContract[] $photo\n *\n * @return static\n *\n * @see https://schema.org/photo\n */\n public function photo($photo)\n {\n return $this->setProperty('photo', $photo);\n }\n\n /**\n * Photographs of this place.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\ImageObjectContract|\\Spatie\\SchemaOrg\\Contracts\\ImageObjectContract[]|\\Spatie\\SchemaOrg\\Contracts\\PhotographContract|\\Spatie\\SchemaOrg\\Contracts\\PhotographContract[] $photos\n *\n * @return static\n *\n * @see https://schema.org/photos\n */\n public function photos($photos)\n {\n return $this->setProperty('photos', $photos);\n }\n\n /**\n * Indicates a potential Action, which describes an idealized action in\n * which this thing would play an 'object' role.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\ActionContract|\\Spatie\\SchemaOrg\\Contracts\\ActionContract[] $potentialAction\n *\n * @return static\n *\n * @see https://schema.org/potentialAction\n */\n public function potentialAction($potentialAction)\n {\n return $this->setProperty('potentialAction', $potentialAction);\n }\n\n /**\n * The price range of the business, for example ```$$$```.\n *\n * @param string|string[] $priceRange\n *\n * @return static\n *\n * @see https://schema.org/priceRange\n */\n public function priceRange($priceRange)\n {\n return $this->setProperty('priceRange', $priceRange);\n }\n\n /**\n * A flag to signal that the [[Place]] is open to public visitors. If this\n * property is omitted there is no assumed default boolean value\n *\n * @param bool|bool[] $publicAccess\n *\n * @return static\n *\n * @see https://schema.org/publicAccess\n */\n public function publicAccess($publicAccess)\n {\n return $this->setProperty('publicAccess', $publicAccess);\n }\n\n /**\n * The publishingPrinciples property indicates (typically via [[URL]]) a\n * document describing the editorial principles of an [[Organization]] (or\n * individual e.g. a [[Person]] writing a blog) that relate to their\n * activities as a publisher, e.g. ethics or diversity policies. When\n * applied to a [[CreativeWork]] (e.g. [[NewsArticle]]) the principles are\n * those of the party primarily responsible for the creation of the\n * [[CreativeWork]].\n * \n * While such policies are most typically expressed in natural language,\n * sometimes related information (e.g. indicating a [[funder]]) can be\n * expressed using schema.org terminology.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\CreativeWorkContract|\\Spatie\\SchemaOrg\\Contracts\\CreativeWorkContract[]|string|string[] $publishingPrinciples\n *\n * @return static\n *\n * @see https://schema.org/publishingPrinciples\n */\n public function publishingPrinciples($publishingPrinciples)\n {\n return $this->setProperty('publishingPrinciples', $publishingPrinciples);\n }\n\n /**\n * A review of the item.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\ReviewContract|\\Spatie\\SchemaOrg\\Contracts\\ReviewContract[] $review\n *\n * @return static\n *\n * @see https://schema.org/review\n */\n public function review($review)\n {\n return $this->setProperty('review', $review);\n }\n\n /**\n * Review of the item.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\ReviewContract|\\Spatie\\SchemaOrg\\Contracts\\ReviewContract[] $reviews\n *\n * @return static\n *\n * @see https://schema.org/reviews\n */\n public function reviews($reviews)\n {\n return $this->setProperty('reviews', $reviews);\n }\n\n /**\n * URL of a reference Web page that unambiguously indicates the item's\n * identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or\n * official website.\n *\n * @param string|string[] $sameAs\n *\n * @return static\n *\n * @see https://schema.org/sameAs\n */\n public function sameAs($sameAs)\n {\n return $this->setProperty('sameAs', $sameAs);\n }\n\n /**\n * A pointer to products or services sought by the organization or person\n * (demand).\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\DemandContract|\\Spatie\\SchemaOrg\\Contracts\\DemandContract[] $seeks\n *\n * @return static\n *\n * @see https://schema.org/seeks\n * @link http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsTerms\n */\n public function seeks($seeks)\n {\n return $this->setProperty('seeks', $seeks);\n }\n\n /**\n * The geographic area where the service is provided.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\AdministrativeAreaContract|\\Spatie\\SchemaOrg\\Contracts\\AdministrativeAreaContract[]|\\Spatie\\SchemaOrg\\Contracts\\GeoShapeContract|\\Spatie\\SchemaOrg\\Contracts\\GeoShapeContract[]|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract|\\Spatie\\SchemaOrg\\Contracts\\PlaceContract[] $serviceArea\n *\n * @return static\n *\n * @see https://schema.org/serviceArea\n */\n public function serviceArea($serviceArea)\n {\n return $this->setProperty('serviceArea', $serviceArea);\n }\n\n /**\n * A slogan or motto associated with the item.\n *\n * @param string|string[] $slogan\n *\n * @return static\n *\n * @see https://schema.org/slogan\n */\n public function slogan($slogan)\n {\n return $this->setProperty('slogan', $slogan);\n }\n\n /**\n * Indicates whether it is allowed to smoke in the place, e.g. in the\n * restaurant, hotel or hotel room.\n *\n * @param bool|bool[] $smokingAllowed\n *\n * @return static\n *\n * @see https://schema.org/smokingAllowed\n * @link https://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#STI_Accommodation_Ontology\n */\n public function smokingAllowed($smokingAllowed)\n {\n return $this->setProperty('smokingAllowed', $smokingAllowed);\n }\n\n /**\n * The special opening hours of a certain place.\n * \n * Use this to explicitly override general opening hours brought in scope by\n * [[openingHoursSpecification]] or [[openingHours]].\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\OpeningHoursSpecificationContract|\\Spatie\\SchemaOrg\\Contracts\\OpeningHoursSpecificationContract[] $specialOpeningHoursSpecification\n *\n * @return static\n *\n * @see https://schema.org/specialOpeningHoursSpecification\n */\n public function specialOpeningHoursSpecification($specialOpeningHoursSpecification)\n {\n return $this->setProperty('specialOpeningHoursSpecification', $specialOpeningHoursSpecification);\n }\n\n /**\n * A person or organization that supports a thing through a pledge, promise,\n * or financial contribution. e.g. a sponsor of a Medical Study or a\n * corporate sponsor of an event.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\OrganizationContract|\\Spatie\\SchemaOrg\\Contracts\\OrganizationContract[]|\\Spatie\\SchemaOrg\\Contracts\\PersonContract|\\Spatie\\SchemaOrg\\Contracts\\PersonContract[] $sponsor\n *\n * @return static\n *\n * @see https://schema.org/sponsor\n */\n public function sponsor($sponsor)\n {\n return $this->setProperty('sponsor', $sponsor);\n }\n\n /**\n * A relationship between two organizations where the first includes the\n * second, e.g., as a subsidiary. See also: the more specific 'department'\n * property.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\OrganizationContract|\\Spatie\\SchemaOrg\\Contracts\\OrganizationContract[] $subOrganization\n *\n * @return static\n *\n * @see https://schema.org/subOrganization\n */\n public function subOrganization($subOrganization)\n {\n return $this->setProperty('subOrganization', $subOrganization);\n }\n\n /**\n * A CreativeWork or Event about this Thing.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\CreativeWorkContract|\\Spatie\\SchemaOrg\\Contracts\\CreativeWorkContract[]|\\Spatie\\SchemaOrg\\Contracts\\EventContract|\\Spatie\\SchemaOrg\\Contracts\\EventContract[] $subjectOf\n *\n * @return static\n *\n * @see https://schema.org/subjectOf\n * @link https://github.com/schemaorg/schemaorg/issues/1670\n */\n public function subjectOf($subjectOf)\n {\n return $this->setProperty('subjectOf', $subjectOf);\n }\n\n /**\n * The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US\n * or the CIF/NIF in Spain.\n *\n * @param string|string[] $taxID\n *\n * @return static\n *\n * @see https://schema.org/taxID\n * @link http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsTerms\n */\n public function taxID($taxID)\n {\n return $this->setProperty('taxID', $taxID);\n }\n\n /**\n * The telephone number.\n *\n * @param string|string[] $telephone\n *\n * @return static\n *\n * @see https://schema.org/telephone\n */\n public function telephone($telephone)\n {\n return $this->setProperty('telephone', $telephone);\n }\n\n /**\n * A page providing information on how to book a tour of some [[Place]],\n * such as an [[Accommodation]] or [[ApartmentComplex]] in a real estate\n * setting, as well as other kinds of tours as appropriate.\n *\n * @param string|string[] $tourBookingPage\n *\n * @return static\n *\n * @see https://schema.org/tourBookingPage\n * @see http://pending.schema.org\n * @link https://github.com/schemaorg/schemaorg/issues/2373\n */\n public function tourBookingPage($tourBookingPage)\n {\n return $this->setProperty('tourBookingPage', $tourBookingPage);\n }\n\n /**\n * For an [[Organization]] (typically a [[NewsMediaOrganization]]), a\n * statement about policy on use of unnamed sources and the decision process\n * required.\n *\n * @param \\Spatie\\SchemaOrg\\Contracts\\CreativeWorkContract|\\Spatie\\SchemaOrg\\Contracts\\CreativeWorkContract[]|string|string[] $unnamedSourcesPolicy\n *\n * @return static\n *\n * @see https://schema.org/unnamedSourcesPolicy\n * @see http://pending.schema.org\n */\n public function unnamedSourcesPolicy($unnamedSourcesPolicy)\n {\n return $this->setProperty('unnamedSourcesPolicy', $unnamedSourcesPolicy);\n }\n\n /**\n * URL of the item.\n *\n * @param string|string[] $url\n *\n * @return static\n *\n * @see https://schema.org/url\n */\n public function url($url)\n {\n return $this->setProperty('url', $url);\n }\n\n /**\n * The Value-added Tax ID of the organization or person.\n *\n * @param string|string[] $vatID\n *\n * @return static\n *\n * @see https://schema.org/vatID\n * @link http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsTerms\n */\n public function vatID($vatID)\n {\n return $this->setProperty('vatID', $vatID);\n }\n\n}\n"} +{"text": "#\n# $Id: Makefile.fpc,v 1.32 2005/05/05 12:59:59 peter Exp $\n#\n# Makefile.fpc for FP IDE\n#\n\n[package]\nname=ide\nversion=3.3.1\n\n[target]\ndirs=compiler\nprograms=fp\nrst=fpstrings\n\n[install]\ndatadir=$(INSTALL_BASEDIR)/ide\nfpcpackage=y\n\n[compiler]\noptions=-Sg\n\n[require]\npackages=fv gdbint regexpr chm fcl-base fcl-xml\npackages_go32v2=graph\nlibc=y\n\n[default]\nfpcdir=..\n\n[prerules]\n#\n# Automatic detection if libgdb.a is present\n#\n\n# set default value for PPC_TARGET\nifndef PPC_TARGET\nPPC_TARGET=$(CPU_TARGET)\nendif\n\n# do not add -d$(CPU_TARGET)\noverride NOCPUDEF=1\n# Use PPC_TARGET instead\noverride FPCOPT+= -d$(PPC_TARGET)\n\nifndef NOGDB\n\nifeq ($(FULL_TARGET),i386-win32)\nneedlinkparam=1\nendif\n\n\nifeq ($(FULL_TARGET),x86_64-win64)\nneedlinkparam=1\nendif\n\nifeq ($(OS_TARGET),freebsd)\nneedusrlocallib=1\nneednostdlib=1\nendif\nifeq ($(OS_TARGET),openbsd)\nneedusrlocallib=1\nneedusrlib=1\nneednostdlib=1\nendif\nifeq ($(OS_TARGET),netbsd)\nneednostdlib=1\nendif\nifeq ($(OS_TARGET),aix)\nneednostdlib=1\nendif\n\nifdef needlinkparam\noverride SPECIALLINK=-Xe -k--allow-multiple-definition\nendif\n\nifdef needusrlib\noverride SPECIALLINK+=-Fl/usr/lib\nendif\nifdef needusrlocallib\noverride SPECIALLINK+=-Fl/usr/local/lib\nendif\nifdef neednostdlib\noverride SPECIALLINK+=-Xd\nendif\n\nifeq ($(OS_TARGET),aix)\noverride SPECIALLINK+=6fl/opt/freeware/lib -k-bbigtoc\nendif\n\n# Try to find GDB library\n# Look for a valid GDBLIBDIR environment variable\nifdef GDBLIBDIR\noverride LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))\nendif\n\n# Use default dirs if not available\nifeq ($(LIBGDBFILE),)\n# Default locations <target>/<cpu> (linux) or <target> (win32,go32v2) only\noverride GDBLIBDIR=$(wildcard $(FPCDIR)/libgdb/$(OS_TARGET)/$(CPU_TARGET))\nifeq ($(GDBLIBDIR),)\noverride GDBLIBDIR=$(FPCDIR)/libgdb/$(OS_TARGET)\nendif\n# Detect if libgdb.a is available\noverride LIBGDBFILE:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))\nendif\n\n# No custom libgdb.a found, try using system default library if available\nifeq ($(LIBGDBFILE),)\nSYSLIBDIR=/lib /usr/lib /usr/local/lib\n# Detect if libgdb.a is available\noverride LIBGDBFILE=$(firstword $(wildcard $(addsuffix /libgdb.a,$(SYSLIBDIR))))\nifneq (${LIBGDBFILE},)\n$(warning Using system default libgdb file located in ${LIBGDBFILE})\nGDBLIBDIR=$(dir ${LIBGDBFILE})\nendif\nendif\n\n# Disable GDB when no libgdb.a found\nifeq ($(LIBGDBFILE),)\nGDB=\nelse\nGDB=1\n# Detect if gdblib.inc is available\noverride LIBGDBINC:=$(firstword $(wildcard $(addsuffix /gdblib.inc,$(GDBLIBDIR))))\nifeq ($(LIBGDBINC),)\nGDBLIBINCFOUND=0\nGDBLIBINCCOND=\nelse\nGDBLIBINCFOUND=1\nGDBLIBINCCOND=-dUSE_GDBLIBINC -I$(GDBLIBDIR)\nendif\nendif\n\nifdef GDB\n# The gdbint is already included due the gdbint package dependency\noverride LIBDIR+=$(GDBLIBDIR)\nendif\n\nelse\n\n# Disable\nGDB=\n\nendif #NOGDB\n\n\n[rules]\n.NOTPARALLEL:\n\n.PHONY: compilerunits compilerclean \\\n nogdb gdb all \\\n clean_compiler clean testgdb postgdbinfo\n\nclean: fpc_cleanall\n\ndistclean: clean compilerclean\n\n#\n# GDB detection\n#\nifndef NOGDB\n\nifdef GDB\ntestgdb:\n @$(ECHO) LibGDB found in $(LIBGDBFILE)\n\npostgdbinfo:\n @$(ECHO) LibGDB was found, IDE has Debugger support\n\nelse\noverride COMPILER+=-dNODEBUG\ntestgdb:\n @$(ECHO) LibGDB not found\n @$(ECHO) LIBGDBFILE=$(LIBGDBFILE)\n @$(ECHO) GDBLIBDIR=$(GDBLIBDIR)\n @$(ECHO) $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR)))\n\npostgdbinfo:\n @$(ECHO) LibGDB was not found, IDE has no Debugger support\nendif\n\nelse\ntestgdb:\n @$(ECHO) Building without Debugger\npostgdbinfo:\n @$(ECHO) Debugger disabled, IDE has no Debugger support\noverride COMPILER+=-dNODEBUG\nendif # NOGDB\n\n\n#\n# Compiler\n#\n\ncompilerunits : compiler/$(FPCMADE)\ncompiler/$(FPCMADE):\n $(MAKE) -C compiler all\n\ncompilerclean :\n $(MAKE) -C compiler clean\n\n#\n# Build targets\n#\n# building happends in 2 steps, first the packages, compiler\n# dirs are build. In the second step the IDE is build. This is\n# required because it needs to detect which compiler version\n# to use.\n#\nfp$(EXEEXT): $(wildcard *.pas) $(wildcard *.inc)\n $(COMPILER) $(GDBLIBINCCOND) $(SPECIALLINK) fp.pas\n\nbuildfp:\n $(MAKE) compilerunits\n $(MAKE) testgdb\n $(MAKE) fpc_all\n $(MAKE) postgdbinfo\n\ngdb:\n# $(MAKE) -C ../packages/base/gdbint\n $(MAKE) buildfp\n\nnogdb:\n $(MAKE) buildfp NOGDB=1\n\n#\n# Default targets\n#\n\n# By default we try to create the ide with full debugging support,\nall: gdb\n\n# This is necessary because we don't have all units separate in the\n# units targets\nclean: cleanall\n\n#\n# Installation\n#\n\nifndef UNIXHier\noverride INSTALL_DATADIR=$(INSTALL_BINDIR)\nendif\n\ninstall: fpc_install\n $(MKDIR) $(INSTALL_DATADIR)\n $(MKDIR) $(INSTALL_DOCDIR)\n $(INSTALL) fp.ans $(wildcard *.pt) $(wildcard *.tdf) $(INSTALL_DATADIR)\nifeq ($(OS_TARGET),win32)\n $(INSTALL) fp32.ico $(INSTALL_DATADIR)\nendif\n $(INSTALL) readme.ide $(INSTALL_DOCDIR)\n\n\n#\n# Misc\n#\nclean_compiler:\n $(MAKE) -C compiler clean\n $(MAKE) -C ../compiler ppuclean\n"} +{"text": "fileFormatVersion: 2\nguid: f0a1a700f38c54840991dad99a98ca25\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n defaultReferences: []\n executionOrder: 0\n icon: {instanceID: 0}\n userData: \n assetBundleName: \n assetBundleVariant: \n"} +{"text": "/* \n * \n * Confidential Information of Telekinesys Research Limited (t/a Havok). Not for disclosure or distribution without Havok's\n * prior written consent. This software contains code, techniques and know-how which is confidential and proprietary to Havok.\n * Level 2 and Level 3 source code contains trade secrets of Havok. Havok Software (C) Copyright 1999-2010 Telekinesys Research Limited t/a Havok. All Rights Reserved. Use of this software is subject to the terms of an end user license agreement.\n * \n */\n\n#ifndef HK_COLLIDE2_HEIGHT_FIELD_COLLISION_SPHERES_AGENT_H\n#define HK_COLLIDE2_HEIGHT_FIELD_COLLISION_SPHERES_AGENT_H\n\n#include <Physics/Collide/Agent/Util/LinearCast/hkpIterativeLinearCastAgent.h>\n\nvoid HK_CALL hkpHeightFieldAgent_registerSelf();\n\n\t/// This agent performs the collision between a set of spheres and a 3 dimensional function\nclass hkpHeightFieldAgent : public hkpCollisionAgent\n{\n\tpublic:\n\tHK_DECLARE_CLASS_ALLOCATOR(HK_MEMORY_CLASS_BASE);\n\t\t\t/// register the this agent with everything\n\t\tstatic void HK_CALL registerAgent(hkpCollisionDispatcher* dispatcher);\n\n\t\t\t// hkpCollisionAgent interface implementation.\n virtual inline void processCollision(const hkpCdBody& bodyA, const hkpCdBody& bodyB, const hkpProcessCollisionInput& input, hkpProcessCollisionOutput& result);\n\n\t\t\t// hkpCollisionAgent interface implementation.\n\t\tvirtual void getPenetrations(const hkpCdBody& bodyA, const hkpCdBody& bodyB, const hkpCollisionInput& input, hkpCdBodyPairCollector& collector );\n\n\t\t\t// hkpCollisionAgent interface implementation.\n\t\tstatic void HK_CALL staticGetPenetrations(const hkpCdBody& bodyA, const hkpCdBody& bodyB, const hkpCollisionInput& input, hkpCdBodyPairCollector& collector );\n\n\t\t\t// hkpCollisionAgent interface implementation.\n\t\tvirtual void getClosestPoints( const hkpCdBody& bodyA, const hkpCdBody& bodyB, const hkpCollisionInput& input, hkpCdPointCollector& collector); \n\t\t\t\n\t\t\t// hkpCollisionAgent interface implementation.\n\t\tstatic void HK_CALL staticGetClosestPoints( const hkpCdBody& bodyA, const hkpCdBody& bodyB, const hkpCollisionInput& input, class hkpCdPointCollector& collector );\n\n\n\t\tvirtual void linearCast( const hkpCdBody& bodyA, const hkpCdBody& bodyB, const hkpLinearCastCollisionInput& input, hkpCdPointCollector& collector, hkpCdPointCollector* startCollector );\n\n\t\tstatic void HK_CALL staticLinearCast( const hkpCdBody& bodyA, const hkpCdBody& bodyB, const hkpLinearCastCollisionInput& input, hkpCdPointCollector& collector, hkpCdPointCollector* startCollector );\n\n\n\t\t\t/// hkAgent interface implementation\n\t\tvirtual void cleanup( hkCollisionConstraintOwner& constraintOwner );\n\n\tprotected:\n\t\t\t/// Constructor, called by the createXXX functions\n\t\thkpHeightFieldAgent(const hkpCdBody& A,const hkpCdBody& B,const hkpCollisionInput& input, hkpContactMgr* mgr);\n\n\t\t\t/// Destructor\n\t\t~hkpHeightFieldAgent(){}\n\n\tprotected:\n\t\t\t/// create functions, known by the hkpCollisionDispatcher\n\t\tstatic hkpCollisionAgent* HK_CALL createHeightFieldAAgent( const hkpCdBody& A, const hkpCdBody& B, const hkpCollisionInput& input, hkpContactMgr* mgr );\n\t\tstatic hkpCollisionAgent* HK_CALL createHeightFieldBAgent( const hkpCdBody& A, const hkpCdBody& B, const hkpCollisionInput& input, hkpContactMgr* mgr );\n\n\t\thkArray<hkContactPointId> m_contactPointId;\n};\n\n#endif // HK_COLLIDE2_HEIGHT_FIELD_COLLISION_SPHERES_AGENT_H\n\n/*\n* Havok SDK - NO SOURCE PC DOWNLOAD, BUILD(#20101115)\n* \n* Confidential Information of Havok. (C) Copyright 1999-2010\n* Telekinesys Research Limited t/a Havok. All Rights Reserved. The Havok\n* Logo, and the Havok buzzsaw logo are trademarks of Havok. Title, ownership\n* rights, and intellectual property rights in the Havok software remain in\n* Havok and/or its suppliers.\n* \n* Use of this software for evaluation purposes is subject to and indicates\n* acceptance of the End User licence Agreement for this product. A copy of\n* the license is included with this software and is also available at www.havok.com/tryhavok.\n* \n*/\n"} +{"text": "// Copyright (c) 2012 Ecma International. All rights reserved.\n// Ecma International makes this code available under the terms and conditions set\n// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the\n// \"Use Terms\"). Any redistribution of this code must retain the above\n// copyright and this notice and otherwise comply with the Use Terms.\n\n/*---\nes5id: 15.2.3.6-4-540-8\ndescription: >\n Object.defineProperty fails to update [[Get]] and [[Set]]\n attributes of an indexed accessor property 'P' whose\n [[Configurable]] attribute is false, 'O' is an Arguments object\n (8.12.9 step 11.a)\nincludes: [propertyHelper.js]\n---*/\n\nvar obj = (function () {\n return arguments;\n}());\n\nobj.verifySetFunction = \"data\";\nvar getFunc = function () {\n return obj.verifySetFunction;\n};\nvar setFunc = function (value) {\n obj.verifySetFunction = value;\n};\nObject.defineProperty(obj, \"0\", {\n get: getFunc,\n set: setFunc,\n configurable: false\n});\n\nvar result = false;\ntry {\n Object.defineProperty(obj, \"0\", {\n get: function () {\n return 100;\n }\n });\n} catch (e) {\n result = e instanceof TypeError;\n verifyEqualTo(obj, \"0\", getFunc());\n\n verifyWritable(obj, \"0\", \"verifySetFunction\");\n\n verifyNotEnumerable(obj, \"0\");\n\n verifyNotConfigurable(obj, \"0\");\n}\n\ntry {\n Object.defineProperty(obj, \"0\", {\n set: function (value) {\n obj.verifySetFunction1 = value;\n }\n });\n} catch (e) {\n if (!result ) {\n $ERROR('Expected result to be true, actually ' + result );\n }\n \n verifyEqualTo(obj, \"0\", getFunc());\n\n verifyWritable(obj, \"0\", \"verifySetFunction\");\n\n verifyNotEnumerable(obj, \"0\");\n\n verifyNotConfigurable(obj, \"0\");\n\n if (!(e instanceof TypeError)) {\n $ERROR(\"Expected TypeError, got \" + e);\n }\n\n}\n"} +{"text": "import os\nimport imp\nfrom itertools import product, starmap\nimport distutils.command.install_lib as orig\n\n\nclass install_lib(orig.install_lib):\n \"\"\"Don't add compiled flags to filenames of non-Python files\"\"\"\n\n def run(self):\n self.build()\n outfiles = self.install()\n if outfiles is not None:\n # always compile, in case we have any extension stubs to deal with\n self.byte_compile(outfiles)\n\n def get_exclusions(self):\n \"\"\"\n Return a collections.Sized collections.Container of paths to be\n excluded for single_version_externally_managed installations.\n \"\"\"\n all_packages = (\n pkg\n for ns_pkg in self._get_SVEM_NSPs()\n for pkg in self._all_packages(ns_pkg)\n )\n\n excl_specs = product(all_packages, self._gen_exclusion_paths())\n return set(starmap(self._exclude_pkg_path, excl_specs))\n\n def _exclude_pkg_path(self, pkg, exclusion_path):\n \"\"\"\n Given a package name and exclusion path within that package,\n compute the full exclusion path.\n \"\"\"\n parts = pkg.split('.') + [exclusion_path]\n return os.path.join(self.install_dir, *parts)\n\n @staticmethod\n def _all_packages(pkg_name):\n \"\"\"\n >>> list(install_lib._all_packages('foo.bar.baz'))\n ['foo.bar.baz', 'foo.bar', 'foo']\n \"\"\"\n while pkg_name:\n yield pkg_name\n pkg_name, sep, child = pkg_name.rpartition('.')\n\n def _get_SVEM_NSPs(self):\n \"\"\"\n Get namespace packages (list) but only for\n single_version_externally_managed installations and empty otherwise.\n \"\"\"\n # TODO: is it necessary to short-circuit here? i.e. what's the cost\n # if get_finalized_command is called even when namespace_packages is\n # False?\n if not self.distribution.namespace_packages:\n return []\n\n install_cmd = self.get_finalized_command('install')\n svem = install_cmd.single_version_externally_managed\n\n return self.distribution.namespace_packages if svem else []\n\n @staticmethod\n def _gen_exclusion_paths():\n \"\"\"\n Generate file paths to be excluded for namespace packages (bytecode\n cache files).\n \"\"\"\n # always exclude the package module itself\n yield '__init__.py'\n\n yield '__init__.pyc'\n yield '__init__.pyo'\n\n if not hasattr(imp, 'get_tag'):\n return\n\n base = os.path.join('__pycache__', '__init__.' + imp.get_tag())\n yield base + '.pyc'\n yield base + '.pyo'\n yield base + '.opt-1.pyc'\n yield base + '.opt-2.pyc'\n\n def copy_tree(\n self, infile, outfile,\n preserve_mode=1, preserve_times=1, preserve_symlinks=0, level=1\n ):\n assert preserve_mode and preserve_times and not preserve_symlinks\n exclude = self.get_exclusions()\n\n if not exclude:\n return orig.install_lib.copy_tree(self, infile, outfile)\n\n # Exclude namespace package __init__.py* files from the output\n\n from setuptools.archive_util import unpack_directory\n from distutils import log\n\n outfiles = []\n\n def pf(src, dst):\n if dst in exclude:\n log.warn(\"Skipping installation of %s (namespace package)\",\n dst)\n return False\n\n log.info(\"copying %s -> %s\", src, os.path.dirname(dst))\n outfiles.append(dst)\n return dst\n\n unpack_directory(infile, outfile, pf)\n return outfiles\n\n def get_outputs(self):\n outputs = orig.install_lib.get_outputs(self)\n exclude = self.get_exclusions()\n if exclude:\n return [f for f in outputs if f not in exclude]\n return outputs\n"} +{"text": "StartChar: uni0620.medi\nEncoding: 65977 -1 572\nWidth: 244\nFlags: HW\nAnchorPoint: \"TashkilAbove\" 83 801 basechar 0\nAnchorPoint: \"TashkilBelow\" 117 -327 basechar 0\nLayerCount: 3\nFore\nRefer: 215 -1 N 1 0 0 1 127 -73 2\nRefer: 10 -1 N 1 0 0 1 0 0 2\nEndChar\n"} +{"text": ";(function(undefined) {\n 'use strict';\n\n if (typeof sigma === 'undefined')\n throw 'sigma is not declared';\n\n // Initialize packages:\n sigma.utils.pkg('sigma.canvas.edges.labels');\n\n /**\n * This label renderer will just display the label on the line of the edge.\n * The label is rendered at half distance of the edge extremities, and is\n * always oriented from left to right on the top side of the line.\n *\n * @param {object} edge The edge object.\n * @param {object} source node The edge source node.\n * @param {object} target node The edge target node.\n * @param {CanvasRenderingContext2D} context The canvas context.\n * @param {configurable} settings The settings function.\n */\n sigma.canvas.edges.labels.def =\n function(edge, source, target, context, settings) {\n if (typeof edge.label !== 'string' || source == target)\n return;\n\n var prefix = settings('prefix') || '',\n size = edge[prefix + 'size'] || 1;\n\n if (size < settings('edgeLabelThreshold'))\n return;\n\n if (0 === settings('edgeLabelSizePowRatio'))\n throw '\"edgeLabelSizePowRatio\" must not be 0.';\n\n var fontSize,\n x = (source[prefix + 'x'] + target[prefix + 'x']) / 2,\n y = (source[prefix + 'y'] + target[prefix + 'y']) / 2,\n dX = target[prefix + 'x'] - source[prefix + 'x'],\n dY = target[prefix + 'y'] - source[prefix + 'y'],\n sign = (source[prefix + 'x'] < target[prefix + 'x']) ? 1 : -1,\n angle = Math.atan2(dY * sign, dX * sign);\n\n // The font size is sublineraly proportional to the edge size, in order to\n // avoid very large labels on screen.\n // This is achieved by f(x) = x * x^(-1/ a), where 'x' is the size and 'a'\n // is the edgeLabelSizePowRatio. Notice that f(1) = 1.\n // The final form is:\n // f'(x) = b * x * x^(-1 / a), thus f'(1) = b. Application:\n // fontSize = defaultEdgeLabelSize if edgeLabelSizePowRatio = 1\n fontSize = (settings('edgeLabelSize') === 'fixed') ?\n settings('defaultEdgeLabelSize') :\n settings('defaultEdgeLabelSize') *\n size *\n Math.pow(size, -1 / settings('edgeLabelSizePowRatio'));\n\n context.save();\n\n if (edge.active) {\n context.font = [\n settings('activeFontStyle'),\n fontSize + 'px',\n settings('activeFont') || settings('font')\n ].join(' ');\n\n context.fillStyle =\n settings('edgeActiveColor') === 'edge' ?\n (edge.active_color || settings('defaultEdgeActiveColor')) :\n settings('defaultEdgeLabelActiveColor');\n }\n else {\n context.font = [\n settings('fontStyle'),\n fontSize + 'px',\n settings('font')\n ].join(' ');\n\n context.fillStyle =\n (settings('edgeLabelColor') === 'edge') ?\n (edge.color || settings('defaultEdgeColor')) :\n settings('defaultEdgeLabelColor');\n }\n\n context.textAlign = 'center';\n context.textBaseline = 'alphabetic';\n\n context.translate(x, y);\n context.rotate(angle);\n context.fillText(\n edge.label,\n 0,\n (-size / 2) - 3\n );\n\n context.restore();\n };\n}).call(this);\n"} +{"text": "{\n \"type\": \"minecraft:block\",\n \"pools\": [\n {\n \"rolls\": 1,\n \"entries\": [\n {\n \"type\": \"minecraft:item\",\n \"name\": \"minecraft:oak_trapdoor\"\n }\n ],\n \"conditions\": [\n {\n \"condition\": \"minecraft:survives_explosion\"\n }\n ]\n }\n ]\n}"} +{"text": "import * as React from 'react';\n\nimport {\n IConfigBlobDiff,\n IConfigHyperparameterDiff,\n IConfigHyperparameterSetItemDiff,\n} from 'shared/models/Versioning/Blob/ConfigBlob';\nimport {\n DiffType,\n ComparedCommitType,\n getCommitDataFromNullableDiffs,\n DataWithDiffTypeFromDiffs,\n} from 'shared/models/Versioning/Blob/Diff';\nimport { BlobDataBox } from 'shared/view/domain/Versioning/Blob/BlobBox/BlobBox';\nimport HyperparameterItem from 'shared/view/domain/Versioning/Blob/ConfigBlob/HyperparameterItem/HyperparameterItem';\nimport HyperparameterSetItem from 'shared/view/domain/Versioning/Blob/ConfigBlob/HyperparameterSetItem/HyperparameterSetItem';\n\nimport { IComparedCommitsInfo, getCssDiffColorByCommitType } from '../../model';\nimport { makeHighlightCellBackground } from '../shared/makeHighlightCellBackground';\nimport ComparePropertiesTable from '../shared/ComparePropertiesTable/ComparePropertiesTable';\nimport sortArrayByAnotherArrayKeys from '../shared/sortArrayByAnotherArrayKeys/sortArrayByAnotherArrayKeys';\n\ninterface ILocalProps {\n diff: IConfigBlobDiff;\n comparedCommitsInfo: IComparedCommitsInfo;\n}\n\ntype IRow = {\n hyperparameters?: Array<DataWithDiffTypeFromDiffs<IConfigHyperparameterDiff>>;\n hyperparameterSet?: Array<\n DataWithDiffTypeFromDiffs<IConfigHyperparameterSetItemDiff>\n >;\n};\n\nconst highlightCellBackground = makeHighlightCellBackground<IRow>();\n\nconst ConfigDiffView = ({ diff, comparedCommitsInfo }: ILocalProps) => {\n const A: IRow = {\n hyperparameters: getCommitDataFromNullableDiffs(\n 'A',\n diff.data.hyperparameters\n ),\n hyperparameterSet: getCommitDataFromNullableDiffs(\n 'A',\n diff.data.hyperparameterSet\n ),\n };\n const B: IRow = {\n hyperparameters: getCommitDataFromNullableDiffs(\n 'B',\n diff.data.hyperparameters\n ),\n hyperparameterSet: getCommitDataFromNullableDiffs(\n 'B',\n diff.data.hyperparameterSet\n ),\n };\n const C: IRow = {\n hyperparameters: getCommitDataFromNullableDiffs(\n 'C',\n diff.data.hyperparameters\n ),\n hyperparameterSet: getCommitDataFromNullableDiffs(\n 'C',\n diff.data.hyperparameterSet\n ),\n };\n\n return (\n <BlobDataBox title=\"Config\">\n <ComparePropertiesTable\n comparedCommitsInfo={comparedCommitsInfo}\n A={A}\n B={B}\n C={diff.diffType === 'conflicted' ? C : undefined}\n propDefinitions={[\n {\n title: 'Hyperparameters',\n type: 'hyperparameters',\n isHidden: Boolean(!A.hyperparameters && !B.hyperparameters),\n getPropCellStyle: highlightCellBackground(({ data }) => {\n if (\n data &&\n data.hyperparameters &&\n data.hyperparameters.length > 0\n ) {\n return (\n data.hyperparameters.every(\n ({ diffType }) => diffType === 'added'\n ) ||\n data.hyperparameters.every(\n ({ diffType }) => diffType === 'deleted'\n )\n );\n }\n return false;\n }),\n render: ({ data, anotherData, comparedCommitType: type }) => {\n return data && data.hyperparameters\n ? sortArrayByAnotherArrayKeys(\n ({ data: { name } }) => name,\n data.hyperparameters,\n (anotherData && anotherData.hyperparameters) || []\n ).map(h => (\n <HyperparameterItem\n {...getHyperparameterDiffStyles(\n diff.diffType,\n h.diffType,\n type\n )}\n hyperparameter={h.data}\n key={h.data.name}\n />\n ))\n : null;\n },\n },\n {\n title: 'Hyperparameters set',\n type: 'hyperparametersSet',\n isHidden: Boolean(!A.hyperparameterSet && !B.hyperparameterSet),\n getPropCellStyle: highlightCellBackground(({ data }) => {\n if (data.hyperparameterSet && data.hyperparameterSet.length > 0) {\n return (\n data.hyperparameterSet.every(\n ({ diffType }) => diffType === 'added'\n ) ||\n data.hyperparameterSet.every(\n ({ diffType }) => diffType === 'deleted'\n )\n );\n }\n return false;\n }),\n render: ({ data, anotherData, comparedCommitType: type }) => {\n return data && data.hyperparameterSet\n ? sortArrayByAnotherArrayKeys(\n ({ data: { name } }) => name,\n data.hyperparameterSet,\n (anotherData && anotherData.hyperparameterSet) || []\n ).map(h => (\n <HyperparameterSetItem\n {...getHyperparameterDiffStyles(\n diff.diffType,\n h.diffType,\n type\n )}\n hyperparameterSetItem={h.data}\n key={h.data.name}\n />\n ))\n : null;\n },\n },\n ]}\n />\n </BlobDataBox>\n );\n};\n\nconst getHyperparameterDiffStyles = (\n diffType: DiffType,\n hyperparameterDiffType: DiffType,\n type: ComparedCommitType\n): { rootStyles?: React.CSSProperties; valueStyles?: React.CSSProperties } => {\n if (diffType === 'added' || diffType === 'deleted') {\n return {};\n }\n const diffColor = getCssDiffColorByCommitType(type);\n return hyperparameterDiffType === 'modified'\n ? { valueStyles: { backgroundColor: diffColor } }\n : {\n rootStyles: { backgroundColor: diffColor },\n };\n};\n\nexport default ConfigDiffView;\n"} +{"text": "/**************************************************************************\n *\n * Copyright © 2009 VMware, Inc., Palo Alto, CA., USA\n * All Rights Reserved.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the\n * \"Software\"), to deal in the Software without restriction, including\n * without limitation the rights to use, copy, modify, merge, publish,\n * distribute, sub license, and/or sell copies of the Software, and to\n * permit persons to whom the Software is furnished to do so, subject to\n * the following conditions:\n *\n * The above copyright notice and this permission notice (including the\n * next paragraph) shall be included in all copies or substantial portions\n * of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL\n * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM,\n * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n * USE OR OTHER DEALINGS IN THE SOFTWARE.\n *\n **************************************************************************/\n\n#include \"drmP.h\"\n#include \"vmwgfx_drv.h\"\n\nint vmw_mmap(struct file *filp, struct vm_area_struct *vma)\n{\n\tstruct drm_file *file_priv;\n\tstruct vmw_private *dev_priv;\n\n\tif (unlikely(vma->vm_pgoff < VMWGFX_FILE_PAGE_OFFSET)) {\n\t\tDRM_ERROR(\"Illegal attempt to mmap old fifo space.\\n\");\n\t\treturn -EINVAL;\n\t}\n\n\tfile_priv = filp->private_data;\n\tdev_priv = vmw_priv(file_priv->minor->dev);\n\treturn ttm_bo_mmap(filp, vma, &dev_priv->bdev);\n}\n\nstatic int vmw_ttm_mem_global_init(struct drm_global_reference *ref)\n{\n\tDRM_INFO(\"global init.\\n\");\n\treturn ttm_mem_global_init(ref->object);\n}\n\nstatic void vmw_ttm_mem_global_release(struct drm_global_reference *ref)\n{\n\tttm_mem_global_release(ref->object);\n}\n\nint vmw_ttm_global_init(struct vmw_private *dev_priv)\n{\n\tstruct drm_global_reference *global_ref;\n\tint ret;\n\n\tglobal_ref = &dev_priv->mem_global_ref;\n\tglobal_ref->global_type = DRM_GLOBAL_TTM_MEM;\n\tglobal_ref->size = sizeof(struct ttm_mem_global);\n\tglobal_ref->init = &vmw_ttm_mem_global_init;\n\tglobal_ref->release = &vmw_ttm_mem_global_release;\n\n\tret = drm_global_item_ref(global_ref);\n\tif (unlikely(ret != 0)) {\n\t\tDRM_ERROR(\"Failed setting up TTM memory accounting.\\n\");\n\t\treturn ret;\n\t}\n\n\tdev_priv->bo_global_ref.mem_glob =\n\t\tdev_priv->mem_global_ref.object;\n\tglobal_ref = &dev_priv->bo_global_ref.ref;\n\tglobal_ref->global_type = DRM_GLOBAL_TTM_BO;\n\tglobal_ref->size = sizeof(struct ttm_bo_global);\n\tglobal_ref->init = &ttm_bo_global_init;\n\tglobal_ref->release = &ttm_bo_global_release;\n\tret = drm_global_item_ref(global_ref);\n\n\tif (unlikely(ret != 0)) {\n\t\tDRM_ERROR(\"Failed setting up TTM buffer objects.\\n\");\n\t\tgoto out_no_bo;\n\t}\n\n\treturn 0;\nout_no_bo:\n\tdrm_global_item_unref(&dev_priv->mem_global_ref);\n\treturn ret;\n}\n\nvoid vmw_ttm_global_release(struct vmw_private *dev_priv)\n{\n\tdrm_global_item_unref(&dev_priv->bo_global_ref.ref);\n\tdrm_global_item_unref(&dev_priv->mem_global_ref);\n}\n"} +{"text": "---\nbecome_override: False\nocp_username: system:admin\nsilent: False\n\n# OpenShift Project for the ArgoCD Operator\nocp4_workload_argocd_operator_project: argocd\nocp4_workload_argocd_operator_project_display: \"ArgoCD\"\n\n# Deploy an ArgoCD instance in the project\nocp4_workload_argocd_operator_deploy_argocd: true\n\n# Name of the ArgoCD instance\nocp4_workload_argocd_operator_argocd_name: argocd\n\n# ArgoCD Spec Settings\n# These will be added to the Jenkins.spec section\n# The default for ArgoCD v0.0.12 is below\nocp4_workload_argocd_operator_argocd_spec:\n server:\n route:\n enabled: true\n ingress:\n enabled: false\n insecure: false\n resources: {}\n dex:\n image: quay.io/ablock/dex\n openShiftOAuth: true\n version: openshift-connector\n rbac:\n defaultPolicy: role:admin\n\n# Set a starting ClusterServiceVersion.\n# Recommended to leave empty to get latest in the channel when not using\n# a catalog snapshot.\n# Highly recommended to be set when using a catalog snapshot but can be\n# empty to get the latest available in the channel at the time when\n# the catalog snapshot got created.\nocp4_workload_argocd_operator_starting_csv: \"\"\n# ocp4_workload_argocd_operator_starting_csv: argocd-operator.v0.0.12\n\n# Channel to use for the ArgoCD subscription\nocp4_workload_argocd_operator_channel: alpha\n\n# Set automatic InstallPlan approval. If set to false it is also suggested\n# to set the starting_csv to pin a specific version\n# This variable has no effect when using a catalog snapshot (always true)\nocp4_workload_argocd_operator_automatic_install_plan_approval: False\n\n# --------------------------------\n# Operator Catalog Snapshot Settings\n# --------------------------------\n# See https://github.com/redhat-cop/agnosticd/blob/development/docs/Operator_Catalog_Snapshots.adoc\n# for instructions on how to set up catalog snapshot images\n\n# Use a catalog snapshot\nocp4_workload_argocd_operator_use_catalog_snapshot: False\n\n# Catalog Source Name when using a catalog snapshot. This should be unique\n# in the cluster to avoid clashes\nocp4_workload_argocd_operator_catalogsource_name: community-operators-snapshot-argocd\n\n# Catalog snapshot image\nocp4_workload_argocd_operator_catalog_snapshot_image: quay.io/gpte-devops-automation/olm_snapshot_community_catalog\n\n# Catalog snapshot image tag\nocp4_workload_argocd_operator_catalog_snapshot_image_tag: v4.5_2020_08_24\n"} +{"text": "#!/bin/bash\n##===----------------------------------------------------------------------===##\n##\n## This source file is part of the SwiftCrypto open source project\n##\n## Copyright (c) 2019 Apple Inc. and the SwiftCrypto project authors\n## Licensed under Apache License v2.0\n##\n## See LICENSE.txt for license information\n## See CONTRIBUTORS.md for the list of SwiftCrypto project authors\n##\n## SPDX-License-Identifier: Apache-2.0\n##\n##===----------------------------------------------------------------------===##\n# This was substantially adapted from grpc-swift's vendor-boringssl.sh script.\n# The license for the original work is reproduced below. See NOTICES.txt for\n# more.\n#\n# Copyright 2016, gRPC Authors All rights reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n#\n# This script creates a vendored copy of BoringSSL that is\n# suitable for building with the Swift Package Manager.\n#\n# Usage:\n# 1. Run this script in the package root. It will place\n# a local copy of the BoringSSL sources in Sources/CCryptoBoringSSL.\n# Any prior contents of Sources/CCryptoBoringSSL will be deleted.\n#\nset -eou pipefail\n\nHERE=$(pwd)\nDSTROOT=Sources/CCryptoBoringSSL\nTMPDIR=$(mktemp -d /tmp/.workingXXXXXX)\nSRCROOT=\"${TMPDIR}/src/boringssl.googlesource.com/boringssl\"\nCROSS_COMPILE_TARGET_LOCATION=\"/Library/Developer/Destinations\"\nCROSS_COMPILE_VERSION=\"5.1.1\"\n\n# This function namespaces the awkward inline functions declared in OpenSSL\n# and BoringSSL.\nfunction namespace_inlines {\n # Pull out all STACK_OF functions.\n STACKS=$(grep --no-filename -rE -e \"DEFINE_(SPECIAL_)?STACK_OF\\([A-Z_0-9a-z]+\\)\" -e \"DEFINE_NAMED_STACK_OF\\([A-Z_0-9a-z]+, +[A-Z_0-9a-z:]+\\)\" \"$1/\"* | grep -v '//' | grep -v '#' | gsed -e 's/DEFINE_\\(SPECIAL_\\)\\?STACK_OF(\\(.*\\))/\\2/' -e 's/DEFINE_NAMED_STACK_OF(\\(.*\\), .*)/\\1/')\n STACK_FUNCTIONS=(\"call_free_func\" \"call_copy_func\" \"call_cmp_func\" \"new\" \"new_null\" \"num\" \"zero\" \"value\" \"set\" \"free\" \"pop_free\" \"insert\" \"delete\" \"delete_ptr\" \"find\" \"shift\" \"push\" \"pop\" \"dup\" \"sort\" \"is_sorted\" \"set_cmp_func\" \"deep_copy\")\n\n for s in $STACKS; do\n for f in \"${STACK_FUNCTIONS[@]}\"; do\n echo \"#define sk_${s}_${f} BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, sk_${s}_${f})\" >> \"$1/include/openssl/boringssl_prefix_symbols.h\"\n done\n done\n\n # Now pull out all LHASH_OF functions.\n LHASHES=$(grep --no-filename -rE \"DEFINE_LHASH_OF\\([A-Z_0-9a-z]+\\)\" \"$1/\"* | grep -v '//' | grep -v '#' | grep -v '\\\\$' | gsed 's/DEFINE_LHASH_OF(\\(.*\\))/\\1/')\n LHASH_FUNCTIONS=(\"call_cmp_func\" \"call_hash_func\" \"new\" \"free\" \"num_items\" \"retrieve\" \"call_cmp_key\" \"retrieve_key\" \"insert\" \"delete\" \"call_doall\" \"call_doall_arg\" \"doall\" \"doall_arg\")\n\n for l in $LHASHES; do\n for f in \"${LHASH_FUNCTIONS[@]}\"; do\n echo \"#define lh_${l}_${f} BORINGSSL_ADD_PREFIX(BORINGSSL_PREFIX, lh_${l}_${f})\" >> \"$1/include/openssl/boringssl_prefix_symbols.h\"\n done\n done\n}\n\n\n# This function handles mangling the symbols in BoringSSL.\nfunction mangle_symbols {\n echo \"GENERATING mangled symbol list\"\n (\n # We need a .a: may as well get SwiftPM to give it to us.\n # Temporarily enable the product we need.\n $sed -i -e 's/MANGLE_START/MANGLE_START*\\//' -e 's/MANGLE_END/\\/*MANGLE_END/' \"${HERE}/Package.swift\"\n\n export GOPATH=\"${TMPDIR}\"\n\n # Begin by building for macOS.\n swift build --product CCryptoBoringSSL --enable-test-discovery\n go run \"${SRCROOT}/util/read_symbols.go\" -out \"${TMPDIR}/symbols-macOS.txt\" \"${HERE}/.build/debug/libCCryptoBoringSSL.a\"\n\n # Now build for iOS. We use xcodebuild for this because SwiftPM doesn't\n # meaningfully support it. Unfortunately we must archive ourselves.\n xcodebuild -sdk iphoneos -scheme CCryptoBoringSSL -derivedDataPath \"${TMPDIR}/iphoneos-deriveddata\"\n ar -r \"${TMPDIR}/libCCryptoBoringSSL-ios.a\" \"${TMPDIR}/iphoneos-deriveddata/Build/Products/Debug-iphoneos/CCryptoBoringSSL.o\"\n go run \"${SRCROOT}/util/read_symbols.go\" -out \"${TMPDIR}/symbols-iOS.txt\" \"${TMPDIR}/libCCryptoBoringSSL-ios.a\"\n\n # Now cross compile for our targets.\n # If you have trouble with the script around this point, consider\n # https://github.com/CSCIX65G/SwiftCrossCompilers to obtain cross\n # compilers for the architectures we care about.\n for cc_target in \"${CROSS_COMPILE_TARGET_LOCATION}\"/*\"${CROSS_COMPILE_VERSION}\"*.json; do\n echo \"Cross compiling for ${cc_target}\"\n swift build --product CCryptoBoringSSL --destination \"${cc_target}\" --enable-test-discovery\n done;\n\n # Now we need to generate symbol mangles for Linux. We can do this in\n # one go for all of them.\n go run \"${SRCROOT}/util/read_symbols.go\" -obj-file-format elf -out \"${TMPDIR}/symbols-linux-all.txt\" \"${HERE}\"/.build/*-unknown-linux/debug/libCCryptoBoringSSL.a\n\n # Now we concatenate all the symbols together and uniquify it.\n cat \"${TMPDIR}\"/symbols-*.txt | sort | uniq > \"${TMPDIR}/symbols.txt\"\n\n # Use this as the input to the mangle.\n go run \"${SRCROOT}/util/make_prefix_headers.go\" -out \"${HERE}/${DSTROOT}/include/openssl\" \"${TMPDIR}/symbols.txt\"\n\n # Remove the product, as we no longer need it.\n $sed -i -e 's/MANGLE_START\\*\\//MANGLE_START/' -e 's/\\/\\*MANGLE_END/MANGLE_END/' \"${HERE}/Package.swift\"\n )\n\n # Now remove any weird symbols that got in and would emit warnings.\n $sed -i -e '/#define .*\\..*/d' \"${DSTROOT}\"/include/openssl/boringssl_prefix_symbols*.h\n\n # Now edit the headers again to add the symbol mangling.\n echo \"ADDING symbol mangling\"\n perl -pi -e '$_ .= qq(\\n#define BORINGSSL_PREFIX CCryptoBoringSSL\\n) if /#define OPENSSL_HEADER_BASE_H/' \"$DSTROOT/include/openssl/base.h\"\n\n for assembly_file in $(find \"$DSTROOT\" -name \"*.S\")\n do\n $sed -i '1 i #define BORINGSSL_PREFIX CCryptoBoringSSL' \"$assembly_file\"\n done\n namespace_inlines \"$DSTROOT\"\n}\n\ncase \"$(uname -s)\" in\n Darwin)\n sed=gsed\n ;;\n *)\n sed=sed\n ;;\nesac\n\nif ! hash ${sed} 2>/dev/null; then\n echo \"You need sed \\\"${sed}\\\" to run this script ...\"\n echo\n echo \"On macOS: brew install gnu-sed\"\n exit 43\nfi\n\necho \"REMOVING any previously-vendored BoringSSL code\"\nrm -rf $DSTROOT/include\nrm -rf $DSTROOT/ssl\nrm -rf $DSTROOT/crypto\nrm -rf $DSTROOT/third_party\nrm -rf $DSTROOT/err_data.c\n\necho \"CLONING boringssl\"\nmkdir -p \"$SRCROOT\"\ngit clone https://boringssl.googlesource.com/boringssl \"$SRCROOT\"\ncd \"$SRCROOT\"\nBORINGSSL_REVISION=$(git rev-parse HEAD)\ncd \"$HERE\"\necho \"CLONED boringssl@${BORINGSSL_REVISION}\"\n\necho \"OBTAINING submodules\"\n(\n cd \"$SRCROOT\"\n git submodule update --init\n)\n\necho \"GENERATING assembly helpers\"\n(\n cd \"$SRCROOT\"\n cd ..\n mkdir -p \"${SRCROOT}/crypto/third_party/sike/asm\"\n python \"${HERE}/scripts/build-asm.py\"\n)\n\nPATTERNS=(\n'include/openssl/*.h'\n'ssl/*.h'\n'ssl/*.cc'\n'crypto/*.h'\n'crypto/*.c'\n'crypto/*/*.h'\n'crypto/*/*.c'\n'crypto/*/*.S'\n'crypto/*/*/*.h'\n'crypto/*/*/*.c'\n'crypto/*/*/*.S'\n'crypto/*/*/*/*.c'\n'third_party/fiat/*.h'\n#'third_party/fiat/*.c'\n)\n\nEXCLUDES=(\n'*_test.*'\n'test_*.*'\n'test'\n'example_*.c'\n)\n\necho \"COPYING boringssl\"\nfor pattern in \"${PATTERNS[@]}\"\ndo\n for i in $SRCROOT/$pattern; do\n path=${i#$SRCROOT}\n dest=\"$DSTROOT$path\"\n dest_dir=$(dirname \"$dest\")\n mkdir -p \"$dest_dir\"\n cp \"$SRCROOT/$path\" \"$dest\"\n done\ndone\n\nfor exclude in \"${EXCLUDES[@]}\"\ndo\n echo \"EXCLUDING $exclude\"\n find $DSTROOT -d -name \"$exclude\" -exec rm -rf {} \\;\ndone\n\necho \"GENERATING err_data.c\"\n(\n cd \"$SRCROOT/crypto/err\"\n go run err_data_generate.go > \"${HERE}/${DSTROOT}/crypto/err/err_data.c\"\n)\n\necho \"DELETING crypto/fipsmodule/bcm.c\"\nrm -f $DSTROOT/crypto/fipsmodule/bcm.c\n\necho \"FIXING missing include\"\nperl -pi -e '$_ .= qq(\\n#include <openssl/cpu.h>\\n) if /#include <openssl\\/err.h>/' \"$DSTROOT/crypto/fipsmodule/ec/p256-x86_64.c\"\n\necho \"REMOVING libssl\"\n(\n cd \"$DSTROOT\"\n rm \"include/openssl/ssl.h\" \"include/openssl/srtp.h\" \"include/openssl/ssl3.h\" \"include/openssl/tls1.h\"\n rm -rf \"ssl\"\n)\n\nmangle_symbols\n\n# Removing ASM on 32 bit Apple platforms\necho \"REMOVING assembly on 32-bit Apple platforms\"\ngsed -i \"/#define OPENSSL_HEADER_BASE_H/a#if defined(__APPLE__) && defined(__i386__)\\n#define OPENSSL_NO_ASM\\n#endif\" \"$DSTROOT/include/openssl/base.h\"\n\necho \"RENAMING header files\"\n(\n # We need to rearrange a coouple of things here, the end state will be:\n # - Headers from 'include/openssl/' will be moved up a level to 'include/'\n # - Their names will be prefixed with 'CCryptoBoringSSL_'\n # - The headers prefixed with 'boringssl_prefix_symbols' will also be prefixed with 'CCryptoBoringSSL_'\n # - Any include of another header in the 'include/' directory will use quotation marks instead of angle brackets\n\n # Let's move the headers up a level first.\n cd \"$DSTROOT\"\n mv include/openssl/* include/\n rmdir \"include/openssl\"\n\n # Now change the imports from \"<openssl/X> to \"<CCryptoBoringSSL_X>\", apply the same prefix to the 'boringssl_prefix_symbols' headers.\n find . -name \"*.[ch]\" -or -name \"*.cc\" -or -name \"*.S\" | xargs $sed -i -e 's+include <openssl/+include <CCryptoBoringSSL_+' -e 's+include <boringssl_prefix_symbols+include <CCryptoBoringSSL_boringssl_prefix_symbols+'\n\n # Okay now we need to rename the headers adding the prefix \"CCryptoBoringSSL_\".\n pushd include\n find . -name \"*.h\" | $sed -e \"s_./__\" | xargs -I {} mv {} CCryptoBoringSSL_{}\n # Finally, make sure we refer to them by their prefixed names, and change any includes from angle brackets to quotation marks.\n find . -name \"*.h\" | xargs $sed -i -e 's/include \"/include \"CCryptoBoringSSL_/' -e 's/include <CCryptoBoringSSL_\\(.*\\)>/include \"CCryptoBoringSSL_\\1\"/'\n popd\n)\n\n# We need to avoid having the stack be executable. BoringSSL does this in its build system, but we can't.\necho \"PROTECTING against executable stacks\"\n(\n cd \"$DSTROOT\"\n find . -name \"*.S\" | xargs $sed -i '$ a #if defined(__linux__) && defined(__ELF__)\\n.section .note.GNU-stack,\"\",%progbits\\n#endif\\n'\n)\n\necho \"PATCHING BoringSSL\"\ngit apply \"${HERE}/scripts/patch-1-inttypes.patch\"\ngit apply \"${HERE}/scripts/patch-2-arm-arch.patch\"\n\n# We need BoringSSL to be modularised\necho \"MODULARISING BoringSSL\"\ncat << EOF > \"$DSTROOT/include/CCryptoBoringSSL.h\"\n//===----------------------------------------------------------------------===//\n//\n// This source file is part of the SwitCrypto open source project\n//\n// Copyright (c) 2019 Apple Inc. and the SwiftCrypto project authors\n// Licensed under Apache License v2.0\n//\n// See LICENSE.txt for license information\n// See CONTRIBUTORS.md for the list of SwiftCrypto project authors\n//\n// SPDX-License-Identifier: Apache-2.0\n//\n//===----------------------------------------------------------------------===//\n#ifndef C_CRYPTO_BORINGSSL_H\n#define C_CRYPTO_BORINGSSL_H\n\n#include \"CCryptoBoringSSL_aes.h\"\n#include \"CCryptoBoringSSL_arm_arch.h\"\n#include \"CCryptoBoringSSL_asn1_mac.h\"\n#include \"CCryptoBoringSSL_asn1t.h\"\n#include \"CCryptoBoringSSL_base.h\"\n#include \"CCryptoBoringSSL_bio.h\"\n#include \"CCryptoBoringSSL_blowfish.h\"\n#include \"CCryptoBoringSSL_boringssl_prefix_symbols.h\"\n#include \"CCryptoBoringSSL_boringssl_prefix_symbols_asm.h\"\n#include \"CCryptoBoringSSL_cast.h\"\n#include \"CCryptoBoringSSL_chacha.h\"\n#include \"CCryptoBoringSSL_cmac.h\"\n#include \"CCryptoBoringSSL_conf.h\"\n#include \"CCryptoBoringSSL_cpu.h\"\n#include \"CCryptoBoringSSL_curve25519.h\"\n#include \"CCryptoBoringSSL_des.h\"\n#include \"CCryptoBoringSSL_dtls1.h\"\n#include \"CCryptoBoringSSL_e_os2.h\"\n#include \"CCryptoBoringSSL_ec.h\"\n#include \"CCryptoBoringSSL_ec_key.h\"\n#include \"CCryptoBoringSSL_ecdsa.h\"\n#include \"CCryptoBoringSSL_err.h\"\n#include \"CCryptoBoringSSL_evp.h\"\n#include \"CCryptoBoringSSL_hkdf.h\"\n#include \"CCryptoBoringSSL_hmac.h\"\n#include \"CCryptoBoringSSL_hrss.h\"\n#include \"CCryptoBoringSSL_md4.h\"\n#include \"CCryptoBoringSSL_md5.h\"\n#include \"CCryptoBoringSSL_obj_mac.h\"\n#include \"CCryptoBoringSSL_objects.h\"\n#include \"CCryptoBoringSSL_opensslv.h\"\n#include \"CCryptoBoringSSL_ossl_typ.h\"\n#include \"CCryptoBoringSSL_pem.h\"\n#include \"CCryptoBoringSSL_pkcs12.h\"\n#include \"CCryptoBoringSSL_poly1305.h\"\n#include \"CCryptoBoringSSL_rand.h\"\n#include \"CCryptoBoringSSL_rc4.h\"\n#include \"CCryptoBoringSSL_ripemd.h\"\n#include \"CCryptoBoringSSL_rsa.h\"\n#include \"CCryptoBoringSSL_safestack.h\"\n#include \"CCryptoBoringSSL_sha.h\"\n#include \"CCryptoBoringSSL_siphash.h\"\n#include \"CCryptoBoringSSL_trust_token.h\"\n#include \"CCryptoBoringSSL_x509v3.h\"\n\n#endif // C_CRYPTO_BORINGSSL_H\nEOF\n\necho \"RECORDING BoringSSL revision\"\n$sed -i -e \"s/BoringSSL Commit: [0-9a-f]\\+/BoringSSL Commit: ${BORINGSSL_REVISION}/\" \"$HERE/Package.swift\"\necho \"This directory is derived from BoringSSL cloned from https://boringssl.googlesource.com/boringssl at revision ${BORINGSSL_REVISION}\" > \"$DSTROOT/hash.txt\"\n\necho \"CLEANING temporary directory\"\nrm -rf \"${TMPDIR}\"\n\n"} +{"text": "/**\n * @fileoverview Rule to disallow empty functions.\n * @author Toru Nagashima\n */\n\n\"use strict\";\n\n//------------------------------------------------------------------------------\n// Requirements\n//------------------------------------------------------------------------------\n\nconst astUtils = require(\"./utils/ast-utils\");\n\n//------------------------------------------------------------------------------\n// Helpers\n//------------------------------------------------------------------------------\n\nconst ALLOW_OPTIONS = Object.freeze([\n \"functions\",\n \"arrowFunctions\",\n \"generatorFunctions\",\n \"methods\",\n \"generatorMethods\",\n \"getters\",\n \"setters\",\n \"constructors\"\n]);\n\n/**\n * Gets the kind of a given function node.\n *\n * @param {ASTNode} node - A function node to get. This is one of\n * an ArrowFunctionExpression, a FunctionDeclaration, or a\n * FunctionExpression.\n * @returns {string} The kind of the function. This is one of \"functions\",\n * \"arrowFunctions\", \"generatorFunctions\", \"asyncFunctions\", \"methods\",\n * \"generatorMethods\", \"asyncMethods\", \"getters\", \"setters\", and\n * \"constructors\".\n */\nfunction getKind(node) {\n const parent = node.parent;\n let kind = \"\";\n\n if (node.type === \"ArrowFunctionExpression\") {\n return \"arrowFunctions\";\n }\n\n // Detects main kind.\n if (parent.type === \"Property\") {\n if (parent.kind === \"get\") {\n return \"getters\";\n }\n if (parent.kind === \"set\") {\n return \"setters\";\n }\n kind = parent.method ? \"methods\" : \"functions\";\n\n } else if (parent.type === \"MethodDefinition\") {\n if (parent.kind === \"get\") {\n return \"getters\";\n }\n if (parent.kind === \"set\") {\n return \"setters\";\n }\n if (parent.kind === \"constructor\") {\n return \"constructors\";\n }\n kind = \"methods\";\n\n } else {\n kind = \"functions\";\n }\n\n // Detects prefix.\n let prefix = \"\";\n\n if (node.generator) {\n prefix = \"generator\";\n } else if (node.async) {\n prefix = \"async\";\n } else {\n return kind;\n }\n return prefix + kind[0].toUpperCase() + kind.slice(1);\n}\n\n//------------------------------------------------------------------------------\n// Rule Definition\n//------------------------------------------------------------------------------\n\nmodule.exports = {\n meta: {\n type: \"suggestion\",\n\n docs: {\n description: \"disallow empty functions\",\n category: \"Best Practices\",\n recommended: false,\n url: \"https://eslint.org/docs/rules/no-empty-function\"\n },\n\n schema: [\n {\n type: \"object\",\n properties: {\n allow: {\n type: \"array\",\n items: { enum: ALLOW_OPTIONS },\n uniqueItems: true\n }\n },\n additionalProperties: false\n }\n ],\n\n messages: {\n unexpected: \"Unexpected empty {{name}}.\"\n }\n },\n\n create(context) {\n const options = context.options[0] || {};\n const allowed = options.allow || [];\n\n const sourceCode = context.getSourceCode();\n\n /**\n * Reports a given function node if the node matches the following patterns.\n *\n * - Not allowed by options.\n * - The body is empty.\n * - The body doesn't have any comments.\n *\n * @param {ASTNode} node - A function node to report. This is one of\n * an ArrowFunctionExpression, a FunctionDeclaration, or a\n * FunctionExpression.\n * @returns {void}\n */\n function reportIfEmpty(node) {\n const kind = getKind(node);\n const name = astUtils.getFunctionNameWithKind(node);\n const innerComments = sourceCode.getTokens(node.body, {\n includeComments: true,\n filter: astUtils.isCommentToken\n });\n\n if (allowed.indexOf(kind) === -1 &&\n node.body.type === \"BlockStatement\" &&\n node.body.body.length === 0 &&\n innerComments.length === 0\n ) {\n context.report({\n node,\n loc: node.body.loc.start,\n messageId: \"unexpected\",\n data: { name }\n });\n }\n }\n\n return {\n ArrowFunctionExpression: reportIfEmpty,\n FunctionDeclaration: reportIfEmpty,\n FunctionExpression: reportIfEmpty\n };\n }\n};\n"} +{"text": "extend AST\nCEs (meta, visitor, sgrep/spatch, etc)\nextend grammar\npretty printer or unparser\n\nextend patterns reported by ocaml (thx to exhaustive pattern checks)\n\ndefs/uses update\ntags support\nocaml db\nprolog db\nscheck/cmf\n\nanalysis, e.g. abstract interpreter, type inference, cfg\n\ncmf --fix\ncmf --fix when new def in DIFF (git grep must find it)\n\nsgrep/spatch isos\nreaper\ncodemap highlighter\n"} +{"text": "asm\n==============\n\nLearning assembly for linux-x64\n\nExamples\n==============\n\n * [Say hello to x86_64 Assembly part 1](https://0xax.github.io/asm_1/)\n * [Say hello to x86_64 Assembly part 2](https://0xax.github.io/asm_2/)\n * [Say hello to x86_64 Assembly part 3](https://0xax.github.io/asm_3/)\n * [Say hello to x86_64 Assembly part 4](https://0xax.github.io/asm_4/)\n * [Say hello to x86_64 Assembly part 5](https://0xax.github.io/asm_5/)\n * [Say hello to x86_64 Assembly part 6](https://0xax.github.io/asm_6/)\n * [Say hello to x86_64 Assembly part 7](https://0xax.github.io/asm_7/)\n * [Say hello to x86_64 Assembly part 8](https://0xax.github.io/asm_8/)\n \nAuthor\n==============\n\n[@0xAX](https://twitter.com/0xAX)\n"} +{"text": "/*\n * Copyright 2014 Advanced Micro Devices, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR\n * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,\n * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n *\n */\n\n#ifndef SMU8_FUSION_H\n#define SMU8_FUSION_H\n\n#include \"smu8.h\"\n\n#pragma pack(push, 1)\n\n#define SMU8_MAX_CUS 2\n#define SMU8_PSMS_PER_CU 4\n#define SMU8_CACS_PER_CU 4\n\nstruct SMU8_GfxCuPgScoreboard {\n uint8_t Enabled;\n uint8_t spare[3];\n};\n\nstruct SMU8_Port80MonitorTable {\n\tuint32_t MmioAddress;\n\tuint32_t MemoryBaseHi;\n\tuint32_t MemoryBaseLo;\n\tuint16_t MemoryBufferSize;\n\tuint16_t MemoryPosition;\n\tuint16_t PollingInterval;\n\tuint8_t EnableCsrShadow;\n\tuint8_t EnableDramShadow;\n};\n\n/* Display specific power management parameters */\n#define PWRMGT_SEPARATION_TIME_SHIFT 0\n#define PWRMGT_SEPARATION_TIME_MASK 0xFFFF\n#define PWRMGT_DISABLE_CPU_CSTATES_SHIFT 16\n#define PWRMGT_DISABLE_CPU_CSTATES_MASK 0x1\n#define PWRMGT_DISABLE_CPU_PSTATES_SHIFT 24\n#define PWRMGT_DISABLE_CPU_PSTATES_MASK 0x1\n\n/* Clock Table Definitions */\n#define NUM_SCLK_LEVELS 8\n#define NUM_LCLK_LEVELS 8\n#define NUM_UVD_LEVELS 8\n#define NUM_ECLK_LEVELS 8\n#define NUM_ACLK_LEVELS 8\n\nstruct SMU8_Fusion_ClkLevel {\n\tuint8_t\t\tGnbVid;\n\tuint8_t\t\tGfxVid;\n\tuint8_t\t\tDfsDid;\n\tuint8_t\t\tDeepSleepDid;\n\tuint32_t\tDfsBypass;\n\tuint32_t\tFrequency;\n};\n\nstruct SMU8_Fusion_SclkBreakdownTable {\n\tstruct SMU8_Fusion_ClkLevel ClkLevel[NUM_SCLK_LEVELS];\n\tstruct SMU8_Fusion_ClkLevel DpmOffLevel;\n\t/* SMU8_Fusion_ClkLevel PwrOffLevel; */\n\tuint32_t SclkValidMask;\n\tuint32_t MaxSclkIndex;\n};\n\nstruct SMU8_Fusion_LclkBreakdownTable {\n\tstruct SMU8_Fusion_ClkLevel ClkLevel[NUM_LCLK_LEVELS];\n\tstruct SMU8_Fusion_ClkLevel DpmOffLevel;\n /* SMU8_Fusion_ClkLevel PwrOffLevel; */\n\tuint32_t LclkValidMask;\n\tuint32_t MaxLclkIndex;\n};\n\nstruct SMU8_Fusion_EclkBreakdownTable {\n\tstruct SMU8_Fusion_ClkLevel ClkLevel[NUM_ECLK_LEVELS];\n\tstruct SMU8_Fusion_ClkLevel DpmOffLevel;\n\tstruct SMU8_Fusion_ClkLevel PwrOffLevel;\n\tuint32_t EclkValidMask;\n\tuint32_t MaxEclkIndex;\n};\n\nstruct SMU8_Fusion_VclkBreakdownTable {\n\tstruct SMU8_Fusion_ClkLevel ClkLevel[NUM_UVD_LEVELS];\n\tstruct SMU8_Fusion_ClkLevel DpmOffLevel;\n\tstruct SMU8_Fusion_ClkLevel PwrOffLevel;\n\tuint32_t VclkValidMask;\n\tuint32_t MaxVclkIndex;\n};\n\nstruct SMU8_Fusion_DclkBreakdownTable {\n\tstruct SMU8_Fusion_ClkLevel ClkLevel[NUM_UVD_LEVELS];\n\tstruct SMU8_Fusion_ClkLevel DpmOffLevel;\n\tstruct SMU8_Fusion_ClkLevel PwrOffLevel;\n\tuint32_t DclkValidMask;\n\tuint32_t MaxDclkIndex;\n};\n\nstruct SMU8_Fusion_AclkBreakdownTable {\n\tstruct SMU8_Fusion_ClkLevel ClkLevel[NUM_ACLK_LEVELS];\n\tstruct SMU8_Fusion_ClkLevel DpmOffLevel;\n\tstruct SMU8_Fusion_ClkLevel PwrOffLevel;\n\tuint32_t AclkValidMask;\n\tuint32_t MaxAclkIndex;\n};\n\n\nstruct SMU8_Fusion_ClkTable {\n\tstruct SMU8_Fusion_SclkBreakdownTable SclkBreakdownTable;\n\tstruct SMU8_Fusion_LclkBreakdownTable LclkBreakdownTable;\n\tstruct SMU8_Fusion_EclkBreakdownTable EclkBreakdownTable;\n\tstruct SMU8_Fusion_VclkBreakdownTable VclkBreakdownTable;\n\tstruct SMU8_Fusion_DclkBreakdownTable DclkBreakdownTable;\n\tstruct SMU8_Fusion_AclkBreakdownTable AclkBreakdownTable;\n};\n\n#pragma pack(pop)\n\n#endif\n"} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout\n xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:orientation=\"vertical\"\n android:layout_width=\"fill_parent\"\n android:layout_height=\"fill_parent\">\n <LinearLayout\n android:layout_width=\"match_parent\"\n android:id=\"@+id/linearLayout1\"\n android:layout_height=\"match_parent\"\n android:orientation=\"horizontal\">\n <fragment\n class=\"com.example.android.wifidirect.DeviceListFragment\"\n android:id=\"@+id/frag_list\"\n android:layout_width=\"@dimen/phone_list_height\"\n android:layout_height=\"match_parent\">\n <!-- Preview: layout=@layout/row_devices -->\n </fragment>\n <fragment\n class=\"com.example.android.wifidirect.DeviceDetailFragment\"\n android:id=\"@+id/frag_detail\"\n android:layout_width=\"match_parent\"\n android:layout_height=\"match_parent\">\n <!-- Preview: layout=@layout/device_detail -->\n </fragment>\n </LinearLayout>\n</LinearLayout>\n"} +{"text": "<xml>\n This is clearly not a valid XML. File is used so user actionable diagnostics message will be generated by BuildInfoConfigComponentVersionTelemetryInitializer. \n Test verifies that diagnostics works. </notxml_expected_to_fail>"} +{"text": "# Functions for FreeBSD ports / package management\n\n# update_system_install([package], [&in])\n# Install a named package, by buiding the port\nsub update_system_install\n{\nmy ($update, $in) = @_;\n$update ||= $in{'update'};\nmy (@rv, @newpacks);\nmy @want = split(/\\s+/, $update);\nprint \"<b>\",&text('ports_install', \"<tt>$update</tt>\"),\"</b><p>\\n\";\nprint \"<pre>\";\nmy $err = 0;\nforeach my $w (@want) {\n\t# Find the package dir\n\tmy $v;\n\tif ($w =~ /^(\\S+)\\-(\\d\\S+)$/) {\n\t\t$w = $1;\n\t\t$v = $2;\n\t\t}\n\tmy @pkgs = grep { $_->{'name'} eq $w &&\n\t\t\t (!$v || $_->{'version'} eq $v) }\n\t\t\t&update_system_search($w);\n\tif (!@pkgs) {\n\t\tprint \"No port named $w found!\\n\";\n\t\t$err++;\n\t\tnext;\n\t\t}\n\tmy $pkg = $pkgs[$#pkgs];\n\tmy $dir = \"/usr/ports/\".$pkg->{'fullname'};\n\n\t# Check if already installed\n\tmy @info = &package_info($pkg->{'name'});\n\tmy $upgrade = scalar(@info) ? 1 : 0;\n\n\t# Build the packages\n\tmy $cmd = $upgrade ? \"cd $dir && make reinstall\"\n\t\t\t : \"cd $dir && make install\";\n\tprint $cmd,\"\\n\";\n\t&additional_log('exec', undef, $cmd);\n\t$ENV{'BATCH'} = 1;\n\tmy @newrv;\n\t&open_execute_command(CMD, \"$cmd </dev/null\", 2);\n\twhile(<CMD>) {\n\t\ts/\\r|\\n//g;\n\t\tif (/Registering\\s+installation\\s+for\\s+(\\S+)\\-(\\d\\S+)/) {\n\t\t\tpush(@newrv, $1);\n\t\t\t}\n\t\tprint &html_escape($_.\"\\n\");\n\t\t}\n\tclose(CMD);\n\t$err++ if ($?);\n\tpush(@rv, @newrv);\n\t}\nprint \"</pre>\\n\";\nif ($err) {\n\tprint \"<b>$text{'ports_failed'}</b><p>\\n\";\n\treturn ( );\n\t}\nelse {\n\tprint \"<b>$text{'ports_ok'}</b><p>\\n\";\n\treturn &unique(@rv);\n\t}\n}\n\n# update_system_search(text)\n# Returns a list of packages matching some search\nsub update_system_search\n{\nmy ($search) = @_;\n&clean_language();\nmy $cmd = \"cd /usr/ports && make search key=\".quotemeta($search);\nmy $out = &backquote_command(\"$cmd 2>&1 </dev/null\");\nif ($out =~ /make\\s+fetchindex/) {\n\t&execute_command(\"cd /usr/ports && make fetchindex\");\n\t$out = &backquote_command(\"$cmd 2>&1 </dev/null\");\n\t}\nforeach my $line (split(/\\r?\\n/, $out)) {\n\tif ($line =~ /Port:\\s+(\\S+)\\-(\\d\\S+)/) {\n\t\tmy $p = { 'name' => $1,\n\t\t\t 'version' => $2,\n\t\t\t 'select' => $1.\"-\".$2 };\n\t\tpush(@rv, $p);\n\t\t}\n\telsif ($line =~ /Path:\\s+\\/usr\\/ports\\/(\\S+\\/(\\S+))/ && @rv) {\n\t\t$rv[$#rv]->{'fullname'} = $1;\n\t\t}\n\telsif ($line =~ /Info:\\s+(.*)/ && @rv) {\n\t\t$rv[$#rv]->{'desc'} = $1;\n\t\t}\n\t}\n&reset_environment();\nreturn @rv;\n}\n\n# update_system_resolve(name)\n# Converts a standard package name like apache, sendmail or squid into\n# the name used by ports.\nsub update_system_resolve\n{\nlocal ($name) = @_;\nreturn $name eq \"apache\" ? \"apache22 ap22-mod_.*\" :\n $name eq \"dhcpd\" ? \"isc-dhcp42-server\" :\n $name eq \"mysql\" ? \"mysql-server\" :\n $name eq \"openssh\" ? \"openssh-portable\" :\n $name eq \"postgresql\" ? \"postgresql-server\" :\n $name eq \"openldap\" ? \"openldap-server openldap-client\" :\n $name eq \"samba\" ? \"samba36 samba36-smbclient samba36-nmblookup\" :\n $name eq \"spamassassin\" ? \"p5-Mail-SpamAssassin\" :\n \t\t\t $name;\n}\n\n# update_system_available()\n# Returns a list of package names and versions that are available from ports\nsub update_system_available\n{\nlocal @rv;\n&execute_command(\"cd /usr/ports && make fetchindex\");\n&open_execute_command(PKG, \"cd /usr/ports && make search 'key=.*'\", 2, 1);\nmy @rv;\nwhile(my $line = <PKG>) {\n\ts/\\r|\\n//g;\n\tif ($line =~ /Port:\\s+(\\S+)\\-(\\d\\S+)/) {\n\t\tmy $p = { 'name' => $1,\n\t\t\t 'version' => $2,\n\t\t\t 'select' => $1.\"-\".$2 };\n\t\tpush(@rv, $p);\n\t\t}\n\telsif ($line =~ /Path:\\s+\\/usr\\/ports\\/(\\S+\\/(\\S+))/ && @rv) {\n\t\t$rv[$#rv]->{'fullname'} = $1;\n\t\t}\n\telsif ($line =~ /Info:\\s+(.*)/ && @rv) {\n\t\t$rv[$#rv]->{'desc'} = $1;\n\t\t}\n\t}\nreturn @rv;\n}\n\n1;\n"} +{"text": "/**\n * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0.\n */\n\n#include <aws/ssm/model/InventoryItemAttribute.h>\n#include <aws/core/utils/json/JsonSerializer.h>\n\n#include <utility>\n\nusing namespace Aws::Utils::Json;\nusing namespace Aws::Utils;\n\nnamespace Aws\n{\nnamespace SSM\n{\nnamespace Model\n{\n\nInventoryItemAttribute::InventoryItemAttribute() : \n m_nameHasBeenSet(false),\n m_dataType(InventoryAttributeDataType::NOT_SET),\n m_dataTypeHasBeenSet(false)\n{\n}\n\nInventoryItemAttribute::InventoryItemAttribute(JsonView jsonValue) : \n m_nameHasBeenSet(false),\n m_dataType(InventoryAttributeDataType::NOT_SET),\n m_dataTypeHasBeenSet(false)\n{\n *this = jsonValue;\n}\n\nInventoryItemAttribute& InventoryItemAttribute::operator =(JsonView jsonValue)\n{\n if(jsonValue.ValueExists(\"Name\"))\n {\n m_name = jsonValue.GetString(\"Name\");\n\n m_nameHasBeenSet = true;\n }\n\n if(jsonValue.ValueExists(\"DataType\"))\n {\n m_dataType = InventoryAttributeDataTypeMapper::GetInventoryAttributeDataTypeForName(jsonValue.GetString(\"DataType\"));\n\n m_dataTypeHasBeenSet = true;\n }\n\n return *this;\n}\n\nJsonValue InventoryItemAttribute::Jsonize() const\n{\n JsonValue payload;\n\n if(m_nameHasBeenSet)\n {\n payload.WithString(\"Name\", m_name);\n\n }\n\n if(m_dataTypeHasBeenSet)\n {\n payload.WithString(\"DataType\", InventoryAttributeDataTypeMapper::GetNameForInventoryAttributeDataType(m_dataType));\n }\n\n return payload;\n}\n\n} // namespace Model\n} // namespace SSM\n} // namespace Aws\n"} +{"text": "asdf\n"} +{"text": "version: 2\njobs:\n build:\n working_directory: ~/ashfurrow/danger-swiftlint\n parallelism: 1\n shell: /bin/bash --login\n environment:\n LANG: en_US.UTF-8\n macos:\n xcode: '9.3.0'\n steps:\n - checkout\n - restore_cache:\n keys:\n - v1-build-{{ .Branch }}-\n - run:\n name: swift package update\n command: swift package update\n - run:\n name: swift build\n command: swift build\n - run:\n name: swift test\n command: swift test\n - save_cache:\n key: v1-build-{{ .Branch }}-{{ epoch }}\n paths:\n - .build\n - store_test_results:\n path: test_output/report.xml\n - store_artifacts:\n path: /tmp/test-results\n destination: scan-test-results\n - store_artifacts:\n path: ~/Library/Logs/scan\n destination: scan-logs"} +{"text": "/*\n * Copyright (c) 2020, APT Group, Department of Computer Science,\n * School of Engineering, The University of Manchester. All rights reserved.\n * Copyright (c) 2018, 2020, APT Group, Department of Computer Science,\n * The University of Manchester. All rights reserved.\n * Copyright (c) 2009, 2017, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n *\n * This code is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License version 2 only, as\n * published by the Free Software Foundation.\n *\n * This code is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * version 2 for more details (a copy is included in the LICENSE file that\n * accompanied this code).\n *\n * You should have received a copy of the GNU General Public License version\n * 2 along with this work; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * Authors: James Clarkson\n *\n */\npackage uk.ac.manchester.tornado.drivers.opencl.graal.compiler;\n\nimport static uk.ac.manchester.tornado.api.exceptions.TornadoInternalError.unimplemented;\n\nimport org.graalvm.compiler.code.DataSection.Data;\nimport org.graalvm.compiler.lir.asm.DataBuilder;\n\nimport jdk.vm.ci.meta.Constant;\n\npublic class OCLDataBuilder extends DataBuilder {\n\n @Override\n public Data createDataItem(Constant constant) {\n unimplemented(\"Create Data item in OpenCLDataBuilder not supported yet.\");\n return null;\n }\n\n}\n"} +{"text": "---\ntitle: Fetching data - Queries\nmetaTitle: \"GraphQL Queries to fetch data | Next.js GraphQL Serverless Tutorial\"\nmetaDescription: \"Try out GraphQL Query using GraphiQL. A GraphQL query example with parameters, arguments and variables to fetch data dynamically\"\ncanonicalUrl: \"https://hasura.io/learn/graphql/intro-graphql/graphql-queries/\"\n---\n\n## Try out GraphQL queries\n\nFor this tutorial we've set up a GraphQL API for you. The most common\nway to browse a GraphQL API is to use GraphiQL. GraphiQL is a tool\nbuilt by Facebook, (pronounced \"graphical\") that makes it easy to explore\nany GraphQL API.\n\nWhen you connect GraphiQL to a GraphQL endpoint, it\nqueries the server for its GraphQL schema and gives you a UI to browse\nand test queries, and that powers its amazing autocomplete!\n\n![GraphiQL demo](https://graphql-engine-cdn.hasura.io/learn-hasura/assets/graphql-react/graphiql.gif)\n\nTools like GraphiQL make GraphQL APIs really easy\nto use and integrate APIs in your app without requiring\nexternal documentation tools.\n\nYou can access the GraphiQL for this realtime todo app tutorial here:\n[hasura.io/learn/graphql/graphiql](https://hasura.io/learn/graphql/graphiql)\n\nWhen you work with a GraphQL API in a project you will almost always\nuse a tool like GraphiQL to explore and test your GraphQL queries.\n\n## Basic GraphQL query\n\n1. Open GraphiQL at: [hasura.io/learn/graphql/graphiql](https://hasura.io/learn/graphql/graphiql). \n You'll have to login to get an auth token to query the API. In a real-world scenario\n your GraphQL APIs will be protected.\n2. You'll see a URL, and headers that contain the auth\n token that will be sent along with your GraphQL query.\n3. Now, paste this GraphQL query in the GraphiQL window\n\n```graphql\n query {\n users {\n name\n }\n }\n```\n\n4. Hit `ctrl + enter` or `cmd + enter` (mac) or click on the ▶️ icon to run the GraphQL query\n5. On the right, you should see a list of users by their names that are in the system!\n\n<b><a href=\"https://hasura.io/learn/graphql/graphiql\" target=\"_blank\">Try it out in GraphiQL</a></b>\n\nRecall that there is no magic here! The hosted GraphiQL app is sending a GraphQL query string\nto the server at the given endpoint with the HTTP headers. The server then sends the response\nthat you see on the right hand side.\n\n## Fetching \"graphs\"\n\nOur todo app has users, todos and information about users that are currently online.\nThis is what our API \"schema\" looks like:\n\n![Schema](https://graphql-engine-cdn.hasura.io/learn-hasura/assets/graphql-react/schema.png)\n\nAs you can see, it is a \"graph\" like schema where all the 3 models are linked to each other.\n\nLet's try making queries that fetch different slices of our data from the overall \"graph\".\n\n### Fetch users and their todos\n\nThis GraphQL query will fetch all the users and their publicly visible todos:\n\n```graphql\n query {\n users {\n name\n todos {\n title\n }\n }\n }\n```\n\n<b><a href=\"https://hasura.io/learn/graphql/graphiql\" target=\"_blank\">Try it out in GraphiQL</a></b>\n\n\n### Fetch online users and their profile information\n\nThis GraphQL query will fetch all the currently online users\nand their profile information (which is just their name for now):\n\n```graphql\n query {\n online_users {\n last_seen\n user {\n name\n }\n }\n }\n```\n\n<b><a href=\"https://hasura.io/learn/graphql/graphiql\" target=\"_blank\">Try it out in GraphiQL</a></b>\n\n\n## Adding parameters (arguments) to GraphQL queries\n\nIn most API calls, you usually use parameters. For example, to specify what data you're fetching.\nIf you're familiar with making `GET` calls, you would have used a query parameter. For example,\nto fetch only 10 todos you might have made this API call: `GET /api/todos?limit=10`.\n\nThe GraphQL query analog of this is *arguments* that you can attach to a \"field\".\n\n### Basic argument: Fetch 10 todos\n\nThis GraphQL query will fetch 10 todos and not all of them.\n\n```graphql\nquery {\n todos(limit: 10) {\n id\n title\n }\n}\n```\n\n<b><a href=\"https://hasura.io/learn/graphql/graphiql\" target=\"_blank\">Try it out in GraphiQL</a></b>\n\nThe most important bit to check here is `limit: 10`. GraphQL servers will provide a list of\narguments that can be used in `()` next to specific fields. In our case, we are using\nHasura for creating the GraphQL backend which provides filter, sort and pagination arguments.\nThe GraphQL server or API that you use, might provide a different set of arguments that can be used.\n\n### Multiple arguments on multiple fields: Fetch 1 user and 5 most recent todos for each user\n\n```graphql\nquery {\n users (limit: 1) {\n id\n name\n todos(order_by: {created_at: desc}, limit: 5) {\n id\n title\n }\n }\n}\n```\n\nNotice that we are passing arguments to different fields. This GraphQL query reads as:\n> Fetch users (with limit 1), and their todos (ordered by descending creation time, and limited to 5).\n\n<b><a href=\"https://hasura.io/learn/graphql/graphiql\" target=\"_blank\">Try it out in GraphiQL</a></b>\n\n<a name=\"query-variables\"></a>\n\n## GraphQL variables: Passing arguments to your queries dynamically\n\nThis is great, but we still have a problem. If we want to create a query\nwhere we are fetching data with arguments that are provided dynamically, we'd have to \ncreate the entire query string again.\n\nThis is what we don't want to do:\n\n```javascript\nvar limit = getMaxTodosFromUserInput();\nvar query = \"query { todos (limit: \" + limit.toString() + \") {id title} }\";\n```\n\nThankfully, we don't ever have to do this! GraphQL variables are extra variables\nthat you can send in a query so that the \"arguments\" can be provided dynamically!\n\n## Fetch $limit number of todos\n\nThis is what our GraphQL query would look like:\n```graphql\nquery ($limit: Int!) {\n todos(limit: $limit) {\n id\n title\n }\n}\n```\n\nIn addition to the query above, we send a variables object:\n```json\n{\n \"limit\": 10\n}\n```\n\nNow instead of sending just the query to the GraphQL server, from our client\nwe'll send both the query and the variables. The GraphQL server will use the\nvariable in the right place in the query automatically for us!\n\nLet's try this out in GraphiQL:\n1. Head to GraphiQL\n2. Write out this query\n3. Scroll to the bottom of the page, where you see a smaller panel \"Query Variables\"\n4. Add the query variable as a JSON object\n\n<b><a href=\"https://hasura.io/learn/graphql/graphiql\" target=\"_blank\">Try it out in GraphiQL</a></b>\n\n## Summary\n\n- You can now make GraphQL queries\n- You know how to pass arguments to your GraphQL queries\n- You know how to make your arguments dynamic by using query variables\n\nNext, let's look at writing data and not just fetching data!\n"} +{"text": "/* This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/. */\nimport com.adobe.test.Assert;\n\n// var SECTION = \"Expressions\"; // provide a document reference (ie, Actionscript section)\n// var VERSION = \"AS3\"; // Version of ECMAScript or ActionScript\n// var TITLE = \"delete operator\"; // Provide ECMA section title or a description\nvar BUGNUMBER = \"\";\n\n\n// create the new object \"account\"\nvar account:Object = new Object();\n\n// create function\naccount.func = function () { return \"account.func\"; };\n\nAssert.expectEq(\"object's function\", \"function Function() {}\", account.func.toString());\nAssert.expectEq(\"call object's function\", \"account.func\", account.func());\nAssert.expectEq(\"delete instantiated object's function\", true, delete account.func);\nAssert.expectEq(\"account.func\", undefined, account.func);\n\n\n // displays results.\n"} +{"text": "require File.expand_path('../helper', __FILE__)\nrequire 'pathname'\n\nclass TestRakeFileList < Rake::TestCase\n FileList = Rake::FileList\n\n def setup\n super\n\n FileUtils.mkdir \"CVS\" rescue nil\n FileUtils.mkdir \".svn\" rescue nil\n @cdir = \"cfiles\"\n FileUtils.mkdir @cdir rescue nil\n FileUtils.touch \".dummy\"\n FileUtils.touch \"x.bak\"\n FileUtils.touch \"x~\"\n FileUtils.touch \"core\"\n FileUtils.touch \"x.c\"\n FileUtils.touch \"xyz.c\"\n FileUtils.touch \"abc.c\"\n FileUtils.touch \"abc.h\"\n FileUtils.touch \"abc.x\"\n FileUtils.touch \"existing\"\n\n open 'xyzzy.txt', 'w' do |io|\n io.puts 'x'\n io.puts 'XYZZY'\n end\n\n end\n\n def test_delegating_methods_do_not_include_to_a_or_to_ary\n assert ! FileList::DELEGATING_METHODS.include?(\"to_a\"), \"should not include to_a\"\n assert ! FileList::DELEGATING_METHODS.include?(:to_a), \"should not include to_a\"\n assert ! FileList::DELEGATING_METHODS.include?(\"to_ary\"), \"should not include to_ary\"\n assert ! FileList::DELEGATING_METHODS.include?(:to_ary), \"should not include to_ary\"\n end\n\n def test_create\n fl = FileList.new\n assert_equal 0, fl.size\n end\n\n def test_create_with_args\n fl = FileList.new(\"*.c\", \"x\")\n assert_equal [\"abc.c\", \"x.c\", \"xyz.c\", \"x\"].sort,\n fl.sort\n end\n\n def test_create_with_pathname\n fl = FileList.new(Pathname.new(\"*.c\"))\n assert_equal [\"abc.c\", \"x.c\", \"xyz.c\"].sort,\n fl.sort\n end\n\n def test_create_with_block\n fl = FileList.new { |f| f.include(\"x\") }\n assert_equal [\"x\"], fl.resolve\n end\n\n def test_create_with_brackets\n fl = FileList[\"*.c\", \"x\"]\n assert_equal [\"abc.c\", \"x.c\", \"xyz.c\", \"x\"].sort,\n fl.sort\n end\n\n def test_create_with_brackets_and_filelist\n fl = FileList[FileList[\"*.c\", \"x\"]]\n assert_equal [\"abc.c\", \"x.c\", \"xyz.c\", \"x\"].sort,\n fl.sort\n end\n\n def test_include_with_another_array\n fl = FileList.new.include([\"x\", \"y\", \"z\"])\n assert_equal [\"x\", \"y\", \"z\"].sort, fl.sort\n end\n\n def test_include_with_another_filelist\n fl = FileList.new.include(FileList[\"*.c\", \"x\"])\n assert_equal [\"abc.c\", \"x.c\", \"xyz.c\", \"x\"].sort,\n fl.sort\n end\n\n def test_include_with_pathname\n fl = FileList.new.include(Pathname.new(\"*.c\"))\n assert_equal [\"abc.c\", \"x.c\", \"xyz.c\"].sort,\n fl.sort\n end\n\n def test_append\n fl = FileList.new\n fl << \"a.rb\" << \"b.rb\"\n assert_equal ['a.rb', 'b.rb'], fl\n end\n\n def test_append_pathname\n fl = FileList.new\n fl << Pathname.new(\"a.rb\")\n assert_equal ['a.rb'], fl\n end\n\n def test_add_many\n fl = FileList.new\n fl.include %w(a d c)\n fl.include('x', 'y')\n assert_equal ['a', 'd', 'c', 'x', 'y'], fl\n assert_equal ['a', 'd', 'c', 'x', 'y'], fl.resolve\n end\n\n def test_add_return\n f = FileList.new\n g = f << \"x\"\n assert_equal f.object_id, g.object_id\n h = f.include(\"y\")\n assert_equal f.object_id, h.object_id\n end\n\n def test_match\n fl = FileList.new\n fl.include '*.c'\n\n assert_equal %w[abc.c x.c xyz.c], fl.sort\n end\n\n def test_add_matching\n fl = FileList.new\n fl << \"a.java\"\n fl.include '*.c'\n\n assert_equal %w[a.java abc.c x.c xyz.c], fl.sort\n end\n\n def test_multiple_patterns\n fl = FileList.new\n fl.include('*.z', '*foo*')\n\n assert_equal [], fl\n\n fl.include('*.c', '*xist*')\n assert_equal %w[x.c xyz.c abc.c existing].sort, fl.sort\n end\n\n def test_square_bracket_pattern\n fl = FileList.new\n fl.include(\"abc.[ch]\")\n assert fl.size == 2\n assert fl.include?(\"abc.c\")\n assert fl.include?(\"abc.h\")\n end\n\n def test_curly_bracket_pattern\n fl = FileList.new\n fl.include(\"abc.{c,h}\")\n assert fl.size == 2\n assert fl.include?(\"abc.c\")\n assert fl.include?(\"abc.h\")\n end\n\n def test_reject\n fl = FileList.new\n fl.include %w(x.c abc.c xyz.c existing)\n fl.reject! { |fn| fn =~ /^x/ }\n assert_equal %w[abc.c existing], fl\n end\n\n def test_exclude\n fl = FileList['x.c', 'abc.c', 'xyz.c', 'existing']\n fl.each { |fn| touch fn, :verbose => false }\n\n x = fl.exclude(%r{^x.+\\.})\n\n assert_equal FileList, x.class\n assert_equal %w(x.c abc.c existing), fl\n assert_equal fl.object_id, x.object_id\n\n fl.exclude('*.c')\n\n assert_equal ['existing'], fl\n\n fl.exclude('existing')\n\n assert_equal [], fl\n end\n\n def test_exclude_pathname\n fl = FileList['x.c', 'abc.c', 'other']\n fl.each { |fn| touch fn, :verbose => false }\n\n fl.exclude(Pathname.new('*.c'))\n\n assert_equal ['other'], fl\n end\n\n def test_excluding_via_block\n fl = FileList['a.c', 'b.c', 'xyz.c']\n fl.exclude { |fn| fn.pathmap('%n') == 'xyz' }\n assert fl.excluded_from_list?(\"xyz.c\"), \"Should exclude xyz.c\"\n assert_equal ['a.c', 'b.c'], fl\n end\n\n def test_exclude_return_on_create\n fl = FileList['*'].exclude(/.*\\.[hcx]$/)\n assert_equal %w[cfiles existing xyzzy.txt], fl.sort\n assert_equal FileList, fl.class\n end\n\n def test_exclude_with_string_return_on_create\n fl = FileList['*'].exclude('abc.c')\n assert_equal %w[abc.h abc.x cfiles existing x.c xyz.c xyzzy.txt], fl.sort\n assert_equal FileList, fl.class\n end\n\n def test_default_exclude\n fl = FileList.new\n fl.clear_exclude\n fl.include(\"**/*~\", \"**/*.bak\", \"**/core\")\n assert fl.member?(\"core\"), \"Should include core\"\n assert fl.member?(\"x.bak\"), \"Should include .bak files\"\n end\n\n def test_unique\n fl = FileList.new\n fl << \"x.c\" << \"a.c\" << \"b.rb\" << \"a.c\"\n assert_equal ['x.c', 'a.c', 'b.rb', 'a.c'], fl\n fl.uniq!\n assert_equal ['x.c', 'a.c', 'b.rb'], fl\n end\n\n def test_to_string\n fl = FileList.new\n fl << \"a.java\" << \"b.java\"\n assert_equal \"a.java b.java\", fl.to_s\n assert_equal \"a.java b.java\", \"#{fl}\"\n end\n\n def test_to_array\n fl = FileList['a.java', 'b.java']\n assert_equal ['a.java', 'b.java'], fl.to_a\n assert_equal Array, fl.to_a.class\n assert_equal ['a.java', 'b.java'], fl.to_ary\n assert_equal Array, fl.to_ary.class\n end\n\n def test_to_s_pending\n fl = FileList['abc.*']\n result = fl.to_s\n assert_match(%r{abc\\.c}, result)\n assert_match(%r{abc\\.h}, result)\n assert_match(%r{abc\\.x}, result)\n assert_match(%r{(abc\\..\\b ?){2}}, result)\n end\n\n def test_inspect_pending\n fl = FileList['abc.*']\n result = fl.inspect\n assert_match(%r{\"abc\\.c\"}, result)\n assert_match(%r{\"abc\\.h\"}, result)\n assert_match(%r{\"abc\\.x\"}, result)\n assert_match(%r|^\\[(\"abc\\..\", ){2}\"abc\\..\"\\]$|, result)\n end\n\n def test_sub\n fl = FileList[\"*.c\"]\n f2 = fl.sub(/\\.c$/, \".o\")\n assert_equal FileList, f2.class\n assert_equal [\"abc.o\", \"x.o\", \"xyz.o\"].sort,\n f2.sort\n f3 = fl.gsub(/\\.c$/, \".o\")\n assert_equal FileList, f3.class\n assert_equal [\"abc.o\", \"x.o\", \"xyz.o\"].sort,\n f3.sort\n end\n\n def test_claim_to_be_a_kind_of_array\n fl = FileList['*.c']\n assert fl.is_a?(Array)\n assert fl.kind_of?(Array)\n end\n\n def test_claim_to_be_a_kind_of_filelist\n fl = FileList['*.c']\n assert fl.is_a?(FileList)\n assert fl.kind_of?(FileList)\n end\n\n def test_claim_to_be_a_filelist_instance\n fl = FileList['*.c']\n assert fl.instance_of?(FileList)\n end\n\n def test_dont_claim_to_be_an_array_instance\n fl = FileList['*.c']\n assert ! fl.instance_of?(Array)\n end\n\n def test_sub!\n f = \"x/a.c\"\n fl = FileList[f, \"x/b.c\"]\n res = fl.sub!(/\\.c$/, \".o\")\n assert_equal [\"x/a.o\", \"x/b.o\"].sort, fl.sort\n assert_equal \"x/a.c\", f\n assert_equal fl.object_id, res.object_id\n end\n\n def test_sub_with_block\n fl = FileList[\"src/org/onestepback/a.java\", \"src/org/onestepback/b.java\"]\n# The block version doesn't work the way I want it to ...\n# f2 = fl.sub(%r{^src/(.*)\\.java$}) { |x| \"classes/\" + $1 + \".class\" }\n f2 = fl.sub(%r{^src/(.*)\\.java$}, \"classes/\\\\1.class\")\n assert_equal [\n \"classes/org/onestepback/a.class\",\n \"classes/org/onestepback/b.class\"\n ].sort,\n f2.sort\n end\n\n def test_string_ext\n assert_equal \"one.net\", \"one.two\".ext(\"net\")\n assert_equal \"one.net\", \"one.two\".ext(\".net\")\n assert_equal \"one.net\", \"one\".ext(\"net\")\n assert_equal \"one.net\", \"one\".ext(\".net\")\n assert_equal \"one.two.net\", \"one.two.c\".ext(\".net\")\n assert_equal \"one/two.net\", \"one/two.c\".ext(\".net\")\n assert_equal \"one.x/two.net\", \"one.x/two.c\".ext(\".net\")\n assert_equal \"one.x/two.net\", \"one.x/two\".ext(\".net\")\n assert_equal \".onerc.net\", \".onerc.dot\".ext(\"net\")\n assert_equal \".onerc.net\", \".onerc\".ext(\"net\")\n assert_equal \".a/.onerc.net\", \".a/.onerc\".ext(\"net\")\n assert_equal \"one\", \"one.two\".ext('')\n assert_equal \"one\", \"one.two\".ext\n assert_equal \".one\", \".one.two\".ext\n assert_equal \".one\", \".one\".ext\n assert_equal \".\", \".\".ext(\"c\")\n assert_equal \"..\", \"..\".ext(\"c\")\n # These only need to work in windows\n if Rake::Win32.windows?\n assert_equal \"one.x\\\\two.net\", \"one.x\\\\two.c\".ext(\".net\")\n assert_equal \"one.x\\\\two.net\", \"one.x\\\\two\".ext(\".net\")\n end\n end\n\n def test_filelist_ext\n assert_equal FileList['one.c', '.one.c'],\n FileList['one.net', '.one'].ext('c')\n end\n\n def test_gsub\n fl = FileList[\"*.c\"]\n f2 = fl.gsub(/a/, \"A\")\n assert_equal [\"Abc.c\", \"x.c\", \"xyz.c\"].sort,\n f2.sort\n end\n\n def test_gsub!\n f = FileList[\"*.c\"]\n f.gsub!(/a/, \"A\")\n assert_equal [\"Abc.c\", \"x.c\", \"xyz.c\"].sort,\n f.sort\n end\n\n def test_egrep_returns_0_if_no_matches\n files = FileList['test/lib/*_test.rb'].exclude(\"test/lib/filelist_test.rb\")\n assert_equal 0, files.egrep(/XYZZY/) { }\n end\n\n def test_egrep_with_output\n files = FileList['*.txt']\n\n out, = capture_io do\n files.egrep(/XYZZY/)\n end\n\n assert_equal \"xyzzy.txt:2:XYZZY\\n\", out\n end\n\n def test_egrep_with_block\n files = FileList['*.txt']\n found = nil\n\n files.egrep(/XYZZY/) do |fn, ln, line|\n found = [fn, ln, line]\n end\n\n assert_equal [\"xyzzy.txt\", 2, \"XYZZY\\n\"], found\n end\n\n def test_egrep_with_error\n files = FileList['*.txt']\n\n _, err = capture_io do\n files.egrep(/XYZZY/) do |fn, ln, line |\n raise \"_EGREP_FAILURE_\"\n end\n end\n\n assert_equal \"Error while processing 'xyzzy.txt': _EGREP_FAILURE_\\n\", err\n end\n\n def test_existing\n fl = FileList['abc.c', 'notthere.c']\n assert_equal [\"abc.c\"], fl.existing\n assert fl.existing.is_a?(FileList)\n end\n\n def test_existing!\n fl = FileList['abc.c', 'notthere.c']\n result = fl.existing!\n assert_equal [\"abc.c\"], fl\n assert_equal fl.object_id, result.object_id\n end\n\n def test_ignore_special\n f = FileList['*']\n assert ! f.include?(\"CVS\"), \"Should not contain CVS\"\n assert ! f.include?(\".svn\"), \"Should not contain .svn\"\n assert ! f.include?(\".dummy\"), \"Should not contain dot files\"\n assert ! f.include?(\"x.bak\"), \"Should not contain .bak files\"\n assert ! f.include?(\"x~\"), \"Should not contain ~ files\"\n assert ! f.include?(\"core\"), \"Should not contain core files\"\n end\n\n def test_clear_ignore_patterns\n f = FileList['*', '.svn']\n f.clear_exclude\n assert f.include?(\"abc.c\")\n assert f.include?(\"xyz.c\")\n assert f.include?(\"CVS\")\n assert f.include?(\".svn\")\n assert f.include?(\"x.bak\")\n assert f.include?(\"x~\")\n end\n\n def test_exclude_with_alternate_file_seps\n fl = FileList.new\n assert fl.excluded_from_list?(\"x/CVS/y\")\n assert fl.excluded_from_list?(\"x\\\\CVS\\\\y\")\n assert fl.excluded_from_list?(\"x/.svn/y\")\n assert fl.excluded_from_list?(\"x\\\\.svn\\\\y\")\n assert fl.excluded_from_list?(\"x/core\")\n assert fl.excluded_from_list?(\"x\\\\core\")\n end\n\n def test_add_default_exclude_list\n fl = FileList.new\n fl.exclude(/~\\d+$/)\n assert fl.excluded_from_list?(\"x/CVS/y\")\n assert fl.excluded_from_list?(\"x\\\\CVS\\\\y\")\n assert fl.excluded_from_list?(\"x/.svn/y\")\n assert fl.excluded_from_list?(\"x\\\\.svn\\\\y\")\n assert fl.excluded_from_list?(\"x/core\")\n assert fl.excluded_from_list?(\"x\\\\core\")\n assert fl.excluded_from_list?(\"x/abc~1\")\n end\n\n def test_basic_array_functions\n f = FileList['b', 'c', 'a']\n assert_equal 'b', f.first\n assert_equal 'b', f[0]\n assert_equal 'a', f.last\n assert_equal 'a', f[2]\n assert_equal 'a', f[-1]\n assert_equal ['a', 'b', 'c'], f.sort\n f.sort!\n assert_equal ['a', 'b', 'c'], f\n end\n\n def test_flatten\n assert_equal ['a', 'x.c', 'xyz.c', 'abc.c'].sort,\n ['a', FileList['*.c']].flatten.sort\n end\n\n def test_clone_and_dup\n a = FileList['a', 'b', 'c']\n c = a.clone\n d = a.dup\n a << 'd'\n assert_equal ['a', 'b', 'c', 'd'], a\n assert_equal ['a', 'b', 'c'], c\n assert_equal ['a', 'b', 'c'], d\n end\n\n def test_dup_and_clone_replicate_taint\n a = FileList['a', 'b', 'c']\n a.taint\n c = a.clone\n d = a.dup\n assert c.tainted?, \"Clone should be tainted\"\n assert d.tainted?, \"Dup should be tainted\"\n end\n\n def test_duped_items_will_thaw\n a = FileList['a', 'b', 'c']\n a.freeze\n d = a.dup\n d << 'more'\n assert_equal ['a', 'b', 'c', 'more'], d\n end\n\n def test_cloned_items_stay_frozen\n a = FileList['a', 'b', 'c']\n a.freeze\n c = a.clone\n assert_raises(TypeError, RuntimeError) do\n c << 'more'\n end\n end\n\n def test_array_comparisons\n fl = FileList['b', 'b']\n a = ['b', 'a']\n b = ['b', 'b']\n c = ['b', 'c']\n assert_equal(1, fl <=> a)\n assert_equal(0, fl <=> b)\n assert_equal(-1, fl <=> c)\n assert_equal(-1, a <=> fl)\n assert_equal(0, b <=> fl)\n assert_equal(1, c <=> fl)\n end\n\n def test_array_equality\n a = FileList['a', 'b']\n b = ['a', 'b']\n assert a == b\n assert b == a\n# assert a.eql?(b)\n# assert b.eql?(a)\n assert ! a.equal?(b)\n assert ! b.equal?(a)\n end\n\n def test_enumeration_methods\n a = FileList['a', 'b']\n b = a.map { |it| it.upcase }\n assert_equal ['A', 'B'], b\n assert_equal FileList, b.class\n\n b = a.map { |it| it.upcase }\n assert_equal ['A', 'B'], b\n assert_equal FileList, b.class\n\n b = a.sort\n assert_equal ['a', 'b'], b\n assert_equal FileList, b.class\n\n b = a.sort_by { |it| it }\n assert_equal ['a', 'b'], b\n assert_equal FileList, b.class\n\n b = a.select { |it| it == 'b' }\n assert_equal ['b'], b\n assert_equal FileList, b.class\n\n b = a.select { |it| it.size == 1 }\n assert_equal ['a', 'b'], b\n assert_equal FileList, b.class\n\n b = a.reject { |it| it == 'b' }\n assert_equal ['a'], b\n assert_equal FileList, b.class\n\n b = a.grep(/./)\n assert_equal ['a', 'b'], b\n assert_equal FileList, b.class\n\n b = a.partition { |it| it == 'b' }\n assert_equal [['b'], ['a']], b\n assert_equal Array, b.class\n assert_equal FileList, b[0].class\n assert_equal FileList, b[1].class\n\n b = a.zip(['x', 'y']).to_a\n assert_equal [['a', 'x'], ['b', 'y']], b\n assert_equal Array, b.class\n assert_equal Array, b[0].class\n assert_equal Array, b[1].class\n end\n\n def test_array_operators\n a = ['a', 'b']\n b = ['c', 'd']\n f = FileList['x', 'y']\n g = FileList['w', 'z']\n\n r = f + g\n assert_equal ['x', 'y', 'w', 'z'], r\n assert_equal FileList, r.class\n\n r = a + g\n assert_equal ['a', 'b', 'w', 'z'], r\n assert_equal Array, r.class\n\n r = f + b\n assert_equal ['x', 'y', 'c', 'd'], r\n assert_equal FileList, r.class\n\n r = FileList['w', 'x', 'y', 'z'] - f\n assert_equal ['w', 'z'], r\n assert_equal FileList, r.class\n\n r = FileList['w', 'x', 'y', 'z'] & f\n assert_equal ['x', 'y'], r\n assert_equal FileList, r.class\n\n r = f * 2\n assert_equal ['x', 'y', 'x', 'y'], r\n assert_equal FileList, r.class\n\n r = f * ','\n assert_equal 'x,y', r\n assert_equal String, r.class\n\n r = f | ['a', 'x']\n assert_equal ['a', 'x', 'y'].sort, r.sort\n assert_equal FileList, r.class\n end\n\n def test_other_array_returning_methods\n f = FileList['a', nil, 'b']\n r = f.compact\n assert_equal ['a', 'b'], r\n assert_equal FileList, r.class\n\n f = FileList['a', 'b']\n r = f.concat(['x', 'y'])\n assert_equal ['a', 'b', 'x', 'y'], r\n assert_equal FileList, r.class\n\n f = FileList['a', ['b', 'c'], FileList['d', 'e']]\n r = f.flatten\n assert_equal ['a', 'b', 'c', 'd', 'e'], r\n assert_equal FileList, r.class\n\n f = FileList['a', 'b', 'a']\n r = f.uniq\n assert_equal ['a', 'b'], r\n assert_equal FileList, r.class\n\n f = FileList['a', 'b', 'c', 'd']\n r = f.values_at(1, 3)\n assert_equal ['b', 'd'], r\n assert_equal FileList, r.class\n end\n\n def test_file_utils_can_use_filelists\n cfiles = FileList['*.c']\n\n cp cfiles, @cdir, :verbose => false\n\n assert File.exist?(File.join(@cdir, 'abc.c'))\n assert File.exist?(File.join(@cdir, 'xyz.c'))\n assert File.exist?(File.join(@cdir, 'x.c'))\n end\n\nend\n"} +{"text": "#include <cstdio>\n#include <map>\n\nusing namespace std;\n\nint main(){\n int T,n,x[1000],y[1000],ans,aux;\n scanf(\"%d\",&T);\n \n map< pair<int,int> , int>::iterator it;\n \n for(int tc=1;tc<=T;++tc){\n scanf(\"%d\",&n);\n \n map< pair<int,int> , int> M;\n \n for(int i=0;i<n;++i) scanf(\"%d %d\",&x[i],&y[i]);\n \n for(int i=0;i<n;++i) for(int j=0;j<i;++j) ++M[make_pair(x[i]+x[j],y[i]+y[j])];\n \n ans = 0;\n \n for(it=M.begin();it!=M.end();++it){\n aux = it->second;\n ans += aux*(aux-1)/2;\n }\n \n printf(\"%d\\n\",ans);\n }\n \n return 0;\n}\n"} +{"text": "/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\ndefine(['marionette'], function(Marionette) {\n\n var App = new Marionette.Application();\n\n App.addRegions({\n rHeader: '#header',\n rSideNav: '#sidebar-wrapper',\n rContent: '#page-wrapper'\n });\n\n App.addInitializer(function() {\n Backbone.history.start();\n });\n\n return App;\n});"} +{"text": "#ifndef MXNET_OPERATOR_ROI_POOLING_INL_H_\n#define MXNET_OPERATOR_ROI_POOLING_INL_H_\n\n#include <dmlc/logging.h>\n#include <dmlc/parameter.h>\n#include <mxnet/operator.h>\n#include <map>\n#include <vector>\n#include <string>\n#include <utility>\n#include \"./operator_common.h\"\n#include \"./mshadow_op.h\"\n\nnamespace mxnet {\nnamespace op {\n\nnamespace roiwarp_enum {\nenum ROIWarpingOpInputs {kData, kROI, kGroundTruth};\nenum ROIWarpingOpOutputs {kOut};\n}\n\nstruct ROIWarpingParam : public dmlc::Parameter<ROIWarpingParam> {\n\tTShape warped_shape;\n\tfloat spatial_scale;\n\tDMLC_DECLARE_PARAMETER(ROIWarpingParam) {\n\t\tint shape[] = {1, 1};\n\t\tDMLC_DECLARE_FIELD(warped_shape).set_default(TShape(shape, shape + 2))\n\t\t.set_expect_ndim(2)\n\t\t.describe(\"warped_shape: for warping (y, x)\");\n DMLC_DECLARE_FIELD(spatial_scale).set_default(1.0)\n .describe(\"spatial scale\");\n }\n};\n\ntemplate<typename xpu>\nclass ROIWarpingOp : public Operator {\n public:\n explicit ROIWarpingOp(ROIWarpingParam p) {\n this->param_ = p;\n }\n\n virtual void Forward(const OpContext &ctx,\n const std::vector<TBlob> &in_data,\n const std::vector<OpReqType> &req,\n const std::vector<TBlob> &out_data,\n const std::vector<TBlob> &aux_args) {\n using namespace mshadow;\n using namespace mshadow::expr;\n CHECK_EQ(in_data.size(), 3) << \"ROIWarpingOp Input: [data, roi, ground_truth]\";\n\t\tCHECK_EQ(out_data.size(), 1) << \"ROIWarpingOp Output: [output]\";\n\t\tStream<xpu> *s = ctx.get_stream<xpu>();\n\t\tTensor<xpu, 4> data = in_data[roiwarp_enum::kData].get<xpu, 4, real_t>(s);\n\t\tTensor<xpu, 4> out = out_data[roiwarp_enum::kOut].get<xpu, 4, real_t>(s);\n\t\tTensor<xpu, 4> rois = in_data[roiwarp_enum::kROI].get<xpu, 4, real_t>(s);\n\t\tTensor<xpu, 2> gt = in_data[roiwarp_enum::kGroundTruth].get<xpu, 2, real_t>(s);\n\t\t\n\t\tmshadow::Shape<2> warped_shape = Shape2(param_.warped_shape[0],\n\t\t\t\t\t\t\t\t\t\t\t\tparam_.warped_shape[1]);\n\n\t\tAssign(out, req[roiwarp_enum::kOut],\n\t\t\t roi_warp(data, rois, gt, warped_shape, param_.spatial_scale));\n }\n\n\tvirtual void Backward(const OpContext &ctx,\n\t\t\t\t\t\t const std::vector<TBlob> &out_grad,\n\t\t\t\t\t\t const std::vector<TBlob> &in_data,\n\t\t\t\t\t\t const std::vector<TBlob> &out_data,\n\t\t\t\t\t\t const std::vector<OpReqType> &req,\n\t\t\t\t\t\t const std::vector<TBlob> &in_grad,\n\t\t\t\t\t\t const std::vector<TBlob> &aux_args) {\n\t\tusing namespace mshadow;\n\t\tusing namespace mshadow::expr;\n\t\t/*\n\t\tCHECK_EQ(out_grad.size(), 1);\n\t\tCHECK_EQ(in_data.size(), 2);\n\t\tCHECK_EQ(out_data.size(), 1);\n\t\tCHECK_EQ(req.size(), 2);\n\t\tCHECK_EQ(in_grad.size(), 2);\n\t\tStream<xpu> *s = ctx.get_stream<xpu>();\n\t\tTensor<xpu, 4> grad = out_grad[roiwarp_enum::kOut].get<xpu, 4, real_t>(s);\n\t\tTensor<xpu, 4> data = in_data[roiwarp_enum::kData].get<xpu, 4, real_t>(s);\n\t\tTensor<xpu, 2> rois = in_data[roiwarp_enum::kROI].get<xpu, 2, real_t>(s);\n\t\tTensor<xpu, 4> data_grad = in_grad[roiwarp_enum::kData].get<xpu, 4, real_t>(s);\n\t\tTensor<xpu, 2> rois_grad = in_grad[roiwarp_enum::kROI].get<xpu, 2, real_t>(s);\n\t\t\n\t\tmshadow::Shape<2> warped_shape = Shape2(param_.warped_shape[0],\n\t\t\t\t\t\t\t\t\t\t\t\tparam_.warped_shape[1]);\n\n\t\tAssign(data_grad, req[roiwarp_enum::kData],\n\t\t\t roi_unwarp_data(data, rois, grad, warped_shape, param_.spatial_scale));\n\t\tAssign(rois_grad, req[roiwarp_enum::kROI],\n\t\t\t roi_unwarp_rois(data, rois, grad, warped_shape, param_.spatial_scale));\n\t\t*/\n\t}\n\n\tprivate:\n\t\tROIWarpingParam param_;\n};\n\ntemplate<typename xpu>\nOperator *CreateOp(ROIWarpingParam param);\n\n#if DMLC_USE_CXX11\nclass ROIWarpingProp : public OperatorProperty {\n\tpublic:\n\t\tstd::vector<std::string> ListArguments() const override {\n\t\t\treturn {\"data\", \"rois\", \"ground truth\"};\n\t\t}\n\n\t\tvoid Init(const std::vector<std::pair<std::string, std::string> >& kwargs) override {\n\t\t\tparam_.Init(kwargs);\n\t\t}\n\n\t\tstd::map<std::string, std::string> GetParams() const override {\n\t\t\treturn param_.__DICT__();\n\t\t}\n\n\t\tbool InferShape(std::vector<TShape> *in_shape,\n\t\t\t\t\t\tstd::vector<TShape> *out_shape,\n\t\t\t\t\t\tstd::vector<TShape> *aux_shape) const override {\n\t\t\tCHECK_EQ(in_shape->size(), 3) << \"Input: [data, rois, ground truth]\";\n\t\t\tconst TShape &dshape = in_shape->at(0);\n\t\t\tconst TShape &rshape = in_shape->at(1);\n\t\t\tconst TShape &gtshape = in_shape->at(2);\n\t\t\tCHECK_EQ(dshape.ndim(), 4) << \\\n\t\t\t\t\"ROIWarping: Input data should be 4D in (batch, channel, y, x)\";\n\t\t\tCHECK_EQ(rshape.ndim(), 4) << \\\n\t\t\t\t\"ROIWarping: Input roi should be 4D in (batch, h, w, 4)\";\n\t\t\tCHECK_EQ(gtshape.ndim(), 2) << \\\n\t\t\t\t\"ROIWarping: Input ground truth should be 2D in (num_gt, 2)\";\n\t\t\tTShape oshape = dshape;\n\t\t\tif(dshape.ndim() == 0) return false;\n\t\t\toshape[0] = gtshape[0];\n\t\t\toshape[2] = param_.warped_shape[0];\n\t\t\toshape[3] = param_.warped_shape[1];\n\t\t\tout_shape->clear();\n\t\t\tout_shape->push_back(oshape);\n\t\t\treturn true;\n\t\t}\n\n\t\tOperatorProperty* Copy() const override {\n\t\t\tROIWarpingProp *prop_sym = new ROIWarpingProp();\n\t\t\tprop_sym->param_ = this->param_;\n\t\t\treturn prop_sym;\n\t\t}\n\n\t\tstd::string TypeString() const override {\n\t\t\treturn \"ROIWarping\";\n\t\t}\n\n\t\tstd::vector<int> DeclareBackwardDependency(\n\t\t\t\tconst std::vector<int> &out_grad,\n\t\t\t\tconst std::vector<int> &in_data,\n\t\t\t\tconst std::vector<int> &out_data) const override {\n\t\t\treturn {out_grad[roiwarp_enum::kOut], \n\t\t\t\t\tin_data[roiwarp_enum::kData], \n\t\t\t\t\tin_data[roiwarp_enum::kROI]};\n\t\t}\n\n\t\tstd::vector<std::pair<int, void*> > BackwardInplaceOption(\n\t\t\t\tconst std::vector<int> &out_grad,\n\t\t\t\tconst std::vector<int> &in_data,\n\t\t\t\tconst std::vector<int> &out_data,\n\t\t\t\tconst std::vector<void*> &in_grad) const override {\n\t\t\treturn {{in_data[roiwarp_enum::kData], in_grad[roiwarp_enum::kData]}};\n\t\t}\n\n\t\tOperator *CreateOperator(Context ctx) const override;\n\n\tprivate:\n\t\tROIWarpingParam param_;\n};\n\n#endif\n}\n}\n\n#endif\n"} +{"text": "<?php\n\nnamespace ZfcUser\\Mapper\\Exception;\n\nuse ZfcBase\\Mapper\\Exception\\ExceptionInterface as Exception;\n\ninterface ExceptionInterface extends Exception\n{\n}\n"} +{"text": "// Colors\n\n$black: hsl(0, 0%, 4%) !default\n$black-bis: hsl(0, 0%, 7%) !default\n$black-ter: hsl(0, 0%, 14%) !default\n\n$grey-darker: hsl(0, 0%, 21%) !default\n$grey-dark: hsl(0, 0%, 29%) !default\n$grey: hsl(0, 0%, 48%) !default\n$grey-light: hsl(0, 0%, 71%) !default\n$grey-lighter: hsl(0, 0%, 86%) !default\n$grey-lightest: hsl(0, 0%, 93%) !default\n\n$white-ter: hsl(0, 0%, 96%) !default\n$white-bis: hsl(0, 0%, 98%) !default\n$white: hsl(0, 0%, 100%) !default\n\n$orange: hsl(14, 100%, 53%) !default\n$yellow: hsl(48, 100%, 67%) !default\n$green: hsl(141, 53%, 53%) !default\n$turquoise: hsl(171, 100%, 41%) !default\n$cyan: hsl(204, 71%, 53%) !default\n$blue: hsl(217, 71%, 53%) !default\n$purple: hsl(271, 100%, 71%) !default\n$red: hsl(348, 86%, 61%) !default\n\n// Typography\n\n$family-sans-serif: BlinkMacSystemFont, -apple-system, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", \"Helvetica\", \"Arial\", sans-serif !default\n$family-monospace: monospace !default\n$render-mode: optimizeLegibility !default\n\n$size-1: 3rem !default\n$size-2: 2.5rem !default\n$size-3: 2rem !default\n$size-4: 1.5rem !default\n$size-5: 1.25rem !default\n$size-6: 1rem !default\n$size-7: 0.75rem !default\n\n$weight-light: 300 !default\n$weight-normal: 400 !default\n$weight-medium: 500 !default\n$weight-semibold: 600 !default\n$weight-bold: 700 !default\n\n// Spacing\n\n$block-spacing: 1.5rem !default\n\n// Responsiveness\n\n// The container horizontal gap, which acts as the offset for breakpoints\n$gap: 32px !default\n// 960, 1152, and 1344 have been chosen because they are divisible by both 12 and 16\n$tablet: 769px !default\n// 960px container + 4rem\n$desktop: 960px + (2 * $gap) !default\n// 1152px container + 4rem\n$widescreen: 1152px + (2 * $gap) !default\n$widescreen-enabled: true !default\n// 1344px container + 4rem\n$fullhd: 1344px + (2 * $gap) !default\n$fullhd-enabled: true !default\n\n// Miscellaneous\n\n$easing: ease-out !default\n$radius-small: 2px !default\n$radius: 4px !default\n$radius-large: 6px !default\n$radius-rounded: 290486px !default\n$speed: 86ms !default\n\n// Flags\n\n$variable-columns: true !default\n"} +{"text": "cask \"agfeo-dashboard\" do\n version \"1.2.0,A145F3A9D3FECE0BC12584F500300845\"\n sha256 \"c00cef11a7f916b6877a3e5877dcf847d6f338beb1ab3d4d30ea0465f0464b40\"\n\n url \"https://www2.agfeo.de/agfeo_web/dokulib.nsf/Anlage_w/#{version.after_comma}/$FILE/AGFEO-Dashboard_x64_agfeo_#{version.before_comma}.dmg\"\n appcast \"https://info.agfeo.de/agfeo_web/DokuLib.nsf/lu_04/5077_2\"\n name \"AGFEO Dashboard\"\n homepage \"https://www.agfeo.de/\"\n\n depends_on macos: \">= :sierra\"\n\n app \"AGFEO-Dashboard.app\"\nend\n"} +{"text": "# How to update Hummingbot\n\n## Update via Docker\n\nWe regularly update Hummingbot (see [Release Notes](/release-notes/)) and recommend users to regularly update their installations to get the latest version of the software. \n\nUpdating to the latest docker image (e.g. `coinalpha/hummingbot:latest`) requires users to (1) delete any instances of Hummingbot using that image, (2) delete the old image, and (3) recreate the Hummingbot instance:\n\n```bash tab=\"Script\"\n# 1) Download update script\nwget https://raw.githubusercontent.com/CoinAlpha/hummingbot/development/installation/docker-commands/update.sh\n\n# 2) Enable script permissions\nchmod a+x update.sh\n\n# 3) Run script to update hummingbot\n./update.sh\n```\n\n```bash tab=\"Detailed Commands\"\n# 1) Delete instance\ndocker rm hummingbot-instance\n\n# 2) Delete old hummingbot image\ndocker image rm coinalpha/hummingbot:latest\n\n# 3) Re-create instance with latest hummingbot release\ndocker run -it \\\n--network host \\\n--name hummingbot-instance \\\n--mount \"type=bind,source=$(pwd)/hummingbot_files/hummingbot_conf,destination=/conf/\" \\\n--mount \"type=bind,source=$(pwd)/hummingbot_files/hummingbot_logs,destination=/logs/\" \\\n--mount \"type=bind,source=$(pwd)/hummingbot_files/hummingbot_data,destination=/data/\" \\\ncoinalpha/hummingbot:latest\n```\n\n\n## Update from source\n\nDownload the latest code from GitHub:\n\n```bash\n# From the hummingbot root folder:\ngit pull origin master\n\n# Recompile the code:\nconda deactivate\n./uninstall\n./clean\n./install\nconda activate hummingbot\n./compile\nbin/hummingbot.py\n```\n\nAlternatively, use our automated script:\n\n```bash\n# 1) Download update script to the *root* folder\nwget https://raw.githubusercontent.com/CoinAlpha/hummingbot/development/installation/install-from-source/update.sh\n\n# 2) Enable script permissions\nchmod a+x update.sh\n\n# 3) Run script to update hummingbot\n./update.sh\n```\n"} +{"text": "/*\n * fs/inotify_user.c - inotify support for userspace\n *\n * Authors:\n *\tJohn McCutchan\t<ttb@tentacle.dhs.org>\n *\tRobert Love\t<rml@novell.com>\n *\n * Copyright (C) 2005 John McCutchan\n * Copyright 2006 Hewlett-Packard Development Company, L.P.\n *\n * Copyright (C) 2009 Eric Paris <Red Hat Inc>\n * inotify was largely rewriten to make use of the fsnotify infrastructure\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the\n * Free Software Foundation; either version 2, or (at your option) any\n * later version.\n *\n * This program is distributed in the hope that it will be useful, but\n * WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * General Public License for more details.\n */\n\n#include <linux/file.h>\n#include <linux/fs.h> /* struct inode */\n#include <linux/fsnotify_backend.h>\n#include <linux/idr.h>\n#include <linux/init.h> /* module_init */\n#include <linux/inotify.h>\n#include <linux/kernel.h> /* roundup() */\n#include <linux/namei.h> /* LOOKUP_FOLLOW */\n#include <linux/sched.h> /* struct user */\n#include <linux/slab.h> /* struct kmem_cache */\n#include <linux/syscalls.h>\n#include <linux/types.h>\n#include <linux/anon_inodes.h>\n#include <linux/uaccess.h>\n#include <linux/poll.h>\n#include <linux/wait.h>\n\n#include \"inotify.h\"\n\n#include <asm/ioctls.h>\n\n/* these are configurable via /proc/sys/fs/inotify/ */\nstatic int inotify_max_user_instances __read_mostly;\nstatic int inotify_max_queued_events __read_mostly;\nstatic int inotify_max_user_watches __read_mostly;\n\nstatic struct kmem_cache *inotify_inode_mark_cachep __read_mostly;\nstruct kmem_cache *event_priv_cachep __read_mostly;\n\n#ifdef CONFIG_SYSCTL\n\n#include <linux/sysctl.h>\n\nstatic int zero;\n\nctl_table inotify_table[] = {\n\t{\n\t\t.procname\t= \"max_user_instances\",\n\t\t.data\t\t= &inotify_max_user_instances,\n\t\t.maxlen\t\t= sizeof(int),\n\t\t.mode\t\t= 0644,\n\t\t.proc_handler\t= proc_dointvec_minmax,\n\t\t.extra1\t\t= &zero,\n\t},\n\t{\n\t\t.procname\t= \"max_user_watches\",\n\t\t.data\t\t= &inotify_max_user_watches,\n\t\t.maxlen\t\t= sizeof(int),\n\t\t.mode\t\t= 0644,\n\t\t.proc_handler\t= proc_dointvec_minmax,\n\t\t.extra1\t\t= &zero,\n\t},\n\t{\n\t\t.procname\t= \"max_queued_events\",\n\t\t.data\t\t= &inotify_max_queued_events,\n\t\t.maxlen\t\t= sizeof(int),\n\t\t.mode\t\t= 0644,\n\t\t.proc_handler\t= proc_dointvec_minmax,\n\t\t.extra1\t\t= &zero\n\t},\n\t{ }\n};\n#endif /* CONFIG_SYSCTL */\n\nstatic inline __u32 inotify_arg_to_mask(u32 arg)\n{\n\t__u32 mask;\n\n\t/*\n\t * everything should accept their own ignored, cares about children,\n\t * and should receive events when the inode is unmounted\n\t */\n\tmask = (FS_IN_IGNORED | FS_EVENT_ON_CHILD | FS_UNMOUNT);\n\n\t/* mask off the flags used to open the fd */\n\tmask |= (arg & (IN_ALL_EVENTS | IN_ONESHOT | IN_EXCL_UNLINK));\n\n\treturn mask;\n}\n\nstatic inline u32 inotify_mask_to_arg(__u32 mask)\n{\n\treturn mask & (IN_ALL_EVENTS | IN_ISDIR | IN_UNMOUNT | IN_IGNORED |\n\t\t IN_Q_OVERFLOW);\n}\n\n/* intofiy userspace file descriptor functions */\nstatic unsigned int inotify_poll(struct file *file, poll_table *wait)\n{\n\tstruct fsnotify_group *group = file->private_data;\n\tint ret = 0;\n\n\tpoll_wait(file, &group->notification_waitq, wait);\n\tmutex_lock(&group->notification_mutex);\n\tif (!fsnotify_notify_queue_is_empty(group))\n\t\tret = POLLIN | POLLRDNORM;\n\tmutex_unlock(&group->notification_mutex);\n\n\treturn ret;\n}\n\n/*\n * Get an inotify_kernel_event if one exists and is small\n * enough to fit in \"count\". Return an error pointer if\n * not large enough.\n *\n * Called with the group->notification_mutex held.\n */\nstatic struct fsnotify_event *get_one_event(struct fsnotify_group *group,\n\t\t\t\t\t size_t count)\n{\n\tsize_t event_size = sizeof(struct inotify_event);\n\tstruct fsnotify_event *event;\n\n\tif (fsnotify_notify_queue_is_empty(group))\n\t\treturn NULL;\n\n\tevent = fsnotify_peek_notify_event(group);\n\n\tpr_debug(\"%s: group=%p event=%p\\n\", __func__, group, event);\n\n\tif (event->name_len)\n\t\tevent_size += roundup(event->name_len + 1, event_size);\n\n\tif (event_size > count)\n\t\treturn ERR_PTR(-EINVAL);\n\n\t/* held the notification_mutex the whole time, so this is the\n\t * same event we peeked above */\n\tfsnotify_remove_notify_event(group);\n\n\treturn event;\n}\n\n/*\n * Copy an event to user space, returning how much we copied.\n *\n * We already checked that the event size is smaller than the\n * buffer we had in \"get_one_event()\" above.\n */\nstatic ssize_t copy_event_to_user(struct fsnotify_group *group,\n\t\t\t\t struct fsnotify_event *event,\n\t\t\t\t char __user *buf)\n{\n\tstruct inotify_event inotify_event;\n\tstruct fsnotify_event_private_data *fsn_priv;\n\tstruct inotify_event_private_data *priv;\n\tsize_t event_size = sizeof(struct inotify_event);\n\tsize_t name_len = 0;\n\n\tpr_debug(\"%s: group=%p event=%p\\n\", __func__, group, event);\n\n\t/* we get the inotify watch descriptor from the event private data */\n\tspin_lock(&event->lock);\n\tfsn_priv = fsnotify_remove_priv_from_event(group, event);\n\tspin_unlock(&event->lock);\n\n\tif (!fsn_priv)\n\t\tinotify_event.wd = -1;\n\telse {\n\t\tpriv = container_of(fsn_priv, struct inotify_event_private_data,\n\t\t\t\t fsnotify_event_priv_data);\n\t\tinotify_event.wd = priv->wd;\n\t\tinotify_free_event_priv(fsn_priv);\n\t}\n\n\t/*\n\t * round up event->name_len so it is a multiple of event_size\n\t * plus an extra byte for the terminating '\\0'.\n\t */\n\tif (event->name_len)\n\t\tname_len = roundup(event->name_len + 1, event_size);\n\tinotify_event.len = name_len;\n\n\tinotify_event.mask = inotify_mask_to_arg(event->mask);\n\tinotify_event.cookie = event->sync_cookie;\n\n\t/* send the main event */\n\tif (copy_to_user(buf, &inotify_event, event_size))\n\t\treturn -EFAULT;\n\n\tbuf += event_size;\n\n\t/*\n\t * fsnotify only stores the pathname, so here we have to send the pathname\n\t * and then pad that pathname out to a multiple of sizeof(inotify_event)\n\t * with zeros. I get my zeros from the nul_inotify_event.\n\t */\n\tif (name_len) {\n\t\tunsigned int len_to_zero = name_len - event->name_len;\n\t\t/* copy the path name */\n\t\tif (copy_to_user(buf, event->file_name, event->name_len))\n\t\t\treturn -EFAULT;\n\t\tbuf += event->name_len;\n\n\t\t/* fill userspace with 0's */\n\t\tif (clear_user(buf, len_to_zero))\n\t\t\treturn -EFAULT;\n\t\tbuf += len_to_zero;\n\t\tevent_size += name_len;\n\t}\n\n\treturn event_size;\n}\n\nstatic ssize_t inotify_read(struct file *file, char __user *buf,\n\t\t\t size_t count, loff_t *pos)\n{\n\tstruct fsnotify_group *group;\n\tstruct fsnotify_event *kevent;\n\tchar __user *start;\n\tint ret;\n\tDEFINE_WAIT(wait);\n\n\tstart = buf;\n\tgroup = file->private_data;\n\n\twhile (1) {\n\t\tprepare_to_wait(&group->notification_waitq, &wait, TASK_INTERRUPTIBLE);\n\n\t\tmutex_lock(&group->notification_mutex);\n\t\tkevent = get_one_event(group, count);\n\t\tmutex_unlock(&group->notification_mutex);\n\n\t\tpr_debug(\"%s: group=%p kevent=%p\\n\", __func__, group, kevent);\n\n\t\tif (kevent) {\n\t\t\tret = PTR_ERR(kevent);\n\t\t\tif (IS_ERR(kevent))\n\t\t\t\tbreak;\n\t\t\tret = copy_event_to_user(group, kevent, buf);\n\t\t\tfsnotify_put_event(kevent);\n\t\t\tif (ret < 0)\n\t\t\t\tbreak;\n\t\t\tbuf += ret;\n\t\t\tcount -= ret;\n\t\t\tcontinue;\n\t\t}\n\n\t\tret = -EAGAIN;\n\t\tif (file->f_flags & O_NONBLOCK)\n\t\t\tbreak;\n\t\tret = -EINTR;\n\t\tif (signal_pending(current))\n\t\t\tbreak;\n\n\t\tif (start != buf)\n\t\t\tbreak;\n\n\t\tschedule();\n\t}\n\n\tfinish_wait(&group->notification_waitq, &wait);\n\tif (start != buf && ret != -EFAULT)\n\t\tret = buf - start;\n\treturn ret;\n}\n\nstatic int inotify_fasync(int fd, struct file *file, int on)\n{\n\tstruct fsnotify_group *group = file->private_data;\n\n\treturn fasync_helper(fd, file, on, &group->inotify_data.fa) >= 0 ? 0 : -EIO;\n}\n\nstatic int inotify_release(struct inode *ignored, struct file *file)\n{\n\tstruct fsnotify_group *group = file->private_data;\n\n\tpr_debug(\"%s: group=%p\\n\", __func__, group);\n\n\tfsnotify_clear_marks_by_group(group);\n\n\t/* free this group, matching get was inotify_init->fsnotify_obtain_group */\n\tfsnotify_put_group(group);\n\n\treturn 0;\n}\n\nstatic long inotify_ioctl(struct file *file, unsigned int cmd,\n\t\t\t unsigned long arg)\n{\n\tstruct fsnotify_group *group;\n\tstruct fsnotify_event_holder *holder;\n\tstruct fsnotify_event *event;\n\tvoid __user *p;\n\tint ret = -ENOTTY;\n\tsize_t send_len = 0;\n\n\tgroup = file->private_data;\n\tp = (void __user *) arg;\n\n\tpr_debug(\"%s: group=%p cmd=%u\\n\", __func__, group, cmd);\n\n\tswitch (cmd) {\n\tcase FIONREAD:\n\t\tmutex_lock(&group->notification_mutex);\n\t\tlist_for_each_entry(holder, &group->notification_list, event_list) {\n\t\t\tevent = holder->event;\n\t\t\tsend_len += sizeof(struct inotify_event);\n\t\t\tif (event->name_len)\n\t\t\t\tsend_len += roundup(event->name_len + 1,\n\t\t\t\t\t\tsizeof(struct inotify_event));\n\t\t}\n\t\tmutex_unlock(&group->notification_mutex);\n\t\tret = put_user(send_len, (int __user *) p);\n\t\tbreak;\n\t}\n\n\treturn ret;\n}\n\nstatic const struct file_operations inotify_fops = {\n\t.poll\t\t= inotify_poll,\n\t.read\t\t= inotify_read,\n\t.fasync\t\t= inotify_fasync,\n\t.release\t= inotify_release,\n\t.unlocked_ioctl\t= inotify_ioctl,\n\t.compat_ioctl\t= inotify_ioctl,\n\t.llseek\t\t= noop_llseek,\n};\n\n\n/*\n * find_inode - resolve a user-given path to a specific inode\n */\nstatic int inotify_find_inode(const char __user *dirname, struct path *path, unsigned flags)\n{\n\tint error;\n\n\terror = user_path_at(AT_FDCWD, dirname, flags, path);\n\tif (error)\n\t\treturn error;\n\t/* you can only watch an inode if you have read permissions on it */\n\terror = inode_permission(path->dentry->d_inode, MAY_READ);\n\tif (error)\n\t\tpath_put(path);\n\treturn error;\n}\n\nstatic int inotify_add_to_idr(struct idr *idr, spinlock_t *idr_lock,\n\t\t\t int *last_wd,\n\t\t\t struct inotify_inode_mark *i_mark)\n{\n\tint ret;\n\n\tdo {\n\t\tif (unlikely(!idr_pre_get(idr, GFP_KERNEL)))\n\t\t\treturn -ENOMEM;\n\n\t\tspin_lock(idr_lock);\n\t\tret = idr_get_new_above(idr, i_mark, *last_wd + 1,\n\t\t\t\t\t&i_mark->wd);\n\t\t/* we added the mark to the idr, take a reference */\n\t\tif (!ret) {\n\t\t\t*last_wd = i_mark->wd;\n\t\t\tfsnotify_get_mark(&i_mark->fsn_mark);\n\t\t}\n\t\tspin_unlock(idr_lock);\n\t} while (ret == -EAGAIN);\n\n\treturn ret;\n}\n\nstatic struct inotify_inode_mark *inotify_idr_find_locked(struct fsnotify_group *group,\n\t\t\t\t\t\t\t\tint wd)\n{\n\tstruct idr *idr = &group->inotify_data.idr;\n\tspinlock_t *idr_lock = &group->inotify_data.idr_lock;\n\tstruct inotify_inode_mark *i_mark;\n\n\tassert_spin_locked(idr_lock);\n\n\ti_mark = idr_find(idr, wd);\n\tif (i_mark) {\n\t\tstruct fsnotify_mark *fsn_mark = &i_mark->fsn_mark;\n\n\t\tfsnotify_get_mark(fsn_mark);\n\t\t/* One ref for being in the idr, one ref we just took */\n\t\tBUG_ON(atomic_read(&fsn_mark->refcnt) < 2);\n\t}\n\n\treturn i_mark;\n}\n\nstatic struct inotify_inode_mark *inotify_idr_find(struct fsnotify_group *group,\n\t\t\t\t\t\t\t int wd)\n{\n\tstruct inotify_inode_mark *i_mark;\n\tspinlock_t *idr_lock = &group->inotify_data.idr_lock;\n\n\tspin_lock(idr_lock);\n\ti_mark = inotify_idr_find_locked(group, wd);\n\tspin_unlock(idr_lock);\n\n\treturn i_mark;\n}\n\nstatic void do_inotify_remove_from_idr(struct fsnotify_group *group,\n\t\t\t\t struct inotify_inode_mark *i_mark)\n{\n\tstruct idr *idr = &group->inotify_data.idr;\n\tspinlock_t *idr_lock = &group->inotify_data.idr_lock;\n\tint wd = i_mark->wd;\n\n\tassert_spin_locked(idr_lock);\n\n\tidr_remove(idr, wd);\n\n\t/* removed from the idr, drop that ref */\n\tfsnotify_put_mark(&i_mark->fsn_mark);\n}\n\n/*\n * Remove the mark from the idr (if present) and drop the reference\n * on the mark because it was in the idr.\n */\nstatic void inotify_remove_from_idr(struct fsnotify_group *group,\n\t\t\t\t struct inotify_inode_mark *i_mark)\n{\n\tspinlock_t *idr_lock = &group->inotify_data.idr_lock;\n\tstruct inotify_inode_mark *found_i_mark = NULL;\n\tint wd;\n\n\tspin_lock(idr_lock);\n\twd = i_mark->wd;\n\n\t/*\n\t * does this i_mark think it is in the idr? we shouldn't get called\n\t * if it wasn't....\n\t */\n\tif (wd == -1) {\n\t\tWARN_ONCE(1, \"%s: i_mark=%p i_mark->wd=%d i_mark->group=%p\"\n\t\t\t\" i_mark->inode=%p\\n\", __func__, i_mark, i_mark->wd,\n\t\t\ti_mark->fsn_mark.group, i_mark->fsn_mark.i.inode);\n\t\tgoto out;\n\t}\n\n\t/* Lets look in the idr to see if we find it */\n\tfound_i_mark = inotify_idr_find_locked(group, wd);\n\tif (unlikely(!found_i_mark)) {\n\t\tWARN_ONCE(1, \"%s: i_mark=%p i_mark->wd=%d i_mark->group=%p\"\n\t\t\t\" i_mark->inode=%p\\n\", __func__, i_mark, i_mark->wd,\n\t\t\ti_mark->fsn_mark.group, i_mark->fsn_mark.i.inode);\n\t\tgoto out;\n\t}\n\n\t/*\n\t * We found an mark in the idr at the right wd, but it's\n\t * not the mark we were told to remove. eparis seriously\n\t * fucked up somewhere.\n\t */\n\tif (unlikely(found_i_mark != i_mark)) {\n\t\tWARN_ONCE(1, \"%s: i_mark=%p i_mark->wd=%d i_mark->group=%p \"\n\t\t\t\"mark->inode=%p found_i_mark=%p found_i_mark->wd=%d \"\n\t\t\t\"found_i_mark->group=%p found_i_mark->inode=%p\\n\",\n\t\t\t__func__, i_mark, i_mark->wd, i_mark->fsn_mark.group,\n\t\t\ti_mark->fsn_mark.i.inode, found_i_mark, found_i_mark->wd,\n\t\t\tfound_i_mark->fsn_mark.group,\n\t\t\tfound_i_mark->fsn_mark.i.inode);\n\t\tgoto out;\n\t}\n\n\t/*\n\t * One ref for being in the idr\n\t * one ref held by the caller trying to kill us\n\t * one ref grabbed by inotify_idr_find\n\t */\n\tif (unlikely(atomic_read(&i_mark->fsn_mark.refcnt) < 3)) {\n\t\tprintk(KERN_ERR \"%s: i_mark=%p i_mark->wd=%d i_mark->group=%p\"\n\t\t\t\" i_mark->inode=%p\\n\", __func__, i_mark, i_mark->wd,\n\t\t\ti_mark->fsn_mark.group, i_mark->fsn_mark.i.inode);\n\t\t/* we can't really recover with bad ref cnting.. */\n\t\tBUG();\n\t}\n\n\tdo_inotify_remove_from_idr(group, i_mark);\nout:\n\t/* match the ref taken by inotify_idr_find_locked() */\n\tif (found_i_mark)\n\t\tfsnotify_put_mark(&found_i_mark->fsn_mark);\n\ti_mark->wd = -1;\n\tspin_unlock(idr_lock);\n}\n\n/*\n * Send IN_IGNORED for this wd, remove this wd from the idr.\n */\nvoid inotify_ignored_and_remove_idr(struct fsnotify_mark *fsn_mark,\n\t\t\t\t struct fsnotify_group *group)\n{\n\tstruct inotify_inode_mark *i_mark;\n\tstruct fsnotify_event *ignored_event, *notify_event;\n\tstruct inotify_event_private_data *event_priv;\n\tstruct fsnotify_event_private_data *fsn_event_priv;\n\tint ret;\n\n\tignored_event = fsnotify_create_event(NULL, FS_IN_IGNORED, NULL,\n\t\t\t\t\t FSNOTIFY_EVENT_NONE, NULL, 0,\n\t\t\t\t\t GFP_NOFS);\n\tif (!ignored_event)\n\t\treturn;\n\n\ti_mark = container_of(fsn_mark, struct inotify_inode_mark, fsn_mark);\n\n\tevent_priv = kmem_cache_alloc(event_priv_cachep, GFP_NOFS);\n\tif (unlikely(!event_priv))\n\t\tgoto skip_send_ignore;\n\n\tfsn_event_priv = &event_priv->fsnotify_event_priv_data;\n\n\tfsn_event_priv->group = group;\n\tevent_priv->wd = i_mark->wd;\n\n\tnotify_event = fsnotify_add_notify_event(group, ignored_event, fsn_event_priv, NULL);\n\tif (notify_event) {\n\t\tif (IS_ERR(notify_event))\n\t\t\tret = PTR_ERR(notify_event);\n\t\telse\n\t\t\tfsnotify_put_event(notify_event);\n\t\tinotify_free_event_priv(fsn_event_priv);\n\t}\n\nskip_send_ignore:\n\n\t/* matches the reference taken when the event was created */\n\tfsnotify_put_event(ignored_event);\n\n\t/* remove this mark from the idr */\n\tinotify_remove_from_idr(group, i_mark);\n\n\tatomic_dec(&group->inotify_data.user->inotify_watches);\n}\n\n/* ding dong the mark is dead */\nstatic void inotify_free_mark(struct fsnotify_mark *fsn_mark)\n{\n\tstruct inotify_inode_mark *i_mark;\n\n\ti_mark = container_of(fsn_mark, struct inotify_inode_mark, fsn_mark);\n\n\tkmem_cache_free(inotify_inode_mark_cachep, i_mark);\n}\n\nstatic int inotify_update_existing_watch(struct fsnotify_group *group,\n\t\t\t\t\t struct inode *inode,\n\t\t\t\t\t u32 arg)\n{\n\tstruct fsnotify_mark *fsn_mark;\n\tstruct inotify_inode_mark *i_mark;\n\t__u32 old_mask, new_mask;\n\t__u32 mask;\n\tint add = (arg & IN_MASK_ADD);\n\tint ret;\n\n\t/* don't allow invalid bits: we don't want flags set */\n\tmask = inotify_arg_to_mask(arg);\n\tif (unlikely(!(mask & IN_ALL_EVENTS)))\n\t\treturn -EINVAL;\n\n\tfsn_mark = fsnotify_find_inode_mark(group, inode);\n\tif (!fsn_mark)\n\t\treturn -ENOENT;\n\n\ti_mark = container_of(fsn_mark, struct inotify_inode_mark, fsn_mark);\n\n\tspin_lock(&fsn_mark->lock);\n\n\told_mask = fsn_mark->mask;\n\tif (add)\n\t\tfsnotify_set_mark_mask_locked(fsn_mark, (fsn_mark->mask | mask));\n\telse\n\t\tfsnotify_set_mark_mask_locked(fsn_mark, mask);\n\tnew_mask = fsn_mark->mask;\n\n\tspin_unlock(&fsn_mark->lock);\n\n\tif (old_mask != new_mask) {\n\t\t/* more bits in old than in new? */\n\t\tint dropped = (old_mask & ~new_mask);\n\t\t/* more bits in this fsn_mark than the inode's mask? */\n\t\tint do_inode = (new_mask & ~inode->i_fsnotify_mask);\n\n\t\t/* update the inode with this new fsn_mark */\n\t\tif (dropped || do_inode)\n\t\t\tfsnotify_recalc_inode_mask(inode);\n\n\t}\n\n\t/* return the wd */\n\tret = i_mark->wd;\n\n\t/* match the get from fsnotify_find_mark() */\n\tfsnotify_put_mark(fsn_mark);\n\n\treturn ret;\n}\n\nstatic int inotify_new_watch(struct fsnotify_group *group,\n\t\t\t struct inode *inode,\n\t\t\t u32 arg)\n{\n\tstruct inotify_inode_mark *tmp_i_mark;\n\t__u32 mask;\n\tint ret;\n\tstruct idr *idr = &group->inotify_data.idr;\n\tspinlock_t *idr_lock = &group->inotify_data.idr_lock;\n\n\t/* don't allow invalid bits: we don't want flags set */\n\tmask = inotify_arg_to_mask(arg);\n\tif (unlikely(!(mask & IN_ALL_EVENTS)))\n\t\treturn -EINVAL;\n\n\ttmp_i_mark = kmem_cache_alloc(inotify_inode_mark_cachep, GFP_KERNEL);\n\tif (unlikely(!tmp_i_mark))\n\t\treturn -ENOMEM;\n\n\tfsnotify_init_mark(&tmp_i_mark->fsn_mark, inotify_free_mark);\n\ttmp_i_mark->fsn_mark.mask = mask;\n\ttmp_i_mark->wd = -1;\n\n\tret = -ENOSPC;\n\tif (atomic_read(&group->inotify_data.user->inotify_watches) >= inotify_max_user_watches)\n\t\tgoto out_err;\n\n\tret = inotify_add_to_idr(idr, idr_lock, &group->inotify_data.last_wd,\n\t\t\t\t tmp_i_mark);\n\tif (ret)\n\t\tgoto out_err;\n\n\t/* we are on the idr, now get on the inode */\n\tret = fsnotify_add_mark(&tmp_i_mark->fsn_mark, group, inode, NULL, 0);\n\tif (ret) {\n\t\t/* we failed to get on the inode, get off the idr */\n\t\tinotify_remove_from_idr(group, tmp_i_mark);\n\t\tgoto out_err;\n\t}\n\n\t/* increment the number of watches the user has */\n\tatomic_inc(&group->inotify_data.user->inotify_watches);\n\n\t/* return the watch descriptor for this new mark */\n\tret = tmp_i_mark->wd;\n\nout_err:\n\t/* match the ref from fsnotify_init_mark() */\n\tfsnotify_put_mark(&tmp_i_mark->fsn_mark);\n\n\treturn ret;\n}\n\nstatic int inotify_update_watch(struct fsnotify_group *group, struct inode *inode, u32 arg)\n{\n\tint ret = 0;\n\nretry:\n\t/* try to update and existing watch with the new arg */\n\tret = inotify_update_existing_watch(group, inode, arg);\n\t/* no mark present, try to add a new one */\n\tif (ret == -ENOENT)\n\t\tret = inotify_new_watch(group, inode, arg);\n\t/*\n\t * inotify_new_watch could race with another thread which did an\n\t * inotify_new_watch between the update_existing and the add watch\n\t * here, go back and try to update an existing mark again.\n\t */\n\tif (ret == -EEXIST)\n\t\tgoto retry;\n\n\treturn ret;\n}\n\nstatic struct fsnotify_group *inotify_new_group(unsigned int max_events)\n{\n\tstruct fsnotify_group *group;\n\n\tgroup = fsnotify_alloc_group(&inotify_fsnotify_ops);\n\tif (IS_ERR(group))\n\t\treturn group;\n\n\tgroup->max_events = max_events;\n\n\tspin_lock_init(&group->inotify_data.idr_lock);\n\tidr_init(&group->inotify_data.idr);\n\tgroup->inotify_data.last_wd = 0;\n\tgroup->inotify_data.fa = NULL;\n\tgroup->inotify_data.user = get_current_user();\n\n\tif (atomic_inc_return(&group->inotify_data.user->inotify_devs) >\n\t inotify_max_user_instances) {\n\t\tfsnotify_put_group(group);\n\t\treturn ERR_PTR(-EMFILE);\n\t}\n\n\treturn group;\n}\n\n\n/* inotify syscalls */\nSYSCALL_DEFINE1(inotify_init1, int, flags)\n{\n\tstruct fsnotify_group *group;\n\tint ret;\n\n\t/* Check the IN_* constants for consistency. */\n\tBUILD_BUG_ON(IN_CLOEXEC != O_CLOEXEC);\n\tBUILD_BUG_ON(IN_NONBLOCK != O_NONBLOCK);\n\n\tif (flags & ~(IN_CLOEXEC | IN_NONBLOCK))\n\t\treturn -EINVAL;\n\n\t/* fsnotify_obtain_group took a reference to group, we put this when we kill the file in the end */\n\tgroup = inotify_new_group(inotify_max_queued_events);\n\tif (IS_ERR(group))\n\t\treturn PTR_ERR(group);\n\n\tret = anon_inode_getfd(\"inotify\", &inotify_fops, group,\n\t\t\t\t O_RDONLY | flags);\n\tif (ret < 0)\n\t\tfsnotify_put_group(group);\n\n\treturn ret;\n}\n\nSYSCALL_DEFINE0(inotify_init)\n{\n\treturn sys_inotify_init1(0);\n}\n\nSYSCALL_DEFINE3(inotify_add_watch, int, fd, const char __user *, pathname,\n\t\tu32, mask)\n{\n\tstruct fsnotify_group *group;\n\tstruct inode *inode;\n\tstruct path path;\n\tstruct file *filp;\n\tstruct path alteredpath;\n\tstruct path *canonical_path = &path;\n\tint ret, fput_needed;\n\tunsigned flags = 0;\n\n\tfilp = fget_light(fd, &fput_needed);\n\tif (unlikely(!filp))\n\t\treturn -EBADF;\n\n\t/* verify that this is indeed an inotify instance */\n\tif (unlikely(filp->f_op != &inotify_fops)) {\n\t\tret = -EINVAL;\n\t\tgoto fput_and_out;\n\t}\n\n\tif (!(mask & IN_DONT_FOLLOW))\n\t\tflags |= LOOKUP_FOLLOW;\n\tif (mask & IN_ONLYDIR)\n\t\tflags |= LOOKUP_DIRECTORY;\n\n\tret = inotify_find_inode(pathname, &path, flags);\n\tif (ret)\n\t\tgoto fput_and_out;\n\n\t/* support stacked filesystems */\n\tif(path.dentry && path.dentry->d_op) {\n\t\tif (path.dentry->d_op->d_canonical_path) {\n\t\t\tpath.dentry->d_op->d_canonical_path(&path, &alteredpath);\n\t\t\tcanonical_path = &alteredpath;\n\t\t\tpath_put(&path);\n\t\t}\n\t}\n\n\t/* inode held in place by reference to path; group by fget on fd */\n\tinode = canonical_path->dentry->d_inode;\n\tgroup = filp->private_data;\n\n\t/* create/update an inode mark */\n\tret = inotify_update_watch(group, inode, mask);\n\tpath_put(canonical_path);\nfput_and_out:\n\tfput_light(filp, fput_needed);\n\treturn ret;\n}\n\nSYSCALL_DEFINE2(inotify_rm_watch, int, fd, __s32, wd)\n{\n\tstruct fsnotify_group *group;\n\tstruct inotify_inode_mark *i_mark;\n\tstruct file *filp;\n\tint ret = 0, fput_needed;\n\n\tfilp = fget_light(fd, &fput_needed);\n\tif (unlikely(!filp))\n\t\treturn -EBADF;\n\n\t/* verify that this is indeed an inotify instance */\n\tret = -EINVAL;\n\tif (unlikely(filp->f_op != &inotify_fops))\n\t\tgoto out;\n\n\tgroup = filp->private_data;\n\n\tret = -EINVAL;\n\ti_mark = inotify_idr_find(group, wd);\n\tif (unlikely(!i_mark))\n\t\tgoto out;\n\n\tret = 0;\n\n\tfsnotify_destroy_mark(&i_mark->fsn_mark);\n\n\t/* match ref taken by inotify_idr_find */\n\tfsnotify_put_mark(&i_mark->fsn_mark);\n\nout:\n\tfput_light(filp, fput_needed);\n\treturn ret;\n}\n\n/*\n * inotify_user_setup - Our initialization function. Note that we cannot return\n * error because we have compiled-in VFS hooks. So an (unlikely) failure here\n * must result in panic().\n */\nstatic int __init inotify_user_setup(void)\n{\n\tBUILD_BUG_ON(IN_ACCESS != FS_ACCESS);\n\tBUILD_BUG_ON(IN_MODIFY != FS_MODIFY);\n\tBUILD_BUG_ON(IN_ATTRIB != FS_ATTRIB);\n\tBUILD_BUG_ON(IN_CLOSE_WRITE != FS_CLOSE_WRITE);\n\tBUILD_BUG_ON(IN_CLOSE_NOWRITE != FS_CLOSE_NOWRITE);\n\tBUILD_BUG_ON(IN_OPEN != FS_OPEN);\n\tBUILD_BUG_ON(IN_MOVED_FROM != FS_MOVED_FROM);\n\tBUILD_BUG_ON(IN_MOVED_TO != FS_MOVED_TO);\n\tBUILD_BUG_ON(IN_CREATE != FS_CREATE);\n\tBUILD_BUG_ON(IN_DELETE != FS_DELETE);\n\tBUILD_BUG_ON(IN_DELETE_SELF != FS_DELETE_SELF);\n\tBUILD_BUG_ON(IN_MOVE_SELF != FS_MOVE_SELF);\n\tBUILD_BUG_ON(IN_UNMOUNT != FS_UNMOUNT);\n\tBUILD_BUG_ON(IN_Q_OVERFLOW != FS_Q_OVERFLOW);\n\tBUILD_BUG_ON(IN_IGNORED != FS_IN_IGNORED);\n\tBUILD_BUG_ON(IN_EXCL_UNLINK != FS_EXCL_UNLINK);\n\tBUILD_BUG_ON(IN_ISDIR != FS_ISDIR);\n\tBUILD_BUG_ON(IN_ONESHOT != FS_IN_ONESHOT);\n\n\tBUG_ON(hweight32(ALL_INOTIFY_BITS) != 21);\n\n\tinotify_inode_mark_cachep = KMEM_CACHE(inotify_inode_mark, SLAB_PANIC);\n\tevent_priv_cachep = KMEM_CACHE(inotify_event_private_data, SLAB_PANIC);\n\n\tinotify_max_queued_events = 16384;\n\tinotify_max_user_instances = 128;\n\tinotify_max_user_watches = 8192;\n\n\treturn 0;\n}\nmodule_init(inotify_user_setup);\n"} +{"text": "// SPDX-License-Identifier: GPL-2.0\n/*\n * (C) COPYRIGHT 2018 ARM Limited. All rights reserved.\n * Author: James.Qian.Wang <james.qian.wang@arm.com>\n *\n */\n#include \"komeda_dev.h\"\n#include \"komeda_kms.h\"\n\nstatic void\nkomeda_component_state_reset(struct komeda_component_state *st)\n{\n\tst->binding_user = NULL;\n\tst->affected_inputs = st->active_inputs;\n\tst->active_inputs = 0;\n\tst->changed_active_inputs = 0;\n}\n\nstatic struct drm_private_state *\nkomeda_layer_atomic_duplicate_state(struct drm_private_obj *obj)\n{\n\tstruct komeda_layer_state *st;\n\n\tst = kmemdup(obj->state, sizeof(*st), GFP_KERNEL);\n\tif (!st)\n\t\treturn NULL;\n\n\tkomeda_component_state_reset(&st->base);\n\t__drm_atomic_helper_private_obj_duplicate_state(obj, &st->base.obj);\n\n\treturn &st->base.obj;\n}\n\nstatic void\nkomeda_layer_atomic_destroy_state(struct drm_private_obj *obj,\n\t\t\t\t struct drm_private_state *state)\n{\n\tstruct komeda_layer_state *st = to_layer_st(priv_to_comp_st(state));\n\n\tkfree(st);\n}\n\nstatic const struct drm_private_state_funcs komeda_layer_obj_funcs = {\n\t.atomic_duplicate_state\t= komeda_layer_atomic_duplicate_state,\n\t.atomic_destroy_state\t= komeda_layer_atomic_destroy_state,\n};\n\nstatic int komeda_layer_obj_add(struct komeda_kms_dev *kms,\n\t\t\t\tstruct komeda_layer *layer)\n{\n\tstruct komeda_layer_state *st;\n\n\tst = kzalloc(sizeof(*st), GFP_KERNEL);\n\tif (!st)\n\t\treturn -ENOMEM;\n\n\tst->base.component = &layer->base;\n\tdrm_atomic_private_obj_init(&kms->base, &layer->base.obj, &st->base.obj,\n\t\t\t\t &komeda_layer_obj_funcs);\n\treturn 0;\n}\n\nstatic struct drm_private_state *\nkomeda_scaler_atomic_duplicate_state(struct drm_private_obj *obj)\n{\n\tstruct komeda_scaler_state *st;\n\n\tst = kmemdup(obj->state, sizeof(*st), GFP_KERNEL);\n\tif (!st)\n\t\treturn NULL;\n\n\tkomeda_component_state_reset(&st->base);\n\t__drm_atomic_helper_private_obj_duplicate_state(obj, &st->base.obj);\n\n\treturn &st->base.obj;\n}\n\nstatic void\nkomeda_scaler_atomic_destroy_state(struct drm_private_obj *obj,\n\t\t\t\t struct drm_private_state *state)\n{\n\tkfree(to_scaler_st(priv_to_comp_st(state)));\n}\n\nstatic const struct drm_private_state_funcs komeda_scaler_obj_funcs = {\n\t.atomic_duplicate_state\t= komeda_scaler_atomic_duplicate_state,\n\t.atomic_destroy_state\t= komeda_scaler_atomic_destroy_state,\n};\n\nstatic int komeda_scaler_obj_add(struct komeda_kms_dev *kms,\n\t\t\t\t struct komeda_scaler *scaler)\n{\n\tstruct komeda_scaler_state *st;\n\n\tst = kzalloc(sizeof(*st), GFP_KERNEL);\n\tif (!st)\n\t\treturn -ENOMEM;\n\n\tst->base.component = &scaler->base;\n\tdrm_atomic_private_obj_init(&kms->base,\n\t\t\t\t &scaler->base.obj, &st->base.obj,\n\t\t\t\t &komeda_scaler_obj_funcs);\n\treturn 0;\n}\n\nstatic struct drm_private_state *\nkomeda_compiz_atomic_duplicate_state(struct drm_private_obj *obj)\n{\n\tstruct komeda_compiz_state *st;\n\n\tst = kmemdup(obj->state, sizeof(*st), GFP_KERNEL);\n\tif (!st)\n\t\treturn NULL;\n\n\tkomeda_component_state_reset(&st->base);\n\t__drm_atomic_helper_private_obj_duplicate_state(obj, &st->base.obj);\n\n\treturn &st->base.obj;\n}\n\nstatic void\nkomeda_compiz_atomic_destroy_state(struct drm_private_obj *obj,\n\t\t\t\t struct drm_private_state *state)\n{\n\tkfree(to_compiz_st(priv_to_comp_st(state)));\n}\n\nstatic const struct drm_private_state_funcs komeda_compiz_obj_funcs = {\n\t.atomic_duplicate_state\t= komeda_compiz_atomic_duplicate_state,\n\t.atomic_destroy_state\t= komeda_compiz_atomic_destroy_state,\n};\n\nstatic int komeda_compiz_obj_add(struct komeda_kms_dev *kms,\n\t\t\t\t struct komeda_compiz *compiz)\n{\n\tstruct komeda_compiz_state *st;\n\n\tst = kzalloc(sizeof(*st), GFP_KERNEL);\n\tif (!st)\n\t\treturn -ENOMEM;\n\n\tst->base.component = &compiz->base;\n\tdrm_atomic_private_obj_init(&kms->base, &compiz->base.obj, &st->base.obj,\n\t\t\t\t &komeda_compiz_obj_funcs);\n\n\treturn 0;\n}\n\nstatic struct drm_private_state *\nkomeda_splitter_atomic_duplicate_state(struct drm_private_obj *obj)\n{\n\tstruct komeda_splitter_state *st;\n\n\tst = kmemdup(obj->state, sizeof(*st), GFP_KERNEL);\n\tif (!st)\n\t\treturn NULL;\n\n\tkomeda_component_state_reset(&st->base);\n\t__drm_atomic_helper_private_obj_duplicate_state(obj, &st->base.obj);\n\n\treturn &st->base.obj;\n}\n\nstatic void\nkomeda_splitter_atomic_destroy_state(struct drm_private_obj *obj,\n\t\t\t\t struct drm_private_state *state)\n{\n\tkfree(to_splitter_st(priv_to_comp_st(state)));\n}\n\nstatic const struct drm_private_state_funcs komeda_splitter_obj_funcs = {\n\t.atomic_duplicate_state\t= komeda_splitter_atomic_duplicate_state,\n\t.atomic_destroy_state\t= komeda_splitter_atomic_destroy_state,\n};\n\nstatic int komeda_splitter_obj_add(struct komeda_kms_dev *kms,\n\t\t\t\t struct komeda_splitter *splitter)\n{\n\tstruct komeda_splitter_state *st;\n\n\tst = kzalloc(sizeof(*st), GFP_KERNEL);\n\tif (!st)\n\t\treturn -ENOMEM;\n\n\tst->base.component = &splitter->base;\n\tdrm_atomic_private_obj_init(&kms->base,\n\t\t\t\t &splitter->base.obj, &st->base.obj,\n\t\t\t\t &komeda_splitter_obj_funcs);\n\n\treturn 0;\n}\n\nstatic struct drm_private_state *\nkomeda_merger_atomic_duplicate_state(struct drm_private_obj *obj)\n{\n\tstruct komeda_merger_state *st;\n\n\tst = kmemdup(obj->state, sizeof(*st), GFP_KERNEL);\n\tif (!st)\n\t\treturn NULL;\n\n\tkomeda_component_state_reset(&st->base);\n\t__drm_atomic_helper_private_obj_duplicate_state(obj, &st->base.obj);\n\n\treturn &st->base.obj;\n}\n\nstatic void komeda_merger_atomic_destroy_state(struct drm_private_obj *obj,\n\t\t\t\t\t struct drm_private_state *state)\n{\n\tkfree(to_merger_st(priv_to_comp_st(state)));\n}\n\nstatic const struct drm_private_state_funcs komeda_merger_obj_funcs = {\n\t.atomic_duplicate_state\t= komeda_merger_atomic_duplicate_state,\n\t.atomic_destroy_state\t= komeda_merger_atomic_destroy_state,\n};\n\nstatic int komeda_merger_obj_add(struct komeda_kms_dev *kms,\n\t\t\t\t struct komeda_merger *merger)\n{\n\tstruct komeda_merger_state *st;\n\n\tst = kzalloc(sizeof(*st), GFP_KERNEL);\n\tif (!st)\n\t\treturn -ENOMEM;\n\n\tst->base.component = &merger->base;\n\tdrm_atomic_private_obj_init(&kms->base,\n\t\t\t\t &merger->base.obj, &st->base.obj,\n\t\t\t\t &komeda_merger_obj_funcs);\n\n\treturn 0;\n}\n\nstatic struct drm_private_state *\nkomeda_improc_atomic_duplicate_state(struct drm_private_obj *obj)\n{\n\tstruct komeda_improc_state *st;\n\n\tst = kmemdup(obj->state, sizeof(*st), GFP_KERNEL);\n\tif (!st)\n\t\treturn NULL;\n\n\tkomeda_component_state_reset(&st->base);\n\t__drm_atomic_helper_private_obj_duplicate_state(obj, &st->base.obj);\n\n\treturn &st->base.obj;\n}\n\nstatic void\nkomeda_improc_atomic_destroy_state(struct drm_private_obj *obj,\n\t\t\t\t struct drm_private_state *state)\n{\n\tkfree(to_improc_st(priv_to_comp_st(state)));\n}\n\nstatic const struct drm_private_state_funcs komeda_improc_obj_funcs = {\n\t.atomic_duplicate_state\t= komeda_improc_atomic_duplicate_state,\n\t.atomic_destroy_state\t= komeda_improc_atomic_destroy_state,\n};\n\nstatic int komeda_improc_obj_add(struct komeda_kms_dev *kms,\n\t\t\t\t struct komeda_improc *improc)\n{\n\tstruct komeda_improc_state *st;\n\n\tst = kzalloc(sizeof(*st), GFP_KERNEL);\n\tif (!st)\n\t\treturn -ENOMEM;\n\n\tst->base.component = &improc->base;\n\tdrm_atomic_private_obj_init(&kms->base, &improc->base.obj, &st->base.obj,\n\t\t\t\t &komeda_improc_obj_funcs);\n\n\treturn 0;\n}\n\nstatic struct drm_private_state *\nkomeda_timing_ctrlr_atomic_duplicate_state(struct drm_private_obj *obj)\n{\n\tstruct komeda_timing_ctrlr_state *st;\n\n\tst = kmemdup(obj->state, sizeof(*st), GFP_KERNEL);\n\tif (!st)\n\t\treturn NULL;\n\n\tkomeda_component_state_reset(&st->base);\n\t__drm_atomic_helper_private_obj_duplicate_state(obj, &st->base.obj);\n\n\treturn &st->base.obj;\n}\n\nstatic void\nkomeda_timing_ctrlr_atomic_destroy_state(struct drm_private_obj *obj,\n\t\t\t\t\t struct drm_private_state *state)\n{\n\tkfree(to_ctrlr_st(priv_to_comp_st(state)));\n}\n\nstatic const struct drm_private_state_funcs komeda_timing_ctrlr_obj_funcs = {\n\t.atomic_duplicate_state\t= komeda_timing_ctrlr_atomic_duplicate_state,\n\t.atomic_destroy_state\t= komeda_timing_ctrlr_atomic_destroy_state,\n};\n\nstatic int komeda_timing_ctrlr_obj_add(struct komeda_kms_dev *kms,\n\t\t\t\t struct komeda_timing_ctrlr *ctrlr)\n{\n\tstruct komeda_compiz_state *st;\n\n\tst = kzalloc(sizeof(*st), GFP_KERNEL);\n\tif (!st)\n\t\treturn -ENOMEM;\n\n\tst->base.component = &ctrlr->base;\n\tdrm_atomic_private_obj_init(&kms->base, &ctrlr->base.obj, &st->base.obj,\n\t\t\t\t &komeda_timing_ctrlr_obj_funcs);\n\n\treturn 0;\n}\n\nstatic struct drm_private_state *\nkomeda_pipeline_atomic_duplicate_state(struct drm_private_obj *obj)\n{\n\tstruct komeda_pipeline_state *st;\n\n\tst = kmemdup(obj->state, sizeof(*st), GFP_KERNEL);\n\tif (!st)\n\t\treturn NULL;\n\n\tst->active_comps = 0;\n\n\t__drm_atomic_helper_private_obj_duplicate_state(obj, &st->obj);\n\n\treturn &st->obj;\n}\n\nstatic void\nkomeda_pipeline_atomic_destroy_state(struct drm_private_obj *obj,\n\t\t\t\t struct drm_private_state *state)\n{\n\tkfree(priv_to_pipe_st(state));\n}\n\nstatic const struct drm_private_state_funcs komeda_pipeline_obj_funcs = {\n\t.atomic_duplicate_state\t= komeda_pipeline_atomic_duplicate_state,\n\t.atomic_destroy_state\t= komeda_pipeline_atomic_destroy_state,\n};\n\nstatic int komeda_pipeline_obj_add(struct komeda_kms_dev *kms,\n\t\t\t\t struct komeda_pipeline *pipe)\n{\n\tstruct komeda_pipeline_state *st;\n\n\tst = kzalloc(sizeof(*st), GFP_KERNEL);\n\tif (!st)\n\t\treturn -ENOMEM;\n\n\tst->pipe = pipe;\n\tdrm_atomic_private_obj_init(&kms->base, &pipe->obj, &st->obj,\n\t\t\t\t &komeda_pipeline_obj_funcs);\n\n\treturn 0;\n}\n\nint komeda_kms_add_private_objs(struct komeda_kms_dev *kms,\n\t\t\t\tstruct komeda_dev *mdev)\n{\n\tstruct komeda_pipeline *pipe;\n\tint i, j, err;\n\n\tfor (i = 0; i < mdev->n_pipelines; i++) {\n\t\tpipe = mdev->pipelines[i];\n\n\t\terr = komeda_pipeline_obj_add(kms, pipe);\n\t\tif (err)\n\t\t\treturn err;\n\n\t\tfor (j = 0; j < pipe->n_layers; j++) {\n\t\t\terr = komeda_layer_obj_add(kms, pipe->layers[j]);\n\t\t\tif (err)\n\t\t\t\treturn err;\n\t\t}\n\n\t\tif (pipe->wb_layer) {\n\t\t\terr = komeda_layer_obj_add(kms, pipe->wb_layer);\n\t\t\tif (err)\n\t\t\t\treturn err;\n\t\t}\n\n\t\tfor (j = 0; j < pipe->n_scalers; j++) {\n\t\t\terr = komeda_scaler_obj_add(kms, pipe->scalers[j]);\n\t\t\tif (err)\n\t\t\t\treturn err;\n\t\t}\n\n\t\terr = komeda_compiz_obj_add(kms, pipe->compiz);\n\t\tif (err)\n\t\t\treturn err;\n\n\t\tif (pipe->splitter) {\n\t\t\terr = komeda_splitter_obj_add(kms, pipe->splitter);\n\t\t\tif (err)\n\t\t\t\treturn err;\n\t\t}\n\n\t\tif (pipe->merger) {\n\t\t\terr = komeda_merger_obj_add(kms, pipe->merger);\n\t\t\tif (err)\n\t\t\t\treturn err;\n\t\t}\n\n\t\terr = komeda_improc_obj_add(kms, pipe->improc);\n\t\tif (err)\n\t\t\treturn err;\n\n\t\terr = komeda_timing_ctrlr_obj_add(kms, pipe->ctrlr);\n\t\tif (err)\n\t\t\treturn err;\n\t}\n\n\treturn 0;\n}\n\nvoid komeda_kms_cleanup_private_objs(struct komeda_kms_dev *kms)\n{\n\tstruct drm_mode_config *config = &kms->base.mode_config;\n\tstruct drm_private_obj *obj, *next;\n\n\tlist_for_each_entry_safe(obj, next, &config->privobj_list, head)\n\t\tdrm_atomic_private_obj_fini(obj);\n}\n"} +{"text": "{-# LANGUAGE DataKinds #-}\n{-# LANGUAGE DeriveDataTypeable #-}\n{-# LANGUAGE DeriveGeneric #-}\n{-# LANGUAGE FlexibleInstances #-}\n{-# LANGUAGE NoImplicitPrelude #-}\n{-# LANGUAGE OverloadedStrings #-}\n{-# LANGUAGE RecordWildCards #-}\n{-# LANGUAGE TypeFamilies #-}\n{-# LANGUAGE TypeOperators #-}\n\n{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}\n{-# OPTIONS_GHC -fno-warn-unused-binds #-}\n{-# OPTIONS_GHC -fno-warn-unused-imports #-}\n\n-- |\n-- Module : Network.Google.Resource.SQL.Instances.StartReplica\n-- Copyright : (c) 2015-2016 Brendan Hay\n-- License : Mozilla Public License, v. 2.0.\n-- Maintainer : Brendan Hay <brendan.g.hay@gmail.com>\n-- Stability : auto-generated\n-- Portability : non-portable (GHC extensions)\n--\n-- Starts the replication in the read replica instance.\n--\n-- /See:/ <https://cloud.google.com/sql/docs/reference/latest Cloud SQL Admin API Reference> for @sql.instances.startReplica@.\nmodule Network.Google.Resource.SQL.Instances.StartReplica\n (\n -- * REST Resource\n InstancesStartReplicaResource\n\n -- * Creating a Request\n , instancesStartReplica\n , InstancesStartReplica\n\n -- * Request Lenses\n , insProject\n , insInstance\n ) where\n\nimport Network.Google.Prelude\nimport Network.Google.SQLAdmin.Types\n\n-- | A resource alias for @sql.instances.startReplica@ method which the\n-- 'InstancesStartReplica' request conforms to.\ntype InstancesStartReplicaResource =\n \"sql\" :>\n \"v1beta4\" :>\n \"projects\" :>\n Capture \"project\" Text :>\n \"instances\" :>\n Capture \"instance\" Text :>\n \"startReplica\" :>\n QueryParam \"alt\" AltJSON :> Post '[JSON] Operation\n\n-- | Starts the replication in the read replica instance.\n--\n-- /See:/ 'instancesStartReplica' smart constructor.\ndata InstancesStartReplica =\n InstancesStartReplica'\n { _insProject :: !Text\n , _insInstance :: !Text\n }\n deriving (Eq, Show, Data, Typeable, Generic)\n\n\n-- | Creates a value of 'InstancesStartReplica' with the minimum fields required to make a request.\n--\n-- Use one of the following lenses to modify other fields as desired:\n--\n-- * 'insProject'\n--\n-- * 'insInstance'\ninstancesStartReplica\n :: Text -- ^ 'insProject'\n -> Text -- ^ 'insInstance'\n -> InstancesStartReplica\ninstancesStartReplica pInsProject_ pInsInstance_ =\n InstancesStartReplica'\n {_insProject = pInsProject_, _insInstance = pInsInstance_}\n\n\n-- | ID of the project that contains the read replica.\ninsProject :: Lens' InstancesStartReplica Text\ninsProject\n = lens _insProject (\\ s a -> s{_insProject = a})\n\n-- | Cloud SQL read replica instance name.\ninsInstance :: Lens' InstancesStartReplica Text\ninsInstance\n = lens _insInstance (\\ s a -> s{_insInstance = a})\n\ninstance GoogleRequest InstancesStartReplica where\n type Rs InstancesStartReplica = Operation\n type Scopes InstancesStartReplica =\n '[\"https://www.googleapis.com/auth/cloud-platform\",\n \"https://www.googleapis.com/auth/sqlservice.admin\"]\n requestClient InstancesStartReplica'{..}\n = go _insProject _insInstance (Just AltJSON)\n sQLAdminService\n where go\n = buildClient\n (Proxy :: Proxy InstancesStartReplicaResource)\n mempty\n"} +{"text": "SyntaxError: Function 'func' is undefined in {path}root-func-undefined-1.less on line 1, column 1:\n1 func();\n"} +{"text": "\n/* -----------------------------------------------------------------------------------------------------------\nSoftware License for The Fraunhofer FDK AAC Codec Library for Android\n\n� Copyright 1995 - 2013 Fraunhofer-Gesellschaft zur F�rderung der angewandten Forschung e.V.\n All rights reserved.\n\n 1. INTRODUCTION\nThe Fraunhofer FDK AAC Codec Library for Android (\"FDK AAC Codec\") is software that implements\nthe MPEG Advanced Audio Coding (\"AAC\") encoding and decoding scheme for digital audio.\nThis FDK AAC Codec software is intended to be used on a wide variety of Android devices.\n\nAAC's HE-AAC and HE-AAC v2 versions are regarded as today's most efficient general perceptual\naudio codecs. AAC-ELD is considered the best-performing full-bandwidth communications codec by\nindependent studies and is widely deployed. AAC has been standardized by ISO and IEC as part\nof the MPEG specifications.\n\nPatent licenses for necessary patent claims for the FDK AAC Codec (including those of Fraunhofer)\nmay be obtained through Via Licensing (www.vialicensing.com) or through the respective patent owners\nindividually for the purpose of encoding or decoding bit streams in products that are compliant with\nthe ISO/IEC MPEG audio standards. Please note that most manufacturers of Android devices already license\nthese patent claims through Via Licensing or directly from the patent owners, and therefore FDK AAC Codec\nsoftware may already be covered under those patent licenses when it is used for those licensed purposes only.\n\nCommercially-licensed AAC software libraries, including floating-point versions with enhanced sound quality,\nare also available from Fraunhofer. Users are encouraged to check the Fraunhofer website for additional\napplications information and documentation.\n\n2. COPYRIGHT LICENSE\n\nRedistribution and use in source and binary forms, with or without modification, are permitted without\npayment of copyright license fees provided that you satisfy the following conditions:\n\nYou must retain the complete text of this software license in redistributions of the FDK AAC Codec or\nyour modifications thereto in source code form.\n\nYou must retain the complete text of this software license in the documentation and/or other materials\nprovided with redistributions of the FDK AAC Codec or your modifications thereto in binary form.\nYou must make available free of charge copies of the complete source code of the FDK AAC Codec and your\nmodifications thereto to recipients of copies in binary form.\n\nThe name of Fraunhofer may not be used to endorse or promote products derived from this library without\nprior written permission.\n\nYou may not charge copyright license fees for anyone to use, copy or distribute the FDK AAC Codec\nsoftware or your modifications thereto.\n\nYour modified versions of the FDK AAC Codec must carry prominent notices stating that you changed the software\nand the date of any change. For modified versions of the FDK AAC Codec, the term\n\"Fraunhofer FDK AAC Codec Library for Android\" must be replaced by the term\n\"Third-Party Modified Version of the Fraunhofer FDK AAC Codec Library for Android.\"\n\n3. NO PATENT LICENSE\n\nNO EXPRESS OR IMPLIED LICENSES TO ANY PATENT CLAIMS, including without limitation the patents of Fraunhofer,\nARE GRANTED BY THIS SOFTWARE LICENSE. Fraunhofer provides no warranty of patent non-infringement with\nrespect to this software.\n\nYou may use this FDK AAC Codec software or modifications thereto only for purposes that are authorized\nby appropriate patent licenses.\n\n4. DISCLAIMER\n\nThis FDK AAC Codec software is provided by Fraunhofer on behalf of the copyright holders and contributors\n\"AS IS\" and WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, including but not limited to the implied warranties\nof merchantability and fitness for a particular purpose. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR\nCONTRIBUTORS BE LIABLE for any direct, indirect, incidental, special, exemplary, or consequential damages,\nincluding but not limited to procurement of substitute goods or services; loss of use, data, or profits,\nor business interruption, however caused and on any theory of liability, whether in contract, strict\nliability, or tort (including negligence), arising in any way out of the use of this software, even if\nadvised of the possibility of such damage.\n\n5. CONTACT INFORMATION\n\nFraunhofer Institute for Integrated Circuits IIS\nAttention: Audio and Multimedia Departments - FDK AAC LL\nAm Wolfsmantel 33\n91058 Erlangen, Germany\n\nwww.iis.fraunhofer.de/amm\namm-info@iis.fraunhofer.de\n----------------------------------------------------------------------------------------------------------- */\n\n/************************* Fast MPEG AAC Audio Encoder **********************\n\n Initial author: M. Schug / A. Groeschel\n contents/description: bandwidth expert\n\n******************************************************************************/\n\n#ifndef _BANDWIDTH_H\n#define _BANDWIDTH_H\n\n\n#include \"qc_data.h\"\n\nAAC_ENCODER_ERROR FDKaacEnc_DetermineBandWidth(INT* bandWidth,\n INT proposedBandwidth,\n INT bitrate,\n AACENC_BITRATE_MODE bitrateMode,\n INT sampleRate,\n INT frameLength,\n CHANNEL_MAPPING* cm,\n CHANNEL_MODE encoderMode);\n\n#endif /* BANDWIDTH_H */\n"} +{"text": "export default {\n \"mnojpmjdmbbfmejpflffifhffcmidifd\": {\n \"description\": \"Brave Shields\",\n \"enabled\": true,\n \"homepageUrl\": \"\",\n \"version\": \"1.0.0\",\n \"name\": \"Brave\",\n \"manifest_version\": 2,\n \"default_locale\": \"en_US\",\n \"browser_action\": {\n \"default_title\": \"Brave Shields\",\n \"default_popup\": \"braveShieldsPanel.html\"\n },\n \"icons\": [\n {\n \"size\": 16,\n \"url\": \"assets/img/icon-16.png\"\n },\n {\n \"size\": 32,\n \"url\": \"assets/img/icon-32.png\"\n },\n {\n \"size\": 48,\n \"url\": \"assets/img/icon-48.png\"\n },\n {\n \"size\": 64,\n \"url\": \"assets/img/icon-64.png\"\n },\n {\n \"size\": 128,\n \"url\": \"assets/img/icon-128.png\"\n },\n {\n \"size\": 256,\n \"url\": \"assets/img/icon-256.png\"\n }\n ],\n \"id\": \"mnojpmjdmbbfmejpflffifhffcmidifd\",\n \"installType\": \"normal\",\n \"isApp\": false,\n \"mayDisable\": false,\n \"type\": \"extension\",\n \"permissions\": [ \"contentSettings\", \"settingsPrivate\", \"management\", \"tabs\", \"storage\", \"webNavigation\", \"contextMenus\", \"cookies\", \"*://*/*\", \"chrome://favicon/*\" ],\n },\n \"jidkidbbcafjabdphckchenhfomhnfma\": {\n \"id\": \"jidkidbbcafjabdphckchenhfomhnfma\",\n \"enabled\": true,\n \"homepageUrl\": \"\",\n \"version\": \"1.0.0\",\n \"name\": \"Brave Rewards\",\n \"manifest_version\": 2,\n \"description\": \"Brave Rewards Extension\",\n \"default_locale\": \"en_US\",\n \"incognito\": \"not_allowed\",\n\n \"permissions\": [\n \"storage\",\n \"tabs\",\n \"webRequest\",\n \"chrome://favicon/*\",\n \"https://www.twitch.tv/*\",\n \"https://*.twitter.com/*\"\n ],\n \"browser_action\": {\n \"default_popup\": \"brave_rewards_panel.html\",\n \"default_icon\": {\n \"16\": \"img/bat-16.png\",\n \"32\": \"img/bat-32.png\",\n \"48\": \"img/bat-48.png\",\n \"64\": \"img/bat-64.png\",\n \"128\": \"img/bat-128.png\",\n \"256\": \"img/bat-256.png\"\n }\n },\n \"installType\": \"normal\",\n \"isApp\": false,\n \"mayDisable\": false,\n \"icons\": [\n {\n \"size\": 16,\n \"url\": \"img/bat-16.png\"\n },\n {\n \"size\": 32,\n \"url\": \"img/bat-32.png\"\n },\n {\n \"size\": 48,\n \"url\": \"img/bat-48.png\"\n },\n {\n \"size\": 68,\n \"url\": \"img/bat-68.png\"\n },\n {\n \"size\": 128,\n \"url\": \"img/bat-128.png\"\n },\n {\n \"size\": 256,\n \"url\": \"img/bat-256.png\"\n },\n ],\n \"content_security_policy\": \"img-src 'self' chrome: data:; style-src 'self' 'unsafe-inline';font-src 'self' data:;\",\n }\n\n}"} +{"text": "import numpy as np\nimport os\nimport pandas as pd\nimport utils\n\nfrom matplotlib import pyplot as plt\nfrom torch.utils.data import Dataset\n\n\ndef load_gas():\n def load_data(file):\n data = pd.read_pickle(file)\n data.drop(\"Meth\", axis=1, inplace=True)\n data.drop(\"Eth\", axis=1, inplace=True)\n data.drop(\"Time\", axis=1, inplace=True)\n return data\n\n def get_correlation_numbers(data):\n C = data.corr()\n A = C > 0.98\n B = A.sum(axis=1)\n return B\n\n def load_data_and_clean(file):\n data = load_data(file)\n B = get_correlation_numbers(data)\n\n while np.any(B > 1):\n col_to_remove = np.where(B > 1)[0][0]\n col_name = data.columns[col_to_remove]\n data.drop(col_name, axis=1, inplace=True)\n B = get_correlation_numbers(data)\n data = (data - data.mean()) / data.std()\n\n return data.values\n\n def load_data_and_clean_and_split(file):\n data = load_data_and_clean(file)\n N_test = int(0.1 * data.shape[0])\n data_test = data[-N_test:]\n data_train = data[0:-N_test]\n N_validate = int(0.1 * data_train.shape[0])\n data_validate = data_train[-N_validate:]\n data_train = data_train[0:-N_validate]\n\n return data_train, data_validate, data_test\n\n return load_data_and_clean_and_split(\n file=os.path.join(utils.get_data_root(), 'gas', 'ethylene_CO.pickle')\n )\n\n\ndef save_splits():\n train, val, test = load_gas()\n splits = (\n ('train', train),\n ('val', val),\n ('test', test)\n )\n for split in splits:\n name, data = split\n file = os.path.join(utils.get_data_root(), 'gas', '{}.npy'.format(name))\n np.save(file, data)\n\n\nclass GasDataset(Dataset):\n def __init__(self, split='train', frac=None):\n path = os.path.join(utils.get_data_root(), 'gas', '{}.npy'.format(split))\n self.data = np.load(path).astype(np.float32)\n self.n, self.dim = self.data.shape\n if frac is not None:\n self.n = int(frac * self.n)\n\n def __getitem__(self, item):\n return self.data[item]\n\n def __len__(self):\n return self.n\n\n\ndef main():\n dataset = GasDataset(split='train')\n print(type(dataset.data))\n print(dataset.data.shape)\n print(dataset.data.min(), dataset.data.max())\n print(np.where(dataset.data == dataset.data.max()))\n fig, axs = plt.subplots(3, 3, figsize=(10, 10), sharex=True, sharey=True)\n axs = axs.reshape(-1)\n for i, dimension in enumerate(dataset.data.T):\n print(i)\n axs[i].hist(dimension, bins=100)\n plt.tight_layout()\n plt.show()\n\n\nif __name__ == '__main__':\n main()\n"} +{"text": "<html>\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n \n <title>Κεφάλαιο 5. Μενού και Συντομεύσεις πληκτρολογίου</title>\n <link rel=\"stylesheet\" type=\"text/css\" href=\"OmegaT.css\">\n <meta name=\"generator\" content=\"DocBook XSL Stylesheets V1.79.1\">\n <link rel=\"home\" href=\"index.html\" title=\"OmegaT - Εγχειρίδιο χρήστη\">\n <link rel=\"up\" href=\"index.html\" title=\"OmegaT - Εγχειρίδιο χρήστη\">\n <link rel=\"prev\" href=\"chapter.user.interface.html\" title=\"Κεφάλαιο 4. Η διεπαφή χρήστη\">\n <link rel=\"next\" href=\"chapter.project.properties.html\" title=\"Κεφάλαιο 6. Ιδιότητες έργου\">\n </head>\n <body bgcolor=\"white\" text=\"black\" link=\"#0000FF\" vlink=\"#840084\" alink=\"#0000FF\">\n <div class=\"navheader\">\n <table width=\"100%\" summary=\"Navigation header\">\n <tr>\n <th colspan=\"3\" align=\"center\">Κεφάλαιο 5. Μενού και Συντομεύσεις πληκτρολογίου</th>\n </tr>\n <tr>\n <td width=\"20%\" align=\"left\"><a accesskey=\"p\" href=\"chapter.user.interface.html\">Προηγ</a>&nbsp;\n </td>\n <th width=\"60%\" align=\"center\">&nbsp;</th>\n <td width=\"20%\" align=\"right\">&nbsp;<a accesskey=\"n\" href=\"chapter.project.properties.html\">Επόμενο</a></td>\n </tr>\n </table>\n <hr>\n </div>\n <div class=\"chapter\">\n <div class=\"titlepage\">\n <div>\n <div>\n <h1 class=\"title\"><a name=\"chapter.menu\"></a>Κεφάλαιο 5. Μενού και Συντομεύσεις πληκτρολογίου\n </h1>\n </div>\n </div>\n </div>\n <div class=\"toc\">\n <dl class=\"toc\">\n <dt><span class=\"section\"><a href=\"chapter.menu.html#ch04.main.menu\">1. Κύριο Μενού</a></span></dt>\n <dd>\n <dl>\n <dt><span class=\"section\"><a href=\"chapter.menu.html#submenu.Project\">1.1. Έργο</a></span></dt>\n <dt><span class=\"section\"><a href=\"chapter.menu.html#d0e2994\">1.2. Επεξεργασία</a></span></dt>\n <dt><span class=\"section\"><a href=\"chapter.menu.html#submenu.GoTo\">1.3. Μετάβαση σε</a></span></dt>\n <dt><span class=\"section\"><a href=\"chapter.menu.html#submenu.View\">1.4. Προβολή</a></span></dt>\n <dt><span class=\"section\"><a href=\"chapter.menu.html#submenu.Tools\">1.5. Εργαλεία</a></span></dt>\n <dt><span class=\"section\"><a href=\"chapter.menu.html#submenu.Options\">1.6. Επιλογές</a></span></dt>\n <dt><span class=\"section\"><a href=\"chapter.menu.html#submenu.Help\">1.7. Βοήθεια</a></span></dt>\n </dl>\n </dd>\n <dt><span class=\"section\"><a href=\"chapter.menu.html#keyboard.shortcuts\">2. Συντομεύσεις πληκτρολογίου</a></span></dt>\n <dd>\n <dl>\n <dt><span class=\"section\"><a href=\"chapter.menu.html#d0e3758\">2.1. Διαχείριση έργου</a></span></dt>\n <dt><span class=\"section\"><a href=\"chapter.menu.html#keyboard.editing\">2.2. Γίνεται επεξεργασία</a></span></dt>\n <dt><span class=\"section\"><a href=\"chapter.menu.html#keyboard.moving.around\">2.3. Μετακίνηση στα πέριξ</a></span></dt>\n <dt><span class=\"section\"><a href=\"chapter.menu.html#keyboard.other\">2.4. Άλλα</a></span></dt>\n </dl>\n </dd>\n </dl>\n </div>\n <div class=\"section\">\n <div class=\"titlepage\">\n <div>\n <div>\n <h2 class=\"title\" style=\"clear: both\"><a name=\"ch04.main.menu\"></a>1. <a class=\"indexterm\" name=\"d0e2791\"></a>Κύριο Μενού\n </h2>\n </div>\n </div>\n </div>\n <p>Όλες οι λειτουργίες του OmegaT είναι προσβάσιμες από τη γραμμή μενού, στο πάνω μέρος του παραθύρου Επεξεργασίας. Οι περισσότερες\n λειτουργίες είναι, επίσης, διαθέσιμες και μέσω συντομεύσεων πληκτρολογίου. Οι Συντομεύσεις πληκτρολογίου ενεργοποιούνται πατώντας\n <span class=\"keycap\"><strong>Ctrl</strong></span> και ένα γράμμα. Μερικές συντομεύσεις εμπλέκουν άλλα πλήκτρα. Για λόγους καλύτερης αναγνωσιμότητας, τα γράμματα γράφτηκαν\n εδώ με κεφαλαία. Το <span class=\"keycap\"><strong>Ctrl</strong></span> χρησιμοποιείται σε λειτουργικά συστήματα Windows, UNIX και UNIX-οειδή, με πληκτρολόγια που έχουν ένα πλήκτρο <span class=\"keycap\"><strong>Ctrl</strong></span> ή <span class=\"keycap\"><strong>Control</strong></span>. Οι χρήστες Mac θα πρέπει, αντιθέτως, να χρησιμοποιούν <span class=\"keycap\"><strong>πλήκτρο</strong></span>+<span class=\"keycap\"><strong>Cmd</strong></span>. Το πλήκτρο \"Cmd\" έχει ή ένα σύμβολο \"command\", ή ένα λογότυπo με το μήλο της Apple στο πληκτρολόγιο.\n </p>\n <p>Μπορείτε ��α παραμετροποιήσετε τις υπάρχουσες συντομεύσεις, ή να προσθέσετε νέες, σύμφωνα με τις ανάγκες σας. <a class=\"link\" href=\"appendix.shortcut.custom.html#ch04.shortcuts.customization\" title=\"1. Παραμετροποίηση συντομεύσεων\">Βλέπε Παραρτήματα - Παραμετροποίηση συντομεύσεων</a></p>\n <div class=\"table\"><a name=\"table.main.menu\"></a><p class=\"title\"><b>Πίνακας 5.1. Κύριο Μενού</b></p>\n <div class=\"table-contents\">\n <table class=\"table\" summary=\"Κύριο Μενού\" border=\"1\">\n <colgroup>\n <col>\n <col>\n <col>\n <col>\n <col>\n <col>\n <col>\n </colgroup>\n <tbody>\n <tr>\n <td><span class=\"guimenuitem\">Έργο</span></td>\n <td><span class=\"guimenuitem\">Επεξεργασία</span></td>\n <td><span class=\"guimenuitem\">Μετάβαση σε</span></td>\n <td><span class=\"guimenuitem\">Προβολή</span></td>\n <td><span class=\"guimenuitem\">Εργαλεία</span></td>\n <td><span class=\"guimenuitem\">Επιλογές</span></td>\n <td><span class=\"guimenuitem\">Βοήθεια</span></td>\n </tr>\n </tbody>\n </table>\n </div>\n </div><br class=\"table-break\"><div class=\"section\">\n <div class=\"titlepage\">\n <div>\n <div>\n <h3 class=\"title\"><a name=\"submenu.Project\"></a>1.1. Έργο<a class=\"indexterm\" name=\"d0e2850\"></a></h3>\n </div>\n </div>\n </div>\n <div class=\"table\"><a name=\"d0e2855\"></a><p class=\"title\"><b>Πίνακας 5.2. Μενού έργου</b></p>\n <div class=\"table-contents\">\n <table class=\"table\" summary=\"Μενού έργου\" border=\"1\">\n <colgroup>\n <col align=\"left\">\n <col align=\"left\">\n <col>\n </colgroup>\n <tbody>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Νέο</span></td>\n <td align=\"left\">&nbsp;</td>\n <td>Δημιουργεί και ανοίγει ένα νέο έργο. Ο διάλογος για τη δημιουργία ενός έργου είναι ο ίδιος όπως και για την επεξεργασία του\n έργου. Βλέπε<a class=\"xref\" href=\"chapter.project.properties.html\" title=\"Κεφάλαιο 6. Ιδιότητες έργου\">Κεφάλαιο&nbsp;6, <i>Ιδιότητες έργου</i></a></td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Άνοιγμα</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>O</strong></span></td>\n <td>Ανοίγει ένα έργο που έχει ήδη δημιουργηθεί στο παρελθόν.</td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Εισαγωγή αρχείων προέλευσης...</span></td>\n <td align=\"left\">&nbsp;</td>\n <td>Αντιγράφει τα επιλεγμένα αρχεία στον κατάλογο <code class=\"filename\">προέλευσης</code> και ξαναφορτώνει το έργο για τη φόρτωση των νέων αρχείων.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Εισαγωγή από MediaWiki...</span></td>\n <td align=\"left\">&nbsp;</td>\n <td>Εισάγει μονάδες από σελίδες MediaWiki, βασιζόμενο στο URL που βάλατε.</td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Επαναφόρτωση</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>F5</strong></span></td>\n <td>Ξαναφορτώνει το έργο για να πάρει υπ' όψη τις εξωτερικές αλλαγές των αρχείων προέλευσης, τις παλιότερες μεταφραστικές μνήμες,\n τα γλωσσάρια και τις ρυθμίσεις του έργου.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Κλείσιμο</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>Shift</strong></span>+<span class=\"keycap\"><strong>W</strong></span></td>\n <td>Αποθηκεύει τη μετάφραση και κλείνει το έργο.</td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Αποθήκευση</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>S</strong></span></td>\n <td>Αποθηκεύει την εσωτερική μεταφρραστική μνήμη στον σκληρό δίσκο. Το OmegaT αποθηκεύει αυτόματα τις μεταφράσεις ανά 10 λεπτά,\n αλλά και όταν κλείνετε το έργο, ή βγείτε από το OmegaT.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Δημιουργία μεταφρασμένων εγγράφων</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>D</strong></span></td>\n <td>Δημιουργεί τα έγγραφα προορισμού βασιζόμενο στη μετάφρασή σας του κειμένου του εγγράφου. Τα δημιουργούμενα έγγραφα προορισμού\n βρίσκονται στον κατάλογο <code class=\"filename\">προορισμού</code>.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Ιδιότητες...</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>E</strong></span></td>\n <td>Εμφανίζει τον διάλογο με τις <a class=\"link\" href=\"chapter.project.properties.html\" title=\"Κεφάλαιο 6. Ιδιότητες έργου\">Ιδιότητες έργου</a> για την επεξεργασία των γλωσσών προορισμού και των τοποθεσιών καταλόγου.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Αρχεία έργου...</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>L</strong></span></td>\n <td>Κλείνει ή ανοίγει το <a class=\"link\" href=\"chapter.user.interface.html#section.project.files\" title=\"3.1. Αρχεία έργου\">Παράθυρο αρχείων έργου</a> (ανάλογα αν είναι ανοικτό ή κλειστό).\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Έξοδος</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>Q</strong></span></td>\n <td>Αποθηκεύει το έργο και βγαίνει από το <span class=\"application\">OmegaT</span>. Αν δεν αποθηκεύσατε ακόμη το έργο, αυτό επιβεβαιώνει χειρονακτικά αν θέλετε πράγματι να βγείτε.\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div><br class=\"table-break\"></div>\n <div class=\"section\">\n <div class=\"titlepage\">\n <div>\n <div>\n <h3 class=\"title\"><a name=\"d0e2994\"></a>1.2. Επεξεργασία<a class=\"indexterm\" name=\"d0e2997\"></a></h3>\n </div>\n </div>\n </div>\n <p>Σημείωση: τα πράγματα που βρίσκετε στις περισσότερες εφαρμογές (Αντιγραφή/Αποκοπή/Επικόλληση) δεν εμφανίζονται σε αυτό το\n μενού. Είναι όμως διαθέσιμα, χρησιμοποιώντας τις συντομεύσεις του συστήματός σας. Για παράδειγμα:\n </p>\n <div class=\"table\"><a name=\"d0e3004\"></a><p class=\"title\"><b>Πίνακας 5.3. Συντομεύσεις για Αντιγραφή/Αποκοπή/Επικόλληση</b></p>\n <div class=\"table-contents\">\n <table class=\"table\" summary=\"Συντομεύσεις για Αντιγραφή/Αποκοπή/Επικόλληση\" border=\"1\">\n <colgroup>\n <col align=\"left\">\n <col align=\"left\">\n <col>\n </colgroup>\n <tbody>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Αντιγραφή</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>C</strong></span></td>\n <td>Αντιγράφει το επιλεγμένο κείμενο στο πρόχειρο (clipboard).</td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Αποκοπή</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>X</strong></span></td>\n <td>Αντιγράφει το επιλεγμένο κείμενο στο πρόχειρο και διαγράφει το επιλεγμένο κείμενο.</td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Επικόλληση</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>V</strong></span></td>\n <td>Επικολλά το κείμενο από το πρόχειρο, εκεί που βρίσκεται ο δείκτης (cursor).</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div><br class=\"table-break\"><p>Το μενού Επεξεργασίας περιέχει τις εξής δυνατότητες:</p>\n <div class=\"table\"><a name=\"d0e3049\"></a><p class=\"title\"><b>Πίνακας 5.4. Επεξργασία μενού</b></p>\n <div class=\"table-contents\">\n <table class=\"table\" summary=\"Επεξργασία μενού\" border=\"1\">\n <colgroup>\n <col align=\"left\">\n <col align=\"left\">\n <col>\n </colgroup>\n <tbody>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Αναίρεση τελευταίας ενέργειας</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>Z</strong></span></td>\n <td>Ανάκτηση της κατάστασης πριν την εκτέλεση της τελευταίας ενέργειας επεξεργασίας. Αυτή η εντολή δεν λειτουργεί αν το τροποποιημένο\n τμήμα έχει, ήδη, επικυρωθεί.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Επανάληψη Τελευταίας ενέργειας</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>Y</strong></span></td>\n <td>Ανάκτηση της κατάστασης πριν τη διαγραφή της τελευταίας ενέργειας επεξεργασίας. Αυτή η εντολή δεν λειτουργεί αν το τροποποιημένο\n τμήμα έχει, ήδη, επικυρωθεί.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Αντικατάσταση με το αποτέλεσμα μιας Αντιστοίχισης</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>R</strong></span></td>\n <td>Αντικαθιστά όλο το τμήμα προορισμού με τη μερική αντιστοίχιση (fuzzy) που επιλέχθηκε τρεχόντως (από προεπιλογή, επιλέγεται\n η πρώτη αντιστοίχιση).\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Εισαγωγή Αντιστοίχισης</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>I</strong></span></td>\n <td>Εισάγει τη μερική αντιστοίχιση που επιλέχθηκε, εκεί που βρίσκεται ο δείκτης (cursor). Αν επελέγη ένα κομμάτι του τμήματος\n προορισμού, αυτή η λειτουργία θα γράψει εκ νέου (overwrite) πάνω στην ενότητα που επιλέξατε.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Αντικατάσταση με Μηχανική Μετάφραση</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>M</strong></span></td>\n <td>Αντικαθιστά το τμήμα προορισμού με τη μετάφραση η οποία προτάθηκε από την υπηρεσία Μηχανικής Μετάφρασης που επιλέξατε. Δεν\n θα γίνει καμία ενέργεια αν δεν ενεργοποιήθηκε καμία υπηρεσία Μηχανικής Μετάφρασης (βλέπε πιο κάτω, Μενού &gt; Επιλογές ).\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Αντικατάσταση με Κείμενο Προέλευσης</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Shift</strong></span>+<span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>R</strong></span></td>\n <td>Αντικαθιστά όλο το τμήμα προορισμού με την πηγή.</td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Εισαγωγή Πηγής</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Shift</strong></span>+<span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>I</strong></span></td>\n <td>Εισάγει την πηγή εκεί που βρίσκεται ο δείκτης.</td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Εισαγωγή Ετικετών προέλευσης</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Shift</strong></span>+<span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>T</strong></span></td>\n <td><a class=\"indexterm\" name=\"d0e3157\"></a>Εισάγει τις ετικέτες προέλευσης, εκεί που βρίσκεται ο δείκτης. Όλες οι σχετικές ετικέτες στην πηγή - π.χ. οι ετικέτες OmegaT\n καθώς επίσης και παραμετροποιημένες, Java, printf κλπ - θα εισαχθούν στον τρέχοντα προορισμό, ανεξάρτητα από το αν βρίσκονται\n ήδη εκεί ή όχι. Τα κείμενα που περικλείονται απο ετικέτες, αντικαθίστανται από διαστήματα: <code class=\"literal\">&lt;f0&gt;&lt;f1&gt;Αυτό είναι κείμενο&lt;/f0&gt;&lt;/f1&gt;</code> συνεπώς, θα αντιγραφεί ως <code class=\"literal\">&lt;f0&gt;&lt;f1&gt;one_space&lt;/f0&gt;&lt;/f1&gt;</code></td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Εξαγωγή Επιλογής</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Shift</strong></span>+<span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>C</strong></span></td>\n <td>Εξάγει την τρέχουσα επιλογή σε ένα αρχείο κειμένου προς επεξεργασία. Αν δεν επελέγη κανένα κείμενο, το τρέχον τμήμα προέλευσης\n εγγράφεται σε αυτό το αρχείο. Όταν ο χρήστης βγαίνει από το <span class=\"application\">OmegaT</span>, αυτό το αρχείο δεν αδειάζει, προς χάρη της συνέπειας με τη συνηθισμένη συμπεριφορά του προχείρου. Τα εξαγόμενα περιεχόμενα\n αντιγράφονται στο αρχείο <code class=\"filename\">selection.txt</code> που βρίσκεται στον κατάλογο με τα αρχεία ρυθμίσεων χρήστη (βλέπε <a class=\"xref\" href=\"chapter.files.and.directories.html\" title=\"Κεφάλαιο 8. OmegaT Αρχεία και Κατάλογοι\">Κεφάλαιο&nbsp;8, <i><span class=\"application\">OmegaT</span> Αρχεία και Κατάλογοι</i></a>).\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Δημιουργία Καταχώρησης Γλωσσαρίου</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Shift</strong></span>+<span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>G</strong></span></td>\n <td>Επιτρέπει στον χρήστη να δημιοθργήσει μια καταχώρηση στο αρχείο του προεπιλεγμένου γλωσσαρίου.</td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Αναζήτηση Έργου...</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>F</strong></span></td>\n <td>Ανοίγει ένα νέο <a class=\"link\" href=\"chapter.user.interface.html#section.search.window\" title=\"3.2. Παράθυρο αναζήτησης\">Παράθυρο Αναζήτησης</a>.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Εναλλαγή γραμμάτων σε...</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Shift</strong></span>+<span class=\"keycap\"><strong>F3</strong></span> (βλέπε κείμενο)\n </td>\n <td>Αλλάζει το είδος γραμμάτων του επιλεγμένου κειμένου του τμήματος προορισμού, στην επιλογή που κάνατε (Μικρά, Κεφαλαία ή Title\n case). Χρησιμοποιείστε το Shift+F3 <a class=\"indexterm\" name=\"d0e3232\"></a>για να μετακινηθείτε ανάμεσα σε αυτές τις τρεις εναλλακτικές. Αν δεν επελέγη κανένα κείμενο, το <span class=\"application\">OmegaT</span> θα επιλέξει τη λέξη που περιέχει το γράμμα αμέσως στα δεξιά του δείκτη.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Επιλογή Μερικής Αντιστοίχισης (Fuzzy Match) #N</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>#N</strong></span></td>\n <td>(Το #N είναι ένα ψηφίο από το 1 ως το 5) - Επιλέγει τη Nth Μερική Αντιστοίχιση που εμφανίζεται στο παράθυρο προβολής αντιστοιχίσεων,\n για να την αντικαταστήσει ή για να την εισάγει στο τμήμα. Το <a class=\"xref\" href=\"chapter.user.interface.html#match.viewer\" title=\"2.2. Περιοχή μερικών αντιστοιχίσεων\">Τμήμα&nbsp;2.2, «Περιοχή μερικών αντιστοιχίσεων»</a> περιγράφει λεπτομερώς τους κωδικούς χρώματος.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Να χ��ησιμοποιηθεί ως Μετάφραση Προεπιλογής</span></td>\n <td align=\"left\">&nbsp;</td>\n <td>Αν υπάρχουν διάφορες εναλλακτικές μεταφράσεις για το ενεργό τμήμα, μπορείτε να επισημάνετε την επιλεχθείσα εναλλακτική ως\n Μετάφραση προεπιλογής. Η καταχώρηση θα εμφανισθεί με γκρι χρώμα, αν υπάρχει μόνο μια διαθέσιμη μετάφραση.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Δημιουργία Εναλλακτικής Μετάφρασης</span></td>\n <td align=\"left\">&nbsp;</td>\n <td>Το ίδιο τμήμα μπορεί, ανάλογα με το context, να απαιτεί διαφορετικές μεταφράσεις. Επιλέξτε αυτή τη δυνατότητα από το Μενού,\n αν δεν ισχύει η τρέχουσα μετάφραση και εισάγετε την εναλλακτική μετάφραση.\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div><br class=\"table-break\"></div>\n <div class=\"section\">\n <div class=\"titlepage\">\n <div>\n <div>\n <h3 class=\"title\"><a name=\"submenu.GoTo\"></a>1.3. Μετάβαση σε<a class=\"indexterm\" name=\"d0e3272\"></a></h3>\n </div>\n </div>\n </div>\n <div class=\"table\"><a name=\"d0e3277\"></a><p class=\"title\"><b>Πίνακας 5.5. Μεταβείτε στο Μενού</b></p>\n <div class=\"table-contents\">\n <table class=\"table\" summary=\"Μεταβείτε στο Μενού\" border=\"1\">\n <colgroup>\n <col align=\"left\">\n <col align=\"left\">\n <col>\n </colgroup>\n <tbody>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Επόμενο Αμετάφραστο Τμήμα</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>U</strong></span></td>\n <td>Μετακινείται στο επόμενο τμήμα που δεν έχει ισοδύναμο στη μεταφραστική μνήμη.</td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Επόμενο Τμήμα</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>N</strong></span> ή <span class=\"keycap\"><strong>Enter</strong></span> ή <span class=\"keycap\"><strong>Tab</strong></span></td>\n <td>Μετακινείται στο επόμενο τμήμα. Αν το τρέχον τμήμα είναι το τελευταίο ενός αρχείου, μετακινείται στο πρώτο τμήμα του επόμενου\n αρχείου.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Προηγούμενο Τμήμα</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>P</strong></span> ή <span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>Enter</strong></span> ή <span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>Tab</strong></span></td>\n <td>Μετακινείται στο προηγούμενο τμήμα. Αν το τρέχον τμήμα είναι το πρώτο ενός αρχείου, μετακινείται στο τελευταίο τμήμα του προηγούμενου\n αρχείου.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Αριθμός Τμήματος...</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>J</strong></span></td>\n <td>Το τμήμα ανοίγει όταν εισάγετε τον αριθμό τμήματος.</td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Επόμενη Σημείωση</span></td>\n <td align=\"left\">&nbsp;</td>\n <td>Θα ανοίξει το επόμενο τμήμα που έχει μια συνημμένη σημείωση.</td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Προηγούμενη Σημείωση</span></td>\n <td align=\"left\">&nbsp;</td>\n <td>Θα ανοίξει το προηγούμενο τμήμα που έχει μια σημείωση.</td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Προς τα εμπρός στο Ιστορικό...</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>Shift</strong></span>+<span class=\"keycap\"><strong>N</strong></span></td>\n <td>Το <span class=\"application\">OmegaT</span> θυμάται ποια τμήματα εκτελέσθηκαν. Με αυτή την εντολή, μπορείτε να μετακινηθείτε προς τα εμπρός, στο τμήμα που αφήσατε προηγουμένως\n με την εντολή <span class=\"guimenuitem\">Προς τα πίσω στο Ιστορικό</span>...\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Προς τα πίσω στο Ιστορικό...</span></td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>Shift</strong></span>+<span class=\"keycap\"><strong>P</strong></span></td>\n <td>Με αυτή την εντολή μπορείτε να μετακινηθείτε προς τα πίσω, ένα τμήμα κάθε φορά, για να επιστρέψετε αργότερα στο τρέχον τμήμα,\n χρησμοποιώντας την παρακάτω εντολή <span class=\"guimenuitem\">Προς τα εμπρός στο Ιστορικό... </span>.\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div><br class=\"table-break\"></div>\n <div class=\"section\">\n <div class=\"titlepage\">\n <div>\n <div>\n <h3 class=\"title\"><a name=\"submenu.View\"></a>1.4. Προβολή<a class=\"indexterm\" name=\"d0e3404\"></a></h3>\n </div>\n </div>\n </div>\n <div class=\"table\"><a name=\"d0e3409\"></a><p class=\"title\"><b>Πίνακας 5.6. Προβολή Μενού\\</b></p>\n <div class=\"table-contents\">\n <table class=\"table\" summary=\"Προβολή Μενού\\\" border=\"1\">\n <colgroup>\n <col align=\"left\">\n <col>\n </colgroup>\n <tbody>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Επισήμανση Μεταφρασμένων Τμημάτων</span></td>\n <td>Αν το τσεκάρετε, τα μεταφρασμένα τμήματα θα επισημανθούν με κίτρινο χρώμα.</td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Επισήμανση Αμετάφραστων Τμημάτων</span></td>\n <td>Αν το τσεκάρετε, τα αμετάφραστα τμήματα θα επισημανθούν με μωβ χρώμα.</td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Εμφάνιση Τμημάτων προέλευσης</span></td>\n <td>Αν το τσεκάρετε, τα εμφανισθούν τα τμήματα προέλευσης και θα επισημανθούν με πράσινο χρώμα. Αν δεν το τσεκάρετε, δεν θα εμφανίζονται\n τα τμήματα προέλευσης.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Επισήμανση Μη-Μοναδικών Τμημάτων</span></td>\n <td>Αν το τσεκάρετε, τα μη-μοναδικά τμήματα θα επισημανθούν με απαλό γκρι χρώμα.</td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Επισήμαση Τμημάτων με σημειώσεις</span></td>\n <td>Αν το τσεκάρετε, τα τμήματα με σημειώσεις θα επισημανθούν με γαλάζιο χρώμα. Αυτή η επισήμανση έχει προτεραιότητα έναντι της\n Επισήμανσης των Μεταφρασμένων και των Αμετάφραστων τμημάτων.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Επισήμανση Μη-διαχωρίσμων Διαστημάτων</span></td>\n <td>Αν το τσεκάρετε, τα μη-διαχωρίσιμα διαστήματα μέσα στο Τμήμα, θα επισημανθούν με γκρι φόντο.</td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Πληροφορίες Τροποποίησης</span></td>\n <td>Αν ρυθμίσετε την επιλογή Τροποποίηση Εμφάνισης στο <span class=\"emphasis\"><em>Επιλεγμένη</em></span> θα εμφανισθεί ο χρόνος και ο δημιουργός της τελευταίας αλλαγής στο τρέχον τμήμα. Αν τη ρυθμίσετε στο<span class=\"emphasis\"><em> Όλες </em></span>δείχνει τις πληροφορίες για όλα τα τμήματα, ενώ το <span class=\"emphasis\"><em>Καμία</em></span> απενεργοποιεί αυτή την επιλογή.\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div><br class=\"table-break\"></div>\n <div class=\"section\">\n <div class=\"titlepage\">\n <div>\n <div>\n <h3 class=\"title\"><a name=\"submenu.Tools\"></a>1.5. Εργαλεία<a class=\"indexterm\" name=\"d0e3469\"></a></h3>\n </div>\n </div>\n </div>\n <div class=\"table\"><a name=\"d0e3474\"></a><p class=\"title\"><b>Πίνακας 5.7. Μενού εργαλείων</b></p>\n <div class=\"table-contents\"><a class=\"indexterm\" name=\"d0e3477\"></a><a class=\"indexterm\" name=\"d0e3482\"></a><a class=\"indexterm\" name=\"d0e3487\"></a><table class=\"table\" summary=\"Μενού εργαλείων\" border=\"1\">\n <colgroup>\n <col align=\"left\">\n <col>\n </colgroup>\n <tbody>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Επικύρωση ετικετών</span></td>\n <td><span class=\"guimenu\">Ctrl+T</span>: Ελέγχει για απωλεσθείσες ή για μετακινηθείσες ετικέτες σε μορφοποιημένα αρχεία. Θα εμφανίσει μια λίστα τμημάτων με σφάλματα\n ετικέτας και πιθανές ασυμβατότητες. Βλέπε <a class=\"link\" href=\"chapter.user.interface.html#section.tag.validation\" title=\"3.3. Επικύρωση ετικέτας\">Επικύρωση Ετικέτας</a> και <a class=\"xref\" href=\"\">???</a>.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Διαγραφή ετικετών</span></td>\n <td>Όταν ενεργοποιηθεί, γίνεται διαγραφή όλων των ετικετών μορφοποίησης από το τμήμα προέλευσης. Αυτό είναι χρήσιμο όταν έχετε\n να κάνετε με κείμενα όπου η inline μορφοποίηση δεν βρίσκει μια πραγματική χρήση (π.χ., OCRed PDF, κακή μετατροπή των .odt\n ή των .docx, κλπ.) Διαγράφονται μόνον οι inline ετικέ��ες, οπότε δεν θα πρέπει να υπάρχει κανένα πρόβλημα με το άνοιγμα των\n εγγράφων προορισμού. Η μη-ορατή μορφοποίηση (π.χ., που δεν εμφανίζεται ως ετικέτες στην Περιοχή Επεξεργασίς του OmegaT) διατηρείται\n και στο έγγραφο προορισμού.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Στατιστικές</span></td>\n <td>Ανοίγει ένα νέο παράθυρο και εμφανίζει τις στατιστικές έργου, π.χ. τα συνολικά δεδομένα του έργου και τα συνολικά για το κάθε\n αρχείο του έργου.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Στατιστικές αντιστοίχισης</span></td>\n <td>Εμφανίζει τις Στατιστικές αντιστοίχισης για το έργο: τον αριθμό επαναλήψεων, τις ακριβείς αντιστοιχίσεις, τις μερικές αντιστοιχίσεις\n (fuzzy matches) και τις μη-αντιστοιχίσεις. για τμήματα, λέξεις και χαρακτήρες.\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div><br class=\"table-break\"></div>\n <div class=\"section\">\n <div class=\"titlepage\">\n <div>\n <div>\n <h3 class=\"title\"><a name=\"submenu.Options\"></a>1.6. <a class=\"indexterm\" name=\"d0e3528\"></a>Επιλογές\n </h3>\n </div>\n </div>\n </div>\n <div class=\"table\"><a name=\"d0e3534\"></a><p class=\"title\"><b>Πίνακας 5.8. Μενού επιλογών</b></p>\n <div class=\"table-contents\">\n <table class=\"table\" summary=\"Μενού επιλογών\" border=\"1\">\n <colgroup>\n <col align=\"left\">\n <col>\n </colgroup>\n <tbody>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Χρησιμοποιείστε το TAB για να προχωρήσετε</span></td>\n <td>Ορίζει το κλειδί επικύρωσης στο <span class=\"guimenuitem\">Tab</span> αντί για το προεπιλεγμένο <span class=\"guimenuitem\">Enter</span>. Αυτή επιλογή είναι χρήσιμη για συστήματα εισαγωγής κάποιων Κινεζικών, Ιαπωνικών ή Κορεατικών χαρακτήρων.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Πάντα επιβεβαίωση πριν την Έξοδο</span></td>\n <td>Αυτό το πρόγραμμα θα ζητά επιβεβαίωση πριν κλείσει.</td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Μηχανική Μετάφραση</span></td>\n <td>Σας επιτρέπει να ενεργοποιείτε/απενεργοποιείτε τα εργαλεία Μηχανικής Μετάφρασης που προσφέρονται. Όταν ενεργοποιηθεί, <span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>M</strong></span> θα εισάγει την πρόταση στο τμήμα προορισμού του τρέχοντος τμήματος.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Γλωσσάρι</span></td>\n <td>προορίζεται για μελλοντική χρήση από Πρόσθετα (plugins)</td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">TransTips</span></td>\n <td>Σας επιτρέπει να ενεργοποιείτε/απενεργοποιείτε τη δυνατότητα των <span class=\"emphasis\"><em>TransTips </em></span>και να ορίζετε τη επιλογή για<span class=\"emphasis\"><em> Ακριβή Αντιστοίχιση.</em></span> Όταν ενεργοποιήσετε τα <span class=\"emphasis\"><em>TransTips</em></span>, με ένα δεξί κλικ σε μια επιλεγμένη λέξη στα αρχεία προέλευσης, θα ανοίξει ένα αναδυόμενο μενού με τις καταχωρήσεις γλωσσαρίου\n για τη λέξη που κλικάρατε. Τότε, μπορείτε να κλικάρετε στην προτιμώμενη μετάφραση, για να την εσιάγετε στο τμήμα προορισμού,\n στην τρέχουσα θέση. Όταν ενεργοποιείτε τα <span class=\"emphasis\"><em>TransTips/Ακριβής Αντιστοίχιση </em></span>, θα ελέγχονται μόνον οι πλήρεις λέξεις, ειδάλλως θα αντιστοιχίζονται ακόμη και τμήματα λέξεων.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Γραμματοσειρά...</span></td>\n <td>Εμφανίζει τον διάλογο για να τροποποιήσετε τη γραμματοσειρά εμφάνισης κειμένου. Οι χρήστες παλιών υπολογιστών που θεωρούν\n ότι η αλλαγή διαστάσεων παραθύρου είναι πολύ αργή μπορούν να δοκιμάσουν να αλλάξουν τη γραμματοσειρά. Βλέπε ρυθμίσεις γραμματοσειρών\n στα <a class=\"link\" href=\"chapter.misc.html\" title=\"Κεφάλαιο 20. Διάφορα θέματα\">Διάφορα</a></td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Φίλτρα αρχείου...</span></td>\n <td>Εμφανίζει τον διάλογο <a class=\"link\" href=\"chapter.file.filters.html\" title=\"Κεφάλαιο 7. Φίλτρα αρχείων\">Φίλτρα αρχείου</a> για να ρυθμίσετε τον τρόπο χειρισμού των αρχείων και του parsing.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Κατάτμηση...</span></td>\n <td>Ανοίγει τον διάλογο <a class=\"link\" href=\"chapter.segmentation.html\" title=\"Κεφάλαιο 13. Κατάτμηση αρχείων προέλευσης\">Κατάτμηση πηγής</a> για να ρυθμίσετε την κατάτμηση κειμένου.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Ορθογραφικός Έλεγχος...</span></td>\n <td>Ενφανίζει το παράθυρο <a class=\"link\" href=\"chapter.spellchecker.html\" title=\"Κεφάλαιο 19. Ορθογραφικός διορθωτής\">Ρύθμιση ορθογραφικού ελέγχου</a> για την εγκατάσταση, ρύθμιση και ενεργοποίηση του ορθογραφικού διορθωτή.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Συμπεριφορά Επεξεργασίας...</span></td>\n <td>Εμφανίζει τον διάλογο <a class=\"link\" href=\"chapter.translation.editing.html\" title=\"Κεφάλαιο 10. Συμπεριφορά επεξεργασίας\">Επεξεργασία μετάφρασης</a> προς ρύθμιση.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Επικύρωση ετικέτας...</span></td>\n <td>Για προγραμματιστές: σας επιτρέπει να ρυθμίζετε τις επιλογές Επικύρωσης ετικέτας, για να ελέγχετε και για μεταβλητές προγραμματισμού\n (%...).\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Ομάδα...</span></td>\n <td>Εδώ βάλτε το όνομά σας και θα προσαρτηθεί σε όλα τα τμήματα που μεταφράσατε εσείς.</td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Εξωτερικά TMXs...</span></td>\n <td>Επιτρέπει στον χρήστη να αποφασίζει τον τρόπο χειρισμού των ετικετών στα εξωτερικά αρχεία TMX (π.χ. που δεν δημιουργήθηκαν\n με το OmegaT).\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Προβολή...</span></td>\n <td>Περιέχει την επιλογή να είναι όλα τα τμήματα προέλευσης με έντονα γράμματα (bold) και για επισήμανση του πρώτου μη-μοναδικού\n τμήματος.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Αποθήκευση...</span></td>\n <td>επτιρέπει στον χρήστη να επιλέγει το διάστημα - σε λεπτά και σε δευτερόλεπτα - ανάμεσα στςι διαδοχικές αυτόματες αποθηκεύσεις\n του έργου. Το ελάχιστο διάστημα είναι τα 10 δευτερόλεπτα.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Σύνδεση με Ενδιάμεσο διακομιστή...</span></td>\n <td>Εισάγετε το όνομα χρήστη και τον κωδικό σας, αν χρησιμοποιείτε έναν ενδιάμεσο διακομιστή για την πρόσβαση στα έργα σας.</td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Επαναφορά Κυρίου Παραθύρου</span></td>\n <td>Επαναφέρει τα συστατικά του κυρίου παραθύρου του OmegaT στην προεπιλεγμένη τους κατάσταση. Χρησιμοποιείστε αυτό το χαρακτηριστικό\n όταν έχετε μετακινήσει, ή κρύψει, ένα ή και περισσότερα συστατικά και δεν μπορείτε να τα επαναφέρετε στην επιθυμητή κατάσταση.\n Μπορείτε επίσης να το χρησιμοποιήσετε όταν οι Περιοχές εργασίας δεν εμφανίζονται όπως θα περιμένατε, μετά από μια αναβάθμιση\n του OmegaT.\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div><br class=\"table-break\"></div>\n <div class=\"section\">\n <div class=\"titlepage\">\n <div>\n <div>\n <h3 class=\"title\"><a name=\"submenu.Help\"></a>1.7. Βοήθεια<a class=\"indexterm\" name=\"d0e3683\"></a></h3>\n </div>\n </div>\n </div>\n <div class=\"table\"><a name=\"d0e3688\"></a><p class=\"title\"><b>Πίνακας 5.9. Μενού Βοήθειας</b></p>\n <div class=\"table-contents\">\n <table class=\"table\" summary=\"Μενού Βοήθειας\" border=\"1\">\n <colgroup>\n <col align=\"left\">\n <col>\n </colgroup>\n <tbody>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Εγχειρίδιο χρήστη...</span></td>\n <td><span class=\"keycap\"><strong>F1:</strong></span> Ανοίγει τον Help browser εμφανίζοντας το εγχειρίδιο αυτό σε ένα χωριστό παράθυρο.\n </td>\n </tr>\n <tr>\n <td align=\"left\"><span class=\"guimenuitem\">Σχετικά με...</span></td>\n <td>Εμφανίζει πληροφορίες για το copyright, την απόδοση αναγνώρισης (credits) και για την Άδεια.</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div><br class=\"table-break\"></div>\n </div>\n <div class=\"section\">\n <div class=\"titlepage\">\n <div>\n <div>\n <h2 class=\"title\" style=\"clear: both\"><a name=\"keyboard.shortcuts\"></a>2. Συντομεύσεις πληκτρολογίου<a class=\"indexterm\" name=\"d0e3711\"></a></h2>\n </div>\n </div>\n </div>\n <p>Οι παρακάτω συντομεύσεις πληκτρολογίου προσφέρονται μέσα στο κύριο παράθυρο. Όταν στο προσκήνιο βρεθεί ένα άλλο παράθυρο,\n κάντε κλικ στο κύριο παράθυρο για να το φέρετε στο προσκήνιο ή πατήστερ <span class=\"keycap\"><strong>Esc</strong></span> για να κλείσετε το άλλο παράθυρο.\n </p>\n <p>Οι Συντομεύσεις πληκτρολογίου ενεργοποιούνται πατώντας <span class=\"keycap\"><strong>Ctrl</strong></span> και ένα γράμμα. Μερικές συντομεύσεις εμπλέκουν άλλα πλήκτρα. Για λόγους καλύτερης αναγνωσιμότητας, τα γράμματα γράφτηκαν\n εδώ με κεφαλαία.\n </p>\n <p>Το Ctrl χρησιμοποιείται στα λειτουργικά συστήματα Windows, UNIX και UNIX-οειδή, με πληκτρολόγια που έχουν ένα πλήκτρο <span class=\"keycap\"><strong>Ctrl</strong></span> / <span class=\"keycap\"><strong>Control key</strong></span>. Οι χρήστες Mac πρέπει, αντιθέτως, να χρησιμοποιούν το <span class=\"guimenuitem\">cmd+key.</span> Στα πληκτρολόγια Apple, το πλήκτρο <span class=\"guimenuitem\">cmd</span> ή φέρει μια ετικέτα command, ή ένα λογότυπο της Apple.\n </p>\n <div class=\"itemizedlist\">\n <ul class=\"itemizedlist\" style=\"list-style-type: disc; \">\n <li class=\"listitem\">\n <p>Διαχείριση έργου</p>\n </li>\n </ul>\n </div>\n <div class=\"itemizedlist\">\n <ul class=\"itemizedlist\" style=\"list-style-type: disc; \">\n <li class=\"listitem\">\n <p>Γίνεται επεξεργασία</p>\n </li>\n </ul>\n </div>\n <div class=\"itemizedlist\">\n <ul class=\"itemizedlist\" style=\"list-style-type: disc; \">\n <li class=\"listitem\">\n <p>Μετακίνηση στα πέριξ</p>\n </li>\n </ul>\n </div>\n <div class=\"itemizedlist\">\n <ul class=\"itemizedlist\" style=\"list-style-type: disc; \">\n <li class=\"listitem\">\n <p>Παράθυρα αναφοράς</p>\n </li>\n </ul>\n </div>\n <div class=\"itemizedlist\">\n <ul class=\"itemizedlist\" style=\"list-style-type: disc; \">\n <li class=\"listitem\">\n <p>Άλλα</p>\n </li>\n </ul>\n </div>\n <div class=\"section\">\n <div class=\"titlepage\">\n <div>\n <div>\n <h3 class=\"title\"><a name=\"d0e3758\"></a>2.1. <a class=\"indexterm\" name=\"d0e3760\"></a>Διαχείριση έργου<a class=\"indexterm\" name=\"d0e3766\"></a></h3>\n </div>\n </div>\n </div>\n <div class=\"table\"><a name=\"d0e3771\"></a><p class=\"title\"><b>Πίνακας 5.10. Συντομεύσεις διαχείρισης έργου</b></p>\n <div class=\"table-contents\">\n <table class=\"table\" summary=\"Συντομεύσεις διαχείρισης έργου\" border=\"1\">\n <colgroup>\n <col align=\"left\">\n <col align=\"left\">\n <col>\n </colgroup>\n <tbody>\n <tr>\n <td align=\"left\">Άνοιγμα έργου</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>O</strong></span></td>\n <td>Εμφανίζει έναν διάλογο για τον εντοπισμό ενός υπάρχοντος έργου.</td>\n </tr>\n <tr>\n <td align=\"left\">Αποθήκευση</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>S</strong></span></td>\n <td>Αποθηκεύει την τρέχουσα εργασία στην εσωτερική μεταφραστική μνήμη (το αρχείο project_save.tmx βρίσκεται στον κατάλογο του\n έργου <code class=\"filename\">omegat</code>).\n </td>\n </tr>\n <tr>\n <td align=\"left\">Κλείσιμο έργου</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Shift</strong></span>+<span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>W</strong></span></td>\n <td>Κλείνει το τρέχον έργο.</td>\n </tr>\n <tr>\n <td align=\"left\">Δημιουργία Μεταφρασμένων Εγγράφων</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>D</strong></span></td>\n <td>Δημιουργεί τα μεταφρασμένα έγγραφα στον κατάλογο προορισμού του έργου και δημιουργεί αρχεία μετάφρασης (αρχεία level1, level2\n και omegat tmx) στον αρχικό κατάλογο (root) του έργου.\n </td>\n </tr>\n <tr>\n <td align=\"left\">Ιδιότητες έργου</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>E</strong></span></td>\n <td>Εμφανίζει τις ρυθμίσεις έργου για μια τροποποίηση, αν απαιτείται.</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div><br class=\"table-break\"></div>\n <div class=\"section\">\n <div class=\"titlepage\">\n <div>\n <div>\n <h3 class=\"title\"><a name=\"keyboard.editing\"></a>2.2. <a class=\"indexterm\" name=\"d0e3840\"></a>Γίνεται επεξεργασία<a class=\"indexterm\" name=\"d0e3846\"></a></h3>\n </div>\n </div>\n </div>\n <div class=\"table\"><a name=\"d0e3851\"></a><p class=\"title\"><b>Πίνακας 5.11. Γίνεται επεξεργασία συντομεύσεων</b></p>\n <div class=\"table-contents\">\n <table class=\"table\" summary=\"Γίνεται επεξεργασία συντομεύσεων\" border=\"1\">\n <colgroup>\n <col align=\"left\">\n <col align=\"left\">\n <col>\n </colgroup>\n <tbody>\n <tr>\n <td align=\"left\">Αναίρεση τελευταίας ενέργειας</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>Z</strong></span></td>\n <td>Αναιρεί τις τελευταίες ενέργειες επεξεργασίας στο τρέχον τμήμα προορισμού</td>\n </tr>\n <tr>\n <td align=\"left\">Επανάληψη τελευταίας ενέργειας</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>Y</strong></span></td>\n <td>Επαναλαμβάνει τις τελευταίες ενέργειες επεξεργασίας στο τρέχον τμήμα προορισμού</td>\n </tr>\n <tr>\n <td align=\"left\">Επιλέξτε τον αριθμό αντιστοίχισης #N</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>#N</strong></span></td>\n <td>Το #N είναι ένα ψηφίο από το 1 ως το 5. Η συντόμευση επιλέ��ει την αντιστοίχιση υπ' αριθμ. Nth που προβάλλεται στο παράθυρο\n αντιστοίχισης (από προεπιλογή,επιλέγεται η πρώτη αντιστοίχιση)\n </td>\n </tr>\n <tr>\n <td align=\"left\">Αντικατάσταση με την Αντιστοίχιση</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>R</strong></span></td>\n <td>Αντικαθιστά τα περιεχόμενα του τρέχοντος τμήματος προορισμού με την επιλεγμένη αντιστοίχιση (από προεπιλογή,επιλέγεται η πρώτη\n αντιστοίχιση)\n </td>\n </tr>\n <tr>\n <td align=\"left\">Εισαγωγή αντιστοίχισης</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>I</strong></span></td>\n <td>Εισάγει την επιλεγμένη αντιστοίχιση στη θέση του δείκτη, στο τρέχον τμήμα προορισμού (από προεπιλογή, επιλέγεται η πρώτη αντιστοίχιση)</td>\n </tr>\n <tr>\n <td align=\"left\">Αντικατάσταση με την πηγή</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>Shift+R</strong></span></td>\n <td>Αντικαθιστά τα περιεχόμενα του τρέχοντος τμήματος προορισμού με τα περιεχόμενα του κειμένου προέλευσης</td>\n </tr>\n <tr>\n <td align=\"left\">Εισαγωγή πηγής</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>Shift+I</strong></span></td>\n <td>Εισάγει τα περιεχόμενα του κειμένου προέλευσης στο τμήμα προορισμού, εκεί που βρίσκεται ο δείκτης</td>\n </tr>\n <tr>\n <td align=\"left\">Εισαγωγή Ετικετών προέλευσης</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>Shift+T</strong></span></td>\n <td>Εισάγει τις ετικέτες προέλευσης στο τμήμα προορισμού, εκεί που βρίσκεται ο δείκτης</td>\n </tr>\n <tr>\n <td align=\"left\">Αναζήτηση έργου</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>F</strong></span></td>\n <td>Εμφανίζει έναν κατάλογο για να διεξάγετε αναζητήσεις στο έργο</td>\n </tr>\n <tr>\n <td align=\"left\">Αντικατάσταση με Μηχανική Μετάφραση</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>M</strong></span></td>\n <td>Αντικαθιστά το τμήμα προορισμού με τη Μηχανική Μετάφραση της πηγής. Καμία ενέργεια, αν απενεργοποιήσετε τα μηχανικά εργαλεία\n (βλέπε Μενού &gt; Επιλογές &gt; Μηχανική Μετάφραση)\n </td>\n </tr>\n <tr>\n <td align=\"left\">Εξαγωγή Επιλογής</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Shift</strong></span>+<span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>C</strong></span></td>\n <td>Εξάγει την τρέχουσα επιλογή σε ένα αρχείο κειμένου προς επεξεργασία.</td>\n </tr>\n <tr>\n <td align=\"left\">Δημιουργία Καταχώρησης Γλωσσαρίου</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Shift</strong></span>+<span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>G</strong></span></td>\n <td>Επιτρέπει στον χρήστη να δημιοθργήσει μια καταχώρηση στο αρχείο του προεπιλεγμένου γλωσσαρίου.</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div><br class=\"table-break\"></div>\n <div class=\"section\">\n <div class=\"titlepage\">\n <div>\n <div>\n <h3 class=\"title\"><a name=\"keyboard.moving.around\"></a>2.3. <a class=\"indexterm\" name=\"d0e3996\"></a>Μετακίνηση στα πέριξ\n </h3>\n </div>\n </div>\n </div>\n <div class=\"table\"><a name=\"d0e4002\"></a><p class=\"title\"><b>Πίνακας 5.12. Μετακίνηση μεταξύ συντομέυσεων</b></p>\n <div class=\"table-contents\">\n <table class=\"table\" summary=\"Μετακίνηση μεταξύ συντομέυσεων\" border=\"1\">\n <colgroup>\n <col align=\"left\">\n <col align=\"left\">\n <col>\n </colgroup>\n <tbody>\n <tr>\n <td align=\"left\">Επόμενο Αμετάφραστο Τμήμα</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>U</strong></span></td>\n <td>Μετακινεί το πεδίο επεξεργασίας στο επόμενο τμήμα που δεν κατεγράφη στη μεταφραστική μνήμη του έργου</td>\n </tr>\n <tr>\n <td align=\"left\">Επόμενο Τμήμα</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>N</strong></span>, <span class=\"keycap\"><strong>Enter</strong></span> or\n <span class=\"keycap\"><strong>Return</strong></span></td>\n <td>Μετακινεί το πεδίο επεξεργασίας στο επόμενο τμήμα.</td>\n </tr>\n <tr>\n <td align=\"left\">Προηγούμενο Τμήμα</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>P</strong></span></td>\n <td>Μετακινεί το πεδίο επεξεργασίας στο προηγούμενο τμήμα</td>\n </tr>\n <tr>\n <td align=\"left\">Αριθμός Τμήματος...</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>J</strong></span></td>\n <td>Θα σας μετακινήσει στον αριθμό τμήματος που εισάγατε</td>\n </tr>\n <tr>\n <td align=\"left\">Προς τα πίσω στο Ιστορικό...</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>Shift+P</strong></span></td>\n <td>Moves one segment back in history</td>\n </tr>\n <tr>\n <td align=\"left\">Προς τα εμπρός στο Ιστορικό...</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>Shift+N</strong></span></td>\n <td>Θα σας μετακινήσει κατά ένα τμήμα προς τα εμπρός στο ιστορικό</td>\n </tr>\n </tbody>\n </table>\n </div>\n </div><br class=\"table-break\"></div>\n <div class=\"section\">\n <div class=\"titlepage\">\n <div>\n <div>\n <h3 class=\"title\"><a name=\"keyboard.other\"></a>2.4. <a class=\"indexterm\" name=\"d0e4083\"></a>Άλλα\n </h3>\n </div>\n </div>\n </div>\n <div class=\"table\"><a name=\"d0e4089\"></a><p class=\"title\"><b>Πίνακας 5.13. Διάφορες συντομεύσεις</b></p>\n <div class=\"table-contents\">\n <table class=\"table\" summary=\"Διάφορες συντομεύσεις\" border=\"1\">\n <colgroup>\n <col align=\"left\">\n <col align=\"left\">\n <col>\n </colgroup>\n <tbody>\n <tr>\n <td align=\"left\">Κατάλογος Αρχείων έργου</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>L</strong></span></td>\n <td>Εμφανίζει τον κατάλογο με τα αρχεία του έργου</td>\n </tr>\n <tr>\n <td align=\"left\">Επικύρωση ετικετών</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>T</strong></span></td>\n <td>Ανοίγει το παράθυρο επικύρωση ετικέτας.</td>\n </tr>\n <tr>\n <td align=\"left\">Εξαγωγή Επιλογής</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Shift</strong></span>+<span class=\"keycap\"><strong>Ctrl+C</strong></span></td>\n <td>Εξάγει την τρέχουσα επιλογή ή την τρέχουσα πηγή, αν δεν έχει επιλεγεί κανένα κείμενο. Το κείμενο εξάγεται σε ένα αρχείο απλού\n κειμένου.\n </td>\n </tr>\n <tr>\n <td align=\"left\">Αναζήτηση έργου</td>\n <td align=\"left\"><span class=\"keycap\"><strong>Ctrl</strong></span>+<span class=\"keycap\"><strong>F</strong></span></td>\n <td>Ανοίγει ένα νέο παράθυρο αναζήτησης.</td>\n </tr>\n <tr>\n <td align=\"left\">Αρχεία βοήθειας</td>\n <td align=\"left\"><span class=\"keycap\"><strong>F1</strong></span></td>\n <td>Εμφανίζει τα αρχεία βοήθειας του <span class=\"application\">OmegaT</span> σε ένα χωριστό παράθυρο\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div><br class=\"table-break\"></div>\n </div>\n </div>\n <div class=\"navfooter\">\n <hr>\n <table width=\"100%\" summary=\"Navigation footer\">\n <tr>\n <td width=\"40%\" align=\"left\"><a accesskey=\"p\" href=\"chapter.user.interface.html\">Προηγ</a>&nbsp;\n </td>\n <td width=\"20%\" align=\"center\">&nbsp;</td>\n <td width=\"40%\" align=\"right\">&nbsp;<a accesskey=\"n\" href=\"chapter.project.properties.html\">Επόμενο</a></td>\n </tr>\n <tr>\n <td width=\"40%\" align=\"left\" valign=\"top\">Κεφάλαιο 4. Η διεπαφή χρήστη&nbsp;</td>\n <td width=\"20%\" align=\"center\"><a accesskey=\"h\" href=\"index.html\">Αρχή</a></td>\n <td width=\"40%\" align=\"right\" valign=\"top\">&nbsp;Κεφάλαιο 6. Ιδιότητες έργου</td>\n </tr>\n </table>\n </div>\n </body>\n</html>"} +{"text": "Promise = require('bluebird')\n_ = require('lodash')\n\nclass @Widget.Form extends @Widget\n root: 'form'\n\n submitSelector: ->\n @find('[type=\"submit\"]')\n\n submitForm: =>\n @submitSelector().then (el) -> el.click()\n\n submitWith: (values) =>\n @fillAll(values)\n .then(@submitForm)\n\n select: (opts) ->\n if !(_.isObject(opts)) and !opts\n throw new Error('You must provide something to select by.')\n\n opts = if _.isObject(opts) then opts else {text: opts}\n\n if (opts.text? and opts.value?)\n throw new Error('You may only have one select by attribute.')\n else if opts.text?\n @_selectByText(opts.text)\n else if opts.value?\n @_selectByValue(opts.value)\n\n _selectByText: (text) ->\n @find({text: text}).then (el) ->\n el.click()\n\n _selectByValue: (value) ->\n @find(\"option[value=\\\"#{value}\\\"]\").then (el) ->\n el.click()\n\n fillAll: (values) ->\n @_map Object.keys(values), (f) => @fill({\n selector: @_name(f)\n value: values[f]\n })\n\n readAll: ->\n _readAll = (f) =>\n @getValue(@_name(f)).then (v) -> [f, v]\n\n @_map(@fields, _readAll).then (read) ->\n _.fromPairs(read)\n\n _name: (name) ->\n \"[name='#{name}']\"\n"} +{"text": "/*\n * Copyright (C) 2015 Red Hat, Inc.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library. If not, see\n * <http://www.gnu.org/licenses/>.\n *\n * Author: Daniel P. Berrange <berrange@redhat.com>\n */\n\n#include <glib.h>\n\n#include \"qom/object.h\"\n#include \"qemu/module.h\"\n\n\n#define TYPE_DUMMY \"qemu-dummy\"\n\ntypedef struct DummyObject DummyObject;\ntypedef struct DummyObjectClass DummyObjectClass;\n\n#define DUMMY_OBJECT(obj) \\\n OBJECT_CHECK(DummyObject, (obj), TYPE_DUMMY)\n\ntypedef enum DummyAnimal DummyAnimal;\n\nenum DummyAnimal {\n DUMMY_FROG,\n DUMMY_ALLIGATOR,\n DUMMY_PLATYPUS,\n\n DUMMY_LAST,\n};\n\nstatic const char *const dummy_animal_map[DUMMY_LAST + 1] = {\n [DUMMY_FROG] = \"frog\",\n [DUMMY_ALLIGATOR] = \"alligator\",\n [DUMMY_PLATYPUS] = \"platypus\",\n [DUMMY_LAST] = NULL,\n};\n\nstruct DummyObject {\n Object parent_obj;\n\n bool bv;\n DummyAnimal av;\n char *sv;\n};\n\nstruct DummyObjectClass {\n ObjectClass parent_class;\n};\n\n\nstatic void dummy_set_bv(Object *obj,\n bool value,\n Error **errp)\n{\n DummyObject *dobj = DUMMY_OBJECT(obj);\n\n dobj->bv = value;\n}\n\nstatic bool dummy_get_bv(Object *obj,\n Error **errp)\n{\n DummyObject *dobj = DUMMY_OBJECT(obj);\n\n return dobj->bv;\n}\n\n\nstatic void dummy_set_av(Object *obj,\n int value,\n Error **errp)\n{\n DummyObject *dobj = DUMMY_OBJECT(obj);\n\n dobj->av = value;\n}\n\nstatic int dummy_get_av(Object *obj,\n Error **errp)\n{\n DummyObject *dobj = DUMMY_OBJECT(obj);\n\n return dobj->av;\n}\n\n\nstatic void dummy_set_sv(Object *obj,\n const char *value,\n Error **errp)\n{\n DummyObject *dobj = DUMMY_OBJECT(obj);\n\n g_free(dobj->sv);\n dobj->sv = g_strdup(value);\n}\n\nstatic char *dummy_get_sv(Object *obj,\n Error **errp)\n{\n DummyObject *dobj = DUMMY_OBJECT(obj);\n\n return g_strdup(dobj->sv);\n}\n\n\nstatic void dummy_init(Object *obj)\n{\n object_property_add_bool(obj, \"bv\",\n dummy_get_bv,\n dummy_set_bv,\n NULL);\n object_property_add_str(obj, \"sv\",\n dummy_get_sv,\n dummy_set_sv,\n NULL);\n object_property_add_enum(obj, \"av\",\n \"DummyAnimal\",\n dummy_animal_map,\n dummy_get_av,\n dummy_set_av,\n NULL);\n}\n\nstatic void dummy_finalize(Object *obj)\n{\n DummyObject *dobj = DUMMY_OBJECT(obj);\n\n g_free(dobj->sv);\n}\n\n\nstatic const TypeInfo dummy_info = {\n .name = TYPE_DUMMY,\n .parent = TYPE_OBJECT,\n .instance_size = sizeof(DummyObject),\n .instance_init = dummy_init,\n .instance_finalize = dummy_finalize,\n .class_size = sizeof(DummyObjectClass),\n};\n\n\n/*\n * The following 3 object classes are used to\n * simulate the kind of relationships seen in\n * qdev, which result in complex object\n * property destruction ordering.\n *\n * DummyDev has a 'bus' child to a DummyBus\n * DummyBus has a 'backend' child to a DummyBackend\n * DummyDev has a 'backend' link to DummyBackend\n *\n * When DummyDev is finalized, it unparents the\n * DummyBackend, which unparents the DummyDev\n * which deletes the 'backend' link from DummyDev\n * to DummyBackend. This illustrates that the\n * object_property_del_all() method needs to\n * cope with the list of properties being changed\n * while it iterates over them.\n */\ntypedef struct DummyDev DummyDev;\ntypedef struct DummyDevClass DummyDevClass;\ntypedef struct DummyBus DummyBus;\ntypedef struct DummyBusClass DummyBusClass;\ntypedef struct DummyBackend DummyBackend;\ntypedef struct DummyBackendClass DummyBackendClass;\n\n#define TYPE_DUMMY_DEV \"qemu-dummy-dev\"\n#define TYPE_DUMMY_BUS \"qemu-dummy-bus\"\n#define TYPE_DUMMY_BACKEND \"qemu-dummy-backend\"\n\n#define DUMMY_DEV(obj) \\\n OBJECT_CHECK(DummyDev, (obj), TYPE_DUMMY_DEV)\n#define DUMMY_BUS(obj) \\\n OBJECT_CHECK(DummyBus, (obj), TYPE_DUMMY_BUS)\n#define DUMMY_BACKEND(obj) \\\n OBJECT_CHECK(DummyBackend, (obj), TYPE_DUMMY_BACKEND)\n\nstruct DummyDev {\n Object parent_obj;\n\n DummyBus *bus;\n};\n\nstruct DummyDevClass {\n ObjectClass parent_class;\n};\n\nstruct DummyBus {\n Object parent_obj;\n\n DummyBackend *backend;\n};\n\nstruct DummyBusClass {\n ObjectClass parent_class;\n};\n\nstruct DummyBackend {\n Object parent_obj;\n};\n\nstruct DummyBackendClass {\n ObjectClass parent_class;\n};\n\n\nstatic void dummy_dev_init(Object *obj)\n{\n DummyDev *dev = DUMMY_DEV(obj);\n DummyBus *bus = DUMMY_BUS(object_new(TYPE_DUMMY_BUS));\n DummyBackend *backend = DUMMY_BACKEND(object_new(TYPE_DUMMY_BACKEND));\n\n object_property_add_child(obj, \"bus\", OBJECT(bus), NULL);\n dev->bus = bus;\n object_property_add_child(OBJECT(bus), \"backend\", OBJECT(backend), NULL);\n bus->backend = backend;\n\n object_property_add_link(obj, \"backend\", TYPE_DUMMY_BACKEND,\n (Object **)&bus->backend, NULL, 0, NULL);\n}\n\nstatic void dummy_dev_unparent(Object *obj)\n{\n DummyDev *dev = DUMMY_DEV(obj);\n object_unparent(OBJECT(dev->bus));\n}\n\nstatic void dummy_dev_class_init(ObjectClass *klass, void *opaque)\n{\n klass->unparent = dummy_dev_unparent;\n}\n\n\nstatic void dummy_bus_init(Object *obj)\n{\n}\n\nstatic void dummy_bus_unparent(Object *obj)\n{\n DummyBus *bus = DUMMY_BUS(obj);\n object_property_del(obj->parent, \"backend\", NULL);\n object_unparent(OBJECT(bus->backend));\n}\n\nstatic void dummy_bus_class_init(ObjectClass *klass, void *opaque)\n{\n klass->unparent = dummy_bus_unparent;\n}\n\nstatic void dummy_backend_init(Object *obj)\n{\n}\n\n\nstatic const TypeInfo dummy_dev_info = {\n .name = TYPE_DUMMY_DEV,\n .parent = TYPE_OBJECT,\n .instance_size = sizeof(DummyDev),\n .instance_init = dummy_dev_init,\n .class_size = sizeof(DummyDevClass),\n .class_init = dummy_dev_class_init,\n};\n\nstatic const TypeInfo dummy_bus_info = {\n .name = TYPE_DUMMY_BUS,\n .parent = TYPE_OBJECT,\n .instance_size = sizeof(DummyBus),\n .instance_init = dummy_bus_init,\n .class_size = sizeof(DummyBusClass),\n .class_init = dummy_bus_class_init,\n};\n\nstatic const TypeInfo dummy_backend_info = {\n .name = TYPE_DUMMY_BACKEND,\n .parent = TYPE_OBJECT,\n .instance_size = sizeof(DummyBackend),\n .instance_init = dummy_backend_init,\n .class_size = sizeof(DummyBackendClass),\n};\n\n\n\nstatic void test_dummy_createv(void)\n{\n Error *err = NULL;\n Object *parent = object_get_objects_root();\n DummyObject *dobj = DUMMY_OBJECT(\n object_new_with_props(TYPE_DUMMY,\n parent,\n \"dummy0\",\n &err,\n \"bv\", \"yes\",\n \"sv\", \"Hiss hiss hiss\",\n \"av\", \"platypus\",\n NULL));\n\n g_assert(err == NULL);\n g_assert_cmpstr(dobj->sv, ==, \"Hiss hiss hiss\");\n g_assert(dobj->bv == true);\n g_assert(dobj->av == DUMMY_PLATYPUS);\n\n g_assert(object_resolve_path_component(parent, \"dummy0\")\n == OBJECT(dobj));\n\n object_unparent(OBJECT(dobj));\n}\n\n\nstatic Object *new_helper(Error **errp,\n Object *parent,\n ...)\n{\n va_list vargs;\n Object *obj;\n\n va_start(vargs, parent);\n obj = object_new_with_propv(TYPE_DUMMY,\n parent,\n \"dummy0\",\n errp,\n vargs);\n va_end(vargs);\n return obj;\n}\n\nstatic void test_dummy_createlist(void)\n{\n Error *err = NULL;\n Object *parent = object_get_objects_root();\n DummyObject *dobj = DUMMY_OBJECT(\n new_helper(&err,\n parent,\n \"bv\", \"yes\",\n \"sv\", \"Hiss hiss hiss\",\n \"av\", \"platypus\",\n NULL));\n\n g_assert(err == NULL);\n g_assert_cmpstr(dobj->sv, ==, \"Hiss hiss hiss\");\n g_assert(dobj->bv == true);\n g_assert(dobj->av == DUMMY_PLATYPUS);\n\n g_assert(object_resolve_path_component(parent, \"dummy0\")\n == OBJECT(dobj));\n\n object_unparent(OBJECT(dobj));\n}\n\nstatic void test_dummy_badenum(void)\n{\n Error *err = NULL;\n Object *parent = object_get_objects_root();\n Object *dobj =\n object_new_with_props(TYPE_DUMMY,\n parent,\n \"dummy0\",\n &err,\n \"bv\", \"yes\",\n \"sv\", \"Hiss hiss hiss\",\n \"av\", \"yeti\",\n NULL);\n\n g_assert(dobj == NULL);\n g_assert(err != NULL);\n g_assert_cmpstr(error_get_pretty(err), ==,\n \"Invalid parameter 'yeti'\");\n\n g_assert(object_resolve_path_component(parent, \"dummy0\")\n == NULL);\n\n error_free(err);\n}\n\n\nstatic void test_dummy_getenum(void)\n{\n Error *err = NULL;\n int val;\n Object *parent = object_get_objects_root();\n DummyObject *dobj = DUMMY_OBJECT(\n object_new_with_props(TYPE_DUMMY,\n parent,\n \"dummy0\",\n &err,\n \"av\", \"platypus\",\n NULL));\n\n g_assert(err == NULL);\n g_assert(dobj->av == DUMMY_PLATYPUS);\n\n val = object_property_get_enum(OBJECT(dobj),\n \"av\",\n \"DummyAnimal\",\n &err);\n g_assert(err == NULL);\n g_assert(val == DUMMY_PLATYPUS);\n\n /* A bad enum type name */\n val = object_property_get_enum(OBJECT(dobj),\n \"av\",\n \"BadAnimal\",\n &err);\n g_assert(err != NULL);\n error_free(err);\n err = NULL;\n\n /* A non-enum property name */\n val = object_property_get_enum(OBJECT(dobj),\n \"iv\",\n \"DummyAnimal\",\n &err);\n g_assert(err != NULL);\n error_free(err);\n\n object_unparent(OBJECT(dobj));\n}\n\n\nstatic void test_dummy_iterator(void)\n{\n Object *parent = object_get_objects_root();\n DummyObject *dobj = DUMMY_OBJECT(\n object_new_with_props(TYPE_DUMMY,\n parent,\n \"dummy0\",\n &error_abort,\n \"bv\", \"yes\",\n \"sv\", \"Hiss hiss hiss\",\n \"av\", \"platypus\",\n NULL));\n\n ObjectProperty *prop;\n ObjectPropertyIterator *iter;\n bool seenbv = false, seensv = false, seenav = false, seentype;\n\n iter = object_property_iter_init(OBJECT(dobj));\n while ((prop = object_property_iter_next(iter))) {\n if (g_str_equal(prop->name, \"bv\")) {\n seenbv = true;\n } else if (g_str_equal(prop->name, \"sv\")) {\n seensv = true;\n } else if (g_str_equal(prop->name, \"av\")) {\n seenav = true;\n } else if (g_str_equal(prop->name, \"type\")) {\n /* This prop comes from the base Object class */\n seentype = true;\n } else {\n g_printerr(\"Found prop '%s'\\n\", prop->name);\n g_assert_not_reached();\n }\n }\n object_property_iter_free(iter);\n g_assert(seenbv);\n g_assert(seenav);\n g_assert(seensv);\n g_assert(seentype);\n\n object_unparent(OBJECT(dobj));\n}\n\n\nstatic void test_dummy_delchild(void)\n{\n Object *parent = object_get_objects_root();\n DummyDev *dev = DUMMY_DEV(\n object_new_with_props(TYPE_DUMMY_DEV,\n parent,\n \"dev0\",\n &error_abort,\n NULL));\n\n object_unparent(OBJECT(dev));\n}\n\nint main(int argc, char **argv)\n{\n g_test_init(&argc, &argv, NULL);\n\n module_call_init(MODULE_INIT_QOM);\n type_register_static(&dummy_info);\n type_register_static(&dummy_dev_info);\n type_register_static(&dummy_bus_info);\n type_register_static(&dummy_backend_info);\n\n g_test_add_func(\"/qom/proplist/createlist\", test_dummy_createlist);\n g_test_add_func(\"/qom/proplist/createv\", test_dummy_createv);\n g_test_add_func(\"/qom/proplist/badenum\", test_dummy_badenum);\n g_test_add_func(\"/qom/proplist/getenum\", test_dummy_getenum);\n g_test_add_func(\"/qom/proplist/iterator\", test_dummy_iterator);\n g_test_add_func(\"/qom/proplist/delchild\", test_dummy_delchild);\n\n return g_test_run();\n}\n"} +{"text": "{\n \"1.81.0\": {\n \"date\": \"July 2020\",\n \"notes\": [\n {\n \"id\": \"ab42ee8ba7b535258769f6c09fa3ba8232dadffe\",\n \"type\": \"FIX\",\n \"text\": \" sap.ui.rta:Move for unstashed element has correct variantReference\",\n \"references\": [\n {\n \"type\": \"BCP\",\n \"reference\": \"2080199392\"\n }\n ]\n },\n {\n \"id\": \"32dc1fb845dbf3aae11d2e56a1990cdbd465f9e5\",\n \"type\": \"FEATURE\",\n \"text\": \" sap.ui.rta can show a version history\",\n \"references\": []\n },\n {\n \"id\": \"2fbe4dadd93774f967306867a2743c5027ca1702\",\n \"type\": \"FIX\",\n \"text\": \" sap.ui.rta - performance test FIX\",\n \"references\": [\n {\n \"type\": \"BCP\",\n \"reference\": \"2080268987\"\n }\n ]\n }\n ]\n }\n}"} +{"text": "// Copyright 2015 The etcd Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage netutil\n\nimport (\n\t\"fmt\"\n\t\"os/exec\"\n)\n\n// DropPort drops all tcp packets that are received from the given port and sent to the given port.\nfunc DropPort(port int) error {\n\tcmdStr := fmt.Sprintf(\"sudo iptables -A OUTPUT -p tcp --destination-port %d -j DROP\", port)\n\tif _, err := exec.Command(\"/bin/sh\", \"-c\", cmdStr).Output(); err != nil {\n\t\treturn err\n\t}\n\tcmdStr = fmt.Sprintf(\"sudo iptables -A INPUT -p tcp --destination-port %d -j DROP\", port)\n\t_, err := exec.Command(\"/bin/sh\", \"-c\", cmdStr).Output()\n\treturn err\n}\n\n// RecoverPort stops dropping tcp packets at given port.\nfunc RecoverPort(port int) error {\n\tcmdStr := fmt.Sprintf(\"sudo iptables -D OUTPUT -p tcp --destination-port %d -j DROP\", port)\n\tif _, err := exec.Command(\"/bin/sh\", \"-c\", cmdStr).Output(); err != nil {\n\t\treturn err\n\t}\n\tcmdStr = fmt.Sprintf(\"sudo iptables -D INPUT -p tcp --destination-port %d -j DROP\", port)\n\t_, err := exec.Command(\"/bin/sh\", \"-c\", cmdStr).Output()\n\treturn err\n}\n\n// SetLatency adds latency in millisecond scale with random variations.\nfunc SetLatency(ms, rv int) error {\n\tifces, err := GetDefaultInterfaces()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif rv > ms {\n\t\trv = 1\n\t}\n\tfor ifce := range ifces {\n\t\tcmdStr := fmt.Sprintf(\"sudo tc qdisc add dev %s root netem delay %dms %dms distribution normal\", ifce, ms, rv)\n\t\t_, err = exec.Command(\"/bin/sh\", \"-c\", cmdStr).Output()\n\t\tif err != nil {\n\t\t\t// the rule has already been added. Overwrite it.\n\t\t\tcmdStr = fmt.Sprintf(\"sudo tc qdisc change dev %s root netem delay %dms %dms distribution normal\", ifce, ms, rv)\n\t\t\t_, err = exec.Command(\"/bin/sh\", \"-c\", cmdStr).Output()\n\t\t\tif err != nil {\n\t\t\t\treturn err\n\t\t\t}\n\t\t}\n\t}\n\treturn nil\n}\n\n// RemoveLatency resets latency configurations.\nfunc RemoveLatency() error {\n\tifces, err := GetDefaultInterfaces()\n\tif err != nil {\n\t\treturn err\n\t}\n\tfor ifce := range ifces {\n\t\t_, err = exec.Command(\"/bin/sh\", \"-c\", fmt.Sprintf(\"sudo tc qdisc del dev %s root netem\", ifce)).Output()\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t}\n\treturn nil\n}\n"} +{"text": "<?php declare(strict_types=1);\n\nnamespace Shopware\\Core\\Checkout\\Test\\Customer\\Rule;\n\nuse Shopware\\Core\\Checkout\\Cart\\Price\\Struct\\CalculatedPrice;\nuse Shopware\\Core\\Checkout\\Cart\\Price\\Struct\\CartPrice;\nuse Shopware\\Core\\Checkout\\Cart\\Price\\Struct\\QuantityPriceDefinition;\nuse Shopware\\Core\\Checkout\\Cart\\Tax\\Struct\\CalculatedTaxCollection;\nuse Shopware\\Core\\Checkout\\Cart\\Tax\\Struct\\TaxRuleCollection;\nuse Shopware\\Core\\Checkout\\Order\\Aggregate\\OrderDelivery\\OrderDeliveryStates;\nuse Shopware\\Core\\Checkout\\Order\\OrderStates;\nuse Shopware\\Core\\Defaults;\nuse Shopware\\Core\\Framework\\Context;\nuse Shopware\\Core\\Framework\\Test\\TestCaseBase\\BasicTestDataBehaviour;\nuse Shopware\\Core\\Framework\\Uuid\\Uuid;\nuse Shopware\\Core\\System\\StateMachine\\StateMachineRegistry;\nuse Shopware\\Core\\System\\Test\\EntityFixturesBase;\nuse Symfony\\Component\\DependencyInjection\\ContainerAwareTrait;\n\ntrait OrderFixture\n{\n use ContainerAwareTrait;\n use EntityFixturesBase;\n use BasicTestDataBehaviour;\n\n private function getOrderData(string $orderId, Context $context): array\n {\n $stateMachineRegistry = $this->getContainer()->get(StateMachineRegistry::class);\n $orderCustomerId = Uuid::randomHex();\n $addressId = Uuid::randomHex();\n $orderLineItemId = Uuid::randomHex();\n $countryStateId = Uuid::randomHex();\n $customerId = Uuid::randomHex();\n\n $order = [\n [\n 'id' => $orderId,\n 'price' => new CartPrice(10, 10, 10, new CalculatedTaxCollection(), new TaxRuleCollection(), CartPrice::TAX_STATE_NET),\n 'shippingCosts' => new CalculatedPrice(10, 10, new CalculatedTaxCollection(), new TaxRuleCollection()),\n 'stateId' => $stateMachineRegistry->getInitialState(OrderStates::STATE_MACHINE, $context)->getId(),\n 'paymentMethodId' => $this->getValidPaymentMethodId(),\n 'currencyId' => Defaults::CURRENCY,\n 'currencyFactor' => 1,\n 'salesChannelId' => Defaults::SALES_CHANNEL,\n 'orderDateTime' => '2019-04-01 08:36:43.267',\n 'deliveries' => [\n [\n 'stateId' => $stateMachineRegistry->getInitialState(OrderDeliveryStates::STATE_MACHINE, $context)->getId(),\n 'shippingMethodId' => $this->getValidShippingMethodId(),\n 'shippingCosts' => new CalculatedPrice(10, 10, new CalculatedTaxCollection(), new TaxRuleCollection()),\n 'shippingDateEarliest' => date(DATE_ISO8601),\n 'shippingDateLatest' => date(DATE_ISO8601),\n 'shippingOrderAddress' => [\n 'salutationId' => $this->getValidSalutationId(),\n 'firstName' => 'Floy',\n 'lastName' => 'Glover',\n 'zipcode' => '59438-0403',\n 'city' => 'Stellaberg',\n 'street' => 'street',\n 'country' => [\n 'name' => 'kasachstan',\n 'id' => $this->getValidCountryId(),\n ],\n ],\n 'positions' => [\n [\n 'price' => new CalculatedPrice(10, 10, new CalculatedTaxCollection(), new TaxRuleCollection()),\n 'orderLineItemId' => $orderLineItemId,\n ],\n ],\n ],\n ],\n 'lineItems' => [\n [\n 'id' => $orderLineItemId,\n 'identifier' => 'test',\n 'quantity' => 1,\n 'type' => 'test',\n 'label' => 'test',\n 'price' => new CalculatedPrice(10, 10, new CalculatedTaxCollection(), new TaxRuleCollection()),\n 'priceDefinition' => new QuantityPriceDefinition(10, new TaxRuleCollection(), 2),\n 'priority' => 100,\n 'good' => true,\n ],\n ],\n 'deepLinkCode' => 'BwvdEInxOHBbwfRw6oHF1Q_orfYeo9RY',\n 'orderCustomerId' => $orderCustomerId,\n 'orderCustomer' => [\n 'id' => $orderCustomerId,\n 'email' => 'test@example.com',\n 'firstName' => 'Noe',\n 'lastName' => 'Hill',\n 'salutationId' => $this->getValidSalutationId(),\n 'title' => 'Doc',\n 'customerNumber' => 'Test',\n 'customer' => [\n 'id' => $customerId,\n 'email' => 'test@example.com',\n 'firstName' => 'Noe',\n 'lastName' => 'Hill',\n 'salutationId' => $this->getValidSalutationId(),\n 'title' => 'Doc',\n 'customerNumber' => 'Test',\n 'guest' => true,\n 'group' => ['name' => 'testse2323'],\n 'defaultPaymentMethodId' => $this->getValidPaymentMethodId(),\n 'salesChannelId' => Defaults::SALES_CHANNEL,\n 'defaultBillingAddressId' => $addressId,\n 'defaultShippingAddressId' => $addressId,\n 'addresses' => [\n [\n 'id' => $addressId,\n 'salutationId' => $this->getValidSalutationId(),\n 'firstName' => 'Floy',\n 'lastName' => 'Glover',\n 'zipcode' => '59438-0403',\n 'city' => 'Stellaberg',\n 'street' => 'street',\n 'countryStateId' => $countryStateId,\n 'country' => [\n 'name' => 'kasachstan',\n 'id' => $this->getValidCountryId(),\n 'states' => [\n [\n 'id' => $countryStateId,\n 'name' => 'oklahoma',\n 'shortCode' => 'OH',\n ],\n ],\n ],\n ],\n ],\n ],\n ],\n 'billingAddressId' => $addressId,\n 'addresses' => [\n [\n 'salutationId' => $this->getValidSalutationId(),\n 'firstName' => 'Floy',\n 'lastName' => 'Glover',\n 'zipcode' => '59438-0403',\n 'city' => 'Stellaberg',\n 'street' => 'street',\n 'countryId' => $this->getValidCountryId(),\n 'id' => $addressId,\n ],\n ],\n ],\n ];\n\n return $order;\n }\n}\n"} +{"text": ";; Pipeline description for Motorola PowerPC e500mc core.\n;; Copyright (C) 2008-2019 Free Software Foundation, Inc.\n;; Contributed by Edmar Wienskoski (edmar@freescale.com)\n;;\n;; This file is part of GCC.\n;;\n;; GCC is free software; you can redistribute it and/or modify it\n;; under the terms of the GNU General Public License as published\n;; by the Free Software Foundation; either version 3, or (at your\n;; option) any later version.\n;;\n;; GCC is distributed in the hope that it will be useful, but WITHOUT\n;; ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n;; or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public\n;; License for more details.\n;;\n;; You should have received a copy of the GNU General Public License\n;; along with GCC; see the file COPYING3. If not see\n;; <http://www.gnu.org/licenses/>.\n;;\n;; e500mc 32-bit SU(2), LSU, FPU, BPU\n;; Max issue 3 insns/clock cycle (includes 1 branch)\n;; FP is half clocked, timings of other instructions are as in the e500v2.\n\n(define_automaton \"e500mc_most,e500mc_long,e500mc_retire\")\n(define_cpu_unit \"e500mc_decode_0,e500mc_decode_1\" \"e500mc_most\")\n(define_cpu_unit \"e500mc_issue_0,e500mc_issue_1\" \"e500mc_most\")\n(define_cpu_unit \"e500mc_retire_0,e500mc_retire_1\" \"e500mc_retire\")\n\n;; SU.\n(define_cpu_unit \"e500mc_su0_stage0,e500mc_su1_stage0\" \"e500mc_most\")\n\n;; MU.\n(define_cpu_unit \"e500mc_mu_stage0,e500mc_mu_stage1\" \"e500mc_most\")\n(define_cpu_unit \"e500mc_mu_stage2,e500mc_mu_stage3\" \"e500mc_most\")\n\n;; Non-pipelined division.\n(define_cpu_unit \"e500mc_mu_div\" \"e500mc_long\")\n\n;; LSU.\n(define_cpu_unit \"e500mc_lsu\" \"e500mc_most\")\n\n;; FPU.\n(define_cpu_unit \"e500mc_fpu\" \"e500mc_most\")\n\n;; Branch unit.\n(define_cpu_unit \"e500mc_bu\" \"e500mc_most\")\n\n;; The following units are used to make the automata deterministic.\n(define_cpu_unit \"present_e500mc_decode_0\" \"e500mc_most\")\n(define_cpu_unit \"present_e500mc_issue_0\" \"e500mc_most\")\n(define_cpu_unit \"present_e500mc_retire_0\" \"e500mc_retire\")\n(define_cpu_unit \"present_e500mc_su0_stage0\" \"e500mc_most\")\n\n;; The following sets to make automata deterministic when option ndfa is used.\n(presence_set \"present_e500mc_decode_0\" \"e500mc_decode_0\")\n(presence_set \"present_e500mc_issue_0\" \"e500mc_issue_0\")\n(presence_set \"present_e500mc_retire_0\" \"e500mc_retire_0\")\n(presence_set \"present_e500mc_su0_stage0\" \"e500mc_su0_stage0\")\n\n;; Some useful abbreviations.\n(define_reservation \"e500mc_decode\"\n \"e500mc_decode_0|e500mc_decode_1+present_e500mc_decode_0\")\n(define_reservation \"e500mc_issue\"\n \"e500mc_issue_0|e500mc_issue_1+present_e500mc_issue_0\")\n(define_reservation \"e500mc_retire\"\n \"e500mc_retire_0|e500mc_retire_1+present_e500mc_retire_0\")\n(define_reservation \"e500mc_su_stage0\"\n \"e500mc_su0_stage0|e500mc_su1_stage0+present_e500mc_su0_stage0\")\n\n;; Simple SU insns.\n(define_insn_reservation \"e500mc_su\" 1\n (and (eq_attr \"type\" \"integer,add,logical,insert,cmp,\\\n shift,trap,cntlz,exts,isel\")\n (eq_attr \"cpu\" \"ppce500mc\"))\n \"e500mc_decode,e500mc_issue+e500mc_su_stage0+e500mc_retire\")\n\n(define_insn_reservation \"e500mc_two\" 1\n (and (eq_attr \"type\" \"two\")\n (eq_attr \"cpu\" \"ppce500mc\"))\n \"e500mc_decode,e500mc_issue+e500mc_su_stage0+e500mc_retire,\\\n e500mc_issue+e500mc_su_stage0+e500mc_retire\")\n\n(define_insn_reservation \"e500mc_three\" 1\n (and (eq_attr \"type\" \"three\")\n (eq_attr \"cpu\" \"ppce500mc\"))\n \"e500mc_decode,e500mc_issue+e500mc_su_stage0+e500mc_retire,\\\n e500mc_issue+e500mc_su_stage0+e500mc_retire,\\\n e500mc_issue+e500mc_su_stage0+e500mc_retire\")\n\n;; Multiply.\n(define_insn_reservation \"e500mc_multiply\" 4\n (and (eq_attr \"type\" \"mul\")\n (eq_attr \"cpu\" \"ppce500mc\"))\n \"e500mc_decode,e500mc_issue+e500mc_mu_stage0,e500mc_mu_stage1,\\\n e500mc_mu_stage2,e500mc_mu_stage3+e500mc_retire\")\n\n;; Divide. We use the average latency time here.\n(define_insn_reservation \"e500mc_divide\" 14\n (and (eq_attr \"type\" \"div\")\n (eq_attr \"cpu\" \"ppce500mc\"))\n \"e500mc_decode,e500mc_issue+e500mc_mu_stage0+e500mc_mu_div,\\\n e500mc_mu_div*13\")\n\n;; Branch.\n(define_insn_reservation \"e500mc_branch\" 1\n (and (eq_attr \"type\" \"jmpreg,branch,isync\")\n (eq_attr \"cpu\" \"ppce500mc\"))\n \"e500mc_decode,e500mc_bu,e500mc_retire\")\n\n;; CR logical.\n(define_insn_reservation \"e500mc_cr_logical\" 1\n (and (eq_attr \"type\" \"cr_logical\")\n (eq_attr \"cpu\" \"ppce500mc\"))\n \"e500mc_decode,e500mc_bu,e500mc_retire\")\n\n;; Mfcr.\n(define_insn_reservation \"e500mc_mfcr\" 1\n (and (eq_attr \"type\" \"mfcr\")\n (eq_attr \"cpu\" \"ppce500mc\"))\n \"e500mc_decode,e500mc_issue+e500mc_su1_stage0+e500mc_retire\")\n\n;; Mtcrf.\n(define_insn_reservation \"e500mc_mtcrf\" 1\n (and (eq_attr \"type\" \"mtcr\")\n (eq_attr \"cpu\" \"ppce500mc\"))\n \"e500mc_decode,e500mc_issue+e500mc_su1_stage0+e500mc_retire\")\n\n;; Mtjmpr.\n(define_insn_reservation \"e500mc_mtjmpr\" 1\n (and (eq_attr \"type\" \"mtjmpr,mfjmpr\")\n (eq_attr \"cpu\" \"ppce500mc\"))\n \"e500mc_decode,e500mc_issue+e500mc_su_stage0+e500mc_retire\")\n\n;; Loads.\n(define_insn_reservation \"e500mc_load\" 3\n (and (eq_attr \"type\" \"load,load_l,sync\")\n (eq_attr \"cpu\" \"ppce500mc\"))\n \"e500mc_decode,e500mc_issue+e500mc_lsu,nothing,e500mc_retire\")\n\n(define_insn_reservation \"e500mc_fpload\" 4\n (and (eq_attr \"type\" \"fpload\")\n (eq_attr \"cpu\" \"ppce500mc\"))\n \"e500mc_decode,e500mc_issue+e500mc_lsu,nothing*2,e500mc_retire\")\n\n;; Stores.\n(define_insn_reservation \"e500mc_store\" 3\n (and (eq_attr \"type\" \"store,store_c\")\n (eq_attr \"cpu\" \"ppce500mc\"))\n \"e500mc_decode,e500mc_issue+e500mc_lsu,nothing,e500mc_retire\")\n\n(define_insn_reservation \"e500mc_fpstore\" 3\n (and (eq_attr \"type\" \"fpstore\")\n (eq_attr \"cpu\" \"ppce500mc\"))\n \"e500mc_decode,e500mc_issue+e500mc_lsu,nothing,e500mc_retire\")\n\n;; The following ignores the retire unit to avoid a large automata.\n\n;; Simple FP.\n(define_insn_reservation \"e500mc_simple_float\" 8\n (and (eq_attr \"type\" \"fpsimple\")\n (eq_attr \"cpu\" \"ppce500mc\"))\n \"e500mc_decode,e500mc_issue+e500mc_fpu\")\n; \"e500mc_decode,e500mc_issue+e500mc_fpu,nothing*6,e500mc_retire\")\n\n;; FP.\n(define_insn_reservation \"e500mc_float\" 8\n (and (eq_attr \"type\" \"fp\")\n (eq_attr \"cpu\" \"ppce500mc\"))\n \"e500mc_decode,e500mc_issue+e500mc_fpu\")\n; \"e500mc_decode,e500mc_issue+e500mc_fpu,nothing*6,e500mc_retire\")\n\n(define_insn_reservation \"e500mc_fpcompare\" 8\n (and (eq_attr \"type\" \"fpcompare\")\n (eq_attr \"cpu\" \"ppce500mc\"))\n \"e500mc_decode,e500mc_issue+e500mc_fpu\")\n\n(define_insn_reservation \"e500mc_dmul\" 10\n (and (eq_attr \"type\" \"dmul\")\n (eq_attr \"cpu\" \"ppce500mc\"))\n \"e500mc_decode,e500mc_issue+e500mc_fpu\")\n\n;; FP divides are not pipelined.\n(define_insn_reservation \"e500mc_sdiv\" 36\n (and (eq_attr \"type\" \"sdiv\")\n (eq_attr \"cpu\" \"ppce500mc\"))\n \"e500mc_decode,e500mc_issue+e500mc_fpu,e500mc_fpu*35\")\n\n(define_insn_reservation \"e500mc_ddiv\" 66\n (and (eq_attr \"type\" \"ddiv\")\n (eq_attr \"cpu\" \"ppce500mc\"))\n \"e500mc_decode,e500mc_issue+e500mc_fpu,e500mc_fpu*65\")\n"} +{"text": "/// RFC3016 RTP Payload Format for MPEG-4 Audio/Visual Streams\n/// RFC6416 RTP Payload Format for MPEG-4 Audio/Visual Streams\n///\n/// MPEG-4 Audio streams MUST be formatted LATM (Lowoverhead\n/// MPEG-4 Audio Transport Multiplex)[14496 - 3] streams, and the\n/// LATM-based streams are then mapped onto RTP packets\n\n#include \"rtp-packet.h\"\n#include \"rtp-profile.h\"\n#include \"rtp-payload-internal.h\"\n#include <stdlib.h>\n#include <string.h>\n#include <assert.h>\n#include <errno.h>\n\nstruct rtp_encode_mp4a_latm_t\n{\n\tstruct rtp_packet_t pkt;\n\tstruct rtp_payload_t handler;\n\tvoid* cbparam;\n\tint size;\n};\n\nstatic void* rtp_mp4a_latm_pack_create(int size, uint8_t pt, uint16_t seq, uint32_t ssrc, struct rtp_payload_t *handler, void* cbparam)\n{\n\tstruct rtp_encode_mp4a_latm_t *packer;\n\tpacker = (struct rtp_encode_mp4a_latm_t *)calloc(1, sizeof(*packer));\n\tif (!packer) return NULL;\n\n\tmemcpy(&packer->handler, handler, sizeof(packer->handler));\n\tpacker->cbparam = cbparam;\n\tpacker->size = size;\n\n\tpacker->pkt.rtp.v = RTP_VERSION;\n\tpacker->pkt.rtp.pt = pt;\n\tpacker->pkt.rtp.seq = seq;\n\tpacker->pkt.rtp.ssrc = ssrc;\n\treturn packer;\n}\n\nstatic void rtp_mp4a_latm_pack_destroy(void* pack)\n{\n\tstruct rtp_encode_mp4a_latm_t *packer;\n\tpacker = (struct rtp_encode_mp4a_latm_t *)pack;\n#if defined(_DEBUG) || defined(DEBUG)\n\tmemset(packer, 0xCC, sizeof(*packer));\n#endif\n\tfree(packer);\n}\n\nstatic void rtp_mp4a_latm_pack_get_info(void* pack, uint16_t* seq, uint32_t* timestamp)\n{\n\tstruct rtp_encode_mp4a_latm_t *packer;\n\tpacker = (struct rtp_encode_mp4a_latm_t *)pack;\n\t*seq = (uint16_t)packer->pkt.rtp.seq;\n\t*timestamp = packer->pkt.rtp.timestamp;\n}\n\nstatic int rtp_mp4a_latm_pack_input(void* pack, const void* data, int bytes, uint32_t timestamp)\n{\n\tint n, len;\n\tuint8_t *rtp;\n\tuint8_t hd[400]; // 100KB\n\tconst uint8_t *ptr;\n\tstruct rtp_encode_mp4a_latm_t *packer;\n\tpacker = (struct rtp_encode_mp4a_latm_t *)pack;\n\tassert(packer->pkt.rtp.timestamp != timestamp || !packer->pkt.payload /*first packet*/);\n\tpacker->pkt.rtp.timestamp = timestamp; //(uint32_t)(time * KHz); // ms -> 90KHZ (RFC2250 section2 p2)\n\n\tptr = (const uint8_t *)data;\n\tif (0xFF == ptr[0] && 0xF0 == (ptr[1] & 0xF0) && bytes > 7)\n\t{\n\t\t// skip ADTS header\n\t\tassert(bytes == (((ptr[3] & 0x03) << 11) | (ptr[4] << 3) | ((ptr[5] >> 5) & 0x07)));\n\t\tptr += 7;\n\t\tbytes -= 7;\n\t}\n\n\t// ISO/IEC 14496-3:200X(E)\n\t// Table 1.44 - Syntax of PayloadLengthInfo() (p84)\n\tlen = bytes / 255 + 1;\n\tif (len > sizeof(hd))\n\t{\n\t\tassert(0);\n\t\treturn -E2BIG; // invalid packet\n\t}\n\tmemset(hd, 255, len - 1);\n\thd[len - 1] = bytes % 255;\n\n\tfor (; bytes > 0; ++packer->pkt.rtp.seq)\n\t{\n\t\tpacker->pkt.payload = ptr;\n\t\tpacker->pkt.payloadlen = (bytes + len + RTP_FIXED_HEADER) <= packer->size ? bytes : (packer->size - len - RTP_FIXED_HEADER);\n\t\tptr += packer->pkt.payloadlen;\n\t\tbytes -= packer->pkt.payloadlen;\n\n\t\tn = RTP_FIXED_HEADER + len + packer->pkt.payloadlen;\n\t\trtp = (uint8_t*)packer->handler.alloc(packer->cbparam, n);\n\t\tif (!rtp) return -ENOMEM;\n\n\t\t// Marker (M) bit: The marker bit indicates audioMuxElement boundaries.\n\t\t// It is set to 1 to indicate that the RTP packet contains a complete\n\t\t// audioMuxElement or the last fragment of an audioMuxElement.\n\t\tpacker->pkt.rtp.m = (0 == bytes) ? 1 : 0;\n\t\tn = rtp_packet_serialize_header(&packer->pkt, rtp, n);\n\t\tif (n != RTP_FIXED_HEADER)\n\t\t{\n\t\t\tassert(0);\n\t\t\treturn -1;\n\t\t}\n\n\t\tif (len > 0) memcpy(rtp + n, hd, len);\n\t\tmemcpy(rtp + n + len, packer->pkt.payload, packer->pkt.payloadlen);\n\t\tpacker->handler.packet(packer->cbparam, rtp, n + len + packer->pkt.payloadlen, packer->pkt.rtp.timestamp, 0);\n\t\tpacker->handler.free(packer->cbparam, rtp);\n\t\tlen = 0;\n\t}\n\n\treturn 0;\n}\n\nstruct rtp_payload_encode_t *rtp_mp4a_latm_encode()\n{\n\tstatic struct rtp_payload_encode_t encode = {\n\t\trtp_mp4a_latm_pack_create,\n\t\trtp_mp4a_latm_pack_destroy,\n\t\trtp_mp4a_latm_pack_get_info,\n\t\trtp_mp4a_latm_pack_input,\n\t};\n\n\treturn &encode;\n}\n"} +{"text": "package typings.devtoolsProtocol.mod.Protocol.Runtime\n\nimport typings.devtoolsProtocol.mod.Protocol.integer\nimport scala.scalajs.js\nimport scala.scalajs.js.`|`\nimport scala.scalajs.js.annotation._\n\n@js.native\ntrait SetMaxCallStackSizeToCaptureRequest extends js.Object {\n var size: integer = js.native\n}\n\nobject SetMaxCallStackSizeToCaptureRequest {\n @scala.inline\n def apply(size: integer): SetMaxCallStackSizeToCaptureRequest = {\n val __obj = js.Dynamic.literal(size = size.asInstanceOf[js.Any])\n __obj.asInstanceOf[SetMaxCallStackSizeToCaptureRequest]\n }\n @scala.inline\n implicit class SetMaxCallStackSizeToCaptureRequestOps[Self <: SetMaxCallStackSizeToCaptureRequest] (val x: Self) extends AnyVal {\n @scala.inline\n def duplicate: Self = (js.Dynamic.global.Object.assign(js.Dynamic.literal(), x)).asInstanceOf[Self]\n @scala.inline\n def combineWith[Other <: js.Any](other: Other): Self with Other = (js.Dynamic.global.Object.assign(js.Dynamic.literal(), x, other.asInstanceOf[js.Any])).asInstanceOf[Self with Other]\n @scala.inline\n def set(key: String, value: js.Any): Self = {\n x.asInstanceOf[js.Dynamic].updateDynamic(key)(value)\n x\n }\n @scala.inline\n def setSize(value: integer): Self = this.set(\"size\", value.asInstanceOf[js.Any])\n }\n \n}\n\n"} +{"text": "services:\n _defaults:\n public: true\n PhpGitHooks\\Module\\PhpLint\\Infrastructure\\Tool\\PhpLintToolProcessor:\n\n phplint.tool.processor: '@PhpGitHooks\\Module\\PhpLint\\Infrastructure\\Tool\\PhpLintToolProcessor'\n"} +{"text": "<Project Sdk=\"Microsoft.NET.Sdk\">\r\n\r\n <PropertyGroup>\r\n <TargetFramework>netcoreapp3.1</TargetFramework>\r\n <Platforms>x64;x86</Platforms>\r\n <Version>2.0.0</Version>\r\n <Authors>Marc Jacobi</Authors>\r\n <Company>Jacobi Software</Company>\r\n <Product>VST.NET Samples</Product>\r\n <PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>\r\n <Description>An Effect Plugin that implements a Delay and supports Parameters and Programs.</Description>\r\n </PropertyGroup>\r\n\r\n <ItemGroup>\r\n <PackageReference Include=\"Microsoft.Extensions.DependencyInjection\" Version=\"3.1.5\" />\r\n <PackageReference Include=\"VST.NET2-Plugin\" Version=\"2.0.0-rc2\" />\r\n </ItemGroup>\r\n\r\n</Project>\r\n"} +{"text": "###########################################################\n#\n# Copyright (c) 2005, Southpaw Technology\n# All Rights Reserved\n#\n# PROPRIETARY INFORMATION. This software is proprietary to\n# Southpaw Technology, and is not to be reproduced, transmitted,\n# or disclosed in any way without written permission.\n#\n#\n#\n\n__all__ = ['BaseRenderContext', 'AssetRenderContext', 'ShotRenderContext']\n\nimport os\n\nfrom pyasm.common import *\nfrom pyasm.prod.biz import FrameRange\n\n\n\nclass BaseRenderContext(Base):\n '''The context under which a render take place. This includes all\n of the settings and specific flags for a particular render'''\n\n def __init__(self, policy=None):\n self.sobject = None\n\n self.snapshot = None\n self.snapshot_xml = None\n self.snapshot_sobject = None\n\n self.context = None\n\n self.policy = policy\n\n # by default, just render the first frame\n self.frame_range = FrameRange(1,1,1)\n\n # FIXME: this is maya specific\n self.camera = \"persp\"\n self.layer_names = []\n\n self.override = \"\"\n\n\n # FIXME: not general enough\n self.shot = None\n\n\n def set_policy(self, policy):\n self.policy = policy\n\n def set_override(self, override):\n '''set overrides to render parameters'''\n self.override = override\n\n def get_override(self):\n return self.override\n\n\n # information from policy\n def get_resolution(self):\n return self.policy.get_resolution()\n\n\n def get_layer_names(self):\n return self.layer_names\n\n def add_layer(self, layer_name):\n self.layer_names.append(layer_name)\n\n\n\n def get_input_path(self):\n '''gets the input file to be rendered'''\n snapshot = self.get_snapshot()\n lib_dir = snapshot.get_lib_dir()\n\n # FIXME: big assumption that snapshot type == file_type\n # FIXME: maya files only ????\n filename = snapshot.get_file_name_by_type(\"maya\")\n if not filename:\n filename = snapshot.get_file_name_by_type(\"xsi\")\n\n if not filename:\n filename = snapshot.get_file_name_by_type(\"main\")\n\n if not filename:\n raise TacticException(\"Cannot render snapshot [%s] because file is not supported\" % snapshot.get_code() )\n\n input_path = \"%s/%s\" % (lib_dir,filename)\n return input_path\n\n\n def get_output_prefix(self):\n # FIXME: should get this from naming conventions\n return \"image_test\"\n\n def get_output_ext(self):\n # FIXME: should take this from render policy\n return \"png\"\n\n def get_output_padding(self):\n return 4\n\n def get_output_pattern(self):\n # ie: \"image.jpg.####\"\n return \"%s.%s.####\" % (self.get_output_prefix(), self.get_output_ext() )\n\n\n\n def get_render_dir(self):\n ticket = Environment.get_security().get_ticket_key()\n tmpdir = Environment.get_tmp_dir()\n render_dir = \"%s/temp/%s\" % (tmpdir, ticket)\n\n System().makedirs(render_dir)\n\n return render_dir\n\n\n\n def set_shot(self, shot):\n self.shot = shot\n\n # setting the shot always sets the frames\n self.frame_range = shot.get_frame_range()\n\n\n def get_shot(self):\n return self.shot\n\n\n def set_sobject(self, sobject):\n '''set the sobject that is being rendered'''\n self.sobject = sobject\n\n def get_sobject(self):\n return self.sobject\n\n\n\n def set_camera(self, camera):\n print(\"Overriding camera: \", camera)\n self.camera = camera\n\n def get_camera(self):\n return self.camera\n\n\n\n def set_frame_range(self, frame_range):\n self.frame_range = frame_range\n\n # if the policy sets a frame by, then use it\n frame_by = self.policy.get_value(\"frame_by\")\n if frame_by:\n self.frame_range.set_frame_by(int(frame_by))\n \n\n def set_frame_range_values(self, start, end, by):\n frame_range = FrameRange(start, end, by)\n self.set_frame_range(frame_range)\n \n\n\n def get_frame_range(self):\n return self.frame_range\n\n\n\n def set_snapshot(self, snapshot):\n assert snapshot != None\n self.snapshot = snapshot\n self.snapshot_xml = snapshot.get_value(\"snapshot\")\n #self.sobject = self.snapshot.get_sobject()\n self.snapshot_sobject = self.snapshot.get_sobject()\n\n def set_snapshot_xml(self, snapshot_xml):\n self.snapshot_xml = snapshot_xml\n\n def get_snapshot(self):\n return self.snapshot\n\n\n def get_snapshot_xml(self):\n return self.snapshot_xml\n\n def set_context(self, context):\n self.context = context\n\n def get_context(self):\n return self.context\n\n def set_policy(self, policy):\n self.policy = policy\n\n def get_extra_settings(self):\n # these extra settings are determined by the policy\n return self.policy.get_value(\"extra_settings\")\n\n\n def get_name(self):\n return self.__class__.__name__\n\n\n def get_xml_data(self):\n '''create an XML document which can be stored in the queue for\n for informaiton about this render context.'''\n xml = Xml()\n xml.create_doc(\"data\")\n root = xml.get_root_node()\n\n\n if self.snapshot:\n element = xml.create_text_element(\"search_key\", self.sobject.get_search_key())\n root.appendChild(element)\n element = xml.create_text_element(\"snapshot_code\", self.snapshot.get_code())\n root.appendChild(element)\n\n \n elif self.sobject:\n element = xml.create_text_element(\"search_key\", self.sobject.get_search_key())\n root.appendChild(element)\n \n\n\n # add information about the frames\n element = xml.create_text_element(\"prefix\", self.get_output_prefix() )\n root.appendChild(element)\n element = xml.create_text_element(\"ext\", self.get_output_ext() )\n root.appendChild(element)\n element = xml.create_text_element(\"padding\", str(self.get_output_padding() )) \n root.appendChild(element)\n element = xml.create_text_element(\"file_range\", self.frame_range.get_key() )\n root.appendChild(element)\n element = xml.create_text_element(\"pattern\", self.get_output_pattern() )\n root.appendChild(element)\n\n\n\n # add layer information\n for layer_name in self.layer_names:\n element = xml.create_text_element(\"layer_name\", layer_name )\n root.appendChild(element)\n\n return xml.to_string()\n\n \n\n\n\n\n\n\n\n\nclass AssetRenderContext(BaseRenderContext):\n '''Convenience class to render assets thumbnails'''\n\n def __init__(self, sobject):\n super(AssetRenderContext,self).__init__()\n self.set_sobject(sobject)\n self.set_context(\"publish\")\n\n # check if there is an associate render_stage sobject.\n search = Search(\"prod/render_stage\")\n search.add_sobject_filter(sobject)\n search.add_filter(\"context\", self.context)\n render_stage = search.get_sobject()\n\n if render_stage != None:\n snapshot = Snapshot.get_latest_by_sobject(render_stage, self.context)\n else:\n loader_context = ProdLoaderContext()\n snapshot = loader_context.get_snapshot_by_sobject( \\\n sobject, self.context)\n\n self.set_snapshot(snapshot)\n\n\n if snapshot == None:\n raise RenderException(\"snapshot for [%s] [%s] does not exist\" % \\\n (sobject.get_search_type(), sobject.get_id() ))\n\n\n # TODO: should look for cameras and render all of them\n snapshot_xml = snapshot.get_snapshot_xml()\n instances = snapshot_xml.get_values(\"snapshot/ref/@instance\")\n \n for instance in instances:\n if instance.startswith(\"camera\"):\n # HACK\n #self.camera = instance\n self.camera = \"%s:%s\" % (instance, \"camera100\")\n\n camera = self.camera\n\n\n # set up the asset with a camera\n if camera == \"persp\":\n self.set_snapshot_xml('''\n <snapshot>\n <ref snapshot_code='%s'/>\n <mel>\n select -clear\n xform -ro -25 -45 0 %s\n viewFit %s\n setAttr %s.preScale 1.5\n </mel>\n </snapshot>\n ''' % (snapshot.get_code(), camera, camera, camera)\n )\n else:\n self.set_snapshot_xml('''\n <snapshot>\n <ref snapshot_code='%s'/>\n </snapshot>\n ''' % (snapshot.get_code())\n )\n\n\n # extra commands to add a light set\n #<ref search_type='prod/asset?prod=prod2' search_id='36' version='-1' context='publish'/>\n #viewFit -f 10 %s\n\n\n\n\n\nclass ShotRenderContext(BaseRenderContext):\n pass\n\n\n\n\n"} +{"text": "/*==================================================\n * Localization of labellers.js\n *==================================================\n */\n\nTimeline.GregorianDateLabeller.monthNames[\"fr\"] = [\n \"jan\", \"fev\", \"mar\", \"avr\", \"mai\", \"jui\", \"jui\", \"aou\", \"sep\", \"oct\", \"nov\", \"dec\"\n];\n"} +{"text": "package com.youtubedl.data.local.room.entity\n\nimport android.arch.persistence.room.ColumnInfo\nimport android.arch.persistence.room.Entity\nimport android.arch.persistence.room.PrimaryKey\nimport com.google.gson.annotations.Expose\nimport com.google.gson.annotations.SerializedName\nimport java.util.*\n\n/**\n * Created by cuongpm on 12/16/18.\n */\n\n@Entity(tableName = \"VideoInfo\")\ndata class VideoInfo constructor(\n @PrimaryKey\n @ColumnInfo(name = \"id\")\n var id: String = UUID.randomUUID().toString(),\n\n @ColumnInfo(name = \"downloadUrl\")\n @SerializedName(\"url\")\n @Expose\n var downloadUrl: String = \"\",\n\n @ColumnInfo(name = \"title\")\n @SerializedName(\"title\")\n @Expose\n var title: String = \"\",\n\n @ColumnInfo(name = \"ext\")\n @SerializedName(\"ext\")\n @Expose\n var ext: String = \"\",\n\n @ColumnInfo(name = \"thumbnail\")\n @SerializedName(\"thumbnail\")\n @Expose\n var thumbnail: String = \"\",\n\n @ColumnInfo(name = \"duration\")\n @SerializedName(\"duration\")\n @Expose\n var duration: Int = 0,\n\n @ColumnInfo(name = \"originalUrl\")\n var originalUrl: String = \"\"\n) {\n\n val name\n get() = \"$title.$ext\"\n}"} +{"text": "//\n// AddChatViewController.m\n// TUIKitDemo\n//\n// Created by xiang zhang on 2019/1/22.\n// Copyright © 2019 lynxzhang. All rights reserved.\n//\n\n#import \"AddChatViewController.h\"\n#import \"ChatViewController.h\"\n#import \"ImSDK.h\"\n\n@interface AddChatViewController ()\n\n@end\n\n@implementation AddChatViewController\n\n- (void)viewDidLoad {\n [super viewDidLoad];\n // Do view setup here.\n}\n- (IBAction)closeVC:(NSButton *)sender {\n [self dismissViewController:self];\n}\n\n- (IBAction)addGroup:(id)sender {\n if(_userId.stringValue.length == 0){\n return;\n }\n\n NSString *groupName = [NSString stringWithFormat:@\"%@、%@\", [[TIMManager sharedInstance] getLoginUser], _userId.stringValue];\n NSMutableArray *members = [NSMutableArray array];\n TIMCreateGroupMemberInfo *member = [[TIMCreateGroupMemberInfo alloc] init];\n member.member = _userId.stringValue;\n member.role = TIM_GROUP_MEMBER_ROLE_MEMBER;\n [members addObject:member];\n \n TIMCreateGroupInfo *info = [[TIMCreateGroupInfo alloc] init];\n info.groupName = groupName;\n info.groupType = @\"Private\";\n info.setAddOpt = false;\n info.membersInfo = members;\n \n __weak typeof(self) ws = self;\n [[TIMGroupManager sharedInstance] createGroup:info succ:^(NSString *groupId) {\n TIMMessage *tip = [[TIMMessage alloc] init];\n TIMCustomElem *custom = [[TIMCustomElem alloc] init];\n custom.data = [@\"group_create\" dataUsingEncoding:NSUTF8StringEncoding];\n custom.ext = [NSString stringWithFormat:@\"\\\"%@\\\"创建群组\", [[TIMManager sharedInstance] getLoginUser]];\n [tip addElem:custom];\n TIMConversation *conv = [[TIMManager sharedInstance] getConversation:TIM_GROUP receiver:groupId];\n [conv sendMessage:tip succ:nil fail:nil];\n \n dispatch_async(dispatch_get_main_queue(), ^{\n ChatViewController *vc = [[ChatViewController alloc] initWithNibName:@\"ChatViewController\" bundle:nil];\n TConversationCellData *conversation = [[TConversationCellData alloc] init];\n conversation.convType = TConv_Type_Group;\n conversation.convId = groupId;\n conversation.title = groupName;\n vc.conversation = conversation;\n [ws presentViewControllerAsModalWindow:vc];\n \n });\n } fail:^(int code, NSString *msg) {\n NSLog(@\"\");\n }];\n}\n\n- (IBAction)addC2C:(id)sender {\n ChatViewController *vc = [[ChatViewController alloc] initWithNibName:@\"ChatViewController\" bundle:nil];\n TConversationCellData *conversation = [[TConversationCellData alloc] init];\n conversation.convType = TConv_Type_C2C;\n conversation.convId = _userId.stringValue;\n conversation.title = _userId.stringValue;\n vc.conversation = conversation;\n [self presentViewControllerAsModalWindow:vc];\n}\n\n@end\n"} +{"text": "<?php defined('BX_DOL') or die('hack attempt');\n/**\n * Copyright (c) UNA, Inc - https://una.io\n * MIT License - https://opensource.org/licenses/MIT\n *\n * @defgroup Timeline Timeline\n * @ingroup UnaModules\n *\n * @{\n */\n\nclass BxTimelineCronHot extends BxDolCron\n{\n\tprotected $_sModule;\n\tprotected $_oModule;\n\n\tpublic function __construct()\n {\n \t$this->_sModule = 'bx_timeline';\n \t$this->_oModule = BxDolModule::getInstance($this->_sModule);\n\n parent::__construct();\n }\n\n function processing()\n {\n if(!$this->_oModule->_oConfig->isHot())\n return;\n\n $this->_oModule->_oDb->clearHot();\n\n $this->_prepareTrackByDates();\n }\n\n protected function _prepareTrackByDates()\n {\n $iInterval = $this->_oModule->_oConfig->getHotInterval();\n $sCommon = $this->_oModule->_oConfig->getPrefix('common_post') . 'post';\n\n $aSystemsComments = BxDolCmts::getSystems();\n $aSystemsVotes = BxDolVote::getSystems();\n $aModules = BxDolModuleQuery::getInstance()->getModulesBy(array('type' => 'modules', 'active' => 1));\n\n $aModulesActive = array();\n foreach($aModules as $aModule)\n $aModulesActive[] = $aModule['name'];\n\n $aTracksByDate = $this->_oModule->_oDb->getHotTrackByDate($iInterval);\n $aTracksByDateComments = array();\n $aTracksByDateVotes = array();\n\n $aHandlers = $this->_oModule->_oConfig->getHandlers();\n $aHandlersHidden = $this->_oModule->_oConfig->getHandlersHidden();\n foreach($aHandlers as $sKey => $aHandler) {\n if($aHandler['type'] != BX_BASE_MOD_NTFS_HANDLER_TYPE_INSERT || in_array($aHandler['id'], $aHandlersHidden))\n continue;\n\n $bCommon = $aHandler['alert_unit'] == $sCommon;\n if(!$bCommon && !in_array($aHandler['alert_unit'], $aModulesActive))\n continue; \n\n if(!$bCommon) {\n $sModule = $aHandler['alert_unit'];\n $oModule = BxDolModule::getInstance($sModule);\n if(!$oModule)\n continue;\n\n if(!empty($oModule->_oConfig->CNF['OBJECT_COMMENTS'])) {\n $sSystem = $oModule->_oConfig->CNF['OBJECT_COMMENTS'];\n if(isset($aSystemsComments[$sSystem]) && (int)$aSystemsComments[$sSystem]['is_on'] == 1)\n $aTracksByDateComments += $this->_oModule->_oDb->getHotTrackByCommentsDateModule($sModule, $aSystemsComments[$sSystem]['table'], $iInterval);\n }\n\n if(!empty($oModule->_oConfig->CNF['OBJECT_VOTES'])) {\n $sSystem = $oModule->_oConfig->CNF['OBJECT_VOTES'];\n if(isset($aSystemsVotes[$sSystem]) && (int)$aSystemsVotes[$sSystem]['is_on'] == 1)\n $aTracksByDateVotes += $this->_oModule->_oDb->getHotTrackByVotesDateModule($sModule, $aSystemsVotes[$sSystem]['table_track'], $iInterval);\n }\n }\n else {\n $sSystem = $this->_oModule->_oConfig->getObject('comment');\n if(isset($aSystemsComments[$sSystem]) && (int)$aSystemsComments[$sSystem]['is_on'] == 1)\n $aTracksByDateComments += $this->_oModule->_oDb->getHotTrackByCommentsDate($sCommon, $aSystemsComments[$sSystem]['table'], $iInterval);\n\n $sSystem = $this->_oModule->_oConfig->getObject('vote');\n if(isset($aSystemsVotes[$sSystem]) && (int)$aSystemsVotes[$sSystem]['is_on'] == 1)\n $aTracksByDateVotes += $this->_oModule->_oDb->getHotTrackByVotesDate($sCommon, $aSystemsVotes[$sSystem]['table_track'], $iInterval);\n }\n }\n\n $aTracks = array();\n $aTracks = $this->_combineArrays($aTracks, $aTracksByDate);\n $aTracks = $this->_combineArrays($aTracks, $aTracksByDateComments);\n $aTracks = $this->_combineArrays($aTracks, $aTracksByDateVotes);\n\n foreach($aTracks as $iId => $iDate)\n $this->_oModule->_oDb->updateHotTrack(array('event_id' => $iId, 'value' => $iDate));\n }\n\n protected function _prepareTrackByVotesSum()\n {\n $iInterval = $this->_oModule->_oConfig->getHotInterval();\n $sCommon = $this->_oModule->_oConfig->getPrefix('common_post') . 'post';\n\n $aSystems = BxDolVote::getSystems();\n $aModules = BxDolModuleQuery::getInstance()->getModulesBy(array('type' => 'modules', 'active' => 1));\n \n $aModulesActive = array();\n foreach($aModules as $aModule)\n $aModulesActive[] = $aModule['name'];\n\n $aHandlers = $this->_oModule->_oConfig->getHandlers();\n $aHandlersHidden = $this->_oModule->_oConfig->getHandlersHidden();\n foreach($aHandlers as $sKey => $aHandler) {\n if($aHandler['type'] != BX_BASE_MOD_NTFS_HANDLER_TYPE_INSERT || in_array($aHandler['id'], $aHandlersHidden))\n continue;\n\n $bCommon = $aHandler['alert_unit'] == $sCommon;\n if(!$bCommon && !in_array($aHandler['alert_unit'], $aModulesActive))\n continue;\n\n if(!$bCommon) {\n $oModule = BxDolModule::getInstance($aHandler['alert_unit']);\n if(empty($oModule->_oConfig->CNF['OBJECT_VOTES']))\n continue;\n\n $sMethod = 'getHotTrackByVotesSumModule';\n $sModule = $oModule->getName();\n $sSystem = $oModule->_oConfig->CNF['OBJECT_VOTES'];\n }\n else {\n $sMethod = 'getHotTrackByVotesSum';\n $sModule = $sCommon;\n $sSystem = $this->_oModule->_oConfig->getObject('vote');\n }\n\n if(!isset($aSystems[$sSystem]) || (int)$aSystems[$sSystem]['is_on'] != 1)\n continue;\n\n $aTracks = $this->_oModule->_oDb->$sMethod($sModule, $aSystems[$sSystem]['table_track'], $iInterval);\n if(empty($aTracks) || !is_array($aTracks))\n continue;\n\n foreach($aTracks as $aTrack)\n $this->_oModule->_oDb->updateHotTrack($aTrack);\n }\n }\n\n protected function _combineArrays($a1, $a2)\n {\n foreach($a2 as $iId => $iDate) {\n if(!isset($a1[$iId])) {\n $a1[$iId] = $iDate;\n continue;\n }\n\n if((int)$iDate > (int)$a1[$iId])\n $a1[$iId] = $iDate;\n }\n\n return $a1;\n }\n}\n\n/** @} */\n"} +{"text": "##\n# This file is part of WhatWeb and may be subject to\n# redistribution and commercial restrictions. Please see the WhatWeb\n# web site for more information on licensing and terms of use.\n# http://www.morningstarsecurity.com/research/whatweb\n##\n\nPlugin.define \"MeiTrack\" do\nauthor \"Andrew Horton\"\nversion \"0.1\"\ndescription \"MS02 GPS Tracking System from MeiTrack. Provides a web server to manage tracking of vehicles, chidren, pets, etc. The devices have plenty of features including eavesdropping, control by SMS, RFID, GPRS, panic alarms, etc\"\nwebsite \"http://www.meitrack.net\"\n\n\n\n# Matches #\nmatches [\n\n# JavaScript\n{:text=>'var _TrackerMain_GTVTSeries = \"GT Series\\\\\\\\VT Series\";'},\n\n# Form HTML\n{ :text=>'<form name=\"form1\" method=\"post\" action=\"trackerlogin.aspx\" id=\"form1\">' },\n\n]\n\nend\n\n"} +{"text": "# safe-buffer [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]\n\n[travis-image]: https://img.shields.io/travis/feross/safe-buffer/master.svg\n[travis-url]: https://travis-ci.org/feross/safe-buffer\n[npm-image]: https://img.shields.io/npm/v/safe-buffer.svg\n[npm-url]: https://npmjs.org/package/safe-buffer\n[downloads-image]: https://img.shields.io/npm/dm/safe-buffer.svg\n[downloads-url]: https://npmjs.org/package/safe-buffer\n[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg\n[standard-url]: https://standardjs.com\n\n#### Safer Node.js Buffer API\n\n**Use the new Node.js Buffer APIs (`Buffer.from`, `Buffer.alloc`,\n`Buffer.allocUnsafe`, `Buffer.allocUnsafeSlow`) in all versions of Node.js.**\n\n**Uses the built-in implementation when available.**\n\n## install\n\n```\nnpm install safe-buffer\n```\n\n## usage\n\nThe goal of this package is to provide a safe replacement for the node.js `Buffer`.\n\nIt's a drop-in replacement for `Buffer`. You can use it by adding one `require` line to\nthe top of your node.js modules:\n\n```js\nvar Buffer = require('safe-buffer').Buffer\n\n// Existing buffer code will continue to work without issues:\n\nnew Buffer('hey', 'utf8')\nnew Buffer([1, 2, 3], 'utf8')\nnew Buffer(obj)\nnew Buffer(16) // create an uninitialized buffer (potentially unsafe)\n\n// But you can use these new explicit APIs to make clear what you want:\n\nBuffer.from('hey', 'utf8') // convert from many types to a Buffer\nBuffer.alloc(16) // create a zero-filled buffer (safe)\nBuffer.allocUnsafe(16) // create an uninitialized buffer (potentially unsafe)\n```\n\n## api\n\n### Class Method: Buffer.from(array)\n<!-- YAML\nadded: v3.0.0\n-->\n\n* `array` {Array}\n\nAllocates a new `Buffer` using an `array` of octets.\n\n```js\nconst buf = Buffer.from([0x62,0x75,0x66,0x66,0x65,0x72]);\n // creates a new Buffer containing ASCII bytes\n // ['b','u','f','f','e','r']\n```\n\nA `TypeError` will be thrown if `array` is not an `Array`.\n\n### Class Method: Buffer.from(arrayBuffer[, byteOffset[, length]])\n<!-- YAML\nadded: v5.10.0\n-->\n\n* `arrayBuffer` {ArrayBuffer} The `.buffer` property of a `TypedArray` or\n a `new ArrayBuffer()`\n* `byteOffset` {Number} Default: `0`\n* `length` {Number} Default: `arrayBuffer.length - byteOffset`\n\nWhen passed a reference to the `.buffer` property of a `TypedArray` instance,\nthe newly created `Buffer` will share the same allocated memory as the\nTypedArray.\n\n```js\nconst arr = new Uint16Array(2);\narr[0] = 5000;\narr[1] = 4000;\n\nconst buf = Buffer.from(arr.buffer); // shares the memory with arr;\n\nconsole.log(buf);\n // Prints: <Buffer 88 13 a0 0f>\n\n// changing the TypedArray changes the Buffer also\narr[1] = 6000;\n\nconsole.log(buf);\n // Prints: <Buffer 88 13 70 17>\n```\n\nThe optional `byteOffset` and `length` arguments specify a memory range within\nthe `arrayBuffer` that will be shared by the `Buffer`.\n\n```js\nconst ab = new ArrayBuffer(10);\nconst buf = Buffer.from(ab, 0, 2);\nconsole.log(buf.length);\n // Prints: 2\n```\n\nA `TypeError` will be thrown if `arrayBuffer` is not an `ArrayBuffer`.\n\n### Class Method: Buffer.from(buffer)\n<!-- YAML\nadded: v3.0.0\n-->\n\n* `buffer` {Buffer}\n\nCopies the passed `buffer` data onto a new `Buffer` instance.\n\n```js\nconst buf1 = Buffer.from('buffer');\nconst buf2 = Buffer.from(buf1);\n\nbuf1[0] = 0x61;\nconsole.log(buf1.toString());\n // 'auffer'\nconsole.log(buf2.toString());\n // 'buffer' (copy is not changed)\n```\n\nA `TypeError` will be thrown if `buffer` is not a `Buffer`.\n\n### Class Method: Buffer.from(str[, encoding])\n<!-- YAML\nadded: v5.10.0\n-->\n\n* `str` {String} String to encode.\n* `encoding` {String} Encoding to use, Default: `'utf8'`\n\nCreates a new `Buffer` containing the given JavaScript string `str`. If\nprovided, the `encoding` parameter identifies the character encoding.\nIf not provided, `encoding` defaults to `'utf8'`.\n\n```js\nconst buf1 = Buffer.from('this is a tést');\nconsole.log(buf1.toString());\n // prints: this is a tést\nconsole.log(buf1.toString('ascii'));\n // prints: this is a tC)st\n\nconst buf2 = Buffer.from('7468697320697320612074c3a97374', 'hex');\nconsole.log(buf2.toString());\n // prints: this is a tést\n```\n\nA `TypeError` will be thrown if `str` is not a string.\n\n### Class Method: Buffer.alloc(size[, fill[, encoding]])\n<!-- YAML\nadded: v5.10.0\n-->\n\n* `size` {Number}\n* `fill` {Value} Default: `undefined`\n* `encoding` {String} Default: `utf8`\n\nAllocates a new `Buffer` of `size` bytes. If `fill` is `undefined`, the\n`Buffer` will be *zero-filled*.\n\n```js\nconst buf = Buffer.alloc(5);\nconsole.log(buf);\n // <Buffer 00 00 00 00 00>\n```\n\nThe `size` must be less than or equal to the value of\n`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is\n`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will\nbe created if a `size` less than or equal to 0 is specified.\n\nIf `fill` is specified, the allocated `Buffer` will be initialized by calling\n`buf.fill(fill)`. See [`buf.fill()`][] for more information.\n\n```js\nconst buf = Buffer.alloc(5, 'a');\nconsole.log(buf);\n // <Buffer 61 61 61 61 61>\n```\n\nIf both `fill` and `encoding` are specified, the allocated `Buffer` will be\ninitialized by calling `buf.fill(fill, encoding)`. For example:\n\n```js\nconst buf = Buffer.alloc(11, 'aGVsbG8gd29ybGQ=', 'base64');\nconsole.log(buf);\n // <Buffer 68 65 6c 6c 6f 20 77 6f 72 6c 64>\n```\n\nCalling `Buffer.alloc(size)` can be significantly slower than the alternative\n`Buffer.allocUnsafe(size)` but ensures that the newly created `Buffer` instance\ncontents will *never contain sensitive data*.\n\nA `TypeError` will be thrown if `size` is not a number.\n\n### Class Method: Buffer.allocUnsafe(size)\n<!-- YAML\nadded: v5.10.0\n-->\n\n* `size` {Number}\n\nAllocates a new *non-zero-filled* `Buffer` of `size` bytes. The `size` must\nbe less than or equal to the value of `require('buffer').kMaxLength` (on 64-bit\narchitectures, `kMaxLength` is `(2^31)-1`). Otherwise, a [`RangeError`][] is\nthrown. A zero-length Buffer will be created if a `size` less than or equal to\n0 is specified.\n\nThe underlying memory for `Buffer` instances created in this way is *not\ninitialized*. The contents of the newly created `Buffer` are unknown and\n*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such\n`Buffer` instances to zeroes.\n\n```js\nconst buf = Buffer.allocUnsafe(5);\nconsole.log(buf);\n // <Buffer 78 e0 82 02 01>\n // (octets will be different, every time)\nbuf.fill(0);\nconsole.log(buf);\n // <Buffer 00 00 00 00 00>\n```\n\nA `TypeError` will be thrown if `size` is not a number.\n\nNote that the `Buffer` module pre-allocates an internal `Buffer` instance of\nsize `Buffer.poolSize` that is used as a pool for the fast allocation of new\n`Buffer` instances created using `Buffer.allocUnsafe(size)` (and the deprecated\n`new Buffer(size)` constructor) only when `size` is less than or equal to\n`Buffer.poolSize >> 1` (floor of `Buffer.poolSize` divided by two). The default\nvalue of `Buffer.poolSize` is `8192` but can be modified.\n\nUse of this pre-allocated internal memory pool is a key difference between\ncalling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`.\nSpecifically, `Buffer.alloc(size, fill)` will *never* use the internal Buffer\npool, while `Buffer.allocUnsafe(size).fill(fill)` *will* use the internal\nBuffer pool if `size` is less than or equal to half `Buffer.poolSize`. The\ndifference is subtle but can be important when an application requires the\nadditional performance that `Buffer.allocUnsafe(size)` provides.\n\n### Class Method: Buffer.allocUnsafeSlow(size)\n<!-- YAML\nadded: v5.10.0\n-->\n\n* `size` {Number}\n\nAllocates a new *non-zero-filled* and non-pooled `Buffer` of `size` bytes. The\n`size` must be less than or equal to the value of\n`require('buffer').kMaxLength` (on 64-bit architectures, `kMaxLength` is\n`(2^31)-1`). Otherwise, a [`RangeError`][] is thrown. A zero-length Buffer will\nbe created if a `size` less than or equal to 0 is specified.\n\nThe underlying memory for `Buffer` instances created in this way is *not\ninitialized*. The contents of the newly created `Buffer` are unknown and\n*may contain sensitive data*. Use [`buf.fill(0)`][] to initialize such\n`Buffer` instances to zeroes.\n\nWhen using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,\nallocations under 4KB are, by default, sliced from a single pre-allocated\n`Buffer`. This allows applications to avoid the garbage collection overhead of\ncreating many individually allocated Buffers. This approach improves both\nperformance and memory usage by eliminating the need to track and cleanup as\nmany `Persistent` objects.\n\nHowever, in the case where a developer may need to retain a small chunk of\nmemory from a pool for an indeterminate amount of time, it may be appropriate\nto create an un-pooled Buffer instance using `Buffer.allocUnsafeSlow()` then\ncopy out the relevant bits.\n\n```js\n// need to keep around a few small chunks of memory\nconst store = [];\n\nsocket.on('readable', () => {\n const data = socket.read();\n // allocate for retained data\n const sb = Buffer.allocUnsafeSlow(10);\n // copy the data into the new allocation\n data.copy(sb, 0, 0, 10);\n store.push(sb);\n});\n```\n\nUse of `Buffer.allocUnsafeSlow()` should be used only as a last resort *after*\na developer has observed undue memory retention in their applications.\n\nA `TypeError` will be thrown if `size` is not a number.\n\n### All the Rest\n\nThe rest of the `Buffer` API is exactly the same as in node.js.\n[See the docs](https://nodejs.org/api/buffer.html).\n\n\n## Related links\n\n- [Node.js issue: Buffer(number) is unsafe](https://github.com/nodejs/node/issues/4660)\n- [Node.js Enhancement Proposal: Buffer.from/Buffer.alloc/Buffer.zalloc/Buffer() soft-deprecate](https://github.com/nodejs/node-eps/pull/4)\n\n## Why is `Buffer` unsafe?\n\nToday, the node.js `Buffer` constructor is overloaded to handle many different argument\ntypes like `String`, `Array`, `Object`, `TypedArrayView` (`Uint8Array`, etc.),\n`ArrayBuffer`, and also `Number`.\n\nThe API is optimized for convenience: you can throw any type at it, and it will try to do\nwhat you want.\n\nBecause the Buffer constructor is so powerful, you often see code like this:\n\n```js\n// Convert UTF-8 strings to hex\nfunction toHex (str) {\n return new Buffer(str).toString('hex')\n}\n```\n\n***But what happens if `toHex` is called with a `Number` argument?***\n\n### Remote Memory Disclosure\n\nIf an attacker can make your program call the `Buffer` constructor with a `Number`\nargument, then they can make it allocate uninitialized memory from the node.js process.\nThis could potentially disclose TLS private keys, user data, or database passwords.\n\nWhen the `Buffer` constructor is passed a `Number` argument, it returns an\n**UNINITIALIZED** block of memory of the specified `size`. When you create a `Buffer` like\nthis, you **MUST** overwrite the contents before returning it to the user.\n\nFrom the [node.js docs](https://nodejs.org/api/buffer.html#buffer_new_buffer_size):\n\n> `new Buffer(size)`\n>\n> - `size` Number\n>\n> The underlying memory for `Buffer` instances created in this way is not initialized.\n> **The contents of a newly created `Buffer` are unknown and could contain sensitive\n> data.** Use `buf.fill(0)` to initialize a Buffer to zeroes.\n\n(Emphasis our own.)\n\nWhenever the programmer intended to create an uninitialized `Buffer` you often see code\nlike this:\n\n```js\nvar buf = new Buffer(16)\n\n// Immediately overwrite the uninitialized buffer with data from another buffer\nfor (var i = 0; i < buf.length; i++) {\n buf[i] = otherBuf[i]\n}\n```\n\n\n### Would this ever be a problem in real code?\n\nYes. It's surprisingly common to forget to check the type of your variables in a\ndynamically-typed language like JavaScript.\n\nUsually the consequences of assuming the wrong type is that your program crashes with an\nuncaught exception. But the failure mode for forgetting to check the type of arguments to\nthe `Buffer` constructor is more catastrophic.\n\nHere's an example of a vulnerable service that takes a JSON payload and converts it to\nhex:\n\n```js\n// Take a JSON payload {str: \"some string\"} and convert it to hex\nvar server = http.createServer(function (req, res) {\n var data = ''\n req.setEncoding('utf8')\n req.on('data', function (chunk) {\n data += chunk\n })\n req.on('end', function () {\n var body = JSON.parse(data)\n res.end(new Buffer(body.str).toString('hex'))\n })\n})\n\nserver.listen(8080)\n```\n\nIn this example, an http client just has to send:\n\n```json\n{\n \"str\": 1000\n}\n```\n\nand it will get back 1,000 bytes of uninitialized memory from the server.\n\nThis is a very serious bug. It's similar in severity to the\n[the Heartbleed bug](http://heartbleed.com/) that allowed disclosure of OpenSSL process\nmemory by remote attackers.\n\n\n### Which real-world packages were vulnerable?\n\n#### [`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht)\n\n[Mathias Buus](https://github.com/mafintosh) and I\n([Feross Aboukhadijeh](http://feross.org/)) found this issue in one of our own packages,\n[`bittorrent-dht`](https://www.npmjs.com/package/bittorrent-dht). The bug would allow\nanyone on the internet to send a series of messages to a user of `bittorrent-dht` and get\nthem to reveal 20 bytes at a time of uninitialized memory from the node.js process.\n\nHere's\n[the commit](https://github.com/feross/bittorrent-dht/commit/6c7da04025d5633699800a99ec3fbadf70ad35b8)\nthat fixed it. We released a new fixed version, created a\n[Node Security Project disclosure](https://nodesecurity.io/advisories/68), and deprecated all\nvulnerable versions on npm so users will get a warning to upgrade to a newer version.\n\n#### [`ws`](https://www.npmjs.com/package/ws)\n\nThat got us wondering if there were other vulnerable packages. Sure enough, within a short\nperiod of time, we found the same issue in [`ws`](https://www.npmjs.com/package/ws), the\nmost popular WebSocket implementation in node.js.\n\nIf certain APIs were called with `Number` parameters instead of `String` or `Buffer` as\nexpected, then uninitialized server memory would be disclosed to the remote peer.\n\nThese were the vulnerable methods:\n\n```js\nsocket.send(number)\nsocket.ping(number)\nsocket.pong(number)\n```\n\nHere's a vulnerable socket server with some echo functionality:\n\n```js\nserver.on('connection', function (socket) {\n socket.on('message', function (message) {\n message = JSON.parse(message)\n if (message.type === 'echo') {\n socket.send(message.data) // send back the user's message\n }\n })\n})\n```\n\n`socket.send(number)` called on the server, will disclose server memory.\n\nHere's [the release](https://github.com/websockets/ws/releases/tag/1.0.1) where the issue\nwas fixed, with a more detailed explanation. Props to\n[Arnout Kazemier](https://github.com/3rd-Eden) for the quick fix. Here's the\n[Node Security Project disclosure](https://nodesecurity.io/advisories/67).\n\n\n### What's the solution?\n\nIt's important that node.js offers a fast way to get memory otherwise performance-critical\napplications would needlessly get a lot slower.\n\nBut we need a better way to *signal our intent* as programmers. **When we want\nuninitialized memory, we should request it explicitly.**\n\nSensitive functionality should not be packed into a developer-friendly API that loosely\naccepts many different types. This type of API encourages the lazy practice of passing\nvariables in without checking the type very carefully.\n\n#### A new API: `Buffer.allocUnsafe(number)`\n\nThe functionality of creating buffers with uninitialized memory should be part of another\nAPI. We propose `Buffer.allocUnsafe(number)`. This way, it's not part of an API that\nfrequently gets user input of all sorts of different types passed into it.\n\n```js\nvar buf = Buffer.allocUnsafe(16) // careful, uninitialized memory!\n\n// Immediately overwrite the uninitialized buffer with data from another buffer\nfor (var i = 0; i < buf.length; i++) {\n buf[i] = otherBuf[i]\n}\n```\n\n\n### How do we fix node.js core?\n\nWe sent [a PR to node.js core](https://github.com/nodejs/node/pull/4514) (merged as\n`semver-major`) which defends against one case:\n\n```js\nvar str = 16\nnew Buffer(str, 'utf8')\n```\n\nIn this situation, it's implied that the programmer intended the first argument to be a\nstring, since they passed an encoding as a second argument. Today, node.js will allocate\nuninitialized memory in the case of `new Buffer(number, encoding)`, which is probably not\nwhat the programmer intended.\n\nBut this is only a partial solution, since if the programmer does `new Buffer(variable)`\n(without an `encoding` parameter) there's no way to know what they intended. If `variable`\nis sometimes a number, then uninitialized memory will sometimes be returned.\n\n### What's the real long-term fix?\n\nWe could deprecate and remove `new Buffer(number)` and use `Buffer.allocUnsafe(number)` when\nwe need uninitialized memory. But that would break 1000s of packages.\n\n~~We believe the best solution is to:~~\n\n~~1. Change `new Buffer(number)` to return safe, zeroed-out memory~~\n\n~~2. Create a new API for creating uninitialized Buffers. We propose: `Buffer.allocUnsafe(number)`~~\n\n#### Update\n\nWe now support adding three new APIs:\n\n- `Buffer.from(value)` - convert from any type to a buffer\n- `Buffer.alloc(size)` - create a zero-filled buffer\n- `Buffer.allocUnsafe(size)` - create an uninitialized buffer with given size\n\nThis solves the core problem that affected `ws` and `bittorrent-dht` which is\n`Buffer(variable)` getting tricked into taking a number argument.\n\nThis way, existing code continues working and the impact on the npm ecosystem will be\nminimal. Over time, npm maintainers can migrate performance-critical code to use\n`Buffer.allocUnsafe(number)` instead of `new Buffer(number)`.\n\n\n### Conclusion\n\nWe think there's a serious design issue with the `Buffer` API as it exists today. It\npromotes insecure software by putting high-risk functionality into a convenient API\nwith friendly \"developer ergonomics\".\n\nThis wasn't merely a theoretical exercise because we found the issue in some of the\nmost popular npm packages.\n\nFortunately, there's an easy fix that can be applied today. Use `safe-buffer` in place of\n`buffer`.\n\n```js\nvar Buffer = require('safe-buffer').Buffer\n```\n\nEventually, we hope that node.js core can switch to this new, safer behavior. We believe\nthe impact on the ecosystem would be minimal since it's not a breaking change.\nWell-maintained, popular packages would be updated to use `Buffer.alloc` quickly, while\nolder, insecure packages would magically become safe from this attack vector.\n\n\n## links\n\n- [Node.js PR: buffer: throw if both length and enc are passed](https://github.com/nodejs/node/pull/4514)\n- [Node Security Project disclosure for `ws`](https://nodesecurity.io/advisories/67)\n- [Node Security Project disclosure for`bittorrent-dht`](https://nodesecurity.io/advisories/68)\n\n\n## credit\n\nThe original issues in `bittorrent-dht`\n([disclosure](https://nodesecurity.io/advisories/68)) and\n`ws` ([disclosure](https://nodesecurity.io/advisories/67)) were discovered by\n[Mathias Buus](https://github.com/mafintosh) and\n[Feross Aboukhadijeh](http://feross.org/).\n\nThanks to [Adam Baldwin](https://github.com/evilpacket) for helping disclose these issues\nand for his work running the [Node Security Project](https://nodesecurity.io/).\n\nThanks to [John Hiesey](https://github.com/jhiesey) for proofreading this README and\nauditing the code.\n\n\n## license\n\nMIT. Copyright (C) [Feross Aboukhadijeh](http://feross.org)\n"} +{"text": "// This file is automatically generated. Do not edit.\n// ['../../libs/compatibility/generate_cpp_c_headers.py']\n// Wed Jul 23 12:11:19 2003 ('GMTST', 'GMTST')\n\n#ifndef __CSTDDEF_HEADER\n#define __CSTDDEF_HEADER\n\n#include <stddef.h>\n\nnamespace std {\n using ::ptrdiff_t;\n using ::size_t;\n}\n\n#endif // CSTDDEF_HEADER\n"} +{"text": "if TARGET_SBC8641D\n\nconfig SYS_BOARD\n\tdefault \"sbc8641d\"\n\nconfig SYS_CONFIG_NAME\n\tdefault \"sbc8641d\"\n\nendif\n"} +{"text": "/*\n * Copyright (c) 2017 Trail of Bits, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nnamespace {\n\nDEF_SEM(DoNOP) {\n return memory;\n}\n\n} // namespace\n\nDEF_ISEL(NOP) = DoNOP;\nDEF_ISEL(HINT_1) = DoNOP;\nDEF_ISEL(HINT_2) = DoNOP;\nDEF_ISEL(HINT_3) = DoNOP;\nDEF_ISEL(NOP_HI_SYSTEM) = DoNOP;\n"} +{"text": "/*\n * Copyright (C) 2013 salesforce.com, inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n({\n\thandleUpdateTriggerLabel: function(cmp, event, helper,triggerId) {\n\t\tvar triggerCmp = cmp.find(triggerId);\n if (triggerCmp) {\n var source = event.getSource();\n var label = source.get(\"v.label\");\n triggerCmp.set(\"v.label\", label);\n }\n }\n})"} +{"text": "require \"English\"\n\nGem::Specification.new do |spec|\n spec.name = \"interactor\"\n spec.version = \"3.1.2\"\n\n spec.author = \"Collective Idea\"\n spec.email = \"info@collectiveidea.com\"\n spec.description = \"Interactor provides a common interface for performing complex user interactions.\"\n spec.summary = \"Simple interactor implementation\"\n spec.homepage = \"https://github.com/collectiveidea/interactor\"\n spec.license = \"MIT\"\n\n spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)\n spec.test_files = spec.files.grep(/^spec/)\n\n spec.add_development_dependency \"bundler\"\n spec.add_development_dependency \"rake\"\nend\n"} +{"text": "using System;\nusing System.Linq;\nusing System.Collections.Generic;\n\nusing Foundation;\nusing UIKit;\nusing MonoTouch.NUnit.UI;\n\nnamespace iOSUnitTestProject\n{\n\t// The UIApplicationDelegate for the application. This class is responsible for launching the\n\t// User Interface of the application, as well as listening (and optionally responding) to\n\t// application events from iOS.\n\t[Register (\"UnitTestAppDelegate\")]\n\tpublic partial class UnitTestAppDelegate : UIApplicationDelegate\n\t{\n\t\t// class-level declarations\n\t\tUIWindow window;\n\t\tTouchRunner runner;\n\n\t\t//\n\t\t// This method is invoked when the application has loaded and is ready to run. In this\n\t\t// method you should instantiate the window, load the UI into it and then make the window\n\t\t// visible.\n\t\t//\n\t\t// You have 17 seconds to return from this method, or iOS will terminate your application.\n\t\t//\n\t\tpublic override bool FinishedLaunching (UIApplication app, NSDictionary options)\n\t\t{\n\t\t\t// create a new window instance based on the screen size\n\t\t\twindow = new UIWindow (UIScreen.MainScreen.Bounds);\n\t\t\trunner = new TouchRunner (window);\n\n\t\t\t// register every tests included in the main application/assembly\n\t\t\trunner.Add (System.Reflection.Assembly.GetExecutingAssembly ());\n\n\t\t\twindow.RootViewController = new UINavigationController (runner.GetViewController ());\n\t\t\t\n\t\t\t// make the window visible\n\t\t\twindow.MakeKeyAndVisible ();\n\t\t\t\n\t\t\treturn true;\n\t\t}\n}\n}\n\n"} +{"text": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.apache.ignite.internal.jdbc.thin;\n\nimport java.io.IOException;\nimport java.net.InetSocketAddress;\nimport java.security.NoSuchAlgorithmException;\nimport java.security.cert.X509Certificate;\nimport java.sql.SQLException;\nimport javax.cache.configuration.Factory;\nimport javax.net.ssl.SSLContext;\nimport javax.net.ssl.SSLException;\nimport javax.net.ssl.SSLSocket;\nimport javax.net.ssl.SSLSocketFactory;\nimport javax.net.ssl.X509TrustManager;\nimport org.apache.ignite.IgniteException;\nimport org.apache.ignite.internal.processors.odbc.SqlStateCode;\nimport org.apache.ignite.internal.util.typedef.F;\nimport org.apache.ignite.ssl.SslContextFactory;\n\n/**\n * SSL utility method to create SSL connetion.\n */\npublic class JdbcThinSSLUtil {\n /** Trust all certificates manager. */\n private static final X509TrustManager TRUST_ALL_MANAGER = new X509TrustManager() {\n @Override public X509Certificate[] getAcceptedIssuers() {\n return null;\n }\n\n @Override public void checkServerTrusted(X509Certificate[] arg0, String arg1) {\n }\n\n @Override public void checkClientTrusted(X509Certificate[] arg0, String arg1) {\n }\n };\n\n /** Empty char array. */\n public static final char[] EMPTY_CHARS = new char[0];\n\n /**\n *\n */\n private JdbcThinSSLUtil() {\n // No-op.\n }\n\n /**\n * @param addr Connection address.\n * @param connProps Connection properties.\n * @throws SQLException On connection error or reject.\n * @throws IOException On IO error in handshake.\n * @return SSL socket.\n */\n public static SSLSocket createSSLSocket(InetSocketAddress addr, ConnectionProperties connProps) throws SQLException {\n try {\n SSLSocketFactory sslSocketFactory = getSSLSocketFactory(connProps);\n\n SSLSocket sock = (SSLSocket)sslSocketFactory.createSocket(addr.getAddress(), addr.getPort());\n\n sock.setUseClientMode(true);\n\n sock.startHandshake();\n\n return sock;\n }\n catch (IOException e) {\n throw new SQLException(\"Failed to SSL connect to server [url=\" + connProps.getUrl() +\n \" address=\" + addr + ']', SqlStateCode.CLIENT_CONNECTION_FAILED, e);\n }\n }\n\n /**\n * @param connProps Connection properties.\n * @return SSL socket factory.\n * @throws SQLException On error.\n */\n private static SSLSocketFactory getSSLSocketFactory(ConnectionProperties connProps) throws SQLException {\n String sslFactory = connProps.getSslFactory();\n String cipherSuites = connProps.getSslCipherSuites();\n String cliCertKeyStoreUrl = connProps.getSslClientCertificateKeyStoreUrl();\n String cliCertKeyStorePwd = connProps.getSslClientCertificateKeyStorePassword();\n String cliCertKeyStoreType = connProps.getSslClientCertificateKeyStoreType();\n String trustCertKeyStoreUrl = connProps.getSslTrustCertificateKeyStoreUrl();\n String trustCertKeyStorePwd = connProps.getSslTrustCertificateKeyStorePassword();\n String trustCertKeyStoreType = connProps.getSslTrustCertificateKeyStoreType();\n String sslProtocol = connProps.getSslProtocol();\n String keyAlgorithm = connProps.getSslKeyAlgorithm();\n\n if (!F.isEmpty(sslFactory)) {\n try {\n Class<Factory<SSLSocketFactory>> cls = (Class<Factory<SSLSocketFactory>>)JdbcThinSSLUtil.class\n .getClassLoader().loadClass(sslFactory);\n\n Factory<SSLSocketFactory> f = cls.newInstance();\n\n return f.create();\n }\n catch (ClassNotFoundException | IllegalAccessException | InstantiationException e) {\n throw new SQLException(\"Could not fount SSL factory class: \" + sslFactory,\n SqlStateCode.CLIENT_CONNECTION_FAILED, e);\n }\n }\n\n if (cliCertKeyStoreUrl == null && cliCertKeyStorePwd == null && cliCertKeyStoreType == null\n && trustCertKeyStoreUrl == null && trustCertKeyStorePwd == null && trustCertKeyStoreType == null\n && sslProtocol == null && cipherSuites == null) {\n try {\n return SSLContext.getDefault().getSocketFactory();\n }\n catch (NoSuchAlgorithmException e) {\n throw new SQLException(\"Could not create default SSL context\",\n SqlStateCode.CLIENT_CONNECTION_FAILED, e);\n }\n }\n\n if (cliCertKeyStoreUrl == null)\n cliCertKeyStoreUrl = System.getProperty(\"javax.net.ssl.keyStore\");\n\n if (cliCertKeyStorePwd == null)\n cliCertKeyStorePwd = System.getProperty(\"javax.net.ssl.keyStorePassword\");\n\n if (cliCertKeyStoreType == null)\n cliCertKeyStoreType = System.getProperty(\"javax.net.ssl.keyStoreType\", \"JKS\");\n\n if (trustCertKeyStoreUrl == null)\n trustCertKeyStoreUrl = System.getProperty(\"javax.net.ssl.trustStore\");\n\n if (trustCertKeyStorePwd == null)\n trustCertKeyStorePwd = System.getProperty(\"javax.net.ssl.trustStorePassword\");\n\n if (trustCertKeyStoreType == null)\n trustCertKeyStoreType = System.getProperty(\"javax.net.ssl.trustStoreType\", \"JKS\");\n\n if (sslProtocol == null)\n sslProtocol = \"TLS\";\n\n SslContextFactory f = new SslContextFactory();\n\n f.setProtocol(sslProtocol);\n\n f.setKeyAlgorithm(keyAlgorithm);\n\n f.setKeyStoreFilePath(cliCertKeyStoreUrl);\n f.setKeyStoreType(cliCertKeyStoreType);\n f.setKeyStorePassword((cliCertKeyStorePwd == null) ? EMPTY_CHARS :\n cliCertKeyStorePwd.toCharArray());\n\n if (connProps.isSslTrustAll())\n f.setTrustManagers(TRUST_ALL_MANAGER);\n else {\n f.setTrustStoreFilePath(trustCertKeyStoreUrl);\n f.setTrustStoreType(trustCertKeyStoreType);\n f.setTrustStorePassword((trustCertKeyStorePwd == null) ? EMPTY_CHARS\n : trustCertKeyStorePwd.toCharArray());\n }\n\n if (!F.isEmpty(cipherSuites))\n f.setCipherSuites(cipherSuites.split(\",\"));\n\n try {\n final SSLContext sslContext = f.create();\n\n return sslContext.getSocketFactory();\n }\n catch (IgniteException e) {\n final Throwable cause = e.getCause();\n\n // Unwrap.\n if (cause instanceof SSLException)\n throw new SQLException(cause.getMessage(), SqlStateCode.CLIENT_CONNECTION_FAILED, e);\n else\n throw new SQLException(\"Unknown error.\", SqlStateCode.CLIENT_CONNECTION_FAILED, e);\n }\n }\n}\n"} +{"text": "//\n// Code (inline and block)\n// --------------------------------------------------\n\n\n// Inline and block code styles\ncode,\nkbd,\npre,\nsamp {\n font-family: $font-family-monospace;\n}\n\n// Inline code\ncode {\n padding: 2px 4px;\n font-size: 90%;\n color: $code-color;\n background-color: $code-bg;\n border-radius: $border-radius-base;\n}\n\n// User input typically entered via keyboard\nkbd {\n padding: 2px 4px;\n font-size: 90%;\n color: $kbd-color;\n background-color: $kbd-bg;\n border-radius: $border-radius-small;\n box-shadow: inset 0 -1px 0 rgba(0,0,0,.25);\n\n kbd {\n padding: 0;\n font-size: 100%;\n font-weight: bold;\n box-shadow: none;\n }\n}\n\n// Blocks of code\npre {\n display: block;\n padding: (($line-height-computed - 1) / 2);\n margin: 0 0 ($line-height-computed / 2);\n font-size: ($font-size-base - 1); // 14px to 13px\n line-height: $line-height-base;\n word-break: break-all;\n word-wrap: break-word;\n color: $pre-color;\n background-color: $pre-bg;\n border: 1px solid $pre-border-color;\n border-radius: $border-radius-base;\n\n // Account for some code outputs that place code tags in pre tags\n code {\n padding: 0;\n font-size: inherit;\n color: inherit;\n white-space: pre-wrap;\n background-color: transparent;\n border-radius: 0;\n }\n}\n\n// Enable scrollable blocks of code\n.pre-scrollable {\n max-height: $pre-scrollable-max-height;\n overflow-y: scroll;\n}\n"} +{"text": "package org.zstack.storage.primary;\n\nimport org.springframework.beans.factory.annotation.Autowired;\nimport org.springframework.transaction.annotation.Transactional;\nimport org.zstack.core.db.DatabaseFacade;\nimport org.zstack.core.errorcode.ErrorFacade;\nimport org.zstack.header.allocator.DiskOfferingTagAllocatorExtensionPoint;\nimport org.zstack.header.allocator.HostAllocatorError;\nimport org.zstack.header.allocator.HostAllocatorSpec;\nimport org.zstack.header.allocator.InstanceOfferingTagAllocatorExtensionPoint;\nimport org.zstack.header.errorcode.OperationFailureException;\nimport org.zstack.header.host.HostVO;\nimport org.zstack.header.storage.primary.PrimaryStorageTagAllocatorExtensionPoint;\nimport org.zstack.header.storage.primary.PrimaryStorageVO;\nimport org.zstack.header.tag.SystemTagInventory;\nimport org.zstack.header.tag.TagInventory;\nimport org.zstack.header.vm.VmInstanceConstant.VmOperation;\nimport org.zstack.utils.CollectionUtils;\nimport org.zstack.utils.function.Function;\n\nimport javax.persistence.TypedQuery;\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport static org.zstack.core.Platform.err;\nimport static org.zstack.core.Platform.operr;\n\n/**\n */\npublic class PrimaryStorageTagAllocatorExtension implements InstanceOfferingTagAllocatorExtensionPoint,\n PrimaryStorageTagAllocatorExtensionPoint, DiskOfferingTagAllocatorExtensionPoint {\n @Autowired\n private DatabaseFacade dbf;\n @Autowired\n private ErrorFacade errf;\n\n @Transactional(readOnly = true)\n private List<HostVO> uuidTagAllocateHost(List<HostVO> candidates, String psUuid) {\n List<String> hostUuids = CollectionUtils.transformToList(candidates, new Function<String, HostVO>() {\n @Override\n public String call(HostVO arg) {\n return arg.getUuid();\n }\n });\n\n String sql = \"select h from HostVO h where h.clusterUuid in (select ref.clusterUuid from PrimaryStorageClusterRefVO ref where ref.primaryStorageUuid = :psUuid) and h.uuid in (:huuids)\";\n TypedQuery<HostVO> q = dbf.getEntityManager().createQuery(sql, HostVO.class);\n q.setParameter(\"psUuid\", psUuid);\n q.setParameter(\"huuids\", hostUuids);\n candidates = q.getResultList();\n\n if (candidates.isEmpty()) {\n throw new OperationFailureException(err(HostAllocatorError.NO_AVAILABLE_HOST,\n \"cannot find host whose cluster has attached to primary storage[uuid:%s]. The primary storage uuid is specified in instance offering tag\", psUuid\n ));\n }\n\n return candidates;\n }\n\n @Override\n public List<HostVO> allocateHost(List<TagInventory> tags, List<HostVO> candidates, HostAllocatorSpec spec) {\n if (!VmOperation.NewCreate.toString().equals(spec.getVmOperation())) {\n return candidates;\n }\n\n for (TagInventory tag : tags) {\n String uuid = PrimaryStorageSystemTags.PRIMARY_STORAGE_ALLOCATOR_UUID_TAG.getTokenByTag(tag.getTag(), \"uuid\");\n if (uuid != null) {\n return uuidTagAllocateHost(candidates, uuid);\n }\n\n String requiredUserTag = PrimaryStorageSystemTags.PRIMARY_STORAGE_ALLOCATOR_USERTAG_TAG_MANDATORY.getTokenByTag(tag.getTag(), \"tag\");\n if (requiredUserTag != null) {\n return userTagAllocateHost(candidates, requiredUserTag, true);\n }\n\n String userTag = PrimaryStorageSystemTags.PRIMARY_STORAGE_ALLOCATOR_USERTAG_TAG.getTokenByTag(tag.getTag(), \"tag\");\n if (userTag != null) {\n return userTagAllocateHost(candidates, userTag, false);\n }\n }\n\n return candidates;\n }\n\n @Transactional(readOnly = true)\n private List<HostVO> userTagAllocateHost(List<HostVO> candidates, String tag, boolean required) {\n List<String> hostUuids = CollectionUtils.transformToList(candidates, new Function<String, HostVO>() {\n @Override\n public String call(HostVO arg) {\n return arg.getUuid();\n }\n });\n\n String sql = \"select h from HostVO h where h.clusterUuid in (select ref.clusterUuid from PrimaryStorageClusterRefVO ref where ref.primaryStorageUuid in (select t.resourceUuid from UserTagVO t where t.tag = :tag and t.resourceType = :resourceType)) and h.uuid in (:huuids)\";\n TypedQuery<HostVO> q = dbf.getEntityManager().createQuery(sql, HostVO.class);\n q.setParameter(\"tag\", tag);\n q.setParameter(\"resourceType\", PrimaryStorageVO.class.getSimpleName());\n q.setParameter(\"huuids\", hostUuids);\n List<HostVO> vos = q.getResultList();\n\n if (vos.isEmpty() && required) {\n throw new OperationFailureException(err(HostAllocatorError.NO_AVAILABLE_HOST,\n \"cannot find host whose cluster has attached to primary storage having user tag[%s]. The user tag is specified in instance offering tag\", tag\n ));\n } else if (vos.isEmpty()) {\n return candidates;\n } else {\n return vos;\n }\n }\n\n @Override\n public List<PrimaryStorageVO> allocatePrimaryStorage(List<SystemTagInventory> tags, List<PrimaryStorageVO> candidates) {\n for (SystemTagInventory tag : tags) {\n final String uuid = PrimaryStorageSystemTags.PRIMARY_STORAGE_ALLOCATOR_UUID_TAG.getTokenByTag(tag.getTag(), \"uuid\");\n if (uuid != null) {\n PrimaryStorageVO pvo = CollectionUtils.find(candidates, new Function<PrimaryStorageVO, PrimaryStorageVO>() {\n @Override\n public PrimaryStorageVO call(PrimaryStorageVO arg) {\n return uuid.equals(arg.getUuid()) ? arg : null;\n }\n });\n\n if (pvo == null) {\n throw new OperationFailureException(operr(\"cannot find primary storage[uuid:%s], the uuid is specified in instance offering or disk offering\", uuid));\n }\n\n List<PrimaryStorageVO> psvos = new ArrayList<PrimaryStorageVO>();\n psvos.add(pvo);\n return psvos;\n }\n\n String requiredUserTag = PrimaryStorageSystemTags.PRIMARY_STORAGE_ALLOCATOR_USERTAG_TAG_MANDATORY.getTokenByTag(tag.getTag(), \"tag\");\n if (requiredUserTag != null) {\n return allocatePrimaryStorageByUserTag(requiredUserTag, candidates, true);\n }\n\n String userTag = PrimaryStorageSystemTags.PRIMARY_STORAGE_ALLOCATOR_USERTAG_TAG.getTokenByTag(tag.getTag(), \"tag\");\n if (userTag != null) {\n return allocatePrimaryStorageByUserTag(userTag, candidates, false);\n }\n }\n\n return candidates;\n }\n\n\n @Transactional(readOnly = true)\n private List<PrimaryStorageVO> allocatePrimaryStorageByUserTag(String tag, List<PrimaryStorageVO> candidates, boolean required) {\n List<String> uuids = CollectionUtils.transformToList(candidates, new Function<String, PrimaryStorageVO>() {\n @Override\n public String call(PrimaryStorageVO arg) {\n return arg.getUuid();\n }\n });\n\n String sql = \"select ps from PrimaryStorageVO ps where ps.uuid in (:uuids) and ps.uuid in (select t.resourceUuid from UserTagVO t where t.tag = :tag and t.resourceType = :resourceType)\";\n TypedQuery<PrimaryStorageVO> q = dbf.getEntityManager().createQuery(sql, PrimaryStorageVO.class);\n q.setParameter(\"uuids\", uuids);\n q.setParameter(\"tag\", tag);\n q.setParameter(\"resourceType\", PrimaryStorageVO.class.getSimpleName());\n List<PrimaryStorageVO> vos = q.getResultList();\n\n if (vos.isEmpty() && required) {\n throw new OperationFailureException(operr(\"cannot find primary storage having user tag[%s]. The user tag is specified in instance offering or disk offering\", tag));\n } else if (vos.isEmpty()) {\n return candidates;\n } else {\n return vos;\n }\n }\n}\n"} +{"text": "/*\n * reserved comment block\n * DO NOT REMOVE OR ALTER!\n */\n/**\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n/*\n * ===========================================================================\n *\n * (C) Copyright IBM Corp. 2003 All Rights Reserved.\n *\n * ===========================================================================\n */\n/*\n * Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.\n */\n/*\n * $Id: XMLDSigRI.java 1833618 2018-06-15 17:36:20Z mullan $\n */\npackage org.jcp.xml.dsig.internal.dom;\n\nimport java.util.*;\nimport java.security.*;\n\nimport javax.xml.crypto.dsig.*;\n\n/**\n * The XMLDSig RI Provider.\n *\n */\n\n/**\n * Defines the XMLDSigRI provider.\n */\n\npublic final class XMLDSigRI extends Provider {\n\n static final long serialVersionUID = -5049765099299494554L;\n\n private static final String INFO = \"XMLDSig \" +\n \"(DOM XMLSignatureFactory; DOM KeyInfoFactory; \" +\n \"C14N 1.0, C14N 1.1, Exclusive C14N, Base64, Enveloped, XPath, \" +\n \"XPath2, XSLT TransformServices)\";\n\n private static final String VER =\n AccessController.doPrivileged(new PrivilegedAction<>() {\n public String run() {\n return System.getProperty(\"java.specification.version\");\n }\n });\n\n private static final class ProviderService extends Provider.Service {\n\n ProviderService(Provider p, String type, String algo, String cn) {\n super(p, type, algo, cn, null, null);\n }\n\n ProviderService(Provider p, String type, String algo, String cn,\n String[] aliases) {\n super(p, type, algo, cn,\n (aliases == null? null : Arrays.asList(aliases)), null);\n }\n\n ProviderService(Provider p, String type, String algo, String cn,\n String[] aliases, HashMap<String, String> attrs) {\n super(p, type, algo, cn,\n (aliases == null? null : Arrays.asList(aliases)), attrs);\n }\n\n @Override\n public Object newInstance(Object ctrParamObj)\n throws NoSuchAlgorithmException {\n String type = getType();\n if (ctrParamObj != null) {\n throw new InvalidParameterException\n (\"constructorParameter not used with \" + type + \" engines\");\n }\n\n String algo = getAlgorithm();\n try {\n if (type.equals(\"XMLSignatureFactory\")) {\n if (algo.equals(\"DOM\")) {\n return new DOMXMLSignatureFactory();\n }\n } else if (type.equals(\"KeyInfoFactory\")) {\n if (algo.equals(\"DOM\")) {\n return new DOMKeyInfoFactory();\n }\n } else if (type.equals(\"TransformService\")) {\n if (algo.equals(CanonicalizationMethod.INCLUSIVE) ||\n algo.equals(CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS)) {\n return new DOMCanonicalXMLC14NMethod();\n } else if (algo.equals(\"http://www.w3.org/2006/12/xml-c14n11\") ||\n algo.equals(\"http://www.w3.org/2006/12/xml-c14n11#WithComments\")) {\n return new DOMCanonicalXMLC14N11Method();\n } else if (algo.equals(CanonicalizationMethod.EXCLUSIVE) ||\n algo.equals(CanonicalizationMethod.EXCLUSIVE_WITH_COMMENTS)) {\n return new DOMExcC14NMethod();\n } else if (algo.equals(Transform.BASE64)) {\n return new DOMBase64Transform();\n } else if (algo.equals(Transform.ENVELOPED)) {\n return new DOMEnvelopedTransform();\n } else if (algo.equals(Transform.XPATH2)) {\n return new DOMXPathFilter2Transform();\n } else if (algo.equals(Transform.XPATH)) {\n return new DOMXPathTransform();\n } else if (algo.equals(Transform.XSLT)) {\n return new DOMXSLTTransform();\n }\n }\n } catch (Exception ex) {\n throw new NoSuchAlgorithmException(\"Error constructing \" +\n type + \" for \" + algo + \" using XMLDSig\", ex);\n }\n throw new ProviderException(\"No impl for \" + algo +\n \" \" + type);\n }\n }\n\n public XMLDSigRI() {\n // This is the JDK XMLDSig provider, synced from\n // Apache Santuario XML Security for Java, version 2.1.4\n super(\"XMLDSig\", VER, INFO);\n\n final Provider p = this;\n AccessController.doPrivileged(new PrivilegedAction<Void>() {\n public Void run() {\n HashMap<String, String> MECH_TYPE = new HashMap<>();\n MECH_TYPE.put(\"MechanismType\", \"DOM\");\n\n putService(new ProviderService(p, \"XMLSignatureFactory\",\n \"DOM\", \"org.jcp.xml.dsig.internal.dom.DOMXMLSignatureFactory\"));\n\n putService(new ProviderService(p, \"KeyInfoFactory\",\n \"DOM\", \"org.jcp.xml.dsig.internal.dom.DOMKeyInfoFactory\"));\n\n\n // Inclusive C14N\n putService(new ProviderService(p, \"TransformService\",\n CanonicalizationMethod.INCLUSIVE,\n \"org.jcp.xml.dsig.internal.dom.DOMCanonicalXMLC14NMethod\",\n new String[] {\"INCLUSIVE\"}, MECH_TYPE));\n\n // InclusiveWithComments C14N\n putService(new ProviderService(p, \"TransformService\",\n CanonicalizationMethod.INCLUSIVE_WITH_COMMENTS,\n \"org.jcp.xml.dsig.internal.dom.DOMCanonicalXMLC14NMethod\",\n new String[] {\"INCLUSIVE_WITH_COMMENTS\"}, MECH_TYPE));\n\n // Inclusive C14N 1.1\n putService(new ProviderService(p, \"TransformService\",\n \"http://www.w3.org/2006/12/xml-c14n11\",\n \"org.jcp.xml.dsig.internal.dom.DOMCanonicalXMLC14N11Method\",\n null, MECH_TYPE));\n\n // InclusiveWithComments C14N 1.1\n putService(new ProviderService(p, \"TransformService\",\n \"http://www.w3.org/2006/12/xml-c14n11#WithComments\",\n \"org.jcp.xml.dsig.internal.dom.DOMCanonicalXMLC14N11Method\",\n null, MECH_TYPE));\n\n // Exclusive C14N\n putService(new ProviderService(p, \"TransformService\",\n CanonicalizationMethod.EXCLUSIVE,\n \"org.jcp.xml.dsig.internal.dom.DOMExcC14NMethod\",\n new String[] {\"EXCLUSIVE\"}, MECH_TYPE));\n\n // ExclusiveWithComments C14N\n putService(new ProviderService(p, \"TransformService\",\n CanonicalizationMethod.EXCLUSIVE_WITH_COMMENTS,\n \"org.jcp.xml.dsig.internal.dom.DOMExcC14NMethod\",\n new String[] {\"EXCLUSIVE_WITH_COMMENTS\"}, MECH_TYPE));\n\n // Base64 Transform\n putService(new ProviderService(p, \"TransformService\",\n Transform.BASE64,\n \"org.jcp.xml.dsig.internal.dom.DOMBase64Transform\",\n new String[] {\"BASE64\"}, MECH_TYPE));\n\n // Enveloped Transform\n putService(new ProviderService(p, \"TransformService\",\n Transform.ENVELOPED,\n \"org.jcp.xml.dsig.internal.dom.DOMEnvelopedTransform\",\n new String[] {\"ENVELOPED\"}, MECH_TYPE));\n\n // XPath2 Transform\n putService(new ProviderService(p, \"TransformService\",\n Transform.XPATH2,\n \"org.jcp.xml.dsig.internal.dom.DOMXPathFilter2Transform\",\n new String[] {\"XPATH2\"}, MECH_TYPE));\n\n // XPath Transform\n putService(new ProviderService(p, \"TransformService\",\n Transform.XPATH,\n \"org.jcp.xml.dsig.internal.dom.DOMXPathTransform\",\n new String[] {\"XPATH\"}, MECH_TYPE));\n\n // XSLT Transform\n putService(new ProviderService(p, \"TransformService\",\n Transform.XSLT,\n \"org.jcp.xml.dsig.internal.dom.DOMXSLTTransform\",\n new String[] {\"XSLT\"}, MECH_TYPE));\n return null;\n }\n });\n }\n}\n"} +{"text": "#pragma once\n\n#include \"Scenes/Platformer/AttachedBehavior/Entities/Friendly/Hexus/HexusBehaviorBase.h\"\n\nclass CardData;\nclass HexusOpponentData;\nclass MinMaxPool;\nclass PlatformerEntity;\n\nclass AngelHexusBehavior : public HexusBehaviorBase\n{\npublic:\n\tstatic AngelHexusBehavior* create(GameObject* owner);\n\n\tstatic const std::string MapKey;\n\nprotected:\n\tAngelHexusBehavior(GameObject* owner);\n\tvirtual ~AngelHexusBehavior();\n\n\tMinMaxPool* generateReward() override;\n\tstd::string getWinLossSaveKey() override;\n\tstd::string getBackgroundResource() override;\n\tstd::vector<CardData*> generateDeck() override;\n\tStateOverride* getStateOverride() override;\n\tstd::vector<TutorialBase*> getTutorials() override;\n\nprivate:\n\ttypedef HexusBehaviorBase super;\n\n};\n"} +{"text": "import * as au from \"../aurelia\";\r\nimport { ConfigBuilder } from \"../config-builder\";\r\nexport declare class MdButton {\r\n private element;\r\n private configBuilder;\r\n constructor(element: Element, configBuilder: ConfigBuilder);\r\n attributeManager: au.AttributeManager;\r\n disabled: boolean;\r\n disabledChanged(): void;\r\n flat: boolean;\r\n flatChanged(): void;\r\n floating: boolean;\r\n large: boolean;\r\n small: boolean;\r\n pulse: boolean;\r\n pulseChanged(): void;\r\n attached(): void;\r\n detached(): void;\r\n}\r\n"} +{"text": "/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\n/* Vector-based spherical geodetic (latitude/longitude) functions (c) Chris Veness 2011-2019 */\n/* MIT Licence */\n/* www.movable-type.co.uk/scripts/latlong-vectors.html */\n/* www.movable-type.co.uk/scripts/geodesy-library.html#latlon-nvector-spherical */\n/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\n\nimport Vector3d from './vector3d.js';\nimport Dms from './dms.js';\n\nconst π = Math.PI;\n\n\n/**\n * Tools for working with points and paths on (a spherical model of) the earth’s surface using a\n * vector-based approach using ‘n-vectors’. In contrast to the more common spherical trigonometry,\n * a vector-based approach makes many calculations much simpler, and easier to follow.\n *\n * Based on Kenneth Gade’s ‘Non-singular Horizontal Position Representation’.\n *\n * Note that these formulations take x => 0°N,0°E, y => 0°N,90°E, z => 90°N; Gade uses x => 90°N,\n * y => 0°N,90°E, z => 0°N,0°E.\n *\n * Note also that on a spherical model earth, an n-vector is equivalent to a normalised version of\n * an (ECEF) cartesian coordinate.\n *\n * @module latlon-nvector-spherical\n */\n\n\n/* LatLonNvectorSpherical - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\n\n\n/**\n * Latitude/longitude points on an spherical model earth, and methods for calculating distances,\n * bearings, destinations, etc on great circle paths.\n */\nclass LatLonNvectorSpherical {\n\n /**\n * Creates a latitude/longitude point on the earth’s surface, using a spherical model earth.\n *\n * @param {number} lat - Latitude (in degrees).\n * @param {number} lon - Longitude (in degrees).\n * @throws {TypeError} Invalid lat/lon.\n *\n * @example\n * import LatLon from '/js/geodesy/latlon-nvector-spherical.js';\n * const p = new LatLon(52.205, 0.119);\n */\n constructor(lat, lon) {\n if (isNaN(lat)) throw new TypeError(`invalid lat ‘${lat}’`);\n if (isNaN(lon)) throw new TypeError(`invalid lon ‘${lon}’`);\n\n this._lat = Dms.wrap90(Number(lat));\n this._lon = Dms.wrap180(Number(lon));\n }\n\n\n /**\n * Latitude in degrees north from equator (including aliases lat, latitude): can be set as\n * numeric or hexagesimal (deg-min-sec); returned as numeric.\n */\n get lat() { return this._lat; }\n get latitude() { return this._lat; }\n set lat(lat) {\n this._lat = isNaN(lat) ? Dms.wrap90(Dms.parse(lat)) : Dms.wrap90(Number(lat));\n if (isNaN(this._lat)) throw new TypeError(`invalid lat ‘${lat}’`);\n }\n set latitude(lat) {\n this._lat = isNaN(lat) ? Dms.wrap90(Dms.parse(lat)) : Dms.wrap90(Number(lat));\n if (isNaN(this._lat)) throw new TypeError(`invalid latitude ‘${lat}’`);\n }\n\n /**\n * Longitude in degrees east from international reference meridian (including aliases lon, lng,\n * longitude): can be set as numeric or hexagesimal (deg-min-sec); returned as numeric.\n */\n get lon() { return this._lon; }\n get lng() { return this._lon; }\n get longitude() { return this._lon; }\n set lon(lon) {\n this._lon = isNaN(lon) ? Dms.wrap180(Dms.parse(lon)) : Dms.wrap180(Number(lon));\n if (isNaN(this._lon)) throw new TypeError(`invalid lon ‘${lon}’`);\n }\n set lng(lon) {\n this._lon = isNaN(lon) ? Dms.wrap180(Dms.parse(lon)) : Dms.wrap180(Number(lon));\n if (isNaN(this._lon)) throw new TypeError(`invalid lng ‘${lon}’`);\n }\n set longitude(lon) {\n this._lon = isNaN(lon) ? Dms.wrap180(Dms.parse(lon)) : Dms.wrap180(Number(lon));\n if (isNaN(this._lon)) throw new TypeError(`invalid longitude ‘${lon}’`);\n }\n\n\n /** Conversion factors; 1000 * LatLon.metresToKm gives 1. */\n static get metresToKm() { return 1/1000; }\n /** Conversion factors; 1000 * LatLon.metresToMiles gives 0.621371192237334. */\n static get metresToMiles() { return 1/1609.344; }\n /** Conversion factors; 1000 * LatLon.metresToMiles gives 0.5399568034557236. */\n static get metresToNauticalMiles() { return 1/1852; }\n\n\n // TODO: is it worth LatLon.parse() for the n-vector version?\n\n\n /**\n * Converts ‘this’ latitude/longitude point to an n-vector (normal to earth's surface).\n *\n * @returns {Nvector} Normalised n-vector representing lat/lon point.\n *\n * @example\n * const p = new LatLon(45, 45);\n * const v = p.toNvector(); // [0.5000,0.5000,0.7071]\n */\n toNvector() { // note: replicated in LatLon_NvectorEllipsoidal\n const φ = this.lat.toRadians();\n const λ = this.lon.toRadians();\n\n const sinφ = Math.sin(φ), cosφ = Math.cos(φ);\n const sinλ = Math.sin(λ), cosλ = Math.cos(λ);\n\n // right-handed vector: x -> 0°E,0°N; y -> 90°E,0°N, z -> 90°N\n const x = cosφ * cosλ;\n const y = cosφ * sinλ;\n const z = sinφ;\n\n return new NvectorSpherical(x, y, z);\n }\n\n\n /**\n * Vector normal to great circle obtained by heading on given bearing from ‘this’ point.\n *\n * Direction of vector is such that initial bearing vector b = c × n, where n is an n-vector\n * representing ‘this’ (start) point.\n *\n * @private\n * @param {number} bearing - Compass bearing in degrees.\n * @returns {Vector3d} Normalised vector representing great circle.\n *\n * @example\n * const p1 = new LatLon(53.3206, -1.7297);\n * const gc = p1.greatCircle(96.0); // [-0.794,0.129,0.594]\n */\n greatCircle(bearing) {\n const φ = this.lat.toRadians();\n const λ = this.lon.toRadians();\n const θ = Number(bearing).toRadians();\n\n const x = Math.sin(λ) * Math.cos(θ) - Math.sin(φ) * Math.cos(λ) * Math.sin(θ);\n const y = -Math.cos(λ) * Math.cos(θ) - Math.sin(φ) * Math.sin(λ) * Math.sin(θ);\n const z = Math.cos(φ) * Math.sin(θ);\n\n return new Vector3d(x, y, z);\n }\n\n\n /**\n * Returns the distance on the surface of the sphere from ‘this’ point to destination point.\n *\n * @param {LatLon} point - Latitude/longitude of destination point.\n * @param {number} [radius=6371e3] - Radius of earth (defaults to mean radius in metres).\n * @returns {number} Distance between this point and destination point, in same units as radius.\n * @throws {TypeError} Invalid point/radius.\n *\n * @example\n * const p1 = new LatLon(52.205, 0.119);\n * const p2 = new LatLon(48.857, 2.351);\n * const d = p1.distanceTo(p2); // 404.3 km\n */\n distanceTo(point, radius=6371e3) {\n if (!(point instanceof LatLonNvectorSpherical)) throw new TypeError(`invalid point ‘${point}’`);\n if (isNaN(radius)) throw new TypeError(`invalid radius ‘${radius}’`);\n\n const R = Number(radius);\n\n const n1 = this.toNvector();\n const n2 = point.toNvector();\n\n const sinθ = n1.cross(n2).length;\n const cosθ = n1.dot(n2);\n const δ = Math.atan2(sinθ, cosθ); // tanδ = |n₁×n₂| / n₁⋅n₂\n\n return δ * R;\n }\n\n\n /**\n * Returns the initial bearing from ‘this’ point to destination point.\n *\n * @param {LatLon} point - Latitude/longitude of destination point.\n * @returns {number} Initial bearing in degrees from north (0°..360°).\n * @throws {TypeError} Invalid point.\n *\n * @example\n * const p1 = new LatLon(52.205, 0.119);\n * const p2 = new LatLon(48.857, 2.351);\n * const b1 = p1.initialBearingTo(p2); // 156.2°\n */\n initialBearingTo(point) {\n if (!(point instanceof LatLonNvectorSpherical)) throw new TypeError(`invalid point ‘${point}’`);\n if (this.equals(point)) return NaN; // coincident points\n\n const p1 = this.toNvector();\n const p2 = point.toNvector();\n\n const N = new NvectorSpherical(0, 0, 1); // n-vector representing north pole\n\n const c1 = p1.cross(p2); // great circle through p1 & p2\n const c2 = p1.cross(N); // great circle through p1 & north pole\n\n const θ = c1.angleTo(c2, p1); // bearing is (signed) angle between c1 & c2\n\n return Dms.wrap360(θ.toDegrees()); // normalise to range 0..360°\n }\n\n\n /**\n * Returns final bearing arriving at destination point from ‘this’ point; the final bearing will\n * differ from the initial bearing by varying degrees according to distance and latitude.\n *\n * @param {LatLon} point - Latitude/longitude of destination point.\n * @returns {number} Final bearing in degrees from north (0°..360°).\n * @throws {TypeError} Invalid point.\n *\n * @example\n * const p1 = new LatLon(52.205, 0.119);\n * const p2 = new LatLon(48.857, 2.351);\n * const b2 = p1.finalBearingTo(p2); // 157.9°\n */\n finalBearingTo(point) {\n if (!(point instanceof LatLonNvectorSpherical)) throw new TypeError(`invalid point ‘${point}’`);\n\n // get initial bearing from destination point to this point & reverse it by adding 180°\n return Dms.wrap360(point.initialBearingTo(this) + 180);\n }\n\n\n /**\n * Returns the midpoint between ‘this’ point and destination point.\n *\n * @param {LatLon} point - Latitude/longitude of destination point.\n * @returns {LatLon} Midpoint between this point and destination point.\n * @throws {TypeError} Invalid point.\n *\n * @example\n * const p1 = new LatLon(52.205, 0.119);\n * const p2 = new LatLon(48.857, 2.351);\n * const pMid = p1.midpointTo(p2); // 50.5363°N, 001.2746°E\n */\n midpointTo(point) {\n if (!(point instanceof LatLonNvectorSpherical)) throw new TypeError(`invalid point ‘${point}’`);\n\n const n1 = this.toNvector();\n const n2 = point.toNvector();\n\n const mid = n1.plus(n2);\n\n return new NvectorSpherical(mid.x, mid.y, mid.z).toLatLon();\n }\n\n\n /**\n * Returns the point at given fraction between ‘this’ point and given point.\n *\n * @param {LatLon} point - Latitude/longitude of destination point.\n * @param {number} fraction - Fraction between the two points (0 = this point, 1 = specified point).\n * @returns {LatLon} Intermediate point between this point and destination point.\n * @throws {TypeError} Invalid point/fraction.\n *\n * @example\n * const p1 = new LatLon(52.205, 0.119);\n * const p2 = new LatLon(48.857, 2.351);\n * const pInt = p1.intermediatePointTo(p2, 0.25); // 51.3723°N, 000.7072°E\n */\n intermediatePointTo(point, fraction) {\n if (!(point instanceof LatLonNvectorSpherical)) throw new TypeError(`invalid point ‘${point}’`);\n if (isNaN(fraction)) throw new TypeError(`invalid fraction ‘${fraction}’`);\n\n // angular distance between points; tanδ = |n₁×n₂| / n₁⋅n₂\n const n1 = this.toNvector();\n const n2 = point.toNvector();\n const sinθ = n1.cross(n2).length;\n const cosθ = n1.dot(n2);\n const δ = Math.atan2(sinθ, cosθ);\n\n // interpolated angular distance on straight line between points\n const δi = δ * Number(fraction);\n const sinδi = Math.sin(δi);\n const cosδi = Math.cos(δi);\n\n // direction vector (perpendicular to n1 in plane of n2)\n const d = n1.cross(n2).unit().cross(n1); // unit(n₁×n₂) × n₁\n\n // interpolated position\n const int = n1.times(cosδi).plus(d.times(sinδi)); // n₁⋅cosδᵢ + d⋅sinδᵢ\n\n return new NvectorSpherical(int.x, int.y, int.z).toLatLon();\n }\n\n\n /**\n * Returns the latitude/longitude point projected from the point at given fraction on a straight\n * line between between ‘this’ point and given point.\n *\n * @param {LatLon} point - Latitude/longitude of destination point.\n * @param {number} fraction - Fraction between the two points (0 = this point, 1 = specified point).\n * @returns {LatLon} Intermediate point between this point and destination point.\n * @throws {TypeError} Invalid point.\n *\n * @example\n * const p1 = new LatLon(52.205, 0.119);\n * const p2 = new LatLon(48.857, 2.351);\n * const pInt = p1.intermediatePointTo(p2, 0.25); // 51.3723°N, 000.7072°E\n */\n intermediatePointOnChordTo(point, fraction) {\n if (!(point instanceof LatLonNvectorSpherical)) throw new TypeError(`invalid point ‘${point}’`);\n\n const n1 = this.toNvector();\n const n2 = point.toNvector();\n\n const int = n1.plus(n2.minus(n1).times(Number(fraction))); // n₁ + (n₂−n₁)·f ≡ n₁·(1-f) + n₂·f\n\n const n = new NvectorSpherical(int.x, int.y, int.z);\n\n return n.toLatLon();\n }\n\n\n /**\n * Returns the destination point from ‘this��� point having travelled the given distance on the\n * given initial bearing (bearing normally varies around path followed).\n *\n * @param {number} distance - Distance travelled, in same units as earth radius (default: metres).\n * @param {number} bearing - Initial bearing in degrees from north.\n * @param {number} [radius=6371e3] - (Mean) radius of earth (defaults to radius in metres).\n * @returns {LatLon} Destination point.\n *\n * @example\n * const p1 = new LatLon(51.47788, -0.00147);\n * const p2 = p1.destinationPoint(7794, 300.7); // 51.5136°N, 000.0983°W\n */\n destinationPoint(distance, bearing, radius=6371e3) {\n const n1 = this.toNvector(); // Gade's n_EA_E\n const δ = distance / radius; // angular distance in radians\n const θ = Number(bearing).toRadians(); // initial bearing in radians\n\n const N = new NvectorSpherical(0, 0, 1); // north pole\n\n const de = N.cross(n1).unit(); // east direction vector @ n1 (Gade's k_e_E)\n const dn = n1.cross(de); // north direction vector @ n1 (Gade's (k_n_E)\n\n const deSinθ = de.times(Math.sin(θ));\n const dnCosθ = dn.times(Math.cos(θ));\n\n const d = dnCosθ.plus(deSinθ); // direction vector @ n1 (≡ C×n1; C = great circle)\n\n const x = n1.times(Math.cos(δ)); // component of n2 parallel to n1\n const y = d.times(Math.sin(δ)); // component of n2 perpendicular to n1\n\n const n2 = x.plus(y); // Gade's n_EB_E\n\n return new NvectorSpherical(n2.x, n2.y, n2.z).toLatLon();\n }\n\n\n /**\n * Returns the point of intersection of two paths each defined by point pairs or start point and bearing.\n *\n * @param {LatLon} path1start - Start point of first path.\n * @param {LatLon|number} path1brngEnd - End point of first path or initial bearing from first start point.\n * @param {LatLon} path2start - Start point of second path.\n * @param {LatLon|number} path2brngEnd - End point of second path or initial bearing from second start point.\n * @returns {LatLon} Destination point (null if no unique intersection defined)\n * @throws {TypeError} Invalid parameter.\n *\n * @example\n * const p1 = new LatLon(51.8853, 0.2545), brng1 = 108.55;\n * const p2 = new LatLon(49.0034, 2.5735), brng2 = 32.44;\n * const pInt = LatLon.intersection(p1, brng1, p2, brng2); // 50.9076°N, 004.5086°E\n */\n static intersection(path1start, path1brngEnd, path2start, path2brngEnd) {\n if (!(path1start instanceof LatLonNvectorSpherical)) throw new TypeError(`invalid path1start ‘${path1start}’`);\n if (!(path2start instanceof LatLonNvectorSpherical)) throw new TypeError(`invalid path2start ‘${path2start}’`);\n if (!(path1brngEnd instanceof LatLonNvectorSpherical) && isNaN(path1brngEnd)) throw new TypeError(`invalid path1brngEnd ‘${path1brngEnd}’`);\n if (!(path2brngEnd instanceof LatLonNvectorSpherical) && isNaN(path2brngEnd)) throw new TypeError(`invalid path2brngEnd ‘${path2brngEnd}’`);\n\n if (path1start.equals(path2start)) return new LatLonNvectorSpherical(path1start.lat, path2start.lon); // coincident points\n\n // if c1 & c2 are great circles through start and end points (or defined by start point + bearing),\n // then candidate intersections are simply c1 × c2 & c2 × c1; most of the work is deciding correct\n // intersection point to select! if bearing is given, that determines which intersection, if both\n // paths are defined by start/end points, take closer intersection\n\n const p1 = path1start.toNvector();\n const p2 = path2start.toNvector();\n\n let c1 = null, c2 = null, path1def = null, path2def = null;\n // c1 & c2 are vectors defining great circles through start & end points; p × c gives initial bearing vector\n\n if (path1brngEnd instanceof LatLonNvectorSpherical) { // path 1 defined by endpoint\n c1 = p1.cross(path1brngEnd.toNvector());\n path1def = 'endpoint';\n } else { // path 1 defined by initial bearing\n c1 = path1start.greatCircle(path1brngEnd);\n path1def = 'bearing';\n }\n if (path2brngEnd instanceof LatLonNvectorSpherical) { // path 2 defined by endpoint\n c2 = p2.cross(path2brngEnd.toNvector());\n path2def = 'endpoint';\n } else { // path 2 defined by initial bearing\n c2 = path2start.greatCircle(path2brngEnd);\n path2def = 'bearing';\n }\n\n // there are two (antipodal) candidate intersection points; we have to choose which to return\n const i1 = c1.cross(c2);\n const i2 = c2.cross(c1);\n\n // TODO am I making heavy weather of this? is there a simpler way to do it?\n\n // selection of intersection point depends on how paths are defined (bearings or endpoints)\n let intersection = null, dir1 = null, dir2 = null;\n switch (path1def + '+' + path2def) {\n case 'bearing+bearing':\n // if c×p⋅i1 is +ve, the initial bearing is towards i1, otherwise towards antipodal i2\n dir1 = Math.sign(c1.cross(p1).dot(i1)); // c1×p1⋅i1 +ve means p1 bearing points to i1\n dir2 = Math.sign(c2.cross(p2).dot(i1)); // c2×p2⋅i1 +ve means p2 bearing points to i1\n\n switch (dir1 + dir2) {\n case 2: // dir1, dir2 both +ve, 1 & 2 both pointing to i1\n intersection = i1;\n break;\n case -2: // dir1, dir2 both -ve, 1 & 2 both pointing to i2\n intersection = i2;\n break;\n case 0: // dir1, dir2 opposite; intersection is at further-away intersection point\n // take opposite intersection from mid-point of p1 & p2 [is this always true?]\n intersection = p1.plus(p2).dot(i1) > 0 ? i2 : i1;\n break;\n }\n break;\n case 'bearing+endpoint': // use bearing c1 × p1\n dir1 = Math.sign(c1.cross(p1).dot(i1)); // c1×p1⋅i1 +ve means p1 bearing points to i1\n intersection = dir1 > 0 ? i1 : i2;\n break;\n case 'endpoint+bearing': // use bearing c2 × p2\n dir2 = Math.sign(c2.cross(p2).dot(i1)); // c2×p2⋅i1 +ve means p2 bearing points to i1\n intersection = dir2 > 0 ? i1 : i2;\n break;\n case 'endpoint+endpoint': // select nearest intersection to mid-point of all points\n const mid = p1.plus(p2).plus(path1brngEnd.toNvector()).plus(path2brngEnd.toNvector()); // eslint-disable-line no-case-declarations\n intersection = mid.dot(i1) > 0 ? i1 : i2;\n break;\n }\n\n return new NvectorSpherical(intersection.x, intersection.y, intersection.z).toLatLon();\n }\n\n\n /**\n * Returns (signed) distance from ‘this’ point to great circle defined by start-point and end-point/bearing.\n *\n * @param {LatLon} pathStart - Start point of great circle path.\n * @param {LatLon|number} pathBrngEnd - End point of great circle path or initial bearing from great circle start point.\n * @param {number} [radius=6371e3] - (Mean) radius of earth (defaults to radius in metres).\n * @returns {number} Distance to great circle (-ve if to left, +ve if to right of path).\n * @throws {TypeError} Invalid parameter.\n *\n * @example\n * const pCurrent = new LatLon(53.2611, -0.7972);\n *\n * const p1 = new LatLon(53.3206, -1.7297), brng = 96.0;\n * const d = pCurrent.crossTrackDistanceTo(p1, brng); // Number(d.toPrecision(4)): -305.7\n *\n * const p1 = new LatLon(53.3206, -1.7297), p2 = new LatLon(53.1887, 0.1334);\n * const d = pCurrent.crossTrackDistanceTo(p1, p2); // Number(d.toPrecision(4)): -307.5\n */\n crossTrackDistanceTo(pathStart, pathBrngEnd, radius=6371e3) {\n if (!(pathStart instanceof LatLonNvectorSpherical)) throw new TypeError(`invalid pathStart ‘${pathStart}’`);\n if (!(pathBrngEnd instanceof LatLonNvectorSpherical || !isNaN(pathBrngEnd))) throw new TypeError(`invalid pathBrngEnd ‘${pathBrngEnd}’`);\n\n if (this.equals(pathStart)) return 0;\n\n const p = this.toNvector();\n const R = Number(radius);\n\n const gc = pathBrngEnd instanceof LatLonNvectorSpherical // (note JavaScript is not good at method overloading)\n ? pathStart.toNvector().cross(pathBrngEnd.toNvector()) // great circle defined by two points\n : pathStart.greatCircle(pathBrngEnd); // great circle defined by point + bearing\n\n const α = gc.angleTo(p) - π/2; // angle between point & great-circle\n\n return α * R;\n }\n\n\n /**\n * Returns how far ‘this’ point is along a path from from start-point, heading on bearing or towards\n * end-point. That is, if a perpendicular is drawn from ‘this’ point to the (great circle) path, the\n * along-track distance is the distance from the start point to where the perpendicular crosses the\n * path.\n *\n * @param {LatLon} pathStart - Start point of great circle path.\n * @param {LatLon|number} pathBrngEnd - End point of great circle path or initial bearing from great circle start point.\n * @param {number} [radius=6371e3] - (Mean) radius of earth (defaults to radius in metres).\n * @returns {number} Distance along great circle to point nearest ‘this’ point.\n *\n * @example\n * const pCurrent = new LatLon(53.2611, -0.7972);\n * const p1 = new LatLon(53.3206, -1.7297);\n * const p2 = new LatLon(53.1887, 0.1334);\n * const d = pCurrent.alongTrackDistanceTo(p1, p2); // 62.331 km\n */\n alongTrackDistanceTo(pathStart, pathBrngEnd, radius=6371e3) {\n if (!(pathStart instanceof LatLonNvectorSpherical)) throw new TypeError(`invalid pathStart ‘${pathStart}’`);\n if (!(pathBrngEnd instanceof LatLonNvectorSpherical || !isNaN(pathBrngEnd))) throw new TypeError(`invalid pathBrngEnd ‘${pathBrngEnd}’`);\n\n const p = this.toNvector();\n const R = Number(radius);\n\n const gc = pathBrngEnd instanceof LatLonNvectorSpherical // (note JavaScript is not good at method overloading)\n ? pathStart.toNvector().cross(pathBrngEnd.toNvector()) // great circle defined by two points\n : pathStart.greatCircle(pathBrngEnd); // great circle defined by point + bearing\n\n const pat = gc.cross(p).cross(gc); // along-track point c × p × c\n\n const α = pathStart.toNvector().angleTo(pat, gc); // angle between start point and along-track point\n\n return α * R;\n }\n\n\n /**\n * Returns closest point on great circle segment between point1 & point2 to ‘this’ point.\n *\n * If this point is ‘within’ the extent of the segment, the point is on the segment between point1 &\n * point2; otherwise, it is the closer of the endpoints defining the segment.\n *\n * @param {LatLon} point1 - Start point of great circle segment.\n * @param {LatLon} point2 - End point of great circle segment.\n * @returns {LatLon} point on segment.\n *\n * @example\n * const p1 = new LatLon(51.0, 1.0);\n * const p2 = new LatLon(51.0, 2.0);\n *\n * const p0 = new LatLon(51.0, 1.9);\n * const p = p0.nearestPointOnSegment(p1, p2); // 51.0004°N, 001.9000°E\n * const d = p.distanceTo(p); // 42.71 m\n *\n * const p0 = new LatLon(51.0, 2.1);\n * const p = p0.nearestPointOnSegment(p1, p2); // 51.0000°N, 002.0000°E\n */\n nearestPointOnSegment(point1, point2) {\n let p = null;\n\n if (this.isWithinExtent(point1, point2) && !point1.equals(point2)) {\n // closer to segment than to its endpoints, find closest point on segment\n const n0 = this.toNvector(), n1 = point1.toNvector(), n2 = point2.toNvector();\n const c1 = n1.cross(n2); // n1×n2 = vector representing great circle through p1, p2\n const c2 = n0.cross(c1); // n0×c1 = vector representing great circle through p0 normal to c1\n const n = c1.cross(c2); // c2×c1 = nearest point on c1 to n0\n p = new NvectorSpherical(n.x, n.y, n.z).toLatLon();\n } else {\n // beyond segment extent, take closer endpoint\n const d1 = this.distanceTo(point1);\n const d2 = this.distanceTo(point2);\n const pCloser = d1<d2 ? point1 : point2;\n p = new LatLonNvectorSpherical(pCloser.lat, pCloser.lon);\n }\n\n return p;\n }\n\n\n /**\n * Returns whether this point is within the extent of a line segment joining point 1 & point 2.\n *\n * If this point is not on the great circle defined by point1 & point 2, returns whether it is\n * within the area bound by perpendiculars to the great circle at each point (in the same\n * hemisphere).\n *\n * @param {LatLon} point1 - First point defining segment.\n * @param {LatLon} point2 - Second point defining segment.\n * @returns {boolean} Whether this point is within extent of segment.\n *\n * @example\n * const p1 = new LatLon(51, 1), p2 = new LatLon(52, 2);\n * const within1 = new LatLon(52, 1).isWithinExtent(p1, p2); // true\n * const within2 = new LatLon(51, 0).isWithinExtent(p1, p2); // false\n */\n isWithinExtent(point1, point2) {\n if (point1.equals(point2)) return this.equals(point1); // null segment\n\n const n0 = this.toNvector(), n1 = point1.toNvector(), n2 = point2.toNvector(); // n-vectors\n\n // get vectors representing p0->p1, p0->p2, p1->p2, p2->p1\n const δ10 = n0.minus(n1), δ12 = n2.minus(n1);\n const δ20 = n0.minus(n2), δ21 = n1.minus(n2);\n\n // dot product δ10⋅δ12 tells us if p0 is on p2 side of p1, similarly for δ20⋅δ21\n const extent1 = δ10.dot(δ12);\n const extent2 = δ20.dot(δ21);\n\n const isSameHemisphere = n0.dot(n1)>=0 && n0.dot(n2)>=0;\n\n return extent1>=0 && extent2>=0 && isSameHemisphere;\n }\n\n\n /**\n * Locates a point given two known locations and bearings from those locations.\n *\n * @param {LatLon} point1 - First reference point.\n * @param {number} bearing1 - Bearing (in degrees from north) from first reference point.\n * @param {LatLon} point2 - Second reference point.\n * @param {number} bearing2 - Bearing (in degrees from north) from second reference point.\n * @returns {LatLon} Triangulated point.\n *\n * @example\n * const p1 = new LatLon(50.7175,1.65139), p2 = new LatLon(50.9250,1.7094);\n * const p = LatLon.triangulate(p1, 333.3508, p2, 310.1414); // 51.1297°N, 001.3214°E\n */\n static triangulate(point1, bearing1, point2, bearing2) {\n const n1 = point1.toNvector(), θ1 = Number(bearing1).toRadians();\n const n2 = point2.toNvector(), θ2 = Number(bearing2).toRadians();\n\n const N = new NvectorSpherical(0, 0, 1); // north pole\n\n const de1 = N.cross(n1).unit(); // east vector @ n1\n const dn1 = n1.cross(de1); // north vector @ n1\n const de1Sinθ = de1.times(Math.sin(θ1));\n const dn1Cosθ = dn1.times(Math.cos(θ1));\n const d1 = dn1Cosθ.plus(de1Sinθ); // direction vector @ n1\n\n const c1 = n1.cross(d1); // great circle p1 + bearing1\n\n const de2 = N.cross(n2).unit(); // east vector @ n2\n const dn2 = n2.cross(de2); // north vector @ n2\n const de2Sinθ = de2.times(Math.sin(θ2));\n const dn2Cosθ = dn2.times(Math.cos(θ2));\n const d2 = dn2Cosθ.plus(de2Sinθ); // direction vector @ n2\n\n const c2 = n2.cross(d2); // great circle p2 + bearing2\n\n const ni = c1.cross(c2); // n-vector of intersection point\n\n return new NvectorSpherical(ni.x, ni.y, ni.z).toLatLon();\n }\n\n\n /**\n * Locates a latitude/longitude point at given distances from three other points.\n *\n * @param {LatLon} point1 - First reference point.\n * @param {number} distance1 - Distance to first reference point (same units as radius).\n * @param {LatLon} point2 - Second reference point.\n * @param {number} distance2 - Distance to second reference point (same units as radius).\n * @param {LatLon} point3 - Third reference point.\n * @param {number} distance3 - Distance to third reference point (same units as radius).\n * @param {number} [radius=6371e3] - (Mean) radius of earth (defaults to radius in metres).\n * @returns {LatLon} Trilaterated point.\n *\n * @example\n * LatLon.trilaterate(new LatLon(0, 0), 157e3, new LatLon(0, 1), 111e3, new LatLon(1, 0), 111e3); // 00.9985°N, 000.9986°E\n */\n static trilaterate(point1, distance1, point2, distance2, point3, distance3, radius=6371e3) {\n // from en.wikipedia.org/wiki/Trilateration\n\n const n1 = point1.toNvector(), δ1 = Number(distance1)/Number(radius);\n const n2 = point2.toNvector(), δ2 = Number(distance2)/Number(radius);\n const n3 = point3.toNvector(), δ3 = Number(distance3)/Number(radius);\n\n // the following uses x,y coordinate system with origin at n1, x axis n1->n2\n const eX = n2.minus(n1).unit(); // unit vector in x direction n1->n2\n const i = eX.dot(n3.minus(n1)); // signed magnitude of x component of n1->n3\n const eY = n3.minus(n1).minus(eX.times(i)).unit(); // unit vector in y direction\n const d = n2.minus(n1).length; // distance n1->n2\n const j = eY.dot(n3.minus(n1)); // signed magnitude of y component of n1->n3\n const x = (δ1*δ1 - δ2*δ2 + d*d) / (2*d); // x component of n1 -> intersection\n const y = (δ1*δ1 - δ3*δ3 + i*i + j*j) / (2*j) - x*i/j; // y component of n1 -> intersection\n // const eZ = eX.cross(eY); // unit vector perpendicular to plane\n // const z = Math.sqrt(δ1*δ1 - x*x - y*y); // z will be NaN for no intersections\n\n if (!isFinite(x) || !isFinite(y)) return null; // coincident points?\n\n const n = n1.plus(eX.times(x)).plus(eY.times(y)); // note don't use z component; assume points at same height\n\n return new NvectorSpherical(n.x, n.y, n.z).toLatLon();\n }\n\n\n\n /**\n * Tests whether ‘this’ point is enclosed by the polygon defined by a set of points.\n *\n * @param {LatLon[]} polygon - Ordered array of points defining vertices of polygon.\n * @returns {bool} Whether this point is enclosed by polygon.\n *\n * @example\n * const bounds = [ new LatLon(45,1), new LatLon(45,2), new LatLon(46,2), new LatLon(46,1) ];\n * const p = new LatLon(45.1, 1.1);\n * const inside = p.isEnclosedBy(bounds); // true\n */\n isEnclosedBy(polygon) {\n // this method uses angle summation test; on a plane, angles for an enclosed point will sum\n // to 360°, angles for an exterior point will sum to 0°. On a sphere, enclosed point angles\n // will sum to less than 360° (due to spherical excess), exterior point angles will be small\n // but non-zero. TODO: are any winding number optimisations applicable to spherical surface?\n\n // close the polygon so that the last point equals the first point\n const closed = polygon[0].equals(polygon[polygon.length-1]);\n if (!closed) polygon.push(polygon[0]);\n\n const nVertices = polygon.length - 1;\n\n const p = this.toNvector();\n\n // get vectors from p to each vertex\n const vectorToVertex = [];\n for (let v=0; v<nVertices; v++) vectorToVertex[v] = p.minus(polygon[v].toNvector());\n vectorToVertex.push(vectorToVertex[0]);\n\n // sum subtended angles of each edge (using vector p to determine sign)\n let Σθ = 0;\n for (let v=0; v<nVertices; v++) {\n Σθ += vectorToVertex[v].angleTo(vectorToVertex[v+1], p);\n }\n\n if (!closed) polygon.pop(); // restore polygon to pristine condition\n\n return Math.abs(Σθ) > π;\n }\n\n\n /**\n * Calculates the area of a spherical polygon where the sides of the polygon are great circle\n * arcs joining the vertices.\n *\n * Uses Girard’s theorem: A = [Σθᵢ − (n−2)·π]·R²\n *\n * @param {LatLon[]} polygon - Array of points defining vertices of the polygon.\n * @param {number} [radius=6371e3] - (Mean) radius of earth (defaults to radius in metres).\n * @returns {number} The area of the polygon in the same units as radius.\n *\n * @example\n * const polygon = [ new LatLon(0,0), new LatLon(1,0), new LatLon(0,1) ];\n * const area = LatLon.areaOf(polygon); // 6.18e9 m²\n */\n static areaOf(polygon, radius=6371e3) {\n const R = Number(radius);\n\n // close the polygon so that the last point equals the first point\n const closed = polygon[0].equals(polygon[polygon.length-1]);\n if (!closed) polygon.push(polygon[0]);\n\n const n = polygon.length - 1; // number of vertices\n\n // get great-circle vector for each segment\n const c = [];\n for (let v=0; v<n; v++) {\n const i = polygon[v].toNvector();\n const j = polygon[v+1].toNvector();\n c[v] = i.cross(j); // great circle for segment v..v+1\n }\n c.push(c[0]);\n\n // sum interior angles; depending on whether polygon is cw or ccw, angle between edges is\n // π−α or π+α, where α is angle between great-circle vectors; so sum α, then take n·π − |Σα|\n // (cannot use Σ(π−|α|) as concave polygons would fail); use vector to 1st point as plane\n // normal for sign of α\n const n1 = polygon[0].toNvector();\n let Σα = 0;\n for (let v=0; v<n; v++) Σα += c[v].angleTo(c[v+1], n1);\n const Σθ = n*π - Math.abs(Σα);\n\n // note: angle between two sides of a spherical triangle is acos(c₁·c₂) where cₙ is the\n // plane normal vector to the great circle representing the triangle side - use this instead\n // of angleTo()?\n\n const E = (Σθ - (n-2)*π); // spherical excess (in steradians)\n const A = E * R*R; // area in units of R²\n\n if (!closed) polygon.pop(); // restore polygon to pristine condition\n\n return A;\n }\n\n\n /**\n * Returns point representing geographic mean of supplied points.\n *\n * @param {LatLon[]} points - Array of points to be averaged.\n * @returns {LatLon} Point at the geographic mean of the supplied points.\n *\n * @example\n * const p = LatLon.meanOf([ new LatLon(1, 1), new LatLon(4, 2), new LatLon(1, 3) ]); // 02.0001°N, 002.0000°E\n */\n static meanOf(points) {\n let m = new NvectorSpherical(0, 0, 0); // null vector\n\n // add all vectors\n for (let p = 0; p < points.length; p++) {\n m = m.plus(points[p].toNvector());\n }\n // m is now geographic mean\n\n return new NvectorSpherical(m.x, m.y, m.z).toLatLon();\n }\n\n\n /**\n * Checks if another point is equal to ‘this’ point.\n *\n * @param {LatLon} point - Point to be compared against this point.\n * @returns {bool} True if points have identical latitude and longitude values.\n * @throws {TypeError} Invalid point.\n *\n * @example\n * const p1 = new LatLon(52.205, 0.119);\n * const p2 = new LatLon(52.205, 0.119);\n * const equal = p1.equals(p2); // true\n */\n equals(point) {\n if (!(point instanceof LatLonNvectorSpherical)) throw new TypeError(`invalid point ‘${point}’`);\n\n if (Math.abs(this.lat - point.lat) > Number.EPSILON) return false;\n if (Math.abs(this.lon - point.lon) > Number.EPSILON) return false;\n\n return true;\n }\n\n\n /**\n * Converts ‘this’ point to a GeoJSON object.\n *\n * @returns {Object} this point as a GeoJSON ‘Point’ object.\n */\n toGeoJSON() {\n return { type: 'Point', coordinates: [ this.lon, this.lat ] };\n }\n\n\n /**\n * Returns a string representation of ‘this’ point, formatted as degrees, degrees+minutes, or\n * degrees+minutes+seconds.\n *\n * @param {string} [format=d] - Format point as 'd', 'dm', 'dms', or 'n' for signed numeric.\n * @param {number} [dp=4|2|0] - Number of decimal places to use: default 4 for d, 2 for dm, 0 for dms.\n * @returns {string} Comma-separated formatted latitude/longitude.\n *\n * @example\n * const greenwich = new LatLon(51.47788, -0.00147);\n * const d = greenwich.toString(); // 51.4778°N, 000.0015°W\n * const dms = greenwich.toString('dms', 2); // 51°28′40.37″N, 000°00′05.29″W\n * const [lat, lon] = greenwich.toString('n').split(','); // 51.4778, -0.0015\n */\n toString(format='d', dp=undefined) {\n // note: explicitly set dp to undefined for passing through to toLat/toLon\n if (![ 'd', 'dm', 'dms', 'n' ].includes(format)) throw new RangeError(`invalid format ‘${format}’`);\n\n if (format == 'n') { // signed numeric degrees\n if (dp == undefined) dp = 4;\n return `${this.lat.toFixed(dp)},${this.lon.toFixed(dp)}`;\n }\n const lat = Dms.toLat(this.lat, format, dp);\n const lon = Dms.toLon(this.lon, format, dp);\n return `${lat}, ${lon}`;\n }\n\n}\n\n\n/* Nvector - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\n\n\n/**\n * An n-vector is a (unit) vector normal to the Earth's surface (a non-singular position\n * representation).\n *\n * For many applications, n-vectors are more convenient to work with than other position\n * representations such as latitude/longitude, UTM coordinates, etc.\n *\n * On a spherical model earth, an n-vector is equivalent to a (normalised) earth-centred earth-fixed\n * (ECEF) vector.\n *\n * @extends Vector3d\n */\nclass NvectorSpherical extends Vector3d {\n\n // note commonality with latlon-nvector-ellipsoidal\n\n /**\n * Creates a 3d n-vector normal to the Earth’s surface.\n *\n * @param {number} x - X component of n-vector (towards 0°N, 0°E).\n * @param {number} y - Y component of n-vector (towards 0°N, 90°E).\n * @param {number} z - Z component of n-vector (towards 90°N).\n *\n * @example\n * import { Nvector } from '/js/geodesy/latlon-nvector-spherical.js';\n * const n = new Nvector(0.5000, 0.5000, 0.7071);\n */\n constructor(x, y, z) {\n const u = new Vector3d(x, y, z).unit(); // n-vectors are always normalised\n\n super(u.x, u.y, u.z);\n }\n\n\n /**\n * Converts ‘this’ n-vector to latitude/longitude point.\n *\n * @returns {LatLon} Latitude/longitude point vector points to.\n *\n * @example\n * const n = new Nvector(0.5000, 0.5000, 0.7071);\n * const p = n.toLatLon(); // 45.0°N, 045.0°E\n */\n toLatLon() {\n // tanφ = z / √(x²+y²), tanλ = y / x (same as ellipsoidal calculation)\n\n const x = this.x, y = this.y, z = this.z;\n\n const φ = Math.atan2(z, Math.sqrt(x*x + y*y));\n const λ = Math.atan2(y, x);\n\n return new LatLonNvectorSpherical(φ.toDegrees(), λ.toDegrees());\n }\n\n\n /**\n * Vector normal to great circle obtained by heading on given bearing from point given by\n * ‘this’ n-vector.\n *\n * Direction of vector is such that initial bearing vector b = c × n, where n is an n-vector\n * representing ‘this’ (start) point.\n *\n * @private\n * @param {number} bearing - Compass bearing in degrees.\n * @returns {Vector3d} Normalised vector representing great circle.\n *\n * @example\n * const n1 = new LatLon(53.3206, -1.7297).toNvector();\n * const gc = n1.greatCircle(96.0); // [-0.794,0.129,0.594]\n */\n greatCircle(bearing) {\n const θ = Number(bearing).toRadians();\n\n const N = new Vector3d(0, 0, 1); // n-vector representing north pole\n const e = N.cross(this); // easting\n const n = this.cross(e); // northing\n const eʹ = e.times(Math.cos(θ)/e.length);\n const nʹ = n.times(Math.sin(θ)/n.length);\n const c = nʹ.minus(eʹ);\n\n return c;\n }\n\n\n /**\n * Returns a string representation of ‘this’ n-vector.\n *\n * @param {number} [dp=3] - Number of decimal places to display.\n * @returns {string} Comma-separated x, y, z, h values.\n *\n * @example\n * const v = new Nvector(0.5000, 0.5000, 0.7071).toString(); // [0.500,0.500,0.707]\n */\n toString(dp=3) {\n const x = this.x.toFixed(dp);\n const y = this.y.toFixed(dp);\n const z = this.z.toFixed(dp);\n\n return `[${x},${y},${z}]`;\n }\n\n}\n\n\n/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */\n\nexport { LatLonNvectorSpherical as default, NvectorSpherical as Nvector, Dms };\n"} +{"text": "# Makefile.in generated by automake 1.16.1 from Makefile.am.\n# @configure_input@\n\n# Copyright (C) 1994-2018 Free Software Foundation, Inc.\n\n# This Makefile.in is free software; the Free Software Foundation\n# gives unlimited permission to copy and/or distribute it,\n# with or without modifications, as long as this notice is preserved.\n\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY, to the extent permitted by law; without\n# even the implied warranty of MERCHANTABILITY or FITNESS FOR A\n# PARTICULAR PURPOSE.\n\n@SET_MAKE@\nVPATH = @srcdir@\nam__is_gnu_make = { \\\n if test -z '$(MAKELEVEL)'; then \\\n false; \\\n elif test -n '$(MAKE_HOST)'; then \\\n true; \\\n elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \\\n true; \\\n else \\\n false; \\\n fi; \\\n}\nam__make_running_with_option = \\\n case $${target_option-} in \\\n ?) ;; \\\n *) echo \"am__make_running_with_option: internal error: invalid\" \\\n \"target option '$${target_option-}' specified\" >&2; \\\n exit 1;; \\\n esac; \\\n has_opt=no; \\\n sane_makeflags=$$MAKEFLAGS; \\\n if $(am__is_gnu_make); then \\\n sane_makeflags=$$MFLAGS; \\\n else \\\n case $$MAKEFLAGS in \\\n *\\\\[\\ \\\t]*) \\\n bs=\\\\; \\\n sane_makeflags=`printf '%s\\n' \"$$MAKEFLAGS\" \\\n | sed \"s/$$bs$$bs[$$bs $$bs\t]*//g\"`;; \\\n esac; \\\n fi; \\\n skip_next=no; \\\n strip_trailopt () \\\n { \\\n flg=`printf '%s\\n' \"$$flg\" | sed \"s/$$1.*$$//\"`; \\\n }; \\\n for flg in $$sane_makeflags; do \\\n test $$skip_next = yes && { skip_next=no; continue; }; \\\n case $$flg in \\\n *=*|--*) continue;; \\\n -*I) strip_trailopt 'I'; skip_next=yes;; \\\n -*I?*) strip_trailopt 'I';; \\\n -*O) strip_trailopt 'O'; skip_next=yes;; \\\n -*O?*) strip_trailopt 'O';; \\\n -*l) strip_trailopt 'l'; skip_next=yes;; \\\n -*l?*) strip_trailopt 'l';; \\\n -[dEDm]) skip_next=yes;; \\\n -[JT]) skip_next=yes;; \\\n esac; \\\n case $$flg in \\\n *$$target_option*) has_opt=yes; break;; \\\n esac; \\\n done; \\\n test $$has_opt = yes\nam__make_dryrun = (target_option=n; $(am__make_running_with_option))\nam__make_keepgoing = (target_option=k; $(am__make_running_with_option))\npkgdatadir = $(datadir)/@PACKAGE@\npkgincludedir = $(includedir)/@PACKAGE@\npkglibdir = $(libdir)/@PACKAGE@\npkglibexecdir = $(libexecdir)/@PACKAGE@\nam__cd = CDPATH=\"$${ZSH_VERSION+.}$(PATH_SEPARATOR)\" && cd\ninstall_sh_DATA = $(install_sh) -c -m 644\ninstall_sh_PROGRAM = $(install_sh) -c\ninstall_sh_SCRIPT = $(install_sh) -c\nINSTALL_HEADER = $(INSTALL_DATA)\ntransform = $(program_transform_name)\nNORMAL_INSTALL = :\nPRE_INSTALL = :\nPOST_INSTALL = :\nNORMAL_UNINSTALL = :\nPRE_UNINSTALL = :\nPOST_UNINSTALL = :\nbuild_triplet = @build@\nhost_triplet = @host@\nEXTRA_PROGRAMS = $(am__EXEEXT_3)\n@SAMRAI2D_ENABLED_TRUE@am__append_1 = main2d\n@SAMRAI2D_ENABLED_TRUE@am__append_2 = $(EXAMPLES)\nsubdir = examples/navier_stokes/ex2\nACLOCAL_M4 = $(top_srcdir)/aclocal.m4\nam__aclocal_m4_deps = $(top_srcdir)/m4/add_rpath.m4 \\\n\t$(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \\\n\t$(top_srcdir)/m4/ax_prefix_config_h.m4 \\\n\t$(top_srcdir)/m4/ax_prog_cc_mpi.m4 \\\n\t$(top_srcdir)/m4/ax_prog_cxx_mpi.m4 $(top_srcdir)/m4/boost.m4 \\\n\t$(top_srcdir)/m4/check_builtins.m4 \\\n\t$(top_srcdir)/m4/configure_boost.m4 \\\n\t$(top_srcdir)/m4/configure_eigen.m4 \\\n\t$(top_srcdir)/m4/configure_gsl.m4 \\\n\t$(top_srcdir)/m4/configure_hdf5.m4 \\\n\t$(top_srcdir)/m4/configure_hypre.m4 \\\n\t$(top_srcdir)/m4/configure_libmesh.m4 \\\n\t$(top_srcdir)/m4/configure_muparser.m4 \\\n\t$(top_srcdir)/m4/configure_petsc.m4 \\\n\t$(top_srcdir)/m4/configure_samrai.m4 \\\n\t$(top_srcdir)/m4/configure_silo.m4 $(top_srcdir)/m4/lib-ld.m4 \\\n\t$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \\\n\t$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/ltoptions.m4 \\\n\t$(top_srcdir)/m4/ltsugar.m4 $(top_srcdir)/m4/ltversion.m4 \\\n\t$(top_srcdir)/m4/lt~obsolete.m4 \\\n\t$(top_srcdir)/m4/package_utilities.m4 \\\n\t$(top_srcdir)/configure.ac\nam__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \\\n\t$(ACLOCAL_M4)\nDIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)\nmkinstalldirs = $(install_sh) -d\nCONFIG_HEADER = $(top_builddir)/config/IBAMR_config.h.tmp\nCONFIG_CLEAN_FILES =\nCONFIG_CLEAN_VPATH_FILES =\n@SAMRAI2D_ENABLED_TRUE@am__EXEEXT_1 = main2d$(EXEEXT)\nam__EXEEXT_2 = $(am__EXEEXT_1)\n@SAMRAI2D_ENABLED_TRUE@am__EXEEXT_3 = $(am__EXEEXT_2)\nam__objects_1 = main2d-example.$(OBJEXT)\nam_main2d_OBJECTS = $(am__objects_1)\nmain2d_OBJECTS = $(am_main2d_OBJECTS)\nmain2d_DEPENDENCIES = $(IBAMR2d_LIBS) $(IBAMR_LIBS)\nAM_V_lt = $(am__v_lt_@AM_V@)\nam__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)\nam__v_lt_0 = --silent\nam__v_lt_1 = \nmain2d_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \\\n\t$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(main2d_CXXFLAGS) \\\n\t$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@\nAM_V_P = $(am__v_P_@AM_V@)\nam__v_P_ = $(am__v_P_@AM_DEFAULT_V@)\nam__v_P_0 = false\nam__v_P_1 = :\nAM_V_GEN = $(am__v_GEN_@AM_V@)\nam__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)\nam__v_GEN_0 = @echo \" GEN \" $@;\nam__v_GEN_1 = \nAM_V_at = $(am__v_at_@AM_V@)\nam__v_at_ = $(am__v_at_@AM_DEFAULT_V@)\nam__v_at_0 = @\nam__v_at_1 = \nDEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config\ndepcomp = $(SHELL) $(top_srcdir)/config/depcomp\nam__maybe_remake_depfiles = depfiles\nam__depfiles_remade = ./$(DEPDIR)/main2d-example.Po\nam__mv = mv -f\nCXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \\\n\t$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)\nLTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \\\n\t$(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \\\n\t$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \\\n\t$(AM_CXXFLAGS) $(CXXFLAGS)\nAM_V_CXX = $(am__v_CXX_@AM_V@)\nam__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)\nam__v_CXX_0 = @echo \" CXX \" $@;\nam__v_CXX_1 = \nCXXLD = $(CXX)\nCXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \\\n\t$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \\\n\t$(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@\nAM_V_CXXLD = $(am__v_CXXLD_@AM_V@)\nam__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)\nam__v_CXXLD_0 = @echo \" CXXLD \" $@;\nam__v_CXXLD_1 = \nSOURCES = $(main2d_SOURCES)\nDIST_SOURCES = $(main2d_SOURCES)\nam__can_run_installinfo = \\\n case $$AM_UPDATE_INFO_DIR in \\\n n|no|NO) false;; \\\n *) (install-info --version) >/dev/null 2>&1;; \\\n esac\nam__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)\n# Read a list of newline-separated strings from the standard input,\n# and print each of them once, without duplicates. Input order is\n# *not* preserved.\nam__uniquify_input = $(AWK) '\\\n BEGIN { nonempty = 0; } \\\n { items[$$0] = 1; nonempty = 1; } \\\n END { if (nonempty) { for (i in items) print i; }; } \\\n'\n# Make sure the list of sources is unique. This is necessary because,\n# e.g., the same source file might be shared among _SOURCES variables\n# for different programs/libraries.\nam__define_uniq_tagged_files = \\\n list='$(am__tagged_files)'; \\\n unique=`for i in $$list; do \\\n if test -f \"$$i\"; then echo $$i; else echo $(srcdir)/$$i; fi; \\\n done | $(am__uniquify_input)`\nETAGS = etags\nCTAGS = ctags\nam__DIST_COMMON = $(srcdir)/Makefile.in \\\n\t$(top_srcdir)/config/Make-rules $(top_srcdir)/config/depcomp\nDISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)\nACLOCAL = @ACLOCAL@\nAMTAR = @AMTAR@\nAM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@\nAR = @AR@\nAUTOCONF = @AUTOCONF@\nAUTOHEADER = @AUTOHEADER@\nAUTOMAKE = @AUTOMAKE@\nAWK = @AWK@\nBOOST_CPPFLAGS = @BOOST_CPPFLAGS@\nBOOST_ROOT = @BOOST_ROOT@\nCC = @CC@\nCCDEPMODE = @CCDEPMODE@\nCFLAGS = @CFLAGS@\nCPP = @CPP@\nCPPFLAGS = @CPPFLAGS@\nCXX = @CXX@\nCXXCPP = @CXXCPP@\nCXXDEPMODE = @CXXDEPMODE@\nCXXFLAGS = @CXXFLAGS@\nCYGPATH_W = @CYGPATH_W@\nDEFS = @DEFS@\nDEPDIR = @DEPDIR@\nDISTCHECK_CONFIGURE_FLAGS = @DISTCHECK_CONFIGURE_FLAGS@\nDLLTOOL = @DLLTOOL@\nDSYMUTIL = @DSYMUTIL@\nDUMPBIN = @DUMPBIN@\nECHO_C = @ECHO_C@\nECHO_N = @ECHO_N@\nECHO_T = @ECHO_T@\nEGREP = @EGREP@\nEXEEXT = @EXEEXT@\nF77 = @F77@\nFC = @FC@\nFCFLAGS = @FCFLAGS@\nFCFLAGS_f = @FCFLAGS_f@\nFCLIBS = @FCLIBS@\nFFLAGS = @FFLAGS@\nFGREP = @FGREP@\nFLIBS = @FLIBS@\nGREP = @GREP@\nHAVE_CXX11 = @HAVE_CXX11@\nHAVE_LIBGSL = @HAVE_LIBGSL@\nHAVE_LIBGSLCBLAS = @HAVE_LIBGSLCBLAS@\nHAVE_LIBMESH_DBG = @HAVE_LIBMESH_DBG@\nHAVE_LIBMESH_DEVEL = @HAVE_LIBMESH_DEVEL@\nHAVE_LIBMESH_OPROF = @HAVE_LIBMESH_OPROF@\nHAVE_LIBMESH_OPT = @HAVE_LIBMESH_OPT@\nHAVE_LIBMESH_PROF = @HAVE_LIBMESH_PROF@\nHAVE_LIBMUPARSER = @HAVE_LIBMUPARSER@\nHAVE_LIBSAMRAI = @HAVE_LIBSAMRAI@\nHAVE_LIBSAMRAI2D_ALGS = @HAVE_LIBSAMRAI2D_ALGS@\nHAVE_LIBSAMRAI2D_APPU = @HAVE_LIBSAMRAI2D_APPU@\nHAVE_LIBSAMRAI2D_GEOM = @HAVE_LIBSAMRAI2D_GEOM@\nHAVE_LIBSAMRAI2D_HIER = @HAVE_LIBSAMRAI2D_HIER@\nHAVE_LIBSAMRAI2D_MATH_STD = @HAVE_LIBSAMRAI2D_MATH_STD@\nHAVE_LIBSAMRAI2D_MESH = @HAVE_LIBSAMRAI2D_MESH@\nHAVE_LIBSAMRAI2D_PDAT_STD = @HAVE_LIBSAMRAI2D_PDAT_STD@\nHAVE_LIBSAMRAI2D_SOLV = @HAVE_LIBSAMRAI2D_SOLV@\nHAVE_LIBSAMRAI2D_XFER = @HAVE_LIBSAMRAI2D_XFER@\nHAVE_LIBSAMRAI3D_ALGS = @HAVE_LIBSAMRAI3D_ALGS@\nHAVE_LIBSAMRAI3D_APPU = @HAVE_LIBSAMRAI3D_APPU@\nHAVE_LIBSAMRAI3D_GEOM = @HAVE_LIBSAMRAI3D_GEOM@\nHAVE_LIBSAMRAI3D_HIER = @HAVE_LIBSAMRAI3D_HIER@\nHAVE_LIBSAMRAI3D_MATH_STD = @HAVE_LIBSAMRAI3D_MATH_STD@\nHAVE_LIBSAMRAI3D_MESH = @HAVE_LIBSAMRAI3D_MESH@\nHAVE_LIBSAMRAI3D_PDAT_STD = @HAVE_LIBSAMRAI3D_PDAT_STD@\nHAVE_LIBSAMRAI3D_SOLV = @HAVE_LIBSAMRAI3D_SOLV@\nHAVE_LIBSAMRAI3D_XFER = @HAVE_LIBSAMRAI3D_XFER@\nINSTALL = @INSTALL@\nINSTALL_DATA = @INSTALL_DATA@\nINSTALL_PROGRAM = @INSTALL_PROGRAM@\nINSTALL_SCRIPT = @INSTALL_SCRIPT@\nINSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@\nLD = @LD@\nLDFLAGS = @LDFLAGS@\nLIBGSL = @LIBGSL@\nLIBGSLCBLAS = @LIBGSLCBLAS@\nLIBGSLCBLAS_PREFIX = @LIBGSLCBLAS_PREFIX@\nLIBGSL_PREFIX = @LIBGSL_PREFIX@\nLIBMESH_CONFIG = @LIBMESH_CONFIG@\nLIBMESH_DBG = @LIBMESH_DBG@\nLIBMESH_DBG_PREFIX = @LIBMESH_DBG_PREFIX@\nLIBMESH_DEVEL = @LIBMESH_DEVEL@\nLIBMESH_DEVEL_PREFIX = @LIBMESH_DEVEL_PREFIX@\nLIBMESH_OPROF = @LIBMESH_OPROF@\nLIBMESH_OPROF_PREFIX = @LIBMESH_OPROF_PREFIX@\nLIBMESH_OPT = @LIBMESH_OPT@\nLIBMESH_OPT_PREFIX = @LIBMESH_OPT_PREFIX@\nLIBMESH_PROF = @LIBMESH_PROF@\nLIBMESH_PROF_PREFIX = @LIBMESH_PROF_PREFIX@\nLIBMUPARSER = @LIBMUPARSER@\nLIBMUPARSER_PREFIX = @LIBMUPARSER_PREFIX@\nLIBOBJS = @LIBOBJS@\nLIBS = @LIBS@\nLIBSAMRAI = @LIBSAMRAI@\nLIBSAMRAI2D_ALGS = @LIBSAMRAI2D_ALGS@\nLIBSAMRAI2D_ALGS_PREFIX = @LIBSAMRAI2D_ALGS_PREFIX@\nLIBSAMRAI2D_APPU = @LIBSAMRAI2D_APPU@\nLIBSAMRAI2D_APPU_PREFIX = @LIBSAMRAI2D_APPU_PREFIX@\nLIBSAMRAI2D_GEOM = @LIBSAMRAI2D_GEOM@\nLIBSAMRAI2D_GEOM_PREFIX = @LIBSAMRAI2D_GEOM_PREFIX@\nLIBSAMRAI2D_HIER = @LIBSAMRAI2D_HIER@\nLIBSAMRAI2D_HIER_PREFIX = @LIBSAMRAI2D_HIER_PREFIX@\nLIBSAMRAI2D_MATH_STD = @LIBSAMRAI2D_MATH_STD@\nLIBSAMRAI2D_MATH_STD_PREFIX = @LIBSAMRAI2D_MATH_STD_PREFIX@\nLIBSAMRAI2D_MESH = @LIBSAMRAI2D_MESH@\nLIBSAMRAI2D_MESH_PREFIX = @LIBSAMRAI2D_MESH_PREFIX@\nLIBSAMRAI2D_PDAT_STD = @LIBSAMRAI2D_PDAT_STD@\nLIBSAMRAI2D_PDAT_STD_PREFIX = @LIBSAMRAI2D_PDAT_STD_PREFIX@\nLIBSAMRAI2D_SOLV = @LIBSAMRAI2D_SOLV@\nLIBSAMRAI2D_SOLV_PREFIX = @LIBSAMRAI2D_SOLV_PREFIX@\nLIBSAMRAI2D_XFER = @LIBSAMRAI2D_XFER@\nLIBSAMRAI2D_XFER_PREFIX = @LIBSAMRAI2D_XFER_PREFIX@\nLIBSAMRAI3D_ALGS = @LIBSAMRAI3D_ALGS@\nLIBSAMRAI3D_ALGS_PREFIX = @LIBSAMRAI3D_ALGS_PREFIX@\nLIBSAMRAI3D_APPU = @LIBSAMRAI3D_APPU@\nLIBSAMRAI3D_APPU_PREFIX = @LIBSAMRAI3D_APPU_PREFIX@\nLIBSAMRAI3D_GEOM = @LIBSAMRAI3D_GEOM@\nLIBSAMRAI3D_GEOM_PREFIX = @LIBSAMRAI3D_GEOM_PREFIX@\nLIBSAMRAI3D_HIER = @LIBSAMRAI3D_HIER@\nLIBSAMRAI3D_HIER_PREFIX = @LIBSAMRAI3D_HIER_PREFIX@\nLIBSAMRAI3D_MATH_STD = @LIBSAMRAI3D_MATH_STD@\nLIBSAMRAI3D_MATH_STD_PREFIX = @LIBSAMRAI3D_MATH_STD_PREFIX@\nLIBSAMRAI3D_MESH = @LIBSAMRAI3D_MESH@\nLIBSAMRAI3D_MESH_PREFIX = @LIBSAMRAI3D_MESH_PREFIX@\nLIBSAMRAI3D_PDAT_STD = @LIBSAMRAI3D_PDAT_STD@\nLIBSAMRAI3D_PDAT_STD_PREFIX = @LIBSAMRAI3D_PDAT_STD_PREFIX@\nLIBSAMRAI3D_SOLV = @LIBSAMRAI3D_SOLV@\nLIBSAMRAI3D_SOLV_PREFIX = @LIBSAMRAI3D_SOLV_PREFIX@\nLIBSAMRAI3D_XFER = @LIBSAMRAI3D_XFER@\nLIBSAMRAI3D_XFER_PREFIX = @LIBSAMRAI3D_XFER_PREFIX@\nLIBSAMRAI_PREFIX = @LIBSAMRAI_PREFIX@\nLIBTOOL = @LIBTOOL@\nLIPO = @LIPO@\nLN_S = @LN_S@\nLTLIBGSL = @LTLIBGSL@\nLTLIBGSLCBLAS = @LTLIBGSLCBLAS@\nLTLIBMESH_DBG = @LTLIBMESH_DBG@\nLTLIBMESH_DEVEL = @LTLIBMESH_DEVEL@\nLTLIBMESH_OPROF = @LTLIBMESH_OPROF@\nLTLIBMESH_OPT = @LTLIBMESH_OPT@\nLTLIBMESH_PROF = @LTLIBMESH_PROF@\nLTLIBMUPARSER = @LTLIBMUPARSER@\nLTLIBOBJS = @LTLIBOBJS@\nLTLIBSAMRAI = @LTLIBSAMRAI@\nLTLIBSAMRAI2D_ALGS = @LTLIBSAMRAI2D_ALGS@\nLTLIBSAMRAI2D_APPU = @LTLIBSAMRAI2D_APPU@\nLTLIBSAMRAI2D_GEOM = @LTLIBSAMRAI2D_GEOM@\nLTLIBSAMRAI2D_HIER = @LTLIBSAMRAI2D_HIER@\nLTLIBSAMRAI2D_MATH_STD = @LTLIBSAMRAI2D_MATH_STD@\nLTLIBSAMRAI2D_MESH = @LTLIBSAMRAI2D_MESH@\nLTLIBSAMRAI2D_PDAT_STD = @LTLIBSAMRAI2D_PDAT_STD@\nLTLIBSAMRAI2D_SOLV = @LTLIBSAMRAI2D_SOLV@\nLTLIBSAMRAI2D_XFER = @LTLIBSAMRAI2D_XFER@\nLTLIBSAMRAI3D_ALGS = @LTLIBSAMRAI3D_ALGS@\nLTLIBSAMRAI3D_APPU = @LTLIBSAMRAI3D_APPU@\nLTLIBSAMRAI3D_GEOM = @LTLIBSAMRAI3D_GEOM@\nLTLIBSAMRAI3D_HIER = @LTLIBSAMRAI3D_HIER@\nLTLIBSAMRAI3D_MATH_STD = @LTLIBSAMRAI3D_MATH_STD@\nLTLIBSAMRAI3D_MESH = @LTLIBSAMRAI3D_MESH@\nLTLIBSAMRAI3D_PDAT_STD = @LTLIBSAMRAI3D_PDAT_STD@\nLTLIBSAMRAI3D_SOLV = @LTLIBSAMRAI3D_SOLV@\nLTLIBSAMRAI3D_XFER = @LTLIBSAMRAI3D_XFER@\nLT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@\nM4 = @M4@\nMAINT = @MAINT@\nMAKEINFO = @MAKEINFO@\nMANIFEST_TOOL = @MANIFEST_TOOL@\nMKDIR_P = @MKDIR_P@\nMPICC = @MPICC@\nMPICXX = @MPICXX@\nMPIEXEC = @MPIEXEC@\nNM = @NM@\nNMEDIT = @NMEDIT@\nNUMDIFF = @NUMDIFF@\nOBJDUMP = @OBJDUMP@\nOBJEXT = @OBJEXT@\nOTOOL = @OTOOL@\nOTOOL64 = @OTOOL64@\nPACKAGE = @PACKAGE@\nPACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@\nPACKAGE_CONTRIB_LIBS = @PACKAGE_CONTRIB_LIBS@\nPACKAGE_CPPFLAGS = @PACKAGE_CPPFLAGS@\nPACKAGE_LDFLAGS = @PACKAGE_LDFLAGS@\nPACKAGE_LIBS = @PACKAGE_LIBS@\nPACKAGE_NAME = @PACKAGE_NAME@\nPACKAGE_STRING = @PACKAGE_STRING@\nPACKAGE_TARNAME = @PACKAGE_TARNAME@\nPACKAGE_URL = @PACKAGE_URL@\nPACKAGE_VERSION = @PACKAGE_VERSION@\nPATH_SEPARATOR = @PATH_SEPARATOR@\nPETSC_ARCH = @PETSC_ARCH@\nPETSC_DIR = @PETSC_DIR@\nRANLIB = @RANLIB@\nSAMRAI_DIR = @SAMRAI_DIR@\nSAMRAI_FORTDIR = @SAMRAI_FORTDIR@\nSED = @SED@\nSET_MAKE = @SET_MAKE@\nSHELL = @SHELL@\nSTRIP = @STRIP@\nVERSION = @VERSION@\nabs_builddir = @abs_builddir@\nabs_srcdir = @abs_srcdir@\nabs_top_builddir = @abs_top_builddir@\nabs_top_srcdir = @abs_top_srcdir@\nac_ct_AR = @ac_ct_AR@\nac_ct_CC = @ac_ct_CC@\nac_ct_CXX = @ac_ct_CXX@\nac_ct_DUMPBIN = @ac_ct_DUMPBIN@\nac_ct_FC = @ac_ct_FC@\nam__include = @am__include@\nam__leading_dot = @am__leading_dot@\nam__quote = @am__quote@\nam__tar = @am__tar@\nam__untar = @am__untar@\nbindir = @bindir@\nbuild = @build@\nbuild_alias = @build_alias@\nbuild_cpu = @build_cpu@\nbuild_os = @build_os@\nbuild_vendor = @build_vendor@\nbuilddir = @builddir@\ndatadir = @datadir@\ndatarootdir = @datarootdir@\ndocdir = @docdir@\ndvidir = @dvidir@\nexec_prefix = @exec_prefix@\nhost = @host@\nhost_alias = @host_alias@\nhost_cpu = @host_cpu@\nhost_os = @host_os@\nhost_vendor = @host_vendor@\nhtmldir = @htmldir@\nincludedir = @includedir@\ninfodir = @infodir@\ninstall_sh = @install_sh@\nlibdir = @libdir@\nlibexecdir = @libexecdir@\nlocaledir = @localedir@\nlocalstatedir = @localstatedir@\nmandir = @mandir@\nmkdir_p = @mkdir_p@\noldincludedir = @oldincludedir@\npdfdir = @pdfdir@\nprefix = @prefix@\nprogram_transform_name = @program_transform_name@\npsdir = @psdir@\nsbindir = @sbindir@\nsharedstatedir = @sharedstatedir@\nsrcdir = @srcdir@\nsubdirs = @subdirs@\nsysconfdir = @sysconfdir@\ntarget_alias = @target_alias@\ntop_build_prefix = @top_build_prefix@\ntop_builddir = @top_builddir@\ntop_srcdir = @top_srcdir@\nMAINTAINERCLEANFILES = Makefile.in\nAM_CPPFLAGS = -I${top_srcdir}/include -I${top_srcdir}/ibtk/include -I${top_builddir}/config -I${top_builddir}/ibtk/config\nAM_LDFLAGS = -L${top_builddir}/lib -L${top_builddir}/ibtk/lib\nIBAMR_LIBS = ${top_builddir}/lib/libIBAMR.a ${top_builddir}/ibtk/lib/libIBTK.a\nIBAMR2d_LIBS = ${top_builddir}/lib/libIBAMR2d.a ${top_builddir}/ibtk/lib/libIBTK2d.a\nIBAMR3d_LIBS = ${top_builddir}/lib/libIBAMR3d.a ${top_builddir}/ibtk/lib/libIBTK3d.a\npkg_includedir = $(includedir)/@PACKAGE@\nSUFFIXES = .f.m4\nEXAMPLE_DRIVER = example.cpp\nEXTRA_DIST = input2d\nEXAMPLES = $(am__append_1)\nmain2d_CXXFLAGS = $(AM_CXXFLAGS) -DNDIM=2\nmain2d_LDADD = $(IBAMR_LDFLAGS) $(IBAMR2d_LIBS) $(IBAMR_LIBS)\nmain2d_SOURCES = $(EXAMPLE_DRIVER)\nall: all-am\n\n.SUFFIXES:\n.SUFFIXES: .f.m4 .cpp .f .lo .o .obj\n$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(top_srcdir)/config/Make-rules $(am__configure_deps)\n\t@for dep in $?; do \\\n\t case '$(am__configure_deps)' in \\\n\t *$$dep*) \\\n\t ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \\\n\t && { if test -f $@; then exit 0; else break; fi; }; \\\n\t exit 1;; \\\n\t esac; \\\n\tdone; \\\n\techo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign examples/navier_stokes/ex2/Makefile'; \\\n\t$(am__cd) $(top_srcdir) && \\\n\t $(AUTOMAKE) --foreign examples/navier_stokes/ex2/Makefile\nMakefile: $(srcdir)/Makefile.in $(top_builddir)/config.status\n\t@case '$?' in \\\n\t *config.status*) \\\n\t cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \\\n\t *) \\\n\t echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \\\n\t cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \\\n\tesac;\n$(top_srcdir)/config/Make-rules $(am__empty):\n\n$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)\n\tcd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh\n\n$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)\n\tcd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh\n$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)\n\tcd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh\n$(am__aclocal_m4_deps):\n\nmain2d$(EXEEXT): $(main2d_OBJECTS) $(main2d_DEPENDENCIES) $(EXTRA_main2d_DEPENDENCIES) \n\t@rm -f main2d$(EXEEXT)\n\t$(AM_V_CXXLD)$(main2d_LINK) $(main2d_OBJECTS) $(main2d_LDADD) $(LIBS)\n\nmostlyclean-compile:\n\t-rm -f *.$(OBJEXT)\n\ndistclean-compile:\n\t-rm -f *.tab.c\n\n@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main2d-example.Po@am__quote@ # am--include-marker\n\n$(am__depfiles_remade):\n\t@$(MKDIR_P) $(@D)\n\t@echo '# dummy' >$@-t && $(am__mv) $@-t $@\n\nam--depfiles: $(am__depfiles_remade)\n\n.cpp.o:\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\\.o$$||'`;\\\n@am__fastdepCXX_TRUE@\t$(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\\\n@am__fastdepCXX_TRUE@\t$(am__mv) $$depbase.Tpo $$depbase.Po\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<\n\n.cpp.obj:\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\\.obj$$||'`;\\\n@am__fastdepCXX_TRUE@\t$(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\\\n@am__fastdepCXX_TRUE@\t$(am__mv) $$depbase.Tpo $$depbase.Po\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`\n\n.cpp.lo:\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\\.lo$$||'`;\\\n@am__fastdepCXX_TRUE@\t$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\\\n@am__fastdepCXX_TRUE@\t$(am__mv) $$depbase.Tpo $$depbase.Plo\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<\n\nmain2d-example.o: example.cpp\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(main2d_CXXFLAGS) $(CXXFLAGS) -MT main2d-example.o -MD -MP -MF $(DEPDIR)/main2d-example.Tpo -c -o main2d-example.o `test -f 'example.cpp' || echo '$(srcdir)/'`example.cpp\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/main2d-example.Tpo $(DEPDIR)/main2d-example.Po\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='example.cpp' object='main2d-example.o' libtool=no @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(main2d_CXXFLAGS) $(CXXFLAGS) -c -o main2d-example.o `test -f 'example.cpp' || echo '$(srcdir)/'`example.cpp\n\nmain2d-example.obj: example.cpp\n@am__fastdepCXX_TRUE@\t$(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(main2d_CXXFLAGS) $(CXXFLAGS) -MT main2d-example.obj -MD -MP -MF $(DEPDIR)/main2d-example.Tpo -c -o main2d-example.obj `if test -f 'example.cpp'; then $(CYGPATH_W) 'example.cpp'; else $(CYGPATH_W) '$(srcdir)/example.cpp'; fi`\n@am__fastdepCXX_TRUE@\t$(AM_V_at)$(am__mv) $(DEPDIR)/main2d-example.Tpo $(DEPDIR)/main2d-example.Po\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\t$(AM_V_CXX)source='example.cpp' object='main2d-example.obj' libtool=no @AMDEPBACKSLASH@\n@AMDEP_TRUE@@am__fastdepCXX_FALSE@\tDEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@\n@am__fastdepCXX_FALSE@\t$(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(main2d_CXXFLAGS) $(CXXFLAGS) -c -o main2d-example.obj `if test -f 'example.cpp'; then $(CYGPATH_W) 'example.cpp'; else $(CYGPATH_W) '$(srcdir)/example.cpp'; fi`\n\nmostlyclean-libtool:\n\t-rm -f *.lo\n\nclean-libtool:\n\t-rm -rf .libs _libs\n\nID: $(am__tagged_files)\n\t$(am__define_uniq_tagged_files); mkid -fID $$unique\ntags: tags-am\nTAGS: tags\n\ntags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)\n\tset x; \\\n\there=`pwd`; \\\n\t$(am__define_uniq_tagged_files); \\\n\tshift; \\\n\tif test -z \"$(ETAGS_ARGS)$$*$$unique\"; then :; else \\\n\t test -n \"$$unique\" || unique=$$empty_fix; \\\n\t if test $$# -gt 0; then \\\n\t $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \\\n\t \"$$@\" $$unique; \\\n\t else \\\n\t $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \\\n\t $$unique; \\\n\t fi; \\\n\tfi\nctags: ctags-am\n\nCTAGS: ctags\nctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)\n\t$(am__define_uniq_tagged_files); \\\n\ttest -z \"$(CTAGS_ARGS)$$unique\" \\\n\t || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \\\n\t $$unique\n\nGTAGS:\n\there=`$(am__cd) $(top_builddir) && pwd` \\\n\t && $(am__cd) $(top_srcdir) \\\n\t && gtags -i $(GTAGS_ARGS) \"$$here\"\ncscopelist: cscopelist-am\n\ncscopelist-am: $(am__tagged_files)\n\tlist='$(am__tagged_files)'; \\\n\tcase \"$(srcdir)\" in \\\n\t [\\\\/]* | ?:[\\\\/]*) sdir=\"$(srcdir)\" ;; \\\n\t *) sdir=$(subdir)/$(srcdir) ;; \\\n\tesac; \\\n\tfor i in $$list; do \\\n\t if test -f \"$$i\"; then \\\n\t echo \"$(subdir)/$$i\"; \\\n\t else \\\n\t echo \"$$sdir/$$i\"; \\\n\t fi; \\\n\tdone >> $(top_builddir)/cscope.files\n\ndistclean-tags:\n\t-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags\n\ndistdir: $(BUILT_SOURCES)\n\t$(MAKE) $(AM_MAKEFLAGS) distdir-am\n\ndistdir-am: $(DISTFILES)\n\t@srcdirstrip=`echo \"$(srcdir)\" | sed 's/[].[^$$\\\\*]/\\\\\\\\&/g'`; \\\n\ttopsrcdirstrip=`echo \"$(top_srcdir)\" | sed 's/[].[^$$\\\\*]/\\\\\\\\&/g'`; \\\n\tlist='$(DISTFILES)'; \\\n\t dist_files=`for file in $$list; do echo $$file; done | \\\n\t sed -e \"s|^$$srcdirstrip/||;t\" \\\n\t -e \"s|^$$topsrcdirstrip/|$(top_builddir)/|;t\"`; \\\n\tcase $$dist_files in \\\n\t */*) $(MKDIR_P) `echo \"$$dist_files\" | \\\n\t\t\t sed '/\\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \\\n\t\t\t sort -u` ;; \\\n\tesac; \\\n\tfor file in $$dist_files; do \\\n\t if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \\\n\t if test -d $$d/$$file; then \\\n\t dir=`echo \"/$$file\" | sed -e 's,/[^/]*$$,,'`; \\\n\t if test -d \"$(distdir)/$$file\"; then \\\n\t find \"$(distdir)/$$file\" -type d ! -perm -700 -exec chmod u+rwx {} \\;; \\\n\t fi; \\\n\t if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \\\n\t cp -fpR $(srcdir)/$$file \"$(distdir)$$dir\" || exit 1; \\\n\t find \"$(distdir)/$$file\" -type d ! -perm -700 -exec chmod u+rwx {} \\;; \\\n\t fi; \\\n\t cp -fpR $$d/$$file \"$(distdir)$$dir\" || exit 1; \\\n\t else \\\n\t test -f \"$(distdir)/$$file\" \\\n\t || cp -p $$d/$$file \"$(distdir)/$$file\" \\\n\t || exit 1; \\\n\t fi; \\\n\tdone\ncheck-am: all-am\ncheck: check-am\nall-am: Makefile\ninstalldirs:\ninstall: install-am\ninstall-exec: install-exec-am\ninstall-data: install-data-am\nuninstall: uninstall-am\n\ninstall-am: all-am\n\t@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am\n\ninstallcheck: installcheck-am\ninstall-strip:\n\tif test -z '$(STRIP)'; then \\\n\t $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" \\\n\t install_sh_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" INSTALL_STRIP_FLAG=-s \\\n\t install; \\\n\telse \\\n\t $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" \\\n\t install_sh_PROGRAM=\"$(INSTALL_STRIP_PROGRAM)\" INSTALL_STRIP_FLAG=-s \\\n\t \"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'\" install; \\\n\tfi\nmostlyclean-generic:\n\nclean-generic:\n\ndistclean-generic:\n\t-test -z \"$(CONFIG_CLEAN_FILES)\" || rm -f $(CONFIG_CLEAN_FILES)\n\t-test . = \"$(srcdir)\" || test -z \"$(CONFIG_CLEAN_VPATH_FILES)\" || rm -f $(CONFIG_CLEAN_VPATH_FILES)\n\nmaintainer-clean-generic:\n\t@echo \"This command is intended for maintainers to use\"\n\t@echo \"it deletes files that may require special tools to rebuild.\"\n\t-test -z \"$(MAINTAINERCLEANFILES)\" || rm -f $(MAINTAINERCLEANFILES)\nclean: clean-am\n\nclean-am: clean-generic clean-libtool clean-local mostlyclean-am\n\ndistclean: distclean-am\n\t\t-rm -f ./$(DEPDIR)/main2d-example.Po\n\t-rm -f Makefile\ndistclean-am: clean-am distclean-compile distclean-generic \\\n\tdistclean-tags\n\ndvi: dvi-am\n\ndvi-am:\n\nhtml: html-am\n\nhtml-am:\n\ninfo: info-am\n\ninfo-am:\n\ninstall-data-am:\n\ninstall-dvi: install-dvi-am\n\ninstall-dvi-am:\n\ninstall-exec-am:\n\ninstall-html: install-html-am\n\ninstall-html-am:\n\ninstall-info: install-info-am\n\ninstall-info-am:\n\ninstall-man:\n\ninstall-pdf: install-pdf-am\n\ninstall-pdf-am:\n\ninstall-ps: install-ps-am\n\ninstall-ps-am:\n\ninstallcheck-am:\n\nmaintainer-clean: maintainer-clean-am\n\t\t-rm -f ./$(DEPDIR)/main2d-example.Po\n\t-rm -f Makefile\nmaintainer-clean-am: distclean-am maintainer-clean-generic\n\nmostlyclean: mostlyclean-am\n\nmostlyclean-am: mostlyclean-compile mostlyclean-generic \\\n\tmostlyclean-libtool\n\npdf: pdf-am\n\npdf-am:\n\nps: ps-am\n\nps-am:\n\nuninstall-am:\n\n.MAKE: install-am install-strip\n\n.PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \\\n\tclean-generic clean-libtool clean-local cscopelist-am ctags \\\n\tctags-am distclean distclean-compile distclean-generic \\\n\tdistclean-libtool distclean-tags distdir dvi dvi-am html \\\n\thtml-am info info-am install install-am install-data \\\n\tinstall-data-am install-dvi install-dvi-am install-exec \\\n\tinstall-exec-am install-html install-html-am install-info \\\n\tinstall-info-am install-man install-pdf install-pdf-am \\\n\tinstall-ps install-ps-am install-strip installcheck \\\n\tinstallcheck-am installdirs maintainer-clean \\\n\tmaintainer-clean-generic mostlyclean mostlyclean-compile \\\n\tmostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \\\n\ttags tags-am uninstall uninstall-am\n\n.PRECIOUS: Makefile\n\n.f.m4.f:\n\t$(M4) $(FM4FLAGS) $(AM_FM4FLAGS) -DTOP_SRCDIR=$(top_srcdir) -DCURRENT_SRCDIR=$(srcdir) \\\n\t\t-DSAMRAI_FORTDIR=@SAMRAI_FORTDIR@ $< > $@\n\nexamples: $(EXAMPLES)\n\tif test \"$(top_srcdir)\" != \"$(top_builddir)\" ; then \\\n\t cp -f $(srcdir)/input2d $(PWD) ; \\\n\tfi ;\n\nclean-local:\n\trm -f $(EXTRA_PROGRAMS)\n\tif test \"$(top_srcdir)\" != \"$(top_builddir)\" ; then \\\n\t rm -f $(builddir)/input2d ; \\\n\tfi ;\n\n# Tell versions [3.59,3.63) of GNU make to not export all variables.\n# Otherwise a system limit (for SysV at least) may be exceeded.\n.NOEXPORT:\n"} +{"text": "// mksysnum_darwin.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.2.sdk/usr/include/sys/syscall.h\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n// +build arm,darwin\n\npackage unix\n\nconst (\n\tSYS_SYSCALL = 0\n\tSYS_EXIT = 1\n\tSYS_FORK = 2\n\tSYS_READ = 3\n\tSYS_WRITE = 4\n\tSYS_OPEN = 5\n\tSYS_CLOSE = 6\n\tSYS_WAIT4 = 7\n\tSYS_LINK = 9\n\tSYS_UNLINK = 10\n\tSYS_CHDIR = 12\n\tSYS_FCHDIR = 13\n\tSYS_MKNOD = 14\n\tSYS_CHMOD = 15\n\tSYS_CHOWN = 16\n\tSYS_GETFSSTAT = 18\n\tSYS_GETPID = 20\n\tSYS_SETUID = 23\n\tSYS_GETUID = 24\n\tSYS_GETEUID = 25\n\tSYS_PTRACE = 26\n\tSYS_RECVMSG = 27\n\tSYS_SENDMSG = 28\n\tSYS_RECVFROM = 29\n\tSYS_ACCEPT = 30\n\tSYS_GETPEERNAME = 31\n\tSYS_GETSOCKNAME = 32\n\tSYS_ACCESS = 33\n\tSYS_CHFLAGS = 34\n\tSYS_FCHFLAGS = 35\n\tSYS_SYNC = 36\n\tSYS_KILL = 37\n\tSYS_GETPPID = 39\n\tSYS_DUP = 41\n\tSYS_PIPE = 42\n\tSYS_GETEGID = 43\n\tSYS_SIGACTION = 46\n\tSYS_GETGID = 47\n\tSYS_SIGPROCMASK = 48\n\tSYS_GETLOGIN = 49\n\tSYS_SETLOGIN = 50\n\tSYS_ACCT = 51\n\tSYS_SIGPENDING = 52\n\tSYS_SIGALTSTACK = 53\n\tSYS_IOCTL = 54\n\tSYS_REBOOT = 55\n\tSYS_REVOKE = 56\n\tSYS_SYMLINK = 57\n\tSYS_READLINK = 58\n\tSYS_EXECVE = 59\n\tSYS_UMASK = 60\n\tSYS_CHROOT = 61\n\tSYS_MSYNC = 65\n\tSYS_VFORK = 66\n\tSYS_MUNMAP = 73\n\tSYS_MPROTECT = 74\n\tSYS_MADVISE = 75\n\tSYS_MINCORE = 78\n\tSYS_GETGROUPS = 79\n\tSYS_SETGROUPS = 80\n\tSYS_GETPGRP = 81\n\tSYS_SETPGID = 82\n\tSYS_SETITIMER = 83\n\tSYS_SWAPON = 85\n\tSYS_GETITIMER = 86\n\tSYS_GETDTABLESIZE = 89\n\tSYS_DUP2 = 90\n\tSYS_FCNTL = 92\n\tSYS_SELECT = 93\n\tSYS_FSYNC = 95\n\tSYS_SETPRIORITY = 96\n\tSYS_SOCKET = 97\n\tSYS_CONNECT = 98\n\tSYS_GETPRIORITY = 100\n\tSYS_BIND = 104\n\tSYS_SETSOCKOPT = 105\n\tSYS_LISTEN = 106\n\tSYS_SIGSUSPEND = 111\n\tSYS_GETTIMEOFDAY = 116\n\tSYS_GETRUSAGE = 117\n\tSYS_GETSOCKOPT = 118\n\tSYS_READV = 120\n\tSYS_WRITEV = 121\n\tSYS_SETTIMEOFDAY = 122\n\tSYS_FCHOWN = 123\n\tSYS_FCHMOD = 124\n\tSYS_SETREUID = 126\n\tSYS_SETREGID = 127\n\tSYS_RENAME = 128\n\tSYS_FLOCK = 131\n\tSYS_MKFIFO = 132\n\tSYS_SENDTO = 133\n\tSYS_SHUTDOWN = 134\n\tSYS_SOCKETPAIR = 135\n\tSYS_MKDIR = 136\n\tSYS_RMDIR = 137\n\tSYS_UTIMES = 138\n\tSYS_FUTIMES = 139\n\tSYS_ADJTIME = 140\n\tSYS_GETHOSTUUID = 142\n\tSYS_SETSID = 147\n\tSYS_GETPGID = 151\n\tSYS_SETPRIVEXEC = 152\n\tSYS_PREAD = 153\n\tSYS_PWRITE = 154\n\tSYS_NFSSVC = 155\n\tSYS_STATFS = 157\n\tSYS_FSTATFS = 158\n\tSYS_UNMOUNT = 159\n\tSYS_GETFH = 161\n\tSYS_QUOTACTL = 165\n\tSYS_MOUNT = 167\n\tSYS_CSOPS = 169\n\tSYS_CSOPS_AUDITTOKEN = 170\n\tSYS_WAITID = 173\n\tSYS_KDEBUG_TYPEFILTER = 177\n\tSYS_KDEBUG_TRACE_STRING = 178\n\tSYS_KDEBUG_TRACE64 = 179\n\tSYS_KDEBUG_TRACE = 180\n\tSYS_SETGID = 181\n\tSYS_SETEGID = 182\n\tSYS_SETEUID = 183\n\tSYS_SIGRETURN = 184\n\tSYS_FDATASYNC = 187\n\tSYS_STAT = 188\n\tSYS_FSTAT = 189\n\tSYS_LSTAT = 190\n\tSYS_PATHCONF = 191\n\tSYS_FPATHCONF = 192\n\tSYS_GETRLIMIT = 194\n\tSYS_SETRLIMIT = 195\n\tSYS_GETDIRENTRIES = 196\n\tSYS_MMAP = 197\n\tSYS_LSEEK = 199\n\tSYS_TRUNCATE = 200\n\tSYS_FTRUNCATE = 201\n\tSYS_SYSCTL = 202\n\tSYS_MLOCK = 203\n\tSYS_MUNLOCK = 204\n\tSYS_UNDELETE = 205\n\tSYS_OPEN_DPROTECTED_NP = 216\n\tSYS_GETATTRLIST = 220\n\tSYS_SETATTRLIST = 221\n\tSYS_GETDIRENTRIESATTR = 222\n\tSYS_EXCHANGEDATA = 223\n\tSYS_SEARCHFS = 225\n\tSYS_DELETE = 226\n\tSYS_COPYFILE = 227\n\tSYS_FGETATTRLIST = 228\n\tSYS_FSETATTRLIST = 229\n\tSYS_POLL = 230\n\tSYS_WATCHEVENT = 231\n\tSYS_WAITEVENT = 232\n\tSYS_MODWATCH = 233\n\tSYS_GETXATTR = 234\n\tSYS_FGETXATTR = 235\n\tSYS_SETXATTR = 236\n\tSYS_FSETXATTR = 237\n\tSYS_REMOVEXATTR = 238\n\tSYS_FREMOVEXATTR = 239\n\tSYS_LISTXATTR = 240\n\tSYS_FLISTXATTR = 241\n\tSYS_FSCTL = 242\n\tSYS_INITGROUPS = 243\n\tSYS_POSIX_SPAWN = 244\n\tSYS_FFSCTL = 245\n\tSYS_NFSCLNT = 247\n\tSYS_FHOPEN = 248\n\tSYS_MINHERIT = 250\n\tSYS_SEMSYS = 251\n\tSYS_MSGSYS = 252\n\tSYS_SHMSYS = 253\n\tSYS_SEMCTL = 254\n\tSYS_SEMGET = 255\n\tSYS_SEMOP = 256\n\tSYS_MSGCTL = 258\n\tSYS_MSGGET = 259\n\tSYS_MSGSND = 260\n\tSYS_MSGRCV = 261\n\tSYS_SHMAT = 262\n\tSYS_SHMCTL = 263\n\tSYS_SHMDT = 264\n\tSYS_SHMGET = 265\n\tSYS_SHM_OPEN = 266\n\tSYS_SHM_UNLINK = 267\n\tSYS_SEM_OPEN = 268\n\tSYS_SEM_CLOSE = 269\n\tSYS_SEM_UNLINK = 270\n\tSYS_SEM_WAIT = 271\n\tSYS_SEM_TRYWAIT = 272\n\tSYS_SEM_POST = 273\n\tSYS_SYSCTLBYNAME = 274\n\tSYS_OPEN_EXTENDED = 277\n\tSYS_UMASK_EXTENDED = 278\n\tSYS_STAT_EXTENDED = 279\n\tSYS_LSTAT_EXTENDED = 280\n\tSYS_FSTAT_EXTENDED = 281\n\tSYS_CHMOD_EXTENDED = 282\n\tSYS_FCHMOD_EXTENDED = 283\n\tSYS_ACCESS_EXTENDED = 284\n\tSYS_SETTID = 285\n\tSYS_GETTID = 286\n\tSYS_SETSGROUPS = 287\n\tSYS_GETSGROUPS = 288\n\tSYS_SETWGROUPS = 289\n\tSYS_GETWGROUPS = 290\n\tSYS_MKFIFO_EXTENDED = 291\n\tSYS_MKDIR_EXTENDED = 292\n\tSYS_IDENTITYSVC = 293\n\tSYS_SHARED_REGION_CHECK_NP = 294\n\tSYS_VM_PRESSURE_MONITOR = 296\n\tSYS_PSYNCH_RW_LONGRDLOCK = 297\n\tSYS_PSYNCH_RW_YIELDWRLOCK = 298\n\tSYS_PSYNCH_RW_DOWNGRADE = 299\n\tSYS_PSYNCH_RW_UPGRADE = 300\n\tSYS_PSYNCH_MUTEXWAIT = 301\n\tSYS_PSYNCH_MUTEXDROP = 302\n\tSYS_PSYNCH_CVBROAD = 303\n\tSYS_PSYNCH_CVSIGNAL = 304\n\tSYS_PSYNCH_CVWAIT = 305\n\tSYS_PSYNCH_RW_RDLOCK = 306\n\tSYS_PSYNCH_RW_WRLOCK = 307\n\tSYS_PSYNCH_RW_UNLOCK = 308\n\tSYS_PSYNCH_RW_UNLOCK2 = 309\n\tSYS_GETSID = 310\n\tSYS_SETTID_WITH_PID = 311\n\tSYS_PSYNCH_CVCLRPREPOST = 312\n\tSYS_AIO_FSYNC = 313\n\tSYS_AIO_RETURN = 314\n\tSYS_AIO_SUSPEND = 315\n\tSYS_AIO_CANCEL = 316\n\tSYS_AIO_ERROR = 317\n\tSYS_AIO_READ = 318\n\tSYS_AIO_WRITE = 319\n\tSYS_LIO_LISTIO = 320\n\tSYS_IOPOLICYSYS = 322\n\tSYS_PROCESS_POLICY = 323\n\tSYS_MLOCKALL = 324\n\tSYS_MUNLOCKALL = 325\n\tSYS_ISSETUGID = 327\n\tSYS___PTHREAD_KILL = 328\n\tSYS___PTHREAD_SIGMASK = 329\n\tSYS___SIGWAIT = 330\n\tSYS___DISABLE_THREADSIGNAL = 331\n\tSYS___PTHREAD_MARKCANCEL = 332\n\tSYS___PTHREAD_CANCELED = 333\n\tSYS___SEMWAIT_SIGNAL = 334\n\tSYS_PROC_INFO = 336\n\tSYS_SENDFILE = 337\n\tSYS_STAT64 = 338\n\tSYS_FSTAT64 = 339\n\tSYS_LSTAT64 = 340\n\tSYS_STAT64_EXTENDED = 341\n\tSYS_LSTAT64_EXTENDED = 342\n\tSYS_FSTAT64_EXTENDED = 343\n\tSYS_GETDIRENTRIES64 = 344\n\tSYS_STATFS64 = 345\n\tSYS_FSTATFS64 = 346\n\tSYS_GETFSSTAT64 = 347\n\tSYS___PTHREAD_CHDIR = 348\n\tSYS___PTHREAD_FCHDIR = 349\n\tSYS_AUDIT = 350\n\tSYS_AUDITON = 351\n\tSYS_GETAUID = 353\n\tSYS_SETAUID = 354\n\tSYS_GETAUDIT_ADDR = 357\n\tSYS_SETAUDIT_ADDR = 358\n\tSYS_AUDITCTL = 359\n\tSYS_BSDTHREAD_CREATE = 360\n\tSYS_BSDTHREAD_TERMINATE = 361\n\tSYS_KQUEUE = 362\n\tSYS_KEVENT = 363\n\tSYS_LCHOWN = 364\n\tSYS_BSDTHREAD_REGISTER = 366\n\tSYS_WORKQ_OPEN = 367\n\tSYS_WORKQ_KERNRETURN = 368\n\tSYS_KEVENT64 = 369\n\tSYS___OLD_SEMWAIT_SIGNAL = 370\n\tSYS___OLD_SEMWAIT_SIGNAL_NOCANCEL = 371\n\tSYS_THREAD_SELFID = 372\n\tSYS_LEDGER = 373\n\tSYS_KEVENT_QOS = 374\n\tSYS___MAC_EXECVE = 380\n\tSYS___MAC_SYSCALL = 381\n\tSYS___MAC_GET_FILE = 382\n\tSYS___MAC_SET_FILE = 383\n\tSYS___MAC_GET_LINK = 384\n\tSYS___MAC_SET_LINK = 385\n\tSYS___MAC_GET_PROC = 386\n\tSYS___MAC_SET_PROC = 387\n\tSYS___MAC_GET_FD = 388\n\tSYS___MAC_SET_FD = 389\n\tSYS___MAC_GET_PID = 390\n\tSYS_PSELECT = 394\n\tSYS_PSELECT_NOCANCEL = 395\n\tSYS_READ_NOCANCEL = 396\n\tSYS_WRITE_NOCANCEL = 397\n\tSYS_OPEN_NOCANCEL = 398\n\tSYS_CLOSE_NOCANCEL = 399\n\tSYS_WAIT4_NOCANCEL = 400\n\tSYS_RECVMSG_NOCANCEL = 401\n\tSYS_SENDMSG_NOCANCEL = 402\n\tSYS_RECVFROM_NOCANCEL = 403\n\tSYS_ACCEPT_NOCANCEL = 404\n\tSYS_MSYNC_NOCANCEL = 405\n\tSYS_FCNTL_NOCANCEL = 406\n\tSYS_SELECT_NOCANCEL = 407\n\tSYS_FSYNC_NOCANCEL = 408\n\tSYS_CONNECT_NOCANCEL = 409\n\tSYS_SIGSUSPEND_NOCANCEL = 410\n\tSYS_READV_NOCANCEL = 411\n\tSYS_WRITEV_NOCANCEL = 412\n\tSYS_SENDTO_NOCANCEL = 413\n\tSYS_PREAD_NOCANCEL = 414\n\tSYS_PWRITE_NOCANCEL = 415\n\tSYS_WAITID_NOCANCEL = 416\n\tSYS_POLL_NOCANCEL = 417\n\tSYS_MSGSND_NOCANCEL = 418\n\tSYS_MSGRCV_NOCANCEL = 419\n\tSYS_SEM_WAIT_NOCANCEL = 420\n\tSYS_AIO_SUSPEND_NOCANCEL = 421\n\tSYS___SIGWAIT_NOCANCEL = 422\n\tSYS___SEMWAIT_SIGNAL_NOCANCEL = 423\n\tSYS___MAC_MOUNT = 424\n\tSYS___MAC_GET_MOUNT = 425\n\tSYS___MAC_GETFSSTAT = 426\n\tSYS_FSGETPATH = 427\n\tSYS_AUDIT_SESSION_SELF = 428\n\tSYS_AUDIT_SESSION_JOIN = 429\n\tSYS_FILEPORT_MAKEPORT = 430\n\tSYS_FILEPORT_MAKEFD = 431\n\tSYS_AUDIT_SESSION_PORT = 432\n\tSYS_PID_SUSPEND = 433\n\tSYS_PID_RESUME = 434\n\tSYS_PID_HIBERNATE = 435\n\tSYS_PID_SHUTDOWN_SOCKETS = 436\n\tSYS_SHARED_REGION_MAP_AND_SLIDE_NP = 438\n\tSYS_KAS_INFO = 439\n\tSYS_MEMORYSTATUS_CONTROL = 440\n\tSYS_GUARDED_OPEN_NP = 441\n\tSYS_GUARDED_CLOSE_NP = 442\n\tSYS_GUARDED_KQUEUE_NP = 443\n\tSYS_CHANGE_FDGUARD_NP = 444\n\tSYS_USRCTL = 445\n\tSYS_PROC_RLIMIT_CONTROL = 446\n\tSYS_CONNECTX = 447\n\tSYS_DISCONNECTX = 448\n\tSYS_PEELOFF = 449\n\tSYS_SOCKET_DELEGATE = 450\n\tSYS_TELEMETRY = 451\n\tSYS_PROC_UUID_POLICY = 452\n\tSYS_MEMORYSTATUS_GET_LEVEL = 453\n\tSYS_SYSTEM_OVERRIDE = 454\n\tSYS_VFS_PURGE = 455\n\tSYS_SFI_CTL = 456\n\tSYS_SFI_PIDCTL = 457\n\tSYS_COALITION = 458\n\tSYS_COALITION_INFO = 459\n\tSYS_NECP_MATCH_POLICY = 460\n\tSYS_GETATTRLISTBULK = 461\n\tSYS_CLONEFILEAT = 462\n\tSYS_OPENAT = 463\n\tSYS_OPENAT_NOCANCEL = 464\n\tSYS_RENAMEAT = 465\n\tSYS_FACCESSAT = 466\n\tSYS_FCHMODAT = 467\n\tSYS_FCHOWNAT = 468\n\tSYS_FSTATAT = 469\n\tSYS_FSTATAT64 = 470\n\tSYS_LINKAT = 471\n\tSYS_UNLINKAT = 472\n\tSYS_READLINKAT = 473\n\tSYS_SYMLINKAT = 474\n\tSYS_MKDIRAT = 475\n\tSYS_GETATTRLISTAT = 476\n\tSYS_PROC_TRACE_LOG = 477\n\tSYS_BSDTHREAD_CTL = 478\n\tSYS_OPENBYID_NP = 479\n\tSYS_RECVMSG_X = 480\n\tSYS_SENDMSG_X = 481\n\tSYS_THREAD_SELFUSAGE = 482\n\tSYS_CSRCTL = 483\n\tSYS_GUARDED_OPEN_DPROTECTED_NP = 484\n\tSYS_GUARDED_WRITE_NP = 485\n\tSYS_GUARDED_PWRITE_NP = 486\n\tSYS_GUARDED_WRITEV_NP = 487\n\tSYS_RENAMEATX_NP = 488\n\tSYS_MREMAP_ENCRYPTED = 489\n\tSYS_NETAGENT_TRIGGER = 490\n\tSYS_STACK_SNAPSHOT_WITH_CONFIG = 491\n\tSYS_MICROSTACKSHOT = 492\n\tSYS_GRAB_PGO_DATA = 493\n\tSYS_PERSONA = 494\n\tSYS_WORK_INTERVAL_CTL = 499\n\tSYS_GETENTROPY = 500\n\tSYS_NECP_OPEN = 501\n\tSYS_NECP_CLIENT_ACTION = 502\n\tSYS___NEXUS_OPEN = 503\n\tSYS___NEXUS_REGISTER = 504\n\tSYS___NEXUS_DEREGISTER = 505\n\tSYS___NEXUS_CREATE = 506\n\tSYS___NEXUS_DESTROY = 507\n\tSYS___NEXUS_GET_OPT = 508\n\tSYS___NEXUS_SET_OPT = 509\n\tSYS___CHANNEL_OPEN = 510\n\tSYS___CHANNEL_GET_INFO = 511\n\tSYS___CHANNEL_SYNC = 512\n\tSYS___CHANNEL_GET_OPT = 513\n\tSYS___CHANNEL_SET_OPT = 514\n\tSYS_ULOCK_WAIT = 515\n\tSYS_ULOCK_WAKE = 516\n\tSYS_FCLONEFILEAT = 517\n\tSYS_FS_SNAPSHOT = 518\n\tSYS_TERMINATE_WITH_PAYLOAD = 520\n\tSYS_ABORT_WITH_PAYLOAD = 521\n\tSYS_MAXSYSCALL = 522\n\tSYS_INVALID = 63\n)\n"} +{"text": "<% @ungrouped_profile_fields.each do |field| %>\n <div class=\"row my-3\">\n <div class=\"card w-100\">\n <%= render partial: \"admin/configs/card_header\",\n locals: {\n header: field.label,\n state: \"collapse\",\n target: \"#{field.attribute_name}_container\",\n expanded: \"false\"\n } %>\n <div id=\"<%= field.attribute_name %>_container\" class=\"card-body collapse hide\" aria-labelledby=\"<%= field.attribute_name %>_container\">\n <div class=\"form-group grid p-6 mb-6 gap-1\">\n <%= form_for [:admin, field] do |form| %>\n <%= render \"profile_field_form\", form: form, group: nil %>\n <%= form.submit class: \"btn btn-primary\" %>\n <% end %>\n <%= button_to \"Delete Profile Field\", admin_profile_field_path(field), data: { confirm: \"Are you sure?\" }, method: :delete, class: \"btn btn-secondary\" %>\n </div>\n </div>\n </div>\n </div>\n<% end %>\n"} +{"text": "---\nlabel: basic template\nhide_body: false\nfields:\n- name: title\n label: Title\n type: text\n hidden: false\n default: ''\n- name: redirect_from\n label: Redirect from\n type: list\n hidden: false\n default: ''\n- name: tag\n type: tag_list\n default: []\n label: Tags\n description: Tags for generating related article links\n- name: summary\n type: textarea\n default: ''\n config:\n required: false\n wysiwyg: false\n schema:\n format: markdown\n label: Summary\n description: Summary of the article for generating related article links\npages:\n- _articles/en/api/adding-and-managing-apps.md\n- _articles/en/api/authentication.md\n- _articles/en/api/build-trigger.md\n- _articles/en/api/endpoints.md\n- _articles/en/api/incoming-and-outgoing-webhooks.md\n- _articles/en/api/managing-files-in-generic-file-storage.md\n- _articles/en/api/managing-ios-code-signing-files.md\n- _articles/en/api/response-and-pagination.md\n- _articles/en/bitrise-cli/basics-of-bitrise-yml.md\n- _articles/en/bitrise-cli/customizing-bitrise-yml.md\n- _articles/en/bitrise-cli/index.md\n- _articles/en/bitrise-cli/initializing-a-bitrise-project-locally.md\n- _articles/en/bitrise-cli/installation.md\n- _articles/en/bitrise-cli/most-important-concepts.md\n- _articles/en/bitrise-cli/offline-workflow-editor.md\n- _articles/en/bitrise-cli/run-your-first-build.md\n- _articles/en/bitrise-cli/secrets.md\n- _articles/en/bitrise-cli/step-inputs.md\n- _articles/en/bitrise-cli/step-outputs.md\n- _articles/en/bitrise-cli/step-properties.md\n- _articles/en/bitrise-cli/step-timeout.md\n- _articles/en/bitrise-cli/steps.md\n- _articles/en/bitrise-cli/workflows.md\n- _articles/en/builds/Scheduling-Builds.md\n- _articles/en/builds/available-environment-variables.md\n- _articles/en/builds/bitrise-checks-on-github-checks.md\n- _articles/en/builds/bitrise-yml-online.md\n- _articles/en/builds/build-artifacts-online.md\n- _articles/en/builds/build-logs.md\n- _articles/en/builds/build-numbering-and-app-versioning.md\n- _articles/en/builds/caching/caching-carthage.md\n- _articles/en/builds/caching/caching-homebrew-installers.md\n- _articles/en/builds/configuring-notifications.md\n- _articles/en/builds/env-vars-secret-env-vars.md\n- _articles/en/builds/remote-access.md\n- _articles/en/builds/rolling-builds.md\n- _articles/en/builds/selective_builds.md\n- _articles/en/builds/sensitive-input-field.md\n- _articles/en/builds/setting-your-git-credentials-on-build-machines.md\n- _articles/en/builds/triggering-builds/approving-pull-request-builds.md\n- _articles/en/builds/triggering-builds/skipping-a-given-commit-or-pull-request.md\n- _articles/en/builds/triggering-builds/status-reporting.md\n- _articles/en/builds/triggering-builds/trigger-code-push.md\n- _articles/en/builds/triggering-builds/trigger-git-tags.md\n- _articles/en/builds/triggering-builds/trigger-map.md\n- _articles/en/builds/triggering-builds/trigger-multiple-workflows.md\n- _articles/en/builds/triggering-builds/trigger-pull-request.md\n- _articles/en/code-signing/android-code-signing/android-code-signing-in-gradle.md\n- _articles/en/code-signing/android-code-signing/android-code-signing-using-bitrise-sign-apk-step.md\n- _articles/en/code-signing/android-code-signing/android-code-signing-with-android-studio.md\n- _articles/en/code-signing/android-code-signing/downloading-a-keystore-file.md\n- _articles/en/code-signing/ios-code-signing/collecting-files-with-codesigndoc.md\n- _articles/en/code-signing/ios-code-signing/create-signed-ipa-for-xamarin.md\n- _articles/en/code-signing/ios-code-signing/create-signed-ipa-for-xcode.md\n- _articles/en/code-signing/ios-code-signing/exporting-code-signing-files.md\n- _articles/en/code-signing/ios-code-signing/ionic-cordova-code-signing.md\n- _articles/en/code-signing/ios-code-signing/ios-auto-provisioning.md\n- _articles/en/code-signing/ios-code-signing/ios-code-signing-troubleshooting.md\n- _articles/en/code-signing/ios-code-signing/ios-manual-provisioning.md\n- _articles/en/code-signing/ios-code-signing/resigning-an-ipa.md\n- _articles/en/code-signing/xamarin-android-code-signing/xamarin-android-code-signing.md\n- _articles/en/contributors/create-your-own-step.md\n- _articles/en/contributors/sharing-steps-with-all-bitrise-users.md\n- _articles/en/contributors/testing-and-versioning-your-steps.md\n- _articles/en/contributors/verified-steps.md\n- _articles/en/deploy/android-deploy/deploying-android-apps.md\n- _articles/en/deploy/android-deploy/exporting-a-universal-apk-from-an-aab.md\n- _articles/en/deploy/android-deploy/generate-and-deploy-multiple-flavor-apks-in-a-single-workflow.md\n- _articles/en/deploy/android-deploy/generating-and-deploying-android-app-bundles.md\n- _articles/en/deploy/deploy-apps-to-applivery-from-bitrise.md\n- _articles/en/deploy/ios-deploy/deploying-an-ios-app-for-external-testing.md\n- _articles/en/deploy/ios-deploy/deploying-an-ios-app-for-simulators.md\n- _articles/en/deploy/ios-deploy/deploying-an-ios-app-to-bitrise-io.md\n- _articles/en/deploy/ios-deploy/deploying-an-ios-app-to-itunes-connect.md\n- _articles/en/deploy/ship.md\n- _articles/en/faq/adding-projects-with-submodules.md\n- _articles/en/faq/android-x86-emulator.md\n- _articles/en/faq/grant-access-to-bitbucket-team.md\n- _articles/en/faq/grant-access-to-github-organization.md\n- _articles/en/faq/how-can-i-git-checkout-from-a-detached-head-state.md\n- _articles/en/faq/how-to-change-the-owner-of-an-app.md\n- _articles/en/faq/how-to-generate-ssh-keypair.md\n- _articles/en/faq/i-cant-see-my-github-organization-repository-on-the-add-new-app-page.md\n- _articles/en/faq/invitation-faq.md\n- _articles/en/faq/no-builds-are-triggered-automatically.md\n- _articles/en/faq/organization-faq.md\n- _articles/en/faq/why-my-build-takes-longer-on-bitrise-than-on-my-mac.md\n- _articles/en/getting-started/account-security.md\n- _articles/en/getting-started/adding-an-app-from-a-cli.md\n- _articles/en/getting-started/code-security.md\n- _articles/en/getting-started/configuring-bitrise-steps-that-require-apple-developer-account-data.md\n- _articles/en/getting-started/getting-started-with-android-apps.md\n- _articles/en/getting-started/getting-started-with-expo-apps.md\n- _articles/en/getting-started/getting-started-with-flutter-apps.md\n- _articles/en/getting-started/getting-started-with-ios-apps.md\n- _articles/en/getting-started/getting-started-with-react-native-apps.md\n- _articles/en/getting-started/index.md\n- _articles/en/getting-started/managing-files-on-bitrise.md\n- _articles/en/getting-started/signing-up-to-bitrise.md\n- _articles/en/infrastructure/available-stacks.md\n- _articles/en/infrastructure/customisable-enterprise-build-platforms.md\n- _articles/en/infrastructure/stack-update-and-removal-policy.md\n- _articles/en/infrastructure/the-environment.md\n- _articles/en/infrastructure/virtual-machines.md\n- _articles/en/reviews/Japanese translations/API (API)/api-api.md\n- _articles/en/reviews/Japanese translations/API (API)/apiのエンドポイントとテスト-endpoints-and-testing-the-api.md\n- _articles/en/reviews/Japanese translations/API (API)/アプリの追加と管理-adding-and-managing-apps.md\n- _articles/en/reviews/Japanese translations/API (API)/ビルドのトリガーとアボート-triggering-and-aborting-builds.md\n- _articles/en/reviews/Japanese translations/API (API)/レスポンスとページ付け-response-and-pagination.md\n- _articles/en/reviews/Japanese translations/API (API)/認証-authentication.md\n- _articles/en/reviews/Japanese translations/Bitrise CLI (Bitrise CLI)/bitrise-cli-bitrise-cli.md\n- _articles/en/reviews/Japanese translations/Bitrise CLI (Bitrise CLI)/bitrise-ymlのカスタマイズ-customizing-bitrise-yml.md\n- _articles/en/reviews/Japanese translations/Bitrise CLI (Bitrise CLI)/bitrise-ymlの基礎知識-basics-of-bitrise-yml.md\n- _articles/en/reviews/Japanese translations/Bitrise CLI (Bitrise CLI)/yaml内のステップ-steps-in-yaml.md\n- _articles/en/reviews/Japanese translations/Bitrise CLI (Bitrise CLI)/yaml内のワークフロー-workflows-in-yaml.md\n- _articles/en/reviews/Japanese translations/Bitrise CLI (Bitrise CLI)/オフラインworkflow-editorのインス���ールとアップグレード-installing-and-upgrading-the-offline-workflow-editor.md\n- _articles/en/reviews/Japanese translations/Bitrise CLI (Bitrise CLI)/ステップのプロパティ-step-properties.md\n- _articles/en/reviews/Japanese translations/Bitrise CLI (Bitrise CLI)/ローカルでのbitriseプロジェクトの初期設定-initializing-a-bitrise-project-locally.md\n- _articles/en/reviews/Japanese translations/Bitrise CLI (Bitrise CLI)/最重要コンセプト-most-important-concepts.md\n- _articles/en/reviews/Japanese translations/Bitrise CLI and bitrise.yml/bitrise-ymlのカスタマイズ-customizing-bitrise-yml.md\n- _articles/en/reviews/Japanese translations/Bitrise CLI and bitrise.yml/イントロ-intro.md\n- _articles/en/reviews/Japanese translations/Bitrise CLI and bitrise.yml/オフラインworkflow-editorのインストールとアップグレード-installing-and-upgrading-the-offline-workflow-editor.md\n- _articles/en/reviews/Japanese translations/Bitrise CLI and bitrise.yml/ローカルによるbitriseプロジェクトの初期化-initializing-a-bitrise-project-locally.md\n- _articles/en/reviews/Japanese translations/Bitrise CLI and bitrise.yml/最重要コンセプト-most-important-concepts.md\n- _articles/en/reviews/Japanese translations/Getting Started/bitriseへのサインアップ-signing-up-to-bitrise.md\n- _articles/en/reviews/Japanese translations/organization/チームと組織の概要-teams-and-organizations-overview.md\n- _articles/en/reviews/Japanese translations/webhooks/assembla-webhookの追加-adding-an-assembla-webhook.md\n- _articles/en/reviews/Japanese translations/webhooks/deveo-webhookの追加-adding-a-deveo-webhook.md\n- _articles/en/reviews/Japanese translations/webhooks/github-webhookの追加-adding-a-github-webhook.md\n- _articles/en/reviews/Japanese translations/webhooks/gitlab-webhookの追加-adding-a-gitlab-webhook.md\n- _articles/en/reviews/Japanese translations/webhooks/gogs-webhookの追加-adding-a-gogs-webhook.md\n- _articles/en/reviews/Japanese translations/webhooks/outgoing-webhook-の追加-adding-outgoing-webhooks.md\n- _articles/en/reviews/Japanese translations/webhooks/slack-webhookの追加-adding-a-slack-webhook.md\n- _articles/en/reviews/Japanese translations/webhooks/visual-studio-webhookの追加-adding-a-visual-studio-webhook.md\n- _articles/en/reviews/Japanese translations/webhooks/webhook-トラブルシューティング-webhook-troubleshooting.md\n- _articles/en/reviews/Japanese translations/webhooks/webhookの追加-adding-webhooks.md\n- _articles/en/reviews/Japanese translations/よくある質問 (FAQ)/android-x86-エミュレータをbitriseで走らせることは可能ですか-can-i-run-android-x86-emulator-on-bitrise.md\n- _articles/en/reviews/Japanese translations/よくある質問 (FAQ)/bitbucket-teamへbitriseのアクセスを許可する方法を教えて下さい-how-can-i-grant-bitrise-access-to-a-bitbucket-team.md\n- _articles/en/reviews/Japanese translations/よくある質問 (FAQ)/detached-head状態からgit-checkoutを行うのはどうすればいいですか-how-can-i-git-checkout-from-a-detached-head-state.md\n- _articles/en/reviews/Japanese translations/よくある質問 (FAQ)/github-organization-組織-へbitriseのアクセスを許可する方法はありますか-how-to-grant-bitrise-access-to-a-github-organization.md\n- _articles/en/reviews/Japanese translations/よくある質問 (FAQ)/why-does-my-build-take-longer-on-bitrise-than-on-my-machine.md\n- _articles/en/reviews/Japanese translations/よくある質問 (FAQ)/なぜadd-new-app-新規のアプリを追加する-ページに私のgithub-organization-組織-repository-レポジトリ-が表示されないのですか-why-can-t-i-see-my-github-organization-repository-on-the-add-new-app-page.md\n- _articles/en/reviews/Japanese translations/よくある質問 (FAQ)/よくある質問-faq.md\n- _articles/en/reviews/Japanese translations/よくある質問 (FAQ)/アプリのオーナーの変更方法を教えて下さい-how-to-change-the-owner-of-an-app.md\n- _articles/en/reviews/Japanese translations/よくある質問 (FAQ)/アプリのオーナーを変更する方法を教えて下さい-how-to-change-the-owner-of-an-app.md\n- _articles/en/reviews/Japanese translations/よくある質問 (FAQ)/サブモジュールもしくはプライベートレポジトリ依存が含まれるプロジェクトを追加することは可能ですか-can-i-add-projects-with-submodules-or-with-private-repo-dependencies.md\n- _articles/en/reviews/Japanese translations/よくある質問 (FAQ)/レポジトリへ依存性をコミットしたほうがいいですか-should-i-commit-my-dependencies-into-my-repository.md\n- _articles/en/reviews/Japanese translations/よくある質問 (FAQ)/招待に関するよくある質問-invitation-faq.md\n- _articles/en/reviews/Japanese translations/キャッシュについて-about-caching.md\n- _articles/en/reviews/Japanese translations/コントリビューターの皆さまへ (For contributors)/bitriseに貢献する方法-how-to-contribute-bitrise.md\n- _articles/en/reviews/Japanese translations/コントリビューターの皆さまへ (For contributors)/独自のbitriseプロジェクトスキャナを作成する-creating-your-own-bitrise-project-scanner.md\n- _articles/en/reviews/Japanese translations/コントリビューターの皆さまへ (For contributors)/独自のstepを作成-シェアする-creating-and-sharing-your-own-step.md\n- _articles/en/reviews/Japanese translations/コード署名 (Code signing)/ionicとcordovaプロジェクトのコード署名-code-signing-with-ionic-and-cordova-projects.md\n- _articles/en/reviews/Japanese translations/コード署名 (Code signing)/ios.md\n- _articles/en/reviews/Japanese translations/コード署名 (Code signing)/keystoreファイルのダウンロード-downloading-a-keystore-file.md\n- _articles/en/reviews/Japanese translations/コード署名 (Code signing)/xamarin-androidコード署名-xamarin-android-code-signing.md\n- _articles/en/reviews/Japanese translations/チュートリアル (Tutorials)/コミュニティによるチュートリアル-community-created-tutorials.md\n- _articles/en/reviews/Japanese translations/テスト (Testing)/カスタムのscriptステップからテストレポートへのエクスポート-exporting-to-test-reports-from-custom-script-steps.md\n- _articles/en/reviews/Japanese translations/テスト (Testing)/テストレポート-test-reports.md\n- _articles/en/reviews/Japanese translations/デプロイ (Deployment)/android-app-bundleの生成とデプロイ-generating-and-deploying-android-app-bundles.md\n- _articles/en/reviews/Japanese translations/デプロイ (Deployment)/androidアプリのデプロイ-deploying-android-apps.md\n- _articles/en/reviews/Japanese translations/デプロイ (Deployment)/androidアプリのデプロイについて-android-deployment.md\n- _articles/en/reviews/Japanese translations/デプロイ (Deployment)/bitrise-ioへiosアプリのデプロイ-deploying-an-ios-app-to-bitrise-io.md\n- _articles/en/reviews/Japanese translations/デプロイ (Deployment)/bitrise-ota-アプリのデプロイ-bitrise-ota-app-deployment.md\n- _articles/en/reviews/Japanese translations/デプロイ (Deployment)/bitriseからdeploygateへアプリのデプロイ.md\n- _articles/en/reviews/Japanese translations/デプロイ (Deployment)/iosアプリのデプロイについて-introduction-to-deploying-ios-apps.md\n- _articles/en/reviews/Japanese translations/デプロイ (Deployment)/itunes-connectへiosアプリのデプロイ.md\n- _articles/en/reviews/Japanese translations/デプロイ (Deployment)/ship機能を使ったデプロイ-deploying-with-ship.md\n- _articles/en/reviews/Japanese translations/デプロイ (Deployment)/シミュレータ用iosアプリのデプロイ.md\n- _articles/en/reviews/Japanese translations/デプロイ (Deployment)/デプロイ-deployment.md\n- _articles/en/reviews/Japanese translations/デプロイ (Deployment)/単一ワークフローでの複数のフレーバーapkの生成とデプロイ-generate-and-deploy-multiple-flavor-apks-in-a-single-workflow.md\n- _articles/en/reviews/Japanese translations/デプロイ (Deployment)/外部テスト用アプリのデプロイ-deploying-an-ios-app-for-external-testing.md\n- _articles/en/reviews/Japanese translations/トラブルシューティング (Troubleshooting)/dangerを使ったテストのactivity-summaryが見つからない-no-activity-summaries-found-for-test-with-danger.md\n- _articles/en/reviews/Japanese translations/トラブルシューティング (Troubleshooting)/github-gitlab-bitbucketでビルドステータスが動作しない-build-status-indicator-on-github-gitlab-bitbucket-does-not-work.md\n- _articles/en/reviews/Japanese translations/トラブルシューティング (Troubleshooting)/workflow-editorがロードしない-workflow-editor-doesn-t-load.md\n- _articles/en/reviews/Japanese translations/トラブルシューティング (Troubleshooting)/xcodeの問題点のリスト-list-of-known-xcode-issues.md\n- _articles/en/reviews/Japanese translations/トラブルシューティング (Troubleshooting)/アプリへのbitrise-support-userを有効化する-enabling-bitrise-support-user-for-your-app.md\n- _articles/en/reviews/Japanese translations/トラブルシューティング (Troubleshooting)/トラブルシューティング-troubleshooting.md\n- _articles/en/reviews/Japanese translations/トラブルシューティング (Troubleshooting)/パスワードのリセット-resetting-your-password.md\n- _articles/en/reviews/Japanese translations/トラブルシューティング (Troubleshooting)/ビルドトリガーが動かない-build-trigger-does-not-work.md\n- _articles/en/reviews/Japanese translations/トラブルシューティング (Troubleshooting)/自分のマシンでビルドをデバッグする-debugging-your-build-on-your-own-machine.md\n- _articles/en/reviews/Japanese translations/ビルド(Builds)/bitrise-ymlファイルへのオンラインアクセス-accessing-the-bitrise-yml-file-online.md\n- _articles/en/reviews/Japanese translations/ビルド(Builds)/build-artifacts-online.md\n- _articles/en/reviews/Japanese translations/ビルド(Builds)/github-checksでbitrise-checksを行う-bitrise-checks-on-github-checks.md\n- _articles/en/reviews/Japanese translations/ビルド(Builds)/sensitive-input-in-public-apps.md\n- _articles/en/reviews/Japanese translations/ビルド(Builds)/setting-your-git-credentials-on-build-machines.md\n- _articles/en/reviews/Japanese translations/ビルド(Builds)/シングルトリガーで並列ビルドを開始-starting-parallel-builds-with-a-single-trigger.md\n- _articles/en/reviews/Japanese translations/ビルド(Builds)/ビルドのトリガー-triggering-builds.md\n- _articles/en/reviews/Japanese translations/ビルド(Builds)/ビルドのトリガーについて (Triggering\n builds)/プルリクエストビルドの承認-approving-pull-request-builds.md\n- _articles/en/reviews/Japanese translations/ビルド(Builds)/ビルドのトリガーについて (Triggering\n builds)/特定のコミットやプルリクエストをスキップする-skipping-a-given-commit-or-pull-request.md\n- _articles/en/reviews/Japanese translations/ビルド(Builds)/ビルドの番号付けとアプリバージョン管理-build-numbering-and-app-versioning.md\n- _articles/en/reviews/Japanese translations/ビルド(Builds)/ビルドログ-build-logs.md\n- _articles/en/reviews/Japanese translations/ビルド(Builds)/リモートアクセス-remote-access.md\n- _articles/en/reviews/Japanese translations/ビルド(Builds)/利用可能な環境変数-available-environment-variables.md\n- _articles/en/reviews/Japanese translations/ビルド(Builds)/秘密と環境設定-secrets-and-env-vars.md\n- _articles/en/reviews/Japanese translations/ビルド(Builds)/通知設定 -configuring-notifications.md\n- _articles/en/steps-and-workflows/adding-removing-steps.md\n- _articles/en/steps-and-workflows/copying-workflows-from-one-app-to-another.md\n- _articles/en/steps-and-workflows/creating-workflows.md\n- _articles/en/steps-and-workflows/default-workflows.md\n- _articles/en/steps-and-workflows/getting-started-steps.md\n- _articles/en/steps-and-workflows/getting-started-workflows.md\n- _articles/en/steps-and-workflows/managing-workflows.md\n- _articles/en/steps-and-workflows/skipping-steps.md\n- _articles/en/steps-and-workflows/step-inputs.md\n- _articles/en/team-management/changing-the-owner-of-an-app.md\n- _articles/en/team-management/organizations/creating-org.md\n- _articles/en/team-management/organizations/managing-apps.md\n- _articles/en/team-management/organizations/managing-billing-sub.md\n- _articles/en/team-management/organizations/managing-invoices.md\n- _articles/en/team-management/organizations/members-organizations.md\n- _articles/en/team-management/organizations/org-ownership.md\n- _articles/en/team-management/organizations/saml-sso-in-organizations.md\n- _articles/en/team-management/organizations/setting-up-azure-ad-sso-for-bitrise.md\n- _articles/en/team-management/organizations/setting-up-google-sso-for-bitrise.md\n- _articles/en/team-management/organizations/setting-up-idaptive-saml-sso-for-bitrise.md\n- _articles/en/team-management/organizations/setting-up-okta-sso-for-bitrise.md\n- _articles/en/team-management/organizations/setting-up-onelogin-sso-for-bitrise.md\n- _articles/en/team-management/organizations/setting-up-pingone-saml-sso-for-bitrise.md\n- _articles/en/team-management/user-roles-on-app-teams.md\n- _articles/en/testing/android-run-a-unit-test.md\n- _articles/en/testing/device-testing-for-android.md\n- _articles/en/testing/device-testing-for-ios.md\n- _articles/en/testing/exporting-to-test-reports-from-custom-script-steps.md\n- _articles/en/testing/installing-an-ipa-file-from-the-public-install-page.md\n- _articles/en/testing/running-detox-tests-on-bitrise.md\n- _articles/en/testing/running-xcode-tests.md\n- _articles/en/testing/test-reports.md\n- _articles/en/tips-and-tricks/android-tips-and-tricks.md\n- _articles/en/tips-and-tricks/increasing-the-size-limit-of-env-vars.md\n- _articles/en/tips-and-tricks/sharing-and-storing-workflows-among-multiple-apps.md\n- _articles/en/tips-and-tricks/use-bitrise-yml-from-repository.md\n- _articles/en/troubleshooting/debugging-your-build-on-your-own-machine.md\n- _articles/en/troubleshooting/enabling-bitrise-support-user.md\n- _articles/en/troubleshooting/frequent-android-issues.md\n- _articles/en/troubleshooting/frequent-ios-issues.md\n- _articles/en/troubleshooting/github-pull-request-status-troubleshooting.md\n- _articles/en/troubleshooting/known-xcode-issues.md\n- _articles/en/troubleshooting/no-activity-summaries-found-for-test-with-danger.md\n- _articles/en/troubleshooting/resetting-your-password.md\n- _articles/en/troubleshooting/trigger-doesnt-work.md\n- _articles/en/troubleshooting/workflow-editor-doesnt-load.md\n- _articles/en/tutorials/creating-white-label-app-versions.md\n- _articles/en/webhooks/adding-outgoing-webhooks.md\n- _articles/en/webhooks/troubleshooting.md\n- _articles/jp/api/authentication.md\n- _articles/jp/api/incoming-and-outgoing-webhooks.md\n- _articles/jp/api/response-and-pagination.md\n- _articles/jp/builds/bitrise-checks-on-github-checks.md\n- _articles/jp/builds/caching/caching-homebrew-installers.md\n- _articles/jp/builds/configuring-notifications.md\n- _articles/jp/builds/remote-access.md\n- _articles/jp/builds/triggering-builds/approving-pull-request-builds.md\n- _articles/jp/builds/triggering-builds/skipping-a-given-commit-or-pull-request.md\n- _articles/jp/contributors/verified-steps.md\n- _articles/jp/deploy/android-deploy/exporting-a-universal-apk-from-an-aab.md\n- _articles/jp/deploy/android-deploy/generating-and-deploying-android-app-bundles.md\n- _articles/jp/deploy/deploy-apps-to-applivery-from-bitrise.md\n- _articles/jp/deploy/ship.md\n- _articles/jp/faq/Invitation FAQ.md\n- _articles/jp/faq/how-can-i-git-checkout-from-a-detached-head-state.md\n- _articles/jp/getting-started/bitriseへのサインアップ.md\n- _articles/jp/getting-started/configuring-bitrise-steps-that-require-apple-developer-account-data.md\n- _articles/jp/getting-started/getting-started-with-expo-apps.md\n- _articles/jp/getting-started/signing-up-to-bitrise.md\n- _articles/jp/infrastructure/customisable-enterprise-build-platforms.md\n- _articles/jp/infrastructure/stack-update-and-removal-policy.md\n- _articles/jp/steps-and-workflows/copying-a-workflow-from-one-app-to-another.md\n- _articles/jp/team-management/organizations/setting-up-azure-ad-sso-for-bitrise.md\n- _articles/jp/team-management/organizations/setting-up-idaptive-saml-sso-for-bitrise.md\n- _articles/jp/team-management/organizations/setting-up-okta-sso-for-bitrise.md\n- _articles/jp/team-management/organizations/setting-up-ping-identity-sso-for-bitrise.md\n- _articles/jp/testing/exporting-to-test-reports-from-custom-script-steps.md\n- _articles/jp/testing/installing-an-ipa-file-from-the-public-install-page.md\n- _articles/jp/testing/test-reports.md\n- _articles/jp/tips-and-tricks/increasing-the-size-limit-of-env-vars.md\n- _articles/jp/tips-and-tricks/screen-recording-your-ui-tests-with-appium.md\n- _articles/jp/troubleshooting/no-activity-summaries-found-for-test.md\n- _articles/jp/troubleshooting/resetting-your-password.md\n- _articles/jp/tutorials/creating-a-white-label-app-version.md\n- deploy.md\n"} +{"text": "/*\n * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n *\n * This code is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License version 2 only, as\n * published by the Free Software Foundation. Oracle designates this\n * particular file as subject to the \"Classpath\" exception as provided\n * by Oracle in the LICENSE file that accompanied this code.\n *\n * This code is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * version 2 for more details (a copy is included in the LICENSE file that\n * accompanied this code).\n *\n * You should have received a copy of the GNU General Public License version\n * 2 along with this work; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n * or visit www.oracle.com if you need additional information or have any\n * questions.\n */\n\n// SAX DTD handler.\n// http://www.saxproject.org\n// No warranty; no copyright -- use this as you will.\n// $Id: DTDHandler.java,v 1.2 2004/11/03 22:44:51 jsuttor Exp $\n\npackage jdk.internal.org.xml.sax;\n\n/**\n * Receive notification of basic DTD-related events.\n *\n * <blockquote>\n * <em>This module, both source code and documentation, is in the\n * Public Domain, and comes with <strong>NO WARRANTY</strong>.</em>\n * See <a href='http://www.saxproject.org'>http://www.saxproject.org</a>\n * for further information.\n * </blockquote>\n *\n * <p>If a SAX application needs information about notations and\n * unparsed entities, then the application implements this\n * interface and registers an instance with the SAX parser using\n * the parser's setDTDHandler method. The parser uses the\n * instance to report notation and unparsed entity declarations to\n * the application.</p>\n *\n * <p>Note that this interface includes only those DTD events that\n * the XML recommendation <em>requires</em> processors to report:\n * notation and unparsed entity declarations.</p>\n *\n * <p>The SAX parser may report these events in any order, regardless\n * of the order in which the notations and unparsed entities were\n * declared; however, all DTD events must be reported after the\n * document handler's startDocument event, and before the first\n * startElement event.\n * (If the {@link org.xml.sax.ext.LexicalHandler LexicalHandler} is\n * used, these events must also be reported before the endDTD event.)\n * </p>\n *\n * <p>It is up to the application to store the information for\n * future use (perhaps in a hash table or object tree).\n * If the application encounters attributes of type \"NOTATION\",\n * \"ENTITY\", or \"ENTITIES\", it can use the information that it\n * obtained through this interface to find the entity and/or\n * notation corresponding with the attribute value.</p>\n *\n * @since SAX 1.0\n * @author David Megginson\n * @see org.xml.sax.XMLReader#setDTDHandler\n */\npublic interface DTDHandler {\n\n /**\n * Receive notification of a notation declaration event.\n *\n * <p>It is up to the application to record the notation for later\n * reference, if necessary;\n * notations may appear as attribute values and in unparsed entity\n * declarations, and are sometime used with processing instruction\n * target names.</p>\n *\n * <p>At least one of publicId and systemId must be non-null.\n * If a system identifier is present, and it is a URL, the SAX\n * parser must resolve it fully before passing it to the\n * application through this event.</p>\n *\n * <p>There is no guarantee that the notation declaration will be\n * reported before any unparsed entities that use it.</p>\n *\n * @param name The notation name.\n * @param publicId The notation's public identifier, or null if\n * none was given.\n * @param systemId The notation's system identifier, or null if\n * none was given.\n * @exception org.xml.sax.SAXException Any SAX exception, possibly\n * wrapping another exception.\n * @see #unparsedEntityDecl\n * @see org.xml.sax.Attributes\n */\n public abstract void notationDecl (String name,\n String publicId,\n String systemId)\n throws SAXException;\n\n\n /**\n * Receive notification of an unparsed entity declaration event.\n *\n * <p>Note that the notation name corresponds to a notation\n * reported by the {@link #notationDecl notationDecl} event.\n * It is up to the application to record the entity for later\n * reference, if necessary;\n * unparsed entities may appear as attribute values.\n * </p>\n *\n * <p>If the system identifier is a URL, the parser must resolve it\n * fully before passing it to the application.</p>\n *\n * @exception org.xml.sax.SAXException Any SAX exception, possibly\n * wrapping another exception.\n * @param name The unparsed entity's name.\n * @param publicId The entity's public identifier, or null if none\n * was given.\n * @param systemId The entity's system identifier.\n * @param notationName The name of the associated notation.\n * @see #notationDecl\n * @see org.xml.sax.Attributes\n */\n public abstract void unparsedEntityDecl (String name,\n String publicId,\n String systemId,\n String notationName)\n throws SAXException;\n\n // from SAX2 extension DeclHandler\n /**\n * Receive notification of the start of DTD declarations.\n *\n * The start/endDTD events appear within the start/endDocument events\n * from ContentHandler.\n *\n * @param name The document type name.\n * @param publicId The declared public identifier for the\n * external DTD subset, or null if none was declared.\n * @param systemId The declared system identifier for the\n * external DTD subset, or null if none was declared.\n * (Note that this is not resolved against the document\n * base URI.)\n * @throws SAXException the event receiver may throw an exception during processing\n */\n default public void startDTD (String name, String publicId, String systemId)\n throws SAXException\n {\n // no op\n }\n\n // Custom API for the Properties\n\n /**\n * Receive notification of the start of DTD internal subset.\n *\n * @throws SAXException the event receiver may throw an exception during processing\n */\n default public void startInternalSub () throws SAXException\n {\n // no op\n }\n}\n\n// end of DTDHandler.java\n"} +{"text": "Embedded Elixir File(0,20)\n EExTagImpl(TAG)(0,14)\n PsiElement(<%)('<%')(0,2)\n PsiElement(#)('#')(2,3)\n PsiComment(Comment)(' comment ')(3,12)\n PsiElement(%>)('%>')(12,14)\n PsiElement(Data)(' \\n123')(14,20)"} +{"text": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// source: google/ads/googleads/v0/resources/shared_criterion.proto\n\npackage resources // import \"google.golang.org/genproto/googleapis/ads/googleads/v0/resources\"\n\nimport proto \"github.com/golang/protobuf/proto\"\nimport fmt \"fmt\"\nimport math \"math\"\nimport wrappers \"github.com/golang/protobuf/ptypes/wrappers\"\nimport common \"google.golang.org/genproto/googleapis/ads/googleads/v0/common\"\nimport enums \"google.golang.org/genproto/googleapis/ads/googleads/v0/enums\"\n\n// Reference imports to suppress errors if they are not otherwise used.\nvar _ = proto.Marshal\nvar _ = fmt.Errorf\nvar _ = math.Inf\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the proto package it is being compiled against.\n// A compilation error at this line likely means your copy of the\n// proto package needs to be updated.\nconst _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package\n\n// A criterion belonging to a shared set.\ntype SharedCriterion struct {\n\t// The resource name of the shared criterion.\n\t// Shared set resource names have the form:\n\t//\n\t// `customers/{customer_id}/sharedCriteria/{shared_set_id}_{criterion_id}`\n\tResourceName string `protobuf:\"bytes,1,opt,name=resource_name,json=resourceName,proto3\" json:\"resource_name,omitempty\"`\n\t// The shared set to which the shared criterion belongs.\n\tSharedSet *wrappers.StringValue `protobuf:\"bytes,2,opt,name=shared_set,json=sharedSet,proto3\" json:\"shared_set,omitempty\"`\n\t// The ID of the criterion.\n\t//\n\t// This field is ignored for mutates.\n\tCriterionId *wrappers.Int64Value `protobuf:\"bytes,26,opt,name=criterion_id,json=criterionId,proto3\" json:\"criterion_id,omitempty\"`\n\t// The type of the criterion.\n\tType enums.CriterionTypeEnum_CriterionType `protobuf:\"varint,4,opt,name=type,proto3,enum=google.ads.googleads.v0.enums.CriterionTypeEnum_CriterionType\" json:\"type,omitempty\"`\n\t// The criterion.\n\t//\n\t// Exactly one must be set.\n\t//\n\t// Types that are valid to be assigned to Criterion:\n\t//\t*SharedCriterion_Keyword\n\t//\t*SharedCriterion_YoutubeVideo\n\t//\t*SharedCriterion_YoutubeChannel\n\t//\t*SharedCriterion_Placement\n\t//\t*SharedCriterion_MobileAppCategory\n\tCriterion isSharedCriterion_Criterion `protobuf_oneof:\"criterion\"`\n\tXXX_NoUnkeyedLiteral struct{} `json:\"-\"`\n\tXXX_unrecognized []byte `json:\"-\"`\n\tXXX_sizecache int32 `json:\"-\"`\n}\n\nfunc (m *SharedCriterion) Reset() { *m = SharedCriterion{} }\nfunc (m *SharedCriterion) String() string { return proto.CompactTextString(m) }\nfunc (*SharedCriterion) ProtoMessage() {}\nfunc (*SharedCriterion) Descriptor() ([]byte, []int) {\n\treturn fileDescriptor_shared_criterion_d8ff40aeb495542f, []int{0}\n}\nfunc (m *SharedCriterion) XXX_Unmarshal(b []byte) error {\n\treturn xxx_messageInfo_SharedCriterion.Unmarshal(m, b)\n}\nfunc (m *SharedCriterion) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {\n\treturn xxx_messageInfo_SharedCriterion.Marshal(b, m, deterministic)\n}\nfunc (dst *SharedCriterion) XXX_Merge(src proto.Message) {\n\txxx_messageInfo_SharedCriterion.Merge(dst, src)\n}\nfunc (m *SharedCriterion) XXX_Size() int {\n\treturn xxx_messageInfo_SharedCriterion.Size(m)\n}\nfunc (m *SharedCriterion) XXX_DiscardUnknown() {\n\txxx_messageInfo_SharedCriterion.DiscardUnknown(m)\n}\n\nvar xxx_messageInfo_SharedCriterion proto.InternalMessageInfo\n\nfunc (m *SharedCriterion) GetResourceName() string {\n\tif m != nil {\n\t\treturn m.ResourceName\n\t}\n\treturn \"\"\n}\n\nfunc (m *SharedCriterion) GetSharedSet() *wrappers.StringValue {\n\tif m != nil {\n\t\treturn m.SharedSet\n\t}\n\treturn nil\n}\n\nfunc (m *SharedCriterion) GetCriterionId() *wrappers.Int64Value {\n\tif m != nil {\n\t\treturn m.CriterionId\n\t}\n\treturn nil\n}\n\nfunc (m *SharedCriterion) GetType() enums.CriterionTypeEnum_CriterionType {\n\tif m != nil {\n\t\treturn m.Type\n\t}\n\treturn enums.CriterionTypeEnum_UNSPECIFIED\n}\n\ntype isSharedCriterion_Criterion interface {\n\tisSharedCriterion_Criterion()\n}\n\ntype SharedCriterion_Keyword struct {\n\tKeyword *common.KeywordInfo `protobuf:\"bytes,3,opt,name=keyword,proto3,oneof\"`\n}\n\ntype SharedCriterion_YoutubeVideo struct {\n\tYoutubeVideo *common.YouTubeVideoInfo `protobuf:\"bytes,5,opt,name=youtube_video,json=youtubeVideo,proto3,oneof\"`\n}\n\ntype SharedCriterion_YoutubeChannel struct {\n\tYoutubeChannel *common.YouTubeChannelInfo `protobuf:\"bytes,6,opt,name=youtube_channel,json=youtubeChannel,proto3,oneof\"`\n}\n\ntype SharedCriterion_Placement struct {\n\tPlacement *common.PlacementInfo `protobuf:\"bytes,7,opt,name=placement,proto3,oneof\"`\n}\n\ntype SharedCriterion_MobileAppCategory struct {\n\tMobileAppCategory *common.MobileAppCategoryInfo `protobuf:\"bytes,8,opt,name=mobile_app_category,json=mobileAppCategory,proto3,oneof\"`\n}\n\nfunc (*SharedCriterion_Keyword) isSharedCriterion_Criterion() {}\n\nfunc (*SharedCriterion_YoutubeVideo) isSharedCriterion_Criterion() {}\n\nfunc (*SharedCriterion_YoutubeChannel) isSharedCriterion_Criterion() {}\n\nfunc (*SharedCriterion_Placement) isSharedCriterion_Criterion() {}\n\nfunc (*SharedCriterion_MobileAppCategory) isSharedCriterion_Criterion() {}\n\nfunc (m *SharedCriterion) GetCriterion() isSharedCriterion_Criterion {\n\tif m != nil {\n\t\treturn m.Criterion\n\t}\n\treturn nil\n}\n\nfunc (m *SharedCriterion) GetKeyword() *common.KeywordInfo {\n\tif x, ok := m.GetCriterion().(*SharedCriterion_Keyword); ok {\n\t\treturn x.Keyword\n\t}\n\treturn nil\n}\n\nfunc (m *SharedCriterion) GetYoutubeVideo() *common.YouTubeVideoInfo {\n\tif x, ok := m.GetCriterion().(*SharedCriterion_YoutubeVideo); ok {\n\t\treturn x.YoutubeVideo\n\t}\n\treturn nil\n}\n\nfunc (m *SharedCriterion) GetYoutubeChannel() *common.YouTubeChannelInfo {\n\tif x, ok := m.GetCriterion().(*SharedCriterion_YoutubeChannel); ok {\n\t\treturn x.YoutubeChannel\n\t}\n\treturn nil\n}\n\nfunc (m *SharedCriterion) GetPlacement() *common.PlacementInfo {\n\tif x, ok := m.GetCriterion().(*SharedCriterion_Placement); ok {\n\t\treturn x.Placement\n\t}\n\treturn nil\n}\n\nfunc (m *SharedCriterion) GetMobileAppCategory() *common.MobileAppCategoryInfo {\n\tif x, ok := m.GetCriterion().(*SharedCriterion_MobileAppCategory); ok {\n\t\treturn x.MobileAppCategory\n\t}\n\treturn nil\n}\n\n// XXX_OneofFuncs is for the internal use of the proto package.\nfunc (*SharedCriterion) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {\n\treturn _SharedCriterion_OneofMarshaler, _SharedCriterion_OneofUnmarshaler, _SharedCriterion_OneofSizer, []interface{}{\n\t\t(*SharedCriterion_Keyword)(nil),\n\t\t(*SharedCriterion_YoutubeVideo)(nil),\n\t\t(*SharedCriterion_YoutubeChannel)(nil),\n\t\t(*SharedCriterion_Placement)(nil),\n\t\t(*SharedCriterion_MobileAppCategory)(nil),\n\t}\n}\n\nfunc _SharedCriterion_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {\n\tm := msg.(*SharedCriterion)\n\t// criterion\n\tswitch x := m.Criterion.(type) {\n\tcase *SharedCriterion_Keyword:\n\t\tb.EncodeVarint(3<<3 | proto.WireBytes)\n\t\tif err := b.EncodeMessage(x.Keyword); err != nil {\n\t\t\treturn err\n\t\t}\n\tcase *SharedCriterion_YoutubeVideo:\n\t\tb.EncodeVarint(5<<3 | proto.WireBytes)\n\t\tif err := b.EncodeMessage(x.YoutubeVideo); err != nil {\n\t\t\treturn err\n\t\t}\n\tcase *SharedCriterion_YoutubeChannel:\n\t\tb.EncodeVarint(6<<3 | proto.WireBytes)\n\t\tif err := b.EncodeMessage(x.YoutubeChannel); err != nil {\n\t\t\treturn err\n\t\t}\n\tcase *SharedCriterion_Placement:\n\t\tb.EncodeVarint(7<<3 | proto.WireBytes)\n\t\tif err := b.EncodeMessage(x.Placement); err != nil {\n\t\t\treturn err\n\t\t}\n\tcase *SharedCriterion_MobileAppCategory:\n\t\tb.EncodeVarint(8<<3 | proto.WireBytes)\n\t\tif err := b.EncodeMessage(x.MobileAppCategory); err != nil {\n\t\t\treturn err\n\t\t}\n\tcase nil:\n\tdefault:\n\t\treturn fmt.Errorf(\"SharedCriterion.Criterion has unexpected type %T\", x)\n\t}\n\treturn nil\n}\n\nfunc _SharedCriterion_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {\n\tm := msg.(*SharedCriterion)\n\tswitch tag {\n\tcase 3: // criterion.keyword\n\t\tif wire != proto.WireBytes {\n\t\t\treturn true, proto.ErrInternalBadWireType\n\t\t}\n\t\tmsg := new(common.KeywordInfo)\n\t\terr := b.DecodeMessage(msg)\n\t\tm.Criterion = &SharedCriterion_Keyword{msg}\n\t\treturn true, err\n\tcase 5: // criterion.youtube_video\n\t\tif wire != proto.WireBytes {\n\t\t\treturn true, proto.ErrInternalBadWireType\n\t\t}\n\t\tmsg := new(common.YouTubeVideoInfo)\n\t\terr := b.DecodeMessage(msg)\n\t\tm.Criterion = &SharedCriterion_YoutubeVideo{msg}\n\t\treturn true, err\n\tcase 6: // criterion.youtube_channel\n\t\tif wire != proto.WireBytes {\n\t\t\treturn true, proto.ErrInternalBadWireType\n\t\t}\n\t\tmsg := new(common.YouTubeChannelInfo)\n\t\terr := b.DecodeMessage(msg)\n\t\tm.Criterion = &SharedCriterion_YoutubeChannel{msg}\n\t\treturn true, err\n\tcase 7: // criterion.placement\n\t\tif wire != proto.WireBytes {\n\t\t\treturn true, proto.ErrInternalBadWireType\n\t\t}\n\t\tmsg := new(common.PlacementInfo)\n\t\terr := b.DecodeMessage(msg)\n\t\tm.Criterion = &SharedCriterion_Placement{msg}\n\t\treturn true, err\n\tcase 8: // criterion.mobile_app_category\n\t\tif wire != proto.WireBytes {\n\t\t\treturn true, proto.ErrInternalBadWireType\n\t\t}\n\t\tmsg := new(common.MobileAppCategoryInfo)\n\t\terr := b.DecodeMessage(msg)\n\t\tm.Criterion = &SharedCriterion_MobileAppCategory{msg}\n\t\treturn true, err\n\tdefault:\n\t\treturn false, nil\n\t}\n}\n\nfunc _SharedCriterion_OneofSizer(msg proto.Message) (n int) {\n\tm := msg.(*SharedCriterion)\n\t// criterion\n\tswitch x := m.Criterion.(type) {\n\tcase *SharedCriterion_Keyword:\n\t\ts := proto.Size(x.Keyword)\n\t\tn += 1 // tag and wire\n\t\tn += proto.SizeVarint(uint64(s))\n\t\tn += s\n\tcase *SharedCriterion_YoutubeVideo:\n\t\ts := proto.Size(x.YoutubeVideo)\n\t\tn += 1 // tag and wire\n\t\tn += proto.SizeVarint(uint64(s))\n\t\tn += s\n\tcase *SharedCriterion_YoutubeChannel:\n\t\ts := proto.Size(x.YoutubeChannel)\n\t\tn += 1 // tag and wire\n\t\tn += proto.SizeVarint(uint64(s))\n\t\tn += s\n\tcase *SharedCriterion_Placement:\n\t\ts := proto.Size(x.Placement)\n\t\tn += 1 // tag and wire\n\t\tn += proto.SizeVarint(uint64(s))\n\t\tn += s\n\tcase *SharedCriterion_MobileAppCategory:\n\t\ts := proto.Size(x.MobileAppCategory)\n\t\tn += 1 // tag and wire\n\t\tn += proto.SizeVarint(uint64(s))\n\t\tn += s\n\tcase nil:\n\tdefault:\n\t\tpanic(fmt.Sprintf(\"proto: unexpected type %T in oneof\", x))\n\t}\n\treturn n\n}\n\nfunc init() {\n\tproto.RegisterType((*SharedCriterion)(nil), \"google.ads.googleads.v0.resources.SharedCriterion\")\n}\n\nfunc init() {\n\tproto.RegisterFile(\"google/ads/googleads/v0/resources/shared_criterion.proto\", fileDescriptor_shared_criterion_d8ff40aeb495542f)\n}\n\nvar fileDescriptor_shared_criterion_d8ff40aeb495542f = []byte{\n\t// 559 bytes of a gzipped FileDescriptorProto\n\t0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xdf, 0x8a, 0xd3, 0x4e,\n\t0x14, 0xc7, 0x7f, 0xed, 0xfe, 0xfb, 0x75, 0xda, 0xdd, 0xc5, 0xe8, 0x45, 0xa8, 0x22, 0x5d, 0x65,\n\t0xa1, 0x20, 0x3b, 0x09, 0xf5, 0x0f, 0x92, 0x85, 0x85, 0xb4, 0x48, 0xad, 0xb2, 0x52, 0xd2, 0xa5,\n\t0xa2, 0x54, 0xc2, 0x34, 0x39, 0x9b, 0x0d, 0x26, 0x33, 0x61, 0x26, 0xe9, 0xd2, 0x4b, 0x5f, 0xc5,\n\t0x4b, 0x1f, 0x45, 0xf0, 0x45, 0x7c, 0x0a, 0xe9, 0xcc, 0x24, 0x8b, 0x2b, 0xb5, 0xde, 0x9d, 0xce,\n\t0x7c, 0x3f, 0x9f, 0x9c, 0x93, 0xce, 0x04, 0xbd, 0x8c, 0x18, 0x8b, 0x12, 0xb0, 0x48, 0x28, 0x2c,\n\t0x55, 0xae, 0xaa, 0x85, 0x6d, 0x71, 0x10, 0xac, 0xe0, 0x01, 0x08, 0x4b, 0x5c, 0x11, 0x0e, 0xa1,\n\t0x1f, 0xf0, 0x38, 0x07, 0x1e, 0x33, 0x8a, 0x33, 0xce, 0x72, 0x66, 0x1c, 0xa9, 0x38, 0x26, 0xa1,\n\t0xc0, 0x15, 0x89, 0x17, 0x36, 0xae, 0xc8, 0xf6, 0xc9, 0x3a, 0x79, 0xc0, 0xd2, 0x94, 0x51, 0x4b,\n\t0x2b, 0x89, 0x32, 0xb6, 0x7b, 0xeb, 0xe2, 0x40, 0x8b, 0x54, 0x58, 0x55, 0x03, 0x7e, 0xbe, 0xcc,\n\t0x40, 0x33, 0x0f, 0x35, 0x23, 0x7f, 0xcd, 0x8b, 0x4b, 0xeb, 0x9a, 0x93, 0x2c, 0x03, 0x2e, 0xd4,\n\t0xfe, 0xa3, 0x1f, 0x3b, 0xe8, 0x70, 0x22, 0x07, 0x18, 0x94, 0xb8, 0xf1, 0x18, 0xed, 0x97, 0x3d,\n\t0xfa, 0x94, 0xa4, 0x60, 0xd6, 0x3a, 0xb5, 0x6e, 0xc3, 0x6b, 0x95, 0x8b, 0xef, 0x48, 0x0a, 0xc6,\n\t0x29, 0x42, 0x7a, 0x70, 0x01, 0xb9, 0x59, 0xef, 0xd4, 0xba, 0xcd, 0xde, 0x03, 0x3d, 0x28, 0x2e,\n\t0x9f, 0x86, 0x27, 0x39, 0x8f, 0x69, 0x34, 0x25, 0x49, 0x01, 0x5e, 0x43, 0xe5, 0x27, 0x90, 0x1b,\n\t0x67, 0xa8, 0x75, 0xd3, 0x6d, 0x1c, 0x9a, 0x6d, 0x89, 0xdf, 0xff, 0x03, 0x1f, 0xd1, 0xfc, 0xc5,\n\t0x33, 0x45, 0x37, 0x2b, 0x60, 0x14, 0x1a, 0x1e, 0xda, 0x5e, 0xcd, 0x68, 0x6e, 0x77, 0x6a, 0xdd,\n\t0x83, 0xde, 0x19, 0x5e, 0xf7, 0xaa, 0xe5, 0x8b, 0xc1, 0xd5, 0x64, 0x17, 0xcb, 0x0c, 0x5e, 0xd1,\n\t0x22, 0xfd, 0x7d, 0xc5, 0x93, 0x2e, 0x63, 0x88, 0xf6, 0x3e, 0xc3, 0xf2, 0x9a, 0xf1, 0xd0, 0xdc,\n\t0x92, 0xed, 0x3c, 0x59, 0xab, 0x55, 0x7f, 0x0f, 0x7e, 0xab, 0xe2, 0x23, 0x7a, 0xc9, 0x5e, 0xff,\n\t0xe7, 0x95, 0xb4, 0xf1, 0x1e, 0xed, 0x2f, 0x59, 0x91, 0x17, 0x73, 0xf0, 0x17, 0x71, 0x08, 0xcc,\n\t0xdc, 0x91, 0x3a, 0x7b, 0x93, 0xee, 0x03, 0x2b, 0x2e, 0x8a, 0x39, 0x4c, 0x57, 0x8c, 0x76, 0xb6,\n\t0xb4, 0x48, 0xae, 0x19, 0x9f, 0xd0, 0x61, 0x29, 0x0e, 0xae, 0x08, 0xa5, 0x90, 0x98, 0xbb, 0x52,\n\t0xdd, 0xfb, 0x47, 0xf5, 0x40, 0x51, 0x5a, 0x7e, 0xa0, 0x65, 0x7a, 0xd5, 0x38, 0x47, 0x8d, 0x2c,\n\t0x21, 0x01, 0xa4, 0x40, 0x73, 0x73, 0x4f, 0x8a, 0x4f, 0x36, 0x89, 0xc7, 0x25, 0xa0, 0x9d, 0x37,\n\t0x06, 0x23, 0x42, 0x77, 0x53, 0x36, 0x8f, 0x13, 0xf0, 0x49, 0x96, 0xf9, 0x01, 0xc9, 0x21, 0x62,\n\t0x7c, 0x69, 0xfe, 0x2f, 0xc5, 0xcf, 0x37, 0x89, 0xcf, 0x25, 0xea, 0x66, 0xd9, 0x40, 0x83, 0xfa,\n\t0x01, 0x77, 0xd2, 0xdb, 0x1b, 0xfd, 0x26, 0x6a, 0x54, 0x67, 0xa3, 0xff, 0xa5, 0x8e, 0x8e, 0x03,\n\t0x96, 0xe2, 0x8d, 0x97, 0xaf, 0x7f, 0xef, 0xd6, 0xb1, 0x1f, 0xaf, 0x0e, 0xdd, 0xb8, 0xf6, 0xf1,\n\t0x8d, 0x46, 0x23, 0x96, 0x10, 0x1a, 0x61, 0xc6, 0x23, 0x2b, 0x02, 0x2a, 0x8f, 0x64, 0x79, 0xeb,\n\t0xb2, 0x58, 0xfc, 0xe5, 0x83, 0x70, 0x5a, 0x55, 0x5f, 0xeb, 0x5b, 0x43, 0xd7, 0xfd, 0x56, 0x3f,\n\t0x1a, 0x2a, 0xa5, 0x1b, 0x0a, 0xac, 0xca, 0x55, 0x35, 0xb5, 0xb1, 0x57, 0x26, 0xbf, 0x97, 0x99,\n\t0x99, 0x1b, 0x8a, 0x59, 0x95, 0x99, 0x4d, 0xed, 0x59, 0x95, 0xf9, 0x59, 0x3f, 0x56, 0x1b, 0x8e,\n\t0xe3, 0x86, 0xc2, 0x71, 0xaa, 0x94, 0xe3, 0x4c, 0x6d, 0xc7, 0xa9, 0x72, 0xf3, 0x5d, 0xd9, 0xec,\n\t0xd3, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xbe, 0x05, 0xb8, 0xd3, 0xbc, 0x04, 0x00, 0x00,\n}\n"} +{"text": "// Copyright 2013 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage ssh\n\n// Key exchange tests.\n\nimport (\n\t\"crypto/rand\"\n\t\"reflect\"\n\t\"testing\"\n)\n\nfunc TestKexes(t *testing.T) {\n\ttype kexResultErr struct {\n\t\tresult *kexResult\n\t\terr error\n\t}\n\n\tfor name, kex := range kexAlgoMap {\n\t\ta, b := memPipe()\n\n\t\ts := make(chan kexResultErr, 1)\n\t\tc := make(chan kexResultErr, 1)\n\t\tvar magics handshakeMagics\n\t\tgo func() {\n\t\t\tr, e := kex.Client(a, rand.Reader, &magics)\n\t\t\ta.Close()\n\t\t\tc <- kexResultErr{r, e}\n\t\t}()\n\t\tgo func() {\n\t\t\tr, e := kex.Server(b, rand.Reader, &magics, testSigners[\"ecdsa\"])\n\t\t\tb.Close()\n\t\t\ts <- kexResultErr{r, e}\n\t\t}()\n\n\t\tclientRes := <-c\n\t\tserverRes := <-s\n\t\tif clientRes.err != nil {\n\t\t\tt.Errorf(\"client: %v\", clientRes.err)\n\t\t}\n\t\tif serverRes.err != nil {\n\t\t\tt.Errorf(\"server: %v\", serverRes.err)\n\t\t}\n\t\tif !reflect.DeepEqual(clientRes.result, serverRes.result) {\n\t\t\tt.Errorf(\"kex %q: mismatch %#v, %#v\", name, clientRes.result, serverRes.result)\n\t\t}\n\t}\n}\n"} +{"text": "/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkWrapPythonMethodDef.h\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n\n#ifndef vtkWrapPythonMethodDef_h\n#define vtkWrapPythonMethodDef_h\n\n#include \"vtkParse.h\"\n#include \"vtkParseData.h\"\n#include \"vtkParseHierarchy.h\"\n\n/* check whether a method is wrappable */\nint vtkWrapPython_MethodCheck(ClassInfo* data, FunctionInfo* currentFunction, HierarchyInfo* hinfo);\n\n/* print out all methods and the method table */\nvoid vtkWrapPython_GenerateMethods(FILE* fp, const char* classname, ClassInfo* data,\n FileInfo* finfo, HierarchyInfo* hinfo, int is_vtkobject, int do_constructors);\n\n#endif /* vtkWrapPythonMethodDef_h */\n/* VTK-HeaderTest-Exclude: vtkWrapPythonMethodDef.h */\n"} +{"text": "// go run linux/mksysnum.go -Wall -Werror -static -I/tmp/include /tmp/include/asm/unistd.h\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n// +build sparc64,linux\n\npackage unix\n\nconst (\n\tSYS_RESTART_SYSCALL = 0\n\tSYS_EXIT = 1\n\tSYS_FORK = 2\n\tSYS_READ = 3\n\tSYS_WRITE = 4\n\tSYS_OPEN = 5\n\tSYS_CLOSE = 6\n\tSYS_WAIT4 = 7\n\tSYS_CREAT = 8\n\tSYS_LINK = 9\n\tSYS_UNLINK = 10\n\tSYS_EXECV = 11\n\tSYS_CHDIR = 12\n\tSYS_CHOWN = 13\n\tSYS_MKNOD = 14\n\tSYS_CHMOD = 15\n\tSYS_LCHOWN = 16\n\tSYS_BRK = 17\n\tSYS_PERFCTR = 18\n\tSYS_LSEEK = 19\n\tSYS_GETPID = 20\n\tSYS_CAPGET = 21\n\tSYS_CAPSET = 22\n\tSYS_SETUID = 23\n\tSYS_GETUID = 24\n\tSYS_VMSPLICE = 25\n\tSYS_PTRACE = 26\n\tSYS_ALARM = 27\n\tSYS_SIGALTSTACK = 28\n\tSYS_PAUSE = 29\n\tSYS_UTIME = 30\n\tSYS_ACCESS = 33\n\tSYS_NICE = 34\n\tSYS_SYNC = 36\n\tSYS_KILL = 37\n\tSYS_STAT = 38\n\tSYS_SENDFILE = 39\n\tSYS_LSTAT = 40\n\tSYS_DUP = 41\n\tSYS_PIPE = 42\n\tSYS_TIMES = 43\n\tSYS_UMOUNT2 = 45\n\tSYS_SETGID = 46\n\tSYS_GETGID = 47\n\tSYS_SIGNAL = 48\n\tSYS_GETEUID = 49\n\tSYS_GETEGID = 50\n\tSYS_ACCT = 51\n\tSYS_MEMORY_ORDERING = 52\n\tSYS_IOCTL = 54\n\tSYS_REBOOT = 55\n\tSYS_SYMLINK = 57\n\tSYS_READLINK = 58\n\tSYS_EXECVE = 59\n\tSYS_UMASK = 60\n\tSYS_CHROOT = 61\n\tSYS_FSTAT = 62\n\tSYS_FSTAT64 = 63\n\tSYS_GETPAGESIZE = 64\n\tSYS_MSYNC = 65\n\tSYS_VFORK = 66\n\tSYS_PREAD64 = 67\n\tSYS_PWRITE64 = 68\n\tSYS_MMAP = 71\n\tSYS_MUNMAP = 73\n\tSYS_MPROTECT = 74\n\tSYS_MADVISE = 75\n\tSYS_VHANGUP = 76\n\tSYS_MINCORE = 78\n\tSYS_GETGROUPS = 79\n\tSYS_SETGROUPS = 80\n\tSYS_GETPGRP = 81\n\tSYS_SETITIMER = 83\n\tSYS_SWAPON = 85\n\tSYS_GETITIMER = 86\n\tSYS_SETHOSTNAME = 88\n\tSYS_DUP2 = 90\n\tSYS_FCNTL = 92\n\tSYS_SELECT = 93\n\tSYS_FSYNC = 95\n\tSYS_SETPRIORITY = 96\n\tSYS_SOCKET = 97\n\tSYS_CONNECT = 98\n\tSYS_ACCEPT = 99\n\tSYS_GETPRIORITY = 100\n\tSYS_RT_SIGRETURN = 101\n\tSYS_RT_SIGACTION = 102\n\tSYS_RT_SIGPROCMASK = 103\n\tSYS_RT_SIGPENDING = 104\n\tSYS_RT_SIGTIMEDWAIT = 105\n\tSYS_RT_SIGQUEUEINFO = 106\n\tSYS_RT_SIGSUSPEND = 107\n\tSYS_SETRESUID = 108\n\tSYS_GETRESUID = 109\n\tSYS_SETRESGID = 110\n\tSYS_GETRESGID = 111\n\tSYS_RECVMSG = 113\n\tSYS_SENDMSG = 114\n\tSYS_GETTIMEOFDAY = 116\n\tSYS_GETRUSAGE = 117\n\tSYS_GETSOCKOPT = 118\n\tSYS_GETCWD = 119\n\tSYS_READV = 120\n\tSYS_WRITEV = 121\n\tSYS_SETTIMEOFDAY = 122\n\tSYS_FCHOWN = 123\n\tSYS_FCHMOD = 124\n\tSYS_RECVFROM = 125\n\tSYS_SETREUID = 126\n\tSYS_SETREGID = 127\n\tSYS_RENAME = 128\n\tSYS_TRUNCATE = 129\n\tSYS_FTRUNCATE = 130\n\tSYS_FLOCK = 131\n\tSYS_LSTAT64 = 132\n\tSYS_SENDTO = 133\n\tSYS_SHUTDOWN = 134\n\tSYS_SOCKETPAIR = 135\n\tSYS_MKDIR = 136\n\tSYS_RMDIR = 137\n\tSYS_UTIMES = 138\n\tSYS_STAT64 = 139\n\tSYS_SENDFILE64 = 140\n\tSYS_GETPEERNAME = 141\n\tSYS_FUTEX = 142\n\tSYS_GETTID = 143\n\tSYS_GETRLIMIT = 144\n\tSYS_SETRLIMIT = 145\n\tSYS_PIVOT_ROOT = 146\n\tSYS_PRCTL = 147\n\tSYS_PCICONFIG_READ = 148\n\tSYS_PCICONFIG_WRITE = 149\n\tSYS_GETSOCKNAME = 150\n\tSYS_INOTIFY_INIT = 151\n\tSYS_INOTIFY_ADD_WATCH = 152\n\tSYS_POLL = 153\n\tSYS_GETDENTS64 = 154\n\tSYS_INOTIFY_RM_WATCH = 156\n\tSYS_STATFS = 157\n\tSYS_FSTATFS = 158\n\tSYS_UMOUNT = 159\n\tSYS_SCHED_SET_AFFINITY = 160\n\tSYS_SCHED_GET_AFFINITY = 161\n\tSYS_GETDOMAINNAME = 162\n\tSYS_SETDOMAINNAME = 163\n\tSYS_UTRAP_INSTALL = 164\n\tSYS_QUOTACTL = 165\n\tSYS_SET_TID_ADDRESS = 166\n\tSYS_MOUNT = 167\n\tSYS_USTAT = 168\n\tSYS_SETXATTR = 169\n\tSYS_LSETXATTR = 170\n\tSYS_FSETXATTR = 171\n\tSYS_GETXATTR = 172\n\tSYS_LGETXATTR = 173\n\tSYS_GETDENTS = 174\n\tSYS_SETSID = 175\n\tSYS_FCHDIR = 176\n\tSYS_FGETXATTR = 177\n\tSYS_LISTXATTR = 178\n\tSYS_LLISTXATTR = 179\n\tSYS_FLISTXATTR = 180\n\tSYS_REMOVEXATTR = 181\n\tSYS_LREMOVEXATTR = 182\n\tSYS_SIGPENDING = 183\n\tSYS_QUERY_MODULE = 184\n\tSYS_SETPGID = 185\n\tSYS_FREMOVEXATTR = 186\n\tSYS_TKILL = 187\n\tSYS_EXIT_GROUP = 188\n\tSYS_UNAME = 189\n\tSYS_INIT_MODULE = 190\n\tSYS_PERSONALITY = 191\n\tSYS_REMAP_FILE_PAGES = 192\n\tSYS_EPOLL_CREATE = 193\n\tSYS_EPOLL_CTL = 194\n\tSYS_EPOLL_WAIT = 195\n\tSYS_IOPRIO_SET = 196\n\tSYS_GETPPID = 197\n\tSYS_SIGACTION = 198\n\tSYS_SGETMASK = 199\n\tSYS_SSETMASK = 200\n\tSYS_SIGSUSPEND = 201\n\tSYS_OLDLSTAT = 202\n\tSYS_USELIB = 203\n\tSYS_READDIR = 204\n\tSYS_READAHEAD = 205\n\tSYS_SOCKETCALL = 206\n\tSYS_SYSLOG = 207\n\tSYS_LOOKUP_DCOOKIE = 208\n\tSYS_FADVISE64 = 209\n\tSYS_FADVISE64_64 = 210\n\tSYS_TGKILL = 211\n\tSYS_WAITPID = 212\n\tSYS_SWAPOFF = 213\n\tSYS_SYSINFO = 214\n\tSYS_IPC = 215\n\tSYS_SIGRETURN = 216\n\tSYS_CLONE = 217\n\tSYS_IOPRIO_GET = 218\n\tSYS_ADJTIMEX = 219\n\tSYS_SIGPROCMASK = 220\n\tSYS_CREATE_MODULE = 221\n\tSYS_DELETE_MODULE = 222\n\tSYS_GET_KERNEL_SYMS = 223\n\tSYS_GETPGID = 224\n\tSYS_BDFLUSH = 225\n\tSYS_SYSFS = 226\n\tSYS_AFS_SYSCALL = 227\n\tSYS_SETFSUID = 228\n\tSYS_SETFSGID = 229\n\tSYS__NEWSELECT = 230\n\tSYS_SPLICE = 232\n\tSYS_STIME = 233\n\tSYS_STATFS64 = 234\n\tSYS_FSTATFS64 = 235\n\tSYS__LLSEEK = 236\n\tSYS_MLOCK = 237\n\tSYS_MUNLOCK = 238\n\tSYS_MLOCKALL = 239\n\tSYS_MUNLOCKALL = 240\n\tSYS_SCHED_SETPARAM = 241\n\tSYS_SCHED_GETPARAM = 242\n\tSYS_SCHED_SETSCHEDULER = 243\n\tSYS_SCHED_GETSCHEDULER = 244\n\tSYS_SCHED_YIELD = 245\n\tSYS_SCHED_GET_PRIORITY_MAX = 246\n\tSYS_SCHED_GET_PRIORITY_MIN = 247\n\tSYS_SCHED_RR_GET_INTERVAL = 248\n\tSYS_NANOSLEEP = 249\n\tSYS_MREMAP = 250\n\tSYS__SYSCTL = 251\n\tSYS_GETSID = 252\n\tSYS_FDATASYNC = 253\n\tSYS_NFSSERVCTL = 254\n\tSYS_SYNC_FILE_RANGE = 255\n\tSYS_CLOCK_SETTIME = 256\n\tSYS_CLOCK_GETTIME = 257\n\tSYS_CLOCK_GETRES = 258\n\tSYS_CLOCK_NANOSLEEP = 259\n\tSYS_SCHED_GETAFFINITY = 260\n\tSYS_SCHED_SETAFFINITY = 261\n\tSYS_TIMER_SETTIME = 262\n\tSYS_TIMER_GETTIME = 263\n\tSYS_TIMER_GETOVERRUN = 264\n\tSYS_TIMER_DELETE = 265\n\tSYS_TIMER_CREATE = 266\n\tSYS_VSERVER = 267\n\tSYS_IO_SETUP = 268\n\tSYS_IO_DESTROY = 269\n\tSYS_IO_SUBMIT = 270\n\tSYS_IO_CANCEL = 271\n\tSYS_IO_GETEVENTS = 272\n\tSYS_MQ_OPEN = 273\n\tSYS_MQ_UNLINK = 274\n\tSYS_MQ_TIMEDSEND = 275\n\tSYS_MQ_TIMEDRECEIVE = 276\n\tSYS_MQ_NOTIFY = 277\n\tSYS_MQ_GETSETATTR = 278\n\tSYS_WAITID = 279\n\tSYS_TEE = 280\n\tSYS_ADD_KEY = 281\n\tSYS_REQUEST_KEY = 282\n\tSYS_KEYCTL = 283\n\tSYS_OPENAT = 284\n\tSYS_MKDIRAT = 285\n\tSYS_MKNODAT = 286\n\tSYS_FCHOWNAT = 287\n\tSYS_FUTIMESAT = 288\n\tSYS_FSTATAT64 = 289\n\tSYS_UNLINKAT = 290\n\tSYS_RENAMEAT = 291\n\tSYS_LINKAT = 292\n\tSYS_SYMLINKAT = 293\n\tSYS_READLINKAT = 294\n\tSYS_FCHMODAT = 295\n\tSYS_FACCESSAT = 296\n\tSYS_PSELECT6 = 297\n\tSYS_PPOLL = 298\n\tSYS_UNSHARE = 299\n\tSYS_SET_ROBUST_LIST = 300\n\tSYS_GET_ROBUST_LIST = 301\n\tSYS_MIGRATE_PAGES = 302\n\tSYS_MBIND = 303\n\tSYS_GET_MEMPOLICY = 304\n\tSYS_SET_MEMPOLICY = 305\n\tSYS_KEXEC_LOAD = 306\n\tSYS_MOVE_PAGES = 307\n\tSYS_GETCPU = 308\n\tSYS_EPOLL_PWAIT = 309\n\tSYS_UTIMENSAT = 310\n\tSYS_SIGNALFD = 311\n\tSYS_TIMERFD_CREATE = 312\n\tSYS_EVENTFD = 313\n\tSYS_FALLOCATE = 314\n\tSYS_TIMERFD_SETTIME = 315\n\tSYS_TIMERFD_GETTIME = 316\n\tSYS_SIGNALFD4 = 317\n\tSYS_EVENTFD2 = 318\n\tSYS_EPOLL_CREATE1 = 319\n\tSYS_DUP3 = 320\n\tSYS_PIPE2 = 321\n\tSYS_INOTIFY_INIT1 = 322\n\tSYS_ACCEPT4 = 323\n\tSYS_PREADV = 324\n\tSYS_PWRITEV = 325\n\tSYS_RT_TGSIGQUEUEINFO = 326\n\tSYS_PERF_EVENT_OPEN = 327\n\tSYS_RECVMMSG = 328\n\tSYS_FANOTIFY_INIT = 329\n\tSYS_FANOTIFY_MARK = 330\n\tSYS_PRLIMIT64 = 331\n\tSYS_NAME_TO_HANDLE_AT = 332\n\tSYS_OPEN_BY_HANDLE_AT = 333\n\tSYS_CLOCK_ADJTIME = 334\n\tSYS_SYNCFS = 335\n\tSYS_SENDMMSG = 336\n\tSYS_SETNS = 337\n\tSYS_PROCESS_VM_READV = 338\n\tSYS_PROCESS_VM_WRITEV = 339\n\tSYS_KERN_FEATURES = 340\n\tSYS_KCMP = 341\n\tSYS_FINIT_MODULE = 342\n\tSYS_SCHED_SETATTR = 343\n\tSYS_SCHED_GETATTR = 344\n\tSYS_RENAMEAT2 = 345\n\tSYS_SECCOMP = 346\n\tSYS_GETRANDOM = 347\n\tSYS_MEMFD_CREATE = 348\n\tSYS_BPF = 349\n\tSYS_EXECVEAT = 350\n\tSYS_MEMBARRIER = 351\n\tSYS_USERFAULTFD = 352\n\tSYS_BIND = 353\n\tSYS_LISTEN = 354\n\tSYS_SETSOCKOPT = 355\n\tSYS_MLOCK2 = 356\n\tSYS_COPY_FILE_RANGE = 357\n\tSYS_PREADV2 = 358\n\tSYS_PWRITEV2 = 359\n\tSYS_STATX = 360\n\tSYS_IO_PGETEVENTS = 361\n\tSYS_PKEY_MPROTECT = 362\n\tSYS_PKEY_ALLOC = 363\n\tSYS_PKEY_FREE = 364\n\tSYS_RSEQ = 365\n\tSYS_SEMTIMEDOP = 392\n\tSYS_SEMGET = 393\n\tSYS_SEMCTL = 394\n\tSYS_SHMGET = 395\n\tSYS_SHMCTL = 396\n\tSYS_SHMAT = 397\n\tSYS_SHMDT = 398\n\tSYS_MSGGET = 399\n\tSYS_MSGSND = 400\n\tSYS_MSGRCV = 401\n\tSYS_MSGCTL = 402\n\tSYS_PIDFD_SEND_SIGNAL = 424\n\tSYS_IO_URING_SETUP = 425\n\tSYS_IO_URING_ENTER = 426\n\tSYS_IO_URING_REGISTER = 427\n\tSYS_OPEN_TREE = 428\n\tSYS_MOVE_MOUNT = 429\n\tSYS_FSOPEN = 430\n\tSYS_FSCONFIG = 431\n\tSYS_FSMOUNT = 432\n\tSYS_FSPICK = 433\n)\n"} +{"text": "import collections\nimport json\nimport logging\nimport operator\nimport re\n\nimport flask\nfrom oauth2client.client import GoogleCredentials\nfrom googleapiclient import discovery\n\nfrom google.appengine.api import urlfetch\nfrom google.appengine.ext import ndb\n\napp = flask.Flask('scheduler')\napp.debug = True\n\n# We use exponential moving average to record\n# test run times. Higher alpha discounts historic\n# observations faster.\nalpha = 0.3\n\nclass Test(ndb.Model):\n total_run_time = ndb.FloatProperty(default=0.) # Not total, but a EWMA\n total_runs = ndb.IntegerProperty(default=0)\n\n def parallelism(self):\n name = self.key.string_id()\n m = re.search('(\\d+)_test.sh$', name)\n if m is None:\n return 1\n else:\n return int(m.group(1))\n\n def cost(self):\n p = self.parallelism()\n logging.info(\"Test %s has parallelism %d and avg run time %s\", self.key.string_id(), p, self.total_run_time)\n return self.parallelism() * self.total_run_time\n\nclass Schedule(ndb.Model):\n shards = ndb.JsonProperty()\n\n@app.route('/record/<path:test_name>/<runtime>', methods=['POST'])\n@ndb.transactional\ndef record(test_name, runtime):\n test = Test.get_by_id(test_name)\n if test is None:\n test = Test(id=test_name)\n test.total_run_time = (test.total_run_time * (1-alpha)) + (float(runtime) * alpha)\n test.total_runs += 1\n test.put()\n return ('', 204)\n\n@app.route('/schedule/<test_run>/<int:shard_count>/<int:shard>', methods=['POST'])\ndef schedule(test_run, shard_count, shard):\n # read tests from body\n test_names = flask.request.get_json(force=True)['tests']\n\n # first see if we have a scedule already\n schedule_id = \"%s-%d\" % (test_run, shard_count)\n schedule = Schedule.get_by_id(schedule_id)\n if schedule is not None:\n return flask.json.jsonify(tests=schedule.shards[str(shard)])\n\n # if not, do simple greedy algorithm\n test_times = ndb.get_multi(ndb.Key(Test, test_name) for test_name in test_names)\n def avg(test):\n if test is not None:\n return test.cost()\n return 1\n test_times = [(test_name, avg(test)) for test_name, test in zip(test_names, test_times)]\n test_times_dict = dict(test_times)\n test_times.sort(key=operator.itemgetter(1))\n\n shards = {i: [] for i in xrange(shard_count)}\n while test_times:\n test_name, time = test_times.pop()\n\n # find shortest shard and put it in that\n s, _ = min(((i, sum(test_times_dict[t] for t in shards[i]))\n for i in xrange(shard_count)), key=operator.itemgetter(1))\n\n shards[s].append(test_name)\n\n # atomically insert or retrieve existing schedule\n schedule = Schedule.get_or_insert(schedule_id, shards=shards)\n return flask.json.jsonify(tests=schedule.shards[str(shard)])\n\nFIREWALL_REGEXES = [\n re.compile(r'^(?P<network>\\w+)-allow-(?P<type>\\w+)-(?P<build>\\d+)-(?P<shard>\\d+)$'),\n re.compile(r'^(?P<network>\\w+)-(?P<build>\\d+)-(?P<shard>\\d+)-allow-(?P<type>[\\w\\-]+)$'),\n]\nNAME_REGEXES = [\n re.compile(r'^host(?P<index>\\d+)-(?P<build>\\d+)-(?P<shard>\\d+)$'),\n re.compile(r'^test-(?P<build>\\d+)-(?P<shard>\\d+)-(?P<index>\\d+)$'),\n]\n\ndef _matches_any_regex(name, regexes):\n for regex in regexes:\n matches = regex.match(name)\n if matches:\n return matches\n\nPROJECTS = [\n ('weaveworks/weave', 'weave-net-tests', 'us-central1-a', True),\n ('weaveworks/weave', 'positive-cocoa-90213', 'us-central1-a', True),\n ('weaveworks/scope', 'scope-integration-tests', 'us-central1-a', False),\n]\n\n@app.route('/tasks/gc')\ndef gc():\n # Get list of running VMs, pick build id out of VM name\n credentials = GoogleCredentials.get_application_default()\n compute = discovery.build('compute', 'v1', credentials=credentials)\n\n for repo, project, zone, gc_fw in PROJECTS:\n gc_project(compute, repo, project, zone, gc_fw)\n\n return \"Done\"\n\ndef gc_project(compute, repo, project, zone, gc_fw):\n logging.info(\"GCing %s, %s, %s\", repo, project, zone)\n # Get list of builds, filter down to running builds:\n running = _get_running_builds(repo)\n # Stop VMs for builds that aren't running:\n _gc_compute_engine_instances(compute, project, zone, running)\n # Remove firewall rules for builds that aren't running:\n if gc_fw:\n _gc_firewall_rules(compute, project, running)\n\ndef _get_running_builds(repo):\n result = urlfetch.fetch('https://circleci.com/api/v1/project/%s' % repo,\n headers={'Accept': 'application/json'})\n assert result.status_code == 200\n builds = json.loads(result.content)\n running = {build['build_num'] for build in builds if not build.get('stop_time')}\n logging.info(\"Runnings builds: %r\", running)\n return running\n\ndef _get_hosts_by_build(instances):\n host_by_build = collections.defaultdict(list)\n for instance in instances['items']:\n matches = _matches_any_regex(instance['name'], NAME_REGEXES)\n if not matches:\n continue\n host_by_build[int(matches.group('build'))].append(instance['name'])\n logging.info(\"Running VMs by build: %r\", host_by_build)\n return host_by_build\n\ndef _gc_compute_engine_instances(compute, project, zone, running):\n instances = compute.instances().list(project=project, zone=zone).execute()\n if 'items' not in instances:\n return\n host_by_build = _get_hosts_by_build(instances)\n stopped = []\n for build, names in host_by_build.iteritems():\n if build in running:\n continue\n for name in names:\n stopped.append(name)\n logging.info(\"Stopping VM %s\", name)\n compute.instances().delete(project=project, zone=zone, instance=name).execute()\n return stopped\n\ndef _gc_firewall_rules(compute, project, running):\n firewalls = compute.firewalls().list(project=project).execute()\n if 'items' not in firewalls:\n return\n for firewall in firewalls['items']:\n matches = _matches_any_regex(firewall['name'], FIREWALL_REGEXES)\n if not matches:\n continue\n if int(matches.group('build')) in running:\n continue\n logging.info(\"Deleting firewall rule %s\", firewall['name'])\n compute.firewalls().delete(project=project, firewall=firewall['name']).execute()\n"} +{"text": "//\n// ViewController.h\n// UPCardsCarouselDemo\n//\n// Created by Paul Ulric on 11/12/2014.\n// Copyright (c) 2014 Paul Ulric. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n\n#import \"UPCardsCarousel.h\"\n\n@interface ViewController : UIViewController <UPCardsCarouselDataSource, UPCardsCarouselDelegate>\n\n\n@end\n\n"} +{"text": "/*\n * Copyright (c) 2007, Cameron Rich\n * \n * All rights reserved.\n * \n * Redistribution and use in source and binary forms, with or without \n * modification, are permitted provided that the following conditions are met:\n *\n * * Redistributions of source code must retain the above copyright notice, \n * this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright notice, \n * this list of conditions and the following disclaimer in the documentation \n * and/or other materials provided with the distribution.\n * * Neither the name of the axTLS project nor the names of its contributors \n * may be used to endorse or promote products derived from this software \n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n/**\n * SHA1 implementation - as defined in FIPS PUB 180-1 published April 17, 1995.\n * This code was originally taken from RFC3174\n */\n\n#include <string.h>\n#include \"os_port.h\"\n#include \"crypto.h\"\n\n/*\n * Define the SHA1 circular left shift macro\n */\n#define SHA1CircularShift(bits,word) \\\n (((word) << (bits)) | ((word) >> (32-(bits))))\n\n/* ----- static functions ----- */\nstatic void SHA1PadMessage(SHA1_CTX *ctx);\nstatic void SHA1ProcessMessageBlock(SHA1_CTX *ctx);\n\n/**\n * Initialize the SHA1 context \n */\nvoid SHA1_Init(SHA1_CTX *ctx)\n{\n ctx->Length_Low = 0;\n ctx->Length_High = 0;\n ctx->Message_Block_Index = 0;\n ctx->Intermediate_Hash[0] = 0x67452301;\n ctx->Intermediate_Hash[1] = 0xEFCDAB89;\n ctx->Intermediate_Hash[2] = 0x98BADCFE;\n ctx->Intermediate_Hash[3] = 0x10325476;\n ctx->Intermediate_Hash[4] = 0xC3D2E1F0;\n}\n\n/**\n * Accepts an array of octets as the next portion of the message.\n */\nvoid SHA1_Update(SHA1_CTX *ctx, const uint8_t *msg, int len)\n{\n while (len--)\n {\n ctx->Message_Block[ctx->Message_Block_Index++] = (*msg & 0xFF);\n ctx->Length_Low += 8;\n\n if (ctx->Length_Low == 0)\n ctx->Length_High++;\n\n if (ctx->Message_Block_Index == 64)\n SHA1ProcessMessageBlock(ctx);\n\n msg++;\n }\n}\n\n/**\n * Return the 160-bit message digest into the user's array\n */\nvoid SHA1_Final(uint8_t *digest, SHA1_CTX *ctx)\n{\n int i;\n\n SHA1PadMessage(ctx);\n memset(ctx->Message_Block, 0, 64);\n ctx->Length_Low = 0; /* and clear length */\n ctx->Length_High = 0;\n\n for (i = 0; i < SHA1_SIZE; i++)\n {\n digest[i] = ctx->Intermediate_Hash[i>>2] >> 8 * ( 3 - ( i & 0x03 ) );\n }\n}\n\n/**\n * Process the next 512 bits of the message stored in the array.\n */\nstatic void SHA1ProcessMessageBlock(SHA1_CTX *ctx)\n{\n const uint32_t K[] = { /* Constants defined in SHA-1 */\n 0x5A827999,\n 0x6ED9EBA1,\n 0x8F1BBCDC,\n 0xCA62C1D6\n };\n int t; /* Loop counter */\n uint32_t temp; /* Temporary word value */\n uint32_t W[80]; /* Word sequence */\n uint32_t A, B, C, D, E; /* Word buffers */\n\n /*\n * Initialize the first 16 words in the array W\n */\n for (t = 0; t < 16; t++)\n {\n W[t] = ctx->Message_Block[t * 4] << 24;\n W[t] |= ctx->Message_Block[t * 4 + 1] << 16;\n W[t] |= ctx->Message_Block[t * 4 + 2] << 8;\n W[t] |= ctx->Message_Block[t * 4 + 3];\n }\n\n for (t = 16; t < 80; t++)\n {\n W[t] = SHA1CircularShift(1,W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16]);\n }\n\n A = ctx->Intermediate_Hash[0];\n B = ctx->Intermediate_Hash[1];\n C = ctx->Intermediate_Hash[2];\n D = ctx->Intermediate_Hash[3];\n E = ctx->Intermediate_Hash[4];\n\n for (t = 0; t < 20; t++)\n {\n temp = SHA1CircularShift(5,A) +\n ((B & C) | ((~B) & D)) + E + W[t] + K[0];\n E = D;\n D = C;\n C = SHA1CircularShift(30,B);\n\n B = A;\n A = temp;\n }\n\n for (t = 20; t < 40; t++)\n {\n temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[1];\n E = D;\n D = C;\n C = SHA1CircularShift(30,B);\n B = A;\n A = temp;\n }\n\n for (t = 40; t < 60; t++)\n {\n temp = SHA1CircularShift(5,A) +\n ((B & C) | (B & D) | (C & D)) + E + W[t] + K[2];\n E = D;\n D = C;\n C = SHA1CircularShift(30,B);\n B = A;\n A = temp;\n }\n\n for (t = 60; t < 80; t++)\n {\n temp = SHA1CircularShift(5,A) + (B ^ C ^ D) + E + W[t] + K[3];\n E = D;\n D = C;\n C = SHA1CircularShift(30,B);\n B = A;\n A = temp;\n }\n\n ctx->Intermediate_Hash[0] += A;\n ctx->Intermediate_Hash[1] += B;\n ctx->Intermediate_Hash[2] += C;\n ctx->Intermediate_Hash[3] += D;\n ctx->Intermediate_Hash[4] += E;\n ctx->Message_Block_Index = 0;\n}\n\n/*\n * According to the standard, the message must be padded to an even\n * 512 bits. The first padding bit must be a '1'. The last 64\n * bits represent the length of the original message. All bits in\n * between should be 0. This function will pad the message\n * according to those rules by filling the Message_Block array\n * accordingly. It will also call the ProcessMessageBlock function\n * provided appropriately. When it returns, it can be assumed that\n * the message digest has been computed.\n *\n * @param ctx [in, out] The SHA1 context\n */\nstatic void SHA1PadMessage(SHA1_CTX *ctx)\n{\n /*\n * Check to see if the current message block is too small to hold\n * the initial padding bits and length. If so, we will pad the\n * block, process it, and then continue padding into a second\n * block.\n */\n if (ctx->Message_Block_Index > 55)\n {\n ctx->Message_Block[ctx->Message_Block_Index++] = 0x80;\n while(ctx->Message_Block_Index < 64)\n {\n ctx->Message_Block[ctx->Message_Block_Index++] = 0;\n }\n\n SHA1ProcessMessageBlock(ctx);\n\n while (ctx->Message_Block_Index < 56)\n {\n ctx->Message_Block[ctx->Message_Block_Index++] = 0;\n }\n }\n else\n {\n ctx->Message_Block[ctx->Message_Block_Index++] = 0x80;\n while(ctx->Message_Block_Index < 56)\n {\n\n ctx->Message_Block[ctx->Message_Block_Index++] = 0;\n }\n }\n\n /*\n * Store the message length as the last 8 octets\n */\n ctx->Message_Block[56] = ctx->Length_High >> 24;\n ctx->Message_Block[57] = ctx->Length_High >> 16;\n ctx->Message_Block[58] = ctx->Length_High >> 8;\n ctx->Message_Block[59] = ctx->Length_High;\n ctx->Message_Block[60] = ctx->Length_Low >> 24;\n ctx->Message_Block[61] = ctx->Length_Low >> 16;\n ctx->Message_Block[62] = ctx->Length_Low >> 8;\n ctx->Message_Block[63] = ctx->Length_Low;\n SHA1ProcessMessageBlock(ctx);\n}\n"} +{"text": "<html><head><title>Symbol Demo</title></head><body>\n<hr><p>&copy; 2009 <a href=\"mailto:hlship@gmail.com\">Howard M. Lewis Ship</a></p>\n<h1>Symbol Demo</h1>\n<hr><p>&copy; 2009 <a href=\"mailto:hlship@gmail.com\">Howard M. Lewis Ship</a></p>\n</body></html>"} +{"text": "# Copyright 2016, Google, Inc.\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\n# [START gae_flex_mailjet_yaml]\nruntime: nodejs\nenv: flex\n\n# The following env variables may contain sensitive information that grants\n# anyone access to your Mailjet account. Do not add this file to your source\n# control.\nenv_variables:\n MJ_APIKEY_PUBLIC: <your-mj-apikey-public>\n MJ_APIKEY_PRIVATE: <your-mj-apikey-private>\n# [END gae_flex_mailjet_yaml]\n"} +{"text": "//----------------------------------------------------------------------------\n// Anti-Grain Geometry - Version 2.4\n// Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com)\n//\n// Permission to copy, use, modify, sell and distribute this software \n// is granted provided this copyright notice appears in all copies. \n// This software is provided \"as is\" without express or implied\n// warranty, and with no claim as to its suitability for any purpose.\n//\n//----------------------------------------------------------------------------\n// Contact: mcseem@antigrain.com\n// mcseemagg@yahoo.com\n// http://www.antigrain.com\n//----------------------------------------------------------------------------\n//\n// scanline_u8 class\n//\n//----------------------------------------------------------------------------\n#ifndef AGG_ALPHA_MASK_U8_INCLUDED\n#define AGG_ALPHA_MASK_U8_INCLUDED\n\n#include <string.h>\n#include \"agg_basics.h\"\n#include \"agg_rendering_buffer.h\"\n\nnamespace agg\n{\n //===================================================one_component_mask_u8\n struct one_component_mask_u8\n {\n static unsigned calculate(const int8u* p) { return *p; }\n };\n \n\n //=====================================================rgb_to_gray_mask_u8\n template<unsigned R, unsigned G, unsigned B>\n struct rgb_to_gray_mask_u8\n {\n static unsigned calculate(const int8u* p) \n { \n return (p[R]*77 + p[G]*150 + p[B]*29) >> 8; \n }\n };\n\n //==========================================================alpha_mask_u8\n template<unsigned Step=1, unsigned Offset=0, class MaskF=one_component_mask_u8>\n class alpha_mask_u8\n {\n public:\n typedef int8u cover_type;\n typedef alpha_mask_u8<Step, Offset, MaskF> self_type;\n enum cover_scale_e\n { \n cover_shift = 8,\n cover_none = 0,\n cover_full = 255\n };\n\n alpha_mask_u8() : m_rbuf(0) {}\n alpha_mask_u8(rendering_buffer& rbuf) : m_rbuf(&rbuf) {}\n\n void attach(rendering_buffer& rbuf) { m_rbuf = &rbuf; }\n\n MaskF& mask_function() { return m_mask_function; }\n const MaskF& mask_function() const { return m_mask_function; }\n\n \n //--------------------------------------------------------------------\n cover_type pixel(int x, int y) const\n {\n if(x >= 0 && y >= 0 && \n x < (int)m_rbuf->width() && \n y < (int)m_rbuf->height())\n {\n return (cover_type)m_mask_function.calculate(\n m_rbuf->row_ptr(y) + x * Step + Offset);\n }\n return 0;\n }\n\n //--------------------------------------------------------------------\n cover_type combine_pixel(int x, int y, cover_type val) const\n {\n if(x >= 0 && y >= 0 && \n x < (int)m_rbuf->width() && \n y < (int)m_rbuf->height())\n {\n return (cover_type)((cover_full + val * \n m_mask_function.calculate(\n m_rbuf->row_ptr(y) + x * Step + Offset)) >> \n cover_shift);\n }\n return 0;\n }\n\n\n //--------------------------------------------------------------------\n void fill_hspan(int x, int y, cover_type* dst, int num_pix) const\n {\n int xmax = m_rbuf->width() - 1;\n int ymax = m_rbuf->height() - 1;\n\n int count = num_pix;\n cover_type* covers = dst;\n\n if(y < 0 || y > ymax)\n {\n memset(dst, 0, num_pix * sizeof(cover_type));\n return;\n }\n\n if(x < 0)\n {\n count += x;\n if(count <= 0) \n {\n memset(dst, 0, num_pix * sizeof(cover_type));\n return;\n }\n memset(covers, 0, -x * sizeof(cover_type));\n covers -= x;\n x = 0;\n }\n\n if(x + count > xmax)\n {\n int rest = x + count - xmax - 1;\n count -= rest;\n if(count <= 0) \n {\n memset(dst, 0, num_pix * sizeof(cover_type));\n return;\n }\n memset(covers + count, 0, rest * sizeof(cover_type));\n }\n\n const int8u* mask = m_rbuf->row_ptr(y) + x * Step + Offset;\n do\n {\n *covers++ = (cover_type)m_mask_function.calculate(mask);\n mask += Step;\n }\n while(--count);\n }\n\n\n //--------------------------------------------------------------------\n void combine_hspan(int x, int y, cover_type* dst, int num_pix) const\n {\n int xmax = m_rbuf->width() - 1;\n int ymax = m_rbuf->height() - 1;\n\n int count = num_pix;\n cover_type* covers = dst;\n\n if(y < 0 || y > ymax)\n {\n memset(dst, 0, num_pix * sizeof(cover_type));\n return;\n }\n\n if(x < 0)\n {\n count += x;\n if(count <= 0) \n {\n memset(dst, 0, num_pix * sizeof(cover_type));\n return;\n }\n memset(covers, 0, -x * sizeof(cover_type));\n covers -= x;\n x = 0;\n }\n\n if(x + count > xmax)\n {\n int rest = x + count - xmax - 1;\n count -= rest;\n if(count <= 0) \n {\n memset(dst, 0, num_pix * sizeof(cover_type));\n return;\n }\n memset(covers + count, 0, rest * sizeof(cover_type));\n }\n\n const int8u* mask = m_rbuf->row_ptr(y) + x * Step + Offset;\n do\n {\n *covers = (cover_type)((cover_full + (*covers) * \n m_mask_function.calculate(mask)) >> \n cover_shift);\n ++covers;\n mask += Step;\n }\n while(--count);\n }\n\n //--------------------------------------------------------------------\n void fill_vspan(int x, int y, cover_type* dst, int num_pix) const\n {\n int xmax = m_rbuf->width() - 1;\n int ymax = m_rbuf->height() - 1;\n\n int count = num_pix;\n cover_type* covers = dst;\n\n if(x < 0 || x > xmax)\n {\n memset(dst, 0, num_pix * sizeof(cover_type));\n return;\n }\n\n if(y < 0)\n {\n count += y;\n if(count <= 0) \n {\n memset(dst, 0, num_pix * sizeof(cover_type));\n return;\n }\n memset(covers, 0, -y * sizeof(cover_type));\n covers -= y;\n y = 0;\n }\n\n if(y + count > ymax)\n {\n int rest = y + count - ymax - 1;\n count -= rest;\n if(count <= 0) \n {\n memset(dst, 0, num_pix * sizeof(cover_type));\n return;\n }\n memset(covers + count, 0, rest * sizeof(cover_type));\n }\n\n const int8u* mask = m_rbuf->row_ptr(y) + x * Step + Offset;\n do\n {\n *covers++ = (cover_type)m_mask_function.calculate(mask);\n mask += m_rbuf->stride();\n }\n while(--count);\n }\n\n //--------------------------------------------------------------------\n void combine_vspan(int x, int y, cover_type* dst, int num_pix) const\n {\n int xmax = m_rbuf->width() - 1;\n int ymax = m_rbuf->height() - 1;\n\n int count = num_pix;\n cover_type* covers = dst;\n\n if(x < 0 || x > xmax)\n {\n memset(dst, 0, num_pix * sizeof(cover_type));\n return;\n }\n\n if(y < 0)\n {\n count += y;\n if(count <= 0) \n {\n memset(dst, 0, num_pix * sizeof(cover_type));\n return;\n }\n memset(covers, 0, -y * sizeof(cover_type));\n covers -= y;\n y = 0;\n }\n\n if(y + count > ymax)\n {\n int rest = y + count - ymax - 1;\n count -= rest;\n if(count <= 0) \n {\n memset(dst, 0, num_pix * sizeof(cover_type));\n return;\n }\n memset(covers + count, 0, rest * sizeof(cover_type));\n }\n\n const int8u* mask = m_rbuf->row_ptr(y) + x * Step + Offset;\n do\n {\n *covers = (cover_type)((cover_full + (*covers) * \n m_mask_function.calculate(mask)) >> \n cover_shift);\n ++covers;\n mask += m_rbuf->stride();\n }\n while(--count);\n }\n\n\n private:\n alpha_mask_u8(const self_type&);\n const self_type& operator = (const self_type&);\n\n rendering_buffer* m_rbuf;\n MaskF m_mask_function;\n };\n \n\n typedef alpha_mask_u8<1, 0> alpha_mask_gray8; //----alpha_mask_gray8\n\n typedef alpha_mask_u8<3, 0> alpha_mask_rgb24r; //----alpha_mask_rgb24r\n typedef alpha_mask_u8<3, 1> alpha_mask_rgb24g; //----alpha_mask_rgb24g\n typedef alpha_mask_u8<3, 2> alpha_mask_rgb24b; //----alpha_mask_rgb24b\n\n typedef alpha_mask_u8<3, 2> alpha_mask_bgr24r; //----alpha_mask_bgr24r\n typedef alpha_mask_u8<3, 1> alpha_mask_bgr24g; //----alpha_mask_bgr24g\n typedef alpha_mask_u8<3, 0> alpha_mask_bgr24b; //----alpha_mask_bgr24b\n\n typedef alpha_mask_u8<4, 0> alpha_mask_rgba32r; //----alpha_mask_rgba32r\n typedef alpha_mask_u8<4, 1> alpha_mask_rgba32g; //----alpha_mask_rgba32g\n typedef alpha_mask_u8<4, 2> alpha_mask_rgba32b; //----alpha_mask_rgba32b\n typedef alpha_mask_u8<4, 3> alpha_mask_rgba32a; //----alpha_mask_rgba32a\n\n typedef alpha_mask_u8<4, 1> alpha_mask_argb32r; //----alpha_mask_argb32r\n typedef alpha_mask_u8<4, 2> alpha_mask_argb32g; //----alpha_mask_argb32g\n typedef alpha_mask_u8<4, 3> alpha_mask_argb32b; //----alpha_mask_argb32b\n typedef alpha_mask_u8<4, 0> alpha_mask_argb32a; //----alpha_mask_argb32a\n\n typedef alpha_mask_u8<4, 2> alpha_mask_bgra32r; //----alpha_mask_bgra32r\n typedef alpha_mask_u8<4, 1> alpha_mask_bgra32g; //----alpha_mask_bgra32g\n typedef alpha_mask_u8<4, 0> alpha_mask_bgra32b; //----alpha_mask_bgra32b\n typedef alpha_mask_u8<4, 3> alpha_mask_bgra32a; //----alpha_mask_bgra32a\n\n typedef alpha_mask_u8<4, 3> alpha_mask_abgr32r; //----alpha_mask_abgr32r\n typedef alpha_mask_u8<4, 2> alpha_mask_abgr32g; //----alpha_mask_abgr32g\n typedef alpha_mask_u8<4, 1> alpha_mask_abgr32b; //----alpha_mask_abgr32b\n typedef alpha_mask_u8<4, 0> alpha_mask_abgr32a; //----alpha_mask_abgr32a\n\n typedef alpha_mask_u8<3, 0, rgb_to_gray_mask_u8<0, 1, 2> > alpha_mask_rgb24gray; //----alpha_mask_rgb24gray\n typedef alpha_mask_u8<3, 0, rgb_to_gray_mask_u8<2, 1, 0> > alpha_mask_bgr24gray; //----alpha_mask_bgr24gray\n typedef alpha_mask_u8<4, 0, rgb_to_gray_mask_u8<0, 1, 2> > alpha_mask_rgba32gray; //----alpha_mask_rgba32gray\n typedef alpha_mask_u8<4, 1, rgb_to_gray_mask_u8<0, 1, 2> > alpha_mask_argb32gray; //----alpha_mask_argb32gray\n typedef alpha_mask_u8<4, 0, rgb_to_gray_mask_u8<2, 1, 0> > alpha_mask_bgra32gray; //----alpha_mask_bgra32gray\n typedef alpha_mask_u8<4, 1, rgb_to_gray_mask_u8<2, 1, 0> > alpha_mask_abgr32gray; //----alpha_mask_abgr32gray\n\n\n\n //==========================================================amask_no_clip_u8\n template<unsigned Step=1, unsigned Offset=0, class MaskF=one_component_mask_u8>\n class amask_no_clip_u8\n {\n public:\n typedef int8u cover_type;\n typedef amask_no_clip_u8<Step, Offset, MaskF> self_type;\n enum cover_scale_e\n { \n cover_shift = 8,\n cover_none = 0,\n cover_full = 255\n };\n\n amask_no_clip_u8() : m_rbuf(0) {}\n amask_no_clip_u8(rendering_buffer& rbuf) : m_rbuf(&rbuf) {}\n\n void attach(rendering_buffer& rbuf) { m_rbuf = &rbuf; }\n\n MaskF& mask_function() { return m_mask_function; }\n const MaskF& mask_function() const { return m_mask_function; }\n\n\n //--------------------------------------------------------------------\n cover_type pixel(int x, int y) const\n {\n return (cover_type)m_mask_function.calculate(\n m_rbuf->row_ptr(y) + x * Step + Offset);\n }\n\n \n //--------------------------------------------------------------------\n cover_type combine_pixel(int x, int y, cover_type val) const\n {\n return (cover_type)((cover_full + val * \n m_mask_function.calculate(\n m_rbuf->row_ptr(y) + x * Step + Offset)) >> \n cover_shift);\n }\n\n\n //--------------------------------------------------------------------\n void fill_hspan(int x, int y, cover_type* dst, int num_pix) const\n {\n const int8u* mask = m_rbuf->row_ptr(y) + x * Step + Offset;\n do\n {\n *dst++ = (cover_type)m_mask_function.calculate(mask);\n mask += Step;\n }\n while(--num_pix);\n }\n\n\n\n //--------------------------------------------------------------------\n void combine_hspan(int x, int y, cover_type* dst, int num_pix) const\n {\n const int8u* mask = m_rbuf->row_ptr(y) + x * Step + Offset;\n do\n {\n *dst = (cover_type)((cover_full + (*dst) * \n m_mask_function.calculate(mask)) >> \n cover_shift);\n ++dst;\n mask += Step;\n }\n while(--num_pix);\n }\n\n\n //--------------------------------------------------------------------\n void fill_vspan(int x, int y, cover_type* dst, int num_pix) const\n {\n const int8u* mask = m_rbuf->row_ptr(y) + x * Step + Offset;\n do\n {\n *dst++ = (cover_type)m_mask_function.calculate(mask);\n mask += m_rbuf->stride();\n }\n while(--num_pix);\n }\n\n\n //--------------------------------------------------------------------\n void combine_vspan(int x, int y, cover_type* dst, int num_pix) const\n {\n const int8u* mask = m_rbuf->row_ptr(y) + x * Step + Offset;\n do\n {\n *dst = (cover_type)((cover_full + (*dst) * \n m_mask_function.calculate(mask)) >> \n cover_shift);\n ++dst;\n mask += m_rbuf->stride();\n }\n while(--num_pix);\n }\n\n private:\n amask_no_clip_u8(const self_type&);\n const self_type& operator = (const self_type&);\n\n rendering_buffer* m_rbuf;\n MaskF m_mask_function;\n };\n \n\n typedef amask_no_clip_u8<1, 0> amask_no_clip_gray8; //----amask_no_clip_gray8\n\n typedef amask_no_clip_u8<3, 0> amask_no_clip_rgb24r; //----amask_no_clip_rgb24r\n typedef amask_no_clip_u8<3, 1> amask_no_clip_rgb24g; //----amask_no_clip_rgb24g\n typedef amask_no_clip_u8<3, 2> amask_no_clip_rgb24b; //----amask_no_clip_rgb24b\n\n typedef amask_no_clip_u8<3, 2> amask_no_clip_bgr24r; //----amask_no_clip_bgr24r\n typedef amask_no_clip_u8<3, 1> amask_no_clip_bgr24g; //----amask_no_clip_bgr24g\n typedef amask_no_clip_u8<3, 0> amask_no_clip_bgr24b; //----amask_no_clip_bgr24b\n\n typedef amask_no_clip_u8<4, 0> amask_no_clip_rgba32r; //----amask_no_clip_rgba32r\n typedef amask_no_clip_u8<4, 1> amask_no_clip_rgba32g; //----amask_no_clip_rgba32g\n typedef amask_no_clip_u8<4, 2> amask_no_clip_rgba32b; //----amask_no_clip_rgba32b\n typedef amask_no_clip_u8<4, 3> amask_no_clip_rgba32a; //----amask_no_clip_rgba32a\n\n typedef amask_no_clip_u8<4, 1> amask_no_clip_argb32r; //----amask_no_clip_argb32r\n typedef amask_no_clip_u8<4, 2> amask_no_clip_argb32g; //----amask_no_clip_argb32g\n typedef amask_no_clip_u8<4, 3> amask_no_clip_argb32b; //----amask_no_clip_argb32b\n typedef amask_no_clip_u8<4, 0> amask_no_clip_argb32a; //----amask_no_clip_argb32a\n\n typedef amask_no_clip_u8<4, 2> amask_no_clip_bgra32r; //----amask_no_clip_bgra32r\n typedef amask_no_clip_u8<4, 1> amask_no_clip_bgra32g; //----amask_no_clip_bgra32g\n typedef amask_no_clip_u8<4, 0> amask_no_clip_bgra32b; //----amask_no_clip_bgra32b\n typedef amask_no_clip_u8<4, 3> amask_no_clip_bgra32a; //----amask_no_clip_bgra32a\n\n typedef amask_no_clip_u8<4, 3> amask_no_clip_abgr32r; //----amask_no_clip_abgr32r\n typedef amask_no_clip_u8<4, 2> amask_no_clip_abgr32g; //----amask_no_clip_abgr32g\n typedef amask_no_clip_u8<4, 1> amask_no_clip_abgr32b; //----amask_no_clip_abgr32b\n typedef amask_no_clip_u8<4, 0> amask_no_clip_abgr32a; //----amask_no_clip_abgr32a\n\n typedef amask_no_clip_u8<3, 0, rgb_to_gray_mask_u8<0, 1, 2> > amask_no_clip_rgb24gray; //----amask_no_clip_rgb24gray\n typedef amask_no_clip_u8<3, 0, rgb_to_gray_mask_u8<2, 1, 0> > amask_no_clip_bgr24gray; //----amask_no_clip_bgr24gray\n typedef amask_no_clip_u8<4, 0, rgb_to_gray_mask_u8<0, 1, 2> > amask_no_clip_rgba32gray; //----amask_no_clip_rgba32gray\n typedef amask_no_clip_u8<4, 1, rgb_to_gray_mask_u8<0, 1, 2> > amask_no_clip_argb32gray; //----amask_no_clip_argb32gray\n typedef amask_no_clip_u8<4, 0, rgb_to_gray_mask_u8<2, 1, 0> > amask_no_clip_bgra32gray; //----amask_no_clip_bgra32gray\n typedef amask_no_clip_u8<4, 1, rgb_to_gray_mask_u8<2, 1, 0> > amask_no_clip_abgr32gray; //----amask_no_clip_abgr32gray\n\n\n}\n\n\n\n#endif\n"} +{"text": "module.exports = preferredLanguages;\npreferredLanguages.preferredLanguages = preferredLanguages;\n\nfunction parseAcceptLanguage(accept) {\n var accepts = accept.split(',');\n\n for (var i = 0, j = 0; i < accepts.length; i++) {\n var langauge = parseLanguage(accepts[i].trim(), i);\n\n if (langauge) {\n accepts[j++] = langauge;\n }\n }\n\n // trim accepts\n accepts.length = j;\n\n return accepts;\n}\n\nfunction parseLanguage(s, i) {\n var match = s.match(/^\\s*(\\S+?)(?:-(\\S+?))?\\s*(?:;(.*))?$/);\n if (!match) return null;\n\n var prefix = match[1],\n suffix = match[2],\n full = prefix;\n\n if (suffix) full += \"-\" + suffix;\n\n var q = 1;\n if (match[3]) {\n var params = match[3].split(';')\n for (var i = 0; i < params.length; i ++) {\n var p = params[i].split('=');\n if (p[0] === 'q') q = parseFloat(p[1]);\n }\n }\n\n return {\n prefix: prefix,\n suffix: suffix,\n q: q,\n i: i,\n full: full\n };\n}\n\nfunction getLanguagePriority(language, accepted, index) {\n var priority = {o: -1, q: 0, s: 0};\n\n for (var i = 0; i < accepted.length; i++) {\n var spec = specify(language, accepted[i], index);\n\n if (spec && (priority.s - spec.s || priority.q - spec.q || priority.o - spec.o) < 0) {\n priority = spec;\n }\n }\n\n return priority;\n}\n\nfunction specify(language, spec, index) {\n var p = parseLanguage(language)\n if (!p) return null;\n var s = 0;\n if(spec.full.toLowerCase() === p.full.toLowerCase()){\n s |= 4;\n } else if (spec.prefix.toLowerCase() === p.full.toLowerCase()) {\n s |= 2;\n } else if (spec.full.toLowerCase() === p.prefix.toLowerCase()) {\n s |= 1;\n } else if (spec.full !== '*' ) {\n return null\n }\n\n return {\n i: index,\n o: spec.i,\n q: spec.q,\n s: s\n }\n};\n\nfunction preferredLanguages(accept, provided) {\n // RFC 2616 sec 14.4: no header = *\n var accepts = parseAcceptLanguage(accept === undefined ? '*' : accept || '');\n\n if (!provided) {\n // sorted list of all languages\n return accepts.filter(isQuality).sort(compareSpecs).map(function getLanguage(spec) {\n return spec.full;\n });\n }\n\n var priorities = provided.map(function getPriority(type, index) {\n return getLanguagePriority(type, accepts, index);\n });\n\n // sorted list of accepted languages\n return priorities.filter(isQuality).sort(compareSpecs).map(function getLanguage(priority) {\n return provided[priorities.indexOf(priority)];\n });\n}\n\nfunction compareSpecs(a, b) {\n return (b.q - a.q) || (b.s - a.s) || (a.o - b.o) || (a.i - b.i) || 0;\n}\n\nfunction isQuality(spec) {\n return spec.q > 0;\n}\n"} +{"text": "type file\nid OpenTK.Core\ndescription\n Holds core functionality used by other OpenTK packages.\nfiles\n bin\\Release\\netstandard2.1\\OpenTK.Core.dll ==> lib\\netstandard2.1\n bin\\Release\\netstandard2.1\\OpenTK.Core.xml ==> lib\\netstandard2.1 \n bin\\Release\\netstandard2.1\\OpenTK.Core.pdb ==> lib\\netstandard2.1"} +{"text": "/*\n * Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n *\n * This code is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License version 2 only, as\n * published by the Free Software Foundation. Oracle designates this\n * particular file as subject to the \"Classpath\" exception as provided\n * by Oracle in the LICENSE file that accompanied this code.\n *\n * This code is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * version 2 for more details (a copy is included in the LICENSE file that\n * accompanied this code).\n *\n * You should have received a copy of the GNU General Public License version\n * 2 along with this work; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n * or visit www.oracle.com if you need additional information or have any\n * questions.\n */\n\npackage sun.nio.ch;\n\nimport java.nio.channels.Channel;\nimport java.nio.channels.AsynchronousChannelGroup;\nimport java.nio.channels.spi.AsynchronousChannelProvider;\nimport java.io.IOException;\nimport java.io.FileDescriptor;\nimport java.util.Queue;\nimport java.util.concurrent.*;\nimport java.util.concurrent.atomic.AtomicInteger;\nimport java.util.concurrent.atomic.AtomicBoolean;\nimport java.security.PrivilegedAction;\nimport java.security.AccessController;\nimport java.security.AccessControlContext;\nimport sun.security.action.GetIntegerAction;\n\n/**\n * Base implementation of AsynchronousChannelGroup\n */\n\nabstract class AsynchronousChannelGroupImpl\n extends AsynchronousChannelGroup implements Executor\n{\n // number of internal threads handling I/O events when using an unbounded\n // thread pool. Internal threads do not dispatch to completion handlers.\n private static final int internalThreadCount = AccessController.doPrivileged(\n new GetIntegerAction(\"sun.nio.ch.internalThreadPoolSize\", 1));\n\n // associated thread pool\n private final ThreadPool pool;\n\n // number of tasks running (including internal)\n private final AtomicInteger threadCount = new AtomicInteger();\n\n // associated Executor for timeouts\n private ScheduledThreadPoolExecutor timeoutExecutor;\n\n // task queue for when using a fixed thread pool. In that case, a thread\n // waiting on I/O events must be awoken to poll tasks from this queue.\n private final Queue<Runnable> taskQueue;\n\n // group shutdown\n private final AtomicBoolean shutdown = new AtomicBoolean();\n private final Object shutdownNowLock = new Object();\n private volatile boolean terminateInitiated;\n\n AsynchronousChannelGroupImpl(AsynchronousChannelProvider provider,\n ThreadPool pool)\n {\n super(provider);\n this.pool = pool;\n\n if (pool.isFixedThreadPool()) {\n taskQueue = new ConcurrentLinkedQueue<>();\n } else {\n taskQueue = null; // not used\n }\n\n // use default thread factory as thread should not be visible to\n // application (it doesn't execute completion handlers).\n this.timeoutExecutor = (ScheduledThreadPoolExecutor)\n Executors.newScheduledThreadPool(1, ThreadPool.defaultThreadFactory());\n this.timeoutExecutor.setRemoveOnCancelPolicy(true);\n }\n\n final ExecutorService executor() {\n return pool.executor();\n }\n\n final boolean isFixedThreadPool() {\n return pool.isFixedThreadPool();\n }\n\n final int fixedThreadCount() {\n if (isFixedThreadPool()) {\n return pool.poolSize();\n } else {\n return pool.poolSize() + internalThreadCount;\n }\n }\n\n private Runnable bindToGroup(final Runnable task) {\n final AsynchronousChannelGroupImpl thisGroup = this;\n return new Runnable() {\n public void run() {\n Invoker.bindToGroup(thisGroup);\n task.run();\n }\n };\n }\n\n private void startInternalThread(final Runnable task) {\n AccessController.doPrivileged(new PrivilegedAction<>() {\n @Override\n public Void run() {\n // internal threads should not be visible to application so\n // cannot use user-supplied thread factory\n ThreadPool.defaultThreadFactory().newThread(task).start();\n return null;\n }\n });\n }\n\n protected final void startThreads(Runnable task) {\n if (!isFixedThreadPool()) {\n for (int i=0; i<internalThreadCount; i++) {\n startInternalThread(task);\n threadCount.incrementAndGet();\n }\n }\n if (pool.poolSize() > 0) {\n task = bindToGroup(task);\n try {\n for (int i=0; i<pool.poolSize(); i++) {\n pool.executor().execute(task);\n threadCount.incrementAndGet();\n }\n } catch (RejectedExecutionException x) {\n // nothing we can do\n }\n }\n }\n\n final int threadCount() {\n return threadCount.get();\n }\n\n /**\n * Invoked by tasks as they terminate\n */\n final int threadExit(Runnable task, boolean replaceMe) {\n if (replaceMe) {\n try {\n if (Invoker.isBoundToAnyGroup()) {\n // submit new task to replace this thread\n pool.executor().execute(bindToGroup(task));\n } else {\n // replace internal thread\n startInternalThread(task);\n }\n return threadCount.get();\n } catch (RejectedExecutionException x) {\n // unable to replace\n }\n }\n return threadCount.decrementAndGet();\n }\n\n /**\n * Wakes up a thread waiting for I/O events to execute the given task.\n */\n abstract void executeOnHandlerTask(Runnable task);\n\n /**\n * For a fixed thread pool the task is queued to a thread waiting on I/O\n * events. For other thread pools we simply submit the task to the thread\n * pool.\n */\n final void executeOnPooledThread(Runnable task) {\n if (isFixedThreadPool()) {\n executeOnHandlerTask(task);\n } else {\n pool.executor().execute(bindToGroup(task));\n }\n }\n\n final void offerTask(Runnable task) {\n taskQueue.offer(task);\n }\n\n final Runnable pollTask() {\n return (taskQueue == null) ? null : taskQueue.poll();\n }\n\n final Future<?> schedule(Runnable task, long timeout, TimeUnit unit) {\n try {\n return timeoutExecutor.schedule(task, timeout, unit);\n } catch (RejectedExecutionException rej) {\n if (terminateInitiated) {\n // no timeout scheduled as group is terminating\n return null;\n }\n throw new AssertionError(rej);\n }\n }\n\n @Override\n public final boolean isShutdown() {\n return shutdown.get();\n }\n\n @Override\n public final boolean isTerminated() {\n return pool.executor().isTerminated();\n }\n\n /**\n * Returns true if there are no channels in the group\n */\n abstract boolean isEmpty();\n\n /**\n * Attaches a foreign channel to this group.\n */\n abstract Object attachForeignChannel(Channel channel, FileDescriptor fdo)\n throws IOException;\n\n /**\n * Detaches a foreign channel from this group.\n */\n abstract void detachForeignChannel(Object key);\n\n /**\n * Closes all channels in the group\n */\n abstract void closeAllChannels() throws IOException;\n\n /**\n * Shutdown all tasks waiting for I/O events.\n */\n abstract void shutdownHandlerTasks();\n\n private void shutdownExecutors() {\n AccessController.doPrivileged(\n new PrivilegedAction<>() {\n public Void run() {\n pool.executor().shutdown();\n timeoutExecutor.shutdown();\n return null;\n }\n },\n null,\n new RuntimePermission(\"modifyThread\"));\n }\n\n @Override\n public final void shutdown() {\n if (shutdown.getAndSet(true)) {\n // already shutdown\n return;\n }\n // if there are channels in the group then shutdown will continue\n // when the last channel is closed\n if (!isEmpty()) {\n return;\n }\n // initiate termination (acquire shutdownNowLock to ensure that other\n // threads invoking shutdownNow will block).\n synchronized (shutdownNowLock) {\n if (!terminateInitiated) {\n terminateInitiated = true;\n shutdownHandlerTasks();\n shutdownExecutors();\n }\n }\n }\n\n @Override\n public final void shutdownNow() throws IOException {\n shutdown.set(true);\n synchronized (shutdownNowLock) {\n if (!terminateInitiated) {\n terminateInitiated = true;\n closeAllChannels();\n shutdownHandlerTasks();\n shutdownExecutors();\n }\n }\n }\n\n /**\n * For use by AsynchronousFileChannel to release resources without shutting\n * down the thread pool.\n */\n final void detachFromThreadPool() {\n if (shutdown.getAndSet(true))\n throw new AssertionError(\"Already shutdown\");\n if (!isEmpty())\n throw new AssertionError(\"Group not empty\");\n shutdownHandlerTasks();\n }\n\n @Override\n public final boolean awaitTermination(long timeout, TimeUnit unit)\n throws InterruptedException\n {\n return pool.executor().awaitTermination(timeout, unit);\n }\n\n /**\n * Executes the given command on one of the channel group's pooled threads.\n */\n @Override\n public final void execute(Runnable task) {\n SecurityManager sm = System.getSecurityManager();\n if (sm != null) {\n // when a security manager is installed then the user's task\n // must be run with the current calling context\n final AccessControlContext acc = AccessController.getContext();\n final Runnable delegate = task;\n task = new Runnable() {\n @Override\n public void run() {\n AccessController.doPrivileged(new PrivilegedAction<>() {\n @Override\n public Void run() {\n delegate.run();\n return null;\n }\n }, acc);\n }\n };\n }\n executeOnPooledThread(task);\n }\n}\n"} +{"text": "/*\n * Copyright 2017 Magnus Madsen\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage ca.uwaterloo.flix.language.ast\n\nsealed trait SemanticOperator\n\nobject SemanticOperator {\n\n /**\n * Boolean Operators.\n */\n sealed trait BoolOp extends SemanticOperator\n\n object BoolOp {\n\n /**\n * Boolean Not.\n */\n case object Not extends BoolOp\n\n /**\n * Boolean And.\n */\n case object And extends BoolOp\n\n /**\n * Boolean Or.\n */\n case object Or extends BoolOp\n\n /**\n * Equality.\n */\n case object Eq extends BoolOp\n\n /**\n * Inequality.\n */\n case object Neq extends BoolOp\n\n }\n\n /**\n * Char Operators.\n */\n sealed trait CharOp extends SemanticOperator\n\n object CharOp {\n\n /**\n * Equality.\n */\n case object Eq extends CharOp\n\n /**\n * Inequality.\n */\n case object Neq extends CharOp\n\n /**\n * Less than.\n */\n case object Lt extends CharOp\n\n /**\n * Less or equal.\n */\n case object Le extends CharOp\n\n /**\n * Greater than.\n */\n case object Gt extends CharOp\n\n /**\n * Greater or equal.\n */\n case object Ge extends CharOp\n\n }\n\n /**\n * Float32 Operators.\n */\n sealed trait Float32Op extends SemanticOperator\n\n object Float32Op {\n\n /**\n * Negation.\n */\n case object Neg extends Float64Op\n\n /**\n * Addition.\n */\n case object Add extends Float32Op\n\n /**\n * Subtraction.\n */\n case object Sub extends Float32Op\n\n /**\n * Multiplication.\n */\n case object Mul extends Float32Op\n\n /**\n * Division.\n */\n case object Div extends Float32Op\n\n /**\n * Remainder.\n */\n case object Rem extends Float32Op\n\n /**\n * Exponentiate.\n */\n case object Exp extends Float32Op\n\n /**\n * Equality.\n */\n case object Eq extends Float32Op\n\n /**\n * Inequality.\n */\n case object Neq extends Float32Op\n\n /**\n * Less than.\n */\n case object Lt extends Float32Op\n\n /**\n * Less or equal.\n */\n case object Le extends Float32Op\n\n /**\n * Greater than.\n */\n case object Gt extends Float32Op\n\n /**\n * Greater or equal.\n */\n case object Ge extends Float32Op\n\n }\n\n /**\n * Float64 Operators.\n */\n sealed trait Float64Op extends SemanticOperator\n\n object Float64Op {\n\n /**\n * Negation.\n */\n case object Neg extends Float64Op\n\n /**\n * Addition.\n */\n case object Add extends Float64Op\n\n /**\n * Subtraction.\n */\n case object Sub extends Float64Op\n\n /**\n * Multiplication.\n */\n case object Mul extends Float64Op\n\n /**\n * Division.\n */\n case object Div extends Float64Op\n\n /**\n * Remainder.\n */\n case object Rem extends Float64Op\n\n /**\n * Exponentiate.\n */\n case object Exp extends Float64Op\n\n /**\n * Equality.\n */\n case object Eq extends Float64Op\n\n /**\n * Inequality.\n */\n case object Neq extends Float64Op\n\n /**\n * Less than.\n */\n case object Lt extends Float64Op\n\n /**\n * Less or equal.\n */\n case object Le extends Float64Op\n\n /**\n * Greater than.\n */\n case object Gt extends Float64Op\n\n /**\n * Greater or equal.\n */\n case object Ge extends Float64Op\n\n }\n\n /**\n * Int8 Operators.\n */\n sealed trait Int8Op extends SemanticOperator\n\n object Int8Op {\n\n /**\n * Negation.\n */\n case object Neg extends Int8Op\n\n /**\n * Bitwise Not.\n */\n case object Not extends Int8Op\n\n /**\n * Addition.\n */\n case object Add extends Int8Op\n\n /**\n * Subtraction.\n */\n case object Sub extends Int8Op\n\n /**\n * Multiplication.\n */\n case object Mul extends Int8Op\n\n /**\n * Division.\n */\n case object Div extends Int8Op\n\n /**\n * Remainder.\n */\n case object Rem extends Int8Op\n\n /**\n * Exponentiate.\n */\n case object Exp extends Int8Op\n\n /**\n * Bitwise And.\n */\n case object And extends Int8Op\n\n /**\n * Bitwise Or.\n */\n case object Or extends Int8Op\n\n /**\n * Bitwise Xor.\n */\n case object Xor extends Int8Op\n\n /**\n * Bitwise Left Shift.\n */\n case object Shl extends Int8Op\n\n /**\n * Bitwise Right Shift.\n */\n case object Shr extends Int8Op\n\n /**\n * Equality.\n */\n case object Eq extends Int8Op\n\n /**\n * Inequality.\n */\n case object Neq extends Int8Op\n\n /**\n * Less than.\n */\n case object Lt extends Int8Op\n\n /**\n * Less or equal.\n */\n case object Le extends Int8Op\n\n /**\n * Greater than.\n */\n case object Gt extends Int8Op\n\n /**\n * Greater or equal.\n */\n case object Ge extends Int8Op\n\n }\n\n /**\n * Int16 Operators.\n */\n sealed trait Int16Op extends SemanticOperator\n\n object Int16Op {\n\n /**\n * Negation.\n */\n case object Neg extends Int16Op\n\n /**\n * Bitwise Not.\n */\n case object Not extends Int16Op\n\n /**\n * Addition.\n */\n case object Add extends Int16Op\n\n /**\n * Subtraction.\n */\n case object Sub extends Int16Op\n\n /**\n * Multiplication.\n */\n case object Mul extends Int16Op\n\n /**\n * Division.\n */\n case object Div extends Int16Op\n\n /**\n * Remainder.\n */\n case object Rem extends Int16Op\n\n /**\n * Exponentiate.\n */\n case object Exp extends Int16Op\n\n /**\n * Bitwise And.\n */\n case object And extends Int16Op\n\n /**\n * Bitwise Or.\n */\n case object Or extends Int16Op\n\n /**\n * Bitwise Xor.\n */\n case object Xor extends Int16Op\n\n /**\n * Bitwise Left Shift.\n */\n case object Shl extends Int16Op\n\n /**\n * Bitwise Right Shift.\n */\n case object Shr extends Int16Op\n\n /**\n * Equality.\n */\n case object Eq extends Int16Op\n\n /**\n * Inequality.\n */\n case object Neq extends Int16Op\n\n /**\n * Less than.\n */\n case object Lt extends Int16Op\n\n /**\n * Less or equal.\n */\n case object Le extends Int16Op\n\n /**\n * Greater than.\n */\n case object Gt extends Int16Op\n\n /**\n * Greater or equal.\n */\n case object Ge extends Int16Op\n\n }\n\n /**\n * Int32 Operators.\n */\n sealed trait Int32Op extends SemanticOperator\n\n object Int32Op {\n\n /**\n * Negation.\n */\n case object Neg extends Int32Op\n\n /**\n * Bitwise Not.\n */\n case object Not extends Int32Op\n\n /**\n * Addition.\n */\n case object Add extends Int32Op\n\n /**\n * Subtraction.\n */\n case object Sub extends Int32Op\n\n /**\n * Multiplication.\n */\n case object Mul extends Int32Op\n\n /**\n * Division.\n */\n case object Div extends Int32Op\n\n /**\n * Remainder.\n */\n case object Rem extends Int32Op\n\n /**\n * Exponentiate.\n */\n case object Exp extends Int32Op\n\n /**\n * Bitwise And.\n */\n case object And extends Int32Op\n\n /**\n * Bitwise Or.\n */\n case object Or extends Int32Op\n\n /**\n * Bitwise Xor.\n */\n case object Xor extends Int32Op\n\n /**\n * Bitwise Left Shift.\n */\n case object Shl extends Int32Op\n\n /**\n * Bitwise Right Shift.\n */\n case object Shr extends Int32Op\n\n /**\n * Equality.\n */\n case object Eq extends Int32Op\n\n /**\n * Inequality.\n */\n case object Neq extends Int32Op\n\n /**\n * Less than.\n */\n case object Lt extends Int32Op\n\n /**\n * Less or equal.\n */\n case object Le extends Int32Op\n\n /**\n * Greater than.\n */\n case object Gt extends Int32Op\n\n /**\n * Greater or equal.\n */\n case object Ge extends Int32Op\n\n }\n\n /**\n * Int64 Operators.\n */\n sealed trait Int64Op extends SemanticOperator\n\n object Int64Op {\n\n /**\n * Negation.\n */\n case object Neg extends Int64Op\n\n /**\n * Bitwise Not.\n */\n case object Not extends Int64Op\n\n /**\n * Addition.\n */\n case object Add extends Int64Op\n\n /**\n * Subtraction.\n */\n case object Sub extends Int64Op\n\n /**\n * Multiplication.\n */\n case object Mul extends Int64Op\n\n /**\n * Division.\n */\n case object Div extends Int64Op\n\n /**\n * Remainder.\n */\n case object Rem extends Int64Op\n\n /**\n * Exponentiate.\n */\n case object Exp extends Int64Op\n\n /**\n * Bitwise And.\n */\n case object And extends Int64Op\n\n /**\n * Bitwise Or.\n */\n case object Or extends Int64Op\n\n /**\n * Bitwise Xor.\n */\n case object Xor extends Int64Op\n\n /**\n * Bitwise Left Shift.\n */\n case object Shl extends Int64Op\n\n /**\n * Bitwise Right Shift.\n */\n case object Shr extends Int64Op\n\n /**\n * Equality.\n */\n case object Eq extends Int64Op\n\n /**\n * Inequality.\n */\n case object Neq extends Int64Op\n\n /**\n * Less than.\n */\n case object Lt extends Int64Op\n\n /**\n * Less or equal.\n */\n case object Le extends Int64Op\n\n /**\n * Greater than.\n */\n case object Gt extends Int64Op\n\n /**\n * Greater or equal.\n */\n case object Ge extends Int64Op\n\n }\n\n /**\n * BigInt Operators.\n */\n sealed trait BigIntOp extends SemanticOperator\n\n object BigIntOp {\n\n /**\n * Negation.\n */\n case object Neg extends BigIntOp\n\n /**\n * Bitwise Not.\n */\n case object Not extends Int64Op\n\n /**\n * Addition.\n */\n case object Add extends BigIntOp\n\n /**\n * Subtraction.\n */\n case object Sub extends BigIntOp\n\n /**\n * Multiplication.\n */\n case object Mul extends BigIntOp\n\n /**\n * Division.\n */\n case object Div extends BigIntOp\n\n /**\n * Remainder.\n */\n case object Rem extends BigIntOp\n\n /**\n * Exponentiate.\n */\n case object Exp extends BigIntOp\n\n /**\n * Bitwise And.\n */\n case object And extends BigIntOp\n\n /**\n * Bitwise Or.\n */\n case object Or extends BigIntOp\n\n /**\n * Bitwise Xor.\n */\n case object Xor extends BigIntOp\n\n /**\n * Bitwise Left Shift.\n */\n case object Shl extends BigIntOp\n\n /**\n * Bitwise Right Shift.\n */\n case object Shr extends BigIntOp\n\n /**\n * Equality.\n */\n case object Eq extends BigIntOp\n\n /**\n * Inequality.\n */\n case object Neq extends BigIntOp\n\n /**\n * Less than.\n */\n case object Lt extends BigIntOp\n\n /**\n * Less or equal.\n */\n case object Le extends BigIntOp\n\n /**\n * Greater than.\n */\n case object Gt extends BigIntOp\n\n /**\n * Greater or equal.\n */\n case object Ge extends BigIntOp\n\n }\n\n /**\n * Object Operators.\n */\n sealed trait ObjectOp extends SemanticOperator\n\n object ObjectOp {\n\n /**\n * Null equality.\n */\n case object EqNull extends ObjectOp\n\n /**\n * Null inequality.\n */\n case object NeqNull extends ObjectOp\n\n }\n\n /**\n * String Operators.\n */\n sealed trait StringOp extends SemanticOperator\n\n object StringOp {\n\n /**\n * Concatenate.\n */\n case object Concat extends StringOp\n\n /**\n * Equality.\n */\n case object Eq extends StringOp\n\n /**\n * Inequality.\n */\n case object Neq extends StringOp\n\n }\n\n}\n"} +{"text": "<?php\n/**\n * @package\tCodeIgniter\n * @author\tdomProjects Dev Team\n * @copyright Copyright (c) 2015, domProjects, Inc. (http://domProjects.com/)\n * @license http://opensource.org/licenses/MIT\tMIT License\n * @link http://domProjects.com\n * @since\tVersion 1.0.0\n * @filesource\n */\ndefined('BASEPATH') OR exit('No direct script access allowed');\n\n$lang['header_you_have'] = 'You have';\n$lang['header_message'] = 'message';\n$lang['header_notification'] = 'notification';\n$lang['header_task'] = 'task';\n$lang['header_view_all'] = 'View all';\n$lang['header_complete'] = 'Complete';\n$lang['header_member_since'] = 'Member since';\n$lang['header_followers'] = 'Followers';\n$lang['header_sales'] = 'Sales';\n$lang['header_friends'] = 'Friends';\n$lang['header_profile'] = 'Profile';\n$lang['header_sign_out'] = 'Sign out';\n"} +{"text": "/*******************************************************************************\n * HellFirePvP / Astral Sorcery 2020\n *\n * All rights reserved.\n * The source code is available on github: https://github.com/HellFirePvP/AstralSorcery\n * For further details, see the License file there.\n ******************************************************************************/\n\npackage hellfirepvp.astralsorcery.common.tile.base;\n\nimport hellfirepvp.astralsorcery.common.util.block.ILocatable;\nimport hellfirepvp.astralsorcery.common.util.item.ItemUtils;\nimport net.minecraft.block.BlockState;\nimport net.minecraft.block.Blocks;\nimport net.minecraft.entity.item.ItemEntity;\nimport net.minecraft.item.ItemStack;\nimport net.minecraft.nbt.CompoundNBT;\nimport net.minecraft.network.NetworkManager;\nimport net.minecraft.network.play.server.SUpdateTileEntityPacket;\nimport net.minecraft.tileentity.TileEntity;\nimport net.minecraft.tileentity.TileEntityType;\nimport net.minecraft.util.math.AxisAlignedBB;\nimport net.minecraft.util.math.BlockPos;\nimport net.minecraftforge.api.distmarker.Dist;\nimport net.minecraftforge.api.distmarker.OnlyIn;\n\nimport java.util.Random;\n\n/**\n * This class is part of the Astral Sorcery Mod\n * The complete source code for this mod can be found on github.\n * Class: TileEntitySynchronized\n * Created by HellFirePvP\n * Date: 11.05.2016 / 18:17\n */\npublic abstract class TileEntitySynchronized extends TileEntity implements ILocatable {\n\n protected static final Random rand = new Random();\n protected static final AxisAlignedBB BOX = new AxisAlignedBB(0, 0, 0, 1, 1, 1);\n\n protected TileEntitySynchronized(TileEntityType<?> tileEntityTypeIn) {\n super(tileEntityTypeIn);\n }\n\n @Override\n public BlockPos getLocationPos() {\n return this.getPos();\n }\n\n @Override\n public final void read(CompoundNBT compound) {\n super.read(compound);\n readCustomNBT(compound);\n readSaveNBT(compound);\n }\n\n //Both Network & Chunk-saving\n public void readCustomNBT(CompoundNBT compound) {}\n\n //Only Network-read\n public void readNetNBT(CompoundNBT compound) {}\n\n //Only Chunk-read\n public void readSaveNBT(CompoundNBT compound) {}\n\n @Override\n public final CompoundNBT write(CompoundNBT compound) {\n compound = super.write(compound);\n writeCustomNBT(compound);\n writeSaveNBT(compound);\n return compound;\n }\n\n //Both Network & Chunk-saving\n public void writeCustomNBT(CompoundNBT compound) {}\n\n //Only Network-write\n public void writeNetNBT(CompoundNBT compound) {}\n\n //Only Chunk-write\n public void writeSaveNBT(CompoundNBT compound) {}\n\n @Override\n public final SUpdateTileEntityPacket getUpdatePacket() {\n CompoundNBT compound = new CompoundNBT();\n super.write(compound);\n writeCustomNBT(compound);\n writeNetNBT(compound);\n return new SUpdateTileEntityPacket(getPos(), 255, compound);\n }\n\n @Override\n public CompoundNBT getUpdateTag() {\n CompoundNBT compound = new CompoundNBT();\n super.write(compound);\n writeCustomNBT(compound);\n return compound;\n }\n\n public final void onDataPacket(NetworkManager manager, SUpdateTileEntityPacket packet) {\n super.onDataPacket(manager, packet);\n readCustomNBT(packet.getNbtCompound());\n readNetNBT(packet.getNbtCompound());\n this.onDataReceived();\n }\n\n @OnlyIn(Dist.CLIENT)\n protected void onDataReceived() {}\n\n public void markForUpdate() {\n if (getWorld() != null) {\n BlockState thisState = this.getBlockState();\n getWorld().notifyBlockUpdate(getPos(), thisState, thisState, 3);\n }\n markDirty();\n }\n\n public ItemEntity dropItemOnTop(ItemStack stack) {\n return ItemUtils.dropItem(getWorld(), getPos().getX() + 0.5, getPos().getY() + 1.5, getPos().getZ() + 0.5, stack);\n }\n\n public boolean removeSelf() {\n if (this.getWorld().isRemote()) {\n return false;\n }\n return this.getWorld().setBlockState(this.getPos(), Blocks.AIR.getDefaultState());\n }\n}\n"} +{"text": "/*\n * Autogenerated file by GPU Top : https://github.com/rib/gputop\n * DO NOT EDIT manually!\n *\n *\n * Copyright (c) 2015 Intel Corporation\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice (including the next\n * paragraph) shall be included in all copies or substantial portions of the\n * Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n *\n */\n\n#ifndef __I915_OA_BDW_H__\n#define __I915_OA_BDW_H__\n\nextern void i915_perf_load_test_config_bdw(struct drm_i915_private *dev_priv);\n\n#endif\n"} +{"text": "use std::collections::HashMap;\n\nuse url::Url;\n\nuse iron::prelude::*;\nuse router::RouterInner;\n\n/// Generate a URL based off of the currently requested URL.\n///\n/// The `route_id` used during route registration will be used here again.\n///\n/// `params` will be inserted as route parameters if fitting, the rest will be appended as query\n/// parameters.\npub fn url_for(request: &Request, route_id: &str, params: HashMap<String, String>) -> ::iron::Url {\n let inner = request.extensions.get::<RouterInner>().expect(\"Couldn\\'t find router set up properly.\");\n let glob = inner.route_ids.get(route_id).expect(\"No route with that ID\");\n\n let mut url = request.url.clone();\n url_for_impl(url.as_mut(), glob, params);\n url\n}\n\nfn url_for_impl(url: &mut Url, glob: &str, mut params: HashMap<String, String>) {\n {\n let mut url_path_segments = url.path_segments_mut().unwrap();\n url_path_segments.clear();\n for path_segment in glob.split('/') {\n if path_segment.len() > 1 && (path_segment.starts_with(':') || path_segment.starts_with('*')) {\n let key = &path_segment[1..];\n match params.remove(key) {\n Some(x) => url_path_segments.push(&x),\n None => panic!(\"No value for key {}\", key)\n };\n } else {\n url_path_segments.push(path_segment);\n }\n }\n }\n\n // Now add on the remaining parameters that had no path match.\n url.set_query(None);\n if !params.is_empty() {\n url.query_pairs_mut()\n .extend_pairs(params.into_iter());\n }\n\n url.set_fragment(None);\n}\n\n#[cfg(test)]\nmod test {\n use super::url_for_impl;\n use std::collections::HashMap;\n\n #[test]\n fn test_no_trailing_slash() {\n let mut url = \"http://localhost/foo/bar/baz\".parse().unwrap();\n url_for_impl(&mut url, \"/foo/:user\", {\n let mut rv = HashMap::new();\n rv.insert(\"user\".into(), \"bam\".into());\n rv\n });\n assert_eq!(url.to_string(), \"http://localhost/foo/bam\");\n }\n\n #[test]\n fn test_trailing_slash() {\n let mut url = \"http://localhost/foo/bar/baz\".parse().unwrap();\n url_for_impl(&mut url, \"/foo/:user/\", {\n let mut rv = HashMap::new();\n rv.insert(\"user\".into(), \"bam\".into());\n rv\n });\n assert_eq!(url.to_string(), \"http://localhost/foo/bam/\");\n }\n}\n"} +{"text": "// Copyright 2015 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#include \"chrome/browser/chromeos/file_system_provider/operations/execute_action.h\"\n\n#include <memory>\n#include <string>\n#include <vector>\n\n#include \"base/files/file.h\"\n#include \"base/files/file_path.h\"\n#include \"chrome/browser/chromeos/file_system_provider/operations/test_util.h\"\n#include \"chrome/browser/chromeos/file_system_provider/provided_file_system_interface.h\"\n#include \"chrome/common/extensions/api/file_system_provider.h\"\n#include \"chrome/common/extensions/api/file_system_provider_capabilities/file_system_provider_capabilities_handler.h\"\n#include \"chrome/common/extensions/api/file_system_provider_internal.h\"\n#include \"extensions/browser/event_router.h\"\n#include \"storage/browser/fileapi/async_file_util.h\"\n#include \"testing/gtest/include/gtest/gtest.h\"\n\nnamespace chromeos {\nnamespace file_system_provider {\nnamespace operations {\nnamespace {\n\nconst char kExtensionId[] = \"mbflcebpggnecokmikipoihdbecnjfoj\";\nconst char kFileSystemId[] = \"testing-file-system\";\nconst int kRequestId = 2;\nconst base::FilePath::CharType kDirectoryPath[] =\n FILE_PATH_LITERAL(\"/kitty/and/puppy/happy\");\nconst base::FilePath::CharType kFilePath[] =\n FILE_PATH_LITERAL(\"/rabbit/and/bear/happy\");\nconst char kActionId[] = \"SHARE\";\n\n} // namespace\n\nclass FileSystemProviderOperationsExecuteActionTest : public testing::Test {\n protected:\n FileSystemProviderOperationsExecuteActionTest() {}\n ~FileSystemProviderOperationsExecuteActionTest() override {}\n\n void SetUp() override {\n file_system_info_ = ProvidedFileSystemInfo(\n kExtensionId, MountOptions(kFileSystemId, \"\" /* display_name */),\n base::FilePath(), false /* configurable */, true /* watchable */,\n extensions::SOURCE_FILE);\n entry_paths_.clear();\n entry_paths_.push_back(base::FilePath(kDirectoryPath));\n entry_paths_.push_back(base::FilePath(kFilePath));\n }\n\n ProvidedFileSystemInfo file_system_info_;\n std::vector<base::FilePath> entry_paths_;\n};\n\nTEST_F(FileSystemProviderOperationsExecuteActionTest, Execute) {\n using extensions::api::file_system_provider::ExecuteActionRequestedOptions;\n\n util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */);\n util::StatusCallbackLog callback_log;\n\n ExecuteAction execute_action(\n NULL, file_system_info_, entry_paths_, kActionId,\n base::Bind(&util::LogStatusCallback, &callback_log));\n execute_action.SetDispatchEventImplForTesting(\n base::Bind(&util::LoggingDispatchEventImpl::OnDispatchEventImpl,\n base::Unretained(&dispatcher)));\n\n EXPECT_TRUE(execute_action.Execute(kRequestId));\n\n ASSERT_EQ(1u, dispatcher.events().size());\n extensions::Event* event = dispatcher.events()[0];\n EXPECT_EQ(extensions::api::file_system_provider::OnExecuteActionRequested::\n kEventName,\n event->event_name);\n base::ListValue* event_args = event->event_args.get();\n ASSERT_EQ(1u, event_args->GetSize());\n\n const base::DictionaryValue* options_as_value = NULL;\n ASSERT_TRUE(event_args->GetDictionary(0, &options_as_value));\n\n ExecuteActionRequestedOptions options;\n ASSERT_TRUE(\n ExecuteActionRequestedOptions::Populate(*options_as_value, &options));\n EXPECT_EQ(kFileSystemId, options.file_system_id);\n EXPECT_EQ(kRequestId, options.request_id);\n ASSERT_EQ(entry_paths_.size(), options.entry_paths.size());\n EXPECT_EQ(entry_paths_[0].value(), options.entry_paths[0]);\n EXPECT_EQ(entry_paths_[1].value(), options.entry_paths[1]);\n EXPECT_EQ(kActionId, options.action_id);\n}\n\nTEST_F(FileSystemProviderOperationsExecuteActionTest, Execute_NoListener) {\n util::LoggingDispatchEventImpl dispatcher(false /* dispatch_reply */);\n util::StatusCallbackLog callback_log;\n\n ExecuteAction execute_action(\n NULL, file_system_info_, entry_paths_, kActionId,\n base::Bind(&util::LogStatusCallback, &callback_log));\n execute_action.SetDispatchEventImplForTesting(\n base::Bind(&util::LoggingDispatchEventImpl::OnDispatchEventImpl,\n base::Unretained(&dispatcher)));\n\n EXPECT_FALSE(execute_action.Execute(kRequestId));\n}\n\nTEST_F(FileSystemProviderOperationsExecuteActionTest, OnSuccess) {\n util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */);\n util::StatusCallbackLog callback_log;\n\n ExecuteAction execute_action(\n NULL, file_system_info_, entry_paths_, kActionId,\n base::Bind(&util::LogStatusCallback, &callback_log));\n execute_action.SetDispatchEventImplForTesting(\n base::Bind(&util::LoggingDispatchEventImpl::OnDispatchEventImpl,\n base::Unretained(&dispatcher)));\n\n EXPECT_TRUE(execute_action.Execute(kRequestId));\n\n execute_action.OnSuccess(kRequestId,\n std::unique_ptr<RequestValue>(new RequestValue()),\n false /* has_more */);\n ASSERT_EQ(1u, callback_log.size());\n EXPECT_EQ(base::File::FILE_OK, callback_log[0]);\n}\n\nTEST_F(FileSystemProviderOperationsExecuteActionTest, OnError) {\n util::LoggingDispatchEventImpl dispatcher(true /* dispatch_reply */);\n util::StatusCallbackLog callback_log;\n\n ExecuteAction execute_action(\n NULL, file_system_info_, entry_paths_, kActionId,\n base::Bind(&util::LogStatusCallback, &callback_log));\n execute_action.SetDispatchEventImplForTesting(\n base::Bind(&util::LoggingDispatchEventImpl::OnDispatchEventImpl,\n base::Unretained(&dispatcher)));\n\n EXPECT_TRUE(execute_action.Execute(kRequestId));\n\n execute_action.OnError(kRequestId,\n std::unique_ptr<RequestValue>(new RequestValue()),\n base::File::FILE_ERROR_TOO_MANY_OPENED);\n ASSERT_EQ(1u, callback_log.size());\n EXPECT_EQ(base::File::FILE_ERROR_TOO_MANY_OPENED, callback_log[0]);\n}\n\n} // namespace operations\n} // namespace file_system_provider\n} // namespace chromeos\n"} +{"text": "package DataStructures.Stacks;\n\nimport java.util.Stack;\n\n/**\n * The nested brackets problem is a problem that determines if a sequence of\n * brackets are properly nested. A sequence of brackets s is considered properly\n * nested if any of the following conditions are true: - s is empty - s has the\n * form (U) or [U] or {U} where U is a properly nested string - s has the form\n * VW where V and W are properly nested strings For example, the string\n * \"()()[()]\" is properly nested but \"[(()]\" is not. The function called\n * is_balanced takes as input a string S which is a sequence of brackets and\n * returns true if S is nested and false otherwise.\n *\n * @author akshay sharma\n * @author <a href=\"https://github.com/khalil2535\">khalil2535<a>\n * @author shellhub\n */\nclass BalancedBrackets {\n\n /**\n * Check if {@code leftBracket} and {@code rightBracket} is paired or not\n *\n * @param leftBracket left bracket\n * @param rightBracket right bracket\n * @return {@code true} if {@code leftBracket} and {@code rightBracket} is paired,\n * otherwise {@code false}\n */\n public static boolean isPaired(char leftBracket, char rightBracket) {\n char[][] pairedBrackets = {\n {'(', ')'},\n {'[', ']'},\n {'{', '}'},\n {'<', '>'}\n };\n for (char[] pairedBracket : pairedBrackets) {\n if (pairedBracket[0] == leftBracket && pairedBracket[1] == rightBracket) {\n return true;\n }\n }\n return false;\n }\n\n /**\n * Check if {@code brackets} is balanced\n *\n * @param brackets the brackets\n * @return {@code true} if {@code brackets} is balanced, otherwise {@code false}\n */\n public static boolean isBalanced(String brackets) {\n if (brackets == null) {\n throw new IllegalArgumentException(\"brackets is null\");\n }\n Stack<Character> bracketsStack = new Stack<>();\n for (char bracket : brackets.toCharArray()) {\n switch (bracket) {\n case '(':\n case '[':\n case '{':\n bracketsStack.push(bracket);\n break;\n case ')':\n case ']':\n case '}':\n if (bracketsStack.isEmpty() || !isPaired(bracketsStack.pop(), bracket)) {\n return false;\n }\n break;\n default: /* other character is invalid */\n return false;\n }\n }\n return bracketsStack.isEmpty();\n }\n\n\n public static void main(String[] args) {\n assert isBalanced(\"[()]{}{[()()]()}\");\n assert !isBalanced(\"[(])\");\n }\n}\n"} +{"text": "using System;\r\nusing System.IO;\r\nnamespace Editor_Mono.Cecil.PE\r\n{\r\n\tinternal class BinaryStreamWriter : BinaryWriter\r\n\t{\r\n\t\tpublic BinaryStreamWriter(Stream stream) : base(stream)\r\n\t\t{\r\n\t\t}\r\n\t\tpublic void WriteByte(byte value)\r\n\t\t{\r\n\t\t\tthis.Write(value);\r\n\t\t}\r\n\t\tpublic void WriteUInt16(ushort value)\r\n\t\t{\r\n\t\t\tthis.Write(value);\r\n\t\t}\r\n\t\tpublic void WriteInt16(short value)\r\n\t\t{\r\n\t\t\tthis.Write(value);\r\n\t\t}\r\n\t\tpublic void WriteUInt32(uint value)\r\n\t\t{\r\n\t\t\tthis.Write(value);\r\n\t\t}\r\n\t\tpublic void WriteInt32(int value)\r\n\t\t{\r\n\t\t\tthis.Write(value);\r\n\t\t}\r\n\t\tpublic void WriteUInt64(ulong value)\r\n\t\t{\r\n\t\t\tthis.Write(value);\r\n\t\t}\r\n\t\tpublic void WriteBytes(byte[] bytes)\r\n\t\t{\r\n\t\t\tthis.Write(bytes);\r\n\t\t}\r\n\t\tpublic void WriteDataDirectory(DataDirectory directory)\r\n\t\t{\r\n\t\t\tthis.Write(directory.VirtualAddress);\r\n\t\t\tthis.Write(directory.Size);\r\n\t\t}\r\n\t\tpublic void WriteBuffer(ByteBuffer buffer)\r\n\t\t{\r\n\t\t\tthis.Write(buffer.buffer, 0, buffer.length);\r\n\t\t}\r\n\t\tprotected void Advance(int bytes)\r\n\t\t{\r\n\t\t\tthis.BaseStream.Seek((long)bytes, SeekOrigin.Current);\r\n\t\t}\r\n\t}\r\n}\r\n"} +{"text": "<?php\n/**\n* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.\n* \n* VpnRoute File\n* PHP version 7\n*\n* @category Library\n* @package Microsoft.Graph\n* @copyright © Microsoft Corporation. All rights reserved.\n* @license https://opensource.org/licenses/MIT MIT License\n* @link https://graph.microsoft.com\n*/\nnamespace Beta\\Microsoft\\Graph\\Model;\n/**\n* VpnRoute class\n*\n* @category Model\n* @package Microsoft.Graph\n* @copyright © Microsoft Corporation. All rights reserved.\n* @license https://opensource.org/licenses/MIT MIT License\n* @link https://graph.microsoft.com\n*/\nclass VpnRoute extends Entity\n{\n /**\n * Gets the destinationPrefix\n * Destination prefix (IPv4/v6 address).\n *\n * @return string The destinationPrefix\n */\n public function getDestinationPrefix()\n {\n if (array_key_exists(\"destinationPrefix\", $this->_propDict)) {\n return $this->_propDict[\"destinationPrefix\"];\n } else {\n return null;\n }\n }\n\n /**\n * Sets the destinationPrefix\n * Destination prefix (IPv4/v6 address).\n *\n * @param string $val The value of the destinationPrefix\n *\n * @return VpnRoute\n */\n public function setDestinationPrefix($val)\n {\n $this->_propDict[\"destinationPrefix\"] = $val;\n return $this;\n }\n /**\n * Gets the prefixSize\n * Prefix size. (1-32). Valid values 1 to 32\n *\n * @return int The prefixSize\n */\n public function getPrefixSize()\n {\n if (array_key_exists(\"prefixSize\", $this->_propDict)) {\n return $this->_propDict[\"prefixSize\"];\n } else {\n return null;\n }\n }\n\n /**\n * Sets the prefixSize\n * Prefix size. (1-32). Valid values 1 to 32\n *\n * @param int $val The value of the prefixSize\n *\n * @return VpnRoute\n */\n public function setPrefixSize($val)\n {\n $this->_propDict[\"prefixSize\"] = $val;\n return $this;\n }\n}\n"} +{"text": "#if defined(Hiro_Group)\n\nnamespace hiro {\n\nstruct pGroup : pObject {\n Declare(Group, Object)\n};\n\n}\n\n#endif\n"} +{"text": "function plot_matrix(X,t,f,plt,Xerr)\r\n% Function to plot a time-frequency matrix X. Time and frequency axes are in t and f.\r\n% If error bars are specified in Xerr,\r\n% it also plots them. Xerr contains upper and lower confidence intervals \r\n% on X. \r\n% Usage: plot_matrix(X,t,f,plt,Xerr)\r\n% Inputs:\r\n% X: input vector as a function of time and frequency (t x f)\r\n% t: t axis grid for plot. Default [1:size(X,1)]\r\n% f: f axis grid for plot. Default. [1:size(X,2)]\r\n% plt: 'l' for log, 'n' for no log.\r\n% Xerr: lower and upper confidence intervals for X1: lower/upper x t x f.\r\nif nargin < 1; error('Need data'); end;\r\n[NT,NF]=size(X);\r\nif nargin < 2;\r\n t=1:NT;\r\nend;\r\nif nargin < 3;\r\n f=1:NF;\r\nend;\r\nif length(f)~=NF || length(t)~=NT; error('axes grid and data have incompatible lengths'); end;\r\nif nargin < 4 || isempty(plt);\r\n plt='l';\r\nend;\r\nif strcmp(plt,'l');\r\n X=10*log10(X);\r\n if nargin ==5; Xerr=10*log10(Xerr); end;\r\nend;\r\n\r\nif nargin < 5;\r\n imagesc(t,f,X');axis xy; colorbar; title('Spectrogram');\r\nelse\r\n subplot(311); imagesc(t,f,squeeze(Xerr(1,:,:))'); axis xy; colorbar; title('Lower confidence');\r\n subplot(312); imagesc(t,f,X'); title('X');axis xy; colorbar;\r\n subplot(313); imagesc(t,f,squeeze(Xerr(2,:,:))'); axis xy; colorbar; title('Upper confidence');\r\nend;\r\nxlabel('t');ylabel('f');\r\n\r\n"} +{"text": "# $Id: VCC100.kmk 2625 2012-08-07 20:26:48Z bird $\n## @file\n# kBuild Tool Config - Visual C++ 10.0 (aka Visual 2010 and MSC v16), targeting $(KBUILD_TARGET).\n#\n\n#\n# Copyright (c) 2004-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>\n#\n# This file is part of kBuild.\n#\n# kBuild is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# kBuild is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with kBuild; if not, write to the Free Software\n# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n#\n#\n# As a special exception you are granted permission to include this file, via\n# the kmk include directive, as you wish without this in itself causing the\n# resulting makefile, program or whatever to be covered by the GPL license.\n# This exception does not however invalidate any other reasons why the makefile,\n# program, whatever should not be covered the GPL.\n#\n#\n\nTOOL_VCC100 := Visual C++ 10.0 (aka Visual 2010 and MSC v16), targeting $(KBUILD_TARGET).\n\n# Tool Specific Properties\nifndef PATH_TOOL_VCC100\n PATH_TOOL_VCC100 := $(wildcard $(PATH_DEVTOOLS_TRG)/vcc/v10*)\n ifeq ($(PATH_TOOL_VCC100),)\n PATH_TOOL_VCC100 := $(wildcard $(PATH_DEVTOOLS)/win.x86/vcc/v10*)\n endif\n ifeq ($(PATH_TOOL_VCC100),)\n PATH_TOOL_VCC100 := $(wildcard $(PATH_DEVTOOLS)/x86.win32/vcc/v10*)\n endif\n ifeq ($(PATH_TOOL_VCC100),)\n PATH_TOOL_VCC100 := $(wildcard $(PATH_DEVTOOLS)/win.amd64/vcc/v10*)\n endif\n ifeq ($(PATH_TOOL_VCC100),)\n PATH_TOOL_VCC100 := $(lastword $(sort $(PATH_TOOL_VCC100)))\n endif\n # if not found, we'll enter 'pathless' mode.\nelse\n # Resolve any fancy stuff once and for all.\n PATH_TOOL_VCC100 := $(PATH_TOOL_VCC100)\nendif\nifneq ($(PATH_TOOL_VCC100),)\n ifeq ($(KBUILD_HOST).$(KBUILD_HOST_ARCH),win.amd64)\n PATH_TOOL_VCC100_BIN.amd64 ?= $(PATH_TOOL_VCC100)/bin/amd64\n else\n PATH_TOOL_VCC100_BIN.amd64 ?= $(PATH_TOOL_VCC100)/bin/x86_amd64\n endif\n PATH_TOOL_VCC100_BIN.x86 ?= $(PATH_TOOL_VCC100)/bin\n PATH_TOOL_VCC100_BIN ?= $(PATH_TOOL_VCC100_BIN.$(KBUILD_TARGET_ARCH))\n PATH_TOOL_VCC100_LIB.amd64 ?= $(PATH_TOOL_VCC100)/lib/amd64\n PATH_TOOL_VCC100_LIB.x86 ?= $(PATH_TOOL_VCC100)/lib\n PATH_TOOL_VCC100_LIB ?= $(PATH_TOOL_VCC100_LIB.$(KBUILD_TARGET_ARCH))\n PATH_TOOL_VCC100_INC ?= $(PATH_TOOL_VCC100)/include\n PATH_TOOL_VCC100_ATLMFC ?= $(PATH_TOOL_VCC100X86)/atlmfc\n PATH_TOOL_VCC100_ATLMFC_INC ?= $(PATH_TOOL_VCC100_ATLMFC)/include\n PATH_TOOL_VCC100_ATLMFC_LIB.amd64 ?= $(PATH_TOOL_VCC100_ATLMFC)/lib\n PATH_TOOL_VCC100_ATLMFC_LIB.x86 ?= $(PATH_TOOL_VCC100_ATLMFC)/lib/amd64\n PATH_TOOL_VCC100_ATLMFC_LIB ?= $(PATH_TOOL_VCC100_ATLMFC_LIB.$(KBUILD_TARGET_ARCH))\n TOOL_VCC100_CC ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100_BIN)/cl.exe\n TOOL_VCC100_CXX ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100_BIN)/cl.exe\n TOOL_VCC100_AS ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100_BIN)/ml64.exe\n TOOL_VCC100_AR ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100_BIN)/lib.exe\n TOOL_VCC100_LD ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100_BIN)/link.exe\n TOOL_VCC100_DUMPBIN ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100_BIN)/dumpbin.exe\n TOOL_VCC100_EDITBIN ?= $(EXEC_X86_WIN32) $(PATH_TOOL_VCC100_BIN)/editbin.exe\nelse\n # Pathless, relies on the environment.\n TOOL_VCC100_CC ?= $(EXEC_X86_WIN32) cl.exe\n TOOL_VCC100_CXX ?= $(EXEC_X86_WIN32) cl.exe\n TOOL_VCC100_AS ?= $(EXEC_X86_WIN32) ml64.exe\n TOOL_VCC100_AR ?= $(EXEC_X86_WIN32) lib.exe\n TOOL_VCC100_LD ?= $(EXEC_X86_WIN32) link.exe\n TOOL_VCC100_DUMPBIN ?= $(EXEC_X86_WIN32) dumpbin.exe\n TOOL_VCC100_EDITBIN ?= $(EXEC_X86_WIN32) editbin.exe\nendif\nTOOL_VCC100_RC ?= $(EXEC_X86_WIN32) $(call TOOL_VCC100_FN_FIND_SDK_TOOL,rc.exe,[Rr][Cc].[Ee][Xx][Ee],TOOL_VCC100_RC_CACHED)\nTOOL_VCC100_MT ?= $(EXEC_X86_WIN32) $(call TOOL_VCC100_FN_FIND_SDK_TOOL,mt.exe,[Mm][Tt].[Ee][Xx][Ee],TOOL_VCC100_MT_CACHED)\n\n# The following in duplicated in VCC100.kmk and VCC100X86.kmk.\nTOOL_VCC100_FN_FIND_SDK_TOOL_SUB = $(eval $3 := $(firstword \\\n $(if-expr defined(PATH_SDK_WINPSDK71_BIN), $(wildcard $(PATH_SDK_WINPSDK71_BIN)/$2)) \\\n $(if-expr defined(PATH_SDK_WINPSDK_BIN) , $(wildcard $(PATH_SDK_WINPSDK_BIN)/$2)) \\\n\t$(rsort $(wildcard $(KBUILD_DEVTOOLS_HST)/sdk/*/[Bb][Ii][Nn]/$2)) \\\n\t$(rsort $(wildcard $(KBUILD_DEVTOOLS_HST_ALT)/sdk/*/[Bb][Ii][Nn]/$2)) \\\n\t$1))\nTOOL_VCC100_FN_FIND_SDK_TOOL = $(if-expr !defined($3),$(TOOL_VCC100_FN_FIND_SDK_TOOL_SUB),)$($3)\n\n## Disabled fast DEP_IDB based dependencies.\n#VCC100_OLD_DEPS = 1\n\n## Constructs the correct .pdb name (the name is lowercased).\n# @param $(1) Base name, no extention.\n# @param $(2) The extension.\nTOOL_VCC100_PDB = $(dir $(1))$(tolower $(notdir $(1))).$(2)\n\nTOOL_VCC100_COBJSUFF ?= .obj\nTOOL_VCC100_CFLAGS ?= -TC -nologo\nTOOL_VCC100_CFLAGS.debug ?= -Zi\nTOOL_VCC100_CFLAGS.dbgopt ?= -O2 -Zi\nTOOL_VCC100_CFLAGS.release ?= -O2\nTOOL_VCC100_CFLAGS.profile ?= -O2\nTOOL_VCC100_CINCS ?= $(PATH_TOOL_VCC100_INC)\nTOOL_VCC100_CDEFS ?=\n\nTOOL_VCC100_CXXOBJSUFF ?= .obj\nTOOL_VCC100_CXXFLAGS ?= -TP -nologo\nTOOL_VCC100_CXXFLAGS.debug ?= -Zi\nTOOL_VCC100_CXXFLAGS.dbgopt ?= -O2 -Zi\nTOOL_VCC100_CXXFLAGS.release ?= -O2\nTOOL_VCC100_CXXFLAGS.profile ?= -O2\nTOOL_VCC100_CXXINCS ?= $(PATH_TOOL_VCC100_INC) $(PATH_TOOL_VCC100_ATLMFC_INC)\nTOOL_VCC100_CXXDEFS ?=\n\nTOOL_VCC100_ASOBJSUFF ?= .obj\n\nTOOL_VCC100_RCOBJSUFF ?= .res\nTOOL_VCC100_RCINCS ?= $(PATH_TOOL_VCC100_INC) $(PATH_TOOL_VCC100_ATLMFC_INC)\n\nTOOL_VCC100_ARFLAGS.amd64 ?= -machine:amd64\nTOOL_VCC100_ARFLAGS.x86 ?= -machine:x86\nTOOL_VCC100_ARFLAGS ?= -nologo\nTOOL_VCC100_ARLIBSUFF ?= .lib\n\nTOOL_VCC100_LDFLAGS.amd64 ?= -machine:amd64\nTOOL_VCC100_LDFLAGS.x86 ?= -machine:x86\nTOOL_VCC100_LDFLAGS ?= -nologo\nTOOL_VCC100_LDFLAGS.debug ?= -debug\nTOOL_VCC100_LDFLAGS.dbgopt ?= -debug\nTOOL_VCC100_LDFLAGS.profile ?= -debug\nTOOL_VCC100_LDFLAGS.release ?=\nTOOL_VCC100_LIBPATH.amd64 ?= $(PATH_TOOL_VCC100_LIB.amd64) $(PATH_TOOL_VCC100_ATLMFC_LIB.amd64)\nTOOL_VCC100_LIBPATH.x86 ?= $(PATH_TOOL_VCC100_LIB.x86) $(PATH_TOOL_VCC100_ATLMFC_LIB.x86)\n\n\n\n## Compile C source.\n# @param $(target) Normalized main target name.\n# @param $(source) Source filename (relative).\n# @param $(obj) Object file name. This shall be (re)created by the compilation.\n# @param $(dep) Dependcy file. This shall be (re)created by the compilation.\n# @param $(flags) Flags.\n# @param $(defs) Definitions. No -D or something.\n# @param $(incs) Includes. No -I or something.\n# @param $(dirdep) Directory creation dependency.\n# @param $(deps) Other dependencies.\n#\n# @param $(outbase) Output basename (full). Use this for list files and such.\n# @param $(objsuff) Object suffix.\nTOOL_VCC100_COMPILE_C_DEPEND =\nTOOL_VCC100_COMPILE_C_DEPORD =\nifdef KBUILD_USE_KOBJCACHE\nTOOL_VCC100_COMPILE_C_USES_KOBJCACHE = 1\nTOOL_VCC100_COMPILE_C_OUTPUT = $(outbase).i\nTOOL_VCC100_COMPILE_C_OUTPUT_MAYBE =\ndefine TOOL_VCC100_COMPILE_C_CMDS\n\t$(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -O2 -r\\\n\t\t--make-dep-fix-case --make-dep-gen-stubs --make-dep-quiet --make-dep-file $(dep)\\\n\t\t--kObjCache-cpp $(outbase).i\\\n\t\t$(TOOL_VCC100_CC) -E\\\n\t\t$(subst -Zi,-Z7,$(flags))\\\n\t\t$(addprefix -I, $(incs)) $(addprefix -D, $(defs))\\\n\t\t$(subst /,\\\\,$(abspath $(source))) \\\n\t\t--kObjCache-cc $(obj)\\\n\t\t$(TOOL_VCC100_CC) -c\\\n\t\t$(subst -Zi,-Z7,$(flags))\\\n\t\t-Fo$(obj)\\\n\t\t$(outbase).i\nendef\nelse # !KBUILD_USE_KOBJCACHE\nTOOL_VCC100_COMPILE_C_OUTPUT = $(call TOOL_VCC100_PDB, $(outbase)-obj,idb)\nTOOL_VCC100_COMPILE_C_OUTPUT_MAYBE = $(call TOOL_VCC100_PDB, $(outbase)-obj,pdb)\ndefine TOOL_VCC100_COMPILE_C_CMDS\n\t$(QUIET)$(TOOL_VCC100_CC) -c\\\n\t\t$(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\\\n\t\t-Fd$(outbase)-obj.pdb \\\n\t\t-FD\\\n\t\t-Fo$(obj)\\\n\t\t$(subst /,\\\\,$(abspath $(source)))\n\t$(QUIET)$(DEP_IDB) -f -s -q -o $(dep) -t $(obj) $(call TOOL_VCC100_PDB,$(outbase)-obj,idb)\nendef\nendif # !KBUILD_USE_KOBJCACHE\n\n\n## Compile C++ source.\n# @param $(target) Normalized main target name.\n# @param $(source) Source filename (relative).\n# @param $(obj) Object file name. This shall be (re)created by the compilation.\n# @param $(dep) Dependcy file. This shall be (re)created by the compilation.\n# @param $(flags) Flags.\n# @param $(defs) Definitions. No -D or something.\n# @param $(incs) Includes. No -I or something.\n# @param $(dirdep) Directory creation dependency.\n# @param $(deps) Other dependencies.\n#\n# @param $(outbase) Output basename (full). Use this for list files and such.\n# @param $(objsuff) Object suffix.\nTOOL_VCC100_COMPILE_CXX_DEPEND =\nTOOL_VCC100_COMPILE_CXX_DEPORD =\nifdef KBUILD_USE_KOBJCACHE\nTOOL_VCC100_COMPILE_CXX_USES_KOBJCACHE = 1\nTOOL_VCC100_COMPILE_CXX_OUTPUT = $(outbase).ii\nTOOL_VCC100_COMPILE_CXX_OUTPUT_MAYBE =\ndefine TOOL_VCC100_COMPILE_CXX_CMDS\n\t$(QUIET)$(KOBJCACHE) -f $(outbase).koc -d $(PATH_OBJCACHE) -t $(bld_trg).$(bld_trg_arch) -O2 -r\\\n\t\t--make-dep-fix-case --make-dep-gen-stubs --make-dep-quiet --make-dep-file $(dep)\\\n\t\t--kObjCache-cpp $(outbase).ii\\\n\t\t$(TOOL_VCC100_CXX) -E\\\n\t\t$(subst -Zi,-Z7,$(flags))\\\n\t\t$(addprefix -I, $(incs)) $(addprefix -D, $(defs))\\\n\t\t$(subst /,\\\\,$(abspath $(source))) \\\n\t\t--kObjCache-cc $(obj)\\\n\t\t$(TOOL_VCC100_CXX) -c\\\n\t\t$(subst -Zi,-Z7,$(flags))\\\n\t\t-Fo$(obj)\\\n\t\t$(outbase).ii\nendef\nelse # !KBUILD_USE_KOBJCACHE\nTOOL_VCC100_COMPILE_CXX_OUTPUT = $(call TOOL_VCC100_PDB, $(outbase)-obj,idb)\nTOOL_VCC100_COMPILE_CXX_OUTPUT_MAYBE = $(call TOOL_VCC100_PDB, $(outbase)-obj,pdb)\ndefine TOOL_VCC100_COMPILE_CXX_CMDS\n\t$(QUIET)$(TOOL_VCC100_CXX) -c\\\n\t\t$(flags) $(addprefix -I, $(incs)) $(addprefix -D, $(defs))\\\n\t\t-Fd$(outbase)-obj.pdb \\\n\t\t-FD\\\n\t\t-Fo$(obj)\\\n\t\t$(subst /,\\\\,$(abspath $(source)))\n\t$(QUIET)$(DEP_IDB) -f -s -q -o $(dep) -t $(obj) $(call TOOL_VCC100_PDB,$(outbase)-obj,idb)\nendef\nendif # !KBUILD_USE_KOBJCACHE\n\n## @todo configure the assembler template.\n\n## Compile resource source.\n# @param $(target) Normalized main target name.\n# @param $(source) Source filename (relative).\n# @param $(obj) Object file name. This shall be (re)created by the compilation.\n# @param $(dep) Dependcy file. This shall be (re)created by the compilation.\n# @param $(flags) Flags.\n# @param $(defs) Definitions. No -D or something.\n# @param $(incs) Includes. No -I or something.\n# @param $(dirdep) Directory creation dependency.\n# @param $(deps) Other dependencies.\n#\n# @param $(outbase) Output basename (full). Use this for list files and such.\n# @param $(objsuff) Object suffix.\nTOOL_VCC100_COMPILE_RC_OUTPUT =\nTOOL_VCC100_COMPILE_RC_DEPEND =\nTOOL_VCC100_COMPILE_RC_DEPORD =\ndefine TOOL_VCC100_COMPILE_RC_CMDS\n\t$(QUIET)$(TOOL_VCC100_RC) \\\n\t\t$(flags) $(addprefix /i, $(subst /,\\\\,$(incs))) $(addprefix /d, $(defs))\\\n\t\t/fo$(obj)\\\n\t\t$(subst /,\\\\,$(abspath $(source)))\nendef\n\n\n## Link library\n# @param $(target) Normalized main target name.\n# @param $(out) Library name.\n# @param $(objs) Object files to put in the library.\n# @param $(flags) Flags.\n# @param $(dirdep) Directory creation dependency.\n# @param $(deps) Other dependencies.\n# @param $(othersrc) Unhandled sources.\n# @param $(outbase) Output basename (full). Use this for list files and such.\n#\nTOOL_VCC100_LINK_LIBRARY_DEPEND = $(othersrc)\nTOOL_VCC100_LINK_LIBRARY_DEPORD =\nTOOL_VCC100_LINK_LIBRARY_OUTPUT = $(outbase).rsp\nTOOL_VCC100_LINK_LIBRARY_OUTPUT_MAYBE = $(outbase).lst $(outbase).exp $(outbase).pdb\ndefine TOOL_VCC100_LINK_LIBRARY_CMDS\n\t$(QUIET)$(APPEND) -tn $(outbase).rsp \\\n\t\t$(foreach arg,\\\n\t\t\t$(subst /,\\\\,$(objs) \\\n\t\t\t$(filter-out %.def,$(othersrc))) \\\n\t\t\t$(addprefix /DEF:,$(filter %.def,$(othersrc))) \\\n\t\t\t,\\\"$(arg)\\\")\n\t$(QUIET)$(TOOL_VCC100_AR) $(flags) /OUT:$(out) @$(outbase).rsp\nendef\n\n\n\n\n## Link program\n# @param $(target) Normalized main target name.\n# @param $(out) Program name.\n# @param $(objs) Object files to link together.\n# @param $(libs) Libraries to search.\n# @param $(libpath) Library search paths.\n# @param $(flags) Flags.\n# @param $(dirdep) Directory creation dependency.\n# @param $(deps) Other dependencies.\n# @param $(othersrc) Unhandled sources.\n# @param $(custom_pre) Custom step invoked before linking.\n# @param $(custom_post) Custom step invoked after linking.\n# @param $(outbase) Output basename (full). Use this for list files and such.\n#\nTOOL_VCC100_LINK_PROGRAM_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)\nTOOL_VCC100_LINK_PROGRAM_DEPORD =\nTOOL_VCC100_LINK_PROGRAM_OUTPUT = $(outbase).map $(outbase).rsp\nTOOL_VCC100_LINK_PROGRAM_OUTPUT_MAYBE = $(outbase).map $(outbase).lib $(outbase).exp $(outbase).ilk $(out).manifest\nTOOL_VCC100_LINK_PROGRAM_OUTPUT_DEBUG = $(outbase).pdb\nTOOL_VCC100_LINK_PROGRAM_DEBUG_INSTALL_FN = $(2).pdb=>$(basename $(3)).pdb\ndefine TOOL_VCC100_LINK_PROGRAM_CMDS\n\t$(QUIET)$(APPEND) -tn $(outbase).rsp \\\n\t\t$(foreach arg,\\\n\t\t $(subst /,\\\\,$(objs)) \\\n\t\t $(subst /,\\\\,$(libs)) \\\n\t\t\t,\\\"$(arg)\\\")\n\t$(QUIET)$(TOOL_VCC100_LD) $(flags) \\\n\t\t/OUT:$(out) \\\n\t\t/MAPINFO:EXPORTS /INCREMENTAL:NO \\\n\t\t/MAP:$(outbase).map \\\n\t\t$(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \\\n\t\t$(subst /,\\\\,$(filter %.exp %.res,$(othersrc))) \\\n\t\t$(foreach p,$(libpath), /LIBPATH:$(p)) \\\n\t\t@$(outbase).rsp\n\t$(QUIET)$(TEST) -f $(out).manifest -- \\\n\t\t$(TOOL_VCC100_MT) -manifest $(subst /,\\\\,$(out)).manifest -outputresource:$(subst /,\\\\,$(out))\nendef\n\n\n## Link DLL.\n# @param $(target) Normalized main target name.\n# @param $(out) DLL name.\n# @param $(objs) Object files to link together.\n# @param $(libs) Libraries to search.\n# @param $(libpath) Library search paths.\n# @param $(flags) Flags.\n# @param $(dirdep) Directory creation dependency.\n# @param $(deps) Other dependencies.\n# @param $(othersrc) Unhandled sources.\n# @param $(custom_pre) Custom step invoked before linking.\n# @param $(custom_post) Custom step invoked after linking.\n#\n# @param $(outbase) Output basename (full). Use this for list files and such.\nTOOL_VCC100_LINK_DLL_DEPEND = $(objs) $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)\nTOOL_VCC100_LINK_DLL_DEPORD = $(call DIRDEP,$(PATH_STAGE_LIB))\nTOOL_VCC100_LINK_DLL_OUTPUT = $(outbase).map $(outbase).lib $(outbase).exp $(outbase).rsp\nTOOL_VCC100_LINK_DLL_OUTPUT_MAYBE = $(outbase).ilk $(out).manifest $(PATH_STAGE_LIB)/$(notdir $(outbase)).lib $(PATH_STAGE_LIB)/$(notdir $(outbase)).exp\nTOOL_VCC100_LINK_DLL_OUTPUT_DEBUG = $(outbase).pdb\nTOOL_VCC100_LINK_DLL_DEBUG_INSTALL_FN = $(2).pdb=>$(basename $(3)).pdb\ndefine TOOL_VCC100_LINK_DLL_CMDS\n\t$(QUIET)$(APPEND) -tn $(outbase).rsp \\\n\t\t$(foreach arg,\\\n\t\t $(subst /,\\\\,$(objs)) \\\n\t\t $(subst /,\\\\,$(libs)) \\\n\t\t\t,\\\"$(arg)\\\")\n\t$(QUIET)$(TOOL_VCC100_LD) $(flags) \\\n\t\t/OUT:$(out) \\\n\t\t/IMPLIB:$(outbase).lib \\\n\t\t/MAPINFO:EXPORTS /INCREMENTAL:NO \\\n\t\t/MAP:$(outbase).map \\\n\t\t/DLL \\\n\t\t$(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \\\n\t\t$(subst /,\\\\,$(filter %.exp %.res,$(othersrc))) \\\n\t\t$(foreach p,$(libpath), /LIBPATH:$(p)) \\\n\t\t@$(outbase).rsp\n\t$(QUIET)$(TEST) -f $(out).manifest -- \\\n\t\t$(TOOL_VCC100_MT) -manifest $(subst /,\\\\,$(out)).manifest '-outputresource:$(subst /,\\\\,$(out));#2'\n\t$(QUIET)$(CP) --changed --ignore-non-existing $(outbase).exp $(outbase).lib $(PATH_STAGE_LIB)/\n$(eval _DIRS += $(PATH_STAGE_LIB))\nendef\n\n\n## Link system module (windows aka driver, linux aka kernel module)\n# @param $(target) Normalized main target name.\n# @param $(out) System module name.\n# @param $(objs) Object files to link together.\n# @param $(libs) Libraries to search.\n# @param $(libpath) Library search paths.\n# @param $(flags) Flags.\n# @param $(dirdep) Directory creation dependency.\n# @param $(deps) Other dependencies.\n# @param $(othersrc) Unhandled sources.\n# @param $(custom_pre) Custom step invoked before linking.\n# @param $(custom_post) Custom step invoked after linking.\n#\n# @param $(outbase) Output basename (full). Use this for list files and such.\nTOOL_VCC100_LINK_SYSMOD_DEPEND = $(foreach lib,$(libs),$(if $(findstring $(lib),$(subst /,x,$(lib))),, $(lib))) $(othersrc)\nTOOL_VCC100_LINK_SYSMOD_DEPORD =\nTOOL_VCC100_LINK_SYSMOD_OUTPUT = $(outbase).map $(outbase).rsp\nTOOL_VCC100_LINK_SYSMOD_OUTPUT_MAYBE = $(outbase).lib $(outbase).exp $(outbase).ilk $(out).manifest\nTOOL_VCC100_LINK_SYSMOD_OUTPUT_DEBUG = $(outbase).pdb\nTOOL_VCC100_LINK_SYSMOD_DEBUG_INSTALL_FN = $(2).pdb=>$(basename $(3)).pdb\ndefine TOOL_VCC100_LINK_SYSMOD_CMDS\n\t$(QUIET)$(APPEND) -tn $(outbase).rsp \\\n\t\t$(foreach arg,\\\n\t\t $(subst /,\\\\,$(objs)) \\\n\t\t $(subst /,\\\\,$(libs)) \\\n\t\t\t,\\\"$(arg)\\\")\n\t$(QUIET)$(TOOL_VCC100_LD) $(flags) \\\n\t\t/OUT:$(out) \\\n\t\t/MAPINFO:EXPORTS /INCREMENTAL:NO \\\n\t\t/MAP:$(outbase).map \\\n\t\t$(foreach def,$(filter %.def,$(othersrc)), /DEF:$(def)) \\\n\t\t$(subst /,\\\\,$(filter %.exp %.res,$(othersrc))) \\\n\t\t$(foreach p,$(libpath), /LIBPATH:$(p)) \\\n\t\t@$(outbase).rsp\n\t$(QUIET)$(TEST) -f $(out).manifest -- \\\n\t\t$(TOOL_VCC100_MT) -manifest $(subst /,\\\\,$(out)).manifest '-outputresource:$(subst /,\\\\,$(out));#2'\nendef\n\n"} +{"text": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>ActiveLayerIndex</key>\n\t<integer>0</integer>\n\t<key>ApplicationVersion</key>\n\t<array>\n\t\t<string>com.omnigroup.OmniGrafflePro</string>\n\t\t<string>139.7.0.167456</string>\n\t</array>\n\t<key>AutoAdjust</key>\n\t<true/>\n\t<key>BackgroundGraphic</key>\n\t<dict>\n\t\t<key>Bounds</key>\n\t\t<string>{{0, 0}, {576, 733}}</string>\n\t\t<key>Class</key>\n\t\t<string>SolidGraphic</string>\n\t\t<key>ID</key>\n\t\t<integer>2</integer>\n\t\t<key>Style</key>\n\t\t<dict>\n\t\t\t<key>shadow</key>\n\t\t\t<dict>\n\t\t\t\t<key>Draws</key>\n\t\t\t\t<string>NO</string>\n\t\t\t</dict>\n\t\t\t<key>stroke</key>\n\t\t\t<dict>\n\t\t\t\t<key>Draws</key>\n\t\t\t\t<string>NO</string>\n\t\t\t</dict>\n\t\t</dict>\n\t</dict>\n\t<key>BaseZoom</key>\n\t<integer>0</integer>\n\t<key>CanvasOrigin</key>\n\t<string>{0, 0}</string>\n\t<key>ColumnAlign</key>\n\t<integer>1</integer>\n\t<key>ColumnSpacing</key>\n\t<real>36</real>\n\t<key>CreationDate</key>\n\t<string>2012-06-11 20:31:54 +0000</string>\n\t<key>Creator</key>\n\t<string>Igor Minar</string>\n\t<key>DisplayScale</key>\n\t<string>1 0/72 in = 1.0000 in</string>\n\t<key>ExportShapes</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>InspectorGroup</key>\n\t\t\t<real>-1</real>\n\t\t\t<key>ShapeImageRect</key>\n\t\t\t<string>{{2, 2}, {22, 22}}</string>\n\t\t\t<key>ShapeName</key>\n\t\t\t<string>pdfImport-2.1</string>\n\t\t\t<key>ShouldExport</key>\n\t\t\t<string>YES</string>\n\t\t\t<key>StrokePath</key>\n\t\t\t<dict>\n\t\t\t\t<key>elements</key>\n\t\t\t\t<array>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>element</key>\n\t\t\t\t\t\t<string>MOVETO</string>\n\t\t\t\t\t\t<key>point</key>\n\t\t\t\t\t\t<string>{0.15889900000000001, 0.138016}</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>element</key>\n\t\t\t\t\t\t<string>LINETO</string>\n\t\t\t\t\t\t<key>point</key>\n\t\t\t\t\t\t<string>{-0.00725269, -0.179367}</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>element</key>\n\t\t\t\t\t\t<string>LINETO</string>\n\t\t\t\t\t\t<key>point</key>\n\t\t\t\t\t\t<string>{-0.153529, 0.138016}</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>element</key>\n\t\t\t\t\t\t<string>CLOSE</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>element</key>\n\t\t\t\t\t\t<string>MOVETO</string>\n\t\t\t\t\t\t<key>point</key>\n\t\t\t\t\t\t<string>{0.222248, 0.27146700000000001}</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>element</key>\n\t\t\t\t\t\t<string>LINETO</string>\n\t\t\t\t\t\t<key>point</key>\n\t\t\t\t\t\t<string>{-0.21818799999999999, 0.27146700000000001}</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>element</key>\n\t\t\t\t\t\t<string>LINETO</string>\n\t\t\t\t\t\t<key>point</key>\n\t\t\t\t\t\t<string>{-0.31672099999999997, 0.49690400000000001}</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>element</key>\n\t\t\t\t\t\t<string>LINETO</string>\n\t\t\t\t\t\t<key>point</key>\n\t\t\t\t\t\t<string>{-0.5, 0.5}</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>element</key>\n\t\t\t\t\t\t<string>LINETO</string>\n\t\t\t\t\t\t<key>point</key>\n\t\t\t\t\t\t<string>{-0.0085640000000000004, -0.5}</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>element</key>\n\t\t\t\t\t\t<string>LINETO</string>\n\t\t\t\t\t\t<key>point</key>\n\t\t\t\t\t\t<string>{0.5, 0.5}</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>element</key>\n\t\t\t\t\t\t<string>LINETO</string>\n\t\t\t\t\t\t<key>point</key>\n\t\t\t\t\t\t<string>{0.330127, 0.5}</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>element</key>\n\t\t\t\t\t\t<string>CLOSE</string>\n\t\t\t\t\t</dict>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>element</key>\n\t\t\t\t\t\t<string>MOVETO</string>\n\t\t\t\t\t\t<key>point</key>\n\t\t\t\t\t\t<string>{0.222248, 0.27146700000000001}</string>\n\t\t\t\t\t</dict>\n\t\t\t\t</array>\n\t\t\t</dict>\n\t\t\t<key>TextBounds</key>\n\t\t\t<string>{{0, 0}, {1, 1}}</string>\n\t\t</dict>\n\t</array>\n\t<key>GraphDocumentVersion</key>\n\t<integer>8</integer>\n\t<key>GraphicsList</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>Bounds</key>\n\t\t\t<string>{{285.18700760649972, 248.30348312289235}, {86.616274140362918, 184.7619127031216}}</string>\n\t\t\t<key>Class</key>\n\t\t\t<string>ShapedGraphic</string>\n\t\t\t<key>ID</key>\n\t\t\t<integer>47</integer>\n\t\t\t<key>Shape</key>\n\t\t\t<string>Bezier</string>\n\t\t\t<key>ShapeData</key>\n\t\t\t<dict>\n\t\t\t\t<key>UnitPoints</key>\n\t\t\t\t<array>\n\t\t\t\t\t<string>{-0.50000000000000044, -0.50000000000000022}</string>\n\t\t\t\t\t<string>{-0.50000000000000044, -0.50000000000000022}</string>\n\t\t\t\t\t<string>{-0.49744799999999412, -0.18033099999999691}</string>\n\t\t\t\t\t<string>{-0.49744799999999412, -0.18033099999999691}</string>\n\t\t\t\t\t<string>{-0.49744799999999412, -0.18033099999999691}</string>\n\t\t\t\t\t<string>{-0.17456470884650166, 0.13634065677823681}</string>\n\t\t\t\t\t<string>{-0.17456470884650166, 0.13634065677823681}</string>\n\t\t\t\t\t<string>{-0.17456470884650166, 0.13634065677823681}</string>\n\t\t\t\t\t<string>{-0.49927274182449377, 0.13634065677823681}</string>\n\t\t\t\t\t<string>{-0.49927274182449644, 0.13634065677823681}</string>\n\t\t\t\t\t<string>{-0.49927274182449244, 0.13634065677824014}</string>\n\t\t\t\t\t<string>{-0.50000000000000044, 0.26894374386235298}</string>\n\t\t\t\t\t<string>{-0.50000000000000044, 0.26894374386235476}</string>\n\t\t\t\t\t<string>{-0.50000000000000044, 0.26894374386235476}</string>\n\t\t\t\t\t<string>{-0.05100239999999534, 0.26914900000000563}</string>\n\t\t\t\t\t<string>{-0.05100239999999534, 0.26914900000000563}</string>\n\t\t\t\t\t<string>{-0.05100239999999534, 0.26914900000000563}</string>\n\t\t\t\t\t<string>{0.15885200000000133, 0.49703099999999867}</string>\n\t\t\t\t\t<string>{0.15885200000000133, 0.49703099999999867}</string>\n\t\t\t\t\t<string>{0.15885200000000133, 0.49703099999999867}</string>\n\t\t\t\t\t<string>{0.49999999999999956, 0.49999999999999978}</string>\n\t\t\t\t\t<string>{0.49999999999999956, 0.49999999999999978}</string>\n\t\t\t\t\t<string>{0.49999999999999956, 0.49999999999999978}</string>\n\t\t\t\t\t<string>{-0.50000000000000044, -0.50000000000000022}</string>\n\t\t\t\t</array>\n\t\t\t</dict>\n\t\t\t<key>Style</key>\n\t\t\t<dict>\n\t\t\t\t<key>fill</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Color</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>archive</key>\n\t\t\t\t\t\t<data>\n\t\t\t\t\t\tYnBsaXN0MDDUAQIDBAUGKSpYJHZl\n\t\t\t\t\t\tcnNpb25YJG9iamVjdHNZJGFyY2hp\n\t\t\t\t\t\tdmVyVCR0b3ASAAGGoKcHCBMXGyIm\n\t\t\t\t\t\tVSRudWxs1QkKCwwNDg8QERJcTlND\n\t\t\t\t\t\tb21wb25lbnRzXxASTlNDdXN0b21D\n\t\t\t\t\t\tb2xvclNwYWNlViRjbGFzc1xOU0Nv\n\t\t\t\t\t\tbG9yU3BhY2VVTlNSR0JPECgwLjcw\n\t\t\t\t\t\tMjAwMDAyMTkgMC43MDIwMDAwMjE5\n\t\t\t\t\t\tIDAuNzAyMDAwMDIxOSAxgAKABhAB\n\t\t\t\t\t\tTxAnMC42NDIzODE2MDg1IDAuNjQy\n\t\t\t\t\t\tMzYyMzU2MiAwLjY0MjM3MzI2MzgA\n\t\t\t\t\t\t0gsUFRZVTlNJQ0OABYAD0gsYGRpX\n\t\t\t\t\t\tTlMuZGF0YYAETxEMSAAADEhMaW5v\n\t\t\t\t\t\tAhAAAG1udHJSR0IgWFlaIAfOAAIA\n\t\t\t\t\t\tCQAGADEAAGFjc3BNU0ZUAAAAAElF\n\t\t\t\t\t\tQyBzUkdCAAAAAAAAAAAAAAAAAAD2\n\t\t\t\t\t\t1gABAAAAANMtSFAgIB0/2i7bSomr\n\t\t\t\t\t\tYKI8X3x9gd0AAAAAAAAAAAAAAAAA\n\t\t\t\t\t\tAAAAAAAAAAAAAAAAAAAAAAAAEWNw\n\t\t\t\t\t\tcnQAAAFQAAAAM2Rlc2MAAAGEAAAA\n\t\t\t\t\t\tbHd0cHQAAAHwAAAAFGJrcHQAAAIE\n\t\t\t\t\t\tAAAAFHJYWVoAAAIYAAAAFGdYWVoA\n\t\t\t\t\t\tAAIsAAAAFGJYWVoAAAJAAAAAFGRt\n\t\t\t\t\t\tbmQAAAJUAAAAcGRtZGQAAALEAAAA\n\t\t\t\t\t\tiHZ1ZWQAAANMAAAAhnZpZXcAAAPU\n\t\t\t\t\t\tAAAAJGx1bWkAAAP4AAAAFG1lYXMA\n\t\t\t\t\t\tAAQMAAAAJHRlY2gAAAQwAAAADHJU\n\t\t\t\t\t\tUkMAAAQ8AAAIDGdUUkMAAAQ8AAAI\n\t\t\t\t\t\tDGJUUkMAAAQ8AAAIDHRleHQAAAAA\n\t\t\t\t\t\tQ29weXJpZ2h0IChjKSAxOTk4IEhl\n\t\t\t\t\t\td2xldHQtUGFja2FyZCBDb21wYW55\n\t\t\t\t\t\tAABkZXNjAAAAAAAAABJzUkdCIElF\n\t\t\t\t\t\tQzYxOTY2LTIuMQAAAAAAAAAAAAAA\n\t\t\t\t\t\tEnNSR0IgSUVDNjE5NjYtMi4xAAAA\n\t\t\t\t\t\tAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n\t\t\t\t\t\tAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n\t\t\t\t\t\tAAAAAABYWVogAAAAAAAA81EAAQAA\n\t\t\t\t\t\tAAEWzFhZWiAAAAAAAAAAAAAAAAAA\n\t\t\t\t\t\tAAAAWFlaIAAAAAAAAG+iAAA49QAA\n\t\t\t\t\t\tA5BYWVogAAAAAAAAYpkAALeFAAAY\n\t\t\t\t\t\t2lhZWiAAAAAAAAAkoAAAD4QAALbP\n\t\t\t\t\t\tZGVzYwAAAAAAAAAWSUVDIGh0dHA6\n\t\t\t\t\t\tLy93d3cuaWVjLmNoAAAAAAAAAAAA\n\t\t\t\t\t\tAAAWSUVDIGh0dHA6Ly93d3cuaWVj\n\t\t\t\t\t\tLmNoAAAAAAAAAAAAAAAAAAAAAAAA\n\t\t\t\t\t\tAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n\t\t\t\t\t\tAAAAAAAAAGRlc2MAAAAAAAAALklF\n\t\t\t\t\t\tQyA2MTk2Ni0yLjEgRGVmYXVsdCBS\n\t\t\t\t\t\tR0IgY29sb3VyIHNwYWNlIC0gc1JH\n\t\t\t\t\t\tQgAAAAAAAAAAAAAALklFQyA2MTk2\n\t\t\t\t\t\tNi0yLjEgRGVmYXVsdCBSR0IgY29s\n\t\t\t\t\t\tb3VyIHNwYWNlIC0gc1JHQgAAAAAA\n\t\t\t\t\t\tAAAAAAAAAAAAAAAAAAAAAABkZXNj\n\t\t\t\t\t\tAAAAAAAAACxSZWZlcmVuY2UgVmll\n\t\t\t\t\t\td2luZyBDb25kaXRpb24gaW4gSUVD\n\t\t\t\t\t\tNjE5NjYtMi4xAAAAAAAAAAAAAAAs\n\t\t\t\t\t\tUmVmZXJlbmNlIFZpZXdpbmcgQ29u\n\t\t\t\t\t\tZGl0aW9uIGluIElFQzYxOTY2LTIu\n\t\t\t\t\t\tMQAAAAAAAAAAAAAAAAAAAAAAAAAA\n\t\t\t\t\t\tAAAAAAAAdmlldwAAAAAAE6T+ABRf\n\t\t\t\t\t\tLgAQzxQAA+3MAAQTCwADXJ4AAAAB\n\t\t\t\t\t\tWFlaIAAAAAAATAlWAFAAAABXH+dt\n\t\t\t\t\t\tZWFzAAAAAAAAAAEAAAAAAAAAAAAA\n\t\t\t\t\t\tAAAAAAAAAAACjwAAAAJzaWcgAAAA\n\t\t\t\t\t\tAENSVCBjdXJ2AAAAAAAABAAAAAAF\n\t\t\t\t\t\tAAoADwAUABkAHgAjACgALQAyADcA\n\t\t\t\t\t\tOwBAAEUASgBPAFQAWQBeAGMAaABt\n\t\t\t\t\t\tAHIAdwB8AIEAhgCLAJAAlQCaAJ8A\n\t\t\t\t\t\tpACpAK4AsgC3ALwAwQDGAMsA0ADV\n\t\t\t\t\t\tANsA4ADlAOsA8AD2APsBAQEHAQ0B\n\t\t\t\t\t\tEwEZAR8BJQErATIBOAE+AUUBTAFS\n\t\t\t\t\t\tAVkBYAFnAW4BdQF8AYMBiwGSAZoB\n\t\t\t\t\t\toQGpAbEBuQHBAckB0QHZAeEB6QHy\n\t\t\t\t\t\tAfoCAwIMAhQCHQImAi8COAJBAksC\n\t\t\t\t\t\tVAJdAmcCcQJ6AoQCjgKYAqICrAK2\n\t\t\t\t\t\tAsECywLVAuAC6wL1AwADCwMWAyED\n\t\t\t\t\t\tLQM4A0MDTwNaA2YDcgN+A4oDlgOi\n\t\t\t\t\t\tA64DugPHA9MD4APsA/kEBgQTBCAE\n\t\t\t\t\t\tLQQ7BEgEVQRjBHEEfgSMBJoEqAS2\n\t\t\t\t\t\tBMQE0wThBPAE/gUNBRwFKwU6BUkF\n\t\t\t\t\t\tWAVnBXcFhgWWBaYFtQXFBdUF5QX2\n\t\t\t\t\t\tBgYGFgYnBjcGSAZZBmoGewaMBp0G\n\t\t\t\t\t\trwbABtEG4wb1BwcHGQcrBz0HTwdh\n\t\t\t\t\t\tB3QHhgeZB6wHvwfSB+UH+AgLCB8I\n\t\t\t\t\t\tMghGCFoIbgiCCJYIqgi+CNII5wj7\n\t\t\t\t\t\tCRAJJQk6CU8JZAl5CY8JpAm6Cc8J\n\t\t\t\t\t\t5Qn7ChEKJwo9ClQKagqBCpgKrgrF\n\t\t\t\t\t\tCtwK8wsLCyILOQtRC2kLgAuYC7AL\n\t\t\t\t\t\tyAvhC/kMEgwqDEMMXAx1DI4MpwzA\n\t\t\t\t\t\tDNkM8w0NDSYNQA1aDXQNjg2pDcMN\n\t\t\t\t\t\t3g34DhMOLg5JDmQOfw6bDrYO0g7u\n\t\t\t\t\t\tDwkPJQ9BD14Peg+WD7MPzw/sEAkQ\n\t\t\t\t\t\tJhBDEGEQfhCbELkQ1xD1ERMRMRFP\n\t\t\t\t\t\tEW0RjBGqEckR6BIHEiYSRRJkEoQS\n\t\t\t\t\t\toxLDEuMTAxMjE0MTYxODE6QTxRPl\n\t\t\t\t\t\tFAYUJxRJFGoUixStFM4U8BUSFTQV\n\t\t\t\t\t\tVhV4FZsVvRXgFgMWJhZJFmwWjxay\n\t\t\t\t\t\tFtYW+hcdF0EXZReJF64X0hf3GBsY\n\t\t\t\t\t\tQBhlGIoYrxjVGPoZIBlFGWsZkRm3\n\t\t\t\t\t\tGd0aBBoqGlEadxqeGsUa7BsUGzsb\n\t\t\t\t\t\tYxuKG7Ib2hwCHCocUhx7HKMczBz1\n\t\t\t\t\t\tHR4dRx1wHZkdwx3sHhYeQB5qHpQe\n\t\t\t\t\t\tvh7pHxMfPh9pH5Qfvx/qIBUgQSBs\n\t\t\t\t\t\tIJggxCDwIRwhSCF1IaEhziH7Iici\n\t\t\t\t\t\tVSKCIq8i3SMKIzgjZiOUI8Ij8CQf\n\t\t\t\t\t\tJE0kfCSrJNolCSU4JWgllyXHJfcm\n\t\t\t\t\t\tJyZXJocmtyboJxgnSSd6J6sn3CgN\n\t\t\t\t\t\tKD8ocSiiKNQpBik4KWspnSnQKgIq\n\t\t\t\t\t\tNSpoKpsqzysCKzYraSudK9EsBSw5\n\t\t\t\t\t\tLG4soizXLQwtQS12Last4S4WLkwu\n\t\t\t\t\t\tgi63Lu4vJC9aL5Evxy/+MDUwbDCk\n\t\t\t\t\t\tMNsxEjFKMYIxujHyMioyYzKbMtQz\n\t\t\t\t\t\tDTNGM38zuDPxNCs0ZTSeNNg1EzVN\n\t\t\t\t\t\tNYc1wjX9Njc2cjauNuk3JDdgN5w3\n\t\t\t\t\t\t1zgUOFA4jDjIOQU5Qjl/Obw5+To2\n\t\t\t\t\t\tOnQ6sjrvOy07azuqO+g8JzxlPKQ8\n\t\t\t\t\t\t4z0iPWE9oT3gPiA+YD6gPuA/IT9h\n\t\t\t\t\t\tP6I/4kAjQGRApkDnQSlBakGsQe5C\n\t\t\t\t\t\tMEJyQrVC90M6Q31DwEQDREdEikTO\n\t\t\t\t\t\tRRJFVUWaRd5GIkZnRqtG8Ec1R3tH\n\t\t\t\t\t\twEgFSEtIkUjXSR1JY0mpSfBKN0p9\n\t\t\t\t\t\tSsRLDEtTS5pL4kwqTHJMuk0CTUpN\n\t\t\t\t\t\tk03cTiVObk63TwBPSU+TT91QJ1Bx\n\t\t\t\t\t\tULtRBlFQUZtR5lIxUnxSx1MTU19T\n\t\t\t\t\t\tqlP2VEJUj1TbVShVdVXCVg9WXFap\n\t\t\t\t\t\tVvdXRFeSV+BYL1h9WMtZGllpWbha\n\t\t\t\t\t\tB1pWWqZa9VtFW5Vb5Vw1XIZc1l0n\n\t\t\t\t\t\tXXhdyV4aXmxevV8PX2Ffs2AFYFdg\n\t\t\t\t\t\tqmD8YU9homH1YklinGLwY0Njl2Pr\n\t\t\t\t\t\tZEBklGTpZT1lkmXnZj1mkmboZz1n\n\t\t\t\t\t\tk2fpaD9olmjsaUNpmmnxakhqn2r3\n\t\t\t\t\t\ta09rp2v/bFdsr20IbWBtuW4Sbmtu\n\t\t\t\t\t\txG8eb3hv0XArcIZw4HE6cZVx8HJL\n\t\t\t\t\t\tcqZzAXNdc7h0FHRwdMx1KHWFdeF2\n\t\t\t\t\t\tPnabdvh3VnezeBF4bnjMeSp5iXnn\n\t\t\t\t\t\tekZ6pXsEe2N7wnwhfIF84X1BfaF+\n\t\t\t\t\t\tAX5ifsJ/I3+Ef+WAR4CogQqBa4HN\n\t\t\t\t\t\tgjCCkoL0g1eDuoQdhICE44VHhauG\n\t\t\t\t\t\tDoZyhteHO4efiASIaYjOiTOJmYn+\n\t\t\t\t\t\timSKyoswi5aL/IxjjMqNMY2Yjf+O\n\t\t\t\t\t\tZo7OjzaPnpAGkG6Q1pE/kaiSEZJ6\n\t\t\t\t\t\tkuOTTZO2lCCUipT0lV+VyZY0lp+X\n\t\t\t\t\t\tCpd1l+CYTJi4mSSZkJn8mmia1ZtC\n\t\t\t\t\t\tm6+cHJyJnPedZJ3SnkCerp8dn4uf\n\t\t\t\t\t\t+qBpoNihR6G2oiailqMGo3aj5qRW\n\t\t\t\t\t\tpMelOKWpphqmi6b9p26n4KhSqMSp\n\t\t\t\t\t\tN6mpqhyqj6sCq3Wr6axcrNCtRK24\n\t\t\t\t\t\tri2uoa8Wr4uwALB1sOqxYLHWskuy\n\t\t\t\t\t\twrM4s660JbSctRO1irYBtnm28Ldo\n\t\t\t\t\t\tt+C4WbjRuUq5wro7urW7LrunvCG8\n\t\t\t\t\t\tm70VvY++Cr6Evv+/er/1wHDA7MFn\n\t\t\t\t\t\twePCX8Lbw1jD1MRRxM7FS8XIxkbG\n\t\t\t\t\t\tw8dBx7/IPci8yTrJuco4yrfLNsu2\n\t\t\t\t\t\tzDXMtc01zbXONs62zzfPuNA50LrR\n\t\t\t\t\t\tPNG+0j/SwdNE08bUSdTL1U7V0dZV\n\t\t\t\t\t\t1tjXXNfg2GTY6Nls2fHadtr724Dc\n\t\t\t\t\t\tBdyK3RDdlt4c3qLfKd+v4DbgveFE\n\t\t\t\t\t\t4cziU+Lb42Pj6+Rz5PzlhOYN5pbn\n\t\t\t\t\t\tH+ep6DLovOlG6dDqW+rl63Dr++yG\n\t\t\t\t\t\t7RHtnO4o7rTvQO/M8Fjw5fFy8f/y\n\t\t\t\t\t\tjPMZ86f0NPTC9VD13vZt9vv3ivgZ\n\t\t\t\t\t\t+Kj5OPnH+lf65/t3/Af8mP0p/br+\n\t\t\t\t\t\tS/7c/23//9IcHR4fWiRjbGFzc25h\n\t\t\t\t\t\tbWVYJGNsYXNzZXNdTlNNdXRhYmxl\n\t\t\t\t\t\tRGF0YaMeICFWTlNEYXRhWE5TT2Jq\n\t\t\t\t\t\tZWN00hwdIyRcTlNDb2xvclNwYWNl\n\t\t\t\t\t\toiUhXE5TQ29sb3JTcGFjZdIcHSco\n\t\t\t\t\t\tV05TQ29sb3KiJyFfEA9OU0tleWVk\n\t\t\t\t\t\tQXJjaGl2ZXLRKyxUcm9vdIABAAgA\n\t\t\t\t\t\tEQAaACMALQAyADcAPwBFAFAAXQBy\n\t\t\t\t\t\tAHkAhgCMALcAuQC7AL0A5wDsAPIA\n\t\t\t\t\t\t9AD2APsBAwEFDVENVg1hDWoNeA18\n\t\t\t\t\t\tDYMNjA2RDZ4NoQ2uDbMNuw2+DdAN\n\t\t\t\t\t\t0w3YAAAAAAAAAgEAAAAAAAAALQAA\n\t\t\t\t\t\tAAAAAAAAAAAAAAAADdo=\n\t\t\t\t\t\t</data>\n\t\t\t\t\t\t<key>b</key>\n\t\t\t\t\t\t<string>0.642373</string>\n\t\t\t\t\t\t<key>g</key>\n\t\t\t\t\t\t<string>0.642362</string>\n\t\t\t\t\t\t<key>r</key>\n\t\t\t\t\t\t<string>0.642382</string>\n\t\t\t\t\t</dict>\n\t\t\t\t</dict>\n\t\t\t\t<key>shadow</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Draws</key>\n\t\t\t\t\t<string>NO</string>\n\t\t\t\t</dict>\n\t\t\t\t<key>stroke</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Draws</key>\n\t\t\t\t\t<string>NO</string>\n\t\t\t\t</dict>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Bounds</key>\n\t\t\t<string>{{202.38452007755603, 248.30385264671821}, {168.49336609890284, 184.20602517348959}}</string>\n\t\t\t<key>Class</key>\n\t\t\t<string>ShapedGraphic</string>\n\t\t\t<key>ID</key>\n\t\t\t<integer>46</integer>\n\t\t\t<key>Shape</key>\n\t\t\t<string>pdfImport-2.1</string>\n\t\t\t<key>Style</key>\n\t\t\t<dict>\n\t\t\t\t<key>fill</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Color</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>archive</key>\n\t\t\t\t\t\t<data>\n\t\t\t\t\t\tYnBsaXN0MDDUAQIDBAUGKSpYJHZl\n\t\t\t\t\t\tcnNpb25YJG9iamVjdHNZJGFyY2hp\n\t\t\t\t\t\tdmVyVCR0b3ASAAGGoKcHCBMXGyIm\n\t\t\t\t\t\tVSRudWxs1QkKCwwNDg8QERJcTlND\n\t\t\t\t\t\tb21wb25lbnRzXxASTlNDdXN0b21D\n\t\t\t\t\t\tb2xvclNwYWNlViRjbGFzc1xOU0Nv\n\t\t\t\t\t\tbG9yU3BhY2VVTlNSR0JPECUwLjk0\n\t\t\t\t\t\tOTAwMDAwMSAwLjk0OTAwMDAwMSAw\n\t\t\t\t\t\tLjk0OTAwMDAwMSAxgAKABhABTxAn\n\t\t\t\t\t\tMC45MzYwNzQwNzgxIDAuOTM2MDQ2\n\t\t\t\t\t\tMDA0MyAwLjkzNjA2MTkxODcA0gsU\n\t\t\t\t\t\tFRZVTlNJQ0OABYAD0gsYGRpXTlMu\n\t\t\t\t\t\tZGF0YYAETxEMSAAADEhMaW5vAhAA\n\t\t\t\t\t\tAG1udHJSR0IgWFlaIAfOAAIACQAG\n\t\t\t\t\t\tADEAAGFjc3BNU0ZUAAAAAElFQyBz\n\t\t\t\t\t\tUkdCAAAAAAAAAAAAAAAAAAD21gAB\n\t\t\t\t\t\tAAAAANMtSFAgIB0/2i7bSomrYKI8\n\t\t\t\t\t\tX3x9gd0AAAAAAAAAAAAAAAAAAAAA\n\t\t\t\t\t\tAAAAAAAAAAAAAAAAAAAAEWNwcnQA\n\t\t\t\t\t\tAAFQAAAAM2Rlc2MAAAGEAAAAbHd0\n\t\t\t\t\t\tcHQAAAHwAAAAFGJrcHQAAAIEAAAA\n\t\t\t\t\t\tFHJYWVoAAAIYAAAAFGdYWVoAAAIs\n\t\t\t\t\t\tAAAAFGJYWVoAAAJAAAAAFGRtbmQA\n\t\t\t\t\t\tAAJUAAAAcGRtZGQAAALEAAAAiHZ1\n\t\t\t\t\t\tZWQAAANMAAAAhnZpZXcAAAPUAAAA\n\t\t\t\t\t\tJGx1bWkAAAP4AAAAFG1lYXMAAAQM\n\t\t\t\t\t\tAAAAJHRlY2gAAAQwAAAADHJUUkMA\n\t\t\t\t\t\tAAQ8AAAIDGdUUkMAAAQ8AAAIDGJU\n\t\t\t\t\t\tUkMAAAQ8AAAIDHRleHQAAAAAQ29w\n\t\t\t\t\t\teXJpZ2h0IChjKSAxOTk4IEhld2xl\n\t\t\t\t\t\tdHQtUGFja2FyZCBDb21wYW55AABk\n\t\t\t\t\t\tZXNjAAAAAAAAABJzUkdCIElFQzYx\n\t\t\t\t\t\tOTY2LTIuMQAAAAAAAAAAAAAAEnNS\n\t\t\t\t\t\tR0IgSUVDNjE5NjYtMi4xAAAAAAAA\n\t\t\t\t\t\tAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n\t\t\t\t\t\tAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n\t\t\t\t\t\tAABYWVogAAAAAAAA81EAAQAAAAEW\n\t\t\t\t\t\tzFhZWiAAAAAAAAAAAAAAAAAAAAAA\n\t\t\t\t\t\tWFlaIAAAAAAAAG+iAAA49QAAA5BY\n\t\t\t\t\t\tWVogAAAAAAAAYpkAALeFAAAY2lhZ\n\t\t\t\t\t\tWiAAAAAAAAAkoAAAD4QAALbPZGVz\n\t\t\t\t\t\tYwAAAAAAAAAWSUVDIGh0dHA6Ly93\n\t\t\t\t\t\td3cuaWVjLmNoAAAAAAAAAAAAAAAW\n\t\t\t\t\t\tSUVDIGh0dHA6Ly93d3cuaWVjLmNo\n\t\t\t\t\t\tAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n\t\t\t\t\t\tAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n\t\t\t\t\t\tAAAAAGRlc2MAAAAAAAAALklFQyA2\n\t\t\t\t\t\tMTk2Ni0yLjEgRGVmYXVsdCBSR0Ig\n\t\t\t\t\t\tY29sb3VyIHNwYWNlIC0gc1JHQgAA\n\t\t\t\t\t\tAAAAAAAAAAAALklFQyA2MTk2Ni0y\n\t\t\t\t\t\tLjEgRGVmYXVsdCBSR0IgY29sb3Vy\n\t\t\t\t\t\tIHNwYWNlIC0gc1JHQgAAAAAAAAAA\n\t\t\t\t\t\tAAAAAAAAAAAAAAAAAABkZXNjAAAA\n\t\t\t\t\t\tAAAAACxSZWZlcmVuY2UgVmlld2lu\n\t\t\t\t\t\tZyBDb25kaXRpb24gaW4gSUVDNjE5\n\t\t\t\t\t\tNjYtMi4xAAAAAAAAAAAAAAAsUmVm\n\t\t\t\t\t\tZXJlbmNlIFZpZXdpbmcgQ29uZGl0\n\t\t\t\t\t\taW9uIGluIElFQzYxOTY2LTIuMQAA\n\t\t\t\t\t\tAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n\t\t\t\t\t\tAAAAdmlldwAAAAAAE6T+ABRfLgAQ\n\t\t\t\t\t\tzxQAA+3MAAQTCwADXJ4AAAABWFla\n\t\t\t\t\t\tIAAAAAAATAlWAFAAAABXH+dtZWFz\n\t\t\t\t\t\tAAAAAAAAAAEAAAAAAAAAAAAAAAAA\n\t\t\t\t\t\tAAAAAAACjwAAAAJzaWcgAAAAAENS\n\t\t\t\t\t\tVCBjdXJ2AAAAAAAABAAAAAAFAAoA\n\t\t\t\t\t\tDwAUABkAHgAjACgALQAyADcAOwBA\n\t\t\t\t\t\tAEUASgBPAFQAWQBeAGMAaABtAHIA\n\t\t\t\t\t\tdwB8AIEAhgCLAJAAlQCaAJ8ApACp\n\t\t\t\t\t\tAK4AsgC3ALwAwQDGAMsA0ADVANsA\n\t\t\t\t\t\t4ADlAOsA8AD2APsBAQEHAQ0BEwEZ\n\t\t\t\t\t\tAR8BJQErATIBOAE+AUUBTAFSAVkB\n\t\t\t\t\t\tYAFnAW4BdQF8AYMBiwGSAZoBoQGp\n\t\t\t\t\t\tAbEBuQHBAckB0QHZAeEB6QHyAfoC\n\t\t\t\t\t\tAwIMAhQCHQImAi8COAJBAksCVAJd\n\t\t\t\t\t\tAmcCcQJ6AoQCjgKYAqICrAK2AsEC\n\t\t\t\t\t\tywLVAuAC6wL1AwADCwMWAyEDLQM4\n\t\t\t\t\t\tA0MDTwNaA2YDcgN+A4oDlgOiA64D\n\t\t\t\t\t\tugPHA9MD4APsA/kEBgQTBCAELQQ7\n\t\t\t\t\t\tBEgEVQRjBHEEfgSMBJoEqAS2BMQE\n\t\t\t\t\t\t0wThBPAE/gUNBRwFKwU6BUkFWAVn\n\t\t\t\t\t\tBXcFhgWWBaYFtQXFBdUF5QX2BgYG\n\t\t\t\t\t\tFgYnBjcGSAZZBmoGewaMBp0GrwbA\n\t\t\t\t\t\tBtEG4wb1BwcHGQcrBz0HTwdhB3QH\n\t\t\t\t\t\thgeZB6wHvwfSB+UH+AgLCB8IMghG\n\t\t\t\t\t\tCFoIbgiCCJYIqgi+CNII5wj7CRAJ\n\t\t\t\t\t\tJQk6CU8JZAl5CY8JpAm6Cc8J5Qn7\n\t\t\t\t\t\tChEKJwo9ClQKagqBCpgKrgrFCtwK\n\t\t\t\t\t\t8wsLCyILOQtRC2kLgAuYC7ALyAvh\n\t\t\t\t\t\tC/kMEgwqDEMMXAx1DI4MpwzADNkM\n\t\t\t\t\t\t8w0NDSYNQA1aDXQNjg2pDcMN3g34\n\t\t\t\t\t\tDhMOLg5JDmQOfw6bDrYO0g7uDwkP\n\t\t\t\t\t\tJQ9BD14Peg+WD7MPzw/sEAkQJhBD\n\t\t\t\t\t\tEGEQfhCbELkQ1xD1ERMRMRFPEW0R\n\t\t\t\t\t\tjBGqEckR6BIHEiYSRRJkEoQSoxLD\n\t\t\t\t\t\tEuMTAxMjE0MTYxODE6QTxRPlFAYU\n\t\t\t\t\t\tJxRJFGoUixStFM4U8BUSFTQVVhV4\n\t\t\t\t\t\tFZsVvRXgFgMWJhZJFmwWjxayFtYW\n\t\t\t\t\t\t+hcdF0EXZReJF64X0hf3GBsYQBhl\n\t\t\t\t\t\tGIoYrxjVGPoZIBlFGWsZkRm3Gd0a\n\t\t\t\t\t\tBBoqGlEadxqeGsUa7BsUGzsbYxuK\n\t\t\t\t\t\tG7Ib2hwCHCocUhx7HKMczBz1HR4d\n\t\t\t\t\t\tRx1wHZkdwx3sHhYeQB5qHpQevh7p\n\t\t\t\t\t\tHxMfPh9pH5Qfvx/qIBUgQSBsIJgg\n\t\t\t\t\t\txCDwIRwhSCF1IaEhziH7IiciVSKC\n\t\t\t\t\t\tIq8i3SMKIzgjZiOUI8Ij8CQfJE0k\n\t\t\t\t\t\tfCSrJNolCSU4JWgllyXHJfcmJyZX\n\t\t\t\t\t\tJocmtyboJxgnSSd6J6sn3CgNKD8o\n\t\t\t\t\t\tcSiiKNQpBik4KWspnSnQKgIqNSpo\n\t\t\t\t\t\tKpsqzysCKzYraSudK9EsBSw5LG4s\n\t\t\t\t\t\toizXLQwtQS12Last4S4WLkwugi63\n\t\t\t\t\t\tLu4vJC9aL5Evxy/+MDUwbDCkMNsx\n\t\t\t\t\t\tEjFKMYIxujHyMioyYzKbMtQzDTNG\n\t\t\t\t\t\tM38zuDPxNCs0ZTSeNNg1EzVNNYc1\n\t\t\t\t\t\twjX9Njc2cjauNuk3JDdgN5w31zgU\n\t\t\t\t\t\tOFA4jDjIOQU5Qjl/Obw5+To2OnQ6\n\t\t\t\t\t\tsjrvOy07azuqO+g8JzxlPKQ84z0i\n\t\t\t\t\t\tPWE9oT3gPiA+YD6gPuA/IT9hP6I/\n\t\t\t\t\t\t4kAjQGRApkDnQSlBakGsQe5CMEJy\n\t\t\t\t\t\tQrVC90M6Q31DwEQDREdEikTORRJF\n\t\t\t\t\t\tVUWaRd5GIkZnRqtG8Ec1R3tHwEgF\n\t\t\t\t\t\tSEtIkUjXSR1JY0mpSfBKN0p9SsRL\n\t\t\t\t\t\tDEtTS5pL4kwqTHJMuk0CTUpNk03c\n\t\t\t\t\t\tTiVObk63TwBPSU+TT91QJ1BxULtR\n\t\t\t\t\t\tBlFQUZtR5lIxUnxSx1MTU19TqlP2\n\t\t\t\t\t\tVEJUj1TbVShVdVXCVg9WXFapVvdX\n\t\t\t\t\t\tRFeSV+BYL1h9WMtZGllpWbhaB1pW\n\t\t\t\t\t\tWqZa9VtFW5Vb5Vw1XIZc1l0nXXhd\n\t\t\t\t\t\tyV4aXmxevV8PX2Ffs2AFYFdgqmD8\n\t\t\t\t\t\tYU9homH1YklinGLwY0Njl2PrZEBk\n\t\t\t\t\t\tlGTpZT1lkmXnZj1mkmboZz1nk2fp\n\t\t\t\t\t\taD9olmjsaUNpmmnxakhqn2r3a09r\n\t\t\t\t\t\tp2v/bFdsr20IbWBtuW4SbmtuxG8e\n\t\t\t\t\t\tb3hv0XArcIZw4HE6cZVx8HJLcqZz\n\t\t\t\t\t\tAXNdc7h0FHRwdMx1KHWFdeF2Pnab\n\t\t\t\t\t\tdvh3VnezeBF4bnjMeSp5iXnnekZ6\n\t\t\t\t\t\tpXsEe2N7wnwhfIF84X1BfaF+AX5i\n\t\t\t\t\t\tfsJ/I3+Ef+WAR4CogQqBa4HNgjCC\n\t\t\t\t\t\tkoL0g1eDuoQdhICE44VHhauGDoZy\n\t\t\t\t\t\thteHO4efiASIaYjOiTOJmYn+imSK\n\t\t\t\t\t\tyoswi5aL/IxjjMqNMY2Yjf+OZo7O\n\t\t\t\t\t\tjzaPnpAGkG6Q1pE/kaiSEZJ6kuOT\n\t\t\t\t\t\tTZO2lCCUipT0lV+VyZY0lp+XCpd1\n\t\t\t\t\t\tl+CYTJi4mSSZkJn8mmia1ZtCm6+c\n\t\t\t\t\t\tHJyJnPedZJ3SnkCerp8dn4uf+qBp\n\t\t\t\t\t\toNihR6G2oiailqMGo3aj5qRWpMel\n\t\t\t\t\t\tOKWpphqmi6b9p26n4KhSqMSpN6mp\n\t\t\t\t\t\tqhyqj6sCq3Wr6axcrNCtRK24ri2u\n\t\t\t\t\t\toa8Wr4uwALB1sOqxYLHWskuywrM4\n\t\t\t\t\t\ts660JbSctRO1irYBtnm28Ldot+C4\n\t\t\t\t\t\tWbjRuUq5wro7urW7LrunvCG8m70V\n\t\t\t\t\t\tvY++Cr6Evv+/er/1wHDA7MFnwePC\n\t\t\t\t\t\tX8Lbw1jD1MRRxM7FS8XIxkbGw8dB\n\t\t\t\t\t\tx7/IPci8yTrJuco4yrfLNsu2zDXM\n\t\t\t\t\t\ttc01zbXONs62zzfPuNA50LrRPNG+\n\t\t\t\t\t\t0j/SwdNE08bUSdTL1U7V0dZV1tjX\n\t\t\t\t\t\tXNfg2GTY6Nls2fHadtr724DcBdyK\n\t\t\t\t\t\t3RDdlt4c3qLfKd+v4DbgveFE4czi\n\t\t\t\t\t\tU+Lb42Pj6+Rz5PzlhOYN5pbnH+ep\n\t\t\t\t\t\t6DLovOlG6dDqW+rl63Dr++yG7RHt\n\t\t\t\t\t\tnO4o7rTvQO/M8Fjw5fFy8f/yjPMZ\n\t\t\t\t\t\t86f0NPTC9VD13vZt9vv3ivgZ+Kj5\n\t\t\t\t\t\tOPnH+lf65/t3/Af8mP0p/br+S/7c\n\t\t\t\t\t\t/23//9IcHR4fWiRjbGFzc25hbWVY\n\t\t\t\t\t\tJGNsYXNzZXNdTlNNdXRhYmxlRGF0\n\t\t\t\t\t\tYaMeICFWTlNEYXRhWE5TT2JqZWN0\n\t\t\t\t\t\t0hwdIyRcTlNDb2xvclNwYWNloiUh\n\t\t\t\t\t\tXE5TQ29sb3JTcGFjZdIcHScoV05T\n\t\t\t\t\t\tQ29sb3KiJyFfEA9OU0tleWVkQXJj\n\t\t\t\t\t\taGl2ZXLRKyxUcm9vdIABAAgAEQAa\n\t\t\t\t\t\tACMALQAyADcAPwBFAFAAXQByAHkA\n\t\t\t\t\t\thgCMALQAtgC4ALoA5ADpAO8A8QDz\n\t\t\t\t\t\tAPgBAAECDU4NUw1eDWcNdQ15DYAN\n\t\t\t\t\t\tiQ2ODZsNng2rDbANuA27Dc0N0A3V\n\t\t\t\t\t\tAAAAAAAAAgEAAAAAAAAALQAAAAAA\n\t\t\t\t\t\tAAAAAAAAAAAADdc=\n\t\t\t\t\t\t</data>\n\t\t\t\t\t\t<key>b</key>\n\t\t\t\t\t\t<string>0.936062</string>\n\t\t\t\t\t\t<key>g</key>\n\t\t\t\t\t\t<string>0.936046</string>\n\t\t\t\t\t\t<key>r</key>\n\t\t\t\t\t\t<string>0.936074</string>\n\t\t\t\t\t</dict>\n\t\t\t\t</dict>\n\t\t\t\t<key>shadow</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Draws</key>\n\t\t\t\t\t<string>NO</string>\n\t\t\t\t</dict>\n\t\t\t\t<key>stroke</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Draws</key>\n\t\t\t\t\t<string>NO</string>\n\t\t\t\t</dict>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Bounds</key>\n\t\t\t<string>{{166.60512448891055, 239.04286279972013}, {118.58077106105196, 254.90335134098538}}</string>\n\t\t\t<key>Class</key>\n\t\t\t<string>ShapedGraphic</string>\n\t\t\t<key>ID</key>\n\t\t\t<integer>45</integer>\n\t\t\t<key>Shape</key>\n\t\t\t<string>Bezier</string>\n\t\t\t<key>ShapeData</key>\n\t\t\t<dict>\n\t\t\t\t<key>UnitPoints</key>\n\t\t\t\t<array>\n\t\t\t\t\t<string>{-0.5, -0.33418100000000001}</string>\n\t\t\t\t\t<string>{-0.5, -0.33418100000000001}</string>\n\t\t\t\t\t<string>{-0.34707500000000002, 0.28143400000000002}</string>\n\t\t\t\t\t<string>{-0.34707500000000002, 0.28143400000000002}</string>\n\t\t\t\t\t<string>{-0.34707500000000002, 0.28143400000000002}</string>\n\t\t\t\t\t<string>{0.5, 0.5}</string>\n\t\t\t\t\t<string>{0.5, 0.5}</string>\n\t\t\t\t\t<string>{0.5, 0.5}</string>\n\t\t\t\t\t<string>{0.5, -0.5}</string>\n\t\t\t\t\t<string>{0.5, -0.5}</string>\n\t\t\t\t\t<string>{0.5, -0.5}</string>\n\t\t\t\t\t<string>{-0.5, -0.33418100000000001}</string>\n\t\t\t\t</array>\n\t\t\t</dict>\n\t\t\t<key>Style</key>\n\t\t\t<dict>\n\t\t\t\t<key>fill</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Color</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>b</key>\n\t\t\t\t\t\t<string>0.164291</string>\n\t\t\t\t\t\t<key>g</key>\n\t\t\t\t\t\t<string>0.106006</string>\n\t\t\t\t\t\t<key>r</key>\n\t\t\t\t\t\t<string>0.849386</string>\n\t\t\t\t\t</dict>\n\t\t\t\t</dict>\n\t\t\t\t<key>shadow</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Draws</key>\n\t\t\t\t\t<string>NO</string>\n\t\t\t\t</dict>\n\t\t\t\t<key>stroke</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Draws</key>\n\t\t\t\t\t<string>NO</string>\n\t\t\t\t</dict>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Bounds</key>\n\t\t\t<string>{{285.18718083904844, 239.0486466006067}, {121.737280394778, 254.89692489555597}}</string>\n\t\t\t<key>Class</key>\n\t\t\t<string>ShapedGraphic</string>\n\t\t\t<key>ID</key>\n\t\t\t<integer>44</integer>\n\t\t\t<key>Shape</key>\n\t\t\t<string>Bezier</string>\n\t\t\t<key>ShapeData</key>\n\t\t\t<dict>\n\t\t\t\t<key>UnitPoints</key>\n\t\t\t\t<array>\n\t\t\t\t\t<string>{0.5, -0.33713900000000002}</string>\n\t\t\t\t\t<string>{0.5, -0.33713900000000002}</string>\n\t\t\t\t\t<string>{-0.5, -0.5}</string>\n\t\t\t\t\t<string>{-0.5, -0.5}</string>\n\t\t\t\t\t<string>{-0.5, -0.5}</string>\n\t\t\t\t\t<string>{-0.5, 0.5}</string>\n\t\t\t\t\t<string>{-0.5, 0.5}</string>\n\t\t\t\t\t<string>{-0.5, 0.5}</string>\n\t\t\t\t\t<string>{0.33804699999999999, 0.27849200000000002}</string>\n\t\t\t\t\t<string>{0.33804699999999999, 0.27849200000000002}</string>\n\t\t\t\t\t<string>{0.33804699999999999, 0.27849200000000002}</string>\n\t\t\t\t\t<string>{0.5, -0.33713900000000002}</string>\n\t\t\t\t</array>\n\t\t\t</dict>\n\t\t\t<key>Style</key>\n\t\t\t<dict>\n\t\t\t\t<key>fill</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Color</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>b</key>\n\t\t\t\t\t\t<string>0.148209</string>\n\t\t\t\t\t\t<key>g</key>\n\t\t\t\t\t\t<string>0.110541</string>\n\t\t\t\t\t\t<key>r</key>\n\t\t\t\t\t\t<string>0.647591</string>\n\t\t\t\t\t</dict>\n\t\t\t\t</dict>\n\t\t\t\t<key>shadow</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Draws</key>\n\t\t\t\t\t<string>NO</string>\n\t\t\t\t</dict>\n\t\t\t\t<key>stroke</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Draws</key>\n\t\t\t\t\t<string>NO</string>\n\t\t\t\t</dict>\n\t\t\t</dict>\n\t\t</dict>\n\t\t<dict>\n\t\t\t<key>Bounds</key>\n\t\t\t<string>{{151.57672119140636, 224.125}, {268.70574951171875, 284.64686308491594}}</string>\n\t\t\t<key>Class</key>\n\t\t\t<string>ShapedGraphic</string>\n\t\t\t<key>ID</key>\n\t\t\t<integer>43</integer>\n\t\t\t<key>Shape</key>\n\t\t\t<string>Bezier</string>\n\t\t\t<key>ShapeData</key>\n\t\t\t<dict>\n\t\t\t\t<key>UnitPoints</key>\n\t\t\t\t<array>\n\t\t\t\t\t<string>{-0.0015987597885285254, -0.5}</string>\n\t\t\t\t\t<string>{-0.0015987597885287474, -0.50000000000000011}</string>\n\t\t\t\t\t<string>{-0.5, -0.3344244345296401}</string>\n\t\t\t\t\t<string>{-0.5, -0.3344244345296401}</string>\n\t\t\t\t\t<string>{-0.5, -0.3344244345296401}</string>\n\t\t\t\t\t<string>{-0.42124300000000381, 0.28199536109606704}</string>\n\t\t\t\t\t<string>{-0.42124300000000381, 0.28199536109606704}</string>\n\t\t\t\t\t<string>{-0.42124300000000381, 0.28199536109606704}</string>\n\t\t\t\t\t<string>{-0.0010708520179374403, 0.5}</string>\n\t\t\t\t\t<string>{-0.0010708520179369962, 0.5}</string>\n\t\t\t\t\t<string>{-0.0010708520179369962, 0.49999999999999778}</string>\n\t\t\t\t\t<string>{0.42126899999999967, 0.2790407000241486}</string>\n\t\t\t\t\t<string>{0.42126899999999967, 0.2790407000241486}</string>\n\t\t\t\t\t<string>{0.42126899999999967, 0.2790407000241486}</string>\n\t\t\t\t\t<string>{0.5, -0.33735406458603656}</string>\n\t\t\t\t\t<string>{0.5, -0.33735406458603656}</string>\n\t\t\t\t\t<string>{0.5, -0.33735406458603656}</string>\n\t\t\t\t\t<string>{-0.0015987597885287474, -0.5}</string>\n\t\t\t\t</array>\n\t\t\t</dict>\n\t\t\t<key>Style</key>\n\t\t\t<dict>\n\t\t\t\t<key>fill</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Color</key>\n\t\t\t\t\t<dict>\n\t\t\t\t\t\t<key>archive</key>\n\t\t\t\t\t\t<data>\n\t\t\t\t\t\tYnBsaXN0MDDUAQIDBAUGKSpYJHZl\n\t\t\t\t\t\tcnNpb25YJG9iamVjdHNZJGFyY2hp\n\t\t\t\t\t\tdmVyVCR0b3ASAAGGoKcHCBMXGyIm\n\t\t\t\t\t\tVSRudWxs1QkKCwwNDg8QERJcTlND\n\t\t\t\t\t\tb21wb25lbnRzXxASTlNDdXN0b21D\n\t\t\t\t\t\tb2xvclNwYWNlViRjbGFzc1xOU0Nv\n\t\t\t\t\t\tbG9yU3BhY2VVTlNSR0JPECgwLjcw\n\t\t\t\t\t\tMjAwMDAyMTkgMC43MDIwMDAwMjE5\n\t\t\t\t\t\tIDAuNzAyMDAwMDIxOSAxgAKABhAB\n\t\t\t\t\t\tTxAnMC42NDIzODE2MDg1IDAuNjQy\n\t\t\t\t\t\tMzYyMzU2MiAwLjY0MjM3MzI2MzgA\n\t\t\t\t\t\t0gsUFRZVTlNJQ0OABYAD0gsYGRpX\n\t\t\t\t\t\tTlMuZGF0YYAETxEMSAAADEhMaW5v\n\t\t\t\t\t\tAhAAAG1udHJSR0IgWFlaIAfOAAIA\n\t\t\t\t\t\tCQAGADEAAGFjc3BNU0ZUAAAAAElF\n\t\t\t\t\t\tQyBzUkdCAAAAAAAAAAAAAAAAAAD2\n\t\t\t\t\t\t1gABAAAAANMtSFAgIB0/2i7bSomr\n\t\t\t\t\t\tYKI8X3x9gd0AAAAAAAAAAAAAAAAA\n\t\t\t\t\t\tAAAAAAAAAAAAAAAAAAAAAAAAEWNw\n\t\t\t\t\t\tcnQAAAFQAAAAM2Rlc2MAAAGEAAAA\n\t\t\t\t\t\tbHd0cHQAAAHwAAAAFGJrcHQAAAIE\n\t\t\t\t\t\tAAAAFHJYWVoAAAIYAAAAFGdYWVoA\n\t\t\t\t\t\tAAIsAAAAFGJYWVoAAAJAAAAAFGRt\n\t\t\t\t\t\tbmQAAAJUAAAAcGRtZGQAAALEAAAA\n\t\t\t\t\t\tiHZ1ZWQAAANMAAAAhnZpZXcAAAPU\n\t\t\t\t\t\tAAAAJGx1bWkAAAP4AAAAFG1lYXMA\n\t\t\t\t\t\tAAQMAAAAJHRlY2gAAAQwAAAADHJU\n\t\t\t\t\t\tUkMAAAQ8AAAIDGdUUkMAAAQ8AAAI\n\t\t\t\t\t\tDGJUUkMAAAQ8AAAIDHRleHQAAAAA\n\t\t\t\t\t\tQ29weXJpZ2h0IChjKSAxOTk4IEhl\n\t\t\t\t\t\td2xldHQtUGFja2FyZCBDb21wYW55\n\t\t\t\t\t\tAABkZXNjAAAAAAAAABJzUkdCIElF\n\t\t\t\t\t\tQzYxOTY2LTIuMQAAAAAAAAAAAAAA\n\t\t\t\t\t\tEnNSR0IgSUVDNjE5NjYtMi4xAAAA\n\t\t\t\t\t\tAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n\t\t\t\t\t\tAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n\t\t\t\t\t\tAAAAAABYWVogAAAAAAAA81EAAQAA\n\t\t\t\t\t\tAAEWzFhZWiAAAAAAAAAAAAAAAAAA\n\t\t\t\t\t\tAAAAWFlaIAAAAAAAAG+iAAA49QAA\n\t\t\t\t\t\tA5BYWVogAAAAAAAAYpkAALeFAAAY\n\t\t\t\t\t\t2lhZWiAAAAAAAAAkoAAAD4QAALbP\n\t\t\t\t\t\tZGVzYwAAAAAAAAAWSUVDIGh0dHA6\n\t\t\t\t\t\tLy93d3cuaWVjLmNoAAAAAAAAAAAA\n\t\t\t\t\t\tAAAWSUVDIGh0dHA6Ly93d3cuaWVj\n\t\t\t\t\t\tLmNoAAAAAAAAAAAAAAAAAAAAAAAA\n\t\t\t\t\t\tAAAAAAAAAAAAAAAAAAAAAAAAAAAA\n\t\t\t\t\t\tAAAAAAAAAGRlc2MAAAAAAAAALklF\n\t\t\t\t\t\tQyA2MTk2Ni0yLjEgRGVmYXVsdCBS\n\t\t\t\t\t\tR0IgY29sb3VyIHNwYWNlIC0gc1JH\n\t\t\t\t\t\tQgAAAAAAAAAAAAAALklFQyA2MTk2\n\t\t\t\t\t\tNi0yLjEgRGVmYXVsdCBSR0IgY29s\n\t\t\t\t\t\tb3VyIHNwYWNlIC0gc1JHQgAAAAAA\n\t\t\t\t\t\tAAAAAAAAAAAAAAAAAAAAAABkZXNj\n\t\t\t\t\t\tAAAAAAAAACxSZWZlcmVuY2UgVmll\n\t\t\t\t\t\td2luZyBDb25kaXRpb24gaW4gSUVD\n\t\t\t\t\t\tNjE5NjYtMi4xAAAAAAAAAAAAAAAs\n\t\t\t\t\t\tUmVmZXJlbmNlIFZpZXdpbmcgQ29u\n\t\t\t\t\t\tZGl0aW9uIGluIElFQzYxOTY2LTIu\n\t\t\t\t\t\tMQAAAAAAAAAAAAAAAAAAAAAAAAAA\n\t\t\t\t\t\tAAAAAAAAdmlldwAAAAAAE6T+ABRf\n\t\t\t\t\t\tLgAQzxQAA+3MAAQTCwADXJ4AAAAB\n\t\t\t\t\t\tWFlaIAAAAAAATAlWAFAAAABXH+dt\n\t\t\t\t\t\tZWFzAAAAAAAAAAEAAAAAAAAAAAAA\n\t\t\t\t\t\tAAAAAAAAAAACjwAAAAJzaWcgAAAA\n\t\t\t\t\t\tAENSVCBjdXJ2AAAAAAAABAAAAAAF\n\t\t\t\t\t\tAAoADwAUABkAHgAjACgALQAyADcA\n\t\t\t\t\t\tOwBAAEUASgBPAFQAWQBeAGMAaABt\n\t\t\t\t\t\tAHIAdwB8AIEAhgCLAJAAlQCaAJ8A\n\t\t\t\t\t\tpACpAK4AsgC3ALwAwQDGAMsA0ADV\n\t\t\t\t\t\tANsA4ADlAOsA8AD2APsBAQEHAQ0B\n\t\t\t\t\t\tEwEZAR8BJQErATIBOAE+AUUBTAFS\n\t\t\t\t\t\tAVkBYAFnAW4BdQF8AYMBiwGSAZoB\n\t\t\t\t\t\toQGpAbEBuQHBAckB0QHZAeEB6QHy\n\t\t\t\t\t\tAfoCAwIMAhQCHQImAi8COAJBAksC\n\t\t\t\t\t\tVAJdAmcCcQJ6AoQCjgKYAqICrAK2\n\t\t\t\t\t\tAsECywLVAuAC6wL1AwADCwMWAyED\n\t\t\t\t\t\tLQM4A0MDTwNaA2YDcgN+A4oDlgOi\n\t\t\t\t\t\tA64DugPHA9MD4APsA/kEBgQTBCAE\n\t\t\t\t\t\tLQQ7BEgEVQRjBHEEfgSMBJoEqAS2\n\t\t\t\t\t\tBMQE0wThBPAE/gUNBRwFKwU6BUkF\n\t\t\t\t\t\tWAVnBXcFhgWWBaYFtQXFBdUF5QX2\n\t\t\t\t\t\tBgYGFgYnBjcGSAZZBmoGewaMBp0G\n\t\t\t\t\t\trwbABtEG4wb1BwcHGQcrBz0HTwdh\n\t\t\t\t\t\tB3QHhgeZB6wHvwfSB+UH+AgLCB8I\n\t\t\t\t\t\tMghGCFoIbgiCCJYIqgi+CNII5wj7\n\t\t\t\t\t\tCRAJJQk6CU8JZAl5CY8JpAm6Cc8J\n\t\t\t\t\t\t5Qn7ChEKJwo9ClQKagqBCpgKrgrF\n\t\t\t\t\t\tCtwK8wsLCyILOQtRC2kLgAuYC7AL\n\t\t\t\t\t\tyAvhC/kMEgwqDEMMXAx1DI4MpwzA\n\t\t\t\t\t\tDNkM8w0NDSYNQA1aDXQNjg2pDcMN\n\t\t\t\t\t\t3g34DhMOLg5JDmQOfw6bDrYO0g7u\n\t\t\t\t\t\tDwkPJQ9BD14Peg+WD7MPzw/sEAkQ\n\t\t\t\t\t\tJhBDEGEQfhCbELkQ1xD1ERMRMRFP\n\t\t\t\t\t\tEW0RjBGqEckR6BIHEiYSRRJkEoQS\n\t\t\t\t\t\toxLDEuMTAxMjE0MTYxODE6QTxRPl\n\t\t\t\t\t\tFAYUJxRJFGoUixStFM4U8BUSFTQV\n\t\t\t\t\t\tVhV4FZsVvRXgFgMWJhZJFmwWjxay\n\t\t\t\t\t\tFtYW+hcdF0EXZReJF64X0hf3GBsY\n\t\t\t\t\t\tQBhlGIoYrxjVGPoZIBlFGWsZkRm3\n\t\t\t\t\t\tGd0aBBoqGlEadxqeGsUa7BsUGzsb\n\t\t\t\t\t\tYxuKG7Ib2hwCHCocUhx7HKMczBz1\n\t\t\t\t\t\tHR4dRx1wHZkdwx3sHhYeQB5qHpQe\n\t\t\t\t\t\tvh7pHxMfPh9pH5Qfvx/qIBUgQSBs\n\t\t\t\t\t\tIJggxCDwIRwhSCF1IaEhziH7Iici\n\t\t\t\t\t\tVSKCIq8i3SMKIzgjZiOUI8Ij8CQf\n\t\t\t\t\t\tJE0kfCSrJNolCSU4JWgllyXHJfcm\n\t\t\t\t\t\tJyZXJocmtyboJxgnSSd6J6sn3CgN\n\t\t\t\t\t\tKD8ocSiiKNQpBik4KWspnSnQKgIq\n\t\t\t\t\t\tNSpoKpsqzysCKzYraSudK9EsBSw5\n\t\t\t\t\t\tLG4soizXLQwtQS12Last4S4WLkwu\n\t\t\t\t\t\tgi63Lu4vJC9aL5Evxy/+MDUwbDCk\n\t\t\t\t\t\tMNsxEjFKMYIxujHyMioyYzKbMtQz\n\t\t\t\t\t\tDTNGM38zuDPxNCs0ZTSeNNg1EzVN\n\t\t\t\t\t\tNYc1wjX9Njc2cjauNuk3JDdgN5w3\n\t\t\t\t\t\t1zgUOFA4jDjIOQU5Qjl/Obw5+To2\n\t\t\t\t\t\tOnQ6sjrvOy07azuqO+g8JzxlPKQ8\n\t\t\t\t\t\t4z0iPWE9oT3gPiA+YD6gPuA/IT9h\n\t\t\t\t\t\tP6I/4kAjQGRApkDnQSlBakGsQe5C\n\t\t\t\t\t\tMEJyQrVC90M6Q31DwEQDREdEikTO\n\t\t\t\t\t\tRRJFVUWaRd5GIkZnRqtG8Ec1R3tH\n\t\t\t\t\t\twEgFSEtIkUjXSR1JY0mpSfBKN0p9\n\t\t\t\t\t\tSsRLDEtTS5pL4kwqTHJMuk0CTUpN\n\t\t\t\t\t\tk03cTiVObk63TwBPSU+TT91QJ1Bx\n\t\t\t\t\t\tULtRBlFQUZtR5lIxUnxSx1MTU19T\n\t\t\t\t\t\tqlP2VEJUj1TbVShVdVXCVg9WXFap\n\t\t\t\t\t\tVvdXRFeSV+BYL1h9WMtZGllpWbha\n\t\t\t\t\t\tB1pWWqZa9VtFW5Vb5Vw1XIZc1l0n\n\t\t\t\t\t\tXXhdyV4aXmxevV8PX2Ffs2AFYFdg\n\t\t\t\t\t\tqmD8YU9homH1YklinGLwY0Njl2Pr\n\t\t\t\t\t\tZEBklGTpZT1lkmXnZj1mkmboZz1n\n\t\t\t\t\t\tk2fpaD9olmjsaUNpmmnxakhqn2r3\n\t\t\t\t\t\ta09rp2v/bFdsr20IbWBtuW4Sbmtu\n\t\t\t\t\t\txG8eb3hv0XArcIZw4HE6cZVx8HJL\n\t\t\t\t\t\tcqZzAXNdc7h0FHRwdMx1KHWFdeF2\n\t\t\t\t\t\tPnabdvh3VnezeBF4bnjMeSp5iXnn\n\t\t\t\t\t\tekZ6pXsEe2N7wnwhfIF84X1BfaF+\n\t\t\t\t\t\tAX5ifsJ/I3+Ef+WAR4CogQqBa4HN\n\t\t\t\t\t\tgjCCkoL0g1eDuoQdhICE44VHhauG\n\t\t\t\t\t\tDoZyhteHO4efiASIaYjOiTOJmYn+\n\t\t\t\t\t\timSKyoswi5aL/IxjjMqNMY2Yjf+O\n\t\t\t\t\t\tZo7OjzaPnpAGkG6Q1pE/kaiSEZJ6\n\t\t\t\t\t\tkuOTTZO2lCCUipT0lV+VyZY0lp+X\n\t\t\t\t\t\tCpd1l+CYTJi4mSSZkJn8mmia1ZtC\n\t\t\t\t\t\tm6+cHJyJnPedZJ3SnkCerp8dn4uf\n\t\t\t\t\t\t+qBpoNihR6G2oiailqMGo3aj5qRW\n\t\t\t\t\t\tpMelOKWpphqmi6b9p26n4KhSqMSp\n\t\t\t\t\t\tN6mpqhyqj6sCq3Wr6axcrNCtRK24\n\t\t\t\t\t\tri2uoa8Wr4uwALB1sOqxYLHWskuy\n\t\t\t\t\t\twrM4s660JbSctRO1irYBtnm28Ldo\n\t\t\t\t\t\tt+C4WbjRuUq5wro7urW7LrunvCG8\n\t\t\t\t\t\tm70VvY++Cr6Evv+/er/1wHDA7MFn\n\t\t\t\t\t\twePCX8Lbw1jD1MRRxM7FS8XIxkbG\n\t\t\t\t\t\tw8dBx7/IPci8yTrJuco4yrfLNsu2\n\t\t\t\t\t\tzDXMtc01zbXONs62zzfPuNA50LrR\n\t\t\t\t\t\tPNG+0j/SwdNE08bUSdTL1U7V0dZV\n\t\t\t\t\t\t1tjXXNfg2GTY6Nls2fHadtr724Dc\n\t\t\t\t\t\tBdyK3RDdlt4c3qLfKd+v4DbgveFE\n\t\t\t\t\t\t4cziU+Lb42Pj6+Rz5PzlhOYN5pbn\n\t\t\t\t\t\tH+ep6DLovOlG6dDqW+rl63Dr++yG\n\t\t\t\t\t\t7RHtnO4o7rTvQO/M8Fjw5fFy8f/y\n\t\t\t\t\t\tjPMZ86f0NPTC9VD13vZt9vv3ivgZ\n\t\t\t\t\t\t+Kj5OPnH+lf65/t3/Af8mP0p/br+\n\t\t\t\t\t\tS/7c/23//9IcHR4fWiRjbGFzc25h\n\t\t\t\t\t\tbWVYJGNsYXNzZXNdTlNNdXRhYmxl\n\t\t\t\t\t\tRGF0YaMeICFWTlNEYXRhWE5TT2Jq\n\t\t\t\t\t\tZWN00hwdIyRcTlNDb2xvclNwYWNl\n\t\t\t\t\t\toiUhXE5TQ29sb3JTcGFjZdIcHSco\n\t\t\t\t\t\tV05TQ29sb3KiJyFfEA9OU0tleWVk\n\t\t\t\t\t\tQXJjaGl2ZXLRKyxUcm9vdIABAAgA\n\t\t\t\t\t\tEQAaACMALQAyADcAPwBFAFAAXQBy\n\t\t\t\t\t\tAHkAhgCMALcAuQC7AL0A5wDsAPIA\n\t\t\t\t\t\t9AD2APsBAwEFDVENVg1hDWoNeA18\n\t\t\t\t\t\tDYMNjA2RDZ4NoQ2uDbMNuw2+DdAN\n\t\t\t\t\t\t0w3YAAAAAAAAAgEAAAAAAAAALQAA\n\t\t\t\t\t\tAAAAAAAAAAAAAAAADdo=\n\t\t\t\t\t\t</data>\n\t\t\t\t\t\t<key>b</key>\n\t\t\t\t\t\t<string>0.642373</string>\n\t\t\t\t\t\t<key>g</key>\n\t\t\t\t\t\t<string>0.642362</string>\n\t\t\t\t\t\t<key>r</key>\n\t\t\t\t\t\t<string>0.642382</string>\n\t\t\t\t\t</dict>\n\t\t\t\t</dict>\n\t\t\t\t<key>shadow</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Draws</key>\n\t\t\t\t\t<string>NO</string>\n\t\t\t\t</dict>\n\t\t\t\t<key>stroke</key>\n\t\t\t\t<dict>\n\t\t\t\t\t<key>Draws</key>\n\t\t\t\t\t<string>NO</string>\n\t\t\t\t</dict>\n\t\t\t</dict>\n\t\t</dict>\n\t</array>\n\t<key>GridInfo</key>\n\t<dict/>\n\t<key>GuidesLocked</key>\n\t<string>NO</string>\n\t<key>GuidesVisible</key>\n\t<string>YES</string>\n\t<key>HPages</key>\n\t<integer>1</integer>\n\t<key>ImageCounter</key>\n\t<integer>1</integer>\n\t<key>KeepToScale</key>\n\t<false/>\n\t<key>Layers</key>\n\t<array>\n\t\t<dict>\n\t\t\t<key>Lock</key>\n\t\t\t<string>NO</string>\n\t\t\t<key>Name</key>\n\t\t\t<string>Layer 2</string>\n\t\t\t<key>Print</key>\n\t\t\t<string>YES</string>\n\t\t\t<key>View</key>\n\t\t\t<string>YES</string>\n\t\t</dict>\n\t</array>\n\t<key>LayoutInfo</key>\n\t<dict>\n\t\t<key>Animate</key>\n\t\t<string>NO</string>\n\t\t<key>circoMinDist</key>\n\t\t<real>18</real>\n\t\t<key>circoSeparation</key>\n\t\t<real>0.0</real>\n\t\t<key>layoutEngine</key>\n\t\t<string>dot</string>\n\t\t<key>neatoSeparation</key>\n\t\t<real>0.0</real>\n\t\t<key>twopiSeparation</key>\n\t\t<real>0.0</real>\n\t</dict>\n\t<key>LinksVisible</key>\n\t<string>NO</string>\n\t<key>MagnetsVisible</key>\n\t<string>NO</string>\n\t<key>MasterSheets</key>\n\t<array/>\n\t<key>ModificationDate</key>\n\t<string>2012-06-15 23:51:34 +0000</string>\n\t<key>Modifier</key>\n\t<string>Igor Minar</string>\n\t<key>NotesVisible</key>\n\t<string>NO</string>\n\t<key>Orientation</key>\n\t<integer>2</integer>\n\t<key>OriginVisible</key>\n\t<string>NO</string>\n\t<key>PageBreaks</key>\n\t<string>YES</string>\n\t<key>PrintInfo</key>\n\t<dict>\n\t\t<key>NSBottomMargin</key>\n\t\t<array>\n\t\t\t<string>float</string>\n\t\t\t<string>41</string>\n\t\t</array>\n\t\t<key>NSHorizonalPagination</key>\n\t\t<array>\n\t\t\t<string>coded</string>\n\t\t\t<string>BAtzdHJlYW10eXBlZIHoA4QBQISEhAhOU051bWJlcgCEhAdOU1ZhbHVlAISECE5TT2JqZWN0AIWEASqEhAFxlwCG</string>\n\t\t</array>\n\t\t<key>NSLeftMargin</key>\n\t\t<array>\n\t\t\t<string>float</string>\n\t\t\t<string>18</string>\n\t\t</array>\n\t\t<key>NSPaperSize</key>\n\t\t<array>\n\t\t\t<string>size</string>\n\t\t\t<string>{612, 792}</string>\n\t\t</array>\n\t\t<key>NSPrintReverseOrientation</key>\n\t\t<array>\n\t\t\t<string>int</string>\n\t\t\t<string>0</string>\n\t\t</array>\n\t\t<key>NSRightMargin</key>\n\t\t<array>\n\t\t\t<string>float</string>\n\t\t\t<string>18</string>\n\t\t</array>\n\t\t<key>NSTopMargin</key>\n\t\t<array>\n\t\t\t<string>float</string>\n\t\t\t<string>18</string>\n\t\t</array>\n\t</dict>\n\t<key>PrintOnePage</key>\n\t<false/>\n\t<key>ReadOnly</key>\n\t<string>NO</string>\n\t<key>RowAlign</key>\n\t<integer>1</integer>\n\t<key>RowSpacing</key>\n\t<real>36</real>\n\t<key>SheetTitle</key>\n\t<string>Canvas 1</string>\n\t<key>SmartAlignmentGuidesActive</key>\n\t<string>YES</string>\n\t<key>SmartDistanceGuidesActive</key>\n\t<string>YES</string>\n\t<key>UniqueID</key>\n\t<integer>1</integer>\n\t<key>UseEntirePage</key>\n\t<false/>\n\t<key>VPages</key>\n\t<integer>1</integer>\n\t<key>WindowInfo</key>\n\t<dict>\n\t\t<key>CurrentSheet</key>\n\t\t<integer>0</integer>\n\t\t<key>ExpandedCanvases</key>\n\t\t<array>\n\t\t\t<dict>\n\t\t\t\t<key>name</key>\n\t\t\t\t<string>Canvas 1</string>\n\t\t\t</dict>\n\t\t</array>\n\t\t<key>Frame</key>\n\t\t<string>{{258, 0}, {1286, 1028}}</string>\n\t\t<key>ListView</key>\n\t\t<true/>\n\t\t<key>OutlineWidth</key>\n\t\t<integer>142</integer>\n\t\t<key>RightSidebar</key>\n\t\t<false/>\n\t\t<key>ShowRuler</key>\n\t\t<true/>\n\t\t<key>Sidebar</key>\n\t\t<true/>\n\t\t<key>SidebarWidth</key>\n\t\t<integer>120</integer>\n\t\t<key>VisibleRegion</key>\n\t\t<string>{{80, 207.5}, {287.75, 222.25}}</string>\n\t\t<key>Zoom</key>\n\t\t<real>4</real>\n\t\t<key>ZoomValues</key>\n\t\t<array>\n\t\t\t<array>\n\t\t\t\t<string>Canvas 1</string>\n\t\t\t\t<real>4</real>\n\t\t\t\t<real>2</real>\n\t\t\t</array>\n\t\t</array>\n\t</dict>\n</dict>\n</plist>\n"} +{"text": "\"use strict\";\nvar Buffer = require(\"safer-buffer\").Buffer;\n\n// Export Node.js internal encodings.\n\nmodule.exports = {\n // Encodings\n utf8: { type: \"_internal\", bomAware: true},\n cesu8: { type: \"_internal\", bomAware: true},\n unicode11utf8: \"utf8\",\n\n ucs2: { type: \"_internal\", bomAware: true},\n utf16le: \"ucs2\",\n\n binary: { type: \"_internal\" },\n base64: { type: \"_internal\" },\n hex: { type: \"_internal\" },\n\n // Codec.\n _internal: InternalCodec,\n};\n\n//------------------------------------------------------------------------------\n\nfunction InternalCodec(codecOptions, iconv) {\n this.enc = codecOptions.encodingName;\n this.bomAware = codecOptions.bomAware;\n\n if (this.enc === \"base64\")\n this.encoder = InternalEncoderBase64;\n else if (this.enc === \"cesu8\") {\n this.enc = \"utf8\"; // Use utf8 for decoding.\n this.encoder = InternalEncoderCesu8;\n\n // Add decoder for versions of Node not supporting CESU-8\n if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') {\n this.decoder = InternalDecoderCesu8;\n this.defaultCharUnicode = iconv.defaultCharUnicode;\n }\n }\n}\n\nInternalCodec.prototype.encoder = InternalEncoder;\nInternalCodec.prototype.decoder = InternalDecoder;\n\n//------------------------------------------------------------------------------\n\n// We use node.js internal decoder. Its signature is the same as ours.\nvar StringDecoder = require('string_decoder').StringDecoder;\n\nif (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method.\n StringDecoder.prototype.end = function() {};\n\n\nfunction InternalDecoder(options, codec) {\n StringDecoder.call(this, codec.enc);\n}\n\nInternalDecoder.prototype = StringDecoder.prototype;\n\n\n//------------------------------------------------------------------------------\n// Encoder is mostly trivial\n\nfunction InternalEncoder(options, codec) {\n this.enc = codec.enc;\n}\n\nInternalEncoder.prototype.write = function(str) {\n return Buffer.from(str, this.enc);\n}\n\nInternalEncoder.prototype.end = function() {\n}\n\n\n//------------------------------------------------------------------------------\n// Except base64 encoder, which must keep its state.\n\nfunction InternalEncoderBase64(options, codec) {\n this.prevStr = '';\n}\n\nInternalEncoderBase64.prototype.write = function(str) {\n str = this.prevStr + str;\n var completeQuads = str.length - (str.length % 4);\n this.prevStr = str.slice(completeQuads);\n str = str.slice(0, completeQuads);\n\n return Buffer.from(str, \"base64\");\n}\n\nInternalEncoderBase64.prototype.end = function() {\n return Buffer.from(this.prevStr, \"base64\");\n}\n\n\n//------------------------------------------------------------------------------\n// CESU-8 encoder is also special.\n\nfunction InternalEncoderCesu8(options, codec) {\n}\n\nInternalEncoderCesu8.prototype.write = function(str) {\n var buf = Buffer.alloc(str.length * 3), bufIdx = 0;\n for (var i = 0; i < str.length; i++) {\n var charCode = str.charCodeAt(i);\n // Naive implementation, but it works because CESU-8 is especially easy\n // to convert from UTF-16 (which all JS strings are encoded in).\n if (charCode < 0x80)\n buf[bufIdx++] = charCode;\n else if (charCode < 0x800) {\n buf[bufIdx++] = 0xC0 + (charCode >>> 6);\n buf[bufIdx++] = 0x80 + (charCode & 0x3f);\n }\n else { // charCode will always be < 0x10000 in javascript.\n buf[bufIdx++] = 0xE0 + (charCode >>> 12);\n buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f);\n buf[bufIdx++] = 0x80 + (charCode & 0x3f);\n }\n }\n return buf.slice(0, bufIdx);\n}\n\nInternalEncoderCesu8.prototype.end = function() {\n}\n\n//------------------------------------------------------------------------------\n// CESU-8 decoder is not implemented in Node v4.0+\n\nfunction InternalDecoderCesu8(options, codec) {\n this.acc = 0;\n this.contBytes = 0;\n this.accBytes = 0;\n this.defaultCharUnicode = codec.defaultCharUnicode;\n}\n\nInternalDecoderCesu8.prototype.write = function(buf) {\n var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, \n res = '';\n for (var i = 0; i < buf.length; i++) {\n var curByte = buf[i];\n if ((curByte & 0xC0) !== 0x80) { // Leading byte\n if (contBytes > 0) { // Previous code is invalid\n res += this.defaultCharUnicode;\n contBytes = 0;\n }\n\n if (curByte < 0x80) { // Single-byte code\n res += String.fromCharCode(curByte);\n } else if (curByte < 0xE0) { // Two-byte code\n acc = curByte & 0x1F;\n contBytes = 1; accBytes = 1;\n } else if (curByte < 0xF0) { // Three-byte code\n acc = curByte & 0x0F;\n contBytes = 2; accBytes = 1;\n } else { // Four or more are not supported for CESU-8.\n res += this.defaultCharUnicode;\n }\n } else { // Continuation byte\n if (contBytes > 0) { // We're waiting for it.\n acc = (acc << 6) | (curByte & 0x3f);\n contBytes--; accBytes++;\n if (contBytes === 0) {\n // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80)\n if (accBytes === 2 && acc < 0x80 && acc > 0)\n res += this.defaultCharUnicode;\n else if (accBytes === 3 && acc < 0x800)\n res += this.defaultCharUnicode;\n else\n // Actually add character.\n res += String.fromCharCode(acc);\n }\n } else { // Unexpected continuation byte\n res += this.defaultCharUnicode;\n }\n }\n }\n this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes;\n return res;\n}\n\nInternalDecoderCesu8.prototype.end = function() {\n var res = 0;\n if (this.contBytes > 0)\n res += this.defaultCharUnicode;\n return res;\n}\n"} +{"text": "/* This file is part of the Pangolin Project.\n * http://github.com/stevenlovegrove/Pangolin\n *\n * Copyright (c) 2011 Steven Lovegrove\n *\n * Permission is hereby granted, free of charge, to any person\n * obtaining a copy of this software and associated documentation\n * files (the \"Software\"), to deal in the Software without\n * restriction, including without limitation the rights to use,\n * copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following\n * conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES\n * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT\n * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,\n * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR\n * OTHER DEALINGS IN THE SOFTWARE.\n */\n\n#pragma once\n\n#include <pangolin/image/image.h>\n#include <pangolin/image/copy.h>\n\nnamespace pangolin {\n\ntemplate<class T> using DefaultImageAllocator = std::allocator<T>;\n\n// Image that manages it's own memory, storing a strong pointer to it's memory\ntemplate<typename T, class Allocator = DefaultImageAllocator<T> >\nclass ManagedImage : public Image<T>\n{\npublic:\n // Destructor\n inline\n ~ManagedImage()\n {\n Deallocate();\n }\n\n // Null image\n inline\n ManagedImage()\n {\n }\n\n // Row image\n inline\n ManagedImage(size_t w)\n : Image<T>(\n Allocator().allocate(w),\n w, 1, w*sizeof(T)\n )\n {\n }\n\n inline\n ManagedImage(size_t w, size_t h)\n : Image<T>(\n Allocator().allocate(w*h),\n w, h, w*sizeof(T)\n )\n {\n }\n\n inline\n ManagedImage(size_t w, size_t h, size_t pitch_bytes)\n : Image<T>(\n Allocator().allocate( (h*pitch_bytes) / sizeof(T) + 1),\n w, h, pitch_bytes\n )\n {\n }\n\n // Not copy constructable\n inline\n ManagedImage( const ManagedImage<T>& other ) = delete;\n\n // Move constructor\n inline\n ManagedImage(ManagedImage<T,Allocator>&& img)\n {\n *this = std::move(img);\n }\n\n // Move asignment\n inline\n void operator=(ManagedImage<T,Allocator>&& img)\n {\n Deallocate();\n Image<T>::pitch = img.pitch;\n Image<T>::ptr = img.ptr;\n Image<T>::w = img.w;\n Image<T>::h = img.h;\n img.ptr = nullptr;\n }\n\n // Explicit copy constructor\n template<typename TOther>\n ManagedImage( const CopyObject<TOther>& other )\n {\n CopyFrom(other.obj);\n }\n\n // Explicit copy assignment\n template<typename TOther>\n void operator=(const CopyObject<TOther>& other)\n {\n CopyFrom(other.obj);\n }\n\n inline\n void Swap(ManagedImage<T>& img)\n {\n std::swap(img.pitch, Image<T>::pitch);\n std::swap(img.ptr, Image<T>::ptr);\n std::swap(img.w, Image<T>::w);\n std::swap(img.h, Image<T>::h);\n }\n\n inline\n void CopyFrom(const Image<T>& img)\n {\n if(!Image<T>::IsValid() || Image<T>::w != img.w || Image<T>::h != img.h) {\n Reinitialise(img.w,img.h);\n }\n Image<T>::CopyFrom(img);\n }\n\n inline\n void Reinitialise(size_t w, size_t h)\n {\n if(!Image<T>::ptr || Image<T>::w != w || Image<T>::h != h) {\n *this = ManagedImage<T,Allocator>(w,h);\n }\n }\n\n inline\n void Reinitialise(size_t w, size_t h, size_t pitch)\n {\n if(!Image<T>::ptr || Image<T>::w != w || Image<T>::h != h || Image<T>::pitch != pitch) {\n *this = ManagedImage<T,Allocator>(w,h,pitch);\n }\n }\n\n inline void Deallocate()\n {\n if (Image<T>::ptr) {\n Allocator().deallocate(Image<T>::ptr, Image<T>::Area());\n Image<T>::ptr = nullptr;\n }\n }\n};\n\n}\n"} +{"text": "package {\n\nimport bar.ClassA;\n\npublic class Test {\n var f : ClassA<caret>\n }\n}\n\npackage {\n public class ClassA {}\n}\n\npackage bar {\n public class ClassA {}\n}"} +{"text": "// Source : https://leetcode.com/problems/kth-largest-element-in-an-array/\n// Author : Han Zichi\n// Date : 2015-08-11\n\n/**\n * @param {number[]} nums\n * @param {number} k\n * @return {number}\n */\n\nvar findKthLargest = function(nums, k) {\n nums.sort(function(a, b) {\n return b - a;\n });\n \n return nums[k - 1];\n};"} +{"text": "// (C) Copyright Artyom Beilis 2010. \r\n// Use, modification and distribution are subject to the \r\n// Boost Software License, Version 1.0. (See accompanying file \r\n// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) \r\n\r\n#ifndef BOOST_CONFIG_PLATFORM_VMS_HPP \r\n#define BOOST_CONFIG_PLATFORM_VMS_HPP \r\n\r\n#define BOOST_PLATFORM \"OpenVMS\" \r\n\r\n#undef BOOST_HAS_STDINT_H \r\n#define BOOST_HAS_UNISTD_H \r\n#define BOOST_HAS_NL_TYPES_H \r\n#define BOOST_HAS_GETTIMEOFDAY \r\n#define BOOST_HAS_DIRENT_H \r\n#define BOOST_HAS_PTHREADS \r\n#define BOOST_HAS_NANOSLEEP \r\n#define BOOST_HAS_CLOCK_GETTIME \r\n#define BOOST_HAS_PTHREAD_MUTEXATTR_SETTYPE \r\n#define BOOST_HAS_LOG1P \r\n#define BOOST_HAS_EXPM1 \r\n#define BOOST_HAS_THREADS \r\n#undef BOOST_HAS_SCHED_YIELD \r\n\r\n#endif \r\n"} +{"text": "import VueTimers from '../index'\nimport { mount, createLocalVue } from '@vue/test-utils'\n\nconst localVue = createLocalVue()\nlocalVue.use(VueTimers)\n\nconst component = {\n template: '<div></div>',\n data() {\n return {\n count: 0\n }\n },\n methods: {\n log() {\n this.count++\n }\n }\n}\n\ndescribe('global import', () => {\n beforeAll(() => {\n jest.useFakeTimers()\n })\n\n afterEach(() => {\n jest.clearAllTimers()\n })\n\n afterAll(() => {\n jest.useRealTimers()\n })\n\n it('test setTimeout', () => {\n const wrapper = mount(component, {\n localVue,\n timers: {\n log: { time: 1000 }\n }\n })\n\n wrapper.vm.$timer.start('log')\n expect(wrapper.vm.timers.log.isRunning).toBe(true)\n expect(setTimeout).toHaveBeenCalledTimes(1)\n expect(setTimeout).toHaveBeenLastCalledWith(expect.any(Function), 1000)\n\n expect(wrapper.vm.count).toBe(0)\n jest.advanceTimersByTime(1000)\n expect(wrapper.vm.count).toBe(1)\n\n wrapper.vm.$timer.stop('log')\n expect(wrapper.vm.timers.log.isRunning).toBe(false)\n })\n\n it('test setInterval', () => {\n const wrapper = mount(component, {\n localVue,\n timers: {\n log: { time: 1000, repeat: true }\n }\n })\n\n wrapper.vm.$timer.start('log')\n expect(wrapper.vm.timers.log.isRunning).toBe(true)\n\n expect(wrapper.vm.count).toBe(0)\n jest.advanceTimersByTime(1000)\n expect(wrapper.vm.count).toBe(1)\n jest.advanceTimersByTime(1000)\n expect(wrapper.vm.count).toBe(2)\n\n wrapper.vm.$timer.stop('log')\n expect(wrapper.vm.timers.log.isRunning).toBe(false)\n })\n})\n"} +{"text": "using ECharts.Entities.style;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Linq;\r\nusing System.Text;\r\nusing System.Threading.Tasks;\r\n\r\nnamespace ECharts.Entities.series\r\n{\r\n public class Tree : ChartSeries<Tree>\r\n {\r\n public LocationData rootLocation { get; set; }\r\n\r\n public int? layerPadding { get; set; }\r\n\r\n public int? nodePadding { get; set; }\r\n\r\n public OrientType? orient { get; set; }\r\n\r\n public DirectionType? direction { get; set; }\r\n\r\n public object roam { get; set; }\r\n\r\n public string symbol { get; set; }\r\n\r\n public object symbolSize { get; set; }\r\n\r\n \r\n public Tree Symbol(string symbol)\r\n {\r\n this.symbol = symbol;\r\n return this;\r\n }\r\n\r\n public Tree SymbolSize(string symbolSize)\r\n {\r\n this.symbolSize = symbolSize;\r\n return this;\r\n }\r\n\r\n\r\n\r\n public Tree Roam(object roam)\r\n {\r\n this.roam = roam;\r\n return this;\r\n }\r\n\r\n public Tree Direction(DirectionType direction)\r\n {\r\n this.direction = direction;\r\n return this;\r\n }\r\n\r\n public Tree Orient(OrientType orient)\r\n {\r\n this.orient = orient;\r\n return this;\r\n }\r\n\r\n public Tree NodePadding(int nodePadding)\r\n {\r\n this.nodePadding = nodePadding;\r\n return this;\r\n }\r\n\r\n public Tree LayerPadding(int layerPadding)\r\n {\r\n this.layerPadding = layerPadding;\r\n return this;\r\n }\r\n\r\n public Tree RootLocation(LocationData rootLocation)\r\n {\r\n this.rootLocation = rootLocation;\r\n return this;\r\n }\r\n\r\n public Tree() {\r\n this.type = ChartType.tree;\r\n }\r\n\r\n public Tree(string name)\r\n : this()\r\n {\r\n this.name = name;\r\n }\r\n }\r\n}\r\n"} +{"text": "ifeq ($(BUILD_VARIANT),danube)\n CFLAGS_MODULE = -DCONFIG_DANUBE\n obj-m = ltq_atm_danube.o\n ltq_atm_danube-objs = ltq_atm.o ifxmips_atm_danube.o\nendif\n\nifeq ($(BUILD_VARIANT),ase)\n CFLAGS_MODULE = -DCONFIG_AMAZON_SE\n obj-m = ltq_atm_ase.o\n ltq_atm_ase-objs = ltq_atm.o ifxmips_atm_amazon_se.o\nendif\n\nifeq ($(BUILD_VARIANT),ar9)\n CFLAGS_MODULE = -DCONFIG_AR9\n obj-m = ltq_atm_ar9.o\n ltq_atm_ar9-objs = ltq_atm.o ifxmips_atm_ar9.o\nendif\n\nifeq ($(BUILD_VARIANT),vr9)\n CFLAGS_MODULE = -DCONFIG_VR9\n obj-m = ltq_atm_vr9.o\n ltq_atm_vr9-objs = ltq_atm.o ifxmips_atm_vr9.o\nendif\n"} +{"text": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See License.txt in the project root for license information.\n\nusing System.Collections.Generic;\nusing System.Linq;\nusing Microsoft.AspNet.OData;\nusing Microsoft.AspNet.OData.Routing;\nusing Microsoft.Test.E2E.AspNet.OData.Common.Controllers;\n\nnamespace Microsoft.Test.E2E.AspNet.OData.NavigationPropertyOnComplexType\n{\n public class PeopleController : TestODataController\n {\n private PeopleRepository _repo = new PeopleRepository();\n\n [HttpGet]\n [EnableQuery]\n public IEnumerable<Person> Get()\n {\n return _repo.People;\n }\n\n [HttpGet]\n [EnableQuery]\n public ITestActionResult Get([FromODataUri]int key)\n {\n Person person = _repo.People.FirstOrDefault(p => p.Id == key);\n if (person == null)\n {\n return NotFound();\n }\n\n return Ok(person);\n }\n\n [EnableQuery]\n public ITestActionResult GetHomeLocationFromPerson([FromODataUri]int key)\n {\n Person person = _repo.People.FirstOrDefault(p => p.Id == key);\n if (person == null)\n {\n return NotFound();\n }\n return Ok(person.HomeLocation);\n }\n\n [EnableQuery]\n public ITestActionResult GetRepoLocationsFromPerson([FromODataUri]int key)\n {\n Person person = _repo.People.FirstOrDefault(p => p.Id == key);\n if (person == null)\n {\n return NotFound();\n }\n return Ok(person.RepoLocations);\n }\n\n /*\n [EnableQuery]\n public ITestActionResult GetLocationOfAddress([FromODataUri]int key)\n {\n Person person = _repo.people.FirstOrDefault(p => p.Id == key);\n if (person == null)\n {\n return NotFound();\n }\n return Ok(person.Location as Address);\n }*/\n\n [EnableQuery]\n public ITestActionResult GetHomeLocationOfGeolocation([FromODataUri]int key)\n {\n Person person = _repo.People.FirstOrDefault(p => p.Id == key);\n if (person == null)\n {\n return NotFound();\n }\n\n return Ok(person.HomeLocation as GeoLocation);\n }\n\n [EnableQuery]\n [ODataRoute(\"People({id})/OrderInfo\")]\n public ITestActionResult GetOrdeInfoFromPerson([FromODataUri]int id)\n {\n return Ok(_repo.People.FirstOrDefault(p => p.Id == id).OrderInfo);\n }\n\n [ODataRoute(\"People({id})/HomeLocation/ZipCode\")]\n public ITestActionResult GetZipCode([FromODataUri]int id)\n {\n Person person = _repo.People.FirstOrDefault(p => p.Id == id);\n if (person == null)\n {\n return NotFound();\n }\n\n return Ok(person.HomeLocation.ZipCode);\n }\n\n [ODataRoute(\"People({id})/HomeLocation/ZipCode/$ref\")]\n public ITestActionResult CreateRefToZipCode([FromODataUri] int id, [FromBody] ZipCode zip)\n {\n return Ok(zip);\n }\n }\n}\n"} +{"text": "/*\n * Endpoint Mapper\n *\n * Copyright (C) 2007 Robert Shearman for CodeWeavers\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with this library; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA\n */\n\n#include \"rpcss.h\"\n\n#include <wine/debug.h>\n\nWINE_DEFAULT_DEBUG_CHANNEL(ole);\n\nstruct registered_ept_entry\n{\n struct list entry;\n GUID object;\n RPC_SYNTAX_IDENTIFIER iface;\n RPC_SYNTAX_IDENTIFIER syntax;\n char *protseq;\n char *endpoint;\n char *address;\n char annotation[ept_max_annotation_size];\n};\n\nstatic struct list registered_ept_entry_list = LIST_INIT(registered_ept_entry_list);\n\nstatic CRITICAL_SECTION csEpm;\nstatic CRITICAL_SECTION_DEBUG critsect_debug =\n{\n 0, 0, &csEpm,\n { &critsect_debug.ProcessLocksList, &critsect_debug.ProcessLocksList },\n 0, 0, { (DWORD_PTR)(__FILE__ \": csEpm\") }\n};\nstatic CRITICAL_SECTION csEpm = { &critsect_debug, -1, 0, 0, 0, 0 };\n\nstatic const UUID nil_object;\n\n/* must be called inside csEpm */\nstatic void delete_registered_ept_entry(struct registered_ept_entry *entry)\n{\n I_RpcFree(entry->protseq);\n I_RpcFree(entry->endpoint);\n I_RpcFree(entry->address);\n list_remove(&entry->entry);\n HeapFree(GetProcessHeap(), 0, entry);\n}\n\nstatic struct registered_ept_entry *find_ept_entry(\n const RPC_SYNTAX_IDENTIFIER *iface, const RPC_SYNTAX_IDENTIFIER *syntax,\n const char *protseq, const char *endpoint, const char *address,\n const UUID *object)\n{\n struct registered_ept_entry *entry;\n LIST_FOR_EACH_ENTRY(entry, &registered_ept_entry_list, struct registered_ept_entry, entry)\n {\n if (memcmp(&entry->iface, iface, sizeof(RPC_SYNTAX_IDENTIFIER))) continue;\n if (memcmp(&entry->syntax, syntax, sizeof(RPC_SYNTAX_IDENTIFIER))) continue;\n if (strcmp(entry->protseq, protseq)) continue;\n if (memcmp(&entry->object, object, sizeof(UUID))) continue;\n\tWINE_TRACE(\"found entry with iface %d.%d %s, syntax %d.%d %s, protseq %s, object %s\\n\",\n entry->iface.SyntaxVersion.MajorVersion, entry->iface.SyntaxVersion.MinorVersion,\n wine_dbgstr_guid(&entry->iface.SyntaxGUID),\n entry->syntax.SyntaxVersion.MajorVersion, entry->syntax.SyntaxVersion.MinorVersion,\n wine_dbgstr_guid(&entry->syntax.SyntaxGUID), protseq,\n wine_dbgstr_guid(&entry->object));\n return entry;\n }\n WINE_TRACE(\"not found\\n\");\n return NULL;\n}\n\nvoid __RPC_USER ept_lookup_handle_t_rundown(ept_lookup_handle_t entry_handle)\n{\n WINE_FIXME(\"%p\\n\", entry_handle);\n}\n\nvoid __cdecl ept_insert(handle_t h,\n unsigned32 num_ents,\n ept_entry_t entries[],\n boolean32 replace,\n error_status_t *status)\n{\n unsigned32 i;\n RPC_STATUS rpc_status;\n\n WINE_TRACE(\"(%p, %u, %p, %u, %p)\\n\", h, num_ents, entries, replace, status);\n\n *status = RPC_S_OK;\n\n EnterCriticalSection(&csEpm);\n\n for (i = 0; i < num_ents; i++)\n {\n struct registered_ept_entry *entry = HeapAlloc(GetProcessHeap(), 0, sizeof(*entry));\n if (!entry)\n {\n /* FIXME: cleanup code to delete added entries */\n *status = EPT_S_CANT_PERFORM_OP;\n break;\n }\n memcpy(entry->annotation, entries[i].annotation, sizeof(entries[i].annotation));\n rpc_status = TowerExplode(entries[i].tower, &entry->iface, &entry->syntax,\n &entry->protseq, &entry->endpoint,\n &entry->address);\n if (rpc_status != RPC_S_OK)\n {\n WINE_WARN(\"TowerExplode failed %u\\n\", rpc_status);\n *status = rpc_status;\n HeapFree(GetProcessHeap(), 0, entry);\n break; /* FIXME: more cleanup? */\n }\n\n entry->object = entries[i].object;\n\n if (replace)\n {\n /* FIXME: correct find algorithm */\n struct registered_ept_entry *old_entry = find_ept_entry(&entry->iface, &entry->syntax, entry->protseq, entry->endpoint, entry->address, &entry->object);\n if (old_entry) delete_registered_ept_entry(old_entry);\n }\n list_add_tail(&registered_ept_entry_list, &entry->entry);\n }\n\n LeaveCriticalSection(&csEpm);\n}\n\nvoid __cdecl ept_delete(handle_t h,\n unsigned32 num_ents,\n ept_entry_t entries[],\n error_status_t *status)\n{\n unsigned32 i;\n RPC_STATUS rpc_status;\n\n *status = RPC_S_OK;\n\n WINE_TRACE(\"(%p, %u, %p, %p)\\n\", h, num_ents, entries, status);\n\n EnterCriticalSection(&csEpm);\n\n for (i = 0; i < num_ents; i++)\n {\n struct registered_ept_entry *entry;\n RPC_SYNTAX_IDENTIFIER iface, syntax;\n char *protseq;\n char *endpoint;\n char *address;\n rpc_status = TowerExplode(entries[i].tower, &iface, &syntax, &protseq,\n &endpoint, &address);\n if (rpc_status != RPC_S_OK)\n break;\n entry = find_ept_entry(&iface, &syntax, protseq, endpoint, address, &entries[i].object);\n\n I_RpcFree(protseq);\n I_RpcFree(endpoint);\n I_RpcFree(address);\n\n if (entry)\n delete_registered_ept_entry(entry);\n else\n {\n *status = EPT_S_NOT_REGISTERED;\n break;\n }\n }\n\n LeaveCriticalSection(&csEpm);\n}\n\nvoid __cdecl ept_lookup(handle_t h,\n unsigned32 inquiry_type,\n uuid_p_t object,\n rpc_if_id_p_t interface_id,\n unsigned32 vers_option,\n ept_lookup_handle_t *entry_handle,\n unsigned32 max_ents,\n unsigned32 *num_ents,\n ept_entry_t entries[],\n error_status_t *status)\n{\n WINE_FIXME(\"(%p, %p, %p): stub\\n\", h, entry_handle, status);\n\n *status = EPT_S_CANT_PERFORM_OP;\n}\n\nvoid __cdecl ept_map(handle_t h,\n uuid_p_t object,\n twr_p_t map_tower,\n ept_lookup_handle_t *entry_handle,\n unsigned32 max_towers,\n unsigned32 *num_towers,\n twr_p_t *towers,\n error_status_t *status)\n{\n RPC_STATUS rpc_status;\n RPC_SYNTAX_IDENTIFIER iface, syntax;\n char *protseq;\n struct registered_ept_entry *entry;\n\n *status = RPC_S_OK;\n *num_towers = 0;\n\n WINE_TRACE(\"(%p, %p, %p, %p, %u, %p, %p, %p)\\n\", h, object, map_tower,\n entry_handle, max_towers, num_towers, towers, status);\n\n rpc_status = TowerExplode(map_tower, &iface, &syntax, &protseq,\n NULL, NULL);\n if (rpc_status != RPC_S_OK)\n {\n *status = rpc_status;\n return;\n }\n\n EnterCriticalSection(&csEpm);\n\n LIST_FOR_EACH_ENTRY(entry, &registered_ept_entry_list, struct registered_ept_entry, entry)\n {\n if (IsEqualGUID(&entry->iface.SyntaxGUID, &iface.SyntaxGUID) &&\n (entry->iface.SyntaxVersion.MajorVersion == iface.SyntaxVersion.MajorVersion) &&\n (entry->iface.SyntaxVersion.MinorVersion >= iface.SyntaxVersion.MinorVersion) &&\n !memcmp(&entry->syntax, &syntax, sizeof(syntax)) &&\n !strcmp(entry->protseq, protseq) &&\n ((!object && IsEqualGUID(&entry->object, &nil_object)) || IsEqualGUID(object, &entry->object)))\n {\n if (*num_towers < max_towers)\n {\n rpc_status = TowerConstruct(&entry->iface, &entry->syntax,\n entry->protseq, entry->endpoint,\n entry->address,\n &towers[*num_towers]);\n if (rpc_status != RPC_S_OK)\n {\n *status = rpc_status;\n break; /* FIXME: more cleanup? */\n }\n }\n (*num_towers)++;\n }\n }\n\n LeaveCriticalSection(&csEpm);\n\n I_RpcFree(protseq);\n}\n\nvoid __cdecl ept_lookup_handle_free(handle_t h,\n ept_lookup_handle_t *entry_handle,\n error_status_t *status)\n{\n WINE_FIXME(\"(%p, %p, %p): stub\\n\", h, entry_handle, status);\n\n *status = EPT_S_CANT_PERFORM_OP;\n}\n\nvoid __cdecl ept_inq_object(handle_t h,\n GUID *ept_object,\n error_status_t *status)\n{\n WINE_FIXME(\"(%p, %p, %p): stub\\n\", h, ept_object, status);\n\n *status = EPT_S_CANT_PERFORM_OP;\n}\n\nvoid __cdecl ept_mgmt_delete(handle_t h,\n boolean32 object_speced,\n uuid_p_t object,\n twr_p_t tower,\n error_status_t *status)\n{\n WINE_FIXME(\"(%p, %d, %p, %p, %p): stub\\n\", h, object_speced, object, tower, status);\n\n *status = EPT_S_CANT_PERFORM_OP;\n}\n"} +{"text": "// <auto-generated />\nusing cloudscribe.Core.Storage.EFCore.SQLite;\nusing Microsoft.EntityFrameworkCore;\nusing Microsoft.EntityFrameworkCore.Infrastructure;\nusing Microsoft.EntityFrameworkCore.Metadata;\nusing Microsoft.EntityFrameworkCore.Migrations;\nusing Microsoft.EntityFrameworkCore.Storage;\nusing Microsoft.EntityFrameworkCore.Storage.Internal;\nusing System;\n\nnamespace cloudscribe.Core.Storage.EFCore.SQLite.Migrations\n{\n [DbContext(typeof(CoreDbContext))]\n [Migration(\"20171221163140_Initial\")]\n partial class Initial\n {\n protected override void BuildTargetModel(ModelBuilder modelBuilder)\n {\n#pragma warning disable 612, 618\n modelBuilder\n .HasAnnotation(\"ProductVersion\", \"2.0.1-rtm-125\");\n\n modelBuilder.Entity(\"cloudscribe.Core.Models.Geography.GeoCountry\", b =>\n {\n b.Property<Guid>(\"Id\")\n .ValueGeneratedOnAdd();\n\n b.Property<string>(\"ISOCode2\")\n .IsRequired()\n .HasMaxLength(2);\n\n b.Property<string>(\"ISOCode3\")\n .IsRequired()\n .HasMaxLength(3);\n\n b.Property<string>(\"Name\")\n .IsRequired()\n .HasMaxLength(255);\n\n b.HasKey(\"Id\");\n\n b.HasIndex(\"ISOCode2\");\n\n b.ToTable(\"cs_GeoCountry\");\n });\n\n modelBuilder.Entity(\"cloudscribe.Core.Models.Geography.GeoZone\", b =>\n {\n b.Property<Guid>(\"Id\")\n .ValueGeneratedOnAdd();\n\n b.Property<string>(\"Code\")\n .IsRequired()\n .HasMaxLength(255);\n\n b.Property<Guid>(\"CountryId\");\n\n b.Property<string>(\"Name\")\n .IsRequired()\n .HasMaxLength(255);\n\n b.HasKey(\"Id\");\n\n b.HasIndex(\"Code\");\n\n b.HasIndex(\"CountryId\");\n\n b.ToTable(\"cs_GeoZone\");\n });\n\n modelBuilder.Entity(\"cloudscribe.Core.Models.SiteHost\", b =>\n {\n b.Property<Guid>(\"Id\")\n .ValueGeneratedOnAdd();\n\n b.Property<string>(\"HostName\")\n .IsRequired()\n .HasMaxLength(255);\n\n b.Property<Guid>(\"SiteId\");\n\n b.HasKey(\"Id\");\n\n b.HasIndex(\"HostName\");\n\n b.HasIndex(\"SiteId\");\n\n b.ToTable(\"cs_SiteHost\");\n });\n\n modelBuilder.Entity(\"cloudscribe.Core.Models.SiteRole\", b =>\n {\n b.Property<Guid>(\"Id\")\n .ValueGeneratedOnAdd();\n\n b.Property<string>(\"NormalizedRoleName\")\n .IsRequired()\n .HasMaxLength(50);\n\n b.Property<string>(\"RoleName\")\n .IsRequired()\n .HasMaxLength(50);\n\n b.Property<Guid>(\"SiteId\");\n\n b.HasKey(\"Id\");\n\n b.HasIndex(\"Id\")\n .IsUnique();\n\n b.HasIndex(\"NormalizedRoleName\");\n\n b.HasIndex(\"SiteId\");\n\n b.ToTable(\"cs_Role\");\n });\n\n modelBuilder.Entity(\"cloudscribe.Core.Models.SiteSettings\", b =>\n {\n b.Property<Guid>(\"Id\")\n .ValueGeneratedOnAdd();\n\n b.Property<string>(\"AccountApprovalEmailCsv\");\n\n b.Property<string>(\"AddThisDotComUsername\")\n .HasMaxLength(50);\n\n b.Property<string>(\"AliasId\")\n .HasMaxLength(36);\n\n //b.Property<bool>(\"AllowDbFallbackWithLdap\");\n\n b.Property<bool>(\"AllowNewRegistration\");\n\n b.Property<bool>(\"AllowPersistentLogin\");\n\n //b.Property<bool>(\"AutoCreateLdapUserOnFirstLogin\");\n\n b.Property<bool>(\"CaptchaOnLogin\");\n\n b.Property<bool>(\"CaptchaOnRegistration\");\n\n b.Property<string>(\"CompanyCountry\")\n .HasMaxLength(10);\n\n b.Property<string>(\"CompanyFax\")\n .HasMaxLength(20);\n\n b.Property<string>(\"CompanyLocality\")\n .HasMaxLength(200);\n\n b.Property<string>(\"CompanyName\")\n .HasMaxLength(250);\n\n b.Property<string>(\"CompanyPhone\")\n .HasMaxLength(20);\n\n b.Property<string>(\"CompanyPostalCode\")\n .HasMaxLength(20);\n\n b.Property<string>(\"CompanyPublicEmail\")\n .HasMaxLength(100);\n\n b.Property<string>(\"CompanyRegion\")\n .HasMaxLength(200);\n\n b.Property<string>(\"CompanyStreetAddress\")\n .HasMaxLength(250);\n\n b.Property<string>(\"CompanyStreetAddress2\")\n .HasMaxLength(250);\n\n b.Property<string>(\"CompanyWebsite\")\n .HasMaxLength(255);\n\n b.Property<string>(\"ConcurrencyStamp\");\n\n b.Property<DateTime>(\"CreatedUtc\");\n\n b.Property<string>(\"DefaultEmailFromAddress\")\n .HasMaxLength(100);\n\n b.Property<string>(\"DefaultEmailFromAlias\")\n .HasMaxLength(100);\n\n b.Property<bool>(\"DisableDbAuth\");\n\n b.Property<string>(\"DkimDomain\")\n .HasMaxLength(255);\n\n b.Property<string>(\"DkimPrivateKey\");\n\n b.Property<string>(\"DkimPublicKey\");\n\n b.Property<string>(\"DkimSelector\")\n .HasMaxLength(128);\n\n //b.Property<bool>(\"EmailLdapDbFallback\");\n\n b.Property<string>(\"FacebookAppId\")\n .HasMaxLength(100);\n\n b.Property<string>(\"FacebookAppSecret\");\n\n b.Property<string>(\"ForcedCulture\")\n .HasMaxLength(10);\n\n b.Property<string>(\"ForcedUICulture\")\n .HasMaxLength(10);\n\n b.Property<string>(\"GoogleAnalyticsProfileId\")\n .HasMaxLength(25);\n\n b.Property<string>(\"GoogleClientId\")\n .HasMaxLength(100);\n\n b.Property<string>(\"GoogleClientSecret\");\n\n b.Property<bool>(\"IsDataProtected\");\n\n b.Property<bool>(\"IsServerAdminSite\");\n\n b.Property<string>(\"LdapDomain\")\n .HasMaxLength(255);\n\n b.Property<int>(\"LdapPort\");\n\n b.Property<string>(\"LdapRootDN\")\n .HasMaxLength(255);\n\n b.Property<string>(\"LdapServer\")\n .HasMaxLength(255);\n\n b.Property<string>(\"LdapUserDNKey\")\n .HasMaxLength(10);\n\n b.Property<string>(\"LoginInfoBottom\");\n\n b.Property<string>(\"LoginInfoTop\");\n\n b.Property<int>(\"MaxInvalidPasswordAttempts\");\n\n b.Property<string>(\"MicrosoftClientId\")\n .HasMaxLength(100);\n\n b.Property<string>(\"MicrosoftClientSecret\");\n\n b.Property<int>(\"MinRequiredPasswordLength\");\n\n b.Property<string>(\"OidConnectAppId\")\n .HasMaxLength(255);\n\n b.Property<string>(\"OidConnectAppSecret\")\n .HasMaxLength(255);\n\n b.Property<string>(\"OidConnectAuthority\")\n .HasMaxLength(255);\n\n b.Property<string>(\"OidConnectDisplayName\")\n .HasMaxLength(150);\n\n b.Property<string>(\"PreferredHostName\")\n .HasMaxLength(250);\n\n b.Property<string>(\"PrivacyPolicy\");\n\n b.Property<bool>(\"PwdRequireDigit\");\n\n b.Property<bool>(\"PwdRequireLowercase\");\n\n b.Property<bool>(\"PwdRequireNonAlpha\");\n\n b.Property<bool>(\"PwdRequireUppercase\");\n \n b.Property<string>(\"RecaptchaPrivateKey\")\n .HasMaxLength(255);\n\n b.Property<string>(\"RecaptchaPublicKey\")\n .HasMaxLength(255);\n\n b.Property<string>(\"RegistrationAgreement\");\n\n b.Property<string>(\"RegistrationPreamble\");\n\n b.Property<bool>(\"RequireApprovalBeforeLogin\");\n\n b.Property<bool>(\"RequireConfirmedEmail\");\n\n b.Property<bool>(\"RequireConfirmedPhone\");\n\n b.Property<bool>(\"RequiresQuestionAndAnswer\");\n\n b.Property<bool>(\"SignEmailWithDkim\");\n\n b.Property<string>(\"SiteFolderName\")\n .HasMaxLength(50);\n\n b.Property<bool>(\"SiteIsClosed\");\n\n b.Property<string>(\"SiteIsClosedMessage\");\n\n b.Property<string>(\"SiteName\")\n .IsRequired()\n .HasMaxLength(255);\n\n b.Property<string>(\"SmsClientId\")\n .HasMaxLength(255);\n\n b.Property<string>(\"SmsFrom\")\n .HasMaxLength(100);\n\n b.Property<string>(\"SmsSecureToken\");\n\n b.Property<string>(\"SmtpPassword\");\n\n b.Property<int>(\"SmtpPort\");\n\n b.Property<string>(\"SmtpPreferredEncoding\")\n .HasMaxLength(20);\n\n b.Property<bool>(\"SmtpRequiresAuth\");\n\n b.Property<string>(\"SmtpServer\")\n .HasMaxLength(200);\n\n b.Property<bool>(\"SmtpUseSsl\");\n\n b.Property<string>(\"SmtpUser\")\n .HasMaxLength(500);\n\n b.Property<DateTime>(\"TermsUpdatedUtc\");\n\n b.Property<string>(\"Theme\")\n .HasMaxLength(100);\n\n b.Property<string>(\"TimeZoneId\")\n .HasMaxLength(50);\n\n b.Property<string>(\"TwitterConsumerKey\")\n .HasMaxLength(100);\n\n b.Property<string>(\"TwitterConsumerSecret\");\n\n b.Property<bool>(\"UseEmailForLogin\");\n\n b.Property<bool>(\"UseInvisibleRecaptcha\");\n\n // b.Property<bool>(\"UseLdapAuth\");\n\n b.HasKey(\"Id\");\n\n b.HasIndex(\"AliasId\");\n\n b.HasIndex(\"SiteFolderName\");\n\n b.ToTable(\"cs_Site\");\n });\n\n modelBuilder.Entity(\"cloudscribe.Core.Models.SiteUser\", b =>\n {\n b.Property<Guid>(\"Id\")\n .ValueGeneratedOnAdd();\n\n b.Property<int>(\"AccessFailedCount\");\n\n b.Property<bool>(\"AccountApproved\");\n\n b.Property<DateTime?>(\"AgreementAcceptedUtc\");\n\n b.Property<string>(\"AuthorBio\");\n\n b.Property<string>(\"AvatarUrl\")\n .HasMaxLength(255);\n\n b.Property<bool>(\"CanAutoLockout\");\n\n b.Property<string>(\"Comment\");\n\n b.Property<DateTime>(\"CreatedUtc\");\n\n b.Property<DateTime?>(\"DateOfBirth\");\n\n b.Property<bool>(\"DisplayInMemberList\");\n\n b.Property<string>(\"DisplayName\")\n .IsRequired()\n .HasMaxLength(100);\n\n b.Property<string>(\"Email\")\n .IsRequired()\n .HasMaxLength(100);\n\n b.Property<DateTime?>(\"EmailConfirmSentUtc\");\n\n b.Property<bool>(\"EmailConfirmed\");\n\n b.Property<string>(\"FirstName\")\n .HasMaxLength(100);\n\n b.Property<string>(\"Gender\");\n \n b.Property<bool>(\"IsLockedOut\");\n\n b.Property<DateTime?>(\"LastLoginUtc\");\n\n b.Property<DateTime>(\"LastModifiedUtc\");\n\n b.Property<string>(\"LastName\")\n .HasMaxLength(100);\n\n b.Property<DateTime?>(\"LastPasswordChangeUtc\");\n\n b.Property<DateTime?>(\"LockoutEndDateUtc\");\n\n b.Property<bool>(\"MustChangePwd\");\n\n b.Property<string>(\"NewEmail\")\n .HasMaxLength(100);\n\n b.Property<bool>(\"NewEmailApproved\");\n\n b.Property<string>(\"NormalizedEmail\")\n .IsRequired()\n .HasMaxLength(100);\n\n b.Property<string>(\"NormalizedUserName\")\n .IsRequired()\n .HasMaxLength(50);\n\n b.Property<string>(\"PasswordHash\");\n\n b.Property<string>(\"PhoneNumber\")\n .HasMaxLength(50);\n\n b.Property<bool>(\"PhoneNumberConfirmed\");\n\n b.Property<bool>(\"RolesChanged\");\n\n b.Property<string>(\"SecurityStamp\")\n .HasMaxLength(50);\n\n b.Property<string>(\"Signature\");\n\n b.Property<Guid>(\"SiteId\");\n\n b.Property<string>(\"TimeZoneId\")\n .HasMaxLength(50);\n\n b.Property<bool>(\"TwoFactorEnabled\");\n\n b.Property<string>(\"UserName\")\n .IsRequired()\n .HasMaxLength(50);\n\n b.Property<string>(\"WebSiteUrl\")\n .HasMaxLength(100);\n\n b.HasKey(\"Id\");\n\n b.HasIndex(\"DisplayName\");\n\n b.HasIndex(\"NormalizedEmail\");\n\n b.HasIndex(\"NormalizedUserName\");\n\n b.HasIndex(\"SiteId\");\n\n b.ToTable(\"cs_User\");\n });\n\n modelBuilder.Entity(\"cloudscribe.Core.Models.UserClaim\", b =>\n {\n b.Property<Guid>(\"Id\")\n .ValueGeneratedOnAdd();\n\n b.Property<string>(\"ClaimType\")\n .HasMaxLength(255);\n\n b.Property<string>(\"ClaimValue\");\n\n b.Property<Guid>(\"SiteId\");\n\n b.Property<Guid>(\"UserId\");\n\n b.HasKey(\"Id\");\n\n b.HasIndex(\"ClaimType\");\n\n b.HasIndex(\"SiteId\");\n\n b.HasIndex(\"UserId\");\n\n b.ToTable(\"cs_UserClaim\");\n });\n\n modelBuilder.Entity(\"cloudscribe.Core.Models.UserLocation\", b =>\n {\n b.Property<Guid>(\"Id\")\n .ValueGeneratedOnAdd();\n\n b.Property<int>(\"CaptureCount\");\n\n b.Property<string>(\"City\")\n .HasMaxLength(255);\n\n b.Property<string>(\"Continent\")\n .HasMaxLength(255);\n\n b.Property<string>(\"Country\")\n .HasMaxLength(255);\n\n b.Property<DateTime>(\"FirstCaptureUtc\");\n\n b.Property<string>(\"HostName\")\n .HasMaxLength(255);\n\n b.Property<string>(\"IpAddress\")\n .HasMaxLength(50);\n\n b.Property<long>(\"IpAddressLong\");\n\n b.Property<string>(\"Isp\")\n .HasMaxLength(255);\n\n b.Property<DateTime>(\"LastCaptureUtc\");\n\n b.Property<double>(\"Latitude\");\n\n b.Property<double>(\"Longitude\");\n\n b.Property<string>(\"Region\")\n .HasMaxLength(255);\n\n b.Property<Guid>(\"SiteId\");\n\n b.Property<string>(\"TimeZone\")\n .HasMaxLength(255);\n\n b.Property<Guid>(\"UserId\");\n\n b.HasKey(\"Id\");\n\n b.HasIndex(\"IpAddress\");\n\n b.HasIndex(\"UserId\");\n\n b.ToTable(\"cs_UserLocation\");\n });\n\n modelBuilder.Entity(\"cloudscribe.Core.Models.UserLogin\", b =>\n {\n b.Property<Guid>(\"UserId\");\n\n b.Property<Guid>(\"SiteId\");\n\n b.Property<string>(\"LoginProvider\")\n .HasMaxLength(128);\n\n b.Property<string>(\"ProviderKey\")\n .HasMaxLength(128);\n\n b.Property<string>(\"ProviderDisplayName\")\n .HasMaxLength(100);\n\n b.HasKey(\"UserId\", \"SiteId\", \"LoginProvider\", \"ProviderKey\");\n\n b.HasIndex(\"SiteId\");\n\n b.HasIndex(\"UserId\");\n\n b.ToTable(\"cs_UserLogin\");\n });\n\n modelBuilder.Entity(\"cloudscribe.Core.Models.UserRole\", b =>\n {\n b.Property<Guid>(\"UserId\");\n\n b.Property<Guid>(\"RoleId\");\n\n b.HasKey(\"UserId\", \"RoleId\");\n\n b.HasIndex(\"RoleId\");\n\n b.HasIndex(\"UserId\");\n\n b.ToTable(\"cs_UserRole\");\n });\n\n modelBuilder.Entity(\"cloudscribe.Core.Models.UserToken\", b =>\n {\n b.Property<Guid>(\"UserId\");\n\n b.Property<Guid>(\"SiteId\");\n\n b.Property<string>(\"LoginProvider\")\n .HasMaxLength(450);\n\n b.Property<string>(\"Name\")\n .HasMaxLength(450);\n\n b.Property<string>(\"Value\");\n\n b.HasKey(\"UserId\", \"SiteId\", \"LoginProvider\", \"Name\");\n\n b.HasIndex(\"SiteId\");\n\n b.HasIndex(\"UserId\");\n\n b.ToTable(\"cs_UserToken\");\n });\n#pragma warning restore 612, 618\n }\n }\n}\n"} +{"text": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <title>CSS Test: Font-weight set to 'bolder'</title>\n <link rel=\"author\" title=\"Microsoft\" href=\"http://www.microsoft.com/\" />\n <link rel=\"help\" href=\"http://www.w3.org/TR/CSS21/fonts.html#font-boldness\" />\n <link rel=\"help\" href=\"http://www.w3.org/TR/css-fonts-3/#font-weight-prop\" />\n <link rel=\"match\" href=\"font-weight-bold-ref.html\" />\n <meta name=\"flags\" content=\"\" />\n <meta name=\"assert\" content=\"The value 'bolder' selects the next darker weight compared to its parent's weight.\" />\n <style type=\"text/css\">\n #parent\n {\n font-weight: 400;\n }\n #reference\n {\n font-weight: 700;\n }\n div div\n {\n font-weight: bolder;\n }\n </style>\n </head>\n <body>\n <p>Test passes if the lines of \"Filler Text\" below match.</p>\n <div id=\"reference\">Filler Text</div>\n <div id=\"parent\">\n <div>Filler Text</div>\n </div>\n </body>\n</html>\n"} +{"text": "<manifest package=\"com.vlad1m1r.actions\"/>\n"} +{"text": "[\n {\n \"message\": \"bbox member must be an array of numbers, but is a string\"\n }\n]"} +{"text": "import { Actions } from '@ngrx/effects';\nimport { TestBed } from '@angular/core/testing';\nimport { of } from 'rxjs/observable/of';\nimport { empty } from 'rxjs/observable/empty';\nimport { cold, hot } from 'jasmine-marbles';\nimport { Observable } from 'rxjs/Observable';\nimport { Database } from '@ngrx/db';\n\nimport { CollectionEffects } from './collection.effects';\nimport { Book } from '../book/book.model';\nimport * as IDActions from '../id/id.actions';\nimport { slices } from '../util';\n\nexport class TestActions extends Actions {\n constructor() {\n super(empty());\n }\n\n set stream(source: Observable<any>) {\n this.source = source;\n }\n}\n\nexport function getActions() {\n return new TestActions();\n}\n\ndescribe('CollectionEffects', () => {\n let db: any;\n let effects: CollectionEffects;\n let actions$: TestActions;\n\n const book1 = { id: '111', volumeInfo: {} } as Book;\n const book2 = { id: '222', volumeInfo: {} } as Book;\n\n beforeEach(() => {\n TestBed.configureTestingModule({\n providers: [\n CollectionEffects,\n { provide: Database, useValue: jasmine.createSpyObj('database', ['open', 'query', 'insert', 'executeWrite']) },\n { provide: Actions, useFactory: getActions },\n ]\n });\n\n db = TestBed.get(Database);\n effects = TestBed.get(CollectionEffects);\n actions$ = TestBed.get(Actions);\n });\n\n describe('openDB$', () => {\n it('should call db.open when initially subscribed to', () => {\n effects.openDB$.subscribe();\n expect(db.open).toHaveBeenCalledWith('books_app');\n });\n });\n\n describe('loadCollection$', () => {\n it('should return a IDActions.LoadSuccess, with the books, on success', () => {\n const action = new IDActions.Load(slices.COLLECTION);\n const completion = new IDActions.LoadSuccess(slices.COLLECTION, [book1, book2]);\n\n actions$.stream = hot('-a', { a: action });\n const response = cold('-a-b|', { a: book1, b: book2 });\n const expected = cold('-----c', { c: completion });\n db.query.and.returnValue(response);\n\n expect(effects.loadCollection$).toBeObservable(expected);\n });\n\n it('should return a IDActions.LoadFail, if the query throws', () => {\n const action = new IDActions.Load(slices.COLLECTION);\n const error = 'Error!';\n const completion = new IDActions.LoadFail(slices.COLLECTION, error);\n\n actions$.stream = hot('-a', { a: action });\n const response = cold('-#', {}, error);\n const expected = cold('--c', { c: completion });\n db.query.and.returnValue(response);\n\n expect(effects.loadCollection$).toBeObservable(expected);\n });\n });\n\n describe('addBookToCollection$', () => {\n it('should return a IDActions.AddSuccess, with the book, on success', () => {\n const action = new IDActions.Add(slices.COLLECTION, book1);\n const completion = new IDActions.AddSuccess(slices.COLLECTION, book1);\n\n actions$.stream = hot('-a', { a: action });\n const response = cold('-b', { b: true });\n const expected = cold('--c', { c: completion });\n db.insert.and.returnValue(response);\n\n expect(effects.addBookToCollection$).toBeObservable(expected);\n expect(db.insert).toHaveBeenCalledWith('books', [book1]);\n });\n\n it('should return a IDActions.AddFail, with the book, when the db insert throws', () => {\n const action = new IDActions.Add(slices.COLLECTION, book1);\n const completion = new IDActions.AddFail(slices.COLLECTION, book1);\n const error = 'Error!';\n\n actions$.stream = hot('-a', { a: action });\n const response = cold('-#', {}, error);\n const expected = cold('--c', { c: completion });\n db.insert.and.returnValue(response);\n\n expect(effects.addBookToCollection$).toBeObservable(expected);\n });\n\n describe('removeBookFromCollection$', () => {\n it('should return a IDActions.DeleteSuccess, with the book, on success', () => {\n const action = new IDActions.Delete(slices.COLLECTION, book1);\n const completion = new IDActions.DeleteSuccess(slices.COLLECTION, book1);\n\n actions$.stream = hot('-a', { a: action });\n const response = cold('-b', { b: true });\n const expected = cold('--c', { c: completion });\n db.executeWrite.and.returnValue(response);\n\n expect(effects.removeBookFromCollection$).toBeObservable(expected);\n expect(db.executeWrite).toHaveBeenCalledWith('books', 'delete', [book1.id]);\n });\n\n it('should return a IDActions.DeleteFail, with the book, when the db insert throws', () => {\n const action = new IDActions.Delete(slices.COLLECTION, book1);\n const completion = new IDActions.DeleteFail(slices.COLLECTION, book1);\n const error = 'Error!';\n\n actions$.stream = hot('-a', { a: action });\n const response = cold('-#', {}, error);\n const expected = cold('--c', { c: completion });\n db.executeWrite.and.returnValue(response);\n\n expect(effects.removeBookFromCollection$).toBeObservable(expected);\n expect(db.executeWrite).toHaveBeenCalledWith('books', 'delete', [book1.id]);\n });\n });\n });\n});\n"} +{"text": " ****** ***** ****** UnRAR - free utility for RAR archives\n ** ** ** ** ** ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n ****** ******* ****** License for use and distribution of\n ** ** ** ** ** ** ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n ** ** ** ** ** ** FREEWARE version\n ~~~~~~~~~~~~~~~~\n\n The UnRAR utility is freeware. This means:\n\n 1. All copyrights to RAR and the utility UnRAR are exclusively\n owned by the author - Alexander Roshal.\n\n 2. The UnRAR utility may be freely distributed. It is allowed\n to distribute UnRAR inside of other software packages.\n\n 3. THE RAR ARCHIVER AND THE UnRAR UTILITY ARE DISTRIBUTED \"AS IS\".\n NO WARRANTY OF ANY KIND IS EXPRESSED OR IMPLIED. YOU USE AT \n YOUR OWN RISK. THE AUTHOR WILL NOT BE LIABLE FOR DATA LOSS, \n DAMAGES, LOSS OF PROFITS OR ANY OTHER KIND OF LOSS WHILE USING\n OR MISUSING THIS SOFTWARE.\n\n 4. Neither RAR binary code, WinRAR binary code, UnRAR source or UnRAR\n binary code may be used or reverse engineered to re-create the RAR\n compression algorithm, which is proprietary, without written\n permission of the author.\n\n 5. If you don't agree with terms of the license you must remove\n UnRAR files from your storage devices and cease to use the\n utility.\n\n Thank you for your interest in RAR and UnRAR.\n\n\n Alexander L. Roshal"} +{"text": "<?php\n\n/**\n * Class LP_Submenu_Statistics\n *\n * @since 3.0.0\n */\nclass LP_Submenu_Statistics extends LP_Abstract_Submenu {\n\n\t/**\n\t * LP_Submenu_Statistics constructor.\n\t */\n\tpublic function __construct() {\n\t\t$this->id = 'learn-press-statistics';\n\t\t$this->menu_title = __( 'Statistics', 'learnpress' );\n\t\t$this->page_title = __( 'LearnPress Statistics', 'learnpress' );\n\t\t$this->priority = 10;\n\n\t\tif ( current_user_can( LP_TEACHER_ROLE ) ) {\n\t\t\t$tabs = array(\n\t\t\t\t'courses' => __( 'Courses', 'learnpress' ),\n\t\t\t\t'orders' => __( 'Orders', 'learnpress' ),\n\t\t\t);\n\t\t} else {\n\t\t\t$tabs = array(\n\t\t\t\t'general' => __( 'General', 'learnpress' ),\n\t\t\t\t'users' => __( 'Users', 'learnpress' ),\n\t\t\t\t'courses' => __( 'Courses', 'learnpress' ),\n\t\t\t\t'orders' => __( 'Orders', 'learnpress' ),\n\t\t\t);\n\t\t}\n\n\t\t$this->tabs = apply_filters(\n\t\t\t'learn-press/admin/page-statistic-tabs',\n\t\t\t$tabs\n\t\t);\n\n\t\tadd_action( 'admin_enqueue_scripts', array( $this, 'scripts' ) );\n\n\t\tparent::__construct();\n\t}\n\n\tpublic function load_chart() {\n\t\t$type = learn_press_get_request( 'type' );\n\t\t$response = null;\n\t\tswitch ( $type ) {\n\t\t\tcase 'user-last-7-days':\n\t\t\t\t$response = learn_press_get_chart_users( null, 'days', 7 );\n\t\t\t\tbreak;\n\t\t\tcase 'user-last-30-days':\n\t\t\t\t$response = learn_press_get_chart_users( null, 'days', 30 );\n\t\t\t\tbreak;\n\t\t\tcase 'user-last-12-months':\n\t\t\t\t$response = learn_press_get_chart_users( null, 'months', 12 );\n\t\t\t\tbreak;\n\t\t\tcase 'user-custom-time':\n\t\t\t\t$range = learn_press_get_request( 'range' );\n\t\t\t\t$from_time = strtotime( $range[0] );\n\t\t\t\t$to_time = strtotime( $range[1] );\n\t\t\t\tlist( $from_d, $from_m, $from_y ) = explode( ' ', date( 'd m Y', $from_time ) );\n\t\t\t\tlist( $to_d, $to_m, $to_y ) = explode( ' ', date( 'd m Y', $to_time ) );\n\n\t\t\t\tif ( $from_y != $to_y ) {\n\t\t\t\t\t$response = learn_press_get_chart_users( $to_time, 'years', $to_y - $from_y + 1 );\n\t\t\t\t} else {\n\t\t\t\t\tif ( $from_m != $to_m ) {\n\t\t\t\t\t\t$response = learn_press_get_chart_users( $to_time, 'months', $to_m - $from_m + 1 );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$response = learn_press_get_chart_users( $to_time, 'days', $to_d - $from_d + 1 );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'user-all':\n\t\t\t\tglobal $wpdb;\n\t\t\t\t$results = $wpdb->get_row(\n\t\t\t\t\t\"\n\t\t\t\t\tSELECT min(u.user_registered) as `from`, max(u.user_registered) as `to`\n\t\t\t\t\tFROM {$wpdb->users} u\n\t\t\t\t\"\n\t\t\t\t);\n\n\t\t\t\tif ( $results ) {\n\t\t\t\t\t$_POST['range'] = array(\n\t\t\t\t\t\tdate( 'Y/m/d', strtotime( $results->from ) ),\n\t\t\t\t\t\tdate( 'Y/m/d', strtotime( $results->to ) ),\n\t\t\t\t\t);\n\t\t\t\t\t$_POST['type'] = 'user-custom-time';\n\t\t\t\t\t$this->load_chart();\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'course-last-7-days':\n\t\t\t\t$response = learn_press_get_chart_courses( null, 'days', 7 );\n\t\t\t\tbreak;\n\t\t\tcase 'course-last-30-days':\n\t\t\t\t$response = learn_press_get_chart_courses( null, 'days', 30 );\n\t\t\t\tbreak;\n\t\t\tcase 'course-last-12-months':\n\t\t\t\t$response = learn_press_get_chart_courses( null, 'months', 12 );\n\t\t\t\tbreak;\n\t\t\tcase 'course-custom-time':\n\t\t\t\t$range = learn_press_get_request( 'range' );\n\t\t\t\t$from_time = strtotime( $range[0] );\n\t\t\t\t$to_time = strtotime( $range[1] );\n\t\t\t\tlist( $from_d, $from_m, $from_y ) = explode( ' ', date( 'd m Y', $from_time ) );\n\t\t\t\tlist( $to_d, $to_m, $to_y ) = explode( ' ', date( 'd m Y', $to_time ) );\n\n\t\t\t\tif ( $from_y != $to_y ) {\n\t\t\t\t\t$months = abs( ( date( 'Y', $to_time ) - date( 'Y', $from_time ) ) * 12 + ( date( 'm', $to_time ) - date( 'm', $from_time ) ) ) + 1;\n\t\t\t\t\tif ( $months > 12 ) {\n\t\t\t\t\t\t$response = learn_press_get_chart_courses( $to_time, 'years', $to_y - $from_y + 1 );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$response = learn_press_get_chart_courses( $to_time, 'months', $months );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( $from_m != $to_m ) {\n\t\t\t\t\t\t$response = learn_press_get_chart_courses( $to_time, 'months', $to_m - $from_m + 1 );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$response = learn_press_get_chart_courses( $to_time, 'days', $to_d - $from_d + 1 );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tcase 'course-all':\n\t\t\t\tglobal $wpdb;\n\t\t\t\t$results = $wpdb->get_row(\n\t\t\t\t\t$wpdb->prepare(\n\t\t\t\t\t\t\"\n\t\t\t\t\t\tSELECT min(c.post_date) as `from`, max(c.post_date) as `to`\n\t\t\t\t\t\tFROM {$wpdb->posts} c\n\t\t\t\t\t\tWHERE c.post_date <> %s\n\t\t\t\t\t\tAND c.post_type = %s\n\t\t\t\t\t\",\n\t\t\t\t\t\t'0000-00-00 00:00:00',\n\t\t\t\t\t\t'lp_course'\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\tif ( $results ) {\n\t\t\t\t\t$_POST['range'] = array(\n\t\t\t\t\t\tdate( 'Y/m/d', strtotime( $results->from ) ),\n\t\t\t\t\t\tdate( 'Y/m/d', strtotime( $results->to ) ),\n\t\t\t\t\t);\n\t\t\t\t\t$_POST['type'] = 'course-custom-time';\n\t\t\t\t\t$this->load_chart();\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase 'order-last-7-days':\n\t\t\t\t$response = learn_press_get_chart_orders( null, 'days', 7 );\n\t\t\t\tbreak;\n\t\t\tcase 'order-last-30-days':\n\t\t\t\t$response = learn_press_get_chart_orders( null, 'days', 30 );\n\t\t\t\tbreak;\n\t\t\tcase 'order-last-12-months':\n\t\t\t\t$response = learn_press_get_chart_orders( null, 'months', 12 );\n\t\t\t\tbreak;\n\t\t\tcase 'order-custom-time':\n\t\t\t\t$range = learn_press_get_request( 'range' );\n\t\t\t\t$from_time = strtotime( $range[0] );\n\t\t\t\t$to_time = strtotime( $range[1] );\n\t\t\t\tlist( $from_d, $from_m, $from_y ) = explode( ' ', date( 'd m Y', $from_time ) );\n\t\t\t\tlist( $to_d, $to_m, $to_y ) = explode( ' ', date( 'd m Y', $to_time ) );\n\n\t\t\t\tif ( $from_y != $to_y ) {\n\t\t\t\t\t$months = abs( ( date( 'Y', $to_time ) - date( 'Y', $from_time ) ) * 12 + ( date( 'm', $to_time ) - date( 'm', $from_time ) ) ) + 1;\n\t\t\t\t\tif ( $months > 12 ) {\n\t\t\t\t\t\t$response = learn_press_get_chart_orders( $to_time, 'years', $to_y - $from_y + 1 );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$response = learn_press_get_chart_orders( $to_time, 'months', $months );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif ( $from_m != $to_m ) {\n\t\t\t\t\t\t$response = learn_press_get_chart_orders( $to_time, 'months', $to_m - $from_m + 1 );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$response = learn_press_get_chart_orders( $to_time, 'days', $to_d - $from_d + 1 );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tcase 'order-all':\n\t\t\t\tglobal $wpdb;\n\n\t\t\t\t$results = $wpdb->get_row(\n\t\t\t\t\t$wpdb->prepare(\n\t\t\t\t\t\t\"\n\t\t\t\t\t\tSELECT min(c.post_date) as `from`, max(c.post_date) as `to`\n\t\t\t\t\t\tFROM {$wpdb->posts} c\n\t\t\t\t\t\tWHERE c.post_date <> %s\n\t\t\t\t\t\tAND c.post_type = %s\n\t\t\t\t\t\",\n\t\t\t\t\t\t'0000-00-00 00:00:00',\n\t\t\t\t\t\t'lp_order'\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\tif ( $results ) {\n\t\t\t\t\t$_POST['range'] = array(\n\t\t\t\t\t\tdate( 'Y/m/d', strtotime( $results->from ) ),\n\t\t\t\t\t\tdate( 'Y/m/d', strtotime( $results->to ) ),\n\t\t\t\t\t);\n\t\t\t\t\t$_POST['type'] = 'order-custom-time';\n\t\t\t\t\t$this->load_chart();\n\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t}\n\n\t\tlearn_press_send_json( $response );\n\t}\n\n\t/**\n\t *\n\t */\n\tpublic function scripts() {\n\t\tif ( LP_Request::get( 'page' ) !== 'learn-press-statistics' ) {\n\t\t\treturn;\n\t\t}\n\t\twp_enqueue_style( 'learn-press-statistic', LP_CSS_URL . 'admin/statistic.css' );\n\n\t\t$exclude_assets = LP()->settings()->get( 'exclude_admin_libraries' );\n\n\t\tif ( ! $exclude_assets || ! in_array( 'chartjs', $exclude_assets ) ) {\n\t\t\twp_enqueue_script( 'learn-press-chart', LP_JS_URL . 'vendor/chart.min.js' );\n\t\t}\n\n\t\twp_enqueue_script(\n\t\t\t'learn-press-statistic',\n\t\t\tLP_JS_URL . 'admin/pages/statistic.js',\n\t\t\tarray(\n\t\t\t\t'jquery',\n\t\t\t\t'jquery-ui-datepicker',\n\t\t\t)\n\t\t);\n\t}\n\n\tpublic function page_content_courses() {\n\t\tlearn_press_admin_view( 'statistics/courses' );\n\t}\n\n\tpublic function page_content_general() {\n\t\tlearn_press_admin_view( 'statistics/general' );\n\t}\n\n\tpublic function page_content_users() {\n\t\tlearn_press_admin_view( 'statistics/users' );\n\t}\n\n\tpublic function page_content_orders() {\n\t\tlearn_press_admin_view( 'statistics/orders' );\n\t}\n\n}\n\nreturn new LP_Submenu_Statistics();\n"} +{"text": "'use strict';\n\n/**\n * ICNS Header\n *\n * | Offset | Size | Purpose |\n * | 0\t | 4 | Magic literal, must be \"icns\" (0x69, 0x63, 0x6e, 0x73) |\n * | 4 | 4 | Length of file, in bytes, msb first. |\n *\n **/\nvar SIZE_HEADER = 4 + 4; // 8\nvar FILE_LENGTH_OFFSET = 4; // MSB => BIG ENDIAN\n\n/**\n * Image Entry\n *\n * | Offset | Size | Purpose |\n * | 0\t | 4 | Icon type, see OSType below. |\n * | 4 | 4 | Length of data, in bytes (including type and length), msb first. |\n * | 8 | n | Icon data |\n *\n **/\nvar ENTRY_LENGTH_OFFSET = 4; // MSB => BIG ENDIAN\n\nfunction isICNS (buffer) {\n return ('icns' === buffer.toString('ascii', 0, 4));\n}\n\nvar ICON_TYPE_SIZE = {\n ICON: 32,\n 'ICN#': 32,\n // m => 16 x 16\n 'icm#': 16,\n icm4: 16,\n icm8: 16,\n // s => 16 x 16\n 'ics#': 16,\n ics4: 16,\n ics8: 16,\n is32: 16,\n s8mk: 16,\n icp4: 16,\n // l => 32 x 32\n icl4: 32,\n icl8: 32,\n il32: 32,\n l8mk: 32,\n icp5: 32,\n ic11: 32,\n // h => 48 x 48\n ich4: 48,\n ich8: 48,\n ih32: 48,\n h8mk: 48,\n // . => 64 x 64\n icp6: 64,\n ic12: 32,\n // t => 128 x 128\n it32: 128,\n t8mk: 128,\n ic07: 128,\n // . => 256 x 256\n ic08: 256,\n ic13: 256,\n // . => 512 x 512\n ic09: 512,\n ic14: 512,\n // . => 1024 x 1024\n ic10: 1024,\n};\n\nfunction readImageHeader(buffer, imageOffset) {\n var imageLengthOffset = imageOffset + ENTRY_LENGTH_OFFSET;\n // returns [type, length]\n return [\n buffer.toString('ascii', imageOffset, imageLengthOffset),\n buffer.readUInt32BE(imageLengthOffset)\n ];\n}\n\nfunction getImageSize(type) {\n var size = ICON_TYPE_SIZE[type];\n return { width: size, height: size, type: type };\n}\n\nfunction calculate (buffer) {\n var\n bufferLength = buffer.length,\n imageOffset = SIZE_HEADER,\n fileLength = buffer.readUInt32BE(FILE_LENGTH_OFFSET),\n imageHeader,\n imageSize,\n result;\n\n imageHeader = readImageHeader(buffer, imageOffset);\n imageSize = getImageSize(imageHeader[0]);\n imageOffset += imageHeader[1];\n\n if (imageOffset === fileLength) {\n return imageSize;\n }\n \n result = {\n width: imageSize.width,\n height: imageSize.height,\n images: [imageSize]\n };\n \n while (imageOffset < fileLength && imageOffset < bufferLength) {\n imageHeader = readImageHeader(buffer, imageOffset);\n imageSize = getImageSize(imageHeader[0]);\n imageOffset += imageHeader[1];\n result.images.push(imageSize);\n }\n \n return result;\n}\n\nmodule.exports = {\n 'detect': isICNS,\n 'calculate': calculate\n};\n"} +{"text": "# $NetBSD: Makefile,v 1.1 2015/05/08 11:27:32 wiz Exp $\n\nDISTNAME=\tboisik\nPKGNAME=\ttex-${DISTNAME}-0.5\nTEXLIVE_REV=\t15878\n\nMAINTAINER=\tpkgsrc-users@NetBSD.org\nHOMEPAGE=\thttp://ctan.org/pkg/boisik\nCOMMENT=\tFont inspired by Baskerville design\nLICENSE=\tgnu-gpl-v2\n\n.include \"../../print/texlive/package.mk\"\n.include \"../../mk/bsd.pkg.mk\"\n"} +{"text": "\\version \"2.16.0\"\n\n\\header {\n texidoc = \"For a one-page score, ragged-bottom should have the\nsame effect as ragged-last-bottom.\"\n}\n\n\\paper {\n ragged-bottom = ##t\n ragged-last-bottom = ##f\n}\n\n\\repeat unfold 16 c'4\n"} +{"text": "fileFormatVersion: 2\nguid: 2f1f30f6d0d46af4ea2de3cdcacc7fee\nlabels:\n- Lightning\n- MMO\n- Magic\n- ParticleSystem\n- Shuriken\nNativeFormatImporter:\n userData: \n assetBundleName: \n assetBundleVariant: \n"} +{"text": "\t.text\n.globl _objc_msgSend\n_objc_msgSend:\n\tpushl\t%ebp\n\tmovl\t%esp, %ebp\n\tsubl\t$16, %esp\n\tpushl\t12(%ebp)\n\tpushl\t8(%ebp)\n\tcall\tL_objc_msg_lookup$stub\n\tmov %ebp, %esp\n\n\tpop %ebp\n\tjmp\t*%eax\n.globl _objc_msgSendSuper\n_objc_msgSendSuper:\n\tpushl\t%ebp\n\tmovl\t%esp, %ebp\n\n pushl\t%edi\n pushl %esi\n\tsubl\t$16, %esp\n\tmovl\t8(%ebp), %edi\n\tmovl\t12(%ebp), %esi\n movl\t%esi, 4(%esp)\n\tmovl\t%edi, (%esp)\n\tcall\tL_objc_msg_lookup_super$stub\n // TODO: incomprehensible. rewrite using %eax for temp value\n movl (%edi), %esi\n\tmovl\t%esi, 8(%ebp)\n \n addl $16, %esp\n popl %esi\n popl %edi\n mov %ebp, %esp\n\tpop %ebp\n\tjmp\t*%eax\n.globl _objc_msgSend_fpret\n_objc_msgSend_fpret:\n\tpushl\t%ebp\n\tmovl\t%esp, %ebp\n\tsubl\t$16, %esp\n\tpushl\t12(%ebp)\n\tpushl\t8(%ebp)\n \n\tcall\tL_objc_msg_lookup$stub\n\tmov %ebp, %esp\n\tpop %ebp\n\n\tjmp\t*%eax\n.globl _objc_msgSend_stret\n_objc_msgSend_stret:\n pushl\t%ebp\n\tmovl\t%esp, %ebp\n movl 12(%ebp), %eax\n testl %eax, %eax\n// nil receiver, go to workaround\n je stretNilReceiver\n\n\tsubl\t$16, %esp\n\tpushl\t16(%ebp)\n\tpushl\t12(%ebp)\n\n \n\tcall\tL_objc_msg_lookup$stub\n\tmov %ebp, %esp\n\tpop %ebp\n\n\tjmp\t*%eax\n \nstretNilReceiver:\n// Modelled after what gcc outputs for a struct-return function\n pushl\t%ebx\n call abiHack\nabiHack:\n\tpopl\t%ebx\n popl\t%ebx\n leave\n ret $4\n\n.globl _objc_msgSendSuper_stret\n_objc_msgSendSuper_stret:\n\tpushl\t%ebp\n\tmovl\t%esp, %ebp\n pushl\t%edi\n pushl %esi\n\tsubl\t$32, %esp\n\tmovl\t12(%ebp), %edi\n\tmovl\t16(%ebp), %esi\n movl\t%esi, 4(%esp)\n\tmovl\t%edi, (%esp)\n call\tL_objc_msg_lookup_super$stub\n movl (%edi), %esi\n\tmovl\t%esi, 8(%ebp)\n \n addl $32, %esp\n popl %esi\n popl %edi\n mov %ebp, %esp\n\tpop %ebp\n\tjmp\t\t*%eax\n\n\t.section __IMPORT,__jump_table,symbol_stubs,self_modifying_code+pure_instructions,5\nL_objc_msg_lookup_super$stub:\n\t.indirect_symbol _objc_msg_lookup_super\n\thlt ; hlt ; hlt ; hlt ; hlt\nL_objc_msg_lookup$stub:\n\t.indirect_symbol _objc_msg_lookup\n\thlt ; hlt ; hlt ; hlt ; hlt\n\t.subsections_via_symbols\n \n"} +{"text": "#-------------------------------------------------------------------------\n#\n# src/backend/utils/mb/conversion_procs/utf8_and_euc_jp/Makefile\n#\n#-------------------------------------------------------------------------\nsubdir = src/backend/utils/mb/conversion_procs/utf8_and_euc_jp\ntop_builddir = ../../../../../..\ninclude $(top_builddir)/src/Makefile.global\n\nNAME\t\t= utf8_and_euc_jp\n\ninclude $(srcdir)/../proc.mk\n"} +{"text": "// Auto-generated file. Do not edit!\n// Template: src/f32-vbinary/vopc-scalar.c.in\n// Generator: tools/xngen\n//\n// Copyright 2019 Google LLC\n//\n// This source code is licensed under the BSD-style license found in the\n// LICENSE file in the root directory of this source tree.\n\n#include <assert.h>\n\n#include <xnnpack/common.h>\n#include <xnnpack/math.h>\n#include <xnnpack/vbinary.h>\n\n\nvoid xnn_f32_vrdivc_minmax_ukernel__wasm_x8(\n size_t n,\n const float* a,\n const float* b,\n float* y,\n const union xnn_f32_minmax_params params[restrict XNN_MIN_ELEMENTS(1)])\n{\n assert(n != 0);\n assert(n % sizeof(float) == 0);\n assert(a != NULL);\n assert(b != NULL);\n assert(y != NULL);\n\n const float vy_min = params->scalar.min;\n const float vy_max = params->scalar.max;\n\n const float vb = *b;\n for (; n >= 8 * sizeof(float); n -= 8 * sizeof(float)) {\n const float va0 = a[0];\n const float va1 = a[1];\n const float va2 = a[2];\n const float va3 = a[3];\n const float va4 = a[4];\n const float va5 = a[5];\n const float va6 = a[6];\n const float va7 = a[7];\n a += 8;\n\n float vy0 = vb / va0;\n float vy1 = vb / va1;\n float vy2 = vb / va2;\n float vy3 = vb / va3;\n float vy4 = vb / va4;\n float vy5 = vb / va5;\n float vy6 = vb / va6;\n float vy7 = vb / va7;\n\n\n vy0 = __builtin_wasm_max_f32(vy0, vy_min);\n vy1 = __builtin_wasm_max_f32(vy1, vy_min);\n vy2 = __builtin_wasm_max_f32(vy2, vy_min);\n vy3 = __builtin_wasm_max_f32(vy3, vy_min);\n vy4 = __builtin_wasm_max_f32(vy4, vy_min);\n vy5 = __builtin_wasm_max_f32(vy5, vy_min);\n vy6 = __builtin_wasm_max_f32(vy6, vy_min);\n vy7 = __builtin_wasm_max_f32(vy7, vy_min);\n\n vy0 = __builtin_wasm_min_f32(vy0, vy_max);\n vy1 = __builtin_wasm_min_f32(vy1, vy_max);\n vy2 = __builtin_wasm_min_f32(vy2, vy_max);\n vy3 = __builtin_wasm_min_f32(vy3, vy_max);\n vy4 = __builtin_wasm_min_f32(vy4, vy_max);\n vy5 = __builtin_wasm_min_f32(vy5, vy_max);\n vy6 = __builtin_wasm_min_f32(vy6, vy_max);\n vy7 = __builtin_wasm_min_f32(vy7, vy_max);\n\n y[0] = vy0;\n y[1] = vy1;\n y[2] = vy2;\n y[3] = vy3;\n y[4] = vy4;\n y[5] = vy5;\n y[6] = vy6;\n y[7] = vy7;\n y += 8;\n }\n if XNN_UNLIKELY(n != 0) {\n do {\n const float va = *a++;\n float vy = vb / va;\n vy = __builtin_wasm_max_f32(vy, vy_min);\n vy = __builtin_wasm_min_f32(vy, vy_max);\n *y++ = vy;\n n -= sizeof(float);\n } while (n != 0);\n }\n}\n"} +{"text": "# loose-envify\n\n[![Build Status](https://travis-ci.org/zertosh/loose-envify.svg?branch=master)](https://travis-ci.org/zertosh/loose-envify)\n\nFast (and loose) selective `process.env` replacer using [js-tokens](https://github.com/lydell/js-tokens) instead of an AST. Works just like [envify](https://github.com/hughsk/envify) but much faster.\n\n## Gotchas\n\n* Doesn't handle broken syntax.\n* Doesn't look inside embedded expressions in template strings.\n - **this won't work:**\n ```js\n console.log(`the current env is ${process.env.NODE_ENV}`);\n ```\n* Doesn't replace oddly-spaced or oddly-commented expressions.\n - **this won't work:**\n ```js\n console.log(process./*won't*/env./*work*/NODE_ENV);\n ```\n\n## Usage/Options\n\nloose-envify has the exact same interface as [envify](https://github.com/hughsk/envify), including the CLI.\n\n## Benchmark\n\n```\nenvify:\n\n $ for i in {1..5}; do node bench/bench.js 'envify'; done\n 708ms\n 727ms\n 791ms\n 719ms\n 720ms\n\nloose-envify:\n\n $ for i in {1..5}; do node bench/bench.js '../'; done\n 51ms\n 52ms\n 52ms\n 52ms\n 52ms\n```\n"} +{"text": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!DOCTYPE ldml SYSTEM \"../../common/dtd/ldml.dtd\">\n<ldml>\n\t<identity>\n\t\t<version number=\"$Revision: 4123 $\"/>\n\t\t<generation date=\"$Date: 2009-05-05 18:06:42 -0500 (Tue, 05 May 2009) $\"/>\n\t\t<language type=\"sr\"/>\n\t\t<script type=\"Latn\"/>\n\t\t<territory type=\"CS\"/>\n\t</identity>\n\t<alias source=\"sr_Latn_RS\" path=\"//ldml\"/>\n</ldml>\n"} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<shape xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:shape=\"rectangle\" android:padding = \"10dp\">\n <solid android:color=\"#edcc61\"/>\n\n <corners\n android:bottomRightRadius=\"5dp\"\n android:bottomLeftRadius=\"5dp\"\n android:topLeftRadius=\"5dp\"\n android:topRightRadius=\"5dp\"/>\n</shape>"} +{"text": "/*******************************************************************************\n * This file is part of OpenNMS(R).\n *\n * Copyright (C) 2019 The OpenNMS Group, Inc.\n * OpenNMS(R) is Copyright (C) 1999-2019 The OpenNMS Group, Inc.\n *\n * OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.\n *\n * OpenNMS(R) is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Affero General Public License as published\n * by the Free Software Foundation, either version 3 of the License,\n * or (at your option) any later version.\n *\n * OpenNMS(R) is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Affero General Public License for more details.\n *\n * You should have received a copy of the GNU Affero General Public License\n * along with OpenNMS(R). If not, see:\n * http://www.gnu.org/licenses/\n *\n * For more information contact:\n * OpenNMS(R) Licensing <license@opennms.org>\n * http://www.opennms.org/\n * http://www.opennms.com/\n *******************************************************************************/\n\npackage org.opennms.netmgt.syslogd;\n\nimport java.time.Instant;\nimport java.time.LocalDateTime;\nimport java.time.ZoneId;\nimport java.util.Optional;\n\nimport org.opennms.core.time.YearGuesser;\n\n\npublic class SyslogYearCompleter {\n\n /**\n * Adds the year (best guess) to a given syslog message if no year is present in the syslog message\n */\n public static void complete(SyslogMessage syslog) {\n complete(syslog, Instant.now());\n }\n\n /**\n * Adds the year (best guess) to a given syslog message if no year is present in the syslog message\n * Assumptions:\n * - syslog.getYear() == null, if not nothing to guess -> we won't do anything.\n */\n public static void complete(SyslogMessage syslog, Instant referenceTime) {\n if(syslog.getYear() != null) {\n return; // nothing to do, year is set already\n }\n\n // get a localized version of the referenceTime\n ZoneId zoneId = Optional.ofNullable(syslog.getZoneId()).orElse(ZoneId.systemDefault());\n LocalDateTime localReferenceTime = LocalDateTime.ofInstant(referenceTime, zoneId);\n\n // get LocalDateTime from Syslog\n LocalDateTime syslogDateTime = LocalDateTime.of(\n 0, toValueOr1(syslog.getMonth()), toValueOr1(syslog.getDayOfMonth()),\n toValueOr0(syslog.getHourOfDay()), toValueOr0(syslog.getMinute()),\n toValueOr0(syslog.getSecond()), toValueOr0(syslog.getMillisecond()));\n int year = YearGuesser.guessYearForDate(syslogDateTime, localReferenceTime).getYear();\n syslog.setYear(year);\n }\n\n private static Integer toValueOr0(Integer integer) {\n return Optional.ofNullable(integer).orElse(0);\n }\n private static Integer toValueOr1(Integer integer) {\n return Optional.ofNullable(integer).orElse(1);\n }\n\n}\n"} +{"text": "/*:\n > # IMPORTANT: To use `ReactiveCocoa.playground`, please:\n \n 1. Retrieve the project dependencies using one of the following terminal commands from the ReactiveCocoa project root directory:\n - `script/bootstrap`\n **OR**, if you have [Carthage](https://github.com/Carthage/Carthage) installed\n - `carthage checkout`\n 1. Open `ReactiveCocoa.xcworkspace`\n 1. Build `Result-Mac` scheme \n 1. Build `ReactiveCocoa-Mac` scheme\n 1. Finally open the `ReactiveCocoa.playground`\n 1. Choose `View > Show Debug Area`\n */\n\nimport Result\nimport ReactiveCocoa\nimport Foundation\n\n/*:\n ## Signal\n \n A **signal**, represented by the [`Signal`](https://github.com/ReactiveCocoa/ReactiveCocoa/blob/master/ReactiveCocoa/Swift/Signal.swift) type, is any series of [`Event`](https://github.com/ReactiveCocoa/ReactiveCocoa/blob/master/ReactiveCocoa/Swift/Event.swift) values\n over time that can be observed.\n \n Signals are generally used to represent event streams that are already “in progress”,\n like notifications, user input, etc. As work is performed or data is received,\n events are _sent_ on the signal, which pushes them out to any observers.\n All observers see the events at the same time.\n \n Users must observe a signal in order to access its events.\n Observing a signal does not trigger any side effects. In other words,\n signals are entirely producer-driven and push-based, and consumers (observers)\n cannot have any effect on their lifetime. While observing a signal, the user\n can only evaluate the events in the same order as they are sent on the signal. There\n is no random access to values of a signal.\n \n Signals can be manipulated by applying [primitives](https://github.com/ReactiveCocoa/ReactiveCocoa/blob/master/Documentation/BasicOperators.md) to them.\n Typical primitives to manipulate a single signal like `filter`, `map` and\n `reduce` are available, as well as primitives to manipulate multiple signals\n at once (`zip`). Primitives operate only on the `Next` events of a signal.\n \n The lifetime of a signal consists of any number of `Next` events, followed by\n one terminating event, which may be any one of `Failed`, `Completed`, or\n `Interrupted` (but not a combination).\n Terminating events are not included in the signal’s values—they must be\n handled specially.\n */\n\n/*:\n ### `Subscription`\n A Signal represents and event stream that is already \"in progress\", sometimes also called \"hot\". This means, that a subscriber may miss events that have been sent before the subscription.\n Furthermore, the subscription to a signal does not trigger any side effects\n */\nscopedExample(\"Subscription\") {\n // Signal.pipe is a way to manually control a signal. the returned observer can be used to send values to the signal\n let (signal, observer) = Signal<Int, NoError>.pipe()\n \n let subscriber1 = Observer<Int, NoError>(next: { print(\"Subscriber 1 received \\($0)\") } )\n let subscriber2 = Observer<Int, NoError>(next: { print(\"Subscriber 2 received \\($0)\") } )\n \n print(\"Subscriber 1 subscribes to the signal\")\n signal.observe(subscriber1)\n \n print(\"Send value `10` on the signal\")\n // subscriber1 will receive the value\n observer.sendNext(10)\n \n print(\"Subscriber 2 subscribes to the signal\")\n // Notice how nothing happens at this moment, i.e. subscriber2 does not receive the previously sent value\n signal.observe(subscriber2)\n \n print(\"Send value `20` on the signal\")\n // Notice that now, subscriber1 and subscriber2 will receive the value\n observer.sendNext(20)\n}\n\n/*:\n ### `empty`\n A Signal that completes immediately without emitting any value.\n */\nscopedExample(\"`empty`\") {\n let emptySignal = Signal<Int, NoError>.empty\n \n let observer = Observer<Int, NoError>(\n failed: { _ in print(\"error not called\") },\n completed: { print(\"completed not called\") },\n interrupted: { print(\"interrupted called\") },\n next: { _ in print(\"next not called\") }\n )\n \n emptySignal.observe(observer)\n}\n\n/*:\n ### `never`\n A Signal that never sends any events to its observers.\n */\nscopedExample(\"`never`\") {\n let neverSignal = Signal<Int, NoError>.never\n \n let observer = Observer<Int, NoError>(\n failed: { _ in print(\"error not called\") },\n completed: { print(\"completed not called\") },\n interrupted: { print(\"interrupted not called\") },\n next: { _ in print(\"next not called\") }\n )\n \n neverSignal.observe(observer)\n}\n\n/*:\n ## `Operators`\n ### `uniqueValues`\n Forwards only those values from `self` that are unique across the set of\n all values that have been seen.\n \n Note: This causes the values to be retained to check for uniqueness. Providing\n a function that returns a unique value for each sent value can help you reduce\n the memory footprint.\n */\nscopedExample(\"`uniqueValues`\") {\n let (signal, observer) = Signal<Int, NoError>.pipe()\n let subscriber = Observer<Int, NoError>(next: { print(\"Subscriber received \\($0)\") } )\n let uniqueSignal = signal.uniqueValues()\n\n uniqueSignal.observe(subscriber)\n observer.sendNext(1)\n observer.sendNext(2)\n observer.sendNext(3)\n observer.sendNext(4)\n observer.sendNext(3)\n observer.sendNext(3)\n observer.sendNext(5)\n}\n\n/*:\n ### `map`\n Maps each value in the signal to a new value.\n */\nscopedExample(\"`map`\") {\n let (signal, observer) = Signal<Int, NoError>.pipe()\n let subscriber = Observer<Int, NoError>(next: { print(\"Subscriber received \\($0)\") } )\n let mappedSignal = signal.map { $0 * 2 }\n\n mappedSignal.observe(subscriber)\n print(\"Send value `10` on the signal\")\n observer.sendNext(10)\n}\n\n/*:\n ### `mapError`\n Maps errors in the signal to a new error.\n */\nscopedExample(\"`mapError`\") { \n let (signal, observer) = Signal<Int, NSError>.pipe()\n let subscriber = Observer<Int, NSError>(failed: { print(\"Subscriber received error: \\($0)\") } )\n let mappedErrorSignal = signal.mapError { (error:NSError) -> NSError in\n let userInfo = [NSLocalizedDescriptionKey: \"🔥\"]\n let code = error.code + 10000\n let mappedError = NSError(domain: \"com.reactivecocoa.errordomain\", code: code, userInfo: userInfo)\n return mappedError\n }\n\n mappedErrorSignal.observe(subscriber)\n print(\"Send error `NSError(domain: \\\"com.reactivecocoa.errordomain\\\", code: 4815, userInfo: nil)` on the signal\")\n observer.sendFailed(NSError(domain: \"com.reactivecocoa.errordomain\", code: 4815, userInfo: nil))\n}\n\n/*:\n ### `filter`\n Preserves only the values of the signal that pass the given predicate.\n */\nscopedExample(\"`filter`\") {\n let (signal, observer) = Signal<Int, NoError>.pipe()\n let subscriber = Observer<Int, NoError>(next: { print(\"Subscriber received \\($0)\") } )\n // subscriber will only receive events with values greater than 12\n let filteredSignal = signal.filter { $0 > 12 ? true : false }\n\n filteredSignal.observe(subscriber)\n observer.sendNext(10)\n observer.sendNext(11)\n observer.sendNext(12)\n observer.sendNext(13)\n observer.sendNext(14)\n}\n\n/*:\n ### `ignoreNil`\n Unwraps non-`nil` values and forwards them on the returned signal, `nil`\n values are dropped.\n */\nscopedExample(\"`ignoreNil`\") {\n let (signal, observer) = Signal<Int?, NoError>.pipe()\n // note that the signal is of type `Int?` and observer is of type `Int`, given we're unwrapping\n // non-`nil` values\n let subscriber = Observer<Int, NoError>(next: { print(\"Subscriber received \\($0)\") } )\n let ignoreNilSignal = signal.ignoreNil()\n\n ignoreNilSignal.observe(subscriber)\n observer.sendNext(1)\n observer.sendNext(nil)\n observer.sendNext(3)\n}\n\n/*:\n ### `take`\n Returns a signal that will yield the first `count` values from `self`\n */\nscopedExample(\"`take`\") {\n let (signal, observer) = Signal<Int, NoError>.pipe()\n let subscriber = Observer<Int, NoError>(next: { print(\"Subscriber received \\($0)\") } )\n let takeSignal = signal.take(2)\n\n takeSignal.observe(subscriber)\n observer.sendNext(1)\n observer.sendNext(2)\n observer.sendNext(3)\n observer.sendNext(4)\n}\n\n/*:\n ### `collect`\n Returns a signal that will yield an array of values when `self` completes.\n - Note: When `self` completes without collecting any value, it will send\n an empty array of values.\n */\nscopedExample(\"`collect`\") {\n let (signal, observer) = Signal<Int, NoError>.pipe()\n // note that the signal is of type `Int` and observer is of type `[Int]` given we're \"collecting\"\n // `Int` values for the lifetime of the signal\n let subscriber = Observer<[Int], NoError>(next: { print(\"Subscriber received \\($0)\") } )\n let collectSignal = signal.collect()\n\n collectSignal.observe(subscriber)\n observer.sendNext(1)\n observer.sendNext(2)\n observer.sendNext(3)\n observer.sendNext(4)\n observer.sendCompleted()\n}\n\n"} +{"text": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"d_yun.png\",\n \"scale\" : \"1x\"\n },\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"d_yun@2x.png\",\n \"scale\" : \"2x\"\n },\n {\n \"idiom\" : \"universal\",\n \"scale\" : \"3x\"\n }\n ],\n \"info\" : {\n \"version\" : 1,\n \"author\" : \"xcode\"\n }\n}"} +{"text": "{\n \"compileOnSave\": false,\n \"buildOnSave\": false,\n \"compilerOptions\": {\n \"baseUrl\": \".\",\n \"outDir\": \"build\",\n \"module\": \"esnext\",\n \"target\": \"es6\",\n \"jsx\": \"react\",\n \"moduleResolution\": \"node\",\n \"allowSyntheticDefaultImports\": true,\n \"lib\": [\"es6\", \"dom\"],\n \"sourceMap\": true,\n \"allowJs\": true,\n \"rootDir\": \"src\",\n \"forceConsistentCasingInFileNames\": true,\n \"noImplicitReturns\": true,\n \"noImplicitThis\": true,\n \"noImplicitAny\": false,\n \"importHelpers\": true,\n \"strictNullChecks\": true,\n \"suppressImplicitAnyIndexErrors\": true,\n \"noUnusedLocals\": true,\n \"skipLibCheck\": true\n },\n \"include\": [\"src/*\"],\n \"exclude\": [\"node_modules\", \"build\", \"public\"]\n}\n"} +{"text": "import Vue from 'vue'\n\nexport default function mount(componentOptions, propsData) {\n const Ctor = Vue.extend(componentOptions)\n const vm = new Ctor({ propsData })\n return vm.$mount()\n}\n"} +{"text": "/*\n * This file is part of muCommander, http://www.mucommander.com\n * Copyright (C) 2002-2012 Maxence Bernard\n *\n * muCommander is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 3 of the License, or\n * (at your option) any later version.\n *\n * muCommander is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\n\npackage com.mucommander.ui.helper;\n\nimport java.awt.event.ActionListener;\nimport java.awt.event.KeyEvent;\n\nimport javax.swing.*;\nimport javax.swing.event.MenuListener;\n\nimport com.mucommander.ui.action.MuAction;\nimport com.mucommander.ui.menu.JScrollMenu;\nimport ru.trolsoft.ui.TCheckBoxMenuItem;\nimport ru.trolsoft.ui.TRadioButtonMenuItem;\n\n\n\n/**\n * MenuToolkit provides convenient methods that make life easier\n * when creating menus.\n *\n * @author Maxence Bernard\n */\npublic class MenuToolkit {\n\n private static final int TYPE_ITEM = 0;\n private static final int TYPE_CHECKBOX = 1;\n private static final int TYPE_RADIOBUTTON = 2;\n\n\n private MenuToolkit() {\n\n }\n\n /**\n * Creates and returns a new JMenu.\n *\n * @param title title of the menu\n * @param mnemonicHelper an optional (can be null) mnemonic helper which will be used along with\n * the title to set a mnemonic to the menu.\n * @param menuListener an optional (can be null) menu listener which will listen to the events triggered by the menu.\n */\n public static JMenu addMenu(String title, MnemonicHelper mnemonicHelper, MenuListener menuListener) {\n JMenu menu = new JMenu(title);\n initMenu(menu, title, mnemonicHelper, menuListener);\n return menu;\n }\n\n /**\n * Creates and returns a new JScrollMenu.\n *\n * @param title title of the menu\n * @param mnemonicHelper an optional (can be null) mnemonic helper which will be used along with\n * the title to set a mnemonic to the menu.\n * @param menuListener an optional (can be null) menu listener which will listen to the events triggered by the menu.\n */\n public static JScrollMenu addScrollableMenu(String title, MnemonicHelper mnemonicHelper, MenuListener menuListener) {\n final JScrollMenu menu = new JScrollMenu(title);\n initMenu(menu, title, mnemonicHelper, menuListener);\n return menu;\n }\n\n private static void initMenu(JMenu menu, String title, MnemonicHelper mnemonicHelper, MenuListener menuListener) {\n setupMnemonic(title, mnemonicHelper, menu);\n if (menuListener != null) {\n menu.addMenuListener(menuListener);\n }\n }\n\n /**\n * Creates a new JMenuItem and adds it to the given JMenu.\n *\n * @param menu menu to add the menu item to.\n * @param text text used by the menu item.\n * @param mnemonicHelper an optional (can be null) mnemonic helper which will be used along with\n * the item's text to set a mnemonic to the menu.\n * @param accelerator an optional (can be null) keyboard shortcut used by the menu item.\n * @param actionListener an optional (can be null) action listener which will listen to the events triggered by the menu item.\n */\n public static JMenuItem addMenuItem(JMenu menu, String text, MnemonicHelper mnemonicHelper, KeyStroke accelerator, ActionListener actionListener) {\n return addMenuItem(menu, text, mnemonicHelper, accelerator, actionListener, TYPE_ITEM);\n }\n\n /**\n * Creates a new JCheckBoxMenuItem initially unselected and adds it to the given JMenu.\n *\n * @param menu menu to add the menu item to.\n * @param text text used by the menu item.\n * @param mnemonicHelper an optional (can be null) mnemonic helper which will be used along with\n * the item's text to set a mnemonic to the menu.\n * @param accelerator an optional (can be null) keyboard shortcut used by the menu item.\n * @param actionListener an optional (can be null) action listener which will listen to the events triggered by the menu item.\n */\n public static JCheckBoxMenuItem addCheckBoxMenuItem(JMenu menu, String text, MnemonicHelper mnemonicHelper, KeyStroke accelerator, ActionListener actionListener) {\n return (JCheckBoxMenuItem) addMenuItem(menu, text, mnemonicHelper, accelerator, actionListener, TYPE_CHECKBOX);\n }\n\n /**\n * Creates a new JRadioButtonMenuItem initially unselected and adds it to the given JMenu.\n *\n * @param menu menu to add the menu item to.\n * @param text text used by the menu item.\n * @param mnemonicHelper an optional (can be null) mnemonic helper which will be used along with\n * the item's text to set a mnemonic to the menu.\n * @param accelerator an optional (can be null) keyboard shortcut used by the menu item.\n * @param actionListener an optional (can be null) action listener which will listen to the events triggered by the menu item.\n */\n public static JRadioButtonMenuItem addRadioButtonMenuItem(JMenu menu, String text, MnemonicHelper mnemonicHelper,\n KeyStroke accelerator, ActionListener actionListener, ButtonGroup group) {\n JRadioButtonMenuItem item = (JRadioButtonMenuItem) addMenuItem(menu, text, mnemonicHelper, accelerator, actionListener,\n TYPE_RADIOBUTTON);\n if (group != null) {\n group.add(item);\n }\n return item;\n }\n\n\n /**\n * Creates a new JMenuItem or JCheckBoxMenuItem and adds it to the given JMenu.\n *\n * @param menu menu to add the menu item to.\n * @param text text used by the menu item.\n * @param mnemonicHelper an optional (can be null) mnemonic helper which will be used along with\n * the item's text to set a mnemonic to the menu.\n * @param accelerator an optional (can be null) keyboard shortcut used by the menu item.\n * @param actionListener an optional (can be null) action listener which will listen to the events triggered by the menu item.\n * @param menuType specifies whether the menu item to be created is a JCheckBoxMenuItem, JRadioButtonMenuItem or just a regular JMenuItem.\n */\n private static JMenuItem addMenuItem(JMenu menu, String text, MnemonicHelper mnemonicHelper, KeyStroke accelerator, ActionListener actionListener, int menuType) {\n final JMenuItem menuItem = construct(menuType, text);\n setupMnemonic(text, mnemonicHelper, menuItem);\n\n if (accelerator != null) {\n menuItem.setAccelerator(accelerator);\n }\n\n if (actionListener != null) {\n menuItem.addActionListener(actionListener);\n }\n\n menu.add(menuItem);\n\n return menuItem;\n }\n\n private static void setupMnemonic(String text, MnemonicHelper mnemonicHelper, JMenuItem menuItem) {\n if (mnemonicHelper != null) {\n char mnemonic = mnemonicHelper.getMnemonic(text);\n if (mnemonic != 0) {\n menuItem.setMnemonic(mnemonic);\n }\n }\n }\n\n /**\n * Does things that should be done to all menu items created from\n * <code>MuAction</code>s.\n * <ol>\n * <li>If the provided action has an icon, it would by default get displayed in the menu item.\n * Since icons have nothing to do in menus, let's make sure the menu item has no icon.</li>\n * <li>If the action has a keyboard shortcut that conflicts with the menu's internal ones\n * (enter, space and escape), they will not be used.</li>\n * </ol>\n *\n * @param item menu item to take care of.\n */\n public static void configureActionMenuItem(JMenuItem item) {\n item.setIcon(null);\n\n if (isInvalidAccelerator(item.getAccelerator())) {\n item.setAccelerator(null);\n }\n }\n\n private static boolean isInvalidAccelerator(KeyStroke stroke) {\n return stroke != null && stroke.getModifiers() == 0 &&\n (stroke.getKeyCode() == KeyEvent.VK_ENTER || stroke.getKeyCode() == KeyEvent.VK_SPACE || stroke.getKeyCode() == KeyEvent.VK_ESCAPE);\n }\n\n public static JMenuItem addMenuItem(JMenu menu, MuAction action, MnemonicHelper mnemonicHelper) {\n return addMenuItem(menu, action, mnemonicHelper, TYPE_ITEM);\n }\n\n public static JCheckBoxMenuItem addCheckBoxMenuItem(JMenu menu, MuAction action, MnemonicHelper mnemonicHelper) {\n return (JCheckBoxMenuItem) addMenuItem(menu, action, mnemonicHelper, TYPE_CHECKBOX);\n }\n\n public static JRadioButtonMenuItem addRadioButtonMenuItem(JMenu menu, MuAction action, MnemonicHelper mnemonicHelper) {\n return (JRadioButtonMenuItem) addMenuItem(menu, action, mnemonicHelper, TYPE_RADIOBUTTON);\n }\n\n private static JMenuItem addMenuItem(JMenu menu, MuAction action, MnemonicHelper mnemonicHelper, int menuType) {\n final JMenuItem menuItem = construct(menuType, action);\n\n\n if (mnemonicHelper != null && action != null) {\n char mnemonic = mnemonicHelper.getMnemonic(action.getLabel());\n if (mnemonic != 0) {\n menuItem.setMnemonic(mnemonic);\n }\n }\n\n // If the provided action has an icon, it would by default get displayed in the menu item.\n // Since icons have nothing to do in menus, let's make sure the menu item has no icon.\n menuItem.setIcon(null);\n\n menu.add(menuItem);\n\n return menuItem;\n }\n\n private static JMenuItem construct(int type, String text) {\n switch (type) {\n case TYPE_CHECKBOX:\n return new TCheckBoxMenuItem(text);\n case TYPE_RADIOBUTTON:\n return new TRadioButtonMenuItem(text);\n default:\n return new JMenuItem(text);\n }\n }\n\n private static JMenuItem construct(int type, Action action) {\n switch (type) {\n case TYPE_CHECKBOX:\n return new TCheckBoxMenuItem(action);\n case TYPE_RADIOBUTTON:\n return new TRadioButtonMenuItem(action);\n default:\n return new JMenuItem(action);\n }\n }\n\n}"} +{"text": "package main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/shijuvar/go-recipes/ch01/strutils\"\n)\n\nfunc main() {\n\tstr1, str2 := \"Golang\", \"gopher\"\n\t// Convert to upper case\n\tfmt.Println(\"To Upper Case:\", strutils.ToUpperCase(str1))\n\n\t// Convert to lower case\n\tfmt.Println(\"To Lower Case:\", strutils.ToLowerCase(str1))\n\n\t// Convert first letter to upper case\n\tfmt.Println(\"To First Upper:\", strutils.ToFirstUpper(str2))\n}\n"} +{"text": "<UserControl x:Class=\"Captura.PositionSettingsControl\"\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\n xmlns:xctk=\"http://schemas.xceed.com/wpf/xaml/toolkit\"\n xmlns:d=\"http://schemas.microsoft.com/expression/blend/2008\"\n xmlns:mc=\"http://schemas.openxmlformats.org/markup-compatibility/2006\"\n xmlns:viewModels=\"clr-namespace:Captura.ViewModels;assembly=Captura.ViewCore\"\n xmlns:video=\"clr-namespace:Captura.Video;assembly=Captura.Base\"\n mc:Ignorable=\"d\"\n d:DataContext=\"{d:DesignInstance video:PositionedOverlaySettings}\">\n <StackPanel>\n <Grid>\n <Grid.RowDefinitions>\n <RowDefinition/>\n <RowDefinition/>\n </Grid.RowDefinitions>\n <Grid.ColumnDefinitions>\n <ColumnDefinition Width=\"Auto\"/>\n <ColumnDefinition Width=\"*\"/>\n <ColumnDefinition Width=\"*\"/>\n </Grid.ColumnDefinitions>\n\n <Label Content=\"X: \"\n Margin=\"0,3\"/>\n <ComboBox ItemsSource=\"{x:Static viewModels:MainViewModel.XAlignments}\"\n SelectedValue=\"{Binding HorizontalAlignment, Mode=TwoWay}\"\n SelectedValuePath=\"Source\"\n DisplayMemberPath=\"Display\"\n Grid.Column=\"1\"\n Margin=\"3\"/>\n <xctk:IntegerUpDown Value=\"{Binding X, Mode=TwoWay}\"\n Grid.Column=\"2\"\n Margin=\"0,3\"/>\n\n <Label Content=\"Y: \"\n Grid.Row=\"1\"\n Margin=\"0,3\"/>\n <ComboBox ItemsSource=\"{x:Static viewModels:MainViewModel.YAlignments}\"\n SelectedValue=\"{Binding VerticalAlignment, Mode=TwoWay}\"\n SelectedValuePath=\"Source\"\n DisplayMemberPath=\"Display\"\n Grid.Column=\"1\"\n Grid.Row=\"1\"\n Margin=\"3\"/>\n <xctk:IntegerUpDown Value=\"{Binding Y, Mode=TwoWay}\"\n Grid.Column=\"2\"\n Grid.Row=\"1\"\n Margin=\"0,3\"/>\n </Grid>\n </StackPanel>\n</UserControl>\n"} +{"text": "---\ntitle: Setting Items for Follow-up\nms.prod: outlook\nms.assetid: 738e2558-2957-54fb-898d-b67a6462dc66\nms.date: 06/08/2017\n---\n\n\n# Setting Items for Follow-up\n\nMicrosoft Outlook provides a new task flagging system in which certain Outlook items such as mail items or contact items can be flagged for follow-up. Flagging an Outlook item for follow-up displays information about that Outlook item, along with other task-based information, on the **To-Do Bar** and **Calendar** navigation module in the Outlook user interface.\n\nThe following Outlook item objects have been extended to support the task flagging system:\n\n- **[ContactItem](contactitem-object-outlook.md)**\n \n- **[DistListItem](distlistitem-object-outlook.md)**\n \n- **[MailItem](mailitem-object-outlook.md)**\n \n- **[PostItem](postitem-object-outlook.md)**\n \n- **[SharingItem](sharingitem-object-outlook.md)**\n \n\n## Marking an Item as a Task\n\nYou can determine if an Outlook item object is marked for follow-up by checking the value of the **[IsMarkedAsTask](mailitem-ismarkedastask-property-outlook.md)** property for an Outlook item. Use the **[MarkAsTask](mailitem-markastask-method-outlook.md)** method to mark an Outlook item for follow-up and the **[ClearTaskFlag](mailitem-cleartaskflag-method-outlook.md)** method to unmark the Outlook item.\n\n\n## Setting Task Properties\n\nWhen an Outlook item is marked for follow-up using the **MarkAsTask** method, an OlMarkInterval constant is used to specify default settings for the **[TaskStartDate](mailitem-taskstartdate-property-outlook.md)**, **[TaskDueDate](mailitem-taskduedate-property-outlook.md)**, **[TaskCompletedDate](mailitem-taskcompleteddate-property-outlook.md)**, and **[ToDoTaskOrdinal](mailitem-todotaskordinal-property-outlook.md)** properties of the Outlook item. These properties are used not only to determine the duration and completion state of the task associated with the Outlook item, but also to determine the order in which the Outlook item is displayed in the **To-Do Bar** and **Calendar** navigation module.\n\nHowever, you can programmatically set these properties individually, after calling the **MarkAsTask** method, to support custom durations, or to change the completion state or display order of the Outlook item.\n\nOnce an Outlook item is flagged for follow-up, you can also set the **[TaskSubject](mailitem-tasksubject-property-outlook.md)** property of the Outlook item to display a task description other than the value of the **Subject** property for the flagged Outlook item.\n\n\n## Task Items and Task Flagging\n\nThe **[TaskItem](taskitem-object-outlook.md)** object supports the **[ToDoTaskOrdinal](taskitem-todotaskordinal-property-outlook.md)** property, so that the display order for Outlook task items displayed on the **To-Do Bar** can also be changed programmatically.\n\n\n## Filtering Items Marked as Tasks\n\nYou can take advantage of the DAV Searching and Locating (DASL) filtering capabilities of Outlook to filter Outlook items marked for follow-up. The following Visual Basic for Applications (VBA) example defines a DASL filter that filters only those Outlook items with an **IsMarkedAsTask** property value set to **True**, then uses the filter to build a **[Table](table-object-outlook.md)** object containing filtered Outlook items retrieved from the Inbox default folder.\n\n\n```vb\nPrivate Sub TableForIsMarkedAsTask() \n Dim objTable As Outlook.Table \n Dim objRow As Outlook.Row \n Dim strFilter As String \n \n On Error GoTo ErrRoutine \n \n ' Define a DASL filter string that filters only those items \n ' with an IsMarkedAsTask property value set to True. \n strFilter = \"@SQL=\" &; Chr(34) &; _ \n \"http://schemas.microsoft.com/mapi/proptag/0x0E2B0003\" &; _ \n Chr(34) &; \" = 1\" \n \n ' Use the filter to construct a table of Outlook items \n ' retrieved from the Inbox default folder. \n Set objTable = Application.Session.GetDefaultFolder(olFolderInbox).GetTable(strFilter) \n \n With objTable \n ' Add task-related columns to the table. \n .Columns.Add (\"From\") \n .Columns.Add (\"FlagRequest\") \n .Columns.Add (\"TaskStartDate\") \n .Columns.Add (\"TaskDueDate\") \n .Columns.Add (\"TaskCompletedDate\") \n \n ' Report the contents of the table \n ' to the Immediate window. \n Do Until .EndOfTable \n Set objRow = .GetNextRow \n Debug.Print objRow(\"Subject\"), _ \n objRow(\"From\"), _ \n objRow(\"FlagRequest\"), _ \n objRow(\"TaskStartDate\"), _ \n objRow(\"TaskDueDate\"), _ \n objRow(\"TaskCompletedDate\") \n Loop \n End With \n \nEndRoutine: \n ' Clean up \n Set objRow = Nothing \n Set objTable = Nothing \n \n Exit Sub \n \nErrRoutine: \n MsgBox Err.Number &; \" - \" &; Err.Description, _ \n vbOKOnly Or vbCritical, _ \n \"TableForIsMarkedAsTask\" \n \n GoTo EndRoutine \nEnd Sub\n```\n\n\n"} +{"text": "/*\n * Copyright (C) 2011 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.android.dex;\n\nimport static com.android.dex.EncodedValueReader.ENCODED_ANNOTATION;\n\n/**\n * An annotation.\n */\npublic final class Annotation implements Comparable<Annotation> {\n private final Dex dex;\n private final byte visibility;\n private final EncodedValue encodedAnnotation;\n\n public Annotation(Dex dex, byte visibility, EncodedValue encodedAnnotation) {\n this.dex = dex;\n this.visibility = visibility;\n this.encodedAnnotation = encodedAnnotation;\n }\n\n public byte getVisibility() {\n return visibility;\n }\n\n public EncodedValueReader getReader() {\n return new EncodedValueReader(encodedAnnotation, ENCODED_ANNOTATION);\n }\n\n public int getTypeIndex() {\n EncodedValueReader reader = getReader();\n reader.readAnnotation();\n return reader.getAnnotationType();\n }\n\n public void writeTo(Dex.Section out) {\n out.writeByte(visibility);\n encodedAnnotation.writeTo(out);\n }\n\n @Override public int compareTo(Annotation other) {\n return encodedAnnotation.compareTo(other.encodedAnnotation);\n }\n\n @Override public String toString() {\n return dex == null\n ? visibility + \" \" + getTypeIndex()\n : visibility + \" \" + dex.typeNames().get(getTypeIndex());\n }\n}\n"} +{"text": "/-\nCopyright (c) 2020 Joseph Myers. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthor: Joseph Myers.\n-/\nimport data.finset.sort\nimport data.matrix.notation\nimport linear_algebra.affine_space.combination\nimport linear_algebra.basis\n\nnoncomputable theory\nopen_locale big_operators\nopen_locale classical\n\n/-!\n# Affine independence\n\nThis file defines affinely independent families of points.\n\n## Main definitions\n\n* `affine_independent` defines affinely independent families of points\n as those where no nontrivial weighted subtraction is 0. This is\n proved equivalent to two other formulations: linear independence of\n the results of subtracting a base point in the family from the other\n points in the family, or any equal affine combinations having the\n same weights. A bundled type `simplex` is provided for finite\n affinely independent families of points, with an abbreviation\n `triangle` for the case of three points.\n\n## References\n\n* https://en.wikipedia.org/wiki/Affine_space\n\n-/\n\nsection affine_independent\n\n\nvariables (k : Type*) {V : Type*} {P : Type*} [ring k] [add_comm_group V] [module k V]\nvariables [affine_space V P] {ι : Type*}\ninclude V\n\n/-- An indexed family is said to be affinely independent if no\nnontrivial weighted subtractions (where the sum of weights is 0) are\n0. -/\ndef affine_independent (p : ι → P) : Prop :=\n∀ (s : finset ι) (w : ι → k), ∑ i in s, w i = 0 → s.weighted_vsub p w = (0:V) → ∀ i ∈ s, w i = 0\n\n/-- The definition of `affine_independent`. -/\nlemma affine_independent_def (p : ι → P) :\n affine_independent k p ↔\n ∀ (s : finset ι) (w : ι → k),\n ∑ i in s, w i = 0 → s.weighted_vsub p w = (0 : V) → ∀ i ∈ s, w i = 0 :=\niff.rfl\n\n/-- A family with at most one point is affinely independent. -/\nlemma affine_independent_of_subsingleton [subsingleton ι] (p : ι → P) :\n affine_independent k p :=\nλ s w h hs i hi, fintype.eq_of_subsingleton_of_sum_eq h i hi\n\n/-- A family indexed by a `fintype` is affinely independent if and\nonly if no nontrivial weighted subtractions over `finset.univ` (where\nthe sum of the weights is 0) are 0. -/\nlemma affine_independent_iff_of_fintype [fintype ι] (p : ι → P) :\n affine_independent k p ↔\n ∀ w : ι → k, ∑ i, w i = 0 → finset.univ.weighted_vsub p w = (0 : V) → ∀ i, w i = 0 :=\nbegin\n split,\n { exact λ h w hw hs i, h finset.univ w hw hs i (finset.mem_univ _) },\n { intros h s w hw hs i hi,\n rw finset.weighted_vsub_indicator_subset _ _ (finset.subset_univ s) at hs,\n rw set.sum_indicator_subset _ (finset.subset_univ s) at hw,\n replace h := h ((↑s : set ι).indicator w) hw hs i,\n simpa [hi] using h }\nend\n\n/-- A family is affinely independent if and only if the differences\nfrom a base point in that family are linearly independent. -/\nlemma affine_independent_iff_linear_independent_vsub (p : ι → P) (i1 : ι) :\n affine_independent k p ↔ linear_independent k (λ i : {x // x ≠ i1}, (p i -ᵥ p i1 : V)) :=\nbegin\n split,\n { intro h,\n rw linear_independent_iff',\n intros s g hg i hi,\n set f : ι → k := λ x, if hx : x = i1 then -∑ y in s, g y else g ⟨x, hx⟩ with hfdef,\n let s2 : finset ι := insert i1 (s.map (function.embedding.subtype _)),\n have hfg : ∀ x : {x // x ≠ i1}, g x = f x,\n { intro x,\n rw hfdef,\n dsimp only [],\n erw [dif_neg x.property, subtype.coe_eta] },\n rw hfg,\n have hf : ∑ ι in s2, f ι = 0,\n { rw [finset.sum_insert (finset.not_mem_map_subtype_of_not_property s (not_not.2 rfl)),\n finset.sum_subtype_map_embedding (λ x hx, (hfg x).symm)],\n rw hfdef,\n dsimp only [],\n rw dif_pos rfl,\n exact neg_add_self _ },\n have hs2 : s2.weighted_vsub p f = (0:V),\n { set f2 : ι → V := λ x, f x • (p x -ᵥ p i1) with hf2def,\n set g2 : {x // x ≠ i1} → V := λ x, g x • (p x -ᵥ p i1) with hg2def,\n have hf2g2 : ∀ x : {x // x ≠ i1}, f2 x = g2 x,\n { simp_rw [hf2def, hg2def, hfg],\n exact λ x, rfl },\n rw [finset.weighted_vsub_eq_weighted_vsub_of_point_of_sum_eq_zero s2 f p hf (p i1),\n finset.weighted_vsub_of_point_insert, finset.weighted_vsub_of_point_apply,\n finset.sum_subtype_map_embedding (λ x hx, hf2g2 x)],\n exact hg },\n exact h s2 f hf hs2 i (finset.mem_insert_of_mem (finset.mem_map.2 ⟨i, hi, rfl⟩)) },\n { intro h,\n rw linear_independent_iff' at h,\n intros s w hw hs i hi,\n rw [finset.weighted_vsub_eq_weighted_vsub_of_point_of_sum_eq_zero s w p hw (p i1),\n ←s.weighted_vsub_of_point_erase w p i1, finset.weighted_vsub_of_point_apply] at hs,\n let f : ι → V := λ i, w i • (p i -ᵥ p i1),\n have hs2 : ∑ i in (s.erase i1).subtype (λ i, i ≠ i1), f i = 0,\n { rw [←hs],\n convert finset.sum_subtype_of_mem f (λ x, finset.ne_of_mem_erase) },\n have h2 := h ((s.erase i1).subtype (λ i, i ≠ i1)) (λ x, w x) hs2,\n simp_rw [finset.mem_subtype] at h2,\n have h2b : ∀ i ∈ s, i ≠ i1 → w i = 0 :=\n λ i his hi, h2 ⟨i, hi⟩ (finset.mem_erase_of_ne_of_mem hi his),\n exact finset.eq_zero_of_sum_eq_zero hw h2b i hi }\nend\n\n/-- A set is affinely independent if and only if the differences from\na base point in that set are linearly independent. -/\nlemma affine_independent_set_iff_linear_independent_vsub {s : set P} {p₁ : P} (hp₁ : p₁ ∈ s) :\n affine_independent k (λ p, p : s → P) ↔\n linear_independent k (λ v, v : (λ p, (p -ᵥ p₁ : V)) '' (s \\ {p₁}) → V) :=\nbegin\n rw affine_independent_iff_linear_independent_vsub k (λ p, p : s → P) ⟨p₁, hp₁⟩,\n split,\n { intro h,\n have hv : ∀ v : (λ p, (p -ᵥ p₁ : V)) '' (s \\ {p₁}), (v : V) +ᵥ p₁ ∈ s \\ {p₁} :=\n λ v, (set.mem_image_of_injective (vsub_left_injective p₁)).1\n ((vadd_vsub (v : V) p₁).symm ▸ v.property),\n let f : (λ p : P, (p -ᵥ p₁ : V)) '' (s \\ {p₁}) → {x : s // x ≠ ⟨p₁, hp₁⟩} :=\n λ x, ⟨⟨(x : V) +ᵥ p₁, set.mem_of_mem_diff (hv x)⟩,\n λ hx, set.not_mem_of_mem_diff (hv x) (subtype.ext_iff.1 hx)⟩,\n convert h.comp f\n (λ x1 x2 hx, (subtype.ext (vadd_right_cancel p₁ (subtype.ext_iff.1 (subtype.ext_iff.1 hx))))),\n ext v,\n exact (vadd_vsub (v : V) p₁).symm },\n { intro h,\n let f : {x : s // x ≠ ⟨p₁, hp₁⟩} → (λ p : P, (p -ᵥ p₁ : V)) '' (s \\ {p₁}) :=\n λ x, ⟨((x : s) : P) -ᵥ p₁, ⟨x, ⟨⟨(x : s).property, λ hx, x.property (subtype.ext hx)⟩, rfl⟩⟩⟩,\n convert h.comp f\n (λ x1 x2 hx, subtype.ext (subtype.ext (vsub_left_cancel (subtype.ext_iff.1 hx)))) }\nend\n\n/-- A set of nonzero vectors is linearly independent if and only if,\ngiven a point `p₁`, the vectors added to `p₁` and `p₁` itself are\naffinely independent. -/\nlemma linear_independent_set_iff_affine_independent_vadd_union_singleton {s : set V}\n (hs : ∀ v ∈ s, v ≠ (0 : V)) (p₁ : P) : linear_independent k (λ v, v : s → V) ↔\n affine_independent k (λ p, p : {p₁} ∪ ((λ v, v +ᵥ p₁) '' s) → P) :=\nbegin\n rw affine_independent_set_iff_linear_independent_vsub k\n (set.mem_union_left _ (set.mem_singleton p₁)),\n have h : (λ p, (p -ᵥ p₁ : V)) '' (({p₁} ∪ (λ v, v +ᵥ p₁) '' s) \\ {p₁}) = s,\n { simp_rw [set.union_diff_left, set.image_diff (vsub_left_injective p₁), set.image_image,\n set.image_singleton, vsub_self, vadd_vsub, set.image_id'],\n exact set.diff_singleton_eq_self (λ h, hs 0 h rfl) },\n rw h\nend\n\n/-- A family is affinely independent if and only if any affine\ncombinations (with sum of weights 1) that evaluate to the same point\nhave equal `set.indicator`. -/\nlemma affine_independent_iff_indicator_eq_of_affine_combination_eq (p : ι → P) :\n affine_independent k p ↔ ∀ (s1 s2 : finset ι) (w1 w2 : ι → k), ∑ i in s1, w1 i = 1 →\n ∑ i in s2, w2 i = 1 → s1.affine_combination p w1 = s2.affine_combination p w2 →\n set.indicator ↑s1 w1 = set.indicator ↑s2 w2 :=\nbegin\n split,\n { intros ha s1 s2 w1 w2 hw1 hw2 heq,\n ext i,\n by_cases hi : i ∈ (s1 ∪ s2),\n { rw ←sub_eq_zero,\n rw set.sum_indicator_subset _ (finset.subset_union_left s1 s2) at hw1,\n rw set.sum_indicator_subset _ (finset.subset_union_right s1 s2) at hw2,\n have hws : ∑ i in s1 ∪ s2, (set.indicator ↑s1 w1 - set.indicator ↑s2 w2) i = 0,\n { simp [hw1, hw2] },\n rw [finset.affine_combination_indicator_subset _ _ (finset.subset_union_left s1 s2),\n finset.affine_combination_indicator_subset _ _ (finset.subset_union_right s1 s2),\n ←@vsub_eq_zero_iff_eq V, finset.affine_combination_vsub] at heq,\n exact ha (s1 ∪ s2) (set.indicator ↑s1 w1 - set.indicator ↑s2 w2) hws heq i hi },\n { rw [←finset.mem_coe, finset.coe_union] at hi,\n simp [mt (set.mem_union_left ↑s2) hi, mt (set.mem_union_right ↑s1) hi] } },\n { intros ha s w hw hs i0 hi0,\n let w1 : ι → k := function.update (function.const ι 0) i0 1,\n have hw1 : ∑ i in s, w1 i = 1,\n { rw [finset.sum_update_of_mem hi0, finset.sum_const_zero, add_zero] },\n have hw1s : s.affine_combination p w1 = p i0 :=\n s.affine_combination_of_eq_one_of_eq_zero w1 p hi0 (function.update_same _ _ _)\n (λ _ _ hne, function.update_noteq hne _ _),\n let w2 := w + w1,\n have hw2 : ∑ i in s, w2 i = 1,\n { simp [w2, finset.sum_add_distrib, hw, hw1] },\n have hw2s : s.affine_combination p w2 = p i0,\n { simp [w2, ←finset.weighted_vsub_vadd_affine_combination, hs, hw1s] },\n replace ha := ha s s w2 w1 hw2 hw1 (hw1s.symm ▸ hw2s),\n have hws : w2 i0 - w1 i0 = 0,\n { rw ←finset.mem_coe at hi0,\n rw [←set.indicator_of_mem hi0 w2, ←set.indicator_of_mem hi0 w1, ha, sub_self] },\n simpa [w2] using hws }\nend\n\nvariables {k}\n\n/-- An affinely independent family is injective, if the underlying\nring is nontrivial. -/\nlemma injective_of_affine_independent [nontrivial k] {p : ι → P} (ha : affine_independent k p) :\n function.injective p :=\nbegin\n intros i j hij,\n rw affine_independent_iff_linear_independent_vsub _ _ j at ha,\n by_contra hij',\n refine ha.ne_zero _,\n { exact ⟨i, hij'⟩ },\n { exact vsub_eq_zero_iff_eq.mpr hij },\nend\n\n/-- If a family is affinely independent, so is any subfamily given by\ncomposition of an embedding into index type with the original\nfamily. -/\nlemma affine_independent_embedding_of_affine_independent {ι2 : Type*} (f : ι2 ↪ ι) {p : ι → P}\n (ha : affine_independent k p) : affine_independent k (p ∘ f) :=\nbegin\n intros fs w hw hs i0 hi0,\n let fs' := fs.map f,\n let w' := λ i, if h : ∃ i2, f i2 = i then w h.some else 0,\n have hw' : ∀ i2 : ι2, w' (f i2) = w i2,\n { intro i2,\n have h : ∃ i : ι2, f i = f i2 := ⟨i2, rfl⟩,\n have hs : h.some = i2 := f.injective h.some_spec,\n simp_rw [w', dif_pos h, hs] },\n have hw's : ∑ i in fs', w' i = 0,\n { rw [←hw, finset.sum_map],\n simp [hw'] },\n have hs' : fs'.weighted_vsub p w' = (0:V),\n { rw [←hs, finset.weighted_vsub_map],\n congr' with i,\n simp [hw'] },\n rw [←ha fs' w' hw's hs' (f i0) ((finset.mem_map' _).2 hi0), hw']\nend\n\n/-- If a family is affinely independent, so is any subfamily indexed\nby a subtype of the index type. -/\nlemma affine_independent_subtype_of_affine_independent {p : ι → P}\n (ha : affine_independent k p) (s : set ι) : affine_independent k (λ i : s, p i) :=\naffine_independent_embedding_of_affine_independent (function.embedding.subtype _) ha\n\n/-- If an indexed family of points is affinely independent, so is the\ncorresponding set of points. -/\nlemma affine_independent_set_of_affine_independent {p : ι → P} (ha : affine_independent k p) :\n affine_independent k (λ x, x : set.range p → P) :=\nbegin\n let f : set.range p → ι := λ x, x.property.some,\n have hf : ∀ x, p (f x) = x := λ x, x.property.some_spec,\n let fe : set.range p ↪ ι := ⟨f, λ x₁ x₂ he, subtype.ext (hf x₁ ▸ hf x₂ ▸ he ▸ rfl)⟩,\n convert affine_independent_embedding_of_affine_independent fe ha,\n ext,\n simp [hf]\nend\n\n/-- If a set of points is affinely independent, so is any subset. -/\nlemma affine_independent_of_subset_affine_independent {s t : set P}\n (ha : affine_independent k (λ x, x : t → P)) (hs : s ⊆ t) :\n affine_independent k (λ x, x : s → P) :=\naffine_independent_embedding_of_affine_independent (set.embedding_of_subset s t hs) ha\n\n/-- If the range of an injective indexed family of points is affinely\nindependent, so is that family. -/\nlemma affine_independent_of_affine_independent_set_of_injective {p : ι → P}\n (ha : affine_independent k (λ x, x : set.range p → P)) (hi : function.injective p) :\n affine_independent k p :=\naffine_independent_embedding_of_affine_independent\n (⟨λ i, ⟨p i, set.mem_range_self _⟩, λ x y h, hi (subtype.mk_eq_mk.1 h)⟩ : ι ↪ set.range p) ha\n\n/-- If a family is affinely independent, and the spans of points\nindexed by two subsets of the index type have a point in common, those\nsubsets of the index type have an element in common, if the underlying\nring is nontrivial. -/\nlemma exists_mem_inter_of_exists_mem_inter_affine_span_of_affine_independent [nontrivial k]\n {p : ι → P} (ha : affine_independent k p) {s1 s2 : set ι} {p0 : P}\n (hp0s1 : p0 ∈ affine_span k (p '' s1)) (hp0s2 : p0 ∈ affine_span k (p '' s2)):\n ∃ (i : ι), i ∈ s1 ∩ s2 :=\nbegin\n rw set.image_eq_range at hp0s1 hp0s2,\n rw [mem_affine_span_iff_eq_affine_combination,\n ←finset.eq_affine_combination_subset_iff_eq_affine_combination_subtype] at hp0s1 hp0s2,\n rcases hp0s1 with ⟨fs1, hfs1, w1, hw1, hp0s1⟩,\n rcases hp0s2 with ⟨fs2, hfs2, w2, hw2, hp0s2⟩,\n rw affine_independent_iff_indicator_eq_of_affine_combination_eq at ha,\n replace ha := ha fs1 fs2 w1 w2 hw1 hw2 (hp0s1 ▸ hp0s2),\n have hnz : ∑ i in fs1, w1 i ≠ 0 := hw1.symm ▸ one_ne_zero,\n rcases finset.exists_ne_zero_of_sum_ne_zero hnz with ⟨i, hifs1, hinz⟩,\n simp_rw [←set.indicator_of_mem (finset.mem_coe.2 hifs1) w1, ha] at hinz,\n use [i, hfs1 hifs1, hfs2 (set.mem_of_indicator_ne_zero hinz)]\nend\n\n/-- If a family is affinely independent, the spans of points indexed\nby disjoint subsets of the index type are disjoint, if the underlying\nring is nontrivial. -/\nlemma affine_span_disjoint_of_disjoint_of_affine_independent [nontrivial k] {p : ι → P}\n (ha : affine_independent k p) {s1 s2 : set ι} (hd : s1 ∩ s2 = ∅) :\n (affine_span k (p '' s1) : set P) ∩ affine_span k (p '' s2) = ∅ :=\nbegin\n by_contradiction hne,\n change (affine_span k (p '' s1) : set P) ∩ affine_span k (p '' s2) ≠ ∅ at hne,\n rw set.ne_empty_iff_nonempty at hne,\n rcases hne with ⟨p0, hp0s1, hp0s2⟩,\n cases exists_mem_inter_of_exists_mem_inter_affine_span_of_affine_independent\n ha hp0s1 hp0s2 with i hi,\n exact set.not_mem_empty i (hd ▸ hi)\nend\n\n/-- If a family is affinely independent, a point in the family is in\nthe span of some of the points given by a subset of the index type if\nand only if that point's index is in the subset, if the underlying\nring is nontrivial. -/\n@[simp] lemma mem_affine_span_iff_mem_of_affine_independent [nontrivial k] {p : ι → P}\n (ha : affine_independent k p) (i : ι) (s : set ι) :\n p i ∈ affine_span k (p '' s) ↔ i ∈ s :=\nbegin\n split,\n { intro hs,\n have h := exists_mem_inter_of_exists_mem_inter_affine_span_of_affine_independent\n ha hs (mem_affine_span k (set.mem_image_of_mem _ (set.mem_singleton _))),\n rwa [←set.nonempty_def, set.inter_singleton_nonempty] at h },\n { exact λ h, mem_affine_span k (set.mem_image_of_mem p h) }\nend\n\n/-- If a family is affinely independent, a point in the family is not\nin the affine span of the other points, if the underlying ring is\nnontrivial. -/\nlemma not_mem_affine_span_diff_of_affine_independent [nontrivial k] {p : ι → P}\n (ha : affine_independent k p) (i : ι) (s : set ι) :\n p i ∉ affine_span k (p '' (s \\ {i})) :=\nby simp [ha]\n\nend affine_independent\n\nsection field\n\nvariables {k : Type*} {V : Type*} {P : Type*} [field k] [add_comm_group V] [module k V]\nvariables [affine_space V P] {ι : Type*}\ninclude V\n\n/-- An affinely independent set of points can be extended to such a\nset that spans the whole space. -/\nlemma exists_subset_affine_independent_affine_span_eq_top {s : set P}\n (h : affine_independent k (λ p, p : s → P)) :\n ∃ t : set P, s ⊆ t ∧ affine_independent k (λ p, p : t → P) ∧ affine_span k t = ⊤ :=\nbegin\n rcases s.eq_empty_or_nonempty with rfl | ⟨p₁, hp₁⟩,\n { have p₁ : P := add_torsor.nonempty.some,\n rcases exists_is_basis k V with ⟨sv, hsvi, hsvt⟩,\n have h0 : ∀ v : V, v ∈ sv → v ≠ 0,\n { intros v hv,\n change ((⟨v, hv⟩ : sv) : V) ≠ 0,\n exact hsvi.ne_zero },\n rw linear_independent_set_iff_affine_independent_vadd_union_singleton k h0 p₁ at hsvi,\n use [{p₁} ∪ (λ v, v +ᵥ p₁) '' sv, set.empty_subset _, hsvi,\n affine_span_singleton_union_vadd_eq_top_of_span_eq_top p₁ hsvt] },\n { rw affine_independent_set_iff_linear_independent_vsub k hp₁ at h,\n rcases exists_subset_is_basis h with ⟨sv, hsv, hsvi, hsvt⟩,\n have h0 : ∀ v : V, v ∈ sv → v ≠ 0,\n { intros v hv,\n change ((⟨v, hv⟩ : sv) : V) ≠ 0,\n exact hsvi.ne_zero },\n rw linear_independent_set_iff_affine_independent_vadd_union_singleton k h0 p₁ at hsvi,\n use {p₁} ∪ (λ v, v +ᵥ p₁) '' sv,\n split,\n { refine set.subset.trans _ (set.union_subset_union_right _ (set.image_subset _ hsv)),\n simp [set.image_image] },\n { use [hsvi, affine_span_singleton_union_vadd_eq_top_of_span_eq_top p₁ hsvt] } }\nend\n\nvariables (k)\n\n/-- Two different points are affinely independent. -/\nlemma affine_independent_of_ne {p₁ p₂ : P} (h : p₁ ≠ p₂) : affine_independent k ![p₁, p₂] :=\nbegin\n rw affine_independent_iff_linear_independent_vsub k ![p₁, p₂] 0,\n let i₁ : {x // x ≠ (0 : fin 2)} := ⟨1, dec_trivial⟩,\n have he' : ∀ i, i = i₁,\n { rintro ⟨i, hi⟩,\n ext,\n fin_cases i,\n { simpa using hi } },\n haveI : unique {x // x ≠ (0 : fin 2)} := ⟨⟨i₁⟩, he'⟩,\n have hz : (![p₁, p₂] ↑(default {x // x ≠ (0 : fin 2)}) -ᵥ ![p₁, p₂] 0 : V) ≠ 0,\n { rw he' (default _),\n intro he,\n rw vsub_eq_zero_iff_eq at he,\n exact h he.symm },\n exact linear_independent_unique hz\nend\n\nend field\n\nnamespace affine\n\nvariables (k : Type*) {V : Type*} (P : Type*) [ring k] [add_comm_group V] [module k V]\nvariables [affine_space V P]\ninclude V\n\n/-- A `simplex k P n` is a collection of `n + 1` affinely\nindependent points. -/\nstructure simplex (n : ℕ) :=\n(points : fin (n + 1) → P)\n(independent : affine_independent k points)\n\n/-- A `triangle k P` is a collection of three affinely independent points. -/\nabbreviation triangle := simplex k P 2\n\nnamespace simplex\n\nvariables {P}\n\n/-- Construct a 0-simplex from a point. -/\ndef mk_of_point (p : P) : simplex k P 0 :=\n⟨λ _, p, affine_independent_of_subsingleton k _⟩\n\n/-- The point in a simplex constructed with `mk_of_point`. -/\n@[simp] lemma mk_of_point_points (p : P) (i : fin 1) : (mk_of_point k p).points i = p :=\nrfl\n\ninstance [inhabited P] : inhabited (simplex k P 0) :=\n⟨mk_of_point k $ default P⟩\n\ninstance nonempty : nonempty (simplex k P 0) :=\n⟨mk_of_point k $ add_torsor.nonempty.some⟩\n\nvariables {k V}\n\n/-- Two simplices are equal if they have the same points. -/\n@[ext] lemma ext {n : ℕ} {s1 s2 : simplex k P n} (h : ∀ i, s1.points i = s2.points i) :\n s1 = s2 :=\nbegin\n cases s1,\n cases s2,\n congr' with i,\n exact h i\nend\n\n/-- Two simplices are equal if and only if they have the same points. -/\nlemma ext_iff {n : ℕ} (s1 s2 : simplex k P n): s1 = s2 ↔ ∀ i, s1.points i = s2.points i :=\n⟨λ h _, h ▸ rfl, ext⟩\n\n/-- A face of a simplex is a simplex with the given subset of\npoints. -/\ndef face {n : ℕ} (s : simplex k P n) {fs : finset (fin (n + 1))} {m : ℕ} (h : fs.card = m + 1) :\n simplex k P m :=\n⟨s.points ∘ fs.mono_of_fin h,\n affine_independent_embedding_of_affine_independent\n ⟨fs.mono_of_fin h, fs.mono_of_fin_injective h⟩ s.independent⟩\n\n/-- The points of a face of a simplex are given by `mono_of_fin`. -/\nlemma face_points {n : ℕ} (s : simplex k P n) {fs : finset (fin (n + 1))} {m : ℕ}\n (h : fs.card = m + 1) (i : fin (m + 1)) : (s.face h).points i = s.points (fs.mono_of_fin h i) :=\nrfl\n\n/-- A single-point face equals the 0-simplex constructed with\n`mk_of_point`. -/\n@[simp] lemma face_eq_mk_of_point {n : ℕ} (s : simplex k P n) (i : fin (n + 1)) :\n s.face (finset.card_singleton i) = mk_of_point k (s.points i) :=\nby { ext, simp [face_points] }\n\n/-- The set of points of a face. -/\n@[simp] lemma range_face_points {n : ℕ} (s : simplex k P n) {fs : finset (fin (n + 1))}\n {m : ℕ} (h : fs.card = m + 1) : set.range (s.face h).points = s.points '' ↑fs :=\nbegin\n rw [face, set.range_comp],\n simp\nend\n\nend simplex\n\nend affine\n\nnamespace affine\nnamespace simplex\n\nvariables {k : Type*} {V : Type*} {P : Type*} [division_ring k]\n [add_comm_group V] [module k V] [affine_space V P]\ninclude V\n\n/-- The centroid of a face of a simplex as the centroid of a subset of\nthe points. -/\n@[simp] lemma face_centroid_eq_centroid {n : ℕ} (s : simplex k P n) {fs : finset (fin (n + 1))}\n {m : ℕ} (h : fs.card = m + 1) :\n finset.univ.centroid k (s.face h).points = fs.centroid k s.points :=\nbegin\n convert (finset.univ.centroid_map k ⟨fs.mono_of_fin h, fs.mono_of_fin_injective h⟩ s.points).symm,\n rw [←finset.coe_inj, finset.coe_map, function.embedding.coe_fn_mk],\n simp\nend\n\n/-- Over a characteristic-zero division ring, the centroids given by\ntwo subsets of the points of a simplex are equal if and only if those\nfaces are given by the same subset of points. -/\n@[simp] lemma centroid_eq_iff [char_zero k] {n : ℕ} (s : simplex k P n)\n {fs₁ fs₂ : finset (fin (n + 1))} {m₁ m₂ : ℕ} (h₁ : fs₁.card = m₁ + 1) (h₂ : fs₂.card = m₂ + 1) :\n fs₁.centroid k s.points = fs₂.centroid k s.points ↔ fs₁ = fs₂ :=\nbegin\n split,\n { intro h,\n rw [finset.centroid_eq_affine_combination_fintype,\n finset.centroid_eq_affine_combination_fintype] at h,\n have ha := (affine_independent_iff_indicator_eq_of_affine_combination_eq k s.points).1\n s.independent _ _ _ _ (fs₁.sum_centroid_weights_indicator_eq_one_of_card_eq_add_one k h₁)\n (fs₂.sum_centroid_weights_indicator_eq_one_of_card_eq_add_one k h₂) h,\n simp_rw [finset.coe_univ, set.indicator_univ, function.funext_iff,\n finset.centroid_weights_indicator_def, finset.centroid_weights, h₁, h₂] at ha,\n ext i,\n replace ha := ha i,\n split,\n all_goals\n { intro hi,\n by_contradiction hni,\n simp [hi, hni] at ha,\n norm_cast at ha } },\n { intro h,\n have hm : m₁ = m₂,\n { subst h,\n simpa [h₁] using h₂ },\n subst hm,\n congr,\n exact h }\nend\n\n/-- Over a characteristic-zero division ring, the centroids of two\nfaces of a simplex are equal if and only if those faces are given by\nthe same subset of points. -/\nlemma face_centroid_eq_iff [char_zero k] {n : ℕ} (s : simplex k P n)\n {fs₁ fs₂ : finset (fin (n + 1))} {m₁ m₂ : ℕ} (h₁ : fs₁.card = m₁ + 1) (h₂ : fs₂.card = m₂ + 1) :\n finset.univ.centroid k (s.face h₁).points = finset.univ.centroid k (s.face h₂).points ↔\n fs₁ = fs₂ :=\nbegin\n rw [face_centroid_eq_centroid, face_centroid_eq_centroid],\n exact s.centroid_eq_iff h₁ h₂\nend\n\n/-- Two simplices with the same points have the same centroid. -/\nlemma centroid_eq_of_range_eq {n : ℕ} {s₁ s₂ : simplex k P n}\n (h : set.range s₁.points = set.range s₂.points) :\n finset.univ.centroid k s₁.points = finset.univ.centroid k s₂.points :=\nbegin\n rw [←set.image_univ, ←set.image_univ, ←finset.coe_univ] at h,\n exact finset.univ.centroid_eq_of_inj_on_of_image_eq k _\n (λ _ _ _ _ he, injective_of_affine_independent s₁.independent he)\n (λ _ _ _ _ he, injective_of_affine_independent s₂.independent he) h\nend\n\nend simplex\nend affine\n"} +{"text": "/**\n * CSS file for fontIconPicker\n * This file holds the basic CSS\n * {@link https://github.com/micc83/fontIconPicker}\n */\n/* Reset (thx to Eric A. and Kathryn S. Meyer) */\n.icons-selector * {\n\tmargin: 0;\n\tpadding: 0;\n\tborder: 0;\n\tfont-size: 100%;\n\tfont: inherit;\n\tvertical-align: baseline;\n\tfont-family: \"HelveticaNeue-Light\", \"Helvetica Neue Light\", \"Helvetica Neue\", Helvetica, Arial, \"Lucida Grande\", sans-serif;\n}\n.icons-selector,\n.icons-selector:before,\n.icons-selector:after,\n.icons-selector *,\n.icons-selector *:before,\n.icons-selector *:after {\n\t-webkit-box-sizing: content-box;\n\t-moz-box-sizing: content-box;\n\tbox-sizing: content-box;\n}\n/* Display */\n.icons-selector {\n\tdisplay: inline-block;\n\tvertical-align: middle;\n\ttext-align: left;\n}\n\n/* Icon selector */\n.icons-selector .selector {\n\twidth: 100px;\n\theight: 40px;\n}\n\n/* Selector open button */\n.icons-selector .selector-button {\n\twidth: 39px;\n\theight: 100%;\n\tdisplay:block;\n\ttext-align: center;\n\tcursor: pointer;\n\tfloat: left;\n}\n\n/* Selector open button icon */\n.icons-selector .selector-button i {\n\tline-height: 38px;\n\ttext-align: center;\n}\n\n/* Selected icon container */\n.icons-selector .selected-icon {\n\tdisplay: block;\n\twidth: 60px;\n\theight: 100%;\n\tfloat: left;\n\ttext-align: center;\n}\n\n/* Selected icon */\n.icons-selector .selected-icon i {\n\tline-height: 40px;\n\tfont-size: 18px;\n\tcursor: default;\n}\n\n/* IconPicker Popup */\n.icons-selector .selector-popup {\n\tposition: absolute;\n\tz-index: 10000;\n\tbackground-color: #fefefe;\n\tpadding: 5px;\n\theight: auto;\n\twidth: 342px;\n\tmargin-top:-1px;\n}\n\n/* Search input & category selector */\n.icons-selector .selector-search input[type=\"text\"],\n.icons-selector .selector-category select {\n\tborder: 0;\n\tline-height: 20px;\n\tpadding: 10px 2.5%;\n\twidth: 100%;\n\t-moz-box-sizing: border-box;\n\t-webkit-box-sizing: border-box;\n\tbox-sizing: border-box;\n\tmargin-bottom: 5px;\n\tfont-size: 12px;\n\tdisplay: block; /* Fixes the positioning inside hidden/floated/text-aligned elements, where it would leave a margin */\n}\n.icons-selector .selector-category select {\n\theight: 40px;\n}\n.icons-selector .selector-category select option {\n\tpadding: 10px;\n}\n\n\n/* Search input placeholder */\n.icons-selector input::-webkit-input-placeholder { text-transform: uppercase; }\n.icons-selector input:-moz-placeholder { text-transform: uppercase; }\n.icons-selector input::-moz-placeholder { text-transform: uppercase;}\n.icons-selector input:-ms-input-placeholder { text-transform: uppercase; }\n\n/* Search and cancel icon */\n.icons-selector .selector-search {\n\tposition: relative;\n}\n.icons-selector .selector-search i {\n\tposition: absolute;\n\tright: 10px;\n\ttop: 7px;\n}\n\n/* Icon Container inside Popup */\n.icons-selector .fip-icons-container {\n\twidth: 100%;\n\t-moz-box-sizing: border-box;\n\t-webkit-box-sizing: border-box;\n\tbox-sizing: border-box;\n\tpadding: 5px;\n}\n\n/* Icon container loading */\n.icons-selector .fip-icons-container .loading {\n\tfont-size:24px;\n\tmargin:0 auto;\n\tpadding:20px 0;\n\ttext-align:center;\n\twidth:100%;\n}\n\n/* Single icon box */\n.icons-selector .fip-box {\n\tdisplay: inline-block;\n\tmargin: 2px;\n\twidth: 60px;\n\tline-height: 42px;\n\ttext-align: center;\n\tcursor: pointer;\n\tvertical-align: top;\n\theight: 40px;\n}\n\n/* Popup footer */\n.icons-selector .selector-footer {\n\tline-height: 12px;\n\tpadding: 5px 5px 0 5px;\n\ttext-align: center;\n}\n\n/* Pagination and footer icons */\n.icons-selector .selector-footer, .icons-selector .selector-footer i {\n\tfont-size: 14px;\n}\n/* Pagination arrows container */\n.icons-selector .selector-arrows {\n\tfloat: right;\n}\n/* Pagination text */\n.icons-selector .selector-pages {\n\tfont-size: 11px;\n\tfloat: left;\n}\n/* Pagination arrows icons */\n.icons-selector .selector-arrows i {\n\tcursor: pointer;\n}\n/* Total icons */\n.icons-selector .selector-footer em {\n\tfont-style: italic;\n}\n\n\n/* No icons found */\n.icons-selector .icons-picker-error i:before {\n\tcolor: #eee;\n}\n\n/* Icons */\n@font-face {\n font-family: 'iconpicker';\n src: url('iconpicker.eot?90190138');\n src: url('iconpicker.eot?90190138#iefix') format('embedded-opentype'),\n url('iconpicker.woff?90190138') format('woff'),\n url('iconpicker.ttf?90190138') format('truetype'),\n url('iconpicker.svg?90190138#iconpicker') format('svg');\n font-weight: normal;\n font-style: normal;\n}\n.icons-selector [class^=\"fip-icon-\"]:before, .icons-selector [class*=\" fip-icon-\"]:before {\n\tfont-family: \"iconpicker\";\n\tfont-style: normal;\n\tfont-weight: normal;\n\tspeak: none;\n\tdisplay: inline-block;\n\ttext-decoration: inherit;\n\twidth: 1em;\n\tmargin-right: .2em;\n\ttext-align: center;\n\tfont-variant: normal;\n\ttext-transform: none;\n\tline-height: 1em;\n\tmargin-left: .2em;\n}\n/* Search icon */\n.icons-selector .fip-icon-search:before { content: '\\e812';cursor: default; }\n/* Cancel search icon */\n.icons-selector .fip-icon-cancel:before { content: '\\e814';cursor: pointer; }\n/* No icon set */\n.icons-selector .fip-icon-block:before { content: '\\e84e';color: #fed0d0; }\n/* Open picker icon */\n.icons-selector .fip-icon-down-dir:before { content: '\\e800'; }\n/* Close picker icon */\n.icons-selector .fip-icon-up-dir:before { content: '\\e813'; }\n/* Prev page icon */\n.icons-selector .fip-icon-left-dir:before { content: '\\e801'; }\n/* Next page icon */\n.icons-selector .fip-icon-right-dir:before { content: '\\e802'; }\n/* Loading icon */\n.icons-selector .fip-icon-spin3:before { content: '\\e815'; }\n.icons-selector .fip-icon-spin3 {\n -moz-animation: spin 2s infinite linear;\n -o-animation: spin 2s infinite linear;\n -webkit-animation: spin 2s infinite linear;\n animation: spin 2s infinite linear;\n display: inline-block;\n}\n@-moz-keyframes spin {\n 0% {\n -moz-transform: rotate(0deg);\n -o-transform: rotate(0deg);\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n\n 100% {\n -moz-transform: rotate(359deg);\n -o-transform: rotate(359deg);\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n@-webkit-keyframes spin {\n 0% {\n -moz-transform: rotate(0deg);\n -o-transform: rotate(0deg);\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n\n 100% {\n -moz-transform: rotate(359deg);\n -o-transform: rotate(359deg);\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n@-o-keyframes spin {\n 0% {\n -moz-transform: rotate(0deg);\n -o-transform: rotate(0deg);\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n\n 100% {\n -moz-transform: rotate(359deg);\n -o-transform: rotate(359deg);\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n@-ms-keyframes spin {\n 0% {\n -moz-transform: rotate(0deg);\n -o-transform: rotate(0deg);\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n\n 100% {\n -moz-transform: rotate(359deg);\n -o-transform: rotate(359deg);\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n@keyframes spin {\n 0% {\n -moz-transform: rotate(0deg);\n -o-transform: rotate(0deg);\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n\n 100% {\n -moz-transform: rotate(359deg);\n -o-transform: rotate(359deg);\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n"} +{"text": "/// SendVec\nReturns the number of bytes sent. If return value is negative, then some\nsystem call returned an error.\n///\n\n/// SendVec64\nReturns the number of bytes sent. If return value is negative, then some\nsystem call returned an error.\n///\n\n"} +{"text": "function set_mode_gpu()\n% set_mode_gpu()\n% set Caffe to GPU mode\n\ncaffe_('set_mode_gpu');\n\nend\n"} +{"text": "// The MIT License (MIT)\n// \n// Copyright (c) 2015-2020 Rasmus Mikkelsen\n// Copyright (c) 2015-2020 eBay Software Foundation\n// https://github.com/eventflow/EventFlow\n// \n// Permission is hereby granted, free of charge, to any person obtaining a copy of\n// this software and associated documentation files (the \"Software\"), to deal in\n// the Software without restriction, including without limitation the rights to\n// use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\n// the Software, and to permit persons to whom the Software is furnished to do so,\n// subject to the following conditions:\n// \n// The above copyright notice and this permission notice shall be included in all\n// copies or substantial portions of the Software.\n// \n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\n// FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\n// COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\n// IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nusing System;\nusing System.IO;\nusing System.Linq;\nusing EventFlow.Core;\n\nnamespace EventFlow.EventStores.Files\n{\n public class FilesEventLocator : IFilesEventLocator\n {\n private readonly IFilesEventStoreConfiguration _configuration;\n\n public FilesEventLocator(\n IFilesEventStoreConfiguration configuration)\n {\n _configuration = configuration;\n }\n\n public string GetEntityPath(IIdentity id)\n {\n return Path.Combine(\n _configuration.StorePath,\n id.Value);\n }\n\n public string GetEventPath(IIdentity id, int aggregateSequenceNumber)\n {\n return Path.Combine(\n GetEntityPath(id),\n $\"{aggregateSequenceNumber}.json\");\n }\n }\n}"} +{"text": "/*\n * Copyright (c) 2010-2011,2013-2015 The Linux Foundation. All rights reserved.\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License version 2 and\n * only version 2 as published by the Free Software Foundation.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * storm.c -- ALSA SoC machine driver for QTi ipq806x-based Storm board\n */\n\n#include <linux/device.h>\n#include <linux/module.h>\n#include <linux/of.h>\n#include <linux/mod_devicetable.h>\n#include <linux/platform_device.h>\n#include <sound/pcm.h>\n#include <sound/pcm_params.h>\n#include <sound/soc.h>\n\n#define STORM_SYSCLK_MULT\t\t\t4\n\nstatic int storm_ops_hw_params(struct snd_pcm_substream *substream,\n\t\tstruct snd_pcm_hw_params *params)\n{\n\tstruct snd_soc_pcm_runtime *soc_runtime = substream->private_data;\n\tstruct snd_soc_card *card = soc_runtime->card;\n\tsnd_pcm_format_t format = params_format(params);\n\tunsigned int rate = params_rate(params);\n\tunsigned int sysclk_freq;\n\tint bitwidth, ret;\n\n\tbitwidth = snd_pcm_format_width(format);\n\tif (bitwidth < 0) {\n\t\tdev_err(card->dev, \"invalid bit width given: %d\\n\", bitwidth);\n\t\treturn bitwidth;\n\t}\n\n\t/*\n\t * as the CPU DAI is the I2S bus master and no system clock is needed by\n\t * the MAX98357a DAC, simply set the system clock to be a constant\n\t * multiple of the bit clock for the clock divider\n\t */\n\tsysclk_freq = rate * bitwidth * 2 * STORM_SYSCLK_MULT;\n\n\tret = snd_soc_dai_set_sysclk(soc_runtime->cpu_dai, 0, sysclk_freq, 0);\n\tif (ret) {\n\t\tdev_err(card->dev, \"error setting sysclk to %u: %d\\n\",\n\t\t\tsysclk_freq, ret);\n\t\treturn ret;\n\t}\n\n\treturn 0;\n}\n\nstatic const struct snd_soc_ops storm_soc_ops = {\n\t.hw_params\t= storm_ops_hw_params,\n};\n\nstatic struct snd_soc_dai_link storm_dai_link = {\n\t.name\t\t= \"Primary\",\n\t.stream_name\t= \"Primary\",\n\t.codec_dai_name\t= \"HiFi\",\n\t.ops\t\t= &storm_soc_ops,\n};\n\nstatic int storm_parse_of(struct snd_soc_card *card)\n{\n\tstruct snd_soc_dai_link *dai_link = card->dai_link;\n\tstruct device_node *np = card->dev->of_node;\n\n\tdai_link->cpu_of_node = of_parse_phandle(np, \"cpu\", 0);\n\tif (!dai_link->cpu_of_node) {\n\t\tdev_err(card->dev, \"error getting cpu phandle\\n\");\n\t\treturn -EINVAL;\n\t}\n\tdai_link->platform_of_node = dai_link->cpu_of_node;\n\n\tdai_link->codec_of_node = of_parse_phandle(np, \"codec\", 0);\n\tif (!dai_link->codec_of_node) {\n\t\tdev_err(card->dev, \"error getting codec phandle\\n\");\n\t\treturn -EINVAL;\n\t}\n\n\treturn 0;\n}\n\nstatic int storm_platform_probe(struct platform_device *pdev)\n{\n\tstruct snd_soc_card *card;\n\tint ret;\n\n\tcard = devm_kzalloc(&pdev->dev, sizeof(*card), GFP_KERNEL);\n\tif (!card)\n\t\treturn -ENOMEM;\n\n\tcard->dev = &pdev->dev;\n\tplatform_set_drvdata(pdev, card);\n\n\tret = snd_soc_of_parse_card_name(card, \"qcom,model\");\n\tif (ret) {\n\t\tdev_err(&pdev->dev, \"error parsing card name: %d\\n\", ret);\n\t\treturn ret;\n\t}\n\n\tcard->dai_link\t= &storm_dai_link;\n\tcard->num_links\t= 1;\n\n\tret = storm_parse_of(card);\n\tif (ret) {\n\t\tdev_err(&pdev->dev, \"error resolving dai links: %d\\n\", ret);\n\t\treturn ret;\n\t}\n\n\tret = devm_snd_soc_register_card(&pdev->dev, card);\n\tif (ret)\n\t\tdev_err(&pdev->dev, \"error registering soundcard: %d\\n\", ret);\n\n\treturn ret;\n\n}\n\n#ifdef CONFIG_OF\nstatic const struct of_device_id storm_device_id[] = {\n\t{ .compatible = \"google,storm-audio\" },\n\t{},\n};\nMODULE_DEVICE_TABLE(of, storm_device_id);\n#endif\n\nstatic struct platform_driver storm_platform_driver = {\n\t.driver = {\n\t\t.name = \"storm-audio\",\n\t\t.of_match_table =\n\t\t\tof_match_ptr(storm_device_id),\n\t},\n\t.probe = storm_platform_probe,\n};\nmodule_platform_driver(storm_platform_driver);\n\nMODULE_DESCRIPTION(\"QTi IPQ806x-based Storm Machine Driver\");\nMODULE_LICENSE(\"GPL v2\");\n"} +{"text": "fileFormatVersion: 2\nguid: df0455964130f694babd3b327c2cc1e8\ntimeCreated: 1465283414\nlicenseType: Store\nNativeFormatImporter:\n userData: \n assetBundleName: \n assetBundleVariant: \n"} +{"text": "#ifndef MMSEQS_EVALUE_COMPUTATION_H\n#define MMSEQS_EVALUE_COMPUTATION_H\n\n#include \"Debug.h\"\n#include \"SubstitutionMatrix.h\"\n#include \"Util.h\"\n#include \"sls_alignment_evaluer.hpp\"\n\nclass EvalueComputation {\npublic:\n EvalueComputation(size_t dbResCount, BaseMatrix *subMat) : dbResCount(dbResCount) {\n init(subMat, 0, 0, false);\n }\n EvalueComputation(size_t dbResCount, BaseMatrix *subMat, int gapOpen, int gapExtend) : dbResCount(dbResCount) {\n init(subMat, gapOpen, gapExtend, true);\n }\n\n inline double computeBitScore(double score) {\n return evaluer.bitScore(score, logK);\n }\n\n inline double computeRawScoreFromBitScore(double bitScore) {\n return (logK + bitScore * std::log(2.0)) / evaluer.parameters().lambda;\n }\n\n int minScore(double evalue, size_t qL) {\n // do log of evalue separately, to reduce the risk of overflow:\n double s = (std::log(evaluer.parameters().K * area(60, qL)) - std::log(evalue)) / evaluer.parameters().lambda;\n return std::ceil(std::max(1.0, s));\n }\n\n double area(double score, double seqLength){\n return evaluer.area( score, seqLength, dbResCount );\n }\n\n inline double computeEvalue(double score, double seqLength) {\n const double epa = evaluer.evaluePerArea( score );\n const double a = area( score, seqLength );\n return epa * a;\n }\n\n inline double computeLogEvalue(double score, double seqLength) {\n double eval = std::max(computeEvalue(score, seqLength), std::numeric_limits<double>::min());\n return log(eval);\n }\n\nprivate:\n void init(BaseMatrix * subMat, int gapOpen, int gapExtend, bool isGapped) {\n const double lambdaTolerance = 0.01;\n const double kTolerance = 0.05;\n const double maxMegabytes = 500;\n const long randomSeed = 42; // we all know why 42\n const double maxSeconds = 60.0;\n Sls::AlignmentEvaluerParameters *par = NULL;\n\n const static EvalueParameters defaultParameter[] = {\n {\"nucleotide.out\", 7, 1, true, {1.0960171987681839, 0.33538787507026158,\n 2.0290734315292083, -0.46514786408422282,\n 2.0290734315292083, -0.46514786408422282,\n 5.0543294182155085, 15.130999712620039,\n 5.0543294182155085, 15.130999712620039,\n 5.0543962679167036, 15.129930117400917}},\n\n {\"blosum62.out\", 11, 1, true, {0.27359865037097330642, 0.044620920658722244834,\n 1.5938724404943873658, -19.959867650284412122,\n 1.5938724404943873658, -19.959867650284412122,\n 30.455610143099914211, -622.28684628915891608,\n 30.455610143099914211, -622.28684628915891608,\n 29.602444874818868215, -601.81087985041381216}},\n {\"blosum62.out\", 0, 0, false, {0.3207378152604042354, 0.13904657125294345166,\n 0.76221128839920349041, 0,\n 0.76221128839920349041, 0,\n 4.5269915477182944841, 0,\n 4.5269915477182944841, 0,\n 4.5269915477182944841, 0}}\n };\n\n\n\n for (size_t i = 0; i < ARRAY_SIZE(defaultParameter); i++) {\n if(defaultParameter[i].matrixName == subMat->getMatrixName()){\n if ((fabs(defaultParameter[i].gapOpen - ((double) gapOpen)) < 0.1) &&\n (fabs(defaultParameter[i].gapExtend - ((double) gapExtend)) < 0.1)&&\n defaultParameter[i].isGapped == isGapped) {\n par = (Sls::AlignmentEvaluerParameters*) &(defaultParameter[i].par);\n break;\n }\n }\n }\n\n if(par!=NULL){\n evaluer.initParameters(*par);\n }else{\n long ** tmpMat = new long *[subMat->alphabetSize];\n long * tmpMatData = new long[subMat->alphabetSize*subMat->alphabetSize];\n for(int i = 0; i < subMat->alphabetSize; i++) {\n tmpMat[i] = &tmpMatData[i * subMat->alphabetSize];\n for (int j = 0; j < subMat->alphabetSize; j++) {\n tmpMat[i][j] = subMat->subMatrix[i][j];\n }\n }\n if(isGapped) {\n //-1 to avoid X\n evaluer.initGapped(\n subMat->alphabetSize-1, (const long *const *)tmpMat,\n subMat->pBack, subMat->pBack,\n gapOpen, gapExtend, gapOpen, gapExtend,\n false, lambdaTolerance, kTolerance,\n maxSeconds, maxMegabytes, randomSeed);\n// std::cout << std::setprecision(20) <<\n// evaluer.parameters().lambda <<\"\\t\" <<\n// evaluer.parameters().K <<\"\\t\" <<\n// evaluer.parameters().a_J<<\"\\t\" <<\n// evaluer.parameters().b_J<<\"\\t\" <<\n// evaluer.parameters().a_I<<\"\\t\" <<\n// evaluer.parameters().b_I<<\"\\t\" <<\n// evaluer.parameters().alpha_J<<\"\\t\" <<\n// evaluer.parameters().beta_J<<\"\\t\" <<\n// evaluer.parameters().alpha_I<<\"\\t\" <<\n// evaluer.parameters().beta_I<<\"\\t\" <<\n// evaluer.parameters().sigma<<\"\\t\" <<\n// evaluer.parameters().tau<<\"\\t\" << std::endl;\n }else{\n //subMat->alphabetSize-1\n evaluer.initGapless(\n subMat->alphabetSize-1, (const long *const *)tmpMat,\n subMat->pBack, subMat->pBack,\n maxSeconds);\n// std::cout << std::setprecision(20) <<\n// evaluer.parameters().lambda <<\"\\t\" <<\n// evaluer.parameters().K <<\"\\t\" <<\n// evaluer.parameters().a_J<<\"\\t\" <<\n// evaluer.parameters().b_J<<\"\\t\" <<\n// evaluer.parameters().a_I<<\"\\t\" <<\n// evaluer.parameters().b_I<<\"\\t\" <<\n// evaluer.parameters().alpha_J<<\"\\t\" <<\n// evaluer.parameters().beta_J<<\"\\t\" <<\n// evaluer.parameters().alpha_I<<\"\\t\" <<\n// evaluer.parameters().beta_I<<\"\\t\" <<\n// evaluer.parameters().sigma<<\"\\t\" <<\n// evaluer.parameters().tau<<\"\\t\" << std::endl;\n\n }\n delete [] tmpMatData;\n delete [] tmpMat;\n\n }\n if(evaluer.isGood()==false){\n Debug(Debug::ERROR) << \"ALP did not converge for the substitution matrix, gap open, gap extend input.\\n\"\n \"Please change your input parameters. \\n\";\n EXIT(EXIT_FAILURE);\n }\n logK = log(evaluer.parameters().K);\n }\n\n Sls::AlignmentEvaluer evaluer;\n const size_t dbResCount;\n double logK;\n\n struct EvalueParameters {\n const std::string matrixName;\n int gapOpen;\n int gapExtend;\n bool isGapped;\n Sls::AlignmentEvaluerParameters par;\n };\n\n};\n\n#endif //MMSEQS_EVALUE_COMPUTATION_H\n"} +{"text": "if TARGET_SNIPER\n\nconfig SYS_BOARD\n\tdefault \"sniper\"\n\nconfig SYS_VENDOR\n\tdefault \"lg\"\n\nconfig SYS_CONFIG_NAME\n\tdefault \"sniper\"\n\nendif\n"} +{"text": "#!/bin/sh\n\n# pstore_post_reboot_tests - Check pstore's behavior after crash/reboot\n#\n# Copyright (C) Hitachi Ltd., 2015\n# Written by Hiraku Toyooka <hiraku.toyooka.gu@hitachi.com>\n#\n# Released under the terms of the GPL v2.\n\n# Kselftest framework requirement - SKIP code is 4.\nksft_skip=4\n\n. ./common_tests\n\nif [ -e $REBOOT_FLAG ]; then\n rm $REBOOT_FLAG\nelse\n prlog \"pstore_crash_test has not been executed yet. we skip further tests.\"\n exit $ksft_skip\nfi\n\nprlog -n \"Mounting pstore filesystem ... \"\nmount_info=`grep pstore /proc/mounts`\nif [ $? -eq 0 ]; then\n mount_point=`echo ${mount_info} | cut -d' ' -f2 | head -n1`\n prlog \"ok\"\nelse\n mount none /sys/fs/pstore -t pstore\n if [ $? -eq 0 ]; then\n\tmount_point=`grep pstore /proc/mounts | cut -d' ' -f2 | head -n1`\n\tprlog \"ok\"\n else\n\tprlog \"FAIL\"\n\texit 1\n fi\nfi\n\ncd ${mount_point}\n\nprlog -n \"Checking dmesg files exist in pstore filesystem ... \"\ncheck_files_exist dmesg\n\nprlog -n \"Checking console files exist in pstore filesystem ... \"\ncheck_files_exist console\n\nprlog -n \"Checking pmsg files exist in pstore filesystem ... \"\ncheck_files_exist pmsg\n\nprlog -n \"Checking dmesg files contain oops end marker\"\ngrep_end_trace() {\n grep -q \"\\---\\[ end trace\" $1\n}\nfiles=`ls dmesg-${backend}-*`\noperate_files $? \"$files\" grep_end_trace\n\nprlog -n \"Checking console file contains oops end marker ... \"\ngrep -q \"\\---\\[ end trace\" console-${backend}-0\nshow_result $?\n\nprlog -n \"Checking pmsg file properly keeps the content written before crash ... \"\nprev_uuid=`cat $TOP_DIR/prev_uuid`\nif [ $? -eq 0 ]; then\n nr_matched=`grep -c \"$TEST_STRING_PATTERN\" pmsg-${backend}-0`\n if [ $nr_matched -eq 1 ]; then\n\tgrep -q \"$TEST_STRING_PATTERN\"$prev_uuid pmsg-${backend}-0\n\tshow_result $?\n else\n\tprlog \"FAIL\"\n\trc=1\n fi\nelse\n prlog \"FAIL\"\n rc=1\nfi\n\nprlog -n \"Removing all files in pstore filesystem \"\nfiles=`ls *-${backend}-*`\noperate_files $? \"$files\" rm\n\nexit $rc\n"} +{"text": "\"\"\"\nConditions are useful for any custom pre- and post-processing that must be done on batches of data.\nModule trainer maintains two separate condition lists that are executed before/after the network forward pass.\n\nAn example of a condition could be an Assert that needs to be performed before data is processed.\nA more advanced example of a condition could be code that modifies the network based on input or output\n\"\"\"\n\nfrom enum import Enum, auto\nfrom .misc import is_tuple_or_list\n\nclass CondType(Enum):\n PRE = auto()\n POST = auto()\n\nclass ConditionsContainer(object):\n '''\n This container maintains metadata about the execution environment in which the conditions are performed\n\n exec_type of the container indicates whether it is being run during training or evaluation\n '''\n def __init__(self, exec_type, prefix=''):\n '''\n :param exec_type: ExecType of the container (metadata flag about its execution environment)\n :param prefix: Custom prefix (if any) for output logs\n '''\n self.conditions = {CondType.PRE:[], CondType.POST:[]}\n self.prefix = prefix\n self.exec_type = exec_type\n\n def add_preconditions(self, conditions):\n '''\n :param conditions: pre-condition(s) to add - can be single or a list\n '''\n self._add_conditions(conditions, CondType.PRE)\n\n def add_postconditions(self, conditions):\n '''\n :param conditions: post-condition(s) to add - can be single or a list\n '''\n self._add_conditions(conditions, CondType.POST)\n\n def _add_conditions(self, conditions, type):\n '''\n :param conditions: condition(s) to add - can be single or a list\n :param type: CondType\n :return:\n '''\n conditionz = [conditions] if not is_tuple_or_list(conditions) else conditions\n self.conditions[type].extend(conditionz)\n\n\n def reset(self):\n '''\n Reset conditions in the container\n :return:\n '''\n for condition in self.conditions[CondType.PRE]:\n condition.reset()\n for condition in self.conditions[CondType.POST]:\n condition.reset()\n\n\n def __call__(self, cond_type, epoch_num, batch_num, net=None, input_batch=None, output_batch=None, target_batch=None):\n '''\n\n :param cond_type: ContType to execute\n :param epoch_num: Number of the current epoch\n :param batch_num: Number of the current batch\n :param net: Network that is being used\n :param input_batch: Input that is being used\n :param output_batch: Output that was generated in the forward pass\n :param target_batch: Ground truth if available\n :return:\n '''\n logs = {}\n for condition in self.conditions[cond_type]:\n logs_out = condition(self.exec_type, epoch_num, batch_num, net, input_batch, output_batch, target_batch)\n if logs_out is not None:\n logs[self.prefix + condition._name] = logs_out\n return logs\n\nclass Condition(object):\n \"\"\"\n Default class from which all other Condition implementations inherit.\n \"\"\"\n\n def __call__(self, exec_type, epoch_num, batch_num, net=None, inputs=None, outputs=None, labels=None):\n '''\n :param exec_type: Type of execution from ExecType enum\n :param epoch_num: The epoch of execution\n :param batch_num: The batch of execution\n :param net: network which did the forward pass\n :param inputs: The inputs that were used\n :param outputs: Outputs of the forward pass\n :param labels: Ground Truth\n\n :return:\n '''\n raise NotImplementedError('Custom Conditions must implement this function')\n\n def reset(self):\n raise NotImplementedError('Custom Conditions must implement this function')\n\n\n# class ConditionCallback(Callback):\n#\n# def __init__(self, container):\n# self.container = container\n# def on_epoch_begin(self, epoch_idx, logs):\n# self.container.reset()\n\n\n\nclass SegmentationInputAsserts(Condition):\n '''\n Executes segmentation-specific asserts before executing forward pass on inputs\n '''\n\n def __call__(self, exec_type, epoch_num, batch_num, net=None, inputs=None, outputs=None, labels=None):\n assert inputs.size()[2:] == labels.size()[1:]\n\n def reset(self):\n pass\n\n\nclass SegmentationOutputAsserts(Condition):\n '''\n Executes segmentation-specific asserts after executing forward pass on inputs\n '''\n\n def __init__(self, num_classes):\n self.num_classes = num_classes\n\n def __call__(self, exec_type, epoch_num, batch_num, net=None, inputs=None, outputs=None, labels=None):\n if isinstance(outputs, tuple): # if we have an auxiliary output as well\n if any(item is None for item in outputs) or len(outputs) < 2: # seriously... why? I'm looking at you OCNet\n outs = outputs[0]\n else:\n outs, aux = outputs\n else:\n outs = outputs\n assert outs.size()[2:] == labels.size()[1:]\n assert outs.size()[1] == self.num_classes\n\n def reset(self):\n pass\n"} +{"text": "`Dropdown` is set of structural components for building, accessible dropdown menus with close-on-click,\nkeyboard navigation, and correct focus handling. As with all the react-overlay's\ncomponents it's BYOS (Bring Your Own Styles). Dropdown is primarily\nbuilt from three base components, you should compose to build your Dropdowns.\n\n- `Dropdown`: wraps the menu and toggle, and handles keyboard navigation\n- `Dropdown.Toggle`: generally a button that triggers the menu opening\n- `Dropdown.Menu`: the overlaid, menu, positioned to the toggle with PopperJS\n\n```jsx renderAsComponent\nimport {\n useDropdownMenu,\n useDropdownToggle,\n Dropdown,\n} from \"react-overlays\";\n\nconst MenuContainer = styled(\"div\")`\n display: ${(p) => (p.show ? \"flex\" : \"none\")};\n min-width: 150px;\n position: absolute;\n z-index: 1000;\n flex-direction: column;\n border: 1px solid #e5e5e5;\n background-color: white;\n box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);\n`;\n\nconst Menu = ({ role }) => {\n const { show, onClose, props } = useDropdownMenu({\n flip: true,\n offset: [0, 8],\n });\n return (\n <MenuContainer {...props} role={role} show={show}>\n <button\n type=\"button\"\n onClick={onClose}\n className=\"text-left hover:bg-brand-100 px-6 py-2\"\n >\n Item 1\n </button>\n <button\n type=\"button\"\n onClick={onClose}\n className=\"text-left hover:bg-brand-100 px-6 py-2\"\n >\n Item 2\n </button>\n </MenuContainer>\n );\n};\n\nconst Toggle = ({ id, children }) => {\n const [props, { show, toggle }] = useDropdownToggle();\n return (\n <button\n type=\"button\"\n className=\"btn\"\n id={id}\n {...props}\n onClick={toggle}\n >\n {children}\n </button>\n );\n};\n\nconst DropdownButton = ({\n show,\n onToggle,\n drop,\n alignEnd,\n title,\n role,\n}) => (\n <Dropdown\n show={show}\n onToggle={onToggle}\n drop={drop}\n alignEnd={alignEnd}\n itemSelector=\"button:not(:disabled)\"\n >\n {({ props }) => (\n <div {...props} className=\"relative inline-block\">\n <Toggle id=\"example-toggle\">{title}</Toggle>\n <Menu role={role} />\n </div>\n )}\n </Dropdown>\n);\n\nconst ButtonToolbar = styled(\"div\")`\n & > * + * {\n margin-left: 12px;\n }\n`;\n\nconst [show, setShow] = useState(false);\n\n<ButtonToolbar className=\"dropdown-example\">\n <DropdownButton\n show={show}\n onToggle={(nextShow) => setShow(nextShow)}\n title={`${show ? \"Close\" : \"Open\"} Dropdown`}\n />\n <DropdownButton alignEnd title=\"Align right\" />\n\n <DropdownButton drop=\"up\" title=\"Drop up\" />\n <DropdownButton role=\"menu\" title=\"Role 'menu'\" />\n</ButtonToolbar>;\n```\n"} +{"text": "<component name=\"libraryTable\">\n <library name=\"Maven: org.spire-math:spire-macros_2.11:0.7.4\">\n <CLASSES>\n <root url=\"jar://$MAVEN_REPOSITORY$/org/spire-math/spire-macros_2.11/0.7.4/spire-macros_2.11-0.7.4.jar!/\" />\n </CLASSES>\n <JAVADOC>\n <root url=\"jar://$MAVEN_REPOSITORY$/org/spire-math/spire-macros_2.11/0.7.4/spire-macros_2.11-0.7.4-javadoc.jar!/\" />\n </JAVADOC>\n <SOURCES>\n <root url=\"jar://$MAVEN_REPOSITORY$/org/spire-math/spire-macros_2.11/0.7.4/spire-macros_2.11-0.7.4-sources.jar!/\" />\n </SOURCES>\n </library>\n</component>"} +{"text": "(function(w, d, undefined)\n{\n\t// are degrading script tags enabled by default?\n\tvar degradeEnabled = 1;\n\n\t// set this to 0 if you suspect any of the pre-rendered\n\t// URLs will use javascript to framebreak!\n\tvar useIframe = 1;\n\n\t// when using iframes to precache pages, we can replace the\n\t// actual links on the page with an onclick handler that makes\n\t// the iframe span the entire page instead of redirecting\n\tvar replaceLinks = 1;\n\n\t// size in px of scrollbar\n\tvar scrollBuffer = 20;\n\n\tvar scripts = d.getElementsByTagName('script'),\n\t\ta\t\t= d.getElementsByTagName('a'),\n\t\tlink\t= d.getElementsByTagName('link'),\n\t\tmeta\t= d.getElementsByTagName('meta');\n\n\n\t/***************************************************************************/\n\t/* degrading script tags */\n\t/* this code is by John Resig */\n\t/* see: http://ejohn.org/blog/degrading-script-tags/ */\n\t/***************************************************************************/\n\n\tvar smartTags = function()\n\t{\n\t\t// dynamic array, .length may change\n\t\tfor (var i = 0, l = scripts.length; i < l; i++)\n\t\t{\n\t\t\t// the array may change as it's dynamic so store object\n\t\t\t// in case something gets inserted before it\n\t\t\tvar script = scripts[i];\n\t\t\tvar degrade = script.getAttribute('data-degrade');\n\n\t\t\t// finds scripts with a URL and execute the contents inside\n\t\t\tif (script.src && !script.jExecuted && (\n\t\t\t\t( degradeEnabled && !fals(degrade)) ||\n\t\t\t\t(!degradeEnabled && tru (degrade)))\n\t\t\t)\n\t\t\t{\n\t\t\t\tscript.jExecuted = true;\n\t\t\t\tif (script.innerHTML)\n\t\t\t\t\teval(script.innerHTML);\n\t\t\t}\n\t\t}\n\t};\n\n\n\t/***************************************************************************/\n\t/* allow monitoring timers */\n\t/***************************************************************************/\n\n\tvar timers = {};\n\n\t// allow checking whether a timer is set, fired or cleared\n\tw.checkInterval = w.checkTimeout = function(timer) { return timers[timer] };\n\n\t// return list of fired timers (at least fired once)\n\tw.firedTimeouts = w.firedIntervals = function()\n\t{\n\t\tvar fired = [];\n\t\tfor (var timer in timers)\n\t\t\tif (timers[timer].substr(0, 5) === 'fired')\n\t\t\t\tfired.push(timer);\n\t\treturn fired;\n\t};\n\n\t// return list of cleared timers\n\tw.clearedTimeouts = w.clearedIntervals = function()\n\t{\n\t\tvar cleared = [];\n\t\tfor (var timer in timers)\n\t\t\tif (timers[timer] === 'cleared' || timers[timer] === 'firedCleared')\n\t\t\t\tcleared.push(timer);\n\t\treturn cleared;\n\t};\n\n\t// return list of active timers\n\tw.activeTimeouts = w.activeIntervals = function()\n\t{\n\t\tvar active = [];\n\t\tfor (var timer in timers)\n\t\t\t// an interval that's been fired is still active\n\t\t\tif (timers[timer] === 'active' || timers[timer] === 'firedActive')\n\t\t\t\tactive.push(timer);\n\t\treturn active;\n\t};\n\n\tw._setTimeout = w.setTimeout;\n\tw._setInterval = w.setInterval;\n\tw._clearTimeout = w.clearTimeout;\n\tw._clearInterval = w.clearInterval;\n\tw.clearInterval = w.clearTimeout = function(timer)\n\t{\n\t\t// if it's already fired or doesn't exist, you can't really clear it.\n\t\tif (timers[timer] === 'active' || timers[timer] === 'firedActive')\n\t\t{\n\t\t\tw._clearInterval(timer);\n\t\t\ttimers[timer] = timers[timer] === 'active' ? 'cleared' : 'firedCleared';\n\t\t\treturn true;\n\t\t}\n\t\telse if (timers[timer])\n\t\t\treturn false;\n\n\t\t// timer that doesn't exist\n\t\treturn undefined;\n\t};\n\tw.setTimeout = function () { return newSetTimeout(true, Array.prototype.slice.call(arguments)) };\n\tw.setInterval = function () { return newSetTimeout(false, Array.prototype.slice.call(arguments)) };\n\n\t// our new timer tracker\n\tvar newSetTimeout = function(timeout, args)\n\t{\n\t\t// if we're passing a function ref or a string (don't use a string n00b!)\n\t\tvar origFn = typeof(args[0]) === 'function' ? args[0] : new Function(args[0]);\n\n\t\t// our function calls a placeholder function that gets replaced once we know our timer id\n\t\t// leave origFn in there just in case we get called before getting replaced (shouldn't happen)\n\t\t// gecko also passes back the # of ms late it was to call back\n\t\tvar temp = function(ms) { return origFn(ms); };\n\n\t\t// replace with placeholder\n\t\targs[0] = function(ms) { return temp(ms) };\n\n\t\t// create our real timer\n\t\t// XXX -- do we need to allow different scope other than `this`?\n\t\tvar fn = timeout ? w._setTimeout : w._setInterval;\n\n\t\t// support IE6\n\t\tvar timer = fn.apply ? fn.apply(this, args) : fn(args[0], args[1], args[2]);\n\n\t\t// now change the sub-function we call to know when we've fired\n\t\t// now that we know our timer ID (only known AFTER calling setTimeout)\n\t\ttemp = function(ms)\n\t\t{\n\t\t\t// now we've been fired by the timeout\n\t\t\ttimers[timer] = timeout ? 'fired' : 'firedActive';\n\t\t\treturn origFn(ms);\n\t\t};\n\n\t\t// we have an active (set) timer\n\t\ttimers[timer] = 'active';\n\t\treturn timer;\n\t};\n\n\n\n\t/***************************************************************************/\n\t/* handle prerendering */\n\t/***************************************************************************/\n\n\tvar visibleFrame,\n\t\torigDocSettings;\n\n\t// Scan the page once for all of the link and meta elements that might have prefetch info\n\tvar prefetchObjs = [];\n\n\t// Checks for a change in w.location.hash, and if so returns us to the original page\n\tvar checkHash = function(href)\n\t{\n\t\t// We clicked off the hash, clear the iframe and set the body back\n\t\tif (w.location.hash !== '#' + href)\n\t\t{\n\t\t\t// Reset our page back to how it was before the iframe was displayed\n\t\t\tif (origDocSettings)\n\t\t\t{\n\t\t\t\td.body.style.height = origDocSettings.height;\n\t\t\t\td.body.style.maxHeight = origDocSettings.maxHeight;\n\t\t\t\td.body.style.overflow = origDocSettings.overflow;\n\t\t\t\td.body.style.padding = origDocSettings.padding;\n\t\t\t\td.body.style.margin = origDocSettings.margin;\n\t\t\t\td.body.style.border = origDocSettings.border;\n\t\t\t}\n\n\t\t\t// Make the iframe invsible and delete the height/width so it doesn't give the page unnecessary scroll bars\n\t\t\tvisibleFrame.style.visibility = 'hidden';\n\t\t\tvisibleFrame.style.height = '';\n\t\t\tvisibleFrame.style.width = '';\n\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t};\n\n\n\t// track our rendered stuff so we don't double-request\n\tvar rendered = {};\n\n\t// we run this every time to replace iframes ASAP\n\tvar replaceLink = function(href)\n\t{\n\t\tfor (var i = 0; i < a.length; i++)\n\t\t{\n\t\t\tif (a[i].href === href || a[i].href === href + '/')\n\t\t\t{\n\t\t\t\tvar oldOnclick = a[i].onclick;\n\t\t\t\ta[i].onclick = (function(href, oldOnclick) {\n\t\t\t\t\treturn function() {\n\t\t\t\t\t\tif (oldOnclick) oldOnclick();\n\n\t\t\t\t\t\t// Set a new location, so the back button returns us to our original page\n\t\t\t\t\t\tw.location.href = '#' + href;\n\t\t\t\t\t\t// Look for the hash to change. If it does (back button pressed), hide the iframe\n\t\t\t\t\t\t(function()\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (!checkHash(href))\n\t\t\t\t\t\t\t\tw.setTimeout(arguments.callee, 100);\n\t\t\t\t\t\t})();\n\n\t\t\t\t\t\tvisibleFrame = d.getElementById(href);\n\t\t\t\t\t\tvar height = d.documentElement.clientHeight;\n\t\t\t\t\t\theight -= pageY(visibleFrame) + scrollBuffer;\n\t\t\t\t\t\theight = (height < 0) ? 0 : height;\n\n\t\t\t\t\t\t// Modify page all at once\n\t\t\t\t\t\tvisibleFrame.style.zIndex = \"1337\";\n\t\t\t\t\t\td.body.style.height = \"100%\";\n\t\t\t\t\t\td.body.style.maxHeight = \"100%\";\n\t\t\t\t\t\td.body.style.overflow = \"hidden\";\n\t\t\t\t\t\td.body.style.padding = \"0\";\n\t\t\t\t\t\td.body.style.margin = \"0\";\n\t\t\t\t\t\td.body.style.border = \"0\";\n\t\t\t\t\t\tvisibleFrame.style.backgroundColor = \"#FFFFFF\";\n\t\t\t\t\t\tvisibleFrame.style.height = height + 'px';\n\t\t\t\t\t\tvisibleFrame.style.border = \"0\";\n\t\t\t\t\t\tvisibleFrame.style.width = '100%';\n\t\t\t\t\t\tvisibleFrame.style.visibility = 'visible';\n\t\t\t\t\t\tvisibleFrame.contentWindow.focus();\n\t\t\t\t\t\tw.onresize = arguments.callee;\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t};\n\t\t\t\t})(href, oldOnclick);\n\t\t\t}\n\t\t}\n\t};\n\n\tvar pageY = function(elem)\n\t{\n\t\treturn elem.offsetParent ? (elem.offsetTop + pageY(elem.offsetParent)) : elem.offsetTop;\n\t};\n\n\tvar prerender = function(href, i)\n\t{\n\t\t// already rendered\n\t\tif (rendered[href])\n\t\t\treturn findprerender(i + 1);\n\t\trendered[href] = 1;\n\n\t\t// We're not really rendering, just loading the page in\n\t\t// a hidden iframe in order to cache all objects on the page.\n\t\tvar iframe = d.createElement(useIframe ? 'iframe' : 'img');\n\t\tiframe.style.visibility = 'hidden';\n\t\tiframe.style.position = 'absolute';\n\t\tiframe.onload = iframe.onerror = function()\n\t\t{\n\t\t\t// load next prerender so we don't render multiple items simultaneously\n\t\t\tif (useIframe && replaceLinks)\n\t\t\t\treplaceLink(href);\n\t\t\tfindprerender(i + 1);\n\t\t};\n\t\tiframe.src = href;\n\t\tiframe.id = href;\n\n\t\t// append iframe to DOM\n\t\td.body.insertBefore(iframe, d.body.firstChild);\n\t};\n\n\t// go through objects to prerender\n\tvar findprerender = function(i)\n\t{\n\t\tfor (; i < prefetchObjs.length; i++)\n\t\t\t// Process link tags\n\t\t\tif (prefetchObjs[i].nodeName === \"LINK\" && prefetchObjs[i].rel && prefetchObjs[i].rel.match(/\\b(?:pre(?:render|fetch)|next)\\b/))\n\t\t\t\treturn prerender(prefetchObjs[i].href, i);\n\t\t\t// Process meta tags\n\t\t\telse if (prefetchObjs[i].nodeName === \"META\" && prefetchObjs[i].httpEquiv === \"Link\" && prefetchObjs[i].content && prefetchObjs[i].content.match(/\\brel=(?:pre(?:render|fetch)|next)\\b/))\n\t\t\t\tif (url = prefetchObjs[i].content.match(/^<(.*)>; /))\n\t\t\t\t\treturn prerender(url[1], i);\n\t};\n\n\t// onload function for prerendering\n\tvar startPrerendering = function()\n\t{\n\t\t// Put all the objects onto one array that we can process later\n\t\tvar llen = link.length, mlen = meta.length;\n\t\tfor (var x = 0; x < llen; x++)\n\t\t\tprefetchObjs[x] = link[x];\n\n\t\tfor (; x - llen < mlen; x++)\n\t\t\tprefetchObjs[x] = meta[x - llen];\n\n\t\tif (prefetchObjs.length > 0)\n\t\t{\n\t\t\t// Remember the settings we are going to modify when displaying the iframe (if we have replaceLinks on)\n\t\t\tif (replaceLinks && !origDocSettings)\n\t\t\t\torigDocSettings = {\n\t\t\t\t\t'height':\t\td.body.style.height,\n\t\t\t\t\t'maxHeight':\td.body.style.maxHeight,\n\t\t\t\t\t'overflow':\t\td.body.style.overflow,\n\t\t\t\t\t'padding':\t\td.body.style.padding,\n\t\t\t\t\t'margin':\t\td.body.style.margin,\n\t\t\t\t\t'border':\t\td.body.style.border\n\t\t\t\t};\n\n\t\t\t// Find all pre-renders and do it!\n\t\t\tfindprerender(0);\n\t\t};\n\t};\n\n\n\t/***************************************************************************/\n\t/* document.currentScript polyfill + improvements */\n\t/***************************************************************************/\n\t/*\n\t\tNotes:\n\t\tdocument.currentScript in FF4/Opera isn't useful because it won't return from a callback or event handler\n\t\tChrome / FF3+ work fine (via try/catch)\n\t\tIE can *either* obtain params passed to function (via try/catch) OR obtain URL script executed from (via window.onerror), but not sure if both will work together\n\t\tSafari < 5.1 doesn't support window.onerror nor does it provide full trace (via try/catch), however you can get \"last\" stack URL from try/catch (e.sourceURL)\n\t\targuments.callee.caller returns null from remotely loaded JS\n\t\tSetting a global var during onload isn't useful because the JS will start to execute first\n\t\tSetting a global var just before creating the script isn't useful because the call may be asynchronous and another JS file may load and execute at that time, then believe it's a different script\n\t\tThis works when scripts are created through a script tag, d.createElement() or d.write(), doesn't matter\n\t*/\n\td._currentScript = d.currentScript;\n\n\t// return script object based off of src\n\tvar getScriptFromURL = function(url)\n\t{\n\t\tfor (var i = 0; i < scripts.length; i++)\n\t\t\tif (scripts[i].src === url)\n\t\t\t\treturn scripts[i];\n\n\t\treturn undefined;\n\t}\n\n\tvar actualScript = d.actualScript = function()\n\t{\n\t\t// use native implementation if it knows what's up (doubt it, sucker)\n\t\tif (d._currentScript)\n\t\t\treturn d._currentScript;\n\n\t\t// we could hit a function outside of try to call window.onerror and get url, but problem with this:\n\t\t// 1) onerror won't resume execution\n\t\t// 2) doesn't tell us what was *passed* to the function (doesn't matter here)\n\t\t// 3) safari doesn't support window.onerror\n\t\t// this might be a good solution for MSIE though since stack trace does not show URLs\n\t\t/*\n\t\tif (navigator.userAgent.indexOf('MSIE ') !== -1)\n\t\t{\n\t\t\tw.onerror = function(error, url, line)\n\t\t\t{\n\t\t\t\tif (error.indexOf('Object exp') !== -1)\n\t\t\t\t{\n\t\t\t\t\tfoo2(undefined, url);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t};\n\t\t\tomgwtf\n\t\t}\n\t\t*/\n\n\t\tvar stack;\n\t\ttry\n\t\t{\n\t\t\tomgwtf\n\t\t} catch(e) {\n\t\t\tstack = e.stack;\n\t\t};\n\n\t\tif (!stack)\n\t\t\treturn undefined;\n\n\t\t// chrome uses at, ff uses @\n\t\tvar e = stack.indexOf(' at ') !== -1 ? ' at ' : '@';\n\t\twhile (stack.indexOf(e) !== -1)\n\t\t\tstack = stack.substring(stack.indexOf(e) + e.length);\n\t\tstack = stack.substring(0, stack.indexOf(':', stack.indexOf(':')+1));\n\n\t\treturn getScriptFromURL(stack);\n\t};\n\tif (d.__defineGetter__)\n\t\td.__defineGetter__('currentScript', actualScript);\n\n\n\t/***************************************************************************/\n\t/* onload events to fire */\n\t/***************************************************************************/\n\taddEvent(function() {\n\t\t// begin our prerendering routine\n\t\tstartPrerendering();\n\n\t\t// use our smart \"degrading\" script tags\n\t\tsmartTags();\n\t});\n\n\n\t/***************************************************************************/\n\t/* general functions */\n\t/***************************************************************************/\n\n\tfunction addEvent(cb, evt, obj)\n\t{\n\t\t// default to onload\n\t\tif (!evt)\n\t\t\tevt = 'load';\n\n\t\t// default to window as 'this'\n\t\tif (!obj)\n\t\t\tobj = w;\n\n\t\t// if we're already completed, run now\n\t\tif (d.readyState === 'complete')\n\t\t\tcb();\n\n\t\t// set event listener\n\t\telse if (obj.addEventListener)\n\t\t\tobj.addEventListener(evt, cb, false);\n\t\telse if (obj.attachEvent)\n\t\t\tobj.attachEvent('on' + evt, cb);\n\t}\n\n\n\tfunction tru(test)\n\t{\n\t\treturn test === 'true' || test === true || test === '1' || test === 1;\n\t}\n\n\t// explicit false, this is NOT the same as !tru()\n\tfunction fals(test)\n\t{\n\t\treturn test === 'false' || test === false || test === '0' || test === 0;\n\t}\n\n\n})(this, this.document);\n\nlet t,e;const n=new Set,o=document.createElement(\"link\"),s=o.relList&&o.relList.supports&&o.relList.supports(\"stylesheet\")&&window.IntersectionObserver&&\"isIntersecting\"in IntersectionObserverEntry.prototype,i=\"instantAllowQueryString\"in document.body.dataset,r=\"instantAllowExternalLinks\"in document.body.dataset,a=\"instantWhitelist\"in document.body.dataset;let c=65,d=!1,l=!1,u=!1;if(\"instantIntensity\"in document.body.dataset){const t=document.body.dataset.instantIntensity;if(\"mousedown\"==t.substr(0,\"mousedown\".length))d=!0,\"mousedown-only\"==t&&(l=!0);else if(\"viewport\"==t.substr(0,\"viewport\".length))navigator.connection&&(navigator.connection.saveData||navigator.connection.effectiveType.includes(\"2g\"))||(\"viewport\"==t?document.documentElement.clientWidth*document.documentElement.clientHeight<45e4&&(u=!0):\"viewport-all\"==t&&(u=!0));else{const e=parseInt(t);isNaN(e)||(c=e)}}if(s){const n={capture:!0,passive:!0};if(l||document.addEventListener(\"touchstart\",function(t){e=performance.now();const n=t.target.closest(\"a\");if(!f(n))return;h(n.href)},n),d?document.addEventListener(\"mousedown\",function(t){const e=t.target.closest(\"a\");if(!f(e))return;h(e.href)},n):document.addEventListener(\"mouseover\",function(n){if(performance.now()-e<1100)return;const o=n.target.closest(\"a\");if(!f(o))return;o.addEventListener(\"mouseout\",m,{passive:!0}),t=setTimeout(()=>{h(o.href),t=void 0},c)},n),u){let t;(t=window.requestIdleCallback?t=>{requestIdleCallback(t,{timeout:1500})}:t=>{t()})(()=>{const t=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const n=e.target;t.unobserve(n),h(n.href)}})});document.querySelectorAll(\"a\").forEach(e=>{f(e)&&t.observe(e)})})}}function m(e){e.relatedTarget&&e.target.closest(\"a\")==e.relatedTarget.closest(\"a\")||t&&(clearTimeout(t),t=void 0)}function f(t){if(t&&t.href&&(!a||\"instant\"in t.dataset)&&(r||t.origin==location.origin||\"instant\"in t.dataset)&&[\"http:\",\"https:\"].includes(t.protocol)&&(\"http:\"!=t.protocol||\"https:\"!=location.protocol)&&(i||!t.search||\"instant\"in t.dataset)&&!(t.hash&&t.pathname+t.search==location.pathname+location.search||\"noInstant\"in t.dataset))return!0}function h(t){if(n.has(t))return;const e=document.createElement(\"link\");e.rel=\"prerender\",e.href=t,document.head.appendChild(e),n.add(t)}\n"} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"4.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n <ItemGroup Label=\"ProjectConfigurations\">\n <ProjectConfiguration Include=\"Debug|Win32\">\n <Configuration>Debug</Configuration>\n <Platform>Win32</Platform>\n </ProjectConfiguration>\n <ProjectConfiguration Include=\"Release|Win32\">\n <Configuration>Release</Configuration>\n <Platform>Win32</Platform>\n </ProjectConfiguration>\n </ItemGroup>\n <PropertyGroup Label=\"Globals\">\n <ProjectGuid>{51827B43-B1FC-44D2-8069-93B2F3321E5C}</ProjectGuid>\n <RootNamespace>SceneGraph3D</RootNamespace>\n <Keyword>Win32Proj</Keyword>\n </PropertyGroup>\n <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n <ConfigurationType>StaticLibrary</ConfigurationType>\n <CharacterSet>Unicode</CharacterSet>\n <WholeProgramOptimization>true</WholeProgramOptimization>\n </PropertyGroup>\n <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n <ConfigurationType>StaticLibrary</ConfigurationType>\n <CharacterSet>Unicode</CharacterSet>\n </PropertyGroup>\n <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n <ImportGroup Label=\"ExtensionSettings\">\n </ImportGroup>\n <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"PropertySheets\">\n <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n </ImportGroup>\n <ImportGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"PropertySheets\">\n <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n </ImportGroup>\n <PropertyGroup Label=\"UserMacros\" />\n <PropertyGroup>\n <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>\n <OutDir Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">$(SolutionDir)\\build-Win32\\VS2010\\$(Configuration)\\</OutDir>\n <IntDir Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">$(SolutionDir)\\build-Win32\\VS2010\\$(Configuration)\\</IntDir>\n <OutDir Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">$(SolutionDir)\\build-Win32\\VS2010\\$(Configuration)\\</OutDir>\n <IntDir Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">$(SolutionDir)\\build-Win32\\VS2010\\$(Configuration)\\</IntDir>\n </PropertyGroup>\n <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n <ClCompile>\n <Optimization>Disabled</Optimization>\n <FavorSizeOrSpeed>Size</FavorSizeOrSpeed>\n <AdditionalIncludeDirectories>$(SolutionDir)\\include\\cgplugins;$(SolutionDir)\\include\\cglib;$(SolutionDir)\\include\\;$(SolutionDir)\\3rdparty\\include\\;$(SolutionDir)\\include\\SceneGraph3D;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n <PreprocessorDefinitions>WIN32;_DEBUG;_LIB;EAZD_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n <MinimalRebuild>true</MinimalRebuild>\n <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>\n <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>\n <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n <PrecompiledHeader>\n </PrecompiledHeader>\n <WarningLevel>Level3</WarningLevel>\n <DebugInformationFormat>EditAndContinue</DebugInformationFormat>\n </ClCompile>\n <Lib>\n <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n <AdditionalLibraryDirectories>$(SolutionDir)\\3rdParty\\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\n </Lib>\n </ItemDefinitionGroup>\n <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n <ClCompile>\n <Optimization>MaxSpeed</Optimization>\n <IntrinsicFunctions>true</IntrinsicFunctions>\n <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>\n <AdditionalIncludeDirectories>$(SolutionDir)\\include\\cgplugins;$(SolutionDir)\\include\\cglib;$(SolutionDir)\\include\\;$(SolutionDir)\\3rdparty\\include\\;$(SolutionDir)\\include\\SceneGraph3D;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>\n <PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>\n <FunctionLevelLinking>true</FunctionLevelLinking>\n <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>\n <PrecompiledHeader>\n </PrecompiledHeader>\n <WarningLevel>Level3</WarningLevel>\n <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>\n </ClCompile>\n <Lib>\n <AdditionalDependencies>%(AdditionalDependencies)</AdditionalDependencies>\n <AdditionalLibraryDirectories>$(SolutionDir)\\3rdParty\\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>\n </Lib>\n </ItemDefinitionGroup>\n <ItemGroup>\n <ClCompile Include=\"..\\src\\SceneGraph\\InputDevice3D.cpp\" />\n <ClCompile Include=\"..\\src\\SceneGraph\\MouseKeyboardDevice3D.cpp\" />\n <ClCompile Include=\"..\\src\\SceneGraph\\SceneGraph_Aux.cpp\" />\n <ClCompile Include=\"..\\src\\SceneGraph\\SceneGraph_Cal3D.cpp\" />\n <ClCompile Include=\"..\\src\\SceneGraph\\SceneGraph_Camera3D.cpp\" />\n <ClCompile Include=\"..\\src\\SceneGraph\\SceneGraph_Force3D.cpp\" />\n <ClCompile Include=\"..\\src\\SceneGraph\\SceneGraph_ForceEnabled3D.cpp\" />\n <ClCompile Include=\"..\\src\\SceneGraph\\SceneGraph_Geometry3D.cpp\" />\n <ClCompile Include=\"..\\src\\SceneGraph\\SceneGraph_Group3D.cpp\" />\n <ClCompile Include=\"..\\src\\SceneGraph\\SceneGraph_Input3D.cpp\" />\n <ClCompile Include=\"..\\src\\SceneGraph\\SceneGraph_Light3D.cpp\" />\n <ClCompile Include=\"..\\src\\SceneGraph\\SceneGraph_LinearMotion3D.cpp\" />\n <ClCompile Include=\"..\\src\\SceneGraph\\SceneGraph_MessageMap.cpp\" />\n <ClCompile Include=\"..\\src\\SceneGraph\\SceneGraph_Node3D.cpp\" />\n <ClCompile Include=\"..\\src\\SceneGraph\\SceneGraph_Spinner3D.cpp\" />\n <ClCompile Include=\"..\\src\\SceneGraph\\SceneGraph_Timer3D.cpp\" />\n <ClCompile Include=\"..\\src\\SceneGraph\\SceneGraph_TransformationNode3D.cpp\" />\n <ClCompile Include=\"..\\src\\SceneGraph\\SceneGraph_User3D.cpp\" />\n <ClCompile Include=\"..\\src\\SceneGraph\\SceneGraph_World3D.cpp\" />\n </ItemGroup>\n <ItemGroup>\n <ClInclude Include=\"..\\include\\SceneGraph3D\\SceneGraph.h\" />\n <ClInclude Include=\"..\\include\\SceneGraph3D\\SceneGraph_Aux.h\" />\n <ClInclude Include=\"..\\include\\SceneGraph3D\\SceneGraph_Cal3D.h\" />\n <ClInclude Include=\"..\\include\\SceneGraph3D\\SceneGraph_Camera3D.h\" />\n <ClInclude Include=\"..\\include\\SceneGraph3D\\SceneGraph_Collidable3D.h\" />\n <ClInclude Include=\"..\\include\\SceneGraph3D\\SceneGraph_Drawable3D.h\" />\n <ClInclude Include=\"..\\include\\SceneGraph3D\\SceneGraph_EventMessage.h\" />\n <ClInclude Include=\"..\\include\\SceneGraph3D\\SceneGraph_Force3D.h\" />\n <ClInclude Include=\"..\\include\\SceneGraph3D\\SceneGraph_ForceEnabled3D.h\" />\n <ClInclude Include=\"..\\include\\SceneGraph3D\\SceneGraph_Geometry3D.h\" />\n <ClInclude Include=\"..\\include\\SceneGraph3D\\SceneGraph_Group3D.h\" />\n <ClInclude Include=\"..\\include\\SceneGraph3D\\SceneGraph_Input3D.h\" />\n <ClInclude Include=\"..\\include\\SceneGraph3D\\SceneGraph_Light3D.h\" />\n <ClInclude Include=\"..\\include\\SceneGraph3D\\SceneGraph_LinearMotion3D.h\" />\n <ClInclude Include=\"..\\include\\SceneGraph3D\\SceneGraph_Node3D.h\" />\n <ClInclude Include=\"..\\include\\SceneGraph3D\\SceneGraph_Spinner3D.h\" />\n <ClInclude Include=\"..\\include\\SceneGraph3D\\SceneGraph_Timer3D.h\" />\n <ClInclude Include=\"..\\include\\SceneGraph3D\\SceneGraph_TransformationNode3D.h\" />\n <ClInclude Include=\"..\\include\\SceneGraph3D\\SceneGraph_User3D.h\" />\n <ClInclude Include=\"..\\include\\SceneGraph3D\\SceneGraph_World3D.h\" />\n </ItemGroup>\n <ItemGroup>\n <None Include=\"..\\src\\SceneGraph\\scene.xml\" />\n </ItemGroup>\n <ItemGroup>\n <ProjectReference Include=\"cglib.vcxproj\">\n <Project>{10ca59e3-2ef9-4bc2-871c-d5e6acc52ee6}</Project>\n <ReferenceOutputAssembly>false</ReferenceOutputAssembly>\n </ProjectReference>\n </ItemGroup>\n <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n <ImportGroup Label=\"ExtensionTargets\">\n </ImportGroup>\n</Project>"} +{"text": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n {\n \"config\": \"royale\",\n \"type\": \"lib\",\n \"compilerOptions\": {\n \"targets\": [\n \"SWF\",\n \"JSRoyale\"\n ],\n \"source-path\": [\n \"src/main/royale\",\n \"src/test/royale\"\n ],\n \"include-classes\": [\n \"RoyaleUnitClasses\"\n ],\n \"warn-public-vars\": false,\n \"output\": \"target/RoyaleUnit.swc\"\n }\n}\n"} +{"text": "class CreateEvents < ActiveRecord::Migration\n def change\n create_table :events do |t|\n t.integer :activity_object_id\n t.string :title\n t.datetime :start_at\n t.datetime :end_at\n t.boolean :all_day\n\n t.timestamps\n end\n end\nend\n"} +{"text": "/*\n\nSunburst-like style (c) Vasily Polovnyov <vast@whiteants.net>\n\n*/\n\n.hljs {\n display: block;\n overflow-x: auto;\n padding: 0.5em;\n background: #000;\n color: #f8f8f8;\n -webkit-text-size-adjust: none;\n}\n\n.hljs-comment {\n color: #aeaeae;\n font-style: italic;\n}\n\n.hljs-keyword,\n.ruby .hljs-function .hljs-keyword,\n.hljs-request,\n.hljs-status,\n.nginx .hljs-title {\n color: #e28964;\n}\n\n.hljs-function .hljs-keyword,\n.hljs-sub .hljs-keyword,\n.method,\n.hljs-list .hljs-title {\n color: #99cf50;\n}\n\n.hljs-string,\n.hljs-tag .hljs-value,\n.hljs-cdata,\n.hljs-filter .hljs-argument,\n.hljs-attr_selector,\n.apache .hljs-cbracket,\n.hljs-date,\n.tex .hljs-command,\n.coffeescript .hljs-attribute,\n.hljs-name {\n color: #65b042;\n}\n\n.hljs-subst {\n color: #daefa3;\n}\n\n.hljs-regexp {\n color: #e9c062;\n}\n\n.hljs-title,\n.hljs-sub .hljs-identifier,\n.hljs-pi,\n.hljs-tag,\n.hljs-tag .hljs-keyword,\n.hljs-decorator,\n.hljs-shebang,\n.hljs-prompt {\n color: #89bdff;\n}\n\n.hljs-class .hljs-title,\n.hljs-type,\n.smalltalk .hljs-class,\n.hljs-doctag {\n text-decoration: underline;\n}\n\n.hljs-symbol,\n.ruby .hljs-symbol .hljs-string,\n.hljs-number {\n color: #3387cc;\n}\n\n.hljs-params,\n.hljs-variable,\n.clojure .hljs-attribute {\n color: #3e87e3;\n}\n\n.css .hljs-tag,\n.hljs-rule .hljs-property,\n.hljs-pseudo,\n.tex .hljs-special {\n color: #cda869;\n}\n\n.css .hljs-class {\n color: #9b703f;\n}\n\n.hljs-rule .hljs-keyword {\n color: #c5af75;\n}\n\n.hljs-rule .hljs-value {\n color: #cf6a4c;\n}\n\n.css .hljs-id {\n color: #8b98ab;\n}\n\n.hljs-annotation,\n.apache .hljs-sqbracket,\n.nginx .hljs-built_in {\n color: #9b859d;\n}\n\n.hljs-preprocessor,\n.hljs-pragma {\n color: #8996a8;\n}\n\n.hljs-hexcolor,\n.css .hljs-value .hljs-number {\n color: #dd7b3b;\n}\n\n.css .hljs-function {\n color: #dad085;\n}\n\n.diff .hljs-header,\n.hljs-chunk,\n.tex .hljs-formula {\n background-color: #0e2231;\n color: #f8f8f8;\n font-style: italic;\n}\n\n.diff .hljs-change {\n background-color: #4a410d;\n color: #f8f8f8;\n}\n\n.hljs-addition {\n background-color: #253b22;\n color: #f8f8f8;\n}\n\n.hljs-deletion {\n background-color: #420e09;\n color: #f8f8f8;\n}\n\n.coffeescript .javascript,\n.javascript .xml,\n.tex .hljs-formula,\n.xml .javascript,\n.xml .vbscript,\n.xml .css,\n.xml .hljs-cdata {\n opacity: 0.5;\n}\n"} +{"text": "<?php\n\n/**\n * @file\n * Hooks provided by the Menu module.\n */\n\n/**\n * @addtogroup hooks\n * @{\n */\n\n/**\n * Respond to a custom menu creation.\n *\n * This hook is used to notify modules that a custom menu has been created.\n * Contributed modules may use the information to perform actions based on the\n * information entered into the menu system.\n *\n * @param $menu\n * An array representing a custom menu:\n * - menu_name: The unique name of the custom menu.\n * - title: The human readable menu title.\n * - description: The custom menu description.\n *\n * @see hook_menu_update()\n * @see hook_menu_delete()\n */\nfunction hook_menu_insert($menu) {\n // For example, we track available menus in a variable.\n $my_menus = variable_get('my_module_menus', array());\n $my_menus[$menu['menu_name']] = $menu['menu_name'];\n variable_set('my_module_menus', $my_menus);\n}\n\n/**\n * Respond to a custom menu update.\n *\n * This hook is used to notify modules that a custom menu has been updated.\n * Contributed modules may use the information to perform actions based on the\n * information entered into the menu system.\n *\n * @param $menu\n * An array representing a custom menu:\n * - menu_name: The unique name of the custom menu.\n * - title: The human readable menu title.\n * - description: The custom menu description.\n * - old_name: The current 'menu_name'. Note that internal menu names cannot\n * be changed after initial creation.\n *\n * @see hook_menu_insert()\n * @see hook_menu_delete()\n */\nfunction hook_menu_update($menu) {\n // For example, we track available menus in a variable.\n $my_menus = variable_get('my_module_menus', array());\n $my_menus[$menu['menu_name']] = $menu['menu_name'];\n variable_set('my_module_menus', $my_menus);\n}\n\n/**\n * Respond to a custom menu deletion.\n *\n * This hook is used to notify modules that a custom menu along with all links\n * contained in it (if any) has been deleted. Contributed modules may use the\n * information to perform actions based on the information entered into the menu\n * system.\n *\n * @param $menu\n * An array representing a custom menu:\n * - menu_name: The unique name of the custom menu.\n * - title: The human readable menu title.\n * - description: The custom menu description.\n *\n * @see hook_menu_insert()\n * @see hook_menu_update()\n */\nfunction hook_menu_delete($menu) {\n // Delete the record from our variable.\n $my_menus = variable_get('my_module_menus', array());\n unset($my_menus[$menu['menu_name']]);\n variable_set('my_module_menus', $my_menus);\n}\n\n/**\n * @} End of \"addtogroup hooks\".\n */\n"} +{"text": "<!doctype html>\n\n<title>CodeMirror: SPARQL mode</title>\n<meta charset=\"utf-8\"/>\n<link rel=stylesheet href=\"../../doc/docs.css\">\n\n<link rel=\"stylesheet\" href=\"../../lib/codemirror.css\">\n<script src=\"../../lib/codemirror.js\"></script>\n<script src=\"../../addon/edit/matchbrackets.js\"></script>\n<script src=\"sparql.js\"></script>\n<style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>\n<div id=nav>\n <a href=\"http://codemirror.net\"><h1>CodeMirror</h1><img id=logo src=\"../../doc/logo.png\"></a>\n\n <ul>\n <li><a href=\"../../index.html\">Home</a>\n <li><a href=\"../../doc/manual.html\">Manual</a>\n <li><a href=\"https://github.com/codemirror/codemirror\">Code</a>\n </ul>\n <ul>\n <li><a href=\"../index.html\">Language modes</a>\n <li><a class=active href=\"#\">SPARQL</a>\n </ul>\n</div>\n\n<article>\n<h2>SPARQL mode</h2>\n<form><textarea id=\"code\" name=\"code\">\nPREFIX a: &lt;http://www.w3.org/2000/10/annotation-ns#>\nPREFIX dc: &lt;http://purl.org/dc/elements/1.1/>\nPREFIX foaf: &lt;http://xmlns.com/foaf/0.1/>\nPREFIX rdfs: &lt;http://www.w3.org/2000/01/rdf-schema#>\n\n# Comment!\n\nSELECT ?given ?family\nWHERE {\n {\n ?annot a:annotates &lt;http://www.w3.org/TR/rdf-sparql-query/> .\n ?annot dc:creator ?c .\n OPTIONAL {?c foaf:givenName ?given ;\n foaf:familyName ?family }\n } UNION {\n ?c !foaf:knows/foaf:knows? ?thing.\n ?thing rdfs\n } MINUS {\n ?thing rdfs:label \"剛柔流\"@jp\n }\n FILTER isBlank(?c)\n}\n</textarea></form>\n <script>\n var editor = CodeMirror.fromTextArea(document.getElementById(\"code\"), {\n mode: \"application/sparql-query\",\n matchBrackets: true\n });\n </script>\n\n <p><strong>MIME types defined:</strong> <code>application/sparql-query</code>.</p>\n\n </article>\n"} +{"text": "\\begin{code}\ndelete\n :: forall key ts f\n . KnownNat (FindElem key ts)\n => Key key\n -> OpenProduct f ts\n -> OpenProduct f (Eval (DeleteElem key ts))\ndelete _ (OpenProduct v) =\n let (a, b) = V.splitAt (findElem @key @ts) v\n in OpenProduct $ a V.++ V.tail b\n\\end{code}\n"} +{"text": "// +build freebsd\n// +build arm64\n// Code generated by cmd/cgo -godefs; DO NOT EDIT.\n// cgo -godefs process/types_freebsd.go\n\npackage process\n\nconst (\n\tCTLKern\t\t\t= 1\n\tKernProc\t\t= 14\n\tKernProcPID\t\t= 1\n\tKernProcProc\t\t= 8\n\tKernProcPathname\t= 12\n\tKernProcArgs\t\t= 7\n)\n\nconst (\n\tsizeofPtr\t= 0x8\n\tsizeofShort\t= 0x2\n\tsizeofInt\t= 0x4\n\tsizeofLong\t= 0x8\n\tsizeofLongLong\t= 0x8\n)\n\nconst (\n\tsizeOfKinfoVmentry\t= 0x488\n\tsizeOfKinfoProc\t\t= 0x440\n)\n\nconst (\n\tSIDL\t= 1\n\tSRUN\t= 2\n\tSSLEEP\t= 3\n\tSSTOP\t= 4\n\tSZOMB\t= 5\n\tSWAIT\t= 6\n\tSLOCK\t= 7\n)\n\ntype (\n\t_C_short\tint16\n\t_C_int\t\tint32\n\t_C_long\t\tint64\n\t_C_long_long\tint64\n)\n\ntype Timespec struct {\n\tSec\tint64\n\tNsec\tint64\n}\n\ntype Timeval struct {\n\tSec\tint64\n\tUsec\tint64\n}\n\ntype Rusage struct {\n\tUtime\t\tTimeval\n\tStime\t\tTimeval\n\tMaxrss\t\tint64\n\tIxrss\t\tint64\n\tIdrss\t\tint64\n\tIsrss\t\tint64\n\tMinflt\t\tint64\n\tMajflt\t\tint64\n\tNswap\t\tint64\n\tInblock\t\tint64\n\tOublock\t\tint64\n\tMsgsnd\t\tint64\n\tMsgrcv\t\tint64\n\tNsignals\tint64\n\tNvcsw\t\tint64\n\tNivcsw\t\tint64\n}\n\ntype Rlimit struct {\n\tCur\tint64\n\tMax\tint64\n}\n\ntype KinfoProc struct {\n\tStructsize\tint32\n\tLayout\t\tint32\n\tArgs\t\t*int64 /* pargs */\n\tPaddr\t\t*int64 /* proc */\n\tAddr\t\t*int64 /* user */\n\tTracep\t\t*int64 /* vnode */\n\tTextvp\t\t*int64 /* vnode */\n\tFd\t\t*int64 /* filedesc */\n\tVmspace\t\t*int64 /* vmspace */\n\tWchan\t\t*byte\n\tPid\t\tint32\n\tPpid\t\tint32\n\tPgid\t\tint32\n\tTpgid\t\tint32\n\tSid\t\tint32\n\tTsid\t\tint32\n\tJobc\t\tint16\n\tSpare_short1\tint16\n\tTdev_freebsd11\tuint32\n\tSiglist\t\t[16]byte /* sigset */\n\tSigmask\t\t[16]byte /* sigset */\n\tSigignore\t[16]byte /* sigset */\n\tSigcatch\t[16]byte /* sigset */\n\tUid\t\tuint32\n\tRuid\t\tuint32\n\tSvuid\t\tuint32\n\tRgid\t\tuint32\n\tSvgid\t\tuint32\n\tNgroups\t\tint16\n\tSpare_short2\tint16\n\tGroups\t\t[16]uint32\n\tSize\t\tuint64\n\tRssize\t\tint64\n\tSwrss\t\tint64\n\tTsize\t\tint64\n\tDsize\t\tint64\n\tSsize\t\tint64\n\tXstat\t\tuint16\n\tAcflag\t\tuint16\n\tPctcpu\t\tuint32\n\tEstcpu\t\tuint32\n\tSlptime\t\tuint32\n\tSwtime\t\tuint32\n\tCow\t\tuint32\n\tRuntime\t\tuint64\n\tStart\t\tTimeval\n\tChildtime\tTimeval\n\tFlag\t\tint64\n\tKiflag\t\tint64\n\tTraceflag\tint32\n\tStat\t\tuint8\n\tNice\t\tint8\n\tLock\t\tuint8\n\tRqindex\t\tuint8\n\tOncpu_old\tuint8\n\tLastcpu_old\tuint8\n\tTdname\t\t[17]uint8\n\tWmesg\t\t[9]uint8\n\tLogin\t\t[18]uint8\n\tLockname\t[9]uint8\n\tComm\t\t[20]int8\n\tEmul\t\t[17]uint8\n\tLoginclass\t[18]uint8\n\tMoretdname\t[4]uint8\n\tSparestrings\t[46]uint8\n\tSpareints\t[2]int32\n\tTdev\t\tuint64\n\tOncpu\t\tint32\n\tLastcpu\t\tint32\n\tTracer\t\tint32\n\tFlag2\t\tint32\n\tFibnum\t\tint32\n\tCr_flags\tuint32\n\tJid\t\tint32\n\tNumthreads\tint32\n\tTid\t\tint32\n\tPri\t\tPriority\n\tRusage\t\tRusage\n\tRusage_ch\tRusage\n\tPcb\t\t*int64 /* pcb */\n\tKstack\t\t*byte\n\tUdata\t\t*byte\n\tTdaddr\t\t*int64 /* thread */\n\tSpareptrs\t[6]*byte\n\tSparelongs\t[12]int64\n\tSflag\t\tint64\n\tTdflags\t\tint64\n}\n\ntype Priority struct {\n\tClass\tuint8\n\tLevel\tuint8\n\tNative\tuint8\n\tUser\tuint8\n}\n\ntype KinfoVmentry struct {\n\tStructsize\t\tint32\n\tType\t\t\tint32\n\tStart\t\t\tuint64\n\tEnd\t\t\tuint64\n\tOffset\t\t\tuint64\n\tVn_fileid\t\tuint64\n\tVn_fsid_freebsd11\tuint32\n\tFlags\t\t\tint32\n\tResident\t\tint32\n\tPrivate_resident\tint32\n\tProtection\t\tint32\n\tRef_count\t\tint32\n\tShadow_count\t\tint32\n\tVn_type\t\t\tint32\n\tVn_size\t\t\tuint64\n\tVn_rdev_freebsd11\tuint32\n\tVn_mode\t\t\tuint16\n\tStatus\t\t\tuint16\n\tVn_fsid\t\t\tuint64\n\tVn_rdev\t\t\tuint64\n\tX_kve_ispare\t\t[8]int32\n\tPath\t\t\t[1024]uint8\n}\n"} +{"text": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris\n\npackage nettest\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\t\"runtime\"\n\t\"syscall\"\n)\n\nfunc maxOpenFiles() int {\n\tvar rlim syscall.Rlimit\n\tif err := syscall.Getrlimit(syscall.RLIMIT_NOFILE, &rlim); err != nil {\n\t\treturn defaultMaxOpenFiles\n\t}\n\treturn int(rlim.Cur)\n}\n\nfunc supportsRawIPSocket() (string, bool) {\n\tif os.Getuid() != 0 {\n\t\treturn fmt.Sprintf(\"must be root on %s\", runtime.GOOS), false\n\t}\n\treturn \"\", true\n}\n"} +{"text": "{\n \"images\" : [\n {\n \"idiom\" : \"universal\",\n \"scale\" : \"1x\"\n },\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"air_download_option_night_20x20_@2x.png\",\n \"scale\" : \"2x\"\n },\n {\n \"idiom\" : \"universal\",\n \"filename\" : \"air_download_option_night_20x20_@3x.png\",\n \"scale\" : \"3x\"\n }\n ],\n \"info\" : {\n \"version\" : 1,\n \"author\" : \"xcode\"\n }\n}"} +{"text": "/*\nCopyright AppsCode Inc. and Contributors\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n// Code generated by lister-gen. DO NOT EDIT.\n\npackage v1alpha1\n\n// ElasticsearchOpsRequestListerExpansion allows custom methods to be added to\n// ElasticsearchOpsRequestLister.\ntype ElasticsearchOpsRequestListerExpansion interface{}\n\n// ElasticsearchOpsRequestNamespaceListerExpansion allows custom methods to be added to\n// ElasticsearchOpsRequestNamespaceLister.\ntype ElasticsearchOpsRequestNamespaceListerExpansion interface{}\n\n// EtcdOpsRequestListerExpansion allows custom methods to be added to\n// EtcdOpsRequestLister.\ntype EtcdOpsRequestListerExpansion interface{}\n\n// EtcdOpsRequestNamespaceListerExpansion allows custom methods to be added to\n// EtcdOpsRequestNamespaceLister.\ntype EtcdOpsRequestNamespaceListerExpansion interface{}\n\n// MemcachedOpsRequestListerExpansion allows custom methods to be added to\n// MemcachedOpsRequestLister.\ntype MemcachedOpsRequestListerExpansion interface{}\n\n// MemcachedOpsRequestNamespaceListerExpansion allows custom methods to be added to\n// MemcachedOpsRequestNamespaceLister.\ntype MemcachedOpsRequestNamespaceListerExpansion interface{}\n\n// MongoDBOpsRequestListerExpansion allows custom methods to be added to\n// MongoDBOpsRequestLister.\ntype MongoDBOpsRequestListerExpansion interface{}\n\n// MongoDBOpsRequestNamespaceListerExpansion allows custom methods to be added to\n// MongoDBOpsRequestNamespaceLister.\ntype MongoDBOpsRequestNamespaceListerExpansion interface{}\n\n// MySQLOpsRequestListerExpansion allows custom methods to be added to\n// MySQLOpsRequestLister.\ntype MySQLOpsRequestListerExpansion interface{}\n\n// MySQLOpsRequestNamespaceListerExpansion allows custom methods to be added to\n// MySQLOpsRequestNamespaceLister.\ntype MySQLOpsRequestNamespaceListerExpansion interface{}\n\n// PerconaXtraDBOpsRequestListerExpansion allows custom methods to be added to\n// PerconaXtraDBOpsRequestLister.\ntype PerconaXtraDBOpsRequestListerExpansion interface{}\n\n// PerconaXtraDBOpsRequestNamespaceListerExpansion allows custom methods to be added to\n// PerconaXtraDBOpsRequestNamespaceLister.\ntype PerconaXtraDBOpsRequestNamespaceListerExpansion interface{}\n\n// PgBouncerOpsRequestListerExpansion allows custom methods to be added to\n// PgBouncerOpsRequestLister.\ntype PgBouncerOpsRequestListerExpansion interface{}\n\n// PgBouncerOpsRequestNamespaceListerExpansion allows custom methods to be added to\n// PgBouncerOpsRequestNamespaceLister.\ntype PgBouncerOpsRequestNamespaceListerExpansion interface{}\n\n// PostgresOpsRequestListerExpansion allows custom methods to be added to\n// PostgresOpsRequestLister.\ntype PostgresOpsRequestListerExpansion interface{}\n\n// PostgresOpsRequestNamespaceListerExpansion allows custom methods to be added to\n// PostgresOpsRequestNamespaceLister.\ntype PostgresOpsRequestNamespaceListerExpansion interface{}\n\n// ProxySQLOpsRequestListerExpansion allows custom methods to be added to\n// ProxySQLOpsRequestLister.\ntype ProxySQLOpsRequestListerExpansion interface{}\n\n// ProxySQLOpsRequestNamespaceListerExpansion allows custom methods to be added to\n// ProxySQLOpsRequestNamespaceLister.\ntype ProxySQLOpsRequestNamespaceListerExpansion interface{}\n\n// RedisOpsRequestListerExpansion allows custom methods to be added to\n// RedisOpsRequestLister.\ntype RedisOpsRequestListerExpansion interface{}\n\n// RedisOpsRequestNamespaceListerExpansion allows custom methods to be added to\n// RedisOpsRequestNamespaceLister.\ntype RedisOpsRequestNamespaceListerExpansion interface{}\n"} +{"text": "/*\n * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n *\n * This code is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License version 2 only, as\n * published by the Free Software Foundation. Oracle designates this\n * particular file as subject to the \"Classpath\" exception as provided\n * by Oracle in the LICENSE file that accompanied this code.\n *\n * This code is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * version 2 for more details (a copy is included in the LICENSE file that\n * accompanied this code).\n *\n * You should have received a copy of the GNU General Public License version\n * 2 along with this work; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n * or visit www.oracle.com if you need additional information or have any\n * questions.\n */\n\npackage test.javafx.scene;\n\nimport java.util.Arrays;\nimport java.util.Collection;\n\nimport javafx.scene.image.Image;\nimport test.javafx.scene.image.TestImages;\n\nimport org.junit.AfterClass;\nimport org.junit.BeforeClass;\nimport org.junit.Test;\nimport org.junit.runner.RunWith;\nimport org.junit.runners.Parameterized;\nimport org.junit.runners.Parameterized.Parameters;\n\nimport test.com.sun.javafx.pgstub.CursorSizeConverter;\nimport test.com.sun.javafx.pgstub.StubToolkit;\nimport com.sun.javafx.tk.Toolkit;\nimport javafx.scene.ImageCursor;\n\n@RunWith(Parameterized.class)\npublic final class ImageCursor_findBestImage_Test {\n private static final Image[] TEST_CURSOR_IMAGES = {\n TestImages.TEST_IMAGE_32x32,\n TestImages.TEST_IMAGE_64x64,\n TestImages.TEST_IMAGE_32x64,\n TestImages.TEST_IMAGE_64x32\n };\n\n private static StubToolkit toolkit;\n private static CursorSizeConverter oldCursorSizeConverter;\n\n private final int bestWidth;\n private final int bestHeight;\n private final float hotspotX;\n private final float hotspotY;\n\n private final int expectedIndex;\n private final float expectedHotspotX;\n private final float expectedHotspotY;\n\n\n /*\n * Parameters: [bestWidth], [bestHeight], [hotspotX], [hotspotY],\n * [expected index],\n * [expected hotspotX],\n * [expected hotspotY]\n */\n @Parameters\n public static Collection data() {\n return Arrays.asList(new Object[][] {\n { 32, 64, 0, 0, 2, 0, 0 },\n { 64, 32, 32, 32, 3, 63, 31 },\n { 48, 64, 16, 16, 2, 16, 32 },\n { 64, 48, 16, 16, 3, 32, 16 },\n { 92, 92, 16, 4, 1, 32, 8 },\n { 16, 16, 4, 16, 0, 4, 16 },\n { 16, 32, 0, 0, 0, 0, 0 },\n { 32, 16, 0, 0, 0, 0, 0 }\n });\n }\n\n @BeforeClass\n public static void setUpClass() {\n toolkit = (StubToolkit) Toolkit.getToolkit();\n oldCursorSizeConverter = toolkit.getCursorSizeConverter();\n }\n\n @AfterClass\n public static void tearDownClass() {\n toolkit.setCursorSizeConverter(oldCursorSizeConverter);\n }\n\n public ImageCursor_findBestImage_Test(final int bestWidth,\n final int bestHeight,\n final float hotspotX,\n final float hotspotY,\n final int expectedIndex,\n final float expectedHotspotX,\n final float expectedHotspotY) {\n this.bestWidth = bestWidth;\n this.bestHeight = bestHeight;\n this.hotspotX = hotspotX;\n this.hotspotY = hotspotY;\n\n this.expectedIndex = expectedIndex;\n this.expectedHotspotX = expectedHotspotX;\n this.expectedHotspotY = expectedHotspotY;\n }\n\n @Test\n public void findBestImageTest() {\n toolkit.setCursorSizeConverter(\n CursorSizeConverter.createConstantConverter(bestWidth,\n bestHeight));\n final ImageCursor selectedCursor = ImageCursor.chooseBestCursor(\n TEST_CURSOR_IMAGES,\n hotspotX, hotspotY);\n ImageCursorTest.assertCursorEquals(selectedCursor,\n TEST_CURSOR_IMAGES[expectedIndex],\n expectedHotspotX, expectedHotspotY);\n }\n}\n"} +{"text": "from .. import Provider as AutomotiveProvider\n\n\nclass Provider(AutomotiveProvider):\n \"\"\"Implement automotive provider for ``hu_HU`` locale.\n\n Sources:\n\n - https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Norway\n \"\"\"\n\n license_formats = (\n # Classic format\n '?? #####',\n )\n"} +{"text": "= Quick Start\n:description: A minimal installation guide for those already familiar with their JetBrains IntelliJ based IDE.\n\n// make preview work on non-Antora sites, for example GitHub\nifndef::env-site[]\n:imagesdir: ../images\nendif::[]\n\n{description}\nContinue to section xref:installation.adoc[] for a more detailed guide.\n\n== Prerequisite\n\n. An installed JetBrains IDE like IntelliJ IDEA, GoLand, WebStorm or PyCharm. +\nThis plugin fully supports the free IntelliJ IDEA Community edition.\n\n[WARNING]\n--\nPlease the pre-bundled JetBrains OpenJDK Runtime 11 to run your IDE. This provides the best live preview based on JavaFX or JCEF. You can check this in the menu menu:Help[About].\n\nIt should state:\n\n====\n[%hardbreaks]\nRuntime version: 11.0...\nVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o\n====\n\nPlease refer to xref:installation.adoc#prerequisites[Installation Prerequisites] if this is not the case.\n--\n\n== Plugin installation\n\n. Install the _AsciiDoc_ plugin from the JetBrains marketplace.\n+\nimage::install-plugin-marketplace-closeup.png[Install AsciiDoc plugin from marketplace]\n\n. Restart your IDE to activate the plugin.\n\nFor detailed installation instructions, please follow the instructions in section xref:installation.adoc[].\n\n== Post installation\n\ninclude::partial$installation-complete.adoc[]\n"} +{"text": "/**\n * The MIT License (MIT)\n *\n * Copyright (c) 2019 vk.com\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n*/\n// *********************************************************************\n// THIS FILE IS AUTO GENERATED!\n// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING.\n// *********************************************************************\npackage com.vk.sdk.api.ads.methods\n\nimport com.vk.sdk.api.ApiRequestBase\nimport com.vk.sdk.api.GsonHolder\nimport com.vk.sdk.api.ads.dto.AdsClient\nimport com.vk.sdk.api.ads.responses.AdsGetClientsResponse\nimport kotlin.Int\nimport kotlin.collections.List\nimport org.json.JSONObject\n\n/**\n * Returns a list of advertising agency's clients.\n * @param accountId Advertising account ID. \n */\nclass AdsGetClients(\n private val accountId: Int\n) : ApiRequestBase<List<AdsClient>>(methodName = \"ads.getClients\") {\n init {\n addParam(\"account_id\", accountId)\n }\n\n override fun parse(r: JSONObject): List<AdsClient> = GsonHolder.gson.fromJson(r.toString(),\n AdsGetClientsResponse::class.java).response\n}\n"} +{"text": "// This file can be replaced during build by using the `fileReplacements` array.\n// `ng build --prod` replaces `environment.ts` with `environment.prod.ts`.\n// The list of file replacements can be found in `angular.json`.\n\nexport const environment = {\n production: false\n};\n\n/*\n * For easier debugging in development mode, you can import the following file\n * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.\n *\n * This import should be commented out in production mode because it will have a negative impact\n * on performance if an error is thrown.\n */\n// import 'zone.js/dist/zone-error'; // Included with Angular CLI.\n"} +{"text": "// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// +build !go1.5\n\npackage http2\n\nimport \"net/http\"\n\nfunc requestCancel(req *http.Request) <-chan struct{} { return nil }\n"} +{"text": "#ifndef __LINUX_NET_SCM_H\n#define __LINUX_NET_SCM_H\n\n#include <linux/limits.h>\n#include <linux/net.h>\n#include <linux/security.h>\n#include <linux/pid.h>\n#include <linux/nsproxy.h>\n\n/* Well, we should have at least one descriptor open\n * to accept passed FDs 8)\n */\n#define SCM_MAX_FD\t255\n\nstruct scm_fp_list {\n\tstruct list_head\tlist;\n\tint\t\t\tcount;\n\tstruct file\t\t*fp[SCM_MAX_FD];\n};\n\nstruct scm_cookie {\n\tstruct pid\t\t*pid;\t\t/* Skb credentials */\n\tconst struct cred\t*cred;\n\tstruct scm_fp_list\t*fp;\t\t/* Passed files\t\t*/\n\tstruct ucred\t\tcreds;\t\t/* Skb credentials\t*/\n#ifdef CONFIG_SECURITY_NETWORK\n\tu32\t\t\tsecid;\t\t/* Passed security ID \t*/\n#endif\n};\n\nextern void scm_detach_fds(struct msghdr *msg, struct scm_cookie *scm);\nextern void scm_detach_fds_compat(struct msghdr *msg, struct scm_cookie *scm);\nextern int __scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm);\nextern void __scm_destroy(struct scm_cookie *scm);\nextern struct scm_fp_list * scm_fp_dup(struct scm_fp_list *fpl);\n\n#ifdef CONFIG_SECURITY_NETWORK\nstatic __inline__ void unix_get_peersec_dgram(struct socket *sock, struct scm_cookie *scm)\n{\n\tsecurity_socket_getpeersec_dgram(sock, NULL, &scm->secid);\n}\n#else\nstatic __inline__ void unix_get_peersec_dgram(struct socket *sock, struct scm_cookie *scm)\n{ }\n#endif /* CONFIG_SECURITY_NETWORK */\n\nstatic __inline__ void scm_set_cred(struct scm_cookie *scm,\n\t\t\t\t struct pid *pid, const struct cred *cred)\n{\n\tscm->pid = get_pid(pid);\n\tscm->cred = get_cred(cred);\n\tcred_to_ucred(pid, cred, &scm->creds);\n}\n\nstatic __inline__ void scm_destroy_cred(struct scm_cookie *scm)\n{\n\tput_pid(scm->pid);\n\tscm->pid = NULL;\n\n\tif (scm->cred)\n\t\tput_cred(scm->cred);\n\tscm->cred = NULL;\n}\n\nstatic __inline__ void scm_destroy(struct scm_cookie *scm)\n{\n\tscm_destroy_cred(scm);\n\tif (scm && scm->fp)\n\t\t__scm_destroy(scm);\n}\n\nstatic __inline__ int scm_send(struct socket *sock, struct msghdr *msg,\n\t\t\t struct scm_cookie *scm)\n{\n\tscm_set_cred(scm, task_tgid(current), current_cred());\n\tscm->fp = NULL;\n\tunix_get_peersec_dgram(sock, scm);\n\tif (msg->msg_controllen <= 0)\n\t\treturn 0;\n\treturn __scm_send(sock, msg, scm);\n}\n\n#ifdef CONFIG_SECURITY_NETWORK\nstatic inline void scm_passec(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm)\n{\n\tchar *secdata;\n\tu32 seclen;\n\tint err;\n\n\tif (test_bit(SOCK_PASSSEC, &sock->flags)) {\n\t\terr = security_secid_to_secctx(scm->secid, &secdata, &seclen);\n\n\t\tif (!err) {\n\t\t\tput_cmsg(msg, SOL_SOCKET, SCM_SECURITY, seclen, secdata);\n\t\t\tsecurity_release_secctx(secdata, seclen);\n\t\t}\n\t}\n}\n#else\nstatic inline void scm_passec(struct socket *sock, struct msghdr *msg, struct scm_cookie *scm)\n{ }\n#endif /* CONFIG_SECURITY_NETWORK */\n\nstatic __inline__ void scm_recv(struct socket *sock, struct msghdr *msg,\n\t\t\t\tstruct scm_cookie *scm, int flags)\n{\n\tif (!msg->msg_control) {\n\t\tif (test_bit(SOCK_PASSCRED, &sock->flags) || scm->fp)\n\t\t\tmsg->msg_flags |= MSG_CTRUNC;\n\t\tscm_destroy(scm);\n\t\treturn;\n\t}\n\n\tif (test_bit(SOCK_PASSCRED, &sock->flags))\n\t\tput_cmsg(msg, SOL_SOCKET, SCM_CREDENTIALS, sizeof(scm->creds), &scm->creds);\n\n\tscm_destroy_cred(scm);\n\n\tscm_passec(sock, msg, scm);\n\n\tif (!scm->fp)\n\t\treturn;\n\t\n\tscm_detach_fds(msg, scm);\n}\n\n\n#endif /* __LINUX_NET_SCM_H */\n"} +{"text": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<!-- NewPage -->\n<html lang=\"en\">\n<head>\n<!-- Generated by javadoc (version 1.7.0_25) on Sat Nov 16 21:43:21 PST 2013 -->\n<meta http-equiv=\"Content-Type\" content=\"text/html\" charset=\"UTF-8\">\n<title>Uses of Class com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer (jackson-databind 2.3.0 API)</title>\n<meta name=\"date\" content=\"2013-11-16\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"../../../../../../../stylesheet.css\" title=\"Style\">\n</head>\n<body>\n<script type=\"text/javascript\"><!--\n if (location.href.indexOf('is-external=true') == -1) {\n parent.document.title=\"Uses of Class com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer (jackson-databind 2.3.0 API)\";\n }\n//-->\n</script>\n<noscript>\n<div>JavaScript is disabled on your browser.</div>\n</noscript>\n<!-- ========= START OF TOP NAVBAR ======= -->\n<div class=\"topNav\"><a name=\"navbar_top\">\n<!-- -->\n</a><a href=\"#skip-navbar_top\" title=\"Skip navigation links\"></a><a name=\"navbar_top_firstrow\">\n<!-- -->\n</a>\n<ul class=\"navList\" title=\"Navigation\">\n<li><a href=\"../../../../../../../overview-summary.html\">Overview</a></li>\n<li><a href=\"../package-summary.html\">Package</a></li>\n<li><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/StdScalarDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">Class</a></li>\n<li class=\"navBarCell1Rev\">Use</li>\n<li><a href=\"../package-tree.html\">Tree</a></li>\n<li><a href=\"../../../../../../../deprecated-list.html\">Deprecated</a></li>\n<li><a href=\"../../../../../../../index-all.html\">Index</a></li>\n<li><a href=\"../../../../../../../help-doc.html\">Help</a></li>\n</ul>\n</div>\n<div class=\"subNav\">\n<ul class=\"navList\">\n<li>Prev</li>\n<li>Next</li>\n</ul>\n<ul class=\"navList\">\n<li><a href=\"../../../../../../../index.html?com/fasterxml/jackson/databind/deser/std/class-use/StdScalarDeserializer.html\" target=\"_top\">Frames</a></li>\n<li><a href=\"StdScalarDeserializer.html\" target=\"_top\">No Frames</a></li>\n</ul>\n<ul class=\"navList\" id=\"allclasses_navbar_top\">\n<li><a href=\"../../../../../../../allclasses-noframe.html\">All Classes</a></li>\n</ul>\n<div>\n<script type=\"text/javascript\"><!--\n allClassesLink = document.getElementById(\"allclasses_navbar_top\");\n if(window==top) {\n allClassesLink.style.display = \"block\";\n }\n else {\n allClassesLink.style.display = \"none\";\n }\n //-->\n</script>\n</div>\n<a name=\"skip-navbar_top\">\n<!-- -->\n</a></div>\n<!-- ========= END OF TOP NAVBAR ========= -->\n<div class=\"header\">\n<h2 title=\"Uses of Class com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer\" class=\"title\">Uses of Class<br>com.fasterxml.jackson.databind.deser.std.StdScalarDeserializer</h2>\n</div>\n<div class=\"classUseContainer\">\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use table, listing packages, and an explanation\">\n<caption><span>Packages that use <a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/StdScalarDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">StdScalarDeserializer</a></span><span class=\"tabEnd\">&nbsp;</span></caption>\n<tr>\n<th class=\"colFirst\" scope=\"col\">Package</th>\n<th class=\"colLast\" scope=\"col\">Description</th>\n</tr>\n<tbody>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><a href=\"#com.fasterxml.jackson.databind.deser.std\">com.fasterxml.jackson.databind.deser.std</a></td>\n<td class=\"colLast\">\n<div class=\"block\">Contains public standard implementations of abstraction that\n Jackson uses.</div>\n</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><a href=\"#com.fasterxml.jackson.databind.ext\">com.fasterxml.jackson.databind.ext</a></td>\n<td class=\"colLast\">\n<div class=\"block\">Contains extended support for \"external\" packages: things that\nmay or may not be present in runtime environment, but that are\ncommonly enough used so that explicit support can be added.</div>\n</td>\n</tr>\n</tbody>\n</table>\n</li>\n<li class=\"blockList\">\n<ul class=\"blockList\">\n<li class=\"blockList\"><a name=\"com.fasterxml.jackson.databind.deser.std\">\n<!-- -->\n</a>\n<h3>Uses of <a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/StdScalarDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">StdScalarDeserializer</a> in <a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/package-summary.html\">com.fasterxml.jackson.databind.deser.std</a></h3>\n<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use table, listing subclasses, and an explanation\">\n<caption><span>Subclasses of <a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/StdScalarDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">StdScalarDeserializer</a> in <a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/package-summary.html\">com.fasterxml.jackson.databind.deser.std</a></span><span class=\"tabEnd\">&nbsp;</span></caption>\n<tr>\n<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n<th class=\"colLast\" scope=\"col\">Class and Description</th>\n</tr>\n<tbody>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/AtomicBooleanDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">AtomicBooleanDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/ByteBufferDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">ByteBufferDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/CharsetDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">CharsetDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/ClassDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">ClassDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/DateDeserializers.CalendarDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">DateDeserializers.CalendarDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>protected static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/DateDeserializers.DateBasedDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">DateDeserializers.DateBasedDeserializer</a>&lt;T&gt;</strong></code>&nbsp;</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/DateDeserializers.DateDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">DateDeserializers.DateDeserializer</a></strong></code>\n<div class=\"block\">Simple deserializer for handling <a href=\"http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true\" title=\"class or interface in java.util\"><code>Date</code></a> values.</div>\n</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/DateDeserializers.SqlDateDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">DateDeserializers.SqlDateDeserializer</a></strong></code>\n<div class=\"block\">Compared to plain old <a href=\"http://docs.oracle.com/javase/6/docs/api/java/util/Date.html?is-external=true\" title=\"class or interface in java.util\"><code>Date</code></a>, SQL version is easier\n to deal with: mostly because it is more limited.</div>\n</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/DateDeserializers.TimestampDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">DateDeserializers.TimestampDeserializer</a></strong></code>\n<div class=\"block\">Simple deserializer for handling <a href=\"http://docs.oracle.com/javase/6/docs/api/java/sql/Timestamp.html?is-external=true\" title=\"class or interface in java.sql\"><code>Timestamp</code></a> values.</div>\n</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>protected static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/DateDeserializers.TimeZoneDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">DateDeserializers.TimeZoneDeserializer</a></strong></code>\n<div class=\"block\">As per [JACKSON-522], also need special handling for TimeZones</div>\n</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/EnumDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">EnumDeserializer</a></strong></code>\n<div class=\"block\">Deserializer class that can deserialize instances of\n specified Enum class from Strings and Integers.</div>\n</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>protected static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/EnumDeserializer.FactoryBasedDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">EnumDeserializer.FactoryBasedDeserializer</a></strong></code>\n<div class=\"block\">Deserializer that uses a single-String static factory method\n for locating Enum values by String id.</div>\n</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/FromStringDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">FromStringDeserializer</a>&lt;T&gt;</strong></code>\n<div class=\"block\">Base class for simple deserializers that only accept JSON String\n values as the source.</div>\n</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/InetSocketAddressDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">InetSocketAddressDeserializer</a></strong></code>\n<div class=\"block\">Deserializer for <a href=\"http://docs.oracle.com/javase/6/docs/api/java/net/InetSocketAddress.html?is-external=true\" title=\"class or interface in java.net\"><code>InetSocketAddress</code></a>.</div>\n</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/JavaTypeDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">JavaTypeDeserializer</a></strong></code>\n<div class=\"block\">Deserializer for <a href=\"../../../../../../../com/fasterxml/jackson/databind/JavaType.html\" title=\"class in com.fasterxml.jackson.databind\"><code>JavaType</code></a> values.</div>\n</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/JdkDeserializers.CurrencyDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">JdkDeserializers.CurrencyDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/JdkDeserializers.FileDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">JdkDeserializers.FileDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>protected static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/JdkDeserializers.LocaleDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">JdkDeserializers.LocaleDeserializer</a></strong></code>\n<div class=\"block\">Kept protected as it's not meant to be extensible at this point</div>\n</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/JdkDeserializers.PatternDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">JdkDeserializers.PatternDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/JdkDeserializers.URIDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">JdkDeserializers.URIDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/JdkDeserializers.URLDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">JdkDeserializers.URLDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/NumberDeserializers.BigDecimalDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">NumberDeserializers.BigDecimalDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/NumberDeserializers.BigIntegerDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">NumberDeserializers.BigIntegerDeserializer</a></strong></code>\n<div class=\"block\">This is bit trickier to implement efficiently, while avoiding\n overflow problems.</div>\n</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/NumberDeserializers.BooleanDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">NumberDeserializers.BooleanDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/NumberDeserializers.ByteDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">NumberDeserializers.ByteDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/NumberDeserializers.CharacterDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">NumberDeserializers.CharacterDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/NumberDeserializers.DoubleDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">NumberDeserializers.DoubleDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/NumberDeserializers.FloatDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">NumberDeserializers.FloatDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/NumberDeserializers.IntegerDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">NumberDeserializers.IntegerDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/NumberDeserializers.LongDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">NumberDeserializers.LongDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/NumberDeserializers.NumberDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">NumberDeserializers.NumberDeserializer</a></strong></code>\n<div class=\"block\">For type <code>Number.class</code>, we can just rely on type\n mappings that plain <a href=\"http://fasterxml.github.com/jackson-core/javadoc/2.3.0/com/fasterxml/jackson/core/JsonParser.html?is-external=true#getNumberValue()\" title=\"class or interface in com.fasterxml.jackson.core\"><code>JsonParser.getNumberValue()</code></a> returns.</div>\n</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>protected static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/NumberDeserializers.PrimitiveOrWrapperDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">NumberDeserializers.PrimitiveOrWrapperDeserializer</a>&lt;T&gt;</strong></code>&nbsp;</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/NumberDeserializers.ShortDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">NumberDeserializers.ShortDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/StackTraceElementDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">StackTraceElementDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/StringDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">StringDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/TokenBufferDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">TokenBufferDeserializer</a></strong></code>\n<div class=\"block\">We also want to directly support deserialization of <a href=\"../../../../../../../com/fasterxml/jackson/databind/util/TokenBuffer.html\" title=\"class in com.fasterxml.jackson.databind.util\"><code>TokenBuffer</code></a>.</div>\n</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/UUIDDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">UUIDDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n</tbody>\n</table>\n</li>\n<li class=\"blockList\"><a name=\"com.fasterxml.jackson.databind.ext\">\n<!-- -->\n</a>\n<h3>Uses of <a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/StdScalarDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">StdScalarDeserializer</a> in <a href=\"../../../../../../../com/fasterxml/jackson/databind/ext/package-summary.html\">com.fasterxml.jackson.databind.ext</a></h3>\n<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use table, listing subclasses, and an explanation\">\n<caption><span>Subclasses of <a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/StdScalarDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">StdScalarDeserializer</a> in <a href=\"../../../../../../../com/fasterxml/jackson/databind/ext/package-summary.html\">com.fasterxml.jackson.databind.ext</a></span><span class=\"tabEnd\">&nbsp;</span></caption>\n<tr>\n<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n<th class=\"colLast\" scope=\"col\">Class and Description</th>\n</tr>\n<tbody>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/ext/CoreXMLDeserializers.DurationDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.ext\">CoreXMLDeserializers.DurationDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/ext/CoreXMLDeserializers.GregorianCalendarDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.ext\">CoreXMLDeserializers.GregorianCalendarDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/ext/CoreXMLDeserializers.QNameDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.ext\">CoreXMLDeserializers.QNameDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/ext/DOMDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.ext\">DOMDeserializer</a>&lt;T&gt;</strong></code>\n<div class=\"block\">Base for serializers that allows parsing DOM Documents from JSON Strings.</div>\n</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/ext/DOMDeserializer.DocumentDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.ext\">DOMDeserializer.DocumentDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>static class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../../com/fasterxml/jackson/databind/ext/DOMDeserializer.NodeDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.ext\">DOMDeserializer.NodeDeserializer</a></strong></code>&nbsp;</td>\n</tr>\n</tbody>\n</table>\n</li>\n</ul>\n</li>\n</ul>\n</div>\n<!-- ======= START OF BOTTOM NAVBAR ====== -->\n<div class=\"bottomNav\"><a name=\"navbar_bottom\">\n<!-- -->\n</a><a href=\"#skip-navbar_bottom\" title=\"Skip navigation links\"></a><a name=\"navbar_bottom_firstrow\">\n<!-- -->\n</a>\n<ul class=\"navList\" title=\"Navigation\">\n<li><a href=\"../../../../../../../overview-summary.html\">Overview</a></li>\n<li><a href=\"../package-summary.html\">Package</a></li>\n<li><a href=\"../../../../../../../com/fasterxml/jackson/databind/deser/std/StdScalarDeserializer.html\" title=\"class in com.fasterxml.jackson.databind.deser.std\">Class</a></li>\n<li class=\"navBarCell1Rev\">Use</li>\n<li><a href=\"../package-tree.html\">Tree</a></li>\n<li><a href=\"../../../../../../../deprecated-list.html\">Deprecated</a></li>\n<li><a href=\"../../../../../../../index-all.html\">Index</a></li>\n<li><a href=\"../../../../../../../help-doc.html\">Help</a></li>\n</ul>\n</div>\n<div class=\"subNav\">\n<ul class=\"navList\">\n<li>Prev</li>\n<li>Next</li>\n</ul>\n<ul class=\"navList\">\n<li><a href=\"../../../../../../../index.html?com/fasterxml/jackson/databind/deser/std/class-use/StdScalarDeserializer.html\" target=\"_top\">Frames</a></li>\n<li><a href=\"StdScalarDeserializer.html\" target=\"_top\">No Frames</a></li>\n</ul>\n<ul class=\"navList\" id=\"allclasses_navbar_bottom\">\n<li><a href=\"../../../../../../../allclasses-noframe.html\">All Classes</a></li>\n</ul>\n<div>\n<script type=\"text/javascript\"><!--\n allClassesLink = document.getElementById(\"allclasses_navbar_bottom\");\n if(window==top) {\n allClassesLink.style.display = \"block\";\n }\n else {\n allClassesLink.style.display = \"none\";\n }\n //-->\n</script>\n</div>\n<a name=\"skip-navbar_bottom\">\n<!-- -->\n</a></div>\n<!-- ======== END OF BOTTOM NAVBAR ======= -->\n<p class=\"legalCopy\"><small>Copyright &#169; 2012-2013 <a href=\"http://fasterxml.com/\">FasterXML</a>. All Rights Reserved.</small></p>\n</body>\n</html>\n"} +{"text": " # Col. 1: y/h\n # Col. 2: Production term\n # Col. 3: Turbulence Transport term\n # Col. 4: Viscous Diffusion term\n # Col. 5: Velocity Pressure Gradient term\n # Col. 6: Viscous Dissipation term\n # Col. 7: Convection term\n\n 0.00000E+00 0.00000E+00 0.00000E+00 1.34876E-02 0.00000E+00 -1.34876E-02 0.00000E+00\n 5.82380E-04 0.00000E+00 -3.83956E-06 1.24576E-02 3.64881E-04 -1.28186E-02 9.32991E-08\n 1.83133E-03 0.00000E+00 2.31111E-04 1.00668E-02 1.08449E-03 -1.13826E-02 7.87427E-07\n 3.26055E-03 0.00000E+00 6.53294E-04 7.33558E-03 1.79928E-03 -9.78769E-03 4.63544E-07\n 4.89542E-03 0.00000E+00 1.01459E-03 4.68800E-03 2.49154E-03 -8.19060E-03 -2.11187E-06\n 6.76471E-03 0.00000E+00 1.43037E-03 2.07204E-03 3.10041E-03 -6.59280E-03 -8.05675E-06\n 8.90094E-03 0.00000E+00 1.77916E-03 -2.20082E-04 3.56934E-03 -5.10668E-03 -1.90553E-05\n 1.13408E-02 0.00000E+00 1.74422E-03 -1.54574E-03 3.84542E-03 -4.00320E-03 -3.66474E-05\n 1.41256E-02 0.00000E+00 1.50994E-03 -2.37076E-03 3.99765E-03 -3.07964E-03 -5.10557E-05\n 1.73017E-02 0.00000E+00 9.88147E-04 -2.30180E-03 3.91205E-03 -2.52642E-03 -6.27765E-05\n 2.09209E-02 0.00000E+00 4.45288E-04 -1.82613E-03 3.64200E-03 -2.19023E-03 -5.77680E-05\n 2.50411E-02 0.00000E+00 5.70419E-05 -1.38619E-03 3.28689E-03 -1.91439E-03 -2.61512E-05\n 2.97262E-02 0.00000E+00 -1.82846E-04 -9.71148E-04 2.86186E-03 -1.71737E-03 3.03276E-05\n 3.50470E-02 0.00000E+00 -2.74664E-04 -6.36066E-04 2.40576E-03 -1.57868E-03 1.07264E-04\n 4.10810E-02 0.00000E+00 -2.56960E-04 -3.89984E-04 1.94912E-03 -1.48051E-03 2.03847E-04\n 4.79124E-02 0.00000E+00 -1.23780E-04 -2.61855E-04 1.51566E-03 -1.42744E-03 3.23641E-04\n 5.56324E-02 0.00000E+00 -2.03940E-05 -1.67879E-04 1.13054E-03 -1.40647E-03 4.89952E-04\n 6.43383E-02 0.00000E+00 3.07841E-05 -8.80403E-05 8.02975E-04 -1.39419E-03 6.72929E-04\n 7.41327E-02 0.00000E+00 1.44085E-04 -8.44537E-05 5.22243E-04 -1.38011E-03 8.21350E-04\n 8.51224E-02 0.00000E+00 2.14144E-04 -4.44793E-05 3.87444E-04 -1.41660E-03 8.83382E-04\n 9.74166E-02 0.00000E+00 3.14122E-04 -1.19586E-05 1.92402E-04 -1.44434E-03 9.74224E-04\n 1.11124E-01 0.00000E+00 4.02068E-04 1.68090E-05 9.80427E-05 -1.50380E-03 1.00882E-03\n 1.26351E-01 0.00000E+00 4.58017E-04 1.23878E-05 1.10529E-04 -1.58124E-03 1.01441E-03\n 1.43196E-01 0.00000E+00 3.91476E-04 4.22114E-06 2.10466E-04 -1.66905E-03 1.07145E-03\n 1.61745E-01 0.00000E+00 3.87882E-04 -7.57535E-06 3.65528E-04 -1.75301E-03 1.01500E-03\n 1.82069E-01 0.00000E+00 4.06174E-04 -9.94653E-06 5.21223E-04 -1.85179E-03 9.38922E-04\n 2.04216E-01 0.00000E+00 5.01855E-04 1.66378E-05 7.16769E-04 -1.97325E-03 7.42374E-04\n 2.28204E-01 0.00000E+00 5.17712E-04 2.51881E-05 9.05355E-04 -2.10554E-03 6.57069E-04\n 2.54020E-01 0.00000E+00 4.69480E-04 2.50718E-05 1.09703E-03 -2.24770E-03 6.53464E-04\n 2.81608E-01 0.00000E+00 4.83312E-04 3.78621E-05 1.31833E-03 -2.40424E-03 5.62692E-04\n 3.10871E-01 0.00000E+00 4.24113E-04 2.28154E-05 1.63387E-03 -2.60971E-03 5.48865E-04\n 3.41668E-01 0.00000E+00 4.16282E-04 1.75519E-05 1.94790E-03 -2.83529E-03 4.84371E-04\n 3.73809E-01 0.00000E+00 3.47389E-04 5.50460E-06 2.26907E-03 -3.06601E-03 4.88032E-04\n 4.07065E-01 0.00000E+00 3.51904E-04 -1.78419E-05 2.62594E-03 -3.35171E-03 4.47215E-04\n 4.41166E-01 0.00000E+00 3.14286E-04 -3.58903E-05 2.97371E-03 -3.64406E-03 4.54965E-04\n 4.75814E-01 0.00000E+00 1.85318E-04 -2.14783E-05 3.52617E-03 -3.94082E-03 3.38243E-04\n 5.10691E-01 0.00000E+00 1.12727E-04 -2.86894E-05 4.08257E-03 -4.25278E-03 1.85918E-04\n 5.45470E-01 0.00000E+00 2.07259E-05 -1.17616E-05 4.57166E-03 -4.57059E-03 8.29466E-05\n 5.79827E-01 0.00000E+00 -2.03409E-05 -2.09930E-05 5.03820E-03 -4.87695E-03 -5.28735E-05\n 6.13455E-01 0.00000E+00 -1.13516E-04 -3.15670E-05 5.53634E-03 -5.15773E-03 -1.86039E-04\n 6.46072E-01 0.00000E+00 -3.14776E-04 -2.05494E-05 6.01046E-03 -5.39898E-03 -2.43395E-04\n 6.77432E-01 0.00000E+00 -3.76062E-04 -2.19879E-05 6.34096E-03 -5.59648E-03 -3.33596E-04\n 7.07328E-01 0.00000E+00 -5.07535E-04 -5.77208E-06 6.68068E-03 -5.75651E-03 -4.10276E-04\n 7.35600E-01 0.00000E+00 -6.49426E-04 -1.75687E-05 6.82514E-03 -5.83047E-03 -3.45619E-04\n 7.62134E-01 0.00000E+00 -7.85534E-04 -1.52507E-05 6.96500E-03 -5.90228E-03 -2.97244E-04\n 7.86857E-01 0.00000E+00 -9.18078E-04 -2.88020E-05 7.03520E-03 -5.89398E-03 -2.44724E-04\n 8.09740E-01 0.00000E+00 -1.06478E-03 -3.18195E-05 7.06325E-03 -5.86368E-03 -1.58740E-04\n 8.30789E-01 0.00000E+00 -1.19384E-03 -2.81834E-05 6.98247E-03 -5.70669E-03 -1.04202E-04\n 8.50041E-01 0.00000E+00 -1.22622E-03 -3.07486E-05 6.97472E-03 -5.59313E-03 -1.68921E-04\n 8.67558E-01 0.00000E+00 -1.28691E-03 -9.38811E-06 6.91962E-03 -5.48680E-03 -1.75286E-04\n 8.83420E-01 0.00000E+00 -1.22520E-03 -9.76762E-06 6.82694E-03 -5.31240E-03 -3.16008E-04\n 8.97723E-01 0.00000E+00 -1.15730E-03 -1.02399E-05 6.72722E-03 -5.18835E-03 -4.10249E-04\n 9.10570E-01 0.00000E+00 -1.16573E-03 -1.22300E-05 6.64127E-03 -5.07020E-03 -4.33349E-04\n 9.22068E-01 0.00000E+00 -1.02645E-03 -1.20860E-05 6.51848E-03 -4.92672E-03 -5.91281E-04\n 9.32328E-01 0.00000E+00 -1.04429E-03 -1.87977E-05 6.45202E-03 -4.82275E-03 -6.04448E-04\n 9.41456E-01 0.00000E+00 -9.21938E-04 -1.64348E-05 6.34136E-03 -4.70584E-03 -7.33240E-04\n 9.49559E-01 0.00000E+00 -8.24668E-04 -1.47271E-05 6.23823E-03 -4.60274E-03 -8.30236E-04\n 9.56734E-01 0.00000E+00 -8.02770E-04 -1.96421E-05 6.17941E-03 -4.51996E-03 -8.69379E-04\n 9.63077E-01 0.00000E+00 -7.29381E-04 -1.78882E-05 6.08952E-03 -4.43931E-03 -9.33886E-04\n 9.68673E-01 0.00000E+00 -6.92171E-04 -1.49010E-05 6.03603E-03 -4.36837E-03 -9.89998E-04\n 9.73604E-01 0.00000E+00 -6.38934E-04 -1.38160E-05 5.96057E-03 -4.30643E-03 -1.02992E-03\n 9.77942E-01 0.00000E+00 -5.95775E-04 -1.30704E-05 5.89286E-03 -4.25227E-03 -1.05958E-03\n 9.81754E-01 0.00000E+00 -5.60665E-04 -1.24988E-05 5.83243E-03 -4.20498E-03 -1.08156E-03\n 9.85101E-01 0.00000E+00 -5.28528E-04 -1.21261E-05 5.80349E-03 -4.15936E-03 -1.12962E-03\n 9.88036E-01 0.00000E+00 -5.03487E-04 -1.16302E-05 5.75479E-03 -4.12351E-03 -1.14194E-03\n 9.90609E-01 0.00000E+00 -4.79979E-04 -1.11956E-05 5.71240E-03 -4.09191E-03 -1.15476E-03\n 9.92862E-01 0.00000E+00 -4.63010E-04 -1.11280E-05 5.67472E-03 -4.06474E-03 -1.16104E-03\n 9.94834E-01 0.00000E+00 -4.45717E-04 -1.08576E-05 5.64212E-03 -4.04062E-03 -1.16987E-03\n 9.96559E-01 0.00000E+00 -4.30589E-04 -1.06212E-05 5.61360E-03 -4.01952E-03 -1.17760E-03\n 9.98067E-01 0.00000E+00 -4.15616E-04 -1.07907E-05 5.61292E-03 -3.99574E-03 -1.21364E-03\n 9.99385E-01 0.00000E+00 -4.06534E-04 -1.08280E-05 5.59007E-03 -3.98037E-03 -1.21512E-03\n 1.00059E+00 0.00000E+00 -3.96334E-04 -1.06748E-05 5.56917E-03 -3.96593E-03 -1.21892E-03\n 1.00180E+00 0.00000E+00 -3.86103E-04 -1.05210E-05 5.54820E-03 -3.95145E-03 -1.22274E-03\n 1.00306E+00 0.00000E+00 -3.75353E-04 -1.03595E-05 5.52616E-03 -3.93624E-03 -1.22674E-03\n 1.00440E+00 0.00000E+00 -3.67023E-04 -9.73867E-06 5.50308E-03 -3.92107E-03 -1.22766E-03\n 1.00580E+00 0.00000E+00 -3.55456E-04 -9.51449E-06 5.47876E-03 -3.90435E-03 -1.23175E-03\n 1.00727E+00 0.00000E+00 -3.43301E-04 -9.27894E-06 5.45321E-03 -3.88679E-03 -1.23605E-03\n 1.00881E+00 0.00000E+00 -3.30530E-04 -9.03144E-06 5.42636E-03 -3.86834E-03 -1.24056E-03\n 1.01044E+00 0.00000E+00 -3.17111E-04 -8.77140E-06 5.39815E-03 -3.84895E-03 -1.24531E-03\n 1.01215E+00 0.00000E+00 -2.93867E-04 -8.21713E-06 5.38760E-03 -3.82643E-03 -1.27972E-03\n 1.01394E+00 0.00000E+00 -2.80420E-04 -7.82910E-06 5.35506E-03 -3.80538E-03 -1.28201E-03\n 1.01582E+00 0.00000E+00 -2.66291E-04 -7.42142E-06 5.32087E-03 -3.78327E-03 -1.28441E-03\n 1.01780E+00 0.00000E+00 -2.54134E-04 -6.59962E-06 5.28594E-03 -3.76112E-03 -1.28432E-03\n 1.01988E+00 0.00000E+00 -2.38812E-04 -6.10958E-06 5.24830E-03 -3.73682E-03 -1.28671E-03\n 1.02207E+00 0.00000E+00 -2.22716E-04 -5.59475E-06 5.20876E-03 -3.71129E-03 -1.28922E-03\n 1.02436E+00 0.00000E+00 -1.90110E-04 -5.19947E-06 5.17801E-03 -3.68335E-03 -1.31873E-03\n 1.02677E+00 0.00000E+00 -1.76138E-04 -4.49885E-06 5.13534E-03 -3.65646E-03 -1.31735E-03\n 1.02930E+00 0.00000E+00 -1.59934E-04 -3.86921E-06 5.08817E-03 -3.62714E-03 -1.31629E-03\n 1.03197E+00 0.00000E+00 -1.42912E-04 -3.20777E-06 5.03862E-03 -3.59634E-03 -1.31518E-03\n 1.03476E+00 0.00000E+00 -1.17389E-04 -3.33280E-06 4.99682E-03 -3.56472E-03 -1.33029E-03\n 1.03770E+00 0.00000E+00 -1.01042E-04 -2.63453E-06 4.94131E-03 -3.53096E-03 -1.32554E-03\n 1.04078E+00 0.00000E+00 -8.64030E-05 -2.46967E-06 4.88952E-03 -3.49741E-03 -1.32233E-03\n 1.04402E+00 0.00000E+00 -6.02772E-05 -1.73709E-06 4.83191E-03 -3.45981E-03 -1.32936E-03\n 1.04742E+00 0.00000E+00 -4.38565E-05 -9.91371E-07 4.76743E-03 -3.42103E-03 -1.32075E-03\n 1.05099E+00 0.00000E+00 -2.41753E-05 -5.27872E-07 4.71056E-03 -3.38289E-03 -1.32277E-03\n 1.05475E+00 0.00000E+00 -9.35698E-06 2.68160E-07 4.64008E-03 -3.34065E-03 -1.31002E-03\n 1.05869E+00 0.00000E+00 -8.06527E-07 8.23723E-07 4.57716E-03 -3.29960E-03 -1.29764E-03\n 1.06283E+00 0.00000E+00 1.20803E-05 1.26561E-06 4.50065E-03 -3.25361E-03 -1.28030E-03\n 1.06717E+00 0.00000E+00 2.02004E-05 4.78368E-07 4.43160E-03 -3.20818E-03 -1.26401E-03\n 1.07174E+00 0.00000E+00 3.47990E-05 4.58638E-07 4.34782E-03 -3.15749E-03 -1.24536E-03\n 1.07653E+00 0.00000E+00 5.88334E-05 -1.05680E-06 4.27177E-03 -3.10658E-03 -1.24257E-03\n 1.08156E+00 0.00000E+00 7.22191E-05 -1.08757E-06 4.18175E-03 -3.05164E-03 -1.22062E-03\n 1.08685E+00 0.00000E+00 1.13371E-04 1.35936E-06 4.09688E-03 -2.99600E-03 -1.23501E-03\n 1.09239E+00 0.00000E+00 1.27013E-04 1.62729E-06 3.99988E-03 -2.93635E-03 -1.21130E-03\n 1.09822E+00 0.00000E+00 1.62222E-04 6.54919E-06 3.90582E-03 -2.87642E-03 -1.21713E-03\n 1.10433E+00 0.00000E+00 1.69962E-04 7.93847E-06 3.80157E-03 -2.81167E-03 -1.18638E-03\n 1.11075E+00 0.00000E+00 1.84967E-04 7.84748E-06 3.69972E-03 -2.74538E-03 -1.16505E-03\n 1.11748E+00 0.00000E+00 1.86418E-04 8.09350E-06 3.58993E-03 -2.67432E-03 -1.12784E-03\n 1.12455E+00 0.00000E+00 2.00310E-04 5.73450E-06 3.48052E-03 -2.60338E-03 -1.10020E-03\n 1.13197E+00 0.00000E+00 2.20190E-04 3.78253E-06 3.36471E-03 -2.53041E-03 -1.07486E-03\n 1.13976E+00 0.00000E+00 2.58298E-04 3.28479E-06 3.24418E-03 -2.45046E-03 -1.07202E-03\n 1.14793E+00 0.00000E+00 3.01858E-04 3.56979E-06 3.11694E-03 -2.37229E-03 -1.06689E-03\n 1.15650E+00 0.00000E+00 3.61306E-04 5.03344E-06 2.98784E-03 -2.29096E-03 -1.07923E-03\n 1.16549E+00 0.00000E+00 4.26777E-04 7.40034E-06 2.85565E-03 -2.20019E-03 -1.10529E-03\n 1.17493E+00 0.00000E+00 4.93040E-04 9.36373E-06 2.72201E-03 -2.11204E-03 -1.12581E-03\n 1.18483E+00 0.00000E+00 5.39554E-04 1.26851E-05 2.59185E-03 -2.02309E-03 -1.13203E-03\n 1.19521E+00 0.00000E+00 6.08383E-04 1.56691E-05 2.44564E-03 -1.92522E-03 -1.15429E-03\n 1.20609E+00 0.00000E+00 6.26835E-04 1.75401E-05 2.31128E-03 -1.83263E-03 -1.13017E-03\n 1.21751E+00 0.00000E+00 6.33413E-04 1.72233E-05 2.17710E-03 -1.73750E-03 -1.09526E-03\n 1.22948E+00 0.00000E+00 6.71030E-04 1.60620E-05 2.02090E-03 -1.63374E-03 -1.07748E-03\n 1.24203E+00 0.00000E+00 6.70888E-04 1.35211E-05 1.89189E-03 -1.53632E-03 -1.04161E-03\n 1.25518E+00 0.00000E+00 6.68184E-04 1.35281E-05 1.76749E-03 -1.44180E-03 -1.00634E-03\n 1.26897E+00 0.00000E+00 6.78923E-04 1.41691E-05 1.63000E-03 -1.34071E-03 -9.78419E-04\n 1.28342E+00 0.00000E+00 7.08016E-04 1.59703E-05 1.47770E-03 -1.23228E-03 -9.61335E-04\n 1.29856E+00 0.00000E+00 7.13317E-04 2.05061E-05 1.34367E-03 -1.13232E-03 -9.35335E-04\n 1.31442E+00 0.00000E+00 6.63212E-04 1.70977E-05 1.23158E-03 -1.04161E-03 -8.58800E-04\n 1.33104E+00 0.00000E+00 6.55099E-04 1.34659E-05 1.10594E-03 -9.47679E-04 -8.13280E-04\n 1.34844E+00 0.00000E+00 5.81883E-04 1.56429E-05 9.94118E-04 -8.51519E-04 -7.24192E-04\n 1.36667E+00 0.00000E+00 5.20980E-04 1.35139E-05 9.06059E-04 -7.70258E-04 -6.53842E-04\n 1.38575E+00 0.00000E+00 4.49154E-04 1.43147E-05 8.23609E-04 -6.87744E-04 -5.80833E-04\n 1.40572E+00 0.00000E+00 3.66075E-04 1.18486E-05 7.58906E-04 -6.17732E-04 -5.00781E-04\n 1.42662E+00 0.00000E+00 3.08713E-04 7.68807E-06 6.98233E-04 -5.52657E-04 -4.44263E-04\n 1.44850E+00 0.00000E+00 2.74595E-04 6.52360E-06 6.32644E-04 -4.84353E-04 -4.13524E-04\n 1.47138E+00 0.00000E+00 2.22714E-04 6.15311E-06 5.66544E-04 -4.24348E-04 -3.57652E-04\n 1.49531E+00 0.00000E+00 1.78355E-04 5.68237E-06 5.16432E-04 -3.78202E-04 -3.10944E-04\n 1.52033E+00 0.00000E+00 1.37643E-04 3.49520E-06 4.73574E-04 -3.37817E-04 -2.67009E-04\n 1.54649E+00 0.00000E+00 1.11628E-04 2.60276E-06 4.32242E-04 -3.02445E-04 -2.34587E-04\n 1.57382E+00 0.00000E+00 9.01384E-05 3.20621E-06 3.86428E-04 -2.66634E-04 -2.03373E-04\n 1.60239E+00 0.00000E+00 6.07855E-05 3.38873E-06 3.51884E-04 -2.40014E-04 -1.65763E-04\n 1.63222E+00 0.00000E+00 4.00318E-05 2.36427E-06 3.21574E-04 -2.16546E-04 -1.37249E-04\n 1.66338E+00 0.00000E+00 2.07602E-05 1.50330E-06 2.91524E-04 -1.93218E-04 -1.10697E-04\n 1.69590E+00 0.00000E+00 9.77108E-06 8.81046E-07 2.65415E-04 -1.74514E-04 -9.29078E-05\n 1.72984E+00 0.00000E+00 -8.37876E-07 -2.29056E-07 2.41006E-04 -1.57324E-04 -7.55317E-05\n 1.76524E+00 0.00000E+00 -1.09144E-05 1.24766E-07 2.12912E-04 -1.40249E-04 -5.49737E-05\n 1.80217E+00 0.00000E+00 -1.12353E-05 1.54161E-07 1.90807E-04 -1.26035E-04 -4.82732E-05\n 1.84065E+00 0.00000E+00 -6.68230E-06 -6.26166E-07 1.70207E-04 -1.12696E-04 -4.63180E-05\n 1.88076E+00 0.00000E+00 3.85629E-06 -1.12727E-06 1.50678E-04 -9.97806E-05 -5.15529E-05\n 1.92254E+00 0.00000E+00 1.33318E-05 -7.63320E-07 1.31723E-04 -8.71952E-05 -5.64834E-05\n 1.96604E+00 0.00000E+00 2.24734E-05 3.02992E-07 1.11906E-04 -7.50965E-05 -5.96277E-05\n 2.01132E+00 0.00000E+00 3.21391E-05 1.61102E-06 9.20521E-05 -6.35069E-05 -6.23094E-05\n 2.05842E+00 0.00000E+00 4.23786E-05 2.15881E-06 7.31800E-05 -5.24467E-05 -6.52910E-05\n 2.10739E+00 0.00000E+00 4.77506E-05 2.03860E-06 5.51745E-05 -4.11961E-05 -6.42748E-05\n 2.15829E+00 0.00000E+00 4.23063E-05 2.11269E-06 4.30890E-05 -3.15767E-05 -5.67337E-05\n 2.21117E+00 0.00000E+00 3.36652E-05 2.36797E-06 3.14567E-05 -2.27297E-05 -4.58156E-05\n 2.26607E+00 0.00000E+00 2.41298E-05 1.91785E-06 2.37698E-05 -1.56005E-05 -3.50508E-05\n 2.32303E+00 0.00000E+00 1.93571E-05 1.40883E-06 1.75073E-05 -9.98906E-06 -2.88647E-05\n 2.38211E+00 0.00000E+00 1.37040E-05 1.39582E-06 1.21763E-05 -5.98472E-06 -2.17295E-05\n 2.44334E+00 0.00000E+00 9.11065E-06 1.03661E-06 8.10792E-06 -3.32478E-06 -1.52497E-05\n 2.50677E+00 0.00000E+00 5.04344E-06 6.42090E-07 5.33366E-06 -1.71503E-06 -9.51395E-06\n 2.57243E+00 0.00000E+00 2.22600E-06 3.36456E-07 3.58739E-06 -8.60535E-07 -5.41557E-06\n 2.64036E+00 0.00000E+00 8.84323E-07 1.66135E-07 2.50077E-06 -4.44951E-07 -3.18683E-06\n 2.71059E+00 0.00000E+00 4.20858E-07 9.28601E-08 1.74569E-06 -2.59732E-07 -2.04956E-06\n 2.78315E+00 0.00000E+00 2.29518E-07 5.91204E-08 1.22083E-06 -1.74139E-07 -1.36133E-06\n 2.85805E+00 0.00000E+00 1.37505E-07 4.11234E-08 8.35219E-07 -1.24715E-07 -8.98031E-07\n 2.93532E+00 0.00000E+00 7.93547E-08 3.13977E-08 5.63403E-07 -9.16899E-08 -5.81061E-07\n 3.01498E+00 0.00000E+00 5.01783E-08 2.49349E-08 3.76423E-07 -6.66639E-08 -3.78038E-07\n 3.09702E+00 0.00000E+00 3.27604E-08 1.93893E-08 2.51938E-07 -4.63862E-08 -2.49761E-07\n 3.18145E+00 0.00000E+00 2.00028E-08 1.35217E-08 1.72485E-07 -3.02198E-08 -1.69477E-07\n 3.26828E+00 0.00000E+00 1.29364E-08 1.08695E-08 1.21790E-07 -1.91806E-08 -1.21927E-07\n 3.35749E+00 0.00000E+00 7.98140E-09 7.17794E-09 8.42393E-08 -1.27391E-08 -8.26798E-08\n 3.44906E+00 0.00000E+00 4.85619E-09 4.92377E-09 5.75027E-08 -8.72978E-09 -5.50762E-08\n 3.54298E+00 0.00000E+00 2.99295E-09 3.37743E-09 3.85371E-08 -6.03002E-09 -3.58257E-08\n 3.63921E+00 0.00000E+00 1.87899E-09 2.33030E-09 2.53455E-08 -4.18417E-09 -2.27507E-08\n 3.73771E+00 0.00000E+00 1.09670E-09 1.51951E-09 1.50178E-08 -2.74042E-09 -1.27235E-08\n 3.83845E+00 0.00000E+00 6.77063E-10 1.02688E-09 8.96999E-09 -1.85442E-09 -7.07163E-09\n 3.94137E+00 0.00000E+00 4.39079E-10 7.14876E-10 5.41831E-09 -1.29000E-09 -3.90607E-09\n 4.04640E+00 0.00000E+00 2.84806E-10 4.97097E-10 3.15080E-09 -8.95499E-10 -1.97738E-09\n 4.15349E+00 0.00000E+00 1.84325E-10 3.44929E-10 1.73822E-09 -6.19980E-10 -8.47260E-10\n 4.26256E+00 0.00000E+00 1.18805E-10 2.38666E-10 8.83554E-10 -4.27929E-10 -2.19397E-10\n 4.37352E+00 0.00000E+00 7.61553E-11 1.64596E-10 3.85077E-10 -2.94430E-10 1.02262E-10\n 4.48628E+00 0.00000E+00 4.84997E-11 1.13108E-10 1.08395E-10 -2.01944E-10 2.44395E-10\n 4.60074E+00 0.00000E+00 3.06648E-11 7.74389E-11 -3.42047E-11 -1.38114E-10 2.86694E-10\n 4.71680E+00 0.00000E+00 1.92395E-11 5.28244E-11 -9.86948E-11 -9.42359E-11 2.77734E-10\n 4.83435E+00 0.00000E+00 1.19752E-11 3.59084E-11 -1.19897E-10 -6.41988E-11 2.45987E-10\n 4.95326E+00 0.00000E+00 7.39417E-12 2.43332E-11 -1.18839E-10 -4.37230E-11 2.07291E-10\n 5.00000E+00 0.00000E+00 6.28005E-12 2.12655E-11 -1.14530E-10 -3.83161E-11 1.92704E-10\n"} +{"text": "<?php\n\n/**\n * This file was generated by phpSPO model generator 2020-08-05T10:16:13+00:00 16.0.20315.12009\n */\nnamespace Office365\\SharePoint;\n\nuse Office365\\Runtime\\ClientObject;\nuse Office365\\SharePoint\\UI\\ApplicationPages\\PeoplePickerQuerySettings;\n/**\n * This class \n * contains configuration settings for the client people picker control hosted by \n * the SharePoint sharing UI.\n */\nclass PickerSettings extends ClientObject\n{\n /**\n * @return bool\n */\n public function getAllowEmailAddresses()\n {\n if (!$this->isPropertyAvailable(\"AllowEmailAddresses\")) {\n return null;\n }\n return $this->getProperty(\"AllowEmailAddresses\");\n }\n /**\n * @var bool\n */\n public function setAllowEmailAddresses($value)\n {\n $this->setProperty(\"AllowEmailAddresses\", $value, true);\n }\n /**\n * @return bool\n */\n public function getAllowOnlyEmailAddresses()\n {\n if (!$this->isPropertyAvailable(\"AllowOnlyEmailAddresses\")) {\n return null;\n }\n return $this->getProperty(\"AllowOnlyEmailAddresses\");\n }\n /**\n * @var bool\n */\n public function setAllowOnlyEmailAddresses($value)\n {\n $this->setProperty(\"AllowOnlyEmailAddresses\", $value, true);\n }\n /**\n * @return string\n */\n public function getPrincipalAccountType()\n {\n if (!$this->isPropertyAvailable(\"PrincipalAccountType\")) {\n return null;\n }\n return $this->getProperty(\"PrincipalAccountType\");\n }\n /**\n * @var string\n */\n public function setPrincipalAccountType($value)\n {\n $this->setProperty(\"PrincipalAccountType\", $value, true);\n }\n /**\n * @return integer\n */\n public function getPrincipalSource()\n {\n if (!$this->isPropertyAvailable(\"PrincipalSource\")) {\n return null;\n }\n return $this->getProperty(\"PrincipalSource\");\n }\n /**\n * @var integer\n */\n public function setPrincipalSource($value)\n {\n $this->setProperty(\"PrincipalSource\", $value, true);\n }\n /**\n * @return PeoplePickerQuerySettings\n */\n public function getQuerySettings()\n {\n if (!$this->isPropertyAvailable(\"QuerySettings\")) {\n return null;\n }\n return $this->getProperty(\"QuerySettings\");\n }\n /**\n * @var PeoplePickerQuerySettings\n */\n public function setQuerySettings($value)\n {\n $this->setProperty(\"QuerySettings\", $value, true);\n }\n /**\n * @return integer\n */\n public function getVisibleSuggestions()\n {\n if (!$this->isPropertyAvailable(\"VisibleSuggestions\")) {\n return null;\n }\n return $this->getProperty(\"VisibleSuggestions\");\n }\n /**\n * @var integer\n */\n public function setVisibleSuggestions($value)\n {\n $this->setProperty(\"VisibleSuggestions\", $value, true);\n }\n /**\n * @return bool\n */\n public function getUseSubstrateSearch()\n {\n if (!$this->isPropertyAvailable(\"UseSubstrateSearch\")) {\n return null;\n }\n return $this->getProperty(\"UseSubstrateSearch\");\n }\n /**\n * @var bool\n */\n public function setUseSubstrateSearch($value)\n {\n $this->setProperty(\"UseSubstrateSearch\", $value, true);\n }\n}"} +{"text": "import React from 'react';\nimport { configure, shallow } from 'enzyme';\nimport Adapter from 'enzyme-adapter-react-16';\nimport Donation from './Donation';\n\nconfigure({ adapter: new Adapter() });\n\ndescribe('Donation', () => {\n let props;\n let mounted;\n const donation = () => {\n if (!mounted) {\n mounted = shallow(<Donation {...props} />);\n }\n return mounted;\n };\n describe('Donation', () => {\n beforeEach(() => {\n props = {\n url: 'https://front10.com'\n };\n mounted = undefined;\n });\n\n it('should render', () => {\n expect(shallow(<Donation {...props} />)).toMatchSnapshot();\n });\n\n it('always renders a div', () => {\n const divs = donation().find('img');\n\n expect(divs.length).toBe(0);\n });\n });\n});\n"} +{"text": "\nimport argparse\nimport pickle\nimport gzip\nimport pdb\n\nimport sys\nsys.path.insert(0, '../../../')\nimport equation_vae\nfrom numpy import * # need this for evaluating equations\nfrom sparse_gp import SparseGP\nimport scipy.stats as sps\nimport numpy as np\nimport os.path\nimport os\nimport copy\nimport time\n\ndef decode_from_latent_space(latent_points, grammar_model):\n\n decode_attempts = 25\n decoded_molecules = []\n for i in range(decode_attempts):\n current_decoded_molecules = grammar_model.decode(latent_points)\n decoded_molecules.append(current_decoded_molecules)\n\n # We see which ones are decoded by rdkit\n \n rdkit_molecules = []\n for i in range(decode_attempts):\n rdkit_molecules.append([])\n for j in range(latent_points.shape[ 0 ]):\n smile = np.array([ decoded_molecules[ i ][ j ] ]).astype('str')[ 0 ]\n if smile == '':\n rdkit_molecules[ i ].append(None)\n else:\n rdkit_molecules[ i ].append(smile)\n\n import collections\n\n decoded_molecules = np.array(decoded_molecules)\n rdkit_molecules = np.array(rdkit_molecules)\n\n final_smiles = []\n for i in range(latent_points.shape[ 0 ]):\n\n aux = collections.Counter(rdkit_molecules[ ~np.equal(rdkit_molecules[ :, i ], None) , i ])\n if len(aux) > 0:\n smile = aux.items()[ np.argmax(aux.values()) ][ 0 ]\n else:\n smile = None\n final_smiles.append(smile)\n\n return final_smiles\n\n# We define the functions used to load and save objects\n\ndef save_object(obj, filename):\n\n \"\"\"\n Function that saves an object to a file using pickle\n \"\"\"\n\n result = pickle.dumps(obj)\n with gzip.GzipFile(filename, 'wb') as dest: dest.write(result)\n dest.close()\n\n\ndef load_object(filename):\n\n \"\"\"\n Function that loads an object from a file using pickle\n \"\"\"\n\n with gzip.GzipFile(filename, 'rb') as source: result = source.read()\n ret = pickle.loads(result)\n source.close()\n\n return ret\n\ndirectory = \"results/\"\n\nrandom_seed = int(np.loadtxt('../random_seed.txt'))\nnp.random.seed(random_seed)\n\n# We load the data\n\nX = np.loadtxt('../../latent_features_and_targets_grammar/latent_features_eq.txt')\ny = np.loadtxt('../../latent_features_and_targets_grammar/targets_eq.txt')\ny = y.reshape((-1, 1))\n\nn = X.shape[ 0 ]\npermutation = np.random.choice(n, n, replace = False)\n\nX_train = X[ permutation, : ][ 0 : np.int(np.round(0.9 * n)), : ]\nX_test = X[ permutation, : ][ np.int(np.round(0.9 * n)) :, : ]\n\ny_train = y[ permutation ][ 0 : np.int(np.round(0.9 * n)) ]\ny_test = y[ permutation ][ np.int(np.round(0.9 * n)) : ]\n\nfor iteration in range(5):\n\n # We fit the GP\n \n np.random.seed(random_seed * iteration)\n M = 500\n sgp = SparseGP(X_train, 0 * X_train, y_train, M)\n sgp.train_via_ADAM(X_train, 0 * X_train, y_train, X_test, X_test * 0, \\\n y_test, minibatch_size = 10 * M, max_iterations = 50, learning_rate = 0.0005)\n\n pred, uncert = sgp.predict(X_test, 0 * X_test)\n error = np.sqrt(np.mean((pred - y_test)**2))\n testll = np.mean(sps.norm.logpdf(pred - y_test, scale = np.sqrt(uncert)))\n print 'Test RMSE: ', error\n print 'Test ll: ', testll\n\n pred, uncert = sgp.predict(X_train, 0 * X_train)\n error = np.sqrt(np.mean((pred - y_train)**2))\n trainll = np.mean(sps.norm.logpdf(pred - y_train, scale = np.sqrt(uncert)))\n print 'Train RMSE: ', error\n print 'Train ll: ', trainll\n\n grammar_weights = \"../../../pretrained/eq_vae_grammar_h100_c234_L25_E50_batchB.hdf5\"\n grammar_model = equation_vae.EquationGrammarModel(grammar_weights,latent_rep_size = 25)\n\n # We pick the next 50 inputs\n\n next_inputs = sgp.batched_greedy_ei(50, np.min(X_train, 0), np.max(X_train, 0))\n\n valid_eq_final = decode_from_latent_space(next_inputs, grammar_model)\n\n new_features = next_inputs\n\n save_object(valid_eq_final, directory + \"valid_eq_{}.dat\".format(iteration))\n\n x = np.loadtxt('../../latent_features_and_targets_grammar/x_eq.txt')\n yT = np.loadtxt('../../latent_features_and_targets_grammar/true_y_eq.txt')\n\n scores = []\n WORST = 1000\n for i in range(len(valid_eq_final)):\n if valid_eq_final[ i ] is not None: \n try:\n score = np.log(1+np.mean(np.minimum((np.array(eval(valid_eq_final[i])) - yT)**2, WORST)))\n except:\n score = np.log(1+WORST)\n if not np.isfinite(score):\n score = np.log(1+WORST)\n else:\n score = np.log(1+WORST)\n\n scores.append(score)\n print(i)\n\n print(valid_eq_final)\n print(scores)\n\n save_object(scores, directory + \"scores_eq_{}.dat\".format(iteration))\n\n if len(new_features) > 0:\n X_train = np.concatenate([ X_train, new_features ], 0)\n y_train = np.concatenate([ y_train, np.array(scores)[ :, None ] ], 0)\n"} +{"text": "import sys, os\nsys.path.insert(1, os.path.join(\"..\",\"..\",\"..\"))\nimport h2o\nfrom tests import pyunit_utils\nfrom h2o.estimators.deeplearning import H2ODeepLearningEstimator\n\ndef checkpoint_new_category_in_response():\n\n\n sv = h2o.upload_file(pyunit_utils.locate(\"smalldata/iris/setosa_versicolor.csv\"))\n iris = h2o.upload_file(pyunit_utils.locate(\"smalldata/iris/iris.csv\"))\n\n sv = h2o.upload_file(pyunit_utils.locate(\"smalldata/iris/setosa_versicolor.csv\"))\n iris = h2o.upload_file(pyunit_utils.locate(\"smalldata/iris/iris.csv\"))\n\n m1 = H2ODeepLearningEstimator(epochs=100)\n m1.train(x=[0,1,2,3], y=4, training_frame=sv)\n\n # attempt to continue building model, but with an expanded categorical response domain.\n # this should fail\n try:\n m2 = H2ODeepLearningEstimator(checkpoint=m1.model_id,epochs=200)\n m2.train(x=[0,1,2,3], y=4, training_frame=iris)\n assert False, \"Expected continued model-building to fail with new categories introduced in response\"\n except EnvironmentError:\n pass\n\nif __name__ == \"__main__\":\n pyunit_utils.standalone_test(checkpoint_new_category_in_response)\nelse:\n checkpoint_new_category_in_response()"} +{"text": "#!/usr/bin/env python\nimport os\nimport sys\n\nif __name__ == \"__main__\":\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"config.settings\")\n try:\n from django.core.management import execute_from_command_line\n except ImportError:\n # The above import may fail for some other reason. Ensure that the\n # issue is really that Django is missing to avoid masking other\n # exceptions on Python 2.\n try:\n import django\n except ImportError:\n raise ImportError(\n \"Couldn't import Django. Are you sure it's installed and \"\n \"available on your PYTHONPATH environment variable? Did you \"\n \"forget to activate a virtual environment?\"\n )\n raise\n execute_from_command_line(sys.argv)\n"} +{"text": "//\n// ReplaySubjectTest.swift\n// Tests\n//\n// Created by Ryszkiewicz Peter, US-204 on 5/18/16.\n// Copyright © 2016 Krunoslav Zaher. All rights reserved.\n//\n\nimport XCTest\nimport RxSwift\nimport RxTest\n\nclass ReplaySubjectTest: RxTest {\n\n func test_hasObserversNoObservers() {\n let scheduler = TestScheduler(initialClock: 0)\n\n var subject: ReplaySubject<Int>! = nil\n\n scheduler.scheduleAt(100) { subject = ReplaySubject.create(bufferSize: 1) }\n scheduler.scheduleAt(250) { XCTAssertFalse(subject.hasObservers) }\n\n scheduler.start()\n }\n\n func test_hasObserversOneObserver() {\n let scheduler = TestScheduler(initialClock: 0)\n\n var subject: ReplaySubject<Int>! = nil\n\n let results1 = scheduler.createObserver(Int.self)\n var subscription1: Disposable! = nil\n\n scheduler.scheduleAt(100) { subject = ReplaySubject.create(bufferSize: 1) }\n scheduler.scheduleAt(250) { XCTAssertFalse(subject.hasObservers) }\n scheduler.scheduleAt(300) { subscription1 = subject.subscribe(results1) }\n scheduler.scheduleAt(350) { XCTAssertTrue(subject.hasObservers) }\n scheduler.scheduleAt(400) { subscription1.dispose() }\n scheduler.scheduleAt(450) { XCTAssertFalse(subject.hasObservers) }\n\n scheduler.start()\n }\n\n func test_hasObserversManyObserver() {\n let scheduler = TestScheduler(initialClock: 0)\n\n var subject: ReplaySubject<Int>! = nil\n\n let results1 = scheduler.createObserver(Int.self)\n var subscription1: Disposable! = nil\n\n let results2 = scheduler.createObserver(Int.self)\n var subscription2: Disposable! = nil\n\n let results3 = scheduler.createObserver(Int.self)\n var subscription3: Disposable! = nil\n\n scheduler.scheduleAt(100) { subject = ReplaySubject.create(bufferSize: 1) }\n scheduler.scheduleAt(250) { XCTAssertFalse(subject.hasObservers) }\n scheduler.scheduleAt(300) { subscription1 = subject.subscribe(results1) }\n scheduler.scheduleAt(301) { subscription2 = subject.subscribe(results2) }\n scheduler.scheduleAt(302) { subscription3 = subject.subscribe(results3) }\n scheduler.scheduleAt(350) { XCTAssertTrue(subject.hasObservers) }\n scheduler.scheduleAt(400) { subscription1.dispose() }\n scheduler.scheduleAt(405) { XCTAssertTrue(subject.hasObservers) }\n scheduler.scheduleAt(410) { subscription2.dispose() }\n scheduler.scheduleAt(415) { XCTAssertTrue(subject.hasObservers) }\n scheduler.scheduleAt(420) { subscription3.dispose() }\n scheduler.scheduleAt(450) { XCTAssertFalse(subject.hasObservers) }\n \n scheduler.start()\n }\n}\n"} +{"text": "package ONVIF::Analytics::Types::RelativeFocus;\nuse strict;\nuse warnings;\n\n\n__PACKAGE__->_set_element_form_qualified(1);\n\nsub get_xmlns { 'http://www.onvif.org/ver10/schema' };\n\nour $XML_ATTRIBUTE_CLASS;\nundef $XML_ATTRIBUTE_CLASS;\n\nsub __get_attr_class {\n return $XML_ATTRIBUTE_CLASS;\n}\n\nuse Class::Std::Fast::Storable constructor => 'none';\nuse base qw(SOAP::WSDL::XSD::Typelib::ComplexType);\n\nClass::Std::initialize();\n\n{ # BLOCK to scope variables\n\nmy %Distance_of :ATTR(:get<Distance>);\nmy %Speed_of :ATTR(:get<Speed>);\n\n__PACKAGE__->_factory(\n [ qw( Distance\n Speed\n\n ) ],\n {\n 'Distance' => \\%Distance_of,\n 'Speed' => \\%Speed_of,\n },\n {\n 'Distance' => 'SOAP::WSDL::XSD::Typelib::Builtin::float',\n 'Speed' => 'SOAP::WSDL::XSD::Typelib::Builtin::float',\n },\n {\n\n 'Distance' => 'Distance',\n 'Speed' => 'Speed',\n }\n);\n\n} # end BLOCK\n\n\n\n\n\n\n\n\n1;\n\n\n=pod\n\n=head1 NAME\n\nONVIF::Analytics::Types::RelativeFocus\n\n=head1 DESCRIPTION\n\nPerl data type class for the XML Schema defined complexType\nRelativeFocus from the namespace http://www.onvif.org/ver10/schema.\n\n\n\n\n\n\n=head2 PROPERTIES\n\nThe following properties may be accessed using get_PROPERTY / set_PROPERTY\nmethods:\n\n=over\n\n=item * Distance\n\n\n=item * Speed\n\n\n\n\n=back\n\n\n=head1 METHODS\n\n=head2 new\n\nConstructor. The following data structure may be passed to new():\n\n { # ONVIF::Analytics::Types::RelativeFocus\n Distance => $some_value, # float\n Speed => $some_value, # float\n },\n\n\n\n\n=head1 AUTHOR\n\nGenerated by SOAP::WSDL\n\n=cut\n\n"} +{"text": "/*-\n * Copyright (c) 1986 The Regents of the University of California.\n * All rights reserved.\n *\n * This code is derived from software contributed to Berkeley by\n * Computer Consoles Inc.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * 3. All advertising materials mentioning features or use of this software\n * must display the following acknowledgement:\n *\tThis product includes software developed by the University of\n *\tCalifornia, Berkeley and its contributors.\n * 4. Neither the name of the University nor the names of its contributors\n * may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n *\t@(#)Awriteable.c\t7.1 (Berkeley) 12/6/90\n */\n\n#include \"align.h\" \n\nlong writeable(infop, address, length)\nprocess_info \t*infop;\nlong\t\taddress, length;\n/*\n * Return TRUE (= -1) if the specified bytes can be written without an access\n * control violation (limit and/or protection). Page faults are OK.\n * If problems, return the code that would be pushed by HW on the\n * stack (see the architecture manual).\n * Assumption is that in most cases, access is OK, so a quick 'probew'\n * will be enough. If not, we have to work harder to determine the exact\n * cause and return the right code, without getting the fault here in\n * the kernel !!.\n *\n * The address is assumed to be write for the user.!\n */\n{\n\tregister\tlong\tRegister_12;\t/* Has to be first reg ! */\n\tregister\tlong\tRegister_11;\n\tregister\tlong\tRegister_10;\n\tregister\tlong\tRegister_9;\n\tregister\tlong\tRegister_8;\n\tregister\tlong\tsubspace;\n\tregister\tlong\tlast_page;\n\n\tRegister_12 = address;\n\tRegister_11 = length-1;\n\tasm (\"\t\tprobew\t$1,(r12),$1\t\");\t/* Yeach ... */\n\tasm (\"\t\tbeql\tno_access\t\");\n\tasm (\"\t\taddl2\tr11,r12\t\t\");\t/* last byte */\n\tasm (\"\t\tprobew\t$1,(r12),$1\t\");\n\tasm (\"\t\tbeql\tno_access\t\");\n\tasm (\"\t\tmovl\t$-1,r0\t\t\");\t/* TRUE */\n\tasm (\"\t\tret#1\t\t\t\");\n\tasm (\"no_access:\t\t\t\");\n/*\n * Now the hard work. Have to check length violation first.\n * If any byte (first or last) causes a length violation, report it as such.\n */\n\tasm (\"\tmfpr\t$3,r8\t\");\t/* Get length registers. P0LR */\n\tasm (\"\tmfpr\t$5,r9\t\");\t/* P1LR */\n\tasm (\"\tmfpr\t$7,r10\t\");\t/* P2LR */\n\tasm (\"\tmfpr\t$1,r11\t\");\t/* SLR */\n\n\tsubspace = (address >> 30) & 3;\n\tRegister_12 = (address >> 10) & 0xfffff;\t/* 1'st byte page # */\n\tlast_page = ( (address+length-1) >> 10) & 0xfffff;\n\tswitch ( subspace ) {\n\tcase 0:\n\t\tif ( (Register_12 >= Register_8) ||\n\t\t (last_page >= Register_8) ) return (1);\n\t\tbreak;\n\tcase 1:\n\t\tif ( (Register_12 >= Register_9) ||\n\t\t (last_page >= Register_9) ) return (1);\n\t\tbreak;\n\tcase 2:\n\t\tif ( (Register_12 < Register_10) ||\n\t\t (last_page < Register_10) ) return (1);\n\t\tbreak;\n\tcase 3:\n\t\tif ( (Register_12 >= Register_11) ||\n\t\t (last_page >= Register_11) ) return (1);\n\t\tbreak;\n\t}\n/*\n * OK, it's not a length violation. Must have been an access problem\n * (no write by user).\n *\n * NOTE : I definitely ignore the case of 'no PTE access' since I\n *\tassume that's not the case for user mode. Besides, the poor\n *\tguy will just get an access violation that will most probably\n *\tsend him into hyperspace anyway, so no need to be too acurate here.\n */\n\treturn (4);\n}\n"} +{"text": "module.exports = require('./matchesProperty');\n"} +{"text": "&&&& RUNNING TensorRT.trtexec # trtexec --deploy=/data/weiwei/AIMatrix/ai-matrix-github-4/ai-matrix/macro_benchmark/CNN_Caffe/googlenet_bvlc.prototxt --output=prob --batch=32 --iterations=1 --avgRuns=500 --model=/data/weiwei/AIMatrix/ai-matrix-github-4/ai-matrix/macro_benchmark/CNN_Caffe/googlenet_bvlc.caffemodel --int8\n[I] deploy: /data/weiwei/AIMatrix/ai-matrix-github-4/ai-matrix/macro_benchmark/CNN_Caffe/googlenet_bvlc.prototxt\n[I] output: prob\n[I] batch: 32\n[I] iterations: 1\n[I] avgRuns: 500\n[I] model: /data/weiwei/AIMatrix/ai-matrix-github-4/ai-matrix/macro_benchmark/CNN_Caffe/googlenet_bvlc.caffemodel\n[I] int8\n[I] Input \"data\": 3x224x224\n[I] Output \"prob\": 1000x1x1\n[I] Average over 500 runs is 6.16044 ms (host walltime is 8.48324 ms, 99% percentile time is 6.28486).\n&&&& PASSED TensorRT.trtexec # trtexec --deploy=/data/weiwei/AIMatrix/ai-matrix-github-4/ai-matrix/macro_benchmark/CNN_Caffe/googlenet_bvlc.prototxt --output=prob --batch=32 --iterations=1 --avgRuns=500 --model=/data/weiwei/AIMatrix/ai-matrix-github-4/ai-matrix/macro_benchmark/CNN_Caffe/googlenet_bvlc.caffemodel --int8\n"} +{"text": "/*\n * librdkafka - Apache Kafka C/C++ library\n *\n * Copyright (c) 2014 Magnus Edenhill\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n *\n * 1. Redistributions of source code must retain the above copyright notice,\n * this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright notice,\n * this list of conditions and the following disclaimer in the documentation\n * and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n */\n\n#include <iostream>\n#include <string>\n#include <list>\n#include <cerrno>\n\n#include \"rdkafkacpp_int.h\"\n\nRdKafka::Headers *RdKafka::Headers::create() {\n return new RdKafka::HeadersImpl();\n}\n\nRdKafka::Headers *RdKafka::Headers::create(const std::vector<Header> &headers) {\n if (headers.size() > 0)\n return new RdKafka::HeadersImpl(headers);\n else\n return new RdKafka::HeadersImpl();\n}\n\nRdKafka::Headers::~Headers() {}\n"} +{"text": "/* Copyright (C) 1991-2018 Free Software Foundation, Inc.\n This file is part of the GNU C Library.\n\n The GNU C Library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Lesser General Public\n License as published by the Free Software Foundation; either\n version 2.1 of the License, or (at your option) any later version.\n\n The GNU C Library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Lesser General Public License for more details.\n\n You should have received a copy of the GNU Lesser General Public\n License along with the GNU C Library; if not, see\n <http://www.gnu.org/licenses/>. */\n\n#include <stdlib.h>\n#include <unistd.h>\n\n#include <shlib-compat.h>\n\n/* Some programs and especially the libc itself have to be careful\n what values to accept from the environment. This special version\n checks for SUID or SGID first before doing any work. */\nchar *\n__libc_secure_getenv (const char *name)\n{\n return __libc_enable_secure ? NULL : getenv (name);\n}\nweak_alias (__libc_secure_getenv, secure_getenv)\nlibc_hidden_weak (__libc_secure_getenv)\n\n#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_17)\ncompat_symbol (libc, __libc_secure_getenv, __secure_getenv, GLIBC_2_0);\n#endif\n"} +{"text": "op {\n graph_op_name: \"FresnelCos\"\n visibility: HIDDEN\n}\n"} +{"text": "/* \n * mutex5.c\n *\n *\n * --------------------------------------------------------------------------\n *\n * Pthreads-win32 - POSIX Threads Library for Win32\n * Copyright(C) 1998 John E. Bossom\n * Copyright(C) 1999,2005 Pthreads-win32 contributors\n * \n * Contact Email: rpj@callisto.canberra.edu.au\n * \n * The current list of contributors is contained\n * in the file CONTRIBUTORS included with the source\n * code distribution. The list can also be seen at the\n * following World Wide Web location:\n * http://sources.redhat.com/pthreads-win32/contributors.html\n * \n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2 of the License, or (at your option) any later version.\n * \n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n * \n * You should have received a copy of the GNU Lesser General Public\n * License along with this library in the file COPYING.LIB;\n * if not, write to the Free Software Foundation, Inc.,\n * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\n *\n * --------------------------------------------------------------------------\n *\n * Confirm the equality/inequality of the various mutex types,\n * and the default not-set value.\n */\n\n#include \"test.h\"\n\nstatic pthread_mutexattr_t mxAttr;\n\n/* Prevent optimiser from removing dead or obvious asserts. */\nint _optimiseFoil;\n#define FOIL(x) (_optimiseFoil = x)\n\nint\nmain()\n{\n int mxType = -1;\n\n assert(FOIL(PTHREAD_MUTEX_DEFAULT) == PTHREAD_MUTEX_NORMAL);\n assert(FOIL(PTHREAD_MUTEX_DEFAULT) != PTHREAD_MUTEX_ERRORCHECK);\n assert(FOIL(PTHREAD_MUTEX_DEFAULT) != PTHREAD_MUTEX_RECURSIVE);\n assert(FOIL(PTHREAD_MUTEX_RECURSIVE) != PTHREAD_MUTEX_ERRORCHECK);\n\n assert(FOIL(PTHREAD_MUTEX_NORMAL) == PTHREAD_MUTEX_FAST_NP);\n assert(FOIL(PTHREAD_MUTEX_RECURSIVE) == PTHREAD_MUTEX_RECURSIVE_NP);\n assert(FOIL(PTHREAD_MUTEX_ERRORCHECK) == PTHREAD_MUTEX_ERRORCHECK_NP);\n\n assert(pthread_mutexattr_init(&mxAttr) == 0);\n assert(pthread_mutexattr_gettype(&mxAttr, &mxType) == 0);\n assert(mxType == PTHREAD_MUTEX_NORMAL);\n\n return 0;\n}\n"} +{"text": "<html>\n <body>\n <head>\n <title>My Title</title>\n <script src=\"/jquery.js\"></script>\n <script src=\"/jquery.ui.js\"></script>\n </head>\n </body>\n</html>"} +{"text": "# From https://lists.x.org/archives/xorg-announce/2017-January/002762.html\nsha256 9e5119d974c3e2221994542d35e3a0b3426a441869ddd6dd08a84f324856ac3f xf86-video-trident-1.3.8.tar.bz2\n"} +{"text": "/*\n * Licensed to Elasticsearch B.V. under one or more contributor\n * license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright\n * ownership. Elasticsearch B.V. licenses this file to you under\n * the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nexport { EuiFormHelpText, EuiFormHelpTextProps } from './form_help_text';\n"} +{"text": "def a():\n d = {}\n for i in range(100):\n d.update({str(i): i*2})\n return d\n"} +{"text": "# Copyright 2016 The TensorFlow Authors. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ==============================================================================\n\n\"\"\"Eval pre-trained 1 billion word language model.\n\"\"\"\nimport os\nimport sys\n\nimport numpy as np\nimport tensorflow as tf\n\nfrom google.protobuf import text_format\nimport data_utils\n\nFLAGS = tf.flags.FLAGS\n# General flags.\ntf.flags.DEFINE_string('mode', 'eval',\n 'One of [sample, eval, dump_emb, dump_lstm_emb]. '\n '\"sample\" mode samples future word predictions, using '\n 'FLAGS.prefix as prefix (prefix could be left empty). '\n '\"eval\" mode calculates perplexity of the '\n 'FLAGS.input_data. '\n '\"dump_emb\" mode dumps word and softmax embeddings to '\n 'FLAGS.save_dir. embeddings are dumped in the same '\n 'order as words in vocabulary. All words in vocabulary '\n 'are dumped.'\n 'dump_lstm_emb dumps lstm embeddings of FLAGS.sentence '\n 'to FLAGS.save_dir.')\ntf.flags.DEFINE_string('pbtxt', '',\n 'GraphDef proto text file used to construct model '\n 'structure.')\ntf.flags.DEFINE_string('ckpt', '',\n 'Checkpoint directory used to fill model values.')\ntf.flags.DEFINE_string('vocab_file', '', 'Vocabulary file.')\ntf.flags.DEFINE_string('save_dir', '',\n 'Used for \"dump_emb\" mode to save word embeddings.')\n# sample mode flags.\ntf.flags.DEFINE_string('prefix', '',\n 'Used for \"sample\" mode to predict next words.')\ntf.flags.DEFINE_integer('max_sample_words', 100,\n 'Sampling stops either when </S> is met or this number '\n 'of steps has passed.')\ntf.flags.DEFINE_integer('num_samples', 3,\n 'Number of samples to generate for the prefix.')\n# dump_lstm_emb mode flags.\ntf.flags.DEFINE_string('sentence', '',\n 'Used as input for \"dump_lstm_emb\" mode.')\n# eval mode flags.\ntf.flags.DEFINE_string('input_data', '',\n 'Input data files for eval model.')\ntf.flags.DEFINE_integer('max_eval_steps', 1000000,\n 'Maximum mumber of steps to run \"eval\" mode.')\n\n\n# For saving demo resources, use batch size 1 and step 1.\nBATCH_SIZE = 1\nNUM_TIMESTEPS = 1\nMAX_WORD_LEN = 50\n\n\ndef _LoadModel(gd_file, ckpt_file):\n \"\"\"Load the model from GraphDef and Checkpoint.\n\n Args:\n gd_file: GraphDef proto text file.\n ckpt_file: TensorFlow Checkpoint file.\n\n Returns:\n TensorFlow session and tensors dict.\n \"\"\"\n with tf.Graph().as_default():\n sys.stderr.write('Recovering graph.\\n')\n with tf.gfile.FastGFile(gd_file, 'r') as f:\n s = f.read()\n gd = tf.GraphDef()\n text_format.Merge(s, gd)\n\n tf.logging.info('Recovering Graph %s', gd_file)\n t = {}\n [t['states_init'], t['lstm/lstm_0/control_dependency'],\n t['lstm/lstm_1/control_dependency'], t['softmax_out'], t['class_ids_out'],\n t['class_weights_out'], t['log_perplexity_out'], t['inputs_in'],\n t['targets_in'], t['target_weights_in'], t['char_inputs_in'],\n t['all_embs'], t['softmax_weights'], t['global_step']\n ] = tf.import_graph_def(gd, {}, ['states_init',\n 'lstm/lstm_0/control_dependency:0',\n 'lstm/lstm_1/control_dependency:0',\n 'softmax_out:0',\n 'class_ids_out:0',\n 'class_weights_out:0',\n 'log_perplexity_out:0',\n 'inputs_in:0',\n 'targets_in:0',\n 'target_weights_in:0',\n 'char_inputs_in:0',\n 'all_embs_out:0',\n 'Reshape_3:0',\n 'global_step:0'], name='')\n\n sys.stderr.write('Recovering checkpoint %s\\n' % ckpt_file)\n sess = tf.Session(config=tf.ConfigProto(allow_soft_placement=True))\n sess.run('save/restore_all', {'save/Const:0': ckpt_file})\n sess.run(t['states_init'])\n\n return sess, t\n\n\ndef _EvalModel(dataset):\n \"\"\"Evaluate model perplexity using provided dataset.\n\n Args:\n dataset: LM1BDataset object.\n \"\"\"\n sess, t = _LoadModel(FLAGS.pbtxt, FLAGS.ckpt)\n\n current_step = t['global_step'].eval(session=sess)\n sys.stderr.write('Loaded step %d.\\n' % current_step)\n\n data_gen = dataset.get_batch(BATCH_SIZE, NUM_TIMESTEPS, forever=False)\n sum_num = 0.0\n sum_den = 0.0\n perplexity = 0.0\n for i, (inputs, char_inputs, _, targets, weights) in enumerate(data_gen):\n input_dict = {t['inputs_in']: inputs,\n t['targets_in']: targets,\n t['target_weights_in']: weights}\n if 'char_inputs_in' in t:\n input_dict[t['char_inputs_in']] = char_inputs\n log_perp = sess.run(t['log_perplexity_out'], feed_dict=input_dict)\n\n if np.isnan(log_perp):\n sys.stderr.error('log_perplexity is Nan.\\n')\n else:\n sum_num += log_perp * weights.mean()\n sum_den += weights.mean()\n if sum_den > 0:\n perplexity = np.exp(sum_num / sum_den)\n\n sys.stderr.write('Eval Step: %d, Average Perplexity: %f.\\n' %\n (i, perplexity))\n\n if i > FLAGS.max_eval_steps:\n break\n\n\ndef _SampleSoftmax(softmax):\n return min(np.sum(np.cumsum(softmax) < np.random.rand()), len(softmax) - 1)\n\n\ndef _SampleModel(prefix_words, vocab):\n \"\"\"Predict next words using the given prefix words.\n\n Args:\n prefix_words: Prefix words.\n vocab: Vocabulary. Contains max word chard id length and converts between\n words and ids.\n \"\"\"\n targets = np.zeros([BATCH_SIZE, NUM_TIMESTEPS], np.int32)\n weights = np.ones([BATCH_SIZE, NUM_TIMESTEPS], np.float32)\n\n sess, t = _LoadModel(FLAGS.pbtxt, FLAGS.ckpt)\n\n if prefix_words.find('<S>') != 0:\n prefix_words = '<S> ' + prefix_words\n\n prefix = [vocab.word_to_id(w) for w in prefix_words.split()]\n prefix_char_ids = [vocab.word_to_char_ids(w) for w in prefix_words.split()]\n for _ in xrange(FLAGS.num_samples):\n inputs = np.zeros([BATCH_SIZE, NUM_TIMESTEPS], np.int32)\n char_ids_inputs = np.zeros(\n [BATCH_SIZE, NUM_TIMESTEPS, vocab.max_word_length], np.int32)\n samples = prefix[:]\n char_ids_samples = prefix_char_ids[:]\n sent = ''\n while True:\n inputs[0, 0] = samples[0]\n char_ids_inputs[0, 0, :] = char_ids_samples[0]\n samples = samples[1:]\n char_ids_samples = char_ids_samples[1:]\n\n softmax = sess.run(t['softmax_out'],\n feed_dict={t['char_inputs_in']: char_ids_inputs,\n t['inputs_in']: inputs,\n t['targets_in']: targets,\n t['target_weights_in']: weights})\n\n sample = _SampleSoftmax(softmax[0])\n sample_char_ids = vocab.word_to_char_ids(vocab.id_to_word(sample))\n\n if not samples:\n samples = [sample]\n char_ids_samples = [sample_char_ids]\n sent += vocab.id_to_word(samples[0]) + ' '\n sys.stderr.write('%s\\n' % sent)\n\n if (vocab.id_to_word(samples[0]) == '</S>' or\n len(sent) > FLAGS.max_sample_words):\n break\n\n\ndef _DumpEmb(vocab):\n \"\"\"Dump the softmax weights and word embeddings to files.\n\n Args:\n vocab: Vocabulary. Contains vocabulary size and converts word to ids.\n \"\"\"\n assert FLAGS.save_dir, 'Must specify FLAGS.save_dir for dump_emb.'\n inputs = np.zeros([BATCH_SIZE, NUM_TIMESTEPS], np.int32)\n targets = np.zeros([BATCH_SIZE, NUM_TIMESTEPS], np.int32)\n weights = np.ones([BATCH_SIZE, NUM_TIMESTEPS], np.float32)\n\n sess, t = _LoadModel(FLAGS.pbtxt, FLAGS.ckpt)\n\n softmax_weights = sess.run(t['softmax_weights'])\n fname = FLAGS.save_dir + '/embeddings_softmax.npy'\n with tf.gfile.Open(fname, mode='w') as f:\n np.save(f, softmax_weights)\n sys.stderr.write('Finished softmax weights\\n')\n\n all_embs = np.zeros([vocab.size, 1024])\n for i in range(vocab.size):\n input_dict = {t['inputs_in']: inputs,\n t['targets_in']: targets,\n t['target_weights_in']: weights}\n if 'char_inputs_in' in t:\n input_dict[t['char_inputs_in']] = (\n vocab.word_char_ids[i].reshape([-1, 1, MAX_WORD_LEN]))\n embs = sess.run(t['all_embs'], input_dict)\n all_embs[i, :] = embs\n sys.stderr.write('Finished word embedding %d/%d\\n' % (i, vocab.size))\n\n fname = FLAGS.save_dir + '/embeddings_char_cnn.npy'\n with tf.gfile.Open(fname, mode='w') as f:\n np.save(f, all_embs)\n sys.stderr.write('Embedding file saved\\n')\n\n\ndef _DumpSentenceEmbedding(sentence, vocab):\n \"\"\"Predict next words using the given prefix words.\n\n Args:\n sentence: Sentence words.\n vocab: Vocabulary. Contains max word chard id length and converts between\n words and ids.\n \"\"\"\n targets = np.zeros([BATCH_SIZE, NUM_TIMESTEPS], np.int32)\n weights = np.ones([BATCH_SIZE, NUM_TIMESTEPS], np.float32)\n\n sess, t = _LoadModel(FLAGS.pbtxt, FLAGS.ckpt)\n\n if sentence.find('<S>') != 0:\n sentence = '<S> ' + sentence\n\n word_ids = [vocab.word_to_id(w) for w in sentence.split()]\n char_ids = [vocab.word_to_char_ids(w) for w in sentence.split()]\n\n inputs = np.zeros([BATCH_SIZE, NUM_TIMESTEPS], np.int32)\n char_ids_inputs = np.zeros(\n [BATCH_SIZE, NUM_TIMESTEPS, vocab.max_word_length], np.int32)\n for i in xrange(len(word_ids)):\n inputs[0, 0] = word_ids[i]\n char_ids_inputs[0, 0, :] = char_ids[i]\n\n # Add 'lstm/lstm_0/control_dependency' if you want to dump previous layer\n # LSTM.\n lstm_emb = sess.run(t['lstm/lstm_1/control_dependency'],\n feed_dict={t['char_inputs_in']: char_ids_inputs,\n t['inputs_in']: inputs,\n t['targets_in']: targets,\n t['target_weights_in']: weights})\n\n fname = os.path.join(FLAGS.save_dir, 'lstm_emb_step_%d.npy' % i)\n with tf.gfile.Open(fname, mode='w') as f:\n np.save(f, lstm_emb)\n sys.stderr.write('LSTM embedding step %d file saved\\n' % i)\n\n\ndef main(unused_argv):\n vocab = data_utils.CharsVocabulary(FLAGS.vocab_file, MAX_WORD_LEN)\n\n if FLAGS.mode == 'eval':\n dataset = data_utils.LM1BDataset(FLAGS.input_data, vocab)\n _EvalModel(dataset)\n elif FLAGS.mode == 'sample':\n _SampleModel(FLAGS.prefix, vocab)\n elif FLAGS.mode == 'dump_emb':\n _DumpEmb(vocab)\n elif FLAGS.mode == 'dump_lstm_emb':\n _DumpSentenceEmbedding(FLAGS.sentence, vocab)\n else:\n raise Exception('Mode not supported.')\n\n\nif __name__ == '__main__':\n tf.app.run()\n"} +{"text": "[Rules]\n*Log.debug=false\nLinkManagerLog.debug=false\nMAVLinkProtocolLog.debug=false\nMockLinkLog.debug=false\nFirmwareUpgradeLog.debug=false\nFileManagerLog.debug=false\nUASLog.debug=false\nPX4AirframeLoaderLog.debug=false\nSerialLinkLog.debug=false\nRadioConfigTestLog.debug=false\nPX4ParameterLoaderLog.debug=false\nRadioComponentControllerLog.debug=false\nVehicleLog.debug=false\nParameterLoaderLog.debug=false\nFactPanelControllerLog.debug=false\n"} +{"text": "///\n/// Copyright (c) 2016 Dropbox, Inc. All rights reserved.\n///\n/// Auto-generated by Stone, do not modify.\n///\n\n#import <Foundation/Foundation.h>\n\n#import \"DBSerializableProtocol.h\"\n\n@class DBTEAMLOGViewerInfoPolicyChangedType;\n\nNS_ASSUME_NONNULL_BEGIN\n\n#pragma mark - API Object\n\n///\n/// The `ViewerInfoPolicyChangedType` struct.\n///\n/// This class implements the `DBSerializable` protocol (serialize and\n/// deserialize instance methods), which is required for all Obj-C SDK API route\n/// objects.\n///\n@interface DBTEAMLOGViewerInfoPolicyChangedType : NSObject <DBSerializable, NSCopying>\n\n#pragma mark - Instance fields\n\n/// (no description).\n@property (nonatomic, readonly, copy) NSString *description_;\n\n#pragma mark - Constructors\n\n///\n/// Full constructor for the struct (exposes all instance variables).\n///\n/// @param description_ (no description).\n///\n/// @return An initialized instance.\n///\n- (instancetype)initWithDescription_:(NSString *)description_;\n\n- (instancetype)init NS_UNAVAILABLE;\n\n@end\n\n#pragma mark - Serializer Object\n\n///\n/// The serialization class for the `ViewerInfoPolicyChangedType` struct.\n///\n@interface DBTEAMLOGViewerInfoPolicyChangedTypeSerializer : NSObject\n\n///\n/// Serializes `DBTEAMLOGViewerInfoPolicyChangedType` instances.\n///\n/// @param instance An instance of the `DBTEAMLOGViewerInfoPolicyChangedType`\n/// API object.\n///\n/// @return A json-compatible dictionary representation of the\n/// `DBTEAMLOGViewerInfoPolicyChangedType` API object.\n///\n+ (nullable NSDictionary<NSString *, id> *)serialize:(DBTEAMLOGViewerInfoPolicyChangedType *)instance;\n\n///\n/// Deserializes `DBTEAMLOGViewerInfoPolicyChangedType` instances.\n///\n/// @param dict A json-compatible dictionary representation of the\n/// `DBTEAMLOGViewerInfoPolicyChangedType` API object.\n///\n/// @return An instantiation of the `DBTEAMLOGViewerInfoPolicyChangedType`\n/// object.\n///\n+ (DBTEAMLOGViewerInfoPolicyChangedType *)deserialize:(NSDictionary<NSString *, id> *)dict;\n\n@end\n\nNS_ASSUME_NONNULL_END\n"} +{"text": "(live-add-pack-lib \"clojure-mode\")\n\n;; tell clj-refactor not to eagerly eval namespaces\n;; on connection (this totally conflicts with Overtone\n;; namespaces that have ready-to-sound side-effecting\n;; functions!\n(setq cljr-eagerly-build-asts-on-startup nil)\n\n(eval-after-load 'clojure-mode\n '(font-lock-add-keywords\n 'clojure-mode `((\"(\\\\(fn\\\\)[\\[[:space:]]\"\n (0 (progn (compose-region (match-beginning 1)\n (match-end 1) \"λ\")\n nil))))))\n\n(eval-after-load 'clojure-mode\n '(font-lock-add-keywords\n 'clojure-mode `((\"\\\\(#\\\\)(\"\n (0 (progn (compose-region (match-beginning 1)\n (match-end 1) \"ƒ\")\n nil))))))\n\n(eval-after-load 'clojure-mode\n '(font-lock-add-keywords\n 'clojure-mode `((\"\\\\(#\\\\){\"\n (0 (progn (compose-region (match-beginning 1)\n (match-end 1) \"∈\")\n nil))))))\n\n(eval-after-load 'find-file-in-project\n '(add-to-list 'ffip-patterns \"*.clj\"))\n\n(require 'clojure-mode)\n\n(add-hook 'clojure-mode-hook\n (lambda ()\n (setq buffer-save-without-query t)))\n\n;;command to align let statements\n;;To use: M-x align-cljlet\n(live-add-pack-lib \"align-cljlet\")\n(require 'align-cljlet)\n\n;;Treat hyphens as a word character when transposing words\n(defvar clojure-mode-with-hyphens-as-word-sep-syntax-table\n (let ((st (make-syntax-table clojure-mode-syntax-table)))\n (modify-syntax-entry ?- \"w\" st)\n st))\n\n(defun live-transpose-words-with-hyphens (arg)\n \"Treat hyphens as a word character when transposing words\"\n (interactive \"*p\")\n (with-syntax-table clojure-mode-with-hyphens-as-word-sep-syntax-table\n (transpose-words arg)))\n\n(define-key clojure-mode-map (kbd \"M-t\") 'live-transpose-words-with-hyphens)\n\n(dolist (x '(scheme emacs-lisp lisp clojure))\n (add-hook (intern (concat (symbol-name x) \"-mode-hook\")) 'enable-paredit-mode)\n (add-hook (intern (concat (symbol-name x) \"-mode-hook\")) 'rainbow-delimiters-mode))\n\n(defun live-warn-when-cider-not-connected ()\n (interactive)\n (message \"nREPL server not connected. Run M-x cider or M-x cider-jack-in to connect.\"))\n\n(define-key clojure-mode-map (kbd \"C-M-x\") 'live-warn-when-cider-not-connected)\n(define-key clojure-mode-map (kbd \"C-x C-e\") 'live-warn-when-cider-not-connected)\n(define-key clojure-mode-map (kbd \"C-c C-e\") 'live-warn-when-cider-not-connected)\n(define-key clojure-mode-map (kbd \"C-c C-l\") 'live-warn-when-cider-not-connected)\n(define-key clojure-mode-map (kbd \"C-c C-r\") 'live-warn-when-cider-not-connected)\n"} +{"text": "import { Component } from '@angular/core';\n\n@Component({\n selector: 'app-maestro-app',\n templateUrl: './app.component.html',\n})\nexport class AppComponent {}\n"} +{"text": "/*\n * Copyright © 2020 Atomist, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {\n doWithRetry,\n RetryOptions,\n} from \"@atomist/automation-client/lib/util/retry\";\nimport { k8sErrMsg } from \"./error\";\n\n/**\n * Extract Kubernetes errors for doWithRetry.\n */\nexport async function logRetry<T>(f: () => Promise<T>, desc: string, options?: RetryOptions): Promise<T> {\n return doWithRetry(async () => {\n let r: T;\n try {\n r = await f();\n } catch (e) {\n if (!(e instanceof Error)) {\n const err = new Error(k8sErrMsg(e));\n Object.keys(e).forEach(k => (err as any)[k] = e[k]);\n throw err;\n }\n throw e;\n }\n return r;\n }, desc, options);\n}\n"} +{"text": "<?php\necho $this->Form->create('', array('type' => 'file'));\necho $this->Form->end();\n?>\n"} +{"text": "package org.scratchjr.android;\n\nimport java.io.File;\nimport java.io.IOException;\nimport java.io.RandomAccessFile;\nimport java.nio.ByteBuffer;\nimport java.nio.ByteOrder;\nimport java.nio.ShortBuffer;\nimport java.nio.channels.FileChannel;\nimport java.util.Locale;\nimport java.util.concurrent.ExecutionException;\nimport java.util.concurrent.ExecutorService;\nimport java.util.concurrent.Executors;\nimport java.util.concurrent.Future;\nimport java.util.concurrent.TimeUnit;\nimport java.util.concurrent.TimeoutException;\n\nimport android.content.pm.PackageManager;\nimport android.media.AudioFormat;\nimport android.media.AudioRecord;\nimport android.media.MediaRecorder;\nimport android.os.Build;\nimport android.util.Log;\n\n/**\n * Manages sound recording for ScratchJr.\n * \n * @author markroth8\n */\npublic class SoundRecorderManager {\n private static final String LOG_TAG = \"SoundRecorderManager\";\n\n // Recording parameters\n private static final int SAMPLE_RATE_IN_HZ_DEVICE = 22050;\n private static final int SAMPLE_RATE_IN_HZ_EMULATOR = 8000; // Emulator only supports 8Khz\n private static final int CHANNEL_CONFIG = AudioFormat.CHANNEL_IN_MONO;\n private static final int AUDIO_FORMAT = AudioFormat.ENCODING_PCM_16BIT;\n\n /** Reference to the activity */\n private ScratchJrActivity _application;\n \n /** True if there is a microphone present on this device, false if not. */\n private final boolean _hasMicrophone;\n \n /** Android AudioRecorder */\n private AudioRecord _audioRecorder = null;\n\n /** True if running in emulator (and only 8000 Hz supported) or false if not */\n private final boolean _runningInEmulator = Build.PRODUCT.startsWith(\"sdk\");\n \n /** Sample rate chosen based on whether running in emulation */\n private final int _sampleRateHz = _runningInEmulator ? SAMPLE_RATE_IN_HZ_EMULATOR : SAMPLE_RATE_IN_HZ_DEVICE;\n \n /** Minimum buffer size, based on sample rate */\n private final int _minBufferSize = Math.max(640, AudioRecord.getMinBufferSize(_sampleRateHz, CHANNEL_CONFIG, AUDIO_FORMAT));\n\n /** Current file being recorded to */\n private File _soundFile;\n \n /** RandomAccessFile for the file being recorded to */\n private RandomAccessFile _soundRandomAccessFile;\n \n /** Channel pointing to the file to be written to */\n private FileChannel _soundFileChannel;\n \n /** Buffer into which to read data */\n private final ByteBuffer _audioBuffer = ByteBuffer.allocateDirect(_minBufferSize).order(ByteOrder.LITTLE_ENDIAN);\n\n /** Short view into audio buffer */\n private final ShortBuffer _audioBufferShort = _audioBuffer.asShortBuffer();\n \n /** Thread that is recording audio */\n private final ExecutorService _audioRecordExecutor = Executors.newSingleThreadExecutor();\n \n /** Future of the audio thread in progress */\n private Future<Void> _audioWriterTask;\n \n /** Buffer for WAV header */\n private final ByteBuffer _wavHeaderBuffer = ByteBuffer.allocate(44).order(ByteOrder.LITTLE_ENDIAN);\n\n /** Id of sound currently playing */\n private Integer _soundPlayingId;\n \n /** Current volume level detected during recording, with slow decay */\n private volatile double _slowDecayVolumeLevel = 0.0;\n\n\n public SoundRecorderManager(ScratchJrActivity application) {\n Log.i(LOG_TAG, Build.PRODUCT + \" Using audio sample rate \" + _sampleRateHz + \" Hz\");\n _application = application;\n _hasMicrophone = _application.getPackageManager().hasSystemFeature(\n PackageManager.FEATURE_MICROPHONE);\n if (!_hasMicrophone) {\n Log.i(LOG_TAG, \"No microphone detected. Sound recording will be disabled.\");\n }\n }\n \n public boolean hasMicrophone() {\n return _hasMicrophone;\n }\n \n /** Called when application starts / resumes */\n public synchronized void open() {\n }\n \n /** Called when application sleeps */\n public synchronized void close() {\n releaseAudioRecorder();\n stopPlayingSound();\n }\n \n /**\n * Returns the sound name or null if error.\n */\n public synchronized String startRecord() {\n if (!_hasMicrophone) return null;\n \n String result;\n\n releaseAudioRecorder();\n stopPlayingSound();\n \n _audioRecorder = new AudioRecord(MediaRecorder.AudioSource.MIC, _sampleRateHz,\n CHANNEL_CONFIG, AUDIO_FORMAT, _minBufferSize * 16);\n \n // Mimic filename from iOS: time in seconds since 1970 as a double. Name is the md5 of the time.\n String now = String.format(Locale.US, \"%f\", System.currentTimeMillis() / 1000.0);\n String filename = String.format(\"SND%s.wav\", _application.getIOManager().md5(now));\n _soundFile = new File(_application.getFilesDir(), filename);\n File parentDir = _soundFile.getParentFile();\n if (!parentDir.exists()) {\n parentDir.mkdirs();\n }\n Log.i(LOG_TAG, \"Saving audio to file '\" + _soundFile.getPath() + \"'\");\n \n try {\n _soundRandomAccessFile = new RandomAccessFile(_soundFile, \"rw\");\n _soundFileChannel = _soundRandomAccessFile.getChannel();\n \n writeWAVHeader(_soundFileChannel, _sampleRateHz);\n \n _audioRecorder.startRecording();\n _audioWriterTask = _audioRecordExecutor.submit(new Runnable() {\n public void run() {\n String filename = _soundFile.getPath();\n long totalBytesWritten = 0;\n try {\n AudioRecord ar = _audioRecorder;\n RandomAccessFile raf = _soundRandomAccessFile;\n ByteBuffer buffer = _audioBuffer;\n ShortBuffer shortBuffer = _audioBufferShort; // Little-endian buffer\n FileChannel c = _soundFileChannel;\n while (true) {\n // Read from buffer\n buffer.rewind().limit(buffer.capacity());\n int len = ar.read(buffer, _minBufferSize);\n if ((len == -1) || ((len == 0) && (ar.getRecordingState() == AudioRecord.RECORDSTATE_STOPPED))) {\n break;\n }\n if (len == AudioRecord.ERROR_BAD_VALUE) {\n Log.e(LOG_TAG, \"AudioRecord.read() returned BAD_VALUE\");\n break;\n }\n if (len == AudioRecord.ERROR_INVALID_OPERATION) {\n Log.e(LOG_TAG, \"AudioRecord.read() returned INVALID_OPERATION\");\n break;\n }\n \n // Write to file\n buffer.rewind().limit(len);\n c.write(buffer);\n \n // Get current volume level (max of all samples taken this period)\n shortBuffer.rewind();\n int max = 0;\n while (shortBuffer.hasRemaining()) {\n int s = Math.abs(shortBuffer.get());\n if (s > max) {\n max = s;\n }\n }\n _slowDecayVolumeLevel = Math.max(1.0 * max / Short.MAX_VALUE, _slowDecayVolumeLevel * 0.85);\n \n totalBytesWritten += len;\n }\n updateWAVHeader(raf, _soundFileChannel, totalBytesWritten);\n c.close();\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Error writing wav file '\" + filename + \"'\", e);\n }\n }\n }, null);\n result = filename;\n } catch (IOException e) {\n Log.e(LOG_TAG, \"Error opening wav file '\" + _soundFile.getPath() + \"'\", e);\n result = null;\n }\n\n return result;\n }\n\n private void writeWAVHeader(FileChannel fileChannel, int sampleRateHz)\n throws IOException\n {\n ByteBuffer b = _wavHeaderBuffer;\n b.rewind().limit(b.capacity());\n b.put(\"RIFF\".getBytes());\n long totalDataLen = 0; // Placeholder until all audio is recorded\n b.putInt((int) totalDataLen);\n b.put(\"WAVE\".getBytes());\n b.put(\"fmt \".getBytes());\n b.putInt(16); // size of fmt chunk\n b.putShort((short) 1); // format = 1 (PCM)\n short channels = (short) 1;\n b.putShort(channels);\n b.putInt(sampleRateHz);\n short bitsPerSample = 16;\n short bytesPerSample = (short) (bitsPerSample / 8);\n b.putInt(sampleRateHz * channels * bytesPerSample);\n b.putShort((short) (channels * bytesPerSample));\n b.putShort(bitsPerSample);\n b.put(\"data\".getBytes());\n b.putInt(0); // Placeholder until all audio is recorded\n b.limit(b.position()).rewind();\n fileChannel.write(b);\n }\n\n private void updateWAVHeader(RandomAccessFile randomAccessFile, FileChannel fileChannel, long totalBytesWritten) \n throws IOException \n {\n ByteBuffer b = _wavHeaderBuffer;\n \n // Write totalDataLen\n randomAccessFile.seek(4);\n b.limit(8).position(4).mark();\n b.putInt((int) (totalBytesWritten + 36));\n b.reset();\n fileChannel.write(b);\n \n // Write data chunk size\n randomAccessFile.seek(40);\n b.limit(44).position(40).mark();\n b.putInt((int) (totalBytesWritten));\n b.reset();\n fileChannel.write(b);\n }\n\n public synchronized boolean stopRecord()\n throws IllegalStateException\n {\n if (!_hasMicrophone) return false;\n \n boolean result;\n\n if (_audioRecorder == null) {\n Log.e(LOG_TAG, \"Attempt to stop recording when no recording is taking place\");\n result = false;\n } else {\n _audioRecorder.stop();\n try {\n _audioWriterTask.get(5, TimeUnit.SECONDS);\n result = true;\n Log.i(LOG_TAG, \"Stopped recording. File is \" + _soundFile.length() + \" bytes\");\n } catch (InterruptedException e) {\n Log.e(LOG_TAG, \"Interrupted while waiting for audio writer to complete\", e);\n result = false;\n } catch (ExecutionException e) {\n Log.e(LOG_TAG, \"Execution exception while waiting for audio writer to complete\", e);\n result = false;\n } catch (TimeoutException e) {\n Log.e(LOG_TAG, \"Timeout while waiting for audio writer to complete\", e);\n result = false;\n } finally {\n releaseAudioRecorder();\n }\n }\n \n return result;\n }\n \n /**\n * @return The number of seconds for the sound to play\n */\n public synchronized double startPlay()\n throws IllegalStateException\n {\n if (_soundFile == null) {\n throw new IllegalArgumentException(\"No sound available.\");\n }\n stopPlayingSound();\n SoundManager soundManager = _application.getSoundManager();\n _soundPlayingId = soundManager.playSound(_soundFile.getPath());\n Log.i(LOG_TAG, \"Sound id: \" + _soundPlayingId);\n return soundManager.soundDuration(_soundPlayingId) / 1000.0;\n }\n \n public synchronized void stopPlay() {\n stopPlayingSound();\n }\n \n public synchronized void recordClose(boolean keep) {\n stopPlayingSound();\n if (!keep) {\n if (_soundFile != null) {\n _soundFile.delete();\n }\n }\n _soundFile = null;\n }\n\n /**\n * Return the volume level, from 0.0 to 1.0\n */\n public double getVolume() {\n if (!_hasMicrophone) return 0.0;\n return _slowDecayVolumeLevel;\n }\n\n private void releaseAudioRecorder() {\n if (_audioRecorder != null) {\n _audioRecorder.release();\n _audioRecorder = null;\n }\n }\n\n private void stopPlayingSound() {\n SoundManager soundManager = _application.getSoundManager();\n if (_soundPlayingId != null) {\n soundManager.stopSound(_soundPlayingId);\n _soundPlayingId = null;\n }\n }\n\n}\n"} +{"text": "/* Copyright (C) 2018 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>\n\n This program is free software: you can redistribute it and/or modify\n it under the terms of the GNU General Public License as published by\n the Free Software Foundation, either version 3 of the License, or\n (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program. If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <stdint.h>\n#include <stdlib.h>\n\n#include \"libzscanner/error.h\"\n#include \"libzscanner/functions.h\"\n\nconst uint8_t digit_to_num[] = {\n ['0'] = 0, ['1'] = 1, ['2'] = 2, ['3'] = 3, ['4'] = 4,\n ['5'] = 5, ['6'] = 6, ['7'] = 7, ['8'] = 8, ['9'] = 9,\n};\n\n/*\n * Hex transformation:\n * 1 2\n * 12345678 12345678\n * in: AAAA BBBB\n * out: AAAABBBB\n */\n\nconst uint8_t first_hex_to_num[] = {\n ['0'] = ( 0 * 16), ['6'] = ( 6 * 16), ['C'] = (12 * 16), ['b'] = (11 * 16),\n ['1'] = ( 1 * 16), ['7'] = ( 7 * 16), ['D'] = (13 * 16), ['c'] = (12 * 16),\n ['2'] = ( 2 * 16), ['8'] = ( 8 * 16), ['E'] = (14 * 16), ['d'] = (13 * 16),\n ['3'] = ( 3 * 16), ['9'] = ( 9 * 16), ['F'] = (15 * 16), ['e'] = (14 * 16),\n ['4'] = ( 4 * 16), ['A'] = (10 * 16), ['a'] = (10 * 16), ['f'] = (15 * 16),\n ['5'] = ( 5 * 16), ['B'] = (11 * 16),\n};\n\nconst uint8_t second_hex_to_num[] = {\n ['0'] = 0, ['4'] = 4, ['8'] = 8, ['C'] = 12, ['a'] = 10, ['d'] = 13,\n ['1'] = 1, ['5'] = 5, ['9'] = 9, ['D'] = 13, ['b'] = 11, ['e'] = 14,\n ['2'] = 2, ['6'] = 6, ['A'] = 10, ['E'] = 14, ['c'] = 12, ['f'] = 15,\n ['3'] = 3, ['7'] = 7, ['B'] = 11, ['F'] = 15,\n};\n\n/*\n * Base64 transformation:\n * 1 2 3 4\n * 12345678 12345678 12345678 12345678\n * in: 00AAAAAA 00BBBBBB 00CCCCCC 00DDDDDD\n * out: AAAAAABB BBBBCCCC CCDDDDDD\n */\n\n// 0x3F = 00111111\nconst uint8_t first_base64_to_num[] = {\n ['A'] = (( 0 & 0x3F) << 2), ['g'] = ((32 & 0x3F) << 2),\n ['B'] = (( 1 & 0x3F) << 2), ['h'] = ((33 & 0x3F) << 2),\n ['C'] = (( 2 & 0x3F) << 2), ['i'] = ((34 & 0x3F) << 2),\n ['D'] = (( 3 & 0x3F) << 2), ['j'] = ((35 & 0x3F) << 2),\n ['E'] = (( 4 & 0x3F) << 2), ['k'] = ((36 & 0x3F) << 2),\n ['F'] = (( 5 & 0x3F) << 2), ['l'] = ((37 & 0x3F) << 2),\n ['G'] = (( 6 & 0x3F) << 2), ['m'] = ((38 & 0x3F) << 2),\n ['H'] = (( 7 & 0x3F) << 2), ['n'] = ((39 & 0x3F) << 2),\n ['I'] = (( 8 & 0x3F) << 2), ['o'] = ((40 & 0x3F) << 2),\n ['J'] = (( 9 & 0x3F) << 2), ['p'] = ((41 & 0x3F) << 2),\n ['K'] = ((10 & 0x3F) << 2), ['q'] = ((42 & 0x3F) << 2),\n ['L'] = ((11 & 0x3F) << 2), ['r'] = ((43 & 0x3F) << 2),\n ['M'] = ((12 & 0x3F) << 2), ['s'] = ((44 & 0x3F) << 2),\n ['N'] = ((13 & 0x3F) << 2), ['t'] = ((45 & 0x3F) << 2),\n ['O'] = ((14 & 0x3F) << 2), ['u'] = ((46 & 0x3F) << 2),\n ['P'] = ((15 & 0x3F) << 2), ['v'] = ((47 & 0x3F) << 2),\n ['Q'] = ((16 & 0x3F) << 2), ['w'] = ((48 & 0x3F) << 2),\n ['R'] = ((17 & 0x3F) << 2), ['x'] = ((49 & 0x3F) << 2),\n ['S'] = ((18 & 0x3F) << 2), ['y'] = ((50 & 0x3F) << 2),\n ['T'] = ((19 & 0x3F) << 2), ['z'] = ((51 & 0x3F) << 2),\n ['U'] = ((20 & 0x3F) << 2), ['0'] = ((52 & 0x3F) << 2),\n ['V'] = ((21 & 0x3F) << 2), ['1'] = ((53 & 0x3F) << 2),\n ['W'] = ((22 & 0x3F) << 2), ['2'] = ((54 & 0x3F) << 2),\n ['X'] = ((23 & 0x3F) << 2), ['3'] = ((55 & 0x3F) << 2),\n ['Y'] = ((24 & 0x3F) << 2), ['4'] = ((56 & 0x3F) << 2),\n ['Z'] = ((25 & 0x3F) << 2), ['5'] = ((57 & 0x3F) << 2),\n ['a'] = ((26 & 0x3F) << 2), ['6'] = ((58 & 0x3F) << 2),\n ['b'] = ((27 & 0x3F) << 2), ['7'] = ((59 & 0x3F) << 2),\n ['c'] = ((28 & 0x3F) << 2), ['8'] = ((60 & 0x3F) << 2),\n ['d'] = ((29 & 0x3F) << 2), ['9'] = ((61 & 0x3F) << 2),\n ['e'] = ((30 & 0x3F) << 2), ['+'] = ((62 & 0x3F) << 2),\n ['f'] = ((31 & 0x3F) << 2), ['/'] = ((63 & 0x3F) << 2),\n};\n\n// 0x30 = 00110000\nconst uint8_t second_left_base64_to_num[] = {\n ['A'] = (( 0 & 0x30) >> 4), ['g'] = ((32 & 0x30) >> 4),\n ['B'] = (( 1 & 0x30) >> 4), ['h'] = ((33 & 0x30) >> 4),\n ['C'] = (( 2 & 0x30) >> 4), ['i'] = ((34 & 0x30) >> 4),\n ['D'] = (( 3 & 0x30) >> 4), ['j'] = ((35 & 0x30) >> 4),\n ['E'] = (( 4 & 0x30) >> 4), ['k'] = ((36 & 0x30) >> 4),\n ['F'] = (( 5 & 0x30) >> 4), ['l'] = ((37 & 0x30) >> 4),\n ['G'] = (( 6 & 0x30) >> 4), ['m'] = ((38 & 0x30) >> 4),\n ['H'] = (( 7 & 0x30) >> 4), ['n'] = ((39 & 0x30) >> 4),\n ['I'] = (( 8 & 0x30) >> 4), ['o'] = ((40 & 0x30) >> 4),\n ['J'] = (( 9 & 0x30) >> 4), ['p'] = ((41 & 0x30) >> 4),\n ['K'] = ((10 & 0x30) >> 4), ['q'] = ((42 & 0x30) >> 4),\n ['L'] = ((11 & 0x30) >> 4), ['r'] = ((43 & 0x30) >> 4),\n ['M'] = ((12 & 0x30) >> 4), ['s'] = ((44 & 0x30) >> 4),\n ['N'] = ((13 & 0x30) >> 4), ['t'] = ((45 & 0x30) >> 4),\n ['O'] = ((14 & 0x30) >> 4), ['u'] = ((46 & 0x30) >> 4),\n ['P'] = ((15 & 0x30) >> 4), ['v'] = ((47 & 0x30) >> 4),\n ['Q'] = ((16 & 0x30) >> 4), ['w'] = ((48 & 0x30) >> 4),\n ['R'] = ((17 & 0x30) >> 4), ['x'] = ((49 & 0x30) >> 4),\n ['S'] = ((18 & 0x30) >> 4), ['y'] = ((50 & 0x30) >> 4),\n ['T'] = ((19 & 0x30) >> 4), ['z'] = ((51 & 0x30) >> 4),\n ['U'] = ((20 & 0x30) >> 4), ['0'] = ((52 & 0x30) >> 4),\n ['V'] = ((21 & 0x30) >> 4), ['1'] = ((53 & 0x30) >> 4),\n ['W'] = ((22 & 0x30) >> 4), ['2'] = ((54 & 0x30) >> 4),\n ['X'] = ((23 & 0x30) >> 4), ['3'] = ((55 & 0x30) >> 4),\n ['Y'] = ((24 & 0x30) >> 4), ['4'] = ((56 & 0x30) >> 4),\n ['Z'] = ((25 & 0x30) >> 4), ['5'] = ((57 & 0x30) >> 4),\n ['a'] = ((26 & 0x30) >> 4), ['6'] = ((58 & 0x30) >> 4),\n ['b'] = ((27 & 0x30) >> 4), ['7'] = ((59 & 0x30) >> 4),\n ['c'] = ((28 & 0x30) >> 4), ['8'] = ((60 & 0x30) >> 4),\n ['d'] = ((29 & 0x30) >> 4), ['9'] = ((61 & 0x30) >> 4),\n ['e'] = ((30 & 0x30) >> 4), ['+'] = ((62 & 0x30) >> 4),\n ['f'] = ((31 & 0x30) >> 4), ['/'] = ((63 & 0x30) >> 4),\n};\n\n// 0x0F = 00001111\nconst uint8_t second_right_base64_to_num[] = {\n ['A'] = (( 0 & 0x0F) << 4), ['g'] = ((32 & 0x0F) << 4),\n ['B'] = (( 1 & 0x0F) << 4), ['h'] = ((33 & 0x0F) << 4),\n ['C'] = (( 2 & 0x0F) << 4), ['i'] = ((34 & 0x0F) << 4),\n ['D'] = (( 3 & 0x0F) << 4), ['j'] = ((35 & 0x0F) << 4),\n ['E'] = (( 4 & 0x0F) << 4), ['k'] = ((36 & 0x0F) << 4),\n ['F'] = (( 5 & 0x0F) << 4), ['l'] = ((37 & 0x0F) << 4),\n ['G'] = (( 6 & 0x0F) << 4), ['m'] = ((38 & 0x0F) << 4),\n ['H'] = (( 7 & 0x0F) << 4), ['n'] = ((39 & 0x0F) << 4),\n ['I'] = (( 8 & 0x0F) << 4), ['o'] = ((40 & 0x0F) << 4),\n ['J'] = (( 9 & 0x0F) << 4), ['p'] = ((41 & 0x0F) << 4),\n ['K'] = ((10 & 0x0F) << 4), ['q'] = ((42 & 0x0F) << 4),\n ['L'] = ((11 & 0x0F) << 4), ['r'] = ((43 & 0x0F) << 4),\n ['M'] = ((12 & 0x0F) << 4), ['s'] = ((44 & 0x0F) << 4),\n ['N'] = ((13 & 0x0F) << 4), ['t'] = ((45 & 0x0F) << 4),\n ['O'] = ((14 & 0x0F) << 4), ['u'] = ((46 & 0x0F) << 4),\n ['P'] = ((15 & 0x0F) << 4), ['v'] = ((47 & 0x0F) << 4),\n ['Q'] = ((16 & 0x0F) << 4), ['w'] = ((48 & 0x0F) << 4),\n ['R'] = ((17 & 0x0F) << 4), ['x'] = ((49 & 0x0F) << 4),\n ['S'] = ((18 & 0x0F) << 4), ['y'] = ((50 & 0x0F) << 4),\n ['T'] = ((19 & 0x0F) << 4), ['z'] = ((51 & 0x0F) << 4),\n ['U'] = ((20 & 0x0F) << 4), ['0'] = ((52 & 0x0F) << 4),\n ['V'] = ((21 & 0x0F) << 4), ['1'] = ((53 & 0x0F) << 4),\n ['W'] = ((22 & 0x0F) << 4), ['2'] = ((54 & 0x0F) << 4),\n ['X'] = ((23 & 0x0F) << 4), ['3'] = ((55 & 0x0F) << 4),\n ['Y'] = ((24 & 0x0F) << 4), ['4'] = ((56 & 0x0F) << 4),\n ['Z'] = ((25 & 0x0F) << 4), ['5'] = ((57 & 0x0F) << 4),\n ['a'] = ((26 & 0x0F) << 4), ['6'] = ((58 & 0x0F) << 4),\n ['b'] = ((27 & 0x0F) << 4), ['7'] = ((59 & 0x0F) << 4),\n ['c'] = ((28 & 0x0F) << 4), ['8'] = ((60 & 0x0F) << 4),\n ['d'] = ((29 & 0x0F) << 4), ['9'] = ((61 & 0x0F) << 4),\n ['e'] = ((30 & 0x0F) << 4), ['+'] = ((62 & 0x0F) << 4),\n ['f'] = ((31 & 0x0F) << 4), ['/'] = ((63 & 0x0F) << 4),\n};\n\n// 0x3C = 00111100\nconst uint8_t third_left_base64_to_num[] = {\n ['A'] = (( 0 & 0x3C) >> 2), ['g'] = ((32 & 0x3C) >> 2),\n ['B'] = (( 1 & 0x3C) >> 2), ['h'] = ((33 & 0x3C) >> 2),\n ['C'] = (( 2 & 0x3C) >> 2), ['i'] = ((34 & 0x3C) >> 2),\n ['D'] = (( 3 & 0x3C) >> 2), ['j'] = ((35 & 0x3C) >> 2),\n ['E'] = (( 4 & 0x3C) >> 2), ['k'] = ((36 & 0x3C) >> 2),\n ['F'] = (( 5 & 0x3C) >> 2), ['l'] = ((37 & 0x3C) >> 2),\n ['G'] = (( 6 & 0x3C) >> 2), ['m'] = ((38 & 0x3C) >> 2),\n ['H'] = (( 7 & 0x3C) >> 2), ['n'] = ((39 & 0x3C) >> 2),\n ['I'] = (( 8 & 0x3C) >> 2), ['o'] = ((40 & 0x3C) >> 2),\n ['J'] = (( 9 & 0x3C) >> 2), ['p'] = ((41 & 0x3C) >> 2),\n ['K'] = ((10 & 0x3C) >> 2), ['q'] = ((42 & 0x3C) >> 2),\n ['L'] = ((11 & 0x3C) >> 2), ['r'] = ((43 & 0x3C) >> 2),\n ['M'] = ((12 & 0x3C) >> 2), ['s'] = ((44 & 0x3C) >> 2),\n ['N'] = ((13 & 0x3C) >> 2), ['t'] = ((45 & 0x3C) >> 2),\n ['O'] = ((14 & 0x3C) >> 2), ['u'] = ((46 & 0x3C) >> 2),\n ['P'] = ((15 & 0x3C) >> 2), ['v'] = ((47 & 0x3C) >> 2),\n ['Q'] = ((16 & 0x3C) >> 2), ['w'] = ((48 & 0x3C) >> 2),\n ['R'] = ((17 & 0x3C) >> 2), ['x'] = ((49 & 0x3C) >> 2),\n ['S'] = ((18 & 0x3C) >> 2), ['y'] = ((50 & 0x3C) >> 2),\n ['T'] = ((19 & 0x3C) >> 2), ['z'] = ((51 & 0x3C) >> 2),\n ['U'] = ((20 & 0x3C) >> 2), ['0'] = ((52 & 0x3C) >> 2),\n ['V'] = ((21 & 0x3C) >> 2), ['1'] = ((53 & 0x3C) >> 2),\n ['W'] = ((22 & 0x3C) >> 2), ['2'] = ((54 & 0x3C) >> 2),\n ['X'] = ((23 & 0x3C) >> 2), ['3'] = ((55 & 0x3C) >> 2),\n ['Y'] = ((24 & 0x3C) >> 2), ['4'] = ((56 & 0x3C) >> 2),\n ['Z'] = ((25 & 0x3C) >> 2), ['5'] = ((57 & 0x3C) >> 2),\n ['a'] = ((26 & 0x3C) >> 2), ['6'] = ((58 & 0x3C) >> 2),\n ['b'] = ((27 & 0x3C) >> 2), ['7'] = ((59 & 0x3C) >> 2),\n ['c'] = ((28 & 0x3C) >> 2), ['8'] = ((60 & 0x3C) >> 2),\n ['d'] = ((29 & 0x3C) >> 2), ['9'] = ((61 & 0x3C) >> 2),\n ['e'] = ((30 & 0x3C) >> 2), ['+'] = ((62 & 0x3C) >> 2),\n ['f'] = ((31 & 0x3C) >> 2), ['/'] = ((63 & 0x3C) >> 2),\n};\n\n// 0x03 = 00000011\nconst uint8_t third_right_base64_to_num[] = {\n ['A'] = (( 0 & 0x03) << 6), ['g'] = ((32 & 0x03) << 6),\n ['B'] = (( 1 & 0x03) << 6), ['h'] = ((33 & 0x03) << 6),\n ['C'] = (( 2 & 0x03) << 6), ['i'] = ((34 & 0x03) << 6),\n ['D'] = (( 3 & 0x03) << 6), ['j'] = ((35 & 0x03) << 6),\n ['E'] = (( 4 & 0x03) << 6), ['k'] = ((36 & 0x03) << 6),\n ['F'] = (( 5 & 0x03) << 6), ['l'] = ((37 & 0x03) << 6),\n ['G'] = (( 6 & 0x03) << 6), ['m'] = ((38 & 0x03) << 6),\n ['H'] = (( 7 & 0x03) << 6), ['n'] = ((39 & 0x03) << 6),\n ['I'] = (( 8 & 0x03) << 6), ['o'] = ((40 & 0x03) << 6),\n ['J'] = (( 9 & 0x03) << 6), ['p'] = ((41 & 0x03) << 6),\n ['K'] = ((10 & 0x03) << 6), ['q'] = ((42 & 0x03) << 6),\n ['L'] = ((11 & 0x03) << 6), ['r'] = ((43 & 0x03) << 6),\n ['M'] = ((12 & 0x03) << 6), ['s'] = ((44 & 0x03) << 6),\n ['N'] = ((13 & 0x03) << 6), ['t'] = ((45 & 0x03) << 6),\n ['O'] = ((14 & 0x03) << 6), ['u'] = ((46 & 0x03) << 6),\n ['P'] = ((15 & 0x03) << 6), ['v'] = ((47 & 0x03) << 6),\n ['Q'] = ((16 & 0x03) << 6), ['w'] = ((48 & 0x03) << 6),\n ['R'] = ((17 & 0x03) << 6), ['x'] = ((49 & 0x03) << 6),\n ['S'] = ((18 & 0x03) << 6), ['y'] = ((50 & 0x03) << 6),\n ['T'] = ((19 & 0x03) << 6), ['z'] = ((51 & 0x03) << 6),\n ['U'] = ((20 & 0x03) << 6), ['0'] = ((52 & 0x03) << 6),\n ['V'] = ((21 & 0x03) << 6), ['1'] = ((53 & 0x03) << 6),\n ['W'] = ((22 & 0x03) << 6), ['2'] = ((54 & 0x03) << 6),\n ['X'] = ((23 & 0x03) << 6), ['3'] = ((55 & 0x03) << 6),\n ['Y'] = ((24 & 0x03) << 6), ['4'] = ((56 & 0x03) << 6),\n ['Z'] = ((25 & 0x03) << 6), ['5'] = ((57 & 0x03) << 6),\n ['a'] = ((26 & 0x03) << 6), ['6'] = ((58 & 0x03) << 6),\n ['b'] = ((27 & 0x03) << 6), ['7'] = ((59 & 0x03) << 6),\n ['c'] = ((28 & 0x03) << 6), ['8'] = ((60 & 0x03) << 6),\n ['d'] = ((29 & 0x03) << 6), ['9'] = ((61 & 0x03) << 6),\n ['e'] = ((30 & 0x03) << 6), ['+'] = ((62 & 0x03) << 6),\n ['f'] = ((31 & 0x03) << 6), ['/'] = ((63 & 0x03) << 6),\n};\n\n// 0x3F = 00111111\nconst uint8_t fourth_base64_to_num[] = {\n ['A'] = (( 0 & 0x3F) << 0), ['g'] = ((32 & 0x3F) << 0),\n ['B'] = (( 1 & 0x3F) << 0), ['h'] = ((33 & 0x3F) << 0),\n ['C'] = (( 2 & 0x3F) << 0), ['i'] = ((34 & 0x3F) << 0),\n ['D'] = (( 3 & 0x3F) << 0), ['j'] = ((35 & 0x3F) << 0),\n ['E'] = (( 4 & 0x3F) << 0), ['k'] = ((36 & 0x3F) << 0),\n ['F'] = (( 5 & 0x3F) << 0), ['l'] = ((37 & 0x3F) << 0),\n ['G'] = (( 6 & 0x3F) << 0), ['m'] = ((38 & 0x3F) << 0),\n ['H'] = (( 7 & 0x3F) << 0), ['n'] = ((39 & 0x3F) << 0),\n ['I'] = (( 8 & 0x3F) << 0), ['o'] = ((40 & 0x3F) << 0),\n ['J'] = (( 9 & 0x3F) << 0), ['p'] = ((41 & 0x3F) << 0),\n ['K'] = ((10 & 0x3F) << 0), ['q'] = ((42 & 0x3F) << 0),\n ['L'] = ((11 & 0x3F) << 0), ['r'] = ((43 & 0x3F) << 0),\n ['M'] = ((12 & 0x3F) << 0), ['s'] = ((44 & 0x3F) << 0),\n ['N'] = ((13 & 0x3F) << 0), ['t'] = ((45 & 0x3F) << 0),\n ['O'] = ((14 & 0x3F) << 0), ['u'] = ((46 & 0x3F) << 0),\n ['P'] = ((15 & 0x3F) << 0), ['v'] = ((47 & 0x3F) << 0),\n ['Q'] = ((16 & 0x3F) << 0), ['w'] = ((48 & 0x3F) << 0),\n ['R'] = ((17 & 0x3F) << 0), ['x'] = ((49 & 0x3F) << 0),\n ['S'] = ((18 & 0x3F) << 0), ['y'] = ((50 & 0x3F) << 0),\n ['T'] = ((19 & 0x3F) << 0), ['z'] = ((51 & 0x3F) << 0),\n ['U'] = ((20 & 0x3F) << 0), ['0'] = ((52 & 0x3F) << 0),\n ['V'] = ((21 & 0x3F) << 0), ['1'] = ((53 & 0x3F) << 0),\n ['W'] = ((22 & 0x3F) << 0), ['2'] = ((54 & 0x3F) << 0),\n ['X'] = ((23 & 0x3F) << 0), ['3'] = ((55 & 0x3F) << 0),\n ['Y'] = ((24 & 0x3F) << 0), ['4'] = ((56 & 0x3F) << 0),\n ['Z'] = ((25 & 0x3F) << 0), ['5'] = ((57 & 0x3F) << 0),\n ['a'] = ((26 & 0x3F) << 0), ['6'] = ((58 & 0x3F) << 0),\n ['b'] = ((27 & 0x3F) << 0), ['7'] = ((59 & 0x3F) << 0),\n ['c'] = ((28 & 0x3F) << 0), ['8'] = ((60 & 0x3F) << 0),\n ['d'] = ((29 & 0x3F) << 0), ['9'] = ((61 & 0x3F) << 0),\n ['e'] = ((30 & 0x3F) << 0), ['+'] = ((62 & 0x3F) << 0),\n ['f'] = ((31 & 0x3F) << 0), ['/'] = ((63 & 0x3F) << 0),\n};\n\n/*\n * Base32hex transformation (with lower-case):\n * 1 2 3 4 5 6 7 8\n * 12345678 12345678 12345678 12345678 12345678 12345678 12345678 12345678\n * in: 000AAAAA 000BBBBB 000CCCCC 000DDDDD 000EEEEE 000FFFFF 000GGGGG 000HHHHH\n * out AAAAABBB BBCCCCCD DDDDEEEE EFFFFFGG GGGHHHHH\n */\n\n// 0x1F = 00011111\nconst uint8_t first_base32hex_to_num[] = {\n ['0'] = (( 0 & 0x1F) << 3), ['R'] = ((27 & 0x1F) << 3),\n ['1'] = (( 1 & 0x1F) << 3), ['S'] = ((28 & 0x1F) << 3),\n ['2'] = (( 2 & 0x1F) << 3), ['T'] = ((29 & 0x1F) << 3),\n ['3'] = (( 3 & 0x1F) << 3), ['U'] = ((30 & 0x1F) << 3),\n ['4'] = (( 4 & 0x1F) << 3), ['V'] = ((31 & 0x1F) << 3),\n ['5'] = (( 5 & 0x1F) << 3), ['a'] = ((10 & 0x1F) << 3),\n ['6'] = (( 6 & 0x1F) << 3), ['b'] = ((11 & 0x1F) << 3),\n ['7'] = (( 7 & 0x1F) << 3), ['c'] = ((12 & 0x1F) << 3),\n ['8'] = (( 8 & 0x1F) << 3), ['d'] = ((13 & 0x1F) << 3),\n ['9'] = (( 9 & 0x1F) << 3), ['e'] = ((14 & 0x1F) << 3),\n ['A'] = ((10 & 0x1F) << 3), ['f'] = ((15 & 0x1F) << 3),\n ['B'] = ((11 & 0x1F) << 3), ['g'] = ((16 & 0x1F) << 3),\n ['C'] = ((12 & 0x1F) << 3), ['h'] = ((17 & 0x1F) << 3),\n ['D'] = ((13 & 0x1F) << 3), ['i'] = ((18 & 0x1F) << 3),\n ['E'] = ((14 & 0x1F) << 3), ['j'] = ((19 & 0x1F) << 3),\n ['F'] = ((15 & 0x1F) << 3), ['k'] = ((20 & 0x1F) << 3),\n ['G'] = ((16 & 0x1F) << 3), ['l'] = ((21 & 0x1F) << 3),\n ['H'] = ((17 & 0x1F) << 3), ['m'] = ((22 & 0x1F) << 3),\n ['I'] = ((18 & 0x1F) << 3), ['n'] = ((23 & 0x1F) << 3),\n ['J'] = ((19 & 0x1F) << 3), ['o'] = ((24 & 0x1F) << 3),\n ['K'] = ((20 & 0x1F) << 3), ['p'] = ((25 & 0x1F) << 3),\n ['L'] = ((21 & 0x1F) << 3), ['q'] = ((26 & 0x1F) << 3),\n ['M'] = ((22 & 0x1F) << 3), ['r'] = ((27 & 0x1F) << 3),\n ['N'] = ((23 & 0x1F) << 3), ['s'] = ((28 & 0x1F) << 3),\n ['O'] = ((24 & 0x1F) << 3), ['t'] = ((29 & 0x1F) << 3),\n ['P'] = ((25 & 0x1F) << 3), ['u'] = ((30 & 0x1F) << 3),\n ['Q'] = ((26 & 0x1F) << 3), ['v'] = ((31 & 0x1F) << 3),\n};\n\n// 0x1C = 00011100\nconst uint8_t second_left_base32hex_to_num[] = {\n ['0'] = (( 0 & 0x1C) >> 2), ['R'] = ((27 & 0x1C) >> 2),\n ['1'] = (( 1 & 0x1C) >> 2), ['S'] = ((28 & 0x1C) >> 2),\n ['2'] = (( 2 & 0x1C) >> 2), ['T'] = ((29 & 0x1C) >> 2),\n ['3'] = (( 3 & 0x1C) >> 2), ['U'] = ((30 & 0x1C) >> 2),\n ['4'] = (( 4 & 0x1C) >> 2), ['V'] = ((31 & 0x1C) >> 2),\n ['5'] = (( 5 & 0x1C) >> 2), ['a'] = ((10 & 0x1C) >> 2),\n ['6'] = (( 6 & 0x1C) >> 2), ['b'] = ((11 & 0x1C) >> 2),\n ['7'] = (( 7 & 0x1C) >> 2), ['c'] = ((12 & 0x1C) >> 2),\n ['8'] = (( 8 & 0x1C) >> 2), ['d'] = ((13 & 0x1C) >> 2),\n ['9'] = (( 9 & 0x1C) >> 2), ['e'] = ((14 & 0x1C) >> 2),\n ['A'] = ((10 & 0x1C) >> 2), ['f'] = ((15 & 0x1C) >> 2),\n ['B'] = ((11 & 0x1C) >> 2), ['g'] = ((16 & 0x1C) >> 2),\n ['C'] = ((12 & 0x1C) >> 2), ['h'] = ((17 & 0x1C) >> 2),\n ['D'] = ((13 & 0x1C) >> 2), ['i'] = ((18 & 0x1C) >> 2),\n ['E'] = ((14 & 0x1C) >> 2), ['j'] = ((19 & 0x1C) >> 2),\n ['F'] = ((15 & 0x1C) >> 2), ['k'] = ((20 & 0x1C) >> 2),\n ['G'] = ((16 & 0x1C) >> 2), ['l'] = ((21 & 0x1C) >> 2),\n ['H'] = ((17 & 0x1C) >> 2), ['m'] = ((22 & 0x1C) >> 2),\n ['I'] = ((18 & 0x1C) >> 2), ['n'] = ((23 & 0x1C) >> 2),\n ['J'] = ((19 & 0x1C) >> 2), ['o'] = ((24 & 0x1C) >> 2),\n ['K'] = ((20 & 0x1C) >> 2), ['p'] = ((25 & 0x1C) >> 2),\n ['L'] = ((21 & 0x1C) >> 2), ['q'] = ((26 & 0x1C) >> 2),\n ['M'] = ((22 & 0x1C) >> 2), ['r'] = ((27 & 0x1C) >> 2),\n ['N'] = ((23 & 0x1C) >> 2), ['s'] = ((28 & 0x1C) >> 2),\n ['O'] = ((24 & 0x1C) >> 2), ['t'] = ((29 & 0x1C) >> 2),\n ['P'] = ((25 & 0x1C) >> 2), ['u'] = ((30 & 0x1C) >> 2),\n ['Q'] = ((26 & 0x1C) >> 2), ['v'] = ((31 & 0x1C) >> 2),\n};\n\n// 0x03 = 00000011\nconst uint8_t second_right_base32hex_to_num[] = {\n ['0'] = (( 0 & 0x03) << 6), ['R'] = ((27 & 0x03) << 6),\n ['1'] = (( 1 & 0x03) << 6), ['S'] = ((28 & 0x03) << 6),\n ['2'] = (( 2 & 0x03) << 6), ['T'] = ((29 & 0x03) << 6),\n ['3'] = (( 3 & 0x03) << 6), ['U'] = ((30 & 0x03) << 6),\n ['4'] = (( 4 & 0x03) << 6), ['V'] = ((31 & 0x03) << 6),\n ['5'] = (( 5 & 0x03) << 6), ['a'] = ((10 & 0x03) << 6),\n ['6'] = (( 6 & 0x03) << 6), ['b'] = ((11 & 0x03) << 6),\n ['7'] = (( 7 & 0x03) << 6), ['c'] = ((12 & 0x03) << 6),\n ['8'] = (( 8 & 0x03) << 6), ['d'] = ((13 & 0x03) << 6),\n ['9'] = (( 9 & 0x03) << 6), ['e'] = ((14 & 0x03) << 6),\n ['A'] = ((10 & 0x03) << 6), ['f'] = ((15 & 0x03) << 6),\n ['B'] = ((11 & 0x03) << 6), ['g'] = ((16 & 0x03) << 6),\n ['C'] = ((12 & 0x03) << 6), ['h'] = ((17 & 0x03) << 6),\n ['D'] = ((13 & 0x03) << 6), ['i'] = ((18 & 0x03) << 6),\n ['E'] = ((14 & 0x03) << 6), ['j'] = ((19 & 0x03) << 6),\n ['F'] = ((15 & 0x03) << 6), ['k'] = ((20 & 0x03) << 6),\n ['G'] = ((16 & 0x03) << 6), ['l'] = ((21 & 0x03) << 6),\n ['H'] = ((17 & 0x03) << 6), ['m'] = ((22 & 0x03) << 6),\n ['I'] = ((18 & 0x03) << 6), ['n'] = ((23 & 0x03) << 6),\n ['J'] = ((19 & 0x03) << 6), ['o'] = ((24 & 0x03) << 6),\n ['K'] = ((20 & 0x03) << 6), ['p'] = ((25 & 0x03) << 6),\n ['L'] = ((21 & 0x03) << 6), ['q'] = ((26 & 0x03) << 6),\n ['M'] = ((22 & 0x03) << 6), ['r'] = ((27 & 0x03) << 6),\n ['N'] = ((23 & 0x03) << 6), ['s'] = ((28 & 0x03) << 6),\n ['O'] = ((24 & 0x03) << 6), ['t'] = ((29 & 0x03) << 6),\n ['P'] = ((25 & 0x03) << 6), ['u'] = ((30 & 0x03) << 6),\n ['Q'] = ((26 & 0x03) << 6), ['v'] = ((31 & 0x03) << 6),\n};\n\n// 0x1F = 00011111\nconst uint8_t third_base32hex_to_num[] = {\n ['0'] = (( 0 & 0x1F) << 1), ['R'] = ((27 & 0x1F) << 1),\n ['1'] = (( 1 & 0x1F) << 1), ['S'] = ((28 & 0x1F) << 1),\n ['2'] = (( 2 & 0x1F) << 1), ['T'] = ((29 & 0x1F) << 1),\n ['3'] = (( 3 & 0x1F) << 1), ['U'] = ((30 & 0x1F) << 1),\n ['4'] = (( 4 & 0x1F) << 1), ['V'] = ((31 & 0x1F) << 1),\n ['5'] = (( 5 & 0x1F) << 1), ['a'] = ((10 & 0x1F) << 1),\n ['6'] = (( 6 & 0x1F) << 1), ['b'] = ((11 & 0x1F) << 1),\n ['7'] = (( 7 & 0x1F) << 1), ['c'] = ((12 & 0x1F) << 1),\n ['8'] = (( 8 & 0x1F) << 1), ['d'] = ((13 & 0x1F) << 1),\n ['9'] = (( 9 & 0x1F) << 1), ['e'] = ((14 & 0x1F) << 1),\n ['A'] = ((10 & 0x1F) << 1), ['f'] = ((15 & 0x1F) << 1),\n ['B'] = ((11 & 0x1F) << 1), ['g'] = ((16 & 0x1F) << 1),\n ['C'] = ((12 & 0x1F) << 1), ['h'] = ((17 & 0x1F) << 1),\n ['D'] = ((13 & 0x1F) << 1), ['i'] = ((18 & 0x1F) << 1),\n ['E'] = ((14 & 0x1F) << 1), ['j'] = ((19 & 0x1F) << 1),\n ['F'] = ((15 & 0x1F) << 1), ['k'] = ((20 & 0x1F) << 1),\n ['G'] = ((16 & 0x1F) << 1), ['l'] = ((21 & 0x1F) << 1),\n ['H'] = ((17 & 0x1F) << 1), ['m'] = ((22 & 0x1F) << 1),\n ['I'] = ((18 & 0x1F) << 1), ['n'] = ((23 & 0x1F) << 1),\n ['J'] = ((19 & 0x1F) << 1), ['o'] = ((24 & 0x1F) << 1),\n ['K'] = ((20 & 0x1F) << 1), ['p'] = ((25 & 0x1F) << 1),\n ['L'] = ((21 & 0x1F) << 1), ['q'] = ((26 & 0x1F) << 1),\n ['M'] = ((22 & 0x1F) << 1), ['r'] = ((27 & 0x1F) << 1),\n ['N'] = ((23 & 0x1F) << 1), ['s'] = ((28 & 0x1F) << 1),\n ['O'] = ((24 & 0x1F) << 1), ['t'] = ((29 & 0x1F) << 1),\n ['P'] = ((25 & 0x1F) << 1), ['u'] = ((30 & 0x1F) << 1),\n ['Q'] = ((26 & 0x1F) << 1), ['v'] = ((31 & 0x1F) << 1),\n};\n\n// 0x10 = 00010000\nconst uint8_t fourth_left_base32hex_to_num[] = {\n ['0'] = (( 0 & 0x10) >> 4), ['R'] = ((27 & 0x10) >> 4),\n ['1'] = (( 1 & 0x10) >> 4), ['S'] = ((28 & 0x10) >> 4),\n ['2'] = (( 2 & 0x10) >> 4), ['T'] = ((29 & 0x10) >> 4),\n ['3'] = (( 3 & 0x10) >> 4), ['U'] = ((30 & 0x10) >> 4),\n ['4'] = (( 4 & 0x10) >> 4), ['V'] = ((31 & 0x10) >> 4),\n ['5'] = (( 5 & 0x10) >> 4), ['a'] = ((10 & 0x10) >> 4),\n ['6'] = (( 6 & 0x10) >> 4), ['b'] = ((11 & 0x10) >> 4),\n ['7'] = (( 7 & 0x10) >> 4), ['c'] = ((12 & 0x10) >> 4),\n ['8'] = (( 8 & 0x10) >> 4), ['d'] = ((13 & 0x10) >> 4),\n ['9'] = (( 9 & 0x10) >> 4), ['e'] = ((14 & 0x10) >> 4),\n ['A'] = ((10 & 0x10) >> 4), ['f'] = ((15 & 0x10) >> 4),\n ['B'] = ((11 & 0x10) >> 4), ['g'] = ((16 & 0x10) >> 4),\n ['C'] = ((12 & 0x10) >> 4), ['h'] = ((17 & 0x10) >> 4),\n ['D'] = ((13 & 0x10) >> 4), ['i'] = ((18 & 0x10) >> 4),\n ['E'] = ((14 & 0x10) >> 4), ['j'] = ((19 & 0x10) >> 4),\n ['F'] = ((15 & 0x10) >> 4), ['k'] = ((20 & 0x10) >> 4),\n ['G'] = ((16 & 0x10) >> 4), ['l'] = ((21 & 0x10) >> 4),\n ['H'] = ((17 & 0x10) >> 4), ['m'] = ((22 & 0x10) >> 4),\n ['I'] = ((18 & 0x10) >> 4), ['n'] = ((23 & 0x10) >> 4),\n ['J'] = ((19 & 0x10) >> 4), ['o'] = ((24 & 0x10) >> 4),\n ['K'] = ((20 & 0x10) >> 4), ['p'] = ((25 & 0x10) >> 4),\n ['L'] = ((21 & 0x10) >> 4), ['q'] = ((26 & 0x10) >> 4),\n ['M'] = ((22 & 0x10) >> 4), ['r'] = ((27 & 0x10) >> 4),\n ['N'] = ((23 & 0x10) >> 4), ['s'] = ((28 & 0x10) >> 4),\n ['O'] = ((24 & 0x10) >> 4), ['t'] = ((29 & 0x10) >> 4),\n ['P'] = ((25 & 0x10) >> 4), ['u'] = ((30 & 0x10) >> 4),\n ['Q'] = ((26 & 0x10) >> 4), ['v'] = ((31 & 0x10) >> 4),\n};\n\n// 0x0F = 00001111\nconst uint8_t fourth_right_base32hex_to_num[] = {\n ['0'] = (( 0 & 0x0F) << 4), ['R'] = ((27 & 0x0F) << 4),\n ['1'] = (( 1 & 0x0F) << 4), ['S'] = ((28 & 0x0F) << 4),\n ['2'] = (( 2 & 0x0F) << 4), ['T'] = ((29 & 0x0F) << 4),\n ['3'] = (( 3 & 0x0F) << 4), ['U'] = ((30 & 0x0F) << 4),\n ['4'] = (( 4 & 0x0F) << 4), ['V'] = ((31 & 0x0F) << 4),\n ['5'] = (( 5 & 0x0F) << 4), ['a'] = ((10 & 0x0F) << 4),\n ['6'] = (( 6 & 0x0F) << 4), ['b'] = ((11 & 0x0F) << 4),\n ['7'] = (( 7 & 0x0F) << 4), ['c'] = ((12 & 0x0F) << 4),\n ['8'] = (( 8 & 0x0F) << 4), ['d'] = ((13 & 0x0F) << 4),\n ['9'] = (( 9 & 0x0F) << 4), ['e'] = ((14 & 0x0F) << 4),\n ['A'] = ((10 & 0x0F) << 4), ['f'] = ((15 & 0x0F) << 4),\n ['B'] = ((11 & 0x0F) << 4), ['g'] = ((16 & 0x0F) << 4),\n ['C'] = ((12 & 0x0F) << 4), ['h'] = ((17 & 0x0F) << 4),\n ['D'] = ((13 & 0x0F) << 4), ['i'] = ((18 & 0x0F) << 4),\n ['E'] = ((14 & 0x0F) << 4), ['j'] = ((19 & 0x0F) << 4),\n ['F'] = ((15 & 0x0F) << 4), ['k'] = ((20 & 0x0F) << 4),\n ['G'] = ((16 & 0x0F) << 4), ['l'] = ((21 & 0x0F) << 4),\n ['H'] = ((17 & 0x0F) << 4), ['m'] = ((22 & 0x0F) << 4),\n ['I'] = ((18 & 0x0F) << 4), ['n'] = ((23 & 0x0F) << 4),\n ['J'] = ((19 & 0x0F) << 4), ['o'] = ((24 & 0x0F) << 4),\n ['K'] = ((20 & 0x0F) << 4), ['p'] = ((25 & 0x0F) << 4),\n ['L'] = ((21 & 0x0F) << 4), ['q'] = ((26 & 0x0F) << 4),\n ['M'] = ((22 & 0x0F) << 4), ['r'] = ((27 & 0x0F) << 4),\n ['N'] = ((23 & 0x0F) << 4), ['s'] = ((28 & 0x0F) << 4),\n ['O'] = ((24 & 0x0F) << 4), ['t'] = ((29 & 0x0F) << 4),\n ['P'] = ((25 & 0x0F) << 4), ['u'] = ((30 & 0x0F) << 4),\n ['Q'] = ((26 & 0x0F) << 4), ['v'] = ((31 & 0x0F) << 4),\n};\n\n// 0x1E = 00011110\nconst uint8_t fifth_left_base32hex_to_num[] = {\n ['0'] = (( 0 & 0x1E) >> 1), ['R'] = ((27 & 0x1E) >> 1),\n ['1'] = (( 1 & 0x1E) >> 1), ['S'] = ((28 & 0x1E) >> 1),\n ['2'] = (( 2 & 0x1E) >> 1), ['T'] = ((29 & 0x1E) >> 1),\n ['3'] = (( 3 & 0x1E) >> 1), ['U'] = ((30 & 0x1E) >> 1),\n ['4'] = (( 4 & 0x1E) >> 1), ['V'] = ((31 & 0x1E) >> 1),\n ['5'] = (( 5 & 0x1E) >> 1), ['a'] = ((10 & 0x1E) >> 1),\n ['6'] = (( 6 & 0x1E) >> 1), ['b'] = ((11 & 0x1E) >> 1),\n ['7'] = (( 7 & 0x1E) >> 1), ['c'] = ((12 & 0x1E) >> 1),\n ['8'] = (( 8 & 0x1E) >> 1), ['d'] = ((13 & 0x1E) >> 1),\n ['9'] = (( 9 & 0x1E) >> 1), ['e'] = ((14 & 0x1E) >> 1),\n ['A'] = ((10 & 0x1E) >> 1), ['f'] = ((15 & 0x1E) >> 1),\n ['B'] = ((11 & 0x1E) >> 1), ['g'] = ((16 & 0x1E) >> 1),\n ['C'] = ((12 & 0x1E) >> 1), ['h'] = ((17 & 0x1E) >> 1),\n ['D'] = ((13 & 0x1E) >> 1), ['i'] = ((18 & 0x1E) >> 1),\n ['E'] = ((14 & 0x1E) >> 1), ['j'] = ((19 & 0x1E) >> 1),\n ['F'] = ((15 & 0x1E) >> 1), ['k'] = ((20 & 0x1E) >> 1),\n ['G'] = ((16 & 0x1E) >> 1), ['l'] = ((21 & 0x1E) >> 1),\n ['H'] = ((17 & 0x1E) >> 1), ['m'] = ((22 & 0x1E) >> 1),\n ['I'] = ((18 & 0x1E) >> 1), ['n'] = ((23 & 0x1E) >> 1),\n ['J'] = ((19 & 0x1E) >> 1), ['o'] = ((24 & 0x1E) >> 1),\n ['K'] = ((20 & 0x1E) >> 1), ['p'] = ((25 & 0x1E) >> 1),\n ['L'] = ((21 & 0x1E) >> 1), ['q'] = ((26 & 0x1E) >> 1),\n ['M'] = ((22 & 0x1E) >> 1), ['r'] = ((27 & 0x1E) >> 1),\n ['N'] = ((23 & 0x1E) >> 1), ['s'] = ((28 & 0x1E) >> 1),\n ['O'] = ((24 & 0x1E) >> 1), ['t'] = ((29 & 0x1E) >> 1),\n ['P'] = ((25 & 0x1E) >> 1), ['u'] = ((30 & 0x1E) >> 1),\n ['Q'] = ((26 & 0x1E) >> 1), ['v'] = ((31 & 0x1E) >> 1),\n};\n\n// 0x01 = 00000001\nconst uint8_t fifth_right_base32hex_to_num[] = {\n ['0'] = (( 0 & 0x01) << 7), ['R'] = ((27 & 0x01) << 7),\n ['1'] = (( 1 & 0x01) << 7), ['S'] = ((28 & 0x01) << 7),\n ['2'] = (( 2 & 0x01) << 7), ['T'] = ((29 & 0x01) << 7),\n ['3'] = (( 3 & 0x01) << 7), ['U'] = ((30 & 0x01) << 7),\n ['4'] = (( 4 & 0x01) << 7), ['V'] = ((31 & 0x01) << 7),\n ['5'] = (( 5 & 0x01) << 7), ['a'] = ((10 & 0x01) << 7),\n ['6'] = (( 6 & 0x01) << 7), ['b'] = ((11 & 0x01) << 7),\n ['7'] = (( 7 & 0x01) << 7), ['c'] = ((12 & 0x01) << 7),\n ['8'] = (( 8 & 0x01) << 7), ['d'] = ((13 & 0x01) << 7),\n ['9'] = (( 9 & 0x01) << 7), ['e'] = ((14 & 0x01) << 7),\n ['A'] = ((10 & 0x01) << 7), ['f'] = ((15 & 0x01) << 7),\n ['B'] = ((11 & 0x01) << 7), ['g'] = ((16 & 0x01) << 7),\n ['C'] = ((12 & 0x01) << 7), ['h'] = ((17 & 0x01) << 7),\n ['D'] = ((13 & 0x01) << 7), ['i'] = ((18 & 0x01) << 7),\n ['E'] = ((14 & 0x01) << 7), ['j'] = ((19 & 0x01) << 7),\n ['F'] = ((15 & 0x01) << 7), ['k'] = ((20 & 0x01) << 7),\n ['G'] = ((16 & 0x01) << 7), ['l'] = ((21 & 0x01) << 7),\n ['H'] = ((17 & 0x01) << 7), ['m'] = ((22 & 0x01) << 7),\n ['I'] = ((18 & 0x01) << 7), ['n'] = ((23 & 0x01) << 7),\n ['J'] = ((19 & 0x01) << 7), ['o'] = ((24 & 0x01) << 7),\n ['K'] = ((20 & 0x01) << 7), ['p'] = ((25 & 0x01) << 7),\n ['L'] = ((21 & 0x01) << 7), ['q'] = ((26 & 0x01) << 7),\n ['M'] = ((22 & 0x01) << 7), ['r'] = ((27 & 0x01) << 7),\n ['N'] = ((23 & 0x01) << 7), ['s'] = ((28 & 0x01) << 7),\n ['O'] = ((24 & 0x01) << 7), ['t'] = ((29 & 0x01) << 7),\n ['P'] = ((25 & 0x01) << 7), ['u'] = ((30 & 0x01) << 7),\n ['Q'] = ((26 & 0x01) << 7), ['v'] = ((31 & 0x01) << 7),\n};\n\n// 0x1F = 00011111\nconst uint8_t sixth_base32hex_to_num[] = {\n ['0'] = (( 0 & 0x1F) << 2), ['R'] = ((27 & 0x1F) << 2),\n ['1'] = (( 1 & 0x1F) << 2), ['S'] = ((28 & 0x1F) << 2),\n ['2'] = (( 2 & 0x1F) << 2), ['T'] = ((29 & 0x1F) << 2),\n ['3'] = (( 3 & 0x1F) << 2), ['U'] = ((30 & 0x1F) << 2),\n ['4'] = (( 4 & 0x1F) << 2), ['V'] = ((31 & 0x1F) << 2),\n ['5'] = (( 5 & 0x1F) << 2), ['a'] = ((10 & 0x1F) << 2),\n ['6'] = (( 6 & 0x1F) << 2), ['b'] = ((11 & 0x1F) << 2),\n ['7'] = (( 7 & 0x1F) << 2), ['c'] = ((12 & 0x1F) << 2),\n ['8'] = (( 8 & 0x1F) << 2), ['d'] = ((13 & 0x1F) << 2),\n ['9'] = (( 9 & 0x1F) << 2), ['e'] = ((14 & 0x1F) << 2),\n ['A'] = ((10 & 0x1F) << 2), ['f'] = ((15 & 0x1F) << 2),\n ['B'] = ((11 & 0x1F) << 2), ['g'] = ((16 & 0x1F) << 2),\n ['C'] = ((12 & 0x1F) << 2), ['h'] = ((17 & 0x1F) << 2),\n ['D'] = ((13 & 0x1F) << 2), ['i'] = ((18 & 0x1F) << 2),\n ['E'] = ((14 & 0x1F) << 2), ['j'] = ((19 & 0x1F) << 2),\n ['F'] = ((15 & 0x1F) << 2), ['k'] = ((20 & 0x1F) << 2),\n ['G'] = ((16 & 0x1F) << 2), ['l'] = ((21 & 0x1F) << 2),\n ['H'] = ((17 & 0x1F) << 2), ['m'] = ((22 & 0x1F) << 2),\n ['I'] = ((18 & 0x1F) << 2), ['n'] = ((23 & 0x1F) << 2),\n ['J'] = ((19 & 0x1F) << 2), ['o'] = ((24 & 0x1F) << 2),\n ['K'] = ((20 & 0x1F) << 2), ['p'] = ((25 & 0x1F) << 2),\n ['L'] = ((21 & 0x1F) << 2), ['q'] = ((26 & 0x1F) << 2),\n ['M'] = ((22 & 0x1F) << 2), ['r'] = ((27 & 0x1F) << 2),\n ['N'] = ((23 & 0x1F) << 2), ['s'] = ((28 & 0x1F) << 2),\n ['O'] = ((24 & 0x1F) << 2), ['t'] = ((29 & 0x1F) << 2),\n ['P'] = ((25 & 0x1F) << 2), ['u'] = ((30 & 0x1F) << 2),\n ['Q'] = ((26 & 0x1F) << 2), ['v'] = ((31 & 0x1F) << 2),\n};\n\n// 0x18 = 00011000\nconst uint8_t seventh_left_base32hex_to_num[] = {\n ['0'] = (( 0 & 0x18) >> 3), ['R'] = ((27 & 0x18) >> 3),\n ['1'] = (( 1 & 0x18) >> 3), ['S'] = ((28 & 0x18) >> 3),\n ['2'] = (( 2 & 0x18) >> 3), ['T'] = ((29 & 0x18) >> 3),\n ['3'] = (( 3 & 0x18) >> 3), ['U'] = ((30 & 0x18) >> 3),\n ['4'] = (( 4 & 0x18) >> 3), ['V'] = ((31 & 0x18) >> 3),\n ['5'] = (( 5 & 0x18) >> 3), ['a'] = ((10 & 0x18) >> 3),\n ['6'] = (( 6 & 0x18) >> 3), ['b'] = ((11 & 0x18) >> 3),\n ['7'] = (( 7 & 0x18) >> 3), ['c'] = ((12 & 0x18) >> 3),\n ['8'] = (( 8 & 0x18) >> 3), ['d'] = ((13 & 0x18) >> 3),\n ['9'] = (( 9 & 0x18) >> 3), ['e'] = ((14 & 0x18) >> 3),\n ['A'] = ((10 & 0x18) >> 3), ['f'] = ((15 & 0x18) >> 3),\n ['B'] = ((11 & 0x18) >> 3), ['g'] = ((16 & 0x18) >> 3),\n ['C'] = ((12 & 0x18) >> 3), ['h'] = ((17 & 0x18) >> 3),\n ['D'] = ((13 & 0x18) >> 3), ['i'] = ((18 & 0x18) >> 3),\n ['E'] = ((14 & 0x18) >> 3), ['j'] = ((19 & 0x18) >> 3),\n ['F'] = ((15 & 0x18) >> 3), ['k'] = ((20 & 0x18) >> 3),\n ['G'] = ((16 & 0x18) >> 3), ['l'] = ((21 & 0x18) >> 3),\n ['H'] = ((17 & 0x18) >> 3), ['m'] = ((22 & 0x18) >> 3),\n ['I'] = ((18 & 0x18) >> 3), ['n'] = ((23 & 0x18) >> 3),\n ['J'] = ((19 & 0x18) >> 3), ['o'] = ((24 & 0x18) >> 3),\n ['K'] = ((20 & 0x18) >> 3), ['p'] = ((25 & 0x18) >> 3),\n ['L'] = ((21 & 0x18) >> 3), ['q'] = ((26 & 0x18) >> 3),\n ['M'] = ((22 & 0x18) >> 3), ['r'] = ((27 & 0x18) >> 3),\n ['N'] = ((23 & 0x18) >> 3), ['s'] = ((28 & 0x18) >> 3),\n ['O'] = ((24 & 0x18) >> 3), ['t'] = ((29 & 0x18) >> 3),\n ['P'] = ((25 & 0x18) >> 3), ['u'] = ((30 & 0x18) >> 3),\n ['Q'] = ((26 & 0x18) >> 3), ['v'] = ((31 & 0x18) >> 3),\n};\n\n// 0x07 = 00000111\nconst uint8_t seventh_right_base32hex_to_num[] = {\n ['0'] = (( 0 & 0x07) << 5), ['R'] = ((27 & 0x07) << 5),\n ['1'] = (( 1 & 0x07) << 5), ['S'] = ((28 & 0x07) << 5),\n ['2'] = (( 2 & 0x07) << 5), ['T'] = ((29 & 0x07) << 5),\n ['3'] = (( 3 & 0x07) << 5), ['U'] = ((30 & 0x07) << 5),\n ['4'] = (( 4 & 0x07) << 5), ['V'] = ((31 & 0x07) << 5),\n ['5'] = (( 5 & 0x07) << 5), ['a'] = ((10 & 0x07) << 5),\n ['6'] = (( 6 & 0x07) << 5), ['b'] = ((11 & 0x07) << 5),\n ['7'] = (( 7 & 0x07) << 5), ['c'] = ((12 & 0x07) << 5),\n ['8'] = (( 8 & 0x07) << 5), ['d'] = ((13 & 0x07) << 5),\n ['9'] = (( 9 & 0x07) << 5), ['e'] = ((14 & 0x07) << 5),\n ['A'] = ((10 & 0x07) << 5), ['f'] = ((15 & 0x07) << 5),\n ['B'] = ((11 & 0x07) << 5), ['g'] = ((16 & 0x07) << 5),\n ['C'] = ((12 & 0x07) << 5), ['h'] = ((17 & 0x07) << 5),\n ['D'] = ((13 & 0x07) << 5), ['i'] = ((18 & 0x07) << 5),\n ['E'] = ((14 & 0x07) << 5), ['j'] = ((19 & 0x07) << 5),\n ['F'] = ((15 & 0x07) << 5), ['k'] = ((20 & 0x07) << 5),\n ['G'] = ((16 & 0x07) << 5), ['l'] = ((21 & 0x07) << 5),\n ['H'] = ((17 & 0x07) << 5), ['m'] = ((22 & 0x07) << 5),\n ['I'] = ((18 & 0x07) << 5), ['n'] = ((23 & 0x07) << 5),\n ['J'] = ((19 & 0x07) << 5), ['o'] = ((24 & 0x07) << 5),\n ['K'] = ((20 & 0x07) << 5), ['p'] = ((25 & 0x07) << 5),\n ['L'] = ((21 & 0x07) << 5), ['q'] = ((26 & 0x07) << 5),\n ['M'] = ((22 & 0x07) << 5), ['r'] = ((27 & 0x07) << 5),\n ['N'] = ((23 & 0x07) << 5), ['s'] = ((28 & 0x07) << 5),\n ['O'] = ((24 & 0x07) << 5), ['t'] = ((29 & 0x07) << 5),\n ['P'] = ((25 & 0x07) << 5), ['u'] = ((30 & 0x07) << 5),\n ['Q'] = ((26 & 0x07) << 5), ['v'] = ((31 & 0x07) << 5),\n};\n\n// 0x1F = 00011111\nconst uint8_t eighth_base32hex_to_num[] = {\n ['0'] = (( 0 & 0x1F) << 0), ['R'] = ((27 & 0x1F) << 0),\n ['1'] = (( 1 & 0x1F) << 0), ['S'] = ((28 & 0x1F) << 0),\n ['2'] = (( 2 & 0x1F) << 0), ['T'] = ((29 & 0x1F) << 0),\n ['3'] = (( 3 & 0x1F) << 0), ['U'] = ((30 & 0x1F) << 0),\n ['4'] = (( 4 & 0x1F) << 0), ['V'] = ((31 & 0x1F) << 0),\n ['5'] = (( 5 & 0x1F) << 0), ['a'] = ((10 & 0x1F) << 0),\n ['6'] = (( 6 & 0x1F) << 0), ['b'] = ((11 & 0x1F) << 0),\n ['7'] = (( 7 & 0x1F) << 0), ['c'] = ((12 & 0x1F) << 0),\n ['8'] = (( 8 & 0x1F) << 0), ['d'] = ((13 & 0x1F) << 0),\n ['9'] = (( 9 & 0x1F) << 0), ['e'] = ((14 & 0x1F) << 0),\n ['A'] = ((10 & 0x1F) << 0), ['f'] = ((15 & 0x1F) << 0),\n ['B'] = ((11 & 0x1F) << 0), ['g'] = ((16 & 0x1F) << 0),\n ['C'] = ((12 & 0x1F) << 0), ['h'] = ((17 & 0x1F) << 0),\n ['D'] = ((13 & 0x1F) << 0), ['i'] = ((18 & 0x1F) << 0),\n ['E'] = ((14 & 0x1F) << 0), ['j'] = ((19 & 0x1F) << 0),\n ['F'] = ((15 & 0x1F) << 0), ['k'] = ((20 & 0x1F) << 0),\n ['G'] = ((16 & 0x1F) << 0), ['l'] = ((21 & 0x1F) << 0),\n ['H'] = ((17 & 0x1F) << 0), ['m'] = ((22 & 0x1F) << 0),\n ['I'] = ((18 & 0x1F) << 0), ['n'] = ((23 & 0x1F) << 0),\n ['J'] = ((19 & 0x1F) << 0), ['o'] = ((24 & 0x1F) << 0),\n ['K'] = ((20 & 0x1F) << 0), ['p'] = ((25 & 0x1F) << 0),\n ['L'] = ((21 & 0x1F) << 0), ['q'] = ((26 & 0x1F) << 0),\n ['M'] = ((22 & 0x1F) << 0), ['r'] = ((27 & 0x1F) << 0),\n ['N'] = ((23 & 0x1F) << 0), ['s'] = ((28 & 0x1F) << 0),\n ['O'] = ((24 & 0x1F) << 0), ['t'] = ((29 & 0x1F) << 0),\n ['P'] = ((25 & 0x1F) << 0), ['u'] = ((30 & 0x1F) << 0),\n ['Q'] = ((26 & 0x1F) << 0), ['v'] = ((31 & 0x1F) << 0),\n};\n\n// Without leap day 29. 2.\nstatic const uint8_t days_in_months[] = {\n [ 1] = 31, [ 2] = 28, [ 3] = 31, [ 4] = 30, [ 5] = 31, [ 6] = 30,\n [ 7] = 31, [ 8] = 31, [ 9] = 30, [10] = 31, [11] = 30, [12] = 31,\n};\n\n// Without leap day 29. 2.\nstatic const uint16_t days_across_months[] = {\n [ 1] = 0, [ 2] = 31, [ 3] = 59, [ 4] = 90, [ 5] = 120, [ 6] = 151,\n [ 7] = 181, [ 8] = 212, [ 9] = 243, [10] = 273, [11] = 304, [12] = 334,\n};\n\n// 0 ~ 1970 ... 135 ~ 2105\nstatic const uint8_t is_leap_year[] = {\n [ 1] = 0, [ 2] = 1, [ 3] = 0, [ 4] = 0, [ 5] = 0,\n [ 6] = 1, [ 7] = 0, [ 8] = 0, [ 9] = 0, [ 10] = 1,\n [ 11] = 0, [ 12] = 0, [ 13] = 0, [ 14] = 1, [ 15] = 0,\n [ 16] = 0, [ 17] = 0, [ 18] = 1, [ 19] = 0, [ 20] = 0,\n [ 21] = 0, [ 22] = 1, [ 23] = 0, [ 24] = 0, [ 25] = 0,\n [ 26] = 1, [ 27] = 0, [ 28] = 0, [ 29] = 0, [ 30] = 1,\n [ 31] = 0, [ 32] = 0, [ 33] = 0, [ 34] = 1, [ 35] = 0,\n [ 36] = 0, [ 37] = 0, [ 38] = 1, [ 39] = 0, [ 40] = 0,\n [ 41] = 0, [ 42] = 1, [ 43] = 0, [ 44] = 0, [ 45] = 0,\n [ 46] = 1, [ 47] = 0, [ 48] = 0, [ 49] = 0, [ 50] = 1,\n [ 51] = 0, [ 52] = 0, [ 53] = 0, [ 54] = 1, [ 55] = 0,\n [ 56] = 0, [ 57] = 0, [ 58] = 1, [ 59] = 0, [ 60] = 0,\n [ 61] = 0, [ 62] = 1, [ 63] = 0, [ 64] = 0, [ 65] = 0,\n [ 66] = 1, [ 67] = 0, [ 68] = 0, [ 69] = 0, [ 70] = 1,\n [ 71] = 0, [ 72] = 0, [ 73] = 0, [ 74] = 1, [ 75] = 0,\n [ 76] = 0, [ 77] = 0, [ 78] = 1, [ 79] = 0, [ 80] = 0,\n [ 81] = 0, [ 82] = 1, [ 83] = 0, [ 84] = 0, [ 85] = 0,\n [ 86] = 1, [ 87] = 0, [ 88] = 0, [ 89] = 0, [ 90] = 1,\n [ 91] = 0, [ 92] = 0, [ 93] = 0, [ 94] = 1, [ 95] = 0,\n [ 96] = 0, [ 97] = 0, [ 98] = 1, [ 99] = 0, [100] = 0,\n [101] = 0, [102] = 1, [103] = 0, [104] = 0, [105] = 0,\n [106] = 1, [107] = 0, [108] = 0, [109] = 0, [110] = 1,\n [111] = 0, [112] = 0, [113] = 0, [114] = 1, [115] = 0,\n [116] = 0, [117] = 0, [118] = 1, [119] = 0, [120] = 0,\n [121] = 0, [122] = 1, [123] = 0, [124] = 0, [125] = 0,\n [126] = 1, [127] = 0, [128] = 0, [129] = 0, [130] = 0,\n [131] = 0, [132] = 0, [133] = 0, [134] = 1, [135] = 0,\n};\n\n// 0 ~ 1970 ... 135 ~ 2105\nstatic const uint16_t days_across_years[] = {\n [ 1] = 365, [ 2] = 730, [ 3] = 1096, [ 4] = 1461, [ 5] = 1826,\n [ 6] = 2191, [ 7] = 2557, [ 8] = 2922, [ 9] = 3287, [ 10] = 3652,\n [ 11] = 4018, [ 12] = 4383, [ 13] = 4748, [ 14] = 5113, [ 15] = 5479,\n [ 16] = 5844, [ 17] = 6209, [ 18] = 6574, [ 19] = 6940, [ 20] = 7305,\n [ 21] = 7670, [ 22] = 8035, [ 23] = 8401, [ 24] = 8766, [ 25] = 9131,\n [ 26] = 9496, [ 27] = 9862, [ 28] = 10227, [ 29] = 10592, [ 30] = 10957,\n [ 31] = 11323, [ 32] = 11688, [ 33] = 12053, [ 34] = 12418, [ 35] = 12784,\n [ 36] = 13149, [ 37] = 13514, [ 38] = 13879, [ 39] = 14245, [ 40] = 14610,\n [ 41] = 14975, [ 42] = 15340, [ 43] = 15706, [ 44] = 16071, [ 45] = 16436,\n [ 46] = 16801, [ 47] = 17167, [ 48] = 17532, [ 49] = 17897, [ 50] = 18262,\n [ 51] = 18628, [ 52] = 18993, [ 53] = 19358, [ 54] = 19723, [ 55] = 20089,\n [ 56] = 20454, [ 57] = 20819, [ 58] = 21184, [ 59] = 21550, [ 60] = 21915,\n [ 61] = 22280, [ 62] = 22645, [ 63] = 23011, [ 64] = 23376, [ 65] = 23741,\n [ 66] = 24106, [ 67] = 24472, [ 68] = 24837, [ 69] = 25202, [ 70] = 25567,\n [ 71] = 25933, [ 72] = 26298, [ 73] = 26663, [ 74] = 27028, [ 75] = 27394,\n [ 76] = 27759, [ 77] = 28124, [ 78] = 28489, [ 79] = 28855, [ 80] = 29220,\n [ 81] = 29585, [ 82] = 29950, [ 83] = 30316, [ 84] = 30681, [ 85] = 31046,\n [ 86] = 31411, [ 87] = 31777, [ 88] = 32142, [ 89] = 32507, [ 90] = 32872,\n [ 91] = 33238, [ 92] = 33603, [ 93] = 33968, [ 94] = 34333, [ 95] = 34699,\n [ 96] = 35064, [ 97] = 35429, [ 98] = 35794, [ 99] = 36160, [100] = 36525,\n [101] = 36890, [102] = 37255, [103] = 37621, [104] = 37986, [105] = 38351,\n [106] = 38716, [107] = 39082, [108] = 39447, [109] = 39812, [110] = 40177,\n [111] = 40543, [112] = 40908, [113] = 41273, [114] = 41638, [115] = 42004,\n [116] = 42369, [117] = 42734, [118] = 43099, [119] = 43465, [120] = 43830,\n [121] = 44195, [122] = 44560, [123] = 44926, [124] = 45291, [125] = 45656,\n [126] = 46021, [127] = 46387, [128] = 46752, [129] = 47117, [130] = 47482,\n [131] = 47847, [132] = 48212, [133] = 48577, [134] = 48942, [135] = 49308,\n};\n\nint date_to_timestamp(uint8_t *buff, uint32_t *timestamp)\n{\n\tuint32_t year, month, day, hour, minute, second;\n\tuint32_t leap_day = 0;\n\n\tyear = 1000 * (buff[ 0] - '0') + 100 * (buff[ 1] - '0') +\n\t 10 * (buff[ 2] - '0') + (buff[ 3] - '0');\n\tmonth = 10 * (buff[ 4] - '0') + (buff[ 5] - '0');\n\tday = 10 * (buff[ 6] - '0') + (buff[ 7] - '0');\n\thour = 10 * (buff[ 8] - '0') + (buff[ 9] - '0');\n\tminute = 10 * (buff[10] - '0') + (buff[11] - '0');\n\tsecond = 10 * (buff[12] - '0') + (buff[13] - '0');\n\n\tif (year < 1970 || year > 2105 || month < 1 || month > 12 || day < 1) {\n\t\treturn ZS_BAD_DATE;\n\t} else {\n\t\tyear -= 1970;\n\t}\n\n\tif (is_leap_year[year]) {\n\t\tif (month > 2) {\n\t\t\tleap_day = 1; // Add one day in case of leap year.\n\t\t} else if (month == 2 &&\n\t\t day > (uint32_t)(days_in_months[month] + 1)) {\n\t\t\treturn ZS_BAD_DATE;\n\t\t}\n\t} else if (day > days_in_months[month]){\n\t\treturn ZS_BAD_DATE;\n\t}\n\n\tif (hour > 23 || minute > 59 || second > 59) {\n\t\treturn ZS_BAD_TIME;\n\t}\n\n\t*timestamp = hour * 3600 + minute * 60 + second +\n\t (days_across_years[year] +\n\t days_across_months[month] +\n\t day - 1 + leap_day) * 86400;\n\n\treturn ZS_OK;\n}\n\nvoid wire_dname_to_str(const uint8_t *data,\n const uint32_t data_len,\n char *text)\n{\n\tuint32_t i = 0, text_len = 0;\n\n\tif (data == NULL || data_len == 0 || text == NULL) {\n\t\treturn;\n\t}\n\n\tuint8_t label_len = data[0];\n\n\t// Loop over data characters.\n\tfor (i = 1; i < data_len; i++) {\n\t\t// Replace label length with dot.\n\t\tif (label_len == 0) {\n\t\t\tlabel_len = data[i];\n\t\t\ttext[text_len++] = '.';\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Just in case use \\123 notation.\n\t\ttext[text_len++] = '\\\\';\n\t\ttext[text_len++] = (data[i] / 100) + '0';\n\t\ttext[text_len++] = (data[i] / 10) % 10 + '0';\n\t\ttext[text_len++] = (data[i] ) % 10 + '0';\n\n\t\tlabel_len--;\n\t}\n\n\t// Add trailing dot for root domain.\n\tif (data_len == 1 && label_len == 0) {\n\t\ttext[text_len++] = '.';\n\t}\n\n\t// Ending text string.\n\ttext[text_len] = 0;\n}\n\nuint8_t loc64to8(uint64_t number)\n{\n\tuint8_t exponent = 0;\n\n\twhile (number > 9) {\n\t\tnumber /= 10;\n\t\texponent++;\n\t}\n\t// First 4 bits are mantisa, second 4 bits are exponent.\n\treturn ((uint8_t)number << 4) + (exponent & 15);\n}\n"} +{"text": "package com.jstun.core.attribute;\r\n\r\nimport com.jstun.core.attribute.MessageAttributeInterface.MessageAttributeType;\r\n\r\npublic class UnknownMessageAttributeException extends MessageAttributeParsingException {\r\n\tprivate static final long serialVersionUID = 5375193544145543299L;\r\n\t\r\n\tprivate MessageAttributeType type;\r\n\t\r\n\tpublic UnknownMessageAttributeException(String mesg, MessageAttributeType type) {\r\n\t\tsuper(mesg);\r\n\t\tthis.type = type;\r\n\t}\r\n\t\r\n\tpublic MessageAttributeType getType() {\r\n\t\treturn type;\r\n\t}\r\n}\r\n"} +{"text": "// This file was procedurally generated from the following sources:\n// - src/class-elements/private-getter-is-not-a-own-property.case\n// - src/class-elements/default/cls-decl.template\n/*---\ndescription: Private getter is not stored as an own property of objects (field definitions in a class declaration)\nesid: prod-FieldDefinition\nfeatures: [class-methods-private, class]\nflags: [generated]\ninfo: |\n PrivateFieldGet (P, O)\n 1. Assert: P is a Private Name.\n 2. If O is not an object, throw a TypeError exception.\n 3. If P.[[Kind]] is \"field\",\n a. Let entry be PrivateFieldFind(P, O).\n b. If entry is empty, throw a TypeError exception.\n c. Return entry.[[PrivateFieldValue]].\n 4. Perform ? PrivateBrandCheck(O, P).\n 5. If P.[[Kind]] is \"method\",\n a. Return P.[[Value]].\n 6. Else,\n a. Assert: P.[[Kind]] is \"accessor\".\n b. If P does not have a [[Get]] field, throw a TypeError exception.\n c. Let getter be P.[[Get]].\n d. Return ? Call(getter, O).\n\n---*/\n\n\nclass C {\n get #m() { return \"Test262\"; }\n\n checkPrivateGetter() {\n assert.sameValue(this.hasOwnProperty(\"#m\"), false);\n assert.sameValue(\"#m\" in this, false);\n\n assert.sameValue(this.__lookupGetter__(\"#m\"), undefined);\n\n assert.sameValue(this.#m, \"Test262\");\n\n return 0;\n }\n}\n\nlet c = new C();\nassert.sameValue(c.checkPrivateGetter(), 0);\n"} +{"text": "#! /bin/bash -e\nSOURCE=\"${BASH_SOURCE[0]}\"\nif [ -z $SOURCE ]; then\n # zsh support....\n SOURCE=${(%):-%N}\nfi\n\nwhile [ -h \"$SOURCE\" ]; do\n DIR=\"$( cd -P \"$( dirname \"$SOURCE\" )\" && pwd )\"\n SOURCE=\"$(readlink \"$SOURCE\")\"\n [[ $SOURCE != /* ]] && SOURCE=\"$DIR/$SOURCE\"\ndone\nROOT=\"$( cd -P \"$( dirname \"$SOURCE\" )\" && pwd )\"\n\nplatform=$(uname | tr '[:upper:]' '[:lower:]')\ntarget=\"$ROOT/$platform\"\n\nif [ ! -d $target ];\nthen\n echo \"Unknown flow platform $platform\"\n exit 1\nfi\n\nexec $target/flow/flow \"$@\"\n"} +{"text": "//\n// Generated by class-dump 3.5 (64 bit) (Debug version compiled Jun 9 2015 22:53:21).\n//\n// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2014 by Steve Nygard.\n//\n\n#import \"NSObject-Protocol.h\"\n\n@class NSEvent, NSMenu, NSMenuItem, NSScreen;\n\n@protocol NSMenuDelegate <NSObject>\n\n@optional\n- (struct CGRect)confinementRectForMenu:(NSMenu *)arg1 onScreen:(NSScreen *)arg2;\n- (void)menu:(NSMenu *)arg1 willHighlightItem:(NSMenuItem *)arg2;\n- (void)menuDidClose:(NSMenu *)arg1;\n- (void)menuWillOpen:(NSMenu *)arg1;\n- (BOOL)menuHasKeyEquivalent:(NSMenu *)arg1 forEvent:(NSEvent *)arg2 target:(id *)arg3 action:(SEL *)arg4;\n- (BOOL)menu:(NSMenu *)arg1 updateItem:(NSMenuItem *)arg2 atIndex:(long long)arg3 shouldCancel:(BOOL)arg4;\n- (long long)numberOfItemsInMenu:(NSMenu *)arg1;\n- (void)menuNeedsUpdate:(NSMenu *)arg1;\n@end\n\n"} +{"text": "<!DOCTYPE html>\n<html>\n<head>\n <title>API documentation</title>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n <link type='text/css' rel='stylesheet' href='../../../apidoc/stylesheets/bundled/bootstrap.min.css'/>\n<link type='text/css' rel='stylesheet' href='../../../apidoc/stylesheets/bundled/prettify.css'/>\n<link type='text/css' rel='stylesheet' href='../../../apidoc/stylesheets/bundled/bootstrap-responsive.min.css'/>\n <link type='text/css' rel='stylesheet' href='../../../apidoc/stylesheets/application.css'/>\n <!-- IE6-8 support of HTML5 elements -->\n <!--[if lt IE 9]>\n <script src=\"//html5shim.googlecode.com/svn/trunk/html5.js\"></script>\n <![endif]-->\n</head>\n<body>\n <div class=\"container-fluid\">\n <div class=\"row-fluid\">\n <div id='container'>\n <ul class='breadcrumb'>\n <li>\n <a href='../../../apidoc/v2.en.html'>Foreman v2</a>\n <span class='divider'>/</span>\n </li>\n <li>\n <a href='../../../apidoc/v2/bookmarks.en.html'>\n Bookmarks\n \n </a>\n <span class='divider'>/</span>\n </li>\n <li class='active'>show</li>\n <li class='pull-right'>\n &nbsp;[ <a href=\"../../../apidoc/v2/bookmarks/show.pt_BR.html\">pt_BR</a> | <a href=\"../../../apidoc/v2/bookmarks/show.de.html\">de</a> | <a href=\"../../../apidoc/v2/bookmarks/show.it.html\">it</a> | <a href=\"../../../apidoc/v2/bookmarks/show.sv_SE.html\">sv_SE</a> | <a href=\"../../../apidoc/v2/bookmarks/show.zh_CN.html\">zh_CN</a> | <a href=\"../../../apidoc/v2/bookmarks/show.en_GB.html\">en_GB</a> | <a href=\"../../../apidoc/v2/bookmarks/show.cs_CZ.html\">cs_CZ</a> | <a href=\"../../../apidoc/v2/bookmarks/show.fr.html\">fr</a> | <a href=\"../../../apidoc/v2/bookmarks/show.ru.html\">ru</a> | <a href=\"../../../apidoc/v2/bookmarks/show.ja.html\">ja</a> | <a href=\"../../../apidoc/v2/bookmarks/show.es.html\">es</a> | <a href=\"../../../apidoc/v2/bookmarks/show.ko.html\">ko</a> | <a href=\"../../../apidoc/v2/bookmarks/show.ca.html\">ca</a> | <a href=\"../../../apidoc/v2/bookmarks/show.gl.html\">gl</a> | <b><a href=\"../../../apidoc/v2/bookmarks/show.en.html\">en</a></b> | <a href=\"../../../apidoc/v2/bookmarks/show.zh_TW.html\">zh_TW</a> | <a href=\"../../../apidoc/v2/bookmarks/show.nl_NL.html\">nl_NL</a> | <a href=\"../../../apidoc/v2/bookmarks/show.pl.html\">pl</a> ]\n</li>\n\n\n</ul>\n\n <div class='page-header'>\n <h1>\n GET /api/bookmarks/:id\n <br>\n <small>Show a bookmark</small>\n </h1>\n </div>\n\n<div>\n\n \n\n\n\n <h2>Examples</h2>\n <pre class=\"prettyprint\">GET /api/bookmarks/980190962-foo\n200\n{\n &quot;name&quot;: &quot;foo&quot;,\n &quot;controller&quot;: &quot;hosts&quot;,\n &quot;query&quot;: &quot;foo=boo&quot;,\n &quot;public&quot;: true,\n &quot;id&quot;: 980190962,\n &quot;owner_id&quot;: null,\n &quot;owner_type&quot;: null\n}</pre>\n\n <h2>Params</h2>\n <table class='table'>\n <thead>\n <tr>\n <th>Param name</th>\n <th>Description</th>\n </tr>\n </thead>\n <tbody>\n <tr style='background-color:rgb(255,255,255);'>\n <td>\n <strong>location_id </strong><br>\n <small>\n optional\n \n </small>\n </td>\n <td>\n \n<p>Scope by locations</p>\n\n <p><strong>Validations:</strong></p>\n <ul>\n <li>\n<p>Must be a Integer</p>\n</li>\n </ul>\n\n </td>\n\n </tr>\n\n \n <tr style='background-color:rgb(255,255,255);'>\n <td>\n <strong>organization_id </strong><br>\n <small>\n optional\n \n </small>\n </td>\n <td>\n \n<p>Scope by organizations</p>\n\n <p><strong>Validations:</strong></p>\n <ul>\n <li>\n<p>Must be a Integer</p>\n</li>\n </ul>\n\n </td>\n\n </tr>\n\n \n <tr style='background-color:rgb(255,255,255);'>\n <td>\n <strong>id </strong><br>\n <small>\n required\n \n </small>\n </td>\n <td>\n \n <p><strong>Validations:</strong></p>\n <ul>\n <li>\n<p>Must be an identifier, string from 1 to 128 characters containing only alphanumeric characters, space, underscore(_), hypen(-) with no leading or trailing space.</p>\n</li>\n </ul>\n\n </td>\n\n </tr>\n\n \n\n </tbody>\n </table>\n\n\n\n\n</div>\n\n \n\n \n </div>\n </div>\n <hr>\n <footer></footer>\n </div>\n <script type='text/javascript' src='../../../apidoc/javascripts/bundled/jquery.js'></script>\n<script type='text/javascript' src='../../../apidoc/javascripts/bundled/bootstrap-collapse.js'></script>\n<script type='text/javascript' src='../../../apidoc/javascripts/bundled/prettify.js'></script>\n<script type='text/javascript' src='../../../apidoc/javascripts/apipie.js'></script>\n</body>\n</html>\n"} +{"text": "there are few things more frustrating to a film buff than seeing an otherwise good movie marred beyond redemption by a disastrous ending . \n"} +{"text": "Cylindrical_Case01_ADAMS\n\nTime\tX_Acc\tY_Acc\tZ_Acc\n+0.000000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.000000E-02\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.000000E-02\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.000000E-02\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.000000E-02\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+5.000000E-02\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+6.000000E-02\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+7.000000E-02\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+8.000000E-02\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+9.000000E-02\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.000000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.100000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.200000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.300000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.400000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.500000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.600000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.700000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.800000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.900000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.000000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.100000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.200000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.300000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.400000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.500000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.600000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.700000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.800000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.900000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.000000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.100000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.200000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.300000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.400000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.500000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.600000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.700000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.800000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.900000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.000000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.100000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.200000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.300000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.400000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.500000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.600000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.700000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.800000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.900000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+5.000000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+5.100000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+5.200000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+5.300000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+5.400000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+5.500000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+5.600000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+5.700000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+5.800000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+5.900000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+6.000000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+6.100000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+6.200000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+6.300000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+6.400000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+6.500000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+6.600000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+6.700000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+6.800000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+6.900000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+7.000000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+7.100000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+7.200000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+7.300000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+7.400000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+7.500000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+7.600000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+7.700000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+7.800000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+7.900000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+8.000000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+8.100000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+8.200000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+8.300000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+8.400000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+8.500000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+8.600000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+8.700000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+8.800000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+8.900000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+9.000000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+9.100000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+9.200000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+9.300000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+9.400000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+9.500000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+9.600000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+9.700000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+9.800000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+9.900000E-01\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.000000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.010000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.020000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.030000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.040000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.050000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.060000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.070000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.080000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.090000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.100000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.110000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.120000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.130000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.140000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.150000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.160000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.170000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.180000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.190000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.200000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.210000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.220000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.230000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.240000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.250000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.260000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.270000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.280000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.290000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.300000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.310000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.320000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.330000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.340000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.350000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.360000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.370000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.380000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.390000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.400000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.410000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.420000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.430000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.440000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.450000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.460000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.470000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.480000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.490000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.500000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.510000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.520000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.530000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.540000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.550000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.560000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.570000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.580000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.590000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.600000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.610000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.620000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.630000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.640000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.650000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.660000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.670000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.680000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.690000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.700000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.710000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.720000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.730000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.740000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.750000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.760000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.770000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.780000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.790000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.800000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.810000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.820000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.830000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.840000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.850000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.860000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.870000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.880000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.890000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.900000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.910000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.920000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.930000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.940000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.950000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.960000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.970000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.980000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+1.990000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.000000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.010000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.020000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.030000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.040000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.050000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.060000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.070000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.080000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.090000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.100000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.110000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.120000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.130000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.140000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.150000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.160000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.170000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.180000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.190000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.200000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.210000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.220000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.230000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.240000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.250000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.260000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.270000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.280000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.290000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.300000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.310000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.320000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.330000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.340000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.350000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.360000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.370000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.380000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.390000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.400000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.410000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.420000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.430000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.440000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.450000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.460000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.470000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.480000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.490000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.500000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.510000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.520000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.530000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.540000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.550000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.560000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.570000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.580000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.590000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.600000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.610000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.620000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.630000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.640000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.650000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.660000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.670000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.680000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.690000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.700000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.710000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.720000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.730000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.740000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.750000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.760000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.770000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.780000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.790000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.800000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.810000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.820000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.830000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.840000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.850000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.860000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.870000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.880000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.890000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.900000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.910000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.920000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.930000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.940000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.950000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.960000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.970000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.980000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+2.990000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.000000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.010000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.020000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.030000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.040000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.050000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.060000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.070000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.080000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.090000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.100000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.110000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.120000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.130000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.140000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.150000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.160000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.170000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.180000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.190000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.200000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.210000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.220000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.230000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.240000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.250000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.260000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.270000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.280000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.290000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.300000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.310000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.320000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.330000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.340000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.350000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.360000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.370000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.380000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.390000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.400000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.410000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.420000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.430000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.440000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.450000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.460000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.470000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.480000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.490000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.500000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.510000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.520000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.530000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.540000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.550000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.560000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.570000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.580000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.590000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.600000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.610000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.620000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.630000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.640000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.650000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.660000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.670000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.680000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.690000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.700000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.710000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.720000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.730000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.740000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.750000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.760000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.770000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.780000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.790000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.800000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.810000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.820000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.830000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.840000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.850000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.860000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.870000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.880000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.890000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.900000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.910000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.920000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.930000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.940000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.950000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.960000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.970000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.980000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+3.990000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.000000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.010000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.020000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.030000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.040000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.050000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.060000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.070000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.080000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.090000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.100000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.110000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.120000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.130000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.140000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.150000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.160000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.170000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.180000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.190000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.200000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.210000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.220000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.230000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.240000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.250000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.260000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.270000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.280000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.290000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.300000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.310000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.320000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.330000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.340000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.350000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.360000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.370000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.380000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.390000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.400000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.410000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.420000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.430000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.440000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.450000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.460000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.470000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.480000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.490000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.500000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.510000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.520000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.530000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.540000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.550000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.560000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.570000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.580000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.590000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.600000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.610000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.620000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.630000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.640000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.650000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.660000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.670000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.680000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.690000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.700000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.710000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.720000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.730000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.740000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.750000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.760000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.770000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.780000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.790000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.800000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.810000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.820000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.830000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.840000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.850000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.860000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.870000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.880000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.890000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.900000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.910000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.920000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.930000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.940000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.950000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.960000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.970000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.980000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+4.990000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n+5.000000E+00\t+0.000000E+00\t+0.000000E+00\t-9.806650E+00\n"} +{"text": "# Written by Bram Cohen\n# see LICENSE.txt for license information\n\nfrom CurrentRateMeasure import Measure\n\nclass Upload:\n def __init__(self, connection, choker, storage, \n max_slice_length, max_rate_period, fudge):\n self.connection = connection\n self.choker = choker\n self.storage = storage\n self.max_slice_length = max_slice_length\n self.max_rate_period = max_rate_period\n self.choked = True\n self.interested = False\n self.buffer = []\n self.measure = Measure(max_rate_period, fudge)\n if storage.do_I_have_anything():\n connection.send_bitfield(storage.get_have_list())\n\n def got_not_interested(self):\n if self.interested:\n self.interested = False\n del self.buffer[:]\n self.choker.not_interested(self.connection)\n\n def got_interested(self):\n if not self.interested:\n self.interested = True\n self.choker.interested(self.connection)\n\n def flushed(self):\n while len(self.buffer) > 0 and self.connection.is_flushed():\n index, begin, length = self.buffer[0]\n del self.buffer[0]\n piece = self.storage.get_piece(index, begin, length)\n if piece is None:\n self.connection.close()\n return\n self.measure.update_rate(len(piece))\n self.connection.send_piece(index, begin, piece)\n\n def got_request(self, index, begin, length):\n if not self.interested or length > self.max_slice_length:\n self.connection.close()\n return\n if not self.choked:\n self.buffer.append((index, begin, length))\n self.flushed()\n\n def got_cancel(self, index, begin, length):\n try:\n self.buffer.remove((index, begin, length))\n except ValueError:\n pass\n\n def choke(self):\n if not self.choked:\n self.choked = True\n del self.buffer[:]\n self.connection.send_choke()\n\n def unchoke(self):\n if self.choked:\n self.choked = False\n self.connection.send_unchoke()\n \n def is_choked(self):\n return self.choked\n \n def is_interested(self):\n return self.interested\n\n def has_queries(self):\n return len(self.buffer) > 0\n\n def get_rate(self):\n return self.measure.get_rate()\n\nclass DummyConnection:\n def __init__(self, events):\n self.events = events\n self.flushed = False\n\n def send_bitfield(self, bitfield):\n self.events.append(('bitfield', bitfield))\n \n def is_flushed(self):\n return self.flushed\n\n def close(self):\n self.events.append('closed')\n\n def send_piece(self, index, begin, piece):\n self.events.append(('piece', index, begin, piece))\n\n def send_choke(self):\n self.events.append('choke')\n\n def send_unchoke(self):\n self.events.append('unchoke')\n\nclass DummyChoker:\n def __init__(self, events):\n self.events = events\n\n def interested(self, connection):\n self.events.append('interested')\n \n def not_interested(self, connection):\n self.events.append('not interested')\n\nclass DummyStorage:\n def __init__(self, events):\n self.events = events\n\n def do_I_have_anything(self):\n self.events.append('do I have')\n return True\n\n def get_have_list(self):\n self.events.append('get have list')\n return [False, True]\n\n def get_piece(self, index, begin, length):\n self.events.append(('get piece', index, begin, length))\n if length == 4:\n return None\n return 'a' * length\n\ndef test_skip_over_choke():\n events = []\n dco = DummyConnection(events)\n dch = DummyChoker(events)\n ds = DummyStorage(events)\n u = Upload(dco, dch, ds, 100, 20, 5)\n assert u.is_choked()\n assert not u.is_interested()\n u.got_interested()\n assert u.is_interested()\n u.got_request(0, 0, 3)\n dco.flushed = True\n u.flushed()\n assert events == ['do I have', 'get have list', \n ('bitfield', [False, True]), 'interested']\n\ndef test_bad_piece():\n events = []\n dco = DummyConnection(events)\n dch = DummyChoker(events)\n ds = DummyStorage(events)\n u = Upload(dco, dch, ds, 100, 20, 5)\n assert u.is_choked()\n assert not u.is_interested()\n u.got_interested()\n assert u.is_interested()\n u.unchoke()\n assert not u.is_choked()\n u.got_request(0, 0, 4)\n dco.flushed = True\n u.flushed()\n assert events == ['do I have', 'get have list', \n ('bitfield', [False, True]), 'interested', 'unchoke', \n ('get piece', 0, 0, 4), 'closed']\n\ndef test_still_rejected_after_unchoke():\n events = []\n dco = DummyConnection(events)\n dch = DummyChoker(events)\n ds = DummyStorage(events)\n u = Upload(dco, dch, ds, 100, 20, 5)\n assert u.is_choked()\n assert not u.is_interested()\n u.got_interested()\n assert u.is_interested()\n u.unchoke()\n assert not u.is_choked()\n u.got_request(0, 0, 3)\n u.choke()\n u.unchoke()\n dco.flushed = True\n u.flushed()\n assert events == ['do I have', 'get have list', \n ('bitfield', [False, True]), 'interested', 'unchoke', \n 'choke', 'unchoke']\n\ndef test_sends_when_flushed():\n events = []\n dco = DummyConnection(events)\n dch = DummyChoker(events)\n ds = DummyStorage(events)\n u = Upload(dco, dch, ds, 100, 20, 5)\n u.unchoke()\n u.got_interested()\n u.got_request(0, 1, 3)\n dco.flushed = True\n u.flushed()\n u.flushed()\n assert events == ['do I have', 'get have list', \n ('bitfield', [False, True]), 'unchoke', 'interested', \n ('get piece', 0, 1, 3), ('piece', 0, 1, 'aaa')]\n\ndef test_sends_immediately():\n events = []\n dco = DummyConnection(events)\n dch = DummyChoker(events)\n ds = DummyStorage(events)\n u = Upload(dco, dch, ds, 100, 20, 5)\n u.unchoke()\n u.got_interested()\n dco.flushed = True\n u.got_request(0, 1, 3)\n assert events == ['do I have', 'get have list', \n ('bitfield', [False, True]), 'unchoke', 'interested', \n ('get piece', 0, 1, 3), ('piece', 0, 1, 'aaa')]\n\ndef test_cancel():\n events = []\n dco = DummyConnection(events)\n dch = DummyChoker(events)\n ds = DummyStorage(events)\n u = Upload(dco, dch, ds, 100, 20, 5)\n u.unchoke()\n u.got_interested()\n u.got_request(0, 1, 3)\n u.got_cancel(0, 1, 3)\n u.got_cancel(0, 1, 2)\n u.flushed()\n dco.flushed = True\n assert events == ['do I have', 'get have list', \n ('bitfield', [False, True]), 'unchoke', 'interested']\n\ndef test_clears_on_not_interested():\n events = []\n dco = DummyConnection(events)\n dch = DummyChoker(events)\n ds = DummyStorage(events)\n u = Upload(dco, dch, ds, 100, 20, 5)\n u.unchoke()\n u.got_interested()\n u.got_request(0, 1, 3)\n u.got_not_interested()\n dco.flushed = True\n u.flushed()\n assert events == ['do I have', 'get have list', \n ('bitfield', [False, True]), 'unchoke', 'interested', \n 'not interested']\n\ndef test_close_when_sends_on_not_interested():\n events = []\n dco = DummyConnection(events)\n dch = DummyChoker(events)\n ds = DummyStorage(events)\n u = Upload(dco, dch, ds, 100, 20, 5)\n u.got_request(0, 1, 3)\n assert events == ['do I have', 'get have list', \n ('bitfield', [False, True]), 'closed']\n\ndef test_close_over_max_length():\n events = []\n dco = DummyConnection(events)\n dch = DummyChoker(events)\n ds = DummyStorage(events)\n u = Upload(dco, dch, ds, 100, 20, 5)\n u.got_interested()\n u.got_request(0, 1, 101)\n assert events == ['do I have', 'get have list', \n ('bitfield', [False, True]), 'interested', 'closed']\n\ndef test_no_bitfield_on_start_empty():\n events = []\n dco = DummyConnection(events)\n dch = DummyChoker(events)\n ds = DummyStorage(events)\n ds.do_I_have_anything = lambda: False\n u = Upload(dco, dch, ds, 100, 20, 5)\n assert events == []\n"} +{"text": "UPSCLI_CLEANUP(3)\n=================\n\nNAME\n----\n\nupscli_cleanup - Clean-up upsclient module after usage.\n\nSYNOPSIS\n--------\n\n #include <upsclient.h>\n\n int upscli_cleanup(void);\n\nDESCRIPTION\n-----------\nThe *upscli_cleanup()* function flushes SSL caches and frees memory\nused internally in upsclient module.\n\nRETURN VALUE\n------------\n\nThe *upscli_cleanup()* function returns 1 on success, or -1 if an error occurs.\n\nSEE ALSO\n--------\nlinkman:upscli_init[3],\nlinkman:upscli_strerror[3], linkman:upscli_upserror[3]\n"} +{"text": "[\n \"ScActorCore\",\n \"ScActorSim\",\n \"ScArticulationCore\",\n \"ScArticulationJointCore\",\n \"ScArticulationJointSim\",\n \"ScArticulationSim\",\n \"ScBodyCore\",\n \"ScBodySim\",\n \"ScConstraintCore\",\n \"ScConstraintGroupNode\",\n \"ScConstraintInteraction\",\n \"ScConstraintProjectionManager\",\n \"ScConstraintProjectionTree\",\n \"ScConstraintSim\",\n \"ScElementInteractionMarker\",\n \"ScElementSim\",\n \"ScInteraction\",\n \"ScIterators\",\n \"ScMetaData\",\n \"ScNPhaseCore\",\n \"ScPhysics\",\n \"ScRigidCore\",\n \"ScRigidSim\",\n \"ScScene\",\n \"ScShapeCore\",\n \"ScShapeInteraction\",\n \"ScShapeSim\",\n \"ScSimStats\",\n \"ScSimulationController\",\n \"ScSqBoundsManager\",\n \"ScStaticCore\",\n \"ScTriggerInteraction\",\n]"} +{"text": "<!--\n ! Licensed to the Apache Software Foundation (ASF) under one\n ! or more contributor license agreements. See the NOTICE file\n ! distributed with this work for additional information\n ! regarding copyright ownership. The ASF licenses this file\n ! to you under the Apache License, Version 2.0 (the\n ! \"License\"); you may not use this file except in compliance\n ! with the License. You may obtain a copy of the License at\n !\n ! http://www.apache.org/licenses/LICENSE-2.0\n !\n ! Unless required by applicable law or agreed to in writing,\n ! software distributed under the License is distributed on an\n ! \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n ! KIND, either express or implied. See the License for the\n ! specific language governing permissions and limitations\n ! under the License.\n !-->\n\n## <a id=\"TemporalFunctions\">Temporal Functions</a> ##\n\n### get_year/get_month/get_day/get_hour/get_minute/get_second/get_millisecond ###\n * Syntax:\n\n get_year/get_month/get_day/get_hour/get_minute/get_second/get_millisecond(temporal_value)\n\n * Accessors for accessing fields in a temporal value\n * Arguments:\n * `temporal_value` : a temporal value represented as one of the following types: `date`, `datetime`, `time`, and `duration`.\n * Return Value:\n * an `bigint` value representing the field to be extracted,\n * `missing` if the argument is a `missing` value,\n * `null` if any argument is a `null` value but no argument is a `missing` value,\n * any other non-interval input value will cause a type error.\n\n * Example:\n\n {\n \"year\": get_year(date(\"2010-10-30\")),\n \"month\": get_month(datetime(\"1987-11-19T23:49:23.938\")),\n \"day\": get_day(date(\"2010-10-30\")),\n \"hour\": get_hour(time(\"12:23:34.930+07:00\")),\n \"min\": get_minute(duration(\"P3Y73M632DT49H743M3948.94S\")),\n \"second\": get_second(datetime(\"1987-11-19T23:49:23.938\")),\n \"ms\": get_millisecond(duration(\"P3Y73M632DT49H743M3948.94S\"))\n };\n\n\n * The expected result is:\n\n { \"year\": 2010, \"month\": 11, \"day\": 30, \"hour\": 5, \"min\": 28, \"second\": 23, \"ms\": 94 }\n\n\n### adjust_datetime_for_timezone ###\n * Syntax:\n\n adjust_datetime_for_timezone(datetime, string)\n\n * Adjusts the given datetime `datetime` by applying the timezone information `string`.\n * Arguments:\n * `datetime` : a `datetime` value to be adjusted.\n * `string` : a `string` representing the timezone information.\n * Return Value:\n * a `string` value representing the new datetime after being adjusted by the timezone information,\n * `missing` if any argument is a `missing` value,\n * `null` if any argument is a `null` value but no argument is a `missing` value,\n * a type error will be raised if:\n * the first argument is any other non-datetime value,\n * or, the second argument is any other non-string value.\n\n * Example:\n\n adjust_datetime_for_timezone(datetime(\"2008-04-26T10:10:00\"), \"+08:00\");\n\n\n * The expected result is:\n\n \"2008-04-26T18:10:00.000+08:00\"\n\n\n### adjust_time_for_timezone ###\n * Syntax:\n\n adjust_time_for_timezone(time, string)\n\n * Adjusts the given time `time` by applying the timezone information `string`.\n * Arguments:\n * `time` : a `time` value to be adjusted.\n * `string` : a `string` representing the timezone information.\n * Return Value:\n * a `string` value representing the new time after being adjusted by the timezone information,\n * `missing` if any argument is a `missing` value,\n * `null` if any argument is a `null` value but no argument is a `missing` value,\n * a type error will be raised if:\n * the first argument is any other non-time value,\n * or, the second argument is any other non-string value.\n\n * Example:\n\n adjust_time_for_timezone(get_time_from_datetime(datetime(\"2008-04-26T10:10:00\")), \"+08:00\");\n\n\n * The expected result is:\n\n \"18:10:00.000+08:00\"\n\n\n### calendar_duration_from_datetime ###\n * Syntax:\n\n calendar_duration_from_datetime(datetime, duration_value)\n\n * Gets a user_friendly representation of the duration `duration_value` based on the given datetime `datetime`.\n * Arguments:\n * `datetime` : a `datetime` value to be used as the reference time point.\n * `duration_value` : a `duration` value to be converted.\n * Return Value:\n * a `duration` value with the duration as `duration_value` but with a user_friendly representation,\n * `missing` if any argument is a `missing` value,\n * `null` if any argument is a `null` value but no argument is a `missing` value,\n * a type error will be raised if:\n * the first argument is any other non-datetime value,\n * or, the second argument is any other non-duration input value.\n\n * Example:\n\n calendar_duration_from_datetime(\n datetime(\"2016-03-26T10:10:00\"),\n datetime(\"2016-03-26T10:10:00\") - datetime(\"2011-01-01T00:00:00\")\n );\n\n * The expected result is:\n\n duration(\"P5Y2M24DT10H10M\")\n\n\n### get_year_month_duration/get_day_time_duration ###\n * Syntax:\n\n get_year_month_duration/get_day_time_duration(duration_value)\n\n * Extracts the correct `duration` subtype from `duration_value`.\n * Arguments:\n * `duration_value` : a `duration` value to be converted.\n * Return Value:\n * a `year_month_duration` value or a `day_time_duration` value,\n * `missing` if the argument is a `missing` value,\n * `null` if the argument is a `null` value,\n * any other non-duration input value will cause a type error.\n\n * Example:\n\n get_year_month_duration(duration(\"P12M50DT10H\"));\n\n\n * The expected result is:\n\n year_month_duration(\"P1Y\")\n\n### months_from_year_month_duration/ms_from_day_time_duration ###\n* Syntax:\n\n months_from_year_month_duration/ms_from_day_time_duration(duration_value)\n\n* Extracts the number of months or the number of milliseconds from the `duration` subtype.\n* Arguments:\n * `duration_value` : a `duration` of the correct subtype.\n* Return Value:\n * a `bigint` representing the number of months/milliseconds,\n * `missing` if the argument is a `missing` value,\n * `null` if the argument is a `null` value,\n * any other non-duration input value will cause a type error.\n\n* Example:\n\n {\n \"months\": months_from_year_month_duration(get_year_month_duration(duration(\"P5Y7MT50M\"))),\n \"milliseconds\": ms_from_day_time_duration(get_day_time_duration(duration(\"P5Y7MT50M\")))\n };\n\n* The expected result is:\n\n {\"months\": 67, \"milliseconds\": 3000000}\n\n\n### duration_from_months/duration_from_ms ###\n* Syntax:\n\n duration_from_months/duration_from_ms(number_value)\n\n* Creates a `duration` from `number_value`.\n* Arguments:\n * `number_value` : a `bigint` representing the number of months/milliseconds\n* Return Value:\n * a `duration` containing `number_value` value for months/milliseconds,\n * `missing` if the argument is a `missing` value,\n * `null` if the argument is a `null` value,\n * any other non-duration input value will cause a type error.\n\n* Example:\n\n duration_from_months(8);\n\n* The expected result is:\n\n duration(\"P8M\")\n\n\n### duration_from_interval ###\n* Syntax:\n\n duration_from_interval(interval_value)\n\n* Creates a `duration` from `interval_value`.\n* Arguments:\n * `interval_value` : an `interval` value\n* Return Value:\n * a `duration` representing the time in the `interval_value`\n * `missing` if the argument is a `missing` value,\n * `null` if the argument is a `null` value,\n * any other non-duration input value will cause a type error.\n\n* Example:\n\n {\n \"dr1\" : duration_from_interval(interval(date(\"2010-10-30\"), date(\"2010-12-21\"))),\n \"dr2\" : duration_from_interval(interval(datetime(\"2012-06-26T01:01:01.111\"), datetime(\"2012-07-27T02:02:02.222\"))),\n \"dr3\" : duration_from_interval(interval(time(\"12:32:38\"), time(\"20:29:20\"))),\n \"dr4\" : duration_from_interval(null)\n };\n\n* The expected result is:\n\n {\n \"dr1\": day_time_duration(\"P52D\"),\n \"dr2\": day_time_duration(\"P31DT1H1M1.111S\"),\n \"dr3\": day_time_duration(\"PT7H56M42S\"),\n \"dr4\": null\n }\n\n\n### current_date ###\n * Syntax:\n\n current_date()\n\n * Gets the current date.\n * Arguments: None\n * Return Value:\n * a `date` value of the date when the function is called.\n\n### current_time ###\n * Syntax:\n\n current_time()\n\n * Get the current time\n * Arguments: None\n * Return Value:\n * a `time` value of the time when the function is called.\n\n### current_datetime ###\n * Syntax:\n\n current_datetime()\n\n * Get the current datetime\n * Arguments: None\n * Return Value:\n * a `datetime` value of the datetime when the function is called.\n\n\n### get_date_from_datetime ###\n * Syntax:\n\n get_date_from_datetime(datetime)\n\n * Gets the date value from the given datetime value `datetime`.\n * Arguments:\n * `datetime`: a `datetime` value to be extracted from.\n * Return Value:\n * a `date` value from the datetime,\n * any other non-datetime input value will cause a type error.\n\n### get_time_from_datetime ###\n * Syntax:\n\n get_time_from_datetime(datetime)\n\n * Get the time value from the given datetime value `datetime`\n * Arguments:\n * `datetime`: a `datetime` value to be extracted from.\n * Return Value:\n * a `time` value from the datetime.\n * `missing` if the argument is a `missing` value,\n * `null` if the argument is a `null` value,\n * any other non-datetime input value will cause a type error.\n\n * Example:\n\n get_time_from_datetime(datetime(\"2016-03-26T10:10:00\"));\n\n * The expected result is:\n\n time(\"10:10:00.000Z\")\n\n\n### day_of_week ###\n* Syntax:\n\n day_of_week(date)\n\n* Finds the day of the week for a given date (1_7)\n* Arguments:\n * `date`: a `date` value (Can also be a `datetime`)\n* Return Value:\n * an `tinyint` representing the day of the week (1_7),\n * `missing` if the argument is a `missing` value,\n * `null` if the argument is a `null` value,\n * any other non-date input value will cause a type error.\n\n* Example:\n\n day_of_week(datetime(\"2012-12-30T12:12:12.039Z\"));\n\n\n* The expected result is:\n\n 7\n\n\n### date_from_unix_time_in_days ###\n * Syntax:\n\n date_from_unix_time_in_days(numeric_value)\n\n * Gets a date representing the time after `numeric_value` days since 1970_01_01.\n * Arguments:\n * `numeric_value`: a `tinyint`/`smallint`/`integer`/`bigint` value representing the number of days.\n * Return Value:\n * a `date` value as the time after `numeric_value` days since 1970-01-01,\n * `missing` if the argument is a `missing` value,\n * `null` if the argument is a `null` value,\n * any other non-numeric input value will cause a type error.\n\n### datetime_from_unix_time_in_ms ###\n * Syntax:\n\n datetime_from_unix_time_in_ms(numeric_value)\n\n * Gets a datetime representing the time after `numeric_value` milliseconds since 1970_01_01T00:00:00Z.\n * Arguments:\n * `numeric_value`: a `tinyint`/`smallint`/`integer`/`bigint` value representing the number of milliseconds.\n * Return Value:\n * a `datetime` value as the time after `numeric_value` milliseconds since 1970-01-01T00:00:00Z,\n * `missing` if the argument is a `missing` value,\n * `null` if the argument is a `null` value,\n * any other non-numeric input value will cause a type error.\n\n### datetime_from_unix_time_in_secs ###\n * Syntax:\n\n datetime_from_unix_time_in_secs(numeric_value)\n\n * Gets a datetime representing the time after `numeric_value` seconds since 1970_01_01T00:00:00Z.\n * Arguments:\n * `numeric_value`: a `tinyint`/`smallint`/`integer`/`bigint` value representing the number of seconds.\n * Return Value:\n * a `datetime` value as the time after `numeric_value` seconds since 1970_01_01T00:00:00Z,\n * `missing` if the argument is a `missing` value,\n * `null` if the argument is a `null` value,\n * any other non-numeric input value will cause a type error.\n\n### datetime_from_date_time ###\n* Syntax:\n\ndatetime_from_date_time(date,time)\n\n* Gets a datetime representing the combination of `date` and `time`\n * Arguments:\n * `date`: a `date` value\n * `time` a `time` value\n* Return Value:\n * a `datetime` value by combining `date` and `time`,\n * `missing` if any argument is a `missing` value,\n * `null` if any argument is a `null` value but no argument is a `missing` value,\n * a type error will be raised if\n * the first argument is any other non-date value,\n * or, the second argument is any other non-time value.\n\n### time_from_unix_time_in_ms ###\n * Syntax:\n\n time_from_unix_time_in_ms(numeric_value)\n\n * Gets a time representing the time after `numeric_value` milliseconds since 00:00:00.000Z.\n * Arguments:\n * `numeric_value`: a `tinyint`/`smallint`/`integer`/`bigint` value representing the number of milliseconds.\n * Return Value:\n * a `time` value as the time after `numeric_value` milliseconds since 00:00:00.000Z,\n * `missing` if the argument is a `missing` value,\n * `null` if the argument is a `null` value,\n * any other non-numeric input value will cause a type error.\n\n * Example:\n\n {\n \"date\": date_from_unix_time_in_days(15800),\n \"datetime\": datetime_from_unix_time_in_ms(1365139700000),\n \"time\": time_from_unix_time_in_ms(3748)\n };\n\n\n * The expected result is:\n\n { \"date\": date(\"2013-04-05\"), \"datetime\": datetime(\"2013-04-05T05:28:20.000Z\"), \"time\": time(\"00:00:03.748Z\") }\n\n\n### unix_time_from_date_in_days ###\n * Syntax:\n\n unix_time_from_date_in_days(date_value)\n\n * Gets an integer value representing the number of days since 1970_01_01 for `date_value`.\n * Arguments:\n * `date_value`: a `date` value.\n * Return Value:\n * a `bigint` value representing the number of days,\n * `missing` if the argument is a `missing` value,\n * `null` if the argument is a `null` value,\n * any other non-date input value will cause a type error.\n\n\n### unix_time_from_datetime_in_ms ###\n * Syntax:\n\n unix_time_from_datetime_in_ms(datetime_value)\n\n * Gets an integer value representing the time in milliseconds since 1970_01_01T00:00:00Z for `datetime_value`.\n * Arguments:\n * `datetime_value` : a `datetime` value.\n * Return Value:\n * a `bigint` value representing the number of milliseconds,\n * `missing` if the argument is a `missing` value,\n * `null` if the argument is a `null` value,\n * any other non-datetime input value will cause a type error.\n\n\n### unix_time_from_datetime_in_secs ###\n * Syntax:\n\n unix_time_from_datetime_in_secs(datetime_value)\n\n * Gets an integer value representing the time in seconds since 1970_01_01T00:00:00Z for `datetime_value`.\n * Arguments:\n * `datetime_value` : a `datetime` value.\n * Return Value:\n * a `bigint` value representing the number of seconds,\n * `missing` if the argument is a `missing` value,\n * `null` if the argument is a `null` value,\n * any other non-datetime input value will cause a type error.\n\n\n### unix_time_from_time_in_ms ###\n * Syntax:\n\n unix_time_from_time_in_ms(time_value)\n\n * Gets an integer value representing the time the milliseconds since 00:00:00.000Z for `time_value`.\n * Arguments:\n * `time_value` : a `time` value.\n * Return Value:\n * a `bigint` value representing the number of milliseconds,\n * `missing` if the argument is a `missing` value,\n * `null` if the argument is a `null` value,\n * any other non-datetime input value will cause a type error.\n\n * Example:\n\n {\n \"date\": date_from_unix_time_in_days(15800),\n \"datetime\": datetime_from_unix_time_in_ms(1365139700000),\n \"time\": time_from_unix_time_in_ms(3748)\n }\n\n\n * The expected result is:\n\n { \"date\": date(\"2013-04-05\"), \"datetime\": datetime(\"2013-04-05T05:28:20.000Z\"), \"time\": time(\"00:00:03.748Z\") }\n\n\n### parse_date/parse_time/parse_datetime ###\n* Syntax:\n\nparse_date/parse_time/parse_datetime(date,formatting_expression)\n\n* Creates a `date/time/date_time` value by treating `date` with formatting `formatting_expression`\n* Arguments:\n * `date`: a `string` value representing the `date/time/datetime`.\n * `formatting_expression` a `string` value providing the formatting for `date_expression`.Characters used to create date expression:\n * `h` hours\n * `m` minutes\n * `s` seconds\n * `n` milliseconds\n * `a` am/pm\n * `z` timezone\n * `Y` year\n * `M` month\n * `D` day\n * `W` weekday\n * `_`, `'`, `/`, `.`, `,`, `T` seperators for both time and date\n* Return Value:\n * a `date/time/date_time` value corresponding to `date`,\n * `missing` if any argument is a `missing` value,\n * `null` if any argument is a `null` value but no argument is a `missing` value,\n * a type error will be raised if:\n * the first argument is any other non-date value,\n * the second argument is any other non-string value.\n\n* Example:\n\n parse_time(\"30:30\",\"m:s\");\n\n* The expected result is:\n\n time(\"00:30:30.000Z\")\n\n\n### print_date/print_time/print_datetime ###\n* Syntax:\n\n print_date/print_time/print_datetime(date,formatting_expression)\n\n* Creates a `string` representing a `date/time/date_time` value of the `date` using the formatting `formatting_expression`\n* Arguments:\n * `date`: a `date/time/datetime` value.\n * `formatting_expression` a `string` value providing the formatting for `date_expression`. Characters used to create date expression:\n * `h` hours\n * `m` minutes\n * `s` seconds\n * `n` milliseconds\n * `a` am/pm\n * `z` timezone\n * `Y` year\n * `M` month\n * `D` day\n * `W` weekday\n * `_`, `'`, `/`, `.`, `,`, `T` seperators for both time and date\n* Return Value:\n * a `string` value corresponding to `date`,\n * `missing` if any argument is a `missing` value,\n * `null` if any argument is a `null` value but no argument is a `missing` value,\n * a type error will be raised if:\n * the first argument is any other non-date value,\n * the second argument is any other non-string value.\n\n* Example:\n\n print_time(time(\"00:30:30.000Z\"),\"m:s\");\n\n* The expected result is:\n\n \"30:30\"\n\n\n### get_interval_start, get_interval_end ###\n * Syntax:\n\n get_interval_start/get_interval_end(interval)\n\n * Gets the start/end of the given interval.\n * Arguments:\n * `interval`: the interval to be accessed.\n * Return Value:\n * a `time`, `date`, or `datetime` (depending on the time instances of the interval) representing the starting\n or ending time,\n * `missing` if the argument is a `missing` value,\n * `null` if the argument is a `null` value,\n * any other non-interval value will cause a type error.\n\n * Example:\n\n {\n \"start\": get_interval_start(interval_start_from_date(\"1984-01-01\", \"P1Y\")),\n \"end\": get_interval_end(interval_start_from_date(\"1984-01-01\", \"P1Y\"))\n };\n\n\n * The expected result is:\n\n { \"start\": date(\"1984_01_01\"), \"end\": date(\"1985_01_01\") }\n\n\n### get_interval_start_date/get_interval_start_datetimeget_interval_start_time, get_interval_end_date/get_interval_end_datetime/get_interval_end_time ###\n * Syntax:\n\n get_interval_start_date/get_interval_start_datetime/get_interval_start_time/get_interval_end_date/get_interval_end_datetime/get_interval_end_time(interval)\n\n * Gets the start/end of the given interval for the specific date/datetime/time type.\n * Arguments:\n * `interval`: the interval to be accessed.\n * Return Value:\n * a `time`, `date`, or `datetime` (depending on the function) representing the starting or ending time,\n * `missing` if the argument is a `missing` value,\n * `null` if the argument is a `null` value,\n * any other non-interval value will cause a type error.\n\n * Example:\n\n {\n \"start1\": get_interval_start_date(interval_start_from_date(\"1984-01-01\", \"P1Y\")),\n \"end1\": get_interval_end_date(interval_start_from_date(\"1984-01-01\", \"P1Y\")),\n \"start2\": get_interval_start_datetime(interval_start_from_datetime(\"1984-01-01T08:30:00.000\", \"P1Y1H\")),\n \"end2\": get_interval_end_datetime(interval_start_from_datetime(\"1984-01-01T08:30:00.000\", \"P1Y1H\")),\n \"start3\": get_interval_start_time(interval_start_from_time(\"08:30:00.000\", \"P1H\")),\n \"end3\": get_interval_end_time(interval_start_from_time(\"08:30:00.000\", \"P1H\"))\n };\n\n\n * The expected result is:\n\n {\n \"start1\": date(\"1984-01-01\"),\n \"end1\": date(\"1985-01-01\"),\n \"start2\": datetime(\"1984-01-01T08:30:00.000Z\"),\n \"end2\": datetime(\"1985-01-01T09:30:00.000Z\"),\n \"start3\": time(\"08:30:00.000Z\"),\n \"end3\": time(\"09:30:00.000Z\")\n }\n\n\n### get_overlapping_interval ###\n * Syntax:\n\n get_overlapping_interval(interval1, interval2)\n\n * Gets the start/end of the given interval for the specific date/datetime/time type.\n * Arguments:\n * `interval1`: an `interval` value\n * `interval2`: an `interval` value\n * Return Value:\n * an `interval` that is overlapping `interval1` and `interval2`.\n If `interval1` and `interval2` do not overlap `null` is returned. Note each interval must be of the same type.\n * `missing` if any argument is a `missing` value,\n * `null` if any argument is a `null` value but no argument is a `missing` value,\n * any other non-interval input value will cause a type error.\n\n * Example:\n\n { \"overlap1\": get_overlapping_interval(interval(time(\"11:23:39\"), time(\"18:27:19\")), interval(time(\"12:23:39\"), time(\"23:18:00\"))),\n \"overlap2\": get_overlapping_interval(interval(time(\"12:23:39\"), time(\"18:27:19\")), interval(time(\"07:19:39\"), time(\"09:18:00\"))),\n \"overlap3\": get_overlapping_interval(interval(date(\"1980-11-30\"), date(\"1999-09-09\")), interval(date(\"2013-01-01\"), date(\"2014-01-01\"))),\n \"overlap4\": get_overlapping_interval(interval(date(\"1980-11-30\"), date(\"2099-09-09\")), interval(date(\"2013-01-01\"), date(\"2014-01-01\"))),\n \"overlap5\": get_overlapping_interval(interval(datetime(\"1844-03-03T11:19:39\"), datetime(\"2000-10-30T18:27:19\")), interval(datetime(\"1989-03-04T12:23:39\"), datetime(\"2009-10-10T23:18:00\"))),\n \"overlap6\": get_overlapping_interval(interval(datetime(\"1989-03-04T12:23:39\"), datetime(\"2000-10-30T18:27:19\")), interval(datetime(\"1844-03-03T11:19:39\"), datetime(\"1888-10-10T23:18:00\")))\n };\n\n * The expected result is:\n\n { \"overlap1\": interval(time(\"12:23:39.000Z\"), time(\"18:27:19.000Z\")),\n \"overlap2\": null,\n \"overlap3\": null,\n \"overlap4\": interval(date(\"2013-01-01\"), date(\"2014_01_01\")),\n \"overlap5\": interval(datetime(\"1989-03-04T12:23:39.000Z\"), datetime(\"2000-10-30T18:27:19.000Z\")),\n \"overlap6\": null\n }\n\n### interval_bin ###\n * Syntax:\n\n interval_bin(time_to_bin, time_bin_anchor, duration_bin_size)\n\n * Returns the `interval` value representing the bin containing the `time_to_bin` value.\n * Arguments:\n * `time_to_bin`: a date/time/datetime value representing the time to be binned.\n * `time_bin_anchor`: a date/time/datetime value representing an anchor of a bin starts. The type of this argument should be the same as the first `time_to_bin` argument.\n * `duration_bin_size`: the duration value representing the size of the bin, in the type of year_month_duration or day_time_duration. The type of this duration should be compatible with the type of `time_to_bin`, so that the arithmetic operation between `time_to_bin` and `duration_bin_size` is well_defined. Currently AsterixDB supports the following arithmetic operations:\n * datetime +|_ year_month_duration\n * datetime +|_ day_time_duration\n * date +|_ year_month_duration\n * date +|_ day_time_duration\n * time +|_ day_time_duration\n * Return Value:\n * a `interval` value representing the bin containing the `time_to_bin` value. Note that the internal type of\n this interval value should be the same as the `time_to_bin` type,\n * `missing` if any argument is a `missing` value,\n * `null` if any argument is a `null` value but no argument is a `missing` value,\n * a type error will be raised if:\n * the first argument or the second argument is any other non-date/non-time/non-datetime value,\n * or, the second argument is any other non-year_month_duration/non-day_time_duration value.\n\n * Example:\n\n {\n \"bin1\": interval_bin(date(\"2010-10-30\"), date(\"1990-01-01\"), year_month_duration(\"P1Y\")),\n \"bin2\": interval_bin(datetime(\"1987-11-19T23:49:23.938\"), datetime(\"1990-01-01T00:00:00.000Z\"), year_month_duration(\"P6M\")),\n \"bin3\": interval_bin(time(\"12:23:34.930+07:00\"), time(\"00:00:00\"), day_time_duration(\"PT1M\")),\n \"bin4\": interval_bin(datetime(\"1987-11-19T23:49:23.938\"), datetime(\"2013-01-01T00:00:00.000\"), day_time_duration(\"PT24H\"))\n };\n\n * The expected result is:\n\n {\n \"bin1\": interval(date(\"2010-01-01\"),date(\"2011-01-01\")),\n \"bin2\": interval(datetime(\"1987-07-01T00:00:00.000Z\"), datetime(\"1988-01-01T00:00:00.000Z\")),\n \"bin3\": interval(time(\"05:23:00.000Z\"), time(\"05:24:00.000Z\")),\n \"bin4\": interval(datetime(\"1987-11-19T00:00:00.000Z\"), datetime(\"1987-11-20T00:00:00.000Z\"))\n }\n\n\n### interval_start_from_date/time/datetime ###\n * Syntax:\n\n interval_start_from_date/time/datetime(date/time/datetime, duration)\n\n * Construct an `interval` value by the given starting `date`/`time`/`datetime` and the `duration` that the interval lasts.\n * Arguments:\n * `date/time/datetime`: a `string` representing a `date`, `time` or `datetime`, or a `date`/`time`/`datetime` value, representing the starting time point.\n * `duration`: a `string` or `duration` value representing the duration of the interval. Note that duration cannot be negative value.\n * Return Value:\n * an `interval` value representing the interval starting from the given time point with the length of duration,\n * `missing` if any argument is a `missing` value,\n * `null` if any argument is a `null` value but no argument is a `missing` value,\n * a type error will be raised if:\n * the first argument or the second argument is any other non-date/non-time/non-datetime value,\n * or, the second argument is any other non-duration value.\n\n * Example:\n\n {\n \"interval1\": interval_start_from_date(\"1984-01-01\", \"P1Y\"),\n \"interval2\": interval_start_from_time(time(\"02:23:28.394\"), \"PT3H24M\"),\n \"interval3\": interval_start_from_datetime(\"1999-09-09T09:09:09.999\", duration(\"P2M30D\"))\n };\n\n * The expectecd result is:\n\n {\n \"interval1\": interval(date(\"1984-01-01\"), date(\"1985-01-01\")),\n \"interval2\": interval(time(\"02:23:28.394Z\"), time(\"05:47:28.394Z\")),\n \"interval3\": interval(datetime(\"1999-09-09T09:09:09.999Z\"), datetime(\"1999-12-09T09:09:09.999Z\"))\n }\n\n\n### overlap_bins ###\n * Return Value:\n * a `interval` value representing the bin containing the `time_to_bin` value. Note that the internal type of this interval value should be the same as the `time_to_bin` type.\n\n * Syntax:\n\n overlap_bins(interval, time_bin_anchor, duration_bin_size)\n\n * Returns an ordered list of `interval` values representing each bin that is overlapping the `interval`.\n * Arguments:\n * `interval`: an `interval` value\n * `time_bin_anchor`: a date/time/datetime value representing an anchor of a bin starts. The type of this argument should be the same as the first `time_to_bin` argument.\n * `duration_bin_size`: the duration value representing the size of the bin, in the type of year_month_duration or day_time_duration. The type of this duration should be compatible with the type of `time_to_bin`, so that the arithmetic operation between `time_to_bin` and `duration_bin_size` is well_defined. Currently AsterixDB supports the following arithmetic operations:\n * datetime +|_ year_month_duration\n * datetime +|_ day_time_duration\n * date +|_ year_month_duration\n * date +|_ day_time_duration\n * time +|_ day_time_duration\n * Return Value:\n * a ordered list of `interval` values representing each bin that is overlapping the `interval`.\n Note that the internal type as `time_to_bin` and `duration_bin_size`.\n * `missing` if any argument is a `missing` value,\n * `null` if any argument is a `null` value but no argument is a `missing` value,\n * a type error will be raised if:\n * the first arugment is any other non-interval value,\n * or, the second argument is any other non-date/non-time/non-datetime value,\n * or, the second argument is any other non-year_month_duration/non-day_time_duration value.\n\n * Example:\n\n {\n \"timebins\": overlap_bins(interval(time(\"17:23:37\"), time(\"18:30:21\")), time(\"00:00:00\"), day_time_duration(\"PT30M\")),\n \"datebins\": overlap_bins(interval(date(\"1984-03-17\"), date(\"2013-08-22\")), date(\"1990-01-01\"), year_month_duration(\"P10Y\")),\n \"datetimebins\": overlap_bins(interval(datetime(\"1800-01-01T23:59:48.938\"), datetime(\"2015-07-26T13:28:30.218\")),\n datetime(\"1900-01-01T00:00:00.000\"), year_month_duration(\"P100Y\"))\n };\n\n * The expected result is:\n\n {\n \"timebins\": [\n interval(time(\"17:00:00.000Z\"), time(\"17:30:00.000Z\")),\n interval(time(\"17:30:00.000Z\"), time(\"18:00:00.000Z\")),\n interval(time(\"18:00:00.000Z\"), time(\"18:30:00.000Z\")),\n interval(time(\"18:30:00.000Z\"), time(\"19:00:00.000Z\"))\n ],\n \"datebins\": [\n interval(date(\"1980-01-01\"), date(\"1990-01-01\")),\n interval(date(\"1990-01-01\"), date(\"2000-01-01\")),\n interval(date(\"2000-01-01\"), date(\"2010-01-01\")),\n interval(date(\"2010-01-01\"), date(\"2020-01-01\"))\n ],\n \"datetimebins\": [\n interval(datetime(\"1800-01-01T00:00:00.000Z\"), datetime(\"1900-01-01T00:00:00.000Z\")),\n interval(datetime(\"1900-01-01T00:00:00.000Z\"), datetime(\"2000-01-01T00:00:00.000Z\")),\n interval(datetime(\"2000-01-01T00:00:00.000Z\"), datetime(\"2100-01-01T00:00:00.000Z\"))\n ]\n };\n\n"} +{"text": "<?php\n/*\n * Copyright 2014 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n * use this file except in compliance with the License. You may obtain a copy of\n * the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */\n\nclass Google_Service_Clouderrorreporting_ListEventsResponse extends Google_Collection\n{\n protected $collection_key = 'errorEvents';\n protected $errorEventsType = 'Google_Service_Clouderrorreporting_ErrorEvent';\n protected $errorEventsDataType = 'array';\n public $nextPageToken;\n public $timeRangeBegin;\n\n /**\n * @param Google_Service_Clouderrorreporting_ErrorEvent\n */\n public function setErrorEvents($errorEvents)\n {\n $this->errorEvents = $errorEvents;\n }\n /**\n * @return Google_Service_Clouderrorreporting_ErrorEvent\n */\n public function getErrorEvents()\n {\n return $this->errorEvents;\n }\n public function setNextPageToken($nextPageToken)\n {\n $this->nextPageToken = $nextPageToken;\n }\n public function getNextPageToken()\n {\n return $this->nextPageToken;\n }\n public function setTimeRangeBegin($timeRangeBegin)\n {\n $this->timeRangeBegin = $timeRangeBegin;\n }\n public function getTimeRangeBegin()\n {\n return $this->timeRangeBegin;\n }\n}\n"} +{"text": "/*\n * Copyright (c) 2009-2020 jMonkeyEngine\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are\n * met:\n *\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n *\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * * Neither the name of 'jMonkeyEngine' nor the names of its contributors\n * may be used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\n * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR\n * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\npackage jme3test.bullet;\n\nimport com.jme3.app.SimpleApplication;\nimport com.jme3.asset.plugins.HttpZipLocator;\nimport com.jme3.asset.plugins.ZipLocator;\nimport com.jme3.bullet.BulletAppState;\nimport com.jme3.bullet.PhysicsSpace;\nimport com.jme3.bullet.collision.shapes.SphereCollisionShape;\nimport com.jme3.bullet.control.RigidBodyControl;\nimport com.jme3.bullet.objects.PhysicsCharacter;\nimport com.jme3.input.KeyInput;\nimport com.jme3.input.controls.ActionListener;\nimport com.jme3.input.controls.KeyTrigger;\nimport com.jme3.light.AmbientLight;\nimport com.jme3.light.DirectionalLight;\nimport com.jme3.material.MaterialList;\nimport com.jme3.math.ColorRGBA;\nimport com.jme3.math.Vector3f;\nimport com.jme3.scene.Node;\nimport com.jme3.scene.plugins.ogre.OgreMeshKey;\nimport java.io.File;\n\npublic class TestQ3 extends SimpleApplication implements ActionListener {\n\n private BulletAppState bulletAppState;\n private Node gameLevel;\n private PhysicsCharacter player;\n private Vector3f walkDirection = new Vector3f();\n private static boolean useHttp = false;\n private boolean left=false,right=false,up=false,down=false;\n\n public static void main(String[] args) { \n TestQ3 app = new TestQ3();\n app.start();\n }\n\n @Override\n public void simpleInitApp() {\n File file = new File(\"quake3level.zip\");\n if (!file.exists()) {\n useHttp = true;\n }\n \n bulletAppState = new BulletAppState();\n stateManager.attach(bulletAppState);\n flyCam.setMoveSpeed(100);\n setupKeys();\n\n this.cam.setFrustumFar(2000);\n\n DirectionalLight dl = new DirectionalLight();\n dl.setColor(ColorRGBA.White.clone().multLocal(2));\n dl.setDirection(new Vector3f(-1, -1, -1).normalize());\n rootNode.addLight(dl);\n\n AmbientLight am = new AmbientLight();\n am.setColor(ColorRGBA.White.mult(2));\n rootNode.addLight(am);\n\n // load the level from zip or http zip\n if (useHttp) {\n assetManager.registerLocator(\n \"https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/jmonkeyengine/quake3level.zip\",\n HttpZipLocator.class);\n } else {\n assetManager.registerLocator(\"quake3level.zip\", ZipLocator.class);\n }\n\n // create the geometry and attach it\n MaterialList matList = (MaterialList) assetManager.loadAsset(\"Scene.material\");\n OgreMeshKey key = new OgreMeshKey(\"main.meshxml\", matList);\n gameLevel = (Node) assetManager.loadAsset(key);\n gameLevel.setLocalScale(0.1f);\n\n // add a physics control, it will generate a MeshCollisionShape based on the gameLevel\n gameLevel.addControl(new RigidBodyControl(0));\n\n player = new PhysicsCharacter(new SphereCollisionShape(5), .01f);\n player.setJumpSpeed(20);\n player.setFallSpeed(30);\n player.setGravity(30);\n\n player.setPhysicsLocation(new Vector3f(60, 10, -60));\n\n rootNode.attachChild(gameLevel);\n\n getPhysicsSpace().addAll(gameLevel);\n getPhysicsSpace().add(player);\n }\n\n private PhysicsSpace getPhysicsSpace(){\n return bulletAppState.getPhysicsSpace();\n }\n\n @Override\n public void simpleUpdate(float tpf) {\n Vector3f camDir = cam.getDirection().clone().multLocal(0.6f);\n Vector3f camLeft = cam.getLeft().clone().multLocal(0.4f);\n walkDirection.set(0,0,0);\n if(left)\n walkDirection.addLocal(camLeft);\n if(right)\n walkDirection.addLocal(camLeft.negate());\n if(up)\n walkDirection.addLocal(camDir);\n if(down)\n walkDirection.addLocal(camDir.negate());\n player.setWalkDirection(walkDirection);\n cam.setLocation(player.getPhysicsLocation());\n }\n\n private void setupKeys() {\n inputManager.addMapping(\"Lefts\", new KeyTrigger(KeyInput.KEY_A));\n inputManager.addMapping(\"Rights\", new KeyTrigger(KeyInput.KEY_D));\n inputManager.addMapping(\"Ups\", new KeyTrigger(KeyInput.KEY_W));\n inputManager.addMapping(\"Downs\", new KeyTrigger(KeyInput.KEY_S));\n inputManager.addMapping(\"Space\", new KeyTrigger(KeyInput.KEY_SPACE));\n inputManager.addListener(this,\"Lefts\");\n inputManager.addListener(this,\"Rights\");\n inputManager.addListener(this,\"Ups\");\n inputManager.addListener(this,\"Downs\");\n inputManager.addListener(this,\"Space\");\n }\n\n @Override\n public void onAction(String binding, boolean value, float tpf) {\n\n if (binding.equals(\"Lefts\")) {\n if(value)\n left=true;\n else\n left=false;\n } else if (binding.equals(\"Rights\")) {\n if(value)\n right=true;\n else\n right=false;\n } else if (binding.equals(\"Ups\")) {\n if(value)\n up=true;\n else\n up=false;\n } else if (binding.equals(\"Downs\")) {\n if(value)\n down=true;\n else\n down=false;\n } else if (binding.equals(\"Space\")) {\n player.jump();\n }\n }\n}\n"} +{"text": "# Hard coded Makefile for windows\n#\n# Tip: If you want to be able to build 32bit and 64 bit versions\n# on the same machine you can install libevent and pthreads in\n# let's say: /usr/local32 and /usr/local64 and you should\n# be able to compile with:\n# make -f win32/Makefile.mingw LOCAL=/usr/local32\n# make -f win32/Makefile.mingw LOCAL=/usr/local64 CC=x86_64-w64-mingw32-gcc\n#\n\nCC = gcc\nLOCAL=/usr/local\nLOCALLIB=-L${LOCAL}/lib\nLOCALINC=-I${LOCAL}/include\nDEST=${LOCAL}\nINSTALLDIRS=${DEST}/bin ${DEST}/lib ${DEST}/include/memcached\n\nOBJDIR = .libs \\\n\t .libs/engines \\\n .libs/daemon \\\n .libs/engines/default_engine \\\n .libs/extensions/daemon \\\n .libs/extensions/loggers \\\n .libs/extensions/protocol \\\n .libs/programs \\\n .libs/testsuite \\\n .libs/utilities \\\n .libs/win32\n\nBINARIES= mcstat.exe \\\n memcached.exe \\\n engine_testapp.exe \\\n\t sizes.exe \\\n\t .libs/ascii_scrub.so \\\n .libs/basic_engine_testsuite.so \\\n .libs/default_engine.so \\\n .libs/example_protocol.so \\\n .libs/eventlog_logger.so \\\n .libs/stdin_term_handler.so\n\nLIB=${LOCALLIB}\nINCLUDE=-Iinclude -I. -Idaemon -Iprograms -Iextensions -Iwin32 -I.libs ${LOCALINC}\n\nall: ${BINARIES}\n\ninstall: ${BINARIES} ${INSTALLDIRS}\n\tcp memcached.exe .libs/default_engine.so .libs/ascii_scrub.so ${DEST}/lib\n\tcp mcstat.exe ${DEST}/bin\n\tcp include/memcached/* ${DEST}/include/memcached\n\nCFLAGS = -std=gnu99 -O2 -g -DNDEBUG -fno-strict-aliasing -Wall \\\n -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations \\\n -Wredundant-decls \\\n ${INCLUDE} -DHAVE_CONFIG_H\n\nMCSTAT_SRC = programs/mcstat.c win32/win32.c\nMCSTAT_OBJS = ${MCSTAT_SRC:%.c=.libs/%.o}\n\nMEMCACHED_SRC = \\\n\t daemon/cache.c \\\n\t daemon/hash.c \\\n\t daemon/isasl.c \\\n\t daemon/memcached.c \\\n\t daemon/sasl_defs.c \\\n\t daemon/stats.c \\\n\t daemon/thread.c \\\n\t daemon/topkeys.c \\\n\t utilities/config_parser.c \\\n\t utilities/engine_loader.c \\\n\t utilities/extension_loggers.c\\\n\t utilities/genhash.c \\\n\t utilities/util.c \\\n\t win32/defs.c \\\n\t win32/dlfcn.c \\\n\t win32/win32.c\nMEMCACHED_OBJS = ${MEMCACHED_SRC:%.c=.libs/%.o}\n\nENGINE_TESTAPP_SRC = \\\n\t\t programs/engine_testapp.c \\\n\t\t programs/mock_server.c \\\n\t\t utilities/config_parser.c \\\n\t\t utilities/engine_loader.c \\\n\t\t utilities/extension_loggers.c \\\n\t\t utilities/util.c \\\n\t\t win32/dlfcn.c\nENGINE_TESTAPP_OBJS = ${ENGINE_TESTAPP_SRC:%.c=.libs/%.o}\n\nSIZES_SRC = programs/sizes.c\nSIZES_OBJS = ${SIZES_SRC:%.c=.libs/%.o}\n\nDEFAULT_ENGINE_SRC = \\\n\t\t engines/default_engine/assoc.c \\\n\t\t engines/default_engine/default_engine.c \\\n\t\t engines/default_engine/items.c \\\n\t\t engines/default_engine/slabs.c \\\n\t\t utilities/util.c\nDEFAULT_ENGINE_OBJS = ${DEFAULT_ENGINE_SRC:%.c=.libs/%.o}\n\nASCII_SCRUB_SRC = extensions/protocol/ascii_scrub.c\nASCII_SCRUB_OBJS = ${ASCII_SCRUB_SRC:%.c=.libs/%.o}\n\nEXAMPLE_PROTOCOL_SRC = extensions/protocol/example_protocol.c\nEXAMPLE_PROTOCOL_OBJS = ${EXAMPLE_PROTOCOL_SRC:%.c=.libs/%.o}\n\nSTDIN_TERM_HANDLER_SRC = extensions/daemon/stdin_check.c\nSTDIN_TERM_HANDLER_OBJS = ${STDIN_TERM_HANDLER_SRC:%.c=.libs/%.o}\n\nEVENTLOG_LOGGER_SRC = extensions/loggers/eventlog_logger.c\nEVENTLOG_LOGGER_OBJS = ${EVENTLOG_LOGGER_SRC:%.c=.libs/%.o}\n\nBASIC_ENGINE_TESTSUITE_SRC = testsuite/basic_engine_testsuite.c\nBASIC_ENGINE_TESTSUITE_OBJS = ${BASIC_ENGINE_TESTSUITE_SRC:%.c=.libs/%.o}\n\nGENFILES=.libs/config_version.h\n\nmcstat.exe: ${OBJDIR} ${GENFILES} $(MCSTAT_OBJS)\n\t${LINK.c} -o $@ $(MCSTAT_OBJS) \\\n ${LIB} -lmswsock -lws2_32\n\nmemcached.exe: ${OBJDIR} ${GENFILES} $(MEMCACHED_OBJS)\n\t${LINK.c} -o $@ $(MEMCACHED_OBJS) \\\n ${LIB} -levent -lmswsock \\\n -lws2_32 -lpthread\n\nengine_testapp.exe: ${OBJDIR} ${GENFILES} $(ENGINE_TESTAPP_OBJS)\n\t${LINK.c} -o $@ $(ENGINE_TESTAPP_OBJS) \\\n ${LIB} -levent -lmswsock \\\n -lws2_32 -lpthread\n\nsizes.exe: ${OBJDIR} ${GENFILES} $(SIZES_OBJS)\n\t${LINK.c} -o $@ $(SIZES_OBJS)\n\n.libs/default_engine.so: ${OBJDIR} $(DEFAULT_ENGINE_OBJS)\n\t${LINK.c} -o $@ -shared ${DEFAULT_ENGINE_OBJS} \\\n ${LIB} -lws2_32 -lpthread\n\n.libs/ascii_scrub.so: ${OBJDIR} $(ASCII_SCRUB_OBJS)\n\t${LINK.c} -o $@ -shared ${ASCII_SCRUB_OBJS}\n\n.libs/example_protocol.so: ${OBJDIR} $(EXAMPLE_PROTOCOL_OBJS)\n\t${LINK.c} -o $@ -shared ${EXAMPLE_PROTOCOL_OBJS}\n\n.libs/stdin_term_handler.so: ${OBJDIR} $(STDIN_TERM_HANDLER_OBJS)\n\t${LINK.c} -o $@ -shared ${STDIN_TERM_HANDLER_OBJS} ${LIBS} \\\n ${LIB} -lpthread\n\n.libs/eventlog_logger.so: ${OBJDIR} $(EVENTLOG_LOGGER_OBJS)\n\t${LINK.c} -o $@ -shared ${EVENTLOG_LOGGER_OBJS} ${LIBS} \\\n ${LIB}\n\n.libs/basic_engine_testsuite.so: ${OBJDIR} $(BASIC_ENGINE_TESTSUITE_OBJS)\n\t${LINK.c} -o $@ -shared ${BASIC_ENGINE_TESTSUITE_OBJS} ${LIB} -lpthread -lws2_32\n\n.libs/config_version.h:\n\t./win32/config.sh\n\n${OBJDIR} ${INSTALLDIRS}:; -@mkdir -p $@\n\n.libs/%.o: %.c\n\t${COMPILE.c} -MMD $< -o $@\n\nclean:\n\t$(RM) ${BINARIES} \\\n ${ASCII_SCRUB_OBJS:.o=.d} \\\n ${ASCII_SCRUB_OBJS} \\\n ${BASIC_ENGINE_TESTSUITE_OBJS:.o=.d} \\\n ${BASIC_ENGINE_TESTSUITE_OBJS} \\\n ${DEFAULT_ENGINE_OBJS:.o=.d} \\\n ${DEFAULT_ENGINE_OBJS} \\\n ${ENGINE_TESTAPP_OBJS:.o=.d} \\\n ${ENGINE_TESTAPP_OBJS} \\\n ${EXAMPLE_PROTOCOL_OBJS:.o=.d} \\\n ${EXAMPLE_PROTOCOL_OBJS} \\\n ${GENFILES} \\\n ${MCSTAT_OBJS:.o=.d} \\\n ${MCSTAT_OBJS} \\\n ${MEMCACHED_OBJS:.o=.d} \\\n ${MEMCACHED_OBJS} \\\n ${SIZES_OBJS:.o=.d} \\\n ${SIZES_OBJS} \\\n ${EVENTLOG_LOGGER_OBJS:.o=.d} \\\n ${EVENTLOG_LOGGER_OBJS} \\\n ${STDIN_TERM_HANDLER_OBJS:.o=.d} \\\n ${STDIN_TERM_HANDLER_OBJS}\n\n-include ${ASCII_SCRUB_OBJS:.o=.d} \\\n ${BASIC_ENGINE_TESTSUITE_OBJS:.o=.d} \\\n ${DEFAULT_ENGINE_OBJS:.o=.d} \\\n ${ENGINE_TESTAPP_OBJS:.o=.d} \\\n ${EXAMPLE_PROTOCOL_OBJS:.o=.d} \\\n ${MEMCACHED_OBJS:.o=.d} \\\n ${MCSTAT_OBJS:.o=.d} \\\n ${SIZES_OBJS:.o=.d} \\\n ${EVENTLOG_LOGGER_OBJS:.o=.d} \\\n ${STDIN_TERM_HANDLER_OBJS:.o=.d}\n"} +{"text": "<?php\n/**\n * Message translations.\n *\n * This file is automatically generated by 'yii message/extract' command.\n * It contains the localizable messages extracted from source code.\n * You may modify this file by translating the extracted messages.\n *\n * Each array element represents the translation (value) of a message (key).\n * If the value is empty, the message is considered as not translated.\n * Messages that no longer need translation will have their translations\n * enclosed between a pair of '@@' marks.\n *\n * Message string can be used with plural forms format. Check i18n section\n * of the guide for details.\n *\n * NOTE: this file must be saved in UTF-8 encoding.\n */\nreturn [\n 'New Like' => '',\n];\n"} +{"text": "/**\n * Copyright (C) 2010-2018 Gordon Fraser, Andrea Arcuri and EvoSuite\n * contributors\n *\n * This file is part of EvoSuite.\n *\n * EvoSuite is free software: you can redistribute it and/or modify it\n * under the terms of the GNU Lesser General Public License as published\n * by the Free Software Foundation, either version 3.0 of the License, or\n * (at your option) any later version.\n *\n * EvoSuite is distributed in the hope that it will be useful, but\n * WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with EvoSuite. If not, see <http://www.gnu.org/licenses/>.\n */\npackage com.examples.with.different.packagename.agent;\n\npublic class ExtendingTimeC extends TimeC{\n\n}\n"} +{"text": "/*\n * $HeadURL: http://svn.apache.org/repos/asf/httpcomponents/httpcore/trunk/module-main/src/main/java/org/apache/http/util/VersionInfo.java $\n * $Revision: 554888 $\n * $Date: 2007-07-10 02:46:36 -0700 (Tue, 10 Jul 2007) $\n *\n * ====================================================================\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n * ====================================================================\n *\n * This software consists of voluntary contributions made by many\n * individuals on behalf of the Apache Software Foundation. For more\n * information on the Apache Software Foundation, please see\n * <http://www.apache.org/>.\n *\n */\n\npackage org.apache.http.util;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.util.Map;\nimport java.util.Properties;\nimport java.util.ArrayList;\n\n\n/**\n * Provides access to version information for HTTP components.\n * Instances of this class provide version information for a single module\n * or informal unit, as explained\n * <a href=\"http://wiki.apache.org/jakarta-httpclient/HttpComponents\">here</a>.\n * Static methods are used to extract version information from property\n * files that are automatically packaged with HTTP component release JARs.\n * <br/>\n * All available version information is provided in strings, where\n * the string format is informal and subject to change without notice.\n * Version information is provided for debugging output and interpretation\n * by humans, not for automated processing in applications.\n *\n * @author <a href=\"mailto:oleg@ural.ru\">Oleg Kalnichevski</a>\n * @author and others\n */\npublic class VersionInfo {\n\n /** A string constant for unavailable information. */\n public final static String UNAVAILABLE = \"UNAVAILABLE\";\n\n /** The filename of the version information files. */\n public final static String VERSION_PROPERTY_FILE = \"version.properties\";\n\n // the property names\n public final static String PROPERTY_MODULE = \"info.module\";\n public final static String PROPERTY_RELEASE = \"info.release\";\n public final static String PROPERTY_TIMESTAMP = \"info.timestamp\";\n\n\n /** The package that contains the version information. */\n private final String infoPackage;\n\n /** The module from the version info. */\n private final String infoModule;\n\n /** The release from the version info. */\n private final String infoRelease;\n\n /** The timestamp from the version info. */\n private final String infoTimestamp;\n\n /** The classloader from which the version info was obtained. */\n private final String infoClassloader;\n\n\n /**\n * Instantiates version information.\n *\n * @param pckg the package\n * @param module the module, or <code>null</code>\n * @param release the release, or <code>null</code>\n * @param time the build time, or <code>null</code>\n * @param clsldr the class loader, or <code>null</code>\n */\n protected VersionInfo(String pckg, String module,\n String release, String time, String clsldr) {\n if (pckg == null) {\n throw new IllegalArgumentException\n (\"Package identifier must not be null.\");\n }\n\n infoPackage = pckg;\n infoModule = (module != null) ? module : UNAVAILABLE;\n infoRelease = (release != null) ? release : UNAVAILABLE;\n infoTimestamp = (time != null) ? time : UNAVAILABLE;\n infoClassloader = (clsldr != null) ? clsldr : UNAVAILABLE;\n }\n\n\n /**\n * Obtains the package name.\n * The package name identifies the module or informal unit.\n *\n * @return the package name, never <code>null</code>\n */\n public final String getPackage() {\n return infoPackage;\n }\n\n /**\n * Obtains the name of the versioned module or informal unit.\n * This data is read from the version information for the package.\n *\n * @return the module name, never <code>null</code>\n */\n public final String getModule() {\n return infoModule;\n }\n\n /**\n * Obtains the release of the versioned module or informal unit.\n * This data is read from the version information for the package.\n *\n * @return the release version, never <code>null</code>\n */\n public final String getRelease() {\n return infoRelease;\n }\n\n /**\n * Obtains the timestamp of the versioned module or informal unit.\n * This data is read from the version information for the package.\n *\n * @return the timestamp, never <code>null</code>\n */\n public final String getTimestamp() {\n return infoTimestamp;\n }\n\n /**\n * Obtains the classloader used to read the version information.\n * This is just the <code>toString</code> output of the classloader,\n * since the version information should not keep a reference to\n * the classloader itself. That could prevent garbage collection.\n *\n * @return the classloader description, never <code>null</code>\n */\n public final String getClassloader() {\n return infoClassloader;\n }\n\n\n /**\n * Provides the version information in human-readable format.\n *\n * @return a string holding this version information\n */\n public String toString() {\n StringBuffer sb = new StringBuffer\n (20 + infoPackage.length() + infoModule.length() +\n infoRelease.length() + infoTimestamp.length() +\n infoClassloader.length());\n\n sb.append(\"VersionInfo(\")\n .append(infoPackage).append(':').append(infoModule);\n\n // If version info is missing, a single \"UNAVAILABLE\" for the module\n // is sufficient. Everything else just clutters the output.\n if (!UNAVAILABLE.equals(infoRelease))\n sb.append(':').append(infoRelease);\n if (!UNAVAILABLE.equals(infoTimestamp))\n sb.append(':').append(infoTimestamp);\n\n sb.append(')');\n\n if (!UNAVAILABLE.equals(infoClassloader))\n sb.append('@').append(infoClassloader);\n\n return sb.toString();\n }\n\n\n /**\n * Loads version information for a list of packages.\n *\n * @param pckgs the packages for which to load version info\n * @param clsldr the classloader to load from, or\n * <code>null</code> for the thread context classloader\n *\n * @return the version information for all packages found,\n * never <code>null</code>\n */\n public final static VersionInfo[] loadVersionInfo(String[] pckgs,\n ClassLoader clsldr) {\n if (pckgs == null) {\n throw new IllegalArgumentException\n (\"Package identifier list must not be null.\");\n }\n\n ArrayList vil = new ArrayList(pckgs.length);\n for (int i=0; i<pckgs.length; i++) {\n VersionInfo vi = loadVersionInfo(pckgs[i], clsldr);\n if (vi != null)\n vil.add(vi);\n }\n\n return (VersionInfo[]) vil.toArray(new VersionInfo[vil.size()]);\n }\n\n\n /**\n * Loads version information for a package.\n *\n * @param pckg the package for which to load version information,\n * for example \"org.apache.http\".\n * The package name should NOT end with a dot.\n * @param clsldr the classloader to load from, or\n * <code>null</code> for the thread context classloader\n *\n * @return the version information for the argument package, or\n * <code>null</code> if not available\n */\n public final static VersionInfo loadVersionInfo(final String pckg,\n ClassLoader clsldr) {\n if (pckg == null) {\n throw new IllegalArgumentException\n (\"Package identifier must not be null.\");\n }\n\n if (clsldr == null)\n clsldr = Thread.currentThread().getContextClassLoader();\n\n Properties vip = null; // version info properties, if available\n try {\n // org.apache.http becomes\n // org/apache/http/version.properties\n InputStream is = clsldr.getResourceAsStream\n (pckg.replace('.', '/') + \"/\" + VERSION_PROPERTY_FILE);\n if (is != null) {\n try {\n Properties props = new Properties();\n props.load(is);\n vip = props;\n } finally {\n is.close();\n }\n }\n } catch (IOException ex) {\n // shamelessly munch this exception\n }\n\n VersionInfo result = null;\n if (vip != null)\n result = fromMap(pckg, vip, clsldr);\n\n return result;\n }\n\n\n /**\n * Instantiates version information from properties.\n *\n * @param pckg the package for the version information\n * @param info the map from string keys to string values,\n * for example {@link java.util.Properties}\n * @param clsldr the classloader, or <code>null</code>\n *\n * @return the version information\n */\n protected final static VersionInfo fromMap(String pckg, Map info,\n ClassLoader clsldr) {\n if (pckg == null) {\n throw new IllegalArgumentException\n (\"Package identifier must not be null.\");\n }\n\n String module = null;\n String release = null;\n String timestamp = null;\n\n if (info != null) {\n module = (String) info.get(PROPERTY_MODULE);\n if ((module != null) && (module.length() < 1))\n module = null;\n\n release = (String) info.get(PROPERTY_RELEASE);\n if ((release != null) && ((release.length() < 1) ||\n (release.equals(\"${pom.version}\"))))\n release = null;\n\n timestamp = (String) info.get(PROPERTY_TIMESTAMP);\n if ((timestamp != null) &&\n ((timestamp.length() < 1) ||\n (timestamp.equals(\"${mvn.timestamp}\")))\n )\n timestamp = null;\n } // if info\n\n String clsldrstr = null;\n if (clsldr != null)\n clsldrstr = clsldr.toString();\n\n return new VersionInfo(pckg, module, release, timestamp, clsldrstr);\n }\n\n} // class VersionInfo\n"} +{"text": "#begin document (wb/sel/50/sel_5008); part 000\nwb/sel/50/sel_5008 -1 0 [WORD] XX (TOP* - - - - * -\nwb/sel/50/sel_5008 -1 1 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 2 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 3 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 4 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 5 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 6 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 7 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 8 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 9 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 10 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 11 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 12 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 13 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 14 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 15 [WORD] VERB * feather - 6 - * -\nwb/sel/50/sel_5008 -1 16 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 17 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 18 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 19 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 20 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 21 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 22 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 23 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 24 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 25 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 26 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 27 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 28 [WORD] XX * - - - - * -\nwb/sel/50/sel_5008 -1 29 [WORD] XX *) - - - - * -\n\n#end document\n"} +{"text": "Colorless\ngreen\nideas\nsleep\nfuriously\nA\ncolorless\ngreen\nidea\nis\na\nnew\nuntried\nidea\nthat\nis\nwithout\nvividness\ndull\nand\nunexciting\nTo\nsleep\nfuriously\nmay\nseem\na\npuzzling\nturn\nof\nphrase\nbut\nthe\nmind\nin\nsleep\noften\nindeed\nmoves\nfuriously\nwith\nideas\nand\nimages\nflickering\nin\nand\nout\n"} +{"text": "cmp(a,b)=if(#a<#b,1,if(#a>#b,-1,lex(a,b)));\nvecsort(v,cmp)\n"} +{"text": "/*\n * Copyright (c) 2015 Kaprica Security, Inc.\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *\n */\n#ifndef STDLIB_H_\n#define STDLIB_H_\n\n#include <libcgc.h>\n\n/* memory allocation functions */\nvoid *malloc(size_t size);\nvoid *calloc(size_t nmemb, size_t size);\nvoid *realloc(void *ptr, size_t size);\nvoid free(void *ptr);\n\n/* miscellaneous functions */\nvoid exit(int ret);\nlong strtol(const char *str, char **endptr, int base);\nunsigned long strtoul(const char *str, char **endptr, int base);\n\n#endif\n"} +{"text": "/**\n * tabs.js | https://theme-next.org/docs/tag-plugins/tabs\n */\n\n/* global hexo */\n\n'use strict';\n\nfunction postTabs(args, content) {\n var tabBlock = /<!--\\s*tab (.*?)\\s*-->\\n([\\w\\W\\s\\S]*?)<!--\\s*endtab\\s*-->/g;\n\n args = args.join(' ').split(',');\n var tabName = args[0];\n var tabActive = Number(args[1]) || 0;\n\n var matches = [];\n var match;\n var tabId = 0;\n var tabNav = '';\n var tabContent = '';\n\n !tabName && hexo.log.warn('Tabs block must have unique name!');\n\n while ((match = tabBlock.exec(content)) !== null) {\n matches.push(match[1]);\n matches.push(match[2]);\n }\n\n for (var i = 0; i < matches.length; i += 2) {\n var tabParameters = matches[i].split('@');\n var postContent = matches[i + 1];\n var tabCaption = tabParameters[0] || '';\n var tabIcon = tabParameters[1] || '';\n var tabHref = '';\n\n postContent = hexo.render.renderSync({text: postContent, engine: 'markdown'}).trim();\n\n tabId += 1;\n tabHref = (tabName + ' ' + tabId).toLowerCase().split(' ').join('-');\n\n ((tabCaption.length === 0) && (tabIcon.length === 0)) && (tabCaption = tabName + ' ' + tabId);\n\n var isOnlyicon = tabIcon.length > 0 && tabCaption.length === 0 ? ' style=\"text-align: center;\"' : '';\n tabIcon.length > 0 && (tabIcon = `<i class=\"fa fa-${tabIcon.trim()}\"${isOnlyicon}></i>`);\n\n var isActive = (tabActive > 0 && tabActive === tabId) || (tabActive === 0 && tabId === 1) ? ' active' : '';\n tabNav += `<li class=\"tab${isActive}\"><a href=\"#${tabHref}\">${tabIcon + tabCaption.trim()}</a></li>`;\n tabContent += `<div class=\"tab-pane${isActive}\" id=\"${tabHref}\">${postContent}</div>`;\n }\n\n tabNav = `<ul class=\"nav-tabs\">${tabNav}</ul>`;\n tabContent = `<div class=\"tab-content\">${tabContent}</div>`;\n\n return `<div class=\"tabs\" id=\"${tabName.toLowerCase().split(' ').join('-')}\">${tabNav + tabContent}</div>`;\n}\n\nhexo.extend.tag.register('tabs', postTabs, {ends: true});\nhexo.extend.tag.register('subtabs', postTabs, {ends: true});\nhexo.extend.tag.register('subsubtabs', postTabs, {ends: true});\n"} +{"text": "function select(element) {\n let selectedText;\n\n if (element.nodeName === 'SELECT') {\n element.focus();\n\n selectedText = element.value;\n } else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {\n let isReadOnly = element.hasAttribute('readonly');\n\n if (!isReadOnly) {\n element.setAttribute('readonly', '');\n }\n\n element.select();\n element.setSelectionRange(0, element.value.length);\n\n if (!isReadOnly) {\n element.removeAttribute('readonly');\n }\n\n selectedText = element.value;\n } else {\n if (element.hasAttribute('contenteditable')) {\n element.focus();\n }\n\n let selection = window.getSelection();\n let range = document.createRange();\n\n range.selectNodeContents(element);\n selection.removeAllRanges();\n selection.addRange(range);\n\n selectedText = selection.toString();\n }\n\n return selectedText;\n}\n\n\nexport default function ({ text }) {\n return new Promise((resolve, reject) => {\n const container = document.body;\n const isRTL = document.documentElement.getAttribute('dir') == 'rtl';\n const fakeElem = document.createElement('textarea');\n fakeElem.style.fontSize = '12pt';\n fakeElem.style.border = '0';\n fakeElem.style.padding = '0';\n fakeElem.style.margin = '0';\n fakeElem.style.position = 'absolute';\n fakeElem.style[isRTL ? 'right' : 'left'] = '-9999px';\n let yPosition = window.pageYOffset || document.documentElement.scrollTop;\n fakeElem.style.top = `${yPosition}px`;\n fakeElem.setAttribute('readonly', '');\n fakeElem.value = text;\n container.appendChild(fakeElem);\n select(fakeElem);\n let succeeded;\n try {\n succeeded = document.execCommand('copy');\n resolve();\n } catch (err) {\n succeeded = false;\n reject();\n }\n })\n}"} +{"text": "/*\nCopyright 2017 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n// This file was automatically generated by informer-gen\n\npackage v1\n\nimport (\n\tcore_v1 \"k8s.io/api/core/v1\"\n\tmeta_v1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n\truntime \"k8s.io/apimachinery/pkg/runtime\"\n\twatch \"k8s.io/apimachinery/pkg/watch\"\n\tinternalinterfaces \"k8s.io/client-go/informers/internalinterfaces\"\n\tkubernetes \"k8s.io/client-go/kubernetes\"\n\tv1 \"k8s.io/client-go/listers/core/v1\"\n\tcache \"k8s.io/client-go/tools/cache\"\n\ttime \"time\"\n)\n\n// PersistentVolumeClaimInformer provides access to a shared informer and lister for\n// PersistentVolumeClaims.\ntype PersistentVolumeClaimInformer interface {\n\tInformer() cache.SharedIndexInformer\n\tLister() v1.PersistentVolumeClaimLister\n}\n\ntype persistentVolumeClaimInformer struct {\n\tfactory internalinterfaces.SharedInformerFactory\n}\n\n// NewPersistentVolumeClaimInformer constructs a new informer for PersistentVolumeClaim type.\n// Always prefer using an informer factory to get a shared informer instead of getting an independent\n// one. This reduces memory footprint and number of connections to the server.\nfunc NewPersistentVolumeClaimInformer(client kubernetes.Interface, namespace string, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {\n\treturn cache.NewSharedIndexInformer(\n\t\t&cache.ListWatch{\n\t\t\tListFunc: func(options meta_v1.ListOptions) (runtime.Object, error) {\n\t\t\t\treturn client.CoreV1().PersistentVolumeClaims(namespace).List(options)\n\t\t\t},\n\t\t\tWatchFunc: func(options meta_v1.ListOptions) (watch.Interface, error) {\n\t\t\t\treturn client.CoreV1().PersistentVolumeClaims(namespace).Watch(options)\n\t\t\t},\n\t\t},\n\t\t&core_v1.PersistentVolumeClaim{},\n\t\tresyncPeriod,\n\t\tindexers,\n\t)\n}\n\nfunc defaultPersistentVolumeClaimInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {\n\treturn NewPersistentVolumeClaimInformer(client, meta_v1.NamespaceAll, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc})\n}\n\nfunc (f *persistentVolumeClaimInformer) Informer() cache.SharedIndexInformer {\n\treturn f.factory.InformerFor(&core_v1.PersistentVolumeClaim{}, defaultPersistentVolumeClaimInformer)\n}\n\nfunc (f *persistentVolumeClaimInformer) Lister() v1.PersistentVolumeClaimLister {\n\treturn v1.NewPersistentVolumeClaimLister(f.Informer().GetIndexer())\n}\n"} +{"text": "/*\n * Copyright (c) 2020 Proton Technologies AG\n *\n * This file is part of ProtonVPN.\n *\n * ProtonVPN is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * ProtonVPN is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with ProtonVPN. If not, see <https://www.gnu.org/licenses/>.\n */\n\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.IO;\nusing FluentAssertions;\nusing Microsoft.VisualStudio.TestTools.UnitTesting;\nusing NSubstitute;\nusing NSubstitute.ExceptionExtensions;\nusing ProtonVPN.Update.Files.UpdatesDirectory;\n\nnamespace ProtonVPN.Update.Test.Files.UpdatesDirectory\n{\n [TestClass]\n public class SafeUpdatesDirectoryTest\n {\n private IUpdatesDirectory _origin;\n\n [TestInitialize]\n public virtual void TestInitialize()\n {\n _origin = Substitute.For<IUpdatesDirectory>();\n }\n\n [TestMethod]\n [SuppressMessage(\"ReSharper\", \"UnusedVariable\")]\n public void Path_ShouldGet_OriginPath()\n {\n var directory = new SafeUpdatesDirectory(_origin);\n\n var result = directory.Path;\n\n var dummy = _origin.Received(1).Path;\n }\n\n [TestMethod]\n public void Path_ShouldBe_FromOrigin()\n {\n const string expected = \"Expected path\";\n _origin.Path.Returns(expected);\n var directory = new SafeUpdatesDirectory(_origin);\n\n var result = directory.Path;\n\n result.Should().Be(expected);\n }\n\n [TestMethod]\n [SuppressMessage(\"ReSharper\", \"UnusedVariable\")]\n public void Path_ShouldPassException_WhenOriginThrows()\n {\n _origin.Path.Throws<SomeException>();\n var directory = new SafeUpdatesDirectory(_origin);\n\n Action action = () => { var result = directory.Path; };\n\n action.Should().Throw<SomeException>();\n }\n\n [TestMethod]\n public void Path_ShouldThrow_AppUpdateException_WhenOriginThrows_FileAccessException()\n {\n Exception[] exceptions =\n {\n new IOException(),\n new UnauthorizedAccessException()\n };\n\n foreach (var exception in exceptions)\n {\n Path_ShouldThrow_AppUpdateException_WhenOriginThrows(exception);\n }\n }\n\n [SuppressMessage(\"ReSharper\", \"UnusedVariable\")]\n private void Path_ShouldThrow_AppUpdateException_WhenOriginThrows(Exception ex)\n {\n TestInitialize();\n _origin.Path.Throws(ex);\n var directory = new SafeUpdatesDirectory(_origin);\n\n Action action = () => { var result = directory.Path; };\n\n action.Should().Throw<AppUpdateException>();\n }\n\n [TestMethod]\n public void Cleanup_ShouldCall_Origin()\n {\n var directory = new SafeUpdatesDirectory(_origin);\n\n directory.Cleanup();\n\n _origin.Received(1).Cleanup();\n }\n\n [TestMethod]\n public void Cleanup_ShouldPassException_WhenOriginThrows()\n {\n _origin.When(x => x.Cleanup()).Do(_ => throw new SomeException());\n var directory = new SafeUpdatesDirectory(_origin);\n\n Action action = () => directory.Cleanup(); \n\n action.Should().Throw<SomeException>();\n }\n\n [TestMethod]\n public void Cleanup_ShouldThrow_AppUpdateException_WhenOriginThrows_FileAccessException()\n {\n Exception[] exceptions =\n {\n new IOException(),\n new UnauthorizedAccessException()\n };\n\n foreach (var exception in exceptions)\n {\n Cleanup_ShouldThrow_AppUpdateException_WhenOriginThrows(exception);\n }\n }\n\n private void Cleanup_ShouldThrow_AppUpdateException_WhenOriginThrows(Exception ex)\n {\n TestInitialize();\n _origin.When(x => x.Cleanup()).Do(_ => throw ex);\n var directory = new SafeUpdatesDirectory(_origin);\n\n Action action = () => directory.Cleanup();\n\n action.Should().Throw<AppUpdateException>();\n }\n\n #region Helpers\n\n private class SomeException : Exception { }\n\n #endregion\n }\n}\n"} +{"text": "/*\n * Copyright 2008-2009 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage net.hasor.dataql;\nimport java.util.Map;\nimport java.util.function.Supplier;\n\n/**\n * UDF 源\n * @author 赵永春 (zyc@hasor.net)\n * @version : 2019-12-11\n */\n@FunctionalInterface\npublic interface UdfSource {\n public Supplier<Map<String, Udf>> getUdfResource(Finder finder);\n}"} +{"text": "{\n \"iisSettings\": {\n \"windowsAuthentication\": false,\n \"anonymousAuthentication\": true,\n \"iisExpress\": {\n \"applicationUrl\": \"http://localhost:35009\",\n \"sslPort\": 44352\n }\n },\n \"profiles\": {\n \"IIS Express\": {\n \"commandName\": \"IISExpress\",\n \"launchBrowser\": true,\n \"inspectUri\": \"{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}\",\n \"environmentVariables\": {\n \"ASPNETCORE_ENVIRONMENT\": \"Development\"\n }\n },\n \"blazorwasm2-singleOrg-hosted4.Server\": {\n \"commandName\": \"Project\",\n \"launchBrowser\": true,\n \"inspectUri\": \"{wsProtocol}://{url.hostname}:{url.port}/_framework/debug/ws-proxy?browser={browserInspectUri}\",\n \"applicationUrl\": \"https://localhost:5001;http://localhost:5000\",\n \"environmentVariables\": {\n \"ASPNETCORE_ENVIRONMENT\": \"Development\"\n }\n }\n }\n }\n"} +{"text": "id: Email Address Enrichment - Generic v2 - Test\nversion: -1\nfromversion: 4.1.0\nname: Email Address Enrichment - Generic v2 - Test\ndescription: A test for email address enrichment. Currently, due to issues, the test\n does not check all domain squatting results or whether the email addresses were\n detected as internal or external.\nstarttaskid: \"0\"\ntasks:\n \"0\":\n id: \"0\"\n taskid: 22a2e035-f857-417e-81cb-308b8a9dfec8\n type: start\n task:\n id: 22a2e035-f857-417e-81cb-308b8a9dfec8\n version: -1\n name: \"\"\n description: \"\"\n iscommand: false\n brand: \"\"\n nexttasks:\n '#none#':\n - \"4\"\n separatecontext: false\n view: |-\n {\n \"position\": {\n \"x\": 450,\n \"y\": 50\n }\n }\n note: false\n timertriggers: []\n ignoreworker: false\n \"1\":\n id: \"1\"\n taskid: 4181b3ee-0d7b-446f-81d0-0597eaecb22d\n type: playbook\n task:\n id: 4181b3ee-0d7b-446f-81d0-0597eaecb22d\n version: -1\n name: Email Address Enrichment - Generic v2\n playbookName: Email Address Enrichment - Generic v2\n type: playbook\n iscommand: false\n brand: \"\"\n nexttasks:\n '#none#':\n - \"5\"\n scriptarguments:\n Domain:\n complex:\n root: Domain\n accessor: Name\n transformers:\n - operator: uniq\n Email:\n complex:\n root: Account\n accessor: Email.Address\n transformers:\n - operator: uniq\n separatecontext: true\n loop:\n iscommand: false\n exitCondition: \"\"\n wait: 1\n view: |-\n {\n \"position\": {\n \"x\": 450,\n \"y\": 560\n }\n }\n note: false\n timertriggers: []\n ignoreworker: false\n \"2\":\n id: \"2\"\n taskid: fdf1e7b5-68e7-4199-825b-ee7878b64f8f\n type: regular\n task:\n id: fdf1e7b5-68e7-4199-825b-ee7878b64f8f\n version: -1\n name: Set domains to context\n description: Sets a value into the context with the given context key\n scriptName: Set\n type: regular\n iscommand: false\n brand: \"\"\n nexttasks:\n '#none#':\n - \"1\"\n scriptarguments:\n append: {}\n key:\n simple: Domain.Name\n value:\n simple: '[\"demisto.com\", \"demist0.com\", \"domainthatdoesntexist.co.uk\", \"someotherdomainandnoemailforit.bro\"]'\n reputationcalc: 1\n separatecontext: false\n view: |-\n {\n \"position\": {\n \"x\": 230,\n \"y\": 360\n }\n }\n note: false\n timertriggers: []\n ignoreworker: false\n \"3\":\n id: \"3\"\n taskid: 179ca0a7-2447-4dfd-8083-c73f1669ec5f\n type: regular\n task:\n id: 179ca0a7-2447-4dfd-8083-c73f1669ec5f\n version: -1\n name: Set email addresses to context\n description: Sets a value into the context with the given context key\n scriptName: Set\n type: regular\n iscommand: false\n brand: \"\"\n nexttasks:\n '#none#':\n - \"1\"\n scriptarguments:\n append: {}\n key:\n simple: Account.Email.Address\n value:\n simple: '[\"geverwithnoname@domainthatdoesntexist.co.uk\", \"soso@demisto.com\",\n \"koko@demisto.com\", \"user1@domain.com\"]'\n reputationcalc: 1\n separatecontext: false\n view: |-\n {\n \"position\": {\n \"x\": 670,\n \"y\": 360\n }\n }\n note: false\n timertriggers: []\n ignoreworker: false\n \"4\":\n id: \"4\"\n taskid: 43deb7e7-c488-46ec-8408-d1a303a4b563\n type: regular\n task:\n id: 43deb7e7-c488-46ec-8408-d1a303a4b563\n version: -1\n name: Delete context\n description: Deletes context for a fresh start of this test.\n scriptName: DeleteContext\n type: regular\n iscommand: false\n brand: \"\"\n nexttasks:\n '#none#':\n - \"2\"\n - \"3\"\n scriptarguments:\n all:\n simple: \"yes\"\n index: {}\n key: {}\n keysToKeep: {}\n subplaybook: {}\n reputationcalc: 1\n separatecontext: false\n view: |-\n {\n \"position\": {\n \"x\": 450,\n \"y\": 180\n }\n }\n note: false\n timertriggers: []\n ignoreworker: false\n \"5\":\n id: \"5\"\n taskid: d9227bdc-084f-4652-8a86-10659a4c8fe4\n type: condition\n task:\n id: d9227bdc-084f-4652-8a86-10659a4c8fe4\n version: -1\n name: Was there a case of domain squatting?\n type: condition\n iscommand: false\n brand: \"\"\n nexttasks:\n '#default#':\n - \"7\"\n \"yes\":\n - \"6\"\n separatecontext: false\n conditions:\n - label: \"yes\"\n condition:\n - - operator: isEqualNumber\n left:\n value:\n complex:\n root: DBotScore\n accessor: Score\n iscontext: true\n right:\n value:\n simple: \"2\"\n view: |-\n {\n \"position\": {\n \"x\": 450,\n \"y\": 740\n }\n }\n note: false\n timertriggers: []\n ignoreworker: false\n \"6\":\n id: \"6\"\n taskid: 02372e49-2953-4bed-844a-ed4c5011234f\n type: title\n task:\n id: 02372e49-2953-4bed-844a-ed4c5011234f\n version: -1\n name: Done\n description: \"\"\n type: title\n iscommand: false\n brand: \"\"\n separatecontext: false\n view: |-\n {\n \"position\": {\n \"x\": 450,\n \"y\": 1120\n }\n }\n note: false\n timertriggers: []\n ignoreworker: false\n \"7\":\n id: \"7\"\n taskid: 3bc8b6a6-35d5-46af-8180-ab5c74431165\n type: regular\n task:\n id: 3bc8b6a6-35d5-46af-8180-ab5c74431165\n version: -1\n name: Make test fail\n description: Fail the test if domain squatting was not detected.\n scriptName: PrintErrorEntry\n type: regular\n iscommand: false\n brand: \"\"\n nexttasks:\n '#none#':\n - \"6\"\n scriptarguments:\n message:\n simple: Domain squatting should have been detected, but wasn't.\n reputationcalc: 1\n separatecontext: false\n view: |-\n {\n \"position\": {\n \"x\": 870,\n \"y\": 925\n }\n }\n note: false\n timertriggers: []\n ignoreworker: false\nview: |-\n {\n \"linkLabelsPosition\": {\n \"5_6_yes\": 0.47,\n \"5_7_#default#\": 0.42\n },\n \"paper\": {\n \"dimensions\": {\n \"height\": 1135,\n \"width\": 1020,\n \"x\": 230,\n \"y\": 50\n }\n }\n }\ninputs:\n- key: InternalDomains\n value:\n simple: demisto.com, demistodev.com\n required: false\n description: A comma-separated list of internal domains\noutputs: []\n"} +{"text": "################################################################################\n# The Neural Network (NN) based Speech Synthesis System\n# https://svn.ecdf.ed.ac.uk/repo/inf/dnn_tts/\n#\n# Centre for Speech Technology Research\n# University of Edinburgh, UK\n# Copyright (c) 2014-2015\n# All Rights Reserved.\n#\n# The system as a whole and most of the files in it are distributed\n# under the following copyright and conditions\n#\n# Permission is hereby granted, free of charge, to use and distribute\n# this software and its documentation without restriction, including\n# without limitation the rights to use, copy, modify, merge, publish,\n# distribute, sublicense, and/or sell copies of this work, and to\n# permit persons to whom this work is furnished to do so, subject to\n# the following conditions:\n#\n# - Redistributions of source code must retain the above copyright\n# notice, this list of conditions and the following disclaimer.\n# - Redistributions in binary form must reproduce the above\n# copyright notice, this list of conditions and the following\n# disclaimer in the documentation and/or other materials provided\n# with the distribution.\n# - The authors' names may not be used to endorse or promote products derived\n# from this software without specific prior written permission.\n#\n# THE UNIVERSITY OF EDINBURGH AND THE CONTRIBUTORS TO THIS WORK\n# DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING\n# ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT\n# SHALL THE UNIVERSITY OF EDINBURGH NOR THE CONTRIBUTORS BE LIABLE\n# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\n# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN\n# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,\n# ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF\n# THIS SOFTWARE.\n################################################################################\n\n\nfrom io_funcs.htk_io import HTK_Parm_IO\nfrom io_funcs.binary_io import BinaryIOCollection\nimport numpy\nimport logging\n\nclass CMPNormalisation(object):\n def __init__(self, mgc_dim=0, bap_dim=0, lf0_dim = 0):\n self.mgc_dim = mgc_dim * 3\n self.bap_dim = bap_dim * 3\n self.lf0_dim = lf0_dim * 3\n\n def load_cmp_file(self, file_name):\n\n logger = logging.getLogger(\"acoustic_norm\")\n\n htk_reader = HTK_Parm_IO()\n htk_reader.read_htk(file_name)\n\n cmp_data = htk_reader.data\n\n mgc_data = cmp_data[:, 0:self.mgc_dim]\n\n # this only extracts the static lf0 because we need to interpolate it, then add deltas ourselves later\n lf0_data = cmp_data[:, self.mgc_dim]\n\n bap_data = cmp_data[:, self.mgc_dim+self.lf0_dim:self.mgc_dim+self.lf0_dim+self.bap_dim]\n\n logger.debug('loaded %s of shape %s' % (file_name, cmp_data.shape))\n logger.debug(' with: %d mgc + %d lf0 + %d bap = %d' % (self.mgc_dim,self.lf0_dim,self.bap_dim,self.mgc_dim+self.lf0_dim+self.bap_dim))\n\n assert( (self.mgc_dim+self.lf0_dim+self.bap_dim) == cmp_data.shape[1])\n\n return mgc_data, bap_data, lf0_data\n\n def interpolate_f0(self, data):\n\n data = numpy.reshape(data, (data.size, 1))\n\n vuv_vector = numpy.zeros((data.size, 1))\n vuv_vector[data > 0.0] = 1.0\n vuv_vector[data <= 0.0] = 0.0\n\n ip_data = data\n\n frame_number = data.size\n last_value = 0.0\n for i in range(frame_number):\n if data[i] <= 0.0:\n j = i+1\n for j in range(i+1, frame_number):\n if data[j] > 0.0:\n break\n if j < frame_number-1:\n if last_value > 0.0:\n step = (data[j] - data[i-1]) / float(j - i)\n for k in range(i, j):\n ip_data[k] = data[i-1] + step * (k - i + 1)\n else:\n for k in range(i, j):\n ip_data[k] = data[j]\n else:\n for k in range(i, frame_number):\n ip_data[k] = last_value\n else:\n ip_data[i] = data[i]\n last_value = data[i]\n\n return ip_data, vuv_vector\n\n def compute_delta(self, vector, delta_win):\n# delta_win = [-0.5, 0.0, 0.5]\n# acc_win = [1.0, -2.0, 1.0]\n\n frame_number = vector.size\n win_length = len(delta_win)\n win_width = int(win_length/2)\n temp_vector = numpy.zeros((frame_number + 2 * win_width, 1))\n delta_vector = numpy.zeros((frame_number, 1))\n\n temp_vector[win_width:frame_number+win_width, ] = vector\n for w in range(win_width):\n temp_vector[w, 0] = vector[0, 0]\n temp_vector[frame_number+win_width+w, 0] = vector[frame_number-1, 0]\n\n for i in range(frame_number):\n for w in range(win_length):\n delta_vector[i] += temp_vector[i+w, 0] * delta_win[w]\n\n return delta_vector\n\n def produce_nn_cmp(self, in_file_list, out_file_list):\n\n\n logger = logging.getLogger(\"acoustic_norm\")\n\n delta_win = [-0.5, 0.0, 0.5]\n acc_win = [1.0, -2.0, 1.0]\n\n file_number = len(in_file_list)\n logger.info('starting creation of %d files' % file_number)\n\n for i in range(file_number):\n\n mgc_data, bap_data, lf0_data = self.load_cmp_file(in_file_list[i])\n ip_lf0, vuv_vector = self.interpolate_f0(lf0_data)\n\n delta_lf0 = self.compute_delta(ip_lf0, delta_win)\n acc_lf0 = self.compute_delta(ip_lf0, acc_win)\n\n frame_number = ip_lf0.size\n\n cmp_data = numpy.concatenate((mgc_data, ip_lf0, delta_lf0, acc_lf0, vuv_vector, bap_data), axis=1)\n\n io_funcs = BinaryIOCollection()\n io_funcs.array_to_binary_file(cmp_data, out_file_list[i])\n\n logger.info('finished creation of %d binary files' % file_number)\n\nif __name__ == '__main__':\n in_file_list = ['/group/project/dnn_tts/data/nick/cmp/herald_001.cmp']\n out_file_list = ['/group/project/dnn_tts/herald_001.out.cmp']\n\n cmp_norm = CMPNormalisation(mgc_dim=50, bap_dim=25, lf0_dim = 1)\n\n cmp_norm.produce_nn_cmp(in_file_list, out_file_list)\n"} +{"text": "// Copyright 2018 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n// Flags: --allow-natives-syntax --block-concurrent-recompilation --noalways-opt\n\nglobal = 1;\n\nfunction boom(value) {\n return global;\n}\n\nassertEquals(1, boom());\nassertEquals(1, boom());\n%OptimizeFunctionOnNextCall(boom, \"concurrent\");\nassertEquals(1, boom());\n\nthis.__defineGetter__(\"global\", () => 42);\n\n%UnblockConcurrentRecompilation();\n\n// boom should be deoptimized because the global property cell has changed.\nassertUnoptimized(boom, \"sync\");\n\nassertEquals(42, boom());\n"} +{"text": "from PyQt5.QtCore import Qt, pyqtSignal\n\nfrom .imglist import (\n ImgListModel, ImgListDelegate, ImgListView,\n ImgFilterProxyModel\n)\n\n\nclass ArtistListModel(ImgListModel):\n pass\n\n\nclass ArtistListDelegate(ImgListDelegate):\n def __init__(self, *args, **kwargs):\n super().__init__(*args, **kwargs)\n\n self.as_circle = True\n\n\nclass ArtistFilterProxyModel(ImgFilterProxyModel):\n pass\n\n\nclass ArtistListView(ImgListView):\n show_artist_needed = pyqtSignal([object])\n\n def __init__(self, *args, **kwargs):\n super().__init__(*args, **kwargs)\n\n delegate = ArtistListDelegate(self)\n self.setItemDelegate(delegate)\n\n self.activated.connect(self._on_activated)\n\n def _on_activated(self, index):\n artist = index.data(Qt.UserRole)\n self.show_artist_needed.emit(artist)\n"} +{"text": "project_path: /web/_project.yaml\nbook_path: /web/fundamentals/_book.yaml\n\n{# wf_updated_on:2016-09-28 #}\n{# wf_published_on:2016-09-28 #}\n\n# 網頁存儲概覽 {: .page-title }\n\n{% include \"web/_shared/contributors/mco.html\" %}\n\n選擇正確的存儲機制對於本地設備存儲和基於雲的服務器存儲都非常重要。\n良好的存儲引擎可確保以可靠的方式保存信息,並減少帶寬和提升響應能力。正確的存儲緩存策略是實現離線移動網頁體驗的核心構建基塊。\n\n\n本文爲評估存儲 API 和服務提供簡要的基礎,然後,我們將提供一個比較表格和一些通用的指南。近期,爲方便您更深入地理解選擇的存儲主題,我們計劃增加相關資源。\n\n\n## 存儲分類\n\n首先,我們瞭解一下分析網絡應用的數據存儲時可以依據的一些標準。\n稍後,我們將使用此框架枚舉和評估爲網頁開發者提供的許多存儲選項。\n\n\n### 數據模型\n\n用於存儲數據單元的模型可確定在內部組織數據的方式,這會影響存儲的易用性、成本和性能以及檢索請求。\n\n\n\n* **結構化:**在具有預定義字段的表格中存儲數據,與典型的基於 SQL 的數據庫管理系統一樣,非常適用於靈活的動態查詢,其中所有查詢類型可能不是一個可知的先驗。瀏覽器中的 IndexedDB 是結構化數據存儲區的一個突出例子。\n\n\n* **鍵/值:** 鍵/值數據存儲區和相關的 NoSQL 數據庫讓您可以存儲和檢索按唯一鍵值索引的非結構化的數據。鍵/值數據存儲區與哈希值表格相似,它們都允許在固定時間訪問已編入索引的不透明數據。鍵/值數據存儲區的突出例子包括瀏覽器中的 Cache API 以及服務器上的 Apache Cassandra。\n\n\n* **字節流:** 這個簡單模型以可變長度、不透明的字節字符串形式存儲數據,將任意形式的內部組織置於應用層。此模型特別適合文件系統和其他按層次結構組織的數據塊。\n字節流數據存儲區的突出例子包括文件系統和雲端存儲服務。\n\n\n### 持久化\n\n網絡應用的存儲方法,可根據使數據持久化的作用域進行分析。\n\n\n* **會話持久化:**僅在一個網頁會話或瀏覽器標籤處於活動狀態時保留此類別中的數據。\nSession Storage API 是採用會話持久化的存儲機制的一個例子。\n\n\n* **設備持久化:** 在特定設備中跨會話和瀏覽器標籤/窗口保留此類別中的數據。\nCache API 是採用設備持久化的存儲機制的一個例子。\n\n\n* **全局持久化:**跨會話和設備保留此類別中的數據。\n因此,它是最可靠的數據持久化形式。Google 雲端存儲是採用全局持久化的存儲機制的一個例子。\n\n\n### 瀏覽器支持\n\n開發者應選擇一個最適合他們的問題域的 API;不過,開發者還應考慮到標準化和完全確立的 API 優於自定義或專有界面這一事實,因爲這些 API 往往使用壽命更長並能夠得到更廣泛的支持。開發者還會享有更廣泛的知識庫和更豐富的開發者生態系統。\n\n\n### 事務處理\n\n通常,它對於是否能以原子方式成功收集相關存儲操作非常重要。\n數據庫管理系統在傳統上使用事務處理模型支持此功能,其中可能會將相關更新組合到任意單元。儘管不是始終需要,但在某些問題域,它是一個便捷的功能,並且有時候非常重要。\n\n\n### 同步/異步\n\n由於存儲或檢索請求會阻止當前活動的線程直到請求已完成,因此,某些存儲 API 是同步的。\n這在網頁瀏覽器中是特別沉重的負擔,其中存儲請求會與 UI 共享主線程。出於效率和性能的考慮,將異步存儲 API 作爲首選。\n\n\n## 比較\n\n在此部分中,我們看一下網頁開發者當前可用的 API,並根據上述標準比較它們的異同。\n\n\n<table>\n <thead>\n <th>API</th>\n <th>數據模型</th>\n <th>持久化</th>\n <th>瀏覽器支持</th>\n <th>事務處理</th>\n <th>同步/異步</th>\n </thead>\n <tbody>\n <tr>\n <td><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/FileSystem\">File system</a></td>\n <td>字節流</td>\n <td>設備</td>\n <td><a href=\"http://caniuse.com/#feat=filesystem\">52%</a></td>\n <td>不支持</td>\n <td>異步</td>\n </tr>\n <tr>\n <td><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Window/localStorage\">Local Storage</a></td>\n <td>鍵/值</td>\n <td>設備</td>\n <td><a href=\"http://caniuse.com/#feat=namevalue-storage\">93%</a></td>\n <td>不支持</td>\n <td>同步</td>\n </tr>\n <tr>\n <td><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage\">Session Storage</a></td>\n <td>鍵/值</td>\n <td>會話</td>\n <td><a href=\"http://caniuse.com/#feat=namevalue-storage\">93%</a></td>\n <td>不支持</td>\n <td>同步</td>\n </tr>\n <tr>\n <td><a href=\"https://developer.mozilla.org/en-US/docs/Web/HTTP/Cookies\">Cookie</a></td>\n <td>結構化</td>\n <td>設備</td>\n <td>100%</td>\n <td>不支持</td>\n <td>同步</td>\n </tr>\n <tr>\n <td><a href=\"https://www.w3.org/TR/webdatabase/\">WebSQL</a></td>\n <td>結構化</td>\n <td>設備</td>\n <td><a href=\"http://caniuse.com/#feat=sql-storage\">77%</a></td>\n <td>支持</td>\n <td>異步</td>\n </tr>\n <tr>\n <td><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/CacheStorage\">Cache</a></td>\n <td>鍵/值</td>\n <td>設備</td>\n <td><a href=\"http://caniuse.com/#feat=serviceworkers\">60%</a></td>\n <td>不支持</td>\n <td>異步</td>\n </tr>\n <tr>\n <td><a href=\"https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API\">IndexedDB</a></td>\n <td>混合</td>\n <td>設備</td>\n <td><a href=\"http://caniuse.com/#feat=indexeddb\">83%</a></td>\n <td>支持</td>\n <td>異步</td>\n </tr>\n <tr>\n <td><a href=\"https://cloud.google.com/storage/\">cloud storage</a></td>\n <td>字節流</td>\n <td>全局</td>\n <td>100%</td>\n <td>不支持</td>\n <td>兩者皆有</td>\n </tr>\n <tbody>\n</table>\n\n如上所述,最好選擇在儘可能多的瀏覽器上受廣泛支持的 API,其可提供異步調用模型,以最大程度提高與 UI 的互操作性。這些條件自然會產生以下技術選擇:\n\n\n* 對於設備本地鍵/值存儲:使用 Cache API。\n\n* 對於設備本地結構化存儲:使用 IndexedDB。\n\n* 對於全局字節流存儲:使用雲端存儲服務。\n\n這種組合可滿足許多移動網絡應用的基本存儲需求。我們即將發表的一篇文章,在該文章中詳細介紹瞭如何處理常見存儲模式,並隨附代碼示例,敬請期待!\n\n\n\n## 調試 Chrome DevTools 中的存儲{: #devtools }\n\n請查看以下文檔,瞭解有關使用 Chrome DevTools 檢查和調試您選擇的網絡存儲 API 的更多信息。\n此處未提及 DevTools 中不支持或不適用的 API。\n\n\n* [Local Storage](/web/tools/chrome-devtools/manage-data/local-storage#local-storage)\n* [Session Storage](/web/tools/chrome-devtools/manage-data/local-storage#session-storage)\n* [Cookies](/web/tools/chrome-devtools/manage-data/cookies)\n* [Web SQL](/web/tools/chrome-devtools/manage-data/local-storage#web-sql)\n* [Cache](/web/tools/chrome-devtools/progressive-web-apps#caches)\n* [IndexedDB](/web/tools/chrome-devtools/manage-data/local-storage#indexeddb)\n\n如果您目前使用多個存儲 API,請查看 DevTools 的 Clear Storage 功能。\n此功能允許您通過點��一個按鈕清除多個存儲。\n如需瞭解詳細信息,請參閱[清除服務工作線程、存儲、數據庫和緩存](/web/tools/chrome-devtools/manage-data/local-storage#clear-storage)。\n\n\n\n## 後續計劃…\n\n現在,我們已介紹了一些考慮存儲機制的相關方法,並比較了目前可用的最常見的 API 和服務的異同,不久,我們將添加更多內容以深入探討一個或多個關注的主題:\n\n\n\n\n* [針對 Progressive Web App 的離線存儲建議](offline-for-pwa)\n\n* 常用存儲模式(即將推出)\n\n* 建議的後端存儲方法(即將推出)\n\n* 深度教程:IndexedDB(即將推出)\n\n* 深度教程:Cache API(即將推出)\n\n* 對常見存儲框架進行分析(即將推出)\n\n\n{# wf_devsite_translation #}\n"} +{"text": "\n#\n# Arduino-1.0 Makefile \n#\n# written by olikraus@gmail.com\n#\n# Features:\n# - boards.txt is used to derive parameters\n# - All intermediate files are put into a separate directory (TMPDIRNAME)\n# - Simple use: Copy Makefile into the same directory of the .ino file\n#\n# Limitations:\n# - requires UNIX environment\n# - TMPDIRNAME must be subdirectory of the current directory.\n#\n# Targets\n# \tall\t\tbuild everything\n#\tupload\tbuild and upload to arduino\n#\tclean\tremove all temporary files (includes final hex file)\n#\n# History\n#\t001\t28 Apr 2010\tfirst release\n#\t002 05 Oct 2010\tadded 'uno'\n#\t003 06 Dec 2011 arduino 1.0 \n#\t004 11 Feb 2012 u8glib \n#\n\n#=== user configuration ===\n# All ...PATH variables must have a '/' at the end\n\n# Board (and prozessor) information: see $(ARDUINO_PATH)hardware/arduino/boards.txt\n# Some examples:\n#\tBOARD\t\tDESCRIPTION\n#\tuno\t\t\tArduino Uno\n#\tatmega328\tArduino Duemilanove or Nano w/ ATmega328\n#\tdiecimila\t\tArduino Diecimila, Duemilanove, or Nano w/ ATmega168\n#\tmega\t\tArduino Mega\n#\tmega2560\tArduino Mega2560\n#\tmini\t\t\tArduino Mini\n#\tlilypad328\tLilyPad Arduino w/ ATmega328 \nBOARD:=uno\n\n# additional definitions\n#DEFS:=-DARDUINO=105\n\n \nU8G_PATH:=$(shell cd ../../../.. && pwd)/csrc/\nU8G_CPP_PATH:=$(shell cd ../../../.. && pwd)/cppsrc/\n#U8G_FONT_PATH:=$(shell cd ../../.. && pwd)/sfntsrc/\n\n\n# The location where the avr tools (e.g. avr-gcc) are located. Requires a '/' at the end.\n# Can be empty if all tools are accessable through the search path\nAVR_TOOLS_PATH:=/usr/bin/\n\n# Install path of the arduino software. Requires a '/' at the end.\nARDUINO_PATH:=/home/kraus/prg/arduino-1.0.5-u8glib/\n\n# Install path for avrdude. Requires a '/' at the end. Can be empty if avrdude is in the search path.\nAVRDUDE_PATH:=$(ARDUINO_PATH)hardware/tools/\n\n# The unix device where we can reach the arduino board\n# Uno: /dev/ttyACM0\n# Duemilanove: /dev/ttyUSB0\nAVRDUDE_PORT:=/dev/ttyACM0\n\n# List of all libaries which should be included.\nEXTRA_DIRS=$(ARDUINO_PATH)libraries/LiquidCrystal/\nEXTRA_DIRS+=$(ARDUINO_PATH)libraries/SD/\nEXTRA_DIRS+=$(ARDUINO_PATH)libraries/SD/utility/\nEXTRA_DIRS+=$(ARDUINO_PATH)libraries/Wire/\nEXTRA_DIRS+=$(ARDUINO_PATH)libraries/Wire/utility/\nEXTRA_DIRS+=$(ARDUINO_PATH)libraries/SPI/\n#EXTRA_DIRS+=$(ARDUINO_PATH)libraries/.../\n\n#=== fetch parameter from boards.txt processor parameter ===\n# the basic idea is to get most of the information from boards.txt\n\nBOARDS_TXT:=$(ARDUINO_PATH)hardware/arduino/boards.txt\n\n# get the MCU value from the $(BOARD).build.mcu variable. For the atmega328 board this is atmega328p\nMCU:=$(shell sed -n -e \"s/$(BOARD).build.mcu=\\(.*\\)/\\1/p\" $(BOARDS_TXT))\n# get the F_CPU value from the $(BOARD).build.f_cpu variable. For the atmega328 board this is 16000000\nF_CPU:=$(shell sed -n -e \"s/$(BOARD).build.f_cpu=\\(.*\\)/\\1/p\" $(BOARDS_TXT))\n# get variant subfolder\nVARIANT:=$(shell sed -n -e \"s/$(BOARD).build.variant=\\(.*\\)/\\1/p\" $(BOARDS_TXT))\n\n\n# avrdude\n# get the AVRDUDE_UPLOAD_RATE value from the $(BOARD).upload.speed variable. For the atmega328 board this is 57600\nAVRDUDE_UPLOAD_RATE:=$(shell sed -n -e \"s/$(BOARD).upload.speed=\\(.*\\)/\\1/p\" $(BOARDS_TXT))\n# get the AVRDUDE_PROGRAMMER value from the $(BOARD).upload.protocol variable. For the atmega328 board this is stk500\nAVRDUDE_PROGRAMMER:=$(shell sed -n -e \"s/$(BOARD).upload.protocol=\\(.*\\)/\\1/p\" $(BOARDS_TXT))\n# use stk500v1, because stk500 will default to stk500v2\n#AVRDUDE_PROGRAMMER:=stk500v1\n\n#=== identify user files ===\nINOSRC:=$(shell ls *.ino)\nTARGETNAME=$(basename $(INOSRC))\n\nCDIRS:=$(EXTRA_DIRS) $(addsuffix utility/,$(EXTRA_DIRS))\nCDIRS:=*.c utility/*.c $(U8G_PATH)*.c $(addsuffix *.c,$(CDIRS)) $(ARDUINO_PATH)hardware/arduino/cores/arduino/*.c\nCSRC:=$(shell ls $(CDIRS) 2>/dev/null)\n\nCCSRC:=$(shell ls *.cc 2>/dev/null)\n\nCPPDIRS:=$(EXTRA_DIRS) $(addsuffix utility/,$(EXTRA_DIRS)) $(U8G_CPP_PATH)\nCPPDIRS:=*.cpp utility/*.cpp $(addsuffix *.cpp,$(CPPDIRS)) $(ARDUINO_PATH)hardware/arduino/cores/arduino/*.cpp \nCPPSRC:=$(shell ls $(CPPDIRS) 2>/dev/null) \n\n#=== build internal variables ===\n\n# the name of the subdirectory where everything is stored\nTMPDIRNAME:=tmp\nTMPDIRPATH:=$(TMPDIRNAME)/\n\nAVRTOOLSPATH:=$(AVR_TOOLS_PATH)\n\nOBJCOPY:=$(AVRTOOLSPATH)avr-objcopy\nOBJDUMP:=$(AVRTOOLSPATH)avr-objdump\nSIZE:=$(AVRTOOLSPATH)avr-size\n\nCPPSRC:=$(addprefix $(TMPDIRPATH),$(INOSRC:.ino=.cpp)) $(CPPSRC)\n\nCOBJ:=$(CSRC:.c=.o)\nCCOBJ:=$(CCSRC:.cc=.o)\nCPPOBJ:=$(CPPSRC:.cpp=.o)\n\nOBJFILES:=$(COBJ) $(CCOBJ) $(CPPOBJ)\nDIRS:= $(dir $(OBJFILES))\n\nDEPFILES:=$(OBJFILES:.o=.d)\n# assembler files from avr-gcc -S\nASSFILES:=$(OBJFILES:.o=.s)\n# disassembled object files with avr-objdump -S\nDISFILES:=$(OBJFILES:.o=.dis)\n\n\nLIBNAME:=$(TMPDIRPATH)$(TARGETNAME).a\nELFNAME:=$(TMPDIRPATH)$(TARGETNAME).elf\nHEXNAME:=$(TMPDIRPATH)$(TARGETNAME).hex\n\nAVRDUDE_FLAGS = -V -F\nAVRDUDE_FLAGS += -C $(ARDUINO_PATH)/hardware/tools/avrdude.conf \nAVRDUDE_FLAGS += -p $(MCU)\nAVRDUDE_FLAGS += -P $(AVRDUDE_PORT)\nAVRDUDE_FLAGS += -c $(AVRDUDE_PROGRAMMER) \nAVRDUDE_FLAGS += -b $(AVRDUDE_UPLOAD_RATE)\nAVRDUDE_FLAGS += -U flash:w:$(HEXNAME)\n\nAVRDUDE = $(AVRDUDE_PATH)avrdude\n\n#=== predefined variable override ===\n# use \"make -p -f/dev/null\" to see the default rules and definitions\n\n# Build C and C++ flags. Include path information must be placed here\nCOMMON_FLAGS = -DF_CPU=$(F_CPU) -mmcu=$(MCU) $(DEFS) -DARDUINO=100\n# COMMON_FLAGS += -gdwarf-2\nCOMMON_FLAGS += -Os\nCOMMON_FLAGS += -Wall -Wextra -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums\nCOMMON_FLAGS += -I$(ARDUINO_PATH)hardware/arduino/cores/arduino\nCOMMON_FLAGS += -I$(ARDUINO_PATH)hardware/arduino/variants/$(VARIANT)\nCOMMON_FLAGS += -I. -I$(U8G_PATH) -I$(U8G_CPP_PATH)\nCOMMON_FLAGS += $(addprefix -I,$(EXTRA_DIRS))\nCOMMON_FLAGS += -ffunction-sections -fdata-sections -Wl,--gc-sections\nCOMMON_FLAGS += -Wl,--Map=output.map\nCOMMON_FLAGS += -Wl,--relax\nCOMMON_FLAGS += -mcall-prologues\n\nCFLAGS = $(COMMON_FLAGS) -std=gnu99 -Wstrict-prototypes \nCXXFLAGS = $(COMMON_FLAGS) \n\n# Replace standard build tools by avr tools\nCC = $(AVRTOOLSPATH)avr-gcc\nCXX = $(AVRTOOLSPATH)avr-g++\nAR = @$(AVRTOOLSPATH)avr-ar\n\n\n# \"rm\" must be able to delete a directory tree\nRM = rm -rf \n\n#=== rules ===\n\n# add rules for the C/C++ files where the .o file is placed in the TMPDIRPATH\n# reuse existing variables as far as possible\n\n$(TMPDIRPATH)%.o: %.c\n\t@echo compile $<\n\t@$(COMPILE.c) $(OUTPUT_OPTION) $<\n\n$(TMPDIRPATH)%.o: %.cc\n\t@echo compile $< \n\t@$(COMPILE.cc) $(OUTPUT_OPTION) $<\n\n$(TMPDIRPATH)%.o: %.cpp\n\t@echo compile $<\n\t@$(COMPILE.cpp) $(OUTPUT_OPTION) $<\n\n$(TMPDIRPATH)%.s: %.c\n\t@$(COMPILE.c) $(OUTPUT_OPTION) -S $<\n\n$(TMPDIRPATH)%.s: %.cc\n\t@$(COMPILE.cc) $(OUTPUT_OPTION) -S $<\n\n$(TMPDIRPATH)%.s: %.cpp\n\t@$(COMPILE.cpp) $(OUTPUT_OPTION) -S $<\n\n$(TMPDIRPATH)%.dis: $(TMPDIRPATH)%.o\n\t@$(OBJDUMP) -S $< > $@\n\n.SUFFIXES: .elf .hex .ino\n\n.elf.hex:\n\t@$(OBJCOPY) -O ihex -R .eeprom $< $@\n\t\n$(TMPDIRPATH)%.cpp: %.ino\n\t@cat $(ARDUINO_PATH)hardware/arduino/cores/arduino/main.cpp > $@\n\t@cat $< >> $@\n\t@echo >> $@\n\t@echo 'extern \"C\" void __cxa_pure_virtual() { while (1); }' >> $@\n\n\n.PHONY: all\nall: tmpdir $(HEXNAME) assemblersource showsize\n\tls -al $(HEXNAME) $(ELFNAME)\n\n$(ELFNAME): $(LIBNAME)($(addprefix $(TMPDIRPATH),$(OBJFILES))) \n\t$(LINK.o) $(COMMON_FLAGS) $(LIBNAME) $(LOADLIBES) $(LDLIBS) -o $@\n\n$(LIBNAME)(): $(addprefix $(TMPDIRPATH),$(OBJFILES))\n\n#=== create temp directory ===\n# not really required, because it will be also created during the dependency handling\n.PHONY: tmpdir\ntmpdir:\n\t@test -d $(TMPDIRPATH) || mkdir $(TMPDIRPATH)\n\n#=== create assembler files for each C/C++ file ===\n.PHONY: assemblersource\nassemblersource: $(addprefix $(TMPDIRPATH),$(ASSFILES)) $(addprefix $(TMPDIRPATH),$(DISFILES))\n\n\n#=== show the section sizes of the ELF file ===\n.PHONY: showsize\nshowsize: $(ELFNAME)\n\t$(SIZE) $<\n\n#=== clean up target ===\n# this is simple: the TMPDIRPATH is removed\n.PHONY: clean\nclean:\n\t$(RM) $(TMPDIRPATH)\n\n# Program the device. \n# step 1: reset the arduino board with the stty command\n# step 2: user avrdude to upload the software\n.PHONY: upload\nupload: $(HEXNAME)\n\tstty -F $(AVRDUDE_PORT) hupcl\n\t$(AVRDUDE) $(AVRDUDE_FLAGS)\n\n\n# === dependency handling ===\n# From the gnu make manual (section 4.14, Generating Prerequisites Automatically)\n# Additionally (because this will be the first executed rule) TMPDIRPATH is created here.\n# Instead of \"sed\" the \"echo\" command is used\n# cd $(TMPDIRPATH); mkdir -p $(DIRS) 2> /dev/null; cd ..\nDEPACTION=test -d $(TMPDIRPATH) || mkdir $(TMPDIRPATH);\\\nmkdir -p $(addprefix $(TMPDIRPATH),$(DIRS));\\\nset -e; echo -n $@ $(dir $@) > $@; $(CC) -MM $(COMMON_FLAGS) $< >> $@\n\n\n$(TMPDIRPATH)%.d: %.c\n\t@$(DEPACTION)\n\n$(TMPDIRPATH)%.d: %.cc\n\t@$(DEPACTION)\n\n$(TMPDIRPATH)%.d: %.cpp\n\t@$(DEPACTION)\n\n# Include dependency files. If a .d file is missing, a warning is created and the .d file is created\n# This warning is not a problem (gnu make manual, section 3.3 Including Other Makefiles)\n-include $(addprefix $(TMPDIRPATH),$(DEPFILES))\n\n\n"} +{"text": "#pragma once\n/**\n * @file log_message.hpp\n * @brief Defines types and helper macros necessary for generating log messages.\n */\n#include <fc/time.hpp>\n#include <fc/variant_object.hpp>\n#include <memory>\n\nnamespace fc\n{\n namespace detail \n { \n class log_context_impl; \n class log_message_impl; \n }\n\n /**\n * Named scope for log_level enumeration.\n */\n class log_level\n {\n public:\n /**\n * @brief Define's the various log levels for reporting. \n *\n * Each log level includes all higher levels such that \n * Debug includes Error, but Error does not include Debug.\n */\n enum values\n {\n all, \n debug, \n info, \n warn, \n error, \n off \n };\n log_level( values v = off ):value(v){}\n explicit log_level( int v ):value( static_cast<values>(v)){}\n operator int()const { return value; }\n string to_string()const;\n values value;\n };\n\n void to_variant( log_level e, variant& v );\n void from_variant( const variant& e, log_level& ll );\n\n /**\n * @brief provides information about where and when a log message was generated.\n * @ingroup AthenaSerializable\n *\n * @see FC_LOG_CONTEXT\n */\n class log_context \n {\n public:\n log_context();\n log_context( log_level ll,\n const char* file, \n uint64_t line, \n const char* method );\n ~log_context();\n explicit log_context( const variant& v );\n variant to_variant()const;\n\n string get_file()const;\n uint64_t get_line_number()const;\n string get_method()const;\n string get_thread_name()const;\n string get_task_name()const;\n string get_host_name()const;\n time_point get_timestamp()const;\n log_level get_log_level()const;\n string get_context()const;\n\n void append_context( const fc::string& c );\n\n string to_string()const;\n private:\n std::shared_ptr<detail::log_context_impl> my;\n };\n\n void to_variant( const log_context& l, variant& v );\n void from_variant( const variant& l, log_context& c );\n\n /**\n * @brief aggregates a message along with the context and associated meta-information.\n * @ingroup AthenaSerializable\n *\n * @note log_message has reference semantics, all copies refer to the same log message\n * and the message is read-only after construction.\n *\n * When converted to JSON, log_message has the following form:\n * @code\n * {\n * \"context\" : { ... },\n * \"format\" : \"string with ${keys}\",\n * \"data\" : { \"keys\" : \"values\" }\n * }\n * @endcode\n *\n * @see FC_LOG_MESSAGE\n */\n class log_message\n {\n public:\n log_message();\n /**\n * @param ctx - generally provided using the FC_LOG_CONTEXT(LEVEL) macro \n */\n log_message( log_context ctx, std::string format, variant_object args = variant_object() );\n ~log_message();\n\n log_message( const variant& v );\n variant to_variant()const;\n \n string get_message()const;\n /**\n * A faster version of get_message which does limited formatting and excludes large variants\n * @return formatted message according to format and variant args\n */\n string get_limited_message()const;\n \n log_context get_context()const;\n string get_format()const;\n variant_object get_data()const;\n\n private:\n std::shared_ptr<detail::log_message_impl> my;\n };\n\n void to_variant( const log_message& l, variant& v );\n void from_variant( const variant& l, log_message& c );\n\n typedef std::vector<log_message> log_messages;\n\n\n} // namespace fc\n\nFC_REFLECT_TYPENAME( fc::log_message );\n\n#ifndef __func__\n#define __func__ __FUNCTION__\n#endif\n\n/**\n * @def FC_LOG_CONTEXT(LOG_LEVEL)\n * @brief Automatically captures the File, Line, and Method names and passes them to\n * the constructor of fc::log_context along with LOG_LEVEL\n * @param LOG_LEVEL - a valid log_level::Enum name.\n */\n#define FC_LOG_CONTEXT(LOG_LEVEL) \\\n fc::log_context( fc::log_level::LOG_LEVEL, __FILE__, __LINE__, __func__ )\n \n/**\n * @def FC_LOG_MESSAGE(LOG_LEVEL,FORMAT,...)\n *\n * @brief A helper method for generating log messages.\n *\n * @param LOG_LEVEL a valid log_level::Enum name to be passed to the log_context\n * @param FORMAT A const char* string containing zero or more references to keys as \"${key}\"\n * @param ... A set of key/value pairs denoted as (\"key\",val)(\"key2\",val2)...\n */\n#define FC_LOG_MESSAGE( LOG_LEVEL, FORMAT, ... ) \\\n fc::log_message( FC_LOG_CONTEXT(LOG_LEVEL), FORMAT, fc::mutable_variant_object()__VA_ARGS__ )\n\n"} +{"text": "fileFormatVersion: 2\nguid: 27c862f74a239bc4f996b8a8bbb971f5\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n defaultReferences: []\n executionOrder: 0\n icon: {instanceID: 0}\n userData: \n assetBundleName: \n assetBundleVariant: \n"} +{"text": "package com.jojoldu.springmockspybean.why.manager;\n\nimport lombok.Getter;\nimport lombok.NoArgsConstructor;\n\nimport javax.persistence.Entity;\nimport javax.persistence.GeneratedValue;\nimport javax.persistence.Id;\n\n/**\n * Created by jojoldu@gmail.com on 2017. 10. 1.\n * Blog : http://jojoldu.tistory.com\n * Github : https://github.com/jojoldu\n */\n\n@Getter\n@NoArgsConstructor\n@Entity\npublic class Manager {\n\n @Id\n @GeneratedValue\n private Long id;\n\n private String name;\n\n public Manager(String name) {\n this.name = name;\n }\n}\n"} +{"text": "# -*- coding: utf-8 -*-\n\nfrom yacs.config import CfgNode\n\nfrom .config import get_model_cfg\n\nfrom .builder import build_model\n\n\n__all__ = [\n 'get_model_cfg',\n 'build_model',\n]\n"} +{"text": "// Copyright (C) 2008 Davis E. King (davis@dlib.net)\n// License: Boost Software License See LICENSE.txt for the full license.\n#ifndef DLIB_STD_VECTOr_C_H_\n#define DLIB_STD_VECTOr_C_H_\n\n#include <vector>\n#include <algorithm>\n#include \"../assert.h\"\n#include \"std_vector_c_abstract.h\"\n#include \"../serialize.h\"\n#include \"../is_kind.h\"\n\nnamespace dlib\n{\n\n template <\n typename T,\n typename Allocator = std::allocator<T>\n >\n class std_vector_c : public std::vector<T,Allocator>\n {\n typedef typename std::vector<T,Allocator> base_type;\n public:\n // types:\n typedef typename Allocator::reference reference;\n typedef typename Allocator::const_reference const_reference;\n typedef typename base_type::iterator iterator; // See 23.1\n typedef typename base_type::const_iterator const_iterator; // See 23.1\n typedef typename base_type::size_type size_type; // See 23.1\n typedef typename base_type::difference_type difference_type;// See 23.1\n typedef T value_type;\n typedef Allocator allocator_type;\n typedef typename Allocator::pointer pointer;\n typedef typename Allocator::const_pointer const_pointer;\n typedef std::reverse_iterator<iterator> reverse_iterator;\n typedef std::reverse_iterator<const_iterator> const_reverse_iterator;\n\n\n // 23.2.4.1 construct/copy/destroy:\n explicit std_vector_c(const Allocator& alloc= Allocator()) : base_type(alloc) {}\n\n explicit std_vector_c(size_type n, const T& value = T(),\n const Allocator& alloc= Allocator()) : base_type(n, value, alloc) {}\n\n template <typename InputIterator>\n std_vector_c(InputIterator first, InputIterator last,\n const Allocator& alloc= Allocator()) : base_type(first,last,alloc) {}\n\n std_vector_c(const std::vector<T,Allocator>& x) : base_type(x) {}\n\n std_vector_c<T,Allocator>& operator=(const std::vector<T,Allocator>& x)\n {\n static_cast<base_type&>(*this) = x;\n return *this;\n }\n\n template <typename InputIterator>\n void assign(InputIterator first, InputIterator last) { base_type::assign(first,last); }\n void assign(size_type n, const T& u) { base_type::assign(n,u); }\n allocator_type get_allocator() const { return base_type::get_allocator(); }\n // iterators:\n iterator begin() { return base_type::begin(); }\n const_iterator begin() const { return base_type::begin(); }\n iterator end() { return base_type::end(); }\n const_iterator end() const { return base_type::end(); }\n reverse_iterator rbegin() { return base_type::rbegin(); }\n const_reverse_iterator rbegin() const { return base_type::rbegin(); }\n reverse_iterator rend() { return base_type::rend(); }\n const_reverse_iterator rend() const { return base_type::rend(); }\n // 23.2.4.2 capacity:\n size_type size() const { return base_type::size(); }\n size_type max_size() const { return base_type::max_size(); }\n void resize(size_type sz, T c = T()) { base_type::resize(sz,c); }\n size_type capacity() const { return base_type::capacity(); }\n bool empty() const { return base_type::empty(); }\n void reserve(size_type n) { base_type::reserve(n); }\n\n // element access:\n const_reference at(size_type n) const { return base_type::at(n); }\n reference at(size_type n) { return base_type::at(n); }\n\n\n // 23.2.4.3 modifiers:\n void push_back(const T& x) { base_type::push_back(x); }\n void swap(std_vector_c<T,Allocator>& x) { base_type::swap(x); }\n void clear() { base_type::clear(); }\n\n\n // ------------------------------------------------------\n // Things that have preconditions that should be checked.\n // ------------------------------------------------------\n\n reference operator[](\n size_type n\n ) \n { \n DLIB_CASSERT(n < size(),\n \"\\treference std_vector_c::operator[](n)\"\n << \"\\n\\tYou have supplied an invalid index\"\n << \"\\n\\tthis: \" << this\n << \"\\n\\tn: \" << n \n << \"\\n\\tsize(): \" << size()\n );\n return static_cast<base_type&>(*this)[n]; \n }\n\n // ------------------------------------------------------\n\n const_reference operator[](\n size_type n\n ) const \n { \n DLIB_CASSERT(n < size(),\n \"\\tconst_reference std_vector_c::operator[](n)\"\n << \"\\n\\tYou have supplied an invalid index\"\n << \"\\n\\tthis: \" << this\n << \"\\n\\tn: \" << n \n << \"\\n\\tsize(): \" << size()\n );\n return static_cast<const base_type&>(*this)[n]; \n }\n\n // ------------------------------------------------------\n\n reference front(\n ) \n { \n DLIB_CASSERT(size() > 0,\n \"\\treference std_vector_c::front()\"\n << \"\\n\\tYou can't call front() on an empty vector\"\n << \"\\n\\tthis: \" << this\n );\n return base_type::front(); \n }\n\n // ------------------------------------------------------\n\n const_reference front(\n ) const \n {\n DLIB_CASSERT(size() > 0,\n \"\\tconst_reference std_vector_c::front()\"\n << \"\\n\\tYou can't call front() on an empty vector\"\n << \"\\n\\tthis: \" << this\n );\n return base_type::front(); \n }\n\n // ------------------------------------------------------\n\n reference back(\n ) \n { \n DLIB_CASSERT(size() > 0,\n \"\\treference std_vector_c::back()\"\n << \"\\n\\tYou can't call back() on an empty vector\"\n << \"\\n\\tthis: \" << this\n );\n return base_type::back(); \n }\n\n // ------------------------------------------------------\n\n const_reference back(\n ) const \n { \n DLIB_CASSERT(size() > 0,\n \"\\tconst_reference std_vector_c::back()\"\n << \"\\n\\tYou can't call back() on an empty vector\"\n << \"\\n\\tthis: \" << this\n );\n return base_type::back(); \n }\n\n // ------------------------------------------------------\n\n void pop_back(\n ) \n { \n DLIB_CASSERT(size() > 0,\n \"\\tconst_reference std_vector_c::pop_back()\"\n << \"\\n\\tYou can't call pop_back() on an empty vector\"\n << \"\\n\\tthis: \" << this\n );\n base_type::pop_back(); \n }\n\n // ------------------------------------------------------\n\n iterator insert(\n iterator position, \n const T& x\n ) \n { \n DLIB_CASSERT( begin() <= position && position <= end(), \n \"\\titerator std_vector_c::insert(position,x)\"\n << \"\\n\\tYou have called insert() with an invalid position\"\n << \"\\n\\tthis: \" << this\n );\n return base_type::insert(position, x); \n }\n\n // ------------------------------------------------------\n\n void insert(\n iterator position, \n size_type n, \n const T& x\n ) \n { \n DLIB_CASSERT( begin() <= position && position <= end(), \n \"\\tvoid std_vector_c::insert(position,n,x)\"\n << \"\\n\\tYou have called insert() with an invalid position\"\n << \"\\n\\tthis: \" << this\n );\n base_type::insert(position, n, x); \n }\n\n // ------------------------------------------------------\n\n template <typename InputIterator>\n void insert(\n iterator position,\n InputIterator first, \n InputIterator last\n ) \n { \n DLIB_CASSERT( begin() <= position && position <= end(), \n \"\\tvoid std_vector_c::insert(position,first,last)\"\n << \"\\n\\tYou have called insert() with an invalid position\"\n << \"\\n\\tthis: \" << this\n );\n base_type::insert(position, first, last); \n }\n\n // ------------------------------------------------------\n\n iterator erase(\n iterator position\n ) \n { \n DLIB_CASSERT( begin() <= position && position < end(), \n \"\\titerator std_vector_c::erase(position)\"\n << \"\\n\\tYou have called erase() with an invalid position\"\n << \"\\n\\tthis: \" << this\n );\n return base_type::erase(position); \n }\n\n // ------------------------------------------------------\n\n iterator erase(\n iterator first, \n iterator last\n ) \n { \n DLIB_CASSERT( begin() <= first && first <= last && last <= end(),\n \"\\titerator std_vector_c::erase(first,last)\"\n << \"\\n\\tYou have called erase() with an invalid range of iterators\"\n << \"\\n\\tthis: \" << this\n );\n return base_type::erase(first,last); \n }\n\n // ------------------------------------------------------\n\n\n };\n\n// ----------------------------------------------------------------------------------------\n\n// Add these swaps just to make absolutely sure the specialized swap always gets called even\n// if the compiler is crappy and would otherwise mess it up.\n template <typename T, typename Allocator>\n void swap(std_vector_c<T,Allocator>& x, std_vector_c<T,Allocator>& y) { x.swap(y); }\n\n template <typename T, typename Allocator>\n void swap(std::vector<T,Allocator>& x, std_vector_c<T,Allocator>& y) { x.swap(y); }\n\n template <typename T, typename Allocator>\n void swap(std_vector_c<T,Allocator>& x, std::vector<T,Allocator>& y) { y.swap(x); }\n\n// ----------------------------------------------------------------------------------------\n\n template <typename T, typename alloc>\n void serialize (\n const std_vector_c<T,alloc>& item,\n std::ostream& out\n )\n {\n try\n { \n const unsigned long size = static_cast<unsigned long>(item.size());\n\n serialize(size,out); \n for (unsigned long i = 0; i < item.size(); ++i)\n serialize(item[i],out);\n }\n catch (serialization_error& e)\n { throw serialization_error(e.info + \"\\n while serializing object of type std_vector_c\"); }\n }\n\n// ----------------------------------------------------------------------------------------\n\n template <typename T, typename alloc>\n void deserialize (\n std_vector_c<T, alloc>& item,\n std::istream& in\n )\n {\n try \n { \n unsigned long size;\n deserialize(size,in); \n item.resize(size);\n for (unsigned long i = 0; i < size; ++i)\n deserialize(item[i],in);\n }\n catch (serialization_error& e)\n { throw serialization_error(e.info + \"\\n while deserializing object of type std_vector_c\"); }\n }\n\n// ----------------------------------------------------------------------------------------\n\n template <typename T, typename alloc> \n struct is_std_vector<std_vector_c<T,alloc> > { const static bool value = true; };\n\n// ----------------------------------------------------------------------------------------\n\n}\n\n#endif // DLIB_STD_VECTOr_C_H_\n\n"} +{"text": "{\n \"index_name\": \"ropensci-testrmd\",\n \"start_urls\": [\n {\n \"url\": \"https://docs.ropensci.org/testrmd/index.html\",\n \"selectors_key\": \"homepage\",\n \"tags\": [\n \"homepage\"\n ]\n },\n {\n \"url\": \"https://docs.ropensci.org/testrmd/reference\",\n \"selectors_key\": \"reference\",\n \"tags\": [\n \"reference\"\n ]\n },\n {\n \"url\": \"https://docs.ropensci.org/testrmd/articles\",\n \"selectors_key\": \"articles\",\n \"tags\": [\n \"articles\"\n ]\n }\n ],\n \"stop_urls\": [\n \"/reference/$\",\n \"/reference/index.html\",\n \"/articles/$\",\n \"/articles/index.html\"\n ],\n \"selectors\": {\n \"homepage\": {\n \"lvl0\": {\n \"selector\": \".contents h1\",\n \"default_value\": \"pkgdown Home page\"\n },\n \"lvl1\": \".contents h2\",\n \"lvl2\": {\n \"selector\": \".contents h3\",\n \"default_value\": \"Context\"\n },\n \"lvl3\": \".ref-arguments td, .ref-description\",\n \"text\": \".contents p, .contents li, .contents .pre\"\n },\n \"reference\": {\n \"lvl0\": \".contents h1\",\n \"lvl1\": {\n \"selector\": \".contents .name\",\n \"default_value\": \"Argument\"\n },\n \"lvl2\": {\n \"selector\": \".ref-arguments th\",\n \"default_value\": \"Description\"\n },\n \"lvl3\": \".ref-arguments td, .ref-description\",\n \"text\": \".contents p, .contents li\"\n },\n \"articles\": {\n \"lvl0\": \".contents h1\",\n \"lvl1\": \".contents .name\",\n \"lvl2\": {\n \"selector\": \".contents h2, .contents h3\",\n \"default_value\": \"Context\"\n },\n \"text\": \".contents p, .contents li\"\n },\n \"default\": {\n \"lvl1\": \".contents h2\",\n \"lvl2\": \".contents h3, .contents th\",\n \"lvl3\": \".contents h4\",\n \"lvl4\": \".contents h5\",\n \"text\": \".contents p, .contents li, .usage, .template-article .contents .pre\"\n }\n },\n \"selectors_exclude\": [\n \".dont-index\"\n ],\n \"sitemap_urls\": [\n \"https://docs.ropensci.org/testrmd/sitemap.xml\"\n ],\n \"custom_settings\": {\n \"separatorsToIndex\": \"_\",\n \"attributesToRetrieve\": [\n \"hierarchy\",\n \"content\",\n \"anchor\",\n \"url\",\n \"url_without_anchor\"\n ]\n },\n \"min_indexed_level\": 2,\n \"nb_hits\": 40\n}"} +{"text": "// This file is distributed under a BSD license. See LICENSE.txt for details.\n\n#include \"_types2.hpp\"\n\n\n/****************************************************************************/\n/****************************************************************************/\n\nvoid sGuiWindow2::SetMenuList(sGuiMenuList *l)\n{\n MenuList = l;\n}\n\nsBool sGuiWindow2::MenuListKey(sU32 key)\n{\n if(MenuList==0) return sFALSE;\n\n if(key&sKEYQ_SHIFT) key |= sKEYQ_SHIFT;\n if(key&sKEYQ_CTRL ) key |= sKEYQ_CTRL ;\n\n for(sInt i=0;MenuList[i].Kind!=sGML_END;i++)\n {\n if((key&(0x8001ffff|sKEYQ_SHIFT|sKEYQ_CTRL|sKEYQ_ALT))==MenuList[i].Shortcut)\n { \n OnCommand(MenuList[i].Command);\n return sTRUE;\n }\n }\n if(key==sKEY_APPPOPUP)\n PopupMenuList(1);\n return sFALSE;\n}\n\nvoid sGuiWindow2::PopupMenuList(sBool popup)\n{\n sMenuFrame *mf;\n sGuiMenuList *e;\n sInt state;\n\n if(MenuList==0) return;\n\n mf = new sMenuFrame;\n for(sInt i=0;MenuList[i].Kind;i++)\n {\n e = &MenuList[i];\n switch(e->Kind)\n {\n case sGML_COMMAND:\n if(e->Command && e->Name)\n mf->AddMenu(e->Name,e->Command,e->Shortcut);\n break;\n case sGML_CHECKMARK:\n if(e->Command && e->Name)\n {\n state = *(sInt *)( ( ((sU8 *)this) +e->Offset) );\n mf->AddCheck(e->Name,e->Command,e->Shortcut,state);\n }\n break;\n case sGML_SPACER:\n mf->AddSpacer();\n break;\n }\n }\n mf->AddBorder(new sNiceBorder);\n mf->SendTo = this;\n if(popup)\n sGui->AddPopup(mf);\n else\n sGui->AddPulldown(mf);\n}\n"} +{"text": "# To reproduce\n\n## Set up the cluster\n\n1. Login to https://metakube.syseleven.de/\n2. Press the \"Create Cluster\" button\n3. Choose aws provider and complete the create cluster wizard\n\nWhen the cluster is up and running,\n\n1. Download the kubeconfig file. \n2. Set the KUBECONFIG environment variable `export KUBECONFIG=$PWD/kubeconfig`.\n\n## Run the conformance test\n\n```\n$ curl -L https://raw.githubusercontent.com/cncf/k8s-conformance/master/sonobuoy-conformance.yaml | kubectl apply -f -\n\n$ kubectl logs -f -n sonobuoy sonobuoy\n\n\n$ kubectl cp sonobuoy/sonobuoy:/tmp/sonobuoy ./results\n\n$ untar the tarball, then add plugins/e2e/results/{e2e.log,junit_01.xml}\n```\n"} +{"text": "<!DOCTYPE html>\n<html class=\"reftest-wait\">\n<head>\n<style type=\"text/css\">\n#parent {\n min-height: 100px;\n margin-bottom: -20px;\n background-color: lightgreen;\n}\n#last-child {\n display: none;\n height: 110px;\n margin-bottom: -10px;\n background-color: green;\n}\n#separator {\n height: 20px;\n background-color: blue;\n}\n</style>\n<script type=\"text/javascript\">\nfunction test() {\n document.getElementById('last-child').style.display = 'block';\n document.documentElement.removeAttribute('class');\n}\ndocument.addEventListener('MozReftestInvalidate', test, false);\n</script>\n</head>\n<body>\n<div id=\"parent\">\n <div id=\"last-child\"></div>\n</div>\n<div id=\"separator\"></div>\n</body>\n</html>\n"} +{"text": "/*\n * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n *\n * This code is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License version 2 only, as\n * published by the Free Software Foundation. Oracle designates this\n * particular file as subject to the \"Classpath\" exception as provided\n * by Oracle in the LICENSE file that accompanied this code.\n *\n * This code is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * version 2 for more details (a copy is included in the LICENSE file that\n * accompanied this code).\n *\n * You should have received a copy of the GNU General Public License version\n * 2 along with this work; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n * or visit www.oracle.com if you need additional information or have any\n * questions.\n */\n\npackage java.lang.management;\n\n/**\n * The management interface for the operating system on which\n * the Java virtual machine is running.\n *\n * <p> A Java virtual machine has a single instance of the implementation\n * class of this interface. This instance implementing this interface is\n * an <a href=\"ManagementFactory.html#MXBean\">MXBean</a>\n * that can be obtained by calling\n * the {@link ManagementFactory#getOperatingSystemMXBean} method or\n * from the {@link ManagementFactory#getPlatformMBeanServer\n * platform MBeanServer} method.\n *\n * <p>The {@code ObjectName} for uniquely identifying the MXBean for\n * the operating system within an MBeanServer is:\n * <blockquote>\n * {@link ManagementFactory#OPERATING_SYSTEM_MXBEAN_NAME\n * java.lang:type=OperatingSystem}\n * </blockquote>\n *\n * It can be obtained by calling the\n * {@link PlatformManagedObject#getObjectName} method.\n *\n * <p> This interface defines several convenient methods for accessing\n * system properties about the operating system on which the Java\n * virtual machine is running.\n *\n * @see ManagementFactory#getPlatformMXBeans(Class)\n * @see <a href=\"../../../javax/management/package-summary.html\">\n * JMX Specification.</a>\n * @see <a href=\"package-summary.html#examples\">\n * Ways to Access MXBeans</a>\n *\n * @author Mandy Chung\n * @since 1.5\n */\npublic interface OperatingSystemMXBean extends PlatformManagedObject {\n /**\n * Returns the operating system name.\n * This method is equivalent to {@code System.getProperty(\"os.name\")}.\n *\n * @return the operating system name.\n *\n * @throws java.lang.SecurityException\n * if a security manager exists and its\n * <code>checkPropertiesAccess</code> method doesn't allow access\n * to this system property.\n * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)\n * @see java.lang.System#getProperty\n */\n public String getName();\n\n /**\n * Returns the operating system architecture.\n * This method is equivalent to {@code System.getProperty(\"os.arch\")}.\n *\n * @return the operating system architecture.\n *\n * @throws java.lang.SecurityException\n * if a security manager exists and its\n * <code>checkPropertiesAccess</code> method doesn't allow access\n * to this system property.\n * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)\n * @see java.lang.System#getProperty\n */\n public String getArch();\n\n /**\n * Returns the operating system version.\n * This method is equivalent to {@code System.getProperty(\"os.version\")}.\n *\n * @return the operating system version.\n *\n * @throws java.lang.SecurityException\n * if a security manager exists and its\n * <code>checkPropertiesAccess</code> method doesn't allow access\n * to this system property.\n * @see java.lang.SecurityManager#checkPropertyAccess(java.lang.String)\n * @see java.lang.System#getProperty\n */\n public String getVersion();\n\n /**\n * Returns the number of processors available to the Java virtual machine.\n * This method is equivalent to the {@link Runtime#availableProcessors()}\n * method.\n * <p> This value may change during a particular invocation of\n * the virtual machine.\n *\n * @return the number of processors available to the virtual\n * machine; never smaller than one.\n */\n public int getAvailableProcessors();\n\n /**\n * Returns the system load average for the last minute.\n * The system load average is the sum of the number of runnable entities\n * queued to the {@linkplain #getAvailableProcessors available processors}\n * and the number of runnable entities running on the available processors\n * averaged over a period of time.\n * The way in which the load average is calculated is operating system\n * specific but is typically a damped time-dependent average.\n * <p>\n * If the load average is not available, a negative value is returned.\n * <p>\n * This method is designed to provide a hint about the system load\n * and may be queried frequently.\n * The load average may be unavailable on some platform where it is\n * expensive to implement this method.\n *\n * @return the system load average; or a negative value if not available.\n *\n * @since 1.6\n */\n public double getSystemLoadAverage();\n}\n"} +{"text": "#!/bin/bash\n\n# Save current IFS state\n\nOLDIFS=$IFS\n\nIFS='.' read osvers_major osvers_minor osvers_dot_version <<< \"$(/usr/bin/sw_vers -productVersion)\"\n\n# restore IFS to previous state\n\nIFS=$OLDIFS\n\n# Checks to see if the OS on the Mac is 10.7.x or higher.\n# If it is not, the following message is displayed without quotes:\n#\n# \"NA\"\n#\n# NA stands for Not Applicable.\n\nif [[ ( ${osvers_major} -eq 10 && ${osvers_minor} -lt 7 ) ]]; then\n result=\"NA\"\nfi\n\nif [[ ( ${osvers_major} -eq 10 && ${osvers_minor} -ge 7 ) || ( ${osvers_major} -eq 11 && ${osvers_minor} -ge 0 ) ]]; then\n \n# Checks the Apple Push Notification Service certificate identifier\n# on Macs running 10.7.x or higher. If an Apple Push Notification \n# Service certificate identifier is not returned, the following message\n# is displayed without quotes:\n#\n# \"NA\"\n#\n# NA stands for Not Applicable.\n#\n# Otherwise the Apple Push Notification Service certificate identifier\n# is returned as the result.\n\n APNS_certificate=`/usr/sbin/system_profiler SPConfigurationProfileDataType | awk '/Topic/{ print $NF }' | sed 's/[\";]//g'`\n\n if [[ \"$APNS_certificate\" = \"\" ]]; then\n result=\"NA\"\n else\n result=\"$APNS_certificate\"\n fi\n\nfi\n\n/bin/echo \"$result\""} +{"text": "# MongoDB - Aula 02 - Exercício\nautor: JIMMY HARDY LISS\n\n## Criando uma database chamada be-mean-pokemons\n```\n> use be-mean-pokemons\nswitched to db be-mean-pokemons\n> db\nbe-mean-pokemons\n```\n## Listando databases nesse servidor\n```\n> show dbs\nbe-mean 0.005GB\nbe-mean-instagram 0.000GB\nlocal 0.000GB\n```\n## Listando coleções nessa database\n```\n> show collections\n>\n```\n## Inserindo 5 pokemons\n```\n> var pokemon = {name: \"Bulbasaur\", description: \"Bulbasaur can be seen napping in bright sunlight\", attack: 3, defense: 2, height: 2.04}\n> db.pokemons.insert(pokemon)\nWriteResult({ \"nInserted\" : 1 })\n> var pokemon = {name: \"Charmander\", description: \"The flame that burns at the tip of its tail is an indication of its emotions\", attack: 3, defense: 2, height: 2.00}\n> db.pokemons.insert(pokemon)\nWriteResult({ \"nInserted\" : 1 })\n> var pokemon = {name: \"Pidgeot\",description: \"This Pokémon has a dazzling plumage of beautifully glossy feathers.\",type: \"Normal\", attack:67, defense:69, height:1.5}\n> db.pokemons.insert(pokemon)\nWriteResult({ \"nInserted\" : 1 })\n> var pokemon = {name: \"Caterpie\", description: \"Caterpie has a voracious appetite. It can devour leaves bigger than its body right before your eyes. From its antenna, this Pokémon releases a terrific ally strong odor.\", attack: 200, defense: 200, height: 0.3}\n> db.pokemons.insert(pokemon)\nWriteResult({ \"nInserted\" : 1 })\n> var pokemon = {name: \"Abra\", description: \"Abra sleeps for eighteen hours a day. However, it can sense the presence of foes even while it is sleeping. In such a situation, this Pokémon immediately teleports to safety.\", attack: 100, defense: 100, height: 0.9}\n> db.pokemons.insert(pokemon)\nWriteResult({ \"nInserted\" : 1 })\n>\n```\n## Listando os pokemons da coleção\n```\n> db.pokemons.find()\n{ \"_id\" : ObjectId(\"57c03bc79511bc8d116874c2\"), \"name\" : \"Bulbasaur\", \"description\" : \"Bulbasaur can be seen napping in bright sunlight\", \"attack\" : 3, \"defense\" : 2, \"height\" : 2.04 }\n{ \"_id\" : ObjectId(\"57c03bfc9511bc8d116874c3\"), \"name\" : \"Charmander\", \"description\" : \"The flame that burns at the tip of its tail is an indication of its emotions\", \"attack\" : 3, \"defense\" : 2, \"height\" : 2 }\n{ \"_id\" : ObjectId(\"57c03c979511bc8d116874c4\"), \"name\" : \"Pidgeot\", \"description\" : \"This Pokémon has a dazzling plumage of beautifully glossy feathers.\", \"type\" : \"Normal\", \"attack\" : 67, \"defense\" : 69, \"height\" : 1.5 }\n{ \"_id\" : ObjectId(\"57c03d0b9511bc8d116874c5\"), \"name\" : \"Caterpie\", \"description\" : \"Caterpie has a voracious appetite. It can devour leaves bigger than its body right before your eyes. From its antenna, this Pokémon releases a terrifically strong odor.\", \"attack\" : 200, \"defense\" : 200, \"height\" : 0.3 }\n{ \"_id\" : ObjectId(\"57c03d3c9511bc8d116874c6\"), \"name\" : \"Abra\", \"description\" : \"Abra sleeps for eighteen hours a day. However, it can sense the presence of foes even while it is sleeping. In such a situation, this Pokémon immediately teleports to safety.\", \"attack\" : 100, \"defense\" : 100, \"height\" : 0.9 }\n>\n```\n## Buscando pokemons pelo nome e armazenando na variável _poke_\n```\n> var query = {name: \"Abra\"}\n> var poke = db.pokemons.findOne(query)\n> poke\n{\n \"_id\" : ObjectId(\"57c03d3c9511bc8d116874c6\"),\n \"name\" : \"Abra\",\n \"description\" : \"Abra sleeps for eighteen hours a day. However, it can sense the presence of foes even while it is sleeping. In such a situation, this Pokémon immediately teleports to safety.\"\n,\n \"attack\" : 100,\n \"defense\" : 100,\n \"height\" : 0.9\n}\n>\n```\n## Modificando a description e salvando\n```\n> poke.description = \"Abra dorme durante dezoito horas por dia. No entanto, ele pode sentir a presença de inimigos, mesmo enquanto ele está dormindo. Em tal situação, este Pokémon teletransporta imediatamente para ficar em segurança\"\nAbra dorme durante dezoito horas por dia. No entanto, ele pode sentir a presença de inimigos, mesmo enquanto ele está dormindo. Em tal situação, este Pokémon teletransporta imediatamente para ficar em segurança\n> db.pokemons.save(poke)\nWriteResult({ \"nMatched\" : 1, \"nUpserted\" : 0, \"nModified\" : 1 })\n>\n> poke\n{\n \"_id\" : ObjectId(\"57c03d3c9511bc8d116874c6\"),\n \"name\" : \"Abra\",\n \"description\" : \"Abra dorme durante dezoito horas por dia. No entanto, ele pode sentir a presença de inimigos, mesmo enquanto ele está dormindo. Em tal situação, este Pokémon teletransporta imediatamente para ficar em segurança\",\n \"attack\" : 100,\n \"defense\" : 100,\n \"height\" : 0.9\n}\n>\n```"} +{"text": "/** Used to match template delimiters. */\nvar reEvaluate = /<%([\\s\\S]+?)%>/g;\n\nmodule.exports = reEvaluate;\n"} +{"text": "#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>\n\n#include <CGAL/Delaunay_triangulation_3.h>\n#include <CGAL/natural_neighbor_coordinates_3.h>\n\n#include <fstream>\n#include <iostream>\n#include <iterator>\n#include <utility>\n#include <vector>\n\ntypedef double NT; //Number Type\n\ntypedef CGAL::Exact_predicates_inexact_constructions_kernel K;\n\ntypedef K::Point_3 Point3;\ntypedef K::Vector_3 Vector3;\ntypedef K::Sphere_3 Sphere_3;\n\ntypedef CGAL::Delaunay_triangulation_3<K, CGAL::Fast_location> Dh;\n\ntypedef Dh::Facet Facet;\ntypedef Dh::Vertex_handle Vertex_handle;\ntypedef Dh::Cell_handle Cell_handle;\ntypedef Dh::Finite_vertices_iterator Finite_vertices_iterator;\ntypedef Dh::Vertex_iterator Vertex_iterator;\ntypedef Dh::Facet_circulator Facet_circulator;\ntypedef Dh::Cell_iterator Cell_iterator;\n\ntypedef K::Construct_circumcenter_3 Construct_circumcenter_3;\n\nint main()\n{\n Dh triangulation;\n\n std::fstream iFile(\"data/points3\", std::ios::in);\n Point3 p;\n\n while ( iFile >> p )\n triangulation.insert(p);\n\n Point3 pp[3];\n std::cout << \"Consider the natural coordinates of P1, P2 and P3 with regard to the triangulation of data/points3 \" << std::endl;\n pp[0] = Point3(106.55,112.57,110.4); //inside data/points3 convex hull\n std::cout << \"P1 is inside the convex hull\" << std::endl;\n pp[1] = Point3(250,100,140); //on data/points3 convex hull\n std::cout << \"P2 is on a vertex of the triangulation\" << std::endl;\n pp[2] = Point3(0,0,0); //outside data/points3 convex hull\n std::cout << \"P2 is outside the convex hull\" << std::endl;\n\n for(int ii=0; ii<3; ++ii)\n {\n std::vector< std::pair< Vertex_handle,NT> > coor_laplace;\n std::vector< std::pair< Vertex_handle,NT> > coor_sibson;\n NT norm_coeff_laplace, norm_coeff_sibson;\n\n std::cout << \"Point P\" << ii+1 << \" : \" << pp[ii].x() << \" \"\n << pp[ii].y() << \" \"\n << pp[ii].z() << std::endl;\n\n laplace_natural_neighbor_coordinates_3(triangulation,pp[ii],\n std::back_inserter(coor_laplace),\n norm_coeff_laplace);\n\n std::cout << \"Linear combination of natural neighbors with Laplace natural coordinates\";\n std::cout << \" + correctness (ensured only with an exact number type supporting sqrt)\" << std::endl;\n std::cout << is_correct_natural_neighborhood(triangulation,pp[ii],\n coor_laplace.begin(),\n coor_laplace.end(),\n norm_coeff_laplace)\n << std::endl;\n\n sibson_natural_neighbor_coordinates_3(triangulation,pp[ii],\n std::back_inserter(coor_sibson),\n norm_coeff_sibson);\n\n std::cout << \"Linear combination of natural neighbors with Sibson natural coordinates\" << std::endl;\n std::cout << \" + correctness (ensured only with an exact number type)\" << std::endl;\n std::cout << is_correct_natural_neighborhood(triangulation,pp[ii],\n coor_sibson.begin(),\n coor_sibson.end(),\n norm_coeff_sibson)\n << std::endl;\n }\n\n return EXIT_SUCCESS;\n}\n"} +{"text": "/////////////////////////////////////////////////\r\n// Sigle Snapshot Graph Statistics\r\nint TGStat::NDiamRuns = 10;\r\nint TGStat::TakeSngVals = 100;\r\nconst TFltPrV TGStat::EmptyV = TFltPrV();\r\n\r\nbool TGStat::TCmpByVal::operator () (const TGStat& GS1, const TGStat& GS2) const {\r\n IAssertR(GS1.HasVal(ValCmp) && GS2.HasVal(ValCmp), TStr::Fmt(\"CmpVal: %d (%s)\", \r\n int(ValCmp), TGStat::GetValStr(ValCmp).CStr()).CStr());\r\n bool Res;\r\n if (ValCmp == gsvTime) { Res = GS1.Time < GS2.Time; }\r\n else { Res = GS1.GetVal(ValCmp) < GS2.GetVal(ValCmp); }\r\n if (SortAsc) { return Res; }\r\n else { return ! Res; }\r\n}\r\n\r\nbool TGStat::TCmpByVal::operator () (const PGStat& GS1, const PGStat& GS2) const {\r\n return operator()(*GS1, *GS2);\r\n}\r\n\r\nTGStat::TGStat(const TSecTm& GraphTm, const TStr& GraphName) :\r\n Time(GraphTm), GraphNm(GraphName), ValStatH(), DistrStatH() {\r\n}\r\n\r\nTGStat::TGStat(const PNGraph& Graph, const TSecTm& GraphTm, TFSet StatFSet, const TStr& GraphName) {\r\n TakeStat(Graph, GraphTm, StatFSet, GraphName);\r\n}\r\n\r\nTGStat::TGStat(const PUNGraph& Graph, const TSecTm& GraphTm, TFSet StatFSet, const TStr& GraphName) {\r\n TakeStat(Graph, GraphTm, StatFSet, GraphName);\r\n}\r\n\r\nTGStat::TGStat(const PNEGraph& Graph, const TSecTm& GraphTm, TFSet StatFSet, const TStr& GraphName) {\r\n TakeStat(Graph, GraphTm, StatFSet, GraphName);\r\n}\r\nTGStat::TGStat(const TGStat& GStat) : Time(GStat.Time), GraphNm(GStat.GraphNm),\r\n ValStatH(GStat.ValStatH), DistrStatH(GStat.DistrStatH) {\r\n}\r\n\r\nTGStat::TGStat(TSIn& SIn) : Time(SIn), GraphNm(SIn), ValStatH(SIn), DistrStatH(SIn) { }\r\n\r\nvoid TGStat::Save(TSOut& SOut) const {\r\n Time.Save(SOut); GraphNm.Save(SOut);\r\n ValStatH.Save(SOut); DistrStatH.Save(SOut);\r\n}\r\n\r\nTGStat& TGStat::operator = (const TGStat& GStat) {\r\n if (this != &GStat) {\r\n Time = GStat.Time;\r\n GraphNm = GStat.GraphNm;\r\n ValStatH = GStat.ValStatH;\r\n DistrStatH = GStat.DistrStatH;\r\n }\r\n return *this;\r\n}\r\n\r\nbool TGStat::operator == (const TGStat& GStat) const {\r\n return Time==GStat.Time && ValStatH==GStat.ValStatH && DistrStatH==GStat.DistrStatH;\r\n}\r\n\r\nbool TGStat::operator < (const TGStat& GStat) const {\r\n if (Time<GStat.Time) { return true; }\r\n if (Time>GStat.Time) { return false; }\r\n if (ValStatH.Empty() && ! GStat.ValStatH.Empty()) { return true; }\r\n if (GStat.ValStatH.Empty()) { return false; }\r\n for (int v = gsvTime; v < gsvMx; v++) {\r\n if (! ValStatH.IsKey(v) && ! GStat.ValStatH.IsKey(v)) { continue; }\r\n if (ValStatH.IsKey(v) && ! GStat.ValStatH.IsKey(v)) { return false; }\r\n if (! ValStatH.IsKey(v)) { return true; }\r\n if (ValStatH.GetDat(v) < GStat.ValStatH.GetDat(v)) { return true; }\r\n }\r\n return false;\r\n}\r\n\r\nbool TGStat::HasVal(const TGStatVal& StatVal) const {\r\n if (StatVal == gsvIndex) { return true; }\r\n if (StatVal == gsvTime) { return Time.IsDef(); }\r\n return ValStatH.IsKey(int(StatVal));\r\n}\r\n\r\ndouble TGStat::GetVal(const TGStatVal& StatVal) const {\r\n if (StatVal == gsvIndex) { return -1; }\r\n if (StatVal == gsvTime) { return Time.GetAbsSecs(); }\r\n if (! ValStatH.IsKey(int(StatVal))) { return -1.0; }\r\n return ValStatH.GetDat(int(StatVal));\r\n}\r\n\r\nvoid TGStat::SetVal(const TGStatVal& StatVal, const double& Val) {\r\n ValStatH.AddDat(int(StatVal), Val);\r\n}\r\n\r\nconst TFltPrV& TGStat::GetDistr(const TGStatDistr& Distr) const {\r\n if (! DistrStatH.IsKey(int(Distr))) { return EmptyV; }\r\n return DistrStatH.GetDat(int(Distr));\r\n}\r\n\r\nvoid TGStat::SetDistr(const TGStatDistr& Distr, const TFltPrV& FltPrV) {\r\n DistrStatH.AddDat(Distr, FltPrV);\r\n}\r\n\r\nvoid TGStat::GetDistr(const TGStatDistr& Distr, TFltPrV& FltPrV) const {\r\n FltPrV = GetDistr(Distr);\r\n}\r\n\r\nvoid TGStat::TakeStat(const PNGraph& Graph, const TSecTm& _Time, TFSet StatFSet, const TStr& GraphName) {\r\n printf(\"\\n===TakeStat: G(%u, %u) at %s\\n\", Graph->GetNodes(), Graph->GetEdges(), _Time.IsDef()?_Time.GetStr().CStr():\"\");\r\n TExeTm ExeTm, FullTm;\r\n Time = _Time;\r\n GraphNm = GraphName;\r\n if (StatFSet.In(gsvNone)) { return; }\r\n TakeBasicStat(Graph, false);\r\n TakeDiam(Graph, StatFSet, false);\r\n if (StatFSet.In(gsdWcc) || StatFSet.In(gsdWccHops) || StatFSet.In(gsvFullDiam) || StatFSet.In(gsvEffWccDiam) || StatFSet.In(gsvWccNodes) || StatFSet.In(gsvWccSrcNodes) || StatFSet.In(gsvWccDstNodes) || StatFSet.In(gsvWccEdges) || StatFSet.In(gsvWccUniqEdges) || StatFSet.In(gsvWccBiDirEdges)) {\r\n PNGraph WccGraph = TSnap::GetMxWcc(Graph);\r\n TakeBasicStat(WccGraph, true);\r\n TakeDiam(WccGraph, StatFSet, true);\r\n SetVal(gsvWccSize, WccGraph->GetNodes()/double(Graph->GetNodes()));\r\n }\r\n // strongly connected component\r\n TakeSccStat(Graph, StatFSet);\r\n // strongly connected component\r\n TakeBccStat(Graph, StatFSet);\r\n // degrees\r\n TakeDegDistr(Graph, StatFSet);\r\n // components\r\n TakeConnComp(Graph, StatFSet);\r\n // spectral\r\n TakeSpectral(Graph, StatFSet, -1);\r\n // clustering coeffient\r\n if (StatFSet.In(gsdClustCf) || StatFSet.In(gsvClustCf)) {\r\n TakeClustCf(Graph); }\r\n if (StatFSet.In(gsdTriadPart)) {\r\n TakeTriadPart(Graph); }\r\n printf(\"**[%s]\\n\", FullTm.GetTmStr());\r\n}\r\n\r\nvoid TGStat::TakeStat(const PUNGraph& Graph, const TSecTm& _Time, TFSet StatFSet, const TStr& GraphName) {\r\n printf(\"\\n===TakeStat: UG(%u, %u) at %s\\n\", Graph->GetNodes(), Graph->GetEdges(), _Time.IsDef()?_Time.GetStr().CStr():\"\");\r\n TExeTm ExeTm, FullTm;\r\n Time = _Time;\r\n GraphNm = GraphName;\r\n if (StatFSet.In(gsvNone)) { return; }\r\n TakeBasicStat(Graph, false);\r\n TakeDiam(Graph, StatFSet, false);\r\n if (StatFSet.In(gsdWcc) || StatFSet.In(gsdWccHops) || StatFSet.In(gsvFullDiam) || StatFSet.In(gsvEffWccDiam) || StatFSet.In(gsvWccNodes) || StatFSet.In(gsvWccSrcNodes) || StatFSet.In(gsvWccDstNodes) || StatFSet.In(gsvWccEdges) || StatFSet.In(gsvWccUniqEdges) || StatFSet.In(gsvWccBiDirEdges)) {\r\n PUNGraph WccGraph = TSnap::GetMxWcc(Graph);\r\n TakeBasicStat(WccGraph, true);\r\n TakeDiam(WccGraph, StatFSet, true);\r\n SetVal(gsvWccSize, WccGraph->GetNodes()/double(Graph->GetNodes()));\r\n }\r\n // strongly connected component\r\n //TakeSccStat(Graph, StatFSet);\r\n // strongly connected component\r\n TakeBccStat(Graph, StatFSet);\r\n // degrees\r\n TakeDegDistr(Graph, StatFSet);\r\n // components\r\n TakeConnComp(Graph, StatFSet);\r\n // spectral\r\n //TakeSpectral(Graph, StatFSet, -1);\r\n // clustering coeffient\r\n if (StatFSet.In(gsdClustCf) || StatFSet.In(gsvClustCf)) {\r\n TakeClustCf(Graph); }\r\n if (StatFSet.In(gsdTriadPart)) {\r\n TakeTriadPart(Graph); }\r\n printf(\"**[%s]\\n\", FullTm.GetTmStr());\r\n}\r\n\r\nvoid TGStat::TakeSpectral(const PNGraph& Graph, const int _TakeSngVals) {\r\n TakeSpectral(Graph, TFSet() | gsdSngVal | gsdSngVec, _TakeSngVals);\r\n}\r\n\r\nvoid TGStat::TakeSpectral(const PNGraph& Graph, TFSet StatFSet, int _TakeSngVals) {\r\n TExeTm ExeTm;\r\n if (_TakeSngVals == -1) { _TakeSngVals = TakeSngVals; }\r\n // singular values, vectors\r\n if (StatFSet.In(gsdSngVal)) {\r\n printf(\"sing-vals...\"); \r\n const int SngVals = TMath::Mn(_TakeSngVals, Graph->GetNodes()/2);\r\n TFltV SngValV1;\r\n TSnap::GetSngVals(Graph, SngVals, SngValV1);\r\n SngValV1.Sort(false);\r\n TFltPrV& SngValV = DistrStatH.AddDat(gsdSngVal);\r\n SngValV.Gen(SngValV1.Len(), 0);\r\n for (int i = 0; i < SngValV1.Len(); i++) {\r\n SngValV.Add(TFltPr(i+1, SngValV1[i]));\r\n }\r\n printf(\"[%s] \", ExeTm.GetTmStr());\r\n }\r\n if (StatFSet.In(gsdSngVec)) {\r\n printf(\"sing-vec...\"); \r\n TFltV LeftV, RightV;\r\n TSnap::GetSngVec(Graph, LeftV, RightV);\r\n LeftV.Sort(false);\r\n TFltPrV& SngVec = DistrStatH.AddDat(gsdSngVec);\r\n SngVec.Gen(LeftV.Len(), 0);\r\n for (int i = 0; i < TMath::Mn(Kilo(10), LeftV.Len()/2); i++) {\r\n if (LeftV[i] > 0) { SngVec.Add(TFltPr(i+1, LeftV[i])); }\r\n }\r\n printf(\"[%s] \", ExeTm.GetTmStr());\r\n }\r\n}\r\n\r\nvoid TGStat::Plot(const TGStatDistr& Distr, const TStr& FNmPref, TStr Desc, bool PowerFit) const {\r\n if (Desc.Empty()) Desc = FNmPref.GetUc();\r\n if (! HasDistr(Distr) || Distr==gsdUndef || Distr==gsdMx) { return; }\r\n TPlotInfo Info = GetPlotInfo(Distr);\r\n TGnuPlot GnuPlot(Info.Val1+TStr(\".\")+FNmPref, TStr::Fmt(\"%s. G(%d, %d)\", Desc.CStr(), GetNodes(),GetEdges()));\r\n GnuPlot.SetXYLabel(Info.Val2, Info.Val3);\r\n GnuPlot.SetScale(Info.Val4);\r\n const int plotId = GnuPlot.AddPlot(GetDistr(Distr), gpwLinesPoints, \"\");\r\n if (PowerFit) { GnuPlot.AddPwrFit(plotId, gpwLines); }\r\n #ifdef GLib_MACOSX\r\n GnuPlot.SaveEps();\r\n #else\r\n GnuPlot.SavePng();\r\n #endif\r\n}\r\n\r\nvoid TGStat::Plot(const TFSet& FSet, const TStr& FNmPref, const TStr& Desc, bool PowerFit) const {\r\n for (int d = gsdUndef; d < gsdMx; d++) {\r\n const TGStatDistr Distr = TGStatDistr(d);\r\n if (! FSet.In(Distr)) { continue; }\r\n Plot(Distr, FNmPref, Desc, PowerFit);\r\n }\r\n}\r\n\r\nvoid TGStat::PlotAll(const TStr& FNmPref, TStr Desc, bool PowerFit) const {\r\n for (int d = gsdUndef; d < gsdMx; d++) {\r\n const TGStatDistr Distr = TGStatDistr(d);\r\n Plot(Distr, FNmPref, Desc, PowerFit);\r\n }\r\n}\r\n\r\nvoid TGStat::DumpValStat() {\r\n for (int val = gsvNone; val < gsvMx; val++) {\r\n const TGStatVal Val = TGStatVal(val);\r\n if (! HasVal(Val)) { continue; }\r\n printf(\" %s\\t%g\\n\", GetValStr(Val).CStr(), GetVal(Val));\r\n }\r\n}\r\n\r\nvoid TGStat::AvgGStat(const PGStatVec& GStatVec, const bool& ClipAt1) {\r\n AvgGStat(GStatVec->GetGStatV(), ClipAt1);\r\n}\r\n\r\nvoid TGStat::AvgGStat(const TGStatV& GStatV, const bool& ClipAt1) {\r\n if (GStatV.Empty()) return;\r\n Time = GStatV[0]->Time;\r\n GraphNm = GStatV[0]->GraphNm;\r\n // values\r\n for (int statVal = 0; statVal > gsvMx; statVal++) {\r\n const TGStatVal GStatVal = TGStatVal(statVal);\r\n TMom Mom;\r\n for (int i = 0; i < GStatV.Len(); i++) {\r\n if (GStatV[i]->HasVal(GStatVal)) {\r\n Mom.Add(GStatV[i]->GetVal(GStatVal)); }\r\n }\r\n Mom.Def();\r\n if (Mom.IsUsable()) {\r\n IAssert(Mom.GetVals() == GStatV.Len()); // all must have the value\r\n SetVal(GStatVal, Mom.GetMean());\r\n }\r\n }\r\n // distributions\r\n for (int distr = gsdUndef; distr < gsdMx; distr++) {\r\n const TGStatDistr GStatDistr = TGStatDistr(distr);\r\n THash<TFlt, TFlt> ValToSumH;\r\n int DistrCnt = 0;\r\n for (int i = 0; i < GStatV.Len(); i++) {\r\n if (GStatV[i]->HasDistr(GStatDistr)) {\r\n const TFltPrV& D = GStatV[i]->GetDistr(GStatDistr);\r\n for (int d = 0; d < D.Len(); d++) {\r\n ValToSumH.AddDat(D[d].Val1) += D[d].Val2; }\r\n DistrCnt++;\r\n }\r\n }\r\n IAssert(DistrCnt==0 || DistrCnt==GStatV.Len()); // all must have distribution\r\n TFltPrV AvgStatV;\r\n ValToSumH.GetKeyDatPrV(AvgStatV); AvgStatV.Sort();\r\n for (int i = 0; i < AvgStatV.Len(); i++) {\r\n AvgStatV[i].Val2 /= double(DistrCnt);\r\n if (ClipAt1 && AvgStatV[i].Val2 < 1) { AvgStatV[i].Val2 = 1; }\r\n }\r\n SetDistr(GStatDistr, AvgStatV);\r\n }\r\n}\r\n\r\nTStr TGStat::GetDistrStr(const TGStatDistr& Distr) {\r\n switch (Distr) {\r\n case gsdUndef : return TStr(\"Undef\");\r\n case gsdInDeg : return \"InDeg\";\r\n case gsdOutDeg : return \"OutDeg\";\r\n case gsdWcc : return \"WccDist\";\r\n case gsdScc : return \"SccDist\";\r\n case gsdHops : return \"Hops\";\r\n case gsdWccHops : return \"WccHops\";\r\n case gsdSngVal : return \"SngVal\";\r\n case gsdSngVec : return \"SngVec\";\r\n case gsdClustCf : return \"ClustCf\";\r\n case gsdTriadPart : return \"TriadPart\";\r\n case gsdMx: return TStr(\"Mx\");\r\n default: Fail; return TStr();\r\n };\r\n}\r\n\r\nTStr TGStat::GetValStr(const TGStatVal& Val) {\r\n static TIntStrH ValTyStrH;\r\n if (ValTyStrH.Empty()) {\r\n ValTyStrH.AddDat(gsvNone, \"None\");\r\n ValTyStrH.AddDat(gsvIndex, \"Index\");\r\n ValTyStrH.AddDat(gsvTime, \"Time\");\r\n ValTyStrH.AddDat(gsvNodes, \"Nodes\");\r\n ValTyStrH.AddDat(gsvZeroNodes, \"ZeroNodes\");\r\n ValTyStrH.AddDat(gsvNonZNodes, \"NonZNodes\");\r\n ValTyStrH.AddDat(gsvSrcNodes, \"SrcNodes\");\r\n ValTyStrH.AddDat(gsvDstNodes, \"DstNodes\");\r\n ValTyStrH.AddDat(gsvEdges, \"Edges\");\r\n ValTyStrH.AddDat(gsvUniqEdges, \"UniqEdges\");\r\n ValTyStrH.AddDat(gsvBiDirEdges, \"BiDirEdges\");\r\n ValTyStrH.AddDat(gsvWccNodes, \"WccNodes\");\r\n ValTyStrH.AddDat(gsvWccSrcNodes, \"WccSrcNodes\");\r\n ValTyStrH.AddDat(gsvWccDstNodes, \"WccDstNodes\");\r\n ValTyStrH.AddDat(gsvWccEdges, \"WccEdges\");\r\n ValTyStrH.AddDat(gsvWccUniqEdges, \"WccUniqEdges\");\r\n ValTyStrH.AddDat(gsvWccBiDirEdges, \"WccBiDirEdges\");\r\n ValTyStrH.AddDat(gsvSccNodes, \"SccNodes\");\r\n ValTyStrH.AddDat(gsvSccEdges, \"SccEdges\");\r\n ValTyStrH.AddDat(gsvBccNodes, \"BccNodes\");\r\n ValTyStrH.AddDat(gsvBccEdges, \"BccEdges\");\r\n ValTyStrH.AddDat(gsvFullDiam, \"FullDiam\");\r\n ValTyStrH.AddDat(gsvEffDiam, \"EffDiam\");\r\n ValTyStrH.AddDat(gsvEffWccDiam, \"EffWccDiam\");\r\n ValTyStrH.AddDat(gsvFullWccDiam, \"FullWccDiam\");\r\n ValTyStrH.AddDat(gsvFullDiamDev, \"FullDiamDev\");\r\n ValTyStrH.AddDat(gsvEffDiamDev, \"EffDiamDev\");\r\n ValTyStrH.AddDat(gsvEffWccDiamDev, \"EffWccDiamDev\");\r\n ValTyStrH.AddDat(gsvFullWccDiamDev, \"FullWccDiamDev\");\r\n ValTyStrH.AddDat(gsvClustCf, \"ClustCf\");\r\n ValTyStrH.AddDat(gsvOpenTriads, \"OpenTr\");\r\n ValTyStrH.AddDat(gsvClosedTriads, \"ClosedTr\");\r\n ValTyStrH.AddDat(gsvWccSize, \"WccSize\");\r\n ValTyStrH.AddDat(gsvSccSize, \"SccSize\");\r\n ValTyStrH.AddDat(gsvBccSize, \"BccSize\");\r\n ValTyStrH.AddDat(gsvMx, \"Mx\");\r\n }\r\n IAssert(ValTyStrH.IsKey(int(Val)));\r\n return ValTyStrH.GetDat(int(Val));\r\n}\r\n\r\nTGStat::TPlotInfo TGStat::GetPlotInfo(const TGStatVal& Val) {\r\n //switch (Distr) {\r\n //case gsdUndef : Fail; return TPlotInfo();\r\n Fail;\r\n return TPlotInfo();\r\n}\r\n\r\nTGStat::TPlotInfo TGStat::GetPlotInfo(const TGStatDistr& Distr) {\r\n switch (Distr) {\r\n case gsdUndef : Fail; return TPlotInfo();\r\n case gsdInDeg : return TPlotInfo(\"inDeg\", \"In-degree, k\", \"Count\", gpsLog10XY);\r\n case gsdOutDeg : return TPlotInfo(\"outDeg\", \"Out-degree, k\", \"Count\", gpsLog10XY);\r\n case gsdWcc : return TPlotInfo(\"wcc\", \"WCC size\", \"Count\", gpsLog10XY);\r\n case gsdScc : return TPlotInfo(\"scc\", \"SCC size\", \"Count\", gpsLog10XY);\r\n case gsdHops : return TPlotInfo(\"hop\", \"Number of hops, h\", \"Reachable pairs of nodes inside h hops\", gpsLog10Y);\r\n case gsdWccHops : return TPlotInfo(\"wccHop\", \"Number of hops, h\", \"Reachable pairs of nodes inside h hops in WCC\", gpsLog10Y);\r\n case gsdSngVal : return TPlotInfo(\"sval\", \"Rank\", \"Singular value\", gpsLog10XY);\r\n case gsdSngVec : return TPlotInfo(\"svec\", \"Rank\", \"Left singular vector\", gpsLog10XY);\r\n case gsdClustCf : return TPlotInfo(\"ccf\", \"Degree, k\", \"Clustering coefficient, <C(k)>\", gpsLog10XY);\r\n case gsdTriadPart : return TPlotInfo(\"triad\", \"Number of triads adjacent to a node\", \"Number of such nodes\", gpsLog10XY);\r\n case gsdMx : Fail;\r\n default: Fail; return TPlotInfo();\r\n };\r\n}\r\n\r\nTFSet TGStat::NoStat() {\r\n return TFSet() | gsvNone;\r\n}\r\n\r\nTFSet TGStat::BasicStat() {\r\n return TFSet();\r\n}\r\n\r\nTFSet TGStat::DegDStat() {\r\n return TFSet() | gsdInDeg | gsdOutDeg;\r\n}\r\n\r\nTFSet TGStat::NoDiamStat() {\r\n return TFSet() | gsdInDeg | gsdOutDeg | gsdWcc | gsdScc;\r\n}\r\n\r\nTFSet TGStat::NoDistrStat() {\r\n return TFSet() | gsdHops | gsdWccHops;\r\n}\r\n\r\nTFSet TGStat::NoSvdStat() {\r\n return TFSet() | gsdInDeg | gsdOutDeg | gsdWcc | gsdScc |\r\n gsdHops | gsdWccHops | gsdClustCf | gsdTriadPart;\r\n}\r\n\r\nTFSet TGStat::AllStat() {\r\n return TFSet() | gsdInDeg | gsdOutDeg | gsdWcc | gsdScc\r\n | gsdHops | gsdWccHops | gsdClustCf | gsdTriadPart \r\n | gsdSngVec | gsdSngVal | gsvFullDiam;\r\n}\r\n\r\n/////////////////////////////////////////////////\r\n// Graph Growth Statistics\r\nuint TGStatVec::MinNodesEdges = 10;\r\n\r\nTGStatVec::TGStatVec(const TTmUnit& _TmUnit) : TmUnit(_TmUnit), StatFSet(), GStatV() {\r\n StatFSet = TGStat::AllStat();\r\n}\r\n\r\nTGStatVec::TGStatVec(const TTmUnit& _TmUnit, const TFSet& TakeGrowthStat) :\r\n TmUnit(_TmUnit), StatFSet(TakeGrowthStat), GStatV() {\r\n}\r\n\r\nTGStatVec::TGStatVec(const TGStatVec& GStat) :\r\n TmUnit(GStat.TmUnit), StatFSet(GStat.StatFSet), GStatV(GStat.GStatV) {\r\n}\r\n\r\nTGStatVec::TGStatVec(TSIn& SIn) : TmUnit((TTmUnit) TInt(SIn).Val), StatFSet(SIn), GStatV(SIn) {\r\n}\r\n\r\nPGStatVec TGStatVec::New(const TTmUnit& _TmUnit) {\r\n return new TGStatVec(_TmUnit);\r\n}\r\n\r\nPGStatVec TGStatVec::New(const TTmUnit& _TmUnit, const TFSet& TakeGrowthStat) {\r\n return new TGStatVec(_TmUnit, TakeGrowthStat);\r\n}\r\n\r\nvoid TGStatVec::Save(TSOut& SOut) const {\r\n TInt(TmUnit).Save(SOut);\r\n StatFSet.Save(SOut);\r\n GStatV.Save(SOut);\r\n}\r\n\r\nTGStatVec& TGStatVec::operator = (const TGStatVec& GStat) {\r\n if (this != &GStat) {\r\n TmUnit = GStat.TmUnit;\r\n StatFSet = GStat.StatFSet;\r\n GStatV = GStat.GStatV;\r\n }\r\n return *this;\r\n}\r\n\r\nPGStat TGStatVec::Add() {\r\n GStatV.Add(TGStat::New());\r\n return GStatV.Last();\r\n}\r\n\r\nPGStat TGStatVec::Add(const TSecTm& Time, const TStr& GraphNm) {\r\n GStatV.Add(TGStat::New(Time, GraphNm));\r\n return GStatV.Last();\r\n}\r\n\r\nvoid TGStatVec::Add(const PNGraph& Graph, const TSecTm& Time, const TStr& GraphNm) {\r\n if (Graph->GetNodes() < (int) TGStatVec::MinNodesEdges) {\r\n printf(\" ** TGStatVec::Add: graph too small (%d nodes).SKIP\\n\", Graph->GetNodes());\r\n return;\r\n }\r\n Add(TGStat::New(Graph, Time, StatFSet, GraphNm));\r\n}\r\n\r\nvoid TGStatVec::Add(const PUNGraph& Graph, const TSecTm& Time, const TStr& GraphNm) {\r\n if (Graph->GetNodes() < (int) TGStatVec::MinNodesEdges) {\r\n printf(\" ** TGStatVec::Add: graph too small (%d nodes).SKIP\\n\", Graph->GetNodes());\r\n return;\r\n }\r\n Add(TGStat::New(Graph, Time, StatFSet, GraphNm));\r\n}\r\n\r\nvoid TGStatVec::Add(const PNEGraph& Graph, const TSecTm& Time, const TStr& GraphNm) {\r\n if (Graph->GetNodes() < (int) TGStatVec::MinNodesEdges) {\r\n printf(\" ** TGStatVec::Add: graph too small (%d nodes).SKIP\\n\", Graph->GetNodes());\r\n return;\r\n }\r\n Add(TGStat::New(Graph, Time, StatFSet, GraphNm));\r\n}\r\n\r\nvoid TGStatVec::Sort(const TGStatVal& SortBy, const bool& Asc) {\r\n GStatV.SortCmp(TGStat::TCmpByVal(SortBy, Asc));\r\n}\r\n\r\nvoid TGStatVec::DelBefore(const TSecTm& Tm) {\r\n TGStatV NewTickV;\r\n for (int i = 0; i < Len(); i++) {\r\n if (At(i)->Time >= Tm) { NewTickV.Add(At(i)); }\r\n }\r\n GStatV.Swap(NewTickV);\r\n}\r\n\r\nvoid TGStatVec::DelAfter(const TSecTm& Tm) {\r\n TGStatV NewTickV;\r\n for (int i = 0; i < Len(); i++) {\r\n if (At(i)->Time <= Tm) { NewTickV.Add(At(i)); }\r\n }\r\n GStatV.Swap(NewTickV);\r\n}\r\n\r\nvoid TGStatVec::DelSmallNodes(const int& MinNodes) {\r\n TGStatV NewTickV;\r\n for (int i = 0; i < Len(); i++) {\r\n if (At(i)->GetNodes() >= MinNodes) { NewTickV.Add(At(i)); }\r\n }\r\n GStatV.Swap(NewTickV);\r\n}\r\n\r\nvoid TGStatVec::GetValV(const TGStatVal& XVal, const TGStatVal& YVal, TFltPrV& ValV) const {\r\n ValV.Gen(Len(), 0);\r\n double x;\r\n for (int t = 0; t < Len(); t++) {\r\n if (XVal == gsvIndex) { x = t+1; }\r\n else if (XVal == gsvTime) { x = GetTime(t); }\r\n else { x = At(t)->GetVal(XVal); }\r\n ValV.Add(TFltPr(x, At(t)->GetVal(YVal)));\r\n }\r\n ValV.Sort(true); // sort by ascending x value\r\n}\r\n\r\nPGStat TGStatVec::GetAvgGStat(const bool& ClipAt1) {\r\n PGStat Stat = TGStat::New();\r\n Stat->AvgGStat(GStatV, ClipAt1);\r\n return Stat;\r\n}\r\n\r\nvoid TGStatVec::Plot(const TGStatVal& XVal, const TGStatVal& YVal, const TStr& OutFNm, TStr& Desc, const TGpScaleTy& Scale,const bool& PowerFit) const {\r\n if (! Last()->HasVal(XVal) || ! Last()->HasVal(YVal)) {\r\n if (! Last()->HasVal(XVal)) { printf(\"** Does not have %s statistic\\n\", TGStat::GetValStr(XVal).CStr()); }\r\n if (! Last()->HasVal(YVal)) { printf(\"** Does not have %s statistic\\n\", TGStat::GetValStr(YVal).CStr()); }\r\n return;\r\n }\r\n if (Desc.Empty()) { Desc = OutFNm; }\r\n TFltPrV ValV;\r\n TGStatVec::GetValV(XVal, YVal, ValV);\r\n TGnuPlot GP(TStr::Fmt(\"%s-%s.%s\", TGStat::GetValStr(XVal).CStr(), TGStat::GetValStr(YVal).CStr(), OutFNm.CStr()),\r\n TStr::Fmt(\"%s. %s vs. %s. G(%d,%d)\", Desc.CStr(), TGStat::GetValStr(XVal).CStr(), TGStat::GetValStr(YVal).CStr(),\r\n Last()->GetNodes(), Last()->GetEdges()));\r\n GP.SetScale(Scale);\r\n GP.SetXYLabel(TGStat::GetValStr(XVal), TGStat::GetValStr(YVal));\r\n const int Id = GP.AddPlot(ValV, gpwLinesPoints);\r\n if (PowerFit) { GP.AddPwrFit(Id); }\r\n GP.SavePng();\r\n}\r\n\r\nvoid TGStatVec::PlotAllVsX(const TGStatVal& XVal, const TStr& OutFNm, TStr Desc, const TGpScaleTy& Scale, const bool& PowerFit) const {\r\n const TFSet SkipStat = TFSet() | gsvFullDiamDev | gsvEffDiamDev | gsvEffWccDiamDev | gsvFullWccDiamDev;\r\n for (int stat = gsvNone; stat < gsvMx; stat++) {\r\n const TGStatVal Stat = TGStatVal(stat);\r\n if (SkipStat.In(Stat)) { continue; }\r\n if (Last()->HasVal(Stat) && Last()->HasVal(XVal) && Stat!=XVal) {\r\n Plot(XVal, Stat, OutFNm, Desc, Scale, PowerFit);\r\n }\r\n }\r\n}\r\n\r\nvoid TGStatVec::ImposeDistr(const TGStatDistr& Distr, const TStr& FNmPref, TStr Desc, const bool& ExpBin, \r\n const bool& PowerFit, const TGpSeriesTy& PlotWith, const TStr& Style) const {\r\n if (Desc.Empty()) Desc = FNmPref.GetUc();\r\n if (! At(0)->HasDistr(Distr) || Distr==gsdUndef || Distr==gsdMx) { return; }\r\n TGStat::TPlotInfo Info = At(0)->GetPlotInfo(Distr);\r\n TGnuPlot GnuPlot(Info.Val1+TStr(\".\")+FNmPref, TStr::Fmt(\"%s. G(%d, %d) --> G(%d, %d)\", Desc.CStr(),\r\n At(0)->GetNodes(), At(0)->GetEdges(), Last()->GetNodes(), Last()->GetEdges()));\r\n GnuPlot.SetXYLabel(Info.Val2, Info.Val3);\r\n GnuPlot.SetScale(Info.Val4);\r\n int plotId;\r\n for (int at = 0; at < Len(); at++) {\r\n TStr Legend = At(at)->GetNm();\r\n if (Legend.Empty()) { Legend = At(at)->GetTmStr(); }\r\n if (! ExpBin) { \r\n plotId = GnuPlot.AddPlot(At(at)->GetDistr(Distr), PlotWith, Legend, Style); }\r\n else { \r\n TFltPrV ExpBinV; \r\n TGnuPlot::MakeExpBins(At(at)->GetDistr(Distr), ExpBinV, 2, 0);\r\n plotId = GnuPlot.AddPlot(ExpBinV, PlotWith, Legend, Style);\r\n }\r\n if (PowerFit) { GnuPlot.AddPwrFit(plotId, gpwLines); }\r\n }\r\n GnuPlot.SavePng();\r\n}\r\n\r\nvoid TGStatVec::SaveTxt(const TStr& FNmPref, const TStr& Desc) const {\r\n FILE *F = fopen(TStr::Fmt(\"growth.%s.tab\", FNmPref.CStr()).CStr(), \"wt\");\r\n fprintf(F, \"# %s\\n\", Desc.CStr());\r\n fprintf(F, \"# %s\", TTmInfo::GetTmUnitStr(TmUnit).CStr());\r\n TIntSet StatValSet;\r\n for (int i = 0; i < Len(); i++) {\r\n for (int v = gsvNone; v < gsvMx; v++) {\r\n if (At(i)->HasVal(TGStatVal(v))) { StatValSet.AddKey(v); }\r\n }\r\n }\r\n TIntV StatValV; StatValSet.GetKeyV(StatValV); StatValV.Sort();\r\n for (int sv = 0; sv < StatValV.Len(); sv++) {\r\n fprintf(F, \"\\t%s\", TGStat::GetValStr(TGStatVal(StatValV[sv].Val)).CStr()); }\r\n fprintf(F, \"Time\\n\");\r\n for (int i = 0; i < Len(); i++) {\r\n const TGStat& G = *At(i);\r\n for (int sv = 0; sv < StatValV.Len(); sv++) {\r\n fprintf(F, \"%g\\t\", G.GetVal(TGStatVal(StatValV[sv].Val))); }\r\n fprintf(F, \"%s\\n\", G.GetTmStr().CStr());\r\n }\r\n fclose(F);\r\n}\r\n"} +{"text": "<?php\n/**\n * CoreShop.\n *\n * This source file is subject to the GNU General Public License version 3 (GPLv3)\n * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt\n * files that are distributed with this source code.\n *\n * @copyright Copyright (c) 2015-2020 Dominik Pfaffenbauer (https://www.pfaffenbauer.at)\n * @license https://www.coreshop.org/license GNU General Public License version 3 (GPLv3)\n */\n\ndeclare(strict_types=1);\n\nnamespace CoreShop\\Component\\Resource\\Model;\n\nuse Doctrine\\Common\\Collections\\ArrayCollection;\nuse Doctrine\\Common\\Collections\\Collection;\nuse Doctrine\\ORM\\PersistentCollection;\n\ntrait TranslatableTrait\n{\n /**\n * @var ArrayCollection|PersistentCollection|TranslationInterface[]\n */\n protected $translations;\n\n /**\n * @var array|TranslationInterface[]\n */\n protected $translationsCache = [];\n\n /**\n * @var string\n */\n protected $currentLocale;\n\n /**\n * Cache current translation. Useful in Doctrine 2.4+.\n *\n * @var TranslationInterface\n */\n protected $currentTranslation;\n\n /**\n * @var string\n */\n protected $fallbackLocale;\n\n public function __construct()\n {\n $this->initializeTranslationCollection();\n }\n\n protected function initializeTranslationCollection()\n {\n $this->translations = new ArrayCollection();\n }\n\n /**\n * @param string|null $locale\n * @param bool $useFallbackTranslation\n *\n * @return TranslationInterface\n */\n public function getTranslation($locale = null, $useFallbackTranslation = true)\n {\n $locale = $locale ?: $this->currentLocale;\n if (null === $locale) {\n throw new \\RuntimeException('No locale has been set and current locale is undefined.');\n }\n\n if (isset($this->translationsCache[$locale])) {\n return $this->translationsCache[$locale];\n }\n\n $translation = $this->translations->get($locale);\n if (null !== $translation) {\n $this->translationsCache[$locale] = $translation;\n\n return $translation;\n }\n\n if ($useFallbackTranslation) {\n $fallbackTranslation = $this->translations->get($this->fallbackLocale);\n if (null !== $fallbackTranslation) {\n $this->translationsCache[$this->fallbackLocale] = $fallbackTranslation;\n\n return $fallbackTranslation;\n }\n }\n\n $translation = $this->createTranslation();\n $translation->setLocale($locale);\n\n $this->addTranslation($translation);\n\n $this->translationsCache[$locale] = $translation;\n\n return $translation;\n }\n\n /**\n * @return TranslationInterface[]|Collection\n */\n public function getTranslations()\n {\n return $this->translations;\n }\n\n /**\n * @param TranslationInterface $translation\n *\n * @return bool\n */\n public function hasTranslation(TranslationInterface $translation)\n {\n return isset($this->translationsCache[$translation->getLocale()]) || $this->translations->containsKey($translation->getLocale());\n }\n\n /**\n * @param TranslationInterface $translation\n */\n public function addTranslation(TranslationInterface $translation)\n {\n if (!$this->hasTranslation($translation)) {\n $this->translationsCache[$translation->getLocale()] = $translation;\n\n $this->translations->set($translation->getLocale(), $translation);\n $translation->setTranslatable($this);\n }\n }\n\n /**\n * @param TranslationInterface $translation\n */\n public function removeTranslation(TranslationInterface $translation)\n {\n if ($this->translations->removeElement($translation)) {\n unset($this->translationsCache[$translation->getLocale()]);\n\n $translation->setTranslatable(null);\n }\n }\n\n /**\n * @param string $currentLocale\n */\n public function setCurrentLocale($currentLocale)\n {\n $this->currentLocale = $currentLocale;\n }\n\n /**\n * @param string $fallbackLocale\n */\n public function setFallbackLocale($fallbackLocale)\n {\n $this->fallbackLocale = $fallbackLocale;\n }\n\n /**\n * Create resource translation model.\n *\n * @return TranslationInterface\n */\n abstract protected function createTranslation();\n}\n"} +{"text": "\n\n\n\n\n\n\n\n\n\nstruct B {\n int b1;\n};\n"} +{"text": "import * as React from \"react\";\n\nimport AutoSuggestBox from \"react-uwp/AutoSuggestBox\";\nimport Icon from \"react-uwp/Icon\";\n\nexport interface ListSourceExampleState {\n listSource: string[];\n}\n\nconst itemStyle: React.CSSProperties = {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"space-between\"\n};\n\nconst colors = [\"Blue\", \"Red\", \"Green\", \"Grey\", \"Black\", \"Yellow\", \"Purple\", \"Brown\", \"White\", \"Orange\", \"Pink\", \"Violet\", \"Olive\", \"Cyan\", \"Magenta\", \"Gold\", \"Lavender\", \"Indigo\", \"Maroon\", \"Turquoise\", \"Chartreuse\", \"Coral\", \"Beige\", \"Azure\", \"Lime\", \"Teal\", \"Sky Blue\", \"Forest Green\", \"Silver\", \"Tan\", \"Salmon (color)\", \"Midnight blue\", \"Cornflower blue\", \"Fuchsia\", \"Ivory\", \"Khaki\", \"Steel blue\", \"Aquamarine\", \"Goldenrod\", \"Crimson\", \"Royal blue\", \"Slate gray\", \"Plum\", \"Spring green\", \"Powder blue\", \"Alice blue\", \"Orchid\", \"Dodger blue\", \"Lemon chiffon\", \"Light blue\", \"Navajo white\"].map((color, index) => (\n <div style={itemStyle} key={`${index}`} {...{ value: color }}>\n {color}\n <Icon>HeartFillLegacy</Icon>\n </div>\n));\n\nexport default class ListSourceComplexExample extends React.Component<{}, ListSourceExampleState> {\n state: ListSourceExampleState = {\n listSource: colors.slice(0, 5) as any\n };\n\n handleChangeValue = (value: string) => {\n this.setState({\n listSource: value ? colors.filter(\n color => color.props.value.toLowerCase().includes(value.toLowerCase())\n ) as any : []\n });\n }\n\n render() {\n const { listSource } = this.state;\n return (\n <AutoSuggestBox\n placeholder=\"Focus this Input. (Initial listSource)\"\n listSource={listSource}\n onChangeValue={this.handleChangeValue}\n />\n );\n }\n}\n"} +{"text": "### ATtiny 87/167\n![x7 pin mapping](Pinout_x7.jpg \"Arduino Pin Mapping for ATtiny x7-family\")\n\n Specifications | .\n------------ | -------------\nFlash (program memory) | 8096b/16768b ( 7552b/15744b with Optiboot, 14842 with Micronucleus)\nRAM | 512 bytes\nEEPROM | 512 bytes\nBootloader | Yes, Optiboot (serial) or Micronucleus (VUSB)\nGPIO Pins | 15\nADC Channels | 11\nPWM Channels | 3\nInterfaces | LIN/UART, USI, SPI\nClock options | Internal 1/8 MHz, external crystal or clock* up to 20 MHz\nClock options | Micronucleus 16 MHz w/USB, 8/4/1 MHz w/out USB from 16MHz ext. crystal\n\n* Manual steps required. See notes in README under \"Using external CLOCK (not crystal).\n\n## Programming\nAny of these parts can be programmed by use of any ISP programmer. If using a version of Arduino prior to 1.8.13, be sure to choose a programmer with (ATTinyCore) after it's name (in 1.8.13 and later, only those will be shown), and connect the pins as normal for that ISP programmer.\n\n### Optiboot Bootloader\nThis core includes an Optiboot bootloader for the ATtiny87 and 167, operating on the hardware UART/LIN port at 115200 baud for 12 or 16 MHz clock speed, and 57600 when running at 8 MHz. In order to work on the x7 series, which does not have hardware bootloader support (hence no BOOTRST functionality), \"Virtual Boot\" is used. This works around this limitation by rewriting the vector table of the sketch as it's uploaded - the reset vector gets pointed at the start of the bootloader, while the WDT vector gets pointed to the start of the application. This works around this limitation by rewriting the vector table of the sketch as it's uploaded - the reset vector gets pointed at the start of the bootloader, while the EE_RDY vector gets pointed to the start of the application.\n\n### Micronucleus VUSB Bootloader\nThis core includes a Micronucleus bootloader that supports the ATtiny167, allowing sketches to be uploaded directly over USB. The board definition runs at 16 MHz via external crystal (if USB is not required, it can be prescaled as listed in the table for low power applications). See the document on [Micronucleus usage](UsingMicronucleus.md) for more information. D- is on PIN_PB3, D+ is on pin PIN_PB6.\n\n**Currently the version of Micronucleus supplied with ATTinyCore for this part enters the bootloader upon power-on only. This will be made an option in future versions** The \"stock\" bootloader found on commercially available boards usually enters the bootloader on all reset sources.\n\n## Features\n\n### Alternate pinout options\nThere was an old ATtiny x7 core with a different and more awkward pinout. This is supported, for compatibility purposes, via the \"Legacy\" pinmapping option. It should be used only if you are trying to use an old sketch that was written for that pin mapping. The Digispark Pro boards have pins labeled with yet another pin mapping. All pin mappings can be chosen for both Digispark/VUSB and non-VUSB boards, for compatibility. This is selected from the Tools -> Pin Mapping submenu. Be very sure that you have selected the one that you wrote your sketch for, as debugging these issues can be surprisingly timeconsuming. As of 1.4.0, your sketch can check for `PINMAPPING_OLD`, `PINMAPPING_NEW`, or `PINMAPPING_DIGI` macro (eg, `#ifdef PINMAPPING_OLD` - I would recommend checking if the compatible one is not defined and immediately #error'ing in that case). Alternately, also as of 1.4.0, with any pin mapping selected, you can always refer to pins by their port and number within that port, using the `PIN_Pxn` syntax - where x is the port letter, and n is the pin number, eg PIN_PA7 is PIN A7, which is pin 7 in the clockwise mapping and pin 3 in the counterclockwise mapping (don't use PIN_xn or Pxn) - in this case the pin mapping won't matter.\n\nExample of a \"guard\" against wrong pin mapping:\n```\n#ifndef PINMAPPING_NEW\n#error \"Sketch was written for new pinmapping!\"\n#endif\n```\nThe pin mapping for the Digispark Pro is very, very strange. Note that on the An constants for analogRead() n is the number of the digital pin, not the the ADC channel!\n\n### Flexible PWM support (New 1.4.0)\nThe two channels of Timer1 can each output on one or more of 4 pins, albeit with the same duty cycle. The OCR1Ax and OCR1Bx pins each share the channel. All of those pins can be used for PWM. If you do `analogWrite(PIN_PB0,64);`, you get 25% dutycycle, if you then do `analogWrite(PIN_PB2,128);` (these are OCR1AU and OCR1AW, respectively) both of the pins will be outputting 50% dutycycle after the second ommand. To stop the PWM output, call digitalWrite() or analogWrite() with 0 or 255 on the pin.\n\n### Tone Support\nTone() uses Timer1. For best results, use a pin on port B - those will use the hardware output compare rather than an interrupt to generate the tone. Using tone() will disable all PWM pins except PIN_PA2.\n\n### I2C Support\nThere is no hardware I2C peripheral. I2C functionality can be achieved with the hardware USI. As of version 1.1.3 this is handled transparently via the special version of the Wire.h library included with this core.\n\n### SPI Support\nThere is a hardware SPI port and the normal SPI library can be used.\n\n### UART (Serial) with LIN support\nThere is one full hardware Serial port with LIN support, named Serial. It works the same as Serial on any normal Arduino - it is not a software implementation. The ATtiny x7-family has LIN support, unique among the ATtiny linup; LIN (Local Interconnect Network) is frequently used in automotive and industrial applications. One consequence of this additional feature is that the baud rate generator is able to match baud rates much more closely than a \"standard\" UART module.\n\n### ADC Reference Options\n* DEFAULT: Vcc\n* EXTERNAL: Voltage applied to AREF pin\n* INTERNAL1V1: Internal 1.1v reference\n* INTERNAL: synonym for INTERNAL1V1\n* INTERNAL2V56: Internal 2.56v\n\n### Purchasing ATtiny167 Boards\nI (Spence Konde / Dr. Azzy) sell ATtiny167 boards through my Tindie store - your purchases support the continued development of this core.\n![Picture of ATtiny167 boards](https://d3s5r33r268y59.cloudfront.net/77443/products/thumbs/2016-04-19T01:35:24.770Z-AZB7_Asy.png.855x570_q85_pad_rcrop.png)\n* [Assembled Boards](https://www.tindie.com/products/DrAzzy/attiny-861-or-167-development-board-assembled/)\n* [Bare Boards](https://www.tindie.com/products/DrAzzy/attiny-16787861461261-breakout-bare-board/)\n* Micronucleus boards are readily available all over the internet, fairly cheaply, in several models. Search for things like \"Digispark Pro\", \"Digispark ATtiny167\", \"ATtiny167 USB\" and so on.\n\n\n## Interrupt Vectors\nThis table lists all of the interrupt vectors available on the ATtiny x7-family, as well as the name you refer to them as when using the `ISR()` macro. Be aware that a non-existent vector is just a \"warning\" not an \"error\" - however, when that interrupt is triggered, the device will (at best) immediately reset - and not cleanly either. The catastrophic nature of the failure often makes debugging challenging. Vector addresses are \"word addressed\". vect_num is the number you are shown in the event of a duplicate vector error, among other things.\nAddresses are for 87 and 167 - the 167, having 16k of flash, has 4-byte vectors instead of 2-byte vectors.\nvect_num | Vector Address | Vector Name | Interrupt Definition\n------------ | ------------- | ------------ | -------------\n0 | 0x0000/0x0000 | RESET_vect | External Pin, Power-on Res\n1 | 0x0001/0x0002 | INT0_vect | External Interrupt Request 0\n2 | 0x0002/0x0004 | INT1_vect | External Interrupt Request 1\n3 | 0x0003/0x0006 | PCINT0_vect | Pin Change Interrupt (PORT A)\n4 | 0x0004/0x0008 | PCINT1_vect | Pin Change Interrupt (PORT B)\n5 | 0x0005/0x000A | WDT_vect | Watchdog Time-out (Interrupt Mode)\n6 | 0x0006/0x000C | TIMER1_CAPT_vect | Timer/Counter1 Capture\n7 | 0x0007/0x000E | TIMER1_COMPA_vect | Timer/Counter1 Compare Match\n8 | 0x0008/0x0010 | TIMER1_COMPB_vect | Timer/Coutner1 Compare Match\n9 | 0x0009/0x0012 | TIMER1_OVF_vect | Timer/Counter1 Overflow\n10 | 0x000A/0x0014 | TIMER0_COMPA_vect | Timer/Counter0 Compare Match\n11 | 0x000B/0x0016 | TIMER0_OVF_vect | Timer/Counter0 Overflow\n12 | 0x000C/0x0018 | LIN_TC_vect | LIN/UART Transfer Complete\n13 | 0x000D/0x001A | LIN_ERR_vect | LIN/UART Error\n14 | 0x000E/0x001C | SPI_STC_vect | SPI Serial Transfer Complete\n15 | 0x000F/0x001E | ADC_READY_vect | Conversion Complete\n16 | 0x0010/0x0020 | EE_READY_vect | EEPROM Ready\n17 | 0x0011/0x0022 | ANALOG_COMP_vect | Analog Comparator\n18 | 0x0012/0x0024 | USI_START_vect | USI Start Condition\n19 | 0x0013/0x0026 | USI_OVF_vect | USI Counter Overflow\n"} +{"text": "package org.jleopard.model ;\n\nimport java.sql.Timestamp;\nimport org.jleopard.core.annotation.*;\nimport org.jleopard.core.EnumPrimary;\n\n\n/**\n *\n * @Copyright (c) by Chen_9g (80588183@qq.com).\n * @Author JLeopard Generator\n * @DateTime 2018-07-24 14:04:09\n */\n@Table(\"student\")\npublic class Student {\n\n\t@Column(value=\"ID\",isPrimary = EnumPrimary.YES)\n\tprivate Integer id;\n\t@Column(\"NAME\")\n\tprivate String name;\n\t@Column(\"CREATED\")\n\tprivate Timestamp created;\n\n\tpublic Student() {\n\t}\n\t\n\tpublic Integer getId() {\n\t\treturn id;\n\t}\n\n\tpublic void setId(Integer id) {\n\t\tthis.id = id;\n\t}\n\t\n\tpublic String getName() {\n\t\treturn name;\n\t}\n\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\t}\n\t\n\tpublic Timestamp getCreated() {\n\t\treturn created;\n\t}\n\n\tpublic void setCreated(Timestamp created) {\n\t\tthis.created = created;\n\t}\n}"} +{"text": "<?php\nclass NamespaceCoverageClassExtendedTest extends PHPUnit_Framework_TestCase\n{\n /**\n * @covers Foo\\CoveredClass<extended>\n */\n public function testSomething()\n {\n $o = new Foo\\CoveredClass;\n $o->publicMethod();\n }\n}\n"} +{"text": "key = value2;\n"} +{"text": "//\n// NSTimer_Extension.m\n// NSTimerBlocks\n//\n// Created by Hiroshi Hashiguchi on 10/08/05.\n// Copyright 2010 . All rights reserved.\n//\n\n#import \"NSTimer_Extension.h\"\n\n@implementation NSTimer (Extension)\n\n/*\n #define KEY_BLOCK\t\t@\"block\"\n #define KEY_USERINFO\t@\"userInfo\"\n+ (void)executeBlock__:(NSTimer*)timer\n{\n\tif (![timer isValid]) {\n\t\treturn;\n\t\t// do nothing\n\t}\n\n\tNSDictionary* context = [timer userInfo];\n\tTIMER_BLOCK__ block = [context objectForKey:KEY_BLOCK];\n\tid userInfo = [context objectForKey:KEY_USERINFO];\n\n\tblock(timer, userInfo);\n}\n\n+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)seconds block:(TIMER_BLOCK__)block userInfo:(id)userInfo repeats:(BOOL)repeats\n{\n\tNSMutableDictionary* context = [NSMutableDictionary dictionary];\n\n\t[context setObject:[[block copy] autorelease]\n\t\t\t\tforKey:KEY_BLOCK];\n\tif (userInfo) {\n\t\t[context setObject:userInfo forKey:KEY_USERINFO];\n\t}\n\n\tNSTimer* timer = [NSTimer scheduledTimerWithTimeInterval:seconds\n\t\t\t\t\t\t\t\t\t\t\t\t\t target:self\n\t\t\t\t\t\t\t\t\t\t\t\t\tselector:@selector(executeBlock__:)\n\t\t\t\t\t\t\t\t\t\t\t\t\tuserInfo:context\n\t\t\t\t\t\t\t\t\t\t\t\t\trepeats:repeats];\n\treturn timer;\n}\n*/\n\n+ (void)executeBlock__:(NSTimer*)timer\n{\n\tif (![timer isValid]) {\n\t\treturn;\n\t\t// do nothing\n\t}\n\t\n\tTIMER_BLOCK__ block = [timer userInfo];\n\tblock(timer);\n}\n\n+ (NSTimer *)scheduledTimerWithTimeInterval:(NSTimeInterval)seconds block:(TIMER_BLOCK__)block repeats:(BOOL)repeats\n{\n\tNSTimer* timer = [NSTimer scheduledTimerWithTimeInterval:seconds\n\t\t\t target:self\n\t\t\tselector:@selector(executeBlock__:)\n\t\t\tuserInfo:[[block copy] autorelease]\n\t\t\t repeats:repeats];\n\treturn timer;\n\t\n}\n\n\n@end\n"} +{"text": "-- incrvacuum.test\n-- \n-- execsql {\n-- PRAGMA cache_size = 10;\n-- PRAGMA auto_vacuum = incremental;\n-- CREATE TABLE t1(x, y);\n-- INSERT INTO t1 VALUES('a', str);\n-- INSERT INTO t1 VALUES('b', str);\n-- INSERT INTO t1 VALUES('c', str);\n-- INSERT INTO t1 VALUES('d', str);\n-- INSERT INTO t1 VALUES('e', str);\n-- INSERT INTO t1 VALUES('f', str);\n-- INSERT INTO t1 VALUES('g', str);\n-- INSERT INTO t1 VALUES('h', str);\n-- INSERT INTO t1 VALUES('i', str);\n-- INSERT INTO t1 VALUES('j', str);\n-- INSERT INTO t1 VALUES('j', str);\n-- \n-- CREATE TABLE t2(x PRIMARY KEY, y);\n-- INSERT INTO t2 VALUES('a', str);\n-- INSERT INTO t2 VALUES('b', str);\n-- INSERT INTO t2 VALUES('c', str);\n-- INSERT INTO t2 VALUES('d', str);\n-- \n-- BEGIN;\n-- DELETE FROM t2;\n-- PRAGMA incremental_vacuum;\n-- }\nPRAGMA cache_size = 10;\nPRAGMA auto_vacuum = incremental;\nCREATE TABLE t1(x, y);\nINSERT INTO t1 VALUES('a', str);\nINSERT INTO t1 VALUES('b', str);\nINSERT INTO t1 VALUES('c', str);\nINSERT INTO t1 VALUES('d', str);\nINSERT INTO t1 VALUES('e', str);\nINSERT INTO t1 VALUES('f', str);\nINSERT INTO t1 VALUES('g', str);\nINSERT INTO t1 VALUES('h', str);\nINSERT INTO t1 VALUES('i', str);\nINSERT INTO t1 VALUES('j', str);\nINSERT INTO t1 VALUES('j', str);\nCREATE TABLE t2(x PRIMARY KEY, y);\nINSERT INTO t2 VALUES('a', str);\nINSERT INTO t2 VALUES('b', str);\nINSERT INTO t2 VALUES('c', str);\nINSERT INTO t2 VALUES('d', str);\nBEGIN;\nDELETE FROM t2;\nPRAGMA incremental_vacuum;\n"} +{"text": "The include files cscout needs in its installation directory (e.g. ~/.cscout/)\ncan be found in %%PREFIX%%/include/cscout/.\nFor an example, go to %%EXAMPLESDIR%% and try \"cscout awk.cs\".\n\n"} +{"text": "---\nlayout: documentation\ntitle: ReactiveX - Min operator\nid: min\n---\n\n<ol class=\"breadcrumb\">\n <li><a href=\"{{ site.url }}/documentation/operators.html\">Operators</a></li>\n <li><a href=\"{{ site.url }}/documentation/operators.html#mathematical\">Mathematical and Aggregate</a></li>\n <li class=\"active\">Min</li>\n</ol>\n\n <h1>Min</h1>\n <h3>emits the item from the source Observable that had the minimum value</h3>\n\n <figure class=\"rxmarbles-figure\">\n <rx-marbles key=\"min\"></rx-marbles>\n <figcaption><p>\n The <span class=\"operator\">Min</span> operator operates on an Observable that emits numbers\n (or items that can be evaluated as numbers), and emits a single item: the item with the smallest\n number.\n </p></figcaption>\n </figure>\n\n <h4>See Also</h4>\n <ul>\n <li><a href=\"min.html\"><span class=\"operator\">Min</span></a></li>\n <li><a href=\"http://www.introtorx.com/Content/v1.0.10621.0/07_Aggregation.html#MaxAndMin\"><cite>Introduction to Rx</cite>: Min, Max, Sum, and Average</a></li>\n <li><a href=\"http://rxmarbles.com/#min\">RxMarbles: <code>min</code></a></li>\n </ul>\n\n <h2>Language-Specific Information:</h2>\n<div class=\"panel-group operators-by-language\" id=\"accordion\" role=\"tablist\" aria-multiselectable=\"true\">\n\n {% lang_operator RxClojure %}\n <p>\n <span style=\"color:#f00\">TBD</span>\n </p>\n {% endlang_operator %}\n\n {% lang_operator RxCpp %}\n <p>\n <span style=\"color:#f00\">TBD</span>\n </p>\n {% endlang_operator %}\n\n {% lang_operator RxGroovy min minBy %}\n <p>\n In RxGroovy, this operator is not in the ReactiveX core, but is part of the distinct\n <code>rxjava-math</code> module.\n </p>\n <figure>\n <img src=\"../../operators/images/min.png\" style=\"width:100%;\" alt=\"min\" />\n <figcaption><p>\n RxGroovy implements a <code>min</code> operator. It takes an optional comparator that it\n will use instead of its default to compare the value of two items. If more than one item\n has the identical minimum value, <code>min</code> will emit the <em>last</em> such item\n emitted by the source Observable.\n </p></figcaption>\n </figure>\n <figure>\n <img src=\"../../operators/images/minBy.png\" style=\"width:100%;\" alt=\"minBy\" />\n <figcaption><p>\n The <code>minBy</code> operator is similar to <code>min</code>, but instead of emitting the\n item with the minimum value, it emits the item with the minimum <em>key</em>, where that\n key is generated based on a function you provide to <code>minBy</code>\n </p></figcaption>\n </figure>\n {% endlang_operator %}\n\n {% lang_operator RxJava&nbsp;1․x min minBy %}\n <p>\n In RxJava, this operator is not in the ReactiveX core, but is part of the distinct\n <code>rxjava-math</code> module.\n </p>\n <figure>\n <img src=\"../../operators/images/min.png\" style=\"width:100%;\" alt=\"min\" />\n <figcaption><p>\n RxJava implements a <code>min</code> operator. It takes an optional comparator that it\n will use instead of its default to compare the value of two items. If more than one item\n has the identical minimum value, <code>min</code> will emit the <em>last</em> such item\n emitted by the source Observable.\n </p></figcaption>\n </figure>\n <figure>\n <img src=\"../../operators/images/minBy.png\" style=\"width:100%;\" alt=\"minBy\" />\n <figcaption><p>\n The <code>minBy</code> operator is similar to <code>min</code>, but instead of emitting the\n item with the minimum value, it emits the item with the minimum <em>key</em>, where that\n key is generated based on a function you provide to <code>minBy</code>\n </p></figcaption>\n </figure>\n {% endlang_operator %}\n\n {% lang_operator RxJS min minBy %}\n <figure>\n <img src=\"../../operators/images/min.png\" style=\"width:100%;\" alt=\"min\" />\n <figcaption><p>\n RxJS implements the <code>min</code> operator. It takes an optional comparer function that it\n will use instead of its default to compare the value of two items.</p>\n <h4>Sample Code</h4>\n <div class=\"code javascript\"><pre>\nvar source = Rx.Observable.fromArray([1,3,5,7,9,2,4,6,8]).min();\n\nvar subscription = source.subscribe(\n function (x) { console.log('Next: ' + x); },\n function (err) { console.log('Error: ' + err); },\n function () { console.log('Completed'); } );</pre></div>\n <div class=\"output\"><pre>\nNext: 1\nCompleted</pre></div></figcaption>\n </figure>\n <figure>\n <img src=\"../../operators/images/minBy.png\" style=\"width:100%;\" alt=\"minBy\" />\n <figcaption><p>\n The <code>minBy</code> operator is similar to <code>min</code>, but instead of emitting the\n item with the minimum value, it emits the item with the minimum <em>key</em>, where that\n key is generated based on a function you provide to <code>minBy</code>. <code>minBy</code>\n also takes an optional second parameter: a comparer function that it will use instead of its\n default to compare the keys of the two items.\n </p><p>\n <code>minBy</code> emits a list. If more than one item has the minimum key value, each such\n item will be represented in the list.\n </p>\n <h4>Sample Code</h4>\n <div class=\"code javascript\"><pre>\nvar source = Rx.Observable.fromArray([1,3,5,7,9,2,4,6,8,1])\n .minBy( function (x) { return x; } );\n\nvar subscription = source.subscribe(\n function (x) { console.log('Next: ' + x); },\n function (err) { console.log('Error: ' + err); },\n function () { console.log('Completed'); } );</pre></div>\n <div class=\"output\"><pre>\nNext: 1,1\nCompleted</pre></div></figcaption>\n </figure>\n <p>\n <code>min</code> and <code>minBy</code> are found in the following distributions:\n </p>\n <ul>\n <li><code>rx.all.js</code></li>\n <li><code>rx.all.compat.js</code></li>\n <li><code>rx.aggregates.js</code></li>\n </ul>\n <p>\n They requires one of the following:\n </p>\n <ul>\n <li><code>rx.js</code></li>\n <li><code>rx.compat.js</code></li>\n <li><code>rx.lite.js</code></li>\n <li><code>rx.lite.compat.js</code></li>\n </ul>\n {% endlang_operator %}\n\n {% lang_operator RxKotlin min minBy %}\n <p>\n <span style=\"color:#ff0000\">TBD</span>\n </p>\n {% endlang_operator %}\n\n {% lang_operator Rx.NET Min MinBy %}\n <p>\n <span style=\"color:#ff0000\">TBD</span>\n </p>\n {% endlang_operator %}\n\n {% lang_operator RxPHP min %}\n<figure class=\"variant\">\n <figcaption>\n <p>\n RxPHP implements this operator as <code>min</code>.\n </p>\n <p>\n Returns the minimum value in an observable sequence according to the specified comparer.\n </p>\n<h4>Sample Code</h4>\n<div class=\"code php\">\n <pre>\n//from https://github.com/ReactiveX/RxPHP/blob/master/demo/min/min.php\n\n/* Without comparer */\n$source = \\Rx\\Observable::fromArray([1, 3, 5, 7, 9, 2, 4, 6, 8])\n ->min();\n\n$subscription = $source->subscribe($createStdoutObserver());\n\n </pre>\n</div>\n<div class=\"output\">\n <pre>\nNext value: 1\nComplete!\n </pre>\n</div>\n\n<div class=\"code php\">\n <pre>\n//from https://github.com/ReactiveX/RxPHP/blob/master/demo/min/min-with-comparer.php\n\n/* With a comparer */\n$comparer = function ($x, $y) {\n if ($x > $y) {\n return 1;\n } elseif ($x < $y) {\n return -1;\n }\n return 0;\n};\n\n$source = \\Rx\\Observable::fromArray([1, 3, 5, 7, 9, 2, 4, 6, 8])\n ->min($comparer);\n\n$subscription = $source->subscribe($createStdoutObserver());\n\n </pre>\n</div>\n<div class=\"output\">\n <pre>\nNext value: 1\nComplete!\n </pre>\n</div>\n </figcaption>\n</figure>\n {% endlang_operator %}\n\n {% lang_operator RxPY min min_by %}\n <p>\n <span style=\"color:#ff0000\">TBD</span>\n </p>\n {% endlang_operator %}\n\n {% lang_operator Rx.rb min min_by %}\n <p>\n <span style=\"color:#ff0000\">TBD</span>\n </p>\n {% endlang_operator %}\n\n {% lang_operator RxScala %}\n <p>\n <span style=\"color:#ff0000\">TBD</span>\n </p>\n {% endlang_operator %}\n\n</div>\n"} +{"text": "**Are you the copyright owner or authorized to act on the copyright owner's behalf?** \nYes, we are authorized to act on Nintendo of America Inc.'s behalf.\n\n**What work was allegedly infringed? If possible, please provide a URL:** \nThe freeShop application provided at https://github.com/Cruel/freeShop/releases infringes Nintendo's copyrights, because the application circumvents Nintendo's technological protection measures in violation of the Digital Millennium Copyright Act. Nintendo encrypts the game files available from its eShop servers to prevent users from accessing those files without paying for them. Nintendo believes the freeShop application circumvents Nintendo's protection measures by decrypting the game files accessible from its eShop servers, allowing freeShop users to access and play Nintendo's eShop games for free.\n\nThe freeShop application also contains unauthorized copies of the Nintendo 3DS Logo Data file, covered by U.S. Copyright Reg. No. PA0001781880, which further infringes Nintendo's rights.\n\nIn addition, the files located at the links below violate the GitHub Terms of Service by facilitating the theft of Nintendo's games from its eShop servers, and the use of these files with a Nintendo 3DS device violates the user's obligations under Nintendo's end-user license agreement.\n\n**What files should be taken down? Please provide URLs for each file, or if the entire repository, the repository's URL:** \nhttps://github.com/Cruel/freeShop/releases\n\n**Have you searched for any forks of the allegedly infringing files or repositories? Each fork is a distinct repository and must be identified separately if you believe it is infringing and wish to have it taken down.** \nYes, we have identified 48 forks of the infringing repository as follows: \n\nhttps://github.com/AdryGL/freeShop/releases \nhttps://github.com/AerialAtom/freeShop/releases \nhttps://github.com/afdc98/freeShop/releases \nhttps://github.com/Aisasemi/freeShop/releases \nhttps://github.com/Anggeloko/freeShop/releases \nhttps://github.com/arition/freeShop/releases \nhttps://github.com/brigcaster/freeShop/releases \nhttps://github.com/BtheDestroyer/freeShop/releases \nhttps://github.com/CapraTheBest/freeShop/releases \nhttps://github.com/colt05/freeShop/releases \nhttps://github.com/colt05-usr-alt/freeShop/releases \nhttps://github.com/leo60228/freeShop/releases \nhttps://github.com/Damin72/freeShop/releases \nhttps://github.com/Darkitz/freeShop/releases \nhttps://github.com/DAVIDRO999000999/freeShop/releases \nhttps://github.com/dchwilk/freeShop/releases \nhttps://github.com/gnmmarechal/freeShop/releases \nhttps://github.com/guisadop/freeShop/releases \nhttps://github.com/joanfercal/freeShop/releases \nhttps://github.com/Kanyka/freeShop/releases \nhttps://github.com/lclrc/freeShop/releases \nhttps://github.com/LITTOMA/freeShop/releases \nhttps://github.com/Matsumot0/freeShop/releases \nhttps://github.com/MattPiscopo/freeShop/releases \nhttps://github.com/mcloverkorea/freeShop/releases \nhttps://github.com/Merlyx/freeShop/releases \nhttps://github.com/moutonnoireu/freeShop/releases \nhttps://github.com/Noroxuz/freeShop/releases \nhttps://github.com/pdapanda/freeShop/releases \nhttps://github.com/Pixilate/freeShop/releases \nhttps://github.com/QuiZr/freeShop/releases \nhttps://github.com/Radeox/freeShop/releases \nhttps://github.com/ranpe/freeShop/releases \nhttps://github.com/rawrimlion/freeShop/releases \nhttps://github.com/Razorzeto/freeShop/releases \nhttps://github.com/rboninsegna/freeShop/releases \nhttps://github.com/Reivaxl1/freeShop/releases \nhttps://github.com/RodryFull001/freeShop/releases \nhttps://github.com/sinoah/freeShop/releases \nhttps://github.com/StijnvandeWater/freeShop/releases \nhttps://github.com/SylphiaWindy/freeShop/releases \nhttps://github.com/tchkll/freeShop/releases \nhttps://github.com/thejsa/freeShop/releases \nhttps://github.com/Totellini/freeShop/releases \nhttps://github.com/Traiver/freeShop/releases \nhttps://github.com/Venseer/freeShop/releases \nhttps://github.com/victorheld/freeShop/releases \nhttps://github.com/Wingv528/freeShop/releases \n\n**Is the work licensed under an open source license? If so, which open source license? Are the allegedly infringing files being used under the open source license, or are they in violation of the license?** \nNintendo's copyrighted work is not licensed under an open source license.\n\n**What would be the best solution for the alleged infringement? Are there specific changes the other person can make other than removal?** \nPlease immediately remove the files.\n\n**Do you have the alleged infringer's contact information? If so, please provide it:** \nNo.\n\n**Type (or copy and paste) the following statement: \"I have a good faith belief that use of the copyrighted materials described above on the infringing web pages is not authorized by the copyright owner, or its agent, or the law. I have taken fair use into consideration.\"** \nI have a good faith belief that use of the copyrighted materials described above on the infringing web pages is not authorized by the copyright owner, or its agent, or the law. I have taken fair use into consideration.\n\n**Type (or copy and paste) the following statement: \"I swear, under penalty of perjury, that the information in this notification is accurate and that I am the copyright owner, or am authorized to act on behalf of the owner, of an exclusive right that is allegedly infringed.\"** \nI swear, under penalty of perjury, that the information in this notification is accurate and that I am the copyright owner, or am authorized to act on behalf of the owner, of an exclusive right that is allegedly infringed.\n\n**Please confirm that you have you have read our Guide to Submitting a DMCA Takedown Notice: https://help.github.com/articles/guide-to-submitting-a-dmca-takedown-notice/** \nI have read and understand GitHub's Guide to Filing a DMCA Notice.\n\n**So that we can get back to you, please provide either your telephone number or physical address:** \n[private]\n\n**Please type your full legal name below to sign this request:**\n[private]\n"} +{"text": "<div metal:use-macro=\"view.layout\">\n <div metal:fill-slot=\"main_content\">\n\n\n <div class=\"container\">\n <div class=\"row upcoming\">\n <div class=\"col-md-3\"></div>\n <div class=\"col-md-6\">\n\n\n <h1>Your account</h1>\n\n <div style=\"padding-top: 50px;padding-bottom: 100px\">\n Here are some details about your site. Nothing really meaningful in this part of the\n demo app, but hey, you're logged in. Cool right? ;)\n </div>\n\n\n </div>\n <div class=\"col-md-3\"></div>\n </div>\n </div>\n\n </div>\n\n</div>\n"} +{"text": "const fs = require('fs');\nconst path = require('path');\nconst ansi = require( './ansi.js' );\nconst lunicode = require('lunicode');\n\nconst easeOutCubic = (t, b, c, d) => {\n return c*((t=t/d-1)*t*t+1)+b;\n};\n\nlunicode.tools.creepify.options.top = true; \t// add diacritics on top. Default: true\nlunicode.tools.creepify.options.middle = true;\t// add diacritics in the middle. Default: true\nlunicode.tools.creepify.options.bottom = true;\t// add diacritics on the bottom. Default: true\nlunicode.tools.creepify.options.maxHeight = 15; // How many diacritic marks shall we put on top/bottom? Default: 15\nlunicode.tools.creepify.options.randomization = 100; // 0-100%. maxHeight 100 and randomization 20%: the height goes from 80 to 100. randomization 70%: height goes from 30 to 100. Default: 100\n\nconst fortunes = [\n 'Cause fuck central banking',\n 'Not your keys, not your bitcoin',\n 'Don\\'t trust, verify',\n 'Craig Wright is a fraud',\n 'HODL!'\n];\n\nmodule.exports = class SplashScreen {\n\n constructor( options ) {\n options = options || {};\n\n if( !options.frameDir ) {\n throw \"no frame directory to load\"\n }\n\n this.width = options.width || 82;\n this.fortuneEnabled = !!options.enableFortune;\n this.fortuneSpacing = options.fortuneSpacing || 0;\n this.fortuneChalk = options.fortuneChalk;\n\n this.loadFramesFromDir( options.frameDir );\n\n if( this.fortuneEnabled ) {\n\n let fortune = this.fortune();\n if( fortune.length > this.width-2 ) {\n fortune = fortune.substr(0,this.width-2);\n }\n fortune = this.center(fortune);\n\n let fortuneLines = [];\n\n\n\n\n fortuneLines.push( this.creepify(fortune) )+'\\n';\n\n\n\n\n for( let i=0; i<this.frames.length; i++ ) {\n for( let j=0; j<fortuneLines.length; j++ ) {\n this.frames[i] += fortuneLines[j];\n }\n }\n\n }\n }\n\n loadFramesFromDir( frameDir ) {\n this.frames = [];\n fs.readdirSync(frameDir).forEach((file) => {\n this.frames.push(fs.readFileSync(path.join(__dirname,'..','splash',file)));\n });\n }\n\n sleep(ms) {\n return new Promise(resolve => setTimeout(resolve, ms));\n }\n\n fortune() {\n return fortunes[ Math.random()*fortunes.length << 0 ];\n }\n\n creepify( string ) {\n if( this.fortuneChalk ) {\n return this.fortuneChalk(lunicode.tools.creepify.encode( string ));\n }\n return lunicode.tools.creepify.encode( string );\n }\n\n center( string ) {\n const offset = ((this.width - string.length)*0.5) << 0;\n for( let i=0; i<offset; i++ ) {\n string = ' '+string+' ';\n }\n\n return string;\n }\n\n async show() {\n\n const frame0 = this.frames[0];\n\n const frame0lines = frame0.toString().split('\\n');\n const frame0lineCount = frame0lines.length;\n const steps = 10;\n\n await this.sleep(250);\n\n process.stdout.write(ansi.clear);\n\n await this.sleep(150);\n\n for( let i=0; i<=steps; i++ ) {\n const pos = easeOutCubic( i, 0, frame0lineCount, steps ) | 0;\n process.stdout.write(ansi.reset);\n for( let l=frame0lineCount-pos; l<frame0lineCount; l++ ) {\n process.stdout.write( frame0lines[l]+'\\n' );\n }\n await this.sleep(33);\n }\n\n if( this.frames.length > 1 ) {\n await this.sleep(400);\n\n for( let frame of this.frames ) {\n process.stdout.write(ansi.reset);\n process.stdout.write(frame.toString());\n await this.sleep(33);\n }\n }\n\n await this.sleep(400);\n process.stdout.write('\\n');\n }\n\n};"} +{"text": "// RUN: clang-tblgen -gen-clang-diag-groups -I%S %s -o /dev/null 2>&1 | FileCheck --strict-whitespace %s\ninclude \"DiagnosticBase.inc\"\n\n// Do not move this line; it is referred to by absolute line number in the\n// FileCheck lines below.\ndef NamedGroup : DiagGroup<\"name\">;\n\n\ndef InNamedGroup : Warning<\"\">, InGroup<DiagGroup<\"name\">>;\n// CHECK: anonymous-groups.td:[[@LINE-1]]:41: error: group 'name' is referred to anonymously\n// CHECK-NEXT: {{^def InNamedGroup : Warning<\"\">, InGroup<DiagGroup<\"name\">>;}}\n// CHECK-NEXT: {{^ ~~~~~~~~\\^~~~~~~~~~~~~~~~~~}}\n// CHECK-NEXT: {{^ InGroup<NamedGroup>}}\n// CHECK-NEXT: anonymous-groups.td:6:1: note: group defined here\n// CHECK-NEXT: def NamedGroup : DiagGroup<\"name\">;\n// CHECK-NEXT: ^\n\n\ndef AlsoInNamedGroup : Warning<\"\">, InGroup < DiagGroup<\"name\"> >;\n// CHECK: anonymous-groups.td:[[@LINE-1]]:48: error: group 'name' is referred to anonymously\n// CHECK-NEXT: {{^def AlsoInNamedGroup : Warning<\"\">, InGroup < DiagGroup<\"name\"> >;}}\n// CHECK-NEXT: {{^ ~~~~~~~~~~~\\^~~~~~~~~~~~~~~~~~~}}\n// CHECK-NEXT: {{^ InGroup<NamedGroup>}}\n// CHECK-NEXT: anonymous-groups.td:6:1: note: group defined here\n// CHECK-NEXT: def NamedGroup : DiagGroup<\"name\">;\n// CHECK-NEXT: ^\n\n\ndef AnonymousGroup : Warning<\"\">, InGroup<DiagGroup<\"anonymous\">>;\ndef AlsoAnonymousGroup : Warning<\"\">, InGroup<DiagGroup<\"anonymous\">>;\ndef AnonymousGroupAgain : Warning<\"\">,\n InGroup<DiagGroup<\"anonymous\">>;\n\n// CHECK: anonymous-groups.td:[[@LINE-5]]:43: error: group 'anonymous' is referred to anonymously\n// CHECK-NEXT: {{^def AnonymousGroup : Warning<\"\">, InGroup<DiagGroup<\"anonymous\">>;}}\n// CHECK-NEXT: {{^ ~~~~~~~~\\^~~~~~~~~~~~~~~~~~~~~~~}}\n// CHECK-NEXT: anonymous-groups.td:[[@LINE-7]]:47: note: also referenced here\n// CHECK-NEXT: {{^def AlsoAnonymousGroup : Warning<\"\">, InGroup<DiagGroup<\"anonymous\">>;}}\n// CHECK-NEXT: {{^ ~~~~~~~~\\^~~~~~~~~~~~~~~~~~~~~~~}}\n// CHECK-NEXT: anonymous-groups.td:[[@LINE-8]]:11: note: also referenced here\n// CHECK-NEXT: {{^ InGroup<DiagGroup<\"anonymous\">>;}}\n// CHECK-NEXT: {{^ ~~~~~~~~\\^~~~~~~~~~~~~~~~~~~~~~~}}\n"} +{"text": "// Boost.Geometry (aka GGL, Generic Geometry Library)\r\n\r\n// Copyright (c) 2012-2014 Barend Gehrels, Amsterdam, the Netherlands.\r\n\r\n// Use, modification and distribution is subject to the Boost Software License,\r\n// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at\r\n// http://www.boost.org/LICENSE_1_0.txt)\r\n\r\n#ifndef BOOST_GEOMETRY_STRATEGIES_CARTESIAN_BUFFER_JOIN_MITER_HPP\r\n#define BOOST_GEOMETRY_STRATEGIES_CARTESIAN_BUFFER_JOIN_MITER_HPP\r\n\r\n#include <boost/geometry/core/assert.hpp>\r\n#include <boost/geometry/core/cs.hpp>\r\n#include <boost/geometry/policies/compare.hpp>\r\n#include <boost/geometry/util/math.hpp>\r\n#include <boost/geometry/util/select_most_precise.hpp>\r\n\r\n#include <boost/geometry/strategies/buffer.hpp>\r\n\r\n\r\nnamespace boost { namespace geometry\r\n{\r\n\r\nnamespace strategy { namespace buffer\r\n{\r\n\r\n/*!\r\n\\brief Let the buffer create sharp corners\r\n\\ingroup strategies\r\n\\details This strategy can be used as JoinStrategy for the buffer algorithm.\r\n It creates a sharp corners around each convex vertex. It can be applied\r\n for (multi)linestrings and (multi)polygons.\r\n If corners are sharp by themselves, the miters might become very long. Therefore\r\n there is a limit (miter_limit), in terms of the used distance, which limits\r\n their length. The miter is not changed to a bevel form (as done in some\r\n other software), it is just adapted to the specified miter_limit but keeps\r\n its miter form.\r\n If the buffer distance is 5.0, and the miter limit is 2.0, generated points\r\n will be located at a distance of at most 10.0 (2*5) units.\r\n This strategy is only applicable for Cartesian coordinate systems.\r\n\r\n\\qbk{\r\n[heading Example]\r\n[buffer_join_miter]\r\n[heading Output]\r\n[$img/strategies/buffer_join_miter.png]\r\n[heading See also]\r\n\\* [link geometry.reference.algorithms.buffer.buffer_7_with_strategies buffer (with strategies)]\r\n\\* [link geometry.reference.strategies.strategy_buffer_join_round join_round]\r\n}\r\n */\r\nclass join_miter\r\n{\r\npublic:\r\n\r\n //! \\brief Constructs the strategy\r\n //! \\param miter_limit The miter limit, to avoid excessively long miters around sharp corners\r\n explicit inline join_miter(double miter_limit = 5.0)\r\n : m_miter_limit(valid_limit(miter_limit))\r\n {}\r\n\r\n#ifndef DOXYGEN_SHOULD_SKIP_THIS\r\n //! Fills output_range with a sharp shape around a vertex\r\n template <typename Point, typename DistanceType, typename RangeOut>\r\n inline bool apply(Point const& ip, Point const& vertex,\r\n Point const& perp1, Point const& perp2,\r\n DistanceType const& buffer_distance,\r\n RangeOut& range_out) const\r\n {\r\n geometry::equal_to<Point> equals;\r\n if (equals(ip, vertex))\r\n {\r\n return false;\r\n }\r\n if (equals(perp1, perp2))\r\n {\r\n return false;\r\n }\r\n\r\n typedef typename coordinate_type<Point>::type coordinate_type;\r\n typedef typename geometry::select_most_precise\r\n <\r\n coordinate_type,\r\n double\r\n >::type promoted_type;\r\n\r\n Point p = ip;\r\n\r\n // Check the distance ip-vertex (= miter distance)\r\n // (We calculate it manually (not using Pythagoras strategy) to reuse\r\n // dx and dy)\r\n coordinate_type const dx = get<0>(p) - get<0>(vertex);\r\n coordinate_type const dy = get<1>(p) - get<1>(vertex);\r\n\r\n promoted_type const distance = geometry::math::sqrt(dx * dx + dy * dy);\r\n\r\n promoted_type const max_distance\r\n = m_miter_limit * geometry::math::abs(buffer_distance);\r\n\r\n if (distance > max_distance)\r\n {\r\n BOOST_GEOMETRY_ASSERT(distance != 0.0);\r\n\r\n promoted_type const proportion = max_distance / distance;\r\n set<0>(p, get<0>(vertex) + dx * proportion);\r\n set<1>(p, get<1>(vertex) + dy * proportion);\r\n }\r\n\r\n range_out.push_back(perp1);\r\n range_out.push_back(p);\r\n range_out.push_back(perp2);\r\n return true;\r\n }\r\n\r\n template <typename NumericType>\r\n inline NumericType max_distance(NumericType const& distance) const\r\n {\r\n return distance * m_miter_limit;\r\n }\r\n\r\n#endif // DOXYGEN_SHOULD_SKIP_THIS\r\n\r\nprivate :\r\n double valid_limit(double miter_limit) const\r\n {\r\n if (miter_limit < 1.0)\r\n {\r\n // It should always exceed the buffer distance\r\n miter_limit = 1.0;\r\n }\r\n return miter_limit;\r\n }\r\n\r\n double m_miter_limit;\r\n};\r\n\r\n}} // namespace strategy::buffer\r\n\r\n\r\n}} // namespace boost::geometry\r\n\r\n#endif // BOOST_GEOMETRY_STRATEGIES_CARTESIAN_BUFFER_JOIN_MITER_HPP\r\n"} +{"text": "Lyran Commonwealth Medium Vehicles A\r\nLTV-4 Hover Tank (Standard),1\r\nProwler Multi-Terrain Vehicle (Standard),2\r\nTurhan Urban Combat Vehicle (Standard),3\r\nZephyr Hovertank (Standard),4\r\nMaxim Heavy Hover Transport (Standard),5\r\nKanga Medium Hovertank (Standard),6\r\nChaparral Missile Artillery Tank (Standard),5\r\nGoblin Medium Tank (SRM),4\r\nCondor Heavy Hover Tank (Standard),3\r\nThor Artillery Vehicle (Standard),2\r\nChaparral Missile Artillery Tank (Standard),1"} +{"text": "#version 330 core\nlayout (location = 0) in vec3 aPos;\nlayout (location = 1) in vec2 aTexCoord;\n\nout vec2 TexCoord;\n\nuniform mat4 transform;\nuniform mat4 viewTransform;\nuniform mat4 perspectiveTransform;\n\nvoid main()\n{\n gl_Position = perspectiveTransform * viewTransform * transform * vec4(aPos, 1.0);\n TexCoord = aTexCoord;\n}"} +{"text": "{\n \"schemaVersion\": 1,\n \"id\": \"fabric-item-groups-v0\",\n \"name\": \"Fabric Item Groups (v0)\",\n \"version\": \"${version}\",\n \"environment\": \"*\",\n \"license\": \"Apache-2.0\",\n \"icon\": \"assets/fabric-item-groups-v0/icon.png\",\n \"contact\": {\n \"homepage\": \"https://fabricmc.net\",\n \"irc\": \"irc://irc.esper.net:6667/fabric\",\n \"issues\": \"https://github.com/FabricMC/fabric/issues\",\n \"sources\": \"https://github.com/FabricMC/fabric\"\n },\n \"authors\": [\n \"FabricMC\"\n ],\n \"depends\": {\n \"fabricloader\": \">=0.6.0\",\n \"minecraft\": \">=1.15-\",\n \"fabric-api-base\": \"*\",\n \"fabric-resource-loader-v0\": \"*\"\n },\n \"description\": \"An API for adding custom item groups.\",\n \"mixins\": [\n \"fabric-item-groups-v0.mixins.json\"\n ]\n}\n"} +{"text": "/*\n * Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nnamespace TencentCloud.Live.V20180801.Models\n{\n using Newtonsoft.Json;\n using System.Collections.Generic;\n using TencentCloud.Common;\n\n public class DescribeLiveStreamPublishedListResponse : AbstractModel\n {\n \n /// <summary>\n /// 推流记录信息。\n /// </summary>\n [JsonProperty(\"PublishInfo\")]\n public StreamNameInfo[] PublishInfo{ get; set; }\n\n /// <summary>\n /// 分页的页码。\n /// </summary>\n [JsonProperty(\"PageNum\")]\n public ulong? PageNum{ get; set; }\n\n /// <summary>\n /// 每页大小\n /// </summary>\n [JsonProperty(\"PageSize\")]\n public ulong? PageSize{ get; set; }\n\n /// <summary>\n /// 符合条件的总个数。\n /// </summary>\n [JsonProperty(\"TotalNum\")]\n public ulong? TotalNum{ get; set; }\n\n /// <summary>\n /// 总页数。\n /// </summary>\n [JsonProperty(\"TotalPage\")]\n public ulong? TotalPage{ get; set; }\n\n /// <summary>\n /// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。\n /// </summary>\n [JsonProperty(\"RequestId\")]\n public string RequestId{ get; set; }\n\n\n /// <summary>\n /// For internal usage only. DO NOT USE IT.\n /// </summary>\n internal override void ToMap(Dictionary<string, string> map, string prefix)\n {\n this.SetParamArrayObj(map, prefix + \"PublishInfo.\", this.PublishInfo);\n this.SetParamSimple(map, prefix + \"PageNum\", this.PageNum);\n this.SetParamSimple(map, prefix + \"PageSize\", this.PageSize);\n this.SetParamSimple(map, prefix + \"TotalNum\", this.TotalNum);\n this.SetParamSimple(map, prefix + \"TotalPage\", this.TotalPage);\n this.SetParamSimple(map, prefix + \"RequestId\", this.RequestId);\n }\n }\n}\n\n"} +{"text": "/*******************************************************************************\n* DISCLAIMER\n* This software is supplied by Renesas Electronics Corporation and is only\n* intended for use with Renesas products. No other uses are authorized. This\n* software is owned by Renesas Electronics Corporation and is protected under\n* all applicable laws, including copyright laws.\n* THIS SOFTWARE IS PROVIDED \"AS IS\" AND RENESAS MAKES NO WARRANTIES REGARDING\n* THIS SOFTWARE, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING BUT NOT\n* LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE\n* AND NON-INFRINGEMENT. ALL SUCH WARRANTIES ARE EXPRESSLY DISCLAIMED.\n* TO THE MAXIMUM EXTENT PERMITTED NOT PROHIBITED BY LAW, NEITHER RENESAS\n* ELECTRONICS CORPORATION NOR ANY OF ITS AFFILIATED COMPANIES SHALL BE LIABLE\n* FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES FOR\n* ANY REASON RELATED TO THIS SOFTWARE, EVEN IF RENESAS OR ITS AFFILIATES HAVE\n* BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n* Renesas reserves the right, without notice, to make changes to this software\n* and to discontinue the availability of this software. By using this software,\n* you agree to the additional terms and conditions found by accessing the\n* following link:\n* http://www.renesas.com/disclaimer\n* Copyright (C) 2012 - 2014 Renesas Electronics Corporation. All rights reserved.\n*******************************************************************************/\n/*******************************************************************************\n* File Name : usb0_host_usbint.c\n* $Rev: 1116 $\n* $Date:: 2014-07-09 16:29:19 +0900#$\n* Device(s) : RZ/A1H\n* Tool-Chain :\n* OS : None\n* H/W Platform :\n* Description : RZ/A1H R7S72100 USB Sample Program\n* Operation :\n* Limitations :\n*******************************************************************************/\n\n\n/*******************************************************************************\nIncludes <System Includes> , \"Project Includes\"\n*******************************************************************************/\n#include \"usb0_host.h\"\n#if(1) /* ohci_wrapp */\n#include \"ohci_wrapp_RZ_A1_local.h\"\n#endif\n\n\n/*******************************************************************************\nTypedef definitions\n*******************************************************************************/\n\n\n/*******************************************************************************\nMacro definitions\n*******************************************************************************/\n\n\n/*******************************************************************************\nImported global variables and functions (from other files)\n*******************************************************************************/\n\n\n/*******************************************************************************\nExported global variables and functions (to be accessed by other files)\n*******************************************************************************/\nstatic void usb0_host_interrupt1(void);\nstatic void usb0_host_BRDYInterrupt(uint16_t Status, uint16_t Int_enbl);\nstatic void usb0_host_NRDYInterrupt(uint16_t Status, uint16_t Int_enbl);\nstatic void usb0_host_BEMPInterrupt(uint16_t Status, uint16_t Int_enbl);\n\n\n/*******************************************************************************\nPrivate global variables and functions\n*******************************************************************************/\n\n\n/*******************************************************************************\n* Function Name: usb0_host_interrupt\n* Description : Executes USB interrupt.\n* : Register this function in the USB interrupt handler.\n* : Set CFIF0 in the pipe set before the interrupt after executing\n* : this function.\n* Arguments : uint32_t int_sense ; Interrupts detection mode\n* : ; INTC_LEVEL_SENSITIVE : Level sense\n* : ; INTC_EDGE_TRIGGER : Edge trigger\n* Return Value : none\n*******************************************************************************/\nvoid usb0_host_interrupt (uint32_t int_sense)\n{\n uint16_t savepipe1;\n uint16_t savepipe2;\n uint16_t buffer;\n\n savepipe1 = USB200.CFIFOSEL;\n savepipe2 = USB200.PIPESEL;\n usb0_host_interrupt1();\n\n /* Control transmission changes ISEL within interruption processing. */\n /* For this reason, write return of ISEL cannot be performed. */\n buffer = USB200.CFIFOSEL;\n buffer &= (uint16_t)~(USB_HOST_BITCURPIPE);\n buffer |= (uint16_t)(savepipe1 & USB_HOST_BITCURPIPE);\n USB200.CFIFOSEL = buffer;\n USB200.PIPESEL = savepipe2;\n}\n\n/*******************************************************************************\n* Function Name: usb0_host_interrupt1\n* Description : Execue the USB interrupt.\n* Arguments : none\n* Return Value : none\n*******************************************************************************/\nvoid usb0_host_interrupt1 (void)\n{\n uint16_t intsts0;\n uint16_t intsts1;\n uint16_t intenb0;\n uint16_t intenb1;\n uint16_t brdysts;\n uint16_t nrdysts;\n uint16_t bempsts;\n uint16_t brdyenb;\n uint16_t nrdyenb;\n uint16_t bempenb;\n volatile uint16_t dumy_sts;\n\n intsts0 = USB200.INTSTS0;\n intsts1 = USB200.INTSTS1;\n intenb0 = USB200.INTENB0;\n intenb1 = USB200.INTENB1;\n\n if ((intsts1 & USB_HOST_BITBCHG) && (intenb1 & USB_HOST_BITBCHGE))\n {\n USB200.INTSTS1 = (uint16_t)~USB_HOST_BITBCHG;\n RZA_IO_RegWrite_16(&USB200.INTENB1,\n 0,\n USB_INTENB1_BCHGE_SHIFT,\n USB_INTENB1_BCHGE);\n g_usb0_host_bchg_flag = USB_HOST_YES;\n }\n else if ((intsts1 & USB_HOST_BITSACK) && (intenb1 & USB_HOST_BITSACKE))\n {\n USB200.INTSTS1 = (uint16_t)~USB_HOST_BITSACK;\n#if(1) /* ohci_wrapp */\n ohciwrapp_loc_TransEnd(USB_HOST_PIPE0, TD_CC_NOERROR);\n#else\n g_usb0_host_CmdStage &= (~USB_HOST_CMD_FIELD);\n g_usb0_host_CmdStage |= USB_HOST_CMD_DONE;\n#endif\n }\n else if ((intsts1 & USB_HOST_BITSIGN) && (intenb1 & USB_HOST_BITSIGNE))\n {\n USB200.INTSTS1 = (uint16_t)~USB_HOST_BITSIGN;\n#if(1) /* ohci_wrapp */\n g_usb0_host_pipe_status[USB_HOST_PIPE0] = USB_HOST_PIPE_NORES; /* exit NORES */\n ohciwrapp_loc_TransEnd(USB_HOST_PIPE0, TD_CC_STALL);\n#else\n g_usb0_host_CmdStage &= (~USB_HOST_CMD_FIELD);\n g_usb0_host_CmdStage |= USB_HOST_CMD_NORES;\n#endif\n }\n else if (((intsts1 & USB_HOST_BITDTCH) == USB_HOST_BITDTCH)\n && ((intenb1 & USB_HOST_BITDTCHE) == USB_HOST_BITDTCHE))\n {\n USB200.INTSTS1 = (uint16_t)~USB_HOST_BITDTCH;\n RZA_IO_RegWrite_16(&USB200.INTENB1,\n 0,\n USB_INTENB1_DTCHE_SHIFT,\n USB_INTENB1_DTCHE);\n g_usb0_host_detach_flag = USB_HOST_YES;\n\n Userdef_USB_usb0_host_detach();\n\n usb0_host_UsbDetach2();\n }\n else if (((intsts1 & USB_HOST_BITATTCH) == USB_HOST_BITATTCH)\n && ((intenb1 & USB_HOST_BITATTCHE) == USB_HOST_BITATTCHE))\n {\n USB200.INTSTS1 = (uint16_t)~USB_HOST_BITATTCH;\n RZA_IO_RegWrite_16(&USB200.INTENB1,\n 0,\n USB_INTENB1_ATTCHE_SHIFT,\n USB_INTENB1_ATTCHE);\n g_usb0_host_attach_flag = USB_HOST_YES;\n\n Userdef_USB_usb0_host_attach();\n\n usb0_host_UsbAttach();\n }\n else if ((intsts0 & intenb0 & (USB_HOST_BITBEMP | USB_HOST_BITNRDY | USB_HOST_BITBRDY)))\n {\n brdysts = USB200.BRDYSTS;\n nrdysts = USB200.NRDYSTS;\n bempsts = USB200.BEMPSTS;\n brdyenb = USB200.BRDYENB;\n nrdyenb = USB200.NRDYENB;\n bempenb = USB200.BEMPENB;\n\n if ((intsts0 & USB_HOST_BITBRDY) && (intenb0 & USB_HOST_BITBRDYE) && (brdysts & brdyenb))\n {\n usb0_host_BRDYInterrupt(brdysts, brdyenb);\n }\n else if ((intsts0 & USB_HOST_BITBEMP) && (intenb0 & USB_HOST_BITBEMPE) && (bempsts & bempenb))\n {\n usb0_host_BEMPInterrupt(bempsts, bempenb);\n }\n else if ((intsts0 & USB_HOST_BITNRDY) && (intenb0 & USB_HOST_BITNRDYE) && (nrdysts & nrdyenb))\n {\n usb0_host_NRDYInterrupt(nrdysts, nrdyenb);\n }\n else\n {\n /* Do Nothing */\n }\n }\n else\n {\n /* Do Nothing */\n }\n\n /* Three dummy read for clearing interrupt requests */\n dumy_sts = USB200.INTSTS0;\n dumy_sts = USB200.INTSTS1;\n\n}\n\n/*******************************************************************************\n* Function Name: usb0_host_BRDYInterrupt\n* Description : Executes USB BRDY interrupt.\n* Arguments : uint16_t Status ; BRDYSTS Register Value\n* : uint16_t Int_enbl ; BRDYENB Register Value\n* Return Value : none\n*******************************************************************************/\nvoid usb0_host_BRDYInterrupt (uint16_t Status, uint16_t Int_enbl)\n{\n uint16_t buffer;\n volatile uint16_t dumy_sts;\n\n if ((Status & g_usb0_host_bit_set[USB_HOST_PIPE0]) && (Int_enbl & g_usb0_host_bit_set[USB_HOST_PIPE0]))\n {\n USB200.BRDYSTS = (uint16_t)~g_usb0_host_bit_set[USB_HOST_PIPE0];\n\n#if(1) /* ohci_wrapp */\n switch ((g_usb0_host_CmdStage & (USB_HOST_STAGE_FIELD | USB_HOST_CMD_FIELD)))\n {\n case (USB_HOST_STAGE_STATUS | USB_HOST_CMD_DOING):\n buffer = usb0_host_read_buffer_c(USB_HOST_PIPE0);\n usb0_host_disable_brdy_int(USB_HOST_PIPE0);\n g_usb0_host_CmdStage &= (~USB_HOST_CMD_FIELD);\n g_usb0_host_CmdStage |= USB_HOST_CMD_DONE;\n ohciwrapp_loc_TransEnd(USB_HOST_PIPE0, TD_CC_NOERROR);\n break;\n\n case (USB_HOST_STAGE_DATA | USB_HOST_CMD_DOING):\n buffer = usb0_host_read_buffer_c(USB_HOST_PIPE0);\n switch (buffer)\n {\n case USB_HOST_READING: /* Continue of data read */\n break;\n\n case USB_HOST_READEND: /* End of data read */\n case USB_HOST_READSHRT: /* End of data read */\n usb0_host_disable_brdy_int(USB_HOST_PIPE0);\n g_usb0_host_CmdStage &= (~USB_HOST_CMD_FIELD);\n g_usb0_host_CmdStage |= USB_HOST_CMD_DONE;\n ohciwrapp_loc_TransEnd(USB_HOST_PIPE0, TD_CC_NOERROR);\n break;\n\n case USB_HOST_READOVER: /* buffer over */\n USB200.CFIFOCTR = USB_HOST_BITBCLR;\n usb0_host_disable_brdy_int(USB_HOST_PIPE0);\n g_usb0_host_CmdStage &= (~USB_HOST_CMD_FIELD);\n g_usb0_host_CmdStage |= USB_HOST_CMD_DONE;\n ohciwrapp_loc_TransEnd(USB_HOST_PIPE0, TD_CC_NOERROR);\n break;\n\n case USB_HOST_FIFOERROR: /* FIFO access error */\n default:\n break;\n }\n break;\n\n default:\n break;\n }\n#else\n switch ((g_usb0_host_CmdStage & (USB_HOST_MODE_FIELD | USB_HOST_STAGE_FIELD | USB_HOST_CMD_FIELD)))\n {\n case (USB_HOST_MODE_WRITE | USB_HOST_STAGE_STATUS | USB_HOST_CMD_DOING):\n case (USB_HOST_MODE_NO_DATA | USB_HOST_STAGE_STATUS | USB_HOST_CMD_DOING):\n buffer = usb0_host_read_buffer_c(USB_HOST_PIPE0);\n usb0_host_disable_brdy_int(USB_HOST_PIPE0);\n g_usb0_host_CmdStage &= (~USB_HOST_CMD_FIELD);\n g_usb0_host_CmdStage |= USB_HOST_CMD_DONE;\n break;\n\n case (USB_HOST_MODE_READ | USB_HOST_STAGE_DATA | USB_HOST_CMD_DOING):\n buffer = usb0_host_read_buffer_c(USB_HOST_PIPE0);\n\n switch (buffer)\n {\n case USB_HOST_READING: /* Continue of data read */\n break;\n\n case USB_HOST_READEND: /* End of data read */\n case USB_HOST_READSHRT: /* End of data read */\n usb0_host_disable_brdy_int(USB_HOST_PIPE0);\n g_usb0_host_CmdStage &= (~USB_HOST_CMD_FIELD);\n g_usb0_host_CmdStage |= USB_HOST_CMD_DONE;\n break;\n\n case USB_HOST_READOVER: /* buffer over */\n USB200.CFIFOCTR = USB_HOST_BITBCLR;\n usb0_host_disable_brdy_int(USB_HOST_PIPE0);\n g_usb0_host_CmdStage &= (~USB_HOST_CMD_FIELD);\n g_usb0_host_CmdStage |= USB_HOST_CMD_DONE;\n break;\n\n case USB_HOST_FIFOERROR: /* FIFO access error */\n default:\n break;\n }\n break;\n\n default:\n break;\n }\n#endif\n }\n else\n {\n usb0_host_brdy_int(Status, Int_enbl);\n }\n\n /* Three dummy reads for clearing interrupt requests */\n dumy_sts = USB200.BRDYSTS;\n}\n\n/*******************************************************************************\n* Function Name: usb0_host_NRDYInterrupt\n* Description : Executes USB NRDY interrupt.\n* Arguments : uint16_t Status ; NRDYSTS Register Value\n* : uint16_t Int_enbl ; NRDYENB Register Value\n* Return Value : none\n*******************************************************************************/\nvoid usb0_host_NRDYInterrupt (uint16_t Status, uint16_t Int_enbl)\n{\n uint16_t pid;\n volatile uint16_t dumy_sts;\n\n if ((Status & g_usb0_host_bit_set[USB_HOST_PIPE0]) && (Int_enbl & g_usb0_host_bit_set[USB_HOST_PIPE0]))\n {\n USB200.NRDYSTS = (uint16_t)~g_usb0_host_bit_set[USB_HOST_PIPE0];\n pid = usb0_host_get_pid(USB_HOST_PIPE0);\n\n if ((pid == USB_HOST_PID_STALL) || (pid == USB_HOST_PID_STALL2))\n {\n g_usb0_host_CmdStage &= (~USB_HOST_CMD_FIELD);\n g_usb0_host_CmdStage |= USB_HOST_CMD_STALL;\n#if(1) /* ohci_wrapp */\n g_usb0_host_pipe_status[USB_HOST_PIPE0] = USB_HOST_PIPE_STALL;\n ohciwrapp_loc_TransEnd(USB_HOST_PIPE0, TD_CC_STALL);\n#endif\n }\n else if (pid == USB_HOST_PID_NAK)\n {\n g_usb0_host_CmdStage &= (~USB_HOST_CMD_FIELD);\n g_usb0_host_CmdStage |= USB_HOST_CMD_NORES;\n#if(1) /* ohci_wrapp */\n g_usb0_host_pipe_status[USB_HOST_PIPE0] = USB_HOST_PIPE_NORES;\n ohciwrapp_loc_TransEnd(USB_HOST_PIPE0, TD_CC_STALL);\n#endif\n }\n else\n {\n /* Do Nothing */\n }\n }\n else\n {\n usb0_host_nrdy_int(Status, Int_enbl);\n }\n\n /* Three dummy reads for clearing interrupt requests */\n dumy_sts = USB200.NRDYSTS;\n}\n\n/*******************************************************************************\n* Function Name: usb0_host_BEMPInterrupt\n* Description : Executes USB BEMP interrupt.\n* Arguments : uint16_t Status ; BEMPSTS Register Value\n* : uint16_t Int_enbl ; BEMPENB Register Value\n* Return Value : none\n*******************************************************************************/\nvoid usb0_host_BEMPInterrupt (uint16_t Status, uint16_t Int_enbl)\n{\n uint16_t buffer;\n uint16_t pid;\n volatile uint16_t dumy_sts;\n\n if ((Status & g_usb0_host_bit_set[USB_HOST_PIPE0]) && (Int_enbl & g_usb0_host_bit_set[USB_HOST_PIPE0]))\n {\n USB200.BEMPSTS = (uint16_t)~g_usb0_host_bit_set[USB_HOST_PIPE0];\n pid = usb0_host_get_pid(USB_HOST_PIPE0);\n\n if ((pid == USB_HOST_PID_STALL) || (pid == USB_HOST_PID_STALL2))\n {\n g_usb0_host_CmdStage &= (~USB_HOST_CMD_FIELD);\n g_usb0_host_CmdStage |= USB_HOST_CMD_STALL;\n#if(1) /* ohci_wrapp */\n g_usb0_host_pipe_status[USB_HOST_PIPE0] = USB_HOST_PIPE_STALL; /* exit STALL */\n ohciwrapp_loc_TransEnd(USB_HOST_PIPE0, TD_CC_STALL);\n#endif\n }\n else\n {\n#if(1) /* ohci_wrapp */\n switch ((g_usb0_host_CmdStage & (USB_HOST_STAGE_FIELD | USB_HOST_CMD_FIELD)))\n {\n case (USB_HOST_STAGE_STATUS | USB_HOST_CMD_DOING):\n g_usb0_host_CmdStage &= (~USB_HOST_CMD_FIELD);\n g_usb0_host_CmdStage |= USB_HOST_CMD_DONE;\n ohciwrapp_loc_TransEnd(USB_HOST_PIPE0, TD_CC_NOERROR);\n break;\n\n case (USB_HOST_STAGE_DATA | USB_HOST_CMD_DOING):\n buffer = usb0_host_write_buffer(USB_HOST_PIPE0);\n switch (buffer)\n {\n case USB_HOST_WRITING: /* Continue of data write */\n case USB_HOST_WRITEEND: /* End of data write (zero-length) */\n break;\n\n case USB_HOST_WRITESHRT: /* End of data write */\n g_usb0_host_CmdStage &= (~USB_HOST_STAGE_FIELD);\n g_usb0_host_CmdStage |= USB_HOST_STAGE_STATUS;\n ohciwrapp_loc_TransEnd(USB_HOST_PIPE0, TD_CC_NOERROR);\n break;\n\n case USB_HOST_FIFOERROR: /* FIFO access error */\n default:\n break;\n }\n break;\n\n default:\n /* do nothing */\n break;\n }\n#else\n switch ((g_usb0_host_CmdStage & (USB_HOST_MODE_FIELD | USB_HOST_STAGE_FIELD | USB_HOST_CMD_FIELD)))\n {\n case (USB_HOST_MODE_READ | USB_HOST_STAGE_STATUS | USB_HOST_CMD_DOING):\n g_usb0_host_CmdStage &= (~USB_HOST_CMD_FIELD);\n g_usb0_host_CmdStage |= USB_HOST_CMD_DONE;\n break;\n\n case (USB_HOST_MODE_WRITE | USB_HOST_STAGE_DATA | USB_HOST_CMD_DOING):\n buffer = usb0_host_write_buffer(USB_HOST_PIPE0);\n switch (buffer)\n {\n case USB_HOST_WRITING: /* Continue of data write */\n case USB_HOST_WRITEEND: /* End of data write (zero-length) */\n break;\n\n case USB_HOST_WRITESHRT: /* End of data write */\n g_usb0_host_CmdStage &= (~USB_HOST_STAGE_FIELD);\n g_usb0_host_CmdStage |= USB_HOST_STAGE_STATUS;\n break;\n\n case USB_HOST_FIFOERROR: /* FIFO access error */\n default:\n break;\n }\n break;\n\n case (USB_HOST_MODE_WRITE | USB_HOST_STAGE_STATUS | USB_HOST_CMD_DOING):\n g_usb0_host_CmdStage &= (~USB_HOST_CMD_FIELD);\n g_usb0_host_CmdStage |= USB_HOST_CMD_IDLE;\n break;\n\n default:\n /* do nothing */\n break;\n }\n#endif\n }\n }\n else\n {\n usb0_host_bemp_int(Status, Int_enbl);\n }\n\n /* Three dummy reads for clearing interrupt requests */\n dumy_sts = USB200.BEMPSTS;\n}\n\n/* End of File */\n"} +{"text": "string:last-child\n\n"} +{"text": "scilla_version 0\n\n(***************************************************)\n(* The contract definition *)\n(***************************************************)\ncontract Wallet()\n\n(* Submit a transaction for future signoff *)\ntransition SubmitTransaction (sxamount : Uint128)\nend\n\n(* Execute signed-off transaction *)\ntransition ExecuteTransaction ()\n bal <- _balance;\n not_enough_money = builtin lt bal sxamount\nend\n"} +{"text": "package com.blogcode.yml;\n\nimport org.springframework.beans.factory.BeanFactory;\nimport org.springframework.beans.factory.config.YamlPropertiesFactoryBean;\nimport org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerProperties;\nimport org.springframework.boot.autoconfigure.security.oauth2.resource.UserInfoTokenServices;\nimport org.springframework.boot.context.properties.ConfigurationProperties;\nimport org.springframework.boot.web.servlet.FilterRegistrationBean;\nimport org.springframework.context.annotation.Bean;\nimport org.springframework.context.annotation.Configuration;\nimport org.springframework.context.annotation.Primary;\nimport org.springframework.context.support.PropertySourcesPlaceholderConfigurer;\nimport org.springframework.core.io.ClassPathResource;\nimport org.springframework.security.oauth2.client.OAuth2ClientContext;\nimport org.springframework.security.oauth2.client.OAuth2RestTemplate;\nimport org.springframework.security.oauth2.client.filter.OAuth2ClientAuthenticationProcessingFilter;\nimport org.springframework.security.oauth2.client.filter.OAuth2ClientContextFilter;\nimport org.springframework.security.oauth2.client.resource.OAuth2ProtectedResourceDetails;\nimport org.springframework.security.oauth2.client.token.grant.code.AuthorizationCodeResourceDetails;\nimport org.springframework.security.oauth2.config.annotation.web.configuration.EnableOAuth2Client;\nimport org.springframework.security.web.authentication.AuthenticationSuccessHandler;\n\nimport javax.servlet.Filter;\n\n/**\n * Created by jojoldu@gmail.com on 2017. 8. 16.\n * Blog : http://jojoldu.tistory.com\n * Github : https://github.com/jojoldu\n */\n\n@Configuration\n@EnableOAuth2Client\npublic class OAuthConfig {\n\n private OAuth2ClientContext oauth2ClientContext;\n private BeanFactory beanFactory;\n\n public OAuthConfig(OAuth2ClientContext oauth2ClientContext, BeanFactory beanFactory) {\n this.oauth2ClientContext = oauth2ClientContext;\n this.beanFactory = beanFactory;\n }\n\n @Bean\n public Filter ssoFilter() {\n OAuth2ClientAuthenticationProcessingFilter oauth2Filter = new OAuth2ClientAuthenticationProcessingFilter(\"/login\");\n OAuth2RestTemplate oAuth2RestTemplate = new OAuth2RestTemplate(googleClient(), oauth2ClientContext);\n oauth2Filter.setRestTemplate(oAuth2RestTemplate);\n oauth2Filter.setTokenServices(new UserInfoTokenServices(googleResource().getUserInfoUri(), googleClient().getClientId()));\n oauth2Filter.setAuthenticationSuccessHandler(successHandler()); // 인증 성공시 진행될 Handler 등록\n return oauth2Filter;\n }\n\n @Bean\n public AuthenticationSuccessHandler successHandler(){\n return (request, response, authentication) -> {\n System.out.println(\"성공!\");\n response.sendRedirect(\"/\");\n };\n }\n\n @Bean\n @ConfigurationProperties(\"google.client\")\n public OAuth2ProtectedResourceDetails googleClient() {\n System.out.println(\"google client Call\");\n return new AuthorizationCodeResourceDetails();\n }\n\n @Bean\n @ConfigurationProperties(\"google.resource\")\n public ResourceServerProperties googleResource() {\n System.out.println(\"google resource Call\");\n return new ResourceServerProperties();\n }\n\n @Bean\n public FilterRegistrationBean oauth2ClientFilterRegistration(OAuth2ClientContextFilter filter) {\n FilterRegistrationBean registration = new FilterRegistrationBean();\n registration.setFilter(filter);\n registration.setOrder(-100);\n return registration;\n }\n\n @Bean\n @Primary\n public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {\n\n System.out.println(\"google yml Call\");\n\n YamlPropertiesFactoryBean yaml = new YamlPropertiesFactoryBean();\n yaml.setResources(new ClassPathResource(\"google.yml\"));\n\n PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer = new PropertySourcesPlaceholderConfigurer();\n propertySourcesPlaceholderConfigurer.setProperties(yaml.getObject());\n return propertySourcesPlaceholderConfigurer;\n }\n}\n"} +{"text": "import { ADD_VACCINATION_SUCCESS } from '../constants/actions';\n\nexport default () => ({\n type: ADD_VACCINATION_SUCCESS,\n});\n"} +{"text": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"utf-8\">\n <title>JSDoc: Class: OldView</title>\n\n <script src=\"scripts/prettify/prettify.js\"> </script>\n <script src=\"scripts/prettify/lang-css.js\"> </script>\n <!--[if lt IE 9]>\n <script src=\"//html5shiv.googlecode.com/svn/trunk/html5.js\"></script>\n <![endif]-->\n <link type=\"text/css\" rel=\"stylesheet\" href=\"styles/prettify-tomorrow.css\">\n <link type=\"text/css\" rel=\"stylesheet\" href=\"styles/jsdoc-default.css\">\n</head>\n\n<body>\n\n<div id=\"main\">\n\n <h1 class=\"page-title\">Class: OldView</h1>\n\n \n\n\n\n\n<section>\n\n<header>\n \n <h2>OldView</h2>\n \n \n</header>\n\n<article>\n <div class=\"container-overview\">\n \n \n\n \n\n <h4 class=\"name\" id=\"OldView\"><span class=\"type-signature\"></span>new OldView<span class=\"signature\">(viewName)</span><span class=\"type-signature\"></span></h4>\n\n \n\n\n\n<div class=\"description\">\n The view constructor.\n</div>\n\n\n\n\n\n\n\n\n\n <h5>Parameters:</h5>\n \n\n<table class=\"params\">\n <thead>\n <tr>\n \n <th>Name</th>\n \n\n <th>Type</th>\n\n \n\n \n\n <th class=\"last\">Description</th>\n </tr>\n </thead>\n\n <tbody>\n \n\n <tr>\n \n <td class=\"name\"><code>viewName</code></td>\n \n\n <td class=\"type\">\n \n </td>\n\n \n\n \n\n <td class=\"description last\"></td>\n </tr>\n\n \n </tbody>\n</table>\n\n\n\n\n\n\n<dl class=\"details\">\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <dt class=\"tag-source\">Source:</dt>\n <dd class=\"tag-source\"><ul class=\"dummy\"><li>\n <a href=\"OldView.js.html\">OldView.js</a>, <a href=\"OldView.js.html#line19\">line 19</a>\n </li></ul></dd>\n \n\n \n\n \n\n \n</dl>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n </div>\n\n \n\n \n\n \n\n \n\n \n\n \n <h3 class=\"subsection-title\">Methods</h3>\n\n <ul><li><a href=\"#bind\"><span class=\"type-signature\"></span>bind<span class=\"signature\">(selector, options)</span><span class=\"type-signature\"></span></a></li><li><a href=\"#bindRender\"><span class=\"type-signature\"></span>bindRender<span class=\"signature\">(bindSelector, domHandler<span class=\"signature-attributes\">opt</span>)</span><span class=\"type-signature\"></span></a></li><li><a href=\"#bindSortDom\"><span class=\"type-signature\"></span>bindSortDom<span class=\"signature\">(selector, itemArr)</span><span class=\"type-signature\"></span></a></li><li><a href=\"#count\"><span class=\"type-signature\"></span>count<span class=\"signature\">()</span><span class=\"type-signature\"> &rarr; {Number}</span></a></li><li><a href=\"#db\"><span class=\"type-signature\"></span>db<span class=\"signature\">(db)</span><span class=\"type-signature\"> &rarr; {*}</span></a></li><li><a href=\"#drop\"><span class=\"type-signature\"></span>drop<span class=\"signature\">()</span><span class=\"type-signature\"> &rarr; {boolean}</span></a></li><li><a href=\"#find\"><span class=\"type-signature\"></span>find<span class=\"signature\">()</span><span class=\"type-signature\"> &rarr; {*}</span></a></li><li><a href=\"#from\"><span class=\"type-signature\"></span>from<span class=\"signature\">(collection)</span><span class=\"type-signature\"> &rarr; {*}</span></a></li><li><a href=\"#insert\"><span class=\"type-signature\"></span>insert<span class=\"signature\">()</span><span class=\"type-signature\"> &rarr; {*}</span></a></li><li><a href=\"#isBound\"><span class=\"type-signature\"></span>isBound<span class=\"signature\">(selector)</span><span class=\"type-signature\"> &rarr; {boolean}</span></a></li><li><a href=\"#primaryKey\"><span class=\"type-signature\"></span>primaryKey<span class=\"signature\">()</span><span class=\"type-signature\"> &rarr; {String}</span></a></li><li><a href=\"#query\"><span class=\"type-signature\"></span>query<span class=\"signature\">(query<span class=\"signature-attributes\">opt</span>, refresh<span class=\"signature-attributes\">opt</span>)</span><span class=\"type-signature\"> &rarr; {*}</span></a></li><li><a href=\"#queryAdd\"><span class=\"type-signature\"></span>queryAdd<span class=\"signature\">(obj, overwrite, refresh<span class=\"signature-attributes\">opt</span>)</span><span class=\"type-signature\"></span></a></li><li><a href=\"#queryData\"><span class=\"type-signature\"></span>queryData<span class=\"signature\">(query<span class=\"signature-attributes\">opt</span>, options<span class=\"signature-attributes\">opt</span>, refresh<span class=\"signature-attributes\">opt</span>)</span><span class=\"type-signature\"> &rarr; {*}</span></a></li><li><a href=\"#queryOptions\"><span class=\"type-signature\"></span>queryOptions<span class=\"signature\">(options<span class=\"signature-attributes\">opt</span>, refresh<span class=\"signature-attributes\">opt</span>)</span><span class=\"type-signature\"> &rarr; {*}</span></a></li><li><a href=\"#queryRemove\"><span class=\"type-signature\"></span>queryRemove<span class=\"signature\">(obj, refresh<span class=\"signature-attributes\">opt</span>)</span><span class=\"type-signature\"></span></a></li><li><a href=\"#refresh\"><span class=\"type-signature\"></span>refresh<span class=\"signature\">()</span><span class=\"type-signature\"></span></a></li><li><a href=\"#remove\"><span class=\"type-signature\"></span>remove<span class=\"signature\">()</span><span class=\"type-signature\"> &rarr; {*}</span></a></li><li><a href=\"#unBind\"><span class=\"type-signature\"></span>unBind<span class=\"signature\">(selector)</span><span class=\"type-signature\"> &rarr; {<a href=\"Collection.html\">Collection</a>}</span></a></li><li><a href=\"#update\"><span class=\"type-signature\"></span>update<span class=\"signature\">()</span><span class=\"type-signature\"> &rarr; {*}</span></a></li></ul>\n\n \n \n\n \n\n <h4 class=\"name\" id=\"bind\"><span class=\"type-signature\"></span>bind<span class=\"signature\">(selector, options)</span><span class=\"type-signature\"></span></h4>\n\n \n\n\n\n<div class=\"description\">\n Binds a selector to the insert, update and delete events of a particular\nview and keeps the selector in sync so that updates are reflected on the\nweb page in real-time.\n</div>\n\n\n\n\n\n\n\n\n\n <h5>Parameters:</h5>\n \n\n<table class=\"params\">\n <thead>\n <tr>\n \n <th>Name</th>\n \n\n <th>Type</th>\n\n \n\n \n\n <th class=\"last\">Description</th>\n </tr>\n </thead>\n\n <tbody>\n \n\n <tr>\n \n <td class=\"name\"><code>selector</code></td>\n \n\n <td class=\"type\">\n \n \n<span class=\"param-type\">String</span>\n\n\n \n </td>\n\n \n\n \n\n <td class=\"description last\">The jQuery selector string to get target elements.</td>\n </tr>\n\n \n\n <tr>\n \n <td class=\"name\"><code>options</code></td>\n \n\n <td class=\"type\">\n \n \n<span class=\"param-type\">Object</span>\n\n\n \n </td>\n\n \n\n \n\n <td class=\"description last\">The options object.</td>\n </tr>\n\n \n </tbody>\n</table>\n\n\n\n\n\n\n<dl class=\"details\">\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <dt class=\"tag-source\">Source:</dt>\n <dd class=\"tag-source\"><ul class=\"dummy\"><li>\n <a href=\"OldView.Bind.js.html\">OldView.Bind.js</a>, <a href=\"OldView.Bind.js.html#line80\">line 80</a>\n </li></ul></dd>\n \n\n \n\n \n\n \n</dl>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n\n \n\n <h4 class=\"name\" id=\"bindRender\"><span class=\"type-signature\"></span>bindRender<span class=\"signature\">(bindSelector, domHandler<span class=\"signature-attributes\">opt</span>)</span><span class=\"type-signature\"></span></h4>\n\n \n\n\n\n<div class=\"description\">\n Renders a bind view data to the DOM.\n</div>\n\n\n\n\n\n\n\n\n\n <h5>Parameters:</h5>\n \n\n<table class=\"params\">\n <thead>\n <tr>\n \n <th>Name</th>\n \n\n <th>Type</th>\n\n \n <th>Attributes</th>\n \n\n \n\n <th class=\"last\">Description</th>\n </tr>\n </thead>\n\n <tbody>\n \n\n <tr>\n \n <td class=\"name\"><code>bindSelector</code></td>\n \n\n <td class=\"type\">\n \n \n<span class=\"param-type\">String</span>\n\n\n \n </td>\n\n \n <td class=\"attributes\">\n \n\n \n\n \n </td>\n \n\n \n\n <td class=\"description last\">The jQuery selector string to use to identify\nthe bind target. Must match the selector used when defining the original bind.</td>\n </tr>\n\n \n\n <tr>\n \n <td class=\"name\"><code>domHandler</code></td>\n \n\n <td class=\"type\">\n \n \n<span class=\"param-type\">function</span>\n\n\n \n </td>\n\n \n <td class=\"attributes\">\n \n &lt;optional><br>\n \n\n \n\n \n </td>\n \n\n \n\n <td class=\"description last\">If specified, this handler method will be called\nwith the final HTML for the view instead of the DB handling the DOM insertion.</td>\n </tr>\n\n \n </tbody>\n</table>\n\n\n\n\n\n\n<dl class=\"details\">\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <dt class=\"tag-source\">Source:</dt>\n <dd class=\"tag-source\"><ul class=\"dummy\"><li>\n <a href=\"OldView.Bind.js.html\">OldView.Bind.js</a>, <a href=\"OldView.Bind.js.html#line189\">line 189</a>\n </li></ul></dd>\n \n\n \n\n \n\n \n</dl>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n\n \n\n <h4 class=\"name\" id=\"bindSortDom\"><span class=\"type-signature\"></span>bindSortDom<span class=\"signature\">(selector, itemArr)</span><span class=\"type-signature\"></span></h4>\n\n \n\n\n\n<div class=\"description\">\n Sorts items in the DOM based on the bind settings and the passed item array.\n</div>\n\n\n\n\n\n\n\n\n\n <h5>Parameters:</h5>\n \n\n<table class=\"params\">\n <thead>\n <tr>\n \n <th>Name</th>\n \n\n <th>Type</th>\n\n \n\n \n\n <th class=\"last\">Description</th>\n </tr>\n </thead>\n\n <tbody>\n \n\n <tr>\n \n <td class=\"name\"><code>selector</code></td>\n \n\n <td class=\"type\">\n \n \n<span class=\"param-type\">String</span>\n\n\n \n </td>\n\n \n\n \n\n <td class=\"description last\">The jQuery selector of the bind container.</td>\n </tr>\n\n \n\n <tr>\n \n <td class=\"name\"><code>itemArr</code></td>\n \n\n <td class=\"type\">\n \n \n<span class=\"param-type\">Array</span>\n\n\n \n </td>\n\n \n\n \n\n <td class=\"description last\">The array of items used to determine the order the DOM\nelements should be in based on the order they are in, in the array.</td>\n </tr>\n\n \n </tbody>\n</table>\n\n\n\n\n\n\n<dl class=\"details\">\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <dt class=\"tag-source\">Source:</dt>\n <dd class=\"tag-source\"><ul class=\"dummy\"><li>\n <a href=\"OldView.Bind.js.html\">OldView.Bind.js</a>, <a href=\"OldView.Bind.js.html#line115\">line 115</a>\n </li></ul></dd>\n \n\n \n\n \n\n \n</dl>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n\n \n\n <h4 class=\"name\" id=\"count\"><span class=\"type-signature\"></span>count<span class=\"signature\">()</span><span class=\"type-signature\"> &rarr; {Number}</span></h4>\n\n \n\n\n\n<div class=\"description\">\n Returns the number of documents currently in the view.\n</div>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<dl class=\"details\">\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <dt class=\"tag-source\">Source:</dt>\n <dd class=\"tag-source\"><ul class=\"dummy\"><li>\n <a href=\"OldView.js.html\">OldView.js</a>, <a href=\"OldView.js.html#line498\">line 498</a>\n </li></ul></dd>\n \n\n \n\n \n\n \n</dl>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<h5>Returns:</h5>\n\n \n\n\n<dl>\n <dt>\n Type\n </dt>\n <dd>\n \n<span class=\"param-type\">Number</span>\n\n\n </dd>\n</dl>\n\n \n\n\n\n \n \n\n \n\n <h4 class=\"name\" id=\"db\"><span class=\"type-signature\"></span>db<span class=\"signature\">(db)</span><span class=\"type-signature\"> &rarr; {*}</span></h4>\n\n \n\n\n\n<div class=\"description\">\n Gets / sets the DB the view is bound against. Automatically set\nwhen the db.oldView(viewName) method is called.\n</div>\n\n\n\n\n\n\n\n\n\n <h5>Parameters:</h5>\n \n\n<table class=\"params\">\n <thead>\n <tr>\n \n <th>Name</th>\n \n\n <th>Type</th>\n\n \n\n \n\n <th class=\"last\">Description</th>\n </tr>\n </thead>\n\n <tbody>\n \n\n <tr>\n \n <td class=\"name\"><code>db</code></td>\n \n\n <td class=\"type\">\n \n </td>\n\n \n\n \n\n <td class=\"description last\"></td>\n </tr>\n\n \n </tbody>\n</table>\n\n\n\n\n\n\n<dl class=\"details\">\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <dt class=\"tag-source\">Source:</dt>\n <dd class=\"tag-source\"><ul class=\"dummy\"><li>\n <a href=\"OldView.js.html\">OldView.js</a>, <a href=\"OldView.js.html#line108\">line 108</a>\n </li></ul></dd>\n \n\n \n\n \n\n \n</dl>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<h5>Returns:</h5>\n\n \n\n\n<dl>\n <dt>\n Type\n </dt>\n <dd>\n \n<span class=\"param-type\">*</span>\n\n\n </dd>\n</dl>\n\n \n\n\n\n \n \n\n \n\n <h4 class=\"name\" id=\"drop\"><span class=\"type-signature\"></span>drop<span class=\"signature\">()</span><span class=\"type-signature\"> &rarr; {boolean}</span></h4>\n\n \n\n\n\n<div class=\"description\">\n Drops a view and all it's stored data from the database.\n</div>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<dl class=\"details\">\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <dt class=\"tag-source\">Source:</dt>\n <dd class=\"tag-source\"><ul class=\"dummy\"><li>\n <a href=\"OldView.js.html\">OldView.js</a>, <a href=\"OldView.js.html#line71\">line 71</a>\n </li></ul></dd>\n \n\n \n\n \n\n \n</dl>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<h5>Returns:</h5>\n\n \n<div class=\"param-desc\">\n True on success, false on failure.\n</div>\n\n\n\n<dl>\n <dt>\n Type\n </dt>\n <dd>\n \n<span class=\"param-type\">boolean</span>\n\n\n </dd>\n</dl>\n\n \n\n\n\n \n \n\n \n\n <h4 class=\"name\" id=\"find\"><span class=\"type-signature\"></span>find<span class=\"signature\">()</span><span class=\"type-signature\"> &rarr; {*}</span></h4>\n\n \n\n\n\n<div class=\"description\">\n Queries the view data. See Collection.find() for more information.\n</div>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<dl class=\"details\">\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <dt class=\"tag-source\">Source:</dt>\n <dd class=\"tag-source\"><ul class=\"dummy\"><li>\n <a href=\"OldView.js.html\">OldView.js</a>, <a href=\"OldView.js.html#line506\">line 506</a>\n </li></ul></dd>\n \n\n \n\n \n\n \n</dl>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<h5>Returns:</h5>\n\n \n\n\n<dl>\n <dt>\n Type\n </dt>\n <dd>\n \n<span class=\"param-type\">*</span>\n\n\n </dd>\n</dl>\n\n \n\n\n\n \n \n\n \n\n <h4 class=\"name\" id=\"from\"><span class=\"type-signature\"></span>from<span class=\"signature\">(collection)</span><span class=\"type-signature\"> &rarr; {*}</span></h4>\n\n \n\n\n\n<div class=\"description\">\n Gets / sets the collection that the view derives it's data from.\n</div>\n\n\n\n\n\n\n\n\n\n <h5>Parameters:</h5>\n \n\n<table class=\"params\">\n <thead>\n <tr>\n \n <th>Name</th>\n \n\n <th>Type</th>\n\n \n\n \n\n <th class=\"last\">Description</th>\n </tr>\n </thead>\n\n <tbody>\n \n\n <tr>\n \n <td class=\"name\"><code>collection</code></td>\n \n\n <td class=\"type\">\n \n \n<span class=\"param-type\">*</span>\n\n\n \n </td>\n\n \n\n \n\n <td class=\"description last\">A collection instance or the name of a collection\nto use as the data set to derive view data from.</td>\n </tr>\n\n \n </tbody>\n</table>\n\n\n\n\n\n\n<dl class=\"details\">\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <dt class=\"tag-source\">Source:</dt>\n <dd class=\"tag-source\"><ul class=\"dummy\"><li>\n <a href=\"OldView.js.html\">OldView.js</a>, <a href=\"OldView.js.html#line123\">line 123</a>\n </li></ul></dd>\n \n\n \n\n \n\n \n</dl>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<h5>Returns:</h5>\n\n \n\n\n<dl>\n <dt>\n Type\n </dt>\n <dd>\n \n<span class=\"param-type\">*</span>\n\n\n </dd>\n</dl>\n\n \n\n\n\n \n \n\n \n\n <h4 class=\"name\" id=\"insert\"><span class=\"type-signature\"></span>insert<span class=\"signature\">()</span><span class=\"type-signature\"> &rarr; {*}</span></h4>\n\n \n\n\n\n<div class=\"description\">\n Inserts into view data via the view collection. See Collection.insert() for more information.\n</div>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<dl class=\"details\">\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <dt class=\"tag-source\">Source:</dt>\n <dd class=\"tag-source\"><ul class=\"dummy\"><li>\n <a href=\"OldView.js.html\">OldView.js</a>, <a href=\"OldView.js.html#line522\">line 522</a>\n </li></ul></dd>\n \n\n \n\n \n\n \n</dl>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<h5>Returns:</h5>\n\n \n\n\n<dl>\n <dt>\n Type\n </dt>\n <dd>\n \n<span class=\"param-type\">*</span>\n\n\n </dd>\n</dl>\n\n \n\n\n\n \n \n\n \n\n <h4 class=\"name\" id=\"isBound\"><span class=\"type-signature\"></span>isBound<span class=\"signature\">(selector)</span><span class=\"type-signature\"> &rarr; {boolean}</span></h4>\n\n \n\n\n\n<div class=\"description\">\n Returns true if the selector is bound to the view.\n</div>\n\n\n\n\n\n\n\n\n\n <h5>Parameters:</h5>\n \n\n<table class=\"params\">\n <thead>\n <tr>\n \n <th>Name</th>\n \n\n <th>Type</th>\n\n \n\n \n\n <th class=\"last\">Description</th>\n </tr>\n </thead>\n\n <tbody>\n \n\n <tr>\n \n <td class=\"name\"><code>selector</code></td>\n \n\n <td class=\"type\">\n \n \n<span class=\"param-type\">String</span>\n\n\n \n </td>\n\n \n\n \n\n <td class=\"description last\">The jQuery selector string to identify the bind to check for.</td>\n </tr>\n\n \n </tbody>\n</table>\n\n\n\n\n\n\n<dl class=\"details\">\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <dt class=\"tag-source\">Source:</dt>\n <dd class=\"tag-source\"><ul class=\"dummy\"><li>\n <a href=\"OldView.Bind.js.html\">OldView.Bind.js</a>, <a href=\"OldView.Bind.js.html#line105\">line 105</a>\n </li></ul></dd>\n \n\n \n\n \n\n \n</dl>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<h5>Returns:</h5>\n\n \n\n\n<dl>\n <dt>\n Type\n </dt>\n <dd>\n \n<span class=\"param-type\">boolean</span>\n\n\n </dd>\n</dl>\n\n \n\n\n\n \n \n\n \n\n <h4 class=\"name\" id=\"primaryKey\"><span class=\"type-signature\"></span>primaryKey<span class=\"signature\">()</span><span class=\"type-signature\"> &rarr; {String}</span></h4>\n\n \n\n\n\n<div class=\"description\">\n Gets the primary key for this view from the assigned collection.\n</div>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<dl class=\"details\">\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <dt class=\"tag-source\">Source:</dt>\n <dd class=\"tag-source\"><ul class=\"dummy\"><li>\n <a href=\"OldView.js.html\">OldView.js</a>, <a href=\"OldView.js.html#line189\">line 189</a>\n </li></ul></dd>\n \n\n \n\n \n\n \n</dl>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<h5>Returns:</h5>\n\n \n\n\n<dl>\n <dt>\n Type\n </dt>\n <dd>\n \n<span class=\"param-type\">String</span>\n\n\n </dd>\n</dl>\n\n \n\n\n\n \n \n\n \n\n <h4 class=\"name\" id=\"query\"><span class=\"type-signature\"></span>query<span class=\"signature\">(query<span class=\"signature-attributes\">opt</span>, refresh<span class=\"signature-attributes\">opt</span>)</span><span class=\"type-signature\"> &rarr; {*}</span></h4>\n\n \n\n\n\n<div class=\"description\">\n Gets / sets the query being used to generate the view data.\n</div>\n\n\n\n\n\n\n\n\n\n <h5>Parameters:</h5>\n \n\n<table class=\"params\">\n <thead>\n <tr>\n \n <th>Name</th>\n \n\n <th>Type</th>\n\n \n <th>Attributes</th>\n \n\n \n\n <th class=\"last\">Description</th>\n </tr>\n </thead>\n\n <tbody>\n \n\n <tr>\n \n <td class=\"name\"><code>query</code></td>\n \n\n <td class=\"type\">\n \n \n<span class=\"param-type\">Object</span>\n\n\n \n </td>\n\n \n <td class=\"attributes\">\n \n &lt;optional><br>\n \n\n \n\n \n </td>\n \n\n \n\n <td class=\"description last\">The query to set.</td>\n </tr>\n\n \n\n <tr>\n \n <td class=\"name\"><code>refresh</code></td>\n \n\n <td class=\"type\">\n \n \n<span class=\"param-type\">Boolean</span>\n\n\n \n </td>\n\n \n <td class=\"attributes\">\n \n &lt;optional><br>\n \n\n \n\n \n </td>\n \n\n \n\n <td class=\"description last\">Whether to refresh the view data after\nthis operation. Defaults to true.</td>\n </tr>\n\n \n </tbody>\n</table>\n\n\n\n\n\n\n<dl class=\"details\">\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <dt class=\"tag-source\">Source:</dt>\n <dd class=\"tag-source\"><ul class=\"dummy\"><li>\n <a href=\"OldView.js.html\">OldView.js</a>, <a href=\"OldView.js.html#line286\">line 286</a>\n </li></ul></dd>\n \n\n \n\n \n\n \n</dl>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<h5>Returns:</h5>\n\n \n\n\n<dl>\n <dt>\n Type\n </dt>\n <dd>\n \n<span class=\"param-type\">*</span>\n\n\n </dd>\n</dl>\n\n \n\n\n\n \n \n\n \n\n <h4 class=\"name\" id=\"queryAdd\"><span class=\"type-signature\"></span>queryAdd<span class=\"signature\">(obj, overwrite, refresh<span class=\"signature-attributes\">opt</span>)</span><span class=\"type-signature\"></span></h4>\n\n \n\n\n\n<div class=\"description\">\n Add data to the existing query.\n</div>\n\n\n\n\n\n\n\n\n\n <h5>Parameters:</h5>\n \n\n<table class=\"params\">\n <thead>\n <tr>\n \n <th>Name</th>\n \n\n <th>Type</th>\n\n \n <th>Attributes</th>\n \n\n \n\n <th class=\"last\">Description</th>\n </tr>\n </thead>\n\n <tbody>\n \n\n <tr>\n \n <td class=\"name\"><code>obj</code></td>\n \n\n <td class=\"type\">\n \n \n<span class=\"param-type\">Object</span>\n\n\n \n </td>\n\n \n <td class=\"attributes\">\n \n\n \n\n \n </td>\n \n\n \n\n <td class=\"description last\">The data whose keys will be added to the existing\nquery object.</td>\n </tr>\n\n \n\n <tr>\n \n <td class=\"name\"><code>overwrite</code></td>\n \n\n <td class=\"type\">\n \n \n<span class=\"param-type\">Boolean</span>\n\n\n \n </td>\n\n \n <td class=\"attributes\">\n \n\n \n\n \n </td>\n \n\n \n\n <td class=\"description last\">Whether or not to overwrite data that already\nexists in the query object. Defaults to true.</td>\n </tr>\n\n \n\n <tr>\n \n <td class=\"name\"><code>refresh</code></td>\n \n\n <td class=\"type\">\n \n \n<span class=\"param-type\">Boolean</span>\n\n\n \n </td>\n\n \n <td class=\"attributes\">\n \n &lt;optional><br>\n \n\n \n\n \n </td>\n \n\n \n\n <td class=\"description last\">Whether or not to refresh the view data set\nonce the operation is complete. Defaults to true.</td>\n </tr>\n\n \n </tbody>\n</table>\n\n\n\n\n\n\n<dl class=\"details\">\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <dt class=\"tag-source\">Source:</dt>\n <dd class=\"tag-source\"><ul class=\"dummy\"><li>\n <a href=\"OldView.js.html\">OldView.js</a>, <a href=\"OldView.js.html#line234\">line 234</a>\n </li></ul></dd>\n \n\n \n\n \n\n \n</dl>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n\n \n\n <h4 class=\"name\" id=\"queryData\"><span class=\"type-signature\"></span>queryData<span class=\"signature\">(query<span class=\"signature-attributes\">opt</span>, options<span class=\"signature-attributes\">opt</span>, refresh<span class=\"signature-attributes\">opt</span>)</span><span class=\"type-signature\"> &rarr; {*}</span></h4>\n\n \n\n\n\n<div class=\"description\">\n Gets / sets the query that the view uses to build it's data set.\n</div>\n\n\n\n\n\n\n\n\n\n <h5>Parameters:</h5>\n \n\n<table class=\"params\">\n <thead>\n <tr>\n \n <th>Name</th>\n \n\n <th>Type</th>\n\n \n <th>Attributes</th>\n \n\n \n\n <th class=\"last\">Description</th>\n </tr>\n </thead>\n\n <tbody>\n \n\n <tr>\n \n <td class=\"name\"><code>query</code></td>\n \n\n <td class=\"type\">\n \n \n<span class=\"param-type\">Object</span>\n\n\n \n </td>\n\n \n <td class=\"attributes\">\n \n &lt;optional><br>\n \n\n \n\n \n </td>\n \n\n \n\n <td class=\"description last\"></td>\n </tr>\n\n \n\n <tr>\n \n <td class=\"name\"><code>options</code></td>\n \n\n <td class=\"type\">\n \n \n<span class=\"param-type\">Boolean</span>\n\n\n \n </td>\n\n \n <td class=\"attributes\">\n \n &lt;optional><br>\n \n\n \n\n \n </td>\n \n\n \n\n <td class=\"description last\">An options object.</td>\n </tr>\n\n \n\n <tr>\n \n <td class=\"name\"><code>refresh</code></td>\n \n\n <td class=\"type\">\n \n \n<span class=\"param-type\">Boolean</span>\n\n\n \n </td>\n\n \n <td class=\"attributes\">\n \n &lt;optional><br>\n \n\n \n\n \n </td>\n \n\n \n\n <td class=\"description last\">Whether to refresh the view data after\nthis operation. Defaults to true.</td>\n </tr>\n\n \n </tbody>\n</table>\n\n\n\n\n\n\n<dl class=\"details\">\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <dt class=\"tag-source\">Source:</dt>\n <dd class=\"tag-source\"><ul class=\"dummy\"><li>\n <a href=\"OldView.js.html\">OldView.js</a>, <a href=\"OldView.js.html#line205\">line 205</a>\n </li></ul></dd>\n \n\n \n\n \n\n \n</dl>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<h5>Returns:</h5>\n\n \n\n\n<dl>\n <dt>\n Type\n </dt>\n <dd>\n \n<span class=\"param-type\">*</span>\n\n\n </dd>\n</dl>\n\n \n\n\n\n \n \n\n \n\n <h4 class=\"name\" id=\"queryOptions\"><span class=\"type-signature\"></span>queryOptions<span class=\"signature\">(options<span class=\"signature-attributes\">opt</span>, refresh<span class=\"signature-attributes\">opt</span>)</span><span class=\"type-signature\"> &rarr; {*}</span></h4>\n\n \n\n\n\n<div class=\"description\">\n Gets / sets the query options used when applying sorting etc to the\nview data set.\n</div>\n\n\n\n\n\n\n\n\n\n <h5>Parameters:</h5>\n \n\n<table class=\"params\">\n <thead>\n <tr>\n \n <th>Name</th>\n \n\n <th>Type</th>\n\n \n <th>Attributes</th>\n \n\n \n\n <th class=\"last\">Description</th>\n </tr>\n </thead>\n\n <tbody>\n \n\n <tr>\n \n <td class=\"name\"><code>options</code></td>\n \n\n <td class=\"type\">\n \n \n<span class=\"param-type\">Object</span>\n\n\n \n </td>\n\n \n <td class=\"attributes\">\n \n &lt;optional><br>\n \n\n \n\n \n </td>\n \n\n \n\n <td class=\"description last\">An options object.</td>\n </tr>\n\n \n\n <tr>\n \n <td class=\"name\"><code>refresh</code></td>\n \n\n <td class=\"type\">\n \n \n<span class=\"param-type\">Boolean</span>\n\n\n \n </td>\n\n \n <td class=\"attributes\">\n \n &lt;optional><br>\n \n\n \n\n \n </td>\n \n\n \n\n <td class=\"description last\">Whether to refresh the view data after\nthis operation. Defaults to true.</td>\n </tr>\n\n \n </tbody>\n</table>\n\n\n\n\n\n\n<dl class=\"details\">\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <dt class=\"tag-source\">Source:</dt>\n <dd class=\"tag-source\"><ul class=\"dummy\"><li>\n <a href=\"OldView.js.html\">OldView.js</a>, <a href=\"OldView.js.html#line307\">line 307</a>\n </li></ul></dd>\n \n\n \n\n \n\n \n</dl>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<h5>Returns:</h5>\n\n \n\n\n<dl>\n <dt>\n Type\n </dt>\n <dd>\n \n<span class=\"param-type\">*</span>\n\n\n </dd>\n</dl>\n\n \n\n\n\n \n \n\n \n\n <h4 class=\"name\" id=\"queryRemove\"><span class=\"type-signature\"></span>queryRemove<span class=\"signature\">(obj, refresh<span class=\"signature-attributes\">opt</span>)</span><span class=\"type-signature\"></span></h4>\n\n \n\n\n\n<div class=\"description\">\n Remove data from the existing query.\n</div>\n\n\n\n\n\n\n\n\n\n <h5>Parameters:</h5>\n \n\n<table class=\"params\">\n <thead>\n <tr>\n \n <th>Name</th>\n \n\n <th>Type</th>\n\n \n <th>Attributes</th>\n \n\n \n\n <th class=\"last\">Description</th>\n </tr>\n </thead>\n\n <tbody>\n \n\n <tr>\n \n <td class=\"name\"><code>obj</code></td>\n \n\n <td class=\"type\">\n \n \n<span class=\"param-type\">Object</span>\n\n\n \n </td>\n\n \n <td class=\"attributes\">\n \n\n \n\n \n </td>\n \n\n \n\n <td class=\"description last\">The data whose keys will be removed from the existing\nquery object.</td>\n </tr>\n\n \n\n <tr>\n \n <td class=\"name\"><code>refresh</code></td>\n \n\n <td class=\"type\">\n \n \n<span class=\"param-type\">Boolean</span>\n\n\n \n </td>\n\n \n <td class=\"attributes\">\n \n &lt;optional><br>\n \n\n \n\n \n </td>\n \n\n \n\n <td class=\"description last\">Whether or not to refresh the view data set\nonce the operation is complete. Defaults to true.</td>\n </tr>\n\n \n </tbody>\n</table>\n\n\n\n\n\n\n<dl class=\"details\">\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <dt class=\"tag-source\">Source:</dt>\n <dd class=\"tag-source\"><ul class=\"dummy\"><li>\n <a href=\"OldView.js.html\">OldView.js</a>, <a href=\"OldView.js.html#line261\">line 261</a>\n </li></ul></dd>\n \n\n \n\n \n\n \n</dl>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n\n \n\n <h4 class=\"name\" id=\"refresh\"><span class=\"type-signature\"></span>refresh<span class=\"signature\">()</span><span class=\"type-signature\"></span></h4>\n\n \n\n\n\n<div class=\"description\">\n Refreshes the view data and diffs between previous and new data to\ndetermine if any events need to be triggered or DOM binds updated.\n</div>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<dl class=\"details\">\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <dt class=\"tag-source\">Source:</dt>\n <dd class=\"tag-source\"><ul class=\"dummy\"><li>\n <a href=\"OldView.js.html\">OldView.js</a>, <a href=\"OldView.js.html#line324\">line 324</a>\n </li></ul></dd>\n \n\n \n\n \n\n \n</dl>\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n \n \n\n \n\n <h4 class=\"name\" id=\"remove\"><span class=\"type-signature\"></span>remove<span class=\"signature\">()</span><span class=\"type-signature\"> &rarr; {*}</span></h4>\n\n \n\n\n\n<div class=\"description\">\n Removed from view data via the view collection. See Collection.remove() for more information.\n</div>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<dl class=\"details\">\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <dt class=\"tag-source\">Source:</dt>\n <dd class=\"tag-source\"><ul class=\"dummy\"><li>\n <a href=\"OldView.js.html\">OldView.js</a>, <a href=\"OldView.js.html#line548\">line 548</a>\n </li></ul></dd>\n \n\n \n\n \n\n \n</dl>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<h5>Returns:</h5>\n\n \n\n\n<dl>\n <dt>\n Type\n </dt>\n <dd>\n \n<span class=\"param-type\">*</span>\n\n\n </dd>\n</dl>\n\n \n\n\n\n \n \n\n \n\n <h4 class=\"name\" id=\"unBind\"><span class=\"type-signature\"></span>unBind<span class=\"signature\">(selector)</span><span class=\"type-signature\"> &rarr; {<a href=\"Collection.html\">Collection</a>}</span></h4>\n\n \n\n\n\n<div class=\"description\">\n Un-binds a selector from the view changes.\n</div>\n\n\n\n\n\n\n\n\n\n <h5>Parameters:</h5>\n \n\n<table class=\"params\">\n <thead>\n <tr>\n \n <th>Name</th>\n \n\n <th>Type</th>\n\n \n\n \n\n <th class=\"last\">Description</th>\n </tr>\n </thead>\n\n <tbody>\n \n\n <tr>\n \n <td class=\"name\"><code>selector</code></td>\n \n\n <td class=\"type\">\n \n \n<span class=\"param-type\">String</span>\n\n\n \n </td>\n\n \n\n \n\n <td class=\"description last\">The jQuery selector string to identify the bind to remove.</td>\n </tr>\n\n \n </tbody>\n</table>\n\n\n\n\n\n\n<dl class=\"details\">\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <dt class=\"tag-source\">Source:</dt>\n <dd class=\"tag-source\"><ul class=\"dummy\"><li>\n <a href=\"OldView.Bind.js.html\">OldView.Bind.js</a>, <a href=\"OldView.Bind.js.html#line95\">line 95</a>\n </li></ul></dd>\n \n\n \n\n \n\n \n</dl>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<h5>Returns:</h5>\n\n \n\n\n<dl>\n <dt>\n Type\n </dt>\n <dd>\n \n<span class=\"param-type\"><a href=\"Collection.html\">Collection</a></span>\n\n\n </dd>\n</dl>\n\n \n\n\n\n \n \n\n \n\n <h4 class=\"name\" id=\"update\"><span class=\"type-signature\"></span>update<span class=\"signature\">()</span><span class=\"type-signature\"> &rarr; {*}</span></h4>\n\n \n\n\n\n<div class=\"description\">\n Updates into view data via the view collection. See Collection.update() for more information.\n</div>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<dl class=\"details\">\n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n\n \n <dt class=\"tag-source\">Source:</dt>\n <dd class=\"tag-source\"><ul class=\"dummy\"><li>\n <a href=\"OldView.js.html\">OldView.js</a>, <a href=\"OldView.js.html#line535\">line 535</a>\n </li></ul></dd>\n \n\n \n\n \n\n \n</dl>\n\n\n\n\n\n\n\n\n\n\n\n\n\n<h5>Returns:</h5>\n\n \n\n\n<dl>\n <dt>\n Type\n </dt>\n <dd>\n \n<span class=\"param-type\">*</span>\n\n\n </dd>\n</dl>\n\n \n\n\n\n \n \n\n \n\n\n \n\n \n</article>\n\n</section>\n\n\n\n\n</div>\n\n<nav>\n <h2><a href=\"index.html\">Home</a></h2><h3>Classes</h3><ul><li><a href=\"ActiveBucket.html\">ActiveBucket</a></li><li><a href=\"Angular.html\">Angular</a></li><li><a href=\"AutoBind.html\">AutoBind</a></li><li><a href=\"Collection.html\">Collection</a></li><li><a href=\"CollectionGroup.html\">CollectionGroup</a></li><li><a href=\"Condition.html\">Condition</a></li><li><a href=\"Core.html\">Core</a></li><li><a href=\"Db.html\">Db</a></li><li><a href=\"Document.html\">Document</a></li><li><a href=\"Grid.html\">Grid</a></li><li><a href=\"Highchart.html\">Highchart</a></li><li><a href=\"Index2d.html\">Index2d</a></li><li><a href=\"IndexBinaryTree.html\">IndexBinaryTree</a></li><li><a href=\"IndexHashMap.html\">IndexHashMap</a></li><li><a href=\"Infinilist.html\">Infinilist</a></li><li><a href=\"KeyValueStore.html\">KeyValueStore</a></li><li><a href=\"Metrics.html\">Metrics</a></li><li><a href=\"MyModule.html\">MyModule</a></li><li><a href=\"NodeApiClient.html\">NodeApiClient</a></li><li><a href=\"NodeApiServer.html\">NodeApiServer</a></li><li><a href=\"NodeRAS.html\">NodeRAS</a></li><li><a href=\"Odm.html\">Odm</a></li><li><a href=\"OldView.html\">OldView</a></li><li><a href=\"Operation.html\">Operation</a></li><li><a href=\"Overload.html\">Overload</a></li><li><a href=\"Overview.html\">Overview</a></li><li><a href=\"Overview_init.html\">init</a></li><li><a href=\"Path.html\">Path</a></li><li><a href=\"Persist.html\">Persist</a></li><li><a href=\"Procedure.html\">Procedure</a></li><li><a href=\"ReactorIO.html\">ReactorIO</a></li><li><a href=\"Section.html\">Section</a></li><li><a href=\"Serialiser.html\">Serialiser</a></li><li><a href=\"Shared.overload.html\">overload</a></li><li><a href=\"View.html\">View</a></li></ul><h3>Mixins</h3><ul><li><a href=\"ChainReactor.html\">ChainReactor</a></li><li><a href=\"Common.html\">Common</a></li><li><a href=\"Constants.html\">Constants</a></li><li><a href=\"Events.html\">Events</a></li><li><a href=\"Matching.html\">Matching</a></li><li><a href=\"Shared.html\">Shared</a></li><li><a href=\"Sorting.html\">Sorting</a></li><li><a href=\"Tags.html\">Tags</a></li><li><a href=\"Triggers.html\">Triggers</a></li><li><a href=\"Updating.html\">Updating</a></li></ul><h3><a href=\"global.html\">Global</a></h3>\n</nav>\n\n<br class=\"clear\">\n\n<footer>\n Documentation generated by <a href=\"https://github.com/jsdoc3/jsdoc\">JSDoc 3.4.0</a> on Thu Mar 01 2018 11:34:23 GMT+0000 (GMT)\n</footer>\n\n<script> prettyPrint(); </script>\n<script src=\"scripts/linenumber.js\"> </script>\n</body>\n</html>"} +{"text": "<?xml version=\"1.0\" encoding=\"windows-1250\"?>\r\n<VisualStudioProject\r\n\tProjectType=\"Visual C++\"\r\n\tVersion=\"9.00\"\r\n\tName=\"dtsac3source\"\r\n\tProjectGUID=\"{30D48874-899F-41C6-9B26-A40C96C91102}\"\r\n\tRootNamespace=\"dtsac3source\"\r\n\tKeyword=\"Win32Proj\"\r\n\tTargetFrameworkVersion=\"131072\"\r\n\t>\r\n\t<Platforms>\r\n\t\t<Platform\r\n\t\t\tName=\"Win32\"\r\n\t\t/>\r\n\t</Platforms>\r\n\t<ToolFiles>\r\n\t</ToolFiles>\r\n\t<Configurations>\r\n\t\t<Configuration\r\n\t\t\tName=\"Debug lib|Win32\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tInheritedPropertySheets=\"..\\..\\..\\common.vsprops;..\\..\\..\\debug.vsprops\"\r\n\t\t\tUseOfMFC=\"1\"\r\n\t\t\tCharacterSet=\"2\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;_DEBUG\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"../../../../lib/$(ProjectName)D.lib\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release lib|Win32\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tInheritedPropertySheets=\"..\\..\\..\\common.vsprops;..\\..\\..\\release.vsprops\"\r\n\t\t\tUseOfMFC=\"1\"\r\n\t\t\tCharacterSet=\"2\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"../../../../lib/$(ProjectName)R.lib\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"Debug Unicode lib|Win32\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tInheritedPropertySheets=\"..\\..\\..\\common.vsprops;..\\..\\..\\debug.vsprops\"\r\n\t\t\tUseOfMFC=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\..\\..\\src\\filters\\BaseClasses\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;_DEBUG\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"../../../../lib/$(ProjectName)DU.lib\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release Unicode lib|Win32\"\r\n\t\t\tConfigurationType=\"4\"\r\n\t\t\tInheritedPropertySheets=\"..\\..\\..\\common.vsprops;..\\..\\..\\release.vsprops\"\r\n\t\t\tUseOfMFC=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tAdditionalIncludeDirectories=\"..\\..\\BaseClasses\"\r\n\t\t\t\tPreprocessorDefinitions=\"WIN32;NDEBUG\"\r\n\t\t\t\tEnableEnhancedInstructionSet=\"0\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLibrarianTool\"\r\n\t\t\t\tOutputFile=\"../../../../lib/$(ProjectName)RU.lib\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"Debug|Win32\"\r\n\t\t\tConfigurationType=\"2\"\r\n\t\t\tInheritedPropertySheets=\"..\\..\\..\\common.vsprops;..\\..\\..\\debug.vsprops\"\r\n\t\t\tUseOfMFC=\"1\"\r\n\t\t\tCharacterSet=\"2\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tPreprocessorDefinitions=\"REGISTER_FILTER;WIN32;_DEBUG;_USRDLL\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tRegisterOutput=\"true\"\r\n\t\t\t\tAdditionalDependencies=\"dsutilD.lib strmbaseD.lib basesourceD.lib\"\r\n\t\t\t\tOutputFile=\"$(OutDir)/$(ProjectName).ax\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"../../../../lib\"\r\n\t\t\t\tModuleDefinitionFile=\"$(ProjectName).def\"\r\n\t\t\t\tSubSystem=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"0\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"Debug Unicode|Win32\"\r\n\t\t\tConfigurationType=\"2\"\r\n\t\t\tInheritedPropertySheets=\"..\\..\\..\\common.vsprops;..\\..\\..\\debug.vsprops\"\r\n\t\t\tUseOfMFC=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tPreprocessorDefinitions=\"REGISTER_FILTER;WIN32;_DEBUG;_USRDLL\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tRegisterOutput=\"true\"\r\n\t\t\t\tAdditionalDependencies=\"dsutilDU.lib strmbaseDU.lib basesourceDU.lib\"\r\n\t\t\t\tOutputFile=\"$(OutDir)/$(ProjectName).ax\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"../../../../lib\"\r\n\t\t\t\tModuleDefinitionFile=\"$(ProjectName).def\"\r\n\t\t\t\tSubSystem=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"0\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release|Win32\"\r\n\t\t\tConfigurationType=\"2\"\r\n\t\t\tInheritedPropertySheets=\"..\\..\\..\\common.vsprops;..\\..\\..\\release.vsprops\"\r\n\t\t\tUseOfMFC=\"1\"\r\n\t\t\tCharacterSet=\"2\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tPreprocessorDefinitions=\"REGISTER_FILTER;WIN32;NDEBUG;_USRDLL\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tAdditionalDependencies=\"dsutilR.lib strmbaseR.lib basesourceR.lib winmm.lib\"\r\n\t\t\t\tOutputFile=\"$(OutDir)/$(ProjectName).ax\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"../../../../lib\"\r\n\t\t\t\tGenerateManifest=\"false\"\r\n\t\t\t\tIgnoreDefaultLibraryNames=\"MSVCRT\"\r\n\t\t\t\tModuleDefinitionFile=\"$(ProjectName).def\"\r\n\t\t\t\tSubSystem=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"0\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t\tEmbedManifest=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t\t<Configuration\r\n\t\t\tName=\"Release Unicode|Win32\"\r\n\t\t\tConfigurationType=\"2\"\r\n\t\t\tInheritedPropertySheets=\"..\\..\\..\\common.vsprops;..\\..\\..\\release.vsprops\"\r\n\t\t\tUseOfMFC=\"1\"\r\n\t\t\tCharacterSet=\"1\"\r\n\t\t\t>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreBuildEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXMLDataGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCWebServiceProxyGeneratorTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCMIDLTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\tPreprocessorDefinitions=\"REGISTER_FILTER;WIN32;NDEBUG;_USRDLL\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManagedResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPreLinkEventTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCLinkerTool\"\r\n\t\t\t\tAdditionalDependencies=\"dsutilRU.lib strmbaseRU.lib basesourceRU.lib winmm.lib\"\r\n\t\t\t\tOutputFile=\"$(OutDir)/$(ProjectName).ax\"\r\n\t\t\t\tAdditionalLibraryDirectories=\"../../../../lib\"\r\n\t\t\t\tGenerateManifest=\"false\"\r\n\t\t\t\tIgnoreDefaultLibraryNames=\"MSVCRT\"\r\n\t\t\t\tModuleDefinitionFile=\"$(ProjectName).def\"\r\n\t\t\t\tSubSystem=\"2\"\r\n\t\t\t\tRandomizedBaseAddress=\"1\"\r\n\t\t\t\tDataExecutionPrevention=\"0\"\r\n\t\t\t\tTargetMachine=\"1\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCALinkTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCManifestTool\"\r\n\t\t\t\tEmbedManifest=\"false\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCXDCMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCBscMakeTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCFxCopTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCAppVerifierTool\"\r\n\t\t\t/>\r\n\t\t\t<Tool\r\n\t\t\t\tName=\"VCPostBuildEventTool\"\r\n\t\t\t/>\r\n\t\t</Configuration>\r\n\t</Configurations>\r\n\t<References>\r\n\t</References>\r\n\t<Files>\r\n\t\t<Filter\r\n\t\t\tName=\"Source Files\"\r\n\t\t\tFilter=\"cpp;c;cxx;def;odl;idl;hpj;bat;asm\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"DTSAC3Source.cpp\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"DTSAC3Source.def\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"stdafx.cpp\"\r\n\t\t\t\t>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Debug lib|Win32\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tUsePrecompiledHeader=\"1\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Release lib|Win32\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tUsePrecompiledHeader=\"1\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Debug Unicode lib|Win32\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tUsePrecompiledHeader=\"1\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Release Unicode lib|Win32\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tUsePrecompiledHeader=\"1\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Debug|Win32\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tUsePrecompiledHeader=\"1\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Debug Unicode|Win32\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tUsePrecompiledHeader=\"1\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Release|Win32\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tUsePrecompiledHeader=\"1\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Release Unicode|Win32\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCLCompilerTool\"\r\n\t\t\t\t\t\tUsePrecompiledHeader=\"1\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Header Files\"\r\n\t\t\tFilter=\"h;hpp;hxx;hm;inl;inc\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"DTSAC3Source.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\".\\resource.h\"\r\n\t\t\t\t>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Debug lib|Win32\"\r\n\t\t\t\t\tExcludedFromBuild=\"true\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Release lib|Win32\"\r\n\t\t\t\t\tExcludedFromBuild=\"true\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Debug Unicode lib|Win32\"\r\n\t\t\t\t\tExcludedFromBuild=\"true\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Release Unicode lib|Win32\"\r\n\t\t\t\t\tExcludedFromBuild=\"true\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCCustomBuildTool\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t</File>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\"stdafx.h\"\r\n\t\t\t\t>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t\t<Filter\r\n\t\t\tName=\"Resource Files\"\r\n\t\t\tFilter=\"rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe\"\r\n\t\t\t>\r\n\t\t\t<File\r\n\t\t\t\tRelativePath=\".\\dtsac3source.rc\"\r\n\t\t\t\t>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Debug lib|Win32\"\r\n\t\t\t\t\tExcludedFromBuild=\"true\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Release lib|Win32\"\r\n\t\t\t\t\tExcludedFromBuild=\"true\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Debug Unicode lib|Win32\"\r\n\t\t\t\t\tExcludedFromBuild=\"true\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t\t<FileConfiguration\r\n\t\t\t\t\tName=\"Release Unicode lib|Win32\"\r\n\t\t\t\t\tExcludedFromBuild=\"true\"\r\n\t\t\t\t\t>\r\n\t\t\t\t\t<Tool\r\n\t\t\t\t\t\tName=\"VCResourceCompilerTool\"\r\n\t\t\t\t\t/>\r\n\t\t\t\t</FileConfiguration>\r\n\t\t\t</File>\r\n\t\t</Filter>\r\n\t</Files>\r\n\t<Globals>\r\n\t\t<Global\r\n\t\t\tName=\"DevPartner_IsInstrumented\"\r\n\t\t\tValue=\"0\"\r\n\t\t/>\r\n\t</Globals>\r\n</VisualStudioProject>\r\n"} +{"text": "#ifndef COUNT_MAX_NUMBER_OF_PIECES_H\n#define COUNT_MAX_NUMBER_OF_PIECES_H\n\n#include \"count_undirected_graph_connected_components.h\"\n#include \"get_bits.h\"\n#include \"remove_nth_vertex.h\"\n#include <boost/graph/adjacency_list.hpp>\n#include <vector>\n\n/// Imagine shooting the vertices of a graph\n/// How many connected components can you maximally get?\n/// Examples:\n/// A can only be one piece\n/// A--B can only be one piece\n/// A--B--C can be shot to A C and thus two pieces\n/// A--B--C--D can be shot to 'A C--D', or 'A--B D', or 'A C' or 'A D' or 'B\n/// D' and thus two pieces A--B--C--D--E can be shot to 'A C E' and thus three\n/// pieces\ntemplate <typename graph>\nint count_max_number_of_pieces(const graph& g)\n{\n const int sz{ static_cast<int>(boost::num_vertices(g)) };\n if (sz <= 1) {\n return sz;\n }\n\n int max_connected_components{ 1 };\n // Brute force starts here\n const int n_combinations{ 1 << sz };\n for (int i = 0; i != n_combinations; ++i) {\n // Copy the original graph\n graph h{ g };\n\n // Delete vertices according to combinator\n std::vector<int> bits = get_bits(i);\n std::reverse(std::begin(bits), std::end(bits));\n assert(bits.size() < 2 || bits[0] > bits[1]); // Indices must be big first\n for (const int index : bits) {\n remove_nth_vertex(index, h);\n }\n\n // Count the number of connected components\n max_connected_components = std::max(\n max_connected_components, count_undirected_graph_connected_components(h));\n }\n return max_connected_components;\n}\n\n#endif // COUNT_MAX_NUMBER_OF_PIECES_H\n"} +{"text": "[id=\"installing-bare-metal\"]\n= Installing a cluster on bare metal\ninclude::modules/common-attributes.adoc[]\n:context: installing-bare-metal\n\ntoc::[]\n\nIn {product-title} version {product-version}, you can install a cluster on\nbare metal infrastructure that you provision.\n\n[IMPORTANT]\n====\nWhile you might be able to follow this procedure to deploy a cluster on\nvirtualized or cloud environments, you must be aware of additional\nconsiderations for non-bare metal platforms. Review the information in the\nlink:https://access.redhat.com/articles/4207611[guidelines for deploying {product-title} on non-tested platforms]\nbefore you attempt to install an {product-title} cluster in such an environment.\n====\n\n== Prerequisites\n\n* Review details about the\nxref:../../architecture/architecture-installation.adoc#architecture-installation[{product-title} installation and update]\nprocesses.\n* If you use a firewall, you must\nxref:../../installing/install_config/configuring-firewall.adoc#configuring-firewall[configure it to allow the sites] that your cluster requires access to.\n+\n[NOTE]\n====\nBe sure to also review this site list if you are configuring a proxy.\n====\n\ninclude::modules/cluster-entitlements.adoc[leveloffset=+1]\n\ninclude::modules/installation-requirements-user-infra.adoc[leveloffset=+1]\n\ninclude::modules/installation-infrastructure-user-infra.adoc[leveloffset=+1]\n\ninclude::modules/installation-network-user-infra.adoc[leveloffset=+2]\n\ninclude::modules/installation-dns-user-infra.adoc[leveloffset=+2]\n\ninclude::modules/ssh-agent-using.adoc[leveloffset=+1]\n\ninclude::modules/installation-obtaining-installer.adoc[leveloffset=+1]\n\ninclude::modules/cli-installing-cli.adoc[leveloffset=+1]\n\ninclude::modules/installation-initializing-manual.adoc[leveloffset=+1]\n\ninclude::modules/installation-bare-metal-config-yaml.adoc[leveloffset=+2]\n\ninclude::modules/installation-configure-proxy.adoc[leveloffset=+2]\n\ninclude::modules/installation-three-node-cluster.adoc[leveloffset=+1]\n\ninclude::modules/installation-user-infra-generate-k8s-manifest-ignition.adoc[leveloffset=+1]\n\n[id=\"creating-machines-bare-metal\"]\n== Creating {op-system-first} machines\n\nBefore you install a cluster on bare metal infrastructure that you provision,\nyou must create {op-system} machines for it to use. Follow either the steps\nto use an ISO image or network PXE booting to create the machines.\n\ninclude::modules/installation-user-infra-machines-iso.adoc[leveloffset=+2]\n\ninclude::modules/installation-user-infra-machines-static-network.adoc[leveloffset=+3]\n\ninclude::modules/installation-user-infra-machines-pxe.adoc[leveloffset=+2]\n\ninclude::modules/installation-installing-bare-metal.adoc[leveloffset=+1]\n\ninclude::modules/cli-logging-in-kubeadmin.adoc[leveloffset=+1]\n\ninclude::modules/installation-approve-csrs.adoc[leveloffset=+1]\n\ninclude::modules/installation-operators-config.adoc[leveloffset=+1]\n\ninclude::modules/registry-removed.adoc[leveloffset=+2]\n\ninclude::modules/installation-registry-storage-config.adoc[leveloffset=+2]\n\ninclude::modules/registry-configuring-storage-baremetal.adoc[leveloffset=+3]\n\ninclude::modules/installation-registry-storage-non-production.adoc[leveloffset=+3]\n\ninclude::modules/installation-complete-user-infra.adoc[leveloffset=+1]\n\n== Next steps\n\n* xref:../../installing/install_config/customizations.adoc#customizations[Customize your cluster].\n* If necessary, you can\nxref:../../support/remote_health_monitoring/opting-out-of-remote-health-reporting.adoc#opting-out-remote-health-reporting_opting-out-remote-health-reporting[opt out of remote health reporting].\n* xref:../../registry/configuring_registry_storage/configuring-registry-storage-baremetal.adoc#configuring-registry-storage-baremetal[Set up your registry and configure registry storage].\n"} +{"text": "{\"source_filename\": \"./res/testsuite/forward.wast\",\n \"commands\": [\n {\"type\": \"module\", \"line\": 1, \"filename\": \"forward.0.wasm\"}, \n {\"type\": \"assert_return\", \"line\": 17, \"action\": {\"type\": \"invoke\", \"field\": \"even\", \"args\": [{\"type\": \"i32\", \"value\": \"13\"}]}, \"expected\": [{\"type\": \"i32\", \"value\": \"0\"}]}, \n {\"type\": \"assert_return\", \"line\": 18, \"action\": {\"type\": \"invoke\", \"field\": \"even\", \"args\": [{\"type\": \"i32\", \"value\": \"20\"}]}, \"expected\": [{\"type\": \"i32\", \"value\": \"1\"}]}, \n {\"type\": \"assert_return\", \"line\": 19, \"action\": {\"type\": \"invoke\", \"field\": \"odd\", \"args\": [{\"type\": \"i32\", \"value\": \"13\"}]}, \"expected\": [{\"type\": \"i32\", \"value\": \"1\"}]}, \n {\"type\": \"assert_return\", \"line\": 20, \"action\": {\"type\": \"invoke\", \"field\": \"odd\", \"args\": [{\"type\": \"i32\", \"value\": \"20\"}]}, \"expected\": [{\"type\": \"i32\", \"value\": \"0\"}]}]}\n"} +{"text": "<?php\n\nnamespace Symfony\\Component\\Console\\Tests\\Helper;\n\nuse Symfony\\Component\\Console\\Helper\\FormatterHelper;\nuse Symfony\\Component\\Console\\Helper\\HelperSet;\nuse Symfony\\Component\\Console\\Helper\\SymfonyQuestionHelper;\nuse Symfony\\Component\\Console\\Output\\StreamOutput;\nuse Symfony\\Component\\Console\\Question\\Question;\nuse Symfony\\Component\\Console\\Question\\ChoiceQuestion;\n\n/**\n * @group tty\n */\nclass SymfonyQuestionHelperTest extends AbstractQuestionHelperTest\n{\n public function testAskChoice()\n {\n $questionHelper = new SymfonyQuestionHelper();\n\n $helperSet = new HelperSet(array(new FormatterHelper()));\n $questionHelper->setHelperSet($helperSet);\n\n $heroes = array('Superman', 'Batman', 'Spiderman');\n\n $inputStream = $this->getInputStream(\"\\n1\\n 1 \\nFabien\\n1\\nFabien\\n1\\n0,2\\n 0 , 2 \\n\\n\\n\");\n\n $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '2');\n $question->setMaxAttempts(1);\n // first answer is an empty answer, we're supposed to receive the default value\n $this->assertEquals('Spiderman', $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $output = $this->createOutputInterface(), $question));\n $this->assertOutputContains('What is your favorite superhero? [Spiderman]', $output);\n\n $question = new ChoiceQuestion('What is your favorite superhero?', $heroes);\n $question->setMaxAttempts(1);\n $this->assertEquals('Batman', $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question));\n $this->assertEquals('Batman', $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question));\n\n $question = new ChoiceQuestion('What is your favorite superhero?', $heroes);\n $question->setErrorMessage('Input \"%s\" is not a superhero!');\n $question->setMaxAttempts(2);\n $this->assertEquals('Batman', $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $output = $this->createOutputInterface(), $question));\n $this->assertOutputContains('Input \"Fabien\" is not a superhero!', $output);\n\n try {\n $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '1');\n $question->setMaxAttempts(1);\n $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $output = $this->createOutputInterface(), $question);\n $this->fail();\n } catch (\\InvalidArgumentException $e) {\n $this->assertEquals('Value \"Fabien\" is invalid', $e->getMessage());\n }\n\n $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, null);\n $question->setMaxAttempts(1);\n $question->setMultiselect(true);\n\n $this->assertEquals(array('Batman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question));\n $this->assertEquals(array('Superman', 'Spiderman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question));\n $this->assertEquals(array('Superman', 'Spiderman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $this->createOutputInterface(), $question));\n\n $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, '0,1');\n $question->setMaxAttempts(1);\n $question->setMultiselect(true);\n\n $this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $output = $this->createOutputInterface(), $question));\n $this->assertOutputContains('What is your favorite superhero? [Superman, Batman]', $output);\n\n $question = new ChoiceQuestion('What is your favorite superhero?', $heroes, ' 0 , 1 ');\n $question->setMaxAttempts(1);\n $question->setMultiselect(true);\n\n $this->assertEquals(array('Superman', 'Batman'), $questionHelper->ask($this->createStreamableInputInterfaceMock($inputStream), $output = $this->createOutputInterface(), $question));\n $this->assertOutputContains('What is your favorite superhero? [Superman, Batman]', $output);\n }\n\n public function testAskReturnsNullIfValidatorAllowsIt()\n {\n $questionHelper = new SymfonyQuestionHelper();\n $question = new Question('What is your favorite superhero?');\n $question->setValidator(function ($value) { return $value; });\n $input = $this->createStreamableInputInterfaceMock($this->getInputStream(\"\\n\"));\n $this->assertNull($questionHelper->ask($input, $this->createOutputInterface(), $question));\n }\n\n public function testAskEscapeDefaultValue()\n {\n $helper = new SymfonyQuestionHelper();\n $input = $this->createStreamableInputInterfaceMock($this->getInputStream('\\\\'));\n $helper->ask($input, $output = $this->createOutputInterface(), new Question('Can I have a backslash?', '\\\\'));\n\n $this->assertOutputContains('Can I have a backslash? [\\]', $output);\n }\n\n public function testAskEscapeAndFormatLabel()\n {\n $helper = new SymfonyQuestionHelper();\n $input = $this->createStreamableInputInterfaceMock($this->getInputStream('Foo\\\\Bar'));\n $helper->ask($input, $output = $this->createOutputInterface(), new Question('Do you want to use Foo\\\\Bar <comment>or</comment> Foo\\\\Baz\\\\?', 'Foo\\\\Baz'));\n\n $this->assertOutputContains('Do you want to use Foo\\\\Bar or Foo\\\\Baz\\\\? [Foo\\\\Baz]:', $output);\n }\n\n public function testLabelTrailingBackslash()\n {\n $helper = new SymfonyQuestionHelper();\n $input = $this->createStreamableInputInterfaceMock($this->getInputStream('sure'));\n $helper->ask($input, $output = $this->createOutputInterface(), new Question('Question with a trailing \\\\'));\n\n $this->assertOutputContains('Question with a trailing \\\\', $output);\n }\n\n /**\n * @expectedException \\Symfony\\Component\\Console\\Exception\\RuntimeException\n * @expectedExceptionMessage Aborted\n */\n public function testAskThrowsExceptionOnMissingInput()\n {\n $dialog = new SymfonyQuestionHelper();\n $dialog->ask($this->createStreamableInputInterfaceMock($this->getInputStream('')), $this->createOutputInterface(), new Question('What\\'s your name?'));\n }\n\n protected function getInputStream($input)\n {\n $stream = fopen('php://memory', 'r+', false);\n fwrite($stream, $input);\n rewind($stream);\n\n return $stream;\n }\n\n protected function createOutputInterface()\n {\n $output = new StreamOutput(fopen('php://memory', 'r+', false));\n $output->setDecorated(false);\n\n return $output;\n }\n\n protected function createInputInterfaceMock($interactive = true)\n {\n $mock = $this->getMockBuilder('Symfony\\Component\\Console\\Input\\InputInterface')->getMock();\n $mock->expects($this->any())\n ->method('isInteractive')\n ->will($this->returnValue($interactive));\n\n return $mock;\n }\n\n private function assertOutputContains($expected, StreamOutput $output)\n {\n rewind($output->getStream());\n $stream = stream_get_contents($output->getStream());\n $this->assertContains($expected, $stream);\n }\n}\n"} +{"text": "/*\n * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_AVUTIL_H\n#define AVUTIL_AVUTIL_H\n\n/**\n * @file\n * external API header\n */\n\n/**\n * @mainpage\n *\n * @section ffmpeg_intro Introduction\n *\n * This document describes the usage of the different libraries\n * provided by FFmpeg.\n *\n * @li @ref libavc \"libavcodec\" encoding/decoding library\n * @li @ref lavfi \"libavfilter\" graph-based frame editing library\n * @li @ref libavf \"libavformat\" I/O and muxing/demuxing library\n * @li @ref lavd \"libavdevice\" special devices muxing/demuxing library\n * @li @ref lavu \"libavutil\" common utility library\n * @li @ref lswr \"libswresample\" audio resampling, format conversion and mixing\n * @li @ref lpp \"libpostproc\" post processing library\n * @li @ref libsws \"libswscale\" color conversion and scaling library\n *\n * @section ffmpeg_versioning Versioning and compatibility\n *\n * Each of the FFmpeg libraries contains a version.h header, which defines a\n * major, minor and micro version number with the\n * <em>LIBRARYNAME_VERSION_{MAJOR,MINOR,MICRO}</em> macros. The major version\n * number is incremented with backward incompatible changes - e.g. removing\n * parts of the public API, reordering public struct members, etc. The minor\n * version number is incremented for backward compatible API changes or major\n * new features - e.g. adding a new public function or a new decoder. The micro\n * version number is incremented for smaller changes that a calling program\n * might still want to check for - e.g. changing behavior in a previously\n * unspecified situation.\n *\n * FFmpeg guarantees backward API and ABI compatibility for each library as long\n * as its major version number is unchanged. This means that no public symbols\n * will be removed or renamed. Types and names of the public struct members and\n * values of public macros and enums will remain the same (unless they were\n * explicitly declared as not part of the public API). Documented behavior will\n * not change.\n *\n * In other words, any correct program that works with a given FFmpeg snapshot\n * should work just as well without any changes with any later snapshot with the\n * same major versions. This applies to both rebuilding the program against new\n * FFmpeg versions or to replacing the dynamic FFmpeg libraries that a program\n * links against.\n *\n * However, new public symbols may be added and new members may be appended to\n * public structs whose size is not part of public ABI (most public structs in\n * FFmpeg). New macros and enum values may be added. Behavior in undocumented\n * situations may change slightly (and be documented). All those are accompanied\n * by an entry in doc/APIchanges and incrementing either the minor or micro\n * version number.\n */\n\n/**\n * @defgroup lavu Common utility functions\n *\n * @brief\n * libavutil contains the code shared across all the other FFmpeg\n * libraries\n *\n * @note In order to use the functions provided by avutil you must include\n * the specific header.\n *\n * @{\n *\n * @defgroup lavu_crypto Crypto and Hashing\n *\n * @{\n * @}\n *\n * @defgroup lavu_math Maths\n * @{\n *\n * @}\n *\n * @defgroup lavu_string String Manipulation\n *\n * @{\n *\n * @}\n *\n * @defgroup lavu_mem Memory Management\n *\n * @{\n *\n * @}\n *\n * @defgroup lavu_data Data Structures\n * @{\n *\n * @}\n *\n * @defgroup lavu_audio Audio related\n *\n * @{\n *\n * @}\n *\n * @defgroup lavu_error Error Codes\n *\n * @{\n *\n * @}\n *\n * @defgroup lavu_log Logging Facility\n *\n * @{\n *\n * @}\n *\n * @defgroup lavu_misc Other\n *\n * @{\n *\n * @defgroup lavu_internal Internal\n *\n * Not exported functions, for internal usage only\n *\n * @{\n *\n * @}\n *\n * @defgroup preproc_misc Preprocessor String Macros\n *\n * @{\n *\n * @}\n *\n * @defgroup version_utils Library Version Macros\n *\n * @{\n *\n * @}\n */\n\n\n/**\n * @addtogroup lavu_ver\n * @{\n */\n\n/**\n * Return the LIBAVUTIL_VERSION_INT constant.\n */\nunsigned avutil_version(void);\n\n/**\n * Return the libavutil build-time configuration.\n */\nconst char *avutil_configuration(void);\n\n/**\n * Return the libavutil license.\n */\nconst char *avutil_license(void);\n\n/**\n * @}\n */\n\n/**\n * @addtogroup lavu_media Media Type\n * @brief Media Type\n */\n\nenum AVMediaType {\n AVMEDIA_TYPE_UNKNOWN = -1, ///< Usually treated as AVMEDIA_TYPE_DATA\n AVMEDIA_TYPE_VIDEO,\n AVMEDIA_TYPE_AUDIO,\n AVMEDIA_TYPE_DATA, ///< Opaque data information usually continuous\n AVMEDIA_TYPE_SUBTITLE,\n AVMEDIA_TYPE_ATTACHMENT, ///< Opaque data information usually sparse\n AVMEDIA_TYPE_NB\n};\n\n/**\n * Return a string describing the media_type enum, NULL if media_type\n * is unknown.\n */\nconst char *av_get_media_type_string(enum AVMediaType media_type);\n\n/**\n * @defgroup lavu_const Constants\n * @{\n *\n * @defgroup lavu_enc Encoding specific\n *\n * @note those definition should move to avcodec\n * @{\n */\n\n#define FF_LAMBDA_SHIFT 7\n#define FF_LAMBDA_SCALE (1<<FF_LAMBDA_SHIFT)\n#define FF_QP2LAMBDA 118 ///< factor to convert from H.263 QP to lambda\n#define FF_LAMBDA_MAX (256*128-1)\n\n#define FF_QUALITY_SCALE FF_LAMBDA_SCALE //FIXME maybe remove\n\n/**\n * @}\n * @defgroup lavu_time Timestamp specific\n *\n * FFmpeg internal timebase and timestamp definitions\n *\n * @{\n */\n\n/**\n * @brief Undefined timestamp value\n *\n * Usually reported by demuxer that work on containers that do not provide\n * either pts or dts.\n */\n\n#define AV_NOPTS_VALUE ((int64_t)UINT64_C(0x8000000000000000))\n\n/**\n * Internal time base represented as integer\n */\n\n#define AV_TIME_BASE 1000000\n\n/**\n * Internal time base represented as fractional value\n */\n\n#define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}\n\n/**\n * @}\n * @}\n * @defgroup lavu_picture Image related\n *\n * AVPicture types, pixel formats and basic image planes manipulation.\n *\n * @{\n */\n\nenum AVPictureType {\n AV_PICTURE_TYPE_NONE = 0, ///< Undefined\n AV_PICTURE_TYPE_I, ///< Intra\n AV_PICTURE_TYPE_P, ///< Predicted\n AV_PICTURE_TYPE_B, ///< Bi-dir predicted\n AV_PICTURE_TYPE_S, ///< S(GMC)-VOP MPEG4\n AV_PICTURE_TYPE_SI, ///< Switching Intra\n AV_PICTURE_TYPE_SP, ///< Switching Predicted\n AV_PICTURE_TYPE_BI, ///< BI type\n};\n\n/**\n * Return a single letter to describe the given picture type\n * pict_type.\n *\n * @param[in] pict_type the picture type @return a single character\n * representing the picture type, '?' if pict_type is unknown\n */\nchar av_get_picture_type_char(enum AVPictureType pict_type);\n\n/**\n * @}\n */\n\n#include \"common.h\"\n#include \"error.h\"\n#include \"rational.h\"\n#include \"version.h\"\n#include \"macros.h\"\n#include \"mathematics.h\"\n#include \"log.h\"\n#include \"pixfmt.h\"\n\n/**\n * Return x default pointer in case p is NULL.\n */\nstatic inline void *av_x_if_null(const void *p, const void *x)\n{\n return (void *)(intptr_t)(p ? p : x);\n}\n\n/**\n * Compute the length of an integer list.\n *\n * @param elsize size in bytes of each list element (only 1, 2, 4 or 8)\n * @param term list terminator (usually 0 or -1)\n * @param list pointer to the list\n * @return length of the list, in elements, not counting the terminator\n */\nunsigned av_int_list_length_for_size(unsigned elsize,\n const void *list, uint64_t term) av_pure;\n\n/**\n * Compute the length of an integer list.\n *\n * @param term list terminator (usually 0 or -1)\n * @param list pointer to the list\n * @return length of the list, in elements, not counting the terminator\n */\n#define av_int_list_length(list, term) \\\n av_int_list_length_for_size(sizeof(*(list)), list, term)\n\n/**\n * Open a file using a UTF-8 filename.\n * The API of this function matches POSIX fopen(), errors are returned through\n * errno.\n */\nFILE *av_fopen_utf8(const char *path, const char *mode);\n\n/**\n * Return the fractional representation of the internal time base.\n */\nAVRational av_get_time_base_q(void);\n\n/**\n * @}\n * @}\n */\n\n#endif /* AVUTIL_AVUTIL_H */\n"} +{"text": "/*=========================================================================\n\n Program: Visualization Toolkit\n Module: vtkArrayIteratorTemplateInstantiate.cxx\n\n Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen\n All rights reserved.\n See Copyright.txt or http://www.kitware.com/Copyright.htm for details.\n\n This software is distributed WITHOUT ANY WARRANTY; without even\n the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR\n PURPOSE. See the above copyright notice for more information.\n\n=========================================================================*/\n#define vtkArrayIteratorTemplateInstantiate_cxx\n\n#include \"vtkArrayIteratorTemplate.txx\"\n\nvtkInstantiateTemplateMacro(template class VTKCOMMONCORE_EXPORT vtkArrayIteratorTemplate);\ntemplate class VTKCOMMONCORE_EXPORT vtkArrayIteratorTemplate<vtkStdString>;\ntemplate class VTKCOMMONCORE_EXPORT vtkArrayIteratorTemplate<vtkUnicodeString>;\ntemplate class VTKCOMMONCORE_EXPORT vtkArrayIteratorTemplate<vtkVariant>;\n"} +{"text": "##\n# This is an easyconfig file for EasyBuild, see https://github.com/easybuilders/easybuild\n#\n# Copyright:: Copyright 2019 Juelich Supercomputing Centre, Germany\n# Authors:: Markus Geimer <m.geimer@fz-juelich.de>\n# License:: 3-clause BSD\n#\n# This work is based on experiences from the UNITE project\n# http://apps.fz-juelich.de/unite/\n##\n\neasyblock = 'EB_Score_minus_P'\n\nname = 'CubeLib'\nversion = '4.4.4'\n\nhomepage = 'https://www.scalasca.org/software/cube-4.x/download.html'\ndescription = \"\"\"\n Cube, which is used as performance report explorer for Scalasca and Score-P,\n is a generic tool for displaying a multi-dimensional performance space\n consisting of the dimensions (i) performance metric, (ii) call path, and\n (iii) system resource. Each dimension can be represented as a tree, where\n non-leaf nodes of the tree can be collapsed or expanded to achieve the\n desired level of granularity.\n\n This module provides the Cube general purpose C++ library component and\n command-line tools.\n\"\"\"\n\ntoolchain = {'name': 'GCCcore', 'version': '8.3.0'}\n\nsource_urls = ['https://apps.fz-juelich.de/scalasca/releases/cube/%(version_major_minor)s/dist']\nsources = [SOURCELOWER_TAR_GZ]\nchecksums = [\n 'adb8216ee3b7701383884417374e7ff946edb30e56640307c65465187dca7512', # cubelib-4.4.4.tar.gz\n]\n\nbuilddependencies = [\n # use same binutils version that was used when building GCCcore\n ('binutils', '2.32'),\n ('pkg-config', '0.29.2'),\n]\n\ndependencies = [\n ('zlib', '1.2.11'),\n]\n\nconfigopts = '--enable-shared'\n\nsanity_check_paths = {\n 'files': ['bin/cubelib-config',\n 'lib/libcube4.a', 'lib/libcube4.%s' % SHLIB_EXT],\n 'dirs': ['include/cubelib'],\n}\n\nmoduleclass = 'perf'\n"} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<Package\n xmlns=\"http://schemas.microsoft.com/appx/manifest/foundation/windows10\"\n xmlns:mp=\"http://schemas.microsoft.com/appx/2014/phone/manifest\"\n xmlns:uap=\"http://schemas.microsoft.com/appx/manifest/uap/windows10\"\n IgnorableNamespaces=\"uap mp\">\n\n <Identity\n Name=\"ed203ed5-6fd7-4890-8413-1e4f9cb27664\"\n Publisher=\"CN=Charles\"\n Version=\"1.0.0.0\" />\n\n <mp:PhoneIdentity PhoneProductId=\"ed203ed5-6fd7-4890-8413-1e4f9cb27664\" PhonePublisherId=\"00000000-0000-0000-0000-000000000000\"/>\n\n <Properties>\n <DisplayName>SwitchCloneDemo.UWP</DisplayName>\n <PublisherDisplayName>Charles</PublisherDisplayName>\n <Logo>Assets\\StoreLogo.png</Logo>\n </Properties>\n\n <Dependencies>\n <TargetDeviceFamily Name=\"Windows.Universal\" MinVersion=\"10.0.0.0\" MaxVersionTested=\"10.0.0.0\" />\n </Dependencies>\n\n <Resources>\n <Resource Language=\"x-generate\"/>\n </Resources>\n\n <Applications>\n <Application Id=\"App\"\n Executable=\"$targetnametoken$.exe\"\n EntryPoint=\"SwitchCloneDemo.UWP.App\">\n <uap:VisualElements\n DisplayName=\"SwitchCloneDemo.UWP\"\n Square150x150Logo=\"Assets\\Square150x150Logo.png\"\n Square44x44Logo=\"Assets\\Square44x44Logo.png\"\n Description=\"SwitchCloneDemo.UWP\"\n BackgroundColor=\"transparent\">\n <uap:DefaultTile Wide310x150Logo=\"Assets\\Wide310x150Logo.png\"/>\n <uap:SplashScreen Image=\"Assets\\SplashScreen.png\" />\n </uap:VisualElements>\n </Application>\n </Applications>\n\n <Capabilities>\n <Capability Name=\"internetClient\" />\n </Capabilities>\n</Package>"} +{"text": "using System.Collections.Generic;\nusing Orchard.Azure.MediaServices.Infrastructure.Assets;\nusing Orchard.Azure.MediaServices.Models.Assets;\nusing Orchard.ContentManagement;\n\nnamespace Orchard.Azure.MediaServices.Drivers {\n public class ThumbnailAssetDriver : AssetDriver<ThumbnailAsset> {\n protected override IEnumerable<AssetDriverResult> Editor(ThumbnailAsset asset, dynamic shapeFactory) {\n return Editor(asset, null, shapeFactory);\n }\n\n protected override IEnumerable<AssetDriverResult> Editor(ThumbnailAsset asset, IUpdateModel updater, dynamic shapeFactory) {\n yield return new AssetDriverResult {\n TabTitle = T(\"Thumbnail\"),\n EditorShape = shapeFactory.EditorTemplate(Model: asset, TemplateName: \"Assets/Thumbnail.Preview\", Prefix: Prefix)\n };\n }\n }\n}"} +{"text": "--secure-file-priv=$MYSQL_TMP_DIR\n"} +{"text": "/**\n * SPDX-FileCopyrightText: © 2019 Liferay, Inc. <https://liferay.com>\n * SPDX-License-Identifier: BSD-3-Clause\n */\n\nimport Editor from '$clayui.com/src/components/Editor';\nimport ClayIcon from '@clayui/icon';\nimport ClaySticker from '@clayui/sticker';\nimport React from 'react';\n\nconst stickerColorsAndSizesImportsCode = `import ClayIcon from '@clayui/icon';\nimport ClaySticker from '@clayui/sticker';`;\n\nconst StickerColorsAndSizesCode = `const Component = () => {\n\treturn (\n\t\t<>\n\t\t\t<ClaySticker displayType=\"danger\" size=\"sm\">\n\t\t\t\t<ClayIcon spritemap={spritemap} symbol=\"user\" />\n\t\t\t</ClaySticker>\n\n\t\t\t<ClaySticker displayType=\"dark\" size=\"md\">\n\t\t\t\t<ClayIcon spritemap={spritemap} symbol=\"user\" />\n\t\t\t</ClaySticker>\n\n\t\t\t<ClaySticker displayType=\"info\" size=\"lg\">\n\t\t\t\t<ClayIcon spritemap={spritemap} symbol=\"user\" />\n\t\t\t</ClaySticker>\n\n\t\t\t<ClaySticker displayType=\"light\" size=\"xl\">\n\t\t\t\t<ClayIcon spritemap={spritemap} symbol=\"user\" />\n\t\t\t</ClaySticker>\n\n\t\t\t<ClaySticker displayType=\"secondary\" size=\"xl\">\n\t\t\t\t<ClayIcon spritemap={spritemap} symbol=\"user\" />\n\t\t\t</ClaySticker>\n\n\t\t\t<ClaySticker displayType=\"success\" size=\"lg\">\n\t\t\t\t<ClayIcon spritemap={spritemap} symbol=\"user\" />\n\t\t\t</ClaySticker>\n\n\t\t\t<ClaySticker displayType=\"unstyled\" size=\"md\">\n\t\t\t\t<ClayIcon spritemap={spritemap} symbol=\"user\" />\n\t\t\t</ClaySticker>\n\n\t\t\t<ClaySticker displayType=\"warning\" size=\"sm\">\n\t\t\t\t<ClayIcon spritemap={spritemap} symbol=\"user\" />\n\t\t\t</ClaySticker>\n\t\t</>\n\t);\n}\n\nrender(<Component />);`;\n\nconst stickerColorsAndSizesImportsJSPCode = `<%@ taglib uri=\"http://liferay.com/tld/clay\" prefix=\"clay\" %>`;\n\nconst StickerColorsAndSizesJSPCode = `<clay:sticker\n\tdisplayType=\"danger\"\n\ticon=\"users\"\n\tsize=\"sm\"\n/>\n\n<clay:sticker\n\tdisplayType=\"dark\"\n\ticon=\"users\"\n\tsize=\"md\"\n/>\n\n<clay:sticker\n\tdisplayType=\"info\"\n\ticon=\"users\"\n\tsize=\"lg\"\n/>\n\n<clay:sticker\n\tdisplayType=\"light\"\n\ticon=\"users\"\n\tsize=\"xl\"\n/>\n\n<clay:sticker\n\tdisplayType=\"secondary\"\n\ticon=\"users\"\n\tsize=\"xl\"\n/>\n\n<clay:sticker\n\tdisplayType=\"success\"\n\ticon=\"users\"\n\tsize=\"lg\"\n/>\n\n<clay:sticker\n\tdisplayType=\"unstyled\"\n\ticon=\"users\"\n\tsize=\"md\"\n/>\n\n<clay:sticker\n\tdisplayType=\"warning\"\n\ticon=\"users\"\n\tsize=\"sm\"\n/>`;\n\nexport const StickerColorsAndSizes = () => {\n\tconst scope = {ClayIcon, ClaySticker};\n\n\tconst codeSnippets = [\n\t\t{\n\t\t\timports: stickerColorsAndSizesImportsCode,\n\t\t\tname: 'React',\n\t\t\tvalue: StickerColorsAndSizesCode,\n\t\t},\n\t\t{\n\t\t\tdisabled: true,\n\t\t\timports: stickerColorsAndSizesImportsJSPCode,\n\t\t\tname: 'JSP',\n\t\t\tvalue: StickerColorsAndSizesJSPCode,\n\t\t},\n\t];\n\n\treturn <Editor code={codeSnippets} scope={scope} />;\n};\n\nconst stickerUserIconImportsCode = `import ClaySticker from '@clayui/sticker';\n`;\n\nconst StickerUserIconCode = `const Component = () => {\n\treturn (\n\t\t<>\n\t\t\t<ClaySticker userIcon size=\"xl\">\n\t\t\t\t<ClaySticker.Image\n\t\t\t\t\talt=\"placeholder\"\n\t\t\t\t\tsrc=\"/images/long_user_image.png\"\n\t\t\t\t/>\n\t\t\t</ClaySticker>\n\n\t\t\t<ClaySticker userIcon size=\"xl\">\n\t\t\t\t{'BS'}\n\t\t\t</ClaySticker>\n\t\t</>\n\t);\n}\n\nrender(<Component />);`;\n\nexport const StickerUserIcon = () => {\n\tconst scope = {ClaySticker};\n\n\tconst code = StickerUserIconCode;\n\n\treturn (\n\t\t<Editor\n\t\t\tcode={code}\n\t\t\timports={stickerUserIconImportsCode}\n\t\t\tscope={scope}\n\t\t/>\n\t);\n};\n"} +{"text": "// enve - 2D animations software\n// Copyright (C) 2016-2020 Maurycy Liebner\n\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n\n// You should have received a copy of the GNU General Public License\n// along with this program. If not, see <http://www.gnu.org/licenses/>.\n\n#ifndef RUNTIMEWRITEID_H\n#define RUNTIMEWRITEID_H\n\n#include <QList>\n\n#include \"../core_global.h\"\n\nclass CORE_EXPORT RuntimeIdToWriteId {\npublic:\n void assign(const int runtimeId) {\n mRuntimeIds << runtimeId;\n }\n\n int runtimeIdToWriteId(const int runtimeId) const {\n return mRuntimeIds.indexOf(runtimeId);\n }\nprivate:\n QList<int> mRuntimeIds;\n};\n\n#endif // RUNTIMEWRITEID_H\n"} +{"text": "require 'paths'\npaths.dofile('mylib/helper.lua')\n\n-----------------------------------------\n-- Parameters:\n-----------------------------------------\n-- content_name: the content image located in folder \"data/content\"\n-- style_name: the style image located in folder \"data/style\" \n-- ini_method: initial method, set to \"image\" to use the content image as the initialization; set to \"random\" to use random noise. \n-- max_size: maximum size of the synthesis image. Default value 384. Larger image needs more time and memory.\n-- num_res: number of resolutions. Default value 3. Notice the lowest resolution image should be larger than the patch size otherwise it won't synthesize.\n-- num_iter: number of iterations for each resolution. Default value 100 for all resolutions. \n\n-- mrf_layers: the layers for MRF constraint. Usualy layer 21 alone already gives decent results. Including layer 12 may improve the results but at significantly more computational cost.\n-- mrf_weight: weight for each MRF layer. Default value 1e-4. Higher weights leads to more style faithful results.\n-- mrf_patch_size: the patch size for MRF constraint. Default value 3. This value is defined seperately for each MRF layer.\n-- mrf_num_rotation: To matching objects of different poses. Default value 0. This value is shared by all MRF layers. The total number of rotatoinal copies is \"2 * mrf_num_rotation + 1\"\n-- mrf_num_scale: To matching objects of different scales. Default value 0. This value is shared by all MRF layers. The total number of scaled copies is \"2 * mrf_num_scale + 1\"\n-- mrf_sample_stride: stride to sample mrf on style image. Default value 2. This value is defined seperately for each MRF layer.\n-- mrf_synthesis_stride: stride to sample mrf on synthesis image. Default value 2. This value is defined seperately for each MRF layer.\n-- mrf_confidence_threshold: threshold for filtering out bad matching. Default value 0 -- means we keep all matchings. This value is defined seperately for all layers.\n\n-- content_layers: the layers for content constraint. Default value 23.\n-- content_weight: The weight for content constraint. Default value 2e1. Increasing this value will make the result more content faithful. Decreasing the value will make the method more style faithful. Notice this value should be increase (for example, doubled) if layer 12 is included for MRF constraint, \n\n-- tv_weight: TV smoothness weight. Default value 1e-3.\n\n-- mode: speed or memory. Try 'speed' if you have a GPU with more than 4GB memory, and try 'memory' otherwise. The 'speed' mode is significantly faster (especially for synthesizing high resolutions) at the cost of higher GPU memory.\n-- gpu_chunck_size_1: Size of chunks to split feature maps along the channel dimension. This is to save memory when normalizing the matching score in mrf layers. Use large value if you have large gpu memory. As reference we use 256 for Titan X, and 32 for Geforce GT750M 2G.\n-- gpu_chunck_size_2: Size of chuncks to split feature maps along the y dimension. This is to save memory when normalizing the matching score in mrf layers. Use large value if you have large gpu memory. As reference we use 16 for Titan X, and 2 for Geforce GT750M 2G.\n-- backend: Use 'cudnn' for CUDA-enabled GPUs or 'clnn' for OpenCL.\n\n-----------------------------------------\n-- Reference tests \n-----------------------------------------\n-- speed mode V.S. memory mode (Titan X 12G)\n-- {'potrait1', 'picasso', 'image', 384, 3, {100, 100, 100}, {12, 21}, {1e-4, 1e-4}, {3, 3}, 1, 1, {2, 2}, {2, 2}, {0, 0}, {23}, 2e1, 1e-3, 'speed', 256, 16, 'cudnn'}, -- 101 seconds\n-- {'potrait1', 'picasso', 'image', 384, 3, {100, 100, 100}, {12, 21}, {1e-4, 1e-4}, {3, 3}, 1, 1, {2, 2}, {2, 2}, {0, 0}, {23}, 2e1, 1e-3, 'memory', 256, 16, 'cudnn'}, -- 283 seconds\n\n-- speed mode V.S. memory mode (Geforce GT750M 2G)\n-- {'potrait1', 'picasso', 'image', 384, 3, {100, 100, 100}, {12, 21}, {1e-4, 1e-4}, {3, 3}, 1, 1, {2, 2}, {2, 2}, {0, 0}, {23}, 2e1, 1e-3, 'speed', 256, 16, 'cudnn'}, -- 570 seconds (gpu streching, not recommended) \n-- {'potrait1', 'picasso', 'image', 384, 3, {100, 100, 100}, {12, 21}, {1e-4, 1e-4}, {3, 3}, 1, 1, {2, 2}, {2, 2}, {0, 0}, {23}, 2e1, 1e-3, 'memory', 256, 16, 'cudnn'}, -- 973 seconds\n\n-- speed mode V.S. memory mode (Sapphire Radeon R9 280 3G)\n-- {'potrait1', 'picasso', 'image', 384, 3, {100, 100, 100}, {12, 21}, {1e-4, 1e-4}, {3, 3}, 1, 1, {2, 2}, {2, 2}, {0, 0}, {23}, 2e1, 1e-3, 'memory', 256, 16, 'clnn'}, -- 301 seconds (346 seconds total)\n-- {'potrait1', 'picasso', 'image', 384, 3, {100, 100, 100}, {12, 21}, {1e-4, 1e-4}, {3, 3}, 1, 1, {2, 2}, {2, 2}, {0, 0}, {23}, 2e1, 1e-3, 'speed', 256, 16, 'clnn'}, -- 6500 seconds (7032 seconds total)\n\n-- style interpolation (high resolution with Titan X 12G):\n-- {'potrait1', 'picasso', 'image', 384, 3, {100, 100, 100}, {12, 21}, {1e-4, 1e-4}, {3, 3}, 1, 1, {2, 2}, {2, 2}, {0, 0}, {23}, 2e1, 1e-3, 'speed', 256, 16, 'cudnn'}, -- balanced \n-- {'potrait1', 'picasso', 'image', 384, 3, {100, 100, 100}, {12, 21}, {1e-4, 1e-4}, {3, 3}, 1, 1, {2, 2}, {2, 2}, {0, 0}, {23}, 4e1, 1e-3, 'speed', 256, 16, 'cudnn'}, -- more content \n-- {'potrait1', 'picasso', 'image', 384, 3, {100, 100, 100}, {12, 21}, {1e-4, 1e-4}, {3, 3}, 1, 1, {2, 2}, {2, 2}, {0, 0}, {23}, 1e1, 1e-3, 'speed', 256, 16, 'cudnn'}, -- more style \n\n-- style interpolation (low resolution with Geforce GT750M 2G):\n-- {'potrait1', 'picasso', 'image', 256, 3, {100, 100, 100}, {12, 21}, {1e-4, 1e-4}, {3, 3}, 1, 1, {2, 2}, {2, 2}, {0, 0}, {23}, 2e1, 1e-3, 'speed', 32, 2, 'cudnn'}, -- balanced\n-- {'potrait1', 'picasso', 'image', 256, 3, {100, 100, 100}, {12, 21}, {1e-4, 1e-4}, {3, 3}, 1, 1, {2, 2}, {2, 2}, {0, 0}, {23}, 4e1, 1e-3, 'speed', 32, 2, 'cudnn'}, -- more content \n-- {'potrait1', 'picasso', 'image', 256, 3, {100, 100, 100}, {12, 21}, {1e-4, 1e-4}, {3, 3}, 1, 1, {2, 2}, {2, 2}, {0, 0}, {23}, 1e1, 1e-3, 'speed', 32, 2, 'cudnn'}, -- more style \n\n-- other\n-- {'0', '0', 'image', 384, 3, {100, 100, 100}, {12, 21}, {1e-4, 1e-4}, {3, 3}, 3, 3, {2, 2}, {2, 2}, {0, 0}, {23}, 2e1, 1e-3, 'speed', 256, 16, 'cudnn'}, -- Titan X 12G: 145 seconds\n-- {'1', '1', 'image', 384, 3, {100, 100, 100}, {12, 21}, {1e-4, 1e-4}, {3, 3}, 3, 3, {2, 2}, {2, 2}, {0, 0}, {23}, 0.5e1, 1e-3, 'speed', 256, 16, 'cudnn'}, -- Titan X 12G: 146 seconds\n-- {'0', '0', 'image', 256, 3, {100, 100, 100}, {12, 21}, {1e-4, 1e-4}, {3, 3}, 3, 3, {3, 3}, {2, 2}, {0, 0}, {23}, 1e1, 1e-3, 'speed', 32, 2, 'cudnn'}, -- Geforce GT750M 2G: 593 seconds\n-- {'1', '1', 'image', 256, 3, {100, 100, 100}, {12, 21}, {1e-4, 1e-4}, {3, 3}, 3, 3, {3, 3}, {2, 2}, {0, 0}, {23}, 0.5e1, 1e-3, 'speed', 32, 2, 'cudnn'}, -- Geforce GT750M 2G: 623 seconds\n\n \nlocal list_params = {\n {'potrait1', 'picasso', 'image', 384, 3, {100, 100, 100}, {12, 21}, {1e-4, 1e-4}, {3, 3}, 1, 1, {2, 2}, {2, 2}, {0, 0}, {23}, 2e1, 1e-3, 'speed', 256, 16, 'cudnn'},\n {'0', '0', 'image', 384, 3, {100, 100, 100}, {12, 21}, {1e-4, 1e-4}, {3, 3}, 3, 3, {2, 2}, {2, 2}, {0, 0}, {23}, 2e1, 1e-3, 'speed', 256, 16, 'cudnn'},\n {'1', '1', 'image', 384, 3, {100, 100, 100}, {12, 21}, {1e-4, 1e-4}, {3, 3}, 3, 3, {2, 2}, {2, 2}, {0, 0}, {23}, 0.5e1, 1e-3, 'speed', 256, 16, 'cudnn'},\n {'potrait1', 'picasso', 'image', 384, 3, {100, 100, 100}, {12, 21}, {1e-4, 1e-4}, {3, 3}, 1, 1, {2, 2}, {2, 2}, {0, 0}, {23}, 2e1, 1e-3, 'memory', 256, 16, 'clnn'},\n}\n\nrun_tests(require 'transfer_CNNMRF_wrapper', list_params)"} +{"text": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 9,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"import tensorflow as tf\\n\",\n \"import numpy as np\\n\",\n \"import time\\n\",\n \"import os\\n\",\n \"from sklearn.preprocessing import LabelEncoder\\n\",\n \"import re\\n\",\n \"import collections\\n\",\n \"import random\\n\",\n \"import pickle\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"maxlen = 20\\n\",\n \"location = os.getcwd()\\n\",\n \"num_layers = 3\\n\",\n \"size_layer = 256\\n\",\n \"learning_rate = 0.0001\\n\",\n \"batch = 100\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"with open('dataset-emotion.p', 'rb') as fopen:\\n\",\n \" df = pickle.load(fopen)\\n\",\n \"with open('vector-emotion.p', 'rb') as fopen:\\n\",\n \" vectors = pickle.load(fopen)\\n\",\n \"with open('dataset-dictionary.p', 'rb') as fopen:\\n\",\n \" dictionary = pickle.load(fopen)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 5,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"label = np.unique(df[:,1])\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 6,\n \"metadata\": {},\n \"outputs\": [\n {\n \"name\": \"stderr\",\n \"output_type\": \"stream\",\n \"text\": [\n \"/usr/local/lib/python3.5/dist-packages/sklearn/cross_validation.py:41: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.\\n\",\n \" \\\"This module will be removed in 0.20.\\\", DeprecationWarning)\\n\"\n ]\n }\n ],\n \"source\": [\n \"from sklearn.cross_validation import train_test_split\\n\",\n \"train_X, test_X, train_Y, test_Y = train_test_split(df[:,0], df[:, 1].astype('int'), test_size = 0.2)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \" class Model:\\n\",\n \" \\n\",\n \" def __init__(self, num_layers, size_layer, dimension_input, dimension_output, learning_rate):\\n\",\n \" def lstm_cell():\\n\",\n \" return tf.nn.rnn_cell.LSTMCell(size_layer)\\n\",\n \" self.rnn_cells = tf.nn.rnn_cell.MultiRNNCell([lstm_cell() for _ in range(num_layers)])\\n\",\n \" self.X = tf.placeholder(tf.float32, [None, None, dimension_input])\\n\",\n \" self.Y = tf.placeholder(tf.float32, [None, dimension_output])\\n\",\n \" drop = tf.contrib.rnn.DropoutWrapper(self.rnn_cells, output_keep_prob = 0.5)\\n\",\n \" self.outputs, self.last_state = tf.nn.dynamic_rnn(drop, self.X, dtype = tf.float32)\\n\",\n \" self.rnn_W = tf.Variable(tf.random_normal((size_layer, dimension_output)))\\n\",\n \" self.rnn_B = tf.Variable(tf.random_normal([dimension_output]))\\n\",\n \" self.logits = tf.matmul(self.outputs[:, -1], self.rnn_W) + self.rnn_B\\n\",\n \" self.cost = tf.losses.huber_loss(predictions = self.logits, labels = self.Y)\\n\",\n \" self.optimizer = tf.train.AdamOptimizer(learning_rate = learning_rate).minimize(self.cost)\\n\",\n \" self.correct_pred = tf.equal(tf.argmax(self.logits, 1), tf.argmax(self.Y, 1))\\n\",\n \" self.accuracy = tf.reduce_mean(tf.cast(self.correct_pred, tf.float32))\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 10,\n \"metadata\": {},\n \"outputs\": [\n {\n \"name\": \"stdout\",\n \"output_type\": \"stream\",\n \"text\": [\n \"'unwarrentedly'\\n\",\n \"epoch: 0 , pass acc: 0 , current acc: 0.655906340655\\n\",\n \"time taken: 191.84650111198425\\n\",\n \"epoch: 1 , training loss: 0.0552944915719 , training acc: 0.552300520152 , valid loss: 0.0459568657044 , valid acc: 0.655906340655\\n\",\n \"'unwarrentedly'\\n\",\n \"epoch: 1 , pass acc: 0.655906340655 , current acc: 0.8312004703\\n\",\n \"time taken: 192.83655428886414\\n\",\n \"epoch: 2 , training loss: 0.0369134421601 , training acc: 0.757981384165 , valid loss: 0.0288921759016 , valid acc: 0.8312004703\\n\",\n \"'unwarrentedly'\\n\",\n \"epoch: 2 , pass acc: 0.8312004703 , current acc: 0.886506612919\\n\",\n \"time taken: 193.10966515541077\\n\",\n \"epoch: 3 , training loss: 0.0241055863286 , training acc: 0.863842230753 , valid loss: 0.0201166955349 , valid acc: 0.886506612919\\n\",\n \"'unwarrentedly'\\n\",\n \"epoch: 3 , pass acc: 0.886506612919 , current acc: 0.901464596874\\n\",\n \"time taken: 192.95378923416138\\n\",\n \"epoch: 4 , training loss: 0.0174091853284 , training acc: 0.897333542548 , valid loss: 0.0155279790247 , valid acc: 0.901464596874\\n\",\n \"'unwarrentedly'\\n\",\n \"epoch: 4 , pass acc: 0.901464596874 , current acc: 0.907310935415\\n\",\n \"time taken: 193.09582042694092\\n\",\n \"epoch: 5 , training loss: 0.0140214458658 , training acc: 0.908305351292 , valid loss: 0.0130081367964 , valid acc: 0.907310935415\\n\",\n \"'unwarrentedly'\\n\",\n \"epoch: 5 , pass acc: 0.907310935415 , current acc: 0.909435787765\\n\",\n \"time taken: 192.78576016426086\\n\",\n \"epoch: 6 , training loss: 0.0122534419162 , training acc: 0.912636485172 , valid loss: 0.0117871526865 , valid acc: 0.909435787765\\n\",\n \"'unwarrentedly'\\n\",\n \"epoch: 6 , pass acc: 0.909435787765 , current acc: 0.911284525641\\n\",\n \"time taken: 193.10023474693298\\n\",\n \"epoch: 7 , training loss: 0.0112063313944 , training acc: 0.915006011242 , valid loss: 0.0109204707426 , valid acc: 0.911284525641\\n\",\n \"'unwarrentedly'\\n\",\n \"epoch: 7 , pass acc: 0.911284525641 , current acc: 0.912701091346\\n\",\n \"time taken: 193.16579008102417\\n\",\n \"epoch: 8 , training loss: 0.010568655977 , training acc: 0.916445722481 , valid loss: 0.010435663584 , valid acc: 0.912701091346\\n\",\n \"'unwarrentedly'\\n\",\n \"epoch: 8 , pass acc: 0.912701091346 , current acc: 0.913133265663\\n\",\n \"time taken: 193.07848358154297\\n\",\n \"epoch: 9 , training loss: 0.0100963706223 , training acc: 0.917762459397 , valid loss: 0.0100739000696 , valid acc: 0.913133265663\\n\",\n \"'unwarrentedly'\\n\",\n \"epoch: 9 , pass acc: 0.913133265663 , current acc: 0.914705893\\n\",\n \"time taken: 192.79624152183533\\n\",\n \"epoch: 10 , training loss: 0.00975196156867 , training acc: 0.919097193108 , valid loss: 0.00980653872882 , valid acc: 0.914705893\\n\",\n \"'unwarrentedly'\\n\",\n \"epoch: 10 , pass acc: 0.914705893 , current acc: 0.915438190013\\n\",\n \"time taken: 192.98912000656128\\n\",\n \"epoch: 11 , training loss: 0.00947334745978 , training acc: 0.919856041366 , valid loss: 0.00961408704589 , valid acc: 0.915438190013\\n\",\n \"'unwarrentedly'\\n\",\n \"time taken: 193.06795620918274\\n\",\n \"epoch: 12 , training loss: 0.00926152890493 , training acc: 0.92061489016 , valid loss: 0.00948444420739 , valid acc: 0.915438187223\\n\",\n \"'unwarrentedly'\\n\",\n \"epoch: 12 , pass acc: 0.915438190013 , current acc: 0.916014416235\\n\",\n \"time taken: 193.26268124580383\\n\",\n \"epoch: 13 , training loss: 0.00908494556632 , training acc: 0.921331746462 , valid loss: 0.00935218644235 , valid acc: 0.916014416235\\n\",\n \"'unwarrentedly'\\n\",\n \"time taken: 192.9246437549591\\n\",\n \"epoch: 14 , training loss: 0.00894308844975 , training acc: 0.921859639933 , valid loss: 0.00925432719706 , valid acc: 0.915174080902\\n\",\n \"'unwarrentedly'\\n\",\n \"epoch: 14 , pass acc: 0.916014416235 , current acc: 0.91602642217\\n\",\n \"time taken: 193.05782985687256\\n\",\n \"epoch: 15 , training loss: 0.00882605937001 , training acc: 0.922867438449 , valid loss: 0.00916489250908 , valid acc: 0.91602642217\\n\",\n \"'unwarrentedly'\\n\",\n \"time taken: 192.69727301597595\\n\",\n \"epoch: 16 , training loss: 0.00873483493145 , training acc: 0.9230594005 , valid loss: 0.00907194815936 , valid acc: 0.915126060738\\n\",\n \"'unwarrentedly'\\n\",\n \"time taken: 192.58912920951843\\n\",\n \"epoch: 17 , training loss: 0.0086552099321 , training acc: 0.923545303446 , valid loss: 0.00905315602972 , valid acc: 0.915174084193\\n\",\n \"'unwarrentedly'\\n\",\n \"time taken: 192.90950059890747\\n\",\n \"epoch: 18 , training loss: 0.00857257642563 , training acc: 0.923848243588 , valid loss: 0.00902035343992 , valid acc: 0.914549834016\\n\",\n \"'unwarrentedly'\\n\",\n \"time taken: 200.9635829925537\\n\",\n \"epoch: 19 , training loss: 0.00851276552349 , training acc: 0.924358139763 , valid loss: 0.00897405131179 , valid acc: 0.914945986806\\n\",\n \"'unwarrentedly'\\n\",\n \"time taken: 378.8738946914673\\n\",\n \"epoch: 20 , training loss: 0.00844283038208 , training acc: 0.924640085465 , valid loss: 0.00896657272359 , valid acc: 0.914165679289\\n\",\n \"'unwarrentedly'\\n\",\n \"time taken: 379.82759189605713\\n\",\n \"epoch: 21 , training loss: 0.00839368172763 , training acc: 0.925230966404 , valid loss: 0.00897632525213 , valid acc: 0.914081643681\\n\",\n \"'unwarrentedly'\\n\",\n \"time taken: 376.65330028533936\\n\",\n \"epoch: 22 , training loss: 0.00833383536924 , training acc: 0.925683876034 , valid loss: 0.00896239722995 , valid acc: 0.914261715252\\n\",\n \"'unwarrentedly'\\n\",\n \"time taken: 379.56110429763794\\n\",\n \"epoch: 23 , training loss: 0.00829469645843 , training acc: 0.926115790222 , valid loss: 0.00896997488744 , valid acc: 0.913553432757\\n\",\n \"'unwarrentedly'\\n\",\n \"time taken: 375.16111731529236\\n\",\n \"epoch: 24 , training loss: 0.00823754242615 , training acc: 0.926766658802 , valid loss: 0.00896394448293 , valid acc: 0.912917180651\\n\",\n \"'unwarrentedly'\\n\",\n \"time taken: 379.17542552948\\n\",\n \"epoch: 25 , training loss: 0.00818046197178 , training acc: 0.927201572137 , valid loss: 0.00896935727467 , valid acc: 0.914297731913\\n\",\n \"break epoch: 25\\n\"\n ]\n }\n ],\n \"source\": [\n \"tf.reset_default_graph()\\n\",\n \"sess = tf.InteractiveSession()\\n\",\n \"model = Model(num_layers, size_layer, vectors.shape[1], label.shape[0], learning_rate)\\n\",\n \"sess.run(tf.global_variables_initializer())\\n\",\n \"dimension = vectors.shape[1]\\n\",\n \"saver = tf.train.Saver(tf.global_variables())\\n\",\n \"EARLY_STOPPING, CURRENT_CHECKPOINT, CURRENT_ACC, EPOCH = 10, 0, 0, 0\\n\",\n \"batch_size = 200\\n\",\n \"while True:\\n\",\n \" lasttime = time.time()\\n\",\n \" if CURRENT_CHECKPOINT == EARLY_STOPPING:\\n\",\n \" print('break epoch:', EPOCH)\\n\",\n \" break\\n\",\n \" train_acc, train_loss, test_acc, test_loss = 0, 0, 0, 0\\n\",\n \" for i in range(0, (train_X.shape[0] // batch) * batch, batch):\\n\",\n \" batch_x = np.zeros((batch, maxlen, dimension))\\n\",\n \" batch_y = np.zeros((batch, len(label)))\\n\",\n \" for k in range(batch):\\n\",\n \" tokens = train_X[i + k].split()[:maxlen]\\n\",\n \" emb_data = np.zeros((maxlen, dimension), dtype = np.float32)\\n\",\n \" for no, text in enumerate(tokens[::-1]):\\n\",\n \" try:\\n\",\n \" emb_data[-1 - no, :] += vectors[dictionary[text], :]\\n\",\n \" except Exception as e:\\n\",\n \" print(e)\\n\",\n \" continue\\n\",\n \" batch_y[k, int(train_Y[i + k])] = 1.0\\n\",\n \" batch_x[k, :, :] = emb_data[:, :]\\n\",\n \" loss, _ = sess.run([model.cost, model.optimizer], feed_dict = {model.X : batch_x, model.Y : batch_y})\\n\",\n \" train_loss += loss\\n\",\n \" train_acc += sess.run(model.accuracy, feed_dict = {model.X : batch_x, model.Y : batch_y})\\n\",\n \" \\n\",\n \" for i in range(0, (test_X.shape[0] // batch) * batch, batch):\\n\",\n \" batch_x = np.zeros((batch, maxlen, dimension))\\n\",\n \" batch_y = np.zeros((batch, len(label)))\\n\",\n \" for k in range(batch):\\n\",\n \" tokens = test_X[i + k].split()[:maxlen]\\n\",\n \" emb_data = np.zeros((maxlen, dimension), dtype = np.float32)\\n\",\n \" for no, text in enumerate(tokens[::-1]):\\n\",\n \" try:\\n\",\n \" emb_data[-1 - no, :] += vectors[dictionary[text], :]\\n\",\n \" except:\\n\",\n \" continue\\n\",\n \" batch_y[k, int(test_Y[i + k])] = 1.0\\n\",\n \" batch_x[k, :, :] = emb_data[:, :]\\n\",\n \" loss, acc = sess.run([model.cost, model.accuracy], feed_dict = {model.X : batch_x, model.Y : batch_y})\\n\",\n \" test_loss += loss\\n\",\n \" test_acc += acc\\n\",\n \" \\n\",\n \" train_loss /= (train_X.shape[0] // batch)\\n\",\n \" train_acc /= (train_X.shape[0] // batch)\\n\",\n \" test_loss /= (test_X.shape[0] // batch)\\n\",\n \" test_acc /= (test_X.shape[0] // batch)\\n\",\n \" if test_acc > CURRENT_ACC:\\n\",\n \" print('epoch:', EPOCH, ', pass acc:', CURRENT_ACC, ', current acc:', test_acc)\\n\",\n \" CURRENT_ACC = test_acc\\n\",\n \" CURRENT_CHECKPOINT = 0\\n\",\n \" saver.save(sess, os.getcwd() + \\\"/model-rnn-vector-huber.ckpt\\\")\\n\",\n \" else:\\n\",\n \" CURRENT_CHECKPOINT += 1\\n\",\n \" EPOCH += 1\\n\",\n \" print('time taken:', time.time()-lasttime)\\n\",\n \" print('epoch:', EPOCH, ', training loss:', train_loss, ', training acc:', train_acc, ', valid loss:', test_loss, ', valid acc:', test_acc)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {},\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"kernelspec\": {\n \"display_name\": \"Python 3\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.5.2\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"} +{"text": "# coding: utf-8\n# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.\n# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.\n\n\nfrom oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401\nfrom oci.decorators import init_model_state_from_kwargs\n\n\n@init_model_state_from_kwargs\nclass IPSecConnection(object):\n \"\"\"\n A connection between a DRG and CPE. This connection consists of multiple IPSec\n tunnels. Creating this connection is one of the steps required when setting up\n an IPSec VPN.\n\n **Important:** Each tunnel in an IPSec connection can use either static routing or BGP dynamic\n routing (see the :class:`IPSecConnectionTunnel` object's\n `routing` attribute). Originally only static routing was supported and\n every IPSec connection was required to have at least one static route configured.\n To maintain backward compatibility in the API when support for BPG dynamic routing was introduced,\n the API accepts an empty list of static routes if you configure both of the IPSec tunnels to use\n BGP dynamic routing. If you switch a tunnel's routing from `BGP` to `STATIC`, you must first\n ensure that the IPSec connection is configured with at least one valid CIDR block static route.\n Oracle uses the IPSec connection's static routes when routing a tunnel's traffic *only*\n if that tunnel's `routing` attribute = `STATIC`. Otherwise the static routes are ignored.\n\n For more information about the workflow for setting up an IPSec connection, see\n `IPSec VPN`__.\n\n To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized,\n talk to an administrator. If you're an administrator who needs to write policies to give users access, see\n `Getting Started with Policies`__.\n\n **Warning:** Oracle recommends that you avoid using any confidential information when you\n supply string values using the API.\n\n __ https://docs.cloud.oracle.com/Content/Network/Tasks/managingIPsec.htm\n __ https://docs.cloud.oracle.com/Content/Identity/Concepts/policygetstarted.htm\n \"\"\"\n\n #: A constant which can be used with the lifecycle_state property of a IPSecConnection.\n #: This constant has a value of \"PROVISIONING\"\n LIFECYCLE_STATE_PROVISIONING = \"PROVISIONING\"\n\n #: A constant which can be used with the lifecycle_state property of a IPSecConnection.\n #: This constant has a value of \"AVAILABLE\"\n LIFECYCLE_STATE_AVAILABLE = \"AVAILABLE\"\n\n #: A constant which can be used with the lifecycle_state property of a IPSecConnection.\n #: This constant has a value of \"TERMINATING\"\n LIFECYCLE_STATE_TERMINATING = \"TERMINATING\"\n\n #: A constant which can be used with the lifecycle_state property of a IPSecConnection.\n #: This constant has a value of \"TERMINATED\"\n LIFECYCLE_STATE_TERMINATED = \"TERMINATED\"\n\n #: A constant which can be used with the cpe_local_identifier_type property of a IPSecConnection.\n #: This constant has a value of \"IP_ADDRESS\"\n CPE_LOCAL_IDENTIFIER_TYPE_IP_ADDRESS = \"IP_ADDRESS\"\n\n #: A constant which can be used with the cpe_local_identifier_type property of a IPSecConnection.\n #: This constant has a value of \"HOSTNAME\"\n CPE_LOCAL_IDENTIFIER_TYPE_HOSTNAME = \"HOSTNAME\"\n\n def __init__(self, **kwargs):\n \"\"\"\n Initializes a new IPSecConnection object with values from keyword arguments.\n The following keyword arguments are supported (corresponding to the getters/setters of this class):\n\n :param compartment_id:\n The value to assign to the compartment_id property of this IPSecConnection.\n :type compartment_id: str\n\n :param cpe_id:\n The value to assign to the cpe_id property of this IPSecConnection.\n :type cpe_id: str\n\n :param defined_tags:\n The value to assign to the defined_tags property of this IPSecConnection.\n :type defined_tags: dict(str, dict(str, object))\n\n :param display_name:\n The value to assign to the display_name property of this IPSecConnection.\n :type display_name: str\n\n :param drg_id:\n The value to assign to the drg_id property of this IPSecConnection.\n :type drg_id: str\n\n :param freeform_tags:\n The value to assign to the freeform_tags property of this IPSecConnection.\n :type freeform_tags: dict(str, str)\n\n :param id:\n The value to assign to the id property of this IPSecConnection.\n :type id: str\n\n :param lifecycle_state:\n The value to assign to the lifecycle_state property of this IPSecConnection.\n Allowed values for this property are: \"PROVISIONING\", \"AVAILABLE\", \"TERMINATING\", \"TERMINATED\", 'UNKNOWN_ENUM_VALUE'.\n Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.\n :type lifecycle_state: str\n\n :param cpe_local_identifier:\n The value to assign to the cpe_local_identifier property of this IPSecConnection.\n :type cpe_local_identifier: str\n\n :param cpe_local_identifier_type:\n The value to assign to the cpe_local_identifier_type property of this IPSecConnection.\n Allowed values for this property are: \"IP_ADDRESS\", \"HOSTNAME\", 'UNKNOWN_ENUM_VALUE'.\n Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.\n :type cpe_local_identifier_type: str\n\n :param static_routes:\n The value to assign to the static_routes property of this IPSecConnection.\n :type static_routes: list[str]\n\n :param time_created:\n The value to assign to the time_created property of this IPSecConnection.\n :type time_created: datetime\n\n \"\"\"\n self.swagger_types = {\n 'compartment_id': 'str',\n 'cpe_id': 'str',\n 'defined_tags': 'dict(str, dict(str, object))',\n 'display_name': 'str',\n 'drg_id': 'str',\n 'freeform_tags': 'dict(str, str)',\n 'id': 'str',\n 'lifecycle_state': 'str',\n 'cpe_local_identifier': 'str',\n 'cpe_local_identifier_type': 'str',\n 'static_routes': 'list[str]',\n 'time_created': 'datetime'\n }\n\n self.attribute_map = {\n 'compartment_id': 'compartmentId',\n 'cpe_id': 'cpeId',\n 'defined_tags': 'definedTags',\n 'display_name': 'displayName',\n 'drg_id': 'drgId',\n 'freeform_tags': 'freeformTags',\n 'id': 'id',\n 'lifecycle_state': 'lifecycleState',\n 'cpe_local_identifier': 'cpeLocalIdentifier',\n 'cpe_local_identifier_type': 'cpeLocalIdentifierType',\n 'static_routes': 'staticRoutes',\n 'time_created': 'timeCreated'\n }\n\n self._compartment_id = None\n self._cpe_id = None\n self._defined_tags = None\n self._display_name = None\n self._drg_id = None\n self._freeform_tags = None\n self._id = None\n self._lifecycle_state = None\n self._cpe_local_identifier = None\n self._cpe_local_identifier_type = None\n self._static_routes = None\n self._time_created = None\n\n @property\n def compartment_id(self):\n \"\"\"\n **[Required]** Gets the compartment_id of this IPSecConnection.\n The OCID of the compartment containing the IPSec connection.\n\n\n :return: The compartment_id of this IPSecConnection.\n :rtype: str\n \"\"\"\n return self._compartment_id\n\n @compartment_id.setter\n def compartment_id(self, compartment_id):\n \"\"\"\n Sets the compartment_id of this IPSecConnection.\n The OCID of the compartment containing the IPSec connection.\n\n\n :param compartment_id: The compartment_id of this IPSecConnection.\n :type: str\n \"\"\"\n self._compartment_id = compartment_id\n\n @property\n def cpe_id(self):\n \"\"\"\n **[Required]** Gets the cpe_id of this IPSecConnection.\n The OCID of the :class:`Cpe` object.\n\n\n :return: The cpe_id of this IPSecConnection.\n :rtype: str\n \"\"\"\n return self._cpe_id\n\n @cpe_id.setter\n def cpe_id(self, cpe_id):\n \"\"\"\n Sets the cpe_id of this IPSecConnection.\n The OCID of the :class:`Cpe` object.\n\n\n :param cpe_id: The cpe_id of this IPSecConnection.\n :type: str\n \"\"\"\n self._cpe_id = cpe_id\n\n @property\n def defined_tags(self):\n \"\"\"\n Gets the defined_tags of this IPSecConnection.\n Defined tags for this resource. Each key is predefined and scoped to a\n namespace. For more information, see `Resource Tags`__.\n\n Example: `{\\\"Operations\\\": {\\\"CostCenter\\\": \\\"42\\\"}}`\n\n __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm\n\n\n :return: The defined_tags of this IPSecConnection.\n :rtype: dict(str, dict(str, object))\n \"\"\"\n return self._defined_tags\n\n @defined_tags.setter\n def defined_tags(self, defined_tags):\n \"\"\"\n Sets the defined_tags of this IPSecConnection.\n Defined tags for this resource. Each key is predefined and scoped to a\n namespace. For more information, see `Resource Tags`__.\n\n Example: `{\\\"Operations\\\": {\\\"CostCenter\\\": \\\"42\\\"}}`\n\n __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm\n\n\n :param defined_tags: The defined_tags of this IPSecConnection.\n :type: dict(str, dict(str, object))\n \"\"\"\n self._defined_tags = defined_tags\n\n @property\n def display_name(self):\n \"\"\"\n Gets the display_name of this IPSecConnection.\n A user-friendly name. Does not have to be unique, and it's changeable.\n Avoid entering confidential information.\n\n\n :return: The display_name of this IPSecConnection.\n :rtype: str\n \"\"\"\n return self._display_name\n\n @display_name.setter\n def display_name(self, display_name):\n \"\"\"\n Sets the display_name of this IPSecConnection.\n A user-friendly name. Does not have to be unique, and it's changeable.\n Avoid entering confidential information.\n\n\n :param display_name: The display_name of this IPSecConnection.\n :type: str\n \"\"\"\n self._display_name = display_name\n\n @property\n def drg_id(self):\n \"\"\"\n **[Required]** Gets the drg_id of this IPSecConnection.\n The OCID of the DRG.\n\n\n :return: The drg_id of this IPSecConnection.\n :rtype: str\n \"\"\"\n return self._drg_id\n\n @drg_id.setter\n def drg_id(self, drg_id):\n \"\"\"\n Sets the drg_id of this IPSecConnection.\n The OCID of the DRG.\n\n\n :param drg_id: The drg_id of this IPSecConnection.\n :type: str\n \"\"\"\n self._drg_id = drg_id\n\n @property\n def freeform_tags(self):\n \"\"\"\n Gets the freeform_tags of this IPSecConnection.\n Free-form tags for this resource. Each tag is a simple key-value pair with no\n predefined name, type, or namespace. For more information, see `Resource Tags`__.\n\n Example: `{\\\"Department\\\": \\\"Finance\\\"}`\n\n __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm\n\n\n :return: The freeform_tags of this IPSecConnection.\n :rtype: dict(str, str)\n \"\"\"\n return self._freeform_tags\n\n @freeform_tags.setter\n def freeform_tags(self, freeform_tags):\n \"\"\"\n Sets the freeform_tags of this IPSecConnection.\n Free-form tags for this resource. Each tag is a simple key-value pair with no\n predefined name, type, or namespace. For more information, see `Resource Tags`__.\n\n Example: `{\\\"Department\\\": \\\"Finance\\\"}`\n\n __ https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm\n\n\n :param freeform_tags: The freeform_tags of this IPSecConnection.\n :type: dict(str, str)\n \"\"\"\n self._freeform_tags = freeform_tags\n\n @property\n def id(self):\n \"\"\"\n **[Required]** Gets the id of this IPSecConnection.\n The IPSec connection's Oracle ID (OCID).\n\n\n :return: The id of this IPSecConnection.\n :rtype: str\n \"\"\"\n return self._id\n\n @id.setter\n def id(self, id):\n \"\"\"\n Sets the id of this IPSecConnection.\n The IPSec connection's Oracle ID (OCID).\n\n\n :param id: The id of this IPSecConnection.\n :type: str\n \"\"\"\n self._id = id\n\n @property\n def lifecycle_state(self):\n \"\"\"\n **[Required]** Gets the lifecycle_state of this IPSecConnection.\n The IPSec connection's current state.\n\n Allowed values for this property are: \"PROVISIONING\", \"AVAILABLE\", \"TERMINATING\", \"TERMINATED\", 'UNKNOWN_ENUM_VALUE'.\n Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.\n\n\n :return: The lifecycle_state of this IPSecConnection.\n :rtype: str\n \"\"\"\n return self._lifecycle_state\n\n @lifecycle_state.setter\n def lifecycle_state(self, lifecycle_state):\n \"\"\"\n Sets the lifecycle_state of this IPSecConnection.\n The IPSec connection's current state.\n\n\n :param lifecycle_state: The lifecycle_state of this IPSecConnection.\n :type: str\n \"\"\"\n allowed_values = [\"PROVISIONING\", \"AVAILABLE\", \"TERMINATING\", \"TERMINATED\"]\n if not value_allowed_none_or_none_sentinel(lifecycle_state, allowed_values):\n lifecycle_state = 'UNKNOWN_ENUM_VALUE'\n self._lifecycle_state = lifecycle_state\n\n @property\n def cpe_local_identifier(self):\n \"\"\"\n Gets the cpe_local_identifier of this IPSecConnection.\n Your identifier for your CPE device. Can be either an IP address or a hostname (specifically,\n the fully qualified domain name (FQDN)). The type of identifier here must correspond\n to the value for `cpeLocalIdentifierType`.\n\n If you don't provide a value when creating the IPSec connection, the `ipAddress` attribute\n for the :class:`Cpe` object specified by `cpeId` is used as the `cpeLocalIdentifier`.\n\n For information about why you'd provide this value, see\n `If Your CPE Is Behind a NAT Device`__.\n\n Example IP address: `10.0.3.3`\n\n Example hostname: `cpe.example.com`\n\n __ https://docs.cloud.oracle.com/Content/Network/Tasks/overviewIPsec.htm#nat\n\n\n :return: The cpe_local_identifier of this IPSecConnection.\n :rtype: str\n \"\"\"\n return self._cpe_local_identifier\n\n @cpe_local_identifier.setter\n def cpe_local_identifier(self, cpe_local_identifier):\n \"\"\"\n Sets the cpe_local_identifier of this IPSecConnection.\n Your identifier for your CPE device. Can be either an IP address or a hostname (specifically,\n the fully qualified domain name (FQDN)). The type of identifier here must correspond\n to the value for `cpeLocalIdentifierType`.\n\n If you don't provide a value when creating the IPSec connection, the `ipAddress` attribute\n for the :class:`Cpe` object specified by `cpeId` is used as the `cpeLocalIdentifier`.\n\n For information about why you'd provide this value, see\n `If Your CPE Is Behind a NAT Device`__.\n\n Example IP address: `10.0.3.3`\n\n Example hostname: `cpe.example.com`\n\n __ https://docs.cloud.oracle.com/Content/Network/Tasks/overviewIPsec.htm#nat\n\n\n :param cpe_local_identifier: The cpe_local_identifier of this IPSecConnection.\n :type: str\n \"\"\"\n self._cpe_local_identifier = cpe_local_identifier\n\n @property\n def cpe_local_identifier_type(self):\n \"\"\"\n Gets the cpe_local_identifier_type of this IPSecConnection.\n The type of identifier for your CPE device. The value here must correspond to the value\n for `cpeLocalIdentifier`.\n\n Allowed values for this property are: \"IP_ADDRESS\", \"HOSTNAME\", 'UNKNOWN_ENUM_VALUE'.\n Any unrecognized values returned by a service will be mapped to 'UNKNOWN_ENUM_VALUE'.\n\n\n :return: The cpe_local_identifier_type of this IPSecConnection.\n :rtype: str\n \"\"\"\n return self._cpe_local_identifier_type\n\n @cpe_local_identifier_type.setter\n def cpe_local_identifier_type(self, cpe_local_identifier_type):\n \"\"\"\n Sets the cpe_local_identifier_type of this IPSecConnection.\n The type of identifier for your CPE device. The value here must correspond to the value\n for `cpeLocalIdentifier`.\n\n\n :param cpe_local_identifier_type: The cpe_local_identifier_type of this IPSecConnection.\n :type: str\n \"\"\"\n allowed_values = [\"IP_ADDRESS\", \"HOSTNAME\"]\n if not value_allowed_none_or_none_sentinel(cpe_local_identifier_type, allowed_values):\n cpe_local_identifier_type = 'UNKNOWN_ENUM_VALUE'\n self._cpe_local_identifier_type = cpe_local_identifier_type\n\n @property\n def static_routes(self):\n \"\"\"\n **[Required]** Gets the static_routes of this IPSecConnection.\n Static routes to the CPE. The CIDR must not be a\n multicast address or class E address.\n\n Used for routing a given IPSec tunnel's traffic only if the tunnel\n is using static routing. If you configure at least one tunnel to use static routing, then\n you must provide at least one valid static route. If you configure both\n tunnels to use BGP dynamic routing, you can provide an empty list for the static routes.\n\n The CIDR can be either IPv4 or IPv6. Note that IPv6 addressing is currently supported only\n in certain regions. See `IPv6 Addresses`__.\n\n Example: `10.0.1.0/24`\n\n Example: `2001:db8::/32`\n\n __ https://docs.cloud.oracle.com/Content/Network/Concepts/ipv6.htm\n\n\n :return: The static_routes of this IPSecConnection.\n :rtype: list[str]\n \"\"\"\n return self._static_routes\n\n @static_routes.setter\n def static_routes(self, static_routes):\n \"\"\"\n Sets the static_routes of this IPSecConnection.\n Static routes to the CPE. The CIDR must not be a\n multicast address or class E address.\n\n Used for routing a given IPSec tunnel's traffic only if the tunnel\n is using static routing. If you configure at least one tunnel to use static routing, then\n you must provide at least one valid static route. If you configure both\n tunnels to use BGP dynamic routing, you can provide an empty list for the static routes.\n\n The CIDR can be either IPv4 or IPv6. Note that IPv6 addressing is currently supported only\n in certain regions. See `IPv6 Addresses`__.\n\n Example: `10.0.1.0/24`\n\n Example: `2001:db8::/32`\n\n __ https://docs.cloud.oracle.com/Content/Network/Concepts/ipv6.htm\n\n\n :param static_routes: The static_routes of this IPSecConnection.\n :type: list[str]\n \"\"\"\n self._static_routes = static_routes\n\n @property\n def time_created(self):\n \"\"\"\n Gets the time_created of this IPSecConnection.\n The date and time the IPSec connection was created, in the format defined by `RFC3339`__.\n\n Example: `2016-08-25T21:10:29.600Z`\n\n __ https://tools.ietf.org/html/rfc3339\n\n\n :return: The time_created of this IPSecConnection.\n :rtype: datetime\n \"\"\"\n return self._time_created\n\n @time_created.setter\n def time_created(self, time_created):\n \"\"\"\n Sets the time_created of this IPSecConnection.\n The date and time the IPSec connection was created, in the format defined by `RFC3339`__.\n\n Example: `2016-08-25T21:10:29.600Z`\n\n __ https://tools.ietf.org/html/rfc3339\n\n\n :param time_created: The time_created of this IPSecConnection.\n :type: datetime\n \"\"\"\n self._time_created = time_created\n\n def __repr__(self):\n return formatted_flat_dict(self)\n\n def __eq__(self, other):\n if other is None:\n return False\n\n return self.__dict__ == other.__dict__\n\n def __ne__(self, other):\n return not self == other\n"} +{"text": "public class ArrayInitTests {\n\n public static void main(String [] args) {\n ArrayInitTests a = new ArrayInitTests();\n a.run();\n }\n\n private void run() {\n \n int i = 0;\n\n int [] a = {2,34,5};\n\n int [] b = { 2,\n 3,\n 4,\n i};\n\n int c [] = { 2, 8};\n }\n}\n"} +{"text": "using System.Text;\nusing NLog;\n\nnamespace XamariNES.Common.Logging\n{\n public static class LoggerExtension\n {\n /// <summary>\n /// Takes a Byte Array and logs it in a hex-editor like format for easy reading\n /// </summary>\n /// <param name=\"l\"></param>\n /// <param name=\"arrayToLog\"></param>\n public static void InfoHex(this Logger l, byte[] arrayToLog)\n {\n var output = new StringBuilder();\n\n //Print Header\n output.AppendLine(new string('-', 73));\n output.AppendLine($\"{arrayToLog.Length} bytes, 0x0000 -> 0x{arrayToLog.GetUpperBound(0):X4}\");\n output.AppendLine(new string('-', 73));\n output.Append(\" \");\n for (var i = 0; i < 0x10; i++)\n {\n output.Append($\" {i:X2}\");\n }\n output.AppendLine();\n var hexString = new StringBuilder(47);\n var literalString = new StringBuilder(15);\n \n //Print Hex Values\n for (var i = 0; i < arrayToLog.Length; i++)\n {\n hexString.Append($\" {arrayToLog[i]:X2}\");\n literalString.Append(arrayToLog[i] < 32 ? ' ' : (char)arrayToLog[i]);\n \n //New Memory Page\n if ((i | 0x0F) == i)\n {\n output.AppendLine($\"{(i & ~0xF):X4} [{hexString} ] {literalString}\");\n hexString.Clear();\n literalString.Clear();\n }\n }\n\n //Flush any data remaining in the buffer\n if (hexString.Length > 0)\n {\n output.AppendLine($\"{(arrayToLog.Length & ~0xF):X4} [{hexString.ToString().PadRight(48)} ] {literalString}\");\n hexString.Clear();\n literalString.Clear();\n }\n\n l.Info($\"\\r\\n{output}\");\n }\n }\n}\n"} +{"text": "import logMessage from './js/logger'\nimport './css/style.css'\n\n// Log message to console\nlogMessage('Its finished!!')\n\nif (module.hot) // eslint-disable-line no-undef\n module.hot.accept() // eslint-disable-line no-undef"} +{"text": "const { app, BrowserWindow } = require('electron')\n\nlet mainWindow = null\n\nfunction createWindow () {\n const windowOptions = {\n width: 600,\n height: 400,\n title: 'Clipboard copy',\n webPreferences: {\n nodeIntegration: true\n }\n }\n\n mainWindow = new BrowserWindow(windowOptions)\n mainWindow.loadFile('index.html')\n\n mainWindow.on('closed', () => {\n mainWindow = null\n })\n}\n\napp.whenReady().then(() => {\n createWindow()\n})\n"} +{"text": "/*\n * This file is part of Nucleus, licensed under the MIT License (MIT). See the LICENSE.txt file\n * at the root of this project for more details.\n */\npackage io.github.nucleuspowered.nucleus.modules.core.runnables;\n\nimport com.google.inject.Inject;\nimport io.github.nucleuspowered.nucleus.modules.core.config.CoreConfig;\nimport io.github.nucleuspowered.nucleus.scaffold.task.TaskBase;\nimport io.github.nucleuspowered.nucleus.services.INucleusServiceCollection;\nimport io.github.nucleuspowered.nucleus.services.interfaces.IReloadableService;\nimport org.spongepowered.api.scheduler.Task;\nimport org.spongepowered.api.util.annotation.NonnullByDefault;\n\nimport java.time.Duration;\nimport java.time.temporal.ChronoUnit;\n\n/**\n * Core tasks. No module, must always run.\n */\n@NonnullByDefault\npublic class CoreTask implements TaskBase, IReloadableService.Reloadable {\n\n private boolean printSave = false;\n private final INucleusServiceCollection serviceCollection;\n\n @Inject\n public CoreTask(INucleusServiceCollection serviceCollection) {\n this.serviceCollection = serviceCollection;\n }\n\n\n @Override\n public boolean isAsync() {\n return true;\n }\n\n @Override\n public Duration interval() {\n return Duration.of(5, ChronoUnit.MINUTES);\n }\n\n @Override\n public void accept(Task task) {\n this.serviceCollection.storageManager().getUserService().clearCache();\n\n if (this.printSave) {\n this.serviceCollection.logger().info(this.serviceCollection.messageProvider().getMessageString(\"core.savetask.starting\"));\n }\n\n this.serviceCollection.storageManager().saveAll();\n\n if (this.printSave) {\n this.serviceCollection.logger().info(this.serviceCollection.messageProvider().getMessageString(\"core.savetask.complete\"));\n }\n }\n\n @Override\n public void onReload(INucleusServiceCollection serviceCollection) {\n this.printSave = serviceCollection.moduleDataProvider().getModuleConfig(CoreConfig.class).isPrintOnAutosave();\n }\n\n}\n"} +{"text": "#!/bin/sh\n\n# ninefingers:password: youhavetoberealistic\n# gorst:password: hero\n# whirrun:password: sword\n# stranger-come-knocking:password: civilization\n#\n# bayaz admin user password: magi\n# skarling admin user password: hoodless\n\nredis-cli <<!\n\nAUTH turn\nSELECT 2\n\nset turn/realm/north.gov/user/ninefingers/key \"bc807ee29df3c9ffa736523fb2c4e8ee\"\nset turn/realm/north.gov/user/gorst/key \"7da2270ccfa49786e0115366d3a3d14d\"\n\nset turn/realm/crinna.org/user/whirrun/key \"6972e85e51f36e53b0b61759c5a5219a\"\nset turn/realm/crinna.org/user/stranger-come-knocking/key \"d43cb678560259a1839bff61c19de15e\"\n\nsadd turn/realm/north.gov/secret \"logen\" \"bloody9\"\nsadd turn/realm/crinna.org/secret \"north\" \"library\"\n\nset turn/realm/north.gov/max-bps 500000\nset turn/realm/north.gov/total-quota 12000\nset turn/realm/north.gov/user-quota 10000\nset turn/realm/crinna.org/max-bps 400000\nset turn/realm/crinna.org/total-quota 10000\nset turn/realm/crinna.org/user-quota 8000\n\nset turn/origin/http://crinna.org:80 crinna.org\nset turn/origin/https://bligh.edu:443 crinna.org\n\nsadd turn/realm/north.gov/allowed-peer-ip \"172.17.13.200\" \"172.17.13.201\"\nsadd turn/realm/crinna.org/allowed-peer-ip \"172.17.13.202\"\n\nsadd turn/realm/north.gov/denied-peer-ip \"172.17.13.133-172.17.14.56\" \"172.17.17.133-172.17.19.56\" \"123::45\"\nsadd turn/realm/crinna.org/denied-peer-ip \"123::77\"\n\nhmset turn/oauth/kid/north ikm_key 'MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDEK' as_rs_alg 'A256GCM' realm 'crinna.org'\nhmset turn/oauth/kid/union ikm_key 'MTIzNDU2Nzg5MDEyMzQ1Ngo=' as_rs_alg 'A128GCM' realm 'north.gov'\nhmset turn/oauth/kid/oldempire ikm_key 'MTIzNDU2Nzg5MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIK' as_rs_alg 'A256GCM'\n\nhmset turn/admin_user/skarling realm 'north.gov' password '\\$5\\$6fc35c3b0c7d4633\\$27fca7574f9b79d0cb93ae03e45379470cbbdfcacdd6401f97ebc620f31f54f2'\nhmset turn/admin_user/bayaz password '\\$5\\$e018513e9de69e73\\$5cbdd2e29e04ca46aeb022268a7460d3a3468de193dcb2b95f064901769f455f'\n\nsave\n\n!\n"} +{"text": "package com.mapbox.mapboxandroiddemo.commons;\n\nimport android.content.Context;\nimport android.content.SharedPreferences;\nimport android.preference.PreferenceManager;\n\n/**\n * This class checks whether the app is being opened for the first time or not and adjusts shared preferences\n */\n\npublic class FirstTimeRunChecker {\n\n private static final String PREF_VERSION_CODE_KEY = \"version_code\";\n private static final int DOESNT_EXIST = -1;\n\n private final SharedPreferences prefs;\n private final int savedVersionCode;\n\n public FirstTimeRunChecker(Context context) {\n prefs = PreferenceManager.getDefaultSharedPreferences(context);\n savedVersionCode = prefs.getInt(PREF_VERSION_CODE_KEY, DOESNT_EXIST);\n }\n\n public boolean firstEverOpen() {\n return savedVersionCode == DOESNT_EXIST;\n }\n\n public void updateSharedPrefWithCurrentVersion() {\n prefs.edit().putInt(PREF_VERSION_CODE_KEY, BuildConfig.VERSION_CODE).apply();\n }\n\n}\n"} +{"text": "var fs = require('fs')\n , lstat = fs.lstatSync;\n\nexports.readlinkSync = function (p) {\n if (lstat(p).isSymbolicLink()) {\n return fs.readlinkSync(p);\n } else {\n return p;\n }\n};\n\n\n"} +{"text": "using System.Data.Entity.Migrations;\n\nnamespace OpenNos.DAL.EF.Migrations\n{\n public partial class Aphrodite28 : DbMigration\n {\n #region Methods\n\n public override void Down()\n {\n DropForeignKey(\"dbo.GeneralLog\", \"AccountId\", \"dbo.Account\");\n AddForeignKey(\"dbo.GeneralLog\", \"AccountId\", \"dbo.Account\", \"AccountId\");\n }\n\n public override void Up()\n {\n DropForeignKey(\"dbo.GeneralLog\", \"AccountId\", \"dbo.Account\");\n AddForeignKey(\"dbo.GeneralLog\", \"AccountId\", \"dbo.Account\", \"AccountId\", cascadeDelete: true);\n }\n\n #endregion\n }\n}"} +{"text": "/*\n * Copyright © 2006 Red Hat, Inc.\n *\n * Permission is hereby granted, free of charge, to any person\n * obtaining a copy of this software and associated documentation\n * files (the \"Software\"), to deal in the Software without\n * restriction, including without limitation the rights to use, copy,\n * modify, merge, publish, distribute, sublicense, and/or sell copies\n * of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be\n * included in all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n *\n * Author: Carl D. Worth <cworth@cworth.org>\n */\n\n#include \"cairo-perf.h\"\n\n/* This test case is designed to illustrate a performance bug in\n * drawing very long lines, where most of the line is out of bounds of\n * the destination surface, (but some portion of the line is\n * visibile). These results are in the \"long-lines-uncropped\" report.\n *\n * For comparison, this test also renders the visible portions of the\n * same lines, (this is the \"long-lines-cropped\" report).\n */\n\ntypedef enum {\n LONG_LINES_CROPPED = 0x1,\n LONG_LINES_ONCE = 0x2,\n} long_lines_crop_t;\n#define NUM_LINES 20\n#define LONG_FACTOR 50.0\n\nstatic cairo_time_t\ndo_long_lines (cairo_t *cr, int width, int height, int loops, long_lines_crop_t crop)\n{\n int i;\n double x, y, dx, dy, min_x, min_y, max_x, max_y;\n double outer_width, outer_height;\n\n cairo_save (cr);\n\n cairo_translate (cr, width / 2, height / 2);\n\n if (crop & LONG_LINES_CROPPED) {\n\touter_width = width;\n\touter_height = height;\n\tcairo_set_source_rgb (cr, 0.0, 1.0, 0.0); /* green */\n } else {\n\touter_width = LONG_FACTOR * width;\n\touter_height = LONG_FACTOR * height;\n\tcairo_set_source_rgb (cr, 1.0, 0.0, 0.0); /* red */\n }\n\n min_x = x = - outer_width / 2.0;\n min_y = y = - outer_height / 2.0;\n max_x = outer_width / 2.0;\n max_y = outer_height / 2.0;\n dx = outer_width / NUM_LINES;\n dy = outer_height / NUM_LINES;\n\n cairo_perf_timer_start ();\n\n while (loops--) {\n\tfor (i = 0; i <= NUM_LINES; i++) {\n\t cairo_move_to (cr, 0, 0);\n\t cairo_line_to (cr, x, min_y);\n\t if ((crop & LONG_LINES_ONCE) == 0)\n\t\tcairo_stroke (cr);\n\n\t cairo_move_to (cr, 0, 0);\n\t cairo_line_to (cr, x, max_y);\n\t if ((crop & LONG_LINES_ONCE) == 0)\n\t\tcairo_stroke (cr);\n\n\t cairo_move_to (cr, 0, 0);\n\t cairo_line_to (cr, min_x, y);\n\t if ((crop & LONG_LINES_ONCE) == 0)\n\t\tcairo_stroke (cr);\n\n\t cairo_move_to (cr, 0, 0);\n\t cairo_line_to (cr, max_x, y);\n\t if ((crop & LONG_LINES_ONCE) == 0)\n\t\tcairo_stroke (cr);\n\n\t x += dx;\n\t y += dy;\n\t}\n\tif (crop & LONG_LINES_ONCE)\n\t cairo_stroke (cr);\n }\n\n cairo_perf_timer_stop ();\n\n cairo_restore (cr);\n\n return cairo_perf_timer_elapsed ();\n}\n\nstatic cairo_time_t\nlong_lines_uncropped (cairo_t *cr, int width, int height, int loops)\n{\n return do_long_lines (cr, width, height, loops, 0);\n}\n\nstatic cairo_time_t\nlong_lines_uncropped_once (cairo_t *cr, int width, int height, int loops)\n{\n return do_long_lines (cr, width, height, loops, LONG_LINES_ONCE);\n}\n\nstatic cairo_time_t\nlong_lines_cropped (cairo_t *cr, int width, int height, int loops)\n{\n return do_long_lines (cr, width, height, loops, LONG_LINES_CROPPED);\n}\n\nstatic cairo_time_t\nlong_lines_cropped_once (cairo_t *cr, int width, int height, int loops)\n{\n return do_long_lines (cr, width, height, loops, LONG_LINES_CROPPED | LONG_LINES_ONCE);\n}\n\ncairo_bool_t\nlong_lines_enabled (cairo_perf_t *perf)\n{\n return cairo_perf_can_run (perf, \"long-lines\", NULL);\n}\n\nvoid\nlong_lines (cairo_perf_t *perf, cairo_t *cr, int width, int height)\n{\n cairo_perf_run (perf, \"long-lines-uncropped\", long_lines_uncropped, NULL);\n cairo_perf_run (perf, \"long-lines-uncropped-once\", long_lines_uncropped_once, NULL);\n cairo_perf_run (perf, \"long-lines-cropped\", long_lines_cropped, NULL);\n cairo_perf_run (perf, \"long-lines-cropped-once\", long_lines_cropped_once, NULL);\n}\n"} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--Generated by crowdin.com-->\n<!--\n Copyright (c) 2012 - 2014 Ngewi Fet <ngewif@gmail.com>\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n-->\n<resources xmlns:xliff=\"urn:oasis:names:tc:xliff:document:1.2\">\n <string name=\"title_create_account\">Skep Rekening</string>\n <string name=\"title_edit_account\">Wysig Rekening</string>\n <string name=\"description_add_transaction_icon\">Voeg \\'n nuwe transaksie by \\'n rekening</string>\n <string name=\"description_view_account_icon\">Bekyk rekening besonderhede</string>\n <string name=\"label_no_accounts\">Geen rekeninge om te wys</string>\n <string name=\"label_account_name\">Rekeningnaam</string>\n <string name=\"btn_cancel\">Kanselleer</string>\n <string name=\"btn_save\">Stoor</string>\n <string name=\"btn_test\">Toets</string>\n <string name=\"label_passcode\">Voer Wagwoord in</string>\n <string name=\"toast_wrong_passcode\">Verkeerde wagwoord, probeer asseblief weer</string>\n <string name=\"toast_passcode_set\">Wagwoord ingestel</string>\n <string name=\"label_confirm_passcode\">Bevestig asseblief jou wagwoord</string>\n <string name=\"toast_invalid_passcode_confirmation\">Invalid passcode confirmation. Please try again</string>\n <string name=\"label_transaction_name\">Description</string>\n <string name=\"label_transaction_amount\">Amount</string>\n <string name=\"title_add_transaction\">New transaction</string>\n <string name=\"label_no_transactions\">No transactions to display</string>\n <string name=\"label_debit\">DEBIT</string>\n <string name=\"label_credit\">CREDIT</string>\n <string name=\"title_accounts\">Accounts</string>\n <string name=\"title_transactions\">Transactions</string>\n <string name=\"menu_delete\">Delete</string>\n <string name=\"alert_dialog_ok_delete\">Delete</string>\n <string name=\"alert_dialog_cancel\">Cancel</string>\n <string name=\"toast_account_deleted\">Account deleted</string>\n <string name=\"title_confirm_delete\">Confirm delete</string>\n <string name=\"title_edit_transaction\">Edit Transaction</string>\n <string name=\"label_transaction_description\">Add note</string>\n <string name=\"title_selected\">%1$d selected</string>\n <string name=\"label_account_balance\">Balance:</string>\n <string name=\"label_export_destination\">Export To:</string>\n <string name=\"title_export_dialog\">Export Transactions</string>\n <string name=\"hint_export_choice\">By default, only new transactions since last export will be exported. Check this option to export all transactions</string>\n <string name=\"toast_export_error\">Error exporting %1$s file</string>\n <string name=\"btn_export\">Export</string>\n <string name=\"option_delete_after_export\">Delete transactions after export</string>\n <string name=\"hint_delete_after_export\">All exported transactions will be deleted when exporting is completed</string>\n <string name=\"title_settings\">Settings</string>\n <string-array name=\"export_destinations\">\n <item>Save As&#8230;</item>\n <item>Dropbox</item>\n <item>ownCloud</item>\n <item>Send to&#8230;</item>\n </string-array>\n <string name=\"btn_move\">Move</string>\n <string name=\"title_move_transactions\">Move %1$d transaction(s)</string>\n <string name=\"label_move_destination\">Destination Account</string>\n <string name=\"toast_incompatible_currency\">Cannot move transactions.\\nThe destination account uses a different currency from origin account</string>\n <string name=\"header_general_settings\">General</string>\n <string name=\"header_about_gnucash\">About</string>\n <string name=\"title_choose_currency\">Choose default currency</string>\n <string name=\"title_default_currency\">Default currency</string>\n <string name=\"summary_default_currency\">Default currency to assign to new accounts</string>\n <string name=\"label_permission_record_transactions\">Enables recording transactions in GnuCash for Android</string>\n <string name=\"label_permission_create_accounts\">Enables creation of accounts in GnuCash for Android</string>\n <string name=\"label_permission_group\">Your GnuCash data</string>\n <string name=\"description_permission_group\">Read and modify GnuCash data</string>\n <string name=\"label_permission_record_transaction\">Record transactions in GnuCash</string>\n <string name=\"label_permission_create_account\">Create accounts in GnuCash</string>\n <string name=\"label_display_account\">Display account</string>\n <string name=\"label_hide_account_balance\">Hide account balance in widget</string>\n <string name=\"btn_create_accounts\">Create Accounts</string>\n <string name=\"error_no_accounts\">No accounts exist in GnuCash.\\nCreate an account before adding a widget</string>\n <string name=\"title_license\">License</string>\n <string name=\"summary_licence_details\">Apache License v2.0. Click for details</string>\n <string name=\"title_general_prefs\">General Preferences</string>\n <string name=\"label_widget_configuration\">Select Account</string>\n <string name=\"toast_no_transactions_to_export\">There are no transactions available to export</string>\n <string name=\"title_passcode_preferences\">Passcode Preferences</string>\n <string name=\"title_enable_passcode\">Enable passcode</string>\n <string name=\"title_change_passcode\">Change Passcode</string>\n <string name=\"title_about_gnucash\">About GnuCash</string>\n <string name=\"title_export_email\">GnuCash Android %1$s export</string>\n <string name=\"description_export_email\">GnuCash Android Export from </string>\n <string name=\"header_transaction_settings\">Transactions</string>\n <string name=\"title_transaction_preferences\">Transaction Preferences</string>\n <string name=\"title_account_preferences\">Account Preferences</string>\n <string name=\"title_default_transaction_type\">Default Transaction Type</string>\n <string name=\"summary_default_transaction_type\">The type of transaction to use by default, CREDIT or DEBIT</string>\n <string-array name=\"transaction_types\">\n <item>CREDIT</item>\n <item>DEBIT</item>\n </string-array>\n <string name=\"msg_delete_all_transactions_confirmation\">Are you sure you want to delete ALL transactions?</string>\n <string name=\"msg_delete_transaction_confirmation\">Are you sure you want to delete this transaction?</string>\n <string name=\"title_export_preference_category\">Export</string>\n <string name=\"title_export_all_transactions\">Export all transactions</string>\n <string name=\"title_always_delete_exported_transactions\">Delete exported transactions</string>\n <string name=\"title_default_export_email\">Default export email</string>\n <string name=\"summary_default_export_email\">The default email address to send exports to. You can still change this when you export.</string>\n <string name=\"summary_use_double_entry\">All transactions will be a transfer from one account to another</string>\n <string name=\"title_use_double_entry\">Activate Double Entry</string>\n <string name=\"account_balance\">Balance</string>\n <string name=\"toast_no_account_name_entered\">Enter an account name to create an account</string>\n <string name=\"label_account_currency\">Currency</string>\n <string name=\"label_parent_account\">Parent account</string>\n <string name=\"title_xml_ofx_header\">Use XML OFX header</string>\n <string name=\"summary_xml_ofx_header\">Enable this option when exporting to third-party application other than GnuCash for desktop</string>\n <string name=\"title_whats_new\">What\\'s New</string>\n <string name=\"whats_new\">\n - Added ability to export to any service which supports the Storage Access Framework \\n\n - Added option to set the location for regular automatic backups (See backup settings)\\n\n - Added Bitcoin currency support\\n\n - Added support for renaming books\\n\n - Multiple bug fixes and improvements\\n\n\t</string>\n <string name=\"label_dismiss\">Dismiss</string>\n <string name=\"toast_transanction_amount_required\">Enter an amount to save the transaction</string>\n <string name=\"toast_error_importing_accounts\">An error occurred while importing the GnuCash accounts</string>\n <string name=\"toast_success_importing_accounts\">GnuCash Accounts successfully imported</string>\n <string name=\"summary_import_accounts\">Import account structure exported from GnuCash desktop</string>\n <string name=\"title_import_accounts\">Import GnuCash XML</string>\n <string name=\"summary_delete_all_accounts\">Delete all accounts in the database. All transactions will be deleted as\n well.\n </string>\n <string name=\"title_delete_all_accounts\">Delete all accounts</string>\n <string name=\"header_account_settings\">Accounts</string>\n <string name=\"toast_all_accounts_deleted\">All accounts have been successfully deleted</string>\n <string name=\"confirm_delete_all_accounts\">Are you sure you want to delete all accounts and transactions?\\n\\nThis\n operation cannot be undone!\n </string>\n <string name=\"summary_delete_all_transactions\">All transactions in all accounts will be deleted!</string>\n <string name=\"title_delete_all_transactions\">Delete all transactions</string>\n <string name=\"toast_all_transactions_deleted\">All transactions successfully deleted!</string>\n <string name=\"title_progress_importing_accounts\">Importing accounts</string>\n <string name=\"section_header_transactions\">Transactions</string>\n <string name=\"section_header_subaccounts\">Sub-Accounts</string>\n <string name=\"menu_search_accounts\">Search</string>\n <string name=\"title_default_export_format\">Default Export Format</string>\n <string name=\"summary_default_export_format\">File format to use by default when exporting transactions</string>\n <string name=\"label_recurring_transaction\">Recurrence</string>\n <!-- This should be the same name used by GnuCash desktop for imbalance accounts -->\n <string name=\"imbalance_account_name\">Imbalance</string>\n <string name=\"title_progress_exporting_transactions\">Exporting transactions</string>\n <string name=\"label_no_recurring_transactions\">No recurring transactions to display.</string>\n <string name=\"toast_recurring_transaction_deleted\">Successfully deleted recurring transaction</string>\n <string name=\"label_placeholder_account\">Placeholder account</string>\n <string name=\"label_default_transfer_account\">Default Transfer Account</string>\n <plurals name=\"label_sub_accounts\">\n <item quantity=\"one\">%d sub-account</item>\n <item quantity=\"other\">%d sub-accounts</item>\n </plurals>\n <string-array name=\"account_type_entry_values\">\n <item>CASH</item>\n <item>BANK</item>\n <item>CREDIT CARD</item>\n <item>ASSET</item>\n <item>LIABILITY</item>\n <item>INCOME</item>\n <item>EXPENSE</item>\n <item>PAYABLE</item>\n <item>RECEIVABLE</item>\n <item>EQUITY</item>\n <item>CURRENCY</item>\n <item>STOCK</item>\n <item>MUTUAL FUND</item>\n <item>TRADING</item>\n </string-array>\n <string-array name=\"export_formats\">\n <item>QIF</item>\n <item>OFX</item>\n <item>XML</item>\n </string-array>\n <!-- Default title for color picker dialog [CHAR LIMIT=30] -->\n <string name=\"color_picker_default_title\">Select a Color</string>\n <!-- Content description for a color square. -->\n <!-- Content description for a selected color square. -->\n <string name=\"label_account_color_and_type\">Account Color &amp; Type</string>\n <string name=\"label_delete_sub_accounts\">Delete sub-accounts</string>\n <string name=\"title_recent_accounts\">Recent</string>\n <string name=\"title_favorite_accounts\">Favorites</string>\n <string name=\"title_all_accounts\">All</string>\n <string name=\"summary_create_default_accounts\">Creates default GnuCash commonly-used account structure</string>\n <string name=\"title_create_default_accounts\">Create default accounts</string>\n <string name=\"msg_confirm_create_default_accounts_setting\">A new book will be opened with the default accounts\\n\\nYour current accounts and transactions will not be modified!</string>\n <string name=\"title_scheduled_transactions\">Transactions</string>\n <string name=\"title_select_export_destination\">Select destination for export</string>\n <string name=\"hint_split_memo\">Memo</string>\n <string name=\"label_spend\">Spend</string>\n <string name=\"label_receive\">Receive</string>\n <string name=\"label_withdrawal\">Withdrawal</string>\n <string name=\"label_deposit\">Deposit</string>\n <string name=\"label_payment\">Payment</string>\n <string name=\"label_charge\">Charge</string>\n <string name=\"label_decrease\">Decrease</string>\n <string name=\"label_increase\">Increase</string>\n <string name=\"label_income\">Income</string>\n <string name=\"label_rebate\">Rebate</string>\n <string name=\"label_expense\">Expense</string>\n <string name=\"label_bill\">Bill</string>\n <string name=\"label_invoice\">Invoice</string>\n <string name=\"label_buy\">Buy</string>\n <string name=\"label_sell\">Sell</string>\n <string name=\"account_name_opening_balances\">Opening Balances</string>\n <string name=\"account_name_equity\">Equity</string>\n <string name=\"summary_save_opening_balances\">Enable to save the current account balance (before deleting transactions) as new opening balance after deleting transactions\n </string>\n <string name=\"title_save_opening_balances\">Save account opening balances</string>\n <string name=\"export_warning_ofx\">OFX does not support double-entry transactions</string>\n <string name=\"export_warning_qif\">Generates separate QIF files per currency</string>\n <string name=\"label_imbalance\">Imbalance:</string>\n <string name=\"btn_add_split\">Add split</string>\n <string name=\"menu_title_favorite\">Favorite</string>\n <string name=\"drawer_open\">Navigation drawer opened</string>\n <string name=\"drawer_close\">Navigation drawer closed</string>\n <string name=\"title_reports\">Reports</string>\n <string name=\"title_pie_chart\">Pie Chart</string>\n <string name=\"title_line_chart\">Line Chart</string>\n <string name=\"title_bar_chart\">Bar Chart</string>\n <string name=\"title_report_prefs\">Report Preferences</string>\n <string name=\"title_use_account_color\">Account color in reports</string>\n <string name=\"summary_use_account_color\">Use account color in the bar/pie chart</string>\n <string name=\"menu_order_by_size\">Order by size</string>\n <string name=\"menu_toggle_legend\">Show legend</string>\n <string name=\"menu_toggle_labels\">Show labels</string>\n <string name=\"menu_toggle_percentage_mode\">Show percentage</string>\n <string name=\"menu_toggle_average_lines\">Show average lines</string>\n <string name=\"menu_group_smaller_slices\">Group Smaller Slices</string>\n <string name=\"label_chart_no_data\">No chart data available</string>\n <string name=\"label_chart_total\">Total</string>\n <string name=\"label_other_slice\">Other</string>\n <string name=\"toast_chart_percentage_mode_total\">The percentage of selected value calculated from the total amount</string>\n <string name=\"toast_chart_percentage_mode_current_bar\">The percentage of selected value calculated from the current stacked bar amount</string>\n <string name=\"label_save_template\">Save as template</string>\n <string name=\"label_delete_account_transactions_description\">This account contains transactions. \\nWhat would you like to do with these transactions</string>\n <string name=\"label_delete_account_subaccounts_description\">This account contains sub-accounts. \\nWhat would you like to do with these sub-accounts</string>\n <string name=\"label_delete_transactions\">Delete transactions</string>\n <string name=\"toast_disable_double_entry_to_save_transaction\">Create and specify a transfer account OR disable double-entry in settings to save the transaction</string>\n <string name=\"label_tap_to_create_schedule\">Tap to create schedule</string>\n <string name=\"title_restore_backup\">Restore Backup&#8230;</string>\n <string name=\"header_backup_and_export_settings\">Backup &amp; export</string>\n <string name=\"title_dropbox_sync_preference\">Enable DropBox</string>\n <string name=\"title_owncloud_sync_preference\">Enable ownCloud </string>\n <string name=\"title_backup_preference_category\">Backup</string>\n <string name=\"summary_dropbox_sync\">Enable exporting to DropBox</string>\n <string name=\"summary_owncloud_sync\">Enable exporting to ownCloud</string>\n <string name=\"title_backup_prefs\">Backup Preferences</string>\n <string name=\"title_create_backup_pref\">Create Backup</string>\n <string name=\"summary_create_backup_pref\">Create a backup of the active book</string>\n <string name=\"summary_restore_backup_pref\">Restore most recent backup of active book</string>\n <string name=\"toast_backup_successful\">Backup successful</string>\n <string name=\"toast_backup_failed\">Backup failed</string>\n <string name=\"export_warning_xml\">Exports all accounts and transactions</string>\n <string name=\"toast_install_file_manager\">Install a file manager to select files</string>\n <string name=\"title_select_backup_to_restore\">Select backup to restore</string>\n <string name=\"nav_menu_favorites\">Favorites</string>\n <string name=\"nav_menu_open\">Open&#8230;</string>\n <string name=\"nav_menu_reports\">Reports</string>\n <string name=\"nav_menu_export\">Export&#8230;</string>\n <string name=\"nav_menu_settings\">Settings</string>\n <string name=\"username\">User Name</string>\n <string name=\"password\">Password</string>\n <string name=\"owncloud_pref\">owncloud</string>\n <string name=\"owncloud_server\">https://</string>\n <string name=\"owncloud_server_invalid\">OC server not found</string>\n <string name=\"owncloud_user_invalid\">OC username/password invalid</string>\n <string name=\"owncloud_dir_invalid\">Invalid chars: \\\\ &lt; &gt; : \\&quot; | * ? </string>\n <string name=\"owncloud_server_ok\">OC server OK</string>\n <string name=\"owncloud_user_ok\">OC username/password OK</string>\n <string name=\"owncloud_dir_ok\">Dir name OK</string>\n <plurals name=\"label_every_x_hours\">\n <item quantity=\"one\">Hourly</item>\n <item quantity=\"other\">Every %d hours</item>\n </plurals>\n <plurals name=\"label_every_x_days\">\n <item quantity=\"one\">Daily</item>\n <item quantity=\"other\">Every %d days</item>\n </plurals>\n <plurals name=\"label_every_x_weeks\">\n <item quantity=\"one\">Weekly</item>\n <item quantity=\"other\">Every %d weeks</item>\n </plurals>\n <plurals name=\"label_every_x_months\">\n <item quantity=\"one\">Monthly</item>\n <item quantity=\"other\">Every %d months</item>\n </plurals>\n <plurals name=\"label_every_x_years\">\n <item quantity=\"one\">Yearly</item>\n <item quantity=\"other\">Every %d years</item>\n </plurals>\n <string name=\"title_enable_crashlytics\">Enable Crash Logging</string>\n <string name=\"msg_enable_crashlytics\">Automatically send information about app malfunction to the developers.</string>\n <string name=\"label_export_format\"> Format</string>\n <string name=\"label_old_passcode\">Enter your old passcode</string>\n <string name=\"label_new_passcode\">Enter your new passcode</string>\n <string name=\"title_scheduled_exports\">Exports</string>\n <string name=\"label_no_scheduled_exports_to_display\">No scheduled exports to display</string>\n <string name=\"title_create_export_schedule\">Create export schedule</string>\n <string name=\"toast_exported_to\">Exported to: %1$s</string>\n <string name=\"toast_legend_too_long\">The legend is too long</string>\n <string name=\"hint_account_description\">Account description</string>\n <string name=\"label_no_recent_accounts\">No recent accounts</string>\n <string name=\"label_no_favorite_accounts\">No favorite accounts</string>\n <string name=\"nav_menu_scheduled_actions\">Scheduled Actions</string>\n <string name=\"label_scheduled_action_ended\">\"Ended, last executed on %1$s\"</string>\n <string name=\"btn_wizard_next\">Next</string>\n <string name=\"btn_wizard_finish\">Done</string>\n <string name=\"wizard_title_default_currency\">Default Currency</string>\n <string name=\"wizard_title_account_setup\">Account Setup</string>\n <string name=\"wizard_title_select_currency\">Select Currency</string>\n <string name=\"wizard_title_feedback_options\">Feedback Options</string>\n <string name=\"wizard_option_create_default_accounts\">Create default accounts</string>\n <string name=\"wizard_option_import_my_accounts\">Import my accounts</string>\n <string name=\"wizard_option_let_me_handle_it\">Let me handle it</string>\n <string name=\"wizard_option_currency_other\">Other&#8230;</string>\n <string name=\"wizard_option_auto_send_crash_reports\">Automatically send crash reports</string>\n <string name=\"wizard_option_disable_crash_reports\">Disable crash reports</string>\n <string name=\"wizard_btn_back\">Back</string>\n <string name=\"title_setup_gnucash\">Setup GnuCash</string>\n <string name=\"wizard_title_welcome_to_gnucash\">Welcome to GnuCash</string>\n <string name=\"msg_wizard_welcome_page\">Before you dive in, \\nlet\\'s setup a few things first\\n\\nTo continue, press Next</string>\n <string name=\"title_split_editor\">Split Editor</string>\n <string name=\"toast_error_check_split_amounts\">Check that all splits have valid amounts before saving!</string>\n <string name=\"label_error_invalid_expression\">Invalid expression!</string>\n <string name=\"toast_scheduled_recurring_transaction\">Scheduled recurring transaction</string>\n <string name=\"title_transfer_funds\">Transfer Funds</string>\n <string name=\"nav_menu_help\"><![CDATA[Help & Feedback]]></string>\n <string name=\"label_select_pie_slice_to_see_details\">Select a slice to see details</string>\n <string name=\"label_report_period\">Period:</string>\n <string name=\"label_convert_from\">From:</string>\n <string name=\"label_convert_to\">To:</string>\n <string name=\"msg_provide_exchange_rate\">Provide either the converted amount or exchange rate in order to transfer funds</string>\n <string name=\"hint_exchange_rate\">Exchange rate</string>\n <string name=\"btn_fetch_quote\">Fetch quote</string>\n <string name=\"hint_converted_amount\">Converted Amount</string>\n <string name=\"title_report_sheet\">Sheet</string>\n <string name=\"label_last_3_months_expenses\">Expenses for last 3 months</string>\n <string name=\"label_total_assets\">Total Assets</string>\n <string name=\"label_total_liabilities\">Total Liabilities</string>\n <string name=\"label_net_worth\">Net Worth</string>\n <string name=\"label_assets\">Assets</string>\n <string name=\"label_liabilities\">Liabilities</string>\n <string name=\"label_equity\">Equity</string>\n <string name=\"label_move_to\">Move to:</string>\n <string name=\"menu_group_by\">Group By</string>\n <string name=\"menu_group_by_month\">Month</string>\n <string name=\"menu_group_by_quarter\">Quarter</string>\n <string name=\"menu_group_by_year\">Year</string>\n <string name=\"title_balance_sheet_report\">Balance Sheet</string>\n <string name=\"label_balance_sheet_total\">Total:</string>\n <string name=\"title_google_plus_community\">Google+ Community</string>\n <string name=\"title_translate_gnucash\">Translate GnuCash</string>\n <string name=\"summary_google_plus\">Share ideas, discuss changes or report problems</string>\n <string name=\"summary_translate_gnucash\">Translate or proof-read on CrowdIn</string>\n <string name=\"toast_no_compatible_apps_to_receive_export\">No compatible apps to receive the exported transactions!</string>\n <string name=\"menu_move_transaction\">Move&#8230;</string>\n <string name=\"menu_duplicate_transaction\">Duplicate</string>\n <string name=\"title_cash_flow_report\">Cash Flow</string>\n <string name=\"title_budgets\">Budgets</string>\n <string name=\"title_use_compact_list\">Enable compact view</string>\n <string name=\"summary_use_compact_list\">Enable to always use compact view for transactions list</string>\n <string name=\"error_invalid_exchange_rate\">Invalid exchange rate</string>\n <string name=\"sample_exchange_rate\">e.g. 1 %1$s = x.xx %2$s</string>\n <string name=\"error_invalid_amount\">Invalid amount</string>\n <string-array name=\"report_time_range\">\n <item>Current month</item>\n <item>Last 3 months</item>\n <item>Last 6 months</item>\n <item>Last 12 months</item>\n <item>All time</item>\n <item>Custom range&#8230;</item>\n </string-array>\n <!-- Passcode lock -->\n <string name=\"digit_one\">1</string>\n <!-- In the English locale, digit 1 has no text on it. This is simply empty space. If your locale has text on digit 1, then translate-->\n <string name=\"digit_one_text\">​</string>\n <string name=\"digit_two\">2</string>\n <string name=\"digit_two_text\">ABC</string>\n <string name=\"digit_three\">3</string>\n <string name=\"digit_three_text\">DEF</string>\n <string name=\"digit_four\">4</string>\n <string name=\"digit_four_text\">GHI</string>\n <string name=\"digit_five\">5</string>\n <string name=\"digit_five_text\">JKL</string>\n <string name=\"digit_six\">6</string>\n <string name=\"digit_six_text\">MNO</string>\n <string name=\"digit_seven\">7</string>\n <string name=\"digit_seven_text\">PQRS</string>\n <string name=\"digit_eight\">8</string>\n <string name=\"digit_eight_text\">TUV</string>\n <string name=\"digit_nine\">9</string>\n <string name=\"digit_nine_text\">WXYZ</string>\n <string name=\"digit_zero\">0</string>\n <string name=\"digit_zero_text\">+</string>\n <string name=\"title_manage_books\">Manage Books</string>\n <string name=\"menu_manage_books\">Manage Books&#8230;</string>\n <string name=\"select_chart_to_view_details\">Select any part of the chart to view details</string>\n <string name=\"title_confirm_delete_book\">Confirm delete Book</string>\n <string name=\"msg_all_book_data_will_be_deleted\">All accounts and transactions in this book will be deleted!</string>\n <string name=\"btn_delete_book\">Delete Book</string>\n <string name=\"label_last_export_time\">Last Exported:</string>\n <string name=\"menu_title_enable_sync\">Enable Sync</string>\n <string name=\"menu_title_new_book\">New Book</string>\n <string name=\"toast_transaction_has_no_splits_and_cannot_open\">The selected transaction has no splits and cannot be opened</string>\n <string name=\"label_split_count\">%1$d splits</string>\n <string name=\"label_inside_account_with_name\">in %1$s</string>\n <plurals name=\"book_account_stats\">\n <item quantity=\"one\">%d account</item>\n <item quantity=\"other\">%d accounts</item>\n </plurals>\n <plurals name=\"book_transaction_stats\">\n <item quantity=\"one\">%d transaction</item>\n <item quantity=\"other\">%d transactions</item>\n </plurals>\n <string-array name=\"report_account_types\">\n <item>EXPENSE</item>\n <item>INCOME</item>\n </string-array>\n <string name=\"toast_connected_to_google_drive\">Connected to Google Drive</string>\n <string name=\"toast_unable_to_connect_to_google_drive\">Unable to connect to Google Drive</string>\n <string name=\"toast_enter_amount_to_split\">Please enter an amount to split</string>\n <string name=\"label_export_target_external_service\">external service</string>\n <string name=\"toast_updated_transaction_recurring_schedule\">Updated transaction recurring schedule</string>\n <string name=\"label_export_transactions_since_date\">Since</string>\n <string name=\"switch_export_transactions_from_all_time\">All time</string>\n <string name=\"label_recommend_app\">Recommend in Play Store</string>\n <string name=\"repeat_until_date\">until %1$s</string>\n <string name=\"repeat_on_weekday\">on %1$s</string>\n <string name=\"repeat_x_times\">for %1$d times</string>\n <string name=\"menu_show_compact_view\">Compact View</string>\n <string name=\"book_default_name\">Book %1$d</string>\n <string name=\"last_export_time_never\">never</string>\n <string name=\"title_rename_book\">Rename Book</string>\n <string name=\"btn_rename\">Rename</string>\n <string name=\"menu_rename\">Rename</string>\n <string name=\"title_select_backup_file\">Select backup file</string>\n <string name=\"summary_select_backup_file\">Select a file for automatic backups</string>\n <string name=\"title_confirm_restore_backup\">Confirm restore from backup</string>\n <string name=\"msg_confirm_restore_backup_into_new_book\">A new book will be opened with the contents of this backup. Do you wish to proceed?</string>\n <string name=\"btn_restore\">Restore</string>\n <string name=\"title_no_backups_found\">No backups found</string>\n <string name=\"msg_no_backups_to_restore_from\">There are no existing backup files to restore from</string>\n <!-- This is the filename for default backups. So use only simple characters and no spaces. Do not change the extension -->\n <string name=\"label_backup_filename\">gnucash_android_backup.gnca</string>\n <string name=\"label_select_destination_after_export\">Select the destination after export is complete</string>\n <string name=\"label_dropbox_export_destination\">Export to \\'/Apps/GnuCash Android/\\' folder on Dropbox</string>\n <string name=\"title_section_preferences\">Preferences</string>\n</resources>\n"} +{"text": "#!/usr/bin/env perl\nuse strict;\nuse warnings;\nuse Test::More;\n\nuse mop;\n\nclass MetaFoo extends mop::class {\n has $!foo = \"FOO\";\n method foo { $!foo }\n}\n\nclass MetaBar extends mop::class {\n has $!bar = \"BAR\";\n method bar { $!bar }\n}\n\nclass Foo meta MetaFoo { }\n\nis(mop::meta('Foo')->foo, 'FOO');\n\nclass Bar extends Foo meta MetaBar { }\n\nis(mop::meta('Bar')->foo, 'FOO');\nis(mop::meta('Bar')->bar, 'BAR');\n\ndone_testing;\n"} +{"text": "/***************** NCore Softwares Pvt. Ltd., India **************************\r\n\r\n ColorBox\r\n\r\n Copyright (C) 2013 NCore Softwares Pvt. Ltd.\r\n\r\n This program is provided to you under the terms of the Microsoft Public\r\n License (Ms-PL) as published at http://colorbox.codeplex.com/license\r\n\r\n***********************************************************************************/\r\n\r\nusing System;\r\n\r\nnamespace ColorBox\r\n{ \r\n internal enum SpinDirection\r\n {\r\n Increase,\r\n Decrease\r\n }\r\n\r\n\r\n internal enum ValidSpinDirections\r\n {\r\n None,\r\n Increase,\r\n Decrease\r\n }\r\n\r\n\r\n internal enum AllowedSpecialValues\r\n {\r\n None = 0,\r\n NaN = 1,\r\n PositiveInfinity = 2,\r\n NegativeInfinity = 4,\r\n AnyInfinity = PositiveInfinity | NegativeInfinity,\r\n Any = NaN | AnyInfinity\r\n }\r\n\r\n\r\n internal enum BrushTypes\r\n {\r\n //None,\r\n Solid,\r\n Linear,\r\n Radial\r\n }\r\n}\r\n"} +{"text": "// Copyright 2016 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// +build icu\n\npackage cases\n\nimport (\n\t\"path\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"golang.org/x/text/internal/testtext\"\n\t\"golang.org/x/text/language\"\n\t\"golang.org/x/text/unicode/norm\"\n)\n\nfunc TestICUConformance(t *testing.T) {\n\t// Build test set.\n\tinput := []string{\n\t\t\"a.a a_a\",\n\t\t\"a\\u05d0a\",\n\t\t\"\\u05d0'a\",\n\t\t\"a\\u03084a\",\n\t\t\"a\\u0308a\",\n\t\t\"a3\\u30a3a\",\n\t\t\"a\\u303aa\",\n\t\t\"a_\\u303a_a\",\n\t\t\"1_a..a\",\n\t\t\"1_a.a\",\n\t\t\"a..a.\",\n\t\t\"a--a-\",\n\t\t\"a-a-\",\n\t\t\"a\\u200ba\",\n\t\t\"a\\u200b\\u200ba\",\n\t\t\"a\\u00ad\\u00ada\", // Format\n\t\t\"a\\u00ada\",\n\t\t\"a''a\", // SingleQuote\n\t\t\"a'a\",\n\t\t\"a::a\", // MidLetter\n\t\t\"a:a\",\n\t\t\"a..a\", // MidNumLet\n\t\t\"a.a\",\n\t\t\"a;;a\", // MidNum\n\t\t\"a;a\",\n\t\t\"a__a\", // ExtendNumlet\n\t\t\"a_a\",\n\t\t\"ΟΣ''a\",\n\t}\n\tadd := func(x interface{}) {\n\t\tswitch v := x.(type) {\n\t\tcase string:\n\t\t\tinput = append(input, v)\n\t\tcase []string:\n\t\t\tfor _, s := range v {\n\t\t\t\tinput = append(input, s)\n\t\t\t}\n\t\t}\n\t}\n\tfor _, tc := range testCases {\n\t\tadd(tc.src)\n\t\tadd(tc.lower)\n\t\tadd(tc.upper)\n\t\tadd(tc.title)\n\t}\n\tfor _, tc := range bufferTests {\n\t\tadd(tc.src)\n\t}\n\tfor _, tc := range breakTest {\n\t\tadd(strings.Replace(tc, \"|\", \"\", -1))\n\t}\n\tfor _, tc := range foldTestCases {\n\t\tadd(tc)\n\t}\n\n\t// Compare ICU to Go.\n\tfor _, c := range []string{\"lower\", \"upper\", \"title\", \"fold\"} {\n\t\tfor _, tag := range []string{\n\t\t\t\"und\", \"af\", \"az\", \"el\", \"lt\", \"nl\", \"tr\",\n\t\t} {\n\t\t\tfor _, s := range input {\n\t\t\t\tif exclude(c, tag, s) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\ttesttext.Run(t, path.Join(c, tag, s), func(t *testing.T) {\n\t\t\t\t\twant := doICU(tag, c, s)\n\t\t\t\t\tgot := doGo(tag, c, s)\n\t\t\t\t\tif norm.NFC.String(got) != norm.NFC.String(want) {\n\t\t\t\t\t\tt.Errorf(\"\\n in %[3]q (%+[3]q)\\n got %[1]q (%+[1]q)\\n want %[2]q (%+[2]q)\", got, want, s)\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t}\n\t}\n}\n\n// exclude indicates if a string should be excluded from testing.\nfunc exclude(cm, tag, s string) bool {\n\tlist := []struct{ cm, tags, pattern string }{\n\t\t// TODO: Go does not handle certain esoteric breaks correctly. This will be\n\t\t// fixed once we have a real word break iterator. Alternatively, it\n\t\t// seems like we're not too far off from making it work, so we could\n\t\t// fix these last steps. But first verify that using a separate word\n\t\t// breaker does not hurt performance.\n\t\t{\"title\", \"af nl\", \"a''a\"},\n\t\t{\"\", \"\", \"א'a\"},\n\n\t\t// All the exclusions below seem to be issues with the ICU\n\t\t// implementation (at version 57) and thus are not marked as TODO.\n\n\t\t// ICU does not handle leading apostrophe for Dutch and\n\t\t// Afrikaans correctly. See http://unicode.org/cldr/trac/ticket/7078.\n\t\t{\"title\", \"af nl\", \"'n\"},\n\t\t{\"title\", \"af nl\", \"'N\"},\n\n\t\t// Go terminates the final sigma check after a fixed number of\n\t\t// ignorables have been found. This ensures that the algorithm can make\n\t\t// progress in a streaming scenario.\n\t\t{\"lower title\", \"\", \"\\u039f\\u03a3...............................a\"},\n\t\t// This also applies to upper in Greek.\n\t\t// NOTE: we could fix the following two cases by adding state to elUpper\n\t\t// and aztrLower. However, considering a modifier to not belong to the\n\t\t// preceding letter after the maximum modifiers count is reached is\n\t\t// consistent with the behavior of unicode/norm.\n\t\t{\"upper\", \"el\", \"\\u03bf\" + strings.Repeat(\"\\u0321\", 29) + \"\\u0313\"},\n\t\t{\"lower\", \"az tr lt\", \"I\" + strings.Repeat(\"\\u0321\", 30) + \"\\u0307\\u0300\"},\n\t\t{\"upper\", \"lt\", \"i\" + strings.Repeat(\"\\u0321\", 30) + \"\\u0307\\u0300\"},\n\t\t{\"lower\", \"lt\", \"I\" + strings.Repeat(\"\\u0321\", 30) + \"\\u0300\"},\n\n\t\t// ICU title case seems to erroneously removes \\u0307 from an upper case\n\t\t// I unconditionally, instead of only when lowercasing. The ICU\n\t\t// transform algorithm transforms these cases consistently with our\n\t\t// implementation.\n\t\t{\"title\", \"az tr\", \"\\u0307\"},\n\n\t\t// The spec says to remove \\u0307 after Soft-Dotted characters. ICU\n\t\t// transforms conform but ucasemap_utf8ToUpper does not.\n\t\t{\"upper title\", \"lt\", \"i\\u0307\"},\n\t\t{\"upper title\", \"lt\", \"i\" + strings.Repeat(\"\\u0321\", 29) + \"\\u0307\\u0300\"},\n\n\t\t// Both Unicode and CLDR prescribe an extra explicit dot above after a\n\t\t// Soft_Dotted character if there are other modifiers.\n\t\t// ucasemap_utf8ToUpper does not do this; ICU transforms do.\n\t\t// The issue with ucasemap_utf8ToUpper seems to be that it does not\n\t\t// consider the modifiers that are part of composition in the evaluation\n\t\t// of More_Above. For instance, according to the More_Above rule for lt,\n\t\t// a dotted capital I (U+0130) becomes i\\u0307\\u0307 (an small i with\n\t\t// two additional dots). This seems odd, but is correct. ICU is\n\t\t// definitely not correct as it produces different results for different\n\t\t// normal forms. For instance, for an İ:\n\t\t// \\u0130 (NFC) -> i\\u0307 (incorrect)\n\t\t// I\\u0307 (NFD) -> i\\u0307\\u0307 (correct)\n\t\t// We could argue that we should not add a \\u0307 if there already is\n\t\t// one, but this may be hard to get correct and is not conform the\n\t\t// standard.\n\t\t{\"lower title\", \"lt\", \"\\u0130\"},\n\t\t{\"lower title\", \"lt\", \"\\u00cf\"},\n\n\t\t// We are conform ICU ucasemap_utf8ToUpper if we remove support for\n\t\t// elUpper. However, this is clearly not conform the spec. Moreover, the\n\t\t// ICU transforms _do_ implement this transform and produces results\n\t\t// consistent with our implementation. Note that we still prefer to use\n\t\t// ucasemap_utf8ToUpper instead of transforms as the latter have\n\t\t// inconsistencies in the word breaking algorithm.\n\t\t{\"upper\", \"el\", \"\\u0386\"}, // GREEK CAPITAL LETTER ALPHA WITH TONOS\n\t\t{\"upper\", \"el\", \"\\u0389\"}, // GREEK CAPITAL LETTER ETA WITH TONOS\n\t\t{\"upper\", \"el\", \"\\u038A\"}, // GREEK CAPITAL LETTER IOTA WITH TONOS\n\n\t\t{\"upper\", \"el\", \"\\u0391\"}, // GREEK CAPITAL LETTER ALPHA\n\t\t{\"upper\", \"el\", \"\\u0397\"}, // GREEK CAPITAL LETTER ETA\n\t\t{\"upper\", \"el\", \"\\u0399\"}, // GREEK CAPITAL LETTER IOTA\n\n\t\t{\"upper\", \"el\", \"\\u03AC\"}, // GREEK SMALL LETTER ALPHA WITH TONOS\n\t\t{\"upper\", \"el\", \"\\u03AE\"}, // GREEK SMALL LETTER ALPHA WITH ETA\n\t\t{\"upper\", \"el\", \"\\u03AF\"}, // GREEK SMALL LETTER ALPHA WITH IOTA\n\n\t\t{\"upper\", \"el\", \"\\u03B1\"}, // GREEK SMALL LETTER ALPHA\n\t\t{\"upper\", \"el\", \"\\u03B7\"}, // GREEK SMALL LETTER ETA\n\t\t{\"upper\", \"el\", \"\\u03B9\"}, // GREEK SMALL LETTER IOTA\n\t}\n\tfor _, x := range list {\n\t\tif x.cm != \"\" && strings.Index(x.cm, cm) == -1 {\n\t\t\tcontinue\n\t\t}\n\t\tif x.tags != \"\" && strings.Index(x.tags, tag) == -1 {\n\t\t\tcontinue\n\t\t}\n\t\tif strings.Index(s, x.pattern) != -1 {\n\t\t\treturn true\n\t\t}\n\t}\n\treturn false\n}\n\nfunc doGo(tag, caser, input string) string {\n\tvar c Caser\n\tt := language.MustParse(tag)\n\tswitch caser {\n\tcase \"lower\":\n\t\tc = Lower(t)\n\tcase \"upper\":\n\t\tc = Upper(t)\n\tcase \"title\":\n\t\tc = Title(t)\n\tcase \"fold\":\n\t\tc = Fold()\n\t}\n\treturn c.String(input)\n}\n"} +{"text": "<?php\n\nnamespace Faker\\Provider;\n\n/**\n * @see http://en.wikipedia.org/wiki/EAN-13\n * @see http://en.wikipedia.org/wiki/ISBN\n */\nclass Barcode extends Base\n{\n private function ean($length = 13)\n {\n $code = static::numerify(str_repeat('#', $length - 1));\n\n return $code . static::eanChecksum($code);\n }\n\n /**\n * Utility function for computing EAN checksums\n *\n * @param string $input\n *\n * @return integer\n */\n protected static function eanChecksum($input)\n {\n $sequence = (strlen($input) + 1) === 8 ? array(3, 1) : array(1, 3);\n $sums = 0;\n foreach (str_split($input) as $n => $digit) {\n $sums += $digit * $sequence[$n % 2];\n }\n return (10 - $sums % 10) % 10;\n }\n\n /**\n * ISBN-10 check digit\n * @link http://en.wikipedia.org/wiki/International_Standard_Book_Number#ISBN-10_check_digits\n *\n * @param string $input ISBN without check-digit\n * @throws \\LengthException When wrong input length passed\n *\n * @return integer Check digit\n */\n protected static function isbnChecksum($input)\n {\n // We're calculating check digit for ISBN-10\n // so, the length of the input should be 9\n $length = 9;\n\n if (strlen($input) !== $length) {\n throw new \\LengthException(sprintf('Input length should be equal to %d', $length));\n }\n\n $digits = str_split($input);\n array_walk(\n $digits,\n function (&$digit, $position) {\n $digit = (10 - $position) * $digit;\n }\n );\n $result = (11 - array_sum($digits) % 11) % 11;\n\n // 10 is replaced by X\n return ($result < 10)?$result:'X';\n }\n\n /**\n * Get a random EAN13 barcode.\n * @return string\n * @example '4006381333931'\n */\n public function ean13()\n {\n return $this->ean(13);\n }\n\n /**\n * Get a random EAN8 barcode.\n * @return string\n * @example '73513537'\n */\n public function ean8()\n {\n return $this->ean(8);\n }\n\n /**\n * Get a random ISBN-10 code\n * @link http://en.wikipedia.org/wiki/International_Standard_Book_Number\n *\n * @return string\n * @example '4881416324'\n */\n public function isbn10()\n {\n $code = static::numerify(str_repeat('#', 9));\n\n return $code . static::isbnChecksum($code);\n }\n\n /**\n * Get a random ISBN-13 code\n * @link http://en.wikipedia.org/wiki/International_Standard_Book_Number\n *\n * @return string\n * @example '9790404436093'\n */\n public function isbn13()\n {\n $code = '97' . static::numberBetween(8, 9) . static::numerify(str_repeat('#', 9));\n\n return $code . static::eanChecksum($code);\n }\n}\n"} +{"text": "; RUN: llvm-as < %s | llvm-dis | FileCheck %s\n; RUN: verify-uselistorder < %s\n; PR9857\n\ndefine void @f(i8** nocapture %ptr1) {\n; CHECK: define void @f\nentry:\n br label %here.i\n\nhere.i:\n store i8* blockaddress(@doit, %here), i8** %ptr1, align 8\n; CHECK: blockaddress(@doit, %here)\n br label %doit.exit\n\ndoit.exit:\n ret void\n}\n\ndefine void @doit(i8** nocapture %pptr) {\n; CHECK: define void @doit\nentry:\n br label %here\n\nhere:\n store i8* blockaddress(@doit, %here), i8** %pptr, align 8\n; CHECK: blockaddress(@doit, %here)\n br label %end\n\nend:\n ret void\n}\n\n; PR13895\ndefine void @doitagain(i8** nocapture %pptr) {\n; CHECK: define void @doitagain\nentry:\n br label %here\n\nhere:\n store i8* blockaddress(@doit, %here), i8** %pptr, align 8\n; CHECK: blockaddress(@doit, %here)\n br label %end\n\nend:\n ret void\n}\n\n; Check a blockaddress taken in two separate functions before the referenced\n; function.\ndefine i8* @take1() {\n ret i8* blockaddress(@taken, %bb)\n}\ndefine i8* @take2() {\n ret i8* blockaddress(@taken, %bb)\n}\ndefine void @taken() {\n unreachable\nbb:\n unreachable\n}\n"} +{"text": "// This file is part of Eigen, a lightweight C++ template library\n// for linear algebra.\n//\n// Copyright (C) 2012 Desire Nuentsa <desire.nuentsa_wakam@inria.fr>\n//\n// This Source Code Form is subject to the terms of the Mozilla\n// Public License v. 2.0. If a copy of the MPL was not distributed\n// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.\n\n#ifndef EIGEN_SUITESPARSEQRSUPPORT_H\n#define EIGEN_SUITESPARSEQRSUPPORT_H\n\nnamespace Eigen {\n \n template<typename MatrixType> class SPQR; \n template<typename SPQRType> struct SPQRMatrixQReturnType; \n template<typename SPQRType> struct SPQRMatrixQTransposeReturnType; \n template <typename SPQRType, typename Derived> struct SPQR_QProduct;\n namespace internal {\n template <typename SPQRType> struct traits<SPQRMatrixQReturnType<SPQRType> >\n {\n typedef typename SPQRType::MatrixType ReturnType;\n };\n template <typename SPQRType> struct traits<SPQRMatrixQTransposeReturnType<SPQRType> >\n {\n typedef typename SPQRType::MatrixType ReturnType;\n };\n template <typename SPQRType, typename Derived> struct traits<SPQR_QProduct<SPQRType, Derived> >\n {\n typedef typename Derived::PlainObject ReturnType;\n };\n } // End namespace internal\n \n/**\n * \\ingroup SPQRSupport_Module\n * \\class SPQR\n * \\brief Sparse QR factorization based on SuiteSparseQR library\n * \n * This class is used to perform a multithreaded and multifrontal rank-revealing QR decomposition \n * of sparse matrices. The result is then used to solve linear leasts_square systems.\n * Clearly, a QR factorization is returned such that A*P = Q*R where :\n * \n * P is the column permutation. Use colsPermutation() to get it.\n * \n * Q is the orthogonal matrix represented as Householder reflectors. \n * Use matrixQ() to get an expression and matrixQ().transpose() to get the transpose.\n * You can then apply it to a vector.\n * \n * R is the sparse triangular factor. Use matrixQR() to get it as SparseMatrix.\n * NOTE : The Index type of R is always UF_long. You can get it with SPQR::Index\n * \n * \\tparam _MatrixType The type of the sparse matrix A, must be a column-major SparseMatrix<>\n * NOTE \n * \n */\ntemplate<typename _MatrixType>\nclass SPQR\n{\n public:\n typedef typename _MatrixType::Scalar Scalar;\n typedef typename _MatrixType::RealScalar RealScalar;\n typedef UF_long Index ; \n typedef SparseMatrix<Scalar, ColMajor, Index> MatrixType;\n typedef PermutationMatrix<Dynamic, Dynamic> PermutationType;\n public:\n SPQR() \n : m_isInitialized(false),\n m_ordering(SPQR_ORDERING_DEFAULT),\n m_allow_tol(SPQR_DEFAULT_TOL),\n m_tolerance (NumTraits<Scalar>::epsilon())\n { \n cholmod_l_start(&m_cc);\n }\n \n SPQR(const _MatrixType& matrix) \n : m_isInitialized(false),\n m_ordering(SPQR_ORDERING_DEFAULT),\n m_allow_tol(SPQR_DEFAULT_TOL),\n m_tolerance (NumTraits<Scalar>::epsilon())\n {\n cholmod_l_start(&m_cc);\n compute(matrix);\n }\n \n ~SPQR()\n {\n SPQR_free();\n cholmod_l_finish(&m_cc);\n }\n void SPQR_free()\n {\n cholmod_l_free_sparse(&m_H, &m_cc);\n cholmod_l_free_sparse(&m_cR, &m_cc);\n cholmod_l_free_dense(&m_HTau, &m_cc);\n std::free(m_E);\n std::free(m_HPinv);\n }\n\n void compute(const _MatrixType& matrix)\n {\n if(m_isInitialized) SPQR_free();\n\n MatrixType mat(matrix);\n cholmod_sparse A; \n A = viewAsCholmod(mat);\n Index col = matrix.cols();\n m_rank = SuiteSparseQR<Scalar>(m_ordering, m_tolerance, col, &A, \n &m_cR, &m_E, &m_H, &m_HPinv, &m_HTau, &m_cc);\n\n if (!m_cR)\n {\n m_info = NumericalIssue; \n m_isInitialized = false;\n return;\n }\n m_info = Success;\n m_isInitialized = true;\n m_isRUpToDate = false;\n }\n /** \n * Get the number of rows of the input matrix and the Q matrix\n */\n inline Index rows() const {return m_H->nrow; }\n \n /** \n * Get the number of columns of the input matrix. \n */\n inline Index cols() const { return m_cR->ncol; }\n \n /** \\returns the solution X of \\f$ A X = B \\f$ using the current decomposition of A.\n *\n * \\sa compute()\n */\n template<typename Rhs>\n inline const internal::solve_retval<SPQR, Rhs> solve(const MatrixBase<Rhs>& B) const \n {\n eigen_assert(m_isInitialized && \" The QR factorization should be computed first, call compute()\");\n eigen_assert(this->rows()==B.rows()\n && \"SPQR::solve(): invalid number of rows of the right hand side matrix B\");\n return internal::solve_retval<SPQR, Rhs>(*this, B.derived());\n }\n \n template<typename Rhs, typename Dest>\n void _solve(const MatrixBase<Rhs> &b, MatrixBase<Dest> &dest) const\n {\n eigen_assert(m_isInitialized && \" The QR factorization should be computed first, call compute()\");\n eigen_assert(b.cols()==1 && \"This method is for vectors only\");\n \n //Compute Q^T * b\n typename Dest::PlainObject y;\n y = matrixQ().transpose() * b;\n // Solves with the triangular matrix R\n Index rk = this->rank();\n y.topRows(rk) = this->matrixR().topLeftCorner(rk, rk).template triangularView<Upper>().solve(y.topRows(rk));\n y.bottomRows(cols()-rk).setZero();\n // Apply the column permutation \n dest.topRows(cols()) = colsPermutation() * y.topRows(cols());\n \n m_info = Success;\n }\n \n /** \\returns the sparse triangular factor R. It is a sparse matrix\n */\n const MatrixType matrixR() const\n {\n eigen_assert(m_isInitialized && \" The QR factorization should be computed first, call compute()\");\n if(!m_isRUpToDate) {\n m_R = viewAsEigen<Scalar,ColMajor, typename MatrixType::Index>(*m_cR);\n m_isRUpToDate = true;\n }\n return m_R;\n }\n /// Get an expression of the matrix Q\n SPQRMatrixQReturnType<SPQR> matrixQ() const\n {\n return SPQRMatrixQReturnType<SPQR>(*this);\n }\n /// Get the permutation that was applied to columns of A\n PermutationType colsPermutation() const\n { \n eigen_assert(m_isInitialized && \"Decomposition is not initialized.\");\n Index n = m_cR->ncol;\n PermutationType colsPerm(n);\n for(Index j = 0; j <n; j++) colsPerm.indices()(j) = m_E[j];\n return colsPerm; \n \n }\n /**\n * Gets the rank of the matrix. \n * It should be equal to matrixQR().cols if the matrix is full-rank\n */\n Index rank() const\n {\n eigen_assert(m_isInitialized && \"Decomposition is not initialized.\");\n return m_cc.SPQR_istat[4];\n }\n /// Set the fill-reducing ordering method to be used\n void setSPQROrdering(int ord) { m_ordering = ord;}\n /// Set the tolerance tol to treat columns with 2-norm < =tol as zero\n void setPivotThreshold(const RealScalar& tol) { m_tolerance = tol; }\n \n /** \\returns a pointer to the SPQR workspace */\n cholmod_common *cholmodCommon() const { return &m_cc; }\n \n \n /** \\brief Reports whether previous computation was successful.\n *\n * \\returns \\c Success if computation was succesful,\n * \\c NumericalIssue if the sparse QR can not be computed\n */\n ComputationInfo info() const\n {\n eigen_assert(m_isInitialized && \"Decomposition is not initialized.\");\n return m_info;\n }\n protected:\n bool m_isInitialized;\n bool m_analysisIsOk;\n bool m_factorizationIsOk;\n mutable bool m_isRUpToDate;\n mutable ComputationInfo m_info;\n int m_ordering; // Ordering method to use, see SPQR's manual\n int m_allow_tol; // Allow to use some tolerance during numerical factorization.\n RealScalar m_tolerance; // treat columns with 2-norm below this tolerance as zero\n mutable cholmod_sparse *m_cR; // The sparse R factor in cholmod format\n mutable MatrixType m_R; // The sparse matrix R in Eigen format\n mutable Index *m_E; // The permutation applied to columns\n mutable cholmod_sparse *m_H; //The householder vectors\n mutable Index *m_HPinv; // The row permutation of H\n mutable cholmod_dense *m_HTau; // The Householder coefficients\n mutable Index m_rank; // The rank of the matrix\n mutable cholmod_common m_cc; // Workspace and parameters\n template<typename ,typename > friend struct SPQR_QProduct;\n};\n\ntemplate <typename SPQRType, typename Derived>\nstruct SPQR_QProduct : ReturnByValue<SPQR_QProduct<SPQRType,Derived> >\n{\n typedef typename SPQRType::Scalar Scalar;\n typedef typename SPQRType::Index Index;\n //Define the constructor to get reference to argument types\n SPQR_QProduct(const SPQRType& spqr, const Derived& other, bool transpose) : m_spqr(spqr),m_other(other),m_transpose(transpose) {}\n \n inline Index rows() const { return m_transpose ? m_spqr.rows() : m_spqr.cols(); }\n inline Index cols() const { return m_other.cols(); }\n // Assign to a vector\n template<typename ResType>\n void evalTo(ResType& res) const\n {\n cholmod_dense y_cd;\n cholmod_dense *x_cd; \n int method = m_transpose ? SPQR_QTX : SPQR_QX; \n cholmod_common *cc = m_spqr.cholmodCommon();\n y_cd = viewAsCholmod(m_other.const_cast_derived());\n x_cd = SuiteSparseQR_qmult<Scalar>(method, m_spqr.m_H, m_spqr.m_HTau, m_spqr.m_HPinv, &y_cd, cc);\n res = Matrix<Scalar,ResType::RowsAtCompileTime,ResType::ColsAtCompileTime>::Map(reinterpret_cast<Scalar*>(x_cd->x), x_cd->nrow, x_cd->ncol);\n cholmod_l_free_dense(&x_cd, cc);\n }\n const SPQRType& m_spqr; \n const Derived& m_other; \n bool m_transpose; \n \n};\ntemplate<typename SPQRType>\nstruct SPQRMatrixQReturnType{\n \n SPQRMatrixQReturnType(const SPQRType& spqr) : m_spqr(spqr) {}\n template<typename Derived>\n SPQR_QProduct<SPQRType, Derived> operator*(const MatrixBase<Derived>& other)\n {\n return SPQR_QProduct<SPQRType,Derived>(m_spqr,other.derived(),false);\n }\n SPQRMatrixQTransposeReturnType<SPQRType> adjoint() const\n {\n return SPQRMatrixQTransposeReturnType<SPQRType>(m_spqr);\n }\n // To use for operations with the transpose of Q\n SPQRMatrixQTransposeReturnType<SPQRType> transpose() const\n {\n return SPQRMatrixQTransposeReturnType<SPQRType>(m_spqr);\n }\n const SPQRType& m_spqr;\n};\n\ntemplate<typename SPQRType>\nstruct SPQRMatrixQTransposeReturnType{\n SPQRMatrixQTransposeReturnType(const SPQRType& spqr) : m_spqr(spqr) {}\n template<typename Derived>\n SPQR_QProduct<SPQRType,Derived> operator*(const MatrixBase<Derived>& other)\n {\n return SPQR_QProduct<SPQRType,Derived>(m_spqr,other.derived(), true);\n }\n const SPQRType& m_spqr;\n};\n\nnamespace internal {\n \ntemplate<typename _MatrixType, typename Rhs>\nstruct solve_retval<SPQR<_MatrixType>, Rhs>\n : solve_retval_base<SPQR<_MatrixType>, Rhs>\n{\n typedef SPQR<_MatrixType> Dec;\n EIGEN_MAKE_SOLVE_HELPERS(Dec,Rhs)\n\n template<typename Dest> void evalTo(Dest& dst) const\n {\n dec()._solve(rhs(),dst);\n }\n};\n\n} // end namespace internal\n\n}// End namespace Eigen\n#endif\n"} +{"text": "/*\n * SN Platform GRU Driver\n *\n * FILE OPERATIONS & DRIVER INITIALIZATION\n *\n * This file supports the user system call for file open, close, mmap, etc.\n * This also incudes the driver initialization code.\n *\n * Copyright (c) 2008 Silicon Graphics, Inc. All Rights Reserved.\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n */\n\n#include <linux/module.h>\n#include <linux/kernel.h>\n#include <linux/errno.h>\n#include <linux/slab.h>\n#include <linux/mm.h>\n#include <linux/io.h>\n#include <linux/spinlock.h>\n#include <linux/device.h>\n#include <linux/miscdevice.h>\n#include <linux/interrupt.h>\n#include <linux/proc_fs.h>\n#include <linux/uaccess.h>\n#ifdef CONFIG_X86_64\n#include <asm/uv/uv_irq.h>\n#endif\n#include <asm/uv/uv.h>\n#include \"gru.h\"\n#include \"grulib.h\"\n#include \"grutables.h\"\n\n#include <asm/uv/uv_hub.h>\n#include <asm/uv/uv_mmrs.h>\n\nstruct gru_blade_state *gru_base[GRU_MAX_BLADES] __read_mostly;\nunsigned long gru_start_paddr __read_mostly;\nvoid *gru_start_vaddr __read_mostly;\nunsigned long gru_end_paddr __read_mostly;\nunsigned int gru_max_gids __read_mostly;\nstruct gru_stats_s gru_stats;\n\n/* Guaranteed user available resources on each node */\nstatic int max_user_cbrs, max_user_dsr_bytes;\n\nstatic struct miscdevice gru_miscdev;\n\n\n/*\n * gru_vma_close\n *\n * Called when unmapping a device mapping. Frees all gru resources\n * and tables belonging to the vma.\n */\nstatic void gru_vma_close(struct vm_area_struct *vma)\n{\n\tstruct gru_vma_data *vdata;\n\tstruct gru_thread_state *gts;\n\tstruct list_head *entry, *next;\n\n\tif (!vma->vm_private_data)\n\t\treturn;\n\n\tvdata = vma->vm_private_data;\n\tvma->vm_private_data = NULL;\n\tgru_dbg(grudev, \"vma %p, file %p, vdata %p\\n\", vma, vma->vm_file,\n\t\t\t\tvdata);\n\tlist_for_each_safe(entry, next, &vdata->vd_head) {\n\t\tgts =\n\t\t list_entry(entry, struct gru_thread_state, ts_next);\n\t\tlist_del(&gts->ts_next);\n\t\tmutex_lock(&gts->ts_ctxlock);\n\t\tif (gts->ts_gru)\n\t\t\tgru_unload_context(gts, 0);\n\t\tmutex_unlock(&gts->ts_ctxlock);\n\t\tgts_drop(gts);\n\t}\n\tkfree(vdata);\n\tSTAT(vdata_free);\n}\n\n/*\n * gru_file_mmap\n *\n * Called when mmapping the device. Initializes the vma with a fault handler\n * and private data structure necessary to allocate, track, and free the\n * underlying pages.\n */\nstatic int gru_file_mmap(struct file *file, struct vm_area_struct *vma)\n{\n\tif ((vma->vm_flags & (VM_SHARED | VM_WRITE)) != (VM_SHARED | VM_WRITE))\n\t\treturn -EPERM;\n\n\tif (vma->vm_start & (GRU_GSEG_PAGESIZE - 1) ||\n\t\t\t\tvma->vm_end & (GRU_GSEG_PAGESIZE - 1))\n\t\treturn -EINVAL;\n\n\tvma->vm_flags |=\n\t (VM_IO | VM_DONTCOPY | VM_LOCKED | VM_DONTEXPAND | VM_PFNMAP |\n\t\t\tVM_RESERVED);\n\tvma->vm_page_prot = PAGE_SHARED;\n\tvma->vm_ops = &gru_vm_ops;\n\n\tvma->vm_private_data = gru_alloc_vma_data(vma, 0);\n\tif (!vma->vm_private_data)\n\t\treturn -ENOMEM;\n\n\tgru_dbg(grudev, \"file %p, vaddr 0x%lx, vma %p, vdata %p\\n\",\n\t\tfile, vma->vm_start, vma, vma->vm_private_data);\n\treturn 0;\n}\n\n/*\n * Create a new GRU context\n */\nstatic int gru_create_new_context(unsigned long arg)\n{\n\tstruct gru_create_context_req req;\n\tstruct vm_area_struct *vma;\n\tstruct gru_vma_data *vdata;\n\tint ret = -EINVAL;\n\n\tif (copy_from_user(&req, (void __user *)arg, sizeof(req)))\n\t\treturn -EFAULT;\n\n\tif (req.data_segment_bytes > max_user_dsr_bytes)\n\t\treturn -EINVAL;\n\tif (req.control_blocks > max_user_cbrs || !req.maximum_thread_count)\n\t\treturn -EINVAL;\n\n\tif (!(req.options & GRU_OPT_MISS_MASK))\n\t\treq.options |= GRU_OPT_MISS_FMM_INTR;\n\n\tdown_write(&current->mm->mmap_sem);\n\tvma = gru_find_vma(req.gseg);\n\tif (vma) {\n\t\tvdata = vma->vm_private_data;\n\t\tvdata->vd_user_options = req.options;\n\t\tvdata->vd_dsr_au_count =\n\t\t GRU_DS_BYTES_TO_AU(req.data_segment_bytes);\n\t\tvdata->vd_cbr_au_count = GRU_CB_COUNT_TO_AU(req.control_blocks);\n\t\tvdata->vd_tlb_preload_count = req.tlb_preload_count;\n\t\tret = 0;\n\t}\n\tup_write(&current->mm->mmap_sem);\n\n\treturn ret;\n}\n\n/*\n * Get GRU configuration info (temp - for emulator testing)\n */\nstatic long gru_get_config_info(unsigned long arg)\n{\n\tstruct gru_config_info info;\n\tint nodesperblade;\n\n\tif (num_online_nodes() > 1 &&\n\t\t\t(uv_node_to_blade_id(1) == uv_node_to_blade_id(0)))\n\t\tnodesperblade = 2;\n\telse\n\t\tnodesperblade = 1;\n\tinfo.cpus = num_online_cpus();\n\tinfo.nodes = num_online_nodes();\n\tinfo.blades = info.nodes / nodesperblade;\n\tinfo.chiplets = GRU_CHIPLETS_PER_BLADE * info.blades;\n\n\tif (copy_to_user((void __user *)arg, &info, sizeof(info)))\n\t\treturn -EFAULT;\n\treturn 0;\n}\n\n/*\n * gru_file_unlocked_ioctl\n *\n * Called to update file attributes via IOCTL calls.\n */\nstatic long gru_file_unlocked_ioctl(struct file *file, unsigned int req,\n\t\t\t\t unsigned long arg)\n{\n\tint err = -EBADRQC;\n\n\tgru_dbg(grudev, \"file %p, req 0x%x, 0x%lx\\n\", file, req, arg);\n\n\tswitch (req) {\n\tcase GRU_CREATE_CONTEXT:\n\t\terr = gru_create_new_context(arg);\n\t\tbreak;\n\tcase GRU_SET_CONTEXT_OPTION:\n\t\terr = gru_set_context_option(arg);\n\t\tbreak;\n\tcase GRU_USER_GET_EXCEPTION_DETAIL:\n\t\terr = gru_get_exception_detail(arg);\n\t\tbreak;\n\tcase GRU_USER_UNLOAD_CONTEXT:\n\t\terr = gru_user_unload_context(arg);\n\t\tbreak;\n\tcase GRU_USER_FLUSH_TLB:\n\t\terr = gru_user_flush_tlb(arg);\n\t\tbreak;\n\tcase GRU_USER_CALL_OS:\n\t\terr = gru_handle_user_call_os(arg);\n\t\tbreak;\n\tcase GRU_GET_GSEG_STATISTICS:\n\t\terr = gru_get_gseg_statistics(arg);\n\t\tbreak;\n\tcase GRU_KTEST:\n\t\terr = gru_ktest(arg);\n\t\tbreak;\n\tcase GRU_GET_CONFIG_INFO:\n\t\terr = gru_get_config_info(arg);\n\t\tbreak;\n\tcase GRU_DUMP_CHIPLET_STATE:\n\t\terr = gru_dump_chiplet_request(arg);\n\t\tbreak;\n\t}\n\treturn err;\n}\n\n/*\n * Called at init time to build tables for all GRUs that are present in the\n * system.\n */\nstatic void gru_init_chiplet(struct gru_state *gru, unsigned long paddr,\n\t\t\t void *vaddr, int blade_id, int chiplet_id)\n{\n\tspin_lock_init(&gru->gs_lock);\n\tspin_lock_init(&gru->gs_asid_lock);\n\tgru->gs_gru_base_paddr = paddr;\n\tgru->gs_gru_base_vaddr = vaddr;\n\tgru->gs_gid = blade_id * GRU_CHIPLETS_PER_BLADE + chiplet_id;\n\tgru->gs_blade = gru_base[blade_id];\n\tgru->gs_blade_id = blade_id;\n\tgru->gs_chiplet_id = chiplet_id;\n\tgru->gs_cbr_map = (GRU_CBR_AU == 64) ? ~0 : (1UL << GRU_CBR_AU) - 1;\n\tgru->gs_dsr_map = (1UL << GRU_DSR_AU) - 1;\n\tgru->gs_asid_limit = MAX_ASID;\n\tgru_tgh_flush_init(gru);\n\tif (gru->gs_gid >= gru_max_gids)\n\t\tgru_max_gids = gru->gs_gid + 1;\n\tgru_dbg(grudev, \"bid %d, gid %d, vaddr %p (0x%lx)\\n\",\n\t\tblade_id, gru->gs_gid, gru->gs_gru_base_vaddr,\n\t\tgru->gs_gru_base_paddr);\n}\n\nstatic int gru_init_tables(unsigned long gru_base_paddr, void *gru_base_vaddr)\n{\n\tint pnode, nid, bid, chip;\n\tint cbrs, dsrbytes, n;\n\tint order = get_order(sizeof(struct gru_blade_state));\n\tstruct page *page;\n\tstruct gru_state *gru;\n\tunsigned long paddr;\n\tvoid *vaddr;\n\n\tmax_user_cbrs = GRU_NUM_CB;\n\tmax_user_dsr_bytes = GRU_NUM_DSR_BYTES;\n\tfor_each_possible_blade(bid) {\n\t\tpnode = uv_blade_to_pnode(bid);\n\t\tnid = uv_blade_to_memory_nid(bid);/* -1 if no memory on blade */\n\t\tpage = alloc_pages_node(nid, GFP_KERNEL, order);\n\t\tif (!page)\n\t\t\tgoto fail;\n\t\tgru_base[bid] = page_address(page);\n\t\tmemset(gru_base[bid], 0, sizeof(struct gru_blade_state));\n\t\tgru_base[bid]->bs_lru_gru = &gru_base[bid]->bs_grus[0];\n\t\tspin_lock_init(&gru_base[bid]->bs_lock);\n\t\tinit_rwsem(&gru_base[bid]->bs_kgts_sema);\n\n\t\tdsrbytes = 0;\n\t\tcbrs = 0;\n\t\tfor (gru = gru_base[bid]->bs_grus, chip = 0;\n\t\t\t\tchip < GRU_CHIPLETS_PER_BLADE;\n\t\t\t\tchip++, gru++) {\n\t\t\tpaddr = gru_chiplet_paddr(gru_base_paddr, pnode, chip);\n\t\t\tvaddr = gru_chiplet_vaddr(gru_base_vaddr, pnode, chip);\n\t\t\tgru_init_chiplet(gru, paddr, vaddr, bid, chip);\n\t\t\tn = hweight64(gru->gs_cbr_map) * GRU_CBR_AU_SIZE;\n\t\t\tcbrs = max(cbrs, n);\n\t\t\tn = hweight64(gru->gs_dsr_map) * GRU_DSR_AU_BYTES;\n\t\t\tdsrbytes = max(dsrbytes, n);\n\t\t}\n\t\tmax_user_cbrs = min(max_user_cbrs, cbrs);\n\t\tmax_user_dsr_bytes = min(max_user_dsr_bytes, dsrbytes);\n\t}\n\n\treturn 0;\n\nfail:\n\tfor (bid--; bid >= 0; bid--)\n\t\tfree_pages((unsigned long)gru_base[bid], order);\n\treturn -ENOMEM;\n}\n\nstatic void gru_free_tables(void)\n{\n\tint bid;\n\tint order = get_order(sizeof(struct gru_state) *\n\t\t\t GRU_CHIPLETS_PER_BLADE);\n\n\tfor (bid = 0; bid < GRU_MAX_BLADES; bid++)\n\t\tfree_pages((unsigned long)gru_base[bid], order);\n}\n\nstatic unsigned long gru_chiplet_cpu_to_mmr(int chiplet, int cpu, int *corep)\n{\n\tunsigned long mmr = 0;\n\tint core;\n\n\t/*\n\t * We target the cores of a blade and not the hyperthreads themselves.\n\t * There is a max of 8 cores per socket and 2 sockets per blade,\n\t * making for a max total of 16 cores (i.e., 16 CPUs without\n\t * hyperthreading and 32 CPUs with hyperthreading).\n\t */\n\tcore = uv_cpu_core_number(cpu) + UV_MAX_INT_CORES * uv_cpu_socket_number(cpu);\n\tif (core >= GRU_NUM_TFM || uv_cpu_ht_number(cpu))\n\t\treturn 0;\n\n\tif (chiplet == 0) {\n\t\tmmr = UVH_GR0_TLB_INT0_CONFIG +\n\t\t core * (UVH_GR0_TLB_INT1_CONFIG - UVH_GR0_TLB_INT0_CONFIG);\n\t} else if (chiplet == 1) {\n\t\tmmr = UVH_GR1_TLB_INT0_CONFIG +\n\t\t core * (UVH_GR1_TLB_INT1_CONFIG - UVH_GR1_TLB_INT0_CONFIG);\n\t} else {\n\t\tBUG();\n\t}\n\n\t*corep = core;\n\treturn mmr;\n}\n\n#ifdef CONFIG_IA64\n\nstatic int gru_irq_count[GRU_CHIPLETS_PER_BLADE];\n\nstatic void gru_noop(struct irq_data *d)\n{\n}\n\nstatic struct irq_chip gru_chip[GRU_CHIPLETS_PER_BLADE] = {\n\t[0 ... GRU_CHIPLETS_PER_BLADE - 1] {\n\t\t.irq_mask\t= gru_noop,\n\t\t.irq_unmask\t= gru_noop,\n\t\t.irq_ack\t= gru_noop\n\t}\n};\n\nstatic int gru_chiplet_setup_tlb_irq(int chiplet, char *irq_name,\n\t\t\tirq_handler_t irq_handler, int cpu, int blade)\n{\n\tunsigned long mmr;\n\tint irq = IRQ_GRU + chiplet;\n\tint ret, core;\n\n\tmmr = gru_chiplet_cpu_to_mmr(chiplet, cpu, &core);\n\tif (mmr == 0)\n\t\treturn 0;\n\n\tif (gru_irq_count[chiplet] == 0) {\n\t\tgru_chip[chiplet].name = irq_name;\n\t\tret = irq_set_chip(irq, &gru_chip[chiplet]);\n\t\tif (ret) {\n\t\t\tprintk(KERN_ERR \"%s: set_irq_chip failed, errno=%d\\n\",\n\t\t\t GRU_DRIVER_ID_STR, -ret);\n\t\t\treturn ret;\n\t\t}\n\n\t\tret = request_irq(irq, irq_handler, 0, irq_name, NULL);\n\t\tif (ret) {\n\t\t\tprintk(KERN_ERR \"%s: request_irq failed, errno=%d\\n\",\n\t\t\t GRU_DRIVER_ID_STR, -ret);\n\t\t\treturn ret;\n\t\t}\n\t}\n\tgru_irq_count[chiplet]++;\n\n\treturn 0;\n}\n\nstatic void gru_chiplet_teardown_tlb_irq(int chiplet, int cpu, int blade)\n{\n\tunsigned long mmr;\n\tint core, irq = IRQ_GRU + chiplet;\n\n\tif (gru_irq_count[chiplet] == 0)\n\t\treturn;\n\n\tmmr = gru_chiplet_cpu_to_mmr(chiplet, cpu, &core);\n\tif (mmr == 0)\n\t\treturn;\n\n\tif (--gru_irq_count[chiplet] == 0)\n\t\tfree_irq(irq, NULL);\n}\n\n#elif defined CONFIG_X86_64\n\nstatic int gru_chiplet_setup_tlb_irq(int chiplet, char *irq_name,\n\t\t\tirq_handler_t irq_handler, int cpu, int blade)\n{\n\tunsigned long mmr;\n\tint irq, core;\n\tint ret;\n\n\tmmr = gru_chiplet_cpu_to_mmr(chiplet, cpu, &core);\n\tif (mmr == 0)\n\t\treturn 0;\n\n\tirq = uv_setup_irq(irq_name, cpu, blade, mmr, UV_AFFINITY_CPU);\n\tif (irq < 0) {\n\t\tprintk(KERN_ERR \"%s: uv_setup_irq failed, errno=%d\\n\",\n\t\t GRU_DRIVER_ID_STR, -irq);\n\t\treturn irq;\n\t}\n\n\tret = request_irq(irq, irq_handler, 0, irq_name, NULL);\n\tif (ret) {\n\t\tuv_teardown_irq(irq);\n\t\tprintk(KERN_ERR \"%s: request_irq failed, errno=%d\\n\",\n\t\t GRU_DRIVER_ID_STR, -ret);\n\t\treturn ret;\n\t}\n\tgru_base[blade]->bs_grus[chiplet].gs_irq[core] = irq;\n\treturn 0;\n}\n\nstatic void gru_chiplet_teardown_tlb_irq(int chiplet, int cpu, int blade)\n{\n\tint irq, core;\n\tunsigned long mmr;\n\n\tmmr = gru_chiplet_cpu_to_mmr(chiplet, cpu, &core);\n\tif (mmr) {\n\t\tirq = gru_base[blade]->bs_grus[chiplet].gs_irq[core];\n\t\tif (irq) {\n\t\t\tfree_irq(irq, NULL);\n\t\t\tuv_teardown_irq(irq);\n\t\t}\n\t}\n}\n\n#endif\n\nstatic void gru_teardown_tlb_irqs(void)\n{\n\tint blade;\n\tint cpu;\n\n\tfor_each_online_cpu(cpu) {\n\t\tblade = uv_cpu_to_blade_id(cpu);\n\t\tgru_chiplet_teardown_tlb_irq(0, cpu, blade);\n\t\tgru_chiplet_teardown_tlb_irq(1, cpu, blade);\n\t}\n\tfor_each_possible_blade(blade) {\n\t\tif (uv_blade_nr_possible_cpus(blade))\n\t\t\tcontinue;\n\t\tgru_chiplet_teardown_tlb_irq(0, 0, blade);\n\t\tgru_chiplet_teardown_tlb_irq(1, 0, blade);\n\t}\n}\n\nstatic int gru_setup_tlb_irqs(void)\n{\n\tint blade;\n\tint cpu;\n\tint ret;\n\n\tfor_each_online_cpu(cpu) {\n\t\tblade = uv_cpu_to_blade_id(cpu);\n\t\tret = gru_chiplet_setup_tlb_irq(0, \"GRU0_TLB\", gru0_intr, cpu, blade);\n\t\tif (ret != 0)\n\t\t\tgoto exit1;\n\n\t\tret = gru_chiplet_setup_tlb_irq(1, \"GRU1_TLB\", gru1_intr, cpu, blade);\n\t\tif (ret != 0)\n\t\t\tgoto exit1;\n\t}\n\tfor_each_possible_blade(blade) {\n\t\tif (uv_blade_nr_possible_cpus(blade))\n\t\t\tcontinue;\n\t\tret = gru_chiplet_setup_tlb_irq(0, \"GRU0_TLB\", gru_intr_mblade, 0, blade);\n\t\tif (ret != 0)\n\t\t\tgoto exit1;\n\n\t\tret = gru_chiplet_setup_tlb_irq(1, \"GRU1_TLB\", gru_intr_mblade, 0, blade);\n\t\tif (ret != 0)\n\t\t\tgoto exit1;\n\t}\n\n\treturn 0;\n\nexit1:\n\tgru_teardown_tlb_irqs();\n\treturn ret;\n}\n\n/*\n * gru_init\n *\n * Called at boot or module load time to initialize the GRUs.\n */\nstatic int __init gru_init(void)\n{\n\tint ret;\n\n\tif (!is_uv_system())\n\t\treturn 0;\n\n#if defined CONFIG_IA64\n\tgru_start_paddr = 0xd000000000UL; /* ZZZZZZZZZZZZZZZZZZZ fixme */\n#else\n\tgru_start_paddr = uv_read_local_mmr(UVH_RH_GAM_GRU_OVERLAY_CONFIG_MMR) &\n\t\t\t\t0x7fffffffffffUL;\n#endif\n\tgru_start_vaddr = __va(gru_start_paddr);\n\tgru_end_paddr = gru_start_paddr + GRU_MAX_BLADES * GRU_SIZE;\n\tprintk(KERN_INFO \"GRU space: 0x%lx - 0x%lx\\n\",\n\t gru_start_paddr, gru_end_paddr);\n\tret = misc_register(&gru_miscdev);\n\tif (ret) {\n\t\tprintk(KERN_ERR \"%s: misc_register failed\\n\",\n\t\t GRU_DRIVER_ID_STR);\n\t\tgoto exit0;\n\t}\n\n\tret = gru_proc_init();\n\tif (ret) {\n\t\tprintk(KERN_ERR \"%s: proc init failed\\n\", GRU_DRIVER_ID_STR);\n\t\tgoto exit1;\n\t}\n\n\tret = gru_init_tables(gru_start_paddr, gru_start_vaddr);\n\tif (ret) {\n\t\tprintk(KERN_ERR \"%s: init tables failed\\n\", GRU_DRIVER_ID_STR);\n\t\tgoto exit2;\n\t}\n\n\tret = gru_setup_tlb_irqs();\n\tif (ret != 0)\n\t\tgoto exit3;\n\n\tgru_kservices_init();\n\n\tprintk(KERN_INFO \"%s: v%s\\n\", GRU_DRIVER_ID_STR,\n\t GRU_DRIVER_VERSION_STR);\n\treturn 0;\n\nexit3:\n\tgru_free_tables();\nexit2:\n\tgru_proc_exit();\nexit1:\n\tmisc_deregister(&gru_miscdev);\nexit0:\n\treturn ret;\n\n}\n\nstatic void __exit gru_exit(void)\n{\n\tif (!is_uv_system())\n\t\treturn;\n\n\tgru_teardown_tlb_irqs();\n\tgru_kservices_exit();\n\tgru_free_tables();\n\tmisc_deregister(&gru_miscdev);\n\tgru_proc_exit();\n}\n\nstatic const struct file_operations gru_fops = {\n\t.owner\t\t= THIS_MODULE,\n\t.unlocked_ioctl\t= gru_file_unlocked_ioctl,\n\t.mmap\t\t= gru_file_mmap,\n\t.llseek\t\t= noop_llseek,\n};\n\nstatic struct miscdevice gru_miscdev = {\n\t.minor\t\t= MISC_DYNAMIC_MINOR,\n\t.name\t\t= \"gru\",\n\t.fops\t\t= &gru_fops,\n};\n\nconst struct vm_operations_struct gru_vm_ops = {\n\t.close\t\t= gru_vma_close,\n\t.fault\t\t= gru_fault,\n};\n\n#ifndef MODULE\nfs_initcall(gru_init);\n#else\nmodule_init(gru_init);\n#endif\nmodule_exit(gru_exit);\n\nmodule_param(gru_options, ulong, 0644);\nMODULE_PARM_DESC(gru_options, \"Various debug options\");\n\nMODULE_AUTHOR(\"Silicon Graphics, Inc.\");\nMODULE_LICENSE(\"GPL\");\nMODULE_DESCRIPTION(GRU_DRIVER_ID_STR GRU_DRIVER_VERSION_STR);\nMODULE_VERSION(GRU_DRIVER_VERSION_STR);\n\n"} +{"text": "/*\r\n SDL - Simple DirectMedia Layer\r\n Copyright (C) 1997-2009 Sam Lantinga\r\n\r\n This library is free software; you can redistribute it and/or\r\n modify it under the terms of the GNU Lesser General Public\r\n License as published by the Free Software Foundation; either\r\n version 2.1 of the License, or (at your option) any later version.\r\n\r\n This library is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\r\n Lesser General Public License for more details.\r\n\r\n You should have received a copy of the GNU Lesser General Public\r\n License along with this library; if not, write to the Free Software\r\n Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA\r\n\r\n Sam Lantinga\r\n slouken@libsdl.org\r\n*/\r\n\r\n/* This file provides a general interface for SDL to read and write\r\n data sources. It can easily be extended to files, memory, etc.\r\n*/\r\n\r\n#ifndef _SDL_rwops_h\r\n#define _SDL_rwops_h\r\n\r\n#include \"SDL_stdinc.h\"\r\n#include \"SDL_error.h\"\r\n\r\n#include \"begin_code.h\"\r\n/* Set up for C function definitions, even when using C++ */\r\n#ifdef __cplusplus\r\nextern \"C\" {\r\n#endif\r\n\r\n/* This is the read/write operation structure -- very basic */\r\n\r\ntypedef struct SDL_RWops {\r\n\t/* Seek to 'offset' relative to whence, one of stdio's whence values:\r\n\t\tSEEK_SET, SEEK_CUR, SEEK_END\r\n\t Returns the final offset in the data source.\r\n\t */\r\n\tint (SDLCALL *seek)(struct SDL_RWops *context, int offset, int whence);\r\n\r\n\t/* Read up to 'num' objects each of size 'objsize' from the data\r\n\t source to the area pointed at by 'ptr'.\r\n\t Returns the number of objects read, or -1 if the read failed.\r\n\t */\r\n\tint (SDLCALL *read)(struct SDL_RWops *context, void *ptr, int size, int maxnum);\r\n\r\n\t/* Write exactly 'num' objects each of size 'objsize' from the area\r\n\t pointed at by 'ptr' to data source.\r\n\t Returns 'num', or -1 if the write failed.\r\n\t */\r\n\tint (SDLCALL *write)(struct SDL_RWops *context, const void *ptr, int size, int num);\r\n\r\n\t/* Close and free an allocated SDL_FSops structure */\r\n\tint (SDLCALL *close)(struct SDL_RWops *context);\r\n\r\n\tUint32 type;\r\n\tunion {\r\n#if defined(__WIN32__) && !defined(__SYMBIAN32__)\r\n\t struct {\r\n\t\tint append;\r\n\t\tvoid *h;\r\n\t\tstruct {\r\n\t\t void *data;\r\n\t\t int size;\r\n\t\t int left;\r\n\t\t} buffer;\r\n\t } win32io;\r\n#endif\r\n#ifdef HAVE_STDIO_H \r\n\t struct {\r\n\t\tint autoclose;\r\n\t \tFILE *fp;\r\n\t } stdio;\r\n#endif\r\n#ifdef __WII__\r\n\t struct {\r\n\t\tvoid *fp;\r\n\t\tint size;\r\n\t } wii;\r\n#endif\r\n\t struct {\r\n\t\tUint8 *base;\r\n\t \tUint8 *here;\r\n\t\tUint8 *stop;\r\n\t } mem;\r\n\t struct {\r\n\t\tvoid *data1;\r\n\t } unknown;\r\n\t} hidden;\r\n\r\n} SDL_RWops;\r\n\r\n\r\n/* Functions to create SDL_RWops structures from various data sources */\r\n\r\nextern DECLSPEC SDL_RWops * SDLCALL SDL_RWFromFile(const char *file, const char *mode);\r\n\r\n#ifdef HAVE_STDIO_H\r\nextern DECLSPEC SDL_RWops * SDLCALL SDL_RWFromFP(FILE *fp, int autoclose);\r\n#endif\r\n\r\nextern DECLSPEC SDL_RWops * SDLCALL SDL_RWFromMem(void *mem, int size);\r\nextern DECLSPEC SDL_RWops * SDLCALL SDL_RWFromConstMem(const void *mem, int size);\r\n\r\nextern DECLSPEC SDL_RWops * SDLCALL SDL_AllocRW(void);\r\nextern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops *area);\r\n\r\n#define RW_SEEK_SET\t0\t/* Seek from the beginning of data */\r\n#define RW_SEEK_CUR\t1\t/* Seek relative to current read point */\r\n#define RW_SEEK_END\t2\t/* Seek relative to the end of data */\r\n\r\n/* Macros to easily read and write from an SDL_RWops structure */\r\n#define SDL_RWseek(ctx, offset, whence)\t(ctx)->seek(ctx, offset, whence)\r\n#define SDL_RWtell(ctx)\t\t\t(ctx)->seek(ctx, 0, RW_SEEK_CUR)\r\n#define SDL_RWread(ctx, ptr, size, n)\t(ctx)->read(ctx, ptr, size, n)\r\n#define SDL_RWwrite(ctx, ptr, size, n)\t(ctx)->write(ctx, ptr, size, n)\r\n#define SDL_RWclose(ctx)\t\t(ctx)->close(ctx)\r\n\r\n\r\n/* Read an item of the specified endianness and return in native format */\r\nextern DECLSPEC Uint16 SDLCALL SDL_ReadLE16(SDL_RWops *src);\r\nextern DECLSPEC Uint16 SDLCALL SDL_ReadBE16(SDL_RWops *src);\r\nextern DECLSPEC Uint32 SDLCALL SDL_ReadLE32(SDL_RWops *src);\r\nextern DECLSPEC Uint32 SDLCALL SDL_ReadBE32(SDL_RWops *src);\r\nextern DECLSPEC Uint64 SDLCALL SDL_ReadLE64(SDL_RWops *src);\r\nextern DECLSPEC Uint64 SDLCALL SDL_ReadBE64(SDL_RWops *src);\r\n\r\n/* Write an item of native format to the specified endianness */\r\nextern DECLSPEC int SDLCALL SDL_WriteLE16(SDL_RWops *dst, Uint16 value);\r\nextern DECLSPEC int SDLCALL SDL_WriteBE16(SDL_RWops *dst, Uint16 value);\r\nextern DECLSPEC int SDLCALL SDL_WriteLE32(SDL_RWops *dst, Uint32 value);\r\nextern DECLSPEC int SDLCALL SDL_WriteBE32(SDL_RWops *dst, Uint32 value);\r\nextern DECLSPEC int SDLCALL SDL_WriteLE64(SDL_RWops *dst, Uint64 value);\r\nextern DECLSPEC int SDLCALL SDL_WriteBE64(SDL_RWops *dst, Uint64 value);\r\n\r\n\r\n/* Ends C function definitions when using C++ */\r\n#ifdef __cplusplus\r\n}\r\n#endif\r\n#include \"close_code.h\"\r\n\r\n#endif /* _SDL_rwops_h */\r\n"} +{"text": "/* Generated by RuntimeBrowser\n Image: /System/Library/PrivateFrameworks/MusicCarDisplayUI.framework/MusicCarDisplayUI\n */\n\n@interface MCDTableViewController : MPUTableViewController {\n AVExternalDevice * _externalDevice;\n bool _limitedUI;\n bool _limiting;\n MPMediaPredicate * _localPredicate;\n MCDNowPlayingButton * _nowPlayingButton;\n bool _shouldHideIndexTitles;\n bool _showMore;\n UIView * _snapshotView;\n UIColor * _tintColor;\n bool _topLevel;\n}\n\n@property (readonly) bool currentAppIsPlaying;\n@property (nonatomic) bool limitedUI;\n@property (nonatomic) bool shouldHideIndexTitles;\n@property (nonatomic) bool showMore;\n@property (nonatomic, retain) UIColor *tintColor;\n@property (nonatomic) bool topLevel;\n\n+ (Class)_tableViewClass;\n\n- (void).cxx_destruct;\n- (id)MPU_createNowPlayingButton;\n- (void)_MCD_nowPlayingButtonAction:(id)arg1;\n- (void)_itemChanged:(id)arg1;\n- (void)_limitedUIDidChange;\n- (void)_nowPlayingDidChangeNotification:(id)arg1;\n- (void)_updateNowPlayingVisibility;\n- (bool)_viewControllerWasSelected;\n- (bool)currentAppIsPlaying;\n- (void)dataSourceDidInvalidate;\n- (void)dealloc;\n- (id)initWithDataSource:(id)arg1 cellConfigurationClass:(Class)arg2;\n- (bool)limitedUI;\n- (id)preferredFocusedItem;\n- (void)reloadData;\n- (id)sectionIndexTitlesForTableView:(id)arg1;\n- (void)setLimitedUI:(bool)arg1;\n- (void)setShouldHideIndexTitles:(bool)arg1;\n- (void)setShowMore:(bool)arg1;\n- (void)setTintColor:(id)arg1;\n- (void)setTopLevel:(bool)arg1;\n- (bool)shouldHideIndexTitles;\n- (bool)shouldScrollToFirstDataSourceSectionOnInitialAppearance;\n- (bool)shouldShowActionCellConfiguration:(Class)arg1;\n- (bool)showMore;\n- (void)tableView:(id)arg1 didHighlightRowAtIndexPath:(id)arg2;\n- (void)tableView:(id)arg1 didUnhighlightRowAtIndexPath:(id)arg2;\n- (bool)tableView:(id)arg1 shouldChangeFocusedItem:(id)arg2 fromRowAtIndexPath:(id)arg3;\n- (bool)tableView:(id)arg1 shouldHighlightRowAtIndexPath:(id)arg2;\n- (void)tableView:(id)arg1 willDisplayHeaderView:(id)arg2 forSection:(long long)arg3;\n- (id)tintColor;\n- (bool)topLevel;\n- (void)viewDidAppear:(bool)arg1;\n- (void)viewDidLoad;\n- (void)viewWillAppear:(bool)arg1;\n- (void)viewWillDisappear:(bool)arg1;\n\n@end\n"} +{"text": "require_relative '../config/environment'\nRails.application.eager_load!\n\nrun ActionCable.server\n"} +{"text": "#ifndef __ASM_POWERPC_MMU_CONTEXT_H\n#define __ASM_POWERPC_MMU_CONTEXT_H\n#ifdef __KERNEL__\n\n#include <linux/kernel.h>\n#include <linux/mm.h>\n#include <linux/sched.h>\n#include <linux/spinlock.h>\n#include <asm/mmu.h>\t\n#include <asm/cputable.h>\n#include <asm-generic/mm_hooks.h>\n#include <asm/cputhreads.h>\n\n/*\n * Most if the context management is out of line\n */\nextern int init_new_context(struct task_struct *tsk, struct mm_struct *mm);\nextern void destroy_context(struct mm_struct *mm);\n\nextern void switch_mmu_context(struct mm_struct *prev, struct mm_struct *next);\nextern void switch_stab(struct task_struct *tsk, struct mm_struct *mm);\nextern void switch_slb(struct task_struct *tsk, struct mm_struct *mm);\nextern void set_context(unsigned long id, pgd_t *pgd);\n\n#ifdef CONFIG_PPC_BOOK3S_64\nextern int __init_new_context(void);\nextern void __destroy_context(int context_id);\nstatic inline void mmu_context_init(void) { }\n#else\nextern void mmu_context_init(void);\n#endif\n\n/*\n * switch_mm is the entry point called from the architecture independent\n * code in kernel/sched.c\n */\nstatic inline void switch_mm(struct mm_struct *prev, struct mm_struct *next,\n\t\t\t struct task_struct *tsk)\n{\n\t/* Mark this context has been used on the new CPU */\n\tcpumask_set_cpu(smp_processor_id(), mm_cpumask(next));\n\n\t/* 32-bit keeps track of the current PGDIR in the thread struct */\n#ifdef CONFIG_PPC32\n\ttsk->thread.pgdir = next->pgd;\n#endif /* CONFIG_PPC32 */\n\n\t/* 64-bit Book3E keeps track of current PGD in the PACA */\n#ifdef CONFIG_PPC_BOOK3E_64\n\tget_paca()->pgd = next->pgd;\n#endif\n\t/* Nothing else to do if we aren't actually switching */\n\tif (prev == next)\n\t\treturn;\n\n\t/* We must stop all altivec streams before changing the HW\n\t * context\n\t */\n#ifdef CONFIG_ALTIVEC\n\tif (cpu_has_feature(CPU_FTR_ALTIVEC))\n\t\tasm volatile (\"dssall\");\n#endif /* CONFIG_ALTIVEC */\n\n\t/* The actual HW switching method differs between the various\n\t * sub architectures.\n\t */\n#ifdef CONFIG_PPC_STD_MMU_64\n\tif (cpu_has_feature(CPU_FTR_SLB))\n\t\tswitch_slb(tsk, next);\n\telse\n\t\tswitch_stab(tsk, next);\n#else\n\t/* Out of line for now */\n\tswitch_mmu_context(prev, next);\n#endif\n\n}\n\n#define deactivate_mm(tsk,mm)\tdo { } while (0)\n\n/*\n * After we have set current->mm to a new value, this activates\n * the context for the new mm so we see the new mappings.\n */\nstatic inline void activate_mm(struct mm_struct *prev, struct mm_struct *next)\n{\n\tunsigned long flags;\n\n\tlocal_irq_save(flags);\n\tswitch_mm(prev, next, current);\n\tlocal_irq_restore(flags);\n}\n\n/* We don't currently use enter_lazy_tlb() for anything */\nstatic inline void enter_lazy_tlb(struct mm_struct *mm,\n\t\t\t\t struct task_struct *tsk)\n{\n\t/* 64-bit Book3E keeps track of current PGD in the PACA */\n#ifdef CONFIG_PPC_BOOK3E_64\n\tget_paca()->pgd = NULL;\n#endif\n}\n\n#endif /* __KERNEL__ */\n#endif /* __ASM_POWERPC_MMU_CONTEXT_H */\n"} +{"text": "/**\n *\n * Copyright (c) 2014, the Railo Company Ltd. All rights reserved.\n *\n * This library is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either \n * version 2.1 of the License, or (at your option) any later version.\n * \n * This library is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n * \n * You should have received a copy of the GNU Lesser General Public \n * License along with this library. If not, see <http://www.gnu.org/licenses/>.\n * \n **/\n/**\n * Implements the CFML Function ArrayFilter\n */\npackage lucee.runtime.functions.struct;\n\nimport lucee.runtime.PageContext;\nimport lucee.runtime.exp.FunctionException;\nimport lucee.runtime.exp.PageException;\nimport lucee.runtime.ext.function.BIF;\nimport lucee.runtime.functions.closure.ClosureFunc;\nimport lucee.runtime.functions.closure.Reduce;\nimport lucee.runtime.op.Caster;\nimport lucee.runtime.type.Struct;\nimport lucee.runtime.type.UDF;\n\npublic final class StructReduce extends BIF {\n\n\tprivate static final long serialVersionUID = 2268062574022295144L;\n\n\tpublic static Object call(PageContext pc, Struct sct, UDF udf) throws PageException {\n\t\treturn Reduce._call(pc, sct, udf, null, ClosureFunc.TYPE_STRUCT);\n\t}\n\n\tpublic static Object call(PageContext pc, Struct sct, UDF udf, Object initValue) throws PageException {\n\t\treturn Reduce._call(pc, sct, udf, initValue, ClosureFunc.TYPE_STRUCT);\n\t}\n\n\t@Override\n\tpublic Object invoke(PageContext pc, Object[] args) throws PageException {\n\t\tif (args.length == 2) return call(pc, Caster.toStruct(args[0]), Caster.toFunction(args[1]));\n\t\tif (args.length == 3) return call(pc, Caster.toStruct(args[0]), Caster.toFunction(args[1]), args[2]);\n\n\t\tthrow new FunctionException(pc, \"StructReduce\", 2, 3, args.length);\n\t}\n}"} +{"text": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<project name=\"AppCustomDialogDemo1\" default=\"help\">\n<property name=\"sdk.dir\" location=\"C:\\adt32\\sdk\\\"/>\n<property name=\"target\" value=\"android-17\"/>\n<property file=\"ant.properties\"/>\n<fail message=\"sdk.dir is missing.\" unless=\"sdk.dir\"/>\n<import file=\"${sdk.dir}/tools/ant/build.xml\"/>\n</project>\n"} +{"text": "// Copyright 2014 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\npackage org.chromium.base.annotations;\n\nimport java.lang.annotation.Retention;\nimport java.lang.annotation.RetentionPolicy;\n\n/**\n * @SuppressFBWarnings is used to suppress FindBugs warnings.\n *\n * The long name of FindBugs warnings can be found at\n * http://findbugs.sourceforge.net/bugDescriptions.html\n */\n@Retention(RetentionPolicy.CLASS)\npublic @interface SuppressFBWarnings {\n String[] value() default {};\n String justification() default \"\";\n}\n"} +{"text": "// The Nature of Code\n// Daniel Shiffman\n// http://natureofcode.com\n\nclass CA {\n int[] cells; \n int[] ruleset; \n int w = 2; \n int generation = 0; \n\n float theta = 0;\n \n CA(int[] r) {\n ruleset = r;\n cells = new int[360];\n for (int i = 0; i < cells.length; i++) {\n cells[i] = 0; \n }\n cells[cells.length/2] = 1; \n }\n\n void generate() {\n int[] nextgen = new int[cells.length]; \n for (int i = 1; i < cells.length-1; i++) { \n int left = cells[i-1];\n int me = cells[i];\n int right = cells[i+1];\n nextgen[i] = rules(left, me, right); \n }\n cells = nextgen; \n generation++; \n }\n\n int rules (int a, int b, int c) {\n String s = \"\" + a + b + c;\n int index = Integer.parseInt(s, 2); \n return ruleset[index]; \n }\n\n \n void display() {\n for (int i = 0; i < cells.length - 1; i++) {\n if (cells[i] == 1) fill(0);\n else fill(255);\n noStroke();\n float radius = 5;\n float numPoints = 250;\n float angle = TWO_PI/numPoints; \n float x = width/2 + sin(angle*i) * radius * generation;\n float y = height/2 + cos(angle*i) * radius * generation;\n ellipse(x, y, 5, 5);\n }\n }\n \n boolean finished() {\n if (generation > 200) { \n return true;\n } else {\n return false;\n }\n }\n}\n\n"} +{"text": "unit lazactivexreg;\n\n{ ActiveX component registration unit.\n\n Copyright (C) 2011 Ludo Brands\n\n This library is free software; you can redistribute it and/or modify it\n under the terms of the GNU Library General Public License as published by\n the Free Software Foundation; either version 2 of the License, or (at your\n option) any later version with the following modification:\n\n As a special exception, the copyright holders of this library give you\n permission to link this library with independent modules to produce an\n executable, regardless of the license terms of these independent modules,and\n to copy and distribute the resulting executable under terms of your choice,\n provided that you also meet, for each linked independent module, the terms\n and conditions of the license of that module. An independent module is a\n module which is not derived from or based on this library. If you modify\n this library, you may extend this exception to your version of the library,\n but you are not obligated to do so. If you do not wish to do so, delete this\n exception statement from your version.\n\n This program is distributed in the hope that it will be useful, but WITHOUT\n ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License\n for more details.\n\n You should have received a copy of the GNU Library General Public License\n along with this library; if not, write to the Free Software Foundation,\n Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1335, USA.\n}\n\ninterface\n\nuses\n activexcontainer\n {$ifndef wince}\n ,ImportTypelib\n {$endif wince}\n ;\n\nprocedure Register;\n\nimplementation\n\nuses Classes, LResources, MenuIntf, LCLIntf, activexstrconsts;\n\n\nprocedure Register; \nbegin\n {$ifndef wince}\n RegisterIDEMenuCommand(itmSecondaryTools, 'ImportTL', axImportTypeLibraryMenu, nil\n , @ImpTypeLib);\n {$endif wince}\n RegisterComponents('ActiveX', [TActiveXContainer]);\nend;\n\ninitialization\nLazarusResources.Add('TActiveXContainer','PNG',[\n #137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#24#0#0#0#24#8#6#0#0#0#224'w='#248#0\n +#0#0#1'sRGB'#0#174#206#28#233#0#0#0#6'bKGD'#0#0#0#0#0#0#249'C'#187#127#0#0#0\n +#9'pHYs'#0#0#11#19#0#0#11#19#1#0#154#156#24#0#0#0#7'tIME'#7#219#12#29#15''''\n +#14#229#143#252'P'#0#0#0#25'tEXtComment'#0'Created with GIMPW'#129#14#23#0#0\n +#4')IDATH'#199#181'U{L[e'#20#255#221'{K'#233#198#128'B-'#143#14'6'#137#136\n +#145#133'm'#248#136#178#224#20#31#141'!Y'#156#203'6'#19#163#152#12'uc2'#147\n +#205'L'#137'qf'#3'u'#137#25'f'#226#8#198'E'#205'fDE'#156'l#'#153#147#9's'#15\n +#31'A'#172#186'!'#8#148#142'G'#25#184#130#164#133#246#182#183#189'?'#255#168\n +#180'tc'#19'f<'#201#151#220#243#251#206#247#157#243';'#231#220#243#129#215'!'\n +#129#128#159#173'?[X'#177'{'#23#11#205#133'4'#153'R'#168#145't'#20'5Zfd.fI'\n +#201's'#236#183#245#146'$'#5#146#196','#197'91'#129#143#15#30#196#254#253'5'\n +#24#232#27#196#205#183','#193'M'#153#153'HH'#140#3'D'#21#23#251#134#241#195\n +#175'm'#176#219#250#144#148'l'#196#201#211#223#2#179#137#216#227#245#176#186\n +#178#154#249#249#249',+{'#137#223#159'=EY'#150'g'#180'U'#252#10#27#27#191'd'\n +#154')'#141'E'#143#23#241'_'#29#252'x'#230#12#183'n-a'#227#209#6#250#188#222\n +'Y'#167#209#242#203'o\\'#190#252#142#171#167'H'#9'(8'#252#217#17'$.'#212#163\n +'`'#229#253#16#4#1's'#18#2'e'#175#150#205#156'\"'#167'k'#130#13#13'G'#216'?'\n +#216#207#255'\"'#173#167'N'#135#25#144#132#127'2'#128'q'#223'_'#240#184'ehU'\n +#21'Z'#173#17'q'#198'hH'#146#8#1#151'1'#8'('#145#186' '#0#162#6#160#10#168\n +#129'iL'#168#210#218#221#206#141#165'E\\'#176#192#200' '#185#169'%'#241#6'S'#6\n +#183'm'#127#145#206'1'#231#180'>U'#232#223#187#134'|'#6#225#245#154#153'Td'\n +#178'n['#24'+'#141'%l'#253'Vf'#230'f]v'#241#149'k'#195#19'OF'#208#247#14'v'\n +#146'['#226#167'9'#153'O'#182#188'On'#137#253'G'#215#145'-'#31'Q|go'#5'z,]A'\n +#150#0#30'-|'#4#159#31':'#140'=o'#238#137#200#192#209#227'_'#195#237'q'#134\n +'t'#173')'#11#184'm'#245'4'#11'7P['#12#200#174#160#250#192'v'#224#158'u'#16#6\n +'G'''#233#153#184#4#199#208#5't'#245#158'G'#140'a!d'#167#11'#]N'#188#242'z)<'\n +#158#160'}BB'#2'::~GrrJ'#248'Nk;'#240'V>'#160#140'G'#214'c'#201'z'#224#249'O'\n +#0'A'#132'&%>'#26'g[;PUY'#141#150's'#205#24#27'v'#207#216'u'#138#162#192#225\n +#24#141'tpc'#6#160#215#3#151#166'9'#136#210#1#143#149#3#130#8#0#16'kk'#15#161\n +'p'#205'Z|'#209#212#136#177'a7$'#9#184'7o'#25'J7o'#130#30#209#161's'#170#170\n +#194#231#243'Ez'#253#230#3'`l '#18#243#251#0#155'%'#172#167#153#210'#'#138'Y'\n +#252't1='#147#19#28#31#178'S'#132#24#194#227#227#227'i'#179#217#194'U'#254\n +#238#0'Y'#162#11#22#244'Y)'#178#163'v'#230#146#178#135'$)'#142#143'8\"'#2#136\n +'I4`'#200'1'#138#154#154'w'#161'B'#13#225#162'(A'#21#162'A'#18#242#248#16#240\n +#225'S'#128'_'#14'n'#174#170#2#140#139#195#151#216'-'#192'O'#245#193#239#149\n +'y'#183'G0'#144'$'#137#177#6#3#5'Q$'#180#218#16#30#27#23#199#246#206'n*'#178\n +#151#220#183'*'#28#237#190#135#200'@'#128'<'#240'r$'#139#221#185#164#215'E'\n +#177#170#242'=dg'#166#135#127#208'@'#0#174#137'Q'#188#176#185#8'wg'#223#25\n +#194'eY'#134'u'#168#31#154#230'7'#128#243#199#130#160'!'#21'X'#251'6 '#138'@'\n +#193#6'`'#158'1'#204#162#215#2#180'5B IYQ@'#191#2#18'P'#252'^Di'#162'0O7'#31\n +#170#26'L'#145'J'#194#229'r# '#1#198#216#24'`j>N'#141#135'P'''#248#195'{@'\n +#176#147#186';;'#175'k'#144'MNN'#178#233#228#9#246#246't]'#211'N2-J'#219#153\n +#179'4'#7#186'h'#221#172#166#240#232#184#3#159#214#213#193#250#135#21'f'#243\n +#131'0'#26'S'#174'}'#224#216#241#175#184'bE'#30'-mmW'#141#194#241#167#131#245\n +#245#245#220'X'#178#137';v'#236#226#160'}`'#214'L5'#15#155#205#232#232'8'#135\n +#251#10#10#144#150#190#8'9Ko'#133'A'#159#10#149'n'#12#219'G`'#187#208#15#189\n +#222#128'u'#235'W'#163#188#162#28'I'#6#227#156#222#157#208'{`'#191'hG'#211\n +#137'ft'#247#244'@U|0&&#;+'#11#203#238#202'EjR*0'#199#7#237#10#7#255#151#252\n +#13#208#236#3#252#184#199'u'#249#0#0#0#0'IEND'#174'B`'#130\n]);\n\nend.\n"} +{"text": "/*\ngrayscale style (c) MY Sun <simonmysun@gmail.com>\n*/\n\n.hljs {\n display: block;\n overflow-x: auto;\n padding: 0.5em;\n color: #333;\n background: #fff;\n}\n\n.hljs-comment,\n.hljs-quote {\n color: #777;\n font-style: italic;\n}\n\n.hljs-keyword,\n.hljs-selector-tag,\n.hljs-subst {\n color: #333;\n font-weight: bold;\n}\n\n.hljs-string,\n.hljs-doctag,\n.hljs-formula,\n.hljs-number,\n.hljs-literal {\n color: #333;\n}\n\n.hljs-title,\n.hljs-section,\n.hljs-selector-id {\n color: #000;\n font-weight: bold;\n}\n\n.hljs-subst {\n font-weight: normal;\n}\n\n.hljs-class .hljs-title,\n.hljs-type,\n.hljs-name {\n color: #333;\n font-weight: bold;\n}\n\n.hljs-tag {\n color: #333;\n}\n\n.hljs-regexp {\n color: #333;\n}\n\n.hljs-symbol,\n.hljs-bullet,\n.hljs-link {\n color: #000;\n}\n\n.hljs-built_in,\n.hljs-builtin-name {\n color: #000;\n text-decoration: underline;\n}\n\n.hljs-meta {\n color: #999;\n font-weight: bold;\n}\n\n.hljs-deletion {\n color: #fff;\n}\n\n.hljs-addition {\n color: #000;\n}\n\n.hljs-emphasis {\n font-style: italic;\n}\n\n.hljs-strong {\n font-weight: bold;\n}\n"} +{"text": "/* \n\n Simple knapsack problem in Picat.\n\n Problem from http://sourceforge.net/forum/forum.php?thread_id=1432186&forum_id=335511\n \"\"\"\n Knapsack maximization problem example\n @author Fernando Lopez Hernandez (f.lopezATuamDOTes)\n\n In this problem a thief have a knapsack with capacity of 10 units.\n He could charge the knapsack with golden ingots of size 4, silver ingots\n of size 3, and bronze ingots of size 2. Each ingot value is 15, 12 and 7\n respectively.\n\n The solver goal is to find a solution who maximize profit with the above\n restrictions. That is to say: If G represents the number of golden ingots,\n S the number of silver ingots, B the number of bronze ingots,\n and P the profit, we define the following constraints:\n 4G + 3S + 2B <= 10\n 15G + 12S + 7B = P\n\n Solution:\n [ 1, 2, 0 ]\n i.e. 1 Gold, 2 Silver and 0 Bronze\n \"\"\"\n\n This Picat model was created by Hakan Kjellerstrand, hakank@gmail.com\n See also my Picat page: http://www.hakank.org/picat/\n\n*/\n\n\nimport cp.\n\n\nmain => go.\n\n\ngo =>\n values(Values),\n weights(Weights),\n weight_max(WeightMax),\n\n N = Values.length,\n\n % decision variables\n X = new_list(N),\n % X :: 0..100,\n\n foreach(I in 1..N) X[I] #>= 0 end,\n\n knapsack(Weights, Values, X, WeightMax,Profit),\n\n solve($[max(Profit)], X),\n\n println(x=X),\n println(profit=Profit),\n \n nl.\n\n% data\nweight_max(WeightMax) => WeightMax= 10.\n\n% Gold, Silver, Bronze \nvalues(Values) => Values = [15, 12, 7].\nweights(Weights) => Weights = [4, 3, 2].\n\n%\n% knapsack: \n% given Weights and Values\n% - ensure that the total weights <= WeightMax\n% - calculate the profit (which will be maximized)\n%\nknapsack(Weights, Values,Take, WeightMax,Profit) =>\n sum([W*T : {W,T} in zip(Weights, Take)]) #=< WeightMax,\n Profit #= sum([V*T : {V,T} in zip(Values,Take)])."} +{"text": "---\n-api-id: P:Windows.Media.Devices.Core.FrameController.FocusControl\n-api-type: winrt property\n---\n\n<!-- Property syntax\npublic Windows.Media.Devices.Core.FrameFocusControl FocusControl { get; }\n-->\n\n# Windows.Media.Devices.Core.FrameController.FocusControl\n\n## -description\nGets the focus settings for a frame in a variable photo sequence.\n\n## -property-value\nThe focus settings for a frame in a variable photo sequence.\n\n## -remarks\n\n## -examples\n\n## -see-also\n"} +{"text": "#!/usr/bin/env perl\n# SPDX-License-Identifier: GPL-2.0\n#\n# Clean a text file -- or directory of text files -- of stealth whitespace.\n# WARNING: this can be a highly destructive operation. Use with caution.\n#\n\nuse warnings;\nuse bytes;\nuse File::Basename;\n\n# Default options\n$max_width = 79;\n\n# Clean up space-tab sequences, either by removing spaces or\n# replacing them with tabs.\nsub clean_space_tabs($)\n{\n no bytes;\t\t\t# Tab alignment depends on characters\n\n my($li) = @_;\n my($lo) = '';\n my $pos = 0;\n my $nsp = 0;\n my($i, $c);\n\n for ($i = 0; $i < length($li); $i++) {\n\t$c = substr($li, $i, 1);\n\tif ($c eq \"\\t\") {\n\t my $npos = ($pos+$nsp+8) & ~7;\n\t my $ntab = ($npos >> 3) - ($pos >> 3);\n\t $lo .= \"\\t\" x $ntab;\n\t $pos = $npos;\n\t $nsp = 0;\n\t} elsif ($c eq \"\\n\" || $c eq \"\\r\") {\n\t $lo .= \" \" x $nsp;\n\t $pos += $nsp;\n\t $nsp = 0;\n\t $lo .= $c;\n\t $pos = 0;\n\t} elsif ($c eq \" \") {\n\t $nsp++;\n\t} else {\n\t $lo .= \" \" x $nsp;\n\t $pos += $nsp;\n\t $nsp = 0;\n\t $lo .= $c;\n\t $pos++;\n\t}\n }\n $lo .= \" \" x $nsp;\n return $lo;\n}\n\n# Compute the visual width of a string\nsub strwidth($) {\n no bytes;\t\t\t# Tab alignment depends on characters\n\n my($li) = @_;\n my($c, $i);\n my $pos = 0;\n my $mlen = 0;\n\n for ($i = 0; $i < length($li); $i++) {\n\t$c = substr($li,$i,1);\n\tif ($c eq \"\\t\") {\n\t $pos = ($pos+8) & ~7;\n\t} elsif ($c eq \"\\n\") {\n\t $mlen = $pos if ($pos > $mlen);\n\t $pos = 0;\n\t} else {\n\t $pos++;\n\t}\n }\n\n $mlen = $pos if ($pos > $mlen);\n return $mlen;\n}\n\n$name = basename($0);\n\n@files = ();\n\nwhile (defined($a = shift(@ARGV))) {\n if ($a =~ /^-/) {\n\tif ($a eq '-width' || $a eq '-w') {\n\t $max_width = shift(@ARGV)+0;\n\t} else {\n\t print STDERR \"Usage: $name [-width #] files...\\n\";\n\t exit 1;\n\t}\n } else {\n\tpush(@files, $a);\n }\n}\n\nforeach $f ( @files ) {\n print STDERR \"$name: $f\\n\";\n\n if (! -f $f) {\n\tprint STDERR \"$f: not a file\\n\";\n\tnext;\n }\n\n if (!open(FILE, '+<', $f)) {\n\tprint STDERR \"$name: Cannot open file: $f: $!\\n\";\n\tnext;\n }\n\n binmode FILE;\n\n # First, verify that it is not a binary file; consider any file\n # with a zero byte to be a binary file. Is there any better, or\n # additional, heuristic that should be applied?\n $is_binary = 0;\n\n while (read(FILE, $data, 65536) > 0) {\n\tif ($data =~ /\\0/) {\n\t $is_binary = 1;\n\t last;\n\t}\n }\n\n if ($is_binary) {\n\tprint STDERR \"$name: $f: binary file\\n\";\n\tnext;\n }\n\n seek(FILE, 0, 0);\n\n $in_bytes = 0;\n $out_bytes = 0;\n $blank_bytes = 0;\n\n @blanks = ();\n @lines = ();\n $lineno = 0;\n\n while ( defined($line = <FILE>) ) {\n\t$lineno++;\n\t$in_bytes += length($line);\n\t$line =~ s/[ \\t\\r]*$//;\t\t# Remove trailing spaces\n\t$line = clean_space_tabs($line);\n\n\tif ( $line eq \"\\n\" ) {\n\t push(@blanks, $line);\n\t $blank_bytes += length($line);\n\t} else {\n\t push(@lines, @blanks);\n\t $out_bytes += $blank_bytes;\n\t push(@lines, $line);\n\t $out_bytes += length($line);\n\t @blanks = ();\n\t $blank_bytes = 0;\n\t}\n\n\t$l_width = strwidth($line);\n\tif ($max_width && $l_width > $max_width) {\n\t print STDERR\n\t\t\"$f:$lineno: line exceeds $max_width characters ($l_width)\\n\";\n\t}\n }\n\n # Any blanks at the end of the file are discarded\n\n if ($in_bytes != $out_bytes) {\n\t# Only write to the file if changed\n\tseek(FILE, 0, 0);\n\tprint FILE @lines;\n\n\tif ( !defined($where = tell(FILE)) ||\n\t !truncate(FILE, $where) ) {\n\t die \"$name: Failed to truncate modified file: $f: $!\\n\";\n\t}\n }\n\n close(FILE);\n}\n"} +{"text": "/*\n * Copyright © 2015 Intel Corporation\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice (including the next\n * paragraph) shall be included in all copies or substantial portions of the\n * Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n#ifndef WSI_COMMON_WAYLAND_H\n#define WSI_COMMON_WAYLAND_H\n\n#include \"wsi_common.h\"\n\nVkBool32\nwsi_wl_get_presentation_support(struct wsi_device *wsi_device,\n\t\t\t\tstruct wl_display *wl_display);\n\nVkResult wsi_create_wl_surface(const VkAllocationCallbacks *pAllocator,\n\t\t\t const VkWaylandSurfaceCreateInfoKHR *pCreateInfo,\n\t\t\t VkSurfaceKHR *pSurface);\n#endif\n"} +{"text": "Afghanistan (AF)\nAlbánia (AL)\nAlgeria (DZ)\nAmerihká ovttastuvvan stáhtat (US)\nAmerihká Samoa (AS)\nAndorra (AD)\nAngola (AO)\nAnguilla (AI)\nAntárktis (AQ)\nAntigua ja Barbuda (AG)\nAOS Virgin-sullot (VI)\nArgentina (AR)\nArmenia (AM)\nAruba (AW)\nAserbaižan (AZ)\nAustrália (AU)\nBahamas (BS)\nBahrain (BH)\nBangladesh (BD)\nBarbados (BB)\nBelgia (BE)\nBelize (BZ)\nBenin (BJ)\nBermuda (BM)\nBhutan (BT)\nBolivia (BO)\nBosnia-Hercegovina (BA)\nBotswana (BW)\nBouvet-sullot (BV)\nBrasil (BR)\nBritish Indian Ocean Territory (IO)\nBrittania Virgin-sullot (VG)\nBrunei (BN)\nBulgária (BG)\nBurkina Faso (BF)\nBurma (MM)\nBurundi (BI)\nCaribbean Netherlands (BQ)\nCayman-sullot (KY)\nCocos-sullot (CC)\nCook-sullot (CK)\nCosta Rica (CR)\nCuraçao (CW)\nČeahkka (CZ)\nČiile (CL)\nDavvi-Korea (KP)\nDavvi-Mariánat (MP)\nDavvisudan (SD)\nDánmárku (DK)\nDjibouti (DJ)\nDominica (DM)\nDominikána dásseváldi (DO)\nDuiska (DE)\nDurka (TR)\nEcuador (EC)\nEgypta (EG)\nEkvatoriála Guinea (GQ)\nEl Salvador (SV)\nElfenbenariddu (CI)\nEritrea (ER)\nEstlánda (EE)\nEtiopia (ET)\nFalklandsullot (FK)\nFearsullot (FO)\nFijisullot (FJ)\nFilippiinnat (PH)\nFrankriika (FR)\nFrankriikka Guayana (GF)\nFrankriikka Polynesia (PF)\nFrankriikka Saint Martin (MF)\nFrench Southern Territories (TF)\nGabon (GA)\nGaska-Afrihká dásseváldi (CF)\nGámbia (GM)\nGeorgia (GE)\nGhana (GH)\nGibraltar (GI)\nGreika (GR)\nGrenada (GD)\nGuadeloupe (GP)\nGuam (GU)\nGuatemala (GT)\nGuernsey (GG)\nGuinea (GN)\nGuinea-Bissau (GW)\nGuyana (GY)\nHaiti (HT)\nHeard- ja McDonald-sullot (HM)\nHonduras (HN)\nHongkong (HK)\nIndia (IN)\nIndonesia (ID)\nIrak (IQ)\nIran (IR)\nIrlánda (IE)\nIslánda (IS)\nIsrael (IL)\nItália (IT)\nJamaica (JM)\nJapána (JP)\nJemen (YE)\nJersey (JE)\nJordánia (JO)\nJuovllat-sullot (CX)\nKalaallit Nunaat (GL)\nKambodža (KH)\nKamerun (CM)\nKanáda (CA)\nKap Verde (CV)\nKasakstan (KZ)\nKenia (KE)\nKiinná (CN)\nKirgisistan (KG)\nKiribati (KI)\nKolombia (CO)\nKomoros (KM)\nKongo-Brazzaville (CG)\nKongo-Kinshasa (CD)\nKroátia (HR)\nKuba (CU)\nKuwait (KW)\nKypros (CY)\nLaos (LA)\nLátvia (LV)\nLesotho (LS)\nLibanon (LB)\nLiberia (LR)\nLibya (LY)\nLiechtenstein (LI)\nLietuva (LT)\nLulli Georgia ja Lulli Sandwich-sullot (GS)\nLuxembourg (LU)\nMadagaskar (MG)\nMakáo (MO)\nMalawi (MW)\nMalediivvat (MV)\nMalesia (MY)\nMali (ML)\nMann-sullot (IM)\nMarokko (MA)\nMarshallsullot (MH)\nMartinique (MQ)\nMauretánia (MR)\nMauritius (MU)\nMayotte (YT)\nMálta (MT)\nMátta-Afrihká (ZA)\nMátta-Korea (KR)\nMáttasudan (SS)\nMeksiko (MX)\nMikronesia (FM)\nMoldávia (MD)\nMonaco (MC)\nMongolia (MN)\nMontenegro (ME)\nMontserrat (MS)\nMosambik (MZ)\nNamibia (NA)\nNauru (NR)\nNepal (NP)\nNicaragua (NI)\nNiger (NE)\nNigeria (NG)\nNiue (NU)\nNorfolksullot (NF)\nNorga (NO)\nNorth Macedonia (MK)\nNuorta-Timor (TL)\nNuortariika (AT)\nOarje-Sahára (EH)\nOđđa-Kaledonia (NC)\nOđđa-Selánda (NZ)\nOman (OM)\nOvttastuvvan Arábaemiráhtat (AE)\nPakistan (PK)\nPalau (PW)\nPalestina (PS)\nPanama (PA)\nPapua-Ođđa-Guinea (PG)\nParaguay (PY)\nPeru (PE)\nPitcairn (PN)\nPolen (PL)\nPortugála (PT)\nPuerto Rico (PR)\nQatar (QA)\nRéunion (RE)\nRománia (RO)\nRuošša (RU)\nRuoŧŧa (SE)\nRwanda (RW)\nSaint Barthélemy (BL)\nSaint Helena (SH)\nSaint Kitts ja Nevis (KN)\nSaint Lucia (LC)\nSaint Pierre ja Miquelon (PM)\nSaint Vincent ja Grenadine (VC)\nSalomon-sullot (SB)\nSamoa (WS)\nSan Marino (SM)\nSaudi-Arábia (SA)\nSenegal (SN)\nSerbia (RS)\nSeychellsullot (SC)\nSierra Leone (SL)\nSingapore (SG)\nSlovákia (SK)\nSlovenia (SI)\nSomália (SO)\nSpánia (ES)\nSri Lanka (LK)\nStuorra-Británnia (GB)\nSuopma (FI)\nSurinam (SR)\nSvalbárda ja Jan Mayen (SJ)\nSvazieana (SZ)\nSyria (SY)\nSão Tomé ja Príncipe (ST)\nŠveica (CH)\nTaiwan (TW)\nTanzánia (TZ)\nTažikistan (TJ)\nTčad (TD)\nThaieana (TH)\nTogo (TG)\nTokelau (TK)\nTonga (TO)\nTrinidad ja Tobago (TT)\nTunisia (TN)\nTurkmenistan (TM)\nTurks ja Caicos-sullot (TC)\nTuvalu (TV)\nU.S. Outlying Islands (UM)\nUganda (UG)\nUkraina (UA)\nUngár (HU)\nUruguay (UY)\nUsbekistan (UZ)\nVanuatu (VU)\nVatikána (VA)\nVenezuela (VE)\nVietnam (VN)\nVilges-Ruošša (BY)\nVuolleeatnamat (NL)\nVuolleeatnamat Saint Martin (SX)\nWallis ja Futuna (WF)\nZambia (ZM)\nZimbabwe (ZW)\nÅlánda (AX)\n"} +{"text": "--TEST--\nBug #48801 (Problem with imagettfbbox)\n--SKIPIF--\n<?php\n\tif(!extension_loaded('gd')){ die('skip gd extension not available'); }\n\tif(!function_exists('imageftbbox')) die('skip imageftbbox() not available');\n?>\n--FILE--\n<?php\n$cwd = dirname(__FILE__);\n$font = \"$cwd/Tuffy.ttf\";\n$bbox = imageftbbox(50, 0, $font, \"image\");\necho '(' . $bbox[0] . ', ' . $bbox[1] . \")\\n\";\necho '(' . $bbox[2] . ', ' . $bbox[3] . \")\\n\";\necho '(' . $bbox[4] . ', ' . $bbox[5] . \")\\n\";\necho '(' . $bbox[6] . ', ' . $bbox[7] . \")\\n\";\n?>\n--EXPECTREGEX--\n\\(4, 15\\)\n\\(16[0-1], 15\\)\n\\(16[0-1], -4[7-8]\\)\n\\(4, -4[7-8]\\)\n"} +{"text": "$NetBSD: patch-test__suite_tests.source,v 1.1 2017/10/08 11:23:24 seb Exp $\n\ntry to use mktemp in a portable way; do not use python\n\n--- test_suite/tests.source.orig\t2017-09-30 07:43:05.000000000 +0000\n+++ test_suite/tests.source\n@@ -31,7 +31,9 @@ get_temp_dir() {\n if [ -z \"$TMP_DIR\" ]; then\n # We use Python to avoid portability problems with `mktemp`.\n # See: https://unix.stackexchange.com/questions/30091/fix-or-alternative-for-mktemp-in-os-x\n- TMP_DIR=\"`python2 -c \"import tempfile; print(tempfile.mkdtemp(prefix='jsonnet_'))\"`\"\n+ #TMP_DIR=\"`python2 -c \"import tempfile; print(tempfile.mkdtemp(prefix='jsonnet_'))\"`\"\n+\t: ${MKTEMP=mktemp}\n+ TMP_DIR=\"$(${MKTEMP} -d ${TMPDIR-/tmp}/jsonnet_${0##*/}.XXXXXX)\"\n $($VERBOSE) && echo \"Created temporary directory $TMP_DIR\"\n fi\n }\n"} +{"text": "/*************************************************************************\n * Copyright 2009-2014 Ent. Services Development Corporation LP\n *\n * Redistribution and use of this software in source and binary forms,\n * with or without modification, are permitted provided that the\n * following conditions are met:\n *\n * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n *\n * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer\n * in the documentation and/or other materials provided with the\n * distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\n * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n ************************************************************************/\npackage com.eucalyptus.compute.vpc;\n\n/**\n *\n */\npublic interface VpcInvalidator {\n\n void invalidate( String resourceIdentifier );\n}\n"} +{"text": "/*\n * Copyright 2020 the original author or authors.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.gradle.internal.snapshot.impl;\n\nimport org.gradle.internal.hash.HashCode;\nimport org.gradle.internal.snapshot.CompleteFileSystemLocationSnapshot;\nimport org.gradle.internal.snapshot.Snapshot;\nimport org.gradle.internal.snapshot.SnapshottingService;\nimport org.gradle.internal.vfs.FileSystemAccess;\n\nimport javax.inject.Inject;\nimport java.nio.file.Path;\n\nimport static java.lang.String.format;\n\npublic class DefaultSnapshottingService implements SnapshottingService {\n\n private final FileSystemAccess fileSystemAccess;\n\n @Inject\n public DefaultSnapshottingService(FileSystemAccess fileSystemAccess) {\n this.fileSystemAccess = fileSystemAccess;\n }\n\n @Override\n public Snapshot snapshotFor(Path filePath) {\n String absolutePath = filePath.toAbsolutePath().toString();\n HashCode hash = fileSystemAccess.read(absolutePath, CompleteFileSystemLocationSnapshot::getHash);\n\n return new DefaultSnapshot(hash);\n }\n\n private static class DefaultSnapshot implements Snapshot {\n\n private final HashCode hashCode;\n\n public DefaultSnapshot(HashCode hashCode) {\n this.hashCode = hashCode;\n }\n\n @Override\n public String getHashValue() {\n return hashCode.toString();\n }\n\n @Override\n public String toString() {\n return format(\"DefaultSnapshot { hashValue='%s' }\", getHashValue());\n }\n }\n}\n"} +{"text": "PREHOOK: query: create table external1 (col1 int, col2 string)\nPREHOOK: type: CREATETABLE\nPREHOOK: Output: database:default\nPREHOOK: Output: default@external1\nPOSTHOOK: query: create table external1 (col1 int, col2 string)\nPOSTHOOK: type: CREATETABLE\nPOSTHOOK: Output: database:default\nPOSTHOOK: Output: default@external1\nPREHOOK: query: alter table external1 set tblproperties ('EXTERNAL'='TRUE')\nPREHOOK: type: ALTERTABLE_PROPERTIES\nPREHOOK: Input: default@external1\nPREHOOK: Output: default@external1\nPOSTHOOK: query: alter table external1 set tblproperties ('EXTERNAL'='TRUE')\nPOSTHOOK: type: ALTERTABLE_PROPERTIES\nPOSTHOOK: Input: default@external1\nPOSTHOOK: Output: default@external1\nFAILED: SemanticException [Error 10146]: Cannot truncate non-managed table external1.\n"} +{"text": "using System;\nusing System.Buffers;\n\nnamespace Ray.Core.Utils\n{\n public class SharedArray : IDisposable\n {\n private readonly byte[] Buffer;\n\n public SharedArray(int length)\n {\n this.Buffer = ArrayPool<byte>.Shared.Rent((length / 4096 + 1) * 4096);\n this.Length = length;\n }\n\n public int Length { get; }\n\n public Span<byte> AsSpan() => this.Buffer.AsSpan().Slice(0, this.Length);\n\n public static SharedArray Rent(int length)\n {\n return new SharedArray(length);\n }\n\n public void Dispose()\n {\n ArrayPool<byte>.Shared.Return(this.Buffer);\n }\n }\n}\n"} +{"text": "/*\n * uDig - User Friendly Desktop Internet GIS client\n * http://udig.refractions.net\n * (C) 2005, Refractions Research Inc.\n *\n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * (http://www.eclipse.org/legal/epl-v10.html), and the Refractions BSD\n * License v1.0 (http://udig.refractions.net/files/bsd3-v10.html).\n *\n */\npackage org.locationtech.udig.catalog.internal.db2;\n\nimport java.io.Serializable;\nimport java.net.URL;\nimport java.util.HashMap;\nimport java.util.Iterator;\nimport java.util.Map;\n\nimport org.locationtech.udig.catalog.AbstractDataStoreServiceExtension;\nimport org.locationtech.udig.catalog.IService;\nimport org.locationtech.udig.catalog.ServiceExtension;\nimport org.locationtech.udig.catalog.db2.DB2Plugin;\nimport org.locationtech.udig.catalog.db2.internal.Messages;\n\nimport org.eclipse.core.runtime.Platform;\nimport org.geotools.data.DataAccessFactory;\nimport org.geotools.data.DataAccessFinder;\nimport org.geotools.data.DataStoreFactorySpi;\nimport org.geotools.data.db2.DB2NGJNDIDataStoreFactory;\nimport org.geotools.data.db2.DB2NGDataStoreFactory;\nimport static org.geotools.data.db2.DB2NGDataStoreFactory.*;\n/**\n * DB2 service extension implementation.\n * \n * @author Justin Deoliveira,Refractions Research Inc.,jdeolive@refractions.net\n * @author David Adler, Adtech Geospatial,dadler@adtechgeospatial.com\n * @since 1.0.1\n */\npublic class DB2ServiceExtension extends AbstractDataStoreServiceExtension implements ServiceExtension {\n private static DB2NGDataStoreFactory factory = null;\n private static boolean available = true;\n \n /**\n * Factory describing connection parameters.\n * @return factory describing DB2 connection parameters\n */\n // We want to use a DB2NGDataStoreFactory but this is not in the list of DataStores\n // DB2NGJNDIDataStoreFactory is returned so if we find this,\n // create a DB2NGDataStoreFactory\n public synchronized static DB2NGDataStoreFactory getFactory() {\n if (available && factory == null ) {\n \tIterator<DataAccessFactory> dataStores = DataAccessFinder.getAvailableDataStores();\n \twhile( dataStores.hasNext() ){\n \t\tDataAccessFactory access = dataStores.next();\n \t\tif( access instanceof DB2NGJNDIDataStoreFactory){\n // \t\t\tfactory = (DB2NGJNDIDataStoreFactory) access;\n \t\t factory = new DB2NGDataStoreFactory();\n \t\t\tbreak;\n \t\t}\n \t}\n \tif( factory == null ){\n \t\tavailable = false; // not available! oh no! \t\t\n \t}\n }\n return factory;\n }\n\n public IService createService( URL id, Map<String, Serializable> params ) {\n \n try {\n if( getFactory() == null || !getFactory().isAvailable() ){\n return null; // factory not available\n }\n if (!getFactory().canProcess(params)) {\n return null; // the factory cannot use these parameters\n }\n } catch (Exception unexpected) {\n if (Platform.inDevelopmentMode()) {\n // this should never happen\n DB2Plugin.log(\"DB2ServiceExtension.canProcess failed out with: \" //$NON-NLS-1$\n + unexpected, unexpected);\n }\n return null; // the factory cannot really use these parameters\n }\n \n // generate an id if needed (this is only required the first time)\n if (id == null) {\n id = paramsToUrl(params);\n }\n if (id == null) {\n return null; // should we actually throw an exception?\n } \n return new DB2Service(id, params);\n }\n\n /**\n * Returns the database parameter values as a pseudo-URL.\n * <p>\n * This appears to be used to create an ID.\n * </p>\n * \n * @param params\n * @return a pseudo-URL value\n */\n protected URL paramsToUrl(Map<String, Serializable> params) {\n URL dbUrl = null; \n try {\n Object host = DB2NGJNDIDataStoreFactory.HOST.lookUp( params );\n Object port = DB2NGJNDIDataStoreFactory.PORT.lookUp( params );\n Object db = DB2NGJNDIDataStoreFactory.DATABASE.lookUp( params );\n \n dbUrl = new URL(\"http://\" + host + \".db2.jdbc:\" + port + \"/\" + db); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n } catch (Exception e) {\n if( Platform.inDevelopmentMode()){\n e.printStackTrace();\n }\n }\n return dbUrl;\n }\n\n public Map<String,Serializable> createParams( URL url ) {\n if (!isDB2URL(url)) {\n return null;\n } \n ParamInfo info = parseParamInfo(url);\n \n Map<String,Serializable> params = new HashMap<String,Serializable>();\n params.put(DBTYPE.key, (Serializable)DBTYPE.sample); // dbtype \n params.put(HOST.key,info.host); // host\n params.put(PORT.key,info.the_port); // port\n params.put(DATABASE.key,info.the_database); // database\n params.put(USER.key,info.username); // user\n params.put(PASSWD.key,info.password); // pass\n \n return params;\n }\n /** A couple quick checks on the url \n * @param url \n * @return true if this is a DB2 URL\n * */ \n private static final boolean isDB2URL( URL url ){\n if (url == null )\n return false;\n return url.getProtocol().toLowerCase().equals(\"db2\") || url.getProtocol().toLowerCase().equals(\"db2.jdbc\") || //$NON-NLS-1$ //$NON-NLS-2$ \n url.getProtocol().toLowerCase().equals(\"jdbc.db2\"); //$NON-NLS-1$\n }\n\n public String reasonForFailure( URL url ) {\n if(url==null)\n return Messages.DB2ServiceExtension_nullURL;\n if (!isDB2URL(url))\n return Messages.DB2ServiceExtension_notDB2URL;\n return reasonForFailure(createParams(url));\n }\n\n @Override\n protected DataStoreFactorySpi getDataStoreFactory() {\n return getFactory();\n }\n}\n"} +{"text": "<component name=\"libraryTable\">\n <library name=\"Maven: javax.xml.bind:jaxb-api:2.2.2\">\n <CLASSES>\n <root url=\"jar://$PROJECT_DIR$/../../../Maven/Maven_repository/javax/xml/bind/jaxb-api/2.2.2/jaxb-api-2.2.2.jar!/\" />\n </CLASSES>\n <JAVADOC>\n <root url=\"jar://$PROJECT_DIR$/../../../Maven/Maven_repository/javax/xml/bind/jaxb-api/2.2.2/jaxb-api-2.2.2-javadoc.jar!/\" />\n </JAVADOC>\n <SOURCES>\n <root url=\"jar://$PROJECT_DIR$/../../../Maven/Maven_repository/javax/xml/bind/jaxb-api/2.2.2/jaxb-api-2.2.2-sources.jar!/\" />\n </SOURCES>\n </library>\n</component>"} +{"text": "(function profileMethodCall(root) {\n 'use strict';\n\n var name = 'primesApp';\n var methodName = 'findFirstPrimes';\n\n var object = root[name];\n console.assert(object, 'cannot find object ' + name + ' to profile');\n\n var originalMethod = object[methodName];\n console.assert(typeof originalMethod === 'function', 'cannot find method ' + methodName);\n\n object[methodName] = function () {\n console.profile(methodName);\n originalMethod.call(object);\n console.profileEnd(methodName);\n\n object[methodName] = originalMethod;\n console.log('restored the original method call');\n };\n console.log('wrapped', name + '.' + methodName + ' in profiling calls');\n}(this));\n"} +{"text": "/* ============================================================\n* Falkon - Qt web browser\n* Copyright (C) 2017 David Rosca <nowrep@gmail.com>\n*\n* This program is free software: you can redistribute it and/or modify\n* it under the terms of the GNU General Public License as published by\n* the Free Software Foundation, either version 3 of the License, or\n* (at your option) any later version.\n*\n* This program is distributed in the hope that it will be useful,\n* but WITHOUT ANY WARRANTY; without even the implied warranty of\n* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n* GNU General Public License for more details.\n*\n* You should have received a copy of the GNU General Public License\n* along with this program. If not, see <http://www.gnu.org/licenses/>.\n* ============================================================ */\n#ifndef SESSIONMANAGERDIALOG_H\n#define SESSIONMANAGERDIALOG_H\n\n#include <QDialog>\n\nnamespace Ui {\nclass SessionManagerDialog;\n}\n\nclass QTreeWidgetItem;\n\nclass SessionManagerDialog : public QDialog\n{\n Q_OBJECT\n\npublic:\n explicit SessionManagerDialog(QWidget *parent = 0);\n ~SessionManagerDialog();\n\nprivate:\n enum Roles {\n SessionFileRole = Qt::UserRole + 10,\n IsBackupSessionRole,\n IsActiveSessionRole,\n IsDefaultSessionRole\n };\n\n void newSession();\n void renameSession();\n void cloneSession();\n void deleteSession();\n void switchToSession();\n\n void refresh();\n void updateButtons();\n void updateItem(QTreeWidgetItem *item);\n\n void showEvent(QShowEvent *e) override;\n void resizeEvent(QResizeEvent *e) override;\n void resizeViewHeader();\n\n Ui::SessionManagerDialog *ui;\n};\n\n#endif // SESSIONMANAGERDIALOG_H\n"} +{"text": "#include \"../../../tools/assistant/lib/qhelpdbreader_p.h\"\n"} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n ~ Copyright (c) 2020.\n ~ Microsoft Corporation. All rights reserved.\n -->\n\n<selector xmlns:android=\"http://schemas.android.com/apk/res/android\">\n <item android:drawable=\"@drawable/ic_fluent_presenter_off_24_filled\" android:state_activated=\"true\"/>\n <item android:drawable=\"@drawable/ic_fluent_presenter_off_24_filled\" android:state_checked=\"true\"/>\n <item android:drawable=\"@drawable/ic_fluent_presenter_off_24_filled\" android:state_selected=\"true\"/>\n <item android:drawable=\"@drawable/ic_fluent_presenter_off_24_regular\"/>\n</selector>\n"} +{"text": "// See the file \"COPYING\" in the main distribution directory for copyright.\n\n#include <sys/stat.h>\n#include <errno.h>\n\n#include \"Dumper.h\"\n#include \"../PktSrc.h\"\n#include \"../../RunState.h\"\n\n#include \"pcap.bif.h\"\n\nnamespace zeek::iosource::pcap {\n\nPcapDumper::PcapDumper(const std::string& path, bool arg_append)\n\t{\n\tappend = arg_append;\n\tprops.path = path;\n\tdumper = nullptr;\n\tpd = nullptr;\n\t}\n\nPcapDumper::~PcapDumper()\n\t{\n\t}\n\nvoid PcapDumper::Open()\n\t{\n\tint linktype = -1;\n\n\tpd = pcap_open_dead(DLT_EN10MB, BifConst::Pcap::snaplen);\n\n\tif ( ! pd )\n\t\t{\n\t\tError(\"error for pcap_open_dead\");\n\t\treturn;\n\t\t}\n\n\tif ( props.path.empty() )\n\t\t{\n\t\tError(\"no filename given\");\n\t\treturn;\n\t\t}\n\n\tstruct stat s;\n\tint exists = 0;\n\n\tif ( append )\n\t\t{\n\t\t// See if output file already exists (and is non-empty).\n\t\texists = stat(props.path.c_str(), &s);\n\n\t\tif ( exists < 0 && errno != ENOENT )\n\t\t\t{\n\t\t\tError(util::fmt(\"can't stat file %s: %s\", props.path.c_str(), strerror(errno)));\n\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\tif ( ! append || exists < 0 || s.st_size == 0 )\n\t\t{\n\t\t// Open new file.\n\t\tdumper = pcap_dump_open(pd, props.path.c_str());\n\t\tif ( ! dumper )\n\t\t\t{\n\t\t\tError(pcap_geterr(pd));\n\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\telse\n\t\t{\n\t\t// Old file and we need to append, which, unfortunately,\n\t\t// is not supported by libpcap. So, we have to hack a\n\t\t// little bit, knowing that pcap_dumpter_t is, in fact,\n\t\t// a FILE ... :-(\n\t\tdumper = (pcap_dumper_t*) fopen(props.path.c_str(), \"a\");\n\t\tif ( ! dumper )\n\t\t\t{\n\t\t\tError(util::fmt(\"can't open dump %s: %s\", props.path.c_str(), strerror(errno)));\n\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\tprops.open_time = run_state::network_time;\n\tOpened(props);\n\t}\n\nvoid PcapDumper::Close()\n\t{\n\tif ( ! dumper )\n\t\treturn;\n\n\tpcap_dump_close(dumper);\n\tpcap_close(pd);\n\tdumper = nullptr;\n\tpd = nullptr;\n\n\tClosed();\n\t}\n\nbool PcapDumper::Dump(const Packet* pkt)\n\t{\n\tif ( ! dumper )\n\t\treturn false;\n\n\t// Reconstitute the pcap_pkthdr.\n\tconst struct pcap_pkthdr phdr = {\n\t\t.ts = pkt->ts, .caplen = pkt->cap_len, .len = pkt->len\n\t};\n\n\tpcap_dump((u_char*) dumper, &phdr, pkt->data);\n\treturn true;\n\t}\n\niosource::PktDumper* PcapDumper::Instantiate(const std::string& path, bool append)\n\t{\n\treturn new PcapDumper(path, append);\n\t}\n\n} // namespace zeek::iosource::pcap\n"} +{"text": "// Code generated by protoc-gen-go. DO NOT EDIT.\n// source: google/protobuf/duration.proto\n\n/*\nPackage duration is a generated protocol buffer package.\n\nIt is generated from these files:\n\tgoogle/protobuf/duration.proto\n\nIt has these top-level messages:\n\tDuration\n*/\npackage duration\n\nimport proto \"github.com/golang/protobuf/proto\"\nimport fmt \"fmt\"\nimport math \"math\"\n\n// Reference imports to suppress errors if they are not otherwise used.\nvar _ = proto.Marshal\nvar _ = fmt.Errorf\nvar _ = math.Inf\n\n// This is a compile-time assertion to ensure that this generated file\n// is compatible with the proto package it is being compiled against.\n// A compilation error at this line likely means your copy of the\n// proto package needs to be updated.\nconst _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package\n\n// A Duration represents a signed, fixed-length span of time represented\n// as a count of seconds and fractions of seconds at nanosecond\n// resolution. It is independent of any calendar and concepts like \"day\"\n// or \"month\". It is related to Timestamp in that the difference between\n// two Timestamp values is a Duration and it can be added or subtracted\n// from a Timestamp. Range is approximately +-10,000 years.\n//\n// # Examples\n//\n// Example 1: Compute Duration from two Timestamps in pseudo code.\n//\n// Timestamp start = ...;\n// Timestamp end = ...;\n// Duration duration = ...;\n//\n// duration.seconds = end.seconds - start.seconds;\n// duration.nanos = end.nanos - start.nanos;\n//\n// if (duration.seconds < 0 && duration.nanos > 0) {\n// duration.seconds += 1;\n// duration.nanos -= 1000000000;\n// } else if (durations.seconds > 0 && duration.nanos < 0) {\n// duration.seconds -= 1;\n// duration.nanos += 1000000000;\n// }\n//\n// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.\n//\n// Timestamp start = ...;\n// Duration duration = ...;\n// Timestamp end = ...;\n//\n// end.seconds = start.seconds + duration.seconds;\n// end.nanos = start.nanos + duration.nanos;\n//\n// if (end.nanos < 0) {\n// end.seconds -= 1;\n// end.nanos += 1000000000;\n// } else if (end.nanos >= 1000000000) {\n// end.seconds += 1;\n// end.nanos -= 1000000000;\n// }\n//\n// Example 3: Compute Duration from datetime.timedelta in Python.\n//\n// td = datetime.timedelta(days=3, minutes=10)\n// duration = Duration()\n// duration.FromTimedelta(td)\n//\n// # JSON Mapping\n//\n// In JSON format, the Duration type is encoded as a string rather than an\n// object, where the string ends in the suffix \"s\" (indicating seconds) and\n// is preceded by the number of seconds, with nanoseconds expressed as\n// fractional seconds. For example, 3 seconds with 0 nanoseconds should be\n// encoded in JSON format as \"3s\", while 3 seconds and 1 nanosecond should\n// be expressed in JSON format as \"3.000000001s\", and 3 seconds and 1\n// microsecond should be expressed in JSON format as \"3.000001s\".\n//\n//\ntype Duration struct {\n\t// Signed seconds of the span of time. Must be from -315,576,000,000\n\t// to +315,576,000,000 inclusive. Note: these bounds are computed from:\n\t// 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years\n\tSeconds int64 `protobuf:\"varint,1,opt,name=seconds\" json:\"seconds,omitempty\"`\n\t// Signed fractions of a second at nanosecond resolution of the span\n\t// of time. Durations less than one second are represented with a 0\n\t// `seconds` field and a positive or negative `nanos` field. For durations\n\t// of one second or more, a non-zero value for the `nanos` field must be\n\t// of the same sign as the `seconds` field. Must be from -999,999,999\n\t// to +999,999,999 inclusive.\n\tNanos int32 `protobuf:\"varint,2,opt,name=nanos\" json:\"nanos,omitempty\"`\n}\n\nfunc (m *Duration) Reset() { *m = Duration{} }\nfunc (m *Duration) String() string { return proto.CompactTextString(m) }\nfunc (*Duration) ProtoMessage() {}\nfunc (*Duration) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }\nfunc (*Duration) XXX_WellKnownType() string { return \"Duration\" }\n\nfunc (m *Duration) GetSeconds() int64 {\n\tif m != nil {\n\t\treturn m.Seconds\n\t}\n\treturn 0\n}\n\nfunc (m *Duration) GetNanos() int32 {\n\tif m != nil {\n\t\treturn m.Nanos\n\t}\n\treturn 0\n}\n\nfunc init() {\n\tproto.RegisterType((*Duration)(nil), \"google.protobuf.Duration\")\n}\n\nfunc init() { proto.RegisterFile(\"google/protobuf/duration.proto\", fileDescriptor0) }\n\nvar fileDescriptor0 = []byte{\n\t// 190 bytes of a gzipped FileDescriptorProto\n\t0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f,\n\t0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0x29, 0x2d, 0x4a,\n\t0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x03, 0x8b, 0x08, 0xf1, 0x43, 0xe4, 0xf5, 0x60, 0xf2, 0x4a, 0x56,\n\t0x5c, 0x1c, 0x2e, 0x50, 0x25, 0x42, 0x12, 0x5c, 0xec, 0xc5, 0xa9, 0xc9, 0xf9, 0x79, 0x29, 0xc5,\n\t0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0x30, 0xae, 0x90, 0x08, 0x17, 0x6b, 0x5e, 0x62, 0x5e,\n\t0x7e, 0xb1, 0x04, 0x93, 0x02, 0xa3, 0x06, 0x6b, 0x10, 0x84, 0xe3, 0x54, 0xc3, 0x25, 0x9c, 0x9c,\n\t0x9f, 0xab, 0x87, 0x66, 0xa4, 0x13, 0x2f, 0xcc, 0xc0, 0x00, 0x90, 0x48, 0x00, 0x63, 0x94, 0x56,\n\t0x7a, 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x7e, 0x7a, 0x7e, 0x4e, 0x62, 0x5e,\n\t0x3a, 0xc2, 0x7d, 0x05, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x70, 0x67, 0xfe, 0x60, 0x64, 0x5c, 0xc4,\n\t0xc4, 0xec, 0x1e, 0xe0, 0xb4, 0x8a, 0x49, 0xce, 0x1d, 0x62, 0x6e, 0x00, 0x54, 0xa9, 0x5e, 0x78,\n\t0x6a, 0x4e, 0x8e, 0x77, 0x5e, 0x7e, 0x79, 0x5e, 0x08, 0x48, 0x4b, 0x12, 0x1b, 0xd8, 0x0c, 0x63,\n\t0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xdc, 0x84, 0x30, 0xff, 0xf3, 0x00, 0x00, 0x00,\n}\n"} +{"text": "<!DOCTYPE html>\n<html>\n<head>\n <title>Set tooltip HTML content</title>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <link href=\"themes/2/tooltip.css\" rel=\"stylesheet\" type=\"text/css\" />\n <script src=\"themes/2/tooltip.js\" type=\"text/javascript\"></script>\n <style type=\"text/css\">\n body {background-color:#F9F9F9;}\n h3 { font: normal 20px/30px Arial;}\n h4 { font-family: \"Trebuchet MS\", Verdana; } \n #span4 img {cursor:pointer;margin:20px;} \n </style>\n <script type=\"text/javascript\">\n //don't copy the below script into your page.\n if (!document.domain) alert(\"The Ajax will not work if opening the page by local path instead of through HTTP on a web or localhost server\"); \n </script>\n</head>\n<body>\n <div style=\"margin: 100px auto; width: 600px;\"> \n <p><a href=\"demo1.html\">demo1</a> &nbsp; demo2 &nbsp; <a href=\"demo3.html\">demo3</a> &nbsp; <a href=\"demo4.html\">demo4</a></p>\n <h3>Populate tooltip with external document content via Ajax</h3>\n <p>tooltip.ajax(targetElement, url[, ajaxSettings][, options])</p>\n <p><a class=\"tooltip\" href=\"src/tooltip-ajax.html\" onmouseover=\"tooltip.ajax(this, 'src/tooltip-ajax.html');\" onclick=\"return false;\">triggered by hijax link</a></p>\n <p><a class=\"tooltip\" href=\"src/tooltip-ajax.html#div2\" onmouseover=\"tooltip.ajax(this, 'src/tooltip-ajax.html#div2');\" onclick=\"return false;\">load page fragment</a></p>\n <p>&nbsp;</p>\n <p>The demo below shows how tooltip is populated from an external XML document:</p>\n <span id=\"span4\">\n <img src=\"src/tooltips-cd1.jpg\" onmouseover=\"myAjaxSetting.context.index = 1; tooltip.ajax(this, 'src/products.xml', myAjaxSetting, {position:0});\" alt=\"\" />\n <img src=\"src/tooltips-cd2.jpg\" onmouseover=\"myAjaxSetting.context.index = 2; tooltip.ajax(this, 'src/products.xml', myAjaxSetting, {position:0});\" alt=\"\" />\n <img src=\"src/tooltips-cd3.jpg\" onmouseover=\"myAjaxSetting.context.index = 3; tooltip.ajax(this, 'src/products.xml', myAjaxSetting, {position:0});\" alt=\"\" />\n <img src=\"src/tooltips-cd4.jpg\" onmouseover=\"myAjaxSetting.context.index = 4; tooltip.ajax(this, 'src/products.xml', myAjaxSetting, {position:0});\" alt=\"\" />\n </span> \n </div>\n <script type=\"text/javascript\">\n\n var myAjaxSetting = {\n context: { index: -1 },\n success: myCallback,\n responseType: \"xml\"\n };\n\n function myCallback(response, context) {\n var x = response.documentElement.getElementsByTagName(\"cd\")[context.index];\n var title = x.getElementsByTagName(\"title\")[0].childNodes[0].nodeValue;\n var artist = x.getElementsByTagName(\"artist\")[0].childNodes[0].nodeValue;\n var price = x.getElementsByTagName(\"price\")[0].childNodes[0].nodeValue;\n var image = \"<img src='src/tooltips-cd\" + context.index + \".jpg' style='float:right;margin-left:12px;width:75px;height:75px;' />\";\n return \"<div style='width:220px;'>\" + image + \"<b>\" + title + \"</b><br /><i>\" + artist + \"</i><br /><br />Price: <span class='red'>$\" + price + \"</span></div>\";\n } \n\n </script>\n</body>\n</html>\n"} +{"text": "\"\"\"\nGenerate data used in the HDF5DataLayer and GradientBasedSolver tests.\n\"\"\"\nimport os\nimport numpy as np\nimport h5py\n\nscript_dir = os.path.dirname(os.path.abspath(__file__))\n\n# Generate HDF5DataLayer sample_data.h5\n\nnum_cols = 8\nnum_rows = 10\nheight = 6\nwidth = 5\ntotal_size = num_cols * num_rows * height * width\n\ndata = np.arange(total_size)\ndata = data.reshape(num_rows, num_cols, height, width)\ndata = data.astype('float32')\n\n# We had a bug where data was copied into label, but the tests weren't\n# catching it, so let's make label 1-indexed.\nlabel = 1 + np.arange(num_rows)[:, np.newaxis]\nlabel = label.astype('float32')\n\n# We add an extra label2 dataset to test HDF5 layer's ability\n# to handle arbitrary number of output (\"top\") Blobs.\nlabel2 = label + 1\n\nprint data\nprint label\n\nwith h5py.File(script_dir + '/sample_data.h5', 'w') as f:\n f['data'] = data\n f['label'] = label\n f['label2'] = label2\n\nwith h5py.File(script_dir + '/sample_data_2_gzip.h5', 'w') as f:\n f.create_dataset(\n 'data', data=data + total_size,\n compression='gzip', compression_opts=1\n )\n f.create_dataset(\n 'label', data=label,\n compression='gzip', compression_opts=1,\n dtype='uint8',\n )\n f.create_dataset(\n 'label2', data=label2,\n compression='gzip', compression_opts=1,\n dtype='uint8',\n )\n\nwith open(script_dir + '/sample_data_list.txt', 'w') as f:\n f.write('src/caffe/test/test_data/sample_data.h5\\n')\n f.write('src/caffe/test/test_data/sample_data_2_gzip.h5\\n')\n\n# Generate GradientBasedSolver solver_data.h5\n\nnum_cols = 3\nnum_rows = 8\nheight = 10\nwidth = 10\n\ndata = np.random.randn(num_rows, num_cols, height, width)\ndata = data.reshape(num_rows, num_cols, height, width)\ndata = data.astype('float32')\n\ntargets = np.random.randn(num_rows, 1)\ntargets = targets.astype('float32')\n\nprint data\nprint targets\n\nwith h5py.File(script_dir + '/solver_data.h5', 'w') as f:\n f['data'] = data\n f['targets'] = targets\n\nwith open(script_dir + '/solver_data_list.txt', 'w') as f:\n f.write('src/caffe/test/test_data/solver_data.h5\\n')\n"} +{"text": "// Software License Agreement (BSD License)\n//\n// Copyright (c) 2010-2015, Deusty, LLC\n// All rights reserved.\n//\n// Redistribution and use of this software in source and binary forms,\n// with or without modification, are permitted provided that the following conditions are met:\n//\n// * Redistributions of source code must retain the above copyright notice,\n// this list of conditions and the following disclaimer.\n//\n// * Neither the name of Deusty nor the names of its contributors may be used\n// to endorse or promote products derived from this software without specific\n// prior written permission of Deusty, LLC.\n\n/**\n * Legacy macros used for 1.9.x backwards compatibility.\n *\n * Imported by default when importing a DDLog.h directly and DD_LEGACY_MACROS is not defined and set to 0.\n **/\n#if DD_LEGACY_MACROS\n\n#warning CocoaLumberjack 1.9.x legacy macros enabled. \\\nDisable legacy macros by importing CocoaLumberjack.h or DDLogMacros.h instead of DDLog.h or add `#define DD_LEGACY_MACROS 0` before importing DDLog.h.\n\n#ifndef LOG_LEVEL_DEF\n #define LOG_LEVEL_DEF ddLogLevel\n#endif\n\n#define LOG_FLAG_ERROR DDLogFlagError\n#define LOG_FLAG_WARN DDLogFlagWarning\n#define LOG_FLAG_INFO DDLogFlagInfo\n#define LOG_FLAG_DEBUG DDLogFlagDebug\n#define LOG_FLAG_VERBOSE DDLogFlagVerbose\n\n#define LOG_LEVEL_OFF DDLogLevelOff\n#define LOG_LEVEL_ERROR DDLogLevelError\n#define LOG_LEVEL_WARN DDLogLevelWarning\n#define LOG_LEVEL_INFO DDLogLevelInfo\n#define LOG_LEVEL_DEBUG DDLogLevelDebug\n#define LOG_LEVEL_VERBOSE DDLogLevelVerbose\n#define LOG_LEVEL_ALL DDLogLevelAll\n\n#define LOG_ASYNC_ENABLED YES\n\n#define LOG_ASYNC_ERROR ( NO && LOG_ASYNC_ENABLED)\n#define LOG_ASYNC_WARN (YES && LOG_ASYNC_ENABLED)\n#define LOG_ASYNC_INFO (YES && LOG_ASYNC_ENABLED)\n#define LOG_ASYNC_DEBUG (YES && LOG_ASYNC_ENABLED)\n#define LOG_ASYNC_VERBOSE (YES && LOG_ASYNC_ENABLED)\n\n#define LOG_MACRO(isAsynchronous, lvl, flg, ctx, atag, fnct, frmt, ...) \\\n [DDLog log : isAsynchronous \\\n level : lvl \\\n flag : flg \\\n context : ctx \\\n file : __FILE__ \\\n function : fnct \\\n line : __LINE__ \\\n tag : atag \\\n format : (frmt), ## __VA_ARGS__]\n\n#define LOG_MAYBE(async, lvl, flg, ctx, fnct, frmt, ...) \\\n do { if(lvl & flg) LOG_MACRO(async, lvl, flg, ctx, nil, fnct, frmt, ##__VA_ARGS__); } while(0)\n\n#define LOG_OBJC_MAYBE(async, lvl, flg, ctx, frmt, ...) \\\n LOG_MAYBE(async, lvl, flg, ctx, __PRETTY_FUNCTION__, frmt, ## __VA_ARGS__)\n\n#define DDLogError(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_ERROR, LOG_LEVEL_DEF, LOG_FLAG_ERROR, 0, frmt, ##__VA_ARGS__)\n#define DDLogWarn(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_WARN, LOG_LEVEL_DEF, LOG_FLAG_WARN, 0, frmt, ##__VA_ARGS__)\n#define DDLogInfo(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_INFO, LOG_LEVEL_DEF, LOG_FLAG_INFO, 0, frmt, ##__VA_ARGS__)\n#define DDLogDebug(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_DEBUG, LOG_LEVEL_DEF, LOG_FLAG_DEBUG, 0, frmt, ##__VA_ARGS__)\n#define DDLogVerbose(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_VERBOSE, LOG_LEVEL_DEF, LOG_FLAG_VERBOSE, 0, frmt, ##__VA_ARGS__)\n\n#endif\n"} +{"text": "import { nth } from \"./index\";\nexport = nth;\n"} +{"text": ".so man3/xdr.3\n"} +{"text": "{\n \"division\": \"OmniWeb #MAJORVER#.#MINORVER#\",\n \"versions\": [\"5.9\"],\n \"sortIndex\": 2686,\n \"lite\": false,\n \"standard\": true,\n \"userAgents\": [\n {\n \"userAgent\": \"OmniWeb #MAJORVER#.#MINORVER#\",\n \"browser\": \"omniweb\",\n \"platform\": \"OSX\",\n \"engine\": \"WebKit\",\n \"device\": \"Macintosh\",\n \"properties\": {\n \"Parent\": \"DefaultProperties\",\n \"Comment\": \"OmniWeb #MAJORVER#.#MINORVER#\",\n \"Version\": \"#MAJORVER#.#MINORVER#\"\n },\n \"children\": [\n {\n \"match\": \"Mozilla/5.0 (#PLATFORM#) applewebkit* (*khtml*like*gecko,*safari*) *OmniWeb/v622.*\",\n \"platforms\": [\n \"OSX\"\n ]\n }\n ]\n }\n ]\n}\n"} +{"text": ".class Lcom/google/android/gms/tagmanager/t;\n.super Ljava/lang/Object;\n\n\n# direct methods\n.method public static a()I\n .locals 2\n\n :try_start_0\n sget-object v0, Landroid/os/Build$VERSION;->SDK:Ljava/lang/String;\n\n invoke-static {v0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I\n :try_end_0\n .catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0\n\n move-result v0\n\n :goto_0\n return v0\n\n :catch_0\n move-exception v0\n\n new-instance v0, Ljava/lang/StringBuilder;\n\n invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V\n\n const-string/jumbo v1, \"Invalid version number: \"\n\n invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;\n\n move-result-object v0\n\n sget-object v1, Landroid/os/Build$VERSION;->SDK:Ljava/lang/String;\n\n invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;\n\n move-result-object v0\n\n invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;\n\n move-result-object v0\n\n invoke-static {v0}, Lcom/google/android/gms/tagmanager/y;->a(Ljava/lang/String;)V\n\n const/4 v0, 0x0\n\n goto :goto_0\n.end method\n"} +{"text": "require('../../modules/js.array.statics');\nmodule.exports = require('../../modules/$.core').Array.some;"} +{"text": "hmily:\n server:\n configMode: local\n appName: order-dubbo\n # 如果server.configMode eq local 的时候才会读取到这里的配置信息.\n config:\n appName: order-dubbo\n serializer: kryo\n contextTransmittalMode: threadLocal\n scheduledThreadMax: 16\n scheduledRecoveryDelay: 60\n scheduledCleanDelay: 60\n scheduledPhyDeletedDelay: 600\n scheduledInitDelay: 30\n recoverDelayTime: 60\n cleanDelayTime: 180\n limit: 200\n retryMax: 10\n bufferSize: 8192\n consumerThreads: 16\n asyncRepository: true\n autoSql: true\n phyDeleted: true\n storeDays: 3\n repository: mysql\n\nrepository:\n database:\n driverClassName: com.mysql.jdbc.Driver\n url : jdbc:mysql://127.0.0.1:3306/hmily?useUnicode=true&characterEncoding=utf8\n username: root\n password:\n maxActive: 20\n minIdle: 10\n connectionTimeout: 30000\n idleTimeout: 600000\n maxLifetime: 1800000\n file:\n path: D:\\hmilyLog\n prefix: /hmily\n mongo:\n databaseName:\n url:\n userName:\n password:\n zookeeper:\n host: localhost:2181\n sessionTimeOut: 1000000000\n rootPath: /hmily\n redis:\n cluster: false\n sentinel: false\n clusterUrl:\n sentinelUrl:\n masterName:\n hostName:\n port:\n password:\n maxTotal: 8\n maxIdle: 8\n minIdle: 2\n maxWaitMillis: -1\n minEvictableIdleTimeMillis: 1800000\n softMinEvictableIdleTimeMillis: 1800000\n numTestsPerEvictionRun: 3\n testOnCreate: false\n testOnBorrow: false\n testOnReturn: false\n testWhileIdle: false\n timeBetweenEvictionRunsMillis: -1\n blockWhenExhausted: true\n timeOut: 1000\n\nmetrics:\n metricsName: prometheus\n host:\n port: 9091\n async: true\n threadCount : 16\n jmxConfig:\n"} +{"text": "c This Formular is generated by mcnf\nc\nc horn? no \nc forced? no \nc mixed sat? no \nc clause length = 3 \nc\np cnf 50 218 \n -46 8 26 0\n-18 -43 46 0\n-19 -40 -50 0\n50 -24 46 0\n-18 2 4 0\n-19 12 16 0\n-4 28 16 0\n2 27 45 0\n-33 1 -48 0\n-36 34 45 0\n47 -39 -23 0\n-36 11 2 0\n-37 -45 -2 0\n-20 47 23 0\n33 48 9 0\n-18 -6 42 0\n15 24 35 0\n24 -46 -48 0\n50 3 40 0\n-37 33 2 0\n16 22 24 0\n32 -16 -36 0\n19 -5 40 0\n-10 30 25 0\n3 -39 8 0\n-23 49 -33 0\n-8 37 -48 0\n-38 -22 34 0\n49 -48 -43 0\n47 49 32 0\n15 25 -48 0\n29 7 28 0\n-10 31 41 0\n35 16 -46 0\n4 11 -21 0\n23 39 1 0\n-50 39 -28 0\n34 20 -18 0\n28 -40 3 0\n-12 1 -26 0\n19 -31 -28 0\n40 -50 -26 0\n4 -10 5 0\n8 -12 -1 0\n-24 -46 48 0\n38 46 -36 0\n-2 4 35 0\n12 -24 21 0\n-27 2 -17 0\n24 -35 46 0\n27 -20 -19 0\n-48 36 37 0\n44 -25 30 0\n-20 -18 -25 0\n-36 -19 20 0\n4 -16 22 0\n-6 26 43 0\n-49 2 30 0\n-2 36 -38 0\n-12 -7 -1 0\n34 41 -6 0\n12 19 9 0\n-9 -19 39 0\n38 -20 -47 0\n26 -47 30 0\n-41 25 47 0\n7 -16 13 0\n26 -1 10 0\n49 -4 -15 0\n-39 41 -23 0\n-37 -50 17 0\n41 44 40 0\n-24 -37 22 0\n2 47 10 0\n-9 -48 45 0\n-24 30 19 0\n13 3 50 0\n-24 30 -47 0\n2 -14 42 0\n16 39 -49 0\n-29 -43 -22 0\n3 -45 -37 0\n13 20 -21 0\n-4 -17 -48 0\n-47 43 -15 0\n37 -31 28 0\n-43 -31 -4 0\n20 -46 41 0\n9 -1 -22 0\n-50 21 -14 0\n-32 -4 -25 0\n32 -12 -37 0\n30 -41 -7 0\n45 4 43 0\n-15 7 41 0\n-25 33 -17 0\n33 5 10 0\n7 44 -45 0\n-5 9 -43 0\n17 38 7 0\n-21 40 -37 0\n-22 -16 -44 0\n48 -24 -42 0\n16 45 24 0\n-28 7 -31 0\n-5 12 -27 0\n26 23 -5 0\n16 12 -7 0\n-38 39 -12 0\n27 -15 16 0\n17 -48 31 0\n33 -21 23 0\n16 46 14 0\n11 5 46 0\n8 -30 18 0\n27 8 -2 0\n-26 -48 20 0\n5 -15 49 0\n24 48 21 0\n-23 28 -4 0\n-45 -28 3 0\n45 10 16 0\n18 -12 29 0\n32 3 -14 0\n-26 -46 12 0\n-24 -30 40 0\n43 -20 -34 0\n23 2 -4 0\n-18 49 35 0\n-16 27 -3 0\n-39 29 -19 0\n-3 47 -14 0\n-29 -28 50 0\n-14 -48 16 0\n6 45 -43 0\n48 -11 -26 0\n10 -42 -26 0\n22 -7 -9 0\n38 -2 36 0\n20 6 -10 0\n-9 -11 -43 0\n-14 37 24 0\n-21 31 -9 0\n18 -39 -48 0\n-19 11 3 0\n10 31 28 0\n33 29 -40 0\n8 39 -31 0\n13 -37 20 0\n8 -9 -21 0\n28 -46 -23 0\n-9 -30 -17 0\n-48 44 -24 0\n-9 -23 29 0\n39 42 27 0\n2 -30 9 0\n-13 -42 36 0\n15 37 -39 0\n23 -48 -10 0\n-39 23 4 0\n50 -4 -25 0\n37 29 -15 0\n31 5 -1 0\n50 -41 23 0\n-36 -30 27 0\n-7 28 -5 0\n-12 39 -21 0\n12 35 44 0\n38 4 -3 0\n-15 -48 24 0\n-42 -44 -28 0\n39 37 18 0\n-49 -24 7 0\n5 -24 14 0\n1 -48 23 0\n25 -31 -4 0\n-33 -16 -15 0\n-22 24 -1 0\n38 -20 -10 0\n-27 28 -41 0\n-9 -27 -12 0\n12 -2 -6 0\n32 50 33 0\n-48 35 29 0\n25 -40 -13 0\n-32 -18 -1 0\n-35 9 38 0\n22 2 -14 0\n24 9 14 0\n-25 33 15 0\n-29 -38 23 0\n16 -28 3 0\n-27 48 30 0\n6 17 -22 0\n33 7 11 0\n-49 -50 38 0\n-44 46 -34 0\n12 -28 -41 0\n15 -3 20 0\n-6 -34 -27 0\n24 -46 -29 0\n-46 22 -18 0\n-3 50 25 0\n43 -24 -13 0\n29 -1 24 0\n-47 50 -14 0\n-10 -47 -11 0\n-25 -41 -33 0\n10 -27 15 0\n-13 18 -12 0\n4 -20 -37 0\n7 -5 35 0\n-1 6 -14 0\n-25 15 40 0\n-49 32 -12 0\n38 24 35 0\n-12 22 -8 0\n30 10 -44 0\n%\n0\n\n"} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources xmlns:ns1=\"urn:oasis:names:tc:xliff:document:1.2\">\n <string msgid=\"4600421777120114993\" name=\"abc_action_bar_home_description\">\"Zur Startseite\"</string>\n <string msgid=\"1594238315039666878\" name=\"abc_action_bar_up_description\">\"Nach oben\"</string>\n <string msgid=\"3588849162933574182\" name=\"abc_action_menu_overflow_description\">\"Weitere Optionen\"</string>\n <string msgid=\"4076576682505996667\" name=\"abc_action_mode_done\">\"Fertig\"</string>\n <string msgid=\"7468859129482906941\" name=\"abc_activity_chooser_view_see_all\">\"Alle ansehen\"</string>\n <string msgid=\"2031811694353399454\" name=\"abc_activitychooserview_choose_application\">\"App auswählen\"</string>\n <string msgid=\"121134116657445385\" name=\"abc_capital_off\">\"Aus\"</string>\n <string msgid=\"3405795526292276155\" name=\"abc_capital_on\">\"An\"</string>\n <string msgid=\"7723749260725869598\" name=\"abc_search_hint\">\"Suchen…\"</string>\n <string msgid=\"3691816814315814921\" name=\"abc_searchview_description_clear\">\"Suchanfrage löschen\"</string>\n <string msgid=\"2550479030709304392\" name=\"abc_searchview_description_query\">\"Suchanfrage\"</string>\n <string msgid=\"8264924765203268293\" name=\"abc_searchview_description_search\">\"Suchen\"</string>\n <string msgid=\"8928215447528550784\" name=\"abc_searchview_description_submit\">\"Suchanfrage senden\"</string>\n <string msgid=\"893419373245838918\" name=\"abc_searchview_description_voice\">\"Sprachsuche\"</string>\n <string msgid=\"3421042268587513524\" name=\"abc_shareactionprovider_share_with\">\"Freigeben für\"</string>\n <string msgid=\"3300176832234831527\" name=\"abc_shareactionprovider_share_with_application\">\"Mit <ns1:g id=\"APPLICATION_NAME\">%s</ns1:g> teilen\"</string>\n <string msgid=\"1603543279005712093\" name=\"abc_toolbar_collapse_description\">\"Minimieren\"</string>\n <string msgid=\"146198913615257606\" name=\"search_menu_title\">\"Suchen\"</string>\n</resources>"} +{"text": "; RUN: opt -thinlto-bc -o %t %s\n; RUN: llvm-dis -o - %t | FileCheck %s\n; RUN: llvm-bcanalyzer -dump %t | FileCheck --check-prefix=BCA %s\n\n; BCA: <GLOBALVAL_SUMMARY_BLOCK\n\n; CHECK: @g = global i8 42\n@g = global i8 42\n\n; CHECK: define void @f()\ndefine void @f() {\n ret void\n}\n"} +{"text": "Weizmann Institute of Science\n"} +{"text": "feat: (description with motivation)\n\nBREAKING CHANGE: (effect on current programs or datastructures)\n\nperf: impact\n\nperformance\n\nusability\n\nmaintainability\n\ncode: input\n```\nshell code\n```\n\nexpect: output\n```\nresult\n```\n\nreason: (for what use case is this important)\n\ncontext: (links, text and further literature)\n\nbehavior of bash/dash/zsh/fish/oil\n"} +{"text": "\"\"\"Tests for misc.waxed check.\"\"\"\nfrom __future__ import absolute_import\n\nfrom .check import Check\n\nfrom proselint.checks.misc import waxed as chk\n\n\nclass TestCheck(Check):\n \"\"\"The test class for misc.waxed.\"\"\"\n\n __test__ = True\n\n @property\n def this_check(self):\n \"\"\"Boilerplate.\"\"\"\n return chk\n\n def test_smoke(self):\n \"\"\"Basic smoke test for misc.waxed.\"\"\"\n assert self.passes(\"\"\"Smoke phrase with nothing flagged.\"\"\")\n assert not self.passes(\"\"\"They really could wax poetically.\"\"\")\n"} +{"text": "using System.Reflection;\nusing System.Runtime.CompilerServices;\nusing System.Runtime.InteropServices;\n\n// General Information about an assembly is controlled through the following \n// set of attributes. Change these attribute values to modify the information\n// associated with an assembly.\n[assembly: AssemblyTitle(\"Kafka.Client.IntegrationTests\")]\n[assembly: AssemblyDescription(\"\")]\n[assembly: AssemblyConfiguration(\"\")]\n[assembly: AssemblyCompany(\"Microsoft\")]\n[assembly: AssemblyProduct(\"Kafka.Client.IntegrationTests\")]\n[assembly: AssemblyCopyright(\"Copyright © Microsoft 2011\")]\n[assembly: AssemblyTrademark(\"\")]\n[assembly: AssemblyCulture(\"\")]\n\n// Setting ComVisible to false makes the types in this assembly not visible \n// to COM components. If you need to access a type in this assembly from \n// COM, set the ComVisible attribute to true on that type.\n[assembly: ComVisible(false)]\n\n// The following GUID is for the ID of the typelib if this project is exposed to COM\n[assembly: Guid(\"7b2387b7-6a58-4e8b-ae06-8aadf1a64949\")]\n\n// Version information for an assembly consists of the following four values:\n//\n// Major Version\n// Minor Version \n// Build Number\n// Revision\n//\n// You can specify all the values or you can default the Build and Revision Numbers \n// by using the '*' as shown below:\n// [assembly: AssemblyVersion(\"1.0.*\")]\n[assembly: AssemblyVersion(\"1.0.0.0\")]\n[assembly: AssemblyFileVersion(\"1.0.0.0\")]\n"} +{"text": "--- OverTheWire's Monxla wargame, released November 2012 --- \n\n1. Introduction\n\nThe story around this wargame is centered around the fictitious Russian \ncrime family Nasenko. You play the role of agent Hipnkewl who received\nthe following letter:\n\n\tHello agent Hipnkewl,\n\n\tAs head of the cybercrime-fighting unit of the best three-letter agency\n\tin the world, I welcome you to the team.\n\n\tTo demonstrate your skills to the rest of team, we have prepared your\n\tfirst assignment.\n\n\tThe russian Nasenko family has decided to become a crime family. Being\n\thip and trendy, they have figured out that an online presence is a must \n\tin today's world. They have set up a server where they are testing and \n\tdeveloping the best and latest cybercrime tools. What they don't know, \n\tis that we have already infiltrated their business and have a mole \n\tinside their organisation.\n\n\tYour job is to locate the information hidden by the mole and use it to \n\ttake down the Nasenko server. Details about the location of this server \n\twill be transmitted once the mission is a go.\n\n\tGod speed, make us proud!\n\n\tSigned,\n\tDirector A.F.\n\n2. How to play ?\n\nFirst, download the wargame live CD because it is intended to run locally.\nCreate a new virtual machine and boot from the live CD The game is based on Ubuntu, \nso any virtual hardware supported by Ubuntu should be fine in your virtualization environment.\n\nOnce booted, you can use SSH to login to monxla. For maintenance reasons, there is an account \n'otw' with password 'otw' with sudo rights to get a root account. This maintenance account is\nnot part of the wargame and should not be used when playing the wargame fairly.\n\nMonxla's network settings are configured through DHCP. Log in as user otw and use sudo to\nfind out monxla's assigned IP address to start the game. Alternatively, you may wish to\nconfigure your local DHCP server so that monxla receives a fixed IP address.\n\nTo start the game, visit monxla with your webbrowser. Hint: how big is the page you are looking at?\n\n3. Contact information\n\nFor information regarding this wargame, find us at http://www.overthewire.org or through\nIRC on irc.overthewire.org, channel #social\nThe OverTheWire community offers more wargames and resources for you to explore.\n\n4. History of this wargame\n\nThis wargame was reachable on monxla.labs.overthewire.org.\n\nOriginally, this wargame was created for the Hackito Ergo Sum 2012 conference in Paris,\nwhich was held from April 12th to April 14th 2012. Afterwards, the wargame was opened up\nto any player.\n\n5. References\n\nhttp://www.overthewire.org/\n"} +{"text": "<?php\n/**\n * Copyright 2016 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nnamespace Google\\Cloud\\Core\\Testing\\Snippet;\n\nuse Google\\Cloud\\Core\\Testing\\CheckForClassTrait;\nuse Google\\Cloud\\Core\\Testing\\Snippet\\Container;\nuse Google\\Cloud\\Core\\Testing\\Snippet\\Parser\\Snippet;\nuse PHPUnit\\Framework\\TestCase;\n\n/**\n * Provide helpers for Snippet tests.\n *\n * Snippet test cases should extend this class.\n *\n * @experimental\n * @internal\n */\nclass SnippetTestCase extends TestCase\n{\n use CheckForClassTrait;\n\n private static $coverage;\n private static $parser;\n\n /**\n * Run to set up class before testing\n *\n * @experimental\n * @internal\n */\n public static function setUpBeforeClass()\n {\n self::$coverage = Container::$coverage;\n self::$parser = Container::$parser;\n }\n\n /**\n * Retrieve a snippet from a class-level docblock.\n *\n * @param string $class The class name.\n * @param string|int $indexOrName The index of the snippet, or its name.\n * @return Snippet\n *\n * @experimental\n * @internal\n */\n public static function snippetFromClass($class, $indexOrName = 0)\n {\n $identifier = self::$parser->createIdentifier($class, $indexOrName);\n\n $snippet = self::$coverage->cache($identifier);\n if (!$snippet) {\n $snippet = self::$parser->classExample($class, $indexOrName);\n }\n\n self::$coverage->cover($snippet->identifier());\n\n return clone $snippet;\n }\n\n /**\n * Retrieve a snippet from a magic method docblock (i.e. `@method` tag\n * nexted inside a class-level docblock).\n *\n * @param string $class The class name\n * @param string $method The method name\n * @param string|int $indexOrName The index of the snippet, or its name.\n * @return Snippet\n *\n * @experimental\n * @internal\n */\n public static function snippetFromMagicMethod($class, $method, $indexOrName = 0)\n {\n $name = $class .'::'. $method;\n $identifier = self::$parser->createIdentifier($name, $indexOrName);\n\n $snippet = self::$coverage->cache($identifier);\n if (!$snippet) {\n throw new \\Exception('Magic Method '. $name .' was not found');\n }\n\n self::$coverage->cover($identifier);\n\n return clone $snippet;\n }\n\n /**\n * Retrieve a snippet from a method docblock.\n *\n * @param string $class The class name\n * @param string $method The method name\n * @param string|int $indexOrName The index of the snippet, or its name.\n * @return Snippet\n *\n * @experimental\n * @internal\n */\n public static function snippetFromMethod($class, $method, $indexOrName = 0)\n {\n $name = $class .'::'. $method;\n $identifier = self::$parser->createIdentifier($name, $indexOrName);\n\n $snippet = self::$coverage->cache($identifier);\n if (!$snippet) {\n $snippet = self::$parser->methodExample($class, $method, $indexOrName);\n }\n\n self::$coverage->cover($identifier);\n\n return clone $snippet;\n }\n}\n"} +{"text": "lf\r\nlf\r\ncrlf\r\nlf\r\nlf\r\n"} +{"text": "var baseConformsTo = require('./_baseConformsTo'),\n keys = require('./keys');\n\n/**\n * The base implementation of `_.conforms` which doesn't clone `source`.\n *\n * @private\n * @param {Object} source The object of property predicates to conform to.\n * @returns {Function} Returns the new spec function.\n */\nfunction baseConforms(source) {\n var props = keys(source);\n return function(object) {\n return baseConformsTo(object, source, props);\n };\n}\n\nmodule.exports = baseConforms;\n"} +{"text": "{-# OPTIONS_GHC -fno-warn-unused-imports #-}\n\n-- |\n-- Module : Main\n-- Copyright : (c) 2013-2018 Brendan Hay\n-- License : Mozilla Public License, v. 2.0.\n-- Maintainer : Brendan Hay <brendan.g.hay+amazonka@gmail.com>\n-- Stability : auto-generated\n-- Portability : non-portable (GHC extensions)\n--\nmodule Main (main) where\n\nimport Test.Tasty\nimport Test.AWS.SageMaker\nimport Test.AWS.SageMaker.Internal\n\nmain :: IO ()\nmain = defaultMain $ testGroup \"SageMaker\"\n [ testGroup \"tests\" tests\n , testGroup \"fixtures\" fixtures\n ]\n"} +{"text": "<?php\n\n/*\n * This file is part of SwiftMailer.\n * (c) 2004-2009 Chris Corbyn\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n/**\n * An ESMTP handler for AUTH support (RFC 5248).\n *\n * @author Chris Corbyn\n */\nclass Swift_Transport_Esmtp_AuthHandler implements Swift_Transport_EsmtpHandler\n{\n /**\n * Authenticators available to process the request.\n *\n * @var Swift_Transport_Esmtp_Authenticator[]\n */\n private $authenticators = [];\n\n /**\n * The username for authentication.\n *\n * @var string\n */\n private $username;\n\n /**\n * The password for authentication.\n *\n * @var string\n */\n private $password;\n\n /**\n * The auth mode for authentication.\n *\n * @var string\n */\n private $auth_mode;\n\n /**\n * The ESMTP AUTH parameters available.\n *\n * @var string[]\n */\n private $esmtpParams = [];\n\n /**\n * Create a new AuthHandler with $authenticators for support.\n *\n * @param Swift_Transport_Esmtp_Authenticator[] $authenticators\n */\n public function __construct(array $authenticators)\n {\n $this->setAuthenticators($authenticators);\n }\n\n /**\n * Set the Authenticators which can process a login request.\n *\n * @param Swift_Transport_Esmtp_Authenticator[] $authenticators\n */\n public function setAuthenticators(array $authenticators)\n {\n $this->authenticators = $authenticators;\n }\n\n /**\n * Get the Authenticators which can process a login request.\n *\n * @return Swift_Transport_Esmtp_Authenticator[]\n */\n public function getAuthenticators()\n {\n return $this->authenticators;\n }\n\n /**\n * Set the username to authenticate with.\n *\n * @param string $username\n */\n public function setUsername($username)\n {\n $this->username = $username;\n }\n\n /**\n * Get the username to authenticate with.\n *\n * @return string\n */\n public function getUsername()\n {\n return $this->username;\n }\n\n /**\n * Set the password to authenticate with.\n *\n * @param string $password\n */\n public function setPassword($password)\n {\n $this->password = $password;\n }\n\n /**\n * Get the password to authenticate with.\n *\n * @return string\n */\n public function getPassword()\n {\n return $this->password;\n }\n\n /**\n * Set the auth mode to use to authenticate.\n *\n * @param string $mode\n */\n public function setAuthMode($mode)\n {\n $this->auth_mode = $mode;\n }\n\n /**\n * Get the auth mode to use to authenticate.\n *\n * @return string\n */\n public function getAuthMode()\n {\n return $this->auth_mode;\n }\n\n /**\n * Get the name of the ESMTP extension this handles.\n *\n * @return string\n */\n public function getHandledKeyword()\n {\n return 'AUTH';\n }\n\n /**\n * Set the parameters which the EHLO greeting indicated.\n *\n * @param string[] $parameters\n */\n public function setKeywordParams(array $parameters)\n {\n $this->esmtpParams = $parameters;\n }\n\n /**\n * Runs immediately after a EHLO has been issued.\n *\n * @param Swift_Transport_SmtpAgent $agent to read/write\n */\n public function afterEhlo(Swift_Transport_SmtpAgent $agent)\n {\n if ($this->username) {\n $count = 0;\n $errors = [];\n foreach ($this->getAuthenticatorsForAgent() as $authenticator) {\n if (in_array(strtolower($authenticator->getAuthKeyword()), array_map('strtolower', $this->esmtpParams))) {\n ++$count;\n try {\n if ($authenticator->authenticate($agent, $this->username, $this->password)) {\n return;\n }\n } catch (Swift_TransportException $e) {\n // keep the error message, but tries the other authenticators\n $errors[] = [$authenticator->getAuthKeyword(), $e];\n }\n }\n }\n\n $message = 'Failed to authenticate on SMTP server with username \"'.$this->username.'\" using '.$count.' possible authenticators.';\n foreach ($errors as $error) {\n $message .= ' Authenticator '.$error[0].' returned '.$error[1].'.';\n }\n throw new Swift_TransportException($message);\n }\n }\n\n /**\n * Not used.\n */\n public function getMailParams()\n {\n return [];\n }\n\n /**\n * Not used.\n */\n public function getRcptParams()\n {\n return [];\n }\n\n /**\n * Not used.\n */\n public function onCommand(Swift_Transport_SmtpAgent $agent, $command, $codes = [], &$failedRecipients = null, &$stop = false)\n {\n }\n\n /**\n * Returns +1, -1 or 0 according to the rules for usort().\n *\n * This method is called to ensure extensions can be execute in an appropriate order.\n *\n * @param string $esmtpKeyword to compare with\n *\n * @return int\n */\n public function getPriorityOver($esmtpKeyword)\n {\n return 0;\n }\n\n /**\n * Returns an array of method names which are exposed to the Esmtp class.\n *\n * @return string[]\n */\n public function exposeMixinMethods()\n {\n return ['setUsername', 'getUsername', 'setPassword', 'getPassword', 'setAuthMode', 'getAuthMode'];\n }\n\n /**\n * Not used.\n */\n public function resetState()\n {\n }\n\n /**\n * Returns the authenticator list for the given agent.\n *\n * @return array\n */\n protected function getAuthenticatorsForAgent()\n {\n if (!$mode = strtolower($this->auth_mode)) {\n return $this->authenticators;\n }\n\n foreach ($this->authenticators as $authenticator) {\n if (strtolower($authenticator->getAuthKeyword()) == $mode) {\n return [$authenticator];\n }\n }\n\n throw new Swift_TransportException('Auth mode '.$mode.' is invalid');\n }\n}\n"} +{"text": "BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:-//test.org/Calendar//EN\nBEGIN:VEVENT\nCREATED:20090202T114737Z\nLAST-MODIFIED:20090202T114820Z\nDTSTAMP:20090322T170116Z\nUID:edb7a48a-d846-47f8-bad2-9ea3f29bcda5\nSUMMARY:Vacances de la Toussaint\nDTSTART;VALUE=DATE:20081025\nDTEND;VALUE=DATE:20081106\nTRANSP:TRANSPARENT\nEND:VEVENT\nEND:VCALENDAR\n"} +{"text": "#include <math.h>\n#include <stdlib.h>\n#include <stdio.h>\n#include \"tisean_cec.h\"\n\ntypedef double doublereal;\ntypedef int integer;\n\n#define abs(x) (((x)>=0.0)?(x):-(x))\n#define min(x,y) (((x)<=(y))?(x):(y))\n#define max(x,y) (((x)>=(y))?(x):(y))\n\nstatic doublereal c_b10 = 1.;\n\nextern void check_alloc(void*);\n\ndouble d_sign(double *a,double *b)\n{\n double x;\n x = (*a >= 0 ? *a : - *a);\n return ( *b >= 0 ? x : -x);\n}\n\ndoublereal pythag(doublereal *a, doublereal *b)\n{\n doublereal ret_val, d__1, d__2, d__3;\n static doublereal p, r__, s, t, u;\n\n d__1 = abs(*a), d__2 = abs(*b);\n p = max(d__1,d__2);\n if (p == 0.) {\n\tgoto L20;\n }\n d__2 = abs(*a), d__3 = abs(*b);\n d__1 = min(d__2,d__3) / p;\n r__ = d__1 * d__1;\nL10:\n t = r__ + 4.;\n if (t == 4.) {\n\tgoto L20;\n }\n s = r__ / t;\n u = s * 2. + 1.;\n p = u * p;\n d__1 = s / u;\n r__ = d__1 * d__1 * r__;\n goto L10;\nL20:\n ret_val = p;\n return ret_val;\n}\n\n\nint tred2(integer *nm, integer *n, doublereal *a, \n\tdoublereal *d__, doublereal *e, doublereal *z__)\n{\n integer a_dim1, a_offset, z_dim1, z_offset, i__1, i__2, i__3;\n doublereal d__1;\n\n double sqrt(doublereal), d_sign(doublereal *, doublereal *);\n\n static doublereal f, g, h__;\n static integer i__, j, k, l;\n static doublereal hh;\n static integer ii, jp1;\n static doublereal scale;\n\n\n\n/* this subroutine is a translation of the algol procedure tred2, */\n/* num. math. 11, 181-195(1968) by martin, reinsch, and wilkinson. */\n/* handbook for auto. comp., vol.ii-linear algebra, 212-226(1971). */\n\n/* this subroutine reduces a real symmetric matrix to a */\n/* symmetric tridiagonal matrix using and accumulating */\n/* orthogonal similarity transformations. */\n\n/* on input */\n\n/* nm must be set to the row dimension of two-dimensional */\n/* array parameters as declared in the calling program */\n/* dimension statement. */\n\n/* n is the order of the matrix. */\n\n/* a contains the real symmetric input matrix. only the */\n/* lower triangle of the matrix need be supplied. */\n\n/* on output */\n\n/* d contains the diagonal elements of the tridiagonal matrix. */\n\n/* e contains the subdiagonal elements of the tridiagonal */\n/* matrix in its last n-1 positions. e(1) is set to zero. */\n\n/* z contains the orthogonal transformation matrix */\n/* produced in the reduction. */\n\n/* a and z may coincide. if distinct, a is unaltered. */\n\n/* questions and comments should be directed to burton s. garbow, */\n/* mathematics and computer science div, argonne national laboratory */\n\n/* this version dated august 1983. */\n\n/* ------------------------------------------------------------------ */\n\n z_dim1 = *nm;\n z_offset = 1 + z_dim1 * 1;\n z__ -= z_offset;\n --e;\n --d__;\n a_dim1 = *nm;\n a_offset = 1 + a_dim1 * 1;\n a -= a_offset;\n\n i__1 = *n;\n for (i__ = 1; i__ <= i__1; ++i__) {\n\n\ti__2 = *n;\n\tfor (j = i__; j <= i__2; ++j) {\n\t z__[j + i__ * z_dim1] = a[j + i__ * a_dim1];\n\t}\n\n\td__[i__] = a[*n + i__ * a_dim1];\n }\n\n if (*n == 1) {\n\tgoto L510;\n }\n i__1 = *n;\n for (ii = 2; ii <= i__1; ++ii) {\n\ti__ = *n + 2 - ii;\n\tl = i__ - 1;\n\th__ = 0.;\n\tscale = 0.;\n\tif (l < 2) {\n\t goto L130;\n\t}\n\ti__2 = l;\n\tfor (k = 1; k <= i__2; ++k) {\n\t scale += (d__1 = d__[k], abs(d__1));\n\t}\n\n\tif (scale != 0.) {\n\t goto L140;\n\t}\nL130:\n\te[i__] = d__[l];\n\n\ti__2 = l;\n\tfor (j = 1; j <= i__2; ++j) {\n\t d__[j] = z__[l + j * z_dim1];\n\t z__[i__ + j * z_dim1] = 0.;\n\t z__[j + i__ * z_dim1] = 0.;\n\t}\n\n\tgoto L290;\n\nL140:\n\ti__2 = l;\n\tfor (k = 1; k <= i__2; ++k) {\n\t d__[k] /= scale;\n\t h__ += d__[k] * d__[k];\n\t}\n\n\tf = d__[l];\n\td__1 = sqrt(h__);\n\tg = -d_sign(&d__1, &f);\n\te[i__] = scale * g;\n\th__ -= f * g;\n\td__[l] = f - g;\n\ti__2 = l;\n\tfor (j = 1; j <= i__2; ++j) {\n\t e[j] = 0.;\n\t}\n\n\ti__2 = l;\n\tfor (j = 1; j <= i__2; ++j) {\n\t f = d__[j];\n\t z__[j + i__ * z_dim1] = f;\n\t g = e[j] + z__[j + j * z_dim1] * f;\n\t jp1 = j + 1;\n\t if (l < jp1) {\n\t\tgoto L220;\n\t }\n\n\t i__3 = l;\n\t for (k = jp1; k <= i__3; ++k) {\n\t\tg += z__[k + j * z_dim1] * d__[k];\n\t\te[k] += z__[k + j * z_dim1] * f;\n\t }\n\nL220:\n\t e[j] = g;\n\t}\n\tf = 0.;\n\n\ti__2 = l;\n\tfor (j = 1; j <= i__2; ++j) {\n\t e[j] /= h__;\n\t f += e[j] * d__[j];\n\t}\n\n\thh = f / (h__ + h__);\n\ti__2 = l;\n\tfor (j = 1; j <= i__2; ++j) {\n\t e[j] -= hh * d__[j];\n\t}\n\ti__2 = l;\n\tfor (j = 1; j <= i__2; ++j) {\n\t f = d__[j];\n\t g = e[j];\n\n\t i__3 = l;\n\t for (k = j; k <= i__3; ++k) {\n\t\tz__[k + j * z_dim1] = z__[k + j * z_dim1] - f * e[k] - g * \n\t\t\td__[k];\n\t }\n\n\t d__[j] = z__[l + j * z_dim1];\n\t z__[i__ + j * z_dim1] = 0.;\n\t}\n\nL290:\n\td__[i__] = h__;\n }\n i__1 = *n;\n for (i__ = 2; i__ <= i__1; ++i__) {\n\tl = i__ - 1;\n\tz__[*n + l * z_dim1] = z__[l + l * z_dim1];\n\tz__[l + l * z_dim1] = 1.;\n\th__ = d__[i__];\n\tif (h__ == 0.) {\n\t goto L380;\n\t}\n\n\ti__2 = l;\n\tfor (k = 1; k <= i__2; ++k) {\n\t d__[k] = z__[k + i__ * z_dim1] / h__;\n\t}\n\n\ti__2 = l;\n\tfor (j = 1; j <= i__2; ++j) {\n\t g = 0.;\n\n\t i__3 = l;\n\t for (k = 1; k <= i__3; ++k) {\n\t\tg += z__[k + i__ * z_dim1] * z__[k + j * z_dim1];\n\t }\n\n\t i__3 = l;\n\t for (k = 1; k <= i__3; ++k) {\n\t\tz__[k + j * z_dim1] -= g * d__[k];\n\t }\n\t}\n\nL380:\n\ti__3 = l;\n\tfor (k = 1; k <= i__3; ++k) {\n\t z__[k + i__ * z_dim1] = 0.;\n\t}\n\n }\n\nL510:\n i__1 = *n;\n for (i__ = 1; i__ <= i__1; ++i__) {\n\td__[i__] = z__[*n + i__ * z_dim1];\n\tz__[*n + i__ * z_dim1] = 0.;\n }\n\n z__[*n + *n * z_dim1] = 1.;\n e[1] = 0.;\n return 0;\n} \n\nint tql2(integer *nm, integer *n, doublereal *d__, \n\tdoublereal *e, doublereal *z__, integer *ierr)\n{\n integer z_dim1, z_offset, i__1, i__2, i__3;\n doublereal d__1, d__2;\n\n double d_sign(doublereal *, doublereal *);\n\n static doublereal c__, f, g, h__;\n static integer i__, j, k, l, m;\n static doublereal p, r__, s, c2, c3;\n static integer l1, l2;\n static doublereal s2;\n static integer ii;\n static doublereal dl1, el1;\n static integer mml;\n static doublereal tst1, tst2;\n extern doublereal pythag_(doublereal *, doublereal *);\n\n\n\n/* this subroutine is a translation of the algol procedure tql2, */\n/* num. math. 11, 293-306(1968) by bowdler, martin, reinsch, and */\n/* wilkinson. */\n/* handbook for auto. comp., vol.ii-linear algebra, 227-240(1971). */\n\n/* this subroutine finds the eigenvalues and eigenvectors */\n/* of a symmetric tridiagonal matrix by the ql method. */\n/* the eigenvectors of a full symmetric matrix can also */\n/* be found if tred2 has been used to reduce this */\n/* full matrix to tridiagonal form. */\n\n/* on input */\n\n/* nm must be set to the row dimension of two-dimensional */\n/* array parameters as declared in the calling program */\n/* dimension statement. */\n\n/* n is the order of the matrix. */\n\n/* d contains the diagonal elements of the input matrix. */\n\n/* e contains the subdiagonal elements of the input matrix */\n/* in its last n-1 positions. e(1) is arbitrary. */\n\n/* z contains the transformation matrix produced in the */\n/* reduction by tred2, if performed. if the eigenvectors */\n/* of the tridiagonal matrix are desired, z must contain */\n/* the identity matrix. */\n\n/* on output */\n\n/* d contains the eigenvalues in ascending order. if an */\n/* error exit is made, the eigenvalues are correct but */\n/* unordered for indices 1,2,...,ierr-1. */\n\n/* e has been destroyed. */\n\n/* z contains orthonormal eigenvectors of the symmetric */\n/* tridiagonal (or full) matrix. if an error exit is made, */\n/* z contains the eigenvectors associated with the stored */\n/* eigenvalues. */\n\n/* ierr is set to */\n/* zero for normal return, */\n/* j if the j-th eigenvalue has not been */\n/* determined after 30 iterations. */\n\n/* calls pythag for dsqrt(a*a + b*b) . */\n\n/* questions and comments should be directed to burton s. garbow, */\n/* mathematics and computer science div, argonne national laboratory */\n\n/* this version dated august 1983. */\n\n/* ------------------------------------------------------------------ */\n\n z_dim1 = *nm;\n z_offset = 1 + z_dim1 * 1;\n z__ -= z_offset;\n --e;\n --d__;\n\n *ierr = 0;\n if (*n == 1) {\n\tgoto L1001;\n }\n\n i__1 = *n;\n for (i__ = 2; i__ <= i__1; ++i__) {\n\te[i__ - 1] = e[i__];\n }\n\n f = 0.;\n tst1 = 0.;\n e[*n] = 0.;\n\n i__1 = *n;\n for (l = 1; l <= i__1; ++l) {\n\tj = 0;\n\th__ = (d__1 = d__[l], abs(d__1)) + (d__2 = e[l], abs(d__2));\n\tif (tst1 < h__) {\n\t tst1 = h__;\n\t}\n\ti__2 = *n;\n\tfor (m = l; m <= i__2; ++m) {\n\t tst2 = tst1 + (d__1 = e[m], abs(d__1));\n\t if (tst2 == tst1) {\n\t\tgoto L120;\n\t }\n\t}\n\nL120:\n\tif (m == l) {\n\t goto L220;\n\t}\nL130:\n\tif (j == 30) {\n\t goto L1000;\n\t}\n\t++j;\n\tl1 = l + 1;\n\tl2 = l1 + 1;\n\tg = d__[l];\n\tp = (d__[l1] - g) / (e[l] * 2.);\n\tr__ = pythag(&p, &c_b10);\n\td__[l] = e[l] / (p + d_sign(&r__, &p));\n\td__[l1] = e[l] * (p + d_sign(&r__, &p));\n\tdl1 = d__[l1];\n\th__ = g - d__[l];\n\tif (l2 > *n) {\n\t goto L145;\n\t}\n\n\ti__2 = *n;\n\tfor (i__ = l2; i__ <= i__2; ++i__) {\n\t d__[i__] -= h__;\n\t}\n\nL145:\n\tf += h__;\n\tp = d__[m];\n\tc__ = 1.;\n\tc2 = c__;\n\tel1 = e[l1];\n\ts = 0.;\n\tmml = m - l;\n\ti__2 = mml;\n\tfor (ii = 1; ii <= i__2; ++ii) {\n\t c3 = c2;\n\t c2 = c__;\n\t s2 = s;\n\t i__ = m - ii;\n\t g = c__ * e[i__];\n\t h__ = c__ * p;\n\t r__ = pythag(&p, &e[i__]);\n\t e[i__ + 1] = s * r__;\n\t s = e[i__] / r__;\n\t c__ = p / r__;\n\t p = c__ * d__[i__] - s * g;\n\t d__[i__ + 1] = h__ + s * (c__ * g + s * d__[i__]);\n\t i__3 = *n;\n\t for (k = 1; k <= i__3; ++k) {\n\t\th__ = z__[k + (i__ + 1) * z_dim1];\n\t\tz__[k + (i__ + 1) * z_dim1] = s * z__[k + i__ * z_dim1] + c__ \n\t\t\t* h__;\n\t\tz__[k + i__ * z_dim1] = c__ * z__[k + i__ * z_dim1] - s * h__;\n\t }\n\n\t}\n\n\tp = -s * s2 * c3 * el1 * e[l] / dl1;\n\te[l] = s * p;\n\td__[l] = c__ * p;\n\ttst2 = tst1 + (d__1 = e[l], abs(d__1));\n\tif (tst2 > tst1) {\n\t goto L130;\n\t}\nL220:\n\td__[l] += f;\n }\n i__1 = *n;\n for (ii = 2; ii <= i__1; ++ii) {\n\ti__ = ii - 1;\n\tk = i__;\n\tp = d__[i__];\n\n\ti__2 = *n;\n\tfor (j = ii; j <= i__2; ++j) {\n\t if (d__[j] >= p) {\n\t\tgoto L260;\n\t }\n\t k = j;\n\t p = d__[j];\nL260:\n\t ;\n\t}\n\n\tif (k == i__) {\n\t goto L300;\n\t}\n\td__[k] = d__[i__];\n\td__[i__] = p;\n\n\ti__2 = *n;\n\tfor (j = 1; j <= i__2; ++j) {\n\t p = z__[j + i__ * z_dim1];\n\t z__[j + i__ * z_dim1] = z__[j + k * z_dim1];\n\t z__[j + k * z_dim1] = p;\n\t}\n\nL300:\n\t;\n }\n\n goto L1001;\nL1000:\n *ierr = l;\nL1001:\n return 0;\n}\n\nvoid eigen(double **mat,unsigned long n,double *eig)\n{\n double *trans,*off;\n int ierr,i,j,nm=(int)n;\n\n check_alloc(trans=(double*)malloc(sizeof(double)*nm*nm));\n check_alloc(off=(double*)malloc(sizeof(double)*nm));\n\n tred2(&nm,&nm,&mat[0][0],eig,off,trans);\n tql2(&nm,&nm,eig,off,trans,&ierr);\n\n if (ierr != 0) {\n fprintf(stderr,\"Non converging eigenvalues! Exiting\\n\");\n exit(EIG2_TOO_MANY_ITERATIONS);\n }\n\n for (i=0;i<nm;i++)\n for (j=0;j<nm;j++)\n mat[i][j]=trans[i+nm*j];\n\n free(trans);\n free(off);\n}\n"} +{"text": "/***************************************************************************/\n/* */\n/* ftlist.h */\n/* */\n/* Generic list support for FreeType (specification). */\n/* */\n/* Copyright 1996-2001, 2003, 2007, 2010, 2013, 2014 by */\n/* David Turner, Robert Wilhelm, and Werner Lemberg. */\n/* */\n/* This file is part of the FreeType project, and may only be used, */\n/* modified, and distributed under the terms of the FreeType project */\n/* license, LICENSE.TXT. By continuing to use, modify, or distribute */\n/* this file you indicate that you have read the license and */\n/* understand and accept it fully. */\n/* */\n/***************************************************************************/\n\n\n /*************************************************************************/\n /* */\n /* This file implements functions relative to list processing. Its */\n /* data structures are defined in `freetype.h'. */\n /* */\n /*************************************************************************/\n\n\n#ifndef __FTLIST_H__\n#define __FTLIST_H__\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n\n#ifdef FREETYPE_H\n#error \"freetype.h of FreeType 1 has been loaded!\"\n#error \"Please fix the directory search order for header files\"\n#error \"so that freetype.h of FreeType 2 is found first.\"\n#endif\n\n\nFT_BEGIN_HEADER\n\n\n /*************************************************************************/\n /* */\n /* <Section> */\n /* list_processing */\n /* */\n /* <Title> */\n /* List Processing */\n /* */\n /* <Abstract> */\n /* Simple management of lists. */\n /* */\n /* <Description> */\n /* This section contains various definitions related to list */\n /* processing using doubly-linked nodes. */\n /* */\n /* <Order> */\n /* FT_List */\n /* FT_ListNode */\n /* FT_ListRec */\n /* FT_ListNodeRec */\n /* */\n /* FT_List_Add */\n /* FT_List_Insert */\n /* FT_List_Find */\n /* FT_List_Remove */\n /* FT_List_Up */\n /* FT_List_Iterate */\n /* FT_List_Iterator */\n /* FT_List_Finalize */\n /* FT_List_Destructor */\n /* */\n /*************************************************************************/\n\n\n /*************************************************************************/\n /* */\n /* <Function> */\n /* FT_List_Find */\n /* */\n /* <Description> */\n /* Find the list node for a given listed object. */\n /* */\n /* <Input> */\n /* list :: A pointer to the parent list. */\n /* data :: The address of the listed object. */\n /* */\n /* <Return> */\n /* List node. NULL if it wasn't found. */\n /* */\n FT_EXPORT( FT_ListNode )\n FT_List_Find( FT_List list,\n void* data );\n\n\n /*************************************************************************/\n /* */\n /* <Function> */\n /* FT_List_Add */\n /* */\n /* <Description> */\n /* Append an element to the end of a list. */\n /* */\n /* <InOut> */\n /* list :: A pointer to the parent list. */\n /* node :: The node to append. */\n /* */\n FT_EXPORT( void )\n FT_List_Add( FT_List list,\n FT_ListNode node );\n\n\n /*************************************************************************/\n /* */\n /* <Function> */\n /* FT_List_Insert */\n /* */\n /* <Description> */\n /* Insert an element at the head of a list. */\n /* */\n /* <InOut> */\n /* list :: A pointer to parent list. */\n /* node :: The node to insert. */\n /* */\n FT_EXPORT( void )\n FT_List_Insert( FT_List list,\n FT_ListNode node );\n\n\n /*************************************************************************/\n /* */\n /* <Function> */\n /* FT_List_Remove */\n /* */\n /* <Description> */\n /* Remove a node from a list. This function doesn't check whether */\n /* the node is in the list! */\n /* */\n /* <Input> */\n /* node :: The node to remove. */\n /* */\n /* <InOut> */\n /* list :: A pointer to the parent list. */\n /* */\n FT_EXPORT( void )\n FT_List_Remove( FT_List list,\n FT_ListNode node );\n\n\n /*************************************************************************/\n /* */\n /* <Function> */\n /* FT_List_Up */\n /* */\n /* <Description> */\n /* Move a node to the head/top of a list. Used to maintain LRU */\n /* lists. */\n /* */\n /* <InOut> */\n /* list :: A pointer to the parent list. */\n /* node :: The node to move. */\n /* */\n FT_EXPORT( void )\n FT_List_Up( FT_List list,\n FT_ListNode node );\n\n\n /*************************************************************************/\n /* */\n /* <FuncType> */\n /* FT_List_Iterator */\n /* */\n /* <Description> */\n /* An FT_List iterator function that is called during a list parse */\n /* by @FT_List_Iterate. */\n /* */\n /* <Input> */\n /* node :: The current iteration list node. */\n /* */\n /* user :: A typeless pointer passed to @FT_List_Iterate. */\n /* Can be used to point to the iteration's state. */\n /* */\n typedef FT_Error\n (*FT_List_Iterator)( FT_ListNode node,\n void* user );\n\n\n /*************************************************************************/\n /* */\n /* <Function> */\n /* FT_List_Iterate */\n /* */\n /* <Description> */\n /* Parse a list and calls a given iterator function on each element. */\n /* Note that parsing is stopped as soon as one of the iterator calls */\n /* returns a non-zero value. */\n /* */\n /* <Input> */\n /* list :: A handle to the list. */\n /* iterator :: An iterator function, called on each node of the list. */\n /* user :: A user-supplied field that is passed as the second */\n /* argument to the iterator. */\n /* */\n /* <Return> */\n /* The result (a FreeType error code) of the last iterator call. */\n /* */\n FT_EXPORT( FT_Error )\n FT_List_Iterate( FT_List list,\n FT_List_Iterator iterator,\n void* user );\n\n\n /*************************************************************************/\n /* */\n /* <FuncType> */\n /* FT_List_Destructor */\n /* */\n /* <Description> */\n /* An @FT_List iterator function that is called during a list */\n /* finalization by @FT_List_Finalize to destroy all elements in a */\n /* given list. */\n /* */\n /* <Input> */\n /* system :: The current system object. */\n /* */\n /* data :: The current object to destroy. */\n /* */\n /* user :: A typeless pointer passed to @FT_List_Iterate. It can */\n /* be used to point to the iteration's state. */\n /* */\n typedef void\n (*FT_List_Destructor)( FT_Memory memory,\n void* data,\n void* user );\n\n\n /*************************************************************************/\n /* */\n /* <Function> */\n /* FT_List_Finalize */\n /* */\n /* <Description> */\n /* Destroy all elements in the list as well as the list itself. */\n /* */\n /* <Input> */\n /* list :: A handle to the list. */\n /* */\n /* destroy :: A list destructor that will be applied to each element */\n /* of the list. Set this to NULL if not needed. */\n /* */\n /* memory :: The current memory object that handles deallocation. */\n /* */\n /* user :: A user-supplied field that is passed as the last */\n /* argument to the destructor. */\n /* */\n /* <Note> */\n /* This function expects that all nodes added by @FT_List_Add or */\n /* @FT_List_Insert have been dynamically allocated. */\n /* */\n FT_EXPORT( void )\n FT_List_Finalize( FT_List list,\n FT_List_Destructor destroy,\n FT_Memory memory,\n void* user );\n\n /* */\n\n\nFT_END_HEADER\n\n#endif /* __FTLIST_H__ */\n\n\n/* END */\n"} +{"text": "JASSRC = $(SRC)/Terrain/jasper\nJASPER_SOURCES = \\\n\t$(JASSRC)/base/jas_malloc.c \\\n\t$(JASSRC)/base/jas_seq.c \t$(JASSRC)/base/jas_stream.c \\\n\t$(JASSRC)/jp2/jp2_cod.c \\\n\t$(JASSRC)/jpc/jpc_bs.c \\\n\t$(JASSRC)/jpc/jpc_cs.c \t\t$(JASSRC)/jpc/jpc_dec.c \\\n\t$(JASSRC)/jpc/jpc_math.c \\\n\t$(JASSRC)/jpc/jpc_mqdec.c $(JASSRC)/jpc/jpc_mqcod.c \\\n\t$(JASSRC)/jpc/jpc_qmfb.c \t$(JASSRC)/jpc/jpc_rtc.cpp \\\n\t$(JASSRC)/jpc/jpc_t1dec.c \\\n\t$(JASSRC)/jpc/jpc_t1cod.c \\\n\t$(JASSRC)/jpc/jpc_t2dec.c \t$(JASSRC)/jpc/jpc_t2cod.c \\\n\t$(JASSRC)/jpc/jpc_tagtree.c\t$(JASSRC)/jpc/jpc_tsfb.c\n\nJASPER_CFLAGS_INTERNAL = -Wno-type-limits\nJASPER_CFLAGS_INTERNAL += -Wno-shift-negative-value -Wno-sign-compare -Wno-tautological-compare\n\nifneq ($(CLANG),y)\nifneq ($(TARGET),CYGWIN)\nJASPER_CFLAGS_INTERNAL += -Wno-unused-but-set-parameter -Wno-unused-but-set-variable\nendif\nendif\n\nJASPER_CPPFLAGS = -I$(JASSRC)/..\n\n$(eval $(call link-library,jasper,JASPER))\n"} +{"text": "/*=============================================================================\r\n Copyright (c) 2001-2011 Joel de Guzman\r\n Copyright (c) 2001-2011 Hartmut Kaiser\r\n http://spirit.sourceforge.net/\r\n\r\n Distributed under the Boost Software License, Version 1.0. (See accompanying\r\n file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)\r\n=============================================================================*/\r\n#ifndef BOOST_SPIRIT_INCLUDE_SUPPORT_ARGUMENT\r\n#define BOOST_SPIRIT_INCLUDE_SUPPORT_ARGUMENT\r\n\r\n#if defined(_MSC_VER)\r\n#pragma once\r\n#endif\r\n\r\n#include <boost/spirit/home/support/argument.hpp>\r\n\r\n#endif\r\n"} +{"text": "// Copyright 2010 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// +build linux\n\npackage fsnotify\n\nimport (\n\t\"errors\"\n\t\"fmt\"\n\t\"io\"\n\t\"os\"\n\t\"path/filepath\"\n\t\"strings\"\n\t\"sync\"\n\t\"unsafe\"\n\n\t\"golang.org/x/sys/unix\"\n)\n\n// Watcher watches a set of files, delivering events to a channel.\ntype Watcher struct {\n\tEvents chan Event\n\tErrors chan error\n\tmu sync.Mutex // Map access\n\tcv *sync.Cond // sync removing on rm_watch with IN_IGNORE\n\tfd int\n\tpoller *fdPoller\n\twatches map[string]*watch // Map of inotify watches (key: path)\n\tpaths map[int]string // Map of watched paths (key: watch descriptor)\n\tdone chan struct{} // Channel for sending a \"quit message\" to the reader goroutine\n\tdoneResp chan struct{} // Channel to respond to Close\n}\n\n// NewWatcher establishes a new watcher with the underlying OS and begins waiting for events.\nfunc NewWatcher() (*Watcher, error) {\n\t// Create inotify fd\n\tfd, errno := unix.InotifyInit1(unix.IN_CLOEXEC)\n\tif fd == -1 {\n\t\treturn nil, errno\n\t}\n\t// Create epoll\n\tpoller, err := newFdPoller(fd)\n\tif err != nil {\n\t\tunix.Close(fd)\n\t\treturn nil, err\n\t}\n\tw := &Watcher{\n\t\tfd: fd,\n\t\tpoller: poller,\n\t\twatches: make(map[string]*watch),\n\t\tpaths: make(map[int]string),\n\t\tEvents: make(chan Event),\n\t\tErrors: make(chan error),\n\t\tdone: make(chan struct{}),\n\t\tdoneResp: make(chan struct{}),\n\t}\n\tw.cv = sync.NewCond(&w.mu)\n\n\tgo w.readEvents()\n\treturn w, nil\n}\n\nfunc (w *Watcher) isClosed() bool {\n\tselect {\n\tcase <-w.done:\n\t\treturn true\n\tdefault:\n\t\treturn false\n\t}\n}\n\n// Close removes all watches and closes the events channel.\nfunc (w *Watcher) Close() error {\n\tif w.isClosed() {\n\t\treturn nil\n\t}\n\n\t// Send 'close' signal to goroutine, and set the Watcher to closed.\n\tclose(w.done)\n\n\t// Wake up goroutine\n\tw.poller.wake()\n\n\t// Wait for goroutine to close\n\t<-w.doneResp\n\n\treturn nil\n}\n\n// Add starts watching the named file or directory (non-recursively).\nfunc (w *Watcher) Add(name string) error {\n\tname = filepath.Clean(name)\n\tif w.isClosed() {\n\t\treturn errors.New(\"inotify instance already closed\")\n\t}\n\n\tconst agnosticEvents = unix.IN_MOVED_TO | unix.IN_MOVED_FROM |\n\t\tunix.IN_CREATE | unix.IN_ATTRIB | unix.IN_MODIFY |\n\t\tunix.IN_MOVE_SELF | unix.IN_DELETE | unix.IN_DELETE_SELF\n\n\tvar flags uint32 = agnosticEvents\n\n\tw.mu.Lock()\n\twatchEntry, found := w.watches[name]\n\tw.mu.Unlock()\n\tif found {\n\t\twatchEntry.flags |= flags\n\t\tflags |= unix.IN_MASK_ADD\n\t}\n\twd, errno := unix.InotifyAddWatch(w.fd, name, flags)\n\tif wd == -1 {\n\t\treturn errno\n\t}\n\n\tw.mu.Lock()\n\tw.watches[name] = &watch{wd: uint32(wd), flags: flags}\n\tw.paths[wd] = name\n\tw.mu.Unlock()\n\n\treturn nil\n}\n\n// Remove stops watching the named file or directory (non-recursively).\nfunc (w *Watcher) Remove(name string) error {\n\tname = filepath.Clean(name)\n\n\t// Fetch the watch.\n\tw.mu.Lock()\n\tdefer w.mu.Unlock()\n\twatch, ok := w.watches[name]\n\n\t// Remove it from inotify.\n\tif !ok {\n\t\treturn fmt.Errorf(\"can't remove non-existent inotify watch for: %s\", name)\n\t}\n\t// inotify_rm_watch will return EINVAL if the file has been deleted;\n\t// the inotify will already have been removed.\n\t// watches and pathes are deleted in ignoreLinux() implicitly and asynchronously\n\t// by calling inotify_rm_watch() below. e.g. readEvents() goroutine receives IN_IGNORE\n\t// so that EINVAL means that the wd is being rm_watch()ed or its file removed\n\t// by another thread and we have not received IN_IGNORE event.\n\tsuccess, errno := unix.InotifyRmWatch(w.fd, watch.wd)\n\tif success == -1 {\n\t\t// TODO: Perhaps it's not helpful to return an error here in every case.\n\t\t// the only two possible errors are:\n\t\t// EBADF, which happens when w.fd is not a valid file descriptor of any kind.\n\t\t// EINVAL, which is when fd is not an inotify descriptor or wd is not a valid watch descriptor.\n\t\t// Watch descriptors are invalidated when they are removed explicitly or implicitly;\n\t\t// explicitly by inotify_rm_watch, implicitly when the file they are watching is deleted.\n\t\treturn errno\n\t}\n\n\t// wait until ignoreLinux() deleting maps\n\texists := true\n\tfor exists {\n\t\tw.cv.Wait()\n\t\t_, exists = w.watches[name]\n\t}\n\n\treturn nil\n}\n\ntype watch struct {\n\twd uint32 // Watch descriptor (as returned by the inotify_add_watch() syscall)\n\tflags uint32 // inotify flags of this watch (see inotify(7) for the list of valid flags)\n}\n\n// readEvents reads from the inotify file descriptor, converts the\n// received events into Event objects and sends them via the Events channel\nfunc (w *Watcher) readEvents() {\n\tvar (\n\t\tbuf [unix.SizeofInotifyEvent * 4096]byte // Buffer for a maximum of 4096 raw events\n\t\tn int // Number of bytes read with read()\n\t\terrno error // Syscall errno\n\t\tok bool // For poller.wait\n\t)\n\n\tdefer close(w.doneResp)\n\tdefer close(w.Errors)\n\tdefer close(w.Events)\n\tdefer unix.Close(w.fd)\n\tdefer w.poller.close()\n\n\tfor {\n\t\t// See if we have been closed.\n\t\tif w.isClosed() {\n\t\t\treturn\n\t\t}\n\n\t\tok, errno = w.poller.wait()\n\t\tif errno != nil {\n\t\t\tselect {\n\t\t\tcase w.Errors <- errno:\n\t\t\tcase <-w.done:\n\t\t\t\treturn\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\tif !ok {\n\t\t\tcontinue\n\t\t}\n\n\t\tn, errno = unix.Read(w.fd, buf[:])\n\t\t// If a signal interrupted execution, see if we've been asked to close, and try again.\n\t\t// http://man7.org/linux/man-pages/man7/signal.7.html :\n\t\t// \"Before Linux 3.8, reads from an inotify(7) file descriptor were not restartable\"\n\t\tif errno == unix.EINTR {\n\t\t\tcontinue\n\t\t}\n\n\t\t// unix.Read might have been woken up by Close. If so, we're done.\n\t\tif w.isClosed() {\n\t\t\treturn\n\t\t}\n\n\t\tif n < unix.SizeofInotifyEvent {\n\t\t\tvar err error\n\t\t\tif n == 0 {\n\t\t\t\t// If EOF is received. This should really never happen.\n\t\t\t\terr = io.EOF\n\t\t\t} else if n < 0 {\n\t\t\t\t// If an error occurred while reading.\n\t\t\t\terr = errno\n\t\t\t} else {\n\t\t\t\t// Read was too short.\n\t\t\t\terr = errors.New(\"notify: short read in readEvents()\")\n\t\t\t}\n\t\t\tselect {\n\t\t\tcase w.Errors <- err:\n\t\t\tcase <-w.done:\n\t\t\t\treturn\n\t\t\t}\n\t\t\tcontinue\n\t\t}\n\n\t\tvar offset uint32\n\t\t// We don't know how many events we just read into the buffer\n\t\t// While the offset points to at least one whole event...\n\t\tfor offset <= uint32(n-unix.SizeofInotifyEvent) {\n\t\t\t// Point \"raw\" to the event in the buffer\n\t\t\traw := (*unix.InotifyEvent)(unsafe.Pointer(&buf[offset]))\n\n\t\t\tmask := uint32(raw.Mask)\n\t\t\tnameLen := uint32(raw.Len)\n\t\t\t// If the event happened to the watched directory or the watched file, the kernel\n\t\t\t// doesn't append the filename to the event, but we would like to always fill the\n\t\t\t// the \"Name\" field with a valid filename. We retrieve the path of the watch from\n\t\t\t// the \"paths\" map.\n\t\t\tw.mu.Lock()\n\t\t\tname := w.paths[int(raw.Wd)]\n\t\t\tw.mu.Unlock()\n\t\t\tif nameLen > 0 {\n\t\t\t\t// Point \"bytes\" at the first byte of the filename\n\t\t\t\tbytes := (*[unix.PathMax]byte)(unsafe.Pointer(&buf[offset+unix.SizeofInotifyEvent]))\n\t\t\t\t// The filename is padded with NULL bytes. TrimRight() gets rid of those.\n\t\t\t\tname += \"/\" + strings.TrimRight(string(bytes[0:nameLen]), \"\\000\")\n\t\t\t}\n\n\t\t\tevent := newEvent(name, mask)\n\n\t\t\t// Send the events that are not ignored on the events channel\n\t\t\tif !event.ignoreLinux(w, raw.Wd, mask) {\n\t\t\t\tselect {\n\t\t\t\tcase w.Events <- event:\n\t\t\t\tcase <-w.done:\n\t\t\t\t\treturn\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Move to the next event in the buffer\n\t\t\toffset += unix.SizeofInotifyEvent + nameLen\n\t\t}\n\t}\n}\n\n// Certain types of events can be \"ignored\" and not sent over the Events\n// channel. Such as events marked ignore by the kernel, or MODIFY events\n// against files that do not exist.\nfunc (e *Event) ignoreLinux(w *Watcher, wd int32, mask uint32) bool {\n\t// Ignore anything the inotify API says to ignore\n\tif mask&unix.IN_IGNORED == unix.IN_IGNORED {\n\t\tw.mu.Lock()\n\t\tdefer w.mu.Unlock()\n\t\tname := w.paths[int(wd)]\n\t\tdelete(w.paths, int(wd))\n\t\tdelete(w.watches, name)\n\t\tw.cv.Broadcast()\n\t\treturn true\n\t}\n\n\t// If the event is not a DELETE or RENAME, the file must exist.\n\t// Otherwise the event is ignored.\n\t// *Note*: this was put in place because it was seen that a MODIFY\n\t// event was sent after the DELETE. This ignores that MODIFY and\n\t// assumes a DELETE will come or has come if the file doesn't exist.\n\tif !(e.Op&Remove == Remove || e.Op&Rename == Rename) {\n\t\t_, statErr := os.Lstat(e.Name)\n\t\treturn os.IsNotExist(statErr)\n\t}\n\treturn false\n}\n\n// newEvent returns an platform-independent Event based on an inotify mask.\nfunc newEvent(name string, mask uint32) Event {\n\te := Event{Name: name}\n\tif mask&unix.IN_CREATE == unix.IN_CREATE || mask&unix.IN_MOVED_TO == unix.IN_MOVED_TO {\n\t\te.Op |= Create\n\t}\n\tif mask&unix.IN_DELETE_SELF == unix.IN_DELETE_SELF || mask&unix.IN_DELETE == unix.IN_DELETE {\n\t\te.Op |= Remove\n\t}\n\tif mask&unix.IN_MODIFY == unix.IN_MODIFY {\n\t\te.Op |= Write\n\t}\n\tif mask&unix.IN_MOVE_SELF == unix.IN_MOVE_SELF || mask&unix.IN_MOVED_FROM == unix.IN_MOVED_FROM {\n\t\te.Op |= Rename\n\t}\n\tif mask&unix.IN_ATTRIB == unix.IN_ATTRIB {\n\t\te.Op |= Chmod\n\t}\n\treturn e\n}\n"} +{"text": "module.exports = [\n 0b0000000000000001,\n 0b0000000000000010,\n 0b0000000000000100,\n 0b0000000000001000,\n 0b0000000000010000,\n 0b0000000000100000,\n 0b0000000001000000,\n 0b0000000010000000,\n 0b0000000100000000,\n 0b0000001000000000,\n 0b0000010000000000,\n 0b0000100000000000,\n 0b0001000000000000,\n 0b0010000000000000,\n 0b0100000000000000,\n 0b1000000000000000,\n 0b0000000000000000,\n 0b0000000000000000,\n 0b0000000000000000,\n 0b0000000000000000,\n 0b0000000000000000,\n 0b0000000000000000,\n 0b0000000000000000,\n 0b0000000000000000,\n 0b0001001011001001,\n 0b0001010111000000,\n 0b0001001011111001,\n 0b0000000011100011,\n 0b0000010100110000,\n 0b0001001011001000,\n 0b0011101000000000,\n 0b0001011100000000,\n 0b0000000000000000, //\n 0b0000000000000110, // !\n 0b0000001000100000, // \"\n 0b0001001011001110, // #\n 0b0001001011101101, // $\n 0b0000110000100100, // %\n 0b0010001101011101, // &\n 0b0000010000000000, // '\n 0b0010010000000000, // (\n 0b0000100100000000, // )\n 0b0011111111000000, // *\n 0b0001001011000000, // +\n 0b0000100000000000, // ,\n 0b0000000011000000, // -\n 0b0000000000000000, // .\n 0b0000110000000000, // /\n 0b0000110000111111, // 0\n 0b0000000000000110, // 1\n 0b0000000011011011, // 2\n 0b0000000010001111, // 3\n 0b0000000011100110, // 4\n 0b0010000001101001, // 5\n 0b0000000011111101, // 6\n 0b0000000000000111, // 7\n 0b0000000011111111, // 8\n 0b0000000011101111, // 9\n 0b0001001000000000, // :\n 0b0000101000000000, // ;\n 0b0010010000000000, // <\n 0b0000000011001000, // =\n 0b0000100100000000, // >\n 0b0001000010000011, // ?\n 0b0000001010111011, // @\n 0b0000000011110111, // A\n 0b0001001010001111, // B\n 0b0000000000111001, // C\n 0b0001001000001111, // D\n 0b0000000011111001, // E\n 0b0000000001110001, // F\n 0b0000000010111101, // G\n 0b0000000011110110, // H\n 0b0001001000000000, // I\n 0b0000000000011110, // J\n 0b0010010001110000, // K\n 0b0000000000111000, // L\n 0b0000010100110110, // M\n 0b0010000100110110, // N\n 0b0000000000111111, // O\n 0b0000000011110011, // P\n 0b0010000000111111, // Q\n 0b0010000011110011, // R\n 0b0000000011101101, // S\n 0b0001001000000001, // T\n 0b0000000000111110, // U\n 0b0000110000110000, // V\n 0b0010100000110110, // W\n 0b0010110100000000, // X\n 0b0001010100000000, // Y\n 0b0000110000001001, // Z\n 0b0000000000111001, // [\n 0b0010000100000000, //\n 0b0000000000001111, // ]\n 0b0000110000000011, // ^\n 0b0000000000001000, // _\n 0b0000000100000000, // `\n 0b0001000001011000, // a\n 0b0010000001111000, // b\n 0b0000000011011000, // c\n 0b0000100010001110, // d\n 0b0000100001011000, // e\n 0b0000000001110001, // f\n 0b0000010010001110, // g\n 0b0001000001110000, // h\n 0b0001000000000000, // i\n 0b0000000000001110, // j\n 0b0011011000000000, // k\n 0b0000000000110000, // l\n 0b0001000011010100, // m\n 0b0001000001010000, // n\n 0b0000000011011100, // o\n 0b0000000101110000, // p\n 0b0000010010000110, // q\n 0b0000000001010000, // r\n 0b0010000010001000, // s\n 0b0000000001111000, // t\n 0b0000000000011100, // u\n 0b0010000000000100, // v\n 0b0010100000010100, // w\n 0b0010100011000000, // x\n 0b0010000000001100, // y\n 0b0000100001001000, // z\n 0b0000100101001001, // {\n 0b0001001000000000, // |\n 0b0010010010001001, // }\n 0b0000010100100000, // ~\n 0b0011111111111111\n];\n"} +{"text": "/*\n * Copyright 2020 Babylon Partners Limited\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage com.babylon.orbit2.sample.posts.domain.repositories\n\nimport android.os.Parcelable\nimport kotlinx.android.parcel.Parcelize\n\n@Parcelize\ndata class PostDetail(\n val id: Int,\n val body: String,\n val comments: List<PostComment>\n) : Parcelable\n"} +{"text": "var express = require('express');\nvar webpack = require('webpack');\nvar webpackConfig = require('./webpack.development');\n\nvar app = express();\nvar compiler = webpack(webpackConfig);\n\napp.use(require('webpack-dev-middleware')(compiler, {\n stats: {\n colors: true,\n },\n}));\n\napp.use(require('webpack-hot-middleware')(compiler));\n\napp.listen(process.env.PORT || 3000, function(err) {\n if (err) {\n console.log(err);\n }\n});\n"} +{"text": "// Copyright 2015 go-swagger maintainers\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage spec\n\nimport (\n\t\"encoding/json\"\n\n\t\"github.com/go-openapi/jsonpointer\"\n\t\"github.com/go-openapi/swag\"\n)\n\n// TagProps describe a tag entry in the top level tags section of a swagger spec\ntype TagProps struct {\n\tDescription string `json:\"description,omitempty\"`\n\tName string `json:\"name,omitempty\"`\n\tExternalDocs *ExternalDocumentation `json:\"externalDocs,omitempty\"`\n}\n\n// NewTag creates a new tag\nfunc NewTag(name, description string, externalDocs *ExternalDocumentation) Tag {\n\treturn Tag{TagProps: TagProps{Description: description, Name: name, ExternalDocs: externalDocs}}\n}\n\n// Tag allows adding meta data to a single tag that is used by the\n// [Operation Object](http://goo.gl/8us55a#operationObject).\n// It is not mandatory to have a Tag Object per tag used there.\n//\n// For more information: http://goo.gl/8us55a#tagObject\ntype Tag struct {\n\tVendorExtensible\n\tTagProps\n}\n\n// JSONLookup implements an interface to customize json pointer lookup\nfunc (t Tag) JSONLookup(token string) (interface{}, error) {\n\tif ex, ok := t.Extensions[token]; ok {\n\t\treturn &ex, nil\n\t}\n\n\tr, _, err := jsonpointer.GetForToken(t.TagProps, token)\n\treturn r, err\n}\n\n// MarshalJSON marshal this to JSON\nfunc (t Tag) MarshalJSON() ([]byte, error) {\n\tb1, err := json.Marshal(t.TagProps)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tb2, err := json.Marshal(t.VendorExtensible)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn swag.ConcatJSON(b1, b2), nil\n}\n\n// UnmarshalJSON marshal this from JSON\nfunc (t *Tag) UnmarshalJSON(data []byte) error {\n\tif err := json.Unmarshal(data, &t.TagProps); err != nil {\n\t\treturn err\n\t}\n\treturn json.Unmarshal(data, &t.VendorExtensible)\n}\n"} +{"text": "/* -*- P4_16 -*- */\n#include <core.p4>\n#include <v1model.p4>\n\n//My includes\n#include \"include/headers.p4\"\n#include \"include/parsers.p4\"\n\n\n/*************************************************************************\n************ C H E C K S U M V E R I F I C A T I O N *************\n*************************************************************************/\n\ncontrol MyVerifyChecksum(inout headers hdr, inout metadata meta) {\n apply { }\n}\n\n\n/*************************************************************************\n************** I N G R E S S P R O C E S S I N G *******************\n*************************************************************************/\n\ncontrol MyIngress(inout headers hdr,\n inout metadata meta,\n inout standard_metadata_t standard_metadata) {\n\n action drop() {\n mark_to_drop(standard_metadata);\n }\n\n action ipv4_forward(macAddr_t dstAddr, egressSpec_t port) {\n\n //set the src mac address as the previous dst, this is not correct right?\n hdr.ethernet.srcAddr = hdr.ethernet.dstAddr;\n\n //set the destination mac address that we got from the match in the table\n hdr.ethernet.dstAddr = dstAddr;\n\n //set the output port that we also get from the table\n standard_metadata.egress_spec = port;\n\n //decrease ttl by 1\n hdr.ipv4.ttl = hdr.ipv4.ttl -1;\n\n }\n\n table ipv4_lpm {\n key = {\n hdr.ipv4.dstAddr: lpm;\n }\n actions = {\n ipv4_forward;\n drop;\n NoAction;\n }\n size = 1024;\n default_action = NoAction();\n }\n\n apply {\n\n //only if IPV4 the rule is applied. Therefore other packets will not be forwarded.\n if (hdr.ipv4.isValid()){\n ipv4_lpm.apply();\n\n }\n }\n}\n\n/*************************************************************************\n**************** E G R E S S P R O C E S S I N G *******************\n*************************************************************************/\n\ncontrol MyEgress(inout headers hdr,\n inout metadata meta,\n inout standard_metadata_t standard_metadata) {\n\n\n action add_int_header(switch_id_t swid){\n\n //increase int stack counter by one\n hdr.int_count.num_switches = hdr.int_count.num_switches + 1;\n\n hdr.int_headers.push_front(1);\n // This was not needed in older specs. Now by default pushed\n // invalid elements are\n hdr.int_headers[0].setValid();\n hdr.int_headers[0].switch_id = (bit<13>)swid;\n hdr.int_headers[0].queue_depth = (bit<13>)standard_metadata.deq_qdepth;\n hdr.int_headers[0].output_port = (bit<6>)standard_metadata.egress_port;\n\n //update ip header length\n hdr.ipv4.ihl = hdr.ipv4.ihl + 1;\n hdr.ipv4.totalLen = hdr.ipv4.totalLen + 4;\n hdr.ipv4_option.optionLength = hdr.ipv4_option.optionLength + 4;\n }\n\n table int_table {\n actions = {\n add_int_header;\n NoAction;\n }\n default_action = NoAction();\n }\n\n apply {\n if (hdr.int_count.isValid()){\n int_table.apply();\n }\n }\n}\n\n/*************************************************************************\n************* C H E C K S U M C O M P U T A T I O N **************\n*************************************************************************/\n\ncontrol MyComputeChecksum(inout headers hdr, inout metadata meta) {\n apply {\n\tupdate_checksum(\n\t hdr.ipv4.isValid(),\n { hdr.ipv4.version,\n\t hdr.ipv4.ihl,\n hdr.ipv4.dscp,\n hdr.ipv4.ecn,\n hdr.ipv4.totalLen,\n hdr.ipv4.identification,\n hdr.ipv4.flags,\n hdr.ipv4.fragOffset,\n hdr.ipv4.ttl,\n hdr.ipv4.protocol,\n hdr.ipv4.srcAddr,\n hdr.ipv4.dstAddr },\n hdr.ipv4.hdrChecksum,\n HashAlgorithm.csum16);\n }\n}\n\n\n\n\n/*************************************************************************\n*********************** S W I T C H *******************************\n*************************************************************************/\n\n//switch architecture\nV1Switch(\nMyParser(),\nMyVerifyChecksum(),\nMyIngress(),\nMyEgress(),\nMyComputeChecksum(),\nMyDeparser()\n) main;"} +{"text": "// Copyright 2001-2019 Crytek GmbH / Crytek Group. All rights reserved.\n\n#pragma once\n\n#if defined(FEATURE_SVO_GI)\n\n\t#include \"GraphicsPipeline/Common/ComputeRenderPass.h\"\n\t#include \"GraphicsPipeline/Common/FullscreenPass.h\"\n\nclass CSvoComputePass : public CComputeRenderPass\n{\npublic:\n\n\tCSvoComputePass(CGraphicsPipeline* pGraphicsPipeline)\n\t\t: CComputeRenderPass::CComputeRenderPass(pGraphicsPipeline, CSvoComputePass::eFlags_ReflectConstantBuffersFromShader)\n\t{\n\t}\n\n\tint nPrevTargetSize = 0;\n};\n\nclass CSvoFullscreenPass : public CFullscreenPass\n{\npublic:\n\tCSvoFullscreenPass(CGraphicsPipeline* pGraphicsPipeline) : CFullscreenPass(pGraphicsPipeline) {}\n\tint nPrevTargetSize = 0;\n};\n\nstruct SSvoTargetsSet\n{\n\tSSvoTargetsSet(CGraphicsPipeline* pGraphicsPipeline)\n\t\t: passConeTrace(pGraphicsPipeline)\n\t\t, passDemosaic(pGraphicsPipeline)\n\t\t, passUpscale(pGraphicsPipeline) {}\n\n\t// tracing targets\n\t_smart_ptr<CTexture> pRT_RGB_0, pRT_ALD_0, pRT_RGB_1, pRT_ALD_1;\n\n\t// de-mosaic targets\n\t_smart_ptr<CTexture> pRT_RGB_DEM_MIN_0, pRT_ALD_DEM_MIN_0, pRT_RGB_DEM_MAX_0, pRT_ALD_DEM_MAX_0;\n\t_smart_ptr<CTexture> pRT_RGB_DEM_MIN_1, pRT_ALD_DEM_MIN_1, pRT_RGB_DEM_MAX_1, pRT_ALD_DEM_MAX_1;\n\n\t// output\n\t_smart_ptr<CTexture> pRT_FIN_OUT_0, pRT_FIN_OUT_1;\n\n\tCSvoFullscreenPass passConeTrace;\n\tCSvoFullscreenPass passDemosaic;\n\tCSvoFullscreenPass passUpscale;\n};\n\nstruct SSvoPrimitivePasses\n{\n\tSSvoTargetsSet m_tsDiff, m_tsSpec;\n\n\t// passes\n\tCSvoComputePass m_passClearBricks;\n\tCSvoComputePass m_passInjectDynamicLights;\n\tCSvoComputePass m_passInjectStaticLights;\n\tCSvoComputePass m_passInjectAirOpacity;\n\tCSvoComputePass m_passPropagateLighting_1to2;\n\tCSvoComputePass m_passPropagateLighting_2to3;\n\tCSvoFullscreenPass m_passTroposphere;\n\n\tSGraphicsPipelineKey currentKey;\n\n\tSSvoPrimitivePasses(CGraphicsPipeline* pGraphicsPipeline);\n};\n\nclass CSvoRenderer : public ISvoRenderer\n{\npublic:\n\tstruct SForwardParams\n\t{\n\t\tVec4 IntegrationMode;\n\t};\n\n\t// ISvoRenderer\n\tvoid Release() final;\n\tvoid InitCVarValues() final;\n\n\tstatic CSvoRenderer* GetInstance(bool bCheckAlloce = false);\n\tstatic bool IsActive();\n\tvoid UpdateCompute(CRenderView* pRenderView);\n\tvoid UpdateRender(CRenderView* pRenderView);\n\tint GetIntegratioMode() const;\n\tint GetIntegratioMode(bool& bSpecTracingInUse) const;\n\tbool GetUseLightProbes() const { return e_svoTI_SkyColorMultiplier >= 0; }\n\tvoid DebugDrawStats(const RPProfilerStats* pBasicStats, float& ypos, const float ystep, float xposms);\n\tsize_t GetAllocatedMemory();\n\n\tstatic bool SetShaderParameters(float*& pSrc, uint32 paramType, UFloat4* sData);\n\tstatic CTexture* GetRsmColorMap(CGraphicsPipeline& graphicsPipeline, const ShadowMapFrustum& rFr, bool bCheckUpdate = false);\n\tstatic CTexture* GetRsmNormlMap(CGraphicsPipeline& graphicsPipeline, const ShadowMapFrustum& rFr, bool bCheckUpdate = false);\n\tShadowMapFrustum* GetRsmSunFrustum(const CRenderView* pRenderView) const;\n\tCTexture* GetTroposphereMinRT();\n\tCTexture* GetTroposphereMaxRT();\n\tCTexture* GetTroposphereShadRT();\n\tCTexture* GetTracedSunShadowsRT();\n\tCTexture* GetDiffuseFinRT();\n\tCTexture* GetSpecularFinRT();\n\tfloat GetSsaoAmount() { return IsActive() ? e_svoTI_SSAOAmount : 1.f; }\n\tfloat GetVegetationMaxOpacity() { return e_svoTI_VegetationMaxOpacity; }\n\tCTexture* GetRsmPoolCol() { return IsActive() ? s_pRsmPoolCol.get() : NULL; }\n\tCTexture* GetRsmPoolNor() { return IsActive() ? s_pRsmPoolNor.get() : NULL; }\n\tstatic void GetRsmTextures(_smart_ptr<CTexture>& pRsmColorMap, _smart_ptr<CTexture>& pRsmNormlMap, _smart_ptr<CTexture>& pRsmPoolCol, _smart_ptr<CTexture>& pRsmPoolNor);\n\tColorF GetSkyColor() { return m_texInfo.vSkyColorTop; }\n\n\tvoid FillForwardParams(SForwardParams& svogiParams, bool enable = true) const;\n\n\tvoid BeginFrame(CGraphicsPipeline* pGraphicsPipeline)\n\t{\n\t\tif (!m_pPasses || m_pPasses->currentKey != pGraphicsPipeline->GetKey())\n\t\t{\n\t\t\tm_pPasses = stl::make_unique<SSvoPrimitivePasses>(pGraphicsPipeline);\n\t\t}\n\t}\n\nprotected:\n\n\tCSvoRenderer();\n\tvirtual ~CSvoRenderer() {}\n\n\t// ISvoRenderer\n\tvoid SetEditingHelper(const Sphere& sp) final;\n\tbool IsShaderItemUsedForVoxelization(SShaderItem& rShaderItem, IRenderNode* pRN) final;\n\n\tstatic CTexture* GetGBuffer(const CGraphicsPipelineResources& pipelineResources, int nId);\n\tstatic CTexture* GetZBuffer(const CGraphicsPipelineResources& pipelineResources, bool bLinear = true);\n\tvoid UpscalePass(SSvoTargetsSet* pTS);\n\tvoid DemosaicPass(SSvoTargetsSet* pTS);\n\tvoid ConeTracePass(SSvoTargetsSet* pTS);\n\n\ttemplate<class T> void SetupCommonSamplers(T& rp);\n\ttemplate<class T> void SetupCommonConstants(SSvoTargetsSet* pTS, T& rp, CTexture* pRT);\n\ttemplate<class T> void SetupRsmSunTextures(T& rp);\n\ttemplate<class T> void SetupRsmSunConstants(T& rp);\n\n\tvoid TropospherePass();\n\tvoid TraceSunShadowsPass();\n\n\tvoid SetupGBufferTextures(CSvoFullscreenPass& rp);\n\n\tvoid CheckCreateUpdateRT(_smart_ptr<CTexture>& pTex, int nWidth, int nHeight, ETEX_Format eTF, ETEX_Type eTT, int nTexFlags, const char* szName);\n\n\tvoid UpdateGpuVoxParams(I3DEngine::SSvoNodeInfo& nodeInfo);\n\tvoid ExecuteComputeShader(const char* szTechFinalName, CSvoComputePass& rp, int* nNodesForUpdateStartIndex, int nObjPassId, PodArray<I3DEngine::SSvoNodeInfo>& arrNodesForUpdate);\n\tuint64 GetRunTimeFlags(bool bDiffuseMode = true, bool bPixelShader = true);\n\ttemplate<class T> void SetupSvoTexturesForRead(I3DEngine::SSvoStaticTexInfo& texInfo, T& rp, int nStage, int nStageOpa = 0, int nStageNorm = 0);\n\tvoid SetupNodesForUpdate(int& nNodesForUpdateStartIndex, PodArray<I3DEngine::SSvoNodeInfo>& arrNodesForUpdate, CSvoComputePass& rp);\n\tvoid CheckAllocateRT(bool bSpecPass);\n\ttemplate<class T> void SetupLightSources(PodArray<I3DEngine::SLightTI>& lightsTI, T& rp);\n\ttemplate<class T> void BindTiledLights(PodArray<I3DEngine::SLightTI>& lightsTI, T& rp);\n\tvoid DrawPonts(PodArray<SVF_P3F_C4B_T2F>& arrVerts);\n\tvoid VoxelizeRE();\n\tbool VoxelizeMeshes(CShader* ef, SShaderPass* sfm);\n\n\tCRenderView* RenderView() const { return m_pRenderView; }\n\n\t#ifdef FEATURE_SVO_GI_ALLOW_HQ\n\t_smart_ptr<CTexture> m_pRT_NID_0;\n\t_smart_ptr<CTexture> m_pRT_AIR_MIN;\n\t_smart_ptr<CTexture> m_pRT_AIR_MAX;\n\t_smart_ptr<CTexture> m_pRT_SHAD_MIN_MAX;\n\t_smart_ptr<CTexture> m_pRT_SHAD_FIN_0, m_pRT_SHAD_FIN_1;\n\t#endif\n\n\tMatrix44A m_matReproj;\n\tMatrix44A m_matViewProjPrev;\n\tCShader* m_pShader;\n\t_smart_ptr<CTexture> m_pNoiseTex;\n\t_smart_ptr<CTexture> m_pCloudShadowTex;\n\tstatic _smart_ptr<CTexture> s_pRsmColorMap;\n\tstatic _smart_ptr<CTexture> s_pRsmNormlMap;\n\tstatic _smart_ptr<CTexture> s_pRsmPoolCol;\n\tstatic _smart_ptr<CTexture> s_pRsmPoolNor;\n\n\t// Currently used render view\n\tCRenderView* m_pRenderView;\n\n\t#ifdef FEATURE_SVO_GI_ALLOW_HQ\n\tstruct SVoxPool\n\t{\n\t\tSVoxPool() { nTexId = 0; pUAV = 0; pSRV = 0; }\n\t\tvoid Init(ITexture* pTex);\n\t\tint nTexId;\n\t\tD3DUAV* pUAV;\n\t\tD3DShaderResource* pSRV;\n\t\tCTexture* pTex;\n\t};\n\n\tSVoxPool vp_OPAC;\n\tSVoxPool vp_RGB0;\n\tSVoxPool vp_RGB1;\n\tSVoxPool vp_DYNL;\n\tSVoxPool vp_RGB2;\n\tSVoxPool vp_RGB3;\n\tSVoxPool vp_RGB4;\n\tSVoxPool vp_NORM;\n\tSVoxPool vp_ALDI;\n\t#endif\n\n\tPodArray<I3DEngine::SSvoNodeInfo> m_arrNodesForUpdateIncr;\n\tPodArray<I3DEngine::SSvoNodeInfo> m_arrNodesForUpdateNear;\n\tPodArray<I3DEngine::SLightTI> m_arrLightsStatic;\n\tPodArray<I3DEngine::SLightTI> m_arrLightsDynamic;\n\tPodArray<SVF_P3F_C4B_T2F> m_arrVerts;\n\tMatrix44A m_mGpuVoxViewProj[3];\n\tVec4 m_wsOffset, m_tcOffset;\n\tstatic const int SVO_MAX_NODE_GROUPS = 4;\n\tfloat m_arrNodesForUpdate[SVO_MAX_NODE_GROUPS][4][4];\n\tint m_nCurPropagationPassID;\n\tI3DEngine::SSvoStaticTexInfo m_texInfo;\n\tstatic CSvoRenderer* s_pInstance;\n\tPodArray<I3DEngine::SSvoNodeInfo> m_arrNodeInfo;\n\n\tstd::unique_ptr<SSvoPrimitivePasses> m_pPasses;\n\n\t// cvar values\n\t#define INIT_ALL_SVO_CVARS \\\n\t INIT_SVO_CVAR(int, e_svoDVR); \\\n\t INIT_SVO_CVAR(int, e_svoEnabled); \\\n\t INIT_SVO_CVAR(int, e_svoRender); \\\n\t INIT_SVO_CVAR(int, e_svoTI_ResScaleBase); \\\n\t INIT_SVO_CVAR(int, e_svoTI_ResScaleAir); \\\n\t INIT_SVO_CVAR(int, e_svoTI_ResScaleSpecular); \\\n\t INIT_SVO_CVAR(int, e_svoTI_Active); \\\n\t INIT_SVO_CVAR(int, e_svoTI_IntegrationMode); \\\n\t INIT_SVO_CVAR(float, e_svoTI_InjectionMultiplier); \\\n\t INIT_SVO_CVAR(float, e_svoTI_SkyColorMultiplier); \\\n\t INIT_SVO_CVAR(float, e_svoTI_DiffuseAmplifier); \\\n\t INIT_SVO_CVAR(float, e_svoTI_TranslucentBrightness); \\\n\t INIT_SVO_CVAR(int, e_svoTI_NumberOfBounces); \\\n\t INIT_SVO_CVAR(float, e_svoTI_Saturation); \\\n\t INIT_SVO_CVAR(float, e_svoTI_PropagationBooster); \\\n\t INIT_SVO_CVAR(float, e_svoTI_DiffuseBias); \\\n\t INIT_SVO_CVAR(float, e_svoTI_DiffuseConeWidth); \\\n\t INIT_SVO_CVAR(float, e_svoTI_ConeMaxLength); \\\n\t INIT_SVO_CVAR(float, e_svoTI_SpecularAmplifier); \\\n\t INIT_SVO_CVAR(float, e_svoMinNodeSize); \\\n\t INIT_SVO_CVAR(float, e_svoMaxNodeSize); \\\n\t INIT_SVO_CVAR(int, e_svoTI_LowSpecMode); \\\n\t INIT_SVO_CVAR(int, e_svoTI_HalfresKernelPrimary); \\\n\t INIT_SVO_CVAR(int, e_svoTI_HalfresKernelSecondary); \\\n\t INIT_SVO_CVAR(int, e_svoVoxelPoolResolution); \\\n\t INIT_SVO_CVAR(int, e_svoTI_Apply); \\\n\t INIT_SVO_CVAR(float, e_svoTI_Diffuse_Spr); \\\n\t INIT_SVO_CVAR(int, e_svoTI_Diffuse_Cache); \\\n\t INIT_SVO_CVAR(int, e_svoTI_SpecularFromDiffuse); \\\n\t INIT_SVO_CVAR(int, e_svoTI_DynLights); \\\n\t INIT_SVO_CVAR(int, e_svoTI_ShadowsFromSun); \\\n\t INIT_SVO_CVAR(int, e_svoTI_ShadowsFromHeightmap); \\\n\t INIT_SVO_CVAR(int, e_svoTI_Troposphere_Active); \\\n\t INIT_SVO_CVAR(float, e_svoTI_Troposphere_Brightness); \\\n\t INIT_SVO_CVAR(float, e_svoTI_Troposphere_Ground_Height); \\\n\t INIT_SVO_CVAR(float, e_svoTI_Troposphere_Layer0_Height); \\\n\t INIT_SVO_CVAR(float, e_svoTI_Troposphere_Layer1_Height); \\\n\t INIT_SVO_CVAR(float, e_svoTI_Troposphere_Snow_Height); \\\n\t INIT_SVO_CVAR(float, e_svoTI_Troposphere_Layer0_Rand); \\\n\t INIT_SVO_CVAR(float, e_svoTI_Troposphere_Layer1_Rand); \\\n\t INIT_SVO_CVAR(float, e_svoTI_Troposphere_Layer0_Dens); \\\n\t INIT_SVO_CVAR(float, e_svoTI_Troposphere_Layer1_Dens); \\\n\t INIT_SVO_CVAR(float, e_svoTI_Troposphere_CloudGen_Height); \\\n\t INIT_SVO_CVAR(float, e_svoTI_Troposphere_CloudGen_Freq); \\\n\t INIT_SVO_CVAR(float, e_svoTI_Troposphere_CloudGen_FreqStep); \\\n\t INIT_SVO_CVAR(float, e_svoTI_Troposphere_CloudGen_Scale); \\\n\t INIT_SVO_CVAR(float, e_svoTI_Troposphere_CloudGenTurb_Freq); \\\n\t INIT_SVO_CVAR(float, e_svoTI_Troposphere_CloudGenTurb_Scale); \\\n\t INIT_SVO_CVAR(float, e_svoTI_Troposphere_Density); \\\n\t INIT_SVO_CVAR(int, e_svoTI_RT_Active); \\\n\t INIT_SVO_CVAR(float, e_svoTI_RT_MaxDistRay); \\\n\t INIT_SVO_CVAR(float, e_svoTI_RT_MaxDistCam); \\\n\t INIT_SVO_CVAR(float, e_svoTI_RT_MinGloss); \\\n\t INIT_SVO_CVAR(float, e_svoTI_RT_MinRefl); \\\n\t INIT_SVO_CVAR(float, e_svoTI_ShadowsSoftness); \\\n\t INIT_SVO_CVAR(float, e_svoTI_Specular_Sev); \\\n\t INIT_SVO_CVAR(float, e_svoTI_SSAOAmount); \\\n\t INIT_SVO_CVAR(float, e_svoTI_PortalsDeform); \\\n\t INIT_SVO_CVAR(float, e_svoTI_PortalsInject); \\\n\t INIT_SVO_CVAR(int, e_svoTI_SunRSMInject); \\\n\t INIT_SVO_CVAR(int, e_svoDispatchX); \\\n\t INIT_SVO_CVAR(int, e_svoDispatchY); \\\n\t INIT_SVO_CVAR(int, e_svoDebug); \\\n\t INIT_SVO_CVAR(int, e_svoVoxGenRes); \\\n\t INIT_SVO_CVAR(float, e_svoDVR_DistRatio); \\\n\t INIT_SVO_CVAR(int, e_svoTI_GsmCascadeLod); \\\n\t INIT_SVO_CVAR(float, e_svoTI_SSDepthTrace); \\\n\t INIT_SVO_CVAR(float, e_svoTI_EmissiveMultiplier); \\\n\t INIT_SVO_CVAR(float, e_svoTI_PointLightsMultiplier); \\\n\t INIT_SVO_CVAR(float, e_svoTI_TemporalFilteringBase); \\\n\t INIT_SVO_CVAR(float, e_svoTI_HighGlossOcclusion); \\\n\t INIT_SVO_CVAR(float, e_svoTI_VegetationMaxOpacity); \\\n\t INIT_SVO_CVAR(float, e_svoTI_MinReflectance); \\\n\t INIT_SVO_CVAR(int, e_svoTI_DualTracing); \\\n\t INIT_SVO_CVAR(int, e_svoTI_AnalyticalOccluders); \\\n\t INIT_SVO_CVAR(int, e_svoTI_RsmUseColors); \\\n\t INIT_SVO_CVAR(float, e_svoTI_AnalyticalOccludersRange); \\\n\t INIT_SVO_CVAR(float, e_svoTI_AnalyticalOccludersSoftness); \\\n\t INIT_SVO_CVAR(int, e_svoTI_AnalyticalGI); \\\n\t INIT_SVO_CVAR(int, e_svoTI_TraceVoxels); \\\n\t INIT_SVO_CVAR(int, e_svoTI_AsyncCompute); \\\n\t INIT_SVO_CVAR(float, e_svoTI_SkyLightBottomMultiplier); \\\n\t INIT_SVO_CVAR(float, e_svoTI_VoxelOpacityMultiplier); \\\n\t INIT_SVO_CVAR(float, e_svoTI_PointLightsBias); \\\n\t // INIT_ALL_SVO_CVARS\n\n\t#define INIT_SVO_CVAR(_type, _var) _type _var = 0;\n\tINIT_ALL_SVO_CVARS;\n\t#undef INIT_SVO_CVAR\n};\n\n#endif // FEATURE_SVO_GI\n"} +{"text": "package com.briup.spring.aop;\n\npublic interface UserDao {\n\tpublic abstract void saveUser(User user) ;\n\t\n}\n"} +{"text": "<!doctype html>\n<html>\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<title>Node Examples</title>\n\t\t<link rel=\"stylesheet\" href=\"../themes/default/default.css\" />\n\t\t<script src=\"../kindeditor.js\"></script>\n\t\t<style>\n\t\t\t.cls {\n\t\t\t\tborder : 1px solid #A0A0A0;\n\t\t\t\tmargin : 10px;\n\t\t\t\tpadding : 10px;\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\t\t\t.on {\n\t\t\t\tborder : 1px solid red;\n\t\t\t\tbackground-color : #F0F0F0;\n\t\t\t}\n\t\t</style>\n\t\t<script>\n\t\t\tKindEditor.ready(function(K) {\n\t\t\t\tK('.cls').mouseover(function(e) {\n\t\t\t\t\tK(this).addClass('on');\n\t\t\t\t})\n\t\t\t\t.mouseout(function(e) {\n\t\t\t\t\tK(this).removeClass('on');\n\t\t\t\t})\n\t\t\t\t.click(function(e) {\n\t\t\t\t\teval(K.unescape(K(this).html()));\n\t\t\t\t});\n\t\t\t});\n\t\t</script>\n\t</head>\n\t<body>\n\t\t<div class=\"cls\">K('div#id').addClass('cls');</div>\n\t\t<div class=\"cls\">K('div.class').css('margin', '10px');</div>\n\t\t<div class=\"cls\">K('#id img').css('border', '1px solid #000').attr('title', 'hello');</div>\n\t\t<div class=\"cls\">K('#id > div').width(200).height(50).css('border', '1px solid #000');</div>\n\t\t<div class=\"cls\">K('a[href=\"\\\\#\"]').attr('href', 'http://www.kindsoft.net/');</div>\n\t\t<div id=\"id\">\n\t\t\t<div class=\"class\">class1</div>\n\t\t\t<div class=\"class\"><a href=\"#\" target=\"_blank\">class2</a></div>\n\t\t\t<a href=\"#\" target=\"_blank\"><img src=\"http://www.kindsoft.net/images/logo_180_30.gif\" /></a>\n\t\t</div>\n\t</body>\n</html>\n"} +{"text": "/*\n * ISrc.java\n * \n * Created on Oct 15, 2007, 1:31:05 PM\n * \n * To change this template, choose Tools | Template Manager\n * and open the template in the editor.\n */\npackage org.pmedv.blackboard.spice.sim.spice.parse.source.isrc;\n\nimport org.pmedv.blackboard.spice.sim.spice.model.sources.isrcs.ISrcInstance;\nimport org.pmedv.blackboard.spice.sim.spice.parse.Deck;\nimport org.pmedv.blackboard.spice.sim.spice.parse.ParserException;\nimport org.pmedv.blackboard.spice.sim.spice.parse.source.IndependentSourceCard;\n\n/**\n * \n * @author Kristopher T. Beck\n */\npublic class ISrcCard extends IndependentSourceCard {\n\n public ISrcCard() {\n nodeCount = 2;\n prefix = \"I\";\n }\n\n public ISrcCard(String cardString) throws ParserException {\n this();\n this.cardString = cardString;\n parse(cardString);\n }\n\n public ISrcInstance createInstance(Deck deck) {\n ISrcInstance instance = new ISrcInstance();\n initSrcValues(instance, deck);\n return instance;\n }\n}\n"} +{"text": "'label':'car' 'bounding box':(568,433,649,459)\n'label':'car' 'bounding box':(431,454,481,499)\n'label':'car' 'bounding box':(356,446,446,505)\n'label':'car' 'bounding box':(339,457,396,510)\n'label':'car' 'bounding box':(234,454,333,482)\n'label':'car' 'bounding box':(149,460,275,525)\n'label':'car' 'bounding box':(230,458,377,532)\n'label':'person' 'bounding box':(661,420,683,485)\n'label':'person' 'bounding box':(1565,356,1610,500)\n'label':'car' 'bounding box':(1040,417,1103,465)\n'label':'car' 'bounding box':(1065,424,1100,474)\n'label':'car' 'bounding box':(1081,423,1117,478)\n'label':'car' 'bounding box':(1096,419,1187,498)\n'label':'car' 'bounding box':(933,433,946,449)\n'label':'car' 'bounding box':(941,429,959,454)\n'label':'car' 'bounding box':(977,428,990,447)\n'label':'car' 'bounding box':(948,428,988,459)\n"} +{"text": "<?php\n\ndeclare(strict_types=1);\n\nnamespace ShlinkMigrations;\n\nuse Doctrine\\DBAL\\Schema\\Index;\nuse Doctrine\\DBAL\\Schema\\Schema;\nuse Doctrine\\DBAL\\Schema\\SchemaException;\nuse Doctrine\\Migrations\\AbstractMigration;\n\nuse function array_reduce;\n\nfinal class Version20191001201532 extends AbstractMigration\n{\n /**\n * @throws SchemaException\n */\n public function up(Schema $schema): void\n {\n $shortUrls = $schema->getTable('short_urls');\n if ($shortUrls->hasIndex('unique_short_code_plus_domain')) {\n return;\n }\n\n /** @var Index|null $shortCodesIndex */\n $shortCodesIndex = array_reduce($shortUrls->getIndexes(), function (?Index $found, Index $current) {\n [$column] = $current->getColumns();\n return $column === 'short_code' ? $current : $found;\n });\n if ($shortCodesIndex === null) {\n return;\n }\n\n $shortUrls->dropIndex($shortCodesIndex->getName());\n $shortUrls->addUniqueIndex(['short_code', 'domain_id'], 'unique_short_code_plus_domain');\n }\n\n /**\n * @throws SchemaException\n */\n public function down(Schema $schema): void\n {\n $shortUrls = $schema->getTable('short_urls');\n\n $shortUrls->dropIndex('unique_short_code_plus_domain');\n $shortUrls->addUniqueIndex(['short_code']);\n }\n}\n"} +{"text": "<!--\n ~ Copyright (c) 2018 Wolfram Research, Inc. All rights reserved.\n ~ Redistribution or use of this work in any form, with or without modification,\n ~ requires written permission from the copyright holder.\n -->\n\n<h3><a href=\"http://reference.wolfram.com/mathematica/ref/Compose.html\">Compose</a></h3><p><b>Attributes:</b> Protected\n</p><p><b>Symbol has no options.</b></p>"} +{"text": "/*\n * Copyright 2000-2017 JetBrains s.r.o.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage com.intellij.openapi.editor;\n\nimport com.intellij.openapi.editor.colors.EditorColors;\nimport com.intellij.openapi.editor.ex.EditorEx;\nimport com.intellij.openapi.editor.impl.EditorImpl;\nimport com.intellij.openapi.editor.markup.EffectType;\nimport com.intellij.openapi.editor.markup.HighlighterLayer;\nimport com.intellij.openapi.editor.markup.TextAttributes;\nimport com.intellij.testFramework.TestDataPath;\nimport org.jetbrains.annotations.NotNull;\n\nimport java.awt.*;\n\n@TestDataPath(\"$CONTENT_ROOT/testData/editor/painting/right\")\npublic class RightAlignedEditorPaintingTest extends EditorPaintingTestCase {\n @Override\n protected void initText(@NotNull String fileText) {\n super.initText(fileText);\n ((EditorImpl)getEditor()).setHorizontalTextAlignment(EditorImpl.TEXT_ALIGNMENT_RIGHT);\n }\n\n public void testWholeLineHighlighterAtDocumentEnd() throws Exception {\n initText(\"foo\");\n addLineHighlighter(0, 3, HighlighterLayer.WARNING, null, Color.red);\n checkResult();\n }\n\n public void testBoxedHighlightingLastLinePartially() throws Exception {\n initText(\"foo\\nbar bar\");\n addBorderHighlighter(2, 7, HighlighterLayer.WARNING, Color.red);\n checkResult();\n }\n\n public void testUpperHighlighterCanSetDefaultForegroundColor() throws Exception {\n initText(\"foo\");\n addRangeHighlighter(1, 3, HighlighterLayer.WARNING, Color.red, null);\n addRangeHighlighter(2, 3, HighlighterLayer.ERROR, Color.black, null);\n checkResult();\n }\n\n public void testCaretRowWinsOverSyntaxEvenInPresenceOfHighlighter() throws Exception {\n initText(\"foo\");\n setUniformEditorHighlighter(new TextAttributes(null, Color.red, null, null, Font.PLAIN));\n addRangeHighlighter(0, 3, 0, null, Color.blue);\n checkResult();\n }\n\n public void testEmptyBorderInEmptyDocument() throws Exception {\n initText(\"\");\n addBorderHighlighter(0, 0, HighlighterLayer.WARNING, Color.red);\n checkResult();\n }\n\n public void testPrefixWithEmptyText() throws Exception {\n initText(\"\");\n ((EditorEx)getEditor()).setPrefixTextAndAttributes(\">\", new TextAttributes(Color.blue, Color.gray, null, null, Font.PLAIN));\n checkResult();\n }\n\n public void testBorderAtLastLine() throws Exception {\n initText(\"a\\nbc\");\n addBorderHighlighter(3, 4, HighlighterLayer.WARNING, Color.red);\n checkResult();\n }\n\n public void testFoldedRegionShownOnlyWithBorder() throws Exception {\n initText(\"abc\");\n addCollapsedFoldRegion(0, 3, \"...\");\n getEditor().getColorsScheme().setAttributes(\n EditorColors.FOLDED_TEXT_ATTRIBUTES,\n new TextAttributes(null, null, Color.blue, EffectType.BOXED, Font.PLAIN)\n );\n checkResult();\n }\n\n public void testEraseMarker() throws Exception {\n initText(\"abc\");\n setUniformEditorHighlighter(new TextAttributes(null, null, null, null, Font.BOLD));\n addRangeHighlighter(1, 2, 0, TextAttributes.ERASE_MARKER);\n checkResult();\n }\n\n public void testInlayAtEmptyLine() throws Exception {\n initText(\"\\n\");\n getEditor().getInlayModel().addInlineElement(0, new MyInlayRenderer());\n checkResult();\n }\n\n public void testMultilineBorderWithInlays() throws Exception {\n initText(\"abc\\ndef\");\n getEditor().getInlayModel().addInlineElement(1, new MyInlayRenderer());\n getEditor().getInlayModel().addInlineElement(6, new MyInlayRenderer());\n addBorderHighlighter(0, 7, 0, Color.red);\n checkResult();\n }\n\n public void testSelectionInsideLine() throws Exception {\n initText(\"first line\\nsecond line\");\n getEditor().getSelectionModel().setSelection(6, 12);\n checkResult();\n }\n\n public void testCaretAfterEmptyLine() throws Exception {\n initText(\"\\nsecond line<caret>\");\n checkResult();\n }\n\n public void testCaretOnEmptyLine() throws Exception {\n initText(\"<caret>\\n second line\");\n checkResult();\n }\n\n @NotNull\n @Override\n protected String getTestDataPath() {\n return super.getTestDataPath() + \"/right\";\n }\n}\n"} +{"text": "/// Copyright (c) 2012 Ecma International. All rights reserved. \n/**\n * @path ch15/15.4/15.4.4/15.4.4.15/15.4.4.15-8-a-19.js\n * @description Array.prototype.lastIndexOf - decreasing length of array does not delete non-configurable properties\n */\n\n\nfunction testcase() {\n\n var arr = [0, 1, 2, 3];\n\n Object.defineProperty(arr, \"2\", {\n get: function () {\n return \"unconfigurable\";\n },\n configurable: false\n });\n\n Object.defineProperty(arr, \"3\", {\n get: function () {\n arr.length = 2;\n return 1;\n },\n configurable: true\n });\n\n return 2 === arr.lastIndexOf(\"unconfigurable\");\n }\nrunTestCase(testcase);\n"} +{"text": "<?php\n/*\n * Copyright 2014 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n * use this file except in compliance with the License. You may obtain a copy of\n * the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */\n\nclass Google_Service_Dialogflow_GoogleCloudDialogflowV2BatchDeleteEntitiesRequest extends Google_Collection\n{\n protected $collection_key = 'entityValues';\n public $entityValues;\n public $languageCode;\n\n public function setEntityValues($entityValues)\n {\n $this->entityValues = $entityValues;\n }\n public function getEntityValues()\n {\n return $this->entityValues;\n }\n public function setLanguageCode($languageCode)\n {\n $this->languageCode = $languageCode;\n }\n public function getLanguageCode()\n {\n return $this->languageCode;\n }\n}\n"} +{"text": "[product]\nversion = \"100\"\nmachine = \"A20-OLinuXino-Lime2\"\n\n[platform]\neraseflag = 0\n\n[target]\nboot_clock = 912\ndcdc2_vol = 1450\ndcdc3_vol = 1300\nldo2_vol = 3000\nldo3_vol = 2800\nldo4_vol = 2800\npower_start = 1\nstorage_type = 0\n\n[clock]\npll3 = 297\npll4 = 300\npll6 = 600\npll7 = 297\npll8 = 336\n\n[card_boot]\nlogical_start = 40960\nsprite_gpio0 =\n\n[card0_boot_para]\ncard_ctrl = 0\ncard_high_speed = 1\ncard_line = 4\nsdc_d1 = port:PF00<2><1><default><default>\nsdc_d0 = port:PF01<2><1><default><default>\nsdc_clk = port:PF02<2><1><default><default>\nsdc_cmd = port:PF03<2><1><default><default>\nsdc_d3 = port:PF04<2><1><default><default>\nsdc_d2 = port:PF05<2><1><default><default>\n\n[card2_boot_para]\ncard_ctrl = 2\ncard_high_speed = 1\ncard_line = 4\nsdc_cmd = port:PC06<3><1><default><default>\nsdc_clk = port:PC07<3><1><default><default>\nsdc_d0 = port:PC08<3><1><default><default>\nsdc_d1 = port:PC09<3><1><default><default>\nsdc_d2 = port:PC10<3><1><default><default>\nsdc_d3 = port:PC11<3><1><default><default>\n\n[twi_para]\ntwi_port = 0\ntwi_scl = port:PB00<2><default><default><default>\ntwi_sda = port:PB01<2><default><default><default>\n\n[uart_para]\nuart_debug_port = 0\nuart_debug_tx = port:PB22<2><1><default><default>\nuart_debug_rx = port:PB23<2><1><default><default>\n\n[uart_force_debug]\nuart_debug_port = 0\nuart_debug_tx = port:PB22<2><1><default><default>\nuart_debug_rx = port:PB23<2><1><default><default>\n\n[jtag_para]\njtag_enable = 1\njtag_ms = port:PB14<3><default><default><default>\njtag_ck = port:PB15<3><default><default><default>\njtag_do = port:PB16<3><default><default><default>\njtag_di = port:PB17<3><default><default><default>\n\n[pm_para]\nstandby_mode = 0\n\n[dram_para]\ndram_baseaddr = 0x40000000\ndram_clk = 384\ndram_type = 3\ndram_rank_num = 1\ndram_chip_density = 4096\ndram_io_width = 16\ndram_bus_width = 32\ndram_cas = 9\ndram_zq = 0x7f\ndram_odt_en = 0\ndram_size = 1024\ndram_tpr0 = 0x42d899b7\ndram_tpr1 = 0xa090\ndram_tpr2 = 0x22a00\ndram_tpr3 = 0x0\ndram_tpr4 = 0x1\ndram_tpr5 = 0x0\ndram_emr1 = 0x4\ndram_emr2 = 0x10\ndram_emr3 = 0x0\n\n[mali_para]\nmali_used = 1\nmali_clkdiv = 1\n\n[gmac_para]\ngmac_used = 1\ngmac_rxd3 = port:PA00<5><default><3><default>\ngmac_rxd2 = port:PA01<5><default><3><default>\ngmac_rxd1 = port:PA02<5><default><3><default>\ngmac_rxd0 = port:PA03<5><default><3><default>\ngmac_txd3 = port:PA04<5><default><3><default>\ngmac_txd2 = port:PA05<5><default><3><default>\ngmac_txd1 = port:PA06<5><default><3><default>\ngmac_txd0 = port:PA07<5><default><3><default>\ngmac_rxclk = port:PA08<5><default><3><default>\ngmac_rxerr = port:PA09<0><default><3><default>\ngmac_rxctl = port:PA10<5><default><3><default>\ngmac_mdc = port:PA11<5><default><3><default>\ngmac_mdio = port:PA12<5><default><3><default>\ngmac_txctl = port:PA13<5><default><3><default>\ngmac_txclk = port:PA14<0><default><3><default>\ngmac_txck = port:PA15<5><default><3><default>\ngmac_clkin = port:PA16<5><default><3><default>\ngmac_txerr = port:PA17<0><default><3><default>\n\n[twi0_para]\ntwi0_used = 1\ntwi0_scl = port:PB00<2><default><default><default>\ntwi0_sda = port:PB01<2><default><default><default>\n\n[twi1_para]\ntwi1_used = 1\ntwi1_scl = port:PB18<2><default><default><default>\ntwi1_sda = port:PB19<2><default><default><default>\n\n[twi2_para]\ntwi2_used = 1\ntwi2_scl = port:PB20<2><default><default><default>\ntwi2_sda = port:PB21<2><default><default><default>\n\n[twi3_para]\ntwi3_used = 0\ntwi3_scl = port:PI00<3><default><default><default>\ntwi3_sda = port:PI01<3><default><default><default>\n\n[twi4_para]\ntwi4_used = 0\ntwi4_scl = port:PI02<3><default><default><default>\ntwi4_sda = port:PI03<3><default><default><default>\n\n[uart_para0]\nuart_used = 1\nuart_port = 0\nuart_type = 2\nuart_tx = port:PB22<2><1><default><default>\nuart_rx = port:PB23<2><1><default><default>\n\n[uart_para1]\nuart_used = 0\nuart_port = 1\nuart_type = 8\nuart_tx = port:PA10<4><1><default><default>\nuart_rx = port:PA11<4><1><default><default>\nuart_rts = port:PA12<4><1><default><default>\nuart_cts = port:PA13<4><1><default><default>\nuart_dtr = port:PA14<4><1><default><default>\nuart_dsr = port:PA15<4><1><default><default>\nuart_dcd = port:PA16<4><1><default><default>\nuart_ring = port:PA17<4><1><default><default>\n\n[uart_para2]\nuart_used = 0\nuart_port = 2\nuart_type = 4\nuart_tx = port:PI18<3><1><default><default>\nuart_rx = port:PI19<3><1><default><default>\nuart_rts = port:PI16<3><1><default><default>\nuart_cts = port:PI17<3><1><default><default>\n\n[uart_para3]\nuart_used = 0\nuart_port = 3\nuart_type = 4\nuart_tx = port:PH00<4><1><default><default>\nuart_rx = port:PH01<4><1><default><default>\nuart_rts = port:PH02<4><1><default><default>\nuart_cts = port:PH03<4><1><default><default>\n\n[uart_para4]\nuart_used = 1\nuart_port = 4\nuart_type = 2\nuart_tx = port:PG10<4><1><default><default>\nuart_rx = port:PG11<4><1><default><default>\n\n[uart_para5]\nuart_used = 0\nuart_port = 5\nuart_type = 2\nuart_tx = port:PH06<4><1><default><default>\nuart_rx = port:PH07<4><1><default><default>\n\n[uart_para6]\nuart_used = 0\nuart_port = 6\nuart_type = 2\nuart_tx = port:PI12<3><1><default><default>\nuart_rx = port:PI13<3><1><default><default>\n\n[uart_para7]\nuart_used = 0\nuart_port = 7\nuart_type = 2\nuart_tx = port:PI20<3><1><default><default>\nuart_rx = port:PI21<3><1><default><default>\n\n[spi0_para]\nspi_used = 0\nspi_cs_bitmap = 1\nspi_cs0 = port:PI10<2><default><default><default>\nspi_cs1 = port:PI14<2><default><default><default>\nspi_sclk = port:PI11<2><default><default><default>\nspi_mosi = port:PI12<2><default><default><default>\nspi_miso = port:PI13<2><default><default><default>\n\n[spi1_para]\nspi_used = 1\nspi_cs_bitmap = 1\nspi_cs0 = port:PI16<2><default><default><default>\nspi_sclk = port:PI17<2><default><default><default>\nspi_mosi = port:PI18<2><default><default><default>\nspi_miso = port:PI19<2><default><default><default>\n\n[spi2_para]\nspi_used = 1\nspi_cs_bitmap = 1\nspi_cs0 = port:PC19<3><default><default><default>\nspi_sclk = port:PC20<3><default><default><default>\nspi_mosi = port:PC21<3><default><default><default>\nspi_miso = port:PC22<3><default><default><default>\n\n[spi3_para]\nspi_used = 0\nspi_cs_bitmap = 1\nspi_cs0 = port:PA05<3><default><default><default>\nspi_cs1 = port:PA09<3><default><default><default>\nspi_sclk = port:PA06<3><default><default><default>\nspi_mosi = port:PA07<3><default><default><default>\nspi_miso = port:PA08<3><default><default><default>\n\n[spi_devices]\nspi_dev_num = 2\n\n[spi_board0]\nmodalias = \"spidev\"\nmax_speed_hz = 1000000\nbus_num = 2\nchip_select = 0\nmode = 3\nfull_duplex = 0\nmanual_cs = 0\n\n[spi_board1]\nmodalias = \"spidev\"\nmax_speed_hz = 1000000\nbus_num = 1\nchip_select = 0\nmode = 3\nfull_duplex = 0\nmanual_cs = 0\n\n[rtp_para]\nrtp_used = 1\nrtp_screen_size = 5\nrtp_regidity_level = 5\nrtp_press_threshold_enable = 0\nrtp_press_threshold = 0x1f40\nrtp_sensitive_level = 0xf\nrtp_exchange_x_y_flag = 0\n\n[ctp_para]\nctp_used = 0\nctp_name = \"gt811\"\nctp_twi_id = 2\nctp_twi_addr = 0x40\nctp_screen_max_x = 1024\nctp_screen_max_y = 600\nctp_revert_x_flag = 0\nctp_revert_y_flag = 0\nctp_exchange_x_y_flag = 1\nctp_firm = 1\nctp_int_port = port:PH21<6><default><default><default>\nctp_wakeup = port:PB13<1><default><default><1>\n\n[ctp_list_para]\nctp_det_used = 0\nft5x_ts = 0\ngt82x = 0\ngslX680 = 0\ngt9xx_ts = 0\ngt811 = 0\n\n[tabletkeys_para]\ntabletkeys_used = 1\nkey0_code = 115\nkey1_code = 114\nkey2_code = 139\nkey3_code = 31\nkey4_code = 102\nkey5_code = 1\nkey6_code = 28\n\n[tkey_para]\ntkey_used = 0\ntkey_twi_id = 2\ntkey_twi_addr = 0x62\ntkey_int = port:PI13<6><default><default><default>\n\n[motor_para]\nmotor_used = 0\nmotor_shake = port:PB03<1><default><default><1>\n\n[leds_para]\nleds_used = 1\nleds_num = 1\nleds_pin_1 = port:PH02<1><default><default><0>\nleds_name_1 = \"green:ph02:led1\"\nleds_default_1 = 0\nleds_trigger_1 = \"heartbeat\"\n\n[nand_para]\nnand_used = 0\nnand_we = port:PC00<2><default><default><default>\nnand_ale = port:PC01<2><default><default><default>\nnand_cle = port:PC02<2><default><default><default>\nnand_ce0 = port:PC04<2><default><default><default>\nnand_nre = port:PC05<2><default><default><default>\nnand_rb0 = port:PC06<2><default><default><default>\nnand_d0 = port:PC08<2><default><default><default>\nnand_d1 = port:PC09<2><default><default><default>\nnand_d2 = port:PC10<2><default><default><default>\nnand_d3 = port:PC11<2><default><default><default>\nnand_d4 = port:PC12<2><default><default><default>\nnand_d5 = port:PC13<2><default><default><default>\nnand_d6 = port:PC14<2><default><default><default>\nnand_d7 = port:PC15<2><default><default><default>\nnand_wp = port:PC16<2><default><default><default>\ngood_block_ratio = 0\n\n[disp_init]\ndisp_init_enable = 1\ndisp_mode = 0\nscreen0_output_type = 3\nscreen0_output_mode = 4\nscreen1_output_type = 0\nscreen1_output_mode = 4\nfb0_width = 0\nfb0_height = 250\nfb0_framebuffer_num = 2\nfb0_format = 9\nfb0_pixel_sequence = 0\nfb0_scaler_mode_enable = 0\nfb1_width = 1024\nfb1_height = 600\nfb1_framebuffer_num = 2\nfb1_format = 10\nfb1_pixel_sequence = 0\nfb1_scaler_mode_enable = 0\nlcd0_backlight = 250\nlcd1_backlight = 0\nlcd0_bright = 100\nlcd0_contrast = 100\nlcd0_saturation = 100\nlcd0_hue = 100\nlcd1_bright = 239\nlcd1_contrast = 50\nlcd1_saturation = 57\nlcd1_hue = 50\n\n[lcd0_para]\nlcd_used = 1\nlcd_x = 800\nlcd_y = 480\nlcd_dclk_freq = 33\nlcd_pwm_not_used = 0\nlcd_pwm_ch = 0\nlcd_pwm_freq = 1000\nlcd_pwm_pol = 1\nlcd_max_bright = 240\nlcd_min_bright = 64\nlcd_if = 0\nlcd_hbp = 46\nlcd_ht = 1055\nlcd_vbp = 23\nlcd_vt = 1050\nlcd_vspw = 1\nlcd_hspw = 30\nlcd_hv_if = 0\nlcd_hv_smode = 0\nlcd_hv_s888_if = 0\nlcd_hv_syuv_if = 0\nlcd_lvds_ch = 0\nlcd_lvds_mode = 0\nlcd_lvds_bitwidth = 0\nlcd_lvds_io_cross = 0\nlcd_cpu_if = 0\nlcd_frm = 1\nlcd_io_cfg0 = 268435456\nlcd_gamma_correction_en = 0\nlcd_gamma_tbl_0 = 0x0\nlcd_gamma_tbl_1 = 0x10101\nlcd_gamma_tbl_255 = 0xffffff\nlcd_power_used = 1\nlcd_power = port:PH08<1><0><default><1>\npwm_used = 1\nlcd_pwm = port:PB02<2><0><default><default>\nlcdd0 = port:PD00<2><0><default><default>\nlcdd1 = port:PD01<2><0><default><default>\nlcdd2 = port:PD02<2><0><default><default>\nlcdd3 = port:PD03<2><0><default><default>\nlcdd4 = port:PD04<2><0><default><default>\nlcdd5 = port:PD05<2><0><default><default>\nlcdd6 = port:PD06<2><0><default><default>\nlcdd7 = port:PD07<2><0><default><default>\nlcdd8 = port:PD08<2><0><default><default>\nlcdd9 = port:PD09<2><0><default><default>\nlcdd10 = port:PD10<2><0><default><default>\nlcdd11 = port:PD11<2><0><default><default>\nlcdd12 = port:PD12<2><0><default><default>\nlcdd13 = port:PD13<2><0><default><default>\nlcdd14 = port:PD14<2><0><default><default>\nlcdd15 = port:PD15<2><0><default><default>\nlcdd16 = port:PD16<2><0><default><default>\nlcdd17 = port:PD17<2><0><default><default>\nlcdd18 = port:PD18<2><0><default><default>\nlcdd19 = port:PD19<2><0><default><default>\nlcdd20 = port:PD20<2><0><default><default>\nlcdd21 = port:PD21<2><0><default><default>\nlcdd22 = port:PD22<2><0><default><default>\nlcdd23 = port:PD23<2><0><default><default>\nlcdclk = port:PD24<2><0><default><default>\nlcdde = port:PD25<2><0><default><default>\nlcdhsync = port:PD26<2><0><default><default>\nlcdvsync = port:PD27<2><0><default><default>\n\n[lcd1_para]\nlcd_used = 0\nlcd_x = 0\nlcd_y = 0\nlcd_dclk_freq = 0\nlcd_pwm_not_used = 0\nlcd_pwm_ch = 1\nlcd_pwm_freq = 0\nlcd_pwm_pol = 0\nlcd_max_bright = 240\nlcd_min_bright = 64\nlcd_if = 0\nlcd_hbp = 0\nlcd_ht = 0\nlcd_vbp = 0\nlcd_vt = 0\nlcd_vspw = 0\nlcd_hspw = 0\nlcd_hv_if = 0\nlcd_hv_smode = 0\nlcd_hv_s888_if = 0\nlcd_hv_syuv_if = 0\nlcd_lvds_ch = 0\nlcd_lvds_mode = 0\nlcd_lvds_bitwidth = 0\nlcd_lvds_io_cross = 0\nlcd_cpu_if = 0\nlcd_frm = 0\nlcd_io_cfg0 = 0\nlcd_gamma_correction_en = 0\nlcd_gamma_tbl_0 = 0x0\nlcd_gamma_tbl_1 = 0x10101\nlcd_gamma_tbl_255 = 0xffffff\nlcd_bl_en_used = 1\nlcd_bl_en =\nlcd_power_used = 0\nlcd_power =\nlcd_pwm_used = 1\nlcd_pwm = port:PI03<2><0><default><default>\nlcd_gpio_0 =\nlcd_gpio_1 =\nlcd_gpio_2 =\nlcd_gpio_3 =\nlcdd0 = port:PH00<2><0><default><default>\nlcdd1 = port:PH01<2><0><default><default>\nlcdd2 = port:PH02<2><0><default><default>\nlcdd3 = port:PH03<2><0><default><default>\nlcdd4 = port:PH04<2><0><default><default>\nlcdd5 = port:PH05<2><0><default><default>\nlcdd6 = port:PH06<2><0><default><default>\nlcdd7 = port:PH07<2><0><default><default>\nlcdd8 = port:PH08<2><0><default><default>\nlcdd9 = port:PH09<2><0><default><default>\nlcdd10 = port:PH10<2><0><default><default>\nlcdd11 = port:PH11<2><0><default><default>\nlcdd12 = port:PH12<2><0><default><default>\nlcdd13 = port:PH13<2><0><default><default>\nlcdd14 = port:PH14<2><0><default><default>\nlcdd15 = port:PH15<2><0><default><default>\nlcdd16 = port:PH16<2><0><default><default>\nlcdd17 = port:PH17<2><0><default><default>\nlcdd18 = port:PH18<2><0><default><default>\nlcdd19 = port:PH19<2><0><default><default>\nlcdd20 = port:PH20<2><0><default><default>\nlcdd21 = port:PH21<2><0><default><default>\n\n[tv_out_dac_para]\ndac_used = 1\ndac0_src = 4\ndac1_src = 5\ndac2_src = 6\ndac3_src = 0\n\n[hdmi_para]\nhdmi_used = 1\n\n[camera_list_para]\ncamera_list_para_used = 1\nov7670 = 0\ngc0308 = 0\ngt2005 = 1\nhi704 = 0\nsp0838 = 0\nmt9m112 = 0\nmt9m113 = 0\nov2655 = 0\nhi253 = 0\ngc0307 = 0\nmt9d112 = 0\nov5640 = 0\ngc2015 = 0\nov2643 = 0\ngc0329 = 0\ngc0309 = 0\ntvp5150 = 0\ns5k4ec = 0\nov5650_mv9335 = 0\nsiv121d = 0\ngc2035 = 0\n\n[csi0_para]\ncsi_used = 0\ncsi_dev_qty = 1\ncsi_stby_mode = 0\ncsi_mname = \"gt2005\"\ncsi_twi_id = 1\ncsi_twi_addr = 0x78\ncsi_if = 0\ncsi_vflip = 0\ncsi_hflip = 0\ncsi_iovdd = \"axp20_pll\"\ncsi_avdd = \"\"\ncsi_dvdd = \"\"\ncsi_vol_iovdd = 2800\ncsi_vol_dvdd =\ncsi_vol_avdd =\ncsi_flash_pol = 0\ncsi_pck = port:PE00<3><default><default><default>\ncsi_ck = port:PE01<3><default><default><default>\ncsi_hsync = port:PE02<3><default><default><default>\ncsi_vsync = port:PE03<3><default><default><default>\ncsi_d0 = port:PE04<3><default><default><default>\ncsi_d1 = port:PE05<3><default><default><default>\ncsi_d2 = port:PE06<3><default><default><default>\ncsi_d3 = port:PE07<3><default><default><default>\ncsi_d4 = port:PE08<3><default><default><default>\ncsi_d5 = port:PE09<3><default><default><default>\ncsi_d6 = port:PE10<3><default><default><default>\ncsi_d7 = port:PE11<3><default><default><default>\ncsi_reset = port:PH13<1><default><default><0>\ncsi_power_en = port:PC16<1><default><default><0>\ncsi_stby = port:PH12<1><default><default><0>\ncsi_flash =\ncsi_af_en =\n\n[csi1_para]\ncsi_used = 0\ncsi_dev_qty = 1\ncsi_stby_mode = 0\ncsi_mname = \"gc0308\"\ncsi_if = 0\ncsi_iovdd = \"axp20_pll\"\ncsi_avdd = \"\"\ncsi_dvdd = \"\"\ncsi_vol_iovdd = 2800\ncsi_vol_dvdd =\ncsi_vol_avdd =\ncsi_vflip = 0\ncsi_hflip = 0\ncsi_flash_pol = 0\ncsi_facing = 1\ncsi_twi_id = 1\ncsi_twi_addr = 0x42\ncsi_pck = port:PG00<3><default><default><default>\ncsi_ck = port:PG01<3><default><default><default>\ncsi_hsync = port:PG02<3><default><default><default>\ncsi_vsync = port:PG03<3><default><default><default>\ncsi_d0 = port:PG04<3><default><default><default>\ncsi_d1 = port:PG05<3><default><default><default>\ncsi_d2 = port:PG06<3><default><default><default>\ncsi_d3 = port:PG07<3><default><default><default>\ncsi_d4 = port:PG08<3><default><default><default>\ncsi_d5 = port:PG09<3><default><default><default>\ncsi_d6 = port:PG10<3><default><default><default>\ncsi_d7 = port:PG11<3><default><default><default>\ncsi_reset = port:PH13<1><default><default><0>\ncsi_power_en = port:PH16<1><default><default><0>\ncsi_stby = port:PH19<1><default><default><0>\n\n[tvout_para]\ntvout_used = 1\ntvout_channel_num = 1\n\n[tvin_para]\ntvin_used = 0\ntvin_channel_num = 4\n\n[pwm0_para]\npwm_used = 1\npwm_period = 1000\npwm_duty_percent = 98\n\n[pwm1_para]\npwm_used = 1\npwm_period = 10000\npwm_duty_percent = 50\n\n[sata_para]\nsata_used = 1\nsata_power_en = port:PC03<1><default><default><0>\n\n[mmc0_para]\nsdc_used = 1\nsdc_detmode = 3\nsdc_buswidth = 4\nsdc_clk = port:PF02<2><1><2><default>\nsdc_cmd = port:PF03<2><1><2><default>\nsdc_d0 = port:PF01<2><1><2><default>\nsdc_d1 = port:PF00<2><1><2><default>\nsdc_d2 = port:PF05<2><1><2><default>\nsdc_d3 = port:PF04<2><1><2><default>\nsdc_det = port:PH01<0><1><default><default>\nsdc_use_wp = 0\nsdc_wp =\nsdc_isio = 0\nsdc_regulator = \"none\"\n\n[mmc1_para]\nsdc_used = 0\nsdc_detmode = 4\nsdc_buswidth = 4\nsdc_clk = port:PG00<2><1><2><default>\nsdc_cmd = port:PG01<2><1><2><default>\nsdc_d0 = port:PG02<2><1><2><default>\nsdc_d1 = port:PG03<2><1><2><default>\nsdc_d2 = port:PG04<2><1><2><default>\nsdc_d3 = port:PG05<2><1><2><default>\nsdc_det =\nsdc_use_wp = 0\nsdc_wp =\nsdc_isio = 0\nsdc_regulator = \"none\"\n\n[mmc2_para]\nsdc_used = 1\nsdc_detmode = 3\nsdc_buswidth = 4\nsdc_cmd = port:PC06<3><1><2><default>\nsdc_clk = port:PC07<3><1><2><default>\nsdc_d0 = port:PC08<3><1><2><default>\nsdc_d1 = port:PC09<3><1><2><default>\nsdc_d2 = port:PC10<3><1><2><default>\nsdc_d3 = port:PC11<3><1><2><default>\nsdc_det =\nsdc_use_wp = 0\nsdc_wp =\nsdc_isio = 0\nsdc_regulator = \"none\"\n\n[mmc3_para]\nsdc_used = 0\nsdc_detmode = 1\nsdc_buswidth = 4\nsdc_cmd = port:PI04<2><1><2><default>\nsdc_clk = port:PI05<2><1><2><default>\nsdc_d0 = port:PI06<2><1><2><default>\nsdc_d1 = port:PI07<2><1><2><default>\nsdc_d2 = port:PI08<2><1><2><default>\nsdc_d3 = port:PI09<2><1><2><default>\nsdc_det = port:PH00<0><1><default><default>\nsdc_use_wp = 0\nsdc_wp =\nsdc_isio = 1\nsdc_regulator = \"none\"\n\n[ms_para]\nms_used = 0\nms_bs = port:PH06<5><default><default><default>\nms_clk = port:PH07<5><default><default><default>\nms_d0 = port:PH08<5><default><default><default>\nms_d1 = port:PH09<5><default><default><default>\nms_d2 = port:PH10<5><default><default><default>\nms_d3 = port:PH11<5><default><default><default>\nms_det =\n\n[smc_para]\nsmc_used = 0\nsmc_rst = port:PH13<5><default><default><default>\nsmc_vppen = port:PH14<5><default><default><default>\nsmc_vppp = port:PH15<5><default><default><default>\nsmc_det = port:PH16<5><default><default><default>\nsmc_vccen = port:PH17<5><default><default><default>\nsmc_sck = port:PH18<5><default><default><default>\nsmc_sda = port:PH19<5><default><default><default>\n\n[ps2_0_para]\nps2_used = 0\nps2_scl = port:PI20<2><1><default><default>\nps2_sda = port:PI21<2><1><default><default>\n\n[ps2_1_para]\nps2_used = 0\nps2_scl = port:PI14<3><1><default><default>\nps2_sda = port:PI15<3><1><default><default>\n\n[can_para]\ncan_used = 0\ncan_tx = port:PA16<3><default><default><default>\ncan_rx = port:PA17<3><default><default><default>\n\n[keypad_para]\nkp_used = 0\nkp_in_size = 8\nkp_out_size = 8\nkp_in0 = port:PH08<4><1><default><default>\nkp_in1 = port:PH09<4><1><default><default>\nkp_in2 = port:PH10<4><1><default><default>\nkp_in3 = port:PH11<4><1><default><default>\nkp_in4 = port:PH14<4><1><default><default>\nkp_in5 = port:PH15<4><1><default><default>\nkp_in6 = port:PH16<4><1><default><default>\nkp_in7 = port:PH17<4><1><default><default>\nkp_out0 = port:PH18<4><1><default><default>\nkp_out1 = port:PH19<4><1><default><default>\nkp_out2 = port:PH22<4><1><default><default>\nkp_out3 = port:PH23<4><1><default><default>\nkp_out4 = port:PH24<4><1><default><default>\nkp_out5 = port:PH25<4><1><default><default>\nkp_out6 = port:PH26<4><1><default><default>\nkp_out7 = port:PH27<4><1><default><default>\n\n[usbc0]\nusb_used = 1\nusb_port_type = 2\nusb_detect_type = 1\nusb_id_gpio = port:PH04<0><1><default><default>\nusb_det_vbus_gpio = port:PH05<1><0><default><0>\nusb_drv_vbus_gpio = port:PC17<1><0><default><0>\nusb_host_init_state = 1\nusb_restric_flag = 0\nusb_restric_voltage = 3550000\nusb_restric_capacity = 5\n\n[usbc1]\nusb_used = 1\nusb_port_type = 1\nusb_detect_type = 0\nusb_drv_vbus_gpio = port:PH06<1><0><default><0>\nusb_restrict_gpio =\nusb_host_init_state = 1\nusb_restric_flag = 0\n\n[usbc2]\nusb_used = 1\nusb_port_type = 1\nusb_detect_type = 0\nusb_drv_vbus_gpio = port:PH03<1><0><default><0>\nusb_restrict_gpio =\nusb_host_init_state = 1\nusb_restric_flag = 0\n\n[usb_feature]\nvendor_id = 6353\nmass_storage_id = 1\nadb_id = 2\nmanufacturer_name = \"USB Developer\"\nproduct_name = \"Android\"\nserial_number = \"20080411\"\n\n[msc_feature]\nvendor_name = \"USB 2.0\"\nproduct_name = \"USB Flash Driver\"\nrelease = 100\nluns = 3\n\n[gsensor_para]\ngsensor_used = 0\ngsensor_twi_id = 1\ngsensor_int1 =\ngsensor_int2 =\n\n[gsensor_list_para]\ngsensor_det_used = 0\nbma250 = 1\nmma8452 = 1\nmma7660 = 1\nmma865x = 1\nafa750 = 1\nlis3de_acc = 1\nlis3dh_acc = 1\nkxtik = 1\ndmard10 = 0\ndmard06 = 1\nmxc622x = 1\nfxos8700 = 1\nlsm303d = 1\n\n[gps_para]\ngps_used = 0\ngps_spi_id = 2\ngps_spi_cs_num = 0\ngps_lradc = 1\ngps_clk = port:PI00<2><default><default><default>\ngps_sign = port:PI01<2><default><default><default>\ngps_mag = port:PI02<2><default><default><default>\ngps_vcc_en = port:PC22<1><default><default><0>\ngps_osc_en = port:PI14<1><default><default><0>\ngps_rx_en = port:PI15<1><default><default><0>\n\n[wifi_para]\nwifi_used = 0\nwifi_sdc_id = 3\nwifi_usbc_id = 2\nwifi_usbc_type = 1\nwifi_mod_sel = 7\nwifi_power = \"\"\nap6xxx_wl_regon = port:PH09<1><default><default><0>\nap6xxx_bt_regon = port:PH18<1><default><default><0>\nap6xxx_bt_wake = port:PH24<1><default><default><0>\nap6xxx_bt_host_wake = port:PH25<0><default><default><0>\nap6xxx_lpo = port:PI12<4><1><default><1>\n\n[usb_wifi_para]\nusb_wifi_used = 1\nusb_wifi_usbc_num = 2\n\n[3g_para]\n3g_used = 0\n3g_usbc_num = 2\n3g_uart_num = 0\n3g_pwr =\n3g_wakeup =\n3g_int =\n\n[gy_para]\ngy_used = 0\ngy_twi_id = 1\ngy_twi_addr = 0\ngy_int1 = port:PH18<6><1><default><default>\ngy_int2 = port:PH19<6><1><default><default>\n\n[ls_para]\nls_used = 0\nls_twi_id = 1\nls_twi_addr = 0\nls_int = port:PH20<6><1><default><default>\n\n[compass_para]\ncompass_used = 0\ncompass_twi_id = 1\ncompass_twi_addr = 0\ncompass_int = port:PI13<6><1><default><default>\n\n[bt_para]\nbt_used = 1\nbt_uart_id = 2\n\n[i2s_para]\ni2s_used = 0\ni2s_channel = 2\ni2s_mclk = port:PB05<2><1><default><default>\ni2s_bclk = port:PB06<2><1><default><default>\ni2s_lrclk = port:PB07<2><1><default><default>\ni2s_dout0 = port:PB08<2><1><default><default>\ni2s_dout1 =\ni2s_dout2 =\ni2s_dout3 =\ni2s_din = port:PB12<2><1><default><default>\n\n[spdif_para]\nspdif_used = 0\nspdif_mclk =\nspdif_dout = port:PB13<4><1><default><default>\nspdif_din =\n\n[audio_para]\naudio_used = 1\ncapture_used = 1\nplayback_used = 1\naudio_lr_change = 0\n\n[switch_para]\nswitch_used = 1\n\n[ir_para]\nir_used = 0\nir0_rx = port:PB04<2><default><default><default>\n\n[pmu_para]\npmu_used = 1\npmu_twi_addr = 52\npmu_twi_id = 0\npmu_irq_id = 32\npmu_battery_rdc = 120\npmu_battery_cap = 2100\npmu_init_chgcur = 300\npmu_earlysuspend_chgcur = 600\npmu_suspend_chgcur = 1000\npmu_resume_chgcur = 300\npmu_shutdown_chgcur = 1000\npmu_init_chgvol = 4200\npmu_init_chgend_rate = 15\npmu_init_chg_enabled = 1\npmu_init_adc_freq = 100\npmu_init_adc_freqc = 100\npmu_init_chg_pretime = 50\npmu_init_chg_csttime = 720\npmu_bat_para1 = 0\npmu_bat_para2 = 0\npmu_bat_para3 = 0\npmu_bat_para4 = 0\npmu_bat_para5 = 5\npmu_bat_para6 = 11\npmu_bat_para7 = 13\npmu_bat_para8 = 15\npmu_bat_para9 = 19\npmu_bat_para10 = 32\npmu_bat_para11 = 50\npmu_bat_para12 = 58\npmu_bat_para13 = 71\npmu_bat_para14 = 81\npmu_bat_para15 = 89\npmu_bat_para16 = 100\npmu_usbvol_limit = 1\npmu_usbcur_limit = 0\npmu_usbvol = 4000\npmu_usbcur = 0\npmu_usbvol_pc = 4200\npmu_usbcur_pc = 0\npmu_pwroff_vol = 3300\npmu_pwron_vol = 2900\npmu_pekoff_time = 6000\npmu_pekoff_en = 1\npmu_peklong_time = 1500\npmu_pekon_time = 1000\npmu_pwrok_time = 64\npmu_pwrnoe_time = 2000\npmu_intotp_en = 1\npmu_used2 = 0\npmu_adpdet = port:PH02<0><default><default><default>\npmu_init_chgcur2 = 400\npmu_earlysuspend_chgcur2 = 600\npmu_suspend_chgcur2 = 1200\npmu_resume_chgcur2 = 400\npmu_shutdown_chgcur2 = 1200\npmu_suspendpwroff_vol = 3500\npmu_batdeten = 1\npmu_backupen = 1\n\n[recovery_key]\nkey_min = 4\nkey_max = 40\n\n[dvfs_table]\nmax_freq = 1008000000\nmin_freq = 720000000\nnormal_freq = 720000000\nLV_count = 7\nLV1_freq = 1008000000\nLV1_volt = 1450\nLV2_freq = 912000000\nLV2_volt = 1425\nLV3_freq = 864000000\nLV3_volt = 1350\nLV4_freq = 720000000\nLV4_volt = 1250\nLV5_freq = 528000000\nLV5_volt = 1150\nLV6_freq = 312000000\nLV6_volt = 1100\nLV7_freq = 144000000\nLV7_volt = 1050\n\n[gpio_para]\ngpio_used = 1\ngpio_num = 64\ngpio_pin_1 = port:PG00<0><default><default><default>\ngpio_pin_2 = port:PG01<0><default><default><default>\ngpio_pin_3 = port:PG02<0><default><default><default>\ngpio_pin_4 = port:PG03<0><default><default><default>\ngpio_pin_5 = port:PG04<0><default><default><default>\ngpio_pin_6 = port:PG05<0><default><default><default>\ngpio_pin_7 = port:PG06<0><default><default><default>\ngpio_pin_8 = port:PG07<0><default><default><default>\ngpio_pin_9 = port:PG08<0><default><default><default>\ngpio_pin_10 = port:PG09<0><default><default><default>\ngpio_pin_11 = port:PC07<0><default><default><default>\ngpio_pin_12 = port:PC18<0><default><default><default>\ngpio_pin_13 = port:PC23<0><default><default><default>\ngpio_pin_14 = port:PC24<0><default><default><default>\ngpio_pin_15 = port:PH00<0><default><default><default>\ngpio_pin_16 = port:PH02<0><default><default><default>\ngpio_pin_17 = port:PH09<0><default><default><default>\ngpio_pin_18 = port:PH10<0><default><default><default>\ngpio_pin_19 = port:PH11<0><default><default><default>\ngpio_pin_20 = port:PH14<0><default><default><default>\ngpio_pin_21 = port:PH15<0><default><default><default>\ngpio_pin_22 = port:PH16<0><default><default><default>\ngpio_pin_23 = port:PH17<0><default><default><default>\ngpio_pin_24 = port:PH18<0><default><default><default>\ngpio_pin_25 = port:PH19<0><default><default><default>\ngpio_pin_26 = port:PH20<0><default><default><default>\ngpio_pin_27 = port:PH21<0><default><default><default>\ngpio_pin_28 = port:PH22<0><default><default><default>\ngpio_pin_29 = port:PH23<0><default><default><default>\ngpio_pin_30 = port:PH24<0><default><default><default>\ngpio_pin_31 = port:PH25<0><default><default><default>\ngpio_pin_32 = port:PH26<0><default><default><default>\ngpio_pin_33 = port:PH27<0><default><default><default>\ngpio_pin_34 = port:PB03<0><default><default><default>\ngpio_pin_35 = port:PB04<0><default><default><default>\ngpio_pin_36 = port:PB05<0><default><default><default>\ngpio_pin_37 = port:PB06<0><default><default><default>\ngpio_pin_38 = port:PB07<0><default><default><default>\ngpio_pin_39 = port:PB08<0><default><default><default>\ngpio_pin_40 = port:PB10<0><default><default><default>\ngpio_pin_41 = port:PB11<0><default><default><default>\ngpio_pin_42 = port:PB12<0><default><default><default>\ngpio_pin_43 = port:PB13<0><default><default><default>\ngpio_pin_44 = port:PB14<0><default><default><default>\ngpio_pin_45 = port:PB15<0><default><default><default>\ngpio_pin_46 = port:PB16<0><default><default><default>\ngpio_pin_47 = port:PB17<0><default><default><default>\ngpio_pin_48 = port:PI00<0><default><default><default>\ngpio_pin_49 = port:PI01<0><default><default><default>\ngpio_pin_50 = port:PI02<0><default><default><default>\ngpio_pin_51 = port:PI04<0><default><default><default>\ngpio_pin_52 = port:PI05<0><default><default><default>\ngpio_pin_53 = port:PI06<0><default><default><default>\ngpio_pin_54 = port:PI07<0><default><default><default>\ngpio_pin_55 = port:PI08<0><default><default><default>\ngpio_pin_56 = port:PI09<0><default><default><default>\ngpio_pin_57 = port:PI10<0><default><default><default>\ngpio_pin_58 = port:PI11<0><default><default><default>\ngpio_pin_59 = port:PI14<0><default><default><default>\ngpio_pin_60 = port:PI15<0><default><default><default>\ngpio_pin_61 = port:PI16<0><default><default><default>\ngpio_pin_62 = port:PI17<0><default><default><default>\ngpio_pin_63 = port:PI18<0><default><default><default>\ngpio_pin_64 = port:PI19<0><default><default><default>\n\n[gpio_init]\npin_1 = port:PG00<0><default><default><default>\npin_2 = port:PG01<0><default><default><default>\npin_3 = port:PG02<0><default><default><default>\npin_4 = port:PG03<0><default><default><default>\npin_5 = port:PG04<0><default><default><default>\npin_6 = port:PG05<0><default><default><default>\npin_7 = port:PG06<0><default><default><default>\npin_8 = port:PG07<0><default><default><default>\npin_9 = port:PG08<0><default><default><default>\npin_10 = port:PG09<0><default><default><default>\npin_11 = port:PC07<0><default><default><default>\npin_12 = port:PC18<0><default><default><default>\npin_13 = port:PC23<0><default><default><default>\npin_14 = port:PC24<0><default><default><default>\npin_15 = port:PH00<0><default><default><default>\npin_16 = port:PH02<0><default><default><default>\npin_17 = port:PH09<0><default><default><default>\npin_18 = port:PH10<0><default><default><default>\npin_19 = port:PH11<0><default><default><default>\npin_20 = port:PH14<0><default><default><default>\npin_21 = port:PH15<0><default><default><default>\npin_22 = port:PH16<0><default><default><default>\npin_23 = port:PH17<0><default><default><default>\npin_24 = port:PH18<0><default><default><default>\npin_25 = port:PH19<0><default><default><default>\npin_26 = port:PH20<0><default><default><default>\npin_27 = port:PH21<0><default><default><default>\npin_28 = port:PH22<0><default><default><default>\npin_29 = port:PH23<0><default><default><default>\npin_30 = port:PH24<0><default><default><default>\npin_31 = port:PH25<0><default><default><default>\npin_32 = port:PH26<0><default><default><default>\npin_33 = port:PH27<0><default><default><default>\npin_34 = port:PB03<0><default><default><default>\npin_35 = port:PB04<0><default><default><default>\npin_36 = port:PB05<0><default><default><default>\npin_37 = port:PB06<0><default><default><default>\npin_38 = port:PB07<0><default><default><default>\npin_39 = port:PB08<0><default><default><default>\npin_40 = port:PB10<0><default><default><default>\npin_41 = port:PB11<0><default><default><default>\npin_42 = port:PB12<0><default><default><default>\npin_43 = port:PB13<0><default><default><default>\npin_44 = port:PB14<0><default><default><default>\npin_45 = port:PB15<0><default><default><default>\npin_46 = port:PB16<0><default><default><default>\npin_47 = port:PB17<0><default><default><default>\npin_48 = port:PI00<0><default><default><default>\npin_49 = port:PI01<0><default><default><default>\npin_50 = port:PI02<0><default><default><default>\npin_51 = port:PI04<0><default><default><default>\npin_52 = port:PI05<0><default><default><default>\npin_53 = port:PI06<0><default><default><default>\npin_54 = port:PI07<0><default><default><default>\npin_55 = port:PI08<0><default><default><default>\npin_56 = port:PI09<0><default><default><default>\npin_57 = port:PI10<0><default><default><default>\npin_58 = port:PI11<0><default><default><default>\npin_59 = port:PI14<0><default><default><default>\npin_60 = port:PI15<0><default><default><default>\npin_61 = port:PI16<0><default><default><default>\npin_62 = port:PI17<0><default><default><default>\npin_63 = port:PI18<0><default><default><default>\npin_64 = port:PI19<0><default><default><default>\n\n[softpwm_para]\nsoftpwm_used = 1\npwm_pin = port:PD23<0><default><default><default>\ndcr_pin = port:PD24<0><default><default><default>\n\n"} +{"text": "function [h, display_array] = displayData(X, example_width)\n%DISPLAYDATA Display 2D data in a nice grid\n% [h, display_array] = DISPLAYDATA(X, example_width) displays 2D data\n% stored in X in a nice grid. It returns the figure handle h and the \n% displayed array if requested.\n\n% Set example_width automatically if not passed in\nif ~exist('example_width', 'var') || isempty(example_width) \n\texample_width = round(sqrt(size(X, 2)));\nend\n\n% Gray Image\ncolormap(gray);\n\n% Compute rows, cols\n[m n] = size(X);\nexample_height = (n / example_width);\n\n% Compute number of items to display\ndisplay_rows = floor(sqrt(m));\ndisplay_cols = ceil(m / display_rows);\n\n% Between images padding\npad = 1;\n\n% Setup blank display\ndisplay_array = - ones(pad + display_rows * (example_height + pad), ...\n pad + display_cols * (example_width + pad));\n\n% Copy each example into a patch on the display array\ncurr_ex = 1;\nfor j = 1:display_rows\n\tfor i = 1:display_cols\n\t\tif curr_ex > m, \n\t\t\tbreak; \n\t\tend\n\t\t% Copy the patch\n\t\t\n\t\t% Get the max value of the patch\n\t\tmax_val = max(abs(X(curr_ex, :)));\n\t\tdisplay_array(pad + (j - 1) * (example_height + pad) + (1:example_height), ...\n\t\t pad + (i - 1) * (example_width + pad) + (1:example_width)) = ...\n\t\t\t\t\t\treshape(X(curr_ex, :), example_height, example_width) / max_val;\n\t\tcurr_ex = curr_ex + 1;\n\tend\n\tif curr_ex > m, \n\t\tbreak; \n\tend\nend\n\n% Display Image\nh = imagesc(display_array, [-1 1]);\n\n% Do not show axis\naxis image off\n\ndrawnow;\n\nend\n"} +{"text": "using J2N;\r\nusing J2N.Text;\r\nusing YAF.Lucene.Net.Diagnostics;\r\nusing System;\r\nusing System.Collections.Generic;\r\nusing System.Globalization;\r\nusing System.IO;\r\nusing BitSet = YAF.Lucene.Net.Util.OpenBitSet;\r\nusing JCG = J2N.Collections.Generic;\r\n\r\nnamespace YAF.Lucene.Net.Util.Fst\r\n{\r\n /*\r\n * Licensed to the Apache Software Foundation (ASF) under one or more\r\n * contributor license agreements. See the NOTICE file distributed with\r\n * this work for additional information regarding copyright ownership.\r\n * The ASF licenses this file to You under the Apache License, Version 2.0\r\n * (the \"License\"); you may not use this file except in compliance with\r\n * the License. You may obtain a copy of the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n /// <summary>\r\n /// Static helper methods.\r\n /// <para/>\r\n /// @lucene.experimental\r\n /// </summary>\r\n public static class Util // LUCENENET specific - made static // LUCENENET TODO: Fix naming conflict with containing namespace\r\n {\r\n /// <summary>\r\n /// Looks up the output for this input, or <c>null</c> if the\r\n /// input is not accepted.\r\n /// </summary>\r\n public static T Get<T>(FST<T> fst, Int32sRef input)\r\n {\r\n // TODO: would be nice not to alloc this on every lookup\r\n var arc = fst.GetFirstArc(new FST.Arc<T>());\r\n\r\n var fstReader = fst.GetBytesReader();\r\n\r\n // Accumulate output as we go\r\n T output = fst.Outputs.NoOutput;\r\n for (int i = 0; i < input.Length; i++)\r\n {\r\n if (fst.FindTargetArc(input.Int32s[input.Offset + i], arc, arc, fstReader) == null)\r\n {\r\n return default;\r\n }\r\n output = fst.Outputs.Add(output, arc.Output);\r\n }\r\n\r\n if (arc.IsFinal)\r\n {\r\n return fst.Outputs.Add(output, arc.NextFinalOutput);\r\n }\r\n else\r\n {\r\n return default;\r\n }\r\n }\r\n\r\n // TODO: maybe a CharsRef version for BYTE2\r\n\r\n /// <summary>\r\n /// Looks up the output for this input, or <c>null</c> if the\r\n /// input is not accepted\r\n /// </summary>\r\n public static T Get<T>(FST<T> fst, BytesRef input)\r\n {\r\n if (Debugging.AssertsEnabled) Debugging.Assert(fst.InputType == FST.INPUT_TYPE.BYTE1);\r\n\r\n var fstReader = fst.GetBytesReader();\r\n\r\n // TODO: would be nice not to alloc this on every lookup\r\n var arc = fst.GetFirstArc(new FST.Arc<T>());\r\n\r\n // Accumulate output as we go\r\n T output = fst.Outputs.NoOutput;\r\n for (int i = 0; i < input.Length; i++)\r\n {\r\n if (fst.FindTargetArc(input.Bytes[i + input.Offset] & 0xFF, arc, arc, fstReader) == null)\r\n {\r\n return default;\r\n }\r\n output = fst.Outputs.Add(output, arc.Output);\r\n }\r\n\r\n if (arc.IsFinal)\r\n {\r\n return fst.Outputs.Add(output, arc.NextFinalOutput);\r\n }\r\n else\r\n {\r\n return default;\r\n }\r\n }\r\n\r\n /// <summary>\r\n /// Reverse lookup (lookup by output instead of by input),\r\n /// in the special case when your FSTs outputs are\r\n /// strictly ascending. This locates the input/output\r\n /// pair where the output is equal to the target, and will\r\n /// return <c>null</c> if that output does not exist.\r\n ///\r\n /// <para/>NOTE: this only works with <see cref=\"T:FST{long?}\"/>, only\r\n /// works when the outputs are ascending in order with\r\n /// the inputs.\r\n /// For example, simple ordinals (0, 1,\r\n /// 2, ...), or file offets (when appending to a file)\r\n /// fit this.\r\n /// </summary>\r\n public static Int32sRef GetByOutput(FST<long?> fst, long targetOutput)\r\n {\r\n var @in = fst.GetBytesReader();\r\n\r\n // TODO: would be nice not to alloc this on every lookup\r\n FST.Arc<long?> arc = fst.GetFirstArc(new FST.Arc<long?>());\r\n\r\n FST.Arc<long?> scratchArc = new FST.Arc<long?>();\r\n\r\n Int32sRef result = new Int32sRef();\r\n\r\n return GetByOutput(fst, targetOutput, @in, arc, scratchArc, result);\r\n }\r\n\r\n /// <summary>\r\n /// Expert: like <see cref=\"Util.GetByOutput(FST{long?}, long)\"/> except reusing\r\n /// <see cref=\"FST.BytesReader\"/>, initial and scratch Arc, and result.\r\n /// </summary>\r\n public static Int32sRef GetByOutput(FST<long?> fst, long targetOutput, FST.BytesReader @in, FST.Arc<long?> arc, FST.Arc<long?> scratchArc, Int32sRef result)\r\n {\r\n long output = arc.Output.Value;\r\n int upto = 0;\r\n\r\n //System.out.println(\"reverseLookup output=\" + targetOutput);\r\n\r\n while (true)\r\n {\r\n //System.out.println(\"loop: output=\" + output + \" upto=\" + upto + \" arc=\" + arc);\r\n if (arc.IsFinal)\r\n {\r\n long finalOutput = output + arc.NextFinalOutput.Value;\r\n //System.out.println(\" isFinal finalOutput=\" + finalOutput);\r\n if (finalOutput == targetOutput)\r\n {\r\n result.Length = upto;\r\n //System.out.println(\" found!\");\r\n return result;\r\n }\r\n else if (finalOutput > targetOutput)\r\n {\r\n //System.out.println(\" not found!\");\r\n return null;\r\n }\r\n }\r\n\r\n if (FST<long?>.TargetHasArcs(arc))\r\n {\r\n //System.out.println(\" targetHasArcs\");\r\n if (result.Int32s.Length == upto)\r\n {\r\n result.Grow(1 + upto);\r\n }\r\n\r\n fst.ReadFirstRealTargetArc(arc.Target, arc, @in);\r\n\r\n if (arc.BytesPerArc != 0)\r\n {\r\n int low = 0;\r\n int high = arc.NumArcs - 1;\r\n int mid = 0;\r\n //System.out.println(\"bsearch: numArcs=\" + arc.numArcs + \" target=\" + targetOutput + \" output=\" + output);\r\n bool exact = false;\r\n while (low <= high)\r\n {\r\n mid = (int)((uint)(low + high) >> 1);\r\n @in.Position = arc.PosArcsStart;\r\n @in.SkipBytes(arc.BytesPerArc * mid);\r\n var flags = (sbyte)@in.ReadByte();\r\n fst.ReadLabel(@in);\r\n long minArcOutput;\r\n if ((flags & FST.BIT_ARC_HAS_OUTPUT) != 0)\r\n {\r\n long arcOutput = fst.Outputs.Read(@in).Value;\r\n minArcOutput = output + arcOutput;\r\n }\r\n else\r\n {\r\n minArcOutput = output;\r\n }\r\n if (minArcOutput == targetOutput)\r\n {\r\n exact = true;\r\n break;\r\n }\r\n else if (minArcOutput < targetOutput)\r\n {\r\n low = mid + 1;\r\n }\r\n else\r\n {\r\n high = mid - 1;\r\n }\r\n }\r\n\r\n if (high == -1)\r\n {\r\n return null;\r\n }\r\n else if (exact)\r\n {\r\n arc.ArcIdx = mid - 1;\r\n }\r\n else\r\n {\r\n arc.ArcIdx = low - 2;\r\n }\r\n\r\n fst.ReadNextRealArc(arc, @in);\r\n result.Int32s[upto++] = arc.Label;\r\n output += arc.Output.Value;\r\n }\r\n else\r\n {\r\n FST.Arc<long?> prevArc = null;\r\n\r\n while (true)\r\n {\r\n //System.out.println(\" cycle label=\" + arc.label + \" output=\" + arc.output);\r\n\r\n // this is the min output we'd hit if we follow\r\n // this arc:\r\n long minArcOutput = output + arc.Output.Value;\r\n\r\n if (minArcOutput == targetOutput)\r\n {\r\n // Recurse on this arc:\r\n //System.out.println(\" match! break\");\r\n output = minArcOutput;\r\n result.Int32s[upto++] = arc.Label;\r\n break;\r\n }\r\n else if (minArcOutput > targetOutput)\r\n {\r\n if (prevArc == null)\r\n {\r\n // Output doesn't exist\r\n return null;\r\n }\r\n else\r\n {\r\n // Recurse on previous arc:\r\n arc.CopyFrom(prevArc);\r\n result.Int32s[upto++] = arc.Label;\r\n output += arc.Output.Value;\r\n //System.out.println(\" recurse prev label=\" + (char) arc.label + \" output=\" + output);\r\n break;\r\n }\r\n }\r\n else if (arc.IsLast)\r\n {\r\n // Recurse on this arc:\r\n output = minArcOutput;\r\n //System.out.println(\" recurse last label=\" + (char) arc.label + \" output=\" + output);\r\n result.Int32s[upto++] = arc.Label;\r\n break;\r\n }\r\n else\r\n {\r\n // Read next arc in this node:\r\n prevArc = scratchArc;\r\n prevArc.CopyFrom(arc);\r\n //System.out.println(\" after copy label=\" + (char) prevArc.label + \" vs \" + (char) arc.label);\r\n fst.ReadNextRealArc(arc, @in);\r\n }\r\n }\r\n }\r\n }\r\n else\r\n {\r\n //System.out.println(\" no target arcs; not found!\");\r\n return null;\r\n }\r\n }\r\n }\r\n\r\n /// <summary>\r\n /// Represents a path in TopNSearcher.\r\n /// <para/>\r\n /// @lucene.experimental\r\n /// </summary>\r\n public class FSTPath<T>\r\n {\r\n public FST.Arc<T> Arc { get; set; }\r\n public T Cost { get; set; }\r\n public Int32sRef Input { get; private set; }\r\n\r\n /// <summary>\r\n /// Sole constructor </summary>\r\n public FSTPath(T cost, FST.Arc<T> arc, Int32sRef input)\r\n {\r\n this.Arc = (new FST.Arc<T>()).CopyFrom(arc);\r\n this.Cost = cost;\r\n this.Input = input;\r\n }\r\n\r\n public override string ToString()\r\n {\r\n return \"input=\" + Input + \" cost=\" + Cost;\r\n }\r\n }\r\n\r\n /// <summary>\r\n /// Compares first by the provided comparer, and then\r\n /// tie breaks by <see cref=\"FSTPath{T}.Input\"/>.\r\n /// </summary>\r\n private class TieBreakByInputComparer<T> : IComparer<FSTPath<T>>\r\n {\r\n internal readonly IComparer<T> comparer;\r\n\r\n public TieBreakByInputComparer(IComparer<T> comparer)\r\n {\r\n this.comparer = comparer;\r\n }\r\n\r\n public virtual int Compare(FSTPath<T> a, FSTPath<T> b)\r\n {\r\n int cmp = comparer.Compare(a.Cost, b.Cost);\r\n if (cmp == 0)\r\n {\r\n return a.Input.CompareTo(b.Input);\r\n }\r\n else\r\n {\r\n return cmp;\r\n }\r\n }\r\n }\r\n\r\n /// <summary>\r\n /// Utility class to find top N shortest paths from start\r\n /// point(s).\r\n /// </summary>\r\n public class TopNSearcher<T>\r\n {\r\n private readonly FST<T> fst;\r\n private readonly FST.BytesReader bytesReader;\r\n private readonly int topN;\r\n private readonly int maxQueueDepth;\r\n\r\n private readonly FST.Arc<T> scratchArc = new FST.Arc<T>();\r\n\r\n internal readonly IComparer<T> comparer;\r\n\r\n internal JCG.SortedSet<FSTPath<T>> queue = null;\r\n\r\n private readonly object syncLock = new object();\r\n\r\n /// <summary>\r\n /// Creates an unbounded TopNSearcher </summary>\r\n /// <param name=\"fst\"> the <see cref=\"Lucene.Net.Util.Fst.FST{T}\"/> to search on </param>\r\n /// <param name=\"topN\"> the number of top scoring entries to retrieve </param>\r\n /// <param name=\"maxQueueDepth\"> the maximum size of the queue of possible top entries </param>\r\n /// <param name=\"comparer\"> the comparer to select the top N </param>\r\n public TopNSearcher(FST<T> fst, int topN, int maxQueueDepth, IComparer<T> comparer)\r\n {\r\n this.fst = fst;\r\n this.bytesReader = fst.GetBytesReader();\r\n this.topN = topN;\r\n this.maxQueueDepth = maxQueueDepth;\r\n this.comparer = comparer;\r\n\r\n queue = new JCG.SortedSet<FSTPath<T>>(new TieBreakByInputComparer<T>(comparer));\r\n }\r\n\r\n /// <summary>\r\n /// If back plus this arc is competitive then add to queue:\r\n /// </summary>\r\n protected virtual void AddIfCompetitive(FSTPath<T> path)\r\n {\r\n if (Debugging.AssertsEnabled) Debugging.Assert(queue != null);\r\n\r\n T cost = fst.Outputs.Add(path.Cost, path.Arc.Output);\r\n //System.out.println(\" addIfCompetitive queue.size()=\" + queue.size() + \" path=\" + path + \" + label=\" + path.arc.label);\r\n\r\n if (queue.Count == maxQueueDepth)\r\n {\r\n FSTPath<T> bottom = queue.Max;\r\n int comp = comparer.Compare(cost, bottom.Cost);\r\n if (comp > 0)\r\n {\r\n // Doesn't compete\r\n return;\r\n }\r\n else if (comp == 0)\r\n {\r\n // Tie break by alpha sort on the input:\r\n path.Input.Grow(path.Input.Length + 1);\r\n path.Input.Int32s[path.Input.Length++] = path.Arc.Label;\r\n int cmp = bottom.Input.CompareTo(path.Input);\r\n path.Input.Length--;\r\n\r\n // We should never see dups:\r\n if (Debugging.AssertsEnabled) Debugging.Assert(cmp != 0);\r\n\r\n if (cmp < 0)\r\n {\r\n // Doesn't compete\r\n return;\r\n }\r\n }\r\n // Competes\r\n }\r\n else\r\n {\r\n // Queue isn't full yet, so any path we hit competes:\r\n }\r\n\r\n // copy over the current input to the new input\r\n // and add the arc.label to the end\r\n Int32sRef newInput = new Int32sRef(path.Input.Length + 1);\r\n Array.Copy(path.Input.Int32s, 0, newInput.Int32s, 0, path.Input.Length);\r\n newInput.Int32s[path.Input.Length] = path.Arc.Label;\r\n newInput.Length = path.Input.Length + 1;\r\n FSTPath<T> newPath = new FSTPath<T>(cost, path.Arc, newInput);\r\n\r\n queue.Add(newPath);\r\n\r\n if (queue.Count == maxQueueDepth + 1)\r\n {\r\n // LUCENENET NOTE: SortedSet doesn't have atomic operations,\r\n // so we need to add some thread safety just in case.\r\n // Perhaps it might make sense to wrap SortedSet into a type\r\n // that provides thread safety.\r\n lock (syncLock)\r\n {\r\n queue.Remove(queue.Max);\r\n }\r\n }\r\n }\r\n\r\n /// <summary>\r\n /// Adds all leaving arcs, including 'finished' arc, if\r\n /// the node is final, from this node into the queue.\r\n /// </summary>\r\n public virtual void AddStartPaths(FST.Arc<T> node, T startOutput, bool allowEmptyString, Int32sRef input)\r\n {\r\n // De-dup NO_OUTPUT since it must be a singleton:\r\n if (startOutput.Equals(fst.Outputs.NoOutput))\r\n {\r\n startOutput = fst.Outputs.NoOutput;\r\n }\r\n\r\n FSTPath<T> path = new FSTPath<T>(startOutput, node, input);\r\n fst.ReadFirstTargetArc(node, path.Arc, bytesReader);\r\n\r\n //System.out.println(\"add start paths\");\r\n\r\n // Bootstrap: find the min starting arc\r\n while (true)\r\n {\r\n if (allowEmptyString || path.Arc.Label != FST.END_LABEL)\r\n {\r\n AddIfCompetitive(path);\r\n }\r\n if (path.Arc.IsLast)\r\n {\r\n break;\r\n }\r\n fst.ReadNextArc(path.Arc, bytesReader);\r\n }\r\n }\r\n\r\n public virtual TopResults<T> Search()\r\n {\r\n IList<Result<T>> results = new JCG.List<Result<T>>();\r\n\r\n //System.out.println(\"search topN=\" + topN);\r\n\r\n var fstReader = fst.GetBytesReader();\r\n T NO_OUTPUT = fst.Outputs.NoOutput;\r\n\r\n // TODO: we could enable FST to sorting arcs by weight\r\n // as it freezes... can easily do this on first pass\r\n // (w/o requiring rewrite)\r\n\r\n // TODO: maybe we should make an FST.INPUT_TYPE.BYTE0.5!?\r\n // (nibbles)\r\n int rejectCount = 0;\r\n\r\n // For each top N path:\r\n while (results.Count < topN)\r\n {\r\n //System.out.println(\"\\nfind next path: queue.size=\" + queue.size());\r\n\r\n FSTPath<T> path;\r\n\r\n if (queue == null)\r\n {\r\n // Ran out of paths\r\n //System.out.println(\" break queue=null\");\r\n break;\r\n }\r\n\r\n // Remove top path since we are now going to\r\n // pursue it:\r\n\r\n // LUCENENET NOTE: SortedSet doesn't have atomic operations,\r\n // so we need to add some thread safety just in case.\r\n // Perhaps it might make sense to wrap SortedSet into a type\r\n // that provides thread safety.\r\n lock (syncLock)\r\n {\r\n path = queue.Min;\r\n if (path != null)\r\n {\r\n queue.Remove(path);\r\n }\r\n }\r\n\r\n if (path == null)\r\n {\r\n // There were less than topN paths available:\r\n //System.out.println(\" break no more paths\");\r\n break;\r\n }\r\n\r\n if (path.Arc.Label == FST.END_LABEL)\r\n {\r\n //System.out.println(\" empty string! cost=\" + path.cost);\r\n // Empty string!\r\n path.Input.Length--;\r\n results.Add(new Result<T>(path.Input, path.Cost));\r\n continue;\r\n }\r\n\r\n if (results.Count == topN - 1 && maxQueueDepth == topN)\r\n {\r\n // Last path -- don't bother w/ queue anymore:\r\n queue = null;\r\n }\r\n\r\n //System.out.println(\" path: \" + path);\r\n\r\n // We take path and find its \"0 output completion\",\r\n // ie, just keep traversing the first arc with\r\n // NO_OUTPUT that we can find, since this must lead\r\n // to the minimum path that completes from\r\n // path.arc.\r\n\r\n // For each input letter:\r\n while (true)\r\n {\r\n //System.out.println(\"\\n cycle path: \" + path);\r\n fst.ReadFirstTargetArc(path.Arc, path.Arc, fstReader);\r\n\r\n // For each arc leaving this node:\r\n bool foundZero = false;\r\n while (true)\r\n {\r\n //System.out.println(\" arc=\" + (char) path.arc.label + \" cost=\" + path.arc.output);\r\n // tricky: instead of comparing output == 0, we must\r\n // express it via the comparer compare(output, 0) == 0\r\n if (comparer.Compare(NO_OUTPUT, path.Arc.Output) == 0)\r\n {\r\n if (queue == null)\r\n {\r\n foundZero = true;\r\n break;\r\n }\r\n else if (!foundZero)\r\n {\r\n scratchArc.CopyFrom(path.Arc);\r\n foundZero = true;\r\n }\r\n else\r\n {\r\n AddIfCompetitive(path);\r\n }\r\n }\r\n else if (queue != null)\r\n {\r\n AddIfCompetitive(path);\r\n }\r\n if (path.Arc.IsLast)\r\n {\r\n break;\r\n }\r\n fst.ReadNextArc(path.Arc, fstReader);\r\n }\r\n\r\n if (Debugging.AssertsEnabled) Debugging.Assert(foundZero);\r\n\r\n if (queue != null)\r\n {\r\n // TODO: maybe we can save this copyFrom if we\r\n // are more clever above... eg on finding the\r\n // first NO_OUTPUT arc we'd switch to using\r\n // scratchArc\r\n path.Arc.CopyFrom(scratchArc);\r\n }\r\n\r\n if (path.Arc.Label == FST.END_LABEL)\r\n {\r\n // Add final output:\r\n //Debug.WriteLine(\" done!: \" + path);\r\n T finalOutput = fst.Outputs.Add(path.Cost, path.Arc.Output);\r\n if (AcceptResult(path.Input, finalOutput))\r\n {\r\n //Debug.WriteLine(\" add result: \" + path);\r\n results.Add(new Result<T>(path.Input, finalOutput));\r\n }\r\n else\r\n {\r\n rejectCount++;\r\n }\r\n break;\r\n }\r\n else\r\n {\r\n path.Input.Grow(1 + path.Input.Length);\r\n path.Input.Int32s[path.Input.Length] = path.Arc.Label;\r\n path.Input.Length++;\r\n path.Cost = fst.Outputs.Add(path.Cost, path.Arc.Output);\r\n }\r\n }\r\n }\r\n return new TopResults<T>(rejectCount + topN <= maxQueueDepth, results);\r\n }\r\n\r\n protected virtual bool AcceptResult(Int32sRef input, T output)\r\n {\r\n return true;\r\n }\r\n }\r\n\r\n /// <summary>\r\n /// Holds a single input (<see cref=\"Int32sRef\"/>) + output, returned by\r\n /// <see cref=\"ShortestPaths\"/>.\r\n /// </summary>\r\n public sealed class Result<T>\r\n {\r\n public Int32sRef Input { get; private set; }\r\n public T Output { get; private set; }\r\n\r\n public Result(Int32sRef input, T output)\r\n {\r\n this.Input = input;\r\n this.Output = output;\r\n }\r\n }\r\n\r\n /// <summary>\r\n /// Holds the results for a top N search using <see cref=\"TopNSearcher{T}\"/>\r\n /// </summary>\r\n public sealed class TopResults<T> : IEnumerable<Result<T>>\r\n {\r\n /// <summary>\r\n /// <c>true</c> iff this is a complete result ie. if\r\n /// the specified queue size was large enough to find the complete list of results. this might\r\n /// be <c>false</c> if the <see cref=\"TopNSearcher{T}\"/> rejected too many results.\r\n /// </summary>\r\n public bool IsComplete { get; private set; }\r\n\r\n /// <summary>\r\n /// The top results\r\n /// </summary>\r\n public IList<Result<T>> TopN { get; private set; }\r\n\r\n internal TopResults(bool isComplete, IList<Result<T>> topN)\r\n {\r\n this.TopN = topN;\r\n this.IsComplete = isComplete;\r\n }\r\n\r\n public IEnumerator<Result<T>> GetEnumerator()\r\n {\r\n return TopN.GetEnumerator();\r\n }\r\n\r\n System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()\r\n {\r\n return GetEnumerator();\r\n }\r\n }\r\n\r\n /// <summary>\r\n /// Starting from node, find the top N min cost\r\n /// completions to a final node.\r\n /// </summary>\r\n public static TopResults<T> ShortestPaths<T>(FST<T> fst, FST.Arc<T> fromNode, T startOutput, IComparer<T> comparer, int topN, bool allowEmptyString)\r\n {\r\n // All paths are kept, so we can pass topN for\r\n // maxQueueDepth and the pruning is admissible:\r\n TopNSearcher<T> searcher = new TopNSearcher<T>(fst, topN, topN, comparer);\r\n\r\n // since this search is initialized with a single start node\r\n // it is okay to start with an empty input path here\r\n searcher.AddStartPaths(fromNode, startOutput, allowEmptyString, new Int32sRef());\r\n return searcher.Search();\r\n }\r\n\r\n /// <summary>\r\n /// Dumps an <see cref=\"FST{T}\"/> to a GraphViz's <c>dot</c> language description\r\n /// for visualization. Example of use:\r\n ///\r\n /// <code>\r\n /// using (TextWriter sw = new StreamWriter(&quot;out.dot&quot;))\r\n /// {\r\n /// Util.ToDot(fst, sw, true, true);\r\n /// }\r\n /// </code>\r\n ///\r\n /// and then, from command line:\r\n ///\r\n /// <code>\r\n /// dot -Tpng -o out.png out.dot\r\n /// </code>\r\n ///\r\n /// <para/>\r\n /// Note: larger FSTs (a few thousand nodes) won't even\r\n /// render, don't bother. If the FST is &gt; 2.1 GB in size\r\n /// then this method will throw strange exceptions.\r\n /// <para/>\r\n /// See also <a href=\"http://www.graphviz.org/\">http://www.graphviz.org/</a>.\r\n /// </summary>\r\n /// <param name=\"sameRank\">\r\n /// If <c>true</c>, the resulting <c>dot</c> file will try\r\n /// to order states in layers of breadth-first traversal. This may\r\n /// mess up arcs, but makes the output FST's structure a bit clearer.\r\n /// </param>\r\n /// <param name=\"labelStates\">\r\n /// If <c>true</c> states will have labels equal to their offsets in their\r\n /// binary format. Expands the graph considerably.\r\n /// </param>\r\n public static void ToDot<T>(FST<T> fst, TextWriter @out, bool sameRank, bool labelStates)\r\n {\r\n const string expandedNodeColor = \"blue\";\r\n\r\n // this is the start arc in the automaton (from the epsilon state to the first state\r\n // with outgoing transitions.\r\n FST.Arc<T> startArc = fst.GetFirstArc(new FST.Arc<T>());\r\n\r\n // A queue of transitions to consider for the next level.\r\n IList<FST.Arc<T>> thisLevelQueue = new JCG.List<FST.Arc<T>>();\r\n\r\n // A queue of transitions to consider when processing the next level.\r\n IList<FST.Arc<T>> nextLevelQueue = new JCG.List<FST.Arc<T>>\r\n {\r\n startArc\r\n };\r\n //System.out.println(\"toDot: startArc: \" + startArc);\r\n\r\n // A list of states on the same level (for ranking).\r\n IList<int?> sameLevelStates = new JCG.List<int?>();\r\n\r\n // A bitset of already seen states (target offset).\r\n BitSet seen = new BitSet();\r\n seen.Set((int)startArc.Target);\r\n\r\n // Shape for states.\r\n const string stateShape = \"circle\";\r\n const string finalStateShape = \"doublecircle\";\r\n\r\n // Emit DOT prologue.\r\n @out.Write(\"digraph FST {\\n\");\r\n @out.Write(\" rankdir = LR; splines=true; concentrate=true; ordering=out; ranksep=2.5; \\n\");\r\n\r\n if (!labelStates)\r\n {\r\n @out.Write(\" node [shape=circle, width=.2, height=.2, style=filled]\\n\");\r\n }\r\n\r\n EmitDotState(@out, \"initial\", \"point\", \"white\", \"\");\r\n\r\n T NO_OUTPUT = fst.Outputs.NoOutput;\r\n var r = fst.GetBytesReader();\r\n\r\n // final FST.Arc<T> scratchArc = new FST.Arc<>();\r\n\r\n {\r\n string stateColor;\r\n if (fst.IsExpandedTarget(startArc, r))\r\n {\r\n stateColor = expandedNodeColor;\r\n }\r\n else\r\n {\r\n stateColor = null;\r\n }\r\n\r\n bool isFinal;\r\n T finalOutput;\r\n if (startArc.IsFinal)\r\n {\r\n isFinal = true;\r\n finalOutput = startArc.NextFinalOutput.Equals(NO_OUTPUT) ? default : startArc.NextFinalOutput;\r\n }\r\n else\r\n {\r\n isFinal = false;\r\n finalOutput = default;\r\n }\r\n\r\n EmitDotState(@out, Convert.ToString(startArc.Target), isFinal ? finalStateShape : stateShape, stateColor, finalOutput == null ? \"\" : fst.Outputs.OutputToString(finalOutput));\r\n }\r\n\r\n @out.Write(\" initial -> \" + startArc.Target + \"\\n\");\r\n\r\n int level = 0;\r\n\r\n while (nextLevelQueue.Count > 0)\r\n {\r\n // we could double buffer here, but it doesn't matter probably.\r\n //System.out.println(\"next level=\" + level);\r\n thisLevelQueue.AddRange(nextLevelQueue);\r\n nextLevelQueue.Clear();\r\n\r\n level++;\r\n @out.Write(\"\\n // Transitions and states at level: \" + level + \"\\n\");\r\n while (thisLevelQueue.Count > 0)\r\n {\r\n FST.Arc<T> arc = thisLevelQueue[thisLevelQueue.Count - 1];\r\n thisLevelQueue.RemoveAt(thisLevelQueue.Count - 1);\r\n //System.out.println(\" pop: \" + arc);\r\n if (FST<T>.TargetHasArcs(arc))\r\n {\r\n // scan all target arcs\r\n //System.out.println(\" readFirstTarget...\");\r\n\r\n long node = arc.Target;\r\n\r\n fst.ReadFirstRealTargetArc(arc.Target, arc, r);\r\n\r\n //System.out.println(\" firstTarget: \" + arc);\r\n\r\n while (true)\r\n {\r\n //System.out.println(\" cycle arc=\" + arc);\r\n // Emit the unseen state and add it to the queue for the next level.\r\n if (arc.Target >= 0 && !seen.Get((int)arc.Target))\r\n {\r\n /*\r\n boolean isFinal = false;\r\n T finalOutput = null;\r\n fst.readFirstTargetArc(arc, scratchArc);\r\n if (scratchArc.isFinal() && fst.targetHasArcs(scratchArc)) {\r\n // target is final\r\n isFinal = true;\r\n finalOutput = scratchArc.output == NO_OUTPUT ? null : scratchArc.output;\r\n System.out.println(\"dot hit final label=\" + (char) scratchArc.label);\r\n }\r\n */\r\n string stateColor;\r\n if (fst.IsExpandedTarget(arc, r))\r\n {\r\n stateColor = expandedNodeColor;\r\n }\r\n else\r\n {\r\n stateColor = null;\r\n }\r\n\r\n string finalOutput;\r\n if (arc.NextFinalOutput != null && !arc.NextFinalOutput.Equals(NO_OUTPUT))\r\n {\r\n finalOutput = fst.Outputs.OutputToString(arc.NextFinalOutput);\r\n }\r\n else\r\n {\r\n finalOutput = \"\";\r\n }\r\n\r\n EmitDotState(@out, Convert.ToString(arc.Target), stateShape, stateColor, finalOutput);\r\n // To see the node address, use this instead:\r\n //emitDotState(out, Integer.toString(arc.target), stateShape, stateColor, String.valueOf(arc.target));\r\n seen.Set((int)arc.Target);\r\n nextLevelQueue.Add((new FST.Arc<T>()).CopyFrom(arc));\r\n sameLevelStates.Add((int)arc.Target);\r\n }\r\n\r\n string outs;\r\n if (!arc.Output.Equals(NO_OUTPUT))\r\n {\r\n outs = \"/\" + fst.Outputs.OutputToString(arc.Output);\r\n }\r\n else\r\n {\r\n outs = \"\";\r\n }\r\n\r\n if (!FST<T>.TargetHasArcs(arc) && arc.IsFinal && !arc.NextFinalOutput.Equals(NO_OUTPUT))\r\n {\r\n // Tricky special case: sometimes, due to\r\n // pruning, the builder can [sillily] produce\r\n // an FST with an arc into the final end state\r\n // (-1) but also with a next final output; in\r\n // this case we pull that output up onto this\r\n // arc\r\n outs = outs + \"/[\" + fst.Outputs.OutputToString(arc.NextFinalOutput) + \"]\";\r\n }\r\n\r\n string arcColor;\r\n if (arc.Flag(FST.BIT_TARGET_NEXT))\r\n {\r\n arcColor = \"red\";\r\n }\r\n else\r\n {\r\n arcColor = \"black\";\r\n }\r\n\r\n if (Debugging.AssertsEnabled) Debugging.Assert(arc.Label != FST.END_LABEL);\r\n @out.Write(\" \" + node + \" -> \" + arc.Target + \" [label=\\\"\" + PrintableLabel(arc.Label) + outs + \"\\\"\" + (arc.IsFinal ? \" style=\\\"bold\\\"\" : \"\") + \" color=\\\"\" + arcColor + \"\\\"]\\n\");\r\n\r\n // Break the loop if we're on the last arc of this state.\r\n if (arc.IsLast)\r\n {\r\n //System.out.println(\" break\");\r\n break;\r\n }\r\n fst.ReadNextRealArc(arc, r);\r\n }\r\n }\r\n }\r\n\r\n // Emit state ranking information.\r\n if (sameRank && sameLevelStates.Count > 1)\r\n {\r\n @out.Write(\" {rank=same; \");\r\n foreach (int state in sameLevelStates)\r\n {\r\n @out.Write(state + \"; \");\r\n }\r\n @out.Write(\" }\\n\");\r\n }\r\n sameLevelStates.Clear();\r\n }\r\n\r\n // Emit terminating state (always there anyway).\r\n @out.Write(\" -1 [style=filled, color=black, shape=doublecircle, label=\\\"\\\"]\\n\\n\");\r\n @out.Write(\" {rank=sink; -1 }\\n\");\r\n\r\n @out.Write(\"}\\n\");\r\n @out.Flush();\r\n }\r\n\r\n /// <summary>\r\n /// Emit a single state in the <c>dot</c> language.\r\n /// </summary>\r\n private static void EmitDotState(TextWriter @out, string name, string shape, string color, string label)\r\n {\r\n @out.Write(\" \" + name \r\n + \" [\" \r\n + (shape != null ? \"shape=\" + shape : \"\") + \" \" \r\n + (color != null ? \"color=\" + color : \"\") + \" \" \r\n + (label != null ? \"label=\\\"\" + label + \"\\\"\" : \"label=\\\"\\\"\") + \" \" \r\n + \"]\\n\");\r\n }\r\n\r\n /// <summary>\r\n /// Ensures an arc's label is indeed printable (dot uses US-ASCII).\r\n /// </summary>\r\n private static string PrintableLabel(int label)\r\n {\r\n // Any ordinary ascii character, except for \" or \\, are\r\n // printed as the character; else, as a hex string:\r\n if (label >= 0x20 && label <= 0x7d && label != 0x22 && label != 0x5c) // \" OR \\\r\n {\r\n return char.ToString((char)label);\r\n }\r\n return \"0x\" + label.ToString(\"x\", CultureInfo.InvariantCulture);\r\n }\r\n\r\n /// <summary>\r\n /// Just maps each UTF16 unit (char) to the <see cref=\"int\"/>s in an\r\n /// <see cref=\"Int32sRef\"/>.\r\n /// </summary>\r\n public static Int32sRef ToUTF16(string s, Int32sRef scratch)\r\n {\r\n int charLimit = s.Length;\r\n scratch.Offset = 0;\r\n scratch.Length = charLimit;\r\n scratch.Grow(charLimit);\r\n for (int idx = 0; idx < charLimit; idx++)\r\n {\r\n scratch.Int32s[idx] = (int)s[idx];\r\n }\r\n return scratch;\r\n }\r\n\r\n /// <summary>\r\n /// Decodes the Unicode codepoints from the provided\r\n /// <see cref=\"ICharSequence\"/> and places them in the provided scratch\r\n /// <see cref=\"Int32sRef\"/>, which must not be <c>null</c>, returning it.\r\n /// </summary>\r\n public static Int32sRef ToUTF32(string s, Int32sRef scratch)\r\n {\r\n int charIdx = 0;\r\n int intIdx = 0;\r\n int charLimit = s.Length;\r\n while (charIdx < charLimit)\r\n {\r\n scratch.Grow(intIdx + 1);\r\n int utf32 = Character.CodePointAt(s, charIdx);\r\n scratch.Int32s[intIdx] = utf32;\r\n charIdx += Character.CharCount(utf32);\r\n intIdx++;\r\n }\r\n scratch.Length = intIdx;\r\n return scratch;\r\n }\r\n\r\n /// <summary>\r\n /// Decodes the Unicode codepoints from the provided\r\n /// <see cref=\"T:char[]\"/> and places them in the provided scratch\r\n /// <see cref=\"Int32sRef\"/>, which must not be <c>null</c>, returning it.\r\n /// </summary>\r\n public static Int32sRef ToUTF32(char[] s, int offset, int length, Int32sRef scratch)\r\n {\r\n int charIdx = offset;\r\n int intIdx = 0;\r\n int charLimit = offset + length;\r\n while (charIdx < charLimit)\r\n {\r\n scratch.Grow(intIdx + 1);\r\n int utf32 = Character.CodePointAt(s, charIdx, charLimit);\r\n scratch.Int32s[intIdx] = utf32;\r\n charIdx += Character.CharCount(utf32);\r\n intIdx++;\r\n }\r\n scratch.Length = intIdx;\r\n return scratch;\r\n }\r\n\r\n /// <summary>\r\n /// Just takes unsigned byte values from the <see cref=\"BytesRef\"/> and\r\n /// converts into an <see cref=\"Int32sRef\"/>.\r\n /// <para/>\r\n /// NOTE: This was toIntsRef() in Lucene\r\n /// </summary>\r\n public static Int32sRef ToInt32sRef(BytesRef input, Int32sRef scratch)\r\n {\r\n scratch.Grow(input.Length);\r\n for (int i = 0; i < input.Length; i++)\r\n {\r\n scratch.Int32s[i] = input.Bytes[i + input.Offset] & 0xFF;\r\n }\r\n scratch.Length = input.Length;\r\n return scratch;\r\n }\r\n\r\n /// <summary>\r\n /// Just converts <see cref=\"Int32sRef\"/> to <see cref=\"BytesRef\"/>; you must ensure the\r\n /// <see cref=\"int\"/> values fit into a <see cref=\"byte\"/>.\r\n /// </summary>\r\n public static BytesRef ToBytesRef(Int32sRef input, BytesRef scratch)\r\n {\r\n scratch.Grow(input.Length);\r\n for (int i = 0; i < input.Length; i++)\r\n {\r\n int value = input.Int32s[i + input.Offset];\r\n // NOTE: we allow -128 to 255\r\n if (Debugging.AssertsEnabled) Debugging.Assert(value >= sbyte.MinValue && value <= 255, () => \"value \" + value + \" doesn't fit into byte\");\r\n scratch.Bytes[i] = (byte)value;\r\n }\r\n scratch.Length = input.Length;\r\n return scratch;\r\n }\r\n\r\n // Uncomment for debugging:\r\n\r\n /*\r\n public static <T> void dotToFile(FST<T> fst, String filePath) throws IOException {\r\n Writer w = new OutputStreamWriter(new FileOutputStream(filePath));\r\n toDot(fst, w, true, true);\r\n w.Dispose();\r\n }\r\n */\r\n\r\n /// <summary>\r\n /// Reads the first arc greater or equal that the given label into the provided\r\n /// arc in place and returns it iff found, otherwise return <c>null</c>.\r\n /// </summary>\r\n /// <param name=\"label\"> the label to ceil on </param>\r\n /// <param name=\"fst\"> the fst to operate on </param>\r\n /// <param name=\"follow\"> the arc to follow reading the label from </param>\r\n /// <param name=\"arc\"> the arc to read into in place </param>\r\n /// <param name=\"in\"> the fst's <see cref=\"FST.BytesReader\"/> </param>\r\n public static FST.Arc<T> ReadCeilArc<T>(int label, FST<T> fst, FST.Arc<T> follow, FST.Arc<T> arc, FST.BytesReader @in)\r\n {\r\n // TODO maybe this is a useful in the FST class - we could simplify some other code like FSTEnum?\r\n if (label == FST.END_LABEL)\r\n {\r\n if (follow.IsFinal)\r\n {\r\n if (follow.Target <= 0)\r\n {\r\n arc.Flags = (sbyte)FST.BIT_LAST_ARC;\r\n }\r\n else\r\n {\r\n arc.Flags = 0;\r\n // NOTE: nextArc is a node (not an address!) in this case:\r\n arc.NextArc = follow.Target;\r\n arc.Node = follow.Target;\r\n }\r\n arc.Output = follow.NextFinalOutput;\r\n arc.Label = FST.END_LABEL;\r\n return arc;\r\n }\r\n else\r\n {\r\n return null;\r\n }\r\n }\r\n\r\n if (!FST<T>.TargetHasArcs(follow))\r\n {\r\n return null;\r\n }\r\n fst.ReadFirstTargetArc(follow, arc, @in);\r\n if (arc.BytesPerArc != 0 && arc.Label != FST.END_LABEL)\r\n {\r\n // Arcs are fixed array -- use binary search to find\r\n // the target.\r\n\r\n int low = arc.ArcIdx;\r\n int high = arc.NumArcs - 1;\r\n int mid /*= 0*/; // LUCENENET: Removed unnecessary assignment\r\n // System.out.println(\"do arc array low=\" + low + \" high=\" + high +\r\n // \" targetLabel=\" + targetLabel);\r\n while (low <= high)\r\n {\r\n mid = (int)((uint)(low + high) >> 1);\r\n @in.Position = arc.PosArcsStart;\r\n @in.SkipBytes(arc.BytesPerArc * mid + 1);\r\n int midLabel = fst.ReadLabel(@in);\r\n int cmp = midLabel - label;\r\n // System.out.println(\" cycle low=\" + low + \" high=\" + high + \" mid=\" +\r\n // mid + \" midLabel=\" + midLabel + \" cmp=\" + cmp);\r\n if (cmp < 0)\r\n {\r\n low = mid + 1;\r\n }\r\n else if (cmp > 0)\r\n {\r\n high = mid - 1;\r\n }\r\n else\r\n {\r\n arc.ArcIdx = mid - 1;\r\n return fst.ReadNextRealArc(arc, @in);\r\n }\r\n }\r\n if (low == arc.NumArcs)\r\n {\r\n // DEAD END!\r\n return null;\r\n }\r\n\r\n arc.ArcIdx = (low > high ? high : low);\r\n return fst.ReadNextRealArc(arc, @in);\r\n }\r\n\r\n // Linear scan\r\n fst.ReadFirstRealTargetArc(follow.Target, arc, @in);\r\n\r\n while (true)\r\n {\r\n // System.out.println(\" non-bs cycle\");\r\n // TODO: we should fix this code to not have to create\r\n // object for the output of every arc we scan... only\r\n // for the matching arc, if found\r\n if (arc.Label >= label)\r\n {\r\n // System.out.println(\" found!\");\r\n return arc;\r\n }\r\n else if (arc.IsLast)\r\n {\r\n return null;\r\n }\r\n else\r\n {\r\n fst.ReadNextRealArc(arc, @in);\r\n }\r\n }\r\n }\r\n }\r\n}"} +{"text": "# datatableLwcFsc\r\n\r\n## Lightning Web Component for Flow Screens \r\n\r\nThis component allows the user to configure and display a datatable in a Flow screen.\r\n\r\nAdditional components packaged with this LWC:\r\n\r\n Lightning Web Components: \r\n\r\n Apex Classes: SObjectController \r\n SObjectControllerTest\r\n\r\n04/01/20 - Eric Smith - Version 1.0\r\n\r\nFeatures:\r\n* The only required paramters are the SObject collection of records and a list of field API names\r\n* The field label and field type will default to what is defined in the object\r\n* Numeric fields will display with the correct number of decimal places as defined in the object\r\n* Lookup fields are supported and will display the referenced record's name field as a clickable link\r\n* All columns are sortable, including lookups (by name)\r\n* The selection column can be multi-select (Checkboxes), single-select (Radio Buttons), or hidden\r\n* A collection of pre-selected rows can be passed into the component\r\n* Inline editing is supported with changed values passed back to the flow\r\n* Unlike the original datatable component, only the edited records will be passed back to the flow\r\n* The maximum number of rows to display can be set by the user\r\n* Optional attribute overrides are supported and can be specified by list, column # or by field name, including:\r\n * Alignment\r\n * Editable\r\n * Header Icon\r\n * Header Label\r\n * Initial Column Width\r\n * Custom Cell Attributes with nested values {name: {name:value}}\r\n * Custom Type Attributes with nested values {name: {name:value}}\r\n * Other Custom Column Attributes with nested values {name: {name:value}}\r\n\r\n\r\n04/14/20 - Eric Smith - Version 1.1\r\n\r\nAdditions: New Column Attribute to support column filtering\r\n\r\n\r\n"} +{"text": "*pi_zip.txt*\tFor Vim バージョン 8.2. Last change: 2020 Jan 07\n\n\t\t\t\t+====================+\n\t\t\t\t| Zip File Interface |\n\t\t\t\t+====================+\n\nAuthor: Charles E. Campbell <NcampObell@SdrPchip.AorgM-NOSPAM>\n\t (まずメールアドレスから NOSPAM を削除してください)\nCopyright: Copyright (C) 2005-2015 Charles E Campbell\t *zip-copyright*\n\tThe VIM LICENSE (see |copyright|) applies to the files in this\n\tpackage, including zipPlugin.vim, zip.vim, and pi_zip.vim. except use\n\t\"zip.vim\" instead of \"VIM\". Like anything else that's free, zip.vim\n\tand its associated files are provided *as is* and comes with no\n\twarranty of any kind, either expressed or implied. No guarantees of\n\tmerchantability. No guarantees of suitability for any purpose. By\n\tusing this plugin, you agree that in no event will the copyright\n\tholder be liable for any damages resulting from the use of this\n\tsoftware. Use at your own risk!\n\n==============================================================================\n1. 目次\t\t\t\t\t\t\t*zip* *zip-contents*\n 1. 目次....................................................|zip-contents|\n 2. 使い方..................................................|zip-usage|\n 3. zip以外の拡張子.........................................|zip-extension|\n 4. 開発履歴................................................|zip-history|\n\n==============================================================================\n2. 使い方\t\t\t\t\t\t*zip-usage* *zip-manual*\n\n *.zip ファイルを開くとファイルの一覧が表示されます。一覧の中のファイルを開\n きたい場合はファイル名の上にカーソルを移動して <return> キーを押してくださ\n い。開いたファイルを編集して保存することもできます。zip アーカイブに新しい\n ファイルを追加することはまだできません。\n\n コマンド~\n\t\t\t\t\t\t\t\t*zip-x*\n x : カーソル上にある一覧のファイルを解凍します\n\n オプション~\n\n \t\t\t\t\t\t\t*g:zip_nomax*\n\n この変数が存在し、その値が真なら、ファイルを開いたときにウィンドウを最大化\n しません。\n\n\t\t\t\t\t\t\t*g:zip_shq*\n コマンドの実行に使用されるシェルはシステムによって異なります。Zip は適切な\n 方法でスペースなどの文字をクォートしようとしますが、それがうまく機能しない\n 場合はこの変数を設定してください。 >\n\tg:zip_shq\n< 初期設定は、Unix ではシングルクォート (')、Windows ではダブルクォート (\")\n です。クォート自体をしたくない場合は <.vimrc> の中で g:zip_shq に空文字を設\n 定してください (let g:zip_shq = \"\")。\n\n \t\t\t\t\t\t\t*g:zip_unzipcmd*\n \"unzip\" として使用するプログラムを指定します。これはブラウジングに使用され\n ます。初期設定: >\n \tlet g:zip_unzipcmd= \"unzip\"\n<\n\t\t\t\t\t\t\t*g:zip_zipcmd*\n \"zip\" として使用するプログラムを指定します。これは zip ファイルを保存する\n (更新する) ときに使用されます。初期設定: >\n \tlet g:zip_zipcmd= \"zip\"\n<\n\t\t\t\t\t\t\t*g:zip_extractcmd*\n このオプションは zip アーカイブからファイルを解凍する為のプログラム(とそれ\n に必要なオプション)を指定します。初期設定: >\n \tlet g:zip_extractcmd= g:zip_unzipcmd\n<\n ロードの無効化~\n\n もしなんらかの理由で vim で zip ファイルを開きたくない場合は、次の二つの変\n 数を <.vimrc> で設定すると、zip プラグインのロードを無効化できます: >\n\n\tlet g:loaded_zipPlugin= 1\n\tlet g:loaded_zip = 1\n<\n\n==============================================================================\n3. zip 以外の拡張子\t\t\t\t\t\t*zip-extension*\n\n zip ファイルを zip 以外の拡張子 (.jar や .xpi など) で生成するアーカイバが\n あります。そのようなファイルを扱いたい場合は、<.vimrc> ファイルに次のような\n 行を追加してください: >\n\n\tau BufReadCmd *.jar,*.xpi call zip#Browse(expand(\"<amatch>\"))\n<\n この行に拡張子を追加していけば対応する拡張子を増やすことができます。\n\n 代わりに .vimrc で *g:zipPlugin_ext* を使って変更する方法もあります。\n 現時点 (11/30/15) 以下が含まれる: >\n\n\tlet g:zipPlugin_ext= '*.zip,*.jar,*.xpi,*.ja,*.war,*.ear,*.celzip,\n \\ *.oxt,*.kmz,*.wsz,*.xap,*.docx,*.docm,*.dotx,*.dotm,*.potx,*.potm,\n \\ *.ppsx,*.ppsm,*.pptx,*.pptm,*.ppam,*.sldx,*.thmx,*.xlam,*.xlsx,*.xlsm,\n \\ *.xlsb,*.xltx,*.xltm,*.xlam,*.crtx,*.vdw,*.glox,*.gcsx,*.gqsx,*.epub'\n\n==============================================================================\n4. 開発履歴\t\t\t\t\t\t\t*zip-history* {{{1\n v29 Apr 02, 2017 * (Klartext) reported that an encrypted zip file could\n \t\t opened but the swapfile held unencrypted contents.\n\t\t The solution is to edit the contents of a zip file\n\t\t using the |:noswapfile| modifier.\n v28 Oct 08, 2014 * changed the sanity checks for executables to reflect\n \t\t the command actually to be attempted in zip#Read()\n\t\t and zip#Write()\n\t\t * added the extraction of a file capability\n Nov 30, 2015 * added *.epub to the |g:zipPlugin_ext| list\n Sep 13, 2016 * added *.apk to the |g:zipPlugin_ext| list and\n\t\t sorted the suffices.\n v27 Jul 02, 2013 * sanity check: zipfile must have \"PK\" as its first\n\t\t two bytes.\n\t\t * modified to allow zipfile: entries in quickfix lists\n\n v26 Nov 15, 2012 * (Jason Spiro) provided a lot of new extensions that\n\t\t are synonyms for .zip\n v25 Jun 27, 2011 * using keepj with unzip -Z\n\t\t (consistent with the -p variant)\n\t\t * (Ben Staniford) now uses\n\t\t\thas(\"win32unix\") && executable(\"cygpath\")\n\t\t before converting to cygwin-style paths\n v24 Jun 21, 2010 * (Cédric Bosdonnat) unzip seems to need its filenames\n\t\t fnameescape'd as well as shellquote'd\n\t\t * (Motoya Kurotsu) inserted keepj before 0d to protect\n\t\t jump list\n v17 May 09, 2008 * arno caught a security bug\n v15 Sep 07, 2007 * &shq now used if not the empty string for g:zip_shq\n v14 May 07, 2007 * using b:zipfile instead of w:zipfile to avoid problem\n when editing alternate file to bring up a zipfile\n v10 May 02, 2006 * now using \"redraw then echo\" to show messages, instead\n of \"echo and prompt user\"\n\t\t * g:zip_shq provided to allow for quoting control for the\n\t\t command being passed via :r! ... commands.\n v8 Apr 10, 2006 * Bram Moolenaar reported that he received an error message\n due to \"Pattern not found: ^.*\\%0c\"; this was caused by\n\t\t stridx finding a Name... at the beginning of the line;\n\t\t zip.vim tried 4,$s/^.*\\%0c//, but that doesn't work.\n\t\t Fixed.\n v7 Mar 22, 2006 * escaped some characters that can cause filename handling\n problems.\n v6 Dec 21, 2005 * writing to files not in directories caused problems -\n fixed (pointed out by Christian Robinson)\n v5 Nov 22, 2005 * report option workaround installed\n v3 Oct 18, 2005 * <amatch> used instead of <afile> in autocmds\n v2 Sep 16, 2005 * silenced some commands (avoiding hit-enter prompt)\n * began testing under Windows; works thus far\n\t\t * filetype detection fixed\n Nov 03, 2005 * handles writing zipfiles across a network using\n netrw#NetWrite()\n v1 Sep 15, 2005 * Initial release, had browsing, reading, and writing\n\n==============================================================================\nvim:tw=78:ts=8:noet:ft=help:fdm=marker\n"} +{"text": "#!/usr/bin/env ruby\nrequire File.dirname(__FILE__) + '/../../config/boot'\nrequire 'commands/performance/benchmarker'\n"} +{"text": "module.exports = function () { /* empty */ };\n"} +{"text": "// +build !linux,!windows,!solaris\n\n/*\n Copyright The containerd Authors.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n*/\n\npackage command\n\nimport (\n\t\"github.com/containerd/containerd/defaults\"\n\tsrvconfig \"github.com/containerd/containerd/services/server/config\"\n)\n\nfunc defaultConfig() *srvconfig.Config {\n\treturn &srvconfig.Config{\n\t\tVersion: 1,\n\t\tRoot: defaults.DefaultRootDir,\n\t\tState: defaults.DefaultStateDir,\n\t\tGRPC: srvconfig.GRPCConfig{\n\t\t\tAddress: defaults.DefaultAddress,\n\t\t},\n\t\tDebug: srvconfig.Debug{\n\t\t\tLevel: \"info\",\n\t\t\tAddress: defaults.DefaultDebugAddress,\n\t\t},\n\t\tDisabledPlugins: []string{},\n\t\tRequiredPlugins: []string{},\n\t}\n}\n"} +{"text": "///////////////////////////////////////////////////////////////////////////////////\n/// OpenGL Mathematics (glm.g-truc.net)\n///\n/// Copyright (c) 2005 - 2015 G-Truc Creation (www.g-truc.net)\n/// Permission is hereby granted, free of charge, to any person obtaining a copy\n/// of this software and associated documentation files (the \"Software\"), to deal\n/// in the Software without restriction, including without limitation the rights\n/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n/// copies of the Software, and to permit persons to whom the Software is\n/// furnished to do so, subject to the following conditions:\n/// \n/// The above copyright notice and this permission notice shall be included in\n/// all copies or substantial portions of the Software.\n/// \n/// Restrictions:\n///\t\tBy making use of the Software for military purposes, you choose to make\n///\t\ta Bunny unhappy.\n/// \n/// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n/// THE SOFTWARE.\n///\n/// @ref gtx_component_wise\n/// @file glm/gtx/component_wise.hpp\n/// @date 2007-05-21 / 2011-06-07\n/// @author Christophe Riccio\n/// \n/// @see core (dependence)\n///\n/// @defgroup gtx_component_wise GLM_GTX_component_wise\n/// @ingroup gtx\n/// \n/// @brief Operations between components of a type\n/// \n/// <glm/gtx/component_wise.hpp> need to be included to use these functionalities.\n///////////////////////////////////////////////////////////////////////////////////\n\n#pragma once\n\n// Dependencies\n#include \"../detail/setup.hpp\"\n#include \"../detail/precision.hpp\"\n\n#if(defined(GLM_MESSAGES) && !defined(GLM_EXT_INCLUDED))\n#\tpragma message(\"GLM: GLM_GTX_component_wise extension included\")\n#endif\n\nnamespace glm\n{\n\t/// @addtogroup gtx_component_wise\n\t/// @{\n\n\t/// Add all vector components together. \n\t/// @see gtx_component_wise\n\ttemplate <typename genType> \n\tGLM_FUNC_DECL typename genType::value_type compAdd(\n\t\tgenType const & v);\n\n\t/// Multiply all vector components together. \n\t/// @see gtx_component_wise\n\ttemplate <typename genType> \n\tGLM_FUNC_DECL typename genType::value_type compMul(\n\t\tgenType const & v);\n\n\t/// Find the minimum value between single vector components.\n\t/// @see gtx_component_wise\n\ttemplate <typename genType> \n\tGLM_FUNC_DECL typename genType::value_type compMin(\n\t\tgenType const & v);\n\n\t/// Find the maximum value between single vector components.\n\t/// @see gtx_component_wise\n\ttemplate <typename genType> \n\tGLM_FUNC_DECL typename genType::value_type compMax(\n\t\tgenType const & v);\n\n\t/// @}\n}//namespace glm\n\n#include \"component_wise.inl\"\n"} +{"text": "/*\n * ProGuard -- shrinking, optimization, obfuscation, and preverification\n * of Java bytecode.\n *\n * Copyright (c) 2002-2017 Eric Lafortune @ GuardSquare\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the Free\n * Software Foundation; either version 2 of the License, or (at your option)\n * any later version.\n *\n * This program is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n * more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\n */\npackage proguard.classfile.attribute.visitor;\n\nimport proguard.classfile.*;\nimport proguard.classfile.attribute.*;\n\n\n/**\n * This interface specifies the methods for a visitor of\n * <code>LocalVariableTypeInfo</code> objects. Note that there is only a single\n * implementation of <code>LocalVariableTypeInfo</code>, such that this interface\n * is not strictly necessary as a visitor.\n *\n * @author Eric Lafortune\n */\npublic interface LocalVariableTypeInfoVisitor\n{\n public void visitLocalVariableTypeInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTypeInfo localVariableTypeInfo);\n}\n"} +{"text": "# example.conf: A single-node Flume configuration\n\n# Name the components on this agent\na1.sources = r1\na1.sinks = k1\na1.channels = c1\n\n# Describe/configure the source\na1.sources.r1.type = exec\na1.sources.r1.command = tail -F /opt/data/access.log\n\n# Describe the sink\na1.sinks.k1.type = hdfs\na1.sinks.k1.hdfs.path = /project/%Y%m%d\na1.sinks.k1.hdfs.filePrefix = log-\na1.sinks.k1.hdfs.rollInterval = 0\na1.sinks.k1.hdfs.rollSize = 10240\na1.sinks.k1.hdfs.rollCount = 0\na1.sinks.k1.hdfs.idleTimeout = 30\na1.sinks.k1.hdfs.fileType = DataStream\na1.sinks.k1.hdfs.callTimeout = 60000\na1.sinks.k1.hdfs.useLocalTimeStamp = true\n\n# Use a channel which buffers events in memory\na1.channels.c1.type = memory\na1.channels.c1.capacity = 1000\na1.channels.c1.transactionCapacity = 100\n\n# Bind the source and sink to the channel\na1.sources.r1.channels = c1\na1.sinks.k1.channel = c1\n"} +{"text": "/****************************************************************************\n**\n** Copyright (C) 2018 The Qt Company Ltd.\n** Contact: https://www.qt.io/licensing/\n**\n** This file is part of the documentation of the Qt Toolkit.\n**\n** $QT_BEGIN_LICENSE:BSD$\n** Commercial License Usage\n** Licensees holding valid commercial Qt licenses may use this file in\n** accordance with the commercial license agreement provided with the\n** Software or, alternatively, in accordance with the terms contained in\n** a written agreement between you and The Qt Company. For licensing terms\n** and conditions see https://www.qt.io/terms-conditions. For further\n** information use the contact form at https://www.qt.io/contact-us.\n**\n** BSD License Usage\n** Alternatively, you may use this file under the terms of the BSD license\n** as follows:\n**\n** \"Redistribution and use in source and binary forms, with or without\n** modification, are permitted provided that the following conditions are\n** met:\n** * Redistributions of source code must retain the above copyright\n** notice, this list of conditions and the following disclaimer.\n** * Redistributions in binary form must reproduce the above copyright\n** notice, this list of conditions and the following disclaimer in\n** the documentation and/or other materials provided with the\n** distribution.\n** * Neither the name of The Qt Company Ltd nor the names of its\n** contributors may be used to endorse or promote products derived\n** from this software without specific prior written permission.\n**\n**\n** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n** \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\"\n**\n** $QT_END_LICENSE$\n**\n****************************************************************************/\n\n//! [0]\n void myfun1(QStringView sv); // preferred\n void myfun2(const QStringView &sv); // compiles and works, but slower\n//! [0]\n\n//! [1]\n void fun(QChar ch) { fun(QStringView(&ch, 1)); }\n//! [1]\n"} +{"text": "{% extends \"base_site.html\" %}\n\n{% block title %} Form Upload {% endblock title %}\n\n{% block stylesheets %}\n {{ super() }}\n <!-- Dropzone.js -->\n <link href=\"{{ url_for('static', filename='vendors/dropzone/dist/min/dropzone.min.css') }}\" rel=\"stylesheet\">\n{% endblock stylesheets %}\n\n{% block content %}\n <div class=\"right_col\" role=\"main\">\n <div class=\"\">\n <div class=\"page-title\">\n <div class=\"title_left\">\n <h3>Form Upload </h3>\n </div>\n\n <div class=\"title_right\">\n <div class=\"col-md-5 col-sm-5 col-xs-12 form-group pull-right top_search\">\n <div class=\"input-group\">\n <input type=\"text\" class=\"form-control\" placeholder=\"Search for...\">\n <span class=\"input-group-btn\">\n <button class=\"btn btn-default\" type=\"button\">Go!</button>\n </span>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"clearfix\"></div>\n\n <div class=\"row\">\n <div class=\"col-md-12 col-sm-12 col-xs-12\">\n <div class=\"x_panel\">\n <div class=\"x_title\">\n <h2>Dropzone multiple file uploader</h2>\n <ul class=\"nav navbar-right panel_toolbox\">\n <li><a class=\"collapse-link\"><i class=\"fa fa-chevron-up\"></i></a>\n </li>\n <li class=\"dropdown\">\n <a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\" role=\"button\" aria-expanded=\"false\"><i class=\"fa fa-wrench\"></i></a>\n <ul class=\"dropdown-menu\" role=\"menu\">\n <li><a href=\"#\">Settings 1</a>\n </li>\n <li><a href=\"#\">Settings 2</a>\n </li>\n </ul>\n </li>\n <li><a class=\"close-link\"><i class=\"fa fa-close\"></i></a>\n </li>\n </ul>\n <div class=\"clearfix\"></div>\n </div>\n <div class=\"x_content\">\n <p>Drag multiple files to the box below for multi upload or click to select files. This is for demonstration purposes only, the files are not uploaded to any server.</p>\n <form action=\"form_upload.html\" class=\"dropzone\"></form>\n <br />\n <br />\n <br />\n <br />\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n{% endblock content %}\n\n{% block javascripts %}\n {{ super() }}\n <!-- Dropzone.js -->\n <script src=\"{{ url_for('static', filename='vendors/dropzone/dist/min/dropzone.min.js') }}\"></script>\n{% endblock javascripts %}\n"} +{"text": "/*\n * Marvell MV98DX3236 SoC clocks\n *\n * Copyright (C) 2012 Marvell\n *\n * Gregory CLEMENT <gregory.clement@free-electrons.com>\n * Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>\n * Andrew Lunn <andrew@lunn.ch>\n *\n * This file is licensed under the terms of the GNU General Public\n * License version 2. This program is licensed \"as is\" without any\n * warranty of any kind, whether express or implied.\n */\n\n#include <linux/kernel.h>\n#include <linux/clk-provider.h>\n#include <linux/io.h>\n#include <linux/of.h>\n#include \"common.h\"\n\n\n/*\n * For 98DX4251 Sample At Reset the CPU, DDR and Main PLL clocks are all\n * defined at the same time\n *\n * SAR1[20:18] : CPU frequency DDR frequency MPLL frequency\n *\t\t 0 = 400 MHz\t 400 MHz\t 800 MHz\n *\t\t 2 = 667 MHz\t 667 MHz\t 2000 MHz\n *\t\t 3 = 800 MHz\t 800 MHz\t 1600 MHz\n *\t\t others reserved.\n *\n * For 98DX3236 Sample At Reset the CPU, DDR and Main PLL clocks are all\n * defined at the same time\n *\n * SAR1[20:18] : CPU frequency DDR frequency MPLL frequency\n *\t\t 1 = 667 MHz\t 667 MHz\t 2000 MHz\n *\t\t 2 = 400 MHz\t 400 MHz\t 400 MHz\n *\t\t 3 = 800 MHz\t 800 MHz\t 800 MHz\n *\t\t 5 = 800 MHz\t 400 MHz\t 800 MHz\n *\t\t others reserved.\n */\n\n#define SAR1_MV98DX3236_CPU_DDR_MPLL_FREQ_OPT\t\t18\n#define SAR1_MV98DX3236_CPU_DDR_MPLL_FREQ_OPT_MASK\t0x7\n\nstatic u32 __init mv98dx3236_get_tclk_freq(void __iomem *sar)\n{\n\t/* Tclk = 200MHz, no SaR dependency */\n\treturn 200000000;\n}\n\nstatic const u32 mv98dx3236_cpu_frequencies[] __initconst = {\n\t0,\n\t667000000,\n\t400000000,\n\t800000000,\n\t0,\n\t800000000,\n\t0, 0,\n};\n\nstatic const u32 mv98dx4251_cpu_frequencies[] __initconst = {\n\t400000000,\n\t0,\n\t667000000,\n\t800000000,\n\t0, 0, 0, 0,\n};\n\nstatic u32 __init mv98dx3236_get_cpu_freq(void __iomem *sar)\n{\n\tu32 cpu_freq = 0;\n\tu8 cpu_freq_select = 0;\n\n\tcpu_freq_select = ((readl(sar) >> SAR1_MV98DX3236_CPU_DDR_MPLL_FREQ_OPT) &\n\t\t\t SAR1_MV98DX3236_CPU_DDR_MPLL_FREQ_OPT_MASK);\n\n\tif (of_machine_is_compatible(\"marvell,armadaxp-98dx4251\"))\n\t\tcpu_freq = mv98dx4251_cpu_frequencies[cpu_freq_select];\n\telse if (of_machine_is_compatible(\"marvell,armadaxp-98dx3236\"))\n\t\tcpu_freq = mv98dx3236_cpu_frequencies[cpu_freq_select];\n\n\tif (!cpu_freq)\n\t\tpr_err(\"CPU freq select unsupported %d\\n\", cpu_freq_select);\n\n\treturn cpu_freq;\n}\n\nenum {\n\tMV98DX3236_CPU_TO_DDR,\n\tMV98DX3236_CPU_TO_MPLL\n};\n\nstatic const struct coreclk_ratio mv98dx3236_core_ratios[] __initconst = {\n\t{ .id = MV98DX3236_CPU_TO_DDR, .name = \"ddrclk\" },\n\t{ .id = MV98DX3236_CPU_TO_MPLL, .name = \"mpll\" },\n};\n\nstatic const int __initconst mv98dx3236_cpu_mpll_ratios[8][2] = {\n\t{0, 1}, {3, 1}, {1, 1}, {1, 1},\n\t{0, 1}, {1, 1}, {0, 1}, {0, 1},\n};\n\nstatic const int __initconst mv98dx3236_cpu_ddr_ratios[8][2] = {\n\t{0, 1}, {1, 1}, {1, 1}, {1, 1},\n\t{0, 1}, {1, 2}, {0, 1}, {0, 1},\n};\n\nstatic const int __initconst mv98dx4251_cpu_mpll_ratios[8][2] = {\n\t{2, 1}, {0, 1}, {3, 1}, {2, 1},\n\t{0, 1}, {0, 1}, {0, 1}, {0, 1},\n};\n\nstatic const int __initconst mv98dx4251_cpu_ddr_ratios[8][2] = {\n\t{1, 1}, {0, 1}, {1, 1}, {1, 1},\n\t{0, 1}, {0, 1}, {0, 1}, {0, 1},\n};\n\nstatic void __init mv98dx3236_get_clk_ratio(\n\tvoid __iomem *sar, int id, int *mult, int *div)\n{\n\tu32 opt = ((readl(sar) >> SAR1_MV98DX3236_CPU_DDR_MPLL_FREQ_OPT) &\n\t\tSAR1_MV98DX3236_CPU_DDR_MPLL_FREQ_OPT_MASK);\n\n\tswitch (id) {\n\tcase MV98DX3236_CPU_TO_DDR:\n\t\tif (of_machine_is_compatible(\"marvell,armadaxp-98dx4251\")) {\n\t\t\t*mult = mv98dx4251_cpu_ddr_ratios[opt][0];\n\t\t\t*div = mv98dx4251_cpu_ddr_ratios[opt][1];\n\t\t} else if (of_machine_is_compatible(\"marvell,armadaxp-98dx3236\")) {\n\t\t\t*mult = mv98dx3236_cpu_ddr_ratios[opt][0];\n\t\t\t*div = mv98dx3236_cpu_ddr_ratios[opt][1];\n\t\t}\n\t\tbreak;\n\tcase MV98DX3236_CPU_TO_MPLL:\n\t\tif (of_machine_is_compatible(\"marvell,armadaxp-98dx4251\")) {\n\t\t\t*mult = mv98dx4251_cpu_mpll_ratios[opt][0];\n\t\t\t*div = mv98dx4251_cpu_mpll_ratios[opt][1];\n\t\t} else if (of_machine_is_compatible(\"marvell,armadaxp-98dx3236\")) {\n\t\t\t*mult = mv98dx3236_cpu_mpll_ratios[opt][0];\n\t\t\t*div = mv98dx3236_cpu_mpll_ratios[opt][1];\n\t\t}\n\t\tbreak;\n\t}\n}\n\nstatic const struct coreclk_soc_desc mv98dx3236_core_clocks = {\n\t.get_tclk_freq = mv98dx3236_get_tclk_freq,\n\t.get_cpu_freq = mv98dx3236_get_cpu_freq,\n\t.get_clk_ratio = mv98dx3236_get_clk_ratio,\n\t.ratios = mv98dx3236_core_ratios,\n\t.num_ratios = ARRAY_SIZE(mv98dx3236_core_ratios),\n};\n\n\n/*\n * Clock Gating Control\n */\n\nstatic const struct clk_gating_soc_desc mv98dx3236_gating_desc[] __initconst = {\n\t{ \"ge1\", NULL, 3, 0 },\n\t{ \"ge0\", NULL, 4, 0 },\n\t{ \"pex00\", NULL, 5, 0 },\n\t{ \"sdio\", NULL, 17, 0 },\n\t{ \"usb0\", NULL, 18, 0 },\n\t{ \"xor0\", NULL, 22, 0 },\n\t{ }\n};\n\nstatic void __init mv98dx3236_clk_init(struct device_node *np)\n{\n\tstruct device_node *cgnp =\n\t\tof_find_compatible_node(NULL, NULL, \"marvell,mv98dx3236-gating-clock\");\n\n\tmvebu_coreclk_setup(np, &mv98dx3236_core_clocks);\n\n\tif (cgnp)\n\t\tmvebu_clk_gating_setup(cgnp, mv98dx3236_gating_desc);\n}\nCLK_OF_DECLARE(mv98dx3236_clk, \"marvell,mv98dx3236-core-clock\", mv98dx3236_clk_init);\n"} +{"text": "@import \"/templates/coupon/item/coupon-item-template.wxss\";\npage{\n height: 100%;\n background-color: #f2f2f2;\n}"} +{"text": "#include \"drake/systems/framework/fixed_input_port_value.h\"\n\n#include \"drake/systems/framework/context_base.h\"\n\nnamespace drake {\nnamespace systems {\n\nAbstractValue* FixedInputPortValue::GetMutableData() {\n DRAKE_DEMAND(owning_subcontext_ != nullptr);\n ContextBase& context = *owning_subcontext_;\n const DependencyTracker& tracker = context.get_tracker(ticket_);\n const int64_t change_event = context.start_new_change_event();\n tracker.NoteValueChange(change_event);\n ++serial_number_;\n return value_.get_mutable();\n}\n\n} // namespace systems\n} // namespace drake\n"} +{"text": "YUI.add('moodle-form-dateselector', function (Y, NAME) {\n\nvar CALENDAR;\nvar MOODLECALENDAR;\nvar DIALOGUE_SELECTOR = ' [role=dialog]',\n MENUBAR_SELECTOR = '[role=menubar]',\n DOT = '.',\n HAS_ZINDEX = 'moodle-has-zindex';\n\n/**\n * Add some custom methods to the node class to make our lives a little\n * easier within this module.\n */\nY.mix(Y.Node.prototype, {\n /**\n * Gets the value of the first option in the select box\n */\n firstOptionValue: function() {\n if (this.get('nodeName').toLowerCase() !== 'select') {\n return false;\n }\n return this.one('option').get('value');\n },\n /**\n * Gets the value of the last option in the select box\n */\n lastOptionValue: function() {\n if (this.get('nodeName').toLowerCase() !== 'select') {\n return false;\n }\n return this.all('option').item(this.optionSize() - 1).get('value');\n },\n /**\n * Gets the number of options in the select box\n */\n optionSize: function() {\n if (this.get('nodeName').toLowerCase() !== 'select') {\n return false;\n }\n return parseInt(this.all('option').size(), 10);\n },\n /**\n * Gets the value of the selected option in the select box\n */\n selectedOptionValue: function() {\n if (this.get('nodeName').toLowerCase() !== 'select') {\n return false;\n }\n return this.all('option').item(this.get('selectedIndex')).get('value');\n }\n});\n\nM.form = M.form || {};\nM.form.dateselector = {\n panel: null,\n calendar: null,\n currentowner: null,\n hidetimeout: null,\n repositiontimeout: null,\n init_date_selectors: function(config) {\n if (this.panel === null) {\n this.initPanel(config);\n }\n Y.all('.fdate_time_selector').each(function() {\n config.node = this;\n new CALENDAR(config);\n });\n Y.all('.fdate_selector').each(function() {\n config.node = this;\n new CALENDAR(config);\n });\n },\n initPanel: function(config) {\n this.panel = new Y.Overlay({\n visible: false,\n bodyContent: Y.Node.create('<div id=\"dateselector-calendar-content\"></div>'),\n id: 'dateselector-calendar-panel',\n constrain: true // constrain panel to viewport.\n });\n this.panel.render(document.body);\n\n // Determine the correct zindex by looking at all existing dialogs and menubars in the page.\n var highestzindex = 0;\n Y.all(DIALOGUE_SELECTOR + ', ' + MENUBAR_SELECTOR + ', ' + DOT + HAS_ZINDEX).each(function(node) {\n var zindex = this.findZIndex(node);\n if (zindex > highestzindex) {\n highestzindex = zindex;\n }\n }, this);\n // Only set the zindex if we found a wrapper.\n var zindexvalue = (highestzindex + 1).toString();\n Y.one('#dateselector-calendar-panel').setStyle('zIndex', zindexvalue);\n\n this.panel.on('heightChange', this.fix_position, this);\n\n Y.one('#dateselector-calendar-panel').on('click', function(e) {\n e.halt();\n });\n Y.one(document.body).on('click', this.document_click, this);\n\n this.calendar = new MOODLECALENDAR({\n contentBox: \"#dateselector-calendar-content\",\n width: \"300px\",\n showPrevMonth: true,\n showNextMonth: true,\n firstdayofweek: parseInt(config.firstdayofweek, 10),\n WEEKDAYS_MEDIUM: [\n config.sun,\n config.mon,\n config.tue,\n config.wed,\n config.thu,\n config.fri,\n config.sat]\n });\n },\n findZIndex: function(node) {\n // In most cases the zindex is set on the parent of the dialog.\n var zindex = node.getStyle('zIndex') || node.ancestor().getStyle('zIndex');\n if (zindex) {\n return parseInt(zindex, 10);\n }\n return 0;\n },\n cancel_any_timeout: function() {\n if (this.hidetimeout) {\n clearTimeout(this.hidetimeout);\n this.hidetimeout = null;\n }\n if (this.repositiontimeout) {\n clearTimeout(this.repositiontimeout);\n this.repositiontimeout = null;\n }\n },\n delayed_reposition: function() {\n if (this.repositiontimeout) {\n clearTimeout(this.repositiontimeout);\n this.repositiontimeout = null;\n }\n this.repositiontimeout = setTimeout(this.fix_position, 500);\n },\n fix_position: function() {\n if (this.currentowner) {\n var alignpoints = [\n Y.WidgetPositionAlign.BL,\n Y.WidgetPositionAlign.TL\n ];\n\n // Change the alignment if this is an RTL language.\n if (window.right_to_left()) {\n alignpoints = [\n Y.WidgetPositionAlign.BR,\n Y.WidgetPositionAlign.TR\n ];\n }\n\n this.panel.set('align', {\n node: this.currentowner.get('node').one('select'),\n points: alignpoints\n });\n }\n },\n document_click: function(e) {\n if (this.currentowner) {\n if (this.currentowner.get('node').ancestor('div').contains(e.target)) {\n setTimeout(function() {\n M.form.dateselector.cancel_any_timeout();\n }, 100);\n } else {\n this.currentowner.release_calendar(e);\n }\n }\n }\n};\n/**\n * Provides the Moodle Calendar class.\n *\n * @module moodle-form-dateselector\n */\n\n/**\n * A class to overwrite the YUI3 Calendar in order to change the strings..\n *\n * @class M.form_moodlecalendar\n * @constructor\n * @extends Calendar\n */\nMOODLECALENDAR = function() {\n MOODLECALENDAR.superclass.constructor.apply(this, arguments);\n};\n\nY.extend(MOODLECALENDAR, Y.Calendar, {\n initializer: function(cfg) {\n this.set(\"strings.very_short_weekdays\", cfg.WEEKDAYS_MEDIUM);\n this.set(\"strings.first_weekday\", cfg.firstdayofweek);\n }\n }, {\n NAME: 'Calendar',\n ATTRS: {}\n }\n);\n\nM.form_moodlecalendar = M.form_moodlecalendar || {};\nM.form_moodlecalendar.initializer = function(params) {\n return new MOODLECALENDAR(params);\n};\n/**\n * Provides the Calendar class.\n *\n * @module moodle-form-dateselector\n */\n\n/**\n * Calendar class\n */\nCALENDAR = function() {\n CALENDAR.superclass.constructor.apply(this, arguments);\n};\nCALENDAR.prototype = {\n panel: null,\n yearselect: null,\n monthselect: null,\n dayselect: null,\n calendarimage: null,\n enablecheckbox: null,\n closepopup: true,\n initializer: function() {\n var controls = this.get('node').all('select');\n controls.each(function(node) {\n if (node.get('name').match(/\\[year\\]/)) {\n this.yearselect = node;\n } else if (node.get('name').match(/\\[month\\]/)) {\n this.monthselect = node;\n } else if (node.get('name').match(/\\[day\\]/)) {\n this.dayselect = node;\n }\n node.after('change', this.handle_select_change, this);\n }, this);\n\n // Loop through the input fields.\n var inputs = this.get('node').all('input, a');\n inputs.each(function(node) {\n // Check if the current node is a calendar image field.\n if (node.get('name').match(/\\[calendar\\]/)) {\n // Set it so that when the image is clicked the pop-up displays.\n node.on('click', this.focus_event, this);\n // Set the node to the calendarimage variable.\n this.calendarimage = node;\n } else { // Must be the enabled checkbox field.\n // If the enable checkbox is clicked we want to either disable/enable the calendar image.\n node.on('click', this.toggle_calendar_image, this);\n // Set the node to the enablecheckbox variable.\n this.enablecheckbox = node;\n }\n // Ensure that the calendarimage and enablecheckbox values have been set.\n if (this.calendarimage && this.enablecheckbox) {\n // Set the calendar icon status depending on the value of the checkbox.\n this.toggle_calendar_image();\n }\n }, this);\n },\n focus_event: function(e) {\n M.form.dateselector.cancel_any_timeout();\n // If the current owner is set, then the pop-up is currently being displayed, so hide it.\n if (M.form.dateselector.currentowner === this) {\n this.release_calendar();\n } else if ((this.enablecheckbox === null)\n || (this.enablecheckbox.get('checked'))) { // Must be hidden. If the field is enabled display the pop-up.\n this.claim_calendar();\n }\n // Stop the input image field from submitting the form.\n e.preventDefault();\n },\n handle_select_change: function() {\n // It may seem as if the following variable is not used, however any call to set_date_from_selects will trigger a\n // call to set_selects_from_date if the calendar is open as the date has changed. Whenever the calendar is displayed\n // the set_selects_from_date function is set to trigger on any date change (see function connect_handlers).\n this.closepopup = false;\n this.set_date_from_selects();\n this.closepopup = true;\n },\n claim_calendar: function() {\n M.form.dateselector.cancel_any_timeout();\n if (M.form.dateselector.currentowner === this) {\n return;\n }\n if (M.form.dateselector.currentowner) {\n M.form.dateselector.currentowner.release_calendar();\n }\n if (M.form.dateselector.currentowner !== this) {\n this.connect_handlers();\n this.set_date_from_selects();\n }\n M.form.dateselector.currentowner = this;\n M.form.dateselector.calendar.set('minimumDate', new Date(this.yearselect.firstOptionValue(), 0, 1));\n M.form.dateselector.calendar.set('maximumDate', new Date(this.yearselect.lastOptionValue(), 11, 31));\n M.form.dateselector.panel.show();\n M.form.dateselector.calendar.show();\n M.form.dateselector.fix_position();\n setTimeout(function() {\n M.form.dateselector.cancel_any_timeout();\n }, 100);\n\n // Focus on the calendar.\n M.form.dateselector.calendar.focus();\n\n // When the user tab out the calendar, close it.\n Y.one(document.body).on('keyup', function(e) {\n // hide the calendar if we press a key and the calendar is not focussed, or if we press ESC in the calendar.\n if ((M.form.dateselector.currentowner === this && !M.form.dateselector.calendar.get('focused')) ||\n ((e.keyCode === 27) && M.form.dateselector.calendar.get('focused'))) {\n // Focus back on the calendar button.\n this.calendarimage.focus();\n this.release_calendar();\n }\n }, this);\n\n },\n set_date_from_selects: function() {\n var year = parseInt(this.yearselect.get('value'), 10);\n var month = parseInt(this.monthselect.get('value'), 10) - 1;\n var day = parseInt(this.dayselect.get('value'), 10);\n var date = new Date(year, month, day);\n M.form.dateselector.calendar.deselectDates();\n M.form.dateselector.calendar.selectDates([date]);\n M.form.dateselector.calendar.set(\"date\", date);\n M.form.dateselector.calendar.render();\n if (date.getDate() !== day) {\n // Must've selected the 29 to 31st of a month that doesn't have such dates.\n this.dayselect.set('value', date.getDate());\n this.monthselect.set('value', date.getMonth() + 1);\n }\n },\n set_selects_from_date: function(ev) {\n var date = ev.newSelection[0];\n var newyear = Y.DataType.Date.format(date, {format: \"%Y\"});\n var newindex = newyear - this.yearselect.firstOptionValue();\n this.yearselect.set('selectedIndex', newindex);\n this.monthselect.set('selectedIndex', Y.DataType.Date.format(date, {format: \"%m\"}) - this.monthselect.firstOptionValue());\n this.dayselect.set('selectedIndex', Y.DataType.Date.format(date, {format: \"%d\"}) - this.dayselect.firstOptionValue());\n if (M.form.dateselector.currentowner && this.closepopup) {\n this.release_calendar();\n }\n },\n connect_handlers: function() {\n M.form.dateselector.calendar.on('selectionChange', this.set_selects_from_date, this, true);\n },\n release_calendar: function(e) {\n var wasOwner = M.form.dateselector.currentowner === this;\n M.form.dateselector.panel.hide();\n M.form.dateselector.calendar.detach('selectionChange', this.set_selects_from_date);\n M.form.dateselector.calendar.hide();\n M.form.dateselector.currentowner = null;\n\n // Put the focus back to the image calendar that we clicked, only if it was visible.\n if (wasOwner && (e === null || typeof e === \"undefined\" || e.type !== \"click\")) {\n this.calendarimage.focus();\n }\n },\n toggle_calendar_image: function() {\n // If the enable checkbox is det checked, disable the image.\n if (!this.enablecheckbox.get('checked')) {\n this.calendarimage.set('disabled', 'disabled');\n this.calendarimage.setStyle('cursor', 'default');\n this.release_calendar();\n } else {\n this.calendarimage.set('disabled', false);\n this.calendarimage.setStyle('cursor', null);\n }\n }\n};\nY.extend(CALENDAR, Y.Base, CALENDAR.prototype, {\n NAME: 'Date Selector',\n ATTRS: {\n firstdayofweek: {\n validator: Y.Lang.isString\n },\n node: {\n setter: function(node) {\n return Y.one(node);\n }\n }\n }\n});\n\n\n}, '@VERSION@', {\"requires\": [\"base\", \"node\", \"overlay\", \"calendar\"]});\n"} +{"text": "github \"ishkawa/APIKit\" ~> 3.0\ngithub \"ikesyo/Himotoki\" ~> 3.0\ngithub \"ReactiveX/RxSwift\" ~> 3.0\ngithub \"RxSwiftCommunity/Action\" ~> 2.1\n\ngithub \"kylef/WebLinking.swift\" \"master\"\n"} +{"text": "Index: content.node_form.inc\n===================================================================\nRCS file: /cvs/drupal-contrib/contributions/modules/cck/includes/content.node_form.inc,v\nretrieving revision 1.7.2.14\ndiff -u -w -b -a -r1.7.2.14 content.node_form.inc\n--- content.node_form.inc\t4 Oct 2008 13:14:21 -0000\t1.7.2.14\n+++ content.node_form.inc\t29 Oct 2008 18:23:27 -0000\n@@ -156,25 +156,33 @@\n $field_name = $field['field_name'];\n \n switch ($field['multiple']) {\n- case 0:\n+ case 0: // 1 field, no multiple\n $max = 0;\n break;\n- case 1:\n+ case 1: // unlimited\n $filled_items = content_set_empty($field, $items);\n+\n+ // make the count different for no item (filled with an empty item by content_set_empty) and 1 item with data\n+ $hook_is_empty = $field['module'] .'_content_is_empty';\n+ if (count($items) == 1 && $hook_is_empty($items[0], $field)) {\n+ $real_item_count = 0;\n+ }\n+ else{\n+ $real_item_count = count($items);\n+ }\n $current_item_count = isset($form_state['item_count'][$field_name])\n ? $form_state['item_count'][$field_name]\n- : count($items);\n+ : $real_item_count;\n+\n // We always want at least one empty icon for the user to fill in.\n $max = ($current_item_count > count($filled_items))\n ? $current_item_count - 1\n : $current_item_count;\n-\n break;\n- default:\n+ default: // fixed number of $field['multiple'] fields\n $max = $field['multiple'] - 1;\n break;\n }\n-\n $title = check_plain(t($field['widget']['label']));\n $description = content_filter_xss(t($field['widget']['description']));\n \n"} +{"text": "// Licensed to Cloudera, Inc. under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. Cloudera, Inc. licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nArbitraryFunctionName\n : 'ARRAY'\n ;\n"} +{"text": "#include <stdint.h>\n#include <string.h>\n\n#include \"address.h\"\n#include \"hash.h\"\n#include \"params.h\"\n#include \"utils.h\"\n\n#include \"sha2.h\"\n#include \"sha256.h\"\n#include \"sha256x8.h\"\n\n/**\n * Initializes the hash function states\n */\nvoid PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_initialize_hash_function(\n hash_state *hash_state_seeded,\n const unsigned char *pub_seed, const unsigned char *sk_seed) {\n PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_seed_state(&hash_state_seeded->x1, pub_seed);\n PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_seed_statex8(&hash_state_seeded->x8, pub_seed);\n (void)sk_seed; /* Suppress an 'unused parameter' warning. */\n}\n\n/**\n * Cleans up the hash function states\n */\nvoid PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_destroy_hash_function(hash_state *hash_state_seeded) {\n sha256_inc_ctx_release(&hash_state_seeded->x1);\n}\n\n/*\n * Computes PRF(key, addr), given a secret key of PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N bytes and an address\n */\nvoid PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_prf_addr(unsigned char *out, const unsigned char *key, const uint32_t addr[8],\n const hash_state *hash_state_seeded) {\n unsigned char buf[PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_ADDR_BYTES];\n unsigned char outbuf[PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_OUTPUT_BYTES];\n\n memcpy(buf, key, PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N);\n PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_compress_address(buf + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N, addr);\n\n sha256(outbuf, buf, PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_ADDR_BYTES);\n memcpy(out, outbuf, PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N);\n\n (void)hash_state_seeded; /* Prevent unused parameter warning. */\n}\n\n/**\n * Computes the message-dependent randomness R, using a secret seed as a key\n * for HMAC, and an optional randomization value prefixed to the message.\n * This requires m to have at least PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_BLOCK_BYTES + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N space\n * available in front of the pointer, i.e. before the message to use for the\n * prefix. This is necessary to prevent having to move the message around (and\n * allocate memory for it).\n */\nvoid PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_gen_message_random(\n unsigned char *R,\n const unsigned char *sk_prf, const unsigned char *optrand,\n const unsigned char *m, size_t mlen, const hash_state *hash_state_seeded) {\n unsigned char buf[PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_BLOCK_BYTES + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_OUTPUT_BYTES];\n sha256ctx state;\n int i;\n\n /* This implements HMAC-SHA256 */\n for (i = 0; i < PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N; i++) {\n buf[i] = 0x36 ^ sk_prf[i];\n }\n memset(buf + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N, 0x36, PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_BLOCK_BYTES - PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N);\n\n sha256_inc_init(&state);\n sha256_inc_blocks(&state, buf, 1);\n\n memcpy(buf, optrand, PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N);\n\n /* If optrand + message cannot fill up an entire block */\n if (PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N + mlen < PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_BLOCK_BYTES) {\n memcpy(buf + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N, m, mlen);\n sha256_inc_finalize(buf + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_BLOCK_BYTES, &state,\n buf, mlen + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N);\n }\n /* Otherwise first fill a block, so that finalize only uses the message */\n else {\n memcpy(buf + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N, m, PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_BLOCK_BYTES - PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N);\n sha256_inc_blocks(&state, buf, 1);\n\n m += PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_BLOCK_BYTES - PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N;\n mlen -= PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_BLOCK_BYTES - PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N;\n sha256_inc_finalize(buf + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_BLOCK_BYTES, &state, m, mlen);\n }\n\n for (i = 0; i < PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N; i++) {\n buf[i] = 0x5c ^ sk_prf[i];\n }\n memset(buf + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N, 0x5c, PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_BLOCK_BYTES - PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N);\n\n sha256(buf, buf, PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_BLOCK_BYTES + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_OUTPUT_BYTES);\n memcpy(R, buf, PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N);\n\n (void)hash_state_seeded; /* Prevent unused parameter warning. */\n}\n\n/**\n * Computes the message hash using R, the public key, and the message.\n * Outputs the message digest and the index of the leaf. The index is split in\n * the tree index and the leaf index, for convenient copying to an address.\n */\nvoid PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_hash_message(\n unsigned char *digest, uint64_t *tree, uint32_t *leaf_idx,\n const unsigned char *R, const unsigned char *pk,\n const unsigned char *m, size_t mlen,\n const hash_state *hash_state_seeded) {\n#define PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_TREE_BITS (PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_TREE_HEIGHT * (PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_D - 1))\n#define PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_TREE_BYTES ((PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_TREE_BITS + 7) / 8)\n#define PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_LEAF_BITS PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_TREE_HEIGHT\n#define PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_LEAF_BYTES ((PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_LEAF_BITS + 7) / 8)\n#define PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_DGST_BYTES (PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_FORS_MSG_BYTES + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_TREE_BYTES + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_LEAF_BYTES)\n\n unsigned char seed[PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_OUTPUT_BYTES + 4];\n\n /* Round to nearest multiple of PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_BLOCK_BYTES */\n#define PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_INBLOCKS (((PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_PK_BYTES + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_BLOCK_BYTES - 1) & \\\n -PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_BLOCK_BYTES) / PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_BLOCK_BYTES)\n unsigned char inbuf[PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_INBLOCKS * PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_BLOCK_BYTES];\n\n unsigned char buf[PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_DGST_BYTES];\n unsigned char *bufp = buf;\n sha256ctx state;\n\n sha256_inc_init(&state);\n\n memcpy(inbuf, R, PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N);\n memcpy(inbuf + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N, pk, PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_PK_BYTES);\n\n /* If R + pk + message cannot fill up an entire block */\n if (PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_PK_BYTES + mlen < PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_INBLOCKS * PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_BLOCK_BYTES) {\n memcpy(inbuf + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_PK_BYTES, m, mlen);\n sha256_inc_finalize(seed, &state, inbuf, PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_PK_BYTES + mlen);\n }\n /* Otherwise first fill a block, so that finalize only uses the message */\n else {\n memcpy(inbuf + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N + PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_PK_BYTES, m,\n PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_INBLOCKS * PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_BLOCK_BYTES - PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N - PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_PK_BYTES);\n sha256_inc_blocks(&state, inbuf, PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_INBLOCKS);\n\n m += PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_INBLOCKS * PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_BLOCK_BYTES - PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N - PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_PK_BYTES;\n mlen -= PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_INBLOCKS * PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_BLOCK_BYTES - PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_N - PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_PK_BYTES;\n sha256_inc_finalize(seed, &state, m, mlen);\n }\n\n /* By doing this in two steps, we prevent hashing the message twice;\n otherwise each iteration in MGF1 would hash the message again. */\n PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_mgf1(bufp, PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_DGST_BYTES, seed, PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_SHA256_OUTPUT_BYTES);\n\n memcpy(digest, bufp, PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_FORS_MSG_BYTES);\n bufp += PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_FORS_MSG_BYTES;\n\n *tree = PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_bytes_to_ull(bufp, PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_TREE_BYTES);\n *tree &= (~(uint64_t)0) >> (64 - PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_TREE_BITS);\n bufp += PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_TREE_BYTES;\n\n *leaf_idx = (uint32_t)PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_bytes_to_ull(\n bufp, PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_LEAF_BYTES);\n *leaf_idx &= (~(uint32_t)0) >> (32 - PQCLEAN_SPHINCSSHA256192FSIMPLE_AVX2_LEAF_BITS);\n\n (void)hash_state_seeded; /* Prevent unused parameter warning. */\n}\n"} +{"text": "package com.gupaoedu.vip.pattern.prototype.deep;\n\nimport java.io.Serializable;\n\n/**\n * Created by Tom.\n */\npublic class JinGuBang implements Serializable {\n public float h = 100;\n public float d = 10;\n\n public void big(){\n this.d *= 2;\n this.h *= 2;\n }\n\n public void small(){\n this.d /= 2;\n this.h /= 2;\n }\n}\n"} +{"text": "const detox = require('detox');\nconst adapter = require('detox/runners/mocha/adapter');\nconst execFile = require('child_process').execFile;\nlet config = require('../package.json').detox;\n\nif (process.env['ANDROID_AVD'] != null) {\n config = config.replace(/\"name\":\\s?\"TestingAVD\"/, `\"name\": ${process.env['ANDROID_AVD']}`)\n}\n\nlet server;\n\nbefore(async () => {\n server = execFile('yarn', ['run', 'start'], {});\n await detox.init(config);\n});\n\nbeforeEach(async function () {\n await adapter.beforeEach(this);\n});\n\nafterEach(async function () {\n await adapter.afterEach(this);\n});\n\nafter(async () => {\n await detox.cleanup();\n execFile('yarn', ['run', 'stop'], {});\n});\n"} +{"text": "<?php\n/**\n * Zend Framework\n *\n * LICENSE\n *\n * This source file is subject to the new BSD license that is bundled\n * with this package in the file LICENSE.txt.\n * It is also available through the world-wide-web at this URL:\n * http://framework.zend.com/license/new-bsd\n * If you did not receive a copy of the license and are unable to\n * obtain it through the world-wide-web, please send an email\n * to license@zend.com so we can send you a copy immediately.\n *\n * @category Zend\n * @package Zend_Dojo\n * @subpackage Form_Element\n * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)\n * @license http://framework.zend.com/license/new-bsd New BSD License\n */\n\n/** Zend_Dojo_Form_Element_ValidationTextBox */\nrequire_once 'Zend/Dojo/Form/Element/ValidationTextBox.php';\n\n/**\n * ValidationTextBox dijit tied to password input\n *\n * @uses Zend_Dojo_Form_Element_ValidationTextBox\n * @package Zend_Dojo\n * @subpackage Form_Element\n * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)\n * @license http://framework.zend.com/license/new-bsd New BSD License\n * @version $Id: PasswordTextBox.php 24593 2012-01-05 20:35:02Z matthew $\n */\nclass Zend_Dojo_Form_Element_PasswordTextBox extends Zend_Dojo_Form_Element_ValidationTextBox\n{\n /**\n * Use PasswordTextBox dijit view helper\n * @var string\n */\n public $helper = 'PasswordTextBox';\n}\n"} +{"text": "/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */\n/*\n * This file is part of the LibreOffice project.\n *\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n *\n * This file incorporates work covered by the following license notice:\n *\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed\n * with this work for additional information regarding copyright\n * ownership. The ASF licenses this file to you under the Apache\n * License, Version 2.0 (the \"License\"); you may not use this file\n * except in compliance with the License. You may obtain a copy of\n * the License at http://www.apache.org/licenses/LICENSE-2.0 .\n */\n\n#pragma once\n\n#include <vcl/wizardmachine.hxx>\n\nnamespace dbaui\n{\n // Wizard Page\n class OCopyTableWizard;\n class OWizardPage : public ::vcl::OWizardPage\n {\n protected:\n OCopyTableWizard* m_pParent;\n bool m_bFirstTime; // Page is called the first time; should be set in the reset method\n\n OWizardPage(weld::Container* pPage, OCopyTableWizard* pWizard, const OUString& rUIXMLDescription, const OString& rID);\n\n public:\n virtual ~OWizardPage() override;\n virtual void Reset ( ) = 0;\n virtual bool LeavePage() = 0;\n virtual OUString GetTitle() const = 0;\n\n bool IsFirstTime() const { return m_bFirstTime; }\n };\n}\n\n/* vim:set shiftwidth=4 softtabstop=4 expandtab: */\n"} +{"text": "//\n// TPKeyboardAvoidingTableView.h\n// TPKeyboardAvoiding\n//\n// Created by Michael Tyson on 30/09/2013.\n// Copyright 2015 A Tasty Pixel. All rights reserved.\n//\n\n#import <UIKit/UIKit.h>\n#import \"UIScrollView+TPKeyboardAvoidingAdditions.h\"\n\n@interface TPKeyboardAvoidingTableView : UITableView <UITextFieldDelegate, UITextViewDelegate>\n- (BOOL)focusNextTextField;\n- (void)scrollToActiveTextField;\n@end\n"} +{"text": "/* ********************************************************************** **\r\n ** Copyright notice **\r\n ** **\r\n ** (c) 2005-2009 RSSOwl Development Team **\r\n ** http://www.rssowl.org/ **\r\n ** **\r\n ** All rights reserved **\r\n ** **\r\n ** This program and the accompanying materials are made available under **\r\n ** the terms of the Eclipse Public License v1.0 which accompanies this **\r\n ** distribution, and is available at: **\r\n ** http://www.rssowl.org/legal/epl-v10.html **\r\n ** **\r\n ** A copy is found in the file epl-v10.html and important notices to the **\r\n ** license from the team is found in the textfile LICENSE.txt distributed **\r\n ** in this package. **\r\n ** **\r\n ** This copyright notice MUST APPEAR in all copies of the file! **\r\n ** **\r\n ** Contributors: **\r\n ** RSSOwl Development Team - initial API and implementation **\r\n ** **\r\n ** ********************************************************************** */\r\n\r\npackage org.rssowl.core.internal.persist;\r\n\r\nimport org.eclipse.core.runtime.Assert;\r\nimport org.rssowl.core.persist.IAttachment;\r\nimport org.rssowl.core.persist.INews;\r\nimport org.rssowl.core.persist.reference.AttachmentReference;\r\nimport org.rssowl.core.util.MergeUtils;\r\n\r\nimport java.net.URI;\r\n\r\n/**\r\n * An attachment to the News. This for example could be a News having a Podcast\r\n * attached.\r\n *\r\n * @author bpasero\r\n */\r\npublic class Attachment extends AbstractEntity implements IAttachment {\r\n private String fLink;\r\n private int fLength;\r\n private String fType;\r\n private INews fNews;\r\n\r\n private transient URI fLinkURI;\r\n\r\n /**\r\n * Default constructor provided for deserialization\r\n */\r\n protected Attachment() {\r\n // As per javadoc\r\n }\r\n\r\n /**\r\n * Constructor used by <code>DefaultModelFactory</code>\r\n *\r\n * @param news The News this attachment is belonging to.\r\n */\r\n public Attachment(INews news) {\r\n super(null);\r\n Assert.isNotNull(news, \"The type Attachment requires a News that is not NULL\"); //$NON-NLS-1$\r\n fNews = news;\r\n }\r\n\r\n /**\r\n * Creates a new Element of type Attachment.\r\n *\r\n * @param id The unique ID of this Type.\r\n * @param news The News this attachment is belonging to.\r\n */\r\n public Attachment(Long id, INews news) {\r\n super(id);\r\n Assert.isNotNull(news, \"The type Attachment requires a News that is not NULL\"); //$NON-NLS-1$\r\n fNews = news;\r\n }\r\n\r\n public Attachment(IAttachment attachment, INews news) {\r\n synchronized (attachment) {\r\n setLength(attachment.getLength());\r\n setType(attachment.getType());\r\n setLink(attachment.getLink());\r\n }\r\n setParent(news);\r\n }\r\n\r\n /*\r\n * @see org.rssowl.core.model.types.IAttachment#getLength()\r\n */\r\n public synchronized int getLength() {\r\n return fLength;\r\n }\r\n\r\n /*\r\n * @see org.rssowl.core.model.types.IAttachment#setLength(int)\r\n */\r\n public synchronized void setLength(int length) {\r\n fLength = length;\r\n }\r\n\r\n /*\r\n * @see org.rssowl.core.model.types.IAttachment#getType()\r\n */\r\n public synchronized String getType() {\r\n return fType;\r\n }\r\n\r\n /*\r\n * @see org.rssowl.core.model.types.IAttachment#setType(java.lang.String)\r\n */\r\n public synchronized void setType(String type) {\r\n fType = type;\r\n }\r\n\r\n /*\r\n * @see org.rssowl.core.model.types.IAttachment#getNews()\r\n */\r\n public synchronized INews getNews() {\r\n return fNews;\r\n }\r\n\r\n /*\r\n * @see org.rssowl.core.model.types.IAttachment#setLink(java.net.URI)\r\n */\r\n public synchronized void setLink(URI link) {\r\n if (link == null) {\r\n fLinkURI = null;\r\n fLink = null;\r\n }\r\n else {\r\n fLinkURI = link;\r\n fLink = link.toString();\r\n }\r\n }\r\n\r\n /*\r\n * @see org.rssowl.core.model.types.IAttachment#getLink()\r\n */\r\n public synchronized URI getLink() {\r\n if (fLinkURI == null && fLink != null)\r\n fLinkURI = createURI(fLink);\r\n\r\n return fLinkURI;\r\n }\r\n\r\n /**\r\n * Compare the given type with this type for identity.\r\n *\r\n * @param attachment to be compared.\r\n * @return whether this object and <code>attachment</code> are identical. It\r\n * compares all the fields.\r\n */\r\n public synchronized boolean isIdentical(IAttachment attachment) {\r\n if (this == attachment)\r\n return true;\r\n\r\n if (attachment instanceof Attachment == false)\r\n return false;\r\n\r\n synchronized (attachment) {\r\n Attachment a = (Attachment) attachment;\r\n\r\n return (getId() == null ? a.getId() == null : getId().equals(a.getId())) &&\r\n fNews.equals(a.fNews) && (fLink == null ? a.fLink == null : fLink.equals(a.fLink)) &&\r\n (fType == null ? a.fType == null : fType.equals(a.fType)) && fLength == a.fLength &&\r\n (getProperties() == null ? a.getProperties() == null : getProperties().equals(a.getProperties()));\r\n }\r\n }\r\n\r\n /*\r\n * @see org.rssowl.core.model.types.MergeCapable#merge(java.lang.Object)\r\n */\r\n public synchronized MergeResult merge(IAttachment objectToMerge) {\r\n Assert.isNotNull(objectToMerge, \"objectToMerge\"); //$NON-NLS-1$\r\n synchronized (objectToMerge) {\r\n boolean updated = false;\r\n updated = fLength != objectToMerge.getLength();\r\n fLength = objectToMerge.getLength();\r\n updated = !MergeUtils.equals(fType, objectToMerge.getType());\r\n fType = objectToMerge.getType();\r\n ComplexMergeResult<?> result = MergeUtils.mergeProperties(this, objectToMerge);\r\n if (updated || result.isStructuralChange())\r\n result.addUpdatedObject(this);\r\n\r\n return result;\r\n }\r\n }\r\n\r\n /*\r\n * @see org.rssowl.core.model.types.Reparentable#setParent(java.lang.Object)\r\n */\r\n public synchronized void setParent(INews newParent) {\r\n Assert.isNotNull(newParent, \"newParent\"); //$NON-NLS-1$\r\n fNews = newParent;\r\n }\r\n\r\n /*\r\n * @see org.rssowl.core.persist.IEntity#toReference()\r\n */\r\n public AttachmentReference toReference() {\r\n return new AttachmentReference(getIdAsPrimitive());\r\n }\r\n\r\n /*\r\n * @see org.rssowl.core.internal.persist.AbstractEntity#toString()\r\n */\r\n @Override\r\n public synchronized String toString() {\r\n return super.toString() + \"Link = \" + fLink + \")\"; //$NON-NLS-1$ //$NON-NLS-2$\r\n }\r\n\r\n /**\r\n * Returns a String describing the state of this Entity.\r\n *\r\n * @return A String describing the state of this Entity.\r\n */\r\n public synchronized String toLongString() {\r\n return super.toString() + \"Link = \" + fLink + \", Type = \" + fType + \", Length = \" + fLength + \", Belongs to News = \" + fNews.getId() + \")\"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$\r\n }\r\n}"} +{"text": "(function (factory) {\n\tif (typeof define === \"function\" && define.amd) {\n\t\tdefine(\"IgLayoutManager\", [\n\t\t\t\"react\",\n\t\t\t\"jquery\",\n\t\t\t\"create-react-class\",\n\t\t\t\"../dist/igniteui-react.js\"\n\t\t], factory );\n\t} else {\n\t\tfactory(React, jQuery, createReactClass);\n\t}\n}\n(function (React, $, createReactClass) {\n\tvar IgLayoutManager = createReactClass($.ig.react.core.buildComponent(\"igLayoutManager\"));\n\tif (window) {\n\t\twindow.IgLayoutManager = IgLayoutManager;\n\t}\n\treturn IgLayoutManager;\n}));\n"} +{"text": "// Copyright 2011 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage terminal\n\nimport (\n\t\"io\"\n\t\"testing\"\n)\n\ntype MockTerminal struct {\n\ttoSend []byte\n\tbytesPerRead int\n\treceived []byte\n}\n\nfunc (c *MockTerminal) Read(data []byte) (n int, err error) {\n\tn = len(data)\n\tif n == 0 {\n\t\treturn\n\t}\n\tif n > len(c.toSend) {\n\t\tn = len(c.toSend)\n\t}\n\tif n == 0 {\n\t\treturn 0, io.EOF\n\t}\n\tif c.bytesPerRead > 0 && n > c.bytesPerRead {\n\t\tn = c.bytesPerRead\n\t}\n\tcopy(data, c.toSend[:n])\n\tc.toSend = c.toSend[n:]\n\treturn\n}\n\nfunc (c *MockTerminal) Write(data []byte) (n int, err error) {\n\tc.received = append(c.received, data...)\n\treturn len(data), nil\n}\n\nfunc TestClose(t *testing.T) {\n\tc := &MockTerminal{}\n\tss := NewTerminal(c, \"> \")\n\tline, err := ss.ReadLine()\n\tif line != \"\" {\n\t\tt.Errorf(\"Expected empty line but got: %s\", line)\n\t}\n\tif err != io.EOF {\n\t\tt.Errorf(\"Error should have been EOF but got: %s\", err)\n\t}\n}\n\nvar keyPressTests = []struct {\n\tin string\n\tline string\n\terr error\n\tthrowAwayLines int\n}{\n\t{\n\t\terr: io.EOF,\n\t},\n\t{\n\t\tin: \"\\r\",\n\t\tline: \"\",\n\t},\n\t{\n\t\tin: \"foo\\r\",\n\t\tline: \"foo\",\n\t},\n\t{\n\t\tin: \"a\\x1b[Cb\\r\", // right\n\t\tline: \"ab\",\n\t},\n\t{\n\t\tin: \"a\\x1b[Db\\r\", // left\n\t\tline: \"ba\",\n\t},\n\t{\n\t\tin: \"a\\177b\\r\", // backspace\n\t\tline: \"b\",\n\t},\n\t{\n\t\tin: \"\\x1b[A\\r\", // up\n\t},\n\t{\n\t\tin: \"\\x1b[B\\r\", // down\n\t},\n\t{\n\t\tin: \"line\\x1b[A\\x1b[B\\r\", // up then down\n\t\tline: \"line\",\n\t},\n\t{\n\t\tin: \"line1\\rline2\\x1b[A\\r\", // recall previous line.\n\t\tline: \"line1\",\n\t\tthrowAwayLines: 1,\n\t},\n\t{\n\t\t// recall two previous lines and append.\n\t\tin: \"line1\\rline2\\rline3\\x1b[A\\x1b[Axxx\\r\",\n\t\tline: \"line1xxx\",\n\t\tthrowAwayLines: 2,\n\t},\n\t{\n\t\t// Ctrl-A to move to beginning of line followed by ^K to kill\n\t\t// line.\n\t\tin: \"a b \\001\\013\\r\",\n\t\tline: \"\",\n\t},\n\t{\n\t\t// Ctrl-A to move to beginning of line, Ctrl-E to move to end,\n\t\t// finally ^K to kill nothing.\n\t\tin: \"a b \\001\\005\\013\\r\",\n\t\tline: \"a b \",\n\t},\n\t{\n\t\tin: \"\\027\\r\",\n\t\tline: \"\",\n\t},\n\t{\n\t\tin: \"a\\027\\r\",\n\t\tline: \"\",\n\t},\n\t{\n\t\tin: \"a \\027\\r\",\n\t\tline: \"\",\n\t},\n\t{\n\t\tin: \"a b\\027\\r\",\n\t\tline: \"a \",\n\t},\n\t{\n\t\tin: \"a b \\027\\r\",\n\t\tline: \"a \",\n\t},\n\t{\n\t\tin: \"one two thr\\x1b[D\\027\\r\",\n\t\tline: \"one two r\",\n\t},\n\t{\n\t\tin: \"\\013\\r\",\n\t\tline: \"\",\n\t},\n\t{\n\t\tin: \"a\\013\\r\",\n\t\tline: \"a\",\n\t},\n\t{\n\t\tin: \"ab\\x1b[D\\013\\r\",\n\t\tline: \"a\",\n\t},\n\t{\n\t\tin: \"Ξεσκεπάζω\\r\",\n\t\tline: \"Ξεσκεπάζω\",\n\t},\n\t{\n\t\tin: \"£\\r\\x1b[A\\177\\r\", // non-ASCII char, enter, up, backspace.\n\t\tline: \"\",\n\t\tthrowAwayLines: 1,\n\t},\n\t{\n\t\tin: \"£\\r££\\x1b[A\\x1b[B\\177\\r\", // non-ASCII char, enter, 2x non-ASCII, up, down, backspace, enter.\n\t\tline: \"£\",\n\t\tthrowAwayLines: 1,\n\t},\n\t{\n\t\t// Ctrl-D at the end of the line should be ignored.\n\t\tin: \"a\\004\\r\",\n\t\tline: \"a\",\n\t},\n\t{\n\t\t// a, b, left, Ctrl-D should erase the b.\n\t\tin: \"ab\\x1b[D\\004\\r\",\n\t\tline: \"a\",\n\t},\n\t{\n\t\t// a, b, c, d, left, left, ^U should erase to the beginning of\n\t\t// the line.\n\t\tin: \"abcd\\x1b[D\\x1b[D\\025\\r\",\n\t\tline: \"cd\",\n\t},\n\t{\n\t\t// Bracketed paste mode: control sequences should be returned\n\t\t// verbatim in paste mode.\n\t\tin: \"abc\\x1b[200~de\\177f\\x1b[201~\\177\\r\",\n\t\tline: \"abcde\\177\",\n\t},\n\t{\n\t\t// Enter in bracketed paste mode should still work.\n\t\tin: \"abc\\x1b[200~d\\refg\\x1b[201~h\\r\",\n\t\tline: \"efgh\",\n\t\tthrowAwayLines: 1,\n\t},\n\t{\n\t\t// Lines consisting entirely of pasted data should be indicated as such.\n\t\tin: \"\\x1b[200~a\\r\",\n\t\tline: \"a\",\n\t\terr: ErrPasteIndicator,\n\t},\n}\n\nfunc TestKeyPresses(t *testing.T) {\n\tfor i, test := range keyPressTests {\n\t\tfor j := 1; j < len(test.in); j++ {\n\t\t\tc := &MockTerminal{\n\t\t\t\ttoSend: []byte(test.in),\n\t\t\t\tbytesPerRead: j,\n\t\t\t}\n\t\t\tss := NewTerminal(c, \"> \")\n\t\t\tfor k := 0; k < test.throwAwayLines; k++ {\n\t\t\t\t_, err := ss.ReadLine()\n\t\t\t\tif err != nil {\n\t\t\t\t\tt.Errorf(\"Throwaway line %d from test %d resulted in error: %s\", k, i, err)\n\t\t\t\t}\n\t\t\t}\n\t\t\tline, err := ss.ReadLine()\n\t\t\tif line != test.line {\n\t\t\t\tt.Errorf(\"Line resulting from test %d (%d bytes per read) was '%s', expected '%s'\", i, j, line, test.line)\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tif err != test.err {\n\t\t\t\tt.Errorf(\"Error resulting from test %d (%d bytes per read) was '%v', expected '%v'\", i, j, err, test.err)\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunc TestPasswordNotSaved(t *testing.T) {\n\tc := &MockTerminal{\n\t\ttoSend: []byte(\"password\\r\\x1b[A\\r\"),\n\t\tbytesPerRead: 1,\n\t}\n\tss := NewTerminal(c, \"> \")\n\tpw, _ := ss.ReadPassword(\"> \")\n\tif pw != \"password\" {\n\t\tt.Fatalf(\"failed to read password, got %s\", pw)\n\t}\n\tline, _ := ss.ReadLine()\n\tif len(line) > 0 {\n\t\tt.Fatalf(\"password was saved in history\")\n\t}\n}\n\nvar setSizeTests = []struct {\n\twidth, height int\n}{\n\t{40, 13},\n\t{80, 24},\n\t{132, 43},\n}\n\nfunc TestTerminalSetSize(t *testing.T) {\n\tfor _, setSize := range setSizeTests {\n\t\tc := &MockTerminal{\n\t\t\ttoSend: []byte(\"password\\r\\x1b[A\\r\"),\n\t\t\tbytesPerRead: 1,\n\t\t}\n\t\tss := NewTerminal(c, \"> \")\n\t\tss.SetSize(setSize.width, setSize.height)\n\t\tpw, _ := ss.ReadPassword(\"Password: \")\n\t\tif pw != \"password\" {\n\t\t\tt.Fatalf(\"failed to read password, got %s\", pw)\n\t\t}\n\t\tif string(c.received) != \"Password: \\r\\n\" {\n\t\t\tt.Errorf(\"failed to set the temporary prompt expected %q, got %q\", \"Password: \", c.received)\n\t\t}\n\t}\n}\n"} +{"text": "// Copyright (c) 2011 The LevelDB Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file. See the AUTHORS file for names of contributors.\n//\n// Decodes the blocks generated by block_builder.cc.\n\n#include \"table/block.h\"\n\n#include <vector>\n#include <algorithm>\n#include \"leveldb/comparator.h\"\n#include \"util/coding.h\"\n#include \"util/logging.h\"\n\nnamespace leveldb {\n\ninline uint32_t Block::NumRestarts() const {\n assert(size_ >= 2*sizeof(uint32_t));\n return DecodeFixed32(data_ + size_ - sizeof(uint32_t));\n}\n\nBlock::Block(const char* data, size_t size)\n : data_(data),\n size_(size) {\n if (size_ < sizeof(uint32_t)) {\n size_ = 0; // Error marker\n } else {\n restart_offset_ = size_ - (1 + NumRestarts()) * sizeof(uint32_t);\n if (restart_offset_ > size_ - sizeof(uint32_t)) {\n // The size is too small for NumRestarts() and therefore\n // restart_offset_ wrapped around.\n size_ = 0;\n }\n }\n}\n\nBlock::~Block() {\n delete[] data_;\n}\n\n// Helper routine: decode the next block entry starting at \"p\",\n// storing the number of shared key bytes, non_shared key bytes,\n// and the length of the value in \"*shared\", \"*non_shared\", and\n// \"*value_length\", respectively. Will not derefence past \"limit\".\n//\n// If any errors are detected, returns NULL. Otherwise, returns a\n// pointer to the key delta (just past the three decoded values).\nstatic inline const char* DecodeEntry(const char* p, const char* limit,\n uint32_t* shared,\n uint32_t* non_shared,\n uint32_t* value_length) {\n if (limit - p < 3) return NULL;\n *shared = reinterpret_cast<const unsigned char*>(p)[0];\n *non_shared = reinterpret_cast<const unsigned char*>(p)[1];\n *value_length = reinterpret_cast<const unsigned char*>(p)[2];\n if ((*shared | *non_shared | *value_length) < 128) {\n // Fast path: all three values are encoded in one byte each\n p += 3;\n } else {\n if ((p = GetVarint32Ptr(p, limit, shared)) == NULL) return NULL;\n if ((p = GetVarint32Ptr(p, limit, non_shared)) == NULL) return NULL;\n if ((p = GetVarint32Ptr(p, limit, value_length)) == NULL) return NULL;\n }\n\n if (static_cast<uint32_t>(limit - p) < (*non_shared + *value_length)) {\n return NULL;\n }\n return p;\n}\n\nclass Block::Iter : public Iterator {\n private:\n const Comparator* const comparator_;\n const char* const data_; // underlying block contents\n uint32_t const restarts_; // Offset of restart array (list of fixed32)\n uint32_t const num_restarts_; // Number of uint32_t entries in restart array\n\n // current_ is offset in data_ of current entry. >= restarts_ if !Valid\n uint32_t current_;\n uint32_t restart_index_; // Index of restart block in which current_ falls\n std::string key_;\n Slice value_;\n Status status_;\n\n inline int Compare(const Slice& a, const Slice& b) const {\n return comparator_->Compare(a, b);\n }\n\n // Return the offset in data_ just past the end of the current entry.\n inline uint32_t NextEntryOffset() const {\n return (value_.data() + value_.size()) - data_;\n }\n\n uint32_t GetRestartPoint(uint32_t index) {\n assert(index < num_restarts_);\n return DecodeFixed32(data_ + restarts_ + index * sizeof(uint32_t));\n }\n\n void SeekToRestartPoint(uint32_t index) {\n key_.clear();\n restart_index_ = index;\n // current_ will be fixed by ParseNextKey();\n\n // ParseNextKey() starts at the end of value_, so set value_ accordingly\n uint32_t offset = GetRestartPoint(index);\n value_ = Slice(data_ + offset, 0);\n }\n\n public:\n Iter(const Comparator* comparator,\n const char* data,\n uint32_t restarts,\n uint32_t num_restarts)\n : comparator_(comparator),\n data_(data),\n restarts_(restarts),\n num_restarts_(num_restarts),\n current_(restarts_),\n restart_index_(num_restarts_) {\n assert(num_restarts_ > 0);\n }\n\n virtual bool Valid() const { return current_ < restarts_; }\n virtual Status status() const { return status_; }\n virtual Slice key() const {\n assert(Valid());\n return key_;\n }\n virtual Slice value() const {\n assert(Valid());\n return value_;\n }\n\n virtual void Next() {\n assert(Valid());\n ParseNextKey();\n }\n\n virtual void Prev() {\n assert(Valid());\n\n // Scan backwards to a restart point before current_\n const uint32_t original = current_;\n while (GetRestartPoint(restart_index_) >= original) {\n if (restart_index_ == 0) {\n // No more entries\n current_ = restarts_;\n restart_index_ = num_restarts_;\n return;\n }\n restart_index_--;\n }\n\n SeekToRestartPoint(restart_index_);\n do {\n // Loop until end of current entry hits the start of original entry\n } while (ParseNextKey() && NextEntryOffset() < original);\n }\n\n virtual void Seek(const Slice& target) {\n // Binary search in restart array to find the first restart point\n // with a key >= target\n uint32_t left = 0;\n uint32_t right = num_restarts_ - 1;\n while (left < right) {\n uint32_t mid = (left + right + 1) / 2;\n uint32_t region_offset = GetRestartPoint(mid);\n uint32_t shared, non_shared, value_length;\n const char* key_ptr = DecodeEntry(data_ + region_offset,\n data_ + restarts_,\n &shared, &non_shared, &value_length);\n if (key_ptr == NULL || (shared != 0)) {\n CorruptionError();\n return;\n }\n Slice mid_key(key_ptr, non_shared);\n if (Compare(mid_key, target) < 0) {\n // Key at \"mid\" is smaller than \"target\". Therefore all\n // blocks before \"mid\" are uninteresting.\n left = mid;\n } else {\n // Key at \"mid\" is >= \"target\". Therefore all blocks at or\n // after \"mid\" are uninteresting.\n right = mid - 1;\n }\n }\n\n // Linear search (within restart block) for first key >= target\n SeekToRestartPoint(left);\n while (true) {\n if (!ParseNextKey()) {\n return;\n }\n if (Compare(key_, target) >= 0) {\n return;\n }\n }\n }\n\n virtual void SeekToFirst() {\n SeekToRestartPoint(0);\n ParseNextKey();\n }\n\n virtual void SeekToLast() {\n SeekToRestartPoint(num_restarts_ - 1);\n while (ParseNextKey() && NextEntryOffset() < restarts_) {\n // Keep skipping\n }\n }\n\n private:\n void CorruptionError() {\n current_ = restarts_;\n restart_index_ = num_restarts_;\n status_ = Status::Corruption(\"bad entry in block\");\n key_.clear();\n value_.clear();\n }\n\n bool ParseNextKey() {\n current_ = NextEntryOffset();\n const char* p = data_ + current_;\n const char* limit = data_ + restarts_; // Restarts come right after data\n if (p >= limit) {\n // No more entries to return. Mark as invalid.\n current_ = restarts_;\n restart_index_ = num_restarts_;\n return false;\n }\n\n // Decode next entry\n uint32_t shared, non_shared, value_length;\n p = DecodeEntry(p, limit, &shared, &non_shared, &value_length);\n if (p == NULL || key_.size() < shared) {\n CorruptionError();\n return false;\n } else {\n key_.resize(shared);\n key_.append(p, non_shared);\n value_ = Slice(p + non_shared, value_length);\n while (restart_index_ + 1 < num_restarts_ &&\n GetRestartPoint(restart_index_ + 1) < current_) {\n ++restart_index_;\n }\n return true;\n }\n }\n};\n\nIterator* Block::NewIterator(const Comparator* cmp) {\n if (size_ < 2*sizeof(uint32_t)) {\n return NewErrorIterator(Status::Corruption(\"bad block contents\"));\n }\n const uint32_t num_restarts = NumRestarts();\n if (num_restarts == 0) {\n return NewEmptyIterator();\n } else {\n return new Iter(cmp, data_, restart_offset_, num_restarts);\n }\n}\n\n}\n"} +{"text": "// Copyright 2012 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Lock-free stack.\n\npackage runtime\n\n// lfstack is the head of a lock-free stack.\n//\n// The zero value of lfstack is an empty list.\n//\n// This stack is intrusive. Nodes must embed lfnode as the first field.\n//\n// The stack does not keep GC-visible pointers to nodes, so the caller\n// is responsible for ensuring the nodes are not garbage collected\n// (typically by allocating them from manually-managed memory).\ntype lfstack uint64\n"} +{"text": ".\\\" DO NOT MODIFY THIS FILE! It was generated by gdoc.\n.TH \"gnutls_decode_gost_rs_value\" 3 \"3.6.13\" \"gnutls\" \"gnutls\"\n.SH NAME\ngnutls_decode_gost_rs_value \\- API function\n.SH SYNOPSIS\n.B #include <gnutls/crypto.h>\n.sp\n.BI \"int gnutls_decode_gost_rs_value(const gnutls_datum_t * \" sig_value \", gnutls_datum_t * \" r \", gnutls_datum_t * \" s \");\"\n.SH ARGUMENTS\n.IP \"const gnutls_datum_t * sig_value\" 12\nwill holds a GOST signature according to RFC 4491 section 2.2.2\n.IP \"gnutls_datum_t * r\" 12\nwill contain the r value\n.IP \"gnutls_datum_t * s\" 12\nwill contain the s value\n.SH \"DESCRIPTION\"\nThis function will decode the provided \\fIsig_value\\fP , into \\fIr\\fP and \\fIs\\fP elements.\nSee RFC 4491 section 2.2.2 for the format of signature value.\n\nThe output values may be padded with a zero byte to prevent them\nfrom being interpreted as negative values. The value\nshould be deallocated using \\fBgnutls_free()\\fP.\n.SH \"RETURNS\"\nOn success, \\fBGNUTLS_E_SUCCESS\\fP (0) is returned, otherwise\nan error code is returned.\n.SH \"SINCE\"\n3.6.0\n.SH \"REPORTING BUGS\"\nReport bugs to <bugs@gnutls.org>.\n.br\nHome page: https://www.gnutls.org\n\n.SH COPYRIGHT\nCopyright \\(co 2001-2020 Free Software Foundation, Inc., and others.\n.br\nCopying and distribution of this file, with or without modification,\nare permitted in any medium without royalty provided the copyright\nnotice and this notice are preserved.\n.SH \"SEE ALSO\"\nThe full documentation for\n.B gnutls\nis maintained as a Texinfo manual.\nIf the /usr/share/doc/gnutls/\ndirectory does not contain the HTML form visit\n.B\n.IP https://www.gnutls.org/manual/\n.PP\n"} +{"text": "/*\n * Copyright 2012-present Facebook, Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#pragma once\n#define FOLLY_FORMAT_H_\n\n#include <cstdio>\n#include <stdexcept>\n#include <tuple>\n#include <type_traits>\n\n#include <folly/CPortability.h>\n#include <folly/Conv.h>\n#include <folly/FormatArg.h>\n#include <folly/Range.h>\n#include <folly/String.h>\n#include <folly/Traits.h>\n\n// Ignore shadowing warnings within this file, so includers can use -Wshadow.\nFOLLY_PUSH_WARNING\nFOLLY_GNU_DISABLE_WARNING(\"-Wshadow\")\n\nnamespace folly {\n\n// forward declarations\ntemplate <bool containerMode, class... Args>\nclass Formatter;\ntemplate <class... Args>\nFormatter<false, Args...> format(StringPiece fmt, Args&&... args);\ntemplate <class C>\nFormatter<true, C> vformat(StringPiece fmt, C&& container);\ntemplate <class T, class Enable = void>\nclass FormatValue;\n\n// meta-attribute to identify formatters in this sea of template weirdness\nnamespace detail {\nclass FormatterTag {};\n} // namespace detail\n\n/**\n * Formatter class.\n *\n * Note that this class is tricky, as it keeps *references* to its lvalue\n * arguments (while it takes ownership of the temporaries), and it doesn't\n * copy the passed-in format string. Thankfully, you can't use this\n * directly, you have to use format(...) below.\n */\n\n/* BaseFormatter class.\n * Overridable behaviours:\n * You may override the actual formatting of positional parameters in\n * `doFormatArg`. The Formatter class provides the default implementation.\n *\n * You may also override `doFormat` and `getSizeArg`. These override points were\n * added to permit static analysis of format strings, when it is inconvenient\n * or impossible to instantiate a BaseFormatter with the correct storage\n */\ntemplate <class Derived, bool containerMode, class... Args>\nclass BaseFormatter {\n public:\n /**\n * Append to output. out(StringPiece sp) may be called (more than once)\n */\n template <class Output>\n void operator()(Output& out) const;\n\n /**\n * Append to a string.\n */\n template <class Str>\n typename std::enable_if<IsSomeString<Str>::value>::type appendTo(\n Str& str) const {\n auto appender = [&str](StringPiece s) { str.append(s.data(), s.size()); };\n (*this)(appender);\n }\n\n /**\n * Conversion to string\n */\n std::string str() const {\n std::string s;\n appendTo(s);\n return s;\n }\n\n /**\n * Conversion to fbstring\n */\n fbstring fbstr() const {\n fbstring s;\n appendTo(s);\n return s;\n }\n\n /**\n * Metadata to identify generated children of BaseFormatter\n */\n typedef detail::FormatterTag IsFormatter;\n typedef BaseFormatter BaseType;\n\n private:\n typedef std::tuple<Args...> ValueTuple;\n static constexpr size_t valueCount = std::tuple_size<ValueTuple>::value;\n\n Derived const& asDerived() const {\n return *static_cast<const Derived*>(this);\n }\n\n template <size_t K, class Callback>\n typename std::enable_if<K == valueCount>::type\n doFormatFrom(size_t i, FormatArg& arg, Callback& /*cb*/) const {\n arg.error(\"argument index out of range, max=\", i);\n }\n\n template <size_t K, class Callback>\n typename std::enable_if<(K < valueCount)>::type\n doFormatFrom(size_t i, FormatArg& arg, Callback& cb) const {\n if (i == K) {\n asDerived().template doFormatArg<K>(arg, cb);\n } else {\n doFormatFrom<K + 1>(i, arg, cb);\n }\n }\n\n template <class Callback>\n void doFormat(size_t i, FormatArg& arg, Callback& cb) const {\n return doFormatFrom<0>(i, arg, cb);\n }\n\n template <size_t K>\n typename std::enable_if<K == valueCount, int>::type getSizeArgFrom(\n size_t i,\n const FormatArg& arg) const {\n arg.error(\"argument index out of range, max=\", i);\n }\n\n template <class T>\n typename std::enable_if<\n std::is_integral<T>::value && !std::is_same<T, bool>::value,\n int>::type\n getValue(const FormatValue<T>& format, const FormatArg&) const {\n return static_cast<int>(format.getValue());\n }\n\n template <class T>\n typename std::enable_if<\n !std::is_integral<T>::value || std::is_same<T, bool>::value,\n int>::type\n getValue(const FormatValue<T>&, const FormatArg& arg) const {\n arg.error(\"dynamic field width argument must be integral\");\n }\n\n template <size_t K>\n typename std::enable_if <\n K<valueCount, int>::type getSizeArgFrom(size_t i, const FormatArg& arg)\n const {\n if (i == K) {\n return getValue(getFormatValue<K>(), arg);\n }\n return getSizeArgFrom<K + 1>(i, arg);\n }\n\n int getSizeArg(size_t i, const FormatArg& arg) const {\n return getSizeArgFrom<0>(i, arg);\n }\n\n StringPiece str_;\n\n protected:\n explicit BaseFormatter(StringPiece str, Args&&... args);\n\n // Not copyable\n BaseFormatter(const BaseFormatter&) = delete;\n BaseFormatter& operator=(const BaseFormatter&) = delete;\n\n // Movable, but the move constructor and assignment operator are private,\n // for the exclusive use of format() (below). This way, you can't create\n // a Formatter object, but can handle references to it (for streaming,\n // conversion to string, etc) -- which is good, as Formatter objects are\n // dangerous (they may hold references).\n BaseFormatter(BaseFormatter&&) = default;\n BaseFormatter& operator=(BaseFormatter&&) = default;\n\n template <size_t K>\n using ArgType = typename std::tuple_element<K, ValueTuple>::type;\n\n template <size_t K>\n FormatValue<typename std::decay<ArgType<K>>::type> getFormatValue() const {\n return FormatValue<typename std::decay<ArgType<K>>::type>(\n std::get<K>(values_));\n }\n\n ValueTuple values_;\n};\n\ntemplate <bool containerMode, class... Args>\nclass Formatter : public BaseFormatter<\n Formatter<containerMode, Args...>,\n containerMode,\n Args...> {\n private:\n explicit Formatter(StringPiece& str, Args&&... args)\n : BaseFormatter<\n Formatter<containerMode, Args...>,\n containerMode,\n Args...>(str, std::forward<Args>(args)...) {\n static_assert(\n !containerMode || sizeof...(Args) == 1,\n \"Exactly one argument required in container mode\");\n }\n\n template <size_t K, class Callback>\n void doFormatArg(FormatArg& arg, Callback& cb) const {\n this->template getFormatValue<K>().format(arg, cb);\n }\n\n friend class BaseFormatter<\n Formatter<containerMode, Args...>,\n containerMode,\n Args...>;\n\n template <class... A>\n friend Formatter<false, A...> format(StringPiece fmt, A&&... arg);\n template <class C>\n friend Formatter<true, C> vformat(StringPiece fmt, C&& container);\n};\n\n/**\n * Formatter objects can be written to streams.\n */\ntemplate <bool containerMode, class... Args>\nstd::ostream& operator<<(\n std::ostream& out,\n const Formatter<containerMode, Args...>& formatter) {\n auto writer = [&out](StringPiece sp) {\n out.write(sp.data(), std::streamsize(sp.size()));\n };\n formatter(writer);\n return out;\n}\n\n/**\n * Formatter objects can be written to stdio FILEs.\n */\ntemplate <class Derived, bool containerMode, class... Args>\nvoid writeTo(\n FILE* fp,\n const BaseFormatter<Derived, containerMode, Args...>& formatter);\n\n/**\n * Create a formatter object.\n *\n * std::string formatted = format(\"{} {}\", 23, 42).str();\n * LOG(INFO) << format(\"{} {}\", 23, 42);\n * writeTo(stdout, format(\"{} {}\", 23, 42));\n */\ntemplate <class... Args>\nFormatter<false, Args...> format(StringPiece fmt, Args&&... args) {\n return Formatter<false, Args...>(fmt, std::forward<Args>(args)...);\n}\n\n/**\n * Like format(), but immediately returns the formatted string instead of an\n * intermediate format object.\n */\ntemplate <class... Args>\ninline std::string sformat(StringPiece fmt, Args&&... args) {\n return format(fmt, std::forward<Args>(args)...).str();\n}\n\n/**\n * Create a formatter object that takes one argument (of container type)\n * and uses that container to get argument values from.\n *\n * std::map<string, string> map { {\"hello\", \"world\"}, {\"answer\", \"42\"} };\n *\n * The following are equivalent:\n * format(\"{0[hello]} {0[answer]}\", map);\n *\n * vformat(\"{hello} {answer}\", map);\n *\n * but the latter is cleaner.\n */\ntemplate <class Container>\nFormatter<true, Container> vformat(StringPiece fmt, Container&& container) {\n return Formatter<true, Container>(fmt, std::forward<Container>(container));\n}\n\n/**\n * Like vformat(), but immediately returns the formatted string instead of an\n * intermediate format object.\n */\ntemplate <class Container>\ninline std::string svformat(StringPiece fmt, Container&& container) {\n return vformat(fmt, std::forward<Container>(container)).str();\n}\n\n/**\n * Exception class thrown when a format key is not found in the given\n * associative container keyed by strings. We inherit std::out_of_range for\n * compatibility with callers that expect exception to be thrown directly\n * by std::map or std::unordered_map.\n *\n * Having the key be at the end of the message string, we can access it by\n * simply adding its offset to what(). Not storing separate std::string key\n * makes the exception type small and noexcept-copyable like std::out_of_range,\n * and therefore able to fit in-situ in exception_wrapper.\n */\nclass FOLLY_EXPORT FormatKeyNotFoundException : public std::out_of_range {\n public:\n explicit FormatKeyNotFoundException(StringPiece key);\n\n char const* key() const noexcept {\n return what() + kMessagePrefix.size();\n }\n\n private:\n static constexpr StringPiece const kMessagePrefix = \"format key not found: \";\n};\n\n/**\n * Wrap a sequence or associative container so that out-of-range lookups\n * return a default value rather than throwing an exception.\n *\n * Usage:\n * format(\"[no_such_key\"], defaulted(map, 42)) -> 42\n */\nnamespace detail {\ntemplate <class Container, class Value>\nstruct DefaultValueWrapper {\n DefaultValueWrapper(const Container& container, const Value& defaultValue)\n : container(container), defaultValue(defaultValue) {}\n\n const Container& container;\n const Value& defaultValue;\n};\n} // namespace detail\n\ntemplate <class Container, class Value>\ndetail::DefaultValueWrapper<Container, Value> defaulted(\n const Container& c,\n const Value& v) {\n return detail::DefaultValueWrapper<Container, Value>(c, v);\n}\n\n/**\n * Append formatted output to a string.\n *\n * std::string foo;\n * format(&foo, \"{} {}\", 42, 23);\n *\n * Shortcut for toAppend(format(...), &foo);\n */\ntemplate <class Str, class... Args>\ntypename std::enable_if<IsSomeString<Str>::value>::type\nformat(Str* out, StringPiece fmt, Args&&... args) {\n format(fmt, std::forward<Args>(args)...).appendTo(*out);\n}\n\n/**\n * Append vformatted output to a string.\n */\ntemplate <class Str, class Container>\ntypename std::enable_if<IsSomeString<Str>::value>::type\nvformat(Str* out, StringPiece fmt, Container&& container) {\n vformat(fmt, std::forward<Container>(container)).appendTo(*out);\n}\n\n/**\n * Utilities for all format value specializations.\n */\nnamespace format_value {\n\n/**\n * Format a string in \"val\", obeying appropriate alignment, padding, width,\n * and precision. Treats Align::DEFAULT as Align::LEFT, and\n * Align::PAD_AFTER_SIGN as Align::RIGHT; use formatNumber for\n * number-specific formatting.\n */\ntemplate <class FormatCallback>\nvoid formatString(StringPiece val, FormatArg& arg, FormatCallback& cb);\n\n/**\n * Format a number in \"val\"; the first prefixLen characters form the prefix\n * (sign, \"0x\" base prefix, etc) which must be left-aligned if the alignment\n * is Align::PAD_AFTER_SIGN. Treats Align::DEFAULT as Align::LEFT. Ignores\n * arg.precision, as that has a different meaning for numbers (not \"maximum\n * field width\")\n */\ntemplate <class FormatCallback>\nvoid formatNumber(\n StringPiece val,\n int prefixLen,\n FormatArg& arg,\n FormatCallback& cb);\n\n/**\n * Format a Formatter object recursively. Behaves just like\n * formatString(fmt.str(), arg, cb); but avoids creating a temporary\n * string if possible.\n */\ntemplate <\n class FormatCallback,\n class Derived,\n bool containerMode,\n class... Args>\nvoid formatFormatter(\n const BaseFormatter<Derived, containerMode, Args...>& formatter,\n FormatArg& arg,\n FormatCallback& cb);\n\n} // namespace format_value\n\n/*\n * Specialize folly::FormatValue for your type.\n *\n * FormatValue<T> is constructed with a (reference-collapsed) T&&, which is\n * guaranteed to stay alive until the FormatValue object is destroyed, so you\n * may keep a reference (or pointer) to it instead of making a copy.\n *\n * You must define\n * template <class Callback>\n * void format(FormatArg& arg, Callback& cb) const;\n * with the following semantics: format the value using the given argument.\n *\n * arg is given by non-const reference for convenience -- it won't be reused,\n * so feel free to modify it in place if necessary. (For example, wrap an\n * existing conversion but change the default, or remove the \"key\" when\n * extracting an element from a container)\n *\n * Call the callback to append data to the output. You may call the callback\n * as many times as you'd like (or not at all, if you want to output an\n * empty string)\n */\n\nnamespace detail {\n\ntemplate <class T, class Enable = void>\nstruct IsFormatter : public std::false_type {};\n\ntemplate <class T>\nstruct IsFormatter<\n T,\n typename std::enable_if<\n std::is_same<typename T::IsFormatter, detail::FormatterTag>::value>::\n type> : public std::true_type {};\n} // namespace detail\n\n// Deprecated API. formatChecked() et. al. now behave identically to their\n// non-Checked counterparts.\ntemplate <class... Args>\nFormatter<false, Args...> formatChecked(StringPiece fmt, Args&&... args) {\n return format(fmt, std::forward<Args>(args)...);\n}\ntemplate <class... Args>\ninline std::string sformatChecked(StringPiece fmt, Args&&... args) {\n return formatChecked(fmt, std::forward<Args>(args)...).str();\n}\ntemplate <class Container>\nFormatter<true, Container> vformatChecked(\n StringPiece fmt,\n Container&& container) {\n return vformat(fmt, std::forward<Container>(container));\n}\ntemplate <class Container>\ninline std::string svformatChecked(StringPiece fmt, Container&& container) {\n return vformatChecked(fmt, std::forward<Container>(container)).str();\n}\ntemplate <class Str, class... Args>\ntypename std::enable_if<IsSomeString<Str>::value>::type\nformatChecked(Str* out, StringPiece fmt, Args&&... args) {\n formatChecked(fmt, std::forward<Args>(args)...).appendTo(*out);\n}\ntemplate <class Str, class Container>\ntypename std::enable_if<IsSomeString<Str>::value>::type\nvformatChecked(Str* out, StringPiece fmt, Container&& container) {\n vformatChecked(fmt, std::forward<Container>(container)).appendTo(*out);\n}\n\n} // namespace folly\n\n#include <folly/Format-inl.h>\n\nFOLLY_POP_WARNING\n"} +{"text": "好奇心原文链接:[一盏落地灯,轻轻一拨就能改变光源方向|这个设计了不起_设计_好奇心日报-胡莹](https://www.qdaily.com/articles/56565.html)\nWebArchive归档链接:[一盏落地灯,轻轻一拨就能改变光源方向|这个设计了不起_设计_好奇心日报-胡莹](http://web.archive.org/web/20181001002236/http://www.qdaily.com:80/articles/56565.html)\n![image](http://ww3.sinaimg.cn/large/007d5XDply1g3y3gy1k1rj30q2cmsu10)"} +{"text": "object t1 {\n\tcase object Const {\n\t}\n\n\tclass Var\n\t{\n\n} // missing brace\n\nobject t2 {\n\tcase class Const() {\n\t}\n\n\tclass Var\n\t{\n\n} // missing brace\n\nobject t3 {\n\tfinal case class Const() {\n\t}\n\n\tclass Var\n\t{\n\n} // missing brace\n"} +{"text": "# please keep this list sorted alphabetically\n#\nam\nan\nang\nar\nas\nast\naz\nbe\nbe@latin\nbg\nbn\nbn_IN\nbs\nca\nca@valencia\ncs\ncy\nda\nde\ndz\nel\nen_CA\nen_GB\nen@shaw\neo\nes\net\neu\nfa\nfi\nfr\nfur\nga\ngd\ngl\ngu\nhe\nhi\nhr\nhu\nid\nis\nit\nja\nka\nkk\nkn\nko\nku\nky\nli\nlt\nlv\nmai\nmi\nmk\nml\nmn\nmr\nms\nnb\nnds\nne\nnl\nnn\noc\nor\npa\npl\npt\npt_BR\nro\nru\nrw\nsi\nsk\nsl\nsq\nsr\nsr@latin\nsv\nta\nte\ntg\nth\ntr\nug\nuk\nuz@cyrillic\nvi\nwa\nxh\nzh_CN\nzh_HK\nzh_TW\n"} +{"text": "/*******************************************************************************\n * This file is part of the Twig eclipse plugin.\n *\n * (c) Robert Gruendler <r.gruendler@gmail.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n ******************************************************************************/\npackage com.dubture.twig.ui;\n\nimport org.eclipse.dltk.core.IDLTKLanguageToolkit;\nimport org.eclipse.dltk.ui.AbstractDLTKUILanguageToolkit;\nimport org.eclipse.dltk.ui.IDLTKUILanguageToolkit;\nimport org.eclipse.jface.preference.IPreferenceStore;\n\nimport com.dubture.twig.core.TwigCorePlugin;\nimport com.dubture.twig.core.TwigLanguageToolkit;\nimport com.dubture.twig.core.documentModel.parser.partitioner.TwigPartitionTypes;\n\npublic class TwigUILanguageToolkit extends AbstractDLTKUILanguageToolkit {\n\n\tprivate static TwigUILanguageToolkit sToolkit = new TwigUILanguageToolkit();\n\n\tpublic static IDLTKUILanguageToolkit getInstance() {\n\t\treturn sToolkit;\n\t}\n\n\tpublic IDLTKLanguageToolkit getCoreToolkit() {\n\t\treturn TwigLanguageToolkit.getDefault();\n\t}\n\n\tpublic IPreferenceStore getPreferenceStore() {\n\t\treturn TwigUICorePlugin.getDefault().getPreferenceStore();\n\t}\n\n\tpublic String getPartitioningId() {\n\t\treturn TwigPartitionTypes.TWIG_DEFAULT;\n\t}\n\n\tpublic String getEditorId(Object inputElement) {\n\t\treturn TwigCorePlugin.EDITOR_ID;\n\t}\n}\n"} +{"text": "/*\n * CDDL HEADER START\n *\n * The contents of this file are subject to the terms of the\n * Common Development and Distribution License (the \"License\").\n * You may not use this file except in compliance with the License.\n *\n * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE\n * or http://www.opensolaris.org/os/licensing.\n * See the License for the specific language governing permissions\n * and limitations under the License.\n *\n * When distributing Covered Code, include this CDDL HEADER in each\n * file and include the License file at usr/src/OPENSOLARIS.LICENSE.\n * If applicable, add the following below this CDDL HEADER, with the\n * fields enclosed by brackets \"[]\" replaced with your own identifying\n * information: Portions Copyright [yyyy] [name of copyright owner]\n *\n * CDDL HEADER END\n */\n\n/*\n * Copyright 2007 Sun Microsystems, Inc. All rights reserved.\n * Use is subject to license terms.\n */\n\n#pragma ident\t\"%Z%%M%\t%I%\t%E% SMI\"\n\n#include <sys/asm_linkage.h>\n\n\tDGDEF(__fsr_init_value)\n\t.long 0\n\n\tENTRY(main)\n\tpushl\t%ebp\n\tmovl\t%esp, %ebp\n\tmovl\t%esp, (%ebp)\nloop:\n\tcall\tgetpid\n\tjmp\tloop\n\tleave\n\tret\n\tSET_SIZE(main)\n"} +{"text": "# The MIT License\n# \n# Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi, Mike Salnikov\n# \n# Permission is hereby granted, free of charge, to any person obtaining a copy\n# of this software and associated documentation files (the \"Software\"), to deal\n# in the Software without restriction, including without limitation the rights\n# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n# copies of the Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n# \n# The above copyright notice and this permission notice shall be included in\n# all copies or substantial portions of the Software.\n# \n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n# THE SOFTWARE.\n\nlogin=\\u0432\\u043E\\u0439\\u0442\\u0438\n"} +{"text": "using CapFrameX.Webservice.Data.DTO;\nusing FluentValidation;\nusing MediatR;\nusing System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace CapFrameX.Webservice.Data.Queries\n{\n\tpublic class GetSessionCollectionByIdQuery: IRequest<SessionCollectionDTO>\n\t{\n\t\tpublic Guid Id { get; set; }\n\t}\n\n public class GetCaptureByIdQueryValidator : AbstractValidator<GetSessionCollectionByIdQuery>\n {\n public GetCaptureByIdQueryValidator()\n {\n RuleFor(x => x.Id).NotEmpty();\n }\n }\n}\n"} +{"text": "<?php\n\n/*\n * This file is part of SwiftMailer.\n * (c) 2004-2009 Chris Corbyn\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n/**\n * A KeyCache which streams to and from disk.\n *\n * @author Chris Corbyn\n */\nclass Swift_KeyCache_DiskKeyCache implements Swift_KeyCache\n{\n /** Signal to place pointer at start of file */\n const POSITION_START = 0;\n\n /** Signal to place pointer at end of file */\n const POSITION_END = 1;\n\n /** Signal to leave pointer in whatever position it currently is */\n const POSITION_CURRENT = 2;\n\n /**\n * An InputStream for cloning.\n *\n * @var Swift_KeyCache_KeyCacheInputStream\n */\n private $_stream;\n\n /**\n * A path to write to.\n *\n * @var string\n */\n private $_path;\n\n /**\n * Stored keys.\n *\n * @var array\n */\n private $_keys = array();\n\n /**\n * Will be true if magic_quotes_runtime is turned on.\n *\n * @var bool\n */\n private $_quotes = false;\n\n /**\n * Create a new DiskKeyCache with the given $stream for cloning to make\n * InputByteStreams, and the given $path to save to.\n *\n * @param Swift_KeyCache_KeyCacheInputStream $stream\n * @param string $path to save to\n */\n public function __construct(Swift_KeyCache_KeyCacheInputStream $stream, $path)\n {\n $this->_stream = $stream;\n $this->_path = $path;\n\n if (function_exists('get_magic_quotes_runtime') && @get_magic_quotes_runtime() == 1) {\n $this->_quotes = true;\n }\n }\n\n /**\n * Set a string into the cache under $itemKey for the namespace $nsKey.\n *\n * @see MODE_WRITE, MODE_APPEND\n *\n * @param string $nsKey\n * @param string $itemKey\n * @param string $string\n * @param int $mode\n *\n * @throws Swift_IoException\n */\n public function setString($nsKey, $itemKey, $string, $mode)\n {\n $this->_prepareCache($nsKey);\n switch ($mode) {\n case self::MODE_WRITE:\n $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_START);\n break;\n case self::MODE_APPEND:\n $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_END);\n break;\n default:\n throw new Swift_SwiftException(\n 'Invalid mode ['.$mode.'] used to set nsKey='.\n $nsKey.', itemKey='.$itemKey\n );\n break;\n }\n fwrite($fp, $string);\n $this->_freeHandle($nsKey, $itemKey);\n }\n\n /**\n * Set a ByteStream into the cache under $itemKey for the namespace $nsKey.\n *\n * @see MODE_WRITE, MODE_APPEND\n *\n * @param string $nsKey\n * @param string $itemKey\n * @param Swift_OutputByteStream $os\n * @param int $mode\n *\n * @throws Swift_IoException\n */\n public function importFromByteStream($nsKey, $itemKey, Swift_OutputByteStream $os, $mode)\n {\n $this->_prepareCache($nsKey);\n switch ($mode) {\n case self::MODE_WRITE:\n $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_START);\n break;\n case self::MODE_APPEND:\n $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_END);\n break;\n default:\n throw new Swift_SwiftException(\n 'Invalid mode ['.$mode.'] used to set nsKey='.\n $nsKey.', itemKey='.$itemKey\n );\n break;\n }\n while (false !== $bytes = $os->read(8192)) {\n fwrite($fp, $bytes);\n }\n $this->_freeHandle($nsKey, $itemKey);\n }\n\n /**\n * Provides a ByteStream which when written to, writes data to $itemKey.\n *\n * NOTE: The stream will always write in append mode.\n *\n * @param string $nsKey\n * @param string $itemKey\n * @param Swift_InputByteStream $writeThrough\n *\n * @return Swift_InputByteStream\n */\n public function getInputByteStream($nsKey, $itemKey, Swift_InputByteStream $writeThrough = null)\n {\n $is = clone $this->_stream;\n $is->setKeyCache($this);\n $is->setNsKey($nsKey);\n $is->setItemKey($itemKey);\n if (isset($writeThrough)) {\n $is->setWriteThroughStream($writeThrough);\n }\n\n return $is;\n }\n\n /**\n * Get data back out of the cache as a string.\n *\n * @param string $nsKey\n * @param string $itemKey\n *\n * @throws Swift_IoException\n *\n * @return string\n */\n public function getString($nsKey, $itemKey)\n {\n $this->_prepareCache($nsKey);\n if ($this->hasKey($nsKey, $itemKey)) {\n $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_START);\n if ($this->_quotes) {\n ini_set('magic_quotes_runtime', 0);\n }\n $str = '';\n while (!feof($fp) && false !== $bytes = fread($fp, 8192)) {\n $str .= $bytes;\n }\n if ($this->_quotes) {\n ini_set('magic_quotes_runtime', 1);\n }\n $this->_freeHandle($nsKey, $itemKey);\n\n return $str;\n }\n }\n\n /**\n * Get data back out of the cache as a ByteStream.\n *\n * @param string $nsKey\n * @param string $itemKey\n * @param Swift_InputByteStream $is to write the data to\n */\n public function exportToByteStream($nsKey, $itemKey, Swift_InputByteStream $is)\n {\n if ($this->hasKey($nsKey, $itemKey)) {\n $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_START);\n if ($this->_quotes) {\n ini_set('magic_quotes_runtime', 0);\n }\n while (!feof($fp) && false !== $bytes = fread($fp, 8192)) {\n $is->write($bytes);\n }\n if ($this->_quotes) {\n ini_set('magic_quotes_runtime', 1);\n }\n $this->_freeHandle($nsKey, $itemKey);\n }\n }\n\n /**\n * Check if the given $itemKey exists in the namespace $nsKey.\n *\n * @param string $nsKey\n * @param string $itemKey\n *\n * @return bool\n */\n public function hasKey($nsKey, $itemKey)\n {\n return is_file($this->_path.'/'.$nsKey.'/'.$itemKey);\n }\n\n /**\n * Clear data for $itemKey in the namespace $nsKey if it exists.\n *\n * @param string $nsKey\n * @param string $itemKey\n */\n public function clearKey($nsKey, $itemKey)\n {\n if ($this->hasKey($nsKey, $itemKey)) {\n $this->_freeHandle($nsKey, $itemKey);\n unlink($this->_path.'/'.$nsKey.'/'.$itemKey);\n }\n }\n\n /**\n * Clear all data in the namespace $nsKey if it exists.\n *\n * @param string $nsKey\n */\n public function clearAll($nsKey)\n {\n if (array_key_exists($nsKey, $this->_keys)) {\n foreach ($this->_keys[$nsKey] as $itemKey => $null) {\n $this->clearKey($nsKey, $itemKey);\n }\n if (is_dir($this->_path.'/'.$nsKey)) {\n rmdir($this->_path.'/'.$nsKey);\n }\n unset($this->_keys[$nsKey]);\n }\n }\n\n /**\n * Initialize the namespace of $nsKey if needed.\n *\n * @param string $nsKey\n */\n private function _prepareCache($nsKey)\n {\n $cacheDir = $this->_path.'/'.$nsKey;\n if (!is_dir($cacheDir)) {\n if (!mkdir($cacheDir)) {\n throw new Swift_IoException('Failed to create cache directory '.$cacheDir);\n }\n $this->_keys[$nsKey] = array();\n }\n }\n\n /**\n * Get a file handle on the cache item.\n *\n * @param string $nsKey\n * @param string $itemKey\n * @param int $position\n *\n * @return resource\n */\n private function _getHandle($nsKey, $itemKey, $position)\n {\n if (!isset($this->_keys[$nsKey][$itemKey])) {\n $openMode = $this->hasKey($nsKey, $itemKey) ? 'r+b' : 'w+b';\n $fp = fopen($this->_path.'/'.$nsKey.'/'.$itemKey, $openMode);\n $this->_keys[$nsKey][$itemKey] = $fp;\n }\n if (self::POSITION_START == $position) {\n fseek($this->_keys[$nsKey][$itemKey], 0, SEEK_SET);\n } elseif (self::POSITION_END == $position) {\n fseek($this->_keys[$nsKey][$itemKey], 0, SEEK_END);\n }\n\n return $this->_keys[$nsKey][$itemKey];\n }\n\n private function _freeHandle($nsKey, $itemKey)\n {\n $fp = $this->_getHandle($nsKey, $itemKey, self::POSITION_CURRENT);\n fclose($fp);\n $this->_keys[$nsKey][$itemKey] = null;\n }\n\n /**\n * Destructor.\n */\n public function __destruct()\n {\n foreach ($this->_keys as $nsKey => $null) {\n $this->clearAll($nsKey);\n }\n }\n}\n"} +{"text": "#\n# Be sure to run `pod lib lint Mockit.podspec' to ensure this is a\n# valid spec before submitting.\n#\n# Any lines starting with a # are optional, but their use is encouraged\n# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html\n#\n\nPod::Spec.new do |s|\n s.name = \"Mockit\"\n s.version = \"1.5.0\"\n s.summary = \"Mocking framework for unit tests written in Swift.\"\n\n# This description is used to generate tags and improve search results.\n# * Think: What does it do? Why did you write it? What is the focus?\n# * Try to keep it short, snappy and to the point.\n# * Write the description between the DESC delimiters below.\n# * Finally, don't worry about the indent, CocoaPods strips it!\n\n s.description = <<-DESC\nMockit is a first attempt at a mocking/stubbing framework for Swift 3.0. It's API is inspired by \"Mockito\", the famous mocking framework for Java. Mockit is in the very earliest stage of development, but its current features are almost completely usable.\n DESC\n\n s.homepage = \"https://github.com/sabirvirtuoso/Mockit\"\n # s.screenshots = \"www.example.com/screenshots_1\", \"www.example.com/screenshots_2\"\n s.license = 'MIT'\n s.author = { \"Syed Sabir Salman-Al-Musawi\" => \"sabirvirtuoso@gmail.com\" }\n s.source = { :git => \"https://github.com/sabirvirtuoso/Mockit.git\", :tag => s.version.to_s }\n s.social_media_url = 'https://www.facebook.com/syed.musawi'\n\n s.platform = :ios, '8.0'\n s.requires_arc = true\n\n s.source_files = 'Mockit/Classes/**/*'\n\n #s.resource_bundles = {\n # 'Mockit' => ['Mockit/Assets/*.png']\n #}\n\n # s.public_header_files = 'Pod/Classes/**/*.h'\n s.frameworks = 'XCTest'\n # s.dependency 'AFNetworking', '~> 2.3'\nend\n"} +{"text": "/**\n * Copyright © 2002 Instituto Superior Técnico\n *\n * This file is part of FenixEdu Academic.\n *\n * FenixEdu Academic is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * FenixEdu Academic is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with FenixEdu Academic. If not, see <http://www.gnu.org/licenses/>.\n */\npackage org.fenixedu.academic.domain.accounting.events.serviceRequests;\n\nimport org.fenixedu.academic.domain.Person;\nimport org.fenixedu.academic.domain.accounting.EntryType;\nimport org.fenixedu.academic.domain.accounting.EventType;\nimport org.fenixedu.academic.domain.administrativeOffice.AdministrativeOffice;\nimport org.fenixedu.academic.domain.exceptions.DomainException;\nimport org.fenixedu.academic.domain.serviceRequests.FreeSolicitationAcademicRequest;\nimport org.fenixedu.academic.util.Bundle;\nimport org.fenixedu.academic.util.LabelFormatter;\nimport org.fenixedu.academic.util.Money;\n\npublic class PastFreeSolicitationAcademicRequestEvent extends PastFreeSolicitationAcademicRequestEvent_Base implements\n IPastRequestEvent {\n\n protected PastFreeSolicitationAcademicRequestEvent() {\n super();\n }\n\n public PastFreeSolicitationAcademicRequestEvent(final AdministrativeOffice administrativeOffice, final Person person,\n final FreeSolicitationAcademicRequest request) {\n this();\n super.init(administrativeOffice, EventType.PAST_FREE_SOLICITATION_ACADEMIC_REQUEST, person, request);\n }\n\n @Override\n public void setPastAmount(Money amount) {\n throw new DomainException(\"error.accounting.events.cannot.modify.pastAmount\");\n }\n\n @Override\n protected LabelFormatter getDescriptionForEntryType(EntryType entryType) {\n final LabelFormatter labelFormatter = new LabelFormatter();\n\n labelFormatter.appendLabel(entryType.name(), Bundle.ENUMERATION);\n\n if (getAcademicServiceRequest().getExecutionYear() != null) {\n labelFormatter.appendLabel(\" - \" + getExecutionYear().getYear());\n }\n\n labelFormatter.appendLabel(\" - \").appendLabel(getAcademicServiceRequest().getServiceRequestNumberYear());\n\n return labelFormatter;\n }\n\n}\n"} +{"text": "## History of changes for WinPython 3.5.2.1\r\r\n\r\r\nThe following changes were made to WinPython distribution since version 3.5.1.3.\r\r\n\r\r\n### Python packages\r\r\n\r\r\nNew packages:\r\r\n\r\r\n * [args](http://pypi.python.org/pypi/args) 0.1.0 (Command Arguments for Humans.)\r\r\n * [boto3](http://pypi.python.org/pypi/boto3) 1.3.1 (The AWS SDK for Python)\r\r\n * [botocore](http://pypi.python.org/pypi/botocore) 1.4.36 (Low-level, data-driven core of boto 3.)\r\r\n * [clint](http://pypi.python.org/pypi/clint) 0.5.1 (Python Command Line Interface Tools)\r\r\n * [commonmark](http://pypi.python.org/pypi/commonmark) 0.5.4 (Python parser for the CommonMark Markdown spec)\r\r\n * [distributed](http://pypi.python.org/pypi/distributed) 1.11.2 (Distributed computing)\r\r\n * [entrypoints](http://pypi.python.org/pypi/entrypoints) 0.2.2 (Discover and load entry points from installed packages)\r\r\n * [fasteners](http://pypi.python.org/pypi/fasteners) 0.14.1 (A python package that provides useful locks.)\r\r\n * [ipyleaflet](http://pypi.python.org/pypi/ipyleaflet) 0.2.1 (A Jupyter widget for dynamic Leaflet maps)\r\r\n * [isort](http://pypi.python.org/pypi/isort) 4.2.5 (A Python utility / library to sort Python imports.)\r\r\n * [jmespath](http://pypi.python.org/pypi/jmespath) 0.9.0 (JSON Matching Expressions)\r\r\n * [mccabe](http://pypi.python.org/pypi/mccabe) 0.4.0 (McCabe checker, plugin for flake8)\r\r\n * [monotonic](http://pypi.python.org/pypi/monotonic) 1.1 (An implementation of time.monotonic() for Python 2 & < 3.3)\r\r\n * [msgpack-python](http://pypi.python.org/pypi/msgpack-python) 0.4.7 (MessagePack (de)serializer.)\r\r\n * [nbsphinx](http://pypi.python.org/pypi/nbsphinx) 0.2.8 (Jupyter Notebook Tools for Sphinx)\r\r\n * [pycodestyle](http://pypi.python.org/pypi/pycodestyle) 2.0.0 (Python style guide checker)\r\r\n * [recommonmark](http://pypi.python.org/pypi/recommonmark) 0.4.0 (A markdown parser for docutils)\r\r\n * [s3fs](http://pypi.python.org/pypi/s3fs) 0.0.6 (Convenient Filesystem interface over S3)\r\r\n * [tblib](http://pypi.python.org/pypi/tblib) 1.3.0 (Traceback serialization library.)\r\r\n * [widgetsnbextension](http://pypi.python.org/pypi/widgetsnbextension) 1.2.6 (IPython HTML widgets for Jupyter)\r\r\n * [win-unicode-console](http://pypi.python.org/pypi/win-unicode-console) 0.5 (Enable Unicode input and display when running Python from Windows console.)\r\r\n * [zarr](http://pypi.python.org/pypi/zarr) 1.0.0 (A minimal implementation of chunked, compressed, N-dimensional arrays for Python.)\r\r\n\r\r\nUpgraded packages:\r\r\n\r\r\n * [alabaster](http://pypi.python.org/pypi/alabaster) 0.7.7 → 0.7.8 (A configurable sidebar-enabled Sphinx theme)\r\r\n * [astroid](http://pypi.python.org/pypi/astroid) 1.4.5 → 1.4.7 (Rebuild a new abstract syntax tree from Python's ast (required for pylint))\r\r\n * [babel](http://pypi.python.org/pypi/babel) 2.2.0 → 2.3.2 (Internationalization utilities)\r\r\n * [bcolz](http://pypi.python.org/pypi/bcolz) 0.12.1 → 1.1.0 (columnar and compressed data containers.)\r\r\n * [blaze](http://pypi.python.org/pypi/blaze) 0.9.1 → 0.10.1 (Blaze)\r\r\n * [blosc](http://pypi.python.org/pypi/blosc) 1.3.0 → 1.3.3 (Blosc data compressor)\r\r\n * [bottleneck](http://pypi.python.org/pypi/bottleneck) 1.0.0 → 1.1.0 (Fast NumPy array functions written in Cython)\r\r\n * [bqplot](http://pypi.python.org/pypi/bqplot) 0.5.5 → 0.7.1 (Interactive plotting for the Jupyter notebook, using d3.js and ipywidgets.)\r\r\n * [cffi](http://pypi.python.org/pypi/cffi) 1.5.2 → 1.7.0 (Foreign Function Interface for Python calling C code.)\r\r\n * [cython](http://www.cython.org) 0.24 → 0.24.1 (Cython is a language that makes writing C extensions for the Python language as easy as Python)\r\r\n * [cytoolz](http://pypi.python.org/pypi/cytoolz) 0.7.5 → 0.8.0 (Cython implementation of Toolz: High performance functional utilities)\r\r\n * [dask](http://pypi.python.org/pypi/dask) 0.8.1 → 0.10.1 (Minimal task scheduling abstraction)\r\r\n * [datashape](http://pypi.python.org/pypi/datashape) 0.5.1 → 0.5.2 (A data description language)\r\r\n * [decorator](http://pypi.python.org/pypi/decorator) 4.0.7 → 4.0.10 (Better living through Python with decorators)\r\r\n * [flask](http://pypi.python.org/pypi/flask) 0.10.1 → 0.11.1 (A microframework based on Werkzeug, Jinja2 and good intentions)\r\r\n * [greenlet](http://pypi.python.org/pypi/greenlet) 0.4.9 → 0.4.10 (Lightweight in-process concurrent programming)\r\r\n * [h5py](http://pypi.python.org/pypi/h5py) 2.5.0 → 2.6.0 (General-purpose Python interface to HDF5 files (unlike PyTables, h5py provides direct access to the full HDF5 C library))\r\r\n * [holoviews](http://pypi.python.org/pypi/holoviews) 1.4.3 → 1.6.0 (Composable, declarative data structures for building complex visualizations easily.)\r\r\n * [imagesize](http://pypi.python.org/pypi/imagesize) 0.7.0 → 0.7.1 (Getting image size from png/jpeg/jpeg2000/gif file)\r\r\n * [ipyparallel](http://pypi.python.org/pypi/ipyparallel) 5.0.1 → 5.1.1 (Interactive Parallel Computing with IPython)\r\r\n * [ipython](http://pypi.python.org/pypi/ipython) 4.1.2 → 5.0.0 (Enhanced Python shell)\r\r\n * [ipywidgets](http://pypi.python.org/pypi/ipywidgets) 4.1.1 → 5.2.2 (IPython HTML widgets for Jupyter)\r\r\n * [joblib](http://pypi.python.org/pypi/joblib) 0.9.4 → 0.10.0 (Lightweight pipelining: using Python functions as pipeline jobs.)\r\r\n * [julia](http://pypi.python.org/pypi/julia) 0.1.1.8 → 0.1.1 (Python interface to the Julia language)\r\r\n * [jupyter-client](http://pypi.python.org/pypi/jupyter-client) 4.2.2 → 4.3.0 (Jupyter metapackage. Install all the Jupyter components in one go.)\r\r\n * [jupyter-console](http://pypi.python.org/pypi/jupyter-console) 4.1.1 → 5.0.0 (Jupyter metapackage. Install all the Jupyter components in one go.)\r\r\n * [keras](http://pypi.python.org/pypi/keras) 0.3.3 → 1.0.6 (Theano-based Deep Learning library)\r\r\n * [lazy-object-proxy](http://pypi.python.org/pypi/lazy-object-proxy) 1.2.1 → 1.2.2 (A fast and thorough lazy object proxy.)\r\r\n * [llvmlite](http://pypi.python.org/pypi/llvmlite) 0.10.0 → 0.12.1 (lightweight wrapper around basic LLVM functionality)\r\r\n * [matplotlib](http://pypi.python.org/pypi/matplotlib) 1.5.1 → 1.5.2 (2D plotting library (embeddable in GUIs created with PyQt))\r\r\n * [mistune](http://pypi.python.org/pypi/mistune) 0.7.2 → 0.7.3 (The fastest markdown parser in pure Python, inspired by marked.)\r\r\n * [nbconvert](http://pypi.python.org/pypi/nbconvert) 4.1.0 → 4.2.0 (Converting Jupyter Notebooks)\r\r\n * [netcdf4](http://pypi.python.org/pypi/netcdf4) 1.2.3.1 → 1.2.4 (python/numpy interface to netCDF library (versions 3 and 4))\r\r\n * [nltk](http://pypi.python.org/pypi/nltk) 3.2 → 3.2.1 (The Natural Language Toolkit (NLTK) is a Python package for natural language processing.)\r\r\n * [notebook](http://pypi.python.org/pypi/notebook) 4.1.0 → 4.2.1 (# Jupyter Notebook)\r\r\n * [numba](http://pypi.python.org/pypi/numba) 0.25.0 → 0.27.0 (compiling Python code using LLVM)\r\r\n * [numexpr](http://pypi.python.org/pypi/numexpr) 2.5.1 → 2.6.1 (Fast evaluation of array expressions elementwise by using a vector-based virtual machine)\r\r\n * [numpy](http://numpy.scipy.org/) 1.10.4 → 1.11.1 (NumPy: multidimensional array processing for numbers, strings, records and objects (SciPy''s core module))\r\r\n * [oct2py](http://pypi.python.org/pypi/oct2py) 3.5.3 → 3.5.9 (Python to GNU Octave bridge --> run m-files from python.)\r\r\n * [odo](http://pypi.python.org/pypi/odo) 0.4.2 → 0.5.0 (Data migration in Python)\r\r\n * [pandas](http://pypi.python.org/pypi/pandas) 0.18.0 → 0.18.1 (Powerful data structures for data analysis, time series and statistics)\r\r\n * [param](http://pypi.python.org/pypi/param) 1.3.2 → 1.4.1 (Declarative Python programming using Parameters.)\r\r\n * [partd](http://pypi.python.org/pypi/partd) 0.3.2 → 0.3.4 (Appendable key-value storage)\r\r\n * [pickleshare](http://pypi.python.org/pypi/pickleshare) 0.6 → 0.7.2 (Tiny 'shelve'-like database with concurrency support)\r\r\n * [pillow](http://pypi.python.org/pypi/pillow) 3.2.0 → 3.3.0 (Python Imaging Library (fork))\r\r\n * [pip](http://pypi.python.org/pypi/pip) 8.1.1 → 8.1.2 (A tool for installing and managing Python packages)\r\r\n * [pkginfo](http://pypi.python.org/pypi/pkginfo) 1.2.1 → 1.3.2 (Query metadatdata from sdists / bdists / installed packages.)\r\r\n * [prompt-toolkit](http://pypi.python.org/pypi/prompt-toolkit) 0.60 → 1.0.3 (Library for building powerful interactive command lines in Python)\r\r\n * [psutil](http://code.google.com/p/psutil) 4.1.0 → 4.3.0 (Provides an interface for retrieving information on all running processes and system utilization (CPU, disk, memory, network) in a portable way)\r\r\n * [ptpython](http://pypi.python.org/pypi/ptpython) 0.32 → 0.35 (Python REPL build on top of prompt_toolkit)\r\r\n * [pyflakes](http://pypi.python.org/pypi/pyflakes) 1.1.0 → 1.2.3 (passive checker of Python programs)\r\r\n * [pylint](http://www.logilab.org/project/pylint) 1.5.5 → 1.6.1 (Logilab code analysis module: analyzes Python source code looking for bugs and signs of poor quality)\r\r\n * [pyparsing](http://pyparsing.wikispaces.com/) 2.1.0 → 2.1.5 (A Python Parsing Module)\r\r\n * [pyserial](http://pypi.python.org/pypi/pyserial) 3.0.1 → 3.1.1 (Library encapsulating the access for the serial port)\r\r\n * [Python](http://www.python.org/) 3.5.1 → 3.5.2 (Python programming language with standard library)\r\r\n * [python-dateutil](http://labix.org/python-dateutil) 2.5.1 → 2.5.3 (Powerful extensions to the standard datetime module)\r\r\n * [pytz](http://pypi.python.org/pypi/pytz) 2016.3 → 2016.4 (World Timezone Definitions for Python)\r\r\n * [pywin32](http://pypi.python.org/pypi/pywin32) 220 → 220.1 (Python library for Windows)\r\r\n * [pyzmq](http://pypi.python.org/pypi/pyzmq) 15.2.0 → 15.3.0 (Lightweight and super-fast messaging based on ZeroMQ library (required for IPython Qt console))\r\r\n * [qtpy](http://pypi.python.org/pypi/qtpy) 1.0 → 1.1.1 (Provides an abstraction layer on top of the various Qt bindings (PyQt5, PyQt4 and PySide) and additional custom QWidgets.)\r\r\n * [requests](http://pypi.python.org/pypi/requests) 2.9.1 → 2.10.0 (Requests is an Apache2 Licensed HTTP library, written in Python, for human beings.)\r\r\n * [requests-toolbelt](http://pypi.python.org/pypi/requests-toolbelt) 0.6.0 → 0.6.2 (Requests is an Apache2 Licensed HTTP library, written in Python, for human beings.)\r\r\n * [rpy2](http://pypi.python.org/pypi/rpy2) 2.7.8 → 2.8.1 (Python interface to the R language (embedded R))\r\r\n * [rx](http://pypi.python.org/pypi/rx) 1.2.6 → 1.5.2 (Reactive Extensions (Rx) for Python)\r\r\n * [scipy](http://www.scipy.org) 0.17.0 → 0.18.0rc2 (SciPy: Scientific Library for Python (advanced math, signal processing, optimization, statistics, ...))\r\r\n * [seaborn](http://pypi.python.org/pypi/seaborn) 0.7.0 → 0.7.1 (statistical data visualization)\r\r\n * [setuptools](http://pypi.python.org/pypi/setuptools) 20.6.7 → 24.0.2 (Download, build, install, upgrade, and uninstall Python packages - easily)\r\r\n * [sphinx](http://pypi.python.org/pypi/sphinx) 1.4 → 1.4.5 (Tool for generating documentation which uses reStructuredText as its markup language)\r\r\n * [sqlalchemy](http://www.sqlalchemy.org) 1.0.12 → 1.0.14 (SQL Toolkit and Object Relational Mapper)\r\r\n * [statsmodels](http://pypi.python.org/pypi/statsmodels) 0.6.1 → 0.8.0rc1 (Statistical computations and models for use with SciPy)\r\r\n * [tables](http://www.pytables.org) 3.2.2 → 3.2.3 (Package based on HDF5 library for managing hierarchical datasets (extremely large amounts of data))\r\r\n * [theano](http://pypi.python.org/pypi/theano) 0.8.1 → 0.8.2 (Optimizing compiler for evaluating mathematical expressions on CPUs and GPUs.)\r\r\n * [toolz](http://pypi.python.org/pypi/toolz) 0.7.4 → 0.8.0 (List processing tools and functional utilities)\r\r\n * [tornado](http://pypi.python.org/pypi/tornado) 4.3 → 4.4 (Scalable, non-blocking web server and tools (required for IPython notebook))\r\r\n * [traitlets](http://pypi.python.org/pypi/traitlets) 4.2.1 → 4.2.2 (Traitlets Python config system)\r\r\n * [twine](http://pypi.python.org/pypi/twine) 1.6.5 → 1.7.4 (Collection of utilities for interacting with PyPI)\r\r\n * [wcwidth](http://pypi.python.org/pypi/wcwidth) 0.1.6 → 0.1.7 (Measures number of Terminal column cells of wide-character codes)\r\r\n * [werkzeug](http://pypi.python.org/pypi/werkzeug) 0.11.4 → 0.11.10 (The Swiss Army knife of Python web development)\r\r\n * [winpython](http://winpython.github.io/) 1.5.20160402 → 1.6.20160625 (WinPython distribution tools, including WPPM (package manager))\r\r\n * [wrapt](http://pypi.python.org/pypi/wrapt) 1.10.7 → 1.10.8 (A Python module for decorators, wrappers and monkey patching.)\r\r\n * [xlrd](http://pypi.python.org/pypi/xlrd) 0.9.4 → 1.0.0 (Extract data from Microsoft Excel spreadsheet files)\r\r\n * [xlsxwriter](http://pypi.python.org/pypi/xlsxwriter) 0.8.4 → 0.9.3 (A Python module for creating Excel XLSX files.)\r\r\n\r\r\nRemoved packages:\r\r\n\r\r\n * [castra](http://pypi.python.org/pypi/castra) 0.1.7 (On-disk partitioned store)\r\r\n * [dill](http://pypi.python.org/pypi/dill) 0.2.5 (serialize all of python (almost))\r\r\n * [path.py](http://pypi.python.org/pypi/path.py) 8.1.2 (A module wrapper for os.path)\r\r\n * [pyreadline](http://pypi.python.org/pypi/pyreadline) 2.1 (IPython needs this module to display color text in Windows command window)\r\r\n\r\r\n* * *\r\r\n"} +{"text": "# ------------------------------------------------------------------------------\n# Copyright (c) Microsoft Corporation. All rights reserved.\n# Licensed under the MIT License.\n# Written by Bin Xiao (Bin.Xiao@microsoft.com)\n# ------------------------------------------------------------------------------\n\n\nfrom __future__ import absolute_import\nfrom __future__ import division\nfrom __future__ import print_function\n\nimport argparse\nimport os\nimport pprint\n\nimport torch\nimport torch.nn.parallel\nimport torch.backends.cudnn as cudnn\nimport torch.optim\nimport torch.utils.data\nimport torch.utils.data.distributed\nimport torchvision.transforms as transforms\n\nimport _init_paths\nfrom core.config import config\nfrom core.config import update_config\nfrom core.config import update_dir\nfrom core.loss import JointsMSELoss\nfrom core.function import validate\nfrom utils.utils import create_logger\n\nimport dataset\nimport models\n\n\ndef parse_args():\n parser = argparse.ArgumentParser(description='Train keypoints network')\n # general\n parser.add_argument('--cfg',\n help='experiment configure file name',\n required=True,\n type=str)\n\n args, rest = parser.parse_known_args()\n # update config\n update_config(args.cfg)\n\n # training\n parser.add_argument('--frequent',\n help='frequency of logging',\n default=config.PRINT_FREQ,\n type=int)\n parser.add_argument('--gpus',\n help='gpus',\n type=str)\n parser.add_argument('--workers',\n help='num of dataloader workers',\n type=int)\n parser.add_argument('--model-file',\n help='model state file',\n type=str)\n parser.add_argument('--use-detect-bbox',\n help='use detect bbox',\n action='store_true')\n parser.add_argument('--flip-test',\n help='use flip test',\n action='store_true')\n parser.add_argument('--post-process',\n help='use post process',\n action='store_true')\n parser.add_argument('--shift-heatmap',\n help='shift heatmap',\n action='store_true')\n parser.add_argument('--coco-bbox-file',\n help='coco detection bbox file',\n type=str)\n\n args = parser.parse_args()\n\n return args\n\n\ndef reset_config(config, args):\n if args.gpus:\n config.GPUS = args.gpus\n if args.workers:\n config.WORKERS = args.workers\n if args.use_detect_bbox:\n config.TEST.USE_GT_BBOX = not args.use_detect_bbox\n if args.flip_test:\n config.TEST.FLIP_TEST = args.flip_test\n if args.post_process:\n config.TEST.POST_PROCESS = args.post_process\n if args.shift_heatmap:\n config.TEST.SHIFT_HEATMAP = args.shift_heatmap\n if args.model_file:\n config.TEST.MODEL_FILE = args.model_file\n if args.coco_bbox_file:\n config.TEST.COCO_BBOX_FILE = args.coco_bbox_file\n\n\ndef main():\n args = parse_args()\n reset_config(config, args)\n\n logger, final_output_dir, tb_log_dir = create_logger(\n config, args.cfg, 'valid')\n\n logger.info(pprint.pformat(args))\n logger.info(pprint.pformat(config))\n\n # cudnn related setting\n cudnn.benchmark = config.CUDNN.BENCHMARK\n torch.backends.cudnn.deterministic = config.CUDNN.DETERMINISTIC\n torch.backends.cudnn.enabled = config.CUDNN.ENABLED\n\n model = eval('models.'+config.MODEL.NAME+'.get_pose_net')(\n config, is_train=False\n )\n\n if config.TEST.MODEL_FILE:\n logger.info('=> loading model from {}'.format(config.TEST.MODEL_FILE))\n model.load_state_dict(torch.load(config.TEST.MODEL_FILE))\n else:\n model_state_file = os.path.join(final_output_dir,\n 'final_state.pth.tar')\n logger.info('=> loading model from {}'.format(model_state_file))\n model.load_state_dict(torch.load(model_state_file))\n\n gpus = [int(i) for i in config.GPUS.split(',')]\n model = torch.nn.DataParallel(model, device_ids=gpus).cuda()\n\n # define loss function (criterion) and optimizer\n criterion = JointsMSELoss(\n use_target_weight=config.LOSS.USE_TARGET_WEIGHT\n ).cuda()\n\n # Data loading code\n normalize = transforms.Normalize(mean=[0.485, 0.456, 0.406],\n std=[0.229, 0.224, 0.225])\n valid_dataset = eval('dataset.'+config.DATASET.DATASET)(\n config,\n config.DATASET.ROOT,\n config.DATASET.TEST_SET,\n False,\n transforms.Compose([\n transforms.ToTensor(),\n normalize,\n ])\n )\n valid_loader = torch.utils.data.DataLoader(\n valid_dataset,\n batch_size=config.TEST.BATCH_SIZE*len(gpus),\n shuffle=False,\n num_workers=config.WORKERS,\n pin_memory=True\n )\n\n # evaluate on validation set\n validate(config, valid_loader, valid_dataset, model, criterion,\n final_output_dir, tb_log_dir)\n\n\nif __name__ == '__main__':\n main()\n"} +{"text": "namespace EvilDICOM.Network.Enums\n{\n public enum Root\n {\n PATIENT,\n STUDY\n }\n}"} +{"text": "#!/bin/true\n"} +{"text": "/*\n * Copyright 1999-2012 Alibaba Group.\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * (created at 2011-10-31)\n */\npackage com.alibaba.cobar.parser.util;\n\nimport junit.framework.TestCase;\n\nimport org.junit.Assert;\nimport org.junit.Test;\n\n/**\n * @author <a href=\"mailto:shuo.qius@alibaba-inc.com\">QIU Shuo</a>\n */\npublic class PairUtilTest extends TestCase {\n\n @Test\n public void testSequenceSlicing() {\n Assert.assertEquals(new Pair<Integer, Integer>(0, 2), PairUtil.sequenceSlicing(\"2\"));\n Assert.assertEquals(new Pair<Integer, Integer>(1, 2), PairUtil.sequenceSlicing(\"1: 2\"));\n Assert.assertEquals(new Pair<Integer, Integer>(1, 0), PairUtil.sequenceSlicing(\" 1 :\"));\n Assert.assertEquals(new Pair<Integer, Integer>(-1, 0), PairUtil.sequenceSlicing(\"-1: \"));\n Assert.assertEquals(new Pair<Integer, Integer>(-1, 0), PairUtil.sequenceSlicing(\" -1:0\"));\n Assert.assertEquals(new Pair<Integer, Integer>(0, 0), PairUtil.sequenceSlicing(\" :\"));\n }\n\n @Test\n public void splitIndexTest() {\n String src1 = \"offer_group[10]\";\n Pair<String, Integer> pair1 = PairUtil.splitIndex(src1, '[', ']');\n Assert.assertEquals(\"offer_group\", pair1.getKey());\n Assert.assertEquals(Integer.valueOf(10), pair1.getValue());\n\n String src2 = \"offer_group\";\n Pair<String, Integer> pair2 = PairUtil.splitIndex(src2, '[', ']');\n Assert.assertEquals(\"offer_group\", pair2.getKey());\n Assert.assertEquals(Integer.valueOf(-1), pair2.getValue());\n }\n\n}\n"} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<resources>\n <!-- Name for one of the font options available to use -->\n <string name=\"mozac_feature_readerview_sans_serif_font\">Без зарубок</string>\n <!-- Accessible description for the font option -->\n <string name=\"mozac_feature_readerview_sans_serif_font_desc\">Шрифт без зарубок</string>\n <!-- Name for one of the font options available to use -->\n <string name=\"mozac_feature_readerview_serif_font\">Із зарубками</string>\n <!-- Accessible description for the font option -->\n <string name=\"mozac_feature_readerview_serif_font_desc\">Шрифт із зарубками</string>\n\n <!-- Accessible description for decreasing the font size -->\n <string name=\"mozac_feature_readerview_font_size_decrease_desc\">Зменшити розмір шрифту</string>\n\n <!-- Accessible description for increasing the font size -->\n <string name=\"mozac_feature_readerview_font_size_increase_desc\">Збільшити розмір шрифту</string>\n <!-- Color option for the background -->\n <string name=\"mozac_feature_readerview_dark\">Темна</string>\n <!-- Accessible description for the color option -->\n <string name=\"mozac_feature_readerview_dark_color_scheme_desc\">Темна колірна тема</string>\n <!-- Color option for the background -->\n <string name=\"mozac_feature_readerview_sephia\">Сепія</string>\n <!-- Accessible description for the color option -->\n <string name=\"mozac_feature_readerview_sepia_color_scheme_desc\">Колірна тема сепія</string>\n <!-- Color option for the background -->\n <string name=\"mozac_feature_readerview_light\">Світла</string>\n <!-- Accessible description for the color option -->\n <string name=\"mozac_feature_readerview_light_color_scheme_desc\">Світла колірна тема</string>\n</resources>\n"} +{"text": "/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\na.button.add-user,\na.button.add-user-group,\na.button.add-connection,\na.button.add-connection-group {\n font-size: 0.8em;\n padding-left: 1.8em;\n position: relative;\n}\n\na.button.add-user::before,\na.button.add-user-group::before,\na.button.add-connection::before,\na.button.add-connection-group::before {\n\n content: ' ';\n position: absolute;\n width: 1.8em;\n top: 0;\n bottom: 0;\n left: 0;\n\n background-repeat: no-repeat;\n background-size: 1em;\n background-position: 0.5em 0.45em;\n\n}\n\na.button.add-user::before {\n background-image: url('images/action-icons/guac-user-add.png');\n}\n\na.button.add-user-group::before {\n background-image: url('images/action-icons/guac-user-group-add.png');\n}\n\na.button.add-connection::before {\n background-image: url('images/action-icons/guac-monitor-add.png');\n}\n\na.button.add-connection-group::before {\n background-image: url('images/action-icons/guac-group-add.png');\n}\n"} +{"text": "<mods xmlns=\"http://www.loc.gov/mods/v3\" xmlns:exslt=\"http://exslt.org/common\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xsi:schemaLocation=\"http://www.loc.gov/mods/v3 http://www.loc.gov/standards/mods/v3/mods-3-3.xsd\" version=\"3.3\" ID=\"P0b002ee181565dc0\">\n<name type=\"corporate\">\n <namePart>United States Government Printing Office</namePart>\n <role>\n <roleTerm type=\"text\" authority=\"marcrelator\">printer</roleTerm>\n <roleTerm type=\"code\" authority=\"marcrelator\">prt</roleTerm>\n</role>\n <role>\n <roleTerm type=\"text\" authority=\"marcrelator\">distributor</roleTerm>\n <roleTerm type=\"code\" authority=\"marcrelator\">dst</roleTerm>\n</role>\n</name>\n<name type=\"corporate\">\n <namePart>United States</namePart>\n <namePart>United States District Court Northern District of Ohio</namePart>\n <role>\n <roleTerm type=\"text\" authority=\"marcrelator\">author</roleTerm>\n <roleTerm type=\"code\" authority=\"marcrelator\">aut</roleTerm>\n</role>\n <description>Government Organization</description>\n</name>\n<typeOfResource>text</typeOfResource>\n<genre authority=\"marcgt\">government publication</genre>\n<language>\n <languageTerm authority=\"iso639-2b\" type=\"code\">eng</languageTerm>\n</language>\n<extension>\n <collectionCode>USCOURTS</collectionCode>\n <category>Judicial Publications</category>\n <branch>judicial</branch>\n <dateIngested>2012-01-03</dateIngested>\n</extension>\n<originInfo>\n <publisher>Administrative Office of the United States Courts</publisher>\n <dateIssued encoding=\"w3cdtf\">2010-01-15</dateIssued>\n <issuance>monographic</issuance>\n</originInfo>\n<physicalDescription>\n <note type=\"source content type\">deposited</note>\n <digitalOrigin>born digital</digitalOrigin>\n</physicalDescription>\n<classification authority=\"sudocs\">JU 4.15</classification>\n<identifier type=\"uri\">http://www.gpo.gov/fdsys/pkg/USCOURTS-ohnd-5_09-cv-02718</identifier>\n<identifier type=\"local\">P0b002ee181565dc0</identifier>\n<recordInfo>\n <recordContentSource authority=\"marcorg\">DGPO</recordContentSource>\n <recordCreationDate encoding=\"w3cdtf\">2012-01-03</recordCreationDate>\n <recordChangeDate encoding=\"w3cdtf\">2012-01-03</recordChangeDate>\n <recordIdentifier source=\"DGPO\">USCOURTS-ohnd-5_09-cv-02718</recordIdentifier>\n <recordOrigin>machine generated</recordOrigin>\n <languageOfCataloging>\n <languageTerm authority=\"iso639-2b\" type=\"code\">eng</languageTerm>\n</languageOfCataloging>\n</recordInfo>\n<accessCondition type=\"GPO scope determination\">fdlp</accessCondition>\n<extension>\n <docClass>USCOURTS</docClass>\n <accessId>USCOURTS-ohnd-5_09-cv-02718</accessId>\n <courtType>District</courtType>\n <courtCode>ohnd</courtCode>\n <courtCircuit>6th</courtCircuit>\n <courtState>Ohio</courtState>\n <courtSortOrder>2392</courtSortOrder>\n <caseNumber>5:09-cv-02718</caseNumber>\n <caseOffice>Akron</caseOffice>\n <caseType>civil</caseType>\n <natureSuitCode>530</natureSuitCode>\n <natureSuit>Prisoner Petitions - Habeas Corpus</natureSuit>\n <cause>28:2254 Petition for Writ of Habeas Corpus (State)</cause>\n <party firstName=\"Michelle\" fullName=\"Michelle Miller\" lastName=\"Miller\" role=\"Respondent\"></party>\n <party firstName=\"Barry\" fullName=\"Barry Lynn Thomas\" lastName=\"Thomas\" middleName=\"Lynn\" role=\"Petitioner\"></party>\n</extension>\n<titleInfo>\n <title>Thomas v. Miller</title>\n <partNumber>5:09-cv-02718</partNumber>\n</titleInfo>\n<location>\n <url access=\"object in context\" displayLabel=\"Content Detail\">http://www.gpo.gov/fdsys/pkg/USCOURTS-ohnd-5_09-cv-02718/content-detail.html</url>\n</location>\n<classification authority=\"sudocs\">JU 4.15</classification>\n<identifier type=\"preferred citation\">5:09-cv-02718;09-2718</identifier>\n<name type=\"corporate\">\n <namePart>United States District Court Northern District of Ohio</namePart>\n <namePart>6th Circuit</namePart>\n <namePart>Akron</namePart>\n <affiliation>U.S. Courts</affiliation>\n <role>\n <roleTerm authority=\"marcrelator\" type=\"text\">author</roleTerm>\n <roleTerm authority=\"marcrelator\" type=\"code\">aut</roleTerm>\n</role>\n</name>\n<name type=\"personal\">\n <displayForm>Michelle Miller</displayForm>\n <namePart type=\"family\">Miller</namePart>\n <namePart type=\"given\">Michelle</namePart>\n <namePart type=\"termsOfAddress\"></namePart>\n <description>Respondent</description>\n</name>\n<name type=\"personal\">\n <displayForm>Barry Lynn Thomas</displayForm>\n <namePart type=\"family\">Thomas</namePart>\n <namePart type=\"given\">Barry</namePart>\n <namePart type=\"termsOfAddress\"></namePart>\n <description>Petitioner</description>\n</name>\n<extension>\n <docClass>USCOURTS</docClass>\n <accessId>USCOURTS-ohnd-5_09-cv-02718</accessId>\n <courtType>District</courtType>\n <courtCode>ohnd</courtCode>\n <courtCircuit>6th</courtCircuit>\n <courtState>Ohio</courtState>\n <courtSortOrder>2392</courtSortOrder>\n <caseNumber>5:09-cv-02718</caseNumber>\n <caseOffice>Akron</caseOffice>\n <caseType>civil</caseType>\n <natureSuitCode>530</natureSuitCode>\n <natureSuit>Prisoner Petitions - Habeas Corpus</natureSuit>\n <cause>28:2254 Petition for Writ of Habeas Corpus (State)</cause>\n <party firstName=\"Michelle\" fullName=\"Michelle Miller\" lastName=\"Miller\" role=\"Respondent\"></party>\n <party firstName=\"Barry\" fullName=\"Barry Lynn Thomas\" lastName=\"Thomas\" middleName=\"Lynn\" role=\"Petitioner\"></party>\n <state>Ohio</state>\n</extension>\n<relatedItem type=\"constituent\" ID=\"id-USCOURTS-ohnd-5_09-cv-02718-0\" xlink:href=\"http://www.gpo.gov/fdsys/granule/USCOURTS-ohnd-5_09-cv-02718/USCOURTS-ohnd-5_09-cv-02718-0/mods.xml\">\n <titleInfo>\n <title>Thomas v. Miller</title>\n <subTitle>Memorandum Opinion and Order dismissing this action without prejudice as petitioner has not exhausted state remedies. An appeal from this decision may not be taken in good faith and there is no basis upon which to issue a certificate of appealability. Judge John R. Adams on 1/15/10. (K,C)</subTitle>\n <partNumber>0</partNumber>\n</titleInfo>\n <originInfo>\n <dateIssued>2010-01-15</dateIssued>\n</originInfo>\n <relatedItem xlink:href=\"http://www.gpo.gov/fdsys/pkg/pdf/USCOURTS-ohnd-5_09-cv-02718-0.pdf\" type=\"otherFormat\">\n <identifier type=\"FDsys Unique ID\">D09002ee181649551</identifier>\n</relatedItem>\n <identifier type=\"uri\">http://www.gpo.gov/fdsys/granule/USCOURTS-ohnd-5_09-cv-02718/USCOURTS-ohnd-5_09-cv-02718-0</identifier>\n <identifier type=\"former granule identifier\">ohnd-5_09-cv-02718_0.pdf</identifier>\n <location>\n <url access=\"object in context\" displayLabel=\"Content Detail\">http://www.gpo.gov/fdsys/granule/USCOURTS-ohnd-5_09-cv-02718/USCOURTS-ohnd-5_09-cv-02718-0/content-detail.html</url>\n <url access=\"raw object\" displayLabel=\"PDF rendition\">http://www.gpo.gov/fdsys/pkg/USCOURTS-ohnd-5_09-cv-02718/pdf/USCOURTS-ohnd-5_09-cv-02718-0.pdf</url>\n</location>\n <extension>\n <searchTitle>USCOURTS 5:09-cv-02718; Thomas v. Miller; </searchTitle>\n <courtName>United States District Court Northern District of Ohio</courtName>\n <state>Ohio</state>\n <accessId>USCOURTS-ohnd-5_09-cv-02718-0</accessId>\n <sequenceNumber>0</sequenceNumber>\n <dateIssued>2010-01-15</dateIssued>\n <docketText>Memorandum Opinion and Order dismissing this action without prejudice as petitioner has not exhausted state remedies. An appeal from this decision may not be taken in good faith and there is no basis upon which to issue a certificate of appealability. Judge John R. Adams on 1/15/10. (K,C)</docketText>\n</extension>\n</relatedItem>\n</mods>"} +{"text": "//===- SourceMgr.h - Manager for Source Buffers & Diagnostics ---*- C++ -*-===//\n//\n// The LLVM Compiler Infrastructure\n//\n// This file is distributed under the University of Illinois Open Source\n// License. See LICENSE.TXT for details.\n//\n//===----------------------------------------------------------------------===//\n//\n// This file declares the SMDiagnostic and SourceMgr classes. This\n// provides a simple substrate for diagnostics, #include handling, and other low\n// level things for simple parsers.\n//\n//===----------------------------------------------------------------------===//\n\n#ifndef SUPPORT_SOURCEMGR_H\n#define SUPPORT_SOURCEMGR_H\n\n#include \"llvm/Support/SMLoc.h\"\n#include \"llvm/ADT/ArrayRef.h\"\n#include <string>\n\nnamespace llvm {\n class MemoryBuffer;\n class SourceMgr;\n class SMDiagnostic;\n class Twine;\n class raw_ostream;\n\n/// SourceMgr - This owns the files read by a parser, handles include stacks,\n/// and handles diagnostic wrangling.\nclass SourceMgr {\npublic:\n enum DiagKind {\n DK_Error,\n DK_Warning,\n DK_Note\n };\n \n /// DiagHandlerTy - Clients that want to handle their own diagnostics in a\n /// custom way can register a function pointer+context as a diagnostic\n /// handler. It gets called each time PrintMessage is invoked.\n typedef void (*DiagHandlerTy)(const SMDiagnostic &, void *Context);\nprivate:\n struct SrcBuffer {\n /// Buffer - The memory buffer for the file.\n MemoryBuffer *Buffer;\n\n /// IncludeLoc - This is the location of the parent include, or null if at\n /// the top level.\n SMLoc IncludeLoc;\n };\n\n /// Buffers - This is all of the buffers that we are reading from.\n std::vector<SrcBuffer> Buffers;\n\n // IncludeDirectories - This is the list of directories we should search for\n // include files in.\n std::vector<std::string> IncludeDirectories;\n\n /// LineNoCache - This is a cache for line number queries, its implementation\n /// is really private to SourceMgr.cpp.\n mutable void *LineNoCache;\n\n DiagHandlerTy DiagHandler;\n void *DiagContext;\n \n SourceMgr(const SourceMgr&); // DO NOT IMPLEMENT\n void operator=(const SourceMgr&); // DO NOT IMPLEMENT\npublic:\n SourceMgr() : LineNoCache(0), DiagHandler(0), DiagContext(0) {}\n ~SourceMgr();\n\n void setIncludeDirs(const std::vector<std::string> &Dirs) {\n IncludeDirectories = Dirs;\n }\n\n /// setDiagHandler - Specify a diagnostic handler to be invoked every time\n /// PrintMessage is called. Ctx is passed into the handler when it is invoked.\n void setDiagHandler(DiagHandlerTy DH, void *Ctx = 0) {\n DiagHandler = DH;\n DiagContext = Ctx;\n }\n\n DiagHandlerTy getDiagHandler() const { return DiagHandler; }\n void *getDiagContext() const { return DiagContext; }\n\n const SrcBuffer &getBufferInfo(unsigned i) const {\n assert(i < Buffers.size() && \"Invalid Buffer ID!\");\n return Buffers[i];\n }\n\n const MemoryBuffer *getMemoryBuffer(unsigned i) const {\n assert(i < Buffers.size() && \"Invalid Buffer ID!\");\n return Buffers[i].Buffer;\n }\n\n SMLoc getParentIncludeLoc(unsigned i) const {\n assert(i < Buffers.size() && \"Invalid Buffer ID!\");\n return Buffers[i].IncludeLoc;\n }\n\n /// AddNewSourceBuffer - Add a new source buffer to this source manager. This\n /// takes ownership of the memory buffer.\n unsigned AddNewSourceBuffer(MemoryBuffer *F, SMLoc IncludeLoc) {\n SrcBuffer NB;\n NB.Buffer = F;\n NB.IncludeLoc = IncludeLoc;\n Buffers.push_back(NB);\n return Buffers.size()-1;\n }\n\n /// AddIncludeFile - Search for a file with the specified name in the current\n /// directory or in one of the IncludeDirs. If no file is found, this returns\n /// ~0, otherwise it returns the buffer ID of the stacked file.\n /// The full path to the included file can be found in IncludedFile.\n unsigned AddIncludeFile(const std::string &Filename, SMLoc IncludeLoc,\n std::string &IncludedFile);\n\n /// FindBufferContainingLoc - Return the ID of the buffer containing the\n /// specified location, returning -1 if not found.\n int FindBufferContainingLoc(SMLoc Loc) const;\n\n /// FindLineNumber - Find the line number for the specified location in the\n /// specified file. This is not a fast method.\n unsigned FindLineNumber(SMLoc Loc, int BufferID = -1) const;\n\n /// PrintMessage - Emit a message about the specified location with the\n /// specified string.\n ///\n /// @param ShowColors - Display colored messages if output is a terminal and\n /// the default error handler is used.\n void PrintMessage(SMLoc Loc, DiagKind Kind, const Twine &Msg,\n ArrayRef<SMRange> Ranges = ArrayRef<SMRange>(),\n bool ShowColors = true) const;\n\n\n /// GetMessage - Return an SMDiagnostic at the specified location with the\n /// specified string.\n ///\n /// @param Type - If non-null, the kind of message (e.g., \"error\") which is\n /// prefixed to the message.\n SMDiagnostic GetMessage(SMLoc Loc, DiagKind Kind, const Twine &Msg, \n ArrayRef<SMRange> Ranges = ArrayRef<SMRange>()) const;\n\n /// PrintIncludeStack - Prints the names of included files and the line of the\n /// file they were included from. A diagnostic handler can use this before\n /// printing its custom formatted message.\n ///\n /// @param IncludeLoc - The line of the include.\n /// @param OS the raw_ostream to print on.\n void PrintIncludeStack(SMLoc IncludeLoc, raw_ostream &OS) const;\n};\n\n\n/// SMDiagnostic - Instances of this class encapsulate one diagnostic report,\n/// allowing printing to a raw_ostream as a caret diagnostic.\nclass SMDiagnostic {\n const SourceMgr *SM;\n SMLoc Loc;\n std::string Filename;\n int LineNo, ColumnNo;\n SourceMgr::DiagKind Kind;\n std::string Message, LineContents;\n std::vector<std::pair<unsigned, unsigned> > Ranges;\n\npublic:\n // Null diagnostic.\n SMDiagnostic()\n : SM(0), LineNo(0), ColumnNo(0), Kind(SourceMgr::DK_Error) {}\n // Diagnostic with no location (e.g. file not found, command line arg error).\n SMDiagnostic(const std::string &filename, SourceMgr::DiagKind Kind,\n const std::string &Msg)\n : SM(0), Filename(filename), LineNo(-1), ColumnNo(-1), Kind(Kind),\n Message(Msg) {}\n \n // Diagnostic with a location.\n SMDiagnostic(const SourceMgr &sm, SMLoc L, const std::string &FN,\n int Line, int Col, SourceMgr::DiagKind Kind,\n const std::string &Msg, const std::string &LineStr,\n ArrayRef<std::pair<unsigned,unsigned> > Ranges);\n\n const SourceMgr *getSourceMgr() const { return SM; }\n SMLoc getLoc() const { return Loc; }\n const std::string &getFilename() const { return Filename; }\n int getLineNo() const { return LineNo; }\n int getColumnNo() const { return ColumnNo; }\n SourceMgr::DiagKind getKind() const { return Kind; }\n const std::string &getMessage() const { return Message; }\n const std::string &getLineContents() const { return LineContents; }\n const std::vector<std::pair<unsigned, unsigned> > &getRanges() const {\n return Ranges;\n }\n void print(const char *ProgName, raw_ostream &S, bool ShowColors = true) const;\n};\n\n} // end llvm namespace\n\n#endif\n"} +{"text": "\n// (C) Copyright Edward Diener 2011-2015\n// Use, modification and distribution are subject to the Boost Software License,\n// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at\n// http://www.boost.org/LICENSE_1_0.txt).\n\n#if !defined(BOOST_VMD_DETAIL_DATA_EQUAL_12_HPP)\n#define BOOST_VMD_DETAIL_DATA_EQUAL_12_HPP\n\n#include <boost/vmd/detail/recurse/data_equal/data_equal_headers.hpp>\n\n#define BOOST_VMD_DETAIL_DATA_EQUAL_12_OP_TEQ_CMP_PARENS(d,em1,em2) \\\n BOOST_VMD_IDENTITY_RESULT \\\n ( \\\n BOOST_PP_IIF \\\n ( \\\n BOOST_VMD_DETAIL_DATA_EQUAL_IS_BOTH_COMPOSITE(em1,em2), \\\n BOOST_VMD_IDENTITY(2), \\\n BOOST_VMD_DETAIL_EQUAL_SIMPLE_D \\\n ) \\\n (d,em1,em2) \\\n ) \\\n/**/\n\n#define BOOST_VMD_DETAIL_DATA_EQUAL_12_OP_TEQ_CMP_PARENS_D(d,em1,em2) \\\n BOOST_VMD_IDENTITY_RESULT \\\n ( \\\n BOOST_PP_IIF \\\n ( \\\n BOOST_VMD_DETAIL_DATA_EQUAL_IS_BOTH_COMPOSITE(em1,em2), \\\n BOOST_VMD_IDENTITY(2), \\\n BOOST_VMD_DETAIL_EQUAL_SIMPLE_D \\\n ) \\\n (d,em1,em2) \\\n ) \\\n/**/\n\n#define BOOST_VMD_DETAIL_DATA_EQUAL_12_OP_TEQ_CMP(d,state,em1,em2) \\\n BOOST_PP_IIF \\\n ( \\\n BOOST_VMD_DETAIL_DATA_EQUAL_STATE_COMP_PROCESSING(d,state), \\\n BOOST_VMD_DETAIL_EQUAL_SIMPLE_D, \\\n BOOST_VMD_DETAIL_DATA_EQUAL_12_OP_TEQ_CMP_PARENS \\\n ) \\\n (d,em1,em2) \\\n/**/\n\n#define BOOST_VMD_DETAIL_DATA_EQUAL_12_OP_TEQ_CMP_D(d,state,em1,em2) \\\n BOOST_PP_IIF \\\n ( \\\n BOOST_VMD_DETAIL_DATA_EQUAL_STATE_COMP_PROCESSING(d,state), \\\n BOOST_VMD_DETAIL_EQUAL_SIMPLE_D, \\\n BOOST_VMD_DETAIL_DATA_EQUAL_12_OP_TEQ_CMP_PARENS_D \\\n ) \\\n (d,em1,em2) \\\n/**/\n\n#define BOOST_VMD_DETAIL_DATA_EQUAL_12_OP_TEQ(d,state) \\\n BOOST_VMD_DETAIL_DATA_EQUAL_12_OP_TEQ_CMP \\\n ( \\\n d, \\\n state, \\\n BOOST_VMD_DETAIL_DATA_EQUAL_STATE_GET_FIRST_ELEMENT(d,state), \\\n BOOST_VMD_DETAIL_DATA_EQUAL_STATE_GET_SECOND_ELEMENT(d,state) \\\n ) \\\n/**/\n\n#define BOOST_VMD_DETAIL_DATA_EQUAL_12_OP_TEQ_D(d,state) \\\n BOOST_VMD_DETAIL_DATA_EQUAL_12_OP_TEQ_CMP_D \\\n ( \\\n d, \\\n state, \\\n BOOST_VMD_DETAIL_DATA_EQUAL_STATE_GET_FIRST_ELEMENT(d,state), \\\n BOOST_VMD_DETAIL_DATA_EQUAL_STATE_GET_SECOND_ELEMENT(d,state) \\\n ) \\\n/**/\n\n#define BOOST_VMD_DETAIL_DATA_EQUAL_12_OP(d,state) \\\n BOOST_VMD_DETAIL_DATA_EQUAL_OP_RESULT \\\n ( \\\n d, \\\n state, \\\n BOOST_VMD_DETAIL_DATA_EQUAL_12_OP_TEQ(d,state) \\\n ) \\\n/**/\n\n#define BOOST_VMD_DETAIL_DATA_EQUAL_12_OP_D(d,state) \\\n BOOST_VMD_DETAIL_DATA_EQUAL_OP_RESULT \\\n ( \\\n d, \\\n state, \\\n BOOST_VMD_DETAIL_DATA_EQUAL_12_OP_TEQ_D(d,state) \\\n ) \\\n/**/\n\n#define BOOST_VMD_DETAIL_DATA_EQUAL_12_LOOP(dataf,datas,sz,vtype) \\\n BOOST_PP_TUPLE_ELEM \\\n ( \\\n 0, \\\n BOOST_PP_WHILE \\\n ( \\\n BOOST_VMD_DETAIL_DATA_EQUAL_PRED, \\\n BOOST_VMD_DETAIL_DATA_EQUAL_12_OP, \\\n ( \\\n 1, \\\n dataf, \\\n datas, \\\n sz, \\\n vtype, \\\n 0, \\\n ) \\\n ) \\\n ) \\\n/**/\n\n#define BOOST_VMD_DETAIL_DATA_EQUAL_12_LOOP_D(d,dataf,datas,sz,vtype) \\\n BOOST_PP_TUPLE_ELEM \\\n ( \\\n 0, \\\n BOOST_PP_WHILE_ ## d \\\n ( \\\n BOOST_VMD_DETAIL_DATA_EQUAL_PRED, \\\n BOOST_VMD_DETAIL_DATA_EQUAL_12_OP_D, \\\n ( \\\n 1, \\\n dataf, \\\n datas, \\\n sz, \\\n vtype, \\\n 0, \\\n ) \\\n ) \\\n ) \\\n/**/\n\n#define BOOST_VMD_DETAIL_DATA_EQUAL_12_SZ(dataf,datas,szf,szs,vtype) \\\n BOOST_VMD_IDENTITY_RESULT \\\n ( \\\n BOOST_PP_IIF \\\n ( \\\n BOOST_PP_EQUAL(szf,szs), \\\n BOOST_VMD_DETAIL_DATA_EQUAL_12_LOOP, \\\n BOOST_VMD_IDENTITY(0) \\\n ) \\\n (dataf,datas,szf,vtype) \\\n ) \\\n/**/\n\n#define BOOST_VMD_DETAIL_DATA_EQUAL_12_SZ_D(d,dataf,datas,szf,szs,vtype) \\\n BOOST_VMD_IDENTITY_RESULT \\\n ( \\\n BOOST_PP_IIF \\\n ( \\\n BOOST_PP_EQUAL_D(d,szf,szs), \\\n BOOST_VMD_DETAIL_DATA_EQUAL_12_LOOP_D, \\\n BOOST_VMD_IDENTITY(0) \\\n ) \\\n (d,dataf,datas,szf,vtype) \\\n ) \\\n/**/\n\n#define BOOST_VMD_DETAIL_DATA_EQUAL_12(dataf,datas,vtype) \\\n BOOST_VMD_DETAIL_DATA_EQUAL_12_SZ \\\n ( \\\n dataf, \\\n datas, \\\n BOOST_VMD_DETAIL_DATA_EQUAL_GET_SIZE(dataf,vtype), \\\n BOOST_VMD_DETAIL_DATA_EQUAL_GET_SIZE(datas,vtype), \\\n vtype \\\n ) \\\n/**/\n\n#define BOOST_VMD_DETAIL_DATA_EQUAL_12_D(d,dataf,datas,vtype) \\\n BOOST_VMD_DETAIL_DATA_EQUAL_12_SZ_D \\\n ( \\\n d, \\\n dataf, \\\n datas, \\\n BOOST_VMD_DETAIL_DATA_EQUAL_GET_SIZE_D(d,dataf,vtype), \\\n BOOST_VMD_DETAIL_DATA_EQUAL_GET_SIZE_D(d,datas,vtype), \\\n vtype \\\n ) \\\n/**/\n\n#endif /* BOOST_VMD_DETAIL_DATA_EQUAL_12_HPP */\n"} +{"text": "/*\n Licensed to the Apache Software Foundation (ASF) under one\n or more contributor license agreements. See the NOTICE file\n distributed with this work for additional information\n regarding copyright ownership. The ASF licenses this file\n to you under the Apache License, Version 2.0 (the\n \"License\"); you may not use this file except in compliance\n with the License. You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing,\n software distributed under the License is distributed on an\n \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n KIND, either express or implied. See the License for the\n specific language governing permissions and limitations\n under the License.\n */\n\npackage org.apache.ofbiz.base.util;\n\nimport java.security.KeyStore;\nimport java.security.KeyStoreException;\nimport java.security.cert.Certificate;\nimport java.security.cert.CertificateException;\nimport java.security.cert.X509Certificate;\nimport java.util.Enumeration;\nimport java.util.LinkedList;\nimport java.util.List;\n\nimport javax.net.ssl.X509TrustManager;\n\n/**\n * MultiTrustManager\n */\npublic class MultiTrustManager implements X509TrustManager {\n\n public static final String module = MultiTrustManager.class.getName();\n\n protected List<KeyStore> keystores;\n\n public MultiTrustManager(KeyStore ks) {\n this();\n keystores.add(ks);\n }\n\n public MultiTrustManager() {\n keystores = new LinkedList<KeyStore>();\n }\n\n public void add(KeyStore ks) {\n if (ks != null) {\n keystores.add(ks);\n }\n }\n\n public int getNumberOfKeyStores() {\n return keystores.size();\n }\n\n public void checkClientTrusted(X509Certificate[] certs, String alg) throws CertificateException {\n if (isTrusted(certs)) {\n return;\n }\n if (!\"true\".equals(UtilProperties.getPropertyValue(\"certificate\", \"client.all-trusted\", \"true\"))) {\n throw new CertificateException(\"No trusted certificate found\");\n }\n }\n\n public void checkServerTrusted(X509Certificate[] certs, String alg) throws CertificateException {\n if (isTrusted(certs)) {\n return;\n }\n if (!\"true\".equals(UtilProperties.getPropertyValue(\"certificate\", \"server.all-trusted\", \"true\"))) {\n throw new CertificateException(\"No trusted certificate found\");\n }\n }\n\n public X509Certificate[] getAcceptedIssuers() {\n List<X509Certificate> issuers = new LinkedList<X509Certificate>();\n for (KeyStore store: keystores) {\n try {\n Enumeration<String> e = store.aliases();\n while (e.hasMoreElements()) {\n String alias = e.nextElement();\n Certificate[] chain = store.getCertificateChain(alias);\n if (chain != null) {\n for (Certificate cert: chain) {\n if (cert instanceof X509Certificate) {\n if (Debug.verboseOn())\n Debug.logInfo(\"Read certificate (chain) : \" + ((X509Certificate) cert).getSubjectX500Principal().getName(), module);\n issuers.add((X509Certificate) cert);\n }\n }\n } else {\n Certificate cert = store.getCertificate(alias);\n if (cert != null && cert instanceof X509Certificate) {\n if (Debug.verboseOn())\n Debug.logInfo(\"Read certificate : \" + ((X509Certificate) cert).getSubjectX500Principal().getName(), module);\n issuers.add((X509Certificate) cert);\n }\n }\n }\n } catch (KeyStoreException e) {\n Debug.logError(e, module);\n }\n }\n\n return issuers.toArray(new X509Certificate[issuers.size()]);\n }\n\n protected boolean isTrusted(X509Certificate[] cert) {\n if (cert != null) {\n X509Certificate[] issuers = this.getAcceptedIssuers();\n if (issuers != null) {\n for (X509Certificate issuer: issuers) {\n for (X509Certificate c: cert) {\n if (Debug.verboseOn())\n Debug.logInfo(\"--- Checking cert: \" + issuer.getSubjectX500Principal() + \" vs \" + c.getSubjectX500Principal(), module);\n if (issuer.equals(c)) {\n if (Debug.verboseOn())\n Debug.logInfo(\"--- Found trusted cert: \" + issuer.getSerialNumber().toString(16) + \" : \" + issuer.getSubjectX500Principal(), module);\n return true;\n }\n }\n }\n }\n }\n return false;\n }\n}\n"} +{"text": "/* 7zTypes.h -- Basic types\n2013-11-12 : Igor Pavlov : Public domain */\n\n#ifndef __7Z_TYPES_H\n#define __7Z_TYPES_H\n\n#include <stddef.h>\n\n#ifndef EXTERN_C_BEGIN\n#ifdef __cplusplus\n#define EXTERN_C_BEGIN extern \"C\" {\n#define EXTERN_C_END }\n#else\n#define EXTERN_C_BEGIN\n#define EXTERN_C_END\n#endif\n#endif\n\nEXTERN_C_BEGIN\n\n#define SZ_OK 0\n\n#define SZ_ERROR_DATA 1\n#define SZ_ERROR_MEM 2\n#define SZ_ERROR_CRC 3\n#define SZ_ERROR_UNSUPPORTED 4\n#define SZ_ERROR_PARAM 5\n#define SZ_ERROR_INPUT_EOF 6\n#define SZ_ERROR_OUTPUT_EOF 7\n#define SZ_ERROR_READ 8\n#define SZ_ERROR_WRITE 9\n#define SZ_ERROR_PROGRESS 10\n#define SZ_ERROR_FAIL 11\n#define SZ_ERROR_THREAD 12\n\n#define SZ_ERROR_ARCHIVE 16\n#define SZ_ERROR_NO_ARCHIVE 17\n\ntypedef int SRes;\ntypedef int WRes;\n\n#ifndef RINOK\n#define RINOK(x) { int __result__ = (x); if (__result__ != 0) return __result__; }\n#endif\n\ntypedef unsigned char Byte;\ntypedef short Int16;\ntypedef unsigned short UInt16;\n\n#ifdef _LZMA_UINT32_IS_ULONG\ntypedef long Int32;\ntypedef unsigned long UInt32;\n#else\ntypedef int Int32;\ntypedef unsigned int UInt32;\n#endif\n\n#ifdef _SZ_NO_INT_64\n\n/* define _SZ_NO_INT_64, if your compiler doesn't support 64-bit integers.\n NOTES: Some code will work incorrectly in that case! */\n\ntypedef long Int64;\ntypedef unsigned long UInt64;\n\n#else\n\ntypedef long long int Int64;\ntypedef unsigned long long int UInt64;\n#define UINT64_CONST(n) n ## ULL\n\n#endif\n\n#ifdef _LZMA_NO_SYSTEM_SIZE_T\ntypedef UInt32 SizeT;\n#else\ntypedef size_t SizeT;\n#endif\n\ntypedef int Bool;\n#define True 1\n#define False 0\n\n\n#define MY_FAST_CALL\n\n\n/* The following interfaces use first parameter as pointer to structure */\n\ntypedef struct\n{\n Byte (*Read)(void *p); /* reads one byte, returns 0 in case of EOF or error */\n} IByteIn;\n\ntypedef struct\n{\n void (*Write)(void *p, Byte b);\n} IByteOut;\n\ntypedef struct\n{\n SRes (*Read)(void *p, void *buf, size_t *size);\n /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream.\n (output(*size) < input(*size)) is allowed */\n} ISeqInStream;\n\n/* it can return SZ_ERROR_INPUT_EOF */\nSRes SeqInStream_Read(ISeqInStream *stream, void *buf, size_t size);\nSRes SeqInStream_Read2(ISeqInStream *stream, void *buf, size_t size, SRes errorType);\nSRes SeqInStream_ReadByte(ISeqInStream *stream, Byte *buf);\n\ntypedef struct\n{\n size_t (*Write)(void *p, const void *buf, size_t size);\n /* Returns: result - the number of actually written bytes.\n (result < size) means error */\n} ISeqOutStream;\n\ntypedef enum\n{\n SZ_SEEK_SET = 0,\n SZ_SEEK_CUR = 1,\n SZ_SEEK_END = 2\n} ESzSeek;\n\ntypedef struct\n{\n SRes (*Read)(void *p, void *buf, size_t *size); /* same as ISeqInStream::Read */\n SRes (*Seek)(void *p, Int64 *pos, ESzSeek origin);\n} ISeekInStream;\n\ntypedef struct\n{\n SRes (*Look)(void *p, const void **buf, size_t *size);\n /* if (input(*size) != 0 && output(*size) == 0) means end_of_stream.\n (output(*size) > input(*size)) is not allowed\n (output(*size) < input(*size)) is allowed */\n SRes (*Skip)(void *p, size_t offset);\n /* offset must be <= output(*size) of Look */\n\n SRes (*Read)(void *p, void *buf, size_t *size);\n /* reads directly (without buffer). It's same as ISeqInStream::Read */\n SRes (*Seek)(void *p, Int64 *pos, ESzSeek origin);\n} ILookInStream;\n\nSRes LookInStream_LookRead(ILookInStream *stream, void *buf, size_t *size);\nSRes LookInStream_SeekTo(ILookInStream *stream, UInt64 offset);\n\n/* reads via ILookInStream::Read */\nSRes LookInStream_Read2(ILookInStream *stream, void *buf, size_t size, SRes errorType);\nSRes LookInStream_Read(ILookInStream *stream, void *buf, size_t size);\n\n#define LookToRead_BUF_SIZE (1 << 14)\n\ntypedef struct\n{\n ILookInStream s;\n ISeekInStream *realStream;\n size_t pos;\n size_t size;\n Byte buf[LookToRead_BUF_SIZE];\n} CLookToRead;\n\nvoid LookToRead_CreateVTable(CLookToRead *p, int lookahead);\nvoid LookToRead_Init(CLookToRead *p);\n\ntypedef struct\n{\n ISeqInStream s;\n ILookInStream *realStream;\n} CSecToLook;\n\nvoid SecToLook_CreateVTable(CSecToLook *p);\n\ntypedef struct\n{\n ISeqInStream s;\n ILookInStream *realStream;\n} CSecToRead;\n\nvoid SecToRead_CreateVTable(CSecToRead *p);\n\ntypedef struct\n{\n SRes (*Progress)(void *p, UInt64 inSize, UInt64 outSize);\n /* Returns: result. (result != SZ_OK) means break.\n Value (UInt64)(Int64)-1 for size means unknown value. */\n} ICompressProgress;\n\ntypedef struct\n{\n void *(*Alloc)(void *p, size_t size);\n void (*Free)(void *p, void *address); /* address can be 0 */\n} ISzAlloc;\n\n#define IAlloc_Alloc(p, size) (p)->Alloc((p), size)\n#define IAlloc_Free(p, a) (p)->Free((p), a)\n\n#define CHAR_PATH_SEPARATOR '/'\n#define WCHAR_PATH_SEPARATOR L'/'\n#define STRING_PATH_SEPARATOR \"/\"\n#define WSTRING_PATH_SEPARATOR L\"/\"\n\nEXTERN_C_END\n\n#endif\n"} +{"text": "/*-\n * Copyright (c) 2010-2015 Varnish Software AS\n * All rights reserved.\n *\n * Author: Poul-Henning Kamp <phk@FreeBSD.org>\n *\n * SPDX-License-Identifier: BSD-2-Clause\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE\n * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n * SUCH DAMAGE.\n *\n */\n\n#include \"config.h\"\n\n#include <ctype.h>\n#include <string.h>\n#include <stdlib.h>\n#include <sys/socket.h>\n\n#include <netdb.h>\n\n#include \"cache/cache.h\"\n\n#include \"vnum.h\"\n#include \"vsa.h\"\n#include \"vss.h\"\n#include \"vtim.h\"\n#include \"vcc_std_if.h\"\n\n/*\n * technically, as our VCL_INT is int64_t, its limits are INT64_MIN/INT64_MAX.\n *\n * Yet, for conversions, we use VNUMpfx with a double intermediate, so above\n * 2^53 we see rounding errors. In order to catch a potential floor rounding\n * error, we make our limit 2^53-1\n *\n * Ref: https://stackoverflow.com/a/1848762\n */\n#define VCL_INT_MAX ((INT64_C(1)<<53)-1)\n#define VCL_INT_MIN (-VCL_INT_MAX)\n\n#define VCL_BYTES_MAX VCL_INT_MAX\n\nstatic\nint onearg(VRT_CTX, const char *f, int nargs)\n{\n\tif (nargs == 1)\n\t\treturn (1);\n\tVRT_fail(ctx, \"std.%s: %s arguments\", f,\n\t nargs > 1 ? \"too many\" : \"not enough\");\n\treturn (0);\n}\n\n/*\n * not handling real arg isfinite() / nan() : caller error\n * always trunc, never round\n */\n\nVCL_DURATION v_matchproto_(td_std_duration)\nvmod_duration(VRT_CTX, struct VARGS(duration) *a)\n{\n\tdouble r;\n\tint nargs;\n\n\tCHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);\n\n\tnargs = a->valid_s + a->valid_real + a->valid_integer;\n\n\tif (!onearg(ctx, \"duration\", nargs))\n\t\treturn (0);\n\n\tif (a->valid_real)\n\t\treturn ((VCL_DURATION)a->real);\n\n\tif (a->valid_integer)\n\t\treturn ((VCL_DURATION)a->integer);\n\n\tif (a->valid_s) {\n\t\tr = VNUM_duration(a->s);\n\t\tif (!isnan(r))\n\t\t\treturn (r);\n\t}\n\n\tif (a->valid_fallback)\n\t\treturn (a->fallback);\n\n\tVRT_fail(ctx, \"std.duration: conversion failed\");\n\treturn (0);\n}\n\nVCL_BYTES v_matchproto_(td_std_bytes)\nvmod_bytes(VRT_CTX, struct VARGS(bytes) *a)\n{\n\tuintmax_t r;\n\tVCL_REAL rr;\n\tint nargs;\n\n\tCHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);\n\n\tnargs = a->valid_s + a->valid_real + a->valid_integer;\n\n\tif (!onearg(ctx, \"bytes\", nargs))\n\t\treturn (0);\n\n\tif (a->valid_s &&\n\t VNUM_2bytes(a->s, &r, 0) == NULL &&\n\t r <= VCL_BYTES_MAX)\n\t\treturn((VCL_BYTES)r);\n\n\tif (a->valid_real && !isnan(a->real) && a->real >= 0) {\n\t\trr = trunc(a->real);\n\t\tif (rr <= (VCL_REAL)VCL_BYTES_MAX)\n\t\t\treturn((VCL_BYTES)rr);\n\t}\n\n\tif (a->valid_integer && a->integer >= 0)\n\t\treturn((VCL_BYTES)a->integer);\n\n\tif (a->valid_fallback)\n\t\treturn (a->fallback);\n\n\tVRT_fail(ctx, \"std.bytes: conversion failed\");\n\treturn (0);\n}\n\nVCL_INT v_matchproto_(td_std_integer)\nvmod_integer(VRT_CTX, struct VARGS(integer) *a)\n{\n\tconst char *e;\n\tdouble r;\n\tint nargs;\n\n\tCHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);\n\n\tnargs = a->valid_s + a->valid_bool + a->valid_bytes +\n\t a->valid_duration + a->valid_real + a->valid_time;\n\n\tif (!onearg(ctx, \"integer\", nargs))\n\t\treturn (0);\n\n\tr = NAN;\n\tif (a->valid_bool)\n\t\treturn (a->bool ? 1 : 0);\n\n\tif (a->valid_bytes)\n\t\treturn (a->bytes);\n\n\tif (a->valid_s && a->s != NULL) {\n\t\tr = VNUMpfx(a->s, &e);\n\t\tif (e != NULL)\n\t\t\tr = NAN;\n\t}\n\n\tif (a->valid_duration)\n\t\tr = a->duration;\n\n\tif (a->valid_real)\n\t\tr = a->real;\n\n\tif (a->valid_time)\n\t\tr = a->time;\n\n\tif (!isnan(r)) {\n\t\tr = trunc(r);\n\t\tif (r >= VCL_INT_MIN && r <= VCL_INT_MAX)\n\t\t\treturn ((VCL_INT)r);\n\t}\n\n\tif (a->valid_fallback)\n\t\treturn (a->fallback);\n\n\tVRT_fail(ctx, \"std.integer: conversion failed\");\n\treturn (0);\n}\n\nVCL_IP\nvmod_ip(VRT_CTX, struct VARGS(ip) *a)\n{\n\tuintptr_t sn;\n\tvoid *p;\n\tVCL_IP retval = NULL;\n\n\tCHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);\n\tif (a->valid_fallback)\n\t\tassert(VSA_Sane(a->fallback));\n\n\tsn = WS_Snapshot(ctx->ws);\n\tp = WS_Alloc(ctx->ws, vsa_suckaddr_len);\n\tif (p == NULL) {\n\t\tVRT_fail(ctx, \"std.ip: insufficient workspace\");\n\t\treturn (NULL);\n\t}\n\n\tif (a->s != NULL)\n\t\tretval = VSS_ResolveFirst(\n\t\t p, a->s, a->valid_p ? a->p : \"80\",\n\t\t AF_UNSPEC, SOCK_STREAM,\n\t\t a->resolve ? 0 : AI_NUMERICHOST|AI_NUMERICSERV);\n\n\tif (retval != NULL)\n\t\treturn (retval);\n\n\tWS_Reset(ctx->ws, sn);\n\n\tif (a->valid_fallback)\n\t\treturn (a->fallback);\n\n\tVRT_fail(ctx, \"std.ip: conversion failed\");\n\treturn (NULL);\n}\n\nVCL_REAL v_matchproto_(td_std_real)\nvmod_real(VRT_CTX, struct VARGS(real) *a)\n{\n\tVCL_REAL r;\n\tint nargs;\n\n\tCHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);\n\n\tnargs = a->valid_s + a->valid_integer + a->valid_bool + a->valid_bytes +\n\t a->valid_duration + a->valid_time;\n\n\tif (!onearg(ctx, \"real\", nargs))\n\t\treturn (0);\n\n\tif (a->valid_integer)\n\t\treturn ((VCL_REAL)a->integer);\n\n\tif (a->valid_bool)\n\t\treturn ((VCL_REAL)(a->bool ? 1 : 0));\n\n\tif (a->valid_bytes)\n\t\treturn ((VCL_REAL)a->bytes);\n\n\tif (a->valid_duration)\n\t\treturn ((VCL_REAL)a->duration);\n\n\tif (a->valid_time)\n\t\treturn ((VCL_REAL)a->time);\n\n\tif (a->valid_s && a->s != NULL) {\n\t\tr = VNUM(a->s);\n\t\tif (!isnan(r))\n\t\t\treturn (r);\n\t}\n\n\tif (a->valid_fallback)\n\t\treturn (a->fallback);\n\n\tVRT_fail(ctx, \"std.real: conversion failed\");\n\treturn (0);\n}\n\nVCL_REAL v_matchproto_(td_std_round)\nvmod_round(VRT_CTX, VCL_REAL r)\n{\n\t(void) ctx;\n\treturn (round(r));\n}\n\nVCL_TIME v_matchproto_(td_std_time)\nvmod_time(VRT_CTX, struct VARGS(time)* a)\n{\n\tdouble r;\n\tint nargs;\n\n\tCHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);\n\n\tnargs = a->valid_s + a->valid_real + a->valid_integer;\n\n\tif (!onearg(ctx, \"time\", nargs))\n\t\treturn (0);\n\n\tif (a->valid_integer)\n\t\treturn ((VCL_REAL)a->integer);\n\n\tif (a->valid_real)\n\t\treturn ((VCL_REAL)a->real);\n\n\tif (a->valid_s && a->s != NULL) {\n\t\tr = VTIM_parse(a->s);\n\t\tif (r)\n\t\t\treturn (r);\n\n\t\tr = VNUM(a->s);\n\n\t\tif (!isnan(r) && r > 0)\n\t\t\treturn (r);\n\t}\n\n\tif (a->valid_fallback)\n\t\treturn (a->fallback);\n\n\tVRT_fail(ctx, \"std.time: conversion failed\");\n\treturn (0);\n}\n\n/* These functions are deprecated as of 2019-03-15 release */\n\nVCL_INT v_matchproto_(td_std_real2integer)\nvmod_real2integer(VRT_CTX, VCL_REAL r, VCL_INT i)\n{\n\tCHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);\n\n\tif (!isfinite(r))\n\t\treturn (i);\n\tr = round(r);\n\tif (r > VCL_INT_MAX || r < VCL_INT_MIN)\n\t\treturn(i);\n\treturn ((VCL_INT)r);\n}\n\nVCL_TIME v_matchproto_(td_std_real2time)\nvmod_real2time(VRT_CTX, VCL_REAL r, VCL_TIME t)\n{\n\tCHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);\n\n\tif (!isfinite(r))\n\t\treturn (t);\n\n\treturn (r);\n}\n\nVCL_INT v_matchproto_(td_std_time2integer)\nvmod_time2integer(VRT_CTX, VCL_TIME t, VCL_INT i)\n{\n\tCHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);\n\n\tif (!isfinite(t))\n\t\treturn (i);\n\tt = round(t);\n\tif (t > VCL_INT_MAX || t < VCL_INT_MIN)\n\t\treturn(i);\n\treturn ((VCL_INT)t);\n}\n\nVCL_REAL v_matchproto_(td_std_time2real)\nvmod_time2real(VRT_CTX, VCL_TIME t, VCL_REAL r)\n{\n\tCHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);\n\n\tif (!isfinite(t))\n\t\treturn (r);\n\n\treturn (t);\n}\n\n"} +{"text": "<HTML>\r\n<HEAD>\r\n <META HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=windows-1252\">\r\n</HEAD>\r\n<BODY>\r\n<h3>GSoap related actions</h3>\r\n</BODY>\r\n</HTML>\r\n"} +{"text": "\n<%@ page language=\"java\" contentType=\"text/plain; charset=utf-8\"%>\n<%@ page isELIgnored=\"false\"%>\n<%@ taglib uri=\"http://java.sun.com/jsp/jstl/core\" prefix=\"c\"%>\n<%@ taglib prefix=\"fmt\" uri=\"http://java.sun.com/jsp/jstl/fmt\" %>\n<%@ taglib prefix=\"fn\" uri=\"http://java.sun.com/jsp/jstl/functions\" %>\n<%@ taglib prefix=\"sky\" tagdir=\"/tags\"%>\n<fmt:setLocale value=\"zh_CN\"/>\n<c:set var=\"ignoreListAccessControl\" value=\"${true}\"/>\n\n\n<c:if test=\"${not empty trainingCourseType}\">\n<div class=\"col-xs-12 col-md-12 section\">\n\t<b title=\"A TrainingCourseType\"> \n\t\t${userContext.localeMap['training_course_type']}${userContext.localeMap['@word_space']}${userContext.localeMap['@summary']}\n\t\t</b>\n\t\t\n\t\t\n\t<div class=\"btn-group\" role=\"group\" aria-label=\"Button group with nested dropdown\">\t\t\n\t<c:forEach var=\"action\" items=\"${result.actionList}\">\n\t\t<c:if test=\"${'main' eq action.actionGroup}\">\n\t\t\n\t\t\n\t\t<a class=\"btn btn-${action.actionLevel} btn-sm\" href=\"${action.managerBeanName}/${action.actionPath}\">${userContext.localeMap[action.localeKey]}</a>\n\t\t\n\t\t\n\t\t</c:if>\n\t</c:forEach>\n\t</div><!--end of div class=\"btn-group\" -->\n\t\n\t<hr/>\n\t<div>\n\t\n\t\n\t<div class=\"col-xs-12 col-md-3 summary-section\">\n<span class=\"summary-label\">${userContext.localeMap['training_course_type.id']}</span>\n<span >${result.id}</span>\n</div>\n<div class=\"col-xs-12 col-md-3 summary-section\">\n<span class=\"summary-label\">${userContext.localeMap['training_course_type.code']}</span>\n<span >${result.code}</span>\n</div>\n<div class=\"col-xs-12 col-md-3 summary-section\">\n<span class=\"summary-label\">${userContext.localeMap['training_course_type.name']}</span>\n<span >${result.name}</span>\n</div>\n<div class=\"col-xs-12 col-md-3 summary-section\">\n<span class=\"summary-label\">${userContext.localeMap['training_course_type.description']}</span>\n<span >${result.description}</span>\n</div>\n\n\t</div>\n\t\n</div>\n\n</c:if>\n\n\n\n\n"} +{"text": "TEST_NAMESPACE = operator-test\nRUN_NAMESPACE = metal3\nGO_TEST_FLAGS = $(VERBOSE)\nDEBUG = --debug\nSETUP = --no-setup\nCODE_DIRS = ./cmd ./pkg ./version\nPACKAGES = $(foreach dir,$(CODE_DIRS),$(dir)/...)\nCOVER_PROFILE = cover.out\n\n# Directories.\nTOOLS_DIR := tools\nTOOLS_BIN_DIR := $(TOOLS_DIR)/bin\nKUSTOMIZE := $(TOOLS_BIN_DIR)/kustomize\nBIN_DIR := bin\n\n# See pkg/version.go for details\nSOURCE_GIT_COMMIT ?= $(shell git rev-parse --verify 'HEAD^{commit}')\nBUILD_VERSION ?= $(shell git describe --always --abbrev=40 --dirty)\nexport LDFLAGS=\"-X github.com/metal3-io/baremetal-operator/pkg/version.Raw=${BUILD_VERSION} -X github.com/metal3-io/baremetal-operator/pkg/version.Commit=${SOURCE_GIT_COMMIT}\"\n\n# Set some variables the operator expects to have in order to work\n# Those need to be the same as in deploy/ironic_ci.env\nexport OPERATOR_NAME=baremetal-operator\nexport DEPLOY_KERNEL_URL=http://172.22.0.1:6180/images/ironic-python-agent.kernel\nexport DEPLOY_RAMDISK_URL=http://172.22.0.1:6180/images/ironic-python-agent.initramfs\nexport IRONIC_ENDPOINT=http://localhost:6385/v1/\nexport IRONIC_INSPECTOR_ENDPOINT=http://localhost:5050/v1/\nexport GO111MODULE=on\nexport GOFLAGS=\n\n.PHONY: help\nhelp: ## Display this help\n\t@awk 'BEGIN {FS = \":.*##\"; printf \"\\nUsage:\\n make \\033[36m<target>\\033[0m\\n\"} /^[a-zA-Z_-]+:.*?##/ { printf \" \\033[36m%-15s\\033[0m %s\\n\", $$1, $$2 } /^##@/ { printf \"\\n\\033[1m%s\\033[0m\\n\", substr($$0, 5) } ' $(MAKEFILE_LIST)\n\t@echo\n\t@echo \"Variables:\"\n\t@echo \" TEST_NAMESPACE -- project name to use ($(TEST_NAMESPACE))\"\n\t@echo \" SETUP -- controls the --no-setup flag ($(SETUP))\"\n\t@echo \" GO_TEST_FLAGS -- flags to pass to --go-test-flags ($(GO_TEST_FLAGS))\"\n\t@echo \" DEBUG -- debug flag, if any ($(DEBUG))\"\n\n.PHONY: $(KUSTOMIZE)\n$(KUSTOMIZE):\n\tcd $(TOOLS_DIR); ./install_kustomize.sh\n\n.PHONY: test\ntest: fmt generate lint vet unit ## Run common developer tests\n\n.PHONY: show_packages show_dirs\nshow_packages:\n\t@echo $(PACKAGES)\nshow_dirs:\n\t@echo $(CODE_DIRS)\n\n.PHONY: generate\ngenerate: bin/operator-sdk ## Run the operator-sdk code generator\n\t./bin/operator-sdk generate $(VERBOSE) k8s\n\t./bin/operator-sdk generate $(VERBOSE) crds --crd-version=v1\n\topenapi-gen \\\n\t\t--input-dirs ./pkg/apis/metal3/v1alpha1 \\\n\t\t--output-package ./pkg/apis/metal3/v1alpha1 \\\n\t\t--output-base \"\" \\\n\t\t--output-file-base zz_generated.openapi \\\n\t\t--report-filename \"-\" \\\n\t\t--go-header-file /dev/null\n\nbin/operator-sdk: bin\n\tmake -C tools/operator-sdk install\n\nbin:\n\tmkdir -p bin\n\n.PHONY: travis\ntravis: unit-verbose lint\n\n.PHONY: unit\nunit: ## Run unit tests\n\tgo test $(GO_TEST_FLAGS) $(PACKAGES)\n\n.PHONY: unit-cover\nunit-cover: ## Run unit tests with code coverage\n\tgo test -coverprofile=$(COVER_PROFILE) $(GO_TEST_FLAGS) $(PACKAGES)\n\tgo tool cover -func=$(COVER_PROFILE)\n\n.PHONY: unit-cover-html\nunit-cover-html:\n\tgo test -coverprofile=cover.out $(GO_TEST_FLAGS) $(PACKAGES)\n\tgo tool cover -html=cover.out\n\n.PHONY: unit-verbose\nunit-verbose: ## Run unit tests with verbose output\n\tVERBOSE=-v make unit\n\n.PHONY: linters\nlinters: sec lint generate-check fmt-check vet ## Run all linters\n\n.PHONY: vet\nvet: ## Run go vet\n\tgo vet $(PACKAGES)\n\n.PHONY: lint\nlint: golint-binary ## Run golint\n\tfind $(CODE_DIRS) -type f -name \\*.go |grep -v zz_ | xargs -L1 golint -set_exit_status\n\n.PHONY: generate-check\ngenerate-check:\n\t./hack/generate.sh\n\n.PHONY: generate-check-local\ngenerate-check-local:\n\tIS_CONTAINER=local ./hack/generate.sh\n\n.PHONY: sec\nsec: $(GOPATH)/bin/gosec ## Run gosec\n\tgosec -severity medium --confidence medium -quiet $(PACKAGES)\n\n$(GOPATH)/bin/gosec:\n\tgo get -u github.com/securego/gosec/cmd/gosec\n\n.PHONY: golint-binary\ngolint-binary:\n\twhich golint 2>&1 >/dev/null || $(MAKE) $(GOPATH)/bin/golint\n$(GOPATH)/bin/golint:\n\tgo get -u golang.org/x/lint/golint\n\n.PHONY: fmt\nfmt: ## Run gofmt and write changes to each file\n\tgofmt -l -w $(CODE_DIRS)\n\n.PHONY: fmt-check\nfmt-check: ## Run gofmt and report an error if any changes are made\n\t./hack/gofmt.sh\n\n.PHONY: docs\ndocs: $(patsubst %.dot,%.png,$(wildcard docs/*.dot))\n\n%.png: %.dot\n\tdot -Tpng $< >$@\n\n.PHONY: e2e-local\ne2e-local:\n\toperator-sdk test local ./test/e2e \\\n\t\t--namespace $(TEST_NAMESPACE) \\\n\t\t--up-local $(SETUP) \\\n\t\t$(DEBUG) --go-test-flags \"$(GO_TEST_FLAGS)\"\n\n.PHONY: run\nrun: ## Run the operator outside of a cluster in development mode\n\toperator-sdk run --local \\\n\t\t--go-ldflags=$(LDFLAGS) \\\n\t\t--watch-namespace=$(RUN_NAMESPACE) \\\n\t\t--operator-flags=\"-dev\"\n\n.PHONY: demo\ndemo: ## Run the operator outside of a cluster using the demo driver\n\toperator-sdk run --local \\\n\t\t--go-ldflags=$(LDFLAGS) \\\n\t\t--watch-namespace=$(RUN_NAMESPACE) \\\n\t\t--operator-flags=\"-dev -demo-mode\"\n\n.PHONY: docker\ndocker: docker-operator docker-sdk docker-golint ## Build docker images\n\n.PHONY: docker-operator\ndocker-operator:\n\tdocker build . -f build/Dockerfile\n\n.PHONY: docker-sdk\ndocker-sdk:\n\tdocker build . -f hack/Dockerfile.operator-sdk\n\n.PHONY: docker-golint\ndocker-golint:\n\tdocker build . -f hack/Dockerfile.golint\n\n.PHONY: build\nbuild: ## Build the operator binary\n\t@echo LDFLAGS=$(LDFLAGS)\n\tgo build -ldflags $(LDFLAGS) -o build/_output/bin/baremetal-operator cmd/manager/main.go\n\n.PHONY: tools\ntools:\n\tgo build -o build/_output/bin/get-hardware-details cmd/get-hardware-details/main.go\n\n.PHONY: deploy\ndeploy:\n\tcd deploy && kustomize edit set namespace $(RUN_NAMESPACE) && cd ..\n\tkustomize build deploy | kubectl apply -f -\n\n## --------------------------------------\n## Tilt / Kind\n## --------------------------------------\n\n.PHONY: kind-create\nkind-create: ## create bmo kind cluster if needed\n\t./hack/kind_with_registry.sh\n\n.PHONY: tilt-up\ntilt-up: $(KUSTOMIZE) kind-create ## start tilt and build kind cluster if needed\n\ttilt up\n\n.PHONY: kind-reset\nkind-reset: ## Destroys the \"bmo\" kind cluster.\n\tkind delete cluster --name=bmo || true\n"} +{"text": "{\n \"logs\": [\n {\n \"outputFile\": \"D:\\\\ydong\\\\GitCode\\\\AIUIChatSDK\\\\app\\\\build\\\\intermediates\\\\incremental\\\\mergeDebugResources\\\\merged.dir\\\\values-bg\\\\values-bg.xml\",\n \"map\": [\n {\n \"source\": \"C:\\\\Users\\\\ydong\\\\.gradle\\\\caches\\\\transforms-1\\\\files-1.1\\\\support-compat-28.0.0.aar\\\\e94df6e71dbee7f09f5f2941d0eccc1a\\\\res\\\\values-bg\\\\values-bg.xml\",\n \"from\": {\n \"startLines\": \"2\",\n \"startColumns\": \"4\",\n \"startOffsets\": \"55\",\n \"endColumns\": \"100\",\n \"endOffsets\": \"151\"\n },\n \"to\": {\n \"startLines\": \"30\",\n \"startColumns\": \"4\",\n \"startOffsets\": \"2930\",\n \"endColumns\": \"100\",\n \"endOffsets\": \"3026\"\n }\n },\n {\n \"source\": \"C:\\\\Users\\\\ydong\\\\.gradle\\\\caches\\\\transforms-1\\\\files-1.1\\\\appcompat-v7-28.0.0.aar\\\\38945b61583580485b263bb7803ae66a\\\\res\\\\values-bg\\\\values-bg.xml\",\n \"from\": {\n \"startLines\": \"2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29\",\n \"startColumns\": \"4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4\",\n \"startOffsets\": \"105,220,327,432,518,623,744,823,901,992,1085,1181,1275,1376,1469,1564,1672,1763,1854,1937,2051,2160,2260,2374,2480,2588,2748,2847\",\n \"endColumns\": \"114,106,104,85,104,120,78,77,90,92,95,93,100,92,94,107,90,90,82,113,108,99,113,105,107,159,98,82\",\n \"endOffsets\": \"215,322,427,513,618,739,818,896,987,1080,1176,1270,1371,1464,1559,1667,1758,1849,1932,2046,2155,2255,2369,2475,2583,2743,2842,2925\"\n }\n }\n ]\n }\n ]\n}"} +{"text": "define(['../time/now', './timeout', '../array/append'], function (now, timeout, append) {\n\n /**\n * Ensure a minimum delay for callbacks\n */\n function awaitDelay( callback, delay ){\n var baseTime = now() + delay;\n return function() {\n // ensure all browsers will execute it asynchronously (avoid hard\n // to catch errors) not using \"0\" because of old browsers and also\n // since new browsers increase the value to be at least \"4\"\n // http://www.whatwg.org/specs/web-apps/current-work/multipage/timers.html#dom-windowtimers-settimeout\n var ms = Math.max(baseTime - now(), 4);\n return timeout.apply(this, append([callback, ms, this], arguments));\n };\n }\n\n return awaitDelay;\n\n});\n"} +{"text": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE pkgmetadata SYSTEM \"http://www.gentoo.org/dtd/metadata.dtd\">\n<pkgmetadata>\n\t<maintainer type=\"project\">\n\t\t<email>haskell@gentoo.org</email>\n\t\t<name>Gentoo Haskell</name>\n\t</maintainer>\n\t<longdescription>\n\t\tHaddock is a documentation-generation tool for Haskell\n\t\tlibraries. These modules expose some functionality of it\n\t\twithout pulling in the GHC dependency. Please note that the\n\t\tAPI is likely to change so specify upper bounds in your\n\t\tproject if you can't release often. For interacting with Haddock\n\t\titself, see the <pkg>dev-haskell/haddock</pkg> package.\n\t</longdescription>\n</pkgmetadata>\n"} +{"text": "# ODROID-XU4\n\n## eMMC\n\nThe ODROID XU4 uses the eMMC boot partition to boot from. Typically eMMC readers can't write to this eMMC boot partition. There are a couple of possibilities:\n\n1. **Working** e.g. the eMMC already had a working image before flashing HassOS:\n - It will be booting to U-Boot (but no further).\n - If you have the serial adapter, you should be able to enter `distro_bootcmd` at the uboot prompt to continue booting.\n - If not, flash the HassOS image to an SD card and boot off that temporarily (while the eMMC is also plugged in).\n - Once booted, login at the prompts and then enter `dd if=/dev/mmcblk0 of=/dev/mmcblk0boot0 bs=512 skip=63 seek=62 count=1440` at the linux prompt.\n - Reboot with eMMC (don't forget to flip the boot switch to eMMC)\n2. **Not Working** e.g. a clean/wiped/corruped eMMC boot partition:\n - You'll need to follow [Hardkernel's instructions](https://forum.odroid.com/viewtopic.php?f=53&t=6173) to get a working boot sector. Then flash HassOS and follow instructions above.\n - Alternatively, you can try flash HassOS to both an SD and eMMC, then boot off the SD with the eMMC also plugged in, then run `dd if=/dev/mmcblk1 of=/dev/mmcblk0boot0 bs=512 skip=1 seek=0 count=16381` at the Linux prompt. Note that this is untested, but in theory should work..\n\nIf you are getting permissions issues when using the dd command, try disabling RO:\n`echo 0 > /sys/block/mmcblk0boot0/force_ro`\nto re-enable after running dd:\n`echo 1 > /sys/block/mmcblk0boot0/force_ro`\n\n## Console\n\nBy default, console access is granted over the serial header and over HDMI. Certain startup messages will only appear on the serial console by default. To show the messages on the HDMI console instead, swap the order of the two consoles in the `cmdline.txt` file on the boot partition. You can also delete the SAC2 console if you don't plan on using the serial adapter.\neg. `console=tty1 console=ttySAC2,115200`\n\n## GPIO\n\nRefer to [the odroid wiki](https://wiki.odroid.com/odroid-xu4/hardware/expansion_connectors).\n"} +{"text": "/**\n * Copyright 2011-2015 John Ericksen\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage org.parceler.converter;\n\nimport android.os.Parcel;\nimport org.parceler.TypeRangeParcelConverter;\n\nimport java.util.Collection;\n\n/**\n *\n * @author u61173\n */\npublic abstract class CollectionParcelConverter<T, C extends Collection<T>> implements TypeRangeParcelConverter<Collection<T>, C> {\n\n private static final int NULL = -1;\n\n @Override\n public void toParcel(Collection<T> input, Parcel parcel) {\n if (input == null) {\n parcel.writeInt(NULL);\n } else {\n parcel.writeInt(input.size());\n for (T item : input) {\n itemToParcel(item, parcel);\n }\n }\n }\n\n @Override\n public C fromParcel(Parcel parcel) {\n C list;\n int size = parcel.readInt();\n if (size == NULL) {\n list = null;\n } else {\n list = createCollection();\n for (int i = 0; (i < size); i++) {\n list.add(itemFromParcel(parcel));\n }\n }\n return list;\n }\n\n public abstract void itemToParcel(T input, Parcel parcel);\n public abstract T itemFromParcel(Parcel parcel);\n public abstract C createCollection();\n}"} +{"text": "// Copyright 2001-2019 Crytek GmbH / Crytek Group. All rights reserved.\n\n#pragma once\n\n// -------------------------------------------------------------------------\n// Description: BitMask with templatized max length and either fixed or allocatable storage\n// -------------------------------------------------------------------------\n\n#include <CryCore/BaseTypes.h>\n\nstruct bitmaskPtr\n{\n\tbitmaskPtr() { size = 0; data = 0; refCounted = 0; }\n\t~bitmaskPtr() { setptr(0); }\n\tuint* data;\n\tuint size : 31;\n\tuint refCounted : 1;\n\tuint operator[](int i) const { return data[i]; }\n\tuint& operator[](int i) { return data[i]; }\n\n\tint getsize() const { return size; }\n\tbitmaskPtr& setsize(int newSize)\n\t{\n\t\tif (size != newSize || (refCounted && size > 0 && newSize > 0 && data[-1] > 1))\n\t\t{\n\t\t\tuint* newData = 0;\n\t\t\tif (newSize)\n\t\t\t\tmemcpy(newData = (new uint[newSize + 1]) + 1, data, min(newSize, (int)size) * sizeof(uint));\n\t\t\tsetptr(newData);\n\t\t\tif (newSize)\n\t\t\t\tnewData[-1] = 1, refCounted = 1;\n\t\t}\n\t\tfor (int i = size; i < newSize; i++) data[i] = 0;\n\t\tsize = newSize;\n\t\treturn *this;\n\t}\n\n\tbitmaskPtr& setptr(uint* newData)\n\t{\n\t\tif (data && refCounted)\n\t\t{\n\t\t\tassert((int)data[-1] > 0);\n\t\t\tif (CryInterlockedDecrement((volatile int*)data - 1) == 0)\n\t\t\t\tdelete[] (data - 1);\n\t\t}\n\t\tdata = newData;\n\t\trefCounted = 0;\n\t\treturn *this;\n\t}\n};\n\ntemplate<int MaxSize> struct bitmaskBuf\n{\n\tbitmaskBuf() { size = 0; }\n\tuint data[MaxSize];\n\tint size;\n\tuint operator[](int i) const { return data[i]; }\n\tuint& operator[](int i) { return data[i]; }\n\n\tint getsize() const { return size; }\n\tbitmaskBuf& setsize(int newSize)\n\t{\n\t\tfor (int i = size; i < newSize; i++) data[i] = 0;\n\t\tsize = newSize;\n\t\treturn *this;\n\t}\n};\n\nstruct bitmaskOneBit\n{\n\tbitmaskOneBit() { index = 0; }\n\tuint index;\n\tuint operator[](int i) const { return -iszero(i - ((int)index >> 5)) & 1u << (index & 31); }\n\tint getsize() const { return (index >> 5) + 1; }\n};\n\nILINE int bitsUsed(uint64 x)\n{\n\tif (!x) return 0;\n\tunion\n\t{\n\t\tfloat f;\n\t\tuint i;\n\t} u;\n\tu.f = (float)x;\n\tint nbits = (u.i >> 23) - 127;\n\treturn nbits - (((1LL << nbits) - 1 - (int64)x) >> 63);\n}\n\ntemplate<class Data, int MaxSize> struct bitmask_t\n{\n\tData data;\n\n\tbitmask_t() {}\n\tbitmask_t(uint64 mask) { bmset(data, mask); }\n\tbitmask_t(const bitmask_t& src) { bmref(src.data, data); }\n\tbitmask_t(bitmask_t&& src) { bmcopy(src.data, data); } //!< C++11 constructor from temp rvalue.\n\tbitmask_t& operator=(uint64 mask) { bmset(data, mask); return *this; }\n\tbitmask_t& operator=(const bitmask_t& src) { bmcopy(src.data, data); return *this; }\n\ttemplate<class Data1> bitmask_t(const bitmask_t<Data1, MaxSize>& src) { bmref(src.data, data); }\n\ttemplate<class Data1> bitmask_t(bitmask_t<Data1, MaxSize>&& src) { bmcopy(src.data, data); }\n\ttemplate<class Data1> bitmask_t& operator=(const bitmask_t<Data1, MaxSize>& src) { bmcopy(src.data, data); return *this; }\n\n\tbool operator!() const { int j=0; for (int i = 0; i < data.getsize();) j |= data[i++]; return !j; }\n\tbool operator!=(int) const { return !!*this; } //!< Should only be used to compare with 0.\n\tbitmask_t& operator<<=(int shift) { return *this = *this << shift; }\n\tbitmask_t& operator<<=(uint shift) { return *this = *this << (int)shift; }\n\ttemplate<class Data1> bitmask_t& operator&=(const bitmask_t<Data1, MaxSize>& op) { for (int i = 0; i < data.getsize(); i++) data[i] &= op.data[i]; return *this; }\n\ttemplate<class Data1> bitmask_t& operator|=(const bitmask_t<Data1, MaxSize>& op)\n\t{\n\t\tdata.setsize(max(data.getsize(), op.data.getsize()));\n\t\tfor (int i = 0; i < op.data.getsize(); i++) data[i] |= op.data[i];\n\t\treturn *this;\n\t}\n\tbitmask_t<bitmaskBuf<MaxSize>, MaxSize> operator~() const\n\t{\n\t\tbitmask_t<bitmaskBuf<MaxSize>, MaxSize> res;\n\t\tres.data.setsize(MaxSize);\n\t\tint i;\n\t\tfor (i = 0; i < data.getsize(); i++) res.data[i] = ~data[i];\n\t\tfor (; i < MaxSize; i++) res.data[i] = ~0;\n\t\treturn res;\n\t}\n};\n\ntemplate<class Data> ILINE void bmset(Data& dst, uint64 mask)\n{\n\tint nbits = bitsUsed(mask);\n\tif (!mask) dst.setsize(0);\n\telse if (nbits < 33)\n\t\tdst.setsize(1)[0] = (uint)mask;\n\telse *(uint64*)&dst.setsize(2)[0] = mask;\n}\nILINE void bmset(bitmaskOneBit& dst, uint64 mask) { dst.index = mask == 1 ? 0 : ilog2(mask); }\n\ntemplate<class Data1, class Data2> ILINE void bmcopy(const Data1& src, Data2& dst)\n{\n\tdst.setsize(src.getsize());\n\tfor (int i = 0; i < dst.getsize(); i++)\n\t\tdst[i] = src[i];\n}\nILINE void bmcopy(const bitmaskPtr& src, bitmaskPtr& dst)\n{\n\tif (src.refCounted && src.size)\n\t{\n\t\tdst.setptr(src.data);\n\t\tdst.size = src.size;\n\t\tCryInterlockedIncrement((volatile int*)src.data - 1);\n\t\tdst.refCounted = 1;\n\t}\n\telse\n\t{\n\t\tdst.setsize(src.getsize());\n\t\tfor (int i = 0; i < dst.getsize(); i++)\n\t\t\tdst[i] = src[i];\n\t}\n}\nILINE void bmcopy(const bitmaskOneBit& src, bitmaskOneBit& dst) { dst.index = src.index; }\n\ntemplate<class Data1, class Data2> ILINE void bmref(const Data1& src, Data2& dst) { bmcopy(src, dst); }\ntemplate<int MaxSize> ILINE void bmref(const bitmaskBuf<MaxSize>& src, bitmaskPtr& dst) { dst.setptr((uint*)src.data); dst.size = src.size; }\nILINE void bmref(const bitmaskPtr& src, bitmaskPtr& dst)\n{\n\tif (!src.refCounted)\n\t\tdst.setptr((uint*)src.data), dst.size = src.size;\n\telse bmcopy(src, dst);\n}\n\ntemplate<class Data1, class Data2, int MaxSize> ILINE bitmask_t<bitmaskBuf<MaxSize>, MaxSize> operator&(const bitmask_t<Data1, MaxSize>& op1, const bitmask_t<Data2, MaxSize>& op2)\n{\n\tbitmask_t<bitmaskBuf<MaxSize>, MaxSize> res;\n\tres.data.setsize(min(op1.data.getsize(), op2.data.getsize()));\n\tfor (int i = 0; i < res.data.getsize(); i++)\n\t\tres.data[i] = op1.data[i] & op2.data[i];\n\treturn res;\n}\n\ntemplate<class Data1, class Data2, int MaxSize> ILINE bitmask_t<bitmaskBuf<MaxSize>, MaxSize> operator^(const bitmask_t<Data1, MaxSize>& op1, const bitmask_t<Data2, MaxSize>& op2)\n{\n\tbitmask_t<bitmaskBuf<MaxSize>, MaxSize> res;\n\tres.data.setsize(max(op1.data.getsize(), op2.data.getsize()));\n\tint i;\n\tif (op1.data.getsize() > op2.data.getsize())\n\t\tfor (i = op1.data.getsize() - 1; i >= op2.data.getsize(); i--)\n\t\t\tres.data[i] = op1.data[i];\n\telse\n\t\tfor (i = op2.data.getsize() - 1; i >= op1.data.getsize(); i--)\n\t\t\tres.data[i] = op2.data[i];\n\tfor (; i >= 0; i--)\n\t\tres.data[i] = op1.data[i] ^ op2.data[i];\n\treturn res;\n}\n\ntemplate<class Data1, class Data2, int MaxSize> ILINE bool operator<(const bitmask_t<Data1, MaxSize>& op1, const bitmask_t<Data2, MaxSize>& op2)\n{\n\tint i;\n\tfor (i = op2.data.getsize() - 1; i >= op1.data.getsize(); i--)\n\t\tif (op2.data[i]) return true;\n\tfor (; i >= 0; i--)\n\t\tif (op1.data[i] < op2.data[i]) return true;\n\t\telse if (op1.data[i] > op2.data[i])\n\t\t\treturn false;\n\treturn false;\n}\n\ntemplate<class Data1, class Data2, int MaxSize> ILINE bool operator!=(const bitmask_t<Data1, MaxSize>& op1, const bitmask_t<Data2, MaxSize>& op2)\n{\n\tint i;\n\tfor (i = op2.data.getsize() - 1; i >= op1.data.getsize(); i--)\n\t\tif (op2.data[i]) return true;\n\tfor (i = op1.data.getsize() - 1; i >= op2.data.getsize(); i--)\n\t\tif (op1.data[i]) return true;\n\tfor (; i >= 0; i--)\n\t\tif (op1.data[i] != op2.data[i]) return true;\n\treturn false;\n}\n\ntemplate<class Data, int MaxSize> ILINE bitmask_t<bitmaskBuf<MaxSize>, MaxSize> operator<<(const bitmask_t<Data, MaxSize>& op, int shift)\n{\n\tbitmask_t<bitmaskBuf<MaxSize>, MaxSize> res;\n\tint size = op.data.getsize(), nbits = 0;\n\twhile (size > 0 && !op.data[size - 1])\n\t\tsize--;\n\tnbits = size > 0 ? bitsUsed(op.data[size - 1]) + (size - 1) * 32 : 0;\n\tres.data.setsize(((nbits - 1 + shift) >> 5) + 1);\n\tif (size > 0)\n\t{\n\t\tuint64 top = (uint64)op.data[size - 1] << (shift & 31);\n\t\tres.data[size - 1 + (shift >> 5)] |= (uint)top;\n\t\tif (size + (shift >> 5) < res.data.getsize())\n\t\t\tres.data[size + (shift >> 5)] |= (uint)(top >> 32);\n\t\tfor (int i = size - 2; i >= 0; i--)\n\t\t\t*(uint64*)&res.data[i + (shift >> 5)] |= (uint64)op.data[i] << (shift & 31);\n\t}\n\treturn res;\n}\ntemplate<int MaxSize> bitmask_t<bitmaskOneBit, MaxSize> ILINE operator<<(const bitmask_t<bitmaskOneBit, MaxSize>& op, int shift)\n{\n\tbitmask_t<bitmaskOneBit, MaxSize> res;\n\tres.data.index = op.data.index + shift;\n\treturn res;\n}\ntemplate<class Data, int MaxSize> ILINE bitmask_t<bitmaskBuf<MaxSize>, MaxSize> operator<<(const bitmask_t<Data, MaxSize>& op, uint shift) { return op << (int)shift; }\ntemplate<int MaxSize> ILINE bitmask_t<bitmaskOneBit, MaxSize> operator<<(const bitmask_t<bitmaskOneBit, MaxSize>& op, uint shift) { return op << (int)shift; }\n\ntemplate<class Data, int MaxSize> ILINE bitmask_t<bitmaskBuf<MaxSize>, MaxSize> operator-(const bitmask_t<Data, MaxSize>& op, int sub)\n{\n\tbitmask_t<bitmaskBuf<MaxSize>, MaxSize> res = op;\n\tint i;\n\tfor (i = 0; i < res.data.getsize(); i++)\n\t{\n\t\tuint64 j = (uint64)res.data[i] - sub;\n\t\tres.data[i] = (uint)j;\n\t\tsub = -(int)(j >> 32);\n\t}\n\tif (sub)\n\t\tfor (res.data.setsize(MaxSize); i < MaxSize; i++)\n\t\t\tres.data[i] = ~0u;\n\treturn res;\n}\ntemplate<class Data, int MaxSize> ILINE bitmask_t<bitmaskBuf<MaxSize>, MaxSize> operator-(const bitmask_t<Data, MaxSize>& op, uint sub) { return op - (int)sub; }\ntemplate<class Data, int MaxSize> ILINE bitmask_t<bitmaskBuf<MaxSize>, MaxSize> operator+(const bitmask_t<Data, MaxSize>& op, int add) { return op - (-add); }\n\ntemplate<class Data, int MaxSize> ILINE int ilog2(const bitmask_t<Data, MaxSize>& mask)\n{\n\tint i;\n\tfor (i = mask.data.getsize() - 1; i > 0 && !mask.data[i]; i--)\n\t\t;\n\treturn ilog2(mask.data[i]) + i * 32;\n}\ntemplate<int MaxSize> ILINE int ilog2(const bitmask_t<bitmaskOneBit, MaxSize>& mask) { return mask.data.index; }\n\n//! Assumes radix 16.\ntemplate<int MaxSize> ILINE char* _ui64toa(bitmask_t<bitmaskPtr, MaxSize> mask, char* str, int radix)\n{\n\tint len = mask.data.getsize();\n\tfor (int i = 0; i < len; i++)\n\t{\n\t\tsprintf(str + i * 8, \"%.8x\", mask.data[len - 1 - i]);\n\t}\n\tif (!len)\n\t{\n\t\t*str++ = '0';\n\t}\n\tstr[len * 8] = 0;\n\treturn str;\n}\n\n#if 0 // fallback version\ntypedef uint64 hidemask;\ntypedef uint64 hidemaskLoc;\ntypedef uint64 hidemaskOneBit;\nconst uint64 hidemask1 = 1ul;\n#else\ntypedef bitmask_t<bitmaskPtr, 8> hidemask;\ntypedef bitmask_t<bitmaskBuf<8>, 8> hidemaskLoc;\ntypedef bitmask_t<bitmaskOneBit, 8> hidemaskOneBit;\n\t#define hidemask1 hidemaskOneBit(1)\n#endif\n"} +{"text": "/**\n * This file is part of logisim-evolution.\n *\n * Logisim-evolution is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by the\n * Free Software Foundation, either version 3 of the License, or (at your\n * option) any later version.\n *\n * Logisim-evolution is distributed in the hope that it will be useful, but\n * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY\n * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * for more details.\n *\n * You should have received a copy of the GNU General Public License along \n * with logisim-evolution. If not, see <http://www.gnu.org/licenses/>.\n *\n * Original code by Carl Burch (http://www.cburch.com), 2011.\n * Subsequent modifications by:\n * + College of the Holy Cross\n * http://www.holycross.edu\n * + Haute École Spécialisée Bernoise/Berner Fachhochschule\n * http://www.bfh.ch\n * + Haute École du paysage, d'ingénierie et d'architecture de Genève\n * http://hepia.hesge.ch/\n * + Haute École d'Ingénierie et de Gestion du Canton de Vaud\n * http://www.heig-vd.ch/\n */\n\npackage com.cburch.logisim.circuit;\n\nimport static com.cburch.logisim.circuit.Strings.S;\n\nimport com.cburch.logisim.data.Attribute;\nimport com.cburch.logisim.data.AttributeOption;\nimport com.cburch.logisim.data.Attributes;\nimport com.cburch.logisim.data.BitWidth;\nimport com.cburch.logisim.data.Value;\nimport com.cburch.logisim.util.StringGetter;\n\npublic abstract class RadixOption extends AttributeOption {\n private static class Radix10Signed extends RadixOption {\n private Radix10Signed() {\n super(\"10signed\", S.getter(\"radix10Signed\"));\n }\n\n @Override\n public int getMaxLength(BitWidth width) {\n switch (width.getWidth()) {\n case 2:\n case 3:\n case 4:\n return 2; // 2..8\n case 5:\n case 6:\n case 7:\n return 3; // 16..64\n case 8:\n case 9:\n case 10:\n return 4; // 128..512\n case 11:\n case 12:\n case 13:\n case 14:\n return 5; // 1K..8K\n case 15:\n case 16:\n case 17:\n return 6; // 16K..64K\n case 18:\n case 19:\n case 20:\n return 7; // 128K..512K\n case 21:\n case 22:\n case 23:\n case 24:\n return 8; // 1M..8M\n case 25:\n case 26:\n case 27:\n return 9; // 16M..64M\n case 28:\n case 29:\n case 30:\n return 10; // 128M..512M\n case 31:\n case 32:\n case 33:\n case 34:\n return 11; // 1G..8G\n case 35:\n case 36:\n case 37:\n return 12; // 16G..64G\n case 38:\n case 39:\n case 40:\n return 13; // 128G..512G\n case 41:\n case 42:\n case 43:\n case 44:\n return 14; // 1T..8T\n case 45:\n case 46:\n case 47:\n return 15; // 16T..64T\n case 48:\n case 49:\n case 50:\n return 16; // 128..512T\n case 51:\n case 52:\n case 53:\n case 54:\n return 17; // 1P..8P\n case 55:\n case 56:\n case 57:\n return 18; // 16P..64P\n case 58:\n case 59:\n case 60:\n return 19; // 128P..512P\n case 61:\n case 62:\n case 63:\n case 64:\n return 20; // 1E..4E\n default:\n return 1;\n }\n }\n\n @Override\n public String toString(Value value) {\n return value.toDecimalString(true);\n }\n\n @Override\n public String GetIndexChar() {\n return \"s\";\n }\n }\n\n private static class Radix10Unsigned extends RadixOption {\n private Radix10Unsigned() {\n super(\"10unsigned\", S.getter(\"radix10Unsigned\"));\n }\n\n @Override\n public int getMaxLength(BitWidth width) {\n switch (width.getWidth()) {\n case 4:\n case 5:\n case 6:\n return 2;\n case 7:\n case 8:\n case 9:\n return 3;\n case 10:\n case 11:\n case 12:\n case 13:\n return 4;\n case 14:\n case 15:\n case 16:\n return 5;\n case 17:\n case 18:\n case 19:\n return 6;\n case 20:\n case 21:\n case 22:\n case 23:\n return 7;\n case 24:\n case 25:\n case 26:\n return 8;\n case 27:\n case 28:\n case 29:\n return 9;\n case 30:\n case 31:\n case 32:\n case 33:\n return 10;\n case 34:\n case 35:\n case 36:\n return 11;\n case 37:\n case 38:\n case 39:\n return 12;\n case 40:\n case 41:\n case 42:\n case 43:\n return 13;\n case 44:\n case 45:\n case 46:\n return 14;\n case 47:\n case 48:\n case 49:\n return 15;\n case 50:\n case 51:\n case 52:\n case 53:\n return 16;\n case 54:\n case 55:\n case 56:\n return 17;\n case 57:\n case 58:\n case 59:\n return 18;\n case 60:\n case 61:\n case 62:\n case 63:\n return 19;\n default:\n return 19;\n }\n }\n\n @Override\n public String toString(Value value) {\n return value.toDecimalString(false);\n }\n\n @Override\n public String GetIndexChar() {\n return \"u\";\n }\n }\n\n private static class Radix16 extends RadixOption {\n private Radix16() {\n super(\"16\", S.getter(\"radix16\"));\n }\n\n @Override\n public int getMaxLength(BitWidth width) {\n return Math.max(1, (width.getWidth() + 3) / 4);\n }\n\n @Override\n public String toString(Value value) {\n return value.toDisplayString(16);\n }\n\n @Override\n public String GetIndexChar() {\n return \"h\";\n }\n }\n\n private static class Radix2 extends RadixOption {\n private Radix2() {\n super(\"2\", S.getter(\"radix2\"));\n }\n\n @Override\n public int getMaxLength(BitWidth width) {\n int bits = width.getWidth();\n if (bits <= 1) return 1;\n return bits + ((bits - 1) / 4);\n }\n\n @Override\n public int getMaxLength(Value value) {\n return value.toDisplayString(2).length();\n }\n\n @Override\n public String toString(Value value) {\n return value.toDisplayString(2);\n }\n\n @Override\n public String GetIndexChar() {\n return \"b\";\n }\n }\n\n private static class Radix8 extends RadixOption {\n private Radix8() {\n super(\"8\", S.getter(\"radix8\"));\n }\n\n @Override\n public int getMaxLength(BitWidth width) {\n return Math.max(1, (width.getWidth() + 2) / 3);\n }\n\n @Override\n public int getMaxLength(Value value) {\n return value.toDisplayString(8).length();\n }\n\n @Override\n public String toString(Value value) {\n return value.toDisplayString(8);\n }\n\n @Override\n public String GetIndexChar() {\n return \"o\";\n }\n }\n\n public static RadixOption decode(String value) {\n for (RadixOption opt : OPTIONS) {\n if (value.equals(opt.saveName)) {\n return opt;\n }\n }\n return RADIX_2;\n }\n\n public static final RadixOption RADIX_2 = new Radix2();\n\n public static final RadixOption RADIX_8 = new Radix8();\n\n public static final RadixOption RADIX_10_UNSIGNED = new Radix10Unsigned();\n public static final RadixOption RADIX_10_SIGNED = new Radix10Signed();\n\n public static final RadixOption RADIX_16 = new Radix16();\n\n public static final RadixOption[] OPTIONS = {\n RADIX_2, RADIX_8, RADIX_10_SIGNED, RADIX_10_UNSIGNED, RADIX_16\n };\n\n public static final Attribute<RadixOption> ATTRIBUTE =\n Attributes.forOption(\"radix\", S.getter(\"radixAttr\"), OPTIONS);\n\n private String saveName;\n\n private StringGetter displayGetter;\n\n private RadixOption(String saveName, StringGetter displayGetter) {\n super(saveName, displayGetter);\n this.saveName = saveName;\n this.displayGetter = displayGetter;\n }\n\n public StringGetter getDisplayGetter() {\n return displayGetter;\n }\n\n public abstract int getMaxLength(BitWidth width);\n\n public int getMaxLength(Value value) {\n return getMaxLength(value.getBitWidth());\n }\n\n public String getSaveString() {\n return saveName;\n }\n\n @Override\n public String toDisplayString() {\n return displayGetter.toString();\n }\n\n @Override\n public String toString() {\n return saveName;\n }\n\n public String GetIndexChar() {\n return \"\";\n }\n\n public abstract String toString(Value value);\n}\n"} +{"text": "<template>\n <modal\n name=\"settings-modal\"\n @before-close=\"onBeforeClose\"\n @before-open=\"onBeforeOpen\"\n >\n <div class=\"settings-modal\">\n <settings-header\n :title=\"activeView.displayName\"\n title-suffix=\"Settings\"\n @close=\"onClose\"\n />\n <flex-grid>\n <flex-grid-item margin=\"20px\">\n <settings-list\n :active-view-name=\"activeView.name\"\n :view-list=\"viewList\"\n @change=\"onSettingsListChange\"\n />\n </flex-grid-item>\n <flex-grid-item>\n <settings-date-format\n :date-format=\"dateFormat\"\n :date-format-options=\"dateFormatOptions\"\n :time-format=\"timeFormat\"\n :time-format-options=\"timeFormatOptions\"\n :timezone=\"timezone\"\n :timezone-options=\"timezoneOptions\"\n v-if=\"settingsDateFormatViewActive\"\n @change=\"onSettingsChange\"\n @close=\"onClose\"\n />\n <settings-workflow-history\n :workflow-history-event-highlight-list=\"\n workflowHistoryEventHighlightList\n \"\n :workflow-history-event-highlight-list-enabled=\"\n workflowHistoryEventHighlightListEnabled\n \"\n v-if=\"settingsWorkflowHistoryViewActive\"\n @change=\"onSettingsChange\"\n @close=\"onClose\"\n />\n </flex-grid-item>\n </flex-grid>\n </div>\n </modal>\n</template>\n\n<script>\nimport FlexGrid from '../flex-grid';\nimport FlexGridItem from '../flex-grid-item';\nimport SettingsDateFormat from './components/settings-date-format';\nimport SettingsHeader from './components/settings-header';\nimport SettingsList from './components/settings-list';\nimport SettingsWorkflowHistory from './components/settings-workflow-history';\nimport { SETTINGS_VIEW_LIST } from './constants';\n\nexport default {\n data() {\n return {\n activeView: {},\n viewList: SETTINGS_VIEW_LIST,\n };\n },\n props: {\n dateFormat: {\n type: String,\n },\n dateFormatOptions: {\n type: Array,\n },\n timeFormat: {\n type: String,\n },\n timeFormatOptions: {\n type: Array,\n },\n timezone: {\n type: String,\n },\n timezoneOptions: {\n type: Array,\n },\n workflowHistoryEventHighlightList: {\n type: Array,\n },\n workflowHistoryEventHighlightListEnabled: {\n type: Boolean,\n },\n },\n computed: {\n settingsDateFormatViewActive() {\n return this.activeView.name === 'settings-date-format';\n },\n settingsWorkflowHistoryViewActive() {\n return this.activeView.name === 'settings-workflow-history';\n },\n },\n methods: {\n close() {\n this.$modal.hide('settings-modal');\n },\n onClose() {\n this.close();\n },\n onBeforeClose() {\n this.activeView = {};\n },\n onBeforeOpen() {\n this.activeView = this.viewList[0];\n },\n onSettingsChange(event) {\n this.$emit('change', event);\n this.close();\n },\n onSettingsListChange({ view }) {\n this.activeView = view;\n },\n },\n components: {\n 'flex-grid': FlexGrid,\n 'flex-grid-item': FlexGridItem,\n 'settings-date-format': SettingsDateFormat,\n 'settings-list': SettingsList,\n 'settings-workflow-history': SettingsWorkflowHistory,\n 'settings-header': SettingsHeader,\n },\n};\n</script>\n\n<style lang=\"stylus\">\n.settings-modal {\n .content {\n min-height: 320px;\n min-width: 630px;\n overflow-y: auto;\n }\n\n .content-item {\n margin: 10px 0 15px;\n }\n\n .dropdown-menu {\n min-width: 90px !important;\n }\n\n label {\n display: inline-block;\n margin-bottom: 5px;\n }\n}\n</style>\n"} +{"text": "/**CFile****************************************************************\n\n FileName [dchMan.c]\n\n SystemName [ABC: Logic synthesis and verification system.]\n\n PackageName [Choice computation for tech-mapping.]\n\n Synopsis [Calls to the SAT solver.]\n\n Author [Alan Mishchenko]\n \n Affiliation [UC Berkeley]\n\n Date [Ver. 1.0. Started - June 29, 2008.]\n\n Revision [$Id: dchMan.c,v 1.00 2008/07/29 00:00:00 alanmi Exp $]\n\n***********************************************************************/\n\n#include \"dchInt.h\"\n\nABC_NAMESPACE_IMPL_START\n\n\n////////////////////////////////////////////////////////////////////////\n/// DECLARATIONS ///\n////////////////////////////////////////////////////////////////////////\n\n////////////////////////////////////////////////////////////////////////\n/// FUNCTION DEFINITIONS ///\n////////////////////////////////////////////////////////////////////////\n\n/**Function*************************************************************\n\n Synopsis [Creates the manager.]\n\n Description []\n \n SideEffects []\n\n SeeAlso []\n\n***********************************************************************/\nDch_Man_t * Dch_ManCreate( Aig_Man_t * pAig, Dch_Pars_t * pPars )\n{\n Dch_Man_t * p;\n // create interpolation manager\n p = ABC_ALLOC( Dch_Man_t, 1 );\n memset( p, 0, sizeof(Dch_Man_t) );\n p->pPars = pPars;\n p->pAigTotal = pAig; //Dch_DeriveTotalAig( vAigs );\n Aig_ManFanoutStart( p->pAigTotal );\n // SAT solving\n p->nSatVars = 1;\n p->pSatVars = ABC_CALLOC( int, Aig_ManObjNumMax(p->pAigTotal) );\n p->vUsedNodes = Vec_PtrAlloc( 1000 );\n p->vFanins = Vec_PtrAlloc( 100 );\n p->vSimRoots = Vec_PtrAlloc( 1000 );\n p->vSimClasses = Vec_PtrAlloc( 1000 );\n // equivalences proved\n p->pReprsProved = ABC_CALLOC( Aig_Obj_t *, Aig_ManObjNumMax(p->pAigTotal) );\n return p;\n}\n\n/**Function*************************************************************\n\n Synopsis [Prints stats of the manager.]\n\n Description []\n \n SideEffects []\n\n SeeAlso []\n\n***********************************************************************/\nvoid Dch_ManPrintStats( Dch_Man_t * p )\n{\n int nNodeNum = Aig_ManNodeNum(p->pAigTotal) / 3;\n Abc_Print( 1, \"Parameters: Sim words = %d. Conf limit = %d. SAT var max = %d.\\n\", \n p->pPars->nWords, p->pPars->nBTLimit, p->pPars->nSatVarMax );\n Abc_Print( 1, \"AIG nodes : Total = %6d. Dangling = %6d. Main = %6d. (%6.2f %%)\\n\", \n Aig_ManNodeNum(p->pAigTotal), \n Aig_ManNodeNum(p->pAigTotal)-nNodeNum,\n nNodeNum,\n 100.0 * nNodeNum/Aig_ManNodeNum(p->pAigTotal) );\n Abc_Print( 1, \"SAT solver: Vars = %d. Max cone = %d. Recycles = %d.\\n\", \n p->nSatVars, p->nConeMax, p->nRecycles );\n Abc_Print( 1, \"SAT calls : All = %6d. Unsat = %6d. Sat = %6d. Fail = %6d.\\n\", \n p->nSatCalls, p->nSatCalls-p->nSatCallsSat-p->nSatFailsReal, \n p->nSatCallsSat, p->nSatFailsReal );\n Abc_Print( 1, \"Choices : Lits = %6d. Reprs = %5d. Equivs = %5d. Choices = %5d.\\n\", \n p->nLits, p->nReprs, p->nEquivs, p->nChoices );\n Abc_Print( 1, \"Choicing runtime statistics:\\n\" );\n p->timeOther = p->timeTotal-p->timeSimInit-p->timeSimSat-p->timeSat-p->timeChoice;\n Abc_PrintTimeP( 1, \"Sim init \", p->timeSimInit, p->timeTotal );\n Abc_PrintTimeP( 1, \"Sim SAT \", p->timeSimSat, p->timeTotal );\n Abc_PrintTimeP( 1, \"SAT solving\", p->timeSat, p->timeTotal );\n Abc_PrintTimeP( 1, \" sat \", p->timeSatSat, p->timeTotal );\n Abc_PrintTimeP( 1, \" unsat \", p->timeSatUnsat, p->timeTotal );\n Abc_PrintTimeP( 1, \" undecided\", p->timeSatUndec, p->timeTotal );\n Abc_PrintTimeP( 1, \"Choice \", p->timeChoice, p->timeTotal );\n Abc_PrintTimeP( 1, \"Other \", p->timeOther, p->timeTotal );\n Abc_PrintTimeP( 1, \"TOTAL \", p->timeTotal, p->timeTotal );\n if ( p->pPars->timeSynth )\n {\n Abc_PrintTime( 1, \"Synthesis \", p->pPars->timeSynth );\n }\n} \n\n/**Function*************************************************************\n\n Synopsis [Frees the manager.]\n\n Description []\n \n SideEffects []\n\n SeeAlso []\n\n***********************************************************************/\nvoid Dch_ManStop( Dch_Man_t * p )\n{\n Aig_ManFanoutStop( p->pAigTotal );\n if ( p->pPars->fVerbose )\n Dch_ManPrintStats( p );\n if ( p->pAigFraig )\n Aig_ManStop( p->pAigFraig );\n if ( p->ppClasses )\n Dch_ClassesStop( p->ppClasses );\n if ( p->pSat )\n sat_solver_delete( p->pSat );\n Vec_PtrFree( p->vUsedNodes );\n Vec_PtrFree( p->vFanins );\n Vec_PtrFree( p->vSimRoots );\n Vec_PtrFree( p->vSimClasses );\n ABC_FREE( p->pReprsProved );\n ABC_FREE( p->pSatVars );\n ABC_FREE( p );\n}\n\n/**Function*************************************************************\n\n Synopsis [Recycles the SAT solver.]\n\n Description []\n \n SideEffects []\n\n SeeAlso []\n\n***********************************************************************/\nvoid Dch_ManSatSolverRecycle( Dch_Man_t * p )\n{\n int Lit;\n if ( p->pSat )\n {\n Aig_Obj_t * pObj;\n int i;\n Vec_PtrForEachEntry( Aig_Obj_t *, p->vUsedNodes, pObj, i )\n Dch_ObjSetSatNum( p, pObj, 0 );\n Vec_PtrClear( p->vUsedNodes );\n// memset( p->pSatVars, 0, sizeof(int) * Aig_ManObjNumMax(p->pAigTotal) );\n sat_solver_delete( p->pSat );\n }\n p->pSat = sat_solver_new();\n sat_solver_setnvars( p->pSat, 1000 );\n // var 0 is not used\n // var 1 is reserved for const1 node - add the clause\n p->nSatVars = 1;\n// p->nSatVars = 0;\n Lit = toLit( p->nSatVars );\n if ( p->pPars->fPolarFlip )\n Lit = lit_neg( Lit );\n sat_solver_addclause( p->pSat, &Lit, &Lit + 1 );\n Dch_ObjSetSatNum( p, Aig_ManConst1(p->pAigFraig), p->nSatVars++ );\n\n p->nRecycles++;\n p->nCallsSince = 0;\n}\n\n\n\n\n////////////////////////////////////////////////////////////////////////\n/// END OF FILE ///\n////////////////////////////////////////////////////////////////////////\n\n\nABC_NAMESPACE_IMPL_END\n\n"} +{"text": "\"\"\"\nHandles a Minecraft world save using either the Anvil or McRegion format.\n\nFor more information about the world format:\nhttps://minecraft.gamepedia.com/Level_format\n\"\"\"\n\nimport os, glob, re\nfrom . import region\nfrom . import chunk\nfrom .region import InconceivedChunk, Location\n\nclass UnknownWorldFormat(Exception):\n \"\"\"Unknown or invalid world folder.\"\"\"\n def __init__(self, msg=\"\"):\n self.msg = msg\n\n\nclass _BaseWorldFolder(object):\n \"\"\"\n Abstract class, representing either a McRegion or Anvil world folder.\n This class will use either Anvil or McRegion, with Anvil the preferred format.\n Simply calling WorldFolder() will do this automatically.\n \"\"\"\n type = \"Generic\"\n extension = ''\n chunkclass = chunk.Chunk\n\n def __init__(self, world_folder):\n \"\"\"Initialize a WorldFolder.\"\"\"\n self.worldfolder = world_folder\n self.regionfiles = {}\n self.regions = {}\n self.chunks = None\n # os.listdir triggers an OSError for non-existant directories or permission errors.\n # This is needed, because glob.glob silently returns no files.\n os.listdir(world_folder)\n self.set_regionfiles(self.get_filenames())\n\n def get_filenames(self):\n \"\"\"Find all matching file names in the world folder.\n \n This method is private, and it's use it deprecated. Use get_regionfiles() instead.\"\"\"\n # Warning: glob returns a empty list if the directory is unreadable, without raising an Exception\n return list(glob.glob(os.path.join(self.worldfolder,'region','r.*.*.'+self.extension)))\n\n def set_regionfiles(self, filenames):\n \"\"\"\n This method directly sets the region files for this instance to use.\n It assumes the filenames are in the form r.<x-digit>.<z-digit>.<extension>\n \"\"\"\n for filename in filenames:\n # Assume that filenames have the name r.<x-digit>.<z-digit>.<extension>\n m = re.match(r\"r.(\\-?\\d+).(\\-?\\d+).\"+self.extension, os.path.basename(filename))\n if m:\n x = int(m.group(1))\n z = int(m.group(2))\n else:\n # Only raised if a .mca of .mcr file exists which does not comply to the\n # r.<x-digit>.<z-digit>.<extension> filename format. This may raise false\n # errors if a copy is made, e.g. \"r.0.-1 copy.mca\". If this is an issue, override\n # get_filenames(). In most cases, it is an error, and we like to raise that.\n # Changed, no longer raise error, because we want to continue the loop.\n # raise UnknownWorldFormat(\"Unrecognized filename format %s\" % os.path.basename(filename))\n # TODO: log to stderr using logging facility.\n pass\n self.regionfiles[(x,z)] = filename\n\n def get_regionfiles(self):\n \"\"\"Return a list of full path of all region files.\"\"\"\n return list(self.regionfiles.values())\n\n def nonempty(self):\n \"\"\"Return True is the world is non-empty.\"\"\"\n return len(self.regionfiles) > 0\n\n def get_region(self, x,z):\n \"\"\"Get a region using x,z coordinates of a region. Cache results.\"\"\"\n if (x,z) not in self.regions:\n if (x,z) in self.regionfiles:\n self.regions[(x,z)] = region.RegionFile(self.regionfiles[(x,z)])\n else:\n # Return an empty RegionFile object\n # TODO: this does not yet allow for saving of the region file\n # TODO: this currently fails with a ValueError!\n # TODO: generate the correct name, and create the file\n # and add the fie to self.regionfiles\n self.regions[(x,z)] = region.RegionFile()\n self.regions[(x,z)].loc = Location(x=x,z=z)\n return self.regions[(x,z)]\n\n def iter_regions(self):\n \"\"\"\n Return an iterable list of all region files. Use this function if you only\n want to loop through each region files once, and do not want to cache the results.\n \"\"\"\n # TODO: Implement BoundingBox\n # TODO: Implement sort order\n for x,z in self.regionfiles.keys():\n close_after_use = False\n if (x,z) in self.regions:\n regionfile = self.regions[(x,z)]\n else:\n # It is not yet cached.\n # Get file, but do not cache later.\n regionfile = region.RegionFile(self.regionfiles[(x,z)], chunkclass = self.chunkclass)\n regionfile.loc = Location(x=x,z=z)\n close_after_use = True\n try:\n yield regionfile\n finally:\n if close_after_use:\n regionfile.close()\n\n def call_for_each_region(self, callback_function, boundingbox=None):\n \"\"\"\n Return an iterable that calls callback_function for each region file \n in the world. This is equivalent to:\n ```\n for the_region in iter_regions():\n yield callback_function(the_region)\n ````\n \n This function is threaded. It uses pickle to pass values between threads.\n See [What can be pickled and unpickled?](https://docs.python.org/library/pickle.html#what-can-be-pickled-and-unpickled) in the Python documentation\n for limitation on the output of `callback_function()`.\n \"\"\"\n raise NotImplementedError()\n\n def get_nbt(self,x,z):\n \"\"\"\n Return a NBT specified by the chunk coordinates x,z. Raise InconceivedChunk\n if the NBT file is not yet generated. To get a Chunk object, use get_chunk.\n \"\"\"\n rx,cx = divmod(x,32)\n rz,cz = divmod(z,32)\n if (rx,rz) not in self.regions and (rx,rz) not in self.regionfiles:\n raise InconceivedChunk(\"Chunk %s,%s is not present in world\" % (x,z))\n nbt = self.get_region(rx,rz).get_nbt(cx,cz)\n assert nbt != None\n return nbt\n\n def set_nbt(self,x,z,nbt):\n \"\"\"\n Set a chunk. Overrides the NBT if it already existed. If the NBT did not exists,\n adds it to the Regionfile. May create a new Regionfile if that did not exist yet.\n nbt must be a nbt.NBTFile instance, not a Chunk or regular TAG_Compound object.\n \"\"\"\n raise NotImplementedError()\n # TODO: implement\n\n def iter_nbt(self):\n \"\"\"\n Return an iterable list of all NBT. Use this function if you only\n want to loop through the chunks once, and don't need the block or data arrays.\n \"\"\"\n # TODO: Implement BoundingBox\n # TODO: Implement sort order\n for region in self.iter_regions():\n for c in region.iter_chunks():\n yield c\n\n def call_for_each_nbt(self, callback_function, boundingbox=None):\n \"\"\"\n Return an iterable that calls callback_function for each NBT structure \n in the world. This is equivalent to:\n ```\n for the_nbt in iter_nbt():\n yield callback_function(the_nbt)\n ````\n \n This function is threaded. It uses pickle to pass values between threads.\n See [What can be pickled and unpickled?](https://docs.python.org/library/pickle.html#what-can-be-pickled-and-unpickled) in the Python documentation\n for limitation on the output of `callback_function()`.\n \"\"\"\n raise NotImplementedError()\n\n def get_chunk(self,x,z):\n \"\"\"\n Return a chunk specified by the chunk coordinates x,z. Raise InconceivedChunk\n if the chunk is not yet generated. To get the raw NBT data, use get_nbt.\n \"\"\"\n return self.chunkclass(self.get_nbt(x, z))\n\n def get_chunks(self, boundingbox=None):\n \"\"\"\n Return a list of all chunks. Use this function if you access the chunk\n list frequently and want to cache the result.\n Use iter_chunks() if you only want to loop through the chunks once or have a\n very large world.\n \"\"\"\n if self.chunks == None:\n self.chunks = list(self.iter_chunks())\n return self.chunks\n\n def iter_chunks(self):\n \"\"\"\n Return an iterable list of all chunks. Use this function if you only\n want to loop through the chunks once or have a very large world.\n Use get_chunks() if you access the chunk list frequently and want to cache\n the results. Use iter_nbt() if you are concerned about speed and don't want\n to parse the block data.\n \"\"\"\n # TODO: Implement BoundingBox\n # TODO: Implement sort order\n for c in self.iter_nbt():\n yield self.chunkclass(c)\n\n def chunk_count(self):\n \"\"\"Return a count of the chunks in this world folder.\"\"\"\n c = 0\n for r in self.iter_regions():\n c += r.chunk_count()\n return c\n\n def get_boundingbox(self):\n \"\"\"\n Return minimum and maximum x and z coordinates of the chunks that\n make up this world save\n \"\"\"\n b = BoundingBox()\n for rx,rz in self.regionfiles.keys():\n region = self.get_region(rx,rz)\n rx,rz = 32*rx,32*rz\n for cc in region.get_chunk_coords():\n x,z = (rx+cc['x'],rz+cc['z'])\n b.expand(x,None,z)\n return b\n\n def __repr__(self):\n return \"%s(%r)\" % (self.__class__.__name__,self.worldfolder)\n\n\nclass McRegionWorldFolder(_BaseWorldFolder):\n \"\"\"Represents a world save using the old McRegion format.\"\"\"\n type = \"McRegion\"\n extension = 'mcr'\n chunkclass = chunk.McRegionChunk\n\n\nclass AnvilWorldFolder(_BaseWorldFolder):\n \"\"\"Represents a world save using the new Anvil format.\"\"\"\n type = \"Anvil\"\n extension = 'mca'\n chunkclass = chunk.AnvilChunk\n\n\nclass _WorldFolderFactory(object):\n \"\"\"Factory class: instantiate the subclassses in order, and the first instance \n whose nonempty() method returns True is returned. If no nonempty() returns True,\n a UnknownWorldFormat exception is raised.\"\"\"\n def __init__(self, subclasses):\n self.subclasses = subclasses\n def __call__(self, *args, **kwargs):\n for cls in self.subclasses:\n wf = cls(*args, **kwargs)\n if wf.nonempty(): # Check if the world is non-empty\n return wf\n raise UnknownWorldFormat(\"Empty world or unknown format\")\n\nWorldFolder = _WorldFolderFactory([AnvilWorldFolder, McRegionWorldFolder])\n\"\"\"\nFactory instance that returns a AnvilWorldFolder or McRegionWorldFolder\ninstance, or raise a UnknownWorldFormat.\n\"\"\"\n\n\n\nclass BoundingBox(object):\n \"\"\"A bounding box of x,y,z coordinates.\"\"\"\n def __init__(self, minx=None, maxx=None, miny=None, maxy=None, minz=None, maxz=None):\n self.minx,self.maxx = minx, maxx\n self.miny,self.maxy = miny, maxy\n self.minz,self.maxz = minz, maxz\n def expand(self,x,y,z):\n \"\"\"\n Expands the bounding\n \"\"\"\n if x != None:\n if self.minx is None or x < self.minx:\n self.minx = x\n if self.maxx is None or x > self.maxx:\n self.maxx = x\n if y != None:\n if self.miny is None or y < self.miny:\n self.miny = y\n if self.maxy is None or y > self.maxy:\n self.maxy = y\n if z != None:\n if self.minz is None or z < self.minz:\n self.minz = z\n if self.maxz is None or z > self.maxz:\n self.maxz = z\n def lenx(self):\n if self.maxx is None or self.minx is None:\n return 0\n return self.maxx-self.minx+1\n def leny(self):\n if self.maxy is None or self.miny is None:\n return 0\n return self.maxy-self.miny+1\n def lenz(self):\n if self.maxz is None or self.minz is None:\n return 0\n return self.maxz-self.minz+1\n def __repr__(self):\n return \"%s(%s,%s,%s,%s,%s,%s)\" % (self.__class__.__name__,self.minx,self.maxx,\n self.miny,self.maxy,self.minz,self.maxz)\n"} +{"text": "/*\n * Copyright (C) 2003-2008 Takahiro Hirofuchi\n *\n * This is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,\n * USA.\n */\n\n#include <linux/device.h>\n#include <linux/file.h>\n#include <linux/kthread.h>\n#include <linux/module.h>\n\n#include \"usbip_common.h\"\n#include \"stub.h\"\n\n/*\n * usbip_status shows the status of usbip-host as long as this driver is bound\n * to the target device.\n */\nstatic ssize_t usbip_status_show(struct device *dev,\n\t\t\t\t struct device_attribute *attr, char *buf)\n{\n\tstruct stub_device *sdev = dev_get_drvdata(dev);\n\tint status;\n\n\tif (!sdev) {\n\t\tdev_err(dev, \"sdev is null\\n\");\n\t\treturn -ENODEV;\n\t}\n\n\tspin_lock_irq(&sdev->ud.lock);\n\tstatus = sdev->ud.status;\n\tspin_unlock_irq(&sdev->ud.lock);\n\n\treturn snprintf(buf, PAGE_SIZE, \"%d\\n\", status);\n}\nstatic DEVICE_ATTR_RO(usbip_status);\n\n/*\n * usbip_sockfd gets a socket descriptor of an established TCP connection that\n * is used to transfer usbip requests by kernel threads. -1 is a magic number\n * by which usbip connection is finished.\n */\nstatic ssize_t store_sockfd(struct device *dev, struct device_attribute *attr,\n\t\t\t const char *buf, size_t count)\n{\n\tstruct stub_device *sdev = dev_get_drvdata(dev);\n\tint sockfd = 0;\n\tstruct socket *socket;\n\tint rv;\n\n\tif (!sdev) {\n\t\tdev_err(dev, \"sdev is null\\n\");\n\t\treturn -ENODEV;\n\t}\n\n\trv = sscanf(buf, \"%d\", &sockfd);\n\tif (rv != 1)\n\t\treturn -EINVAL;\n\n\tif (sockfd != -1) {\n\t\tint err;\n\n\t\tdev_info(dev, \"stub up\\n\");\n\n\t\tspin_lock_irq(&sdev->ud.lock);\n\n\t\tif (sdev->ud.status != SDEV_ST_AVAILABLE) {\n\t\t\tdev_err(dev, \"not ready\\n\");\n\t\t\tgoto err;\n\t\t}\n\n\t\tsocket = sockfd_lookup(sockfd, &err);\n\t\tif (!socket)\n\t\t\tgoto err;\n\n\t\tsdev->ud.tcp_socket = socket;\n\n\t\tspin_unlock_irq(&sdev->ud.lock);\n\n\t\tsdev->ud.tcp_rx = kthread_get_run(stub_rx_loop, &sdev->ud,\n\t\t\t\t\t\t \"stub_rx\");\n\t\tsdev->ud.tcp_tx = kthread_get_run(stub_tx_loop, &sdev->ud,\n\t\t\t\t\t\t \"stub_tx\");\n\n\t\tspin_lock_irq(&sdev->ud.lock);\n\t\tsdev->ud.status = SDEV_ST_USED;\n\t\tspin_unlock_irq(&sdev->ud.lock);\n\n\t} else {\n\t\tdev_info(dev, \"stub down\\n\");\n\n\t\tspin_lock_irq(&sdev->ud.lock);\n\t\tif (sdev->ud.status != SDEV_ST_USED)\n\t\t\tgoto err;\n\n\t\tspin_unlock_irq(&sdev->ud.lock);\n\n\t\tusbip_event_add(&sdev->ud, SDEV_EVENT_DOWN);\n\t}\n\n\treturn count;\n\nerr:\n\tspin_unlock_irq(&sdev->ud.lock);\n\treturn -EINVAL;\n}\nstatic DEVICE_ATTR(usbip_sockfd, S_IWUSR, NULL, store_sockfd);\n\nstatic int stub_add_files(struct device *dev)\n{\n\tint err = 0;\n\n\terr = device_create_file(dev, &dev_attr_usbip_status);\n\tif (err)\n\t\tgoto err_status;\n\n\terr = device_create_file(dev, &dev_attr_usbip_sockfd);\n\tif (err)\n\t\tgoto err_sockfd;\n\n\terr = device_create_file(dev, &dev_attr_usbip_debug);\n\tif (err)\n\t\tgoto err_debug;\n\n\treturn 0;\n\nerr_debug:\n\tdevice_remove_file(dev, &dev_attr_usbip_sockfd);\nerr_sockfd:\n\tdevice_remove_file(dev, &dev_attr_usbip_status);\nerr_status:\n\treturn err;\n}\n\nstatic void stub_remove_files(struct device *dev)\n{\n\tdevice_remove_file(dev, &dev_attr_usbip_status);\n\tdevice_remove_file(dev, &dev_attr_usbip_sockfd);\n\tdevice_remove_file(dev, &dev_attr_usbip_debug);\n}\n\nstatic void stub_shutdown_connection(struct usbip_device *ud)\n{\n\tstruct stub_device *sdev = container_of(ud, struct stub_device, ud);\n\n\t/*\n\t * When removing an exported device, kernel panic sometimes occurred\n\t * and then EIP was sk_wait_data of stub_rx thread. Is this because\n\t * sk_wait_data returned though stub_rx thread was already finished by\n\t * step 1?\n\t */\n\tif (ud->tcp_socket) {\n\t\tdev_dbg(&sdev->udev->dev, \"shutdown tcp_socket %p\\n\",\n\t\t\tud->tcp_socket);\n\t\tkernel_sock_shutdown(ud->tcp_socket, SHUT_RDWR);\n\t}\n\n\t/* 1. stop threads */\n\tif (ud->tcp_rx) {\n\t\tkthread_stop_put(ud->tcp_rx);\n\t\tud->tcp_rx = NULL;\n\t}\n\tif (ud->tcp_tx) {\n\t\tkthread_stop_put(ud->tcp_tx);\n\t\tud->tcp_tx = NULL;\n\t}\n\n\t/*\n\t * 2. close the socket\n\t *\n\t * tcp_socket is freed after threads are killed so that usbip_xmit does\n\t * not touch NULL socket.\n\t */\n\tif (ud->tcp_socket) {\n\t\tsockfd_put(ud->tcp_socket);\n\t\tud->tcp_socket = NULL;\n\t}\n\n\t/* 3. free used data */\n\tstub_device_cleanup_urbs(sdev);\n\n\t/* 4. free stub_unlink */\n\t{\n\t\tunsigned long flags;\n\t\tstruct stub_unlink *unlink, *tmp;\n\n\t\tspin_lock_irqsave(&sdev->priv_lock, flags);\n\t\tlist_for_each_entry_safe(unlink, tmp, &sdev->unlink_tx, list) {\n\t\t\tlist_del(&unlink->list);\n\t\t\tkfree(unlink);\n\t\t}\n\t\tlist_for_each_entry_safe(unlink, tmp, &sdev->unlink_free,\n\t\t\t\t\t list) {\n\t\t\tlist_del(&unlink->list);\n\t\t\tkfree(unlink);\n\t\t}\n\t\tspin_unlock_irqrestore(&sdev->priv_lock, flags);\n\t}\n}\n\nstatic void stub_device_reset(struct usbip_device *ud)\n{\n\tstruct stub_device *sdev = container_of(ud, struct stub_device, ud);\n\tstruct usb_device *udev = sdev->udev;\n\tint ret;\n\n\tdev_dbg(&udev->dev, \"device reset\");\n\n\tret = usb_lock_device_for_reset(udev, NULL);\n\tif (ret < 0) {\n\t\tdev_err(&udev->dev, \"lock for reset\\n\");\n\t\tspin_lock_irq(&ud->lock);\n\t\tud->status = SDEV_ST_ERROR;\n\t\tspin_unlock_irq(&ud->lock);\n\t\treturn;\n\t}\n\n\t/* try to reset the device */\n\tret = usb_reset_device(udev);\n\tusb_unlock_device(udev);\n\n\tspin_lock_irq(&ud->lock);\n\tif (ret) {\n\t\tdev_err(&udev->dev, \"device reset\\n\");\n\t\tud->status = SDEV_ST_ERROR;\n\t} else {\n\t\tdev_info(&udev->dev, \"device reset\\n\");\n\t\tud->status = SDEV_ST_AVAILABLE;\n\t}\n\tspin_unlock_irq(&ud->lock);\n}\n\nstatic void stub_device_unusable(struct usbip_device *ud)\n{\n\tspin_lock_irq(&ud->lock);\n\tud->status = SDEV_ST_ERROR;\n\tspin_unlock_irq(&ud->lock);\n}\n\n/**\n * stub_device_alloc - allocate a new stub_device struct\n * @udev: usb_device of a new device\n *\n * Allocates and initializes a new stub_device struct.\n */\nstatic struct stub_device *stub_device_alloc(struct usb_device *udev)\n{\n\tstruct stub_device *sdev;\n\tint busnum = udev->bus->busnum;\n\tint devnum = udev->devnum;\n\n\tdev_dbg(&udev->dev, \"allocating stub device\");\n\n\t/* yes, it's a new device */\n\tsdev = kzalloc(sizeof(struct stub_device), GFP_KERNEL);\n\tif (!sdev)\n\t\treturn NULL;\n\n\tsdev->udev = usb_get_dev(udev);\n\n\t/*\n\t * devid is defined with devnum when this driver is first allocated.\n\t * devnum may change later if a device is reset. However, devid never\n\t * changes during a usbip connection.\n\t */\n\tsdev->devid\t\t= (busnum << 16) | devnum;\n\tsdev->ud.side\t\t= USBIP_STUB;\n\tsdev->ud.status\t\t= SDEV_ST_AVAILABLE;\n\tspin_lock_init(&sdev->ud.lock);\n\tsdev->ud.tcp_socket\t= NULL;\n\n\tINIT_LIST_HEAD(&sdev->priv_init);\n\tINIT_LIST_HEAD(&sdev->priv_tx);\n\tINIT_LIST_HEAD(&sdev->priv_free);\n\tINIT_LIST_HEAD(&sdev->unlink_free);\n\tINIT_LIST_HEAD(&sdev->unlink_tx);\n\tspin_lock_init(&sdev->priv_lock);\n\n\tinit_waitqueue_head(&sdev->tx_waitq);\n\n\tsdev->ud.eh_ops.shutdown = stub_shutdown_connection;\n\tsdev->ud.eh_ops.reset = stub_device_reset;\n\tsdev->ud.eh_ops.unusable = stub_device_unusable;\n\n\tusbip_start_eh(&sdev->ud);\n\n\tdev_dbg(&udev->dev, \"register new device\\n\");\n\n\treturn sdev;\n}\n\nstatic void stub_device_free(struct stub_device *sdev)\n{\n\tkfree(sdev);\n}\n\nstatic int stub_probe(struct usb_device *udev)\n{\n\tstruct stub_device *sdev = NULL;\n\tconst char *udev_busid = dev_name(&udev->dev);\n\tstruct bus_id_priv *busid_priv;\n\tint rc;\n\n\tdev_dbg(&udev->dev, \"Enter\\n\");\n\n\t/* check we should claim or not by busid_table */\n\tbusid_priv = get_busid_priv(udev_busid);\n\tif (!busid_priv || (busid_priv->status == STUB_BUSID_REMOV) ||\n\t (busid_priv->status == STUB_BUSID_OTHER)) {\n\t\tdev_info(&udev->dev,\n\t\t\t\"%s is not in match_busid table... skip!\\n\",\n\t\t\tudev_busid);\n\n\t\t/*\n\t\t * Return value should be ENODEV or ENOXIO to continue trying\n\t\t * other matched drivers by the driver core.\n\t\t * See driver_probe_device() in driver/base/dd.c\n\t\t */\n\t\treturn -ENODEV;\n\t}\n\n\tif (udev->descriptor.bDeviceClass == USB_CLASS_HUB) {\n\t\tdev_dbg(&udev->dev, \"%s is a usb hub device... skip!\\n\",\n\t\t\t udev_busid);\n\t\treturn -ENODEV;\n\t}\n\n\tif (!strcmp(udev->bus->bus_name, \"vhci_hcd\")) {\n\t\tdev_dbg(&udev->dev,\n\t\t\t\"%s is attached on vhci_hcd... skip!\\n\",\n\t\t\tudev_busid);\n\n\t\treturn -ENODEV;\n\t}\n\n\t/* ok, this is my device */\n\tsdev = stub_device_alloc(udev);\n\tif (!sdev)\n\t\treturn -ENOMEM;\n\n\tdev_info(&udev->dev,\n\t\t\"usbip-host: register new device (bus %u dev %u)\\n\",\n\t\tudev->bus->busnum, udev->devnum);\n\n\tbusid_priv->shutdown_busid = 0;\n\n\t/* set private data to usb_device */\n\tdev_set_drvdata(&udev->dev, sdev);\n\tbusid_priv->sdev = sdev;\n\tbusid_priv->udev = udev;\n\n\t/*\n\t * Claim this hub port.\n\t * It doesn't matter what value we pass as owner\n\t * (struct dev_state) as long as it is unique.\n\t */\n\trc = usb_hub_claim_port(udev->parent, udev->portnum,\n\t\t\t(struct usb_dev_state *) udev);\n\tif (rc) {\n\t\tdev_dbg(&udev->dev, \"unable to claim port\\n\");\n\t\tgoto err_port;\n\t}\n\n\trc = stub_add_files(&udev->dev);\n\tif (rc) {\n\t\tdev_err(&udev->dev, \"stub_add_files for %s\\n\", udev_busid);\n\t\tgoto err_files;\n\t}\n\tbusid_priv->status = STUB_BUSID_ALLOC;\n\n\treturn 0;\nerr_files:\n\tusb_hub_release_port(udev->parent, udev->portnum,\n\t\t\t (struct usb_dev_state *) udev);\nerr_port:\n\tdev_set_drvdata(&udev->dev, NULL);\n\tusb_put_dev(udev);\n\n\tbusid_priv->sdev = NULL;\n\tstub_device_free(sdev);\n\treturn rc;\n}\n\nstatic void shutdown_busid(struct bus_id_priv *busid_priv)\n{\n\tif (busid_priv->sdev && !busid_priv->shutdown_busid) {\n\t\tbusid_priv->shutdown_busid = 1;\n\t\tusbip_event_add(&busid_priv->sdev->ud, SDEV_EVENT_REMOVED);\n\n\t\t/* wait for the stop of the event handler */\n\t\tusbip_stop_eh(&busid_priv->sdev->ud);\n\t}\n}\n\n/*\n * called in usb_disconnect() or usb_deregister()\n * but only if actconfig(active configuration) exists\n */\nstatic void stub_disconnect(struct usb_device *udev)\n{\n\tstruct stub_device *sdev;\n\tconst char *udev_busid = dev_name(&udev->dev);\n\tstruct bus_id_priv *busid_priv;\n\tint rc;\n\n\tdev_dbg(&udev->dev, \"Enter\\n\");\n\n\tbusid_priv = get_busid_priv(udev_busid);\n\tif (!busid_priv) {\n\t\tBUG();\n\t\treturn;\n\t}\n\n\tsdev = dev_get_drvdata(&udev->dev);\n\n\t/* get stub_device */\n\tif (!sdev) {\n\t\tdev_err(&udev->dev, \"could not get device\");\n\t\treturn;\n\t}\n\n\tdev_set_drvdata(&udev->dev, NULL);\n\n\t/*\n\t * NOTE: rx/tx threads are invoked for each usb_device.\n\t */\n\tstub_remove_files(&udev->dev);\n\n\t/* release port */\n\trc = usb_hub_release_port(udev->parent, udev->portnum,\n\t\t\t\t (struct usb_dev_state *) udev);\n\tif (rc) {\n\t\tdev_dbg(&udev->dev, \"unable to release port\\n\");\n\t\treturn;\n\t}\n\n\t/* If usb reset is called from event handler */\n\tif (usbip_in_eh(current))\n\t\treturn;\n\n\t/* shutdown the current connection */\n\tshutdown_busid(busid_priv);\n\n\tusb_put_dev(sdev->udev);\n\n\t/* free sdev */\n\tbusid_priv->sdev = NULL;\n\tstub_device_free(sdev);\n\n\tif (busid_priv->status == STUB_BUSID_ALLOC) {\n\t\tbusid_priv->status = STUB_BUSID_ADDED;\n\t} else {\n\t\tbusid_priv->status = STUB_BUSID_OTHER;\n\t\tdel_match_busid((char *)udev_busid);\n\t}\n}\n\n#ifdef CONFIG_PM\n\n/* These functions need usb_port_suspend and usb_port_resume,\n * which reside in drivers/usb/core/usb.h. Skip for now. */\n\nstatic int stub_suspend(struct usb_device *udev, pm_message_t message)\n{\n\tdev_dbg(&udev->dev, \"stub_suspend\\n\");\n\n\treturn 0;\n}\n\nstatic int stub_resume(struct usb_device *udev, pm_message_t message)\n{\n\tdev_dbg(&udev->dev, \"stub_resume\\n\");\n\n\treturn 0;\n}\n\n#endif\t/* CONFIG_PM */\n\nstruct usb_device_driver stub_driver = {\n\t.name\t\t= \"usbip-host\",\n\t.probe\t\t= stub_probe,\n\t.disconnect\t= stub_disconnect,\n#ifdef CONFIG_PM\n\t.suspend\t= stub_suspend,\n\t.resume\t\t= stub_resume,\n#endif\n\t.supports_autosuspend\t=\t0,\n};\n"} +{"text": "/**\n * @file\n * @brief Team management for the campaign gametype headers\n */\n\n/*\nCopyright (C) 2002-2020 UFO: Alien Invasion.\n\nThis program is free software; you can redistribute it and/or\nmodify it under the terms of the GNU General Public License\nas published by the Free Software Foundation; either version 2\nof the License, or (at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\nSee the GNU General Public License for more details.m\n\nYou should have received a copy of the GNU General Public License\nalong with this program; if not, write to the Free Software\nFoundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n\n*/\n\n#pragma once\n\nvoid CP_CleanTempInventory(base_t* base);\nvoid CP_UpdateActorAircraftVar(aircraft_t* aircraft, employeeType_t employeeType);\nvoid CP_CleanupAircraftTeam(aircraft_t* aircraft, equipDef_t* ed);\nvoid CP_CleanupTeam(base_t* base, equipDef_t* ed);\nvoid CP_SetEquipContainer(character_t* chr);\nvoid CP_AddWeaponAmmo(equipDef_t* ed, Item* item);\n"} +{"text": "\"\"\"\r\n Script for training model on PyTorch.\r\n\"\"\"\r\n\r\nimport os\r\nimport time\r\nimport logging\r\nimport argparse\r\nimport random\r\nimport numpy as np\r\n\r\nimport torch.nn as nn\r\nimport torch.backends.cudnn as cudnn\r\nimport torch.utils.data\r\n\r\nfrom common.logger_utils import initialize_logging\r\nfrom common.train_log_param_saver import TrainLogParamSaver\r\nfrom pytorch.utils import prepare_pt_context, prepare_model, validate\r\nfrom pytorch.utils import report_accuracy, get_composite_metric, get_metric_name\r\n\r\nfrom pytorch.dataset_utils import get_dataset_metainfo\r\nfrom pytorch.dataset_utils import get_train_data_source, get_val_data_source\r\n\r\n\r\ndef add_train_cls_parser_arguments(parser):\r\n \"\"\"\r\n Create python script parameters (for training/classification specific subpart).\r\n\r\n Parameters:\r\n ----------\r\n parser : ArgumentParser\r\n ArgumentParser instance.\r\n \"\"\"\r\n parser.add_argument(\r\n \"--model\",\r\n type=str,\r\n required=True,\r\n help=\"type of model to use. see model_provider for options\")\r\n parser.add_argument(\r\n \"--use-pretrained\",\r\n action=\"store_true\",\r\n help=\"enable using pretrained model from github repo\")\r\n parser.add_argument(\r\n \"--resume\",\r\n type=str,\r\n default=\"\",\r\n help=\"resume from previously saved parameters if not None\")\r\n parser.add_argument(\r\n \"--resume-state\",\r\n type=str,\r\n default=\"\",\r\n help=\"resume from previously saved optimizer state if not None\")\r\n\r\n parser.add_argument(\r\n \"--num-gpus\",\r\n type=int,\r\n default=0,\r\n help=\"number of gpus to use\")\r\n parser.add_argument(\r\n \"-j\",\r\n \"--num-data-workers\",\r\n dest=\"num_workers\",\r\n default=4,\r\n type=int,\r\n help=\"number of preprocessing workers\")\r\n\r\n parser.add_argument(\r\n \"--batch-size\",\r\n type=int,\r\n default=512,\r\n help=\"training batch size per device (CPU/GPU)\")\r\n parser.add_argument(\r\n \"--batch-size-scale\",\r\n type=int,\r\n default=1,\r\n help=\"manual batch-size increasing factor\")\r\n parser.add_argument(\r\n \"--num-epochs\",\r\n type=int,\r\n default=120,\r\n help=\"number of training epochs\")\r\n parser.add_argument(\r\n \"--start-epoch\",\r\n type=int,\r\n default=1,\r\n help=\"starting epoch for resuming, default is 1 for new training\")\r\n parser.add_argument(\r\n \"--attempt\",\r\n type=int,\r\n default=1,\r\n help=\"current attempt number for training\")\r\n\r\n parser.add_argument(\r\n \"--optimizer-name\",\r\n type=str,\r\n default=\"nag\",\r\n help=\"optimizer name\")\r\n parser.add_argument(\r\n \"--lr\",\r\n type=float,\r\n default=0.1,\r\n help=\"learning rate\")\r\n parser.add_argument(\r\n \"--lr-mode\",\r\n type=str,\r\n default=\"cosine\",\r\n help=\"learning rate scheduler mode. options are step, poly and cosine\")\r\n parser.add_argument(\r\n \"--lr-decay\",\r\n type=float,\r\n default=0.1,\r\n help=\"decay rate of learning rate\")\r\n parser.add_argument(\r\n \"--lr-decay-period\",\r\n type=int,\r\n default=0,\r\n help=\"interval for periodic learning rate decays. default is 0 to disable\")\r\n parser.add_argument(\r\n \"--lr-decay-epoch\",\r\n type=str,\r\n default=\"40,60\",\r\n help=\"epoches at which learning rate decays\")\r\n parser.add_argument(\r\n \"--target-lr\",\r\n type=float,\r\n default=1e-8,\r\n help=\"ending learning rate\")\r\n parser.add_argument(\r\n \"--poly-power\",\r\n type=float,\r\n default=2,\r\n help=\"power value for poly LR scheduler\")\r\n parser.add_argument(\r\n \"--warmup-epochs\",\r\n type=int,\r\n default=0,\r\n help=\"number of warmup epochs\")\r\n parser.add_argument(\r\n \"--warmup-lr\",\r\n type=float,\r\n default=1e-8,\r\n help=\"starting warmup learning rate\")\r\n parser.add_argument(\r\n \"--warmup-mode\",\r\n type=str,\r\n default=\"linear\",\r\n help=\"learning rate scheduler warmup mode. options are linear, poly and constant\")\r\n parser.add_argument(\r\n \"--momentum\",\r\n type=float,\r\n default=0.9,\r\n help=\"momentum value for optimizer\")\r\n parser.add_argument(\r\n \"--wd\",\r\n type=float,\r\n default=0.0001,\r\n help=\"weight decay rate\")\r\n parser.add_argument(\r\n \"--gamma-wd-mult\",\r\n type=float,\r\n default=1.0,\r\n help=\"weight decay multiplier for batchnorm gamma\")\r\n parser.add_argument(\r\n \"--beta-wd-mult\",\r\n type=float,\r\n default=1.0,\r\n help=\"weight decay multiplier for batchnorm beta\")\r\n parser.add_argument(\r\n \"--bias-wd-mult\",\r\n type=float,\r\n default=1.0,\r\n help=\"weight decay multiplier for bias\")\r\n parser.add_argument(\r\n \"--grad-clip\",\r\n type=float,\r\n default=None,\r\n help=\"max_norm for gradient clipping\")\r\n parser.add_argument(\r\n \"--label-smoothing\",\r\n action=\"store_true\",\r\n help=\"use label smoothing\")\r\n\r\n parser.add_argument(\r\n \"--mixup\",\r\n action=\"store_true\",\r\n help=\"use mixup strategy\")\r\n parser.add_argument(\r\n \"--mixup-epoch-tail\",\r\n type=int,\r\n default=15,\r\n help=\"number of epochs without mixup at the end of training\")\r\n\r\n parser.add_argument(\r\n \"--log-interval\",\r\n type=int,\r\n default=50,\r\n help=\"number of batches to wait before logging\")\r\n parser.add_argument(\r\n \"--save-interval\",\r\n type=int,\r\n default=4,\r\n help=\"saving parameters epoch interval, best model will always be saved\")\r\n parser.add_argument(\r\n \"--save-dir\",\r\n type=str,\r\n default=\"\",\r\n help=\"directory of saved models and log-files\")\r\n parser.add_argument(\r\n \"--logging-file-name\",\r\n type=str,\r\n default=\"train.log\",\r\n help=\"filename of training log\")\r\n\r\n parser.add_argument(\r\n \"--seed\",\r\n type=int,\r\n default=-1,\r\n help=\"Random seed to be fixed\")\r\n parser.add_argument(\r\n \"--log-packages\",\r\n type=str,\r\n default=\"torch, torchvision\",\r\n help=\"list of python packages for logging\")\r\n parser.add_argument(\r\n \"--log-pip-packages\",\r\n type=str,\r\n default=\"\",\r\n help=\"list of pip packages for logging\")\r\n\r\n parser.add_argument(\r\n \"--tune-layers\",\r\n type=str,\r\n default=\"\",\r\n help=\"regexp for selecting layers for fine tuning\")\r\n\r\n\r\ndef parse_args():\r\n \"\"\"\r\n Parse python script parameters (common part).\r\n\r\n Returns\r\n -------\r\n ArgumentParser\r\n Resulted args.\r\n \"\"\"\r\n parser = argparse.ArgumentParser(\r\n description=\"Train a model for image classification (PyTorch)\",\r\n formatter_class=argparse.ArgumentDefaultsHelpFormatter)\r\n parser.add_argument(\r\n \"--dataset\",\r\n type=str,\r\n default=\"ImageNet1K\",\r\n help=\"dataset name. options are ImageNet1K, CUB200_2011, CIFAR10, CIFAR100, SVHN\")\r\n parser.add_argument(\r\n \"--work-dir\",\r\n type=str,\r\n default=os.path.join(\"..\", \"imgclsmob_data\"),\r\n help=\"path to working directory only for dataset root path preset\")\r\n\r\n args, _ = parser.parse_known_args()\r\n dataset_metainfo = get_dataset_metainfo(dataset_name=args.dataset)\r\n dataset_metainfo.add_dataset_parser_arguments(\r\n parser=parser,\r\n work_dir_path=args.work_dir)\r\n\r\n add_train_cls_parser_arguments(parser)\r\n\r\n args = parser.parse_args()\r\n return args\r\n\r\n\r\ndef init_rand(seed):\r\n \"\"\"\r\n Initialize all random generators by seed.\r\n\r\n Parameters:\r\n ----------\r\n seed : int\r\n Seed value.\r\n\r\n Returns\r\n -------\r\n int\r\n Generated seed value.\r\n \"\"\"\r\n if seed <= 0:\r\n seed = np.random.randint(10000)\r\n else:\r\n cudnn.deterministic = True\r\n logging.warning(\r\n \"You have chosen to seed training. This will turn on the CUDNN deterministic setting, which can slow down \"\r\n \"your training considerably! You may see unexpected behavior when restarting from checkpoints.\")\r\n random.seed(seed)\r\n np.random.seed(seed)\r\n torch.manual_seed(seed)\r\n return seed\r\n\r\n\r\ndef prepare_trainer(net,\r\n optimizer_name,\r\n wd,\r\n momentum,\r\n lr_mode,\r\n lr,\r\n lr_decay_period,\r\n lr_decay_epoch,\r\n lr_decay,\r\n num_epochs,\r\n state_file_path):\r\n \"\"\"\r\n Prepare trainer.\r\n\r\n Parameters:\r\n ----------\r\n net : Module\r\n Model.\r\n optimizer_name : str\r\n Name of optimizer.\r\n wd : float\r\n Weight decay rate.\r\n momentum : float\r\n Momentum value.\r\n lr_mode : str\r\n Learning rate scheduler mode.\r\n lr : float\r\n Learning rate.\r\n lr_decay_period : int\r\n Interval for periodic learning rate decays.\r\n lr_decay_epoch : str\r\n Epoches at which learning rate decays.\r\n lr_decay : float\r\n Decay rate of learning rate.\r\n num_epochs : int\r\n Number of training epochs.\r\n state_file_path : str\r\n Path for file with trainer state.\r\n\r\n Returns\r\n -------\r\n Optimizer\r\n Optimizer.\r\n LRScheduler\r\n Learning rate scheduler.\r\n int\r\n Start epoch.\r\n \"\"\"\r\n optimizer_name = optimizer_name.lower()\r\n if (optimizer_name == \"sgd\") or (optimizer_name == \"nag\"):\r\n optimizer = torch.optim.SGD(\r\n params=net.parameters(),\r\n lr=lr,\r\n momentum=momentum,\r\n weight_decay=wd,\r\n nesterov=(optimizer_name == \"nag\"))\r\n else:\r\n raise ValueError(\"Usupported optimizer: {}\".format(optimizer_name))\r\n\r\n if state_file_path:\r\n checkpoint = torch.load(state_file_path)\r\n if type(checkpoint) == dict:\r\n optimizer.load_state_dict(checkpoint[\"optimizer\"])\r\n start_epoch = checkpoint[\"epoch\"]\r\n else:\r\n start_epoch = None\r\n else:\r\n start_epoch = None\r\n\r\n cudnn.benchmark = True\r\n\r\n lr_mode = lr_mode.lower()\r\n if lr_decay_period > 0:\r\n lr_decay_epoch = list(range(lr_decay_period, num_epochs, lr_decay_period))\r\n else:\r\n lr_decay_epoch = [int(i) for i in lr_decay_epoch.split(\",\")]\r\n if (lr_mode == \"step\") and (lr_decay_period != 0):\r\n lr_scheduler = torch.optim.lr_scheduler.StepLR(\r\n optimizer=optimizer,\r\n step_size=lr_decay_period,\r\n gamma=lr_decay,\r\n last_epoch=-1)\r\n elif (lr_mode == \"multistep\") or ((lr_mode == \"step\") and (lr_decay_period == 0)):\r\n lr_scheduler = torch.optim.lr_scheduler.MultiStepLR(\r\n optimizer=optimizer,\r\n milestones=lr_decay_epoch,\r\n gamma=lr_decay,\r\n last_epoch=-1)\r\n elif lr_mode == \"cosine\":\r\n for group in optimizer.param_groups:\r\n group.setdefault(\"initial_lr\", group[\"lr\"])\r\n lr_scheduler = torch.optim.lr_scheduler.CosineAnnealingLR(\r\n optimizer=optimizer,\r\n T_max=num_epochs,\r\n last_epoch=(num_epochs - 1))\r\n else:\r\n raise ValueError(\"Usupported lr_scheduler: {}\".format(lr_mode))\r\n\r\n return optimizer, lr_scheduler, start_epoch\r\n\r\n\r\ndef save_params(file_stem,\r\n state):\r\n \"\"\"\r\n Save current model/trainer parameters.\r\n\r\n Parameters:\r\n ----------\r\n file_stem : str\r\n File stem (with path).\r\n state : dict\r\n Whole state of model & trainer.\r\n trainer : Trainer\r\n Trainer.\r\n \"\"\"\r\n torch.save(\r\n obj=state[\"state_dict\"],\r\n f=(file_stem + \".pth\"))\r\n torch.save(\r\n obj=state,\r\n f=(file_stem + \".states\"))\r\n\r\n\r\ndef train_epoch(epoch,\r\n net,\r\n train_metric,\r\n train_data,\r\n use_cuda,\r\n L,\r\n optimizer,\r\n # lr_scheduler,\r\n batch_size,\r\n log_interval):\r\n \"\"\"\r\n Train model on particular epoch.\r\n\r\n Parameters:\r\n ----------\r\n epoch : int\r\n Epoch number.\r\n net : Module\r\n Model.\r\n train_metric : EvalMetric\r\n Metric object instance.\r\n train_data : DataLoader\r\n Data loader.\r\n use_cuda : bool\r\n Whether to use CUDA.\r\n L : Loss\r\n Loss function.\r\n optimizer : Optimizer\r\n Optimizer.\r\n batch_size : int\r\n Training batch size.\r\n log_interval : int\r\n Batch count period for logging.\r\n\r\n Returns\r\n -------\r\n float\r\n Loss value.\r\n \"\"\"\r\n tic = time.time()\r\n net.train()\r\n train_metric.reset()\r\n train_loss = 0.0\r\n\r\n btic = time.time()\r\n for i, (data, target) in enumerate(train_data):\r\n if use_cuda:\r\n data = data.cuda(non_blocking=True)\r\n target = target.cuda(non_blocking=True)\r\n output = net(data)\r\n loss = L(output, target)\r\n optimizer.zero_grad()\r\n loss.backward()\r\n optimizer.step()\r\n\r\n train_loss += loss.item()\r\n\r\n train_metric.update(\r\n labels=target,\r\n preds=output)\r\n\r\n if log_interval and not (i + 1) % log_interval:\r\n speed = batch_size * log_interval / (time.time() - btic)\r\n btic = time.time()\r\n train_accuracy_msg = report_accuracy(metric=train_metric)\r\n logging.info(\"Epoch[{}] Batch [{}]\\tSpeed: {:.2f} samples/sec\\t{}\\tlr={:.5f}\".format(\r\n epoch + 1, i, speed, train_accuracy_msg, optimizer.param_groups[0][\"lr\"]))\r\n\r\n throughput = int(batch_size * (i + 1) / (time.time() - tic))\r\n logging.info(\"[Epoch {}] speed: {:.2f} samples/sec\\ttime cost: {:.2f} sec\".format(\r\n epoch + 1, throughput, time.time() - tic))\r\n\r\n train_loss /= (i + 1)\r\n train_accuracy_msg = report_accuracy(metric=train_metric)\r\n logging.info(\"[Epoch {}] training: {}\\tloss={:.4f}\".format(\r\n epoch + 1, train_accuracy_msg, train_loss))\r\n\r\n return train_loss\r\n\r\n\r\ndef train_net(batch_size,\r\n num_epochs,\r\n start_epoch1,\r\n train_data,\r\n val_data,\r\n net,\r\n optimizer,\r\n lr_scheduler,\r\n lp_saver,\r\n log_interval,\r\n num_classes,\r\n val_metric,\r\n train_metric,\r\n use_cuda):\r\n \"\"\"\r\n Main procedure for training model.\r\n\r\n Parameters:\r\n ----------\r\n batch_size : int\r\n Training batch size.\r\n num_epochs : int\r\n Number of training epochs.\r\n start_epoch1 : int\r\n Number of starting epoch (1-based).\r\n train_data : DataLoader\r\n Data loader (training subset).\r\n val_data : DataLoader\r\n Data loader (validation subset).\r\n net : Module\r\n Model.\r\n optimizer : Optimizer\r\n Optimizer.\r\n lr_scheduler : LRScheduler\r\n Learning rate scheduler.\r\n lp_saver : TrainLogParamSaver\r\n Model/trainer state saver.\r\n log_interval : int\r\n Batch count period for logging.\r\n num_classes : int\r\n Number of model classes.\r\n val_metric : EvalMetric\r\n Metric object instance (validation subset).\r\n train_metric : EvalMetric\r\n Metric object instance (training subset).\r\n use_cuda : bool\r\n Whether to use CUDA.\r\n \"\"\"\r\n assert (num_classes > 0)\r\n\r\n L = nn.CrossEntropyLoss()\r\n if use_cuda:\r\n L = L.cuda()\r\n\r\n assert (type(start_epoch1) == int)\r\n assert (start_epoch1 >= 1)\r\n if start_epoch1 > 1:\r\n logging.info(\"Start training from [Epoch {}]\".format(start_epoch1))\r\n validate(\r\n metric=val_metric,\r\n net=net,\r\n val_data=val_data,\r\n use_cuda=use_cuda)\r\n val_accuracy_msg = report_accuracy(metric=val_metric)\r\n logging.info(\"[Epoch {}] validation: {}\".format(start_epoch1 - 1, val_accuracy_msg))\r\n\r\n gtic = time.time()\r\n for epoch in range(start_epoch1 - 1, num_epochs):\r\n lr_scheduler.step()\r\n\r\n train_loss = train_epoch(\r\n epoch=epoch,\r\n net=net,\r\n train_metric=train_metric,\r\n train_data=train_data,\r\n use_cuda=use_cuda,\r\n L=L,\r\n optimizer=optimizer,\r\n # lr_scheduler,\r\n batch_size=batch_size,\r\n log_interval=log_interval)\r\n\r\n validate(\r\n metric=val_metric,\r\n net=net,\r\n val_data=val_data,\r\n use_cuda=use_cuda)\r\n val_accuracy_msg = report_accuracy(metric=val_metric)\r\n logging.info(\"[Epoch {}] validation: {}\".format(epoch + 1, val_accuracy_msg))\r\n\r\n if lp_saver is not None:\r\n state = {\r\n \"epoch\": epoch + 1,\r\n \"state_dict\": net.state_dict(),\r\n \"optimizer\": optimizer.state_dict(),\r\n }\r\n lp_saver_kwargs = {\"state\": state}\r\n val_acc_values = val_metric.get()[1]\r\n train_acc_values = train_metric.get()[1]\r\n val_acc_values = val_acc_values if type(val_acc_values) == list else [val_acc_values]\r\n train_acc_values = train_acc_values if type(train_acc_values) == list else [train_acc_values]\r\n lp_saver.epoch_test_end_callback(\r\n epoch1=(epoch + 1),\r\n params=(val_acc_values + train_acc_values + [train_loss, optimizer.param_groups[0][\"lr\"]]),\r\n **lp_saver_kwargs)\r\n\r\n logging.info(\"Total time cost: {:.2f} sec\".format(time.time() - gtic))\r\n if lp_saver is not None:\r\n opt_metric_name = get_metric_name(val_metric, lp_saver.acc_ind)\r\n logging.info(\"Best {}: {:.4f} at {} epoch\".format(\r\n opt_metric_name, lp_saver.best_eval_metric_value, lp_saver.best_eval_metric_epoch))\r\n\r\n\r\ndef main():\r\n \"\"\"\r\n Main body of script.\r\n \"\"\"\r\n args = parse_args()\r\n args.seed = init_rand(seed=args.seed)\r\n\r\n _, log_file_exist = initialize_logging(\r\n logging_dir_path=args.save_dir,\r\n logging_file_name=args.logging_file_name,\r\n script_args=args,\r\n log_packages=args.log_packages,\r\n log_pip_packages=args.log_pip_packages)\r\n\r\n use_cuda, batch_size = prepare_pt_context(\r\n num_gpus=args.num_gpus,\r\n batch_size=args.batch_size)\r\n\r\n net = prepare_model(\r\n model_name=args.model,\r\n use_pretrained=args.use_pretrained,\r\n pretrained_model_file_path=args.resume.strip(),\r\n use_cuda=use_cuda)\r\n real_net = net.module if hasattr(net, \"module\") else net\r\n assert (hasattr(real_net, \"num_classes\"))\r\n num_classes = real_net.num_classes\r\n\r\n ds_metainfo = get_dataset_metainfo(dataset_name=args.dataset)\r\n ds_metainfo.update(args=args)\r\n\r\n train_data = get_train_data_source(\r\n ds_metainfo=ds_metainfo,\r\n batch_size=batch_size,\r\n num_workers=args.num_workers)\r\n val_data = get_val_data_source(\r\n ds_metainfo=ds_metainfo,\r\n batch_size=batch_size,\r\n num_workers=args.num_workers)\r\n\r\n optimizer, lr_scheduler, start_epoch = prepare_trainer(\r\n net=net,\r\n optimizer_name=args.optimizer_name,\r\n wd=args.wd,\r\n momentum=args.momentum,\r\n lr_mode=args.lr_mode,\r\n lr=args.lr,\r\n lr_decay_period=args.lr_decay_period,\r\n lr_decay_epoch=args.lr_decay_epoch,\r\n lr_decay=args.lr_decay,\r\n num_epochs=args.num_epochs,\r\n state_file_path=args.resume_state)\r\n\r\n if args.save_dir and args.save_interval:\r\n param_names = ds_metainfo.val_metric_capts + ds_metainfo.train_metric_capts + [\"Train.Loss\", \"LR\"]\r\n lp_saver = TrainLogParamSaver(\r\n checkpoint_file_name_prefix=\"{}_{}\".format(ds_metainfo.short_label, args.model),\r\n last_checkpoint_file_name_suffix=\"last\",\r\n best_checkpoint_file_name_suffix=None,\r\n last_checkpoint_dir_path=args.save_dir,\r\n best_checkpoint_dir_path=None,\r\n last_checkpoint_file_count=2,\r\n best_checkpoint_file_count=2,\r\n checkpoint_file_save_callback=save_params,\r\n checkpoint_file_exts=(\".pth\", \".states\"),\r\n save_interval=args.save_interval,\r\n num_epochs=args.num_epochs,\r\n param_names=param_names,\r\n acc_ind=ds_metainfo.saver_acc_ind,\r\n # bigger=[True],\r\n # mask=None,\r\n score_log_file_path=os.path.join(args.save_dir, \"score.log\"),\r\n score_log_attempt_value=args.attempt,\r\n best_map_log_file_path=os.path.join(args.save_dir, \"best_map.log\"))\r\n else:\r\n lp_saver = None\r\n\r\n train_net(\r\n batch_size=batch_size,\r\n num_epochs=args.num_epochs,\r\n start_epoch1=args.start_epoch,\r\n train_data=train_data,\r\n val_data=val_data,\r\n net=net,\r\n optimizer=optimizer,\r\n lr_scheduler=lr_scheduler,\r\n lp_saver=lp_saver,\r\n log_interval=args.log_interval,\r\n num_classes=num_classes,\r\n val_metric=get_composite_metric(ds_metainfo.val_metric_names, ds_metainfo.val_metric_extra_kwargs),\r\n train_metric=get_composite_metric(ds_metainfo.train_metric_names, ds_metainfo.train_metric_extra_kwargs),\r\n use_cuda=use_cuda)\r\n\r\n\r\nif __name__ == \"__main__\":\r\n main()\r\n"} +{"text": "r'''\nThis tests the '_objects' attribute of ctypes instances. '_objects'\nholds references to objects that must be kept alive as long as the\nctypes instance, to make sure that the memory buffer is valid.\n\nWARNING: The '_objects' attribute is exposed ONLY for debugging ctypes itself,\nit MUST NEVER BE MODIFIED!\n\n'_objects' is initialized to a dictionary on first use, before that it\nis None.\n\nHere is an array of string pointers:\n\n>>> from ctypes import *\n>>> array = (c_char_p * 5)()\n>>> print array._objects\nNone\n>>>\n\nThe memory block stores pointers to strings, and the strings itself\nassigned from Python must be kept.\n\n>>> array[4] = 'foo bar'\n>>> array._objects\n{'4': 'foo bar'}\n>>> array[4]\n'foo bar'\n>>>\n\nIt gets more complicated when the ctypes instance itself is contained\nin a 'base' object.\n\n>>> class X(Structure):\n... _fields_ = [(\"x\", c_int), (\"y\", c_int), (\"array\", c_char_p * 5)]\n...\n>>> x = X()\n>>> print x._objects\nNone\n>>>\n\nThe'array' attribute of the 'x' object shares part of the memory buffer\nof 'x' ('_b_base_' is either None, or the root object owning the memory block):\n\n>>> print x.array._b_base_ # doctest: +ELLIPSIS\n<ctypes.test.test_objects.X object at 0x...>\n>>>\n\n>>> x.array[0] = 'spam spam spam'\n>>> x._objects\n{'0:2': 'spam spam spam'}\n>>> x.array._b_base_._objects\n{'0:2': 'spam spam spam'}\n>>>\n\n'''\n\nimport unittest, doctest, sys\n\nimport ctypes.test.test_objects\n\nclass TestCase(unittest.TestCase):\n if sys.hexversion > 0x02040000:\n # Python 2.3 has no ELLIPSIS flag, so we don't test with this\n # version:\n def test(self):\n doctest.testmod(ctypes.test.test_objects)\n\nif __name__ == '__main__':\n if sys.hexversion > 0x02040000:\n doctest.testmod(ctypes.test.test_objects)\n"} +{"text": "/* $Id: expand.h,v 1.9 2006/12/18 10:12:25 rockyb Exp $\nCopyright (C) 2005, 2020 R. Bernstein <rocky@gnu.org>\nThis file is part of GNU Make (remake variant).\n\nGNU Make is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation; either version 2, or (at your option)\nany later version.\n\nGNU Make is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with GNU Make; see the file COPYING. If not, write to\nthe Free Software Foundation, Inc., 59 Temple Place - Suite 330,\nBoston, MA 02111-1307, USA. */\n\n/** \\file src/expand.h\n *\n * \\brief Header for src/expand.c - variable expansion functions\n */\n\n#ifndef REMAKE_EXPAND_H\n#define REMAKE_EXPAND_H\n\n#include \"variable.h\"\n#include \"filedef.h\"\n\n/*! Like variable_expand_for_file, but the returned string is malloc'd.\n This function is called a lot. It wants to be efficient. */\n\nextern char *allocated_variable_expand_for_file(const char *psz_line,\n\t\t\t\t\t\tfile_t *p_file);\n\n\n/*! Expand an argument for an expansion function. The text starting\n at STR and ending at END is variable-expanded into a\n null-terminated string that is returned as the value. This is done\n without clobbering `variable_buffer' or the current\n variable-expansion that is in progress. */\n\n//extern char *expand_argument(const char *str, const char *end);\n\n/*! Install a new variable_buffer context, returning the current one for\n safe-keeping. */\n\n//extern void install_variable_buffer (char **pp_buf, unsigned int *pi_len);\n\n/*! Restore a previously-saved variable_buffer setting (free the current one).\n */\n\n#define recursively_expand(v) recursively_expand_for_file (v, NULL)\n\n/*! Recursively expand V. The returned string is malloc'd. */\n//extern char *recursively_expand_for_file(variable_t *v, file_t *file);\n\n/*! Subroutine of variable_expand and friends:\n The text to add is LENGTH chars starting at STRING to the variable_buffer.\n The text is added to the buffer at PTR, and the updated pointer into\n the buffer is returned as the value. Thus, the value returned by\n each call to variable_buffer_output should be the first argument to\n the following call. */\n\n//extern void restore_variable_buffer(char *p_buf, unsigned int len);\n\n/** Expand PSZ_LINE. Expansion uses P_FILE_SET if it is not NULL. */\nextern char *variable_expand_set (char *psz_line,\n\t\t\t\t variable_set_list_t *p_file_set);\n\n#endif /*REMAKE_EXPAND_H*/\n"} +{"text": "/**\n* @file tests/llvmir2hll/optimizer/optimizers/var_def_stmt_optimizer_tests.cpp\n* @brief Tests for the @c var_def_stmt_optimizer module.\n* @copyright (c) 2017 Avast Software, licensed under the MIT license\n*/\n\n#include <gtest/gtest.h>\n\n#include \"llvmir2hll/analysis/tests_with_value_analysis.h\"\n#include \"retdec/llvmir2hll/ir/add_op_expr.h\"\n#include \"retdec/llvmir2hll/ir/assign_op_expr.h\"\n#include \"retdec/llvmir2hll/ir/assign_stmt.h\"\n#include \"retdec/llvmir2hll/ir/const_int.h\"\n#include \"retdec/llvmir2hll/ir/empty_stmt.h\"\n#include \"retdec/llvmir2hll/ir/expression.h\"\n#include \"retdec/llvmir2hll/ir/float_type.h\"\n#include \"retdec/llvmir2hll/ir/for_loop_stmt.h\"\n#include \"retdec/llvmir2hll/ir/function.h\"\n#include \"retdec/llvmir2hll/ir/goto_stmt.h\"\n#include \"retdec/llvmir2hll/ir/if_stmt.h\"\n#include \"retdec/llvmir2hll/ir/int_type.h\"\n#include \"retdec/llvmir2hll/ir/module.h\"\n#include \"retdec/llvmir2hll/ir/return_stmt.h\"\n#include \"retdec/llvmir2hll/ir/switch_stmt.h\"\n#include \"llvmir2hll/ir/assertions.h\"\n#include \"llvmir2hll/ir/tests_with_module.h\"\n#include \"retdec/llvmir2hll/ir/ufor_loop_stmt.h\"\n#include \"retdec/llvmir2hll/ir/var_def_stmt.h\"\n#include \"retdec/llvmir2hll/ir/variable.h\"\n#include \"retdec/llvmir2hll/ir/while_loop_stmt.h\"\n#include \"retdec/llvmir2hll/optimizer/optimizers/var_def_stmt_optimizer.h\"\n\nusing namespace ::testing;\n\nnamespace retdec {\nnamespace llvmir2hll {\nnamespace tests {\n\n/**\n* @brief Tests for the @c var_def_stmt_optimizer module.\n*/\nclass VarDefStmtOptimizerTests: public TestsWithModule {};\n\nTEST_F(VarDefStmtOptimizerTests,\nOptimizerHasNonEmptyID) {\n\tINSTANTIATE_ALIAS_ANALYSIS_AND_VALUE_ANALYSIS(module);\n\n\tShPtr<VarDefStmtOptimizer> optimizer(new VarDefStmtOptimizer(module, va));\n\n\tEXPECT_TRUE(!optimizer->getId().empty()) <<\n\t\t\"the optimizer should have a non-empty ID\";\n}\n\nTEST_F(VarDefStmtOptimizerTests,\nSimpleOptimizeToAssignStmtOptimize) {\n\t// void test() {\n\t// int a;\n\t// a = b + c;\n\t// return a;\n\t// }\n\t// Can be optimized to.\n\t// void test() {\n\t// int a = b + c;\n\t// return a;\n\t// }\n\tShPtr<Variable> varA(Variable::create(\"a\", IntType::create(32)));\n\tShPtr<Variable> varB(Variable::create(\"b\", IntType::create(32)));\n\tShPtr<Variable> varC(Variable::create(\"c\", IntType::create(32)));\n\ttestFunc->addLocalVar(varA);\n\ttestFunc->addLocalVar(varB);\n\ttestFunc->addLocalVar(varC);\n\tShPtr<ReturnStmt> returnA(ReturnStmt::create(varA));\n\tShPtr<AddOpExpr> addOpExpr(AddOpExpr::create(varB, varC));\n\tShPtr<AssignStmt> assignA(AssignStmt::create(varA, addOpExpr, returnA));\n\tShPtr<VarDefStmt> varDefA(VarDefStmt::create(varA, ShPtr<Expression>(), assignA));\n\ttestFunc->setBody(varDefA);\n\n\tINSTANTIATE_ALIAS_ANALYSIS_AND_VALUE_ANALYSIS(module);\n\tOptimizer::optimize<VarDefStmtOptimizer>(module, va);\n\n\t// Check that the output is correct.\n\tASSERT_TRUE(testFunc->getBody()) <<\n\t\t\"expected a non-empty body\";\n\tShPtr<VarDefStmt> outVarDefStmt(cast<VarDefStmt>(testFunc->getBody()));\n\tASSERT_TRUE(outVarDefStmt) <<\n\t\t\"expected VarDefStmt, got \" << testFunc->getBody();\n\tASSERT_TRUE(outVarDefStmt->hasInitializer()) <<\n\t\t\"expected VarDefStmt with initializer\";\n\tASSERT_EQ(outVarDefStmt->getVar(), varA) <<\n\t\t\"expected Variable A, got \" << outVarDefStmt->getVar();\n\tShPtr<AddOpExpr> outAddOpExpr(cast<AddOpExpr>(outVarDefStmt->getInitializer()));\n\tASSERT_TRUE(outAddOpExpr) <<\n\t\t\"expected AddOpExpr, got \" << outVarDefStmt->getInitializer();\n\tASSERT_EQ(addOpExpr, outAddOpExpr) <<\n\t\t\"expected AddOpExpr, got\" << outVarDefStmt->getInitializer();\n}\n\nTEST_F(VarDefStmtOptimizerTests,\nSimpleOptimizeToAssignStmtNotOptimize) {\n\t// void test() {\n\t// int a;\n\t// a = a + c;\n\t// return a;\n\t// }\n\t// Can't be optimized.\n\t//\n\tShPtr<Variable> varA(Variable::create(\"a\", IntType::create(32)));\n\tShPtr<Variable> varC(Variable::create(\"c\", IntType::create(32)));\n\ttestFunc->addLocalVar(varA);\n\ttestFunc->addLocalVar(varC);\n\tShPtr<ReturnStmt> returnA(ReturnStmt::create(varA));\n\tShPtr<AddOpExpr> addOpExpr(AddOpExpr::create(varA, varC));\n\tShPtr<AssignStmt> assignA(AssignStmt::create(varA, addOpExpr, returnA));\n\tShPtr<VarDefStmt> varDefA(VarDefStmt::create(varA, ShPtr<Expression>(), assignA));\n\ttestFunc->setBody(varDefA);\n\n\tINSTANTIATE_ALIAS_ANALYSIS_AND_VALUE_ANALYSIS(module);\n\tOptimizer::optimize<VarDefStmtOptimizer>(module, va);\n\n\t// Check that the output is correct.\n\tASSERT_TRUE(testFunc->getBody()) <<\n\t\t\"expected a non-empty body\";\n\tShPtr<VarDefStmt> outVarDefStmt(cast<VarDefStmt>(testFunc->getBody()));\n\tASSERT_TRUE(outVarDefStmt) <<\n\t\t\"expected VarDefStmt, got \" << testFunc->getBody();\n\tASSERT_FALSE(outVarDefStmt->hasInitializer()) <<\n\t\t\"expected VarDefStmt without initializer\";\n}\n\nTEST_F(VarDefStmtOptimizerTests,\nMoveVarDefStmtToCloserOptimize) {\n\t// void test() {\n\t// int c;\n\t// int a;\n\t// int b;\n\t// if (1) {\n\t// a = c;\n\t// }\n\t// c = a;\n\t// }\n\t// Can be optimized to:\n\t// void test() {\n\t// int b;\n\t// int a;\n\t// int c;\n\t// if (1) {\n\t// a = c;\n\t// }\n\t// c = a;\n\t// }\n\tShPtr<Variable> varA(Variable::create(\"a\", IntType::create(32)));\n\ttestFunc->addLocalVar(varA);\n\tShPtr<Variable> varB(Variable::create(\"b\", IntType::create(32)));\n\ttestFunc->addLocalVar(varB);\n\tShPtr<Variable> varC(Variable::create(\"c\", IntType::create(32)));\n\ttestFunc->addLocalVar(varC);\n\tShPtr<AssignStmt> assignAC(AssignStmt::create(varA, varC));\n\tShPtr<AssignStmt> assignCA(AssignStmt::create(varC, varA));\n\tShPtr<IfStmt> ifStmt(IfStmt::create(ConstInt::create(1, 32), assignAC, assignCA));\n\tShPtr<VarDefStmt> varDefB(VarDefStmt::create(varB, ShPtr<Expression>(), ifStmt));\n\tShPtr<VarDefStmt> varDefA(VarDefStmt::create(varA, ShPtr<Expression>(), varDefB));\n\tShPtr<VarDefStmt> varDefC(VarDefStmt::create(varC, ShPtr<Expression>(), varDefA));\n\ttestFunc->setBody(varDefC);\n\n\tINSTANTIATE_ALIAS_ANALYSIS_AND_VALUE_ANALYSIS(module);\n\tOptimizer::optimize<VarDefStmtOptimizer>(module, va);\n\n\t// Check that the output is correct.\n\tASSERT_TRUE(testFunc->getBody()) <<\n\t\t\"expected a non-empty body\";\n\tShPtr<VarDefStmt> outVarDefB(cast<VarDefStmt>(testFunc->getBody()));\n\tASSERT_TRUE(outVarDefB) <<\n\t\t\"expected VarDefStmt, got \" << testFunc->getBody();\n\tASSERT_EQ(varDefB->getVar(), outVarDefB->getVar()) <<\n\t\t\"expected \" << varDefB << \", got \" << outVarDefB;\n\tASSERT_EQ(varDefB->getInitializer(), outVarDefB->getInitializer()) <<\n\t\t\"expected \" << varDefB << \", got \" << outVarDefB;\n\tShPtr<VarDefStmt> outVarDefA(cast<VarDefStmt>(outVarDefB->getSuccessor()));\n\tASSERT_TRUE(outVarDefA) <<\n\t\t\"expected VarDefStmt, got \" << outVarDefB->getSuccessor();\n\tASSERT_EQ(varDefA->getVar(), outVarDefA->getVar()) <<\n\t\t\"expected \" << varDefA << \", got \" << outVarDefA;\n\tASSERT_EQ(varDefA->getInitializer(), outVarDefA->getInitializer()) <<\n\t\t\"expected \" << varDefA << \", got \" << outVarDefA;\n\tShPtr<VarDefStmt> outVarDefC(cast<VarDefStmt>(outVarDefA->getSuccessor()));\n\tASSERT_TRUE(outVarDefC) <<\n\t\t\"expected VarDefStmt, got \" << outVarDefA->getSuccessor();\n\tASSERT_EQ(varDefC->getVar(), outVarDefC->getVar()) <<\n\t\t\"expected \" << varDefC << \", got \" << outVarDefC;\n\tASSERT_EQ(varDefA->getInitializer(), outVarDefC->getInitializer()) <<\n\t\t\"expected \" << varDefC << \", got \" << outVarDefC;\n}\n\nTEST_F(VarDefStmtOptimizerTests,\nMoveVarDefStmtToCloserWithAssignAfterWhileOptimize) {\n\t// void test() {\n\t// int c;\n\t// int a;\n\t// int b;\n\t// while (1) {\n\t// a = c;\n\t// }\n\t// a = c;\n\t// }\n\t// Can be optimized to:\n\t// void test() {\n\t// int b;\n\t// int a;\n\t// int c;\n\t// while (1) {\n\t// a = c;\n\t// }\n\t// a = c;\n\t// }\n\tShPtr<Variable> varA(Variable::create(\"a\", IntType::create(32)));\n\ttestFunc->addLocalVar(varA);\n\tShPtr<Variable> varB(Variable::create(\"b\", IntType::create(32)));\n\ttestFunc->addLocalVar(varB);\n\tShPtr<Variable> varC(Variable::create(\"c\", IntType::create(32)));\n\ttestFunc->addLocalVar(varC);\n\tShPtr<AssignStmt> assignAC(AssignStmt::create(varA, varC));\n\tShPtr<WhileLoopStmt> whileStmt(WhileLoopStmt::create(ConstInt::create(1, 32), assignAC, assignAC));\n\tShPtr<VarDefStmt> varDefB(VarDefStmt::create(varB, ShPtr<Expression>(), whileStmt));\n\tShPtr<VarDefStmt> varDefA(VarDefStmt::create(varA, ShPtr<Expression>(), varDefB));\n\tShPtr<VarDefStmt> varDefC(VarDefStmt::create(varC, ShPtr<Expression>(), varDefA));\n\ttestFunc->setBody(varDefC);\n\n\tINSTANTIATE_ALIAS_ANALYSIS_AND_VALUE_ANALYSIS(module);\n\tOptimizer::optimize<VarDefStmtOptimizer>(module, va);\n\n\t// Check that the output is correct.\n\tASSERT_TRUE(testFunc->getBody()) << \"expected a non-empty body\";\n\tShPtr<VarDefStmt> outVarDefB(cast<VarDefStmt>(testFunc->getBody()));\n\tASSERT_TRUE(outVarDefB) <<\n\t\t\"expected VarDefStmt, got \" << testFunc->getBody();\n\tASSERT_EQ(varDefB->getVar(), outVarDefB->getVar()) <<\n\t\t\"expected \" << varDefB << \", got \" << outVarDefB;\n\tASSERT_EQ(varDefB->getInitializer(), outVarDefB->getInitializer()) <<\n\t\t\"expected \" << varDefB << \", got \" << outVarDefB;\n\tShPtr<VarDefStmt> outVarDefA(cast<VarDefStmt>(outVarDefB->getSuccessor()));\n\tASSERT_TRUE(outVarDefA) <<\n\t\t\"expected VarDefStmt, got \" << outVarDefB->getSuccessor();\n\tASSERT_EQ(varDefA->getVar(), outVarDefA->getVar()) <<\n\t\t\"expected \" << varDefA << \", got \" << outVarDefA;\n\tASSERT_EQ(varDefA->getInitializer(), outVarDefA->getInitializer()) <<\n\t\t\"expected \" << varDefA << \", got \" << outVarDefA;\n\tShPtr<VarDefStmt> outVarDefC(cast<VarDefStmt>(outVarDefA->getSuccessor()));\n\tASSERT_TRUE(outVarDefC) <<\n\t\t\"expected VarDefStmt, got \" << outVarDefA->getSuccessor();\n\tASSERT_EQ(varDefC->getVar(), outVarDefC->getVar()) <<\n\t\t\"expected \" << varDefC << \", got \" << outVarDefC;\n\tASSERT_EQ(varDefC->getInitializer(), outVarDefC->getInitializer()) <<\n\t\t\"expected \" << varDefC << \", got \" << outVarDefC;\n}\n\nTEST_F(VarDefStmtOptimizerTests,\nGotoStmtOptimize) {\n\t// void test() {\n\t// int a;\n\t// if (1) {\n\t// goto return a;\n\t// }\n\t// a = 1;\n\t// return a;\n\t// }\n\t// Can be optimized to:\n\t// void test() {\n\t// if (1) {\n\t// goto return a;\n\t// }\n\t// int a = 1;\n\t// return a;\n\t// }\n\n\tShPtr<Variable> varA(Variable::create(\"a\", IntType::create(32)));\n\ttestFunc->addLocalVar(varA);\n\tShPtr<ReturnStmt> returnA(ReturnStmt::create(varA));\n\tShPtr<AssignStmt> assignA(AssignStmt::create(varA, ConstInt::create(1, 32), returnA));\n\tShPtr<GotoStmt> gotoStmt(GotoStmt::create(returnA));\n\tShPtr<IfStmt> ifStmt(IfStmt::create(ConstInt::create(1, 32), gotoStmt, assignA));\n\tShPtr<VarDefStmt> varDefA(VarDefStmt::create(varA, ShPtr<Expression>(), ifStmt));\n\ttestFunc->setBody(varDefA);\n\n\tINSTANTIATE_ALIAS_ANALYSIS_AND_VALUE_ANALYSIS(module);\n\tOptimizer::optimize<VarDefStmtOptimizer>(module, va);\n\n\t// Check that the output is correct.\n\tASSERT_TRUE(testFunc->getBody()) <<\n\t\t\"expected a non-empty body\";\n\tShPtr<IfStmt> outIfStmt(cast<IfStmt>(testFunc->getBody()));\n\tASSERT_TRUE(outIfStmt) << \"expected IfStmt, got\" << testFunc->getBody();\n\tShPtr<VarDefStmt> outVarDefA(cast<VarDefStmt>(ifStmt->getSuccessor()));\n\tASSERT_TRUE(outVarDefA) <<\n\t\t\"expected VarDefStmt, got \" << ifStmt->getSuccessor();\n\tASSERT_EQ(varDefA->getVar(), outVarDefA->getVar()) <<\n\t\t\"expected \" << varDefA << \", got \" << outVarDefA;\n}\n\nTEST_F(VarDefStmtOptimizerTests,\nMoveVarDefStmtToCloserWhileOptimize) {\n\t// void test() {\n\t// int c;\n\t// int a;\n\t// int b;\n\t// while (1) {\n\t// a = c;\n\t// }\n\t// }\n\t// Can be optimized to:\n\t// void test() {\n\t// int b;\n\t// while (1) {\n\t// int c;\n\t// int a = c;\n\t// }\n\t// }\n\tShPtr<Variable> varA(Variable::create(\"a\", IntType::create(32)));\n\ttestFunc->addLocalVar(varA);\n\tShPtr<Variable> varB(Variable::create(\"b\", IntType::create(32)));\n\ttestFunc->addLocalVar(varB);\n\tShPtr<Variable> varC(Variable::create(\"c\", IntType::create(32)));\n\ttestFunc->addLocalVar(varC);\n\tShPtr<AssignStmt> assignAC(AssignStmt::create(varA, varC));\n\tShPtr<WhileLoopStmt> whileStmt(WhileLoopStmt::create(ConstInt::create(1, 32), assignAC));\n\tShPtr<VarDefStmt> varDefB(VarDefStmt::create(varB, ShPtr<Expression>(), whileStmt));\n\tShPtr<VarDefStmt> varDefA(VarDefStmt::create(varA, ShPtr<Expression>(), varDefB));\n\tShPtr<VarDefStmt> varDefC(VarDefStmt::create(varC, ShPtr<Expression>(), varDefA));\n\ttestFunc->setBody(varDefC);\n\n\tINSTANTIATE_ALIAS_ANALYSIS_AND_VALUE_ANALYSIS(module);\n\tOptimizer::optimize<VarDefStmtOptimizer>(module, va);\n\n\t// Check that the output is correct.\n\tASSERT_TRUE(testFunc->getBody()) <<\n\t\t\"expected a non-empty body\";\n\tShPtr<VarDefStmt> outVarDefB(cast<VarDefStmt>(testFunc->getBody()));\n\tASSERT_TRUE(outVarDefB) <<\n\t\t\"expected VarDefStmt, got \" << testFunc->getBody();\n\tASSERT_EQ(varDefB->getVar(), outVarDefB->getVar()) <<\n\t\t\"expected \" << varDefB << \", got \" << outVarDefB;\n\tASSERT_EQ(varDefB->getInitializer(), outVarDefB->getInitializer()) <<\n\t\t\"expected \" << varDefB << \", got \" << outVarDefB;\n\tShPtr<WhileLoopStmt> outWhileLoop(cast<WhileLoopStmt>(outVarDefB->getSuccessor()));\n\tASSERT_TRUE(outWhileLoop) <<\n\t\t\"expected while loop, got \" << outVarDefB->getSuccessor();\n\tShPtr<VarDefStmt> outVarDefC(cast<VarDefStmt>(outWhileLoop->getBody()));\n\tASSERT_TRUE(outVarDefC) <<\n\t\t\"expected VarDefStmt, got \" << outWhileLoop->getBody();\n\tASSERT_EQ(varDefC->getVar(), outVarDefC->getVar()) <<\n\t\t\"expected \" << varDefC << \", got \" << outVarDefC;\n\tASSERT_EQ(varDefC->getInitializer(), outVarDefC->getInitializer()) <<\n\t\t\"expected \" << varDefC << \", got \" << outVarDefC;\n\tShPtr<VarDefStmt> outVarDefA(cast<VarDefStmt>(outVarDefC->getSuccessor()));\n\tASSERT_TRUE(outVarDefA) <<\n\t\t\"expected VarDefStmt, got \" << outVarDefA->getSuccessor();\n\tASSERT_EQ(varDefA->getVar(), outVarDefA->getVar()) <<\n\t\t\"expected \" << varDefA << \", got \" << outVarDefC;\n}\n\nTEST_F(VarDefStmtOptimizerTests,\nMoveVarDefStmtToCloserForOptimize) {\n\t// void test() {\n\t// int c;\n\t// int a;\n\t// int b;\n\t// for (b = 1; 1; b++) {\n\t// a = c;\n\t// }\n\t// }\n\t// Can be optimized to:\n\t// void test() {\n\t// int b;\n\t// for (b = 1; 1; b++) {\n\t// int c;\n\t// int a = c;\n\t// }\n\t// }\n\tShPtr<Variable> varA(Variable::create(\"a\", IntType::create(32)));\n\ttestFunc->addLocalVar(varA);\n\tShPtr<Variable> varB(Variable::create(\"b\", IntType::create(32)));\n\ttestFunc->addLocalVar(varB);\n\tShPtr<Variable> varC(Variable::create(\"c\", IntType::create(32)));\n\ttestFunc->addLocalVar(varC);\n\tShPtr<AssignStmt> assignAC(AssignStmt::create(varA, varC));\n\tShPtr<ForLoopStmt> forStmt(ForLoopStmt::create(varB, ConstInt::create(1, 32),\n\t\tConstInt::create(1, 32),ConstInt::create(1, 32), assignAC));\n\tShPtr<VarDefStmt> varDefB(VarDefStmt::create(varB, ShPtr<Expression>(), forStmt));\n\tShPtr<VarDefStmt> varDefA(VarDefStmt::create(varA, ShPtr<Expression>(), varDefB));\n\tShPtr<VarDefStmt> varDefC(VarDefStmt::create(varC, ShPtr<Expression>(), varDefA));\n\ttestFunc->setBody(varDefC);\n\n\tINSTANTIATE_ALIAS_ANALYSIS_AND_VALUE_ANALYSIS(module);\n\tOptimizer::optimize<VarDefStmtOptimizer>(module, va);\n\n\t// Check that the output is correct.\n\tASSERT_TRUE(testFunc->getBody()) <<\n\t\t\"expected a non-empty body\";\n\tShPtr<VarDefStmt> outVarDefB(cast<VarDefStmt>(testFunc->getBody()));\n\tASSERT_TRUE(outVarDefB) <<\n\t\t\"expected VarDefStmt, got \" << testFunc->getBody();\n\tASSERT_EQ(varDefB->getVar(), outVarDefB->getVar()) <<\n\t\t\"expected \" << varDefB << \", got \" << outVarDefB;\n\tASSERT_EQ(varDefB->getInitializer(), outVarDefB->getInitializer()) <<\n\t\t\"expected \" << varDefB << \", got \" << outVarDefB;\n\tShPtr<ForLoopStmt> outForLoop(cast<ForLoopStmt>(outVarDefB->getSuccessor()));\n\tASSERT_TRUE(outForLoop) <<\n\t\t\"expected for loop, got \" << outVarDefB->getSuccessor();\n\tShPtr<VarDefStmt> outVarDefC(cast<VarDefStmt>(outForLoop->getBody()));\n\tASSERT_TRUE(outVarDefC) <<\n\t\t\"expected VarDefStmt, got \" << outForLoop->getBody();\n\tASSERT_EQ(varDefC->getVar(), outVarDefC->getVar()) <<\n\t\t\"expected \" << varDefC << \", got \" << outVarDefC;\n\tASSERT_EQ(varDefC->getInitializer(), outVarDefC->getInitializer()) <<\n\t\t\"expected \" << varDefC << \", got \" << outVarDefC;\n\tShPtr<VarDefStmt> outVarDefA(cast<VarDefStmt>(outVarDefC->getSuccessor()));\n\tASSERT_TRUE(outVarDefA) <<\n\t\t\"expected VarDefStmt, got \" << outVarDefA->getSuccessor();\n\tASSERT_EQ(varDefA->getVar(), outVarDefA->getVar()) <<\n\t\t\"expected \" << varDefA << \", got \" << outVarDefC;\n}\n\nTEST_F(VarDefStmtOptimizerTests,\nMoveVarDefStmtToCloserSwitchStmtOptimize) {\n\t// void test() {\n\t// int c;\n\t// int a;\n\t// int b;\n\t// switch (b) {\n\t// case 1:\n\t// a = c;\n\t// }\n\t// }\n\t// Can be optimized to:\n\t// void test() {\n\t// int b;\n\t// switch (b) {\n\t// case 1:\n\t// int c;\n\t// int a = c;\n\t// }\n\t// }\n\tShPtr<Variable> varA(Variable::create(\"a\", IntType::create(32)));\n\ttestFunc->addLocalVar(varA);\n\tShPtr<Variable> varB(Variable::create(\"b\", IntType::create(32)));\n\ttestFunc->addLocalVar(varB);\n\tShPtr<Variable> varC(Variable::create(\"c\", IntType::create(32)));\n\ttestFunc->addLocalVar(varC);\n\tShPtr<AssignStmt> assignAC(AssignStmt::create(varA, varC));\n\tShPtr<SwitchStmt> switchStmt(SwitchStmt::create(varB));\n\tswitchStmt->addClause(ConstInt::create(1, 32), assignAC);\n\tShPtr<VarDefStmt> varDefB(VarDefStmt::create(varB, ShPtr<Expression>(), switchStmt));\n\tShPtr<VarDefStmt> varDefA(VarDefStmt::create(varA, ShPtr<Expression>(), varDefB));\n\tShPtr<VarDefStmt> varDefC(VarDefStmt::create(varC, ShPtr<Expression>(), varDefA));\n\ttestFunc->setBody(varDefC);\n\n\tINSTANTIATE_ALIAS_ANALYSIS_AND_VALUE_ANALYSIS(module);\n\tOptimizer::optimize<VarDefStmtOptimizer>(module, va);\n\n\t// Check that the output is correct.\n\tASSERT_TRUE(testFunc->getBody()) <<\n\t\t\"expected a non-empty body\";\n\tShPtr<VarDefStmt> outVarDefB(cast<VarDefStmt>(testFunc->getBody()));\n\tASSERT_TRUE(outVarDefB) <<\n\t\t\"expected VarDefStmt, got \" << testFunc->getBody();\n\tASSERT_EQ(varDefB->getVar(), outVarDefB->getVar()) <<\n\t\t\"expected \" << varDefB << \", got \" << outVarDefB;\n\tASSERT_EQ(varDefB->getInitializer(), outVarDefB->getInitializer()) <<\n\t\t\"expected \" << varDefB << \", got \" << outVarDefB;\n\tShPtr<SwitchStmt> outSwitchLoop(cast<SwitchStmt>(outVarDefB->getSuccessor()));\n\tASSERT_TRUE(outSwitchLoop) <<\n\t\t\"expected switch, got \" << outVarDefB->getSuccessor();\n\tShPtr<VarDefStmt> outVarDefC(cast<VarDefStmt>(outSwitchLoop->clause_begin()->second));\n\tASSERT_TRUE(outVarDefC) <<\n\t\t\"expected VarDefStmt, got \" << outSwitchLoop->clause_begin()->second;\n\tASSERT_EQ(varDefC->getVar(), outVarDefC->getVar()) <<\n\t\t\"expected \" << varDefC << \", got \" << outVarDefC;\n\tASSERT_EQ(varDefC->getInitializer(), outVarDefC->getInitializer()) <<\n\t\t\"expected \" << varDefC << \", got \" << outVarDefC;\n\tShPtr<VarDefStmt> outVarDefA(cast<VarDefStmt>(outVarDefC->getSuccessor()));\n\tASSERT_TRUE(outVarDefA) <<\n\t\t\"expected VarDefStmt, got \" << outVarDefA->getSuccessor();\n\tASSERT_EQ(varDefA->getVar(), outVarDefA->getVar()) <<\n\t\t\"expected \" << varDefA << \", got \" << outVarDefC;\n}\n\nTEST_F(VarDefStmtOptimizerTests,\nMoveVarDefStmtToAssignInIfOptimize) {\n\t// void test() {\n\t// int a;\n\t// if (1) {\n\t// a = c;\n\t// }\n\t// }\n\t// Can be optimized to:\n\t// void test() {\n\t// if (1) {\n\t// int a = c;\n\t// }\n\t// }\n\tShPtr<Variable> varA(Variable::create(\"a\", IntType::create(32)));\n\ttestFunc->addLocalVar(varA);\n\tShPtr<Variable> varC(Variable::create(\"c\", IntType::create(32)));\n\ttestFunc->addLocalVar(varC);\n\tShPtr<AssignStmt> assignAC(AssignStmt::create(varA, varC));\n\tShPtr<IfStmt> ifStmt(IfStmt::create(ConstInt::create(1, 32), assignAC));\n\tShPtr<VarDefStmt> varDefA(VarDefStmt::create(varA, ShPtr<Expression>(), ifStmt));\n\ttestFunc->setBody(varDefA);\n\n\tINSTANTIATE_ALIAS_ANALYSIS_AND_VALUE_ANALYSIS(module);\n\tOptimizer::optimize<VarDefStmtOptimizer>(module, va);\n\n\t// Check that the output is correct.\n\tASSERT_TRUE(testFunc->getBody()) <<\n\t\t\"expected a non-empty body\";\n\tShPtr<IfStmt> outIfStmt(cast<IfStmt>(testFunc->getBody()));\n\tASSERT_TRUE(outIfStmt) <<\n\t\t\"expected IfStmt, got \" << testFunc->getBody();\n\tShPtr<VarDefStmt> outVarDefA(cast<VarDefStmt>(outIfStmt->getFirstIfBody()));\n\tASSERT_TRUE(outVarDefA) <<\n\t\t\"expected VarDefStmt, got \" << outIfStmt->getFirstIfBody();\n\tASSERT_EQ(outVarDefA->getVar(), varA) <<\n\t\t\"expected \" << varA << \", got \" << outVarDefA->getVar();\n\tShPtr<Variable> outVarC(cast<Variable>(outVarDefA->getInitializer()));\n\tASSERT_TRUE(outVarC) <<\n\t\t\"expected \"<< varC << \", got \" << outVarDefA->getInitializer();\n\tASSERT_EQ(outVarC, varC) <<\n\t\t\"expected \" << varC << \", got \" << outVarC;\n}\n\nTEST_F(VarDefStmtOptimizerTests,\nNotEasyIfOptimize) {\n\t// void test() {\n\t// int a;\n\t// int c;\n\t// int l;\n\t// l = 1;\n\t// if (1) {\n\t// if (1) {\n\t// a = 5;\n\t// c = 4;\n\t// }\n\t// a = 2;\n\t// } else if (3) {\n\t// c = 4;\n\t// }\n\t// }\n\t// Can be optimized to:\n\t// void test() {\n\t// int l = 1;\n\t// int c;\n\t// if (1) {\n\t// int a;\n\t// if (1) {\n\t// a = 5;\n\t// c = 4;\n\t// }\n\t// a = 2;\n\t// } else if (3) {\n\t// c = 4;\n\t// }\n\t// }\n\tShPtr<Variable> varA(Variable::create(\"a\", IntType::create(32)));\n\ttestFunc->addLocalVar(varA);\n\tShPtr<Variable> varC(Variable::create(\"c\", IntType::create(32)));\n\ttestFunc->addLocalVar(varC);\n\tShPtr<Variable> varL(Variable::create(\"l\", IntType::create(32)));\n\ttestFunc->addLocalVar(varL);\n\tShPtr<AssignStmt> assignA5(AssignStmt::create(varA, ConstInt::create(5, 32)));\n\tShPtr<AssignStmt> assignC4(AssignStmt::create(varC, ConstInt::create(4, 32)));\n\tShPtr<AssignStmt> assignA2(AssignStmt::create(varA, ConstInt::create(2, 32)));\n\tassignA5->setSuccessor(assignC4);\n\tShPtr<IfStmt> ifStmtBot(IfStmt::create(ConstInt::create(3, 32), assignA5));\n\tifStmtBot->setSuccessor(assignA2);\n\tShPtr<IfStmt> ifStmtTop(IfStmt::create(ConstInt::create(1, 32), ifStmtBot));\n\tifStmtTop->addClause(ConstInt::create(3, 32), assignC4);\n\tShPtr<AssignStmt> assignL1(AssignStmt::create(varL, ConstInt::create(1, 32), ifStmtTop));\n\tShPtr<VarDefStmt> varDefA(VarDefStmt::create(varA, ShPtr<Expression>(), assignL1));\n\tShPtr<VarDefStmt> varDefC(VarDefStmt::create(varC, ShPtr<Expression>(), varDefA));\n\tShPtr<VarDefStmt> varDefL(VarDefStmt::create(varL, ShPtr<Expression>(), varDefC));\n\ttestFunc->setBody(varDefL);\n\n\tINSTANTIATE_ALIAS_ANALYSIS_AND_VALUE_ANALYSIS(module);\n\tOptimizer::optimize<VarDefStmtOptimizer>(module, va);\n\n\t// Check that the output is correct.\n\tASSERT_TRUE(testFunc->getBody()) <<\n\t\t\"expected a non-empty body\";\n\tShPtr<VarDefStmt> outVarDefL(cast<VarDefStmt>(testFunc->getBody()));\n\tASSERT_TRUE(outVarDefL) <<\n\t\t\"expected VarDefStmt, got \" << testFunc->getBody();\n\tASSERT_EQ(varDefL->getVar(), outVarDefL->getVar()) <<\n\t\t\"expected \" << varDefL << \", got \" << outVarDefL;\n\tShPtr<VarDefStmt> outVarDefC(cast<VarDefStmt>(outVarDefL->getSuccessor()));\n\tASSERT_TRUE(outVarDefC) <<\n\t\t\"expected VarDefStmt, got \" << outVarDefL->getSuccessor();\n\tASSERT_EQ(varDefC->getVar(), outVarDefC->getVar()) <<\n\t\t\"expected \" << varDefC << \", got \" << outVarDefC;\n\tShPtr<IfStmt> outIfStmt(cast<IfStmt>(outVarDefC->getSuccessor()));\n\tASSERT_TRUE(outIfStmt) <<\n\t\t\"expected IfStmt, got \" << outVarDefC->getSuccessor();\n\tShPtr<VarDefStmt> outVarDefA(cast<VarDefStmt>(outIfStmt->getFirstIfBody()));\n\tASSERT_TRUE(outVarDefA) <<\n\t\t\"expected VarDefStmt, got \" << outIfStmt->getFirstIfBody();\n\tASSERT_EQ(outVarDefA->getVar(), varA) <<\n\t\t\"expected \" << varA << \", got \" << outVarDefA->getVar();\n}\n\nTEST_F(VarDefStmtOptimizerTests,\nPreservesGotoTargetsAndLabelsWhenPrepending) {\n\t//\n\t// void test() {\n\t// int a;\n\t// g = 1;\n\t// my_label:\n\t// g = a;\n\t// goto lab;\n\t// }\n\t//\n\t// can be optimized to\n\t//\n\t// void test() {\n\t// g = 1;\n\t// my_label:\n\t// int a;\n\t// g = a;\n\t// goto lab;\n\t// }\n\t//\n\tauto varG = Variable::create(\"g\", IntType::create(32));\n\tmodule->addGlobalVar(varG);\n\tauto varA = Variable::create(\"a\", IntType::create(32));\n\ttestFunc->addLocalVar(varA);\n\tauto varDefA = VarDefStmt::create(varA);\n\tauto assignG1 = AssignStmt::create(varG, ConstInt::create(1, 32));\n\tvarDefA->setSuccessor(assignG1);\n\tauto assignGA = AssignStmt::create(varG, varA);\n\tassignGA->setLabel(\"my_label\");\n\tassignG1->setSuccessor(assignGA);\n\tauto gotoStmt = GotoStmt::create(assignGA);\n\tassignGA->setSuccessor(gotoStmt);\n\ttestFunc->setBody(varDefA);\n\n\tINSTANTIATE_ALIAS_ANALYSIS_AND_VALUE_ANALYSIS(module);\n\tOptimizer::optimize<VarDefStmtOptimizer>(module, va);\n\n\t// Check that the output is correct.\n\tASSERT_TRUE(testFunc->getBody()) <<\n\t\t\"expected a non-empty body\";\n\tauto outVarDefA = cast<VarDefStmt>(assignG1->getSuccessor());\n\tASSERT_TRUE(outVarDefA) <<\n\t\t\"expected VarDefStmt, got \" << assignG1->getSuccessor();\n\tASSERT_EQ(varDefA->getVar(), outVarDefA->getVar()) <<\n\t\t\"expected \" << varDefA << \", got \" << outVarDefA;\n\tASSERT_TRUE(outVarDefA->isGotoTarget());\n\tASSERT_EQ(\"my_label\", outVarDefA->getLabel());\n\tASSERT_FALSE(assignGA->isGotoTarget());\n\tASSERT_FALSE(assignGA->hasLabel());\n}\n\nTEST_F(VarDefStmtOptimizerTests,\nMarksUForLoopInitAsDefinitionWhenVarIsDefinedInInitPart) {\n\t//\n\t// void test() {\n\t// int i;\n\t// for (i = 1; ;) {\n\t// }\n\t// }\n\t//\n\t// can be optimized to:\n\t//\n\t// void test() {\n\t// for (int i = 1; ;) {\n\t// }\n\t// }\n\t//\n\tauto varI = Variable::create(\"i\", IntType::create(32));\n\ttestFunc->addLocalVar(varI);\n\tauto varDefI = VarDefStmt::create(varI);\n\tauto loop = UForLoopStmt::create(\n\t\tAssignOpExpr::create(varI, ConstInt::create(1, 32)),\n\t\tShPtr<Expression>(),\n\t\tShPtr<Expression>(),\n\t\tEmptyStmt::create()\n\t);\n\tvarDefI->setSuccessor(loop);\n\ttestFunc->setBody(varDefI);\n\n\tINSTANTIATE_ALIAS_ANALYSIS_AND_VALUE_ANALYSIS(module);\n\tOptimizer::optimize<VarDefStmtOptimizer>(module, va);\n\n\t// Check that the output is correct.\n\tASSERT_BIR_EQ(loop, testFunc->getBody());\n\tASSERT_TRUE(loop->isInitDefinition());\n}\n\n} // namespace tests\n} // namespace llvmir2hll\n} // namespace retdec\n"} +{"text": "/*\n * Copyright (c) 2009 Baptiste Coudurier <baptiste.coudurier@gmail.com>\n *\n * This file is part of FFmpeg.\n *\n * FFmpeg is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 2.1 of the License, or (at your option) any later version.\n *\n * FFmpeg is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with FFmpeg; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA\n */\n\n#ifndef AVUTIL_RANDOM_SEED_H\n#define AVUTIL_RANDOM_SEED_H\n\n#include <stdint.h>\n/**\n * @addtogroup lavu_crypto\n * @{\n */\n\n/**\n * Get a seed to use in conjunction with random functions.\n * This function tries to provide a good seed at a best effort bases.\n * Its possible to call this function multiple times if more bits are needed.\n * It can be quite slow, which is why it should only be used as seed for a faster\n * PRNG. The quality of the seed depends on the platform.\n */\nuint32_t av_get_random_seed(void);\n\n/**\n * @}\n */\n\n#endif /* AVUTIL_RANDOM_SEED_H */\n"} +{"text": "import {\n\tComponent,\n\tAfterViewInit\n} from \"@angular/core\";\n\nimport { BaseChart } from \"./base-chart.component\";\nimport { MeterChart } from \"@carbon/charts\";\n\n/**\n * Wrapper around `MeterChart` in carbon charts library\n *\n * Most functions just call their equivalent from the chart library.\n */\n@Component({\n\tselector: \"ibm-meter-chart\",\n\ttemplate: ``\n})\nexport class MeterChartComponent extends BaseChart implements AfterViewInit {\n\t/**\n\t * Runs after view init to create a chart, attach it to `elementRef` and draw it.\n\t */\n\tngAfterViewInit() {\n\t\tthis.chart = new MeterChart(\n\t\t\tthis.elementRef.nativeElement,\n\t\t\t{\n\t\t\t\tdata: this.data,\n\t\t\t\toptions: this.options\n\t\t\t}\n\t\t);\n\n\t\tObject.assign(this, this.chart);\n\t}\n}\n"} +{"text": "/*! =======================================================\n VERSION 9.2.0 \n========================================================= */\n/*! =========================================================\n * bootstrap-slider.js\n *\n * Maintainers:\n *\t\tKyle Kemp\n *\t\t\t- Twitter: @seiyria\n *\t\t\t- Github: seiyria\n *\t\tRohit Kalkur\n *\t\t\t- Twitter: @Rovolutionary\n *\t\t\t- Github: rovolution\n *\n * =========================================================\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * ========================================================= */\n.slider {\n display: inline-block;\n vertical-align: middle;\n position: relative;\n}\n.slider.slider-horizontal {\n width: 210px;\n height: 20px;\n}\n.slider.slider-horizontal .slider-track {\n height: 10px;\n width: 100%;\n margin-top: -5px;\n top: 50%;\n left: 0;\n}\n.slider.slider-horizontal .slider-selection,\n.slider.slider-horizontal .slider-track-low,\n.slider.slider-horizontal .slider-track-high {\n height: 100%;\n top: 0;\n bottom: 0;\n}\n.slider.slider-horizontal .slider-tick,\n.slider.slider-horizontal .slider-handle {\n margin-left: -10px;\n}\n.slider.slider-horizontal .slider-tick.triangle,\n.slider.slider-horizontal .slider-handle.triangle {\n position: relative;\n top: 50%;\n transform: translateY(-50%);\n border-width: 0 10px 10px 10px;\n width: 0;\n height: 0;\n border-bottom-color: #0480be;\n margin-top: 0;\n}\n.slider.slider-horizontal .slider-tick-container {\n white-space: nowrap;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n}\n.slider.slider-horizontal .slider-tick-label-container {\n white-space: nowrap;\n margin-top: 20px;\n}\n.slider.slider-horizontal .slider-tick-label-container .slider-tick-label {\n padding-top: 4px;\n display: inline-block;\n text-align: center;\n}\n.slider.slider-vertical {\n height: 210px;\n width: 20px;\n}\n.slider.slider-vertical .slider-track {\n width: 10px;\n height: 100%;\n left: 25%;\n top: 0;\n}\n.slider.slider-vertical .slider-selection {\n width: 100%;\n left: 0;\n top: 0;\n bottom: 0;\n}\n.slider.slider-vertical .slider-track-low,\n.slider.slider-vertical .slider-track-high {\n width: 100%;\n left: 0;\n right: 0;\n}\n.slider.slider-vertical .slider-tick,\n.slider.slider-vertical .slider-handle {\n margin-top: -10px;\n}\n.slider.slider-vertical .slider-tick.triangle,\n.slider.slider-vertical .slider-handle.triangle {\n border-width: 10px 0 10px 10px;\n width: 1px;\n height: 1px;\n border-left-color: #0480be;\n margin-left: 0;\n}\n.slider.slider-vertical .slider-tick-label-container {\n white-space: nowrap;\n}\n.slider.slider-vertical .slider-tick-label-container .slider-tick-label {\n padding-left: 4px;\n}\n.slider.slider-disabled .slider-handle {\n background-image: -webkit-linear-gradient(top, #dfdfdf 0%, #bebebe 100%);\n background-image: -o-linear-gradient(top, #dfdfdf 0%, #bebebe 100%);\n background-image: linear-gradient(to bottom, #dfdfdf 0%, #bebebe 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffdfdfdf', endColorstr='#ffbebebe', GradientType=0);\n}\n.slider.slider-disabled .slider-track {\n background-image: -webkit-linear-gradient(top, #e5e5e5 0%, #e9e9e9 100%);\n background-image: -o-linear-gradient(top, #e5e5e5 0%, #e9e9e9 100%);\n background-image: linear-gradient(to bottom, #e5e5e5 0%, #e9e9e9 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe5e5e5', endColorstr='#ffe9e9e9', GradientType=0);\n cursor: not-allowed;\n}\n.slider input {\n display: none;\n}\n.slider .tooltip.top {\n margin-top: -36px;\n}\n.slider .tooltip-inner {\n white-space: nowrap;\n max-width: none;\n}\n.slider .hide {\n display: none;\n}\n.slider-track {\n position: absolute;\n cursor: pointer;\n background-image: -webkit-linear-gradient(top, #f5f5f5 0%, #f9f9f9 100%);\n background-image: -o-linear-gradient(top, #f5f5f5 0%, #f9f9f9 100%);\n background-image: linear-gradient(to bottom, #f5f5f5 0%, #f9f9f9 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);\n -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);\n border-radius: 4px;\n}\n.slider-selection {\n position: absolute;\n background-image: -webkit-linear-gradient(top, #f9f9f9 0%, #f5f5f5 100%);\n background-image: -o-linear-gradient(top, #f9f9f9 0%, #f5f5f5 100%);\n background-image: linear-gradient(to bottom, #f9f9f9 0%, #f5f5f5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff9f9f9', endColorstr='#fff5f5f5', GradientType=0);\n -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border-radius: 4px;\n}\n.slider-selection.tick-slider-selection {\n background-image: -webkit-linear-gradient(top, #89cdef 0%, #81bfde 100%);\n background-image: -o-linear-gradient(top, #89cdef 0%, #81bfde 100%);\n background-image: linear-gradient(to bottom, #89cdef 0%, #81bfde 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff89cdef', endColorstr='#ff81bfde', GradientType=0);\n}\n.slider-track-low,\n.slider-track-high {\n position: absolute;\n background: transparent;\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n border-radius: 4px;\n}\n.slider-handle {\n position: absolute;\n top: 0;\n width: 20px;\n height: 20px;\n background-color: #337ab7;\n background-image: -webkit-linear-gradient(top, #149bdf 0%, #0480be 100%);\n background-image: -o-linear-gradient(top, #149bdf 0%, #0480be 100%);\n background-image: linear-gradient(to bottom, #149bdf 0%, #0480be 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);\n filter: none;\n -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);\n box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);\n border: 0px solid transparent;\n}\n.slider-handle.round {\n border-radius: 50%;\n}\n.slider-handle.triangle {\n background: transparent none;\n}\n.slider-handle.custom {\n background: transparent none;\n}\n.slider-handle.custom::before {\n line-height: 20px;\n font-size: 20px;\n content: '\\2605';\n color: #726204;\n}\n.slider-tick {\n position: absolute;\n width: 20px;\n height: 20px;\n background-image: -webkit-linear-gradient(top, #f9f9f9 0%, #f5f5f5 100%);\n background-image: -o-linear-gradient(top, #f9f9f9 0%, #f5f5f5 100%);\n background-image: linear-gradient(to bottom, #f9f9f9 0%, #f5f5f5 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff9f9f9', endColorstr='#fff5f5f5', GradientType=0);\n -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);\n -webkit-box-sizing: border-box;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n filter: none;\n opacity: 0.8;\n border: 0px solid transparent;\n}\n.slider-tick.round {\n border-radius: 50%;\n}\n.slider-tick.triangle {\n background: transparent none;\n}\n.slider-tick.custom {\n background: transparent none;\n}\n.slider-tick.custom::before {\n line-height: 20px;\n font-size: 20px;\n content: '\\2605';\n color: #726204;\n}\n.slider-tick.in-selection {\n background-image: -webkit-linear-gradient(top, #89cdef 0%, #81bfde 100%);\n background-image: -o-linear-gradient(top, #89cdef 0%, #81bfde 100%);\n background-image: linear-gradient(to bottom, #89cdef 0%, #81bfde 100%);\n background-repeat: repeat-x;\n filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff89cdef', endColorstr='#ff81bfde', GradientType=0);\n opacity: 1;\n}\n"} +{"text": "package org.uma.jmetal.util.comparator;\n\nimport org.uma.jmetal.solution.Solution;\nimport org.uma.jmetal.util.errorchecking.JMetalException;\n\nimport java.io.Serializable;\nimport java.util.Comparator;\nimport java.util.List;\n\n/**\n * This class implements a solution comparator according to the concept of g-dominance\n * (https://doi.org/10.1016/j.ejor.2008.07.015)\n *\n * @author Antonio J. Nebro <antonio@lcc.uma.es>\n */\n@SuppressWarnings(\"serial\")\npublic class GDominanceComparator<S extends Solution<?>> implements Comparator<S>, Serializable {\n\n private List<Double> referencePoint ;\n private DominanceComparator<S> dominanceComparator ;\n\n /** Constructor */\n public GDominanceComparator(List<Double> referencePoint) {\n this.referencePoint = referencePoint ;\n dominanceComparator = new DominanceComparator<>() ;\n }\n\n /**\n * Compares two solutions.\n *\n * @param solution1 Object representing the first <code>Solution</code>.\n * @param solution2 Object representing the second <code>Solution</code>.\n * @return -1, or 0, or 1 if solution1 dominates solution2, both are\n * non-dominated, or solution1 is dominated by solution2, respectively.\n */\n @Override\n public int compare(S solution1, S solution2) {\n if (solution1 == null) {\n throw new JMetalException(\"Solution1 is null\") ;\n } else if (solution2 == null) {\n throw new JMetalException(\"Solution2 is null\") ;\n } else if (solution1.getNumberOfObjectives() != solution2.getNumberOfObjectives()) {\n throw new JMetalException(\"Cannot compare because solution1 has \" +\n solution1.getNumberOfObjectives()+ \" objectives and solution2 has \" +\n solution2.getNumberOfObjectives()) ;\n }\n\n int result = flagComparison(solution1, solution2);\n\n return result ;\n }\n\n private int flagComparison(S solution1, S solution2) {\n int result ;\n if (flag(solution1) > flag(solution2)) {\n result = -1 ;\n } else if (flag(solution1) < flag(solution2)) {\n result = 1 ;\n } else {\n result = dominanceComparator.compare(solution1, solution2) ;\n }\n\n return result ;\n }\n\n private int flag(S solution) {\n int result = 1 ;\n for (int i = 0; i < solution.getNumberOfObjectives(); i++) {\n if (solution.getObjective(i) > referencePoint.get(i)) {\n result = 0 ;\n }\n }\n if (result == 0) {\n result = 1 ;\n for (int i = 0; i < solution.getNumberOfObjectives(); i++) {\n if (solution.getObjective(i) < referencePoint.get(i)) {\n result = 0 ;\n }\n }\n }\n\n return result ;\n }\n}\n"} +{"text": "/* Quote */\n\n.slide blockquote {\n margin: 0;\n font-style: italic;\n}\n\n.slide blockquote::before {\n position: absolute;\n margin: -0.15em 0 0 -0.43em;\n color: #cccccc;\n line-height: 1;\n font-size: 8em;\n content: '\\201C';\n}\n\n/* Author */\n\n.slide blockquote + figcaption {\n margin: -1em 0 1em;\n font-style: italic;\n font-weight: bold;\n}\n"} +{"text": "/**\n *\t\\file\t\tdhcommands.h\n *\t\\brief\t\tHandle commands from remote server.\n *\t\\author\t\tNikolay Khabarov\n *\t\\date\t\t2015\n *\t\\copyright\tDeviceHive MIT\n */\n\n#ifndef _DHCOMMANDS_H_\n#define _DHCOMMANDS_H_\n\n#include \"dhsender_data.h\"\n\n/**\n *\t\\brief\t\t\t\t\tHandle remote command.\n *\t\\param[in]\tcb\t\t\tCallback descriptor for result.\n *\t\\param[in]\tcommand\t\tNull terminated string with command.\n *\t\\param[in]\tparams\t\tPointer to JSON with parameters.\n *\t\\param[in]\tparamslen\tJSON parameters length in bytes.\n */\nvoid dhcommands_do(COMMAND_RESULT *cb, const char *command, const char *params,\n\t\tunsigned int paramslen);\n\n#endif /* _DHCOMMANDS_H_ */\n"} +{"text": "UPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4797 and `entry`=226;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4822 and `entry`=793;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=5787 and `entry`=843;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=5786 and `entry`=843;\nUPDATE `npc_vendor` SET `incrtime`=86400 WHERE `item`=4795 and `entry`=844;\nUPDATE `npc_vendor` SET `incrtime`=86400 WHERE `item`=4796 and `entry`=844;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=2453 and `entry`=844;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=3355 and `entry`=844;\nUPDATE `npc_vendor` SET `incrtime`=86400 WHERE `item`=858 and `entry`=844;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4788 and `entry`=954;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4789 and `entry`=954;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4782 and `entry`=1214;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4781 and `entry`=1214;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=858 and `entry`=1257;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=20856 and `entry`=1286;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=3355 and `entry`=1302;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4828 and `entry`=1307;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4825 and `entry`=1307;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=929 and `entry`=1307;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=3385 and `entry`=1307;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=2447 and `entry`=1313;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=765 and `entry`=1313;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=2449 and `entry`=1313;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=785 and `entry`=1313;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=3355 and `entry`=1313;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=3357 and `entry`=1313;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=3012 and `entry`=1316;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=954 and `entry`=1316;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=1478 and `entry`=1316;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=3013 and `entry`=1316;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=1180 and `entry`=1316;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=10940 and `entry`=1318;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=10938 and `entry`=1318;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=10325 and `entry`=1347;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=6274 and `entry`=1347;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4817 and `entry`=1441;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4792 and `entry`=1454;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4793 and `entry`=1454;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4790 and `entry`=1454;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=6275 and `entry`=1454;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=5772 and `entry`=1454;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=929 and `entry`=1457;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=11304 and `entry`=1459;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=10858 and `entry`=1471;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=5772 and `entry`=1474;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=6275 and `entry`=1474;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=6533 and `entry`=1678;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=6533 and `entry`=1684;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=11304 and `entry`=1687;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=10728 and `entry`=2663;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=14630 and `entry`=2670;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4827 and `entry`=2679;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=7613 and `entry`=2679;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=7114 and `entry`=2679;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=7290 and `entry`=2679;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4404 and `entry`=2685;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4382 and `entry`=2685;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=4361 and `entry`=2685;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=4357 and `entry`=2685;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=4364 and `entry`=2685;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=13310 and `entry`=2685;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4361 and `entry`=2687;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=4357 and `entry`=2687;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=4364 and `entry`=2687;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=13311 and `entry`=2687;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=7289 and `entry`=2697;\nUPDATE `npc_vendor` SET `incrtime`=3600 WHERE `item`=14635 and `entry`=2699;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=3385 and `entry`=2805;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=929 and `entry`=2805;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=3012 and `entry`=2805;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=5973 and `entry`=2810;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=21942 and `entry`=2810;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=3827 and `entry`=2812;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=1710 and `entry`=2812;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=21942 and `entry`=2821;\nUPDATE `npc_vendor` SET `incrtime`=3600 WHERE `item`=12162 and `entry`=2843;\nUPDATE `npc_vendor` SET `incrtime`=3600 WHERE `item`=6057 and `entry`=2848;\nUPDATE `npc_vendor` SET `incrtime`=3600 WHERE `item`=6056 and `entry`=2848;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=37934 and `entry`=2849;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=10325 and `entry`=3005;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=5772 and `entry`=3005;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=10311 and `entry`=3005;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=6349 and `entry`=3012;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=6377 and `entry`=3012;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=10940 and `entry`=3012;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=10938 and `entry`=3012;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=11306 and `entry`=3015;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=11303 and `entry`=3015;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=6533 and `entry`=3029;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4782 and `entry`=3091;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4781 and `entry`=3091;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=4404 and `entry`=3133;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=4357 and `entry`=3133;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=4364 and `entry`=3133;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4828 and `entry`=3134;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=929 and `entry`=3134;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=3385 and `entry`=3134;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=6053 and `entry`=3134;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=4378 and `entry`=3180;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=4835 and `entry`=3180;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=12256 and `entry`=3316;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=6365 and `entry`=3333;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=6533 and `entry`=3333;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=5643 and `entry`=3335;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=5640 and `entry`=3335;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=10940 and `entry`=3346;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=10938 and `entry`=3346;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=6346 and `entry`=3346;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=13478 and `entry`=3348;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=12162 and `entry`=3356;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=5772 and `entry`=3364;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=10314 and `entry`=3364;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=6274 and `entry`=3364;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=10317 and `entry`=3364;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=18731 and `entry`=3366;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=20856 and `entry`=3367;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=4357 and `entry`=3413;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=4364 and `entry`=3413;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=22729 and `entry`=3413;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=18647 and `entry`=3413;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=929 and `entry`=3534;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4777 and `entry`=3534;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4818 and `entry`=3534;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=11304 and `entry`=3534;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4838 and `entry`=3537;\nUPDATE `npc_vendor` SET `incrtime`=14400 WHERE `item`=6377 and `entry`=3537;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=5772 and `entry`=3537;\nUPDATE `npc_vendor` SET `incrtime`=14400 WHERE `item`=7362 and `entry`=3537;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=11101 and `entry`=3954;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=11039 and `entry`=3954;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=20855 and `entry`=3954;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=5973 and `entry`=3958;\nUPDATE `npc_vendor` SET `incrtime`=3600 WHERE `item`=10311 and `entry`=4168;\nUPDATE `npc_vendor` SET `incrtime`=3600 WHERE `item`=6275 and `entry`=4168;\nUPDATE `npc_vendor` SET `incrtime`=3600 WHERE `item`=18949 and `entry`=4225;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=20975 and `entry`=4775;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4818 and `entry`=4890;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4830 and `entry`=4890;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=11305 and `entry`=4892;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=5789 and `entry`=4897;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=21941 and `entry`=4897;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=21943 and `entry`=4897;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=3827 and `entry`=4899;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=11306 and `entry`=5122;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=11303 and `entry`=5122;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=18731 and `entry`=5128;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=6349 and `entry`=5158;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=10940 and `entry`=5158;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=10938 and `entry`=5158;\nUPDATE `npc_vendor` SET `incrtime`=86400 WHERE `item`=22729 and `entry`=5175;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=18649 and `entry`=5175;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=13478 and `entry`=5178;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=6365 and `entry`=5494;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=6533 and `entry`=5494;\nUPDATE `npc_vendor` SET `incrtime`=3600 WHERE `item`=12162 and `entry`=5512;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=4371 and `entry`=5519;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=4357 and `entry`=5519;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=4364 and `entry`=5519;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=9305 and `entry`=5594;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=6533 and `entry`=5940;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=7089 and `entry`=6574;\nUPDATE `npc_vendor` SET `incrtime`=1800 WHERE `item`=18650 and `entry`=8131;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=7995 and `entry`=8161;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=21948 and `entry`=8363;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4389 and `entry`=8679;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4361 and `entry`=8679;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4371 and `entry`=8679;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=4357 and `entry`=8679;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=4364 and `entry`=8679;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=10602 and `entry`=8679;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=10321 and `entry`=8681;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=10317 and `entry`=8681;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=10326 and `entry`=8681;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=10314 and `entry`=8681;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=10323 and `entry`=8681;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=4382 and `entry`=11185;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=4357 and `entry`=11185;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=4364 and `entry`=11185;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=16046 and `entry`=11185;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=16050 and `entry`=11185;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=18656 and `entry`=11185;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=18652 and `entry`=11185;\nUPDATE `npc_vendor` SET `incrtime`=10800 WHERE `item`=32381 and `entry`=11185;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=6149 and `entry`=11188;\nUPDATE `npc_vendor` SET `incrtime`=1200 WHERE `item`=14468 and `entry`=11189;\nUPDATE `npc_vendor` SET `incrtime`=1200 WHERE `item`=16221 and `entry`=11189;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=21957 and `entry`=11189;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=16224 and `entry`=12022;\nUPDATE `npc_vendor` SET `incrtime`=14400 WHERE `item`=12254 and `entry`=12023;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=1710 and `entry`=12245;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=3827 and `entry`=12245;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=12240 and `entry`=12245;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=12228 and `entry`=12245;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=12231 and `entry`=12245;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=12232 and `entry`=12245;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=5489 and `entry`=12245;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=3735 and `entry`=12245;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=2290 and `entry`=12246;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=1711 and `entry`=12246;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=1477 and `entry`=12246;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=2289 and `entry`=12246;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4421 and `entry`=12246;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4424 and `entry`=12246;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=12239 and `entry`=12246;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=12233 and `entry`=12246;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=12229 and `entry`=12246;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4609 and `entry`=12246;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=12227 and `entry`=12246;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=3734 and `entry`=12246;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=21954 and `entry`=12941;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=6365 and `entry`=14740;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=22900 and `entry`=16588;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=30748 and `entry`=16602;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=30747 and `entry`=16602;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=30746 and `entry`=16602;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=30745 and `entry`=16602;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=4306 and `entry`=16631;\nUPDATE `npc_vendor` SET `incrtime`=1800 WHERE `item`=38091 and `entry`=18756;\nUPDATE `npc_vendor` SET `incrtime`=1800 WHERE `item`=37934 and `entry`=18756;\nUPDATE `npc_vendor` SET `incrtime`=1800 WHERE `item`=38090 and `entry`=18756;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=23807 and `entry`=19351;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=29377 and `entry`=19536;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=29371 and `entry`=19536;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=29372 and `entry`=19536;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=29380 and `entry`=19536;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=29391 and `entry`=19536;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=29378 and `entry`=19536;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=10940 and `entry`=19537;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=10938 and `entry`=19537;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=10940 and `entry`=19540;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=10938 and `entry`=19540;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=23592 and `entry`=19662;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=23591 and `entry`=19662;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=23593 and `entry`=19662;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=23590 and `entry`=19662;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=25846 and `entry`=19662;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=10940 and `entry`=19663;\nUPDATE `npc_vendor` SET `incrtime`=7200 WHERE `item`=10938 and `entry`=19663;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=22565 and `entry`=19663;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=28282 and `entry`=19663;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=22562 and `entry`=19663;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=22563 and `entry`=19663;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=31675 and `entry`=20916;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=31674 and `entry`=20916;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=30599 and `entry`=21485;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=30597 and `entry`=21485;\nUPDATE `npc_vendor` SET `incrtime`=43200 WHERE `item`=30598 and `entry`=21485;\nUPDATE `npc_vendor` SET `incrtime`=86400 WHERE `item`=24208 and `entry`=21485;\nUPDATE `npc_vendor` SET `incrtime`=3600 WHERE `item`=23768 and `entry`=23208;\nUPDATE `npc_vendor` SET `incrtime`=3600 WHERE `item`=23769 and `entry`=23208;\nUPDATE `npc_vendor` SET `incrtime`=120 WHERE `item`=10858 and `entry`=26081;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=38579 and `entry`=28347;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=10940 and `entry`=28714;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=10938 and `entry`=28714;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=39489 and `entry`=30723;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=39489 and `entry`=30724;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=39489 and `entry`=30730;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=39489 and `entry`=30733;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4361 and `entry`=30825;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4363 and `entry`=30825;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4357 and `entry`=30825;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4364 and `entry`=30825;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4357 and `entry`=31781;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=4364 and `entry`=31781;\nUPDATE `npc_vendor` SET `incrtime`=9000 WHERE `item`=6365 and `entry`=31804;\nUPDATE `npc_vendor` SET `incrtime`=120 WHERE `item`=4357 and `entry`=33669;\nUPDATE `npc_vendor` SET `incrtime`=120 WHERE `item`=4364 and `entry`=33669;\n"} +{"text": "\"\"\"IMAP4 client.\n\nBased on RFC 2060.\n\nPublic class: IMAP4\nPublic variable: Debug\nPublic functions: Internaldate2tuple\n Int2AP\n ParseFlags\n Time2Internaldate\n\"\"\"\n\n# Author: Piers Lauder <piers@cs.su.oz.au> December 1997.\n#\n# Authentication code contributed by Donn Cave <donn@u.washington.edu> June 1998.\n# String method conversion by ESR, February 2001.\n# GET/SETACL contributed by Anthony Baxter <anthony@interlink.com.au> April 2001.\n# IMAP4_SSL contributed by Tino Lange <Tino.Lange@isg.de> March 2002.\n# GET/SETQUOTA contributed by Andreas Zeidler <az@kreativkombinat.de> June 2002.\n# PROXYAUTH contributed by Rick Holbert <holbert.13@osu.edu> November 2002.\n# GET/SETANNOTATION contributed by Tomas Lindroos <skitta@abo.fi> June 2005.\n\n__version__ = \"2.58\"\n\nimport binascii, errno, random, re, socket, subprocess, sys, time\n\n__all__ = [\"IMAP4\", \"IMAP4_stream\", \"Internaldate2tuple\",\n \"Int2AP\", \"ParseFlags\", \"Time2Internaldate\"]\n\n# Globals\n\nCRLF = '\\r\\n'\nDebug = 0\nIMAP4_PORT = 143\nIMAP4_SSL_PORT = 993\nAllowedVersions = ('IMAP4REV1', 'IMAP4') # Most recent first\n\n# Commands\n\nCommands = {\n # name valid states\n 'APPEND': ('AUTH', 'SELECTED'),\n 'AUTHENTICATE': ('NONAUTH',),\n 'CAPABILITY': ('NONAUTH', 'AUTH', 'SELECTED', 'LOGOUT'),\n 'CHECK': ('SELECTED',),\n 'CLOSE': ('SELECTED',),\n 'COPY': ('SELECTED',),\n 'CREATE': ('AUTH', 'SELECTED'),\n 'DELETE': ('AUTH', 'SELECTED'),\n 'DELETEACL': ('AUTH', 'SELECTED'),\n 'EXAMINE': ('AUTH', 'SELECTED'),\n 'EXPUNGE': ('SELECTED',),\n 'FETCH': ('SELECTED',),\n 'GETACL': ('AUTH', 'SELECTED'),\n 'GETANNOTATION':('AUTH', 'SELECTED'),\n 'GETQUOTA': ('AUTH', 'SELECTED'),\n 'GETQUOTAROOT': ('AUTH', 'SELECTED'),\n 'MYRIGHTS': ('AUTH', 'SELECTED'),\n 'LIST': ('AUTH', 'SELECTED'),\n 'LOGIN': ('NONAUTH',),\n 'LOGOUT': ('NONAUTH', 'AUTH', 'SELECTED', 'LOGOUT'),\n 'LSUB': ('AUTH', 'SELECTED'),\n 'NAMESPACE': ('AUTH', 'SELECTED'),\n 'NOOP': ('NONAUTH', 'AUTH', 'SELECTED', 'LOGOUT'),\n 'PARTIAL': ('SELECTED',), # NB: obsolete\n 'PROXYAUTH': ('AUTH',),\n 'RENAME': ('AUTH', 'SELECTED'),\n 'SEARCH': ('SELECTED',),\n 'SELECT': ('AUTH', 'SELECTED'),\n 'SETACL': ('AUTH', 'SELECTED'),\n 'SETANNOTATION':('AUTH', 'SELECTED'),\n 'SETQUOTA': ('AUTH', 'SELECTED'),\n 'SORT': ('SELECTED',),\n 'STATUS': ('AUTH', 'SELECTED'),\n 'STORE': ('SELECTED',),\n 'SUBSCRIBE': ('AUTH', 'SELECTED'),\n 'THREAD': ('SELECTED',),\n 'UID': ('SELECTED',),\n 'UNSUBSCRIBE': ('AUTH', 'SELECTED'),\n }\n\n# Patterns to match server responses\n\nContinuation = re.compile(r'\\+( (?P<data>.*))?')\nFlags = re.compile(r'.*FLAGS \\((?P<flags>[^\\)]*)\\)')\nInternalDate = re.compile(r'.*INTERNALDATE \"'\n r'(?P<day>[ 0123][0-9])-(?P<mon>[A-Z][a-z][a-z])-(?P<year>[0-9][0-9][0-9][0-9])'\n r' (?P<hour>[0-9][0-9]):(?P<min>[0-9][0-9]):(?P<sec>[0-9][0-9])'\n r' (?P<zonen>[-+])(?P<zoneh>[0-9][0-9])(?P<zonem>[0-9][0-9])'\n r'\"')\nLiteral = re.compile(r'.*{(?P<size>\\d+)}$')\nMapCRLF = re.compile(r'\\r\\n|\\r|\\n')\nResponse_code = re.compile(r'\\[(?P<type>[A-Z-]+)( (?P<data>[^\\]]*))?\\]')\nUntagged_response = re.compile(r'\\* (?P<type>[A-Z-]+)( (?P<data>.*))?')\nUntagged_status = re.compile(r'\\* (?P<data>\\d+) (?P<type>[A-Z-]+)( (?P<data2>.*))?')\n\n\n\nclass IMAP4:\n\n \"\"\"IMAP4 client class.\n\n Instantiate with: IMAP4([host[, port]])\n\n host - host's name (default: localhost);\n port - port number (default: standard IMAP4 port).\n\n All IMAP4rev1 commands are supported by methods of the same\n name (in lower-case).\n\n All arguments to commands are converted to strings, except for\n AUTHENTICATE, and the last argument to APPEND which is passed as\n an IMAP4 literal. If necessary (the string contains any\n non-printing characters or white-space and isn't enclosed with\n either parentheses or double quotes) each string is quoted.\n However, the 'password' argument to the LOGIN command is always\n quoted. If you want to avoid having an argument string quoted\n (eg: the 'flags' argument to STORE) then enclose the string in\n parentheses (eg: \"(\\Deleted)\").\n\n Each command returns a tuple: (type, [data, ...]) where 'type'\n is usually 'OK' or 'NO', and 'data' is either the text from the\n tagged response, or untagged results from command. Each 'data'\n is either a string, or a tuple. If a tuple, then the first part\n is the header of the response, and the second part contains\n the data (ie: 'literal' value).\n\n Errors raise the exception class <instance>.error(\"<reason>\").\n IMAP4 server errors raise <instance>.abort(\"<reason>\"),\n which is a sub-class of 'error'. Mailbox status changes\n from READ-WRITE to READ-ONLY raise the exception class\n <instance>.readonly(\"<reason>\"), which is a sub-class of 'abort'.\n\n \"error\" exceptions imply a program error.\n \"abort\" exceptions imply the connection should be reset, and\n the command re-tried.\n \"readonly\" exceptions imply the command should be re-tried.\n\n Note: to use this module, you must read the RFCs pertaining to the\n IMAP4 protocol, as the semantics of the arguments to each IMAP4\n command are left to the invoker, not to mention the results. Also,\n most IMAP servers implement a sub-set of the commands available here.\n \"\"\"\n\n class error(Exception): pass # Logical errors - debug required\n class abort(error): pass # Service errors - close and retry\n class readonly(abort): pass # Mailbox status changed to READ-ONLY\n\n mustquote = re.compile(r\"[^\\w!#$%&'*+,.:;<=>?^`|~-]\")\n\n def __init__(self, host = '', port = IMAP4_PORT):\n self.debug = Debug\n self.state = 'LOGOUT'\n self.literal = None # A literal argument to a command\n self.tagged_commands = {} # Tagged commands awaiting response\n self.untagged_responses = {} # {typ: [data, ...], ...}\n self.continuation_response = '' # Last continuation response\n self.is_readonly = False # READ-ONLY desired state\n self.tagnum = 0\n\n # Open socket to server.\n\n self.open(host, port)\n\n # Create unique tag for this session,\n # and compile tagged response matcher.\n\n self.tagpre = Int2AP(random.randint(4096, 65535))\n self.tagre = re.compile(r'(?P<tag>'\n + self.tagpre\n + r'\\d+) (?P<type>[A-Z]+) (?P<data>.*)')\n\n # Get server welcome message,\n # request and store CAPABILITY response.\n\n if __debug__:\n self._cmd_log_len = 10\n self._cmd_log_idx = 0\n self._cmd_log = {} # Last `_cmd_log_len' interactions\n if self.debug >= 1:\n self._mesg('imaplib version %s' % __version__)\n self._mesg('new IMAP4 connection, tag=%s' % self.tagpre)\n\n self.welcome = self._get_response()\n if 'PREAUTH' in self.untagged_responses:\n self.state = 'AUTH'\n elif 'OK' in self.untagged_responses:\n self.state = 'NONAUTH'\n else:\n raise self.error(self.welcome)\n\n typ, dat = self.capability()\n if dat == [None]:\n raise self.error('no CAPABILITY response from server')\n self.capabilities = tuple(dat[-1].upper().split())\n\n if __debug__:\n if self.debug >= 3:\n self._mesg('CAPABILITIES: %r' % (self.capabilities,))\n\n for version in AllowedVersions:\n if not version in self.capabilities:\n continue\n self.PROTOCOL_VERSION = version\n return\n\n raise self.error('server not IMAP4 compliant')\n\n\n def __getattr__(self, attr):\n # Allow UPPERCASE variants of IMAP4 command methods.\n if attr in Commands:\n return getattr(self, attr.lower())\n raise AttributeError(\"Unknown IMAP4 command: '%s'\" % attr)\n\n\n\n # Overridable methods\n\n\n def open(self, host = '', port = IMAP4_PORT):\n \"\"\"Setup connection to remote server on \"host:port\"\n (default: localhost:standard IMAP4 port).\n This connection will be used by the routines:\n read, readline, send, shutdown.\n \"\"\"\n self.host = host\n self.port = port\n self.sock = socket.create_connection((host, port))\n self.file = self.sock.makefile('rb')\n\n\n def read(self, size):\n \"\"\"Read 'size' bytes from remote.\"\"\"\n return self.file.read(size)\n\n\n def readline(self):\n \"\"\"Read line from remote.\"\"\"\n return self.file.readline()\n\n\n def send(self, data):\n \"\"\"Send data to remote.\"\"\"\n self.sock.sendall(data)\n\n\n def shutdown(self):\n \"\"\"Close I/O established in \"open\".\"\"\"\n self.file.close()\n try:\n self.sock.shutdown(socket.SHUT_RDWR)\n except socket.error as e:\n # The server might already have closed the connection\n if e.errno != errno.ENOTCONN:\n raise\n finally:\n self.sock.close()\n\n\n def socket(self):\n \"\"\"Return socket instance used to connect to IMAP4 server.\n\n socket = <instance>.socket()\n \"\"\"\n return self.sock\n\n\n\n # Utility methods\n\n\n def recent(self):\n \"\"\"Return most recent 'RECENT' responses if any exist,\n else prompt server for an update using the 'NOOP' command.\n\n (typ, [data]) = <instance>.recent()\n\n 'data' is None if no new messages,\n else list of RECENT responses, most recent last.\n \"\"\"\n name = 'RECENT'\n typ, dat = self._untagged_response('OK', [None], name)\n if dat[-1]:\n return typ, dat\n typ, dat = self.noop() # Prod server for response\n return self._untagged_response(typ, dat, name)\n\n\n def response(self, code):\n \"\"\"Return data for response 'code' if received, or None.\n\n Old value for response 'code' is cleared.\n\n (code, [data]) = <instance>.response(code)\n \"\"\"\n return self._untagged_response(code, [None], code.upper())\n\n\n\n # IMAP4 commands\n\n\n def append(self, mailbox, flags, date_time, message):\n \"\"\"Append message to named mailbox.\n\n (typ, [data]) = <instance>.append(mailbox, flags, date_time, message)\n\n All args except `message' can be None.\n \"\"\"\n name = 'APPEND'\n if not mailbox:\n mailbox = 'INBOX'\n if flags:\n if (flags[0],flags[-1]) != ('(',')'):\n flags = '(%s)' % flags\n else:\n flags = None\n if date_time:\n date_time = Time2Internaldate(date_time)\n else:\n date_time = None\n self.literal = MapCRLF.sub(CRLF, message)\n return self._simple_command(name, mailbox, flags, date_time)\n\n\n def authenticate(self, mechanism, authobject):\n \"\"\"Authenticate command - requires response processing.\n\n 'mechanism' specifies which authentication mechanism is to\n be used - it must appear in <instance>.capabilities in the\n form AUTH=<mechanism>.\n\n 'authobject' must be a callable object:\n\n data = authobject(response)\n\n It will be called to process server continuation responses.\n It should return data that will be encoded and sent to server.\n It should return None if the client abort response '*' should\n be sent instead.\n \"\"\"\n mech = mechanism.upper()\n # XXX: shouldn't this code be removed, not commented out?\n #cap = 'AUTH=%s' % mech\n #if not cap in self.capabilities: # Let the server decide!\n # raise self.error(\"Server doesn't allow %s authentication.\" % mech)\n self.literal = _Authenticator(authobject).process\n typ, dat = self._simple_command('AUTHENTICATE', mech)\n if typ != 'OK':\n raise self.error(dat[-1])\n self.state = 'AUTH'\n return typ, dat\n\n\n def capability(self):\n \"\"\"(typ, [data]) = <instance>.capability()\n Fetch capabilities list from server.\"\"\"\n\n name = 'CAPABILITY'\n typ, dat = self._simple_command(name)\n return self._untagged_response(typ, dat, name)\n\n\n def check(self):\n \"\"\"Checkpoint mailbox on server.\n\n (typ, [data]) = <instance>.check()\n \"\"\"\n return self._simple_command('CHECK')\n\n\n def close(self):\n \"\"\"Close currently selected mailbox.\n\n Deleted messages are removed from writable mailbox.\n This is the recommended command before 'LOGOUT'.\n\n (typ, [data]) = <instance>.close()\n \"\"\"\n try:\n typ, dat = self._simple_command('CLOSE')\n finally:\n self.state = 'AUTH'\n return typ, dat\n\n\n def copy(self, message_set, new_mailbox):\n \"\"\"Copy 'message_set' messages onto end of 'new_mailbox'.\n\n (typ, [data]) = <instance>.copy(message_set, new_mailbox)\n \"\"\"\n return self._simple_command('COPY', message_set, new_mailbox)\n\n\n def create(self, mailbox):\n \"\"\"Create new mailbox.\n\n (typ, [data]) = <instance>.create(mailbox)\n \"\"\"\n return self._simple_command('CREATE', mailbox)\n\n\n def delete(self, mailbox):\n \"\"\"Delete old mailbox.\n\n (typ, [data]) = <instance>.delete(mailbox)\n \"\"\"\n return self._simple_command('DELETE', mailbox)\n\n def deleteacl(self, mailbox, who):\n \"\"\"Delete the ACLs (remove any rights) set for who on mailbox.\n\n (typ, [data]) = <instance>.deleteacl(mailbox, who)\n \"\"\"\n return self._simple_command('DELETEACL', mailbox, who)\n\n def expunge(self):\n \"\"\"Permanently remove deleted items from selected mailbox.\n\n Generates 'EXPUNGE' response for each deleted message.\n\n (typ, [data]) = <instance>.expunge()\n\n 'data' is list of 'EXPUNGE'd message numbers in order received.\n \"\"\"\n name = 'EXPUNGE'\n typ, dat = self._simple_command(name)\n return self._untagged_response(typ, dat, name)\n\n\n def fetch(self, message_set, message_parts):\n \"\"\"Fetch (parts of) messages.\n\n (typ, [data, ...]) = <instance>.fetch(message_set, message_parts)\n\n 'message_parts' should be a string of selected parts\n enclosed in parentheses, eg: \"(UID BODY[TEXT])\".\n\n 'data' are tuples of message part envelope and data.\n \"\"\"\n name = 'FETCH'\n typ, dat = self._simple_command(name, message_set, message_parts)\n return self._untagged_response(typ, dat, name)\n\n\n def getacl(self, mailbox):\n \"\"\"Get the ACLs for a mailbox.\n\n (typ, [data]) = <instance>.getacl(mailbox)\n \"\"\"\n typ, dat = self._simple_command('GETACL', mailbox)\n return self._untagged_response(typ, dat, 'ACL')\n\n\n def getannotation(self, mailbox, entry, attribute):\n \"\"\"(typ, [data]) = <instance>.getannotation(mailbox, entry, attribute)\n Retrieve ANNOTATIONs.\"\"\"\n\n typ, dat = self._simple_command('GETANNOTATION', mailbox, entry, attribute)\n return self._untagged_response(typ, dat, 'ANNOTATION')\n\n\n def getquota(self, root):\n \"\"\"Get the quota root's resource usage and limits.\n\n Part of the IMAP4 QUOTA extension defined in rfc2087.\n\n (typ, [data]) = <instance>.getquota(root)\n \"\"\"\n typ, dat = self._simple_command('GETQUOTA', root)\n return self._untagged_response(typ, dat, 'QUOTA')\n\n\n def getquotaroot(self, mailbox):\n \"\"\"Get the list of quota roots for the named mailbox.\n\n (typ, [[QUOTAROOT responses...], [QUOTA responses]]) = <instance>.getquotaroot(mailbox)\n \"\"\"\n typ, dat = self._simple_command('GETQUOTAROOT', mailbox)\n typ, quota = self._untagged_response(typ, dat, 'QUOTA')\n typ, quotaroot = self._untagged_response(typ, dat, 'QUOTAROOT')\n return typ, [quotaroot, quota]\n\n\n def list(self, directory='\"\"', pattern='*'):\n \"\"\"List mailbox names in directory matching pattern.\n\n (typ, [data]) = <instance>.list(directory='\"\"', pattern='*')\n\n 'data' is list of LIST responses.\n \"\"\"\n name = 'LIST'\n typ, dat = self._simple_command(name, directory, pattern)\n return self._untagged_response(typ, dat, name)\n\n\n def login(self, user, password):\n \"\"\"Identify client using plaintext password.\n\n (typ, [data]) = <instance>.login(user, password)\n\n NB: 'password' will be quoted.\n \"\"\"\n typ, dat = self._simple_command('LOGIN', user, self._quote(password))\n if typ != 'OK':\n raise self.error(dat[-1])\n self.state = 'AUTH'\n return typ, dat\n\n\n def login_cram_md5(self, user, password):\n \"\"\" Force use of CRAM-MD5 authentication.\n\n (typ, [data]) = <instance>.login_cram_md5(user, password)\n \"\"\"\n self.user, self.password = user, password\n return self.authenticate('CRAM-MD5', self._CRAM_MD5_AUTH)\n\n\n def _CRAM_MD5_AUTH(self, challenge):\n \"\"\" Authobject to use with CRAM-MD5 authentication. \"\"\"\n import hmac\n return self.user + \" \" + hmac.HMAC(self.password, challenge).hexdigest()\n\n\n def logout(self):\n \"\"\"Shutdown connection to server.\n\n (typ, [data]) = <instance>.logout()\n\n Returns server 'BYE' response.\n \"\"\"\n self.state = 'LOGOUT'\n try: typ, dat = self._simple_command('LOGOUT')\n except: typ, dat = 'NO', ['%s: %s' % sys.exc_info()[:2]]\n self.shutdown()\n if 'BYE' in self.untagged_responses:\n return 'BYE', self.untagged_responses['BYE']\n return typ, dat\n\n\n def lsub(self, directory='\"\"', pattern='*'):\n \"\"\"List 'subscribed' mailbox names in directory matching pattern.\n\n (typ, [data, ...]) = <instance>.lsub(directory='\"\"', pattern='*')\n\n 'data' are tuples of message part envelope and data.\n \"\"\"\n name = 'LSUB'\n typ, dat = self._simple_command(name, directory, pattern)\n return self._untagged_response(typ, dat, name)\n\n def myrights(self, mailbox):\n \"\"\"Show my ACLs for a mailbox (i.e. the rights that I have on mailbox).\n\n (typ, [data]) = <instance>.myrights(mailbox)\n \"\"\"\n typ,dat = self._simple_command('MYRIGHTS', mailbox)\n return self._untagged_response(typ, dat, 'MYRIGHTS')\n\n def namespace(self):\n \"\"\" Returns IMAP namespaces ala rfc2342\n\n (typ, [data, ...]) = <instance>.namespace()\n \"\"\"\n name = 'NAMESPACE'\n typ, dat = self._simple_command(name)\n return self._untagged_response(typ, dat, name)\n\n\n def noop(self):\n \"\"\"Send NOOP command.\n\n (typ, [data]) = <instance>.noop()\n \"\"\"\n if __debug__:\n if self.debug >= 3:\n self._dump_ur(self.untagged_responses)\n return self._simple_command('NOOP')\n\n\n def partial(self, message_num, message_part, start, length):\n \"\"\"Fetch truncated part of a message.\n\n (typ, [data, ...]) = <instance>.partial(message_num, message_part, start, length)\n\n 'data' is tuple of message part envelope and data.\n \"\"\"\n name = 'PARTIAL'\n typ, dat = self._simple_command(name, message_num, message_part, start, length)\n return self._untagged_response(typ, dat, 'FETCH')\n\n\n def proxyauth(self, user):\n \"\"\"Assume authentication as \"user\".\n\n Allows an authorised administrator to proxy into any user's\n mailbox.\n\n (typ, [data]) = <instance>.proxyauth(user)\n \"\"\"\n\n name = 'PROXYAUTH'\n return self._simple_command('PROXYAUTH', user)\n\n\n def rename(self, oldmailbox, newmailbox):\n \"\"\"Rename old mailbox name to new.\n\n (typ, [data]) = <instance>.rename(oldmailbox, newmailbox)\n \"\"\"\n return self._simple_command('RENAME', oldmailbox, newmailbox)\n\n\n def search(self, charset, *criteria):\n \"\"\"Search mailbox for matching messages.\n\n (typ, [data]) = <instance>.search(charset, criterion, ...)\n\n 'data' is space separated list of matching message numbers.\n \"\"\"\n name = 'SEARCH'\n if charset:\n typ, dat = self._simple_command(name, 'CHARSET', charset, *criteria)\n else:\n typ, dat = self._simple_command(name, *criteria)\n return self._untagged_response(typ, dat, name)\n\n\n def select(self, mailbox='INBOX', readonly=False):\n \"\"\"Select a mailbox.\n\n Flush all untagged responses.\n\n (typ, [data]) = <instance>.select(mailbox='INBOX', readonly=False)\n\n 'data' is count of messages in mailbox ('EXISTS' response).\n\n Mandated responses are ('FLAGS', 'EXISTS', 'RECENT', 'UIDVALIDITY'), so\n other responses should be obtained via <instance>.response('FLAGS') etc.\n \"\"\"\n self.untagged_responses = {} # Flush old responses.\n self.is_readonly = readonly\n if readonly:\n name = 'EXAMINE'\n else:\n name = 'SELECT'\n typ, dat = self._simple_command(name, mailbox)\n if typ != 'OK':\n self.state = 'AUTH' # Might have been 'SELECTED'\n return typ, dat\n self.state = 'SELECTED'\n if 'READ-ONLY' in self.untagged_responses \\\n and not readonly:\n if __debug__:\n if self.debug >= 1:\n self._dump_ur(self.untagged_responses)\n raise self.readonly('%s is not writable' % mailbox)\n return typ, self.untagged_responses.get('EXISTS', [None])\n\n\n def setacl(self, mailbox, who, what):\n \"\"\"Set a mailbox acl.\n\n (typ, [data]) = <instance>.setacl(mailbox, who, what)\n \"\"\"\n return self._simple_command('SETACL', mailbox, who, what)\n\n\n def setannotation(self, *args):\n \"\"\"(typ, [data]) = <instance>.setannotation(mailbox[, entry, attribute]+)\n Set ANNOTATIONs.\"\"\"\n\n typ, dat = self._simple_command('SETANNOTATION', *args)\n return self._untagged_response(typ, dat, 'ANNOTATION')\n\n\n def setquota(self, root, limits):\n \"\"\"Set the quota root's resource limits.\n\n (typ, [data]) = <instance>.setquota(root, limits)\n \"\"\"\n typ, dat = self._simple_command('SETQUOTA', root, limits)\n return self._untagged_response(typ, dat, 'QUOTA')\n\n\n def sort(self, sort_criteria, charset, *search_criteria):\n \"\"\"IMAP4rev1 extension SORT command.\n\n (typ, [data]) = <instance>.sort(sort_criteria, charset, search_criteria, ...)\n \"\"\"\n name = 'SORT'\n #if not name in self.capabilities: # Let the server decide!\n # raise self.error('unimplemented extension command: %s' % name)\n if (sort_criteria[0],sort_criteria[-1]) != ('(',')'):\n sort_criteria = '(%s)' % sort_criteria\n typ, dat = self._simple_command(name, sort_criteria, charset, *search_criteria)\n return self._untagged_response(typ, dat, name)\n\n\n def status(self, mailbox, names):\n \"\"\"Request named status conditions for mailbox.\n\n (typ, [data]) = <instance>.status(mailbox, names)\n \"\"\"\n name = 'STATUS'\n #if self.PROTOCOL_VERSION == 'IMAP4': # Let the server decide!\n # raise self.error('%s unimplemented in IMAP4 (obtain IMAP4rev1 server, or re-code)' % name)\n typ, dat = self._simple_command(name, mailbox, names)\n return self._untagged_response(typ, dat, name)\n\n\n def store(self, message_set, command, flags):\n \"\"\"Alters flag dispositions for messages in mailbox.\n\n (typ, [data]) = <instance>.store(message_set, command, flags)\n \"\"\"\n if (flags[0],flags[-1]) != ('(',')'):\n flags = '(%s)' % flags # Avoid quoting the flags\n typ, dat = self._simple_command('STORE', message_set, command, flags)\n return self._untagged_response(typ, dat, 'FETCH')\n\n\n def subscribe(self, mailbox):\n \"\"\"Subscribe to new mailbox.\n\n (typ, [data]) = <instance>.subscribe(mailbox)\n \"\"\"\n return self._simple_command('SUBSCRIBE', mailbox)\n\n\n def thread(self, threading_algorithm, charset, *search_criteria):\n \"\"\"IMAPrev1 extension THREAD command.\n\n (type, [data]) = <instance>.thread(threading_algorithm, charset, search_criteria, ...)\n \"\"\"\n name = 'THREAD'\n typ, dat = self._simple_command(name, threading_algorithm, charset, *search_criteria)\n return self._untagged_response(typ, dat, name)\n\n\n def uid(self, command, *args):\n \"\"\"Execute \"command arg ...\" with messages identified by UID,\n rather than message number.\n\n (typ, [data]) = <instance>.uid(command, arg1, arg2, ...)\n\n Returns response appropriate to 'command'.\n \"\"\"\n command = command.upper()\n if not command in Commands:\n raise self.error(\"Unknown IMAP4 UID command: %s\" % command)\n if self.state not in Commands[command]:\n raise self.error(\"command %s illegal in state %s, \"\n \"only allowed in states %s\" %\n (command, self.state,\n ', '.join(Commands[command])))\n name = 'UID'\n typ, dat = self._simple_command(name, command, *args)\n if command in ('SEARCH', 'SORT', 'THREAD'):\n name = command\n else:\n name = 'FETCH'\n return self._untagged_response(typ, dat, name)\n\n\n def unsubscribe(self, mailbox):\n \"\"\"Unsubscribe from old mailbox.\n\n (typ, [data]) = <instance>.unsubscribe(mailbox)\n \"\"\"\n return self._simple_command('UNSUBSCRIBE', mailbox)\n\n\n def xatom(self, name, *args):\n \"\"\"Allow simple extension commands\n notified by server in CAPABILITY response.\n\n Assumes command is legal in current state.\n\n (typ, [data]) = <instance>.xatom(name, arg, ...)\n\n Returns response appropriate to extension command `name'.\n \"\"\"\n name = name.upper()\n #if not name in self.capabilities: # Let the server decide!\n # raise self.error('unknown extension command: %s' % name)\n if not name in Commands:\n Commands[name] = (self.state,)\n return self._simple_command(name, *args)\n\n\n\n # Private methods\n\n\n def _append_untagged(self, typ, dat):\n\n if dat is None: dat = ''\n ur = self.untagged_responses\n if __debug__:\n if self.debug >= 5:\n self._mesg('untagged_responses[%s] %s += [\"%s\"]' %\n (typ, len(ur.get(typ,'')), dat))\n if typ in ur:\n ur[typ].append(dat)\n else:\n ur[typ] = [dat]\n\n\n def _check_bye(self):\n bye = self.untagged_responses.get('BYE')\n if bye:\n raise self.abort(bye[-1])\n\n\n def _command(self, name, *args):\n\n if self.state not in Commands[name]:\n self.literal = None\n raise self.error(\"command %s illegal in state %s, \"\n \"only allowed in states %s\" %\n (name, self.state,\n ', '.join(Commands[name])))\n\n for typ in ('OK', 'NO', 'BAD'):\n if typ in self.untagged_responses:\n del self.untagged_responses[typ]\n\n if 'READ-ONLY' in self.untagged_responses \\\n and not self.is_readonly:\n raise self.readonly('mailbox status changed to READ-ONLY')\n\n tag = self._new_tag()\n data = '%s %s' % (tag, name)\n for arg in args:\n if arg is None: continue\n data = '%s %s' % (data, self._checkquote(arg))\n\n literal = self.literal\n if literal is not None:\n self.literal = None\n if type(literal) is type(self._command):\n literator = literal\n else:\n literator = None\n data = '%s {%s}' % (data, len(literal))\n\n if __debug__:\n if self.debug >= 4:\n self._mesg('> %s' % data)\n else:\n self._log('> %s' % data)\n\n try:\n self.send('%s%s' % (data, CRLF))\n except (socket.error, OSError), val:\n raise self.abort('socket error: %s' % val)\n\n if literal is None:\n return tag\n\n while 1:\n # Wait for continuation response\n\n while self._get_response():\n if self.tagged_commands[tag]: # BAD/NO?\n return tag\n\n # Send literal\n\n if literator:\n literal = literator(self.continuation_response)\n\n if __debug__:\n if self.debug >= 4:\n self._mesg('write literal size %s' % len(literal))\n\n try:\n self.send(literal)\n self.send(CRLF)\n except (socket.error, OSError), val:\n raise self.abort('socket error: %s' % val)\n\n if not literator:\n break\n\n return tag\n\n\n def _command_complete(self, name, tag):\n # BYE is expected after LOGOUT\n if name != 'LOGOUT':\n self._check_bye()\n try:\n typ, data = self._get_tagged_response(tag)\n except self.abort, val:\n raise self.abort('command: %s => %s' % (name, val))\n except self.error, val:\n raise self.error('command: %s => %s' % (name, val))\n if name != 'LOGOUT':\n self._check_bye()\n if typ == 'BAD':\n raise self.error('%s command error: %s %s' % (name, typ, data))\n return typ, data\n\n\n def _get_response(self):\n\n # Read response and store.\n #\n # Returns None for continuation responses,\n # otherwise first response line received.\n\n resp = self._get_line()\n\n # Command completion response?\n\n if self._match(self.tagre, resp):\n tag = self.mo.group('tag')\n if not tag in self.tagged_commands:\n raise self.abort('unexpected tagged response: %s' % resp)\n\n typ = self.mo.group('type')\n dat = self.mo.group('data')\n self.tagged_commands[tag] = (typ, [dat])\n else:\n dat2 = None\n\n # '*' (untagged) responses?\n\n if not self._match(Untagged_response, resp):\n if self._match(Untagged_status, resp):\n dat2 = self.mo.group('data2')\n\n if self.mo is None:\n # Only other possibility is '+' (continuation) response...\n\n if self._match(Continuation, resp):\n self.continuation_response = self.mo.group('data')\n return None # NB: indicates continuation\n\n raise self.abort(\"unexpected response: '%s'\" % resp)\n\n typ = self.mo.group('type')\n dat = self.mo.group('data')\n if dat is None: dat = '' # Null untagged response\n if dat2: dat = dat + ' ' + dat2\n\n # Is there a literal to come?\n\n while self._match(Literal, dat):\n\n # Read literal direct from connection.\n\n size = int(self.mo.group('size'))\n if __debug__:\n if self.debug >= 4:\n self._mesg('read literal size %s' % size)\n data = self.read(size)\n\n # Store response with literal as tuple\n\n self._append_untagged(typ, (dat, data))\n\n # Read trailer - possibly containing another literal\n\n dat = self._get_line()\n\n self._append_untagged(typ, dat)\n\n # Bracketed response information?\n\n if typ in ('OK', 'NO', 'BAD') and self._match(Response_code, dat):\n self._append_untagged(self.mo.group('type'), self.mo.group('data'))\n\n if __debug__:\n if self.debug >= 1 and typ in ('NO', 'BAD', 'BYE'):\n self._mesg('%s response: %s' % (typ, dat))\n\n return resp\n\n\n def _get_tagged_response(self, tag):\n\n while 1:\n result = self.tagged_commands[tag]\n if result is not None:\n del self.tagged_commands[tag]\n return result\n\n # Some have reported \"unexpected response\" exceptions.\n # Note that ignoring them here causes loops.\n # Instead, send me details of the unexpected response and\n # I'll update the code in `_get_response()'.\n\n try:\n self._get_response()\n except self.abort, val:\n if __debug__:\n if self.debug >= 1:\n self.print_log()\n raise\n\n\n def _get_line(self):\n\n line = self.readline()\n if not line:\n raise self.abort('socket error: EOF')\n\n # Protocol mandates all lines terminated by CRLF\n if not line.endswith('\\r\\n'):\n raise self.abort('socket error: unterminated line')\n\n line = line[:-2]\n if __debug__:\n if self.debug >= 4:\n self._mesg('< %s' % line)\n else:\n self._log('< %s' % line)\n return line\n\n\n def _match(self, cre, s):\n\n # Run compiled regular expression match method on 's'.\n # Save result, return success.\n\n self.mo = cre.match(s)\n if __debug__:\n if self.mo is not None and self.debug >= 5:\n self._mesg(\"\\tmatched r'%s' => %r\" % (cre.pattern, self.mo.groups()))\n return self.mo is not None\n\n\n def _new_tag(self):\n\n tag = '%s%s' % (self.tagpre, self.tagnum)\n self.tagnum = self.tagnum + 1\n self.tagged_commands[tag] = None\n return tag\n\n\n def _checkquote(self, arg):\n\n # Must quote command args if non-alphanumeric chars present,\n # and not already quoted.\n\n if type(arg) is not type(''):\n return arg\n if len(arg) >= 2 and (arg[0],arg[-1]) in (('(',')'),('\"','\"')):\n return arg\n if arg and self.mustquote.search(arg) is None:\n return arg\n return self._quote(arg)\n\n\n def _quote(self, arg):\n\n arg = arg.replace('\\\\', '\\\\\\\\')\n arg = arg.replace('\"', '\\\\\"')\n\n return '\"%s\"' % arg\n\n\n def _simple_command(self, name, *args):\n\n return self._command_complete(name, self._command(name, *args))\n\n\n def _untagged_response(self, typ, dat, name):\n\n if typ == 'NO':\n return typ, dat\n if not name in self.untagged_responses:\n return typ, [None]\n data = self.untagged_responses.pop(name)\n if __debug__:\n if self.debug >= 5:\n self._mesg('untagged_responses[%s] => %s' % (name, data))\n return typ, data\n\n\n if __debug__:\n\n def _mesg(self, s, secs=None):\n if secs is None:\n secs = time.time()\n tm = time.strftime('%M:%S', time.localtime(secs))\n sys.stderr.write(' %s.%02d %s\\n' % (tm, (secs*100)%100, s))\n sys.stderr.flush()\n\n def _dump_ur(self, dict):\n # Dump untagged responses (in `dict').\n l = dict.items()\n if not l: return\n t = '\\n\\t\\t'\n l = map(lambda x:'%s: \"%s\"' % (x[0], x[1][0] and '\" \"'.join(x[1]) or ''), l)\n self._mesg('untagged responses dump:%s%s' % (t, t.join(l)))\n\n def _log(self, line):\n # Keep log of last `_cmd_log_len' interactions for debugging.\n self._cmd_log[self._cmd_log_idx] = (line, time.time())\n self._cmd_log_idx += 1\n if self._cmd_log_idx >= self._cmd_log_len:\n self._cmd_log_idx = 0\n\n def print_log(self):\n self._mesg('last %d IMAP4 interactions:' % len(self._cmd_log))\n i, n = self._cmd_log_idx, self._cmd_log_len\n while n:\n try:\n self._mesg(*self._cmd_log[i])\n except:\n pass\n i += 1\n if i >= self._cmd_log_len:\n i = 0\n n -= 1\n\n\n\ntry:\n import ssl\nexcept ImportError:\n pass\nelse:\n class IMAP4_SSL(IMAP4):\n\n \"\"\"IMAP4 client class over SSL connection\n\n Instantiate with: IMAP4_SSL([host[, port[, keyfile[, certfile]]]])\n\n host - host's name (default: localhost);\n port - port number (default: standard IMAP4 SSL port).\n keyfile - PEM formatted file that contains your private key (default: None);\n certfile - PEM formatted certificate chain file (default: None);\n\n for more documentation see the docstring of the parent class IMAP4.\n \"\"\"\n\n\n def __init__(self, host = '', port = IMAP4_SSL_PORT, keyfile = None, certfile = None):\n self.keyfile = keyfile\n self.certfile = certfile\n IMAP4.__init__(self, host, port)\n\n\n def open(self, host = '', port = IMAP4_SSL_PORT):\n \"\"\"Setup connection to remote server on \"host:port\".\n (default: localhost:standard IMAP4 SSL port).\n This connection will be used by the routines:\n read, readline, send, shutdown.\n \"\"\"\n self.host = host\n self.port = port\n self.sock = socket.create_connection((host, port))\n self.sslobj = ssl.wrap_socket(self.sock, self.keyfile, self.certfile)\n self.file = self.sslobj.makefile('rb')\n\n\n def read(self, size):\n \"\"\"Read 'size' bytes from remote.\"\"\"\n return self.file.read(size)\n\n\n def readline(self):\n \"\"\"Read line from remote.\"\"\"\n return self.file.readline()\n\n\n def send(self, data):\n \"\"\"Send data to remote.\"\"\"\n bytes = len(data)\n while bytes > 0:\n sent = self.sslobj.write(data)\n if sent == bytes:\n break # avoid copy\n data = data[sent:]\n bytes = bytes - sent\n\n\n def shutdown(self):\n \"\"\"Close I/O established in \"open\".\"\"\"\n self.file.close()\n self.sock.close()\n\n\n def socket(self):\n \"\"\"Return socket instance used to connect to IMAP4 server.\n\n socket = <instance>.socket()\n \"\"\"\n return self.sock\n\n\n def ssl(self):\n \"\"\"Return SSLObject instance used to communicate with the IMAP4 server.\n\n ssl = ssl.wrap_socket(<instance>.socket)\n \"\"\"\n return self.sslobj\n\n __all__.append(\"IMAP4_SSL\")\n\n\nclass IMAP4_stream(IMAP4):\n\n \"\"\"IMAP4 client class over a stream\n\n Instantiate with: IMAP4_stream(command)\n\n where \"command\" is a string that can be passed to subprocess.Popen()\n\n for more documentation see the docstring of the parent class IMAP4.\n \"\"\"\n\n\n def __init__(self, command):\n self.command = command\n IMAP4.__init__(self)\n\n\n def open(self, host = None, port = None):\n \"\"\"Setup a stream connection.\n This connection will be used by the routines:\n read, readline, send, shutdown.\n \"\"\"\n self.host = None # For compatibility with parent class\n self.port = None\n self.sock = None\n self.file = None\n self.process = subprocess.Popen(self.command,\n stdin=subprocess.PIPE, stdout=subprocess.PIPE,\n shell=True, close_fds=True)\n self.writefile = self.process.stdin\n self.readfile = self.process.stdout\n\n\n def read(self, size):\n \"\"\"Read 'size' bytes from remote.\"\"\"\n return self.readfile.read(size)\n\n\n def readline(self):\n \"\"\"Read line from remote.\"\"\"\n return self.readfile.readline()\n\n\n def send(self, data):\n \"\"\"Send data to remote.\"\"\"\n self.writefile.write(data)\n self.writefile.flush()\n\n\n def shutdown(self):\n \"\"\"Close I/O established in \"open\".\"\"\"\n self.readfile.close()\n self.writefile.close()\n self.process.wait()\n\n\n\nclass _Authenticator:\n\n \"\"\"Private class to provide en/decoding\n for base64-based authentication conversation.\n \"\"\"\n\n def __init__(self, mechinst):\n self.mech = mechinst # Callable object to provide/process data\n\n def process(self, data):\n ret = self.mech(self.decode(data))\n if ret is None:\n return '*' # Abort conversation\n return self.encode(ret)\n\n def encode(self, inp):\n #\n # Invoke binascii.b2a_base64 iteratively with\n # short even length buffers, strip the trailing\n # line feed from the result and append. \"Even\"\n # means a number that factors to both 6 and 8,\n # so when it gets to the end of the 8-bit input\n # there's no partial 6-bit output.\n #\n oup = ''\n while inp:\n if len(inp) > 48:\n t = inp[:48]\n inp = inp[48:]\n else:\n t = inp\n inp = ''\n e = binascii.b2a_base64(t)\n if e:\n oup = oup + e[:-1]\n return oup\n\n def decode(self, inp):\n if not inp:\n return ''\n return binascii.a2b_base64(inp)\n\n\n\nMon2num = {'Jan': 1, 'Feb': 2, 'Mar': 3, 'Apr': 4, 'May': 5, 'Jun': 6,\n 'Jul': 7, 'Aug': 8, 'Sep': 9, 'Oct': 10, 'Nov': 11, 'Dec': 12}\n\ndef Internaldate2tuple(resp):\n \"\"\"Parse an IMAP4 INTERNALDATE string.\n\n Return corresponding local time. The return value is a\n time.struct_time instance or None if the string has wrong format.\n \"\"\"\n\n mo = InternalDate.match(resp)\n if not mo:\n return None\n\n mon = Mon2num[mo.group('mon')]\n zonen = mo.group('zonen')\n\n day = int(mo.group('day'))\n year = int(mo.group('year'))\n hour = int(mo.group('hour'))\n min = int(mo.group('min'))\n sec = int(mo.group('sec'))\n zoneh = int(mo.group('zoneh'))\n zonem = int(mo.group('zonem'))\n\n # INTERNALDATE timezone must be subtracted to get UT\n\n zone = (zoneh*60 + zonem)*60\n if zonen == '-':\n zone = -zone\n\n tt = (year, mon, day, hour, min, sec, -1, -1, -1)\n\n utc = time.mktime(tt)\n\n # Following is necessary because the time module has no 'mkgmtime'.\n # 'mktime' assumes arg in local timezone, so adds timezone/altzone.\n\n lt = time.localtime(utc)\n if time.daylight and lt[-1]:\n zone = zone + time.altzone\n else:\n zone = zone + time.timezone\n\n return time.localtime(utc - zone)\n\n\n\ndef Int2AP(num):\n\n \"\"\"Convert integer to A-P string representation.\"\"\"\n\n val = ''; AP = 'ABCDEFGHIJKLMNOP'\n num = int(abs(num))\n while num:\n num, mod = divmod(num, 16)\n val = AP[mod] + val\n return val\n\n\n\ndef ParseFlags(resp):\n\n \"\"\"Convert IMAP4 flags response to python tuple.\"\"\"\n\n mo = Flags.match(resp)\n if not mo:\n return ()\n\n return tuple(mo.group('flags').split())\n\n\ndef Time2Internaldate(date_time):\n\n \"\"\"Convert date_time to IMAP4 INTERNALDATE representation.\n\n Return string in form: '\"DD-Mmm-YYYY HH:MM:SS +HHMM\"'. The\n date_time argument can be a number (int or float) representing\n seconds since epoch (as returned by time.time()), a 9-tuple\n representing local time (as returned by time.localtime()), or a\n double-quoted string. In the last case, it is assumed to already\n be in the correct format.\n \"\"\"\n\n if isinstance(date_time, (int, float)):\n tt = time.localtime(date_time)\n elif isinstance(date_time, (tuple, time.struct_time)):\n tt = date_time\n elif isinstance(date_time, str) and (date_time[0],date_time[-1]) == ('\"','\"'):\n return date_time # Assume in correct format\n else:\n raise ValueError(\"date_time not of a known type\")\n\n dt = time.strftime(\"%d-%b-%Y %H:%M:%S\", tt)\n if dt[0] == '0':\n dt = ' ' + dt[1:]\n if time.daylight and tt[-1]:\n zone = -time.altzone\n else:\n zone = -time.timezone\n return '\"' + dt + \" %+03d%02d\" % divmod(zone//60, 60) + '\"'\n\n\n\nif __name__ == '__main__':\n\n # To test: invoke either as 'python imaplib.py [IMAP4_server_hostname]'\n # or 'python imaplib.py -s \"rsh IMAP4_server_hostname exec /etc/rimapd\"'\n # to test the IMAP4_stream class\n\n import getopt, getpass\n\n try:\n optlist, args = getopt.getopt(sys.argv[1:], 'd:s:')\n except getopt.error, val:\n optlist, args = (), ()\n\n stream_command = None\n for opt,val in optlist:\n if opt == '-d':\n Debug = int(val)\n elif opt == '-s':\n stream_command = val\n if not args: args = (stream_command,)\n\n if not args: args = ('',)\n\n host = args[0]\n\n USER = getpass.getuser()\n PASSWD = getpass.getpass(\"IMAP password for %s on %s: \" % (USER, host or \"localhost\"))\n\n test_mesg = 'From: %(user)s@localhost%(lf)sSubject: IMAP4 test%(lf)s%(lf)sdata...%(lf)s' % {'user':USER, 'lf':'\\n'}\n test_seq1 = (\n ('login', (USER, PASSWD)),\n ('create', ('/tmp/xxx 1',)),\n ('rename', ('/tmp/xxx 1', '/tmp/yyy')),\n ('CREATE', ('/tmp/yyz 2',)),\n ('append', ('/tmp/yyz 2', None, None, test_mesg)),\n ('list', ('/tmp', 'yy*')),\n ('select', ('/tmp/yyz 2',)),\n ('search', (None, 'SUBJECT', 'test')),\n ('fetch', ('1', '(FLAGS INTERNALDATE RFC822)')),\n ('store', ('1', 'FLAGS', '(\\Deleted)')),\n ('namespace', ()),\n ('expunge', ()),\n ('recent', ()),\n ('close', ()),\n )\n\n test_seq2 = (\n ('select', ()),\n ('response',('UIDVALIDITY',)),\n ('uid', ('SEARCH', 'ALL')),\n ('response', ('EXISTS',)),\n ('append', (None, None, None, test_mesg)),\n ('recent', ()),\n ('logout', ()),\n )\n\n def run(cmd, args):\n M._mesg('%s %s' % (cmd, args))\n typ, dat = getattr(M, cmd)(*args)\n M._mesg('%s => %s %s' % (cmd, typ, dat))\n if typ == 'NO': raise dat[0]\n return dat\n\n try:\n if stream_command:\n M = IMAP4_stream(stream_command)\n else:\n M = IMAP4(host)\n if M.state == 'AUTH':\n test_seq1 = test_seq1[1:] # Login not needed\n M._mesg('PROTOCOL_VERSION = %s' % M.PROTOCOL_VERSION)\n M._mesg('CAPABILITIES = %r' % (M.capabilities,))\n\n for cmd,args in test_seq1:\n run(cmd, args)\n\n for ml in run('list', ('/tmp/', 'yy%')):\n mo = re.match(r'.*\"([^\"]+)\"$', ml)\n if mo: path = mo.group(1)\n else: path = ml.split()[-1]\n run('delete', (path,))\n\n for cmd,args in test_seq2:\n dat = run(cmd, args)\n\n if (cmd,args) != ('uid', ('SEARCH', 'ALL')):\n continue\n\n uid = dat[-1].split()\n if not uid: continue\n run('uid', ('FETCH', '%s' % uid[-1],\n '(FLAGS INTERNALDATE RFC822.SIZE RFC822.HEADER RFC822.TEXT)'))\n\n print '\\nAll tests OK.'\n\n except:\n print '\\nTests failed.'\n\n if not Debug:\n print '''\nIf you would like to see debugging output,\ntry: %s -d5\n''' % sys.argv[0]\n\n raise\n"} +{"text": "/*******************************************************************************\r\n * @license\r\n * Copyright (c) 2014 IBM Corporation and others. \r\n * All rights reserved. This program and the accompanying materials are made \r\n * available under the terms of the Eclipse Public License v1.0 \r\n * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution \r\n * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). \r\n * \r\n * Contributors: IBM Corporation - initial API and implementation\r\n ******************************************************************************/\r\n/*eslint-env browser, amd*/\r\ndefine([\r\n\t'orion/objects',\r\n\t'orion/webui/littlelib',\r\n\t'text!orion/webui/Slideout.html',\r\n\t'i18n!orion/nls/messages'\r\n], function(\r\n\tobjects, lib, SlideoutTemplate, messages\r\n) {\r\n\tvar VISIBILITY_TRANSITION_MS = 200; /* this should be equivalent to the transition duration set on .slideoutWrapper in Slideout.css */\r\n\t\r\n\t/**\r\n\t * Creates a generic slideout which can be appended to any dom node.\r\n\t * \r\n\t * This slideout is designed to have interchangeable content. Content\r\n\t * providers should extend the @ref orion.webui.SlideoutViewMode class.\r\n\t * \r\n\t * @param {DOMNode} parentNode The DOM node which this slideout will be appended to\r\n\t */\r\n\tfunction Slideout(parentNode) {\r\n\t\tthis._parentNode = parentNode;\r\n\t\tthis._initialize();\r\n\t}\r\n\r\n\tobjects.mixin(Slideout.prototype, /** @lends orion.webui.Slideout.prototype */ {\r\n\t\t_initialize: function() {\r\n\t\t\tvar range = document.createRange();\r\n\t\t\trange.selectNode(this._parentNode);\r\n\t\t\tvar domNodeFragment = range.createContextualFragment(SlideoutTemplate);\r\n\t\t\tlib.processTextNodes(domNodeFragment, messages);\r\n\t\t\tthis._parentNode.appendChild(domNodeFragment);\r\n\t\t\t\r\n\t\t\tthis._wrapperNode = lib.$(\".slideoutWrapper\", this._parentNode); //$NON-NLS-0$\r\n\t\t\t\r\n\t\t\tthis._contentNode = lib.$(\".slideoutContent\", this._wrapperNode); //$NON-NLS-0$\r\n\t\t\t\r\n\t\t\tthis._dismissButton = lib.$(\".dismissButton\", this._wrapperNode); //$NON-NLS-0$\r\n\t\t\tthis._dismissButton.addEventListener(\"click\", function(){ //$NON-NLS-0$\r\n\t\t\t\tif (this._currentViewMode) {\r\n\t\t\t\t\tthis._currentViewMode.hide();\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.hide();\r\n\t\t\t\t}\r\n\t\t\t}.bind(this));\r\n\t\t},\r\n\t\t\r\n\t\t/**\r\n\t\t * @return The DOM node which will hold this slideout's content\r\n\t\t */\r\n\t\tgetContentNode: function() {\r\n\t\t\treturn this._contentNode;\r\n\t\t},\r\n\t\t\r\n\t\t/**\r\n\t\t * @return The document.activeElement that was set when this slideout's\r\n\t\t * @ref show() method was called.\r\n\t\t */\r\n\t\tgetPreviousActiveElement: function() {\r\n\t\t\treturn this._previousActiveElement;\r\n\t\t},\r\n\t\t\r\n\t\t/**\r\n\t\t * @return The @ref orion.webui.SlideoutViewMode that was last passed\r\n\t\t * to this slideout's @ref show() method.\r\n\t\t */\r\n\t\tgetCurrentViewMode: function() {\r\n\t\t\treturn this._currentViewMode;\r\n\t\t},\r\n\t\t\r\n\t\t/**\r\n\t\t * @return True if this slideout is visible, false otherwise\r\n\t\t */\r\n\t\tisVisible: function() {\r\n\t\t\treturn this._wrapperNode.classList.contains(\"slideoutWrapperVisible\"); //$NON-NLS-0$\r\n\t\t},\r\n\r\n\t\t/**\r\n\t\t * Makes this slideout visible.\r\n\t\t * \r\n\t\t * If the specified @ref slideoutViewMode is different from the \r\n\t\t * @ref _currentViewMode the contents of this slideout's content \r\n\t\t * are replaced with the contents of the specified @ref slideoutViewMode\r\n\t\t * first.\r\n\t\t * \r\n\t\t * @param {orion.webui.SlideoutViewMode} slideoutViewMode The view mode with the contents of the slideout to be shown\r\n\t\t */\r\n\t\tshow: function(slideoutViewMode) {\r\n\t\t\tthis._previousActiveElement = document.activeElement;\r\n\t\t\tlib.trapTabs(this._wrapperNode);\r\n\t\t\t\r\n\t\t\t// replace _contentNode's contents\r\n\t\t\tif (this._currentViewMode !== slideoutViewMode) {\r\n\t\t\t\tlib.empty(this._contentNode);\r\n\t\t\t\tthis._contentNode.appendChild(slideoutViewMode.getWrapperNode());\r\n\t\t\t\tthis._currentViewMode = slideoutViewMode;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif (this._visibilityTransitionTimeout) {\r\n\t\t\t\tthis._wrapperNode.classList.remove(\"slideoutWrapperHiding\"); //$NON-NLS-0$\r\n\t\t\t\twindow.clearTimeout(this._visibilityTransitionTimeout);\r\n\t\t\t\tthis._visibilityTransitionTimeout = null;\r\n\t\t\t}\r\n\t\t\tthis._wrapperNode.classList.add(\"slideoutWrapperVisible\"); //$NON-NLS-0$\r\n\t\t},\r\n\t\t\r\n\t\t/**\r\n\t\t * Hides the slideout.\r\n\t\t */\r\n\t\thide: function() {\r\n\t\t\tlib.returnFocus(this._wrapperNode, this._previousActiveElement);\r\n\t\t\tthis._previousActiveElement = null;\r\n\r\n\t\t\tthis._wrapperNode.classList.remove(\"slideoutWrapperVisible\"); //$NON-NLS-0$\r\n\t\t\t\r\n\t\t\tthis._wrapperNode.classList.add(\"slideoutWrapperHiding\"); //$NON-NLS-0$\r\n\t\t\tthis._visibilityTransitionTimeout = window.setTimeout(function() {\r\n\t\t\t\tthis._visibilityTransitionTimeout = null;\r\n\t\t\t\tthis._wrapperNode.classList.remove(\"slideoutWrapperHiding\"); //$NON-NLS-0$\r\n\t\t\t}.bind(this), VISIBILITY_TRANSITION_MS);\r\n\t\t}\r\n\t});\r\n\t\r\n\t/**\r\n\t * This class controls all the content and the behavior that will be displayed\r\n\t * by a slideout. A single slideout can display several SlideoutViewModes.\r\n\t * \r\n\t * @param {orion.webui.Slideout} slideout The slideout which will display the contents of this view mode.\r\n\t * \r\n\t * @note Users must override the @ref getWrapperNode() method\r\n\t */\r\n\tfunction SlideoutViewMode(slideout) {\r\n\t\tthis._slideout = slideout;\r\n\t\tthis._parentNode = slideout.getContentNode();\r\n\t}\r\n\t\r\n\tobjects.mixin(SlideoutViewMode.prototype, /** @lends orion.webui.SlideoutViewMode.prototype */ {\r\n\t\t/**\r\n\t\t * Makes the associated slideout display the contents of this view mode.\r\n\t\t */\r\n\t\tshow: function() {\r\n\t\t\tthis._slideout.show(this);\r\n\t\t},\r\n\t\t/**\r\n\t\t * Hides the associated slideout.\r\n\t\t */\r\n\t\thide: function() {\r\n\t\t\tthis._slideout.hide();\r\n\t\t},\r\n\t\t/**\r\n\t\t * @return The DOM node which wraps the contents of this view mode.\r\n\t\t * \r\n\t\t * @note This method MUST be overriden\r\n\t\t */\r\n\t\tgetWrapperNode: function() {\r\n\t\t\tthrow new Error(\"this function must be overriden\"); //$NON-NLS-0$\r\n\t\t}\r\n\t});\r\n\t\r\n\r\n\treturn {\r\n\t\tSlideout: Slideout,\r\n\t\tSlideoutViewMode: SlideoutViewMode\r\n\t};\r\n});\r\n"} +{"text": "#!/bin/sh\n# SPDX-License-Identifier: GPL-2.0\n# description: event trigger - test snapshot-trigger\n# requires: set_event events/sched/sched_process_fork/trigger snapshot\n\nfail() { #msg\n echo $1\n exit_fail\n}\n\nFEATURE=`grep snapshot events/sched/sched_process_fork/trigger`\nif [ -z \"$FEATURE\" ]; then\n echo \"snapshot trigger is not supported\"\n exit_unsupported\nfi\n\necho \"Test snapshot trigger\"\necho 0 > snapshot\necho 1 > events/sched/sched_process_fork/enable\n( echo \"forked\")\necho 'snapshot:1' > events/sched/sched_process_fork/trigger\n( echo \"forked\")\ngrep sched_process_fork snapshot > /dev/null || \\\n fail \"snapshot trigger on sched_process_fork did not work\"\n\nreset_trigger\necho 0 > snapshot\necho 0 > events/sched/sched_process_fork/enable\n\necho \"Test snapshot semantic errors\"\n\n! echo \"snapshot+1\" > events/sched/sched_process_fork/trigger\necho \"snapshot\" > events/sched/sched_process_fork/trigger\n! echo \"snapshot\" > events/sched/sched_process_fork/trigger\n\nexit 0\n"} +{"text": "define( function() {\n\n\"use strict\";\n\nfunction nodeName( elem, name ) {\n\n return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();\n\n};\n\nreturn nodeName;\n\n} );\n"} +{"text": "// Copyright 2019 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n// +build linux\n\npackage procfs\n\nimport \"testing\"\n\nconst (\n\tcpuinfoArm7Legacy = `\nProcessor : ARMv7 Processor rev 5 (v7l)\nprocessor : 0\nBogoMIPS : 2400.00\n\nprocessor : 1\nBogoMIPS : 2400.00\n\nFeatures : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt\nCPU implementer : 0x41\nCPU architecture: 7\nCPU variant : 0x0\nCPU part : 0xc07\nCPU revision : 5\n\nHardware : sun8i\nRevision : 0000\nSerial : 5400503583203c3c040e`\n\n\tcpuinfoArm7LegacyV1 = `\nProcessor : ARMv6-compatible processor rev 5 (v6l)\nBogoMIPS : 791.34\nFeatures : swp half thumb fastmult vfp edsp java \nCPU implementer : 0x41\nCPU architecture: 6TEJ\nCPU variant : 0x1\nCPU part : 0xb36\nCPU revision : 5\n\nHardware : IMAPX200\nRevision : 0000\nSerial : 0000000000000000`\n\n\tcpuinfoArm7 = `\nprocessor : 0\nmodel name : ARMv7 Processor rev 3 (v7l)\nBogoMIPS : 108.00\nFeatures : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32\nCPU implementer : 0x41\nCPU architecture: 7\nCPU variant : 0x0\nCPU part : 0xd08\nCPU revision : 3\n\nprocessor : 1\nmodel name : ARMv7 Processor rev 3 (v7l)\nBogoMIPS : 108.00\nFeatures : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32\nCPU implementer : 0x41\nCPU architecture: 7\nCPU variant : 0x0\nCPU part : 0xd08\nCPU revision : 3\n\nprocessor : 2\nmodel name : ARMv7 Processor rev 3 (v7l)\nBogoMIPS : 108.00\nFeatures : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32\nCPU implementer : 0x41\nCPU architecture: 7\nCPU variant : 0x0\nCPU part : 0xd08\nCPU revision : 3\n\nprocessor : 3\nmodel name : ARMv7 Processor rev 3 (v7l)\nBogoMIPS : 108.00\nFeatures : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm crc32\nCPU implementer : 0x41\nCPU architecture: 7\nCPU variant : 0x0\nCPU part : 0xd08\nCPU revision : 3\n\nHardware : BCM2835\nRevision : c03111\n`\n\n\tcpuinfoS390x = `\nvendor_id : IBM/S390\n# processors : 4\nbogomips per cpu: 3033.00\nmax thread id : 0\nfeatures\t: esan3 zarch stfle msa ldisp eimm dfp edat etf3eh highgprs te vx sie\nfacilities : 0 1 2 3 4 6 7 8 9 10 12 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 30 31 32 33 34 35 36 37 40 41 42 43 44 45 46 47 48 49 50 51 52 53 55 57 73 74 75 76 77 80 81 82 128 129 131\ncache0 : level=1 type=Data scope=Private size=128K line_size=256 associativity=8\ncache1 : level=1 type=Instruction scope=Private size=96K line_size=256 associativity=6\ncache2 : level=2 type=Data scope=Private size=2048K line_size=256 associativity=8\ncache3 : level=2 type=Instruction scope=Private size=2048K line_size=256 associativity=8\ncache4 : level=3 type=Unified scope=Shared size=65536K line_size=256 associativity=16\ncache5 : level=4 type=Unified scope=Shared size=491520K line_size=256 associativity=30\nprocessor 0: version = FF, identification = 2733E8, machine = 2964\nprocessor 1: version = FF, identification = 2733E8, machine = 2964\nprocessor 2: version = FF, identification = 2733E8, machine = 2964\nprocessor 3: version = FF, identification = 2733E8, machine = 2964\n\ncpu number : 0\ncpu MHz dynamic : 5000\ncpu MHz static : 5000\n\ncpu number : 1\ncpu MHz dynamic : 5000\ncpu MHz static : 5000\n\ncpu number : 2\ncpu MHz dynamic : 5000\ncpu MHz static : 5000\n\ncpu number : 3\ncpu MHz dynamic : 5000\ncpu MHz static : 5000\n`\n\n\tcpuinfoMips = `\nsystem type\t\t: UBNT_E100\nmachine\t\t\t: Unknown\nprocessor\t\t: 0\ncpu model\t\t: Cavium Octeon+ V0.1\nBogoMIPS\t\t: 1000.00\nwait instruction\t: yes\nmicrosecond timers\t: yes\ntlb_entries\t\t: 64\nextra interrupt vector\t: yes\nhardware watchpoint\t: yes, count: 2, address/irw mask: [0x0ffc, 0x0ffb]\nisa\t\t\t: mips1 mips2 mips3 mips4 mips5 mips64r2\nASEs implemented\t:\nshadow register sets\t: 1\nkscratch registers\t: 0\ncore\t\t\t: 0\nVCED exceptions\t\t: not available\nVCEI exceptions\t\t: not available\n\nprocessor\t\t: 1\ncpu model\t\t: Cavium Octeon+ V0.1\nBogoMIPS\t\t: 1000.00\nwait instruction\t: yes\nmicrosecond timers\t: yes\ntlb_entries\t\t: 64\nextra interrupt vector\t: yes\nhardware watchpoint\t: yes, count: 2, address/irw mask: [0x0ffc, 0x0ffb]\nisa\t\t\t: mips1 mips2 mips3 mips4 mips5 mips64r2\nASEs implemented\t:\nshadow register sets\t: 1\nkscratch registers\t: 0\ncore\t\t\t: 1\nVCED exceptions\t\t: not available\nVCEI exceptions\t\t: not available\n\n`\n\n\tcpuinfoPpc64 = `\nprocessor\t: 0\ncpu\t\t: POWER7 (architected), altivec supported\nclock\t\t: 3000.000000MHz\nrevision\t: 2.1 (pvr 003f 0201)\n\nprocessor\t: 1\ncpu\t\t: POWER7 (architected), altivec supported\nclock\t\t: 3000.000000MHz\nrevision\t: 2.1 (pvr 003f 0201)\n\nprocessor\t: 2\ncpu\t\t: POWER7 (architected), altivec supported\nclock\t\t: 3000.000000MHz\nrevision\t: 2.1 (pvr 003f 0201)\n\nprocessor\t: 3\ncpu\t\t: POWER7 (architected), altivec supported\nclock\t\t: 3000.000000MHz\nrevision\t: 2.1 (pvr 003f 0201)\n\nprocessor\t: 4\ncpu\t\t: POWER7 (architected), altivec supported\nclock\t\t: 3000.000000MHz\nrevision\t: 2.1 (pvr 003f 0201)\n\nprocessor\t: 5\ncpu\t\t: POWER7 (architected), altivec supported\nclock\t\t: 3000.000000MHz\nrevision\t: 2.1 (pvr 003f 0201)\n\ntimebase\t: 512000000\nplatform\t: pSeries\nmodel\t\t: IBM,8233-E8B\nmachine\t\t: CHRP IBM,8233-E8B\n`\n\n\tcpuinfoRiscv64 = `\nprocessor\t: 0\nhart\t\t: 0\nisa\t\t: rv64imafdcsu\nmmu\t\t: sv48\n\nprocessor\t: 1\nhart\t\t: 1\nisa\t\t: rv64imafdcsu\nmmu\t\t: sv48\n`\n)\n\nfunc TestCPUInfoX86(t *testing.T) {\n\tparseCPUInfo = parseCPUInfoX86\n\tcpuinfo, err := getProcFixtures(t).CPUInfo()\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n\n\tif cpuinfo == nil {\n\t\tt.Fatal(\"cpuinfo is nil\")\n\t}\n\n\tif want, have := 8, len(cpuinfo); want != have {\n\t\tt.Errorf(\"want number of processors %v, have %v\", want, have)\n\t}\n\n\tif want, have := uint(7), cpuinfo[7].Processor; want != have {\n\t\tt.Errorf(\"want processor %v, have %v\", want, have)\n\t}\n\tif want, have := \"GenuineIntel\", cpuinfo[0].VendorID; want != have {\n\t\tt.Errorf(\"want vendor %v, have %v\", want, have)\n\t}\n\tif want, have := \"6\", cpuinfo[1].CPUFamily; want != have {\n\t\tt.Errorf(\"want family %v, have %v\", want, have)\n\t}\n\tif want, have := \"142\", cpuinfo[2].Model; want != have {\n\t\tt.Errorf(\"want model %v, have %v\", want, have)\n\t}\n\tif want, have := \"Intel(R) Core(TM) i7-8650U CPU @ 1.90GHz\", cpuinfo[3].ModelName; want != have {\n\t\tt.Errorf(\"want model %v, have %v\", want, have)\n\t}\n\tif want, have := uint(8), cpuinfo[4].Siblings; want != have {\n\t\tt.Errorf(\"want siblings %v, have %v\", want, have)\n\t}\n\tif want, have := \"1\", cpuinfo[5].CoreID; want != have {\n\t\tt.Errorf(\"want core id %v, have %v\", want, have)\n\t}\n\tif want, have := uint(4), cpuinfo[6].CPUCores; want != have {\n\t\tt.Errorf(\"want cpu cores %v, have %v\", want, have)\n\t}\n\tif want, have := \"vme\", cpuinfo[7].Flags[1]; want != have {\n\t\tt.Errorf(\"want flag %v, have %v\", want, have)\n\t}\n}\n\nfunc TestCPUInfoParseARMLegacy(t *testing.T) {\n\tcpuinfo, err := parseCPUInfoARM([]byte(cpuinfoArm7Legacy))\n\tif err != nil || cpuinfo == nil {\n\t\tt.Fatalf(\"unable to parse arm cpu info: %v\", err)\n\t}\n\tif want, have := 2, len(cpuinfo); want != have {\n\t\tt.Errorf(\"want number of processors %v, have %v\", want, have)\n\t}\n\tif want, have := \"ARMv7 Processor rev 5 (v7l)\", cpuinfo[0].ModelName; want != have {\n\t\tt.Errorf(\"want vendor %v, have %v\", want, have)\n\t}\n\tif want, have := \"thumb\", cpuinfo[1].Flags[2]; want != have {\n\t\tt.Errorf(\"want flag %v, have %v\", want, have)\n\t}\n}\n\nfunc TestCPUInfoParseARMLegacyV1(t *testing.T) {\n\tcpuinfo, err := parseCPUInfoARM([]byte(cpuinfoArm7LegacyV1))\n\tif err != nil || cpuinfo == nil {\n\t\tt.Fatalf(\"unable to parse arm cpu info: %v\", err)\n\t}\n\tif want, have := 1, len(cpuinfo); want != have {\n\t\tt.Errorf(\"want number of processors %v, have %v\", want, have)\n\t}\n\tif want, have := \"ARMv6-compatible processor rev 5 (v6l)\", cpuinfo[0].ModelName; want != have {\n\t\tt.Errorf(\"want vendor %v, have %v\", want, have)\n\t}\n\tif want, have := \"thumb\", cpuinfo[0].Flags[2]; want != have {\n\t\tt.Errorf(\"want flag %v, have %v\", want, have)\n\t}\n}\n\nfunc TestCPUInfoParseARM(t *testing.T) {\n\tcpuinfo, err := parseCPUInfoARM([]byte(cpuinfoArm7))\n\tif err != nil || cpuinfo == nil {\n\t\tt.Fatalf(\"unable to parse arm cpu info: %v\", err)\n\t}\n\tif want, have := 4, len(cpuinfo); want != have {\n\t\tt.Errorf(\"want number of processors %v, have %v\", want, have)\n\t}\n\tif want, have := \"ARMv7 Processor rev 3 (v7l)\", cpuinfo[0].ModelName; want != have {\n\t\tt.Errorf(\"want vendor %v, have %v\", want, have)\n\t}\n\tif want, have := \"thumb\", cpuinfo[1].Flags[1]; want != have {\n\t\tt.Errorf(\"want flag %v, have %v\", want, have)\n\t}\n}\n\nfunc TestCPUInfoParseS390X(t *testing.T) {\n\tcpuinfo, err := parseCPUInfoS390X([]byte(cpuinfoS390x))\n\tif err != nil || cpuinfo == nil {\n\t\tt.Fatalf(\"unable to parse s390x cpu info: %v\", err)\n\t}\n\tif want, have := 4, len(cpuinfo); want != have {\n\t\tt.Errorf(\"want number of processors %v, have %v\", want, have)\n\t}\n\tif want, have := \"IBM/S390\", cpuinfo[0].VendorID; want != have {\n\t\tt.Errorf(\"want vendor %v, have %v\", want, have)\n\t}\n\tif want, have := \"ldisp\", cpuinfo[1].Flags[4]; want != have {\n\t\tt.Errorf(\"want flag %v, have %v\", want, have)\n\t}\n\tif want, have := 5000.0, cpuinfo[2].CPUMHz; want != have {\n\t\tt.Errorf(\"want cpu MHz %v, have %v\", want, have)\n\t}\n}\n\nfunc TestCPUInfoParseMips(t *testing.T) {\n\tcpuinfo, err := parseCPUInfoMips([]byte(cpuinfoMips))\n\tif err != nil || cpuinfo == nil {\n\t\tt.Fatalf(\"unable to parse mips cpu info: %v\", err)\n\t}\n\tif want, have := 2, len(cpuinfo); want != have {\n\t\tt.Errorf(\"want number of processors %v, have %v\", want, have)\n\t}\n\tif want, have := 1000.00, cpuinfo[0].BogoMips; want != have {\n\t\tt.Errorf(\"want BogoMIPS %v, have %v\", want, have)\n\t}\n\tif want, have := \"Cavium Octeon+ V0.1\", cpuinfo[1].ModelName; want != have {\n\t\tt.Errorf(\"want ModelName '%v', have '%v'\", want, have)\n\t}\n}\n\nfunc TestCPUInfoParsePPC(t *testing.T) {\n\tcpuinfo, err := parseCPUInfoPPC([]byte(cpuinfoPpc64))\n\tif err != nil || cpuinfo == nil {\n\t\tt.Fatalf(\"unable to parse ppc cpu info: %v\", err)\n\t}\n\tif want, have := 6, len(cpuinfo); want != have {\n\t\tt.Errorf(\"want number of processors %v, have %v\", want, have)\n\t}\n\tif want, have := 3000.00, cpuinfo[2].CPUMHz; want != have {\n\t\tt.Errorf(\"want cpu mhz %v, have %v\", want, have)\n\t}\n}\n\nfunc TestCPUInfoParseRISCV64(t *testing.T) {\n\tcpuinfo, err := parseCPUInfoRISCV([]byte(cpuinfoRiscv64))\n\tif err != nil || cpuinfo == nil {\n\t\tt.Fatalf(\"unable to parse ppc cpu info: %v\", err)\n\t}\n\tif want, have := 2, len(cpuinfo); want != have {\n\t\tt.Errorf(\"want number of processors %v, have %v\", want, have)\n\t}\n\tif want, have := \"1\", cpuinfo[1].CoreID; want != have {\n\t\tt.Errorf(\"want CoreId %v, have %v\", want, have)\n\t}\n\tif want, have := \"rv64imafdcsu\", cpuinfo[1].ModelName; want != have {\n\t\tt.Errorf(\"want ModelName %v, have %v\", want, have)\n\t}\n}\n"} +{"text": "/* AMD64 calling conventions checking.\n\nCopyright 2000, 2001, 2004, 2007 Free Software Foundation, Inc.\n\nThis file is part of the GNU MP Library test suite.\n\nThe GNU MP Library test suite is free software; you can redistribute it\nand/or modify it under the terms of the GNU General Public License as\npublished by the Free Software Foundation; either version 3 of the License,\nor (at your option) any later version.\n\nThe GNU MP Library test suite is distributed in the hope that it will be\nuseful, but WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General\nPublic License for more details.\n\nYou should have received a copy of the GNU General Public License along with\nthe GNU MP Library test suite. If not, see https://www.gnu.org/licenses/. */\n\n#include <stdio.h>\n#include \"gmp-impl.h\"\n#include \"tests.h\"\n\n\n/* Vector if constants and register values. We use one vector to allow access\n via a base pointer, very beneficial for the PIC-enabled amd64call.asm. */\nmp_limb_t calling_conventions_values[23] =\n{\n CNST_LIMB(0x1234567887654321),\t/* want_rbx */\n CNST_LIMB(0x89ABCDEFFEDCBA98),\t/* want_rbp */\n CNST_LIMB(0xDEADBEEFBADECAFE),\t/* want_r12 */\n CNST_LIMB(0xFFEEDDCCBBAA9988),\t/* want_r13 */\n CNST_LIMB(0x0011223344556677),\t/* want_r14 */\n CNST_LIMB(0x1234432156788765),\t/* want_r15 */\n\n CNST_LIMB(0xFEEDABBACAAFBEED),\t/* JUNK_RAX */\n CNST_LIMB(0xAB78DE89FF5125BB),\t/* JUNK_R10 */\n CNST_LIMB(0x1238901890189031)\t\t/* JUNK_R11 */\n\n /* rest of array used for dynamic values. */\n};\n\n/* Index starts for various regions in above vector. */\n#define WANT\t0\n#define JUNK\t6\n#define SAVE\t9\n#define RETADDR\t15\n#define VAL\t16\n#define RFLAGS\t22\n\n/* values to check */\n#ifdef __cplusplus\nextern \"C\" {\n#endif\nstruct {\n int control;\n int status;\n int tag;\n int other[4];\n} calling_conventions_fenv;\n#ifdef __cplusplus\n}\n#endif\n\n\nconst char *regname[6] = {\"rbx\", \"rbp\", \"r12\", \"r13\", \"r14\", \"r15\"};\n\n#define DIR_BIT(rflags) (((rflags) & (1<<10)) != 0)\n\n\n/* Return 1 if ok, 0 if not */\n\nint\ncalling_conventions_check (void)\n{\n const char *header = \"Violated calling conventions:\\n\";\n int ret = 1;\n int i;\n\n#define CHECK(callreg, regstr, value)\t\t\t\\\n if (callreg != value)\t\t\t\t\t\\\n {\t\t\t\t\t\t\t\\\n printf (\"%s %s\tgot 0x%016lX want 0x%016lX\\n\",\t\\\n\t header, regstr, callreg, value);\t\t\\\n header = \"\";\t\t\t\t\t\\\n ret = 0;\t\t\t\t\t\t\\\n }\n\n for (i = 0; i < 6; i++)\n {\n CHECK (calling_conventions_values[VAL+i], regname[i], calling_conventions_values[WANT+i]);\n }\n\n if (DIR_BIT (calling_conventions_values[RFLAGS]) != 0)\n {\n printf (\"%s rflags dir bit got %d want 0\\n\",\n\t header, DIR_BIT (calling_conventions_values[RFLAGS]));\n header = \"\";\n ret = 0;\n }\n\n if ((calling_conventions_fenv.tag & 0xFFFF) != 0xFFFF)\n {\n printf (\"%s fpu tags got 0x%X want 0xFFFF\\n\",\n\t header, calling_conventions_fenv.tag & 0xFFFF);\n header = \"\";\n ret = 0;\n }\n\n return ret;\n}\n"} +{"text": "/*\n * GRUB -- GRand Unified Bootloader\n * Copyright (C) 1999,2000,2001,2002,2003,2004 Free Software Foundation, Inc.\n *\n * SPDX-License-Identifier:\tGPL-2.0+\n */\n/*\n * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.\n */\n\n#ifndef\t_SYS_ZAP_IMPL_H\n#define\t_SYS_ZAP_IMPL_H\n\n#define\tZAP_MAGIC 0x2F52AB2ABULL\n\n#define\tZAP_HASHBITS\t\t28\n#define\tMZAP_ENT_LEN\t\t64\n#define\tMZAP_NAME_LEN\t\t(MZAP_ENT_LEN - 8 - 4 - 2)\n#define\tMZAP_MAX_BLKSHIFT\tSPA_MAXBLOCKSHIFT\n#define\tMZAP_MAX_BLKSZ\t\t(1 << MZAP_MAX_BLKSHIFT)\n\ntypedef struct mzap_ent_phys {\n\tuint64_t mze_value;\n\tuint32_t mze_cd;\n\tuint16_t mze_pad;\t/* in case we want to chain them someday */\n\tchar mze_name[MZAP_NAME_LEN];\n} mzap_ent_phys_t;\n\ntypedef struct mzap_phys {\n\tuint64_t mz_block_type;\t/* ZBT_MICRO */\n\tuint64_t mz_salt;\n\tuint64_t mz_pad[6];\n\tmzap_ent_phys_t mz_chunk[1];\n\t/* actually variable size depending on block size */\n} mzap_phys_t;\n\n/*\n * The (fat) zap is stored in one object. It is an array of\n * 1<<FZAP_BLOCK_SHIFT byte blocks. The layout looks like one of:\n *\n * ptrtbl fits in first block:\n *\t[zap_phys_t zap_ptrtbl_shift < 6] [zap_leaf_t] ...\n *\n * ptrtbl too big for first block:\n *\t[zap_phys_t zap_ptrtbl_shift >= 6] [zap_leaf_t] [ptrtbl] ...\n *\n */\n\n#define\tZBT_LEAF\t\t((1ULL << 63) + 0)\n#define\tZBT_HEADER\t\t((1ULL << 63) + 1)\n#define\tZBT_MICRO\t\t((1ULL << 63) + 3)\n/* any other values are ptrtbl blocks */\n\n/*\n * the embedded pointer table takes up half a block:\n * block size / entry size (2^3) / 2\n */\n#define\tZAP_EMBEDDED_PTRTBL_SHIFT(zap) (FZAP_BLOCK_SHIFT(zap) - 3 - 1)\n\n/*\n * The embedded pointer table starts half-way through the block. Since\n * the pointer table itself is half the block, it starts at (64-bit)\n * word number (1<<ZAP_EMBEDDED_PTRTBL_SHIFT(zap)).\n */\n#define\tZAP_EMBEDDED_PTRTBL_ENT(zap, idx) \\\n\t((uint64_t *)(zap)->zap_f.zap_phys) \\\n\t[(idx) + (1<<ZAP_EMBEDDED_PTRTBL_SHIFT(zap))]\n\n/*\n * TAKE NOTE:\n * If zap_phys_t is modified, zap_byteswap() must be modified.\n */\ntypedef struct zap_phys {\n\tuint64_t zap_block_type;\t/* ZBT_HEADER */\n\tuint64_t zap_magic;\t\t/* ZAP_MAGIC */\n\n\tstruct zap_table_phys {\n\t\tuint64_t zt_blk;\t/* starting block number */\n\t\tuint64_t zt_numblks;\t/* number of blocks */\n\t\tuint64_t zt_shift;\t/* bits to index it */\n\t\tuint64_t zt_nextblk;\t/* next (larger) copy start block */\n\t\tuint64_t zt_blks_copied; /* number source blocks copied */\n\t} zap_ptrtbl;\n\n\tuint64_t zap_freeblk;\t\t/* the next free block */\n\tuint64_t zap_num_leafs;\t\t/* number of leafs */\n\tuint64_t zap_num_entries;\t/* number of entries */\n\tuint64_t zap_salt;\t\t/* salt to stir into hash function */\n\tuint64_t zap_normflags;\t\t/* flags for u8_textprep_str() */\n\tuint64_t zap_flags;\t\t/* zap_flag_t */\n\t/*\n\t * This structure is followed by padding, and then the embedded\n\t * pointer table. The embedded pointer table takes up second\n\t * half of the block. It is accessed using the\n\t * ZAP_EMBEDDED_PTRTBL_ENT() macro.\n\t */\n} zap_phys_t;\n\n#endif /* _SYS_ZAP_IMPL_H */\n"} +{"text": "/usr/share/plaso\n"} +{"text": "/*\n * QML Material - An application framework implementing Material Design.\n * Copyright (C) 2015 Steve Coffey <scoffey@barracuda.com>\n * 2015 Michael Spencer <sonrisesoftware@gmail.com>\n *\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as\n * published by the Free Software Foundation, either version 2.1 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport QtQuick 2.5\n\n/*!\n \\qmltype BottomSheet\n \\inqmlmodule Material 0.1\n\n \\brief A bottom sheet is a sheet of paper that slides up from the bottom edge\n of the screen and presents a set of clear and simple actions.\n */\nPopupBase {\n id: bottomSheet\n\n /*!\n The maximum height of the bottom sheet. This is useful when used with a flickable,\n so the bottom sheet will scroll when the content is higher than the maximum height.\n */\n property int maxHeight: parent.height * 0.9\n\n default property alias content: containerView.data\n\n overlayLayer: \"dialogOverlayLayer\"\n overlayColor: Qt.rgba(0, 0, 0, 0.2)\n height: Math.min(maxHeight, implicitHeight)\n implicitHeight: containerView.childrenRect.height\n width: parent.width\n\n visible: percentOpen > 0\n\n property real percentOpen: showing ? 1 : 0\n\n Behavior on percentOpen {\n\n NumberAnimation {\n\n duration: 400\n easing {\n type: Easing.OutCubic\n }\n }\n }\n\n anchors {\n bottom: parent.bottom\n bottomMargin: (bottomSheet.percentOpen - 1) * height\n }\n\n View {\n id:containerView\n\n anchors.fill: parent\n\n elevation: 2\n backgroundColor: \"#fff\"\n }\n}\n"} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<style xmlns=\"http://purl.org/net/xbiblio/csl\" class=\"in-text\" version=\"1.0\" demote-non-dropping-particle=\"sort-only\" default-locale=\"en-US\">\n <info>\n <title>Bulletin of Marine Science</title>\n <id>http://www.zotero.org/styles/bulletin-of-marine-science</id>\n <link href=\"http://www.zotero.org/styles/bulletin-of-marine-science\" rel=\"self\"/>\n <link href=\"http://www.rsmas.miami.edu/bms/PDF/INSTRUCTIONS_TO_AUTHORS.pdf\" rel=\"documentation\"/>\n <author>\n <name>Jorge Pinzon</name>\n </author>\n <category citation-format=\"author-date\"/>\n <category field=\"biology\"/>\n <category field=\"zoology\"/>\n <category field=\"botany\"/>\n <issn>0007-4977</issn>\n <eissn>1553-6955</eissn>\n <updated>2012-09-27T22:06:38+00:00</updated>\n <rights license=\"http://creativecommons.org/licenses/by-sa/3.0/\">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>\n </info>\n <macro name=\"author\">\n <names variable=\"author\" suffix=\". \">\n <name delimiter=\", \" name-as-sort-order=\"all\" sort-separator=\" \" form=\"long\" initialize-with=\"\"/>\n </names>\n </macro>\n <macro name=\"editor\">\n <names variable=\"editor\" prefix=\"In: \" suffix=\", editor. \">\n <name delimiter=\", \" and=\"text\" sort-separator=\" \" form=\"long\" initialize-with=\"\"/>\n </names>\n </macro>\n <macro name=\"year\">\n <date variable=\"issued\" suffix=\". \">\n <date-part name=\"year\"/>\n </date>\n </macro>\n <macro name=\"title\">\n <text variable=\"title\" suffix=\". \"/>\n </macro>\n <citation disambiguate-add-year-suffix=\"true\" collapse=\"year\" et-al-min=\"3\" et-al-use-first=\"1\">\n <sort>\n <key macro=\"year\"/>\n <key variable=\"issued\" sort=\"ascending\"/>\n </sort>\n <layout delimiter=\", \" prefix=\"(\" suffix=\")\">\n <group delimiter=\" \">\n <names variable=\"author\">\n <name and=\"text\" delimiter=\" \" name-as-sort-order=\"all\" sort-separator=\", \" form=\"short\"/>\n </names>\n <date variable=\"issued\">\n <date-part name=\"year\" form=\"long\"/>\n </date>\n </group>\n </layout>\n </citation>\n <bibliography hanging-indent=\"true\">\n <sort>\n <key macro=\"author\"/>\n <key macro=\"year\" sort=\"ascending\"/>\n </sort>\n <layout>\n <text macro=\"author\"/>\n <text macro=\"year\"/>\n <choose>\n <if type=\"book\">\n <text macro=\"title\"/>\n <text variable=\"publisher-place\" suffix=\": \"/>\n <text variable=\"publisher\" suffix=\".\"/>\n </if>\n <else-if type=\"chapter\">\n <text macro=\"title\"/>\n <text macro=\"editor\"/>\n <text variable=\"container-title\" suffix=\" \"/>\n <text variable=\"publisher-place\" suffix=\": \"/>\n <text variable=\"publisher\" suffix=\". \"/>\n <text variable=\"page\" prefix=\"p. \" suffix=\". \"/>\n </else-if>\n <else-if type=\"thesis\">\n <text macro=\"title\"/>\n <text variable=\"publisher\" suffix=\". \"/>\n <text variable=\"page\" prefix=\"p.\" suffix=\".\"/>\n </else-if>\n <else-if type=\"paper-conference\">\n <text macro=\"title\"/>\n <text variable=\"event\" prefix=\" \" suffix=\". \"/>\n <text variable=\"page\" prefix=\"p. \" suffix=\".\"/>\n </else-if>\n <else-if type=\"webpage\">\n <text variable=\"URL\" prefix=\"[Internet]. Available from: \"/>\n </else-if>\n <else>\n <group suffix=\". \">\n <text macro=\"title\"/>\n <text variable=\"container-title\" suffix=\" \" form=\"long\"/>\n <text variable=\"volume\" suffix=\": \"/>\n <text variable=\"page\" suffix=\".\"/>\n </group>\n </else>\n </choose>\n </layout>\n </bibliography>\n</style>\n"} +{"text": "import React from 'react'\nimport { Col, Row, Grid } from 'react-styled-flexboxgrid'\nimport Header from './../Components/Header'\nimport Query from './../Components/Query'\nimport GET_PROPOSED_TALKS from '../Queries/GET_PROPOSED_TALKS'\nimport Nav from './../Components/Nav'\nimport CookieBanner from './../Components/CookieBanner'\nimport Video from './../Components/Video'\n\nconst Proposed = () => (\n <Grid>\n <div role=\"banner\">\n <Nav />\n <Header title=\"Proposed Talks\" noSearch />\n </div>\n <Row>\n <Col xs={12}>\n <main>\n <Query query={GET_PROPOSED_TALKS}>\n {({ data: { allVideoses } }) => (\n <Row>\n {allVideoses.map(v => (\n <Video noLink key={v.id} talk={v} />\n ))}\n </Row>\n )}\n </Query>\n </main>\n </Col>\n </Row>\n <CookieBanner />\n </Grid>\n)\n\nexport default Proposed\n"} +{"text": "<html>\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n \n <link rel=\"stylesheet\" href=\"./../../helpwin.css\">\n <title>MATLAB File Help: prtClassLogisticDiscriminant/w</title>\n </head>\n <body>\n <!--Single-page help-->\n <table border=\"0\" cellspacing=\"0\" width=\"100%\">\n <tr class=\"subheader\">\n <td class=\"headertitle\">MATLAB File Help: prtClassLogisticDiscriminant/w</td>\n \n \n </tr>\n </table>\n <div class=\"title\">prtClassLogisticDiscriminant/w</div>\n <div class=\"helptext\"><pre><!--helptext --> w - Regression weights</pre></div><!--after help -->\n <!--Property-->\n <div class=\"sectiontitle\">Property Details</div>\n <table class=\"class-details\">\n <tr>\n <td class=\"class-detail-label\">Constant</td>\n <td>false</td>\n </tr>\n <tr>\n <td class=\"class-detail-label\">Dependent</td>\n <td>false</td>\n </tr>\n <tr>\n <td class=\"class-detail-label\">Sealed</td>\n <td>false</td>\n </tr>\n <tr>\n <td class=\"class-detail-label\">Transient</td>\n <td>false</td>\n </tr>\n <tr>\n <td class=\"class-detail-label\">GetAccess</td>\n <td>public</td>\n </tr>\n <tr>\n <td class=\"class-detail-label\">SetAccess</td>\n <td>public</td>\n </tr>\n <tr>\n <td class=\"class-detail-label\">GetObservable</td>\n <td>false</td>\n </tr>\n <tr>\n <td class=\"class-detail-label\">SetObservable</td>\n <td>false</td>\n </tr>\n </table>\n </body>\n</html>"} +{"text": "C4E2F192444011\nERROR: GATHER_REGS Could not decode at offset: 0x0 PC: 0x0: [C4E2F1924440110000000000000000]\n"} +{"text": "<configuration name=\"cdr_csv.conf\" description=\"CDR CSV Format\">\n <settings>\n <!-- 'cdr-csv' will always be appended to log-base -->\n <!--<param name=\"log-base\" value=\"/var/log\"/>-->\n <param name=\"default-template\" value=\"example\"/>\n <!-- This is like the info app but after the call is hung up -->\n <!--<param name=\"debug\" value=\"true\"/>-->\n <param name=\"rotate-on-hup\" value=\"true\"/>\n <!-- may be a b or ab -->\n <param name=\"legs\" value=\"a\"/>\n </settings>\n <templates>\n <template name=\"sql\">INSERT INTO cdr VALUES (\"${caller_id_name}\",\"${caller_id_number}\",\"${destination_number}\",\"${context}\",\"${start_stamp}\",\"${answer_stamp}\",\"${end_stamp}\",\"${duration}\",\"${billsec}\",\"${hangup_cause}\",\"${uuid}\",\"${bleg_uuid}\", \"${accountcode}\");</template>\n <template name=\"example\">\"${caller_id_name}\",\"${caller_id_number}\",\"${destination_number}\",\"${context}\",\"${start_stamp}\",\"${answer_stamp}\",\"${end_stamp}\",\"${duration}\",\"${billsec}\",\"${hangup_cause}\",\"${uuid}\",\"${bleg_uuid}\",\"${accountcode}\",\"${read_codec}\",\"${write_codec}\"</template>\n <template name=\"snom\">\"${caller_id_name}\",\"${caller_id_number}\",\"${destination_number}\",\"${context}\",\"${start_stamp}\",\"${answer_stamp}\",\"${end_stamp}\",\"${duration}\",\"${billsec}\",\"${hangup_cause}\",\"${uuid}\",\"${bleg_uuid}\", \"${accountcode}\",\"${read_codec}\",\"${write_codec}\",\"${sip_user_agent}\",\"${call_clientcode}\",\"${sip_rtp_rxstat}\",\"${sip_rtp_txstat}\",\"${sofia_record_file}\"</template>\n <template name=\"linksys\">\"${caller_id_name}\",\"${caller_id_number}\",\"${destination_number}\",\"${context}\",\"${start_stamp}\",\"${answer_stamp}\",\"${end_stamp}\",\"${duration}\",\"${billsec}\",\"${hangup_cause}\",\"${uuid}\",\"${bleg_uuid}\",\"${accountcode}\",\"${read_codec}\",\"${write_codec}\",\"${sip_user_agent}\",\"${sip_p_rtp_stat}\"</template>\n <template name=\"asterisk\">\"${accountcode}\",\"${caller_id_number}\",\"${destination_number}\",\"${context}\",\"${caller_id}\",\"${channel_name}\",\"${bridge_channel}\",\"${last_app}\",\"${last_arg}\",\"${start_stamp}\",\"${answer_stamp}\",\"${end_stamp}\",\"${duration}\",\"${billsec}\",\"${hangup_cause}\",\"${amaflags}\",\"${uuid}\",\"${userfield}\"</template>\n </templates>\n</configuration>\n\n"} +{"text": "import { SchemaComposer } from 'graphql-compose';\nimport type { ComposeWithMongooseOpts } from '../../../composeWithMongoose';\nimport {\n mergeCustomizationOptions,\n mergeFieldMaps,\n mergeStringAndStringArraysFields,\n} from '../mergeCustomizationOptions';\n\nconst baseFields = {\n remove: ['id', 'friends', 'health', 'appearsIn'],\n only: ['id'],\n};\n\nconst childFields = {\n remove: ['id', 'appearsIn', 'dob', 'health'],\n only: ['id'],\n};\n\nconst expectedFields = {\n remove: ['id', 'friends', 'health', 'appearsIn', 'dob'],\n only: ['id'],\n};\n\nconst baseInputTypeFields = {\n only: ['id', 'appearsIn'],\n remove: ['dob', 'gender'],\n};\n\nconst childInputTypeFields = {\n only: ['id', 'friends', 'appearsIn'],\n remove: ['dob'],\n required: ['id', 'dob', 'gender'],\n};\n\nconst expectedInputTypes = {\n only: ['id', 'appearsIn', 'friends'],\n remove: ['dob', 'gender'],\n required: ['id', 'dob', 'gender'],\n};\n\nconst optsTypes = ['string', 'string[]'];\n\ndescribe('mergeStringAndStringArraysFields()', () => {\n it('should concat two Arrays', () => {\n expect(\n mergeStringAndStringArraysFields(baseInputTypeFields.remove, childFields.only, optsTypes[0])\n ).toEqual([...baseInputTypeFields.remove, ...childFields.only]);\n });\n\n it('should combine two input strings into an array', () => {\n expect(\n mergeStringAndStringArraysFields(\n baseInputTypeFields.remove[0],\n baseInputTypeFields.remove[1],\n optsTypes[1]\n )\n ).toEqual(baseInputTypeFields.remove);\n });\n\n it('should combine an array and a string into an array', () => {\n expect(\n mergeStringAndStringArraysFields(\n childInputTypeFields.required[0],\n baseInputTypeFields.remove,\n optsTypes[0]\n )\n ).toEqual(childInputTypeFields.required);\n\n expect(\n mergeStringAndStringArraysFields(\n baseInputTypeFields.only,\n childInputTypeFields.only[1],\n optsTypes[0]\n )\n ).toEqual(expectedInputTypes.only);\n });\n\n it('should remove repeated fields from the array', () => {\n expect(\n mergeStringAndStringArraysFields(baseFields.remove, childFields.remove, optsTypes[0])\n ).toEqual(expectedFields.remove);\n\n expect(\n mergeStringAndStringArraysFields(undefined, childInputTypeFields.required, optsTypes[0])\n ).toEqual(expectedInputTypes.required);\n\n expect(\n mergeStringAndStringArraysFields(\n baseInputTypeFields.only,\n childInputTypeFields.only,\n optsTypes[0]\n )\n ).toEqual(expectedInputTypes.only);\n });\n\n it('should return an ARRAY of the defined if other one is undefined', () => {\n expect(mergeStringAndStringArraysFields(baseFields.remove, undefined, optsTypes[0])).toEqual(\n baseFields.remove\n );\n\n expect(mergeStringAndStringArraysFields(undefined, childFields.only, optsTypes[0])).toEqual(\n childFields.only\n );\n });\n\n it('should operate normally with ARRAY of optsTypes', () => {\n expect(mergeStringAndStringArraysFields(baseFields.remove, undefined, optsTypes)).toEqual(\n baseFields.remove\n );\n\n expect(mergeStringAndStringArraysFields(undefined, childFields.only, optsTypes)).toEqual(\n childFields.only\n );\n });\n\n it('should return child field if not amongst opsType', () => {\n expect(mergeStringAndStringArraysFields(baseFields.remove, undefined, 'boolean')).toEqual(\n undefined\n );\n\n expect(mergeStringAndStringArraysFields(undefined, childFields.only, 'number')).toEqual(\n childFields.only\n );\n });\n});\n\ndescribe('mergeFieldMaps()', () => {\n it('should merge fields', () => {\n expect(mergeFieldMaps(baseFields, childFields)).toEqual(expectedFields);\n expect(mergeFieldMaps(baseInputTypeFields, childInputTypeFields)).toEqual(expectedInputTypes);\n });\n});\n\ndescribe('mergeCustomizationOptions()', () => {\n const baseCustomOptions = {\n fields: baseFields,\n inputType: {\n name: 'BaseInput',\n description: 'Hello Base',\n fields: baseInputTypeFields,\n },\n resolvers: {\n createOne: {\n record: {\n removeFields: ['parent', 'child'],\n },\n },\n updateById: {\n record: {\n removeFields: ['one', 'two'],\n requiredFields: ['eight'],\n },\n },\n findMany: {\n limit: { defaultValue: 20 },\n // sort: false,\n skip: false,\n filter: {\n isRequired: true,\n removeFields: ['id', 'dob'],\n operators: {\n one: ['gt', 'gte', 'lt'],\n two: ['gt', 'gte', 'lt', 'in[]', 'nin[]'],\n },\n },\n },\n findById: false,\n },\n } as ComposeWithMongooseOpts<any>;\n\n const childCustomOptions = {\n fields: childFields,\n inputType: {\n name: 'ChildInputs',\n description: 'Hello Child',\n fields: childInputTypeFields,\n },\n resolvers: {\n createOne: {\n record: {\n removeFields: ['fun', 'child'],\n },\n },\n findMany: {\n limit: { defaultValue: 50 },\n sort: false,\n // skip: false,\n filter: {\n removeFields: ['gender', 'dob', 'age'],\n operators: {\n one: ['gt', 'lte', 'ne', 'in[]', 'nin[]'],\n two: ['gt', 'gte', 'lt', 'lte', 'ne'],\n three: ['gte', 'lt'],\n },\n },\n },\n updateById: {\n record: {\n removeFields: ['five'],\n requiredFields: ['two', 'five'],\n },\n },\n },\n } as ComposeWithMongooseOpts<any>;\n\n const expected = {\n fields: expectedFields,\n inputType: {\n name: 'ChildInputs',\n description: 'Hello Child',\n fields: expectedInputTypes,\n },\n resolvers: {\n createOne: {\n record: {\n removeFields: ['parent', 'child', 'fun'],\n },\n },\n findMany: {\n limit: { defaultValue: 50 },\n sort: false,\n skip: false,\n filter: {\n isRequired: true,\n removeFields: ['id', 'dob', 'gender', 'age'],\n operators: {\n one: ['gt', 'gte', 'lt', 'lte', 'ne', 'in[]', 'nin[]'],\n two: ['gt', 'gte', 'lt', 'in[]', 'nin[]', 'lte', 'ne'],\n three: ['gte', 'lt'],\n },\n },\n },\n findById: false,\n updateById: {\n record: {\n removeFields: ['one', 'two', 'five'],\n requiredFields: ['eight', 'two', 'five'],\n },\n },\n },\n } as ComposeWithMongooseOpts<any>;\n\n it('should return most base options if no child', () => {\n expect((mergeCustomizationOptions(baseCustomOptions) as any).resolvers).toEqual(\n baseCustomOptions.resolvers\n );\n });\n\n it('should return child if no base is found', () => {\n expect(mergeCustomizationOptions({}, childCustomOptions)).toEqual(childCustomOptions);\n });\n\n it('should merge customisation Options', () => {\n expect(mergeCustomizationOptions(baseCustomOptions, childCustomOptions)).toEqual(expected);\n });\n\n it('should produce error if using different schema composers', () => {\n expect(() => {\n mergeCustomizationOptions(\n { schemaComposer: new SchemaComposer() },\n { schemaComposer: new SchemaComposer() }\n );\n }).toThrow('[Discriminators] ChildModels should have same schemaComposer as its BaseModel');\n });\n});\n"} +{"text": "var path = require('path');\n\nmodule.exports = {\n entry: './src/react-ultimate-pagination.js',\n output: {\n path: path.join(__dirname, \"dist\"),\n filename: \"react-ultimate-pagination.inc.js\",\n libraryTarget: \"var\",\n library: \"ReactUltimatePagination\"\n },\n externals: {\n \"react\": \"React\"\n },\n devtool: 'source-map',\n module: {\n loaders: [\n {\n test: /\\.jsx?$/,\n exclude: /(node_modules|bower_components)/,\n loader: 'babel-loader',\n query: {\n presets: ['es2015', 'react']\n }\n }\n ]\n }\n};\n"} +{"text": "<HTML>\n<HEAD>\n<meta charset=\"UTF-8\">\n<title>CharactersListFragment - features/characters_list</title>\n<link rel=\"stylesheet\" href=\"../../../../style.css\">\n</HEAD>\n<BODY>\n<a href=\"../../index.html\">features/characters_list</a>&nbsp;/&nbsp;<a href=\"../index.html\">com.vmadalin.dynamicfeatures.characterslist.ui.list</a>&nbsp;/&nbsp;<a href=\"./index.html\">CharactersListFragment</a><br/>\n<br/>\n<h1>CharactersListFragment</h1>\n<code><span class=\"keyword\">class </span><span class=\"identifier\">CharactersListFragment</span>&nbsp;<span class=\"symbol\">:</span>&nbsp;<span class=\"identifier\">BaseFragment</span><span class=\"symbol\">&lt;</span><span class=\"identifier\">&lt;ERROR CLASS&gt;</span><span class=\"symbol\">,</span>&nbsp;<a href=\"../-characters-list-view-model/index.html\"><span class=\"identifier\">CharactersListViewModel</span></a><span class=\"symbol\">&gt;</span></code>\n<p>View listing the all marvel characters with option to display the detail view.</p>\n<p><strong>See Also</strong><br/>\n<p><a href=\"#\">BaseFragment</a></p>\n</p>\n<h3>Constructors</h3>\n<table>\n<tbody>\n<tr>\n<td>\n<h4><a href=\"-init-.html\">&lt;init&gt;</a></h4>\n</td>\n<td>\n<p>View listing the all marvel characters with option to display the detail view.</p>\n<code><span class=\"identifier\">CharactersListFragment</span><span class=\"symbol\">(</span><span class=\"symbol\">)</span></code></td>\n</tr>\n</tbody>\n</table>\n<h3>Properties</h3>\n<table>\n<tbody>\n<tr>\n<td>\n<h4><a href=\"view-adapter.html\">viewAdapter</a></h4>\n</td>\n<td>\n<code><span class=\"keyword\">lateinit</span> <span class=\"keyword\">var </span><span class=\"identifier\">viewAdapter</span><span class=\"symbol\">: </span><a href=\"../../com.vmadalin.dynamicfeatures.characterslist.ui.list.adapter/-characters-list-adapter/index.html\"><span class=\"identifier\">CharactersListAdapter</span></a></code></td>\n</tr>\n</tbody>\n</table>\n<h3>Functions</h3>\n<table>\n<tbody>\n<tr>\n<td>\n<h4><a href=\"on-init-data-binding.html\">onInitDataBinding</a></h4>\n</td>\n<td>\n<p>Initialize view data binding variables.</p>\n<code><span class=\"keyword\">fun </span><span class=\"identifier\">onInitDataBinding</span><span class=\"symbol\">(</span><span class=\"symbol\">)</span><span class=\"symbol\">: </span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html\"><span class=\"identifier\">Unit</span></a></code></td>\n</tr>\n<tr>\n<td>\n<h4><a href=\"on-init-dependency-injection.html\">onInitDependencyInjection</a></h4>\n</td>\n<td>\n<p>Initialize dagger injection dependency graph.</p>\n<code><span class=\"keyword\">fun </span><span class=\"identifier\">onInitDependencyInjection</span><span class=\"symbol\">(</span><span class=\"symbol\">)</span><span class=\"symbol\">: </span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html\"><span class=\"identifier\">Unit</span></a></code></td>\n</tr>\n<tr>\n<td>\n<h4><a href=\"on-view-created.html\">onViewCreated</a></h4>\n</td>\n<td>\n<p>Called to have the fragment instantiate its user interface view.</p>\n<code><span class=\"keyword\">fun </span><span class=\"identifier\">onViewCreated</span><span class=\"symbol\">(</span><span class=\"identifier\" id=\"com.vmadalin.dynamicfeatures.characterslist.ui.list.CharactersListFragment$onViewCreated(android.view.View, android.os.Bundle)/view\">view</span><span class=\"symbol\">:</span>&nbsp;<a href=\"https://developer.android.com/reference/android/view/View.html\"><span class=\"identifier\">View</span></a><span class=\"symbol\">, </span><span class=\"identifier\" id=\"com.vmadalin.dynamicfeatures.characterslist.ui.list.CharactersListFragment$onViewCreated(android.view.View, android.os.Bundle)/savedInstanceState\">savedInstanceState</span><span class=\"symbol\">:</span>&nbsp;<a href=\"https://developer.android.com/reference/android/os/Bundle.html\"><span class=\"identifier\">Bundle</span></a><span class=\"symbol\">?</span><span class=\"symbol\">)</span><span class=\"symbol\">: </span><a href=\"https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-unit/index.html\"><span class=\"identifier\">Unit</span></a></code></td>\n</tr>\n</tbody>\n</table>\n</BODY>\n</HTML>\n"} +{"text": "//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\n// WARNING: This file was auto-generated, any change will be overridden in next release. Please use configs/es6.conf.js then run \"npm run convert\". //\n//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////\nimport {\n\tLoadingManager,\n\tCompressedTextureLoader,\n\tCompressedPixelFormat\n} from '../../../src/Three';\n\nexport interface PVR {\n\tmipmaps: object[];\n\twidth: number;\n\theight: number;\n\tformat: CompressedPixelFormat;\n\tmipmapCount: number;\n\tisCubemap: boolean;\n}\n\nexport class PVRLoader extends CompressedTextureLoader {\n\n\tconstructor( manager?: LoadingManager );\n\n\tparse( buffer: ArrayBuffer, loadMipmaps: boolean ): PVR;\n\n}\n"} +{"text": "using System.Runtime.CompilerServices;\nusing System.Reflection;\nusing System.Runtime.InteropServices;\n[assembly: AssemblyTitle(\"Kayak\")]\n[assembly: AssemblyDescription(\"Kayak is an event-base IO libary for .NET. Kayak allows you to easily create TCP clients and servers, and contains an HTTP/1.1 server implementation.\")]\n[assembly: AssemblyProduct(\"Kayak\")]\n[assembly: AssemblyCopyright(\"Copyright (c) 2007-2011 Benjamin van der Veen\")]\n[assembly: AssemblyVersion(\"0.7.2\")]\n[assembly: AssemblyFileVersion(\"0.7.2\")]\n\n[assembly: InternalsVisibleTo(\"Kayak.Tests\")]\n\n"} +{"text": "/*\n * $Id: RtfFont.java,v 1.1 2010/04/14 17:50:44 kwart Exp $\n *\n * Copyright 2001, 2002, 2003, 2004 by Mark Hall\n *\n * The contents of this file are subject to the Mozilla Public License Version 1.1\n * (the \"License\"); you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at http://www.mozilla.org/MPL/\n *\n * Software distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License\n * for the specific language governing rights and limitations under the License.\n *\n * The Original Code is 'iText, a free JAVA-PDF library'.\n *\n * The Initial Developer of the Original Code is Bruno Lowagie. Portions created by\n * the Initial Developer are Copyright (C) 1999, 2000, 2001, 2002 by Bruno Lowagie.\n * All Rights Reserved.\n * Co-Developer of the code is Paulo Soares. Portions created by the Co-Developer\n * are Copyright (C) 2000, 2001, 2002 by Paulo Soares. All Rights Reserved.\n *\n * Contributor(s): all the names of the contributors are added in the source code\n * where applicable.\n *\n * Alternatively, the contents of this file may be used under the terms of the\n * LGPL license (the ?GNU LIBRARY GENERAL PUBLIC LICENSE?), in which case the\n * provisions of LGPL are applicable instead of those above. If you wish to\n * allow use of your version of this file only under the terms of the LGPL\n * License and not to allow others to use your version of this file under\n * the MPL, indicate your decision by deleting the provisions above and\n * replace them with the notice and other provisions required by the LGPL.\n * If you do not delete the provisions above, a recipient may use your version\n * of this file under either the MPL or the GNU LIBRARY GENERAL PUBLIC LICENSE.\n *\n * This library is free software; you can redistribute it and/or modify it\n * under the terms of the MPL as stated above or under the terms of the GNU\n * Library General Public License as published by the Free Software Foundation;\n * either version 2 of the License, or any later version.\n *\n * This library is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n * FOR A PARTICULAR PURPOSE. See the GNU Library general Public License for more\n * details.\n *\n * If you didn't download this code from the following link, you should check if\n * you aren't using an obsolete version:\n * http://www.lowagie.com/iText/\n */\n\npackage com.lowagie.text.rtf.style;\n\nimport java.awt.Color;\nimport java.io.IOException;\nimport java.io.OutputStream;\n\nimport com.lowagie.text.DocWriter;\nimport com.lowagie.text.Font;\nimport com.lowagie.text.rtf.RtfExtendedElement;\nimport com.lowagie.text.rtf.document.RtfDocument;\n\n/**\n * The RtfFont class stores one font for an rtf document. It extends Font,\n * so can be set as a font, to allow adding of fonts with arbitrary names.\n * BaseFont fontname handling contributed by Craig Fleming. Various fixes\n * Renaud Michel, Werner Daehn.\n *\n * Version: $Id: RtfFont.java,v 1.1 2010/04/14 17:50:44 kwart Exp $\n * @author Mark Hall (Mark.Hall@mail.room3b.eu)\n * @author Craig Fleming (rythos@rhana.dhs.org)\n * @author Renaud Michel (r.michel@immedia.be)\n * @author Werner Daehn (Werner.Daehn@BusinessObjects.com)\n * @author Lidong Liu (tmslld@gmail.com)\n * @author Thomas Bickel (tmb99@inode.at)\n */\npublic class RtfFont extends Font implements RtfExtendedElement {\n /**\n * Constant for the font family to use (\"froman\")\n */\n private static final byte[] FONT_FAMILY = DocWriter.getISOBytes(\"\\\\froman\");\n /**\n * Constant for the charset\n */\n private static final byte[] FONT_CHARSET = DocWriter.getISOBytes(\"\\\\fcharset\");\n /**\n * Constant for the font size\n */\n public static final byte[] FONT_SIZE = DocWriter.getISOBytes(\"\\\\fs\");\n /**\n * Constant for the bold flag\n */\n private static final byte[] FONT_BOLD = DocWriter.getISOBytes(\"\\\\b\");\n /**\n * Constant for the italic flag\n */\n private static final byte[] FONT_ITALIC = DocWriter.getISOBytes(\"\\\\i\");\n /**\n * Constant for the underline flag\n */\n private static final byte[] FONT_UNDERLINE = DocWriter.getISOBytes(\"\\\\ul\");\n /**\n * Constant for the strikethrough flag\n */\n private static final byte[] FONT_STRIKETHROUGH = DocWriter.getISOBytes(\"\\\\strike\");\n /**\n * Constant for the double strikethrough flag\n */\n private static final byte[] FONT_DOUBLE_STRIKETHROUGH = DocWriter.getISOBytes(\"\\\\striked\");\n /**\n * Constant for the shadow flag\n */\n private static final byte[] FONT_SHADOW = DocWriter.getISOBytes(\"\\\\shad\");\n /**\n * Constant for the outline flag\n */\n private static final byte[] FONT_OUTLINE = DocWriter.getISOBytes(\"\\\\outl\");\n /**\n * Constant for the embossed flag\n */\n private static final byte[] FONT_EMBOSSED = DocWriter.getISOBytes(\"\\\\embo\");\n /**\n * Constant for the engraved flag\n */\n private static final byte[] FONT_ENGRAVED = DocWriter.getISOBytes(\"\\\\impr\");\n /**\n * Constant for hidden text flag\n */\n private static final byte[] FONT_HIDDEN = DocWriter.getISOBytes(\"\\\\v\");\n \n /**\n * Constant for a plain font\n */\n public static final int STYLE_NONE = 0;\n /**\n * Constant for a bold font\n */\n public static final int STYLE_BOLD = 1;\n /**\n * Constant for an italic font\n */\n public static final int STYLE_ITALIC = 2;\n /**\n * Constant for an underlined font\n */\n public static final int STYLE_UNDERLINE = 4;\n /**\n * Constant for a strikethrough font\n */\n public static final int STYLE_STRIKETHROUGH = 8;\n /**\n * Constant for a double strikethrough font\n */\n public static final int STYLE_DOUBLE_STRIKETHROUGH = 16;\n /**\n * Constant for a shadowed font\n */\n public static final int STYLE_SHADOW = 32;\n /**\n * Constant for an outlined font\n */\n public static final int STYLE_OUTLINE = 64;\n /**\n * Constant for an embossed font\n */\n public static final int STYLE_EMBOSSED = 128;\n /**\n * Constant for an engraved font\n */\n public static final int STYLE_ENGRAVED = 256;\n /**\n * Constant for a font that hides the actual text.\n */\n public static final int STYLE_HIDDEN = 512;\n \n /**\n * Default font\n * @since 2.1.7\n */\n public static final String DEFAULT_FONT = \"Times New Roman\";\n\n /**\n * The font name. Defaults to \"Times New Roman\"\n */\n private String fontName = DEFAULT_FONT;\n /**\n * The font size. Defaults to 10\n */\n private int fontSize = 10;\n /**\n * The font style. Defaults to STYLE_NONE\n */\n private int fontStyle = STYLE_NONE;\n /**\n * The number of this font\n */\n private int fontNumber = 0;\n /**\n * The color of this font\n */\n private RtfColor color = null;\n /**\n * The character set to use for this font\n */\n private int charset = 0;\n /**\n * The RtfDocument this RtfFont belongs to.\n */\n protected RtfDocument document = null;\n \n /**\n * Constructs a RtfFont with the given font name and all other properties\n * at their default values.\n * \n * @param fontName The font name to use\n */\n public RtfFont(String fontName) {\n super(Font.UNDEFINED, Font.UNDEFINED, Font.UNDEFINED, null);\n this.fontName = fontName;\n }\n \n /**\n * Constructs a RtfFont with the given font name and font size and all other\n * properties at their default values.\n * \n * @param fontName The font name to use\n * @param size The font size to use\n */\n public RtfFont(String fontName, float size) {\n super(Font.UNDEFINED, size, Font.UNDEFINED, null);\n this.fontName = fontName;\n }\n \n /**\n * Constructs a RtfFont with the given font name, font size and font style and the\n * default color.\n * \n * @param fontName The font name to use\n * @param size The font size to use\n * @param style The font style to use\n */\n public RtfFont(String fontName, float size, int style) {\n super(Font.UNDEFINED, size, style, null);\n this.fontName = fontName;\n }\n \n /**\n * Constructs a RtfFont with the given font name, font size, font style and\n * color.\n * \n * @param fontName The font name to use\n * @param size the font size to use\n * @param style The font style to use\n * @param color The font color to use\n */\n public RtfFont(String fontName, float size, int style, Color color) {\n super(Font.UNDEFINED, size, style, color);\n this.fontName = fontName;\n }\n \n /**\n * Constructs a RtfFont with the given font name, font size, font style, color\n * and charset. This can be used when generating non latin-1 text.\n * \n * @param fontName The font name to use\n * @param size the font size to use\n * @param style The font style to use\n * @param color The font color to use\n * @param charset The charset of the font content\n */\n public RtfFont(String fontName, float size, int style, Color color, int charset) {\n this(fontName, size, style, color);\n this.charset = charset;\n }\n\n /**\n * Special constructor for the default font\n *\n * @param doc The RtfDocument this font appears in\n * @param fontNumber The id of this font\n */\n protected RtfFont(RtfDocument doc, int fontNumber) {\n this.document = doc;\n this.fontNumber = fontNumber;\n color = new RtfColor(doc, 0, 0, 0);\n }\n\n /**\n * Constructs a RtfFont from a com.lowagie.text.Font\n * @param doc The RtfDocument this font appears in\n * @param font The Font to use as a base\n */\n public RtfFont(RtfDocument doc, Font font) {\n this.document = doc;\n if(font != null) {\n if(font instanceof RtfFont) {\n this.fontName = ((RtfFont) font).getFontName();\n this.charset = ((RtfFont) font).getCharset();\n } else {\n setToDefaultFamily(font.getFamilyname());\n }\n if(font.getBaseFont() != null) {\n String[][] fontNames = font.getBaseFont().getFullFontName();\n for(int i = 0; i < fontNames.length; i++) {\n if(fontNames[i][2].equals(\"0\")) {\n this.fontName = fontNames[i][3];\n break;\n } else if(fontNames[i][2].equals(\"1033\") || fontNames[i][2].equals(\"\")) {\n this.fontName = fontNames[i][3];\n }\n }\n }\n\n if(this.fontName.equalsIgnoreCase(\"unknown\")) {\n this.fontName = DEFAULT_FONT;\n }\n \n setSize(font.getSize());\n setStyle(font.getStyle());\n setColor(font.getColor());\n if(document != null) {\n \tthis.fontNumber = document.getDocumentHeader().getFontNumber(this);\n }\n }\n\n if(document != null) {\n setRtfDocument(document);\n }\n }\n\n /**\n * Writes the font definition\n */\n public void writeDefinition(final OutputStream result) throws IOException\n {\n result.write(FONT_FAMILY);\n result.write(FONT_CHARSET);\n result.write(intToByteArray(charset));\n result.write(DELIMITER);\n document.filterSpecialChar(result, fontName, true, false);\n }\n \n /**\n * Writes the font beginning\n *\n * @param result The <code>OutputStream</code> to write to.\n * @throws IOException On i/o errors.\n */\n public void writeBegin(final OutputStream result) throws IOException {\n if(this.fontNumber != Font.UNDEFINED) {\n result.write(RtfFontList.FONT_NUMBER);\n result.write(intToByteArray(fontNumber));\n }\n if(this.fontSize != Font.UNDEFINED) {\n result.write(FONT_SIZE);\n result.write(intToByteArray(fontSize * 2));\n }\n if(this.fontStyle != UNDEFINED) {\n if((fontStyle & STYLE_BOLD) == STYLE_BOLD) {\n result.write(FONT_BOLD);\n }\n if((fontStyle & STYLE_ITALIC) == STYLE_ITALIC) {\n result.write(FONT_ITALIC);\n }\n if((fontStyle & STYLE_UNDERLINE) == STYLE_UNDERLINE) {\n result.write(FONT_UNDERLINE);\n }\n if((fontStyle & STYLE_STRIKETHROUGH) == STYLE_STRIKETHROUGH) {\n result.write(FONT_STRIKETHROUGH);\n }\n if((fontStyle & STYLE_HIDDEN) == STYLE_HIDDEN) {\n result.write(FONT_HIDDEN);\n }\n if((fontStyle & STYLE_DOUBLE_STRIKETHROUGH) == STYLE_DOUBLE_STRIKETHROUGH) {\n result.write(FONT_DOUBLE_STRIKETHROUGH);\n result.write(intToByteArray(1));\n }\n if((fontStyle & STYLE_SHADOW) == STYLE_SHADOW) {\n result.write(FONT_SHADOW);\n }\n if((fontStyle & STYLE_OUTLINE) == STYLE_OUTLINE) {\n result.write(FONT_OUTLINE);\n }\n if((fontStyle & STYLE_EMBOSSED) == STYLE_EMBOSSED) {\n result.write(FONT_EMBOSSED);\n }\n if((fontStyle & STYLE_ENGRAVED) == STYLE_ENGRAVED) {\n result.write(FONT_ENGRAVED);\n }\n }\n if(color != null) {\n color.writeBegin(result);\n }\n }\n\n /**\n * Write the font end\n *\n * @param result The <code>OutputStream</code> to write to.\n * @throws IOException On i/o errors.\n */\n public void writeEnd(final OutputStream result) throws IOException{\n if(this.fontStyle != UNDEFINED) {\n if((fontStyle & STYLE_BOLD) == STYLE_BOLD) {\n result.write(FONT_BOLD);\n result.write(intToByteArray(0));\n }\n if((fontStyle & STYLE_ITALIC) == STYLE_ITALIC) {\n result.write(FONT_ITALIC);\n result.write(intToByteArray(0));\n }\n if((fontStyle & STYLE_UNDERLINE) == STYLE_UNDERLINE) {\n result.write(FONT_UNDERLINE);\n result.write(intToByteArray(0));\n }\n if((fontStyle & STYLE_STRIKETHROUGH) == STYLE_STRIKETHROUGH) {\n result.write(FONT_STRIKETHROUGH);\n result.write(intToByteArray(0));\n }\n if((fontStyle & STYLE_HIDDEN) == STYLE_HIDDEN) {\n result.write(FONT_HIDDEN);\n result.write(intToByteArray(0));\n }\n if((fontStyle & STYLE_DOUBLE_STRIKETHROUGH) == STYLE_DOUBLE_STRIKETHROUGH) {\n result.write(FONT_DOUBLE_STRIKETHROUGH);\n result.write(intToByteArray(0));\n }\n if((fontStyle & STYLE_SHADOW) == STYLE_SHADOW) {\n result.write(FONT_SHADOW);\n result.write(intToByteArray(0));\n }\n if((fontStyle & STYLE_OUTLINE) == STYLE_OUTLINE) {\n result.write(FONT_OUTLINE);\n result.write(intToByteArray(0));\n }\n if((fontStyle & STYLE_EMBOSSED) == STYLE_EMBOSSED) {\n result.write(FONT_EMBOSSED);\n result.write(intToByteArray(0));\n }\n if((fontStyle & STYLE_ENGRAVED) == STYLE_ENGRAVED) {\n result.write(FONT_ENGRAVED);\n result.write(intToByteArray(0));\n }\n }\n }\n\n /**\n * unused\n */\n public void writeContent(OutputStream out) throws IOException\n { \t\n }\n \n /**\n * Tests for equality of RtfFonts. RtfFonts are equal if their fontName,\n * fontSize, fontStyle and fontSuperSubscript are equal\n * \n * @param obj The RtfFont to compare with this RtfFont\n * @return <code>True</code> if the RtfFonts are equal, <code>false</code> otherwise\n */\n public boolean equals(Object obj) {\n if(!(obj instanceof RtfFont)) {\n return false;\n }\n RtfFont font = (RtfFont) obj;\n boolean result = true;\n result = result & this.fontName.equals(font.getFontName());\n\n return result;\n }\n\n /**\n * Returns the hash code of this RtfFont. The hash code is the hash code of the\n * string containing the font name + font size + \"-\" + the font style + \"-\" + the\n * font super/supscript value.\n * \n * @return The hash code of this RtfFont\n */\n public int hashCode() {\n return (this.fontName + this.fontSize + \"-\" + this.fontStyle).hashCode();\n }\n \n /**\n * Gets the font name of this RtfFont\n * \n * @return The font name\n */\n public String getFontName() {\n return this.fontName;\n }\n\n /**\n * Sets the font name of this RtfFont.\n * \n * @param fontName The font name to use \n */\n protected void setFontName(String fontName) {\n this.fontName = fontName;\n if(document != null) {\n this.fontNumber = document.getDocumentHeader().getFontNumber(this);\n }\n }\n \n /**\n * @see com.lowagie.text.Font#getFamilyname()\n */\n public String getFamilyname() {\n return this.fontName;\n }\n \n /**\n * @see com.lowagie.text.Font#setFamily(String)\n */\n public void setFamily(String family){\n super.setFamily(family);\n setToDefaultFamily(family);\n }\n \n /**\n * Sets the correct font name from the family name.\n * \n * @param familyname The family name to set the name to.\n */\n private void setToDefaultFamily(String familyname){\n switch (Font.getFamilyIndex(familyname)) {\n case Font.COURIER:\n this.fontName = \"Courier\";\n break;\n case Font.HELVETICA:\n this.fontName = \"Arial\";\n break;\n case Font.SYMBOL:\n this.fontName = \"Symbol\";\n this.charset = 2;\n break;\n case Font.TIMES_ROMAN:\n this.fontName = \"Times New Roman\";\n break;\n case Font.ZAPFDINGBATS:\n this.fontName = \"Windings\";\n break;\n default:\n this.fontName = familyname;\n }\n }\n \n /**\n * Gets the font size of this RtfFont\n * \n * @return The font size\n */\n public int getFontSize() {\n return this.fontSize;\n }\n \n /**\n * @see com.lowagie.text.Font#setSize(float)\n */\n public void setSize(float size){\n super.setSize(size);\n this.fontSize = (int) getSize();\n }\n\n /**\n * Gets the font style of this RtfFont\n * \n * @return The font style\n */\n public int getFontStyle() {\n return this.fontStyle;\n }\n \n /**\n * @see com.lowagie.text.Font#setStyle(int)\n */\n public void setStyle(int style){\n super.setStyle(style);\n this.fontStyle = getStyle();\n }\n \n /**\n * @see com.lowagie.text.Font#setStyle(String)\n */\n public void setStyle(String style) {\n super.setStyle(style);\n fontStyle = getStyle();\n }\n\n /**\n * Gets the charset used for constructing this RtfFont.\n * \n * @return The charset of this RtfFont.\n */\n public int getCharset() {\n return charset;\n }\n\n /**\n * Sets the charset used for constructing this RtfFont.\n * \n * @param charset The charset to use.\n */\n public void setCharset(int charset) {\n this.charset = charset;\n }\n\n /**\n * Gets the font number of this RtfFont\n * \n * @return The font number\n */\n public int getFontNumber() {\n return fontNumber;\n }\n\n /**\n * Sets the RtfDocument this RtfFont belongs to\n * \n * @param doc The RtfDocument to use\n */\n public void setRtfDocument(RtfDocument doc) {\n this.document = doc;\n if(document != null) {\n this.fontNumber = document.getDocumentHeader().getFontNumber(this);\n }\n if(this.color != null) {\n this.color.setRtfDocument(this.document);\n }\n }\n\n /**\n * Unused\n * @param inTable\n */\n public void setInTable(boolean inTable) {\n }\n \n /**\n * Unused\n * @param inHeader\n */\n public void setInHeader(boolean inHeader) {\n }\n \n /**\n * @see com.lowagie.text.Font#setColor(Color)\n */\n public void setColor(Color color) {\n super.setColor(color);\n if(color != null) {\n this.color = new RtfColor(document, color);\n } else {\n this.color = null;\n }\n }\n \n /**\n * @see com.lowagie.text.Font#setColor(int, int, int)\n */\n public void setColor(int red, int green, int blue) {\n super.setColor(red,green,blue);\n this.color = new RtfColor(document, red, green, blue);\n }\n\n /**\n * Transforms an integer into its String representation and then returns the bytes\n * of that string.\n *\n * @param i The integer to convert\n * @return A byte array representing the integer\n */\n protected byte[] intToByteArray(int i) {\n return DocWriter.getISOBytes(Integer.toString(i));\n }\n\n /**\n * Replaces the attributes that are equal to <VAR>null</VAR> with\n * the attributes of a given font.\n *\n * @param font The surrounding font\n * @return A RtfFont\n */\n public Font difference(Font font) {\n String dFamilyname = font.getFamilyname();\n if(dFamilyname == null || dFamilyname.trim().equals(\"\") || dFamilyname.trim().equalsIgnoreCase(\"unknown\")) {\n dFamilyname = this.fontName;\n }\n\n float dSize = font.getSize();\n if(dSize == Font.UNDEFINED) {\n dSize = this.getSize();\n }\n\n int dStyle = Font.UNDEFINED;\n if(this.getStyle() != Font.UNDEFINED && font.getStyle() != Font.UNDEFINED) {\n dStyle = this.getStyle() | font.getStyle();\n } else if(this.getStyle() != Font.UNDEFINED) {\n dStyle = this.getStyle();\n } else if(font.getStyle() != Font.UNDEFINED) {\n dStyle = font.getStyle();\n }\n\n Color dColor = font.getColor();\n if(dColor == null) {\n dColor = this.getColor();\n }\n \n int dCharset = this.charset;\n if(font instanceof RtfFont) {\n dCharset = ((RtfFont) font).getCharset();\n }\n \n return new RtfFont(dFamilyname, dSize, dStyle, dColor, dCharset);\n }\n \n /**\n * The <code>RtfFont</code> is never a standard font.\n * \n * @since 2.1.0\n */\n public boolean isStandardFont() {\n return false;\n }\n \n /**\n * Compares this <code>RtfFont</code> to either a {@link com.lowagie.text.Font} or\n * an <code>RtfFont</code>.\n * \n * @since 2.1.0\n */\n public int compareTo(Object object) {\n if (object == null) {\n return -1;\n }\n if(object instanceof RtfFont) {\n if(this.getFontName().compareTo(((RtfFont) object).getFontName()) != 0) {\n return 1;\n } else {\n return super.compareTo(object);\n }\n } else if(object instanceof Font) {\n return super.compareTo(object);\n } else {\n return -3;\n }\n }\n}\n"} +{"text": "/*\tNSSet.h\n\tCopyright (c) 1994-2015, Apple Inc. All rights reserved.\n*/\n\n#import <Foundation/NSObject.h>\n#import <Foundation/NSEnumerator.h>\n\n@class NSArray, NSDictionary, NSString;\n\n/****************\tImmutable Set\t****************/\n\nNS_ASSUME_NONNULL_BEGIN\n\n@interface NSSet<__covariant ObjectType> : NSObject <NSCopying, NSMutableCopying, NSSecureCoding, NSFastEnumeration>\n\n@property (readonly) NSUInteger count;\n- (nullable ObjectType)member:(ObjectType)object;\n- (NSEnumerator<ObjectType> *)objectEnumerator;\n- (instancetype)init NS_DESIGNATED_INITIALIZER;\n- (instancetype)initWithObjects:(const ObjectType [])objects count:(NSUInteger)cnt NS_DESIGNATED_INITIALIZER;\n- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER;\n\n@end\n\n@interface NSSet<ObjectType> (NSExtendedSet)\n\n@property (readonly, copy) NSArray<ObjectType> *allObjects;\n- (nullable ObjectType)anyObject;\n- (BOOL)containsObject:(ObjectType)anObject;\n@property (readonly, copy) NSString *description;\n- (NSString *)descriptionWithLocale:(nullable id)locale;\n- (BOOL)intersectsSet:(NSSet<ObjectType> *)otherSet;\n- (BOOL)isEqualToSet:(NSSet<ObjectType> *)otherSet;\n- (BOOL)isSubsetOfSet:(NSSet<ObjectType> *)otherSet;\n\n- (void)makeObjectsPerformSelector:(SEL)aSelector NS_SWIFT_UNAVAILABLE(\"Use enumerateObjectsUsingBlock: or a for loop instead\");\n- (void)makeObjectsPerformSelector:(SEL)aSelector withObject:(nullable id)argument NS_SWIFT_UNAVAILABLE(\"Use enumerateObjectsUsingBlock: or a for loop instead\");\n\n- (NSSet<ObjectType> *)setByAddingObject:(ObjectType)anObject NS_AVAILABLE(10_5, 2_0);\n- (NSSet<ObjectType> *)setByAddingObjectsFromSet:(NSSet<ObjectType> *)other NS_AVAILABLE(10_5, 2_0);\n- (NSSet<ObjectType> *)setByAddingObjectsFromArray:(NSArray<ObjectType> *)other NS_AVAILABLE(10_5, 2_0);\n\n- (void)enumerateObjectsUsingBlock:(void (^)(ObjectType obj, BOOL *stop))block NS_AVAILABLE(10_6, 4_0);\n- (void)enumerateObjectsWithOptions:(NSEnumerationOptions)opts usingBlock:(void (^)(ObjectType obj, BOOL *stop))block NS_AVAILABLE(10_6, 4_0);\n\n- (NSSet<ObjectType> *)objectsPassingTest:(BOOL (^)(ObjectType obj, BOOL *stop))predicate NS_AVAILABLE(10_6, 4_0);\n- (NSSet<ObjectType> *)objectsWithOptions:(NSEnumerationOptions)opts passingTest:(BOOL (^)(ObjectType obj, BOOL *stop))predicate NS_AVAILABLE(10_6, 4_0);\n\n@end\n\n@interface NSSet<ObjectType> (NSSetCreation)\n\n+ (instancetype)set;\n+ (instancetype)setWithObject:(ObjectType)object;\n+ (instancetype)setWithObjects:(const ObjectType [])objects count:(NSUInteger)cnt;\n+ (instancetype)setWithObjects:(ObjectType)firstObj, ... NS_REQUIRES_NIL_TERMINATION;\n+ (instancetype)setWithSet:(NSSet<ObjectType> *)set;\n+ (instancetype)setWithArray:(NSArray<ObjectType> *)array;\n\n- (instancetype)initWithObjects:(ObjectType)firstObj, ... NS_REQUIRES_NIL_TERMINATION;\n- (instancetype)initWithSet:(NSSet<ObjectType> *)set;\n- (instancetype)initWithSet:(NSSet<ObjectType> *)set copyItems:(BOOL)flag;\n- (instancetype)initWithArray:(NSArray<ObjectType> *)array;\n\n@end\n\n/****************\tMutable Set\t****************/\n\n@interface NSMutableSet<ObjectType> : NSSet<ObjectType>\n\n- (void)addObject:(ObjectType)object;\n- (void)removeObject:(ObjectType)object;\n- (nullable instancetype)initWithCoder:(NSCoder *)aDecoder NS_DESIGNATED_INITIALIZER;\n- (instancetype)init NS_DESIGNATED_INITIALIZER;\n- (instancetype)initWithCapacity:(NSUInteger)numItems NS_DESIGNATED_INITIALIZER;\n\n@end\n\n@interface NSMutableSet<ObjectType> (NSExtendedMutableSet)\n\n- (void)addObjectsFromArray:(NSArray<ObjectType> *)array;\n- (void)intersectSet:(NSSet<ObjectType> *)otherSet;\n- (void)minusSet:(NSSet<ObjectType> *)otherSet;\n- (void)removeAllObjects;\n- (void)unionSet:(NSSet<ObjectType> *)otherSet;\n\n- (void)setSet:(NSSet<ObjectType> *)otherSet;\n\n@end\n\n@interface NSMutableSet<ObjectType> (NSMutableSetCreation)\n\n+ (instancetype)setWithCapacity:(NSUInteger)numItems;\n\n@end\n\n/****************\tCounted Set\t****************/\n\n@interface NSCountedSet<ObjectType> : NSMutableSet<ObjectType> {\n @private\n id _table;\n void *_reserved;\n}\n\n- (instancetype)initWithCapacity:(NSUInteger)numItems NS_DESIGNATED_INITIALIZER;\n\n- (instancetype)initWithArray:(NSArray<ObjectType> *)array;\n- (instancetype)initWithSet:(NSSet<ObjectType> *)set;\n\n- (NSUInteger)countForObject:(ObjectType)object;\n\n- (NSEnumerator<ObjectType> *)objectEnumerator;\n- (void)addObject:(ObjectType)object;\n- (void)removeObject:(ObjectType)object;\n\n@end\n\nNS_ASSUME_NONNULL_END\n"} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<Project DefaultTargets=\"Build\" ToolsVersion=\"14.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n <ItemGroup Label=\"ProjectConfigurations\">\n <ProjectConfiguration Include=\"Debug|Win32\">\n <Configuration>Debug</Configuration>\n <Platform>Win32</Platform>\n </ProjectConfiguration>\n <ProjectConfiguration Include=\"Release|Win32\">\n <Configuration>Release</Configuration>\n <Platform>Win32</Platform>\n </ProjectConfiguration>\n <ProjectConfiguration Include=\"Debug|x64\">\n <Configuration>Debug</Configuration>\n <Platform>x64</Platform>\n </ProjectConfiguration>\n <ProjectConfiguration Include=\"Release|x64\">\n <Configuration>Release</Configuration>\n <Platform>x64</Platform>\n </ProjectConfiguration>\n </ItemGroup>\n <PropertyGroup Label=\"Globals\">\n <ProjectGuid>{7E591532-C86D-4163-93AE-4F925DBFF0FC}</ProjectGuid>\n <Keyword>Win32Proj</Keyword>\n <RootNamespace>My32_03_PrintTreesInZigzag</RootNamespace>\n <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>\n </PropertyGroup>\n <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.Default.props\" />\n <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\" Label=\"Configuration\">\n <ConfigurationType>Application</ConfigurationType>\n <UseDebugLibraries>true</UseDebugLibraries>\n <PlatformToolset>v140</PlatformToolset>\n <CharacterSet>Unicode</CharacterSet>\n </PropertyGroup>\n <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\" Label=\"Configuration\">\n <ConfigurationType>Application</ConfigurationType>\n <UseDebugLibraries>false</UseDebugLibraries>\n <PlatformToolset>v140</PlatformToolset>\n <WholeProgramOptimization>true</WholeProgramOptimization>\n <CharacterSet>Unicode</CharacterSet>\n </PropertyGroup>\n <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\" Label=\"Configuration\">\n <ConfigurationType>Application</ConfigurationType>\n <UseDebugLibraries>true</UseDebugLibraries>\n <PlatformToolset>v140</PlatformToolset>\n <CharacterSet>Unicode</CharacterSet>\n </PropertyGroup>\n <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\" Label=\"Configuration\">\n <ConfigurationType>Application</ConfigurationType>\n <UseDebugLibraries>false</UseDebugLibraries>\n <PlatformToolset>v140</PlatformToolset>\n <WholeProgramOptimization>true</WholeProgramOptimization>\n <CharacterSet>Unicode</CharacterSet>\n </PropertyGroup>\n <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.props\" />\n <ImportGroup Label=\"ExtensionSettings\">\n </ImportGroup>\n <ImportGroup Label=\"Shared\">\n </ImportGroup>\n <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n </ImportGroup>\n <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n </ImportGroup>\n <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n </ImportGroup>\n <ImportGroup Label=\"PropertySheets\" Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n <Import Project=\"$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props\" Condition=\"exists('$(UserRootDir)\\Microsoft.Cpp.$(Platform).user.props')\" Label=\"LocalAppDataPlatform\" />\n </ImportGroup>\n <PropertyGroup Label=\"UserMacros\" />\n <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n <LinkIncremental>true</LinkIncremental>\n </PropertyGroup>\n <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n <LinkIncremental>true</LinkIncremental>\n </PropertyGroup>\n <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n <LinkIncremental>false</LinkIncremental>\n </PropertyGroup>\n <PropertyGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n <LinkIncremental>false</LinkIncremental>\n </PropertyGroup>\n <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|Win32'\">\n <ClCompile>\n <PrecompiledHeader>\n </PrecompiledHeader>\n <WarningLevel>Level3</WarningLevel>\n <Optimization>Disabled</Optimization>\n <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n </ClCompile>\n <Link>\n <SubSystem>Console</SubSystem>\n <GenerateDebugInformation>true</GenerateDebugInformation>\n </Link>\n </ItemDefinitionGroup>\n <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Debug|x64'\">\n <ClCompile>\n <PrecompiledHeader>\n </PrecompiledHeader>\n <WarningLevel>Level3</WarningLevel>\n <Optimization>Disabled</Optimization>\n <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n </ClCompile>\n <Link>\n <SubSystem>Console</SubSystem>\n <GenerateDebugInformation>true</GenerateDebugInformation>\n </Link>\n </ItemDefinitionGroup>\n <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|Win32'\">\n <ClCompile>\n <WarningLevel>Level3</WarningLevel>\n <PrecompiledHeader>\n </PrecompiledHeader>\n <Optimization>MaxSpeed</Optimization>\n <FunctionLevelLinking>true</FunctionLevelLinking>\n <IntrinsicFunctions>true</IntrinsicFunctions>\n <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n </ClCompile>\n <Link>\n <SubSystem>Console</SubSystem>\n <EnableCOMDATFolding>true</EnableCOMDATFolding>\n <OptimizeReferences>true</OptimizeReferences>\n <GenerateDebugInformation>true</GenerateDebugInformation>\n </Link>\n </ItemDefinitionGroup>\n <ItemDefinitionGroup Condition=\"'$(Configuration)|$(Platform)'=='Release|x64'\">\n <ClCompile>\n <WarningLevel>Level3</WarningLevel>\n <PrecompiledHeader>\n </PrecompiledHeader>\n <Optimization>MaxSpeed</Optimization>\n <FunctionLevelLinking>true</FunctionLevelLinking>\n <IntrinsicFunctions>true</IntrinsicFunctions>\n <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>\n </ClCompile>\n <Link>\n <SubSystem>Console</SubSystem>\n <EnableCOMDATFolding>true</EnableCOMDATFolding>\n <OptimizeReferences>true</OptimizeReferences>\n <GenerateDebugInformation>true</GenerateDebugInformation>\n </Link>\n </ItemDefinitionGroup>\n <ItemGroup>\n <ClCompile Include=\"PrintTreesInZigzag.cpp\" />\n </ItemGroup>\n <ItemGroup>\n <ProjectReference Include=\"..\\Utilities\\Utilities.vcxproj\">\n <Project>{732da13a-f8bb-4cef-b96d-61de60bdb6a7}</Project>\n </ProjectReference>\n </ItemGroup>\n <Import Project=\"$(VCTargetsPath)\\Microsoft.Cpp.targets\" />\n <ImportGroup Label=\"ExtensionTargets\">\n </ImportGroup>\n</Project>"} +{"text": "export{\"eco8\"}\n\neco8 = method()\neco8 (Ring) := kk -> (\n\tx := symbol x;\n\tR := kk[x_1..x_8];\n\t{ (x_1 + x_1*x_2 + x_2*x_3 + x_3*x_4 + x_4*x_5 + x_5*x_6 + x_6*x_7)*x_8 - 1,\n\t(x_2 + x_1*x_3 + x_2*x_4 + x_3*x_5 + x_4*x_6 + x_5*x_7)*x_8 - 2,\n\t(x_3 + x_1*x_4 + x_2*x_5 + x_3*x_6 + x_4*x_7)*x_8 - 3,\n\t(x_4 + x_1*x_5 + x_2*x_6 + x_3*x_7)*x_8 - 4,\n\t(x_5 + x_1*x_6 + x_2*x_7)*x_8 - 5,\n\t(x_6 + x_1*x_7)*x_8 - 6,\n\tx_7*x_8 - 7,\n\tx_1 + x_2 + x_3 + x_4 + x_5 + x_6 + x_7 + 1 }\n )\n\nbeginDocumentation()\n\ndoc /// \n Key\n \teco8\n\t(eco8,Ring)\n Headline\n \tan 8-dimensional economics problem \n Usage\n\teco8(kk)\n Inputs\n\tkk:Ring\n\t\tthe coefficient ring\n Outputs\n\t:List\n\t\tof polynomials in the system\n Description\n \tText\n\t This system was solved in May 2020, using @TO solveSystem@ in Macaulay2 v1.15\n\t with an Intel(R) Core(TM) i5-5250U CPU at 1.60GHz.\n\t \n\t There were 64 solutions found in 9.197 seconds (with a Bezout bound of 1458).\n\t \n\t Reference: \"Solving polynomial systems using continuation for engineering\n \t and scientific problems\" by Alexander Morgan (p 148).\n\t \n\t See also: http://homepages.math.uic.edu/~jan/Demo/eco8.html.\n\tExample\n\t eco8(QQ)\n ///\n"} +{"text": ".weui-sidebar {\n position: fixed;\n z-index: 99999;\n overflow: auto;\n background-color: var(--weui-BG-2);\n transition: transform 0.3s cubic-bezier(0, 0, 0.3, 1);\n pointer-events: auto;\n will-change: initial;\n &__left {\n top: 0;\n bottom: 0;\n left: 0;\n }\n &__right {\n top: 0;\n right: 0;\n bottom: 0;\n }\n &__top {\n top: 0;\n right: 0;\n left: 0;\n }\n &__bottom {\n right: 0;\n bottom: 0;\n left: 0;\n }\n &__inert {\n pointer-events: none;\n will-change: transform;\n }\n &__content {\n display: block;\n height: 100%;\n overflow: auto;\n transition: margin 0.3s cubic-bezier(0, 0, 0.3, 1);\n }\n}\n\nweui-sidebar-container {\n position: relative;\n display: block;\n box-sizing: border-box;\n height: 100%;\n transition: transform 0.3s cubic-bezier(0, 0, 0.3, 1);\n}\n"} +{"text": "-- boundary2.test\n-- \n-- db eval {\n-- SELECT a FROM t1 WHERE r <= 549755813887 ORDER BY a DESC\n-- }\nSELECT a FROM t1 WHERE r <= 549755813887 ORDER BY a DESC"} +{"text": "<?xml version=\"1.0\"?>\n<ruleset name=\"FOSSology PHP Coding Standard\">\n <description>Coding standard created based on FOSSology's Coding\n Guidelines for PHP</description>\n\n <!--\n The coding guidelines must be followed for the PHP files. These files\n are generally located in the following locations. This list can be extended\n based on new features/files.\n -->\n <file>cli</file>\n <file>decider</file>\n <file>deciderjob</file>\n <file>delagent/ui</file>\n <file>lib/php</file>\n <file>monk/ui</file>\n <file>nomos/ui</file>\n <file>readmeoss</file>\n <file>reuser</file>\n <file>spasht</file>\n <file>spdx2</file>\n <file>unifiedreport</file>\n <file>softwareHeritage</file>\n <file>www/ui</file>\n\n <!--\n The vendor folder by composer must not be scanned.\n -->\n <exclude-pattern>vendor</exclude-pattern>\n\n <!--\n Set the file extensions to be scanned.\n -->\n <arg name=\"extensions\" value=\"php\" />\n\n <rule ref=\"Generic.ControlStructures.InlineControlStructure\" />\n <rule ref=\"Generic.Files.LineEndings\" />\n <rule ref=\"Generic.Functions.OpeningFunctionBraceBsdAllman\" />\n <rule ref=\"Generic.NamingConventions.UpperCaseConstantName\" />\n <rule ref=\"Generic.PHP.LowerCaseKeyword\" />\n <rule ref=\"Generic.WhiteSpace.DisallowTabIndent\" />\n <rule ref=\"PEAR.ControlStructures.ControlSignature\" />\n <rule ref=\"Squiz.WhiteSpace.SuperfluousWhitespace\" />\n <rule ref=\"Zend.Files.ClosingTag\"></rule>\n\n <rule ref=\"Generic.WhiteSpace.ScopeIndent\">\n <properties>\n <property name=\"indent\" value=\"2\" />\n </properties>\n </rule>\n\n <rule ref=\"Generic.Commenting.Todo.CommentFound\">\n <message>Please review this TODO comment: %s</message>\n <severity>3</severity>\n </rule>\n\n <rule ref=\"PSR2.Classes.ClassDeclaration\">\n <properties>\n <property name=\"indent\" value=\"2\" />\n </properties>\n </rule>\n\n <rule ref=\"PEAR.WhiteSpace.ScopeClosingBrace\">\n <properties>\n <property name=\"indent\" value=\"2\" />\n </properties>\n </rule>\n</ruleset>\n"} +{"text": "# Copyright 2020 Tensorforce Team. All Rights Reserved.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n# ==============================================================================\n\nimport tensorflow as tf\n\nfrom tensorforce import TensorforceError\nfrom tensorforce.core import Module, SignatureDict, TensorSpec, tf_function, tf_util\n\n\nclass Parameter(Module):\n \"\"\"\n Base class for dynamic hyperparameters.\n\n Args:\n unit (\"timesteps\" | \"episodes\" | \"updates\"): Unit of parameter schedule\n (<span style=\"color:#00C000\"><b>default</b></span>: timesteps).\n name (string): <span style=\"color:#0000C0\"><b>internal use</b></span>.\n dtype (type): <span style=\"color:#0000C0\"><b>internal use</b></span>.\n shape (iter[int > 0]): <span style=\"color:#0000C0\"><b>internal use</b></span>.\n min_value (dtype-compatible value): <span style=\"color:#0000C0\"><b>internal use</b></span>.\n max_value (dtype-compatible value): <span style=\"color:#0000C0\"><b>internal use</b></span>.\n \"\"\"\n\n def __init__(\n self, *, unit='timesteps', name=None, dtype=None, shape=(), min_value=None, max_value=None\n ):\n super().__init__(name=name)\n\n assert unit in (None, 'timesteps', 'episodes', 'updates')\n self.unit = unit\n\n self.spec = TensorSpec(type=dtype, shape=shape, min_value=min_value, max_value=max_value)\n\n assert self.min_value() is None or self.max_value() is None or \\\n self.min_value() <= self.max_value()\n if self.spec.min_value is not None:\n if self.min_value() is None:\n raise TensorforceError.value(\n name=self.name, argument='lower bound', value=self.min_value(),\n hint=('not >= {}'.format(self.spec.min_value))\n )\n elif self.min_value() < self.spec.min_value:\n raise TensorforceError.value(\n name=self.name, argument='lower bound', value=self.min_value(),\n hint=('< {}'.format(self.spec.min_value))\n )\n if self.spec.max_value is not None:\n if self.max_value() is None:\n raise TensorforceError.value(\n name=self.name, argument='upper bound', value=self.max_value(),\n hint=('not <= {}'.format(self.spec.max_value))\n )\n elif self.max_value() > self.spec.max_value:\n raise TensorforceError.value(\n name=self.name, argument='upper bound', value=self.max_value(),\n hint=('> {}'.format(self.spec.max_value))\n )\n\n def min_value(self):\n return None\n\n def max_value(self):\n return None\n\n def is_constant(self, *, value=None):\n if value is None:\n if self.min_value() is not None and self.min_value() == self.max_value():\n assert self.final_value() == self.min_value()\n assert isinstance(self.final_value(), self.spec.py_type())\n return self.final_value()\n else:\n return None\n else:\n assert isinstance(value, self.spec.py_type())\n if self.min_value() == value and self.max_value() == value:\n assert self.final_value() == value\n return True\n else:\n return False\n\n def final_value(self):\n raise NotImplementedError\n\n def initialize(self):\n super().initialize()\n\n self.register_summary(label='parameters', name=('parameters/' + self.name))\n\n def input_signature(self, *, function):\n if function == 'value':\n return SignatureDict()\n\n else:\n return super().input_signature(function=function)\n\n def output_signature(self, *, function):\n if function == 'value':\n return SignatureDict(singleton=self.spec.signature(batched=False))\n\n else:\n return super().output_signature(function=function)\n\n def parameter_value(self, *, step):\n raise NotImplementedError\n\n @tf_function(num_args=0)\n def value(self):\n if self.unit is None:\n step = None\n else:\n step = self.root.units[self.unit]\n\n parameter = self.parameter_value(step=step)\n\n dependencies = self.spec.tf_assert(\n x=parameter, include_type_shape=True,\n message='Parameter.value: invalid {{issue}} for {name} value.'.format(name=self.name)\n )\n\n name = 'parameters/' + self.name\n if self.unit is None:\n step = 'timesteps'\n else:\n step = self.unit\n dependencies.extend(self.summary(label='parameters', name=name, data=parameter, step=step))\n\n with tf.control_dependencies(control_inputs=dependencies):\n return tf_util.identity(input=parameter)\n"} +{"text": "uniform vec4 _LightShadowData;\nuniform mat4 _Object2World;\nuniform mat4 _World2Shadow;\nuniform mat4 _World2Shadow1;\nuniform mat4 _World2Shadow2;\nuniform mat4 _World2Shadow3;\nvoid main ()\n{\n float z_1;\n vec2 tmpvar_2;\n z_1 = -((gl_ModelViewMatrix * gl_Vertex).z);\n tmpvar_2.x = z_1;\n tmpvar_2.y = ((z_1 * _LightShadowData.z) + _LightShadowData.w);\n vec4 tmpvar_3;\n tmpvar_3 = (_Object2World * gl_Vertex);\n gl_Position = (gl_ModelViewProjectionMatrix * gl_Vertex);\n vec4 tmpvar_4;\n tmpvar_4.w = 0.0;\n tmpvar_4.xyz = (_World2Shadow * tmpvar_3).xyz;\n gl_TexCoord[0] = tmpvar_4;\n vec4 tmpvar_5;\n tmpvar_5.w = 0.0;\n tmpvar_5.xyz = (_World2Shadow1 * tmpvar_3).xyz;\n gl_TexCoord[1] = tmpvar_5;\n vec4 tmpvar_6;\n tmpvar_6.w = 0.0;\n tmpvar_6.xyz = (_World2Shadow2 * tmpvar_3).xyz;\n gl_TexCoord[2] = tmpvar_6;\n vec4 tmpvar_7;\n tmpvar_7.w = 0.0;\n tmpvar_7.xyz = (_World2Shadow3 * tmpvar_3).xyz;\n gl_TexCoord[3] = tmpvar_7;\n vec4 tmpvar_8;\n tmpvar_8.zw = vec2(0.0, 0.0);\n tmpvar_8.xy = tmpvar_2;\n gl_TexCoord[4] = tmpvar_8;\n vec4 tmpvar_9;\n tmpvar_9.w = 0.0;\n tmpvar_9.xyz = tmpvar_3.xyz;\n gl_TexCoord[5] = tmpvar_9;\n}\n\n\n// stats: 16 alu 0 tex 0 flow\n// inputs: 1\n// #0: gl_Vertex (high float) 4x1 [-1] loc 0\n// uniforms: 8 (total size: 0)\n// #0: gl_ModelViewProjectionMatrix (high float) 4x4 [-1]\n// #1: gl_ModelViewMatrix (high float) 4x4 [-1]\n// #2: _LightShadowData (high float) 4x1 [-1]\n// #3: _Object2World (high float) 4x4 [-1]\n// #4: _World2Shadow (high float) 4x4 [-1]\n// #5: _World2Shadow1 (high float) 4x4 [-1]\n// #6: _World2Shadow2 (high float) 4x4 [-1]\n// #7: _World2Shadow3 (high float) 4x4 [-1]\n"} +{"text": "<ResourceDictionary xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\n xmlns:Metro=\"clr-namespace:Arthas.Controls\">\n <ResourceDictionary.MergedDictionaries>\n <ResourceDictionary Source=\"/Arthas;component/Controls/MetroBase.xaml\" />\n </ResourceDictionary.MergedDictionaries>\n\n <Style TargetType=\"{x:Type Metro:MetroVisualElement}\">\n\n <Setter Property=\"IsHitTestVisible\" Value=\"False\" />\n <Setter Property=\"ClipToBounds\" Value=\"False\" />\n\n <Setter Property=\"Background\" Value=\"#00000000\" />\n <Setter Property=\"VisualOpacity\" Value=\"1\" />\n <Setter Property=\"VisualBlurRadius\" Value=\"0\" />\n <Setter Property=\"Left\" Value=\"0\" />\n <Setter Property=\"Top\" Value=\"0\" />\n\n <Setter Property=\"Template\">\n <Setter.Value>\n <ControlTemplate TargetType=\"{x:Type Metro:MetroVisualElement}\">\n <Canvas Background=\"{TemplateBinding Background}\">\n <Rectangle Opacity=\"{TemplateBinding VisualOpacity}\" Canvas.Left=\"{TemplateBinding Left}\" Canvas.Top=\"{TemplateBinding Top}\" Width=\"{Binding ActualWidth, RelativeSource={RelativeSource TemplatedParent}}\" Height=\"{Binding ActualHeight, RelativeSource={RelativeSource TemplatedParent}}\">\n <Rectangle.Fill>\n <VisualBrush Visual=\"{Binding Visual, RelativeSource={RelativeSource TemplatedParent}}\" AlignmentX=\"Left\" AlignmentY=\"Top\" Stretch=\"None\" />\n </Rectangle.Fill>\n <Rectangle.Effect>\n <BlurEffect Radius=\"{Binding VisualBlurRadius, RelativeSource={RelativeSource TemplatedParent}}\" />\n </Rectangle.Effect>\n </Rectangle>\n </Canvas>\n </ControlTemplate>\n </Setter.Value>\n </Setter>\n </Style>\n</ResourceDictionary>"} +{"text": "#!/usr/bin/env bash\n\nMASON_NAME=rapidjson\nMASON_VERSION=1.1.0\nMASON_HEADER_ONLY=true\n\n. ${MASON_DIR}/mason.sh\n\nfunction mason_load_source {\n mason_download \\\n https://github.com/miloyip/rapidjson/archive/v1.1.0.tar.gz \\\n eb129f3e940d4bc220a16cfb1b6625e79a09b2d4\n mason_extract_tar_gz\n\n export MASON_BUILD_PATH=${MASON_ROOT}/.build/rapidjson-1.1.0\n}\n\nfunction mason_compile {\n mkdir -p ${MASON_PREFIX}\n cp -rv include ${MASON_PREFIX}\n}\n\nfunction mason_cflags {\n echo -I${MASON_PREFIX}/include\n}\n\nfunction mason_ldflags {\n : # We're only using the full path to the archive, which is output in static_libs\n}\n\nfunction mason_clean {\n make clean\n}\n\nmason_run \"$@\"\n"} +{"text": "// 26.1.14 Reflect.setPrototypeOf(target, proto)\nvar $export = require('./$.export')\n , setProto = require('./$.set-proto');\n\nif(setProto)$export($export.S, 'Reflect', {\n setPrototypeOf: function setPrototypeOf(target, proto){\n setProto.check(target, proto);\n try {\n setProto.set(target, proto);\n return true;\n } catch(e){\n return false;\n }\n }\n});"} +{"text": "linux\n"} +{"text": "# Copyright (C) 2001-2006 Python Software Foundation\n# Author: Barry Warsaw\n# Contact: email-sig@python.org\n\n\"\"\"email package exception classes.\"\"\"\n\n\n\f\nclass MessageError(Exception):\n \"\"\"Base class for errors in the email package.\"\"\"\n\n\nclass MessageParseError(MessageError):\n \"\"\"Base class for message parsing errors.\"\"\"\n\n\nclass HeaderParseError(MessageParseError):\n \"\"\"Error while parsing headers.\"\"\"\n\n\nclass BoundaryError(MessageParseError):\n \"\"\"Couldn't find terminating boundary.\"\"\"\n\n\nclass MultipartConversionError(MessageError, TypeError):\n \"\"\"Conversion to a multipart is prohibited.\"\"\"\n\n\nclass CharsetError(MessageError):\n \"\"\"An illegal charset was given.\"\"\"\n\n\n\f\n# These are parsing defects which the parser was able to work around.\nclass MessageDefect:\n \"\"\"Base class for a message defect.\"\"\"\n\n def __init__(self, line=None):\n self.line = line\n\nclass NoBoundaryInMultipartDefect(MessageDefect):\n \"\"\"A message claimed to be a multipart but had no boundary parameter.\"\"\"\n\nclass StartBoundaryNotFoundDefect(MessageDefect):\n \"\"\"The claimed start boundary was never found.\"\"\"\n\nclass FirstHeaderLineIsContinuationDefect(MessageDefect):\n \"\"\"A message had a continuation line as its first header line.\"\"\"\n\nclass MisplacedEnvelopeHeaderDefect(MessageDefect):\n \"\"\"A 'Unix-from' header was found in the middle of a header block.\"\"\"\n\nclass MalformedHeaderDefect(MessageDefect):\n \"\"\"Found a header that was missing a colon, or was otherwise malformed.\"\"\"\n\nclass MultipartInvariantViolationDefect(MessageDefect):\n \"\"\"A message claimed to be a multipart but no subparts were found.\"\"\"\n"} +{"text": "<div class=\"book-header\">\n <!-- Actions Left -->\n <a href=\"{{ githubHost }}{{ githubId }}\" target=\"_blank\" class=\"btn pull-left\"><i class=\"fa fa-github-alt\"></i></a>\n <a href=\"#\" class=\"btn pull-left toggle-summary\"><i class=\"fa fa-align-justify\"></i></a>\n <a href=\"#\" class=\"btn pull-left toggle-search\"><i class=\"fa fa-search\"></i></a>\n\n <!-- Actions Right -->\n <a href=\"#\" target=\"_blank\" class=\"btn pull-right\" data-sharing=\"google-plus\"><i class=\"fa fa-google-plus\"></i></a>\n <a href=\"#\" target=\"_blank\" class=\"btn pull-right\" data-sharing=\"facebook\"><i class=\"fa fa-facebook\"></i></a>\n <a href=\"#\" target=\"_blank\" class=\"btn pull-right\" data-sharing=\"twitter\"><i class=\"fa fa-twitter\"></i></a>\n\n <a href=\"{{ githubHost }}{{ githubId }}/stargazers\" target=\"_blank\" class=\"btn pull-right count-star\"><i class=\"fa fa-star-o\"></i> Star (<span>-</span>)</a>\n <a href=\"{{ githubHost }}{{ githubId }}/watchers\" target=\"_blank\" class=\"btn pull-right count-watch\"><i class=\"fa fa-eye\"></i> Watch (<span>-</span>)</a>\n\n\n <!-- Title -->\n <h1><a href=\"{{ basePath }}/\" >{{ title }}</a></h1>\n</div>\n"} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout\n xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:id=\"@+id/card_with_read_more\"\n android:layout_width=\"match_parent\"\n android:layout_height=\"wrap_content\"\n android:orientation=\"vertical\"\n android:padding=\"8dp\">\n\n <TextView\n android:id=\"@+id/read_more_link\"\n style=\"@style/Ask.Text.Hint\"\n android:layout_width=\"wrap_content\"\n android:layout_height=\"wrap_content\"\n android:layout_gravity=\"right|bottom\"\n android:layout_marginTop=\"6dp\"\n android:text=\"@string/click_for_more\" />\n\n</LinearLayout>\n"} +{"text": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!21 &2100000\nMaterial:\n serializedVersion: 6\n m_ObjectHideFlags: 0\n m_PrefabParentObject: {fileID: 0}\n m_PrefabInternal: {fileID: 0}\n m_Name: Metal.001 (17)\n m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}\n m_ShaderKeywords: \n m_LightmapFlags: 5\n m_CustomRenderQueue: -1\n stringTagMap: {}\n m_SavedProperties:\n serializedVersion: 2\n m_TexEnvs:\n - first:\n name: _BumpMap\n second:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - first:\n name: _DetailAlbedoMap\n second:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - first:\n name: _DetailMask\n second:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - first:\n name: _DetailNormalMap\n second:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - first:\n name: _EmissionMap\n second:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - first:\n name: _MainTex\n second:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - first:\n name: _MetallicGlossMap\n second:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - first:\n name: _OcclusionMap\n second:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - first:\n name: _ParallaxMap\n second:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n m_Floats:\n - first:\n name: _BumpScale\n second: 1\n - first:\n name: _Cutoff\n second: 0.5\n - first:\n name: _DetailNormalMapScale\n second: 1\n - first:\n name: _DstBlend\n second: 0\n - first:\n name: _GlossMapScale\n second: 1\n - first:\n name: _Glossiness\n second: 0.5\n - first:\n name: _GlossyReflections\n second: 1\n - first:\n name: _Metallic\n second: 0\n - first:\n name: _Mode\n second: 0\n - first:\n name: _OcclusionStrength\n second: 1\n - first:\n name: _Parallax\n second: 0.02\n - first:\n name: _SmoothnessTextureChannel\n second: 0\n - first:\n name: _SpecularHighlights\n second: 1\n - first:\n name: _SrcBlend\n second: 1\n - first:\n name: _UVSec\n second: 0\n - first:\n name: _ZWrite\n second: 1\n m_Colors:\n - first:\n name: _Color\n second: {r: 0.8, g: 0.8, b: 0.8, a: 1}\n - first:\n name: _EmissionColor\n second: {r: 0, g: 0, b: 0, a: 1}\n"} +{"text": "// +build darwin dragonfly freebsd linux netbsd openbsd solaris\n\npackage cli\n\nimport \"os\"\n\nfunc clearenv() {\n\tos.Clearenv()\n}\n"} +{"text": "\n// Copyright Aleksey Gurtovoy 2000-2004\n// Copyright David Abrahams 2003-2004\n//\n// Distributed under the Boost Software License, Version 1.0. \n// (See accompanying file LICENSE_1_0.txt or copy at \n// http://www.boost.org/LICENSE_1_0.txt)\n//\n\n// Preprocessed version of \"boost/mpl/set/set50.hpp\" header\n// -- DO NOT modify by hand!\n\nnamespace boost { namespace mpl {\n\ntemplate<\n typename T0, typename T1, typename T2, typename T3, typename T4\n , typename T5, typename T6, typename T7, typename T8, typename T9\n , typename T10, typename T11, typename T12, typename T13, typename T14\n , typename T15, typename T16, typename T17, typename T18, typename T19\n , typename T20, typename T21, typename T22, typename T23, typename T24\n , typename T25, typename T26, typename T27, typename T28, typename T29\n , typename T30, typename T31, typename T32, typename T33, typename T34\n , typename T35, typename T36, typename T37, typename T38, typename T39\n , typename T40\n >\nstruct set41\n : s_item<\n T40\n , typename set40< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11\n , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25\n , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38\n , T39 >::item_\n >\n{\n typedef set41 type;\n};\n\ntemplate<\n typename T0, typename T1, typename T2, typename T3, typename T4\n , typename T5, typename T6, typename T7, typename T8, typename T9\n , typename T10, typename T11, typename T12, typename T13, typename T14\n , typename T15, typename T16, typename T17, typename T18, typename T19\n , typename T20, typename T21, typename T22, typename T23, typename T24\n , typename T25, typename T26, typename T27, typename T28, typename T29\n , typename T30, typename T31, typename T32, typename T33, typename T34\n , typename T35, typename T36, typename T37, typename T38, typename T39\n , typename T40, typename T41\n >\nstruct set42\n : s_item<\n T41\n , typename set41< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11\n , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25\n , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39\n , T40 >::item_\n >\n{\n typedef set42 type;\n};\n\ntemplate<\n typename T0, typename T1, typename T2, typename T3, typename T4\n , typename T5, typename T6, typename T7, typename T8, typename T9\n , typename T10, typename T11, typename T12, typename T13, typename T14\n , typename T15, typename T16, typename T17, typename T18, typename T19\n , typename T20, typename T21, typename T22, typename T23, typename T24\n , typename T25, typename T26, typename T27, typename T28, typename T29\n , typename T30, typename T31, typename T32, typename T33, typename T34\n , typename T35, typename T36, typename T37, typename T38, typename T39\n , typename T40, typename T41, typename T42\n >\nstruct set43\n : s_item<\n T42\n , typename set42< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11\n , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25\n , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39\n , T40, T41 >::item_\n >\n{\n typedef set43 type;\n};\n\ntemplate<\n typename T0, typename T1, typename T2, typename T3, typename T4\n , typename T5, typename T6, typename T7, typename T8, typename T9\n , typename T10, typename T11, typename T12, typename T13, typename T14\n , typename T15, typename T16, typename T17, typename T18, typename T19\n , typename T20, typename T21, typename T22, typename T23, typename T24\n , typename T25, typename T26, typename T27, typename T28, typename T29\n , typename T30, typename T31, typename T32, typename T33, typename T34\n , typename T35, typename T36, typename T37, typename T38, typename T39\n , typename T40, typename T41, typename T42, typename T43\n >\nstruct set44\n : s_item<\n T43\n , typename set43< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11\n , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25\n , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39\n , T40, T41, T42 >::item_\n >\n{\n typedef set44 type;\n};\n\ntemplate<\n typename T0, typename T1, typename T2, typename T3, typename T4\n , typename T5, typename T6, typename T7, typename T8, typename T9\n , typename T10, typename T11, typename T12, typename T13, typename T14\n , typename T15, typename T16, typename T17, typename T18, typename T19\n , typename T20, typename T21, typename T22, typename T23, typename T24\n , typename T25, typename T26, typename T27, typename T28, typename T29\n , typename T30, typename T31, typename T32, typename T33, typename T34\n , typename T35, typename T36, typename T37, typename T38, typename T39\n , typename T40, typename T41, typename T42, typename T43, typename T44\n >\nstruct set45\n : s_item<\n T44\n , typename set44< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11\n , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25\n , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39\n , T40, T41, T42, T43 >::item_\n >\n{\n typedef set45 type;\n};\n\ntemplate<\n typename T0, typename T1, typename T2, typename T3, typename T4\n , typename T5, typename T6, typename T7, typename T8, typename T9\n , typename T10, typename T11, typename T12, typename T13, typename T14\n , typename T15, typename T16, typename T17, typename T18, typename T19\n , typename T20, typename T21, typename T22, typename T23, typename T24\n , typename T25, typename T26, typename T27, typename T28, typename T29\n , typename T30, typename T31, typename T32, typename T33, typename T34\n , typename T35, typename T36, typename T37, typename T38, typename T39\n , typename T40, typename T41, typename T42, typename T43, typename T44\n , typename T45\n >\nstruct set46\n : s_item<\n T45\n , typename set45< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11\n , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25\n , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39\n , T40, T41, T42, T43, T44 >::item_\n >\n{\n typedef set46 type;\n};\n\ntemplate<\n typename T0, typename T1, typename T2, typename T3, typename T4\n , typename T5, typename T6, typename T7, typename T8, typename T9\n , typename T10, typename T11, typename T12, typename T13, typename T14\n , typename T15, typename T16, typename T17, typename T18, typename T19\n , typename T20, typename T21, typename T22, typename T23, typename T24\n , typename T25, typename T26, typename T27, typename T28, typename T29\n , typename T30, typename T31, typename T32, typename T33, typename T34\n , typename T35, typename T36, typename T37, typename T38, typename T39\n , typename T40, typename T41, typename T42, typename T43, typename T44\n , typename T45, typename T46\n >\nstruct set47\n : s_item<\n T46\n , typename set46< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11\n , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25\n , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39\n , T40, T41, T42, T43, T44, T45 >::item_\n >\n{\n typedef set47 type;\n};\n\ntemplate<\n typename T0, typename T1, typename T2, typename T3, typename T4\n , typename T5, typename T6, typename T7, typename T8, typename T9\n , typename T10, typename T11, typename T12, typename T13, typename T14\n , typename T15, typename T16, typename T17, typename T18, typename T19\n , typename T20, typename T21, typename T22, typename T23, typename T24\n , typename T25, typename T26, typename T27, typename T28, typename T29\n , typename T30, typename T31, typename T32, typename T33, typename T34\n , typename T35, typename T36, typename T37, typename T38, typename T39\n , typename T40, typename T41, typename T42, typename T43, typename T44\n , typename T45, typename T46, typename T47\n >\nstruct set48\n : s_item<\n T47\n , typename set47< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11\n , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25\n , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39\n , T40, T41, T42, T43, T44, T45, T46 >::item_\n >\n{\n typedef set48 type;\n};\n\ntemplate<\n typename T0, typename T1, typename T2, typename T3, typename T4\n , typename T5, typename T6, typename T7, typename T8, typename T9\n , typename T10, typename T11, typename T12, typename T13, typename T14\n , typename T15, typename T16, typename T17, typename T18, typename T19\n , typename T20, typename T21, typename T22, typename T23, typename T24\n , typename T25, typename T26, typename T27, typename T28, typename T29\n , typename T30, typename T31, typename T32, typename T33, typename T34\n , typename T35, typename T36, typename T37, typename T38, typename T39\n , typename T40, typename T41, typename T42, typename T43, typename T44\n , typename T45, typename T46, typename T47, typename T48\n >\nstruct set49\n : s_item<\n T48\n , typename set48< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11\n , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25\n , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39\n , T40, T41, T42, T43, T44, T45, T46, T47 >::item_\n >\n{\n typedef set49 type;\n};\n\ntemplate<\n typename T0, typename T1, typename T2, typename T3, typename T4\n , typename T5, typename T6, typename T7, typename T8, typename T9\n , typename T10, typename T11, typename T12, typename T13, typename T14\n , typename T15, typename T16, typename T17, typename T18, typename T19\n , typename T20, typename T21, typename T22, typename T23, typename T24\n , typename T25, typename T26, typename T27, typename T28, typename T29\n , typename T30, typename T31, typename T32, typename T33, typename T34\n , typename T35, typename T36, typename T37, typename T38, typename T39\n , typename T40, typename T41, typename T42, typename T43, typename T44\n , typename T45, typename T46, typename T47, typename T48, typename T49\n >\nstruct set50\n : s_item<\n T49\n , typename set49< T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11\n , T12, T13, T14, T15, T16, T17, T18, T19, T20, T21, T22, T23, T24, T25\n , T26, T27, T28, T29, T30, T31, T32, T33, T34, T35, T36, T37, T38, T39\n , T40, T41, T42, T43, T44, T45, T46, T47, T48 >::item_\n >\n{\n typedef set50 type;\n};\n\n}}\n"} +{"text": "5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n2 \n2 \n2 \n2 \n2 \n2 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n2 \n2 \n2 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n2 \n2 \n2 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n2 \n2 \n2 \n2 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n2 \n2 \n2 \n2 \n2 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n2 \n2 \n2 \n2 \n2 \n2 \n2 \n2 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n2 \n2 \n2 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n5 \n"} +{"text": "#!/usr/bin/env bash\nset -e\n\nif [ ! -e cid ]; then\n echo \"'cid' file is absent, Docker container is not running\"\n exit\nfi\n\ncid=$(cat cid)\nif docker ps -qa --no-trunc | grep --quiet \"${cid}\"; then\n docker stop \"${cid}\"\n docker kill \"${cid}\"\n rm -f cid\nfi\n"} +{"text": "/*\n * Copyright 2020, Seqera Labs\n * Copyright 2013-2019, Centre for Genomic Regulation (CRG)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage nextflow.extension\n\n\nimport static nextflow.extension.DataflowHelper.*\nimport static nextflow.splitter.SplitterFactory.*\nimport static nextflow.util.CheckHelper.*\n\nimport java.lang.reflect.Modifier\nimport java.util.concurrent.atomic.AtomicInteger\n\nimport groovy.runtime.metaclass.DelegatingPlugin\nimport groovy.transform.CompileStatic\nimport groovy.transform.PackageScope\nimport groovy.util.logging.Slf4j\nimport groovyx.gpars.dataflow.DataflowBroadcast\nimport groovyx.gpars.dataflow.DataflowReadChannel\nimport groovyx.gpars.dataflow.DataflowVariable\nimport groovyx.gpars.dataflow.DataflowWriteChannel\nimport groovyx.gpars.dataflow.expression.DataflowExpression\nimport groovyx.gpars.dataflow.operator.ChainWithClosure\nimport groovyx.gpars.dataflow.operator.ControlMessage\nimport groovyx.gpars.dataflow.operator.CopyChannelsClosure\nimport groovyx.gpars.dataflow.operator.DataflowEventAdapter\nimport groovyx.gpars.dataflow.operator.DataflowProcessor\nimport groovyx.gpars.dataflow.operator.PoisonPill\nimport nextflow.Channel\nimport nextflow.Global\nimport nextflow.NF\nimport nextflow.Session\nimport nextflow.script.ChannelOut\nimport nextflow.script.TokenBranchDef\nimport nextflow.script.TokenMultiMapDef\nimport nextflow.splitter.FastaSplitter\nimport nextflow.splitter.FastqSplitter\nimport nextflow.splitter.TextSplitter\nimport org.codehaus.groovy.runtime.callsite.BooleanReturningMethodInvoker\nimport org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation\n/**\n * A set of operators inspired to RxJava extending the methods available on DataflowChannel\n * data structure\n *\n * See https://github.com/Netflix/RxJava/wiki/Observable\n *\n * @author Paolo Di Tommaso <paolo.ditommaso@gmail.com>\n */\n\n@Slf4j\nclass OperatorEx implements DelegatingPlugin {\n\n static final public OperatorEx instance = new OperatorEx()\n\n private static Session getSession() { Global.getSession() as Session }\n\n final public static Set<String> OPERATOR_NAMES\n\n static {\n OPERATOR_NAMES = getDeclaredExtensionMethods0()\n log.trace \"Dataflow extension methods: ${OPERATOR_NAMES.sort().join(',')}\"\n }\n\n @CompileStatic\n static private Set<String> getDeclaredExtensionMethods0() {\n def result = new HashSet<String>(30)\n def methods = OperatorEx.class.getDeclaredMethods()\n for( def handle : methods ) {\n if( !Modifier.isPublic(handle.getModifiers()) ) continue\n if( Modifier.isStatic(handle.getModifiers()) ) continue\n def params=handle.getParameterTypes()\n if( params.length>0 && isReadChannel(params[0]) )\n result.add(handle.name)\n }\n return result\n }\n\n @CompileStatic\n static boolean isReadChannel(Class clazz) {\n DataflowReadChannel.class.isAssignableFrom(clazz)\n }\n\n @CompileStatic\n boolean isExtensionMethod(Object obj, String name) {\n if( obj instanceof DataflowReadChannel || obj instanceof DataflowBroadcast || obj instanceof ChannelOut ) {\n return OPERATOR_NAMES.contains(name)\n }\n return false\n }\n\n\n @CompileStatic\n Object invokeExtensionMethod(Object channel, String method, Object[] args) {\n new OpCall(this,channel,method,args).call()\n }\n\n /**\n * Subscribe *onNext* event\n *\n * @param source\n * @param closure\n * @return\n */\n DataflowReadChannel subscribe(final DataflowReadChannel source, final Closure closure) {\n subscribeImpl( source, [onNext: closure] )\n return source\n }\n\n /**\n * Subscribe *onNext*, *onError* and *onComplete*\n *\n * @param source\n * @param closure\n * @return\n */\n DataflowReadChannel subscribe(final DataflowReadChannel source, final Map<String,Closure> events ) {\n subscribeImpl(source, events)\n return source\n }\n\n /**\n * Chain operator, this is a synonym of {@code DataflowReadChannel.chainWith}\n *\n * @param source\n * @param closure\n * @return\n */\n DataflowWriteChannel chain(final DataflowReadChannel<?> source, final Closure closure) {\n final target = CH.createBy(source)\n newOperator(source, target, new ChainWithClosure(closure))\n return target\n }\n\n /**\n * Chain operator, this is a synonym of {@code DataflowReadChannel.chainWith}\n *\n * @param source\n * @param closure\n * @return\n */\n DataflowWriteChannel chain(final DataflowReadChannel<?> source, final Map<String, Object> params, final Closure closure) {\n final target = CH.createBy(source)\n chainImpl(source, target, params, closure)\n return target;\n }\n\n /**\n * Transform the items emitted by a channel by applying a function to each of them\n *\n * @param channel\n * @param closure\n * @return\n */\n DataflowWriteChannel map(final DataflowReadChannel source, final Closure closure) {\n assert source != null\n assert closure\n return new MapOp(source, closure).apply()\n }\n\n /**\n * Transform the items emitted by a channel by applying a function to each of them and then flattens the results of that function.\n *\n * @param source The source channel\n * @param closure The closure mapping the values emitted by the source channel\n * @return The channel emitting the mapped values\n */\n DataflowWriteChannel flatMap(final DataflowReadChannel<?> source, final Closure closure=null) {\n assert source != null\n\n final target = CH.create()\n final listener = stopErrorListener(source,target)\n\n newOperator(source, target, listener) { item ->\n\n def result = closure != null ? closure.call(item) : item\n def proc = ((DataflowProcessor) getDelegate())\n\n switch( result ) {\n case Collection:\n result.each { it -> proc.bindOutput(it) }\n break\n\n case (Object[]):\n result.each { it -> proc.bindOutput(it) }\n break\n\n case Map:\n result.each { it -> proc.bindOutput(it) }\n break\n\n case Map.Entry:\n proc.bindOutput( (result as Map.Entry).key )\n proc.bindOutput( (result as Map.Entry).value )\n break\n\n case Channel.VOID:\n break\n\n default:\n proc.bindOutput(result)\n }\n }\n\n return target\n }\n\n /**\n *\n * The reduce( ) operator applies a function of your choosing to the first item emitted by a source channel,\n * then feeds the result of that function along with the second item emitted by the source channel into the same\n * function, then feeds the result of that function along with the third item into the same function, and so on until\n * all items have been emitted by the source channel.\n *\n * Finally it emits the final result from the final call to your function as the sole output from the returned channel.\n *\n * @param source\n * @param closure\n * @return\n */\n DataflowWriteChannel reduce(final DataflowReadChannel source, final Closure closure) {\n if( source instanceof DataflowExpression )\n throw new IllegalArgumentException('Operator `reduce` cannot be applied to a value channel')\n\n final target = new DataflowVariable()\n reduceImpl( source, target, null, closure )\n return target\n }\n\n /**\n *\n * The reduce( ) operator applies a function of your choosing to the first item emitted by a source channel,\n * then feeds the result of that function along with the second item emitted by the source channel into the same\n * function, then feeds the result of that function along with the third item into the same function, and so on until\n * all items have been emitted by the source channel.\n *\n * Finally it emits the final result from the final call to your function as the sole output from the returned channel.\n *\n * @param source\n * @parama seed\n * @param closure\n * @return\n */\n DataflowWriteChannel reduce(final DataflowReadChannel<?> source, Object seed, final Closure closure) {\n if( source instanceof DataflowExpression )\n throw new IllegalArgumentException('Operator `reduce` cannot be applied to a value channel')\n\n final target = new DataflowVariable()\n reduceImpl( source, target, seed, closure )\n return target\n }\n\n DataflowWriteChannel collectFile( final DataflowReadChannel source, final Closure closure = null ) {\n final result = new CollectFileOp(source, null, closure).apply()\n return result\n }\n\n DataflowWriteChannel collectFile( final DataflowReadChannel source, Map params, final Closure closure = null ) {\n def result = new CollectFileOp(source, params, closure).apply()\n return result\n }\n\n DataflowWriteChannel groupTuple( final DataflowReadChannel source, final Map params=null ) {\n def result = new GroupTupleOp(params, source).apply()\n return result\n }\n\n /**\n * Iterates over the collection of items and returns each item that matches the given filter\n * by calling the {@code Object#isCase}method used by switch statements.\n *\n * This method can be used with different kinds of filters like regular expressions, classes, ranges etc. Example:\n *\n * def list = ['a', 'b', 'aa', 'bc', 3, 4.5]\n * assert list.filter( ~/a+/ ) == ['a', 'aa']\n * assert list.filter( ~/../ ) == ['aa', 'bc']\n * assert list.filter( Number ) == [ 3, 4.5 ]\n * assert list.filter{ it.toString().size() == 1 } == [ 'a', 'b', 3 ]\n *\n * @param channel\n * @param criteria\n * @return\n */\n DataflowWriteChannel filter(final DataflowReadChannel source, final Object criteria) {\n def discriminator = new BooleanReturningMethodInvoker(\"isCase\");\n\n def target = CH.createBy(source)\n if( source instanceof DataflowExpression ) {\n source.whenBound {\n def result = it instanceof ControlMessage ? false : discriminator.invoke(criteria, (Object)it)\n target.bind( result ? it : Channel.STOP )\n }\n }\n else {\n newOperator(source, target, {\n def result = discriminator.invoke(criteria, (Object)it)\n if( result ) target.bind(it)\n })\n }\n\n return target\n }\n\n DataflowWriteChannel filter(DataflowReadChannel source, final Closure<Boolean> closure) {\n def target = CH.createBy(source)\n if( source instanceof DataflowExpression ) {\n source.whenBound {\n def result = it instanceof ControlMessage ? false : DefaultTypeTransformation.castToBoolean(closure.call(it))\n target.bind( result ? it : Channel.STOP )\n }\n }\n else {\n newOperator(source, target, {\n def result = DefaultTypeTransformation.castToBoolean(closure.call(it))\n if( result ) target.bind(it)\n })\n }\n\n return target\n }\n\n DataflowWriteChannel until(DataflowReadChannel source, final Closure<Boolean> closure) {\n def target = CH.createBy(source)\n newOperator(source, target, {\n final result = DefaultTypeTransformation.castToBoolean(closure.call(it))\n final proc = ((DataflowProcessor) getDelegate())\n\n if( result ) {\n proc.bindOutput(Channel.STOP)\n proc.terminate()\n }\n else {\n proc.bindOutput(it)\n }\n })\n\n return target\n }\n\n\n /**\n * Modifies this collection to remove all duplicated items, using the default comparator.\n *\n * assert [1,3] == [1,3,3].unique()\n *\n * @param source\n * @return\n */\n DataflowWriteChannel unique(final DataflowReadChannel source) {\n unique(source) { it }\n }\n\n /**\n * A convenience method for making a collection unique using a Closure to determine duplicate (equal) items. If the closure takes a single parameter, the argument passed will be each element, and the closure should return a value used for comparison (either using Comparable#compareTo or Object#equals). If the closure takes two parameters, two items from the collection will be passed as arguments, and the closure should return an int value (with 0 indicating the items are not unique).\n * assert [1,4] == [1,3,4,5].unique { it % 2 }\n * assert [2,3,4] == [2,3,3,4].unique { a, b -> a <=> b }\n *\n * @param source\n * @param comparator\n * @return\n */\n DataflowWriteChannel unique(final DataflowReadChannel source, Closure comparator ) {\n\n def history = [:]\n def target = CH.createBy(source)\n\n // when the operator stop clear the history map\n def events = new DataflowEventAdapter() {\n void afterStop(final DataflowProcessor processor) {\n history.clear()\n history = null\n }\n }\n\n def filter = {\n def key = comparator.call(it)\n if( history.containsKey(key) ) {\n return Channel.VOID\n }\n else {\n history.put(key,true)\n return it\n }\n } as Closure\n\n // filter removing all duplicates\n chainImpl(source, target, [listeners: [events]], filter )\n\n return target\n }\n\n /**\n * Suppress duplicate consecutive items emitted by the source Observable\n *\n * See https://github.com/Netflix/RxJava/wiki/Filtering-Observables#suppress-duplicate-consecutive-items-emitted-by-the-source-observable\n *\n *\n * @return\n */\n DataflowWriteChannel distinct( final DataflowReadChannel source ) {\n distinct(source) {it}\n }\n\n /**\n * suppress duplicate consecutive items emitted by the source Observable\n *\n * See https://github.com/Netflix/RxJava/wiki/Filtering-Observables#suppress-duplicate-consecutive-items-emitted-by-the-source-observable\n *\n * @return\n */\n DataflowWriteChannel distinct( final DataflowReadChannel source, Closure comparator ) {\n\n def previous = null\n final target = CH.createBy(source)\n Closure filter = { it ->\n\n def key = comparator.call(it)\n if( key == previous ) {\n return Channel.VOID\n }\n previous = key\n return it\n }\n\n chainImpl(source, target, [:], filter)\n\n return target\n }\n\n /**\n *\n * Emit only the first item emitted by a channel, or the first item that meets some condition\n *\n * See https://github.com/Netflix/RxJava/wiki/Filtering-Observables#first\n *\n * @param source\n * @return\n */\n DataflowWriteChannel first( DataflowReadChannel source ) {\n if( source instanceof DataflowExpression ) {\n def msg = \"The operator `first` is useless when applied to a value channel which returns a single value by definition\"\n def name = NF.lookupVariable(source)\n if( name )\n msg += \" -- check channel `$name`\"\n log.warn msg\n }\n\n def target = new DataflowVariable()\n source.whenBound { target.bind(it) }\n return target\n }\n\n /**\n *\n * Emit only the first item emitted by a channel, or the first item that meets some condition\n *\n * See https://github.com/Netflix/RxJava/wiki/Filtering-Observables#first\n *\n * @param source\n * @return\n */\n DataflowWriteChannel first( final DataflowReadChannel source, Object criteria ) {\n\n def target = new DataflowVariable()\n def discriminator = new BooleanReturningMethodInvoker(\"isCase\");\n\n if( source instanceof DataflowExpression ) {\n source.whenBound {\n def result = it instanceof ControlMessage ? false : discriminator.invoke(criteria, it)\n target.bind( result ? it : Channel.STOP )\n }\n }\n else {\n newOperator([source],[]) {\n if( discriminator.invoke(criteria, it) ) {\n target.bind(it)\n ((DataflowProcessor) getDelegate()).terminate()\n }\n }\n }\n\n return target\n }\n\n /**\n *\n * emit only the first n items emitted by an Observable\n *\n * See https://github.com/Netflix/RxJava/wiki/Filtering-Observables#take\n *\n * @param source\n * @param n The number of items to be taken. The value {@code -1} has a special semantic for all\n * @return The resulting channel emitting the taken values\n */\n DataflowWriteChannel take( final DataflowReadChannel source, int n ) {\n if( source instanceof DataflowExpression )\n throw new IllegalArgumentException(\"Operator `take` cannot be applied to a value channel\")\n\n def count = 0\n final target = CH.create()\n\n if( n==0 ) {\n target.bind(Channel.STOP)\n return target\n }\n\n final listener = new DataflowEventAdapter() {\n @Override\n void afterRun(final DataflowProcessor processor, final List<Object> messages) {\n if( ++count >= n ) {\n processor.bindOutput( Channel.STOP )\n processor.terminate()\n }\n }\n\n boolean onException(final DataflowProcessor processor, final Throwable e) {\n OperatorEx.log.error(\"@unknown\", e)\n session.abort(e)\n return true;\n }\n }\n\n newOperator(\n inputs: [source],\n outputs: [target],\n listeners: (n > 0 ? [listener] : []),\n new ChainWithClosure(new CopyChannelsClosure()))\n\n return target\n }\n\n /**\n * The last operator creates a channel that only returns the last item emitted by the source channel\n *\n * @param source The source channel\n * @return A {@code DataflowVariable} emitting the `last` item in the channel\n */\n DataflowWriteChannel last( final DataflowReadChannel source ) {\n\n def target = new DataflowVariable()\n def last = null\n subscribeImpl( source, [onNext: { last = it }, onComplete: { target.bind(last) }] )\n return target\n }\n\n DataflowWriteChannel collect(final DataflowReadChannel source, Closure action=null) {\n collect(source,Collections.emptyMap(),action)\n }\n\n DataflowWriteChannel collect(final DataflowReadChannel source, Map opts, Closure action=null) {\n final target = new CollectOp(source,action,opts).apply()\n return target\n }\n\n\n /**\n * Convert a {@code DataflowQueue} alias *channel* to a Java {@code List}\n *\n * @param source The channel to be converted\n * @return A list holding all the items send over the channel\n */\n DataflowWriteChannel toList(final DataflowReadChannel source) {\n final target = ToListOp.apply(source)\n return target\n }\n\n /**\n * Convert a {@code DataflowReadChannel} alias *channel* to a Java {@code List} sorting its content\n *\n * @param source The channel to be converted\n * @return A list holding all the items send over the channel\n */\n DataflowWriteChannel toSortedList(final DataflowReadChannel source, Closure closure = null) {\n final target = new ToListOp(source, closure ?: true).apply()\n return target as DataflowVariable\n }\n\n /**\n * Counts the number of occurrences of the given value inside this collection.\n *\n * @param source\n * @param value\n * @return\n */\n DataflowWriteChannel count(final DataflowReadChannel source ) {\n final target = count0(source, null)\n return target\n }\n\n /**\n * Counts the number of occurrences which satisfy the given closure from inside this collection\n *\n * @param source\n * @param criteria\n * @return\n */\n DataflowWriteChannel count(final DataflowReadChannel source, final Object criteria ) {\n final target = count0(source, criteria)\n return target\n }\n\n private static DataflowVariable count0(DataflowReadChannel<?> source, Object criteria) {\n\n final target = new DataflowVariable()\n final discriminator = criteria != null ? new BooleanReturningMethodInvoker(\"isCase\") : null\n\n if( source instanceof DataflowExpression) {\n source.whenBound { item ->\n discriminator == null || discriminator.invoke(criteria, item) ? target.bind(1) : target.bind(0)\n }\n }\n else {\n reduceImpl(source, target, 0) { current, item ->\n discriminator == null || discriminator.invoke(criteria, item) ? current+1 : current\n }\n }\n\n return target\n }\n\n\n /**\n * Groups the items emitted by the source channel into groups determined by the supplied mapping closure and counts the frequency of the created groups\n * @param source The source channel\n * @return A {@code DataflowVariable} returning the a {@code Map} containing the counting values for each key\n */\n @Deprecated\n DataflowWriteChannel<Map> countBy(final DataflowReadChannel source ) {\n countBy(source, { it })\n }\n\n /**\n * Sorts all collection members into groups determined by the supplied mapping closure and counts the group size\n *\n * @param source\n * @param criteria\n * @return\n */\n @Deprecated\n DataflowWriteChannel<Map> countBy(final DataflowReadChannel source, final Closure criteria ) {\n\n final target = new DataflowVariable()\n\n reduceImpl(source, target, [:]) { Map map, item ->\n def key = criteria.call(item)\n def value = map.containsKey(key) ? map.get(key)+1 : 1\n map.put(key, value)\n return map\n }\n\n return target\n }\n\n /**\n * The min operator waits until the source channel completes, and then emits the value that had the lowest value\n *\n * @param source The source channel\n * @return A {@code DataflowVariable} returning the minimum value\n */\n DataflowWriteChannel min(final DataflowReadChannel source) {\n final target = new DataflowVariable()\n reduceImpl(source, target, null) { min, val -> val<min ? val : min }\n return target\n }\n\n /**\n * The min operator waits until the source channel completes, and then emits the value that had the lowest value\n *\n * @param source The source channel\n * @param comparator If the closure has two parameters it is used like a traditional Comparator. I.e. it should compare\n * its two parameters for order, returning a negative integer, zero, or a positive integer when the first parameter\n * is less than, equal to, or greater than the second respectively. Otherwise, the Closure is assumed to take a single\n * parameter and return a Comparable (typically an Integer) which is then used for further comparison.\n * @return A {@code DataflowVariable} returning the minimum value\n */\n DataflowWriteChannel min(final DataflowReadChannel source, Closure comparator) {\n\n def action\n if( comparator.getMaximumNumberOfParameters() == 1 ) {\n action = (Closure){ min, item -> comparator.call(item) < comparator.call(min) ? item : min }\n }\n else if( comparator.getMaximumNumberOfParameters() == 2 ) {\n action = (Closure){ a, b -> comparator.call(a,b) < 0 ? a : b }\n }\n\n final target = new DataflowVariable()\n reduceImpl(source, target, null, action)\n return target\n }\n\n /**\n * The min operator waits until the source channel completes, and then emits the value that had the lowest value\n *\n * @param source The source channel\n * @param comparator The a {@code Comparator} object\n * @return A {@code DataflowVariable} returning the minimum value\n */\n DataflowWriteChannel min(final DataflowReadChannel source, Comparator comparator) {\n final target = new DataflowVariable()\n reduceImpl(source, target, null) { a, b -> comparator.compare(a,b)<0 ? a : b }\n return target\n }\n\n /**\n * The max operator waits until the source channel completes, and then emits the value that had the greatest value.\n *\n * @param source The source channel\n * @return A {@code DataflowVariable} emitting the maximum value\n */\n DataflowWriteChannel max(final DataflowReadChannel source) {\n final target = new DataflowVariable()\n reduceImpl(source,target, null) { max, val -> val>max ? val : max }\n return target\n }\n\n /**\n * The max operator waits until the source channel completes, and then emits the value that had the greatest value.\n *\n * @param source The source channel\n * @param comparator If the closure has two parameters it is used like a traditional Comparator. I.e. it should compare\n * its two parameters for order, returning a negative integer, zero, or a positive integer when the first parameter is\n * less than, equal to, or greater than the second respectively. Otherwise, the Closure is assumed to take a single\n * parameter and return a Comparable (typically an Integer) which is then used for further comparison\n * @return A {@code DataflowVariable} emitting the maximum value\n */\n DataflowWriteChannel max(final DataflowReadChannel source, Closure comparator) {\n\n def action\n if( comparator.getMaximumNumberOfParameters() == 1 ) {\n action = (Closure){ max, item -> comparator.call(item) > comparator.call(max) ? item : max }\n }\n else if( comparator.getMaximumNumberOfParameters() == 2 ) {\n action = (Closure){ a, b -> comparator.call(a,b)>0 ? a : b }\n }\n else {\n throw new IllegalArgumentException(\"Comparator closure can accept at most 2 arguments\")\n }\n\n final target = new DataflowVariable()\n reduceImpl(source, target, null, action)\n return target\n }\n\n /**\n * The max operator waits until the source channel completes, and then emits the value that had the greatest value.\n *\n * @param source The source channel\n * @param comparator A {@code Comparator} object\n * @return A {@code DataflowVariable} emitting the maximum value\n */\n DataflowVariable max(final DataflowReadChannel source, Comparator comparator) {\n final target = new DataflowVariable()\n reduceImpl(source, target, null) { a, b -> comparator.compare(a,b)>0 ? a : b }\n return target\n }\n\n /**\n * The sum operators crates a channel that emits the sum of all values emitted by the source channel to which is applied\n *\n * @param source The source channel providing the values to sum\n * @param closure A closure that given an entry returns the value to sum\n * @return A {@code DataflowVariable} emitting the final sum value\n */\n DataflowWriteChannel sum(final DataflowReadChannel source, Closure closure = null) {\n\n def target = new DataflowVariable()\n def aggregate = new Aggregate(name: 'sum', action: closure)\n subscribeImpl(source, [onNext: aggregate.&process, onComplete: { target.bind( aggregate.result ) }])\n return target\n }\n\n\n DataflowWriteChannel mean(final DataflowReadChannel source, Closure closure = null) {\n\n def target = new DataflowVariable()\n def aggregate = new Aggregate(name: 'mean', action: closure, mean: true)\n subscribeImpl(source, [onNext: aggregate.&process, onComplete: { target.bind( aggregate.result ) }])\n return target\n }\n\n\n private static class Aggregate {\n\n def accum\n long count = 0\n boolean mean\n Closure action\n String name\n\n def process(it) {\n if( it == null || it == Channel.VOID )\n return\n\n count++\n\n def item = action != null ? action.call(it) : it\n if( accum == null )\n accum = item\n\n else if( accum instanceof Number )\n accum += item\n\n else if( accum instanceof List && item instanceof List)\n for( int i=0; i<accum.size() && i<item.size(); i++ )\n accum[i] += item.get(i)\n\n else\n throw new IllegalArgumentException(\"Invalid `$name` item: $item [${item.class.simpleName}]\")\n }\n\n def getResult() {\n if( !mean || count == 0 )\n return accum\n\n if( accum instanceof List )\n return accum.collect { it / count }\n else\n return accum / count\n }\n }\n\n /**\n * Sorts all collection members into groups determined by the supplied mapping closure\n *\n * @param source\n * @param mapper\n * @return\n */\n @Deprecated\n DataflowWriteChannel<Map> groupBy(final DataflowReadChannel source, final params = null ) {\n int index = 0\n Closure mapper = DEFAULT_MAPPING_CLOSURE\n\n if( params instanceof Closure )\n mapper = params\n\n else if( params instanceof Number ) {\n index = params as int\n }\n else if( params != null ) {\n throw new IllegalArgumentException(\"Not a valid `group` argument: $params\")\n }\n\n final target = new DataflowVariable()\n final int len = mapper.getMaximumNumberOfParameters()\n reduceImpl(source, target, [:]) { Map map, item ->\n def key = len == 2 ? mapper.call(item,index) : mapper.call(item)\n def list = map.get(key)\n list = list ? list << item : [item]\n map.put(key, list)\n return map\n }\n\n return target\n }\n\n @Deprecated\n DataflowWriteChannel spread( final DataflowReadChannel source, Object other ) {\n\n final target = CH.create()\n\n def inputs\n switch(other) {\n case DataflowExpression:\n inputs = other\n break\n case DataflowReadChannel:\n inputs = ToListOp.apply((DataflowReadChannel)other);\n break\n case Collection:\n inputs = Channel.value(other)\n OpCall.current.get().inputs.add(inputs)\n break\n case (Object[]):\n inputs = Channel.value(other as List)\n OpCall.current.get().inputs.add(inputs)\n break\n default:\n throw new IllegalArgumentException(\"Not a valid argument for 'spread' operator [${other?.class?.simpleName}]: ${other} -- Use a Collection or a channel instead. \")\n }\n\n final stopOnFirst = source instanceof DataflowExpression\n final listener = new DataflowEventAdapter() {\n @Override\n void afterRun(DataflowProcessor processor, List<Object> messages) {\n if( !stopOnFirst ) return\n processor.terminate()\n target.bind(Channel.STOP)\n }\n\n @Override\n boolean onException(final DataflowProcessor processor, final Throwable e) {\n OperatorEx.log.error(\"@unknown\", e)\n session.abort(e)\n return true;\n }\n }\n\n final params = [:]\n params.inputs = [source, inputs]\n params.outputs = [target]\n params.listeners = [listener]\n\n newOperator(params) { a, b ->\n def proc = ((DataflowProcessor) getDelegate())\n def left = [a]\n def right = (b instanceof List ? b : [b])\n [left, right]\n .combinations()\n .each{ Collection it -> proc.bindOutput(it.flatten()) }\n }\n\n return target\n }\n\n DataflowWriteChannel combine( DataflowReadChannel left, Object right ) {\n combine(left, null, right)\n }\n\n DataflowWriteChannel combine( DataflowReadChannel left, Map params, Object right ) {\n checkParams('combine', params, [flat:Boolean, by: [List,Integer]])\n\n final op = new CombineOp(left,right)\n OpCall.current.get().inputs.addAll(op.inputs)\n if( params?.by != null ) op.pivot = params.by\n final target = op.apply()\n return target\n }\n\n DataflowWriteChannel flatten( final DataflowReadChannel source ) {\n\n final listeners = []\n final target = CH.create()\n\n if( source instanceof DataflowExpression ) {\n listeners << new DataflowEventAdapter() {\n @Override\n void afterRun(final DataflowProcessor processor, final List<Object> messages) {\n processor.bindOutput( Channel.STOP )\n processor.terminate()\n }\n\n boolean onException(final DataflowProcessor processor, final Throwable e) {\n OperatorEx.log.error(\"@unknown\", e)\n session.abort(e)\n return true;\n }\n }\n }\n\n\n newOperator(inputs: [source], outputs: [target], listeners: listeners) { item ->\n\n def proc = ((DataflowProcessor) getDelegate())\n switch( item ) {\n case Collection:\n ((Collection)item).flatten().each { value -> proc.bindOutput(value) }\n break\n\n case (Object[]):\n ((Collection)item).flatten().each { value -> proc.bindOutput(value) }\n break\n\n case Channel.VOID:\n break\n\n default:\n proc.bindOutput(item)\n }\n }\n\n return target\n }\n\n /**\n * The ``buffer( )`` operator gathers the items emitted by the source channel into bundles and\n * and emits these bundles as its own emissions.\n *\n * @param source The dataflow channel from where the values are gathered\n * @param closingCriteria A condition that has to be verified to close\n * @return A newly created dataflow queue which emitted the gathered values as bundles\n */\n DataflowWriteChannel buffer( final DataflowReadChannel source, Map params=null, Object closingCriteria ) {\n\n def target = new BufferOp(source)\n .setParams(params)\n .setCloseCriteria(closingCriteria)\n .apply()\n return target\n }\n\n DataflowWriteChannel buffer( final DataflowReadChannel source, Object startingCriteria, Object closingCriteria ) {\n assert startingCriteria != null\n assert closingCriteria != null\n\n def target = new BufferOp(source)\n .setStartCriteria(startingCriteria)\n .setCloseCriteria(closingCriteria)\n .apply()\n\n return target\n }\n\n DataflowWriteChannel buffer( DataflowReadChannel source, Map<String,?> params ) {\n checkParams( 'buffer', params, 'size','skip','remainder' )\n\n def target = new BufferOp(source)\n .setParams(params)\n .apply()\n\n return target\n }\n\n\n DataflowWriteChannel collate( DataflowReadChannel source, int size, boolean keepRemainder = true ) {\n if( size <= 0 ) {\n throw new IllegalArgumentException(\"Illegal argument 'size' for operator 'collate' -- it must be greater than zero: $size\")\n }\n\n def target = new BufferOp(source)\n .setParams( size: size, remainder: keepRemainder )\n .apply()\n\n return target\n }\n\n DataflowWriteChannel collate( DataflowReadChannel source, int size, int step, boolean keepRemainder = true ) {\n if( size <= 0 ) {\n throw new IllegalArgumentException(\"Illegal argument 'size' for operator 'collate' -- it must be greater than zero: $size\")\n }\n\n if( step <= 0 ) {\n throw new IllegalArgumentException(\"Illegal argument 'step' for operator 'collate' -- it must be greater than zero: $step\")\n }\n\n // the result queue\n final target = CH.create()\n\n // the list holding temporary collected elements\n List<List<?>> allBuffers = []\n\n // -- intercepts the PoisonPill and sent out the items remaining in the buffer when the 'remainder' flag is true\n def listener = new DataflowEventAdapter() {\n\n Object controlMessageArrived(final DataflowProcessor processor, final DataflowReadChannel<Object> channel, final int index, final Object message) {\n if( message instanceof PoisonPill && keepRemainder && allBuffers.size() ) {\n allBuffers.each {\n target.bind( it )\n }\n }\n\n return message;\n }\n\n @Override\n boolean onException(DataflowProcessor processor, Throwable e) {\n OperatorEx.log.error(\"@unknown\", e)\n session.abort(e)\n return true\n }\n }\n\n\n int index = 0\n\n // -- the operator collecting the elements\n newOperator( inputs: [source], outputs: [target], listeners: [listener]) {\n\n if( index++ % step == 0 ) {\n allBuffers.add( [] )\n }\n\n allBuffers.each { List list -> list.add(it) }\n\n def buf = allBuffers.head()\n if( buf.size() == size ) {\n ((DataflowProcessor) getDelegate()).bindOutput(buf)\n allBuffers = allBuffers.tail()\n }\n\n }\n\n return target\n }\n\n\n /**\n * Similar to https://github.com/Netflix/RxJava/wiki/Combining-Observables#merge\n *\n * @param source\n * @param others\n * @return\n */\n DataflowWriteChannel mix( DataflowReadChannel source, DataflowReadChannel[] others ) {\n if( others.size()==0 )\n throw new IllegalArgumentException(\"Operator 'mix' should have at least one right operand\")\n\n def target = CH.create()\n def count = new AtomicInteger( others.size()+1 )\n def handlers = [\n onNext: { target << it },\n onComplete: { if(count.decrementAndGet()==0) { target << Channel.STOP } }\n ]\n\n subscribeImpl(source, handlers)\n for( def it : others ) {\n subscribeImpl(it, handlers)\n }\n\n def allSources = [source]\n allSources.addAll(others)\n\n return target\n }\n\n DataflowWriteChannel join( DataflowReadChannel left, right ) {\n if( right==null ) throw new IllegalArgumentException(\"Operator `join` argument cannot be null\")\n if( !(right instanceof DataflowReadChannel) ) throw new IllegalArgumentException(\"Invalid operator `join` argument [${right.getClass().getName()}] -- it must be a channel type\")\n // due to issue #582 the right channel cannot be provided in the join method signature\n // therefore the channel need to be added `'manually` to the inputs list\n // fixes #1346\n OpCall.current.get().inputs.add(right)\n def target = new JoinOp(left,right) .apply()\n return target\n }\n\n DataflowWriteChannel join( DataflowReadChannel left, Map opts, right ) {\n if( right==null ) throw new IllegalArgumentException(\"Operator `join` argument cannot be null\")\n if( !(right instanceof DataflowReadChannel) ) throw new IllegalArgumentException(\"Invalid operator `join` argument [${right.getClass().getName()}] -- it must be a channel type\")\n // due to issue #582 the right channel cannot be provided in the join method signature\n // therefore the channel need to be added `'manually` to the inputs list\n // fixes #1346\n OpCall.current.get().inputs.add(right)\n def target = new JoinOp(left,right,opts) .apply()\n return target\n }\n\n\n /**\n * Phase channels\n *\n * @param source\n * @param other\n * @param mapper\n * @return\n */\n DataflowWriteChannel phase( DataflowReadChannel source, Map opts, DataflowReadChannel other, Closure mapper = null ) {\n\n def target = new PhaseOp(source,other)\n .setMapper(mapper)\n .setOpts(opts)\n .apply()\n\n return target\n }\n\n DataflowWriteChannel phase( DataflowReadChannel source, DataflowReadChannel other, Closure mapper = null ) {\n\n def target = new PhaseOp(source,other)\n .setMapper(mapper)\n .apply()\n\n return target\n }\n\n /**\n * Implements the default mapping strategy, having the following strategy:\n * <pre>\n * Map -> first entry key\n * Map.Entry -> the entry key\n * Collection -> first item\n * Array -> first item\n * Object -> the object itself\n * </pre>\n * @param obj\n * @return\n */\n\n @PackageScope\n static public Closure DEFAULT_MAPPING_CLOSURE = { obj, int index=0 ->\n\n switch( obj ) {\n\n case List:\n def values = (List)obj\n return values.size() ? values.get(index) : null\n\n case (Object[]):\n def values = (Object[])obj\n return values.size() ? values[index] : null\n\n case Map:\n obj = ((Map)obj).values()\n // note: fallback into the following case\n\n case Collection:\n def itr = ((Collection)obj) .iterator()\n def count=0\n while( itr.hasNext() ) {\n def value = itr.next()\n if( count++ == index ) return value\n }\n return null\n\n case Map.Entry:\n def entry = (Map.Entry) obj\n return (index == 0 ? entry.key :\n index == 1 ? entry.value : null)\n\n default:\n return index==0 ? obj : null\n }\n\n }\n\n\n DataflowWriteChannel cross( DataflowReadChannel source, DataflowReadChannel other, Closure mapper = null ) {\n\n def target = new CrossOp(source, other)\n .setMapper(mapper)\n .apply()\n\n return target\n }\n\n\n /**\n * Creates a channel that emits the items in same order as they are emitted by two or more channel\n *\n * @param source\n * @param others\n * @return\n */\n DataflowWriteChannel concat( DataflowReadChannel source, DataflowReadChannel... others ) {\n\n def target = new ConcatOp(source, others).apply()\n\n def allSources = [source]\n if(others) allSources.addAll(others)\n\n return target\n }\n\n\n /**\n * When the items emitted by the source channel are tuples of values, the operator separate allows you to specify a\n * list of channels as parameters, so that the value i-th in a tuple will be assigned to the target channel\n * with the corresponding position index.\n *\n * @param source The source channel\n * @param outputs An open array of target channels\n */\n @DeprecatedDsl2\n void separate( DataflowReadChannel source, final DataflowWriteChannel... outputs ) {\n new SeparateOp(source, outputs as List<DataflowWriteChannel>).apply()\n }\n\n @DeprecatedDsl2\n void separate(final DataflowReadChannel source, final List<DataflowWriteChannel> outputs) {\n new SeparateOp(source, outputs).apply()\n }\n\n @DeprecatedDsl2\n void separate(final DataflowReadChannel source, final List<DataflowWriteChannel> outputs, final Closure<List> code) {\n new SeparateOp(source, outputs, code).apply()\n }\n\n @DeprecatedDsl2\n List<DataflowReadChannel> separate( final DataflowReadChannel source, int n ) {\n def outputs = new SeparateOp(source, n).apply()\n return outputs\n }\n\n @DeprecatedDsl2\n List<DataflowReadChannel> separate( final DataflowReadChannel source, int n, Closure mapper ) {\n def outputs = new SeparateOp(source, n, mapper).apply()\n return outputs\n }\n\n @DeprecatedDsl2\n void into( DataflowReadChannel source, final DataflowWriteChannel... targets ) {\n new IntoOp(source, targets as List<DataflowWriteChannel>).apply()\n }\n\n @DeprecatedDsl2\n List<DataflowReadChannel> into( final DataflowReadChannel source, int n ) {\n def outputs = new IntoOp(source,n).apply().getOutputs()\n return outputs\n }\n\n /**\n * Forward source dataflow channel *into* one or more dataflow channels. For example:\n * <pre>\n * Channel.from( ... )\n * .map { ... }\n * .into { foo; bar }\n * </pre>\n *\n * It creates two new dataflow variables named {@code foo} and {@code bar} and copied the map\n * result into them.\n *\n * @param source The source dataflow channel which items are copied into newly created dataflow variables.\n * @param holder A closure that defines one or more variable names into which source items are copied.\n */\n @DeprecatedDsl2\n void into( DataflowReadChannel source, Closure holder ) {\n def outputs = new IntoOp(source,holder).apply().getOutputs()\n OpCall.current.get().outputs.addAll(outputs)\n }\n\n\n /**\n * Implements a tap that create implicitly a new dataflow variable in the global script context.\n * For example:\n *\n * <pre>\n * Channel.from(...)\n * .tap { newChannelName }\n * .map { ... }\n * </pre>\n *\n * @param source The source dataflow variable\n * @param holder The closure defining the new variable name\n * @return The tap resulting dataflow channel\n */\n DataflowWriteChannel tap( final DataflowReadChannel source, final Closure holder ) {\n def tap = new TapOp(source, holder).apply()\n OpCall.current.get().outputs.addAll( tap.outputs )\n return tap.result\n }\n\n DataflowWriteChannel tap( final DataflowReadChannel source, final DataflowWriteChannel target ) {\n def tap = new TapOp(source, target).apply()\n return tap.result\n }\n\n\n /**\n * Empty the specified value only if the source channel to which is applied is empty i.e. do not emit\n * any value.\n *\n * @param source The channel to which the operator is applied\n * @param value The value to emit when the source channel is empty. If a closure is used the the value returned by its invocation is used.\n * @return The resulting channel emitting the source items or the default value when the channel is empty\n */\n DataflowWriteChannel ifEmpty( DataflowReadChannel source, value ) {\n\n boolean empty = true\n final result = CH.createBy(source)\n final singleton = result instanceof DataflowExpression\n final next = { result.bind(it); empty=false }\n final complete = {\n if(empty)\n result.bind( value instanceof Closure ? value() : value )\n if( !singleton )\n result.bind(Channel.STOP)\n }\n\n subscribeImpl(source, [onNext: next, onComplete: complete])\n\n return result\n }\n\n /**\n * Print the channel content to the console standard output\n * @param source\n * @param closure\n */\n @DeprecatedDsl2(message='Operator `print` is deprecated -- Use `view` instead')\n void print(final DataflowReadChannel<?> source, Closure closure = null) {\n final print0 = { def obj = closure ? closure.call(it) : it; session.printConsole(obj?.toString(),false) }\n subscribeImpl(source, [onNext: print0])\n }\n\n /**\n * Print the channel content to the console standard output\n * @param source\n * @param closure\n */\n @DeprecatedDsl2(message='Operator `println` is deprecated -- Use `view` instead')\n void println(final DataflowReadChannel<?> source, Closure closure = null) {\n final print0 = { def obj = closure ? closure.call(it) : it; session.printConsole(obj?.toString(),true) }\n subscribeImpl(source, [onNext: print0])\n }\n\n\n static private final Map PARAMS_VIEW = [newLine: Boolean]\n\n /**\n * Print out the channel content retuning a new channel emitting the identical content as the original one\n *\n * @param source\n * @param closure\n * @return\n */\n DataflowWriteChannel view(final DataflowReadChannel source, Map opts, Closure closure = null) {\n assert source != null\n checkParams('view', opts, PARAMS_VIEW)\n final newLine = opts.newLine != false\n\n final target = CH.createBy(source);\n final apply = new HashMap<String,Closure>(2)\n\n apply.onNext = {\n final obj = closure != null ? closure.call(it) : it\n session.printConsole(obj?.toString(), newLine)\n target.bind(it)\n }\n\n apply. onComplete = { CH.close0(target) }\n\n subscribeImpl(source,apply)\n return target\n }\n\n DataflowWriteChannel view(final DataflowReadChannel source, Closure closure = null) {\n view(source, Collections.emptyMap(), closure)\n }\n\n void choice(final DataflowReadChannel source, final List<DataflowWriteChannel> outputs, final Closure<Integer> code) {\n new ChoiceOp(source,outputs,code).apply()\n }\n\n // NO DAG\n @DeprecatedDsl2\n DataflowWriteChannel merge(final DataflowReadChannel source, final DataflowReadChannel other, final Closure closure=null) {\n final result = CH.createBy(source)\n final inputs = [source, other]\n final action = closure ? new ChainWithClosure<>(closure) : new DefaultMergeClosure(inputs.size())\n final listener = stopErrorListener(source,result)\n final params = createOpParams(inputs, result, listener)\n newOperator(params, action)\n return result;\n }\n\n // NO DAG\n @DeprecatedDsl2\n DataflowWriteChannel merge(final DataflowReadChannel source, final DataflowReadChannel... others) {\n final result = CH.createBy(source)\n final List<DataflowReadChannel> inputs = new ArrayList<DataflowReadChannel>(1 + others.size())\n inputs.add(source)\n inputs.addAll(others)\n final listener = stopErrorListener(source,result)\n final params = createOpParams(inputs, result, listener)\n newOperator(params, new DefaultMergeClosure(1 + others.size()))\n return result;\n }\n\n // NO DAG\n @DeprecatedDsl2\n DataflowWriteChannel merge(final DataflowReadChannel source, final List<DataflowReadChannel> others, final Closure closure=null) {\n final result = CH.createBy(source)\n final List<DataflowReadChannel> inputs = new ArrayList<DataflowReadChannel>(1 + others.size())\n final action = closure ? new ChainWithClosure<>(closure) : new DefaultMergeClosure(1 + others.size())\n inputs.add(source)\n inputs.addAll(others)\n final listener = stopErrorListener(source,result)\n final params = createOpParams(inputs, result, listener)\n newOperator(params, action)\n return result;\n }\n\n DataflowWriteChannel randomSample(DataflowReadChannel source, int n, Long seed = null) {\n if( source instanceof DataflowExpression )\n throw new IllegalArgumentException(\"Operator `randomSample` cannot be applied to a value channel\")\n\n final result = new RandomSampleOp(source,n, seed).apply()\n return result\n }\n\n DataflowWriteChannel toInteger(final DataflowReadChannel source) {\n final target = CH.createBy(source)\n newOperator(source, target, new ChainWithClosure({ it -> it as Integer }))\n return target;\n }\n\n DataflowWriteChannel toLong(final DataflowReadChannel source) {\n final target = CH.createBy(source)\n newOperator(source, target, new ChainWithClosure({ it -> it as Long }))\n return target;\n }\n\n DataflowWriteChannel toFloat(final DataflowReadChannel source) {\n final target = CH.createBy(source)\n newOperator(source, target, new ChainWithClosure({ it -> it as Float }))\n return target;\n }\n\n DataflowWriteChannel toDouble(final DataflowReadChannel source) {\n final target = CH.createBy(source)\n newOperator(source, target, new ChainWithClosure({ it -> it as Double }))\n return target;\n }\n\n DataflowWriteChannel transpose( final DataflowReadChannel source, final Map params=null ) {\n def result = new TransposeOp(source,params).apply()\n return result\n }\n\n DataflowWriteChannel splitText(DataflowReadChannel source, Map opts=null) {\n final result = new SplitOp( source, 'splitText', opts ).apply()\n return result\n }\n\n DataflowWriteChannel splitText(DataflowReadChannel source, Map opts=null, Closure action) {\n if( opts==null && action ) {\n opts = new HashMap<>(5)\n }\n opts.put('each', action)\n final result = new SplitOp( source, 'splitText', opts ).apply()\n return result\n }\n\n DataflowWriteChannel splitCsv(DataflowReadChannel source, Map opts=null) {\n final result = new SplitOp( source, 'splitCsv', opts ).apply()\n return result\n }\n\n DataflowWriteChannel splitFasta(DataflowReadChannel source, Map opts=null) {\n final result = new SplitOp( source, 'splitFasta', opts ).apply()\n return result\n }\n\n DataflowWriteChannel splitFastq(DataflowReadChannel source, Map opts=null) {\n final result = new SplitOp( source, 'splitFastq', opts ).apply()\n return result\n }\n\n DataflowWriteChannel countLines(DataflowReadChannel source, Map opts=null) {\n final splitter = new TextSplitter()\n final result = countOverChannel( source, splitter, opts )\n return result\n }\n\n DataflowWriteChannel countFasta(DataflowReadChannel source, Map opts=null) {\n final splitter = new FastaSplitter()\n final result = countOverChannel( source, splitter, opts )\n return result\n }\n\n DataflowWriteChannel countFastq(DataflowReadChannel source, Map opts=null) {\n final splitter = new FastqSplitter()\n final result = countOverChannel( source, splitter, opts )\n return result\n }\n\n @Deprecated\n DataflowWriteChannel countText(DataflowReadChannel source) {\n countLines(source)\n }\n\n /**\n * Implement a `set` operator e.g.\n * <pre>\n * SomeProcess.out | set { channelName }\n * </pre>\n *\n * @param source The channel instance to be bound in the context\n * @param holder A closure defining a variable identifier\n */\n\n void set(DataflowReadChannel source, Closure holder) {\n set0(source, holder)\n }\n\n void set(DataflowBroadcast source, Closure holder) {\n set0(source, holder)\n }\n\n void set(ChannelOut source, Closure holder) {\n set0(source, holder)\n }\n\n private void set0(source, Closure holder) {\n final name = CaptureProperties.capture(holder)\n if( !name )\n throw new IllegalArgumentException(\"Missing name to which set the channel variable\")\n\n if( name.size()>1 )\n throw new IllegalArgumentException(\"Operation `set` does not allow more than one target name\")\n\n NF.binding.setVariable(name[0], source)\n // do not add this nod in the DAG because it's not a real operator\n // since it's not transforming the channel\n OpCall.current.get().ignoreDagNode = true\n }\n\n /**\n * Implements `branch` operator\n *\n * @param source\n * @param action\n * @return\n */\n ChannelOut branch(DataflowReadChannel source, Closure<TokenBranchDef> action) {\n new BranchOp(source, action)\n .apply()\n .getOutput()\n }\n\n ChannelOut multiMap(DataflowReadChannel source, Closure<TokenMultiMapDef> action) {\n new MultiMapOp(source, action)\n .apply()\n .getOutput()\n }\n\n @Deprecated\n ChannelOut fork(DataflowReadChannel source, Closure<TokenMultiMapDef> action) {\n log.warn \"Operator `fork` has been renamed to `multiMap`\"\n multiMap(source, action)\n }\n}\n"} +{"text": "// by commy2\n\nprivate [\"_vehicle\", \"_part\", \"_isEngineer\", \"_time\", \"_name\", \"_string\"];\n\n_vehicle = _this select 0;\n_part = _this select 1;\n\n_isEngineer = [player] call AGM_Core_fnc_isEngineer;\n\n_time = 10;\n_time = _time + 10 * (_vehicle getHitPointDamage _part);\nif !(_isEngineer) then {_time = _time + 10};\n\n[player, \"AinvPknlMstpSnonWnonDr_medic5\", 0] call AGM_Core_fnc_doAnimation;\n\n_name = [_part] call AGM_Repair_fnc_getHitPointName;\n_string = format [localize \"STR_AGM_Repair_RemovingWheel\", _name];\n\n[_time, [_vehicle, _part], \"AGM_Repair_fnc_removeWheelCallback\", _string, \"AGM_Repair_fnc_removeWheelAbort\"] call AGM_Core_fnc_progressBar;\n[_vehicle] call AGM_Core_fnc_closeDialogIfTargetMoves;\n"} +{"text": "/*\nTheme Name: Dyad 2\nDescription: Used to style Gutenberg Blocks.\n*/\n\n/*--------------------------------------------------------------\n>>> TABLE OF CONTENTS:\n----------------------------------------------------------------\n1.0 Block Alignments\n2.0 General Block Styles\n3.0 Blocks - Common Blocks\n4.0 Blocks - Formatting\n5.0 Blocks - Layout Elements\n6.0 Blocks - Widgets\n7.0 Blocks - Colors\n--------------------------------------------------------------*/\n\n/*--------------------------------------------------------------\n1.0 Block Alignments\n--------------------------------------------------------------*/\n\n.single .hentry {\n\toverflow-x: hidden; /* prevents side-scrolling caused by use of vw */\n}\n\n.alignfull,\n.alignwide {\n\tclear: both;\n}\n\n@media (min-width: 1000px) {\n\tbody:not(.has-post-thumbnail) .alignwide {\n\t\tmargin-left: -20%;\n\t\tmargin-right: -20%;\n\t\twidth: auto;\n\t}\n\n\tbody:not(.has-post-thumbnail) .alignfull *[class*=\"__inner-container\"] .alignwide {\n\t\tmargin-left: auto;\n\t\tmargin-right: auto;\n\t\tmax-width: calc(700px + 40%);\n\t}\n\n\tbody:not(.has-post-thumbnail) *[class*=\"__inner-container\"] .alignwide {\n\t\tmargin-left: auto;\n\t\tmargin-right: auto;\n\t}\n\n\tbody:not(.has-post-thumbnail) *[class*=\"__inner-container\"] > *:not(.alignwide):not(.alignfull) {\n\t\tmargin-left: auto;\n\t\tmargin-right: auto;\n\t\tmax-width: 700px;\n\t}\n}\n\nbody:not(.has-post-thumbnail) .alignfull {\n\tmargin-left: calc(50% - 50vw);\n\tmargin-right: calc(50% - 50vw);\n\twidth: auto;\n}\n\nbody:not(.has-post-thumbnail) *[class*=\"__inner-container\"] .alignfull {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n/* Prevent children of columns from expanding outside of their container */\n\nbody:not(.has-post-thumbnail) .wp-block-column .alignfull,\nbody:not(.has-post-thumbnail) .wp-block-column .alignwide {\n\tmargin-left: 0;\n\tmargin-right: 0;\n\tmax-width: 100%;\n\twidth: 100%;\n}\n\n/* Make non image-based blocks a bit narrower, so they don't get cut off. */\n\nbody:not(.has-post-thumbnail) .wp-block-columns.alignfull,\nbody:not(.has-post-thumbnail) .wp-block-audio.alignfull,\nbody:not(.has-post-thumbnail) .wp-block-table.alignfull,\nbody:not(.has-post-thumbnail) .wp-block-latest-comments.alignfull,\nbody:not(.has-post-thumbnail) .wp-block-categories.alignfull,\nbody:not(.has-post-thumbnail) .wp-block-latest-posts.alignfull {\n\tmargin-left: calc(50% - 48vw);\n\tmargin-right: calc(50% - 48vw);\n}\n\n/* Make sure video embeds actually fill the full available space. */\n\n.wp-block-embed.is-type-video.alignfull iframe {\n\theight: 100% !important;\n\twidth: 100% !important;\n}\n\n/*--------------------------------------------------------------\n2.0 General Block Styles\n--------------------------------------------------------------*/\n\n/* Captions */\n\n/*--------------------------------------------------------------\n3.0 Blocks - Common Blocks\n--------------------------------------------------------------*/\n\n/* Paragraph */\n\np.has-drop-cap:not(:focus)::first-letter {\n\tfont-size: 5em;\n\tmargin-top: 0.1em;\n}\n\n/* Image */\n\n.wp-block-image {\n\tmargin-bottom: 0;\n\tmax-width: 1000%;\n}\n\n.wp-block-image.is-resized {\n\tmargin-left: auto;\n\tmargin-right: auto;\n}\n\n/* Gallery */\n\n.wp-block-gallery {\n\tmargin: 0 0 1.5em;\n}\n\n/* Quote */\n\n.wp-block-quote {\n\tmargin-bottom: 1.5em;\n}\n\n.wp-block-quote:not(.is-large):not(.is-style-large),\n.rtl .wp-block-quote:not(.is-large):not(.is-style-large)[style=\"text-align:left\"] {\n\tborder-left: 3px solid #ddd;\n\tborder-right: 0;\n\tmargin: 0 0 1.5em 1.5em;\n\tpadding-left: 1.5em;\n\tpadding-right: 0;\n}\n\n.rtl .wp-block-quote:not(.is-large):not(.is-style-large),\n.wp-block-quote:not(.is-large):not(.is-style-large)[style=\"text-align:right\"] {\n\tborder-left: 0;\n\tborder-right: 3px solid #ddd;\n\tmargin-left: 0;\n\tmargin-right: 1.5em;\n\tpadding-left: 0;\n\tpadding-right: 1.5em;\n}\n\n.wp-block-quote:not(.is-large):not(.is-style-large)[style=\"text-align:center\"] {\n\tborder: 0;\n\tmargin-left: 0;\n\tmargin-right: 0;\n\tpadding-left: 0;\n\tpadding-right: 0;\n}\n\n.wp-block-quote p:not(:last-child) {\n\tmargin-bottom: 0;\n\tpadding-bottom: 0;\n}\n\n.wp-block-quote.is-large,\n.wp-block-quote.is-style-large {\n\tborder: 0;\n\tpadding-left: 1.5em;\n\tpadding-right: 1.5em;\n}\n\n.wp-block-quote.is-large cite,\n.wp-block-quote.is-style-large cite {\n\tfont-size: 80%;\n\ttext-align: inherit;\n}\n\n/* Audio */\n\n.wp-block-audio {\n\tmargin-bottom: 1.5em;\n}\n\n.wp-block-audio audio {\n\tdisplay: block;\n\twidth: 100%;\n}\n\n/* Cover */\n\n.wp-block-cover.aligncenter,\n.wp-block-cover-image.aligncenter,\n.wp-block-cover.alignleft,\n.wp-block-cover-image.alignleft,\n.wp-block-cover.alignright,\n.wp-block-cover-image.alignright {\n\tdisplay: flex;\n}\n\n.wp-block-cover .wp-block-cover-text,\n.wp-block-cover-image .wp-block-cover-image-text {\n\tfont-size: 24px;\n}\n\n/* File */\n\n.wp-block-file .wp-block-file__button {\n\tbackground-color: #678db8;\n\tborder-color: #678db8;\n\tborder-radius: 0;\n\tcolor: #fff;\n\tfont-size: 1.4rem;\n\tletter-spacing: 0.1em;\n\tpadding: 1em;\n\ttext-transform: uppercase;\n}\n\n.wp-block-file__button:hover,\n.wp-block-file__button:focus {\n\tbackground-color: #678db8;\n\topacity: 0.75;\n}\n\n.wp-block-file a.wp-block-file__button:active {\n\topacity: 0.9;\n}\n\n.rtl .wp-block-file * + .wp-block-file__button {\n\tmargin-left: 0.75em;\n\tmargin-right: 0;\n}\n\n/*--------------------------------------------------------------\n4.0 Blocks - Formatting Blocks\n--------------------------------------------------------------*/\n\n/* Verse */\n\n.wp-block-verse {\n\tbackground: none;\n\tcolor: #393d41;\n\tfont-family: \"Noto Serif\", Georgia, serif;\n\tfont-size: inherit;\n\tfont-style: italic;\n\tpadding: 0;\n}\n\n.wp-block-verse:before {\n\tdisplay: none;\n}\n\n/* Code */\n\n.wp-block-code {\n\tborder: 0;\n\tcolor: #6a6c6e;\n\tborder-radius: 0;\n}\n\n/* Pullquote */\n\n.wp-block-pullquote {\n\tborder-color: #ddd;\n\tmargin-bottom: 1.5em;\n}\n\n.wp-block-pullquote blockquote {\n\tborder: 0;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.wp-block-pullquote cite {\n\tcolor: #6c7781;\n\tfont-size: 13px;\n\ttext-transform: none;\n}\n\n/* Table */\n\n.wp-block-table td,\n.wp-block-table th {\n\tborder-color: #ddd;\n}\n\nbody:not(.has-post-thumbnail) .wp-block-table.alignwide {\n\twidth: 960px; /* 700px + ( 20% * 2 ) */\n}\n\n\nbody:not(.has-post-thumbnail) .wp-block-table.alignfull {\n\twidth: 96vw;\n}\n\n/*--------------------------------------------------------------\n5.0 Blocks - Layout Elements\n--------------------------------------------------------------*/\n\n/* Buttons */\n\n.wp-block-button .wp-block-button__link {\n\tfont-size: 1.4rem;\n\tletter-spacing: 0.1em;\n\tpadding: 1em 1.5em;\n\ttext-transform: uppercase;\n\ttext-decoration: none;\n}\n\n.wp-block-button.aligncenter {\n\ttext-align: center;\n\tmargin-bottom: 1.5em;\n}\n\n.wp-block-button__link {\n\tbackground-color: #678db8;\n\tcolor: #fff;\n}\n\n.is-style-outline .wp-block-button__link {\n\tborder-color: currentColor;\n}\n\n.is-style-outline .wp-block-button__link:not(.has-text-color) {\n\tcolor: #678db8;\n}\n\n.wp-block-button .wp-block-button__link:hover,\n.wp-block-button .wp-block-button__link:focus {\n\topacity: 0.75;\n}\n\n.wp-block-button .wp-block-button__link:active {\n\topacity: 0.9;\n}\n\n/* Separator */\n\n.wp-block-separator {\n\tborder: 0;\n}\n\n/*--------------------------------------------------------------\n6.0 Blocks - Widget Blocks\n--------------------------------------------------------------*/\n\n/* General Widget styles */\n\n.wp-block-categories.aligncenter,\n.wp-block-categories.aligncenter ul,\n.wp-block-archives.aligncenter,\n.wp-block-latest-posts.aligncenter,\n.wp-block-latest-comments.aligncenter {\n\tlist-style-position: inside;\n\ttext-align: center;\n}\n\n/* Latest Posts */\n\n.wp-block-latest-posts.is-grid {\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n/* Latest Comments */\n\n.wp-block-latest-comments {\n\tfont-size: 17px;\n\tmargin-left: 0;\n\tmargin-right: 0;\n}\n\n.wp-block-latest-comments a {\n\ttext-decoration: none;\n}\n\n.wp-block-latest-comments__comment-date {\n\tfont-size: 15px;\n}\n\n.wp-block-latest-comments__comment-author,\n.wp-block-latest-comments__comment-link {\n\tfont-weight: 700;\n\ttext-decoration: none;\n}\n\n.wp-block-latest-comments__comment-excerpt p {\n\tfont-size: inherit;\n\tmargin: 0;\n}\n\n/*--------------------------------------------------------------\n7.0 Blocks - Colors\n--------------------------------------------------------------*/\n\n.has-bright-blue-color,\n.has-bright-blue-color:hover,\n.has-bright-blue-color:focus,\n.has-bright-blue-color:active,\n.has-bright-blue-color:visited {\n\tcolor: #678db8;\n}\n\n.has-bright-blue-background-color,\n.has-bright-blue-background-color:hover,\n.has-bright-blue-background-color:focus,\n.has-bright-blue-background-color:active,\n.has-bright-blue-background-color:visited {\n\tbackground-color: #678db8;\n}\n\n.has-yellow-color,\n.has-yellow-color:hover,\n.has-yellow-color:focus,\n.has-yellow-color:active,\n.has-yellow-color:visited {\n\tcolor: #e7ae01;\n}\n\n.has-yellow-background-color,\n.has-yellow-background-color:hover,\n.has-yellow-background-color:focus,\n.has-yellow-background-color:active,\n.has-yellow-background-color:visited {\n\tbackground-color: #e7ae01;\n}\n\n.has-light-gray-blue-color,\n.has-light-gray-blue-color:hover,\n.has-light-gray-blue-color:focus,\n.has-light-gray-blue-color:active,\n.has-light-gray-blue-color:visited {\n\tcolor: #abb7c3;\n}\n\n.has-light-gray-blue-background-color,\n.has-light-gray-blue-background-color:hover,\n.has-light-gray-blue-background-color:focus,\n.has-light-gray-blue-background-color:active,\n.has-light-gray-blue-background-color:visited {\n\tbackground-color: #abb7c3;\n}\n\n.has-medium-gray-color,\n.has-medium-gray-color:hover,\n.has-medium-gray-color:focus,\n.has-medium-gray-color:active,\n.has-medium-gray-color:visited {\n\tcolor: #6a6c6e;\n}\n\n.has-medium-gray-background-color,\n.has-medium-gray-background-color:hover,\n.has-medium-gray-background-color:focus,\n.has-medium-gray-background-color:active,\n.has-medium-gray-background-color:visited {\n\tbackground-color: #6a6c6e;\n}\n\n.has-dark-gray-color,\n.has-dark-gray-color:hover,\n.has-dark-gray-color:focus,\n.has-dark-gray-color:active,\n.has-dark-gray-color:visited {\n\tcolor: #1a1c1e;\n}\n\n.has-dark-gray-background-color,\n.has-dark-gray-background-color:hover,\n.has-dark-gray-background-color:focus,\n.has-dark-gray-background-color:active,\n.has-dark-gray-background-color:visited {\n\tbackground-color: #1a1c1e;\n}\n\n.has-dark-gray-blue-color,\n.has-dark-gray-blue-color:hover,\n.has-dark-gray-blue-color:focus,\n.has-dark-gray-blue-color:active,\n.has-dark-gray-blue-color:visited {\n\tcolor: #292c2f;\n}\n\n.has-dark-gray-blue-background-color,\n.has-dark-gray-blue-background-color:hover,\n.has-dark-gray-blue-background-color:focus,\n.has-dark-gray-blue-background-color:active,\n.has-dark-gray-blue-background-color:visited {\n\tbackground-color: #292c2f;\n}\n\n.has-white-color,\n.has-white-color:hover,\n.has-white-color:focus,\n.has-white-color:active,\n.has-white-color:visited {\n\tcolor: #fff;\n}\n\n.has-white-background-color,\n.has-white-background-color:hover,\n.has-white-background-color:focus,\n.has-white-background-color:active,\n.has-white-background-color:visited {\n\tbackground-color: #fff;\n}\n"} +{"text": "/*******************************************************************************\n* Copyright 2010-2020 Intel Corporation\n*\n* Licensed under the Apache License, Version 2.0 (the \"License\");\n* you may not use this file except in compliance with the License.\n* You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing, software\n* distributed under the License is distributed on an \"AS IS\" BASIS,\n* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n* See the License for the specific language governing permissions and\n* limitations under the License.\n*******************************************************************************/\n\n/*\n//\n// Purpose:\n// Intel(R) Integrated Performance Primitives. Cryptography Primitives.\n// Internal EC over GF(p^m) basic Definitions & Function Prototypes\n//\n// Context:\n// gfec_MulPoint()\n//\n*/\n\n#include \"owndefs.h\"\n#include \"owncp.h\"\n#include \"pcpgfpecstuff.h\"\n#include \"gsscramble.h\"\n\n#if 0\nIppsGFpECPoint* gfec_MulPoint(IppsGFpECPoint* pR,\n const IppsGFpECPoint* pP,\n const BNU_CHUNK_T* pScalar, int scalarLen,\n IppsGFpECState* pEC, Ipp8u* pScratchBuffer)\n{\n FIX_BNU(pScalar, scalarLen);\n {\n gsModEngine* pGForder = ECP_MONT_R(pEC);\n\n BNU_CHUNK_T* pTmpScalar = cpGFpGetPool(1, pGForder); /* length of scalar does not exceed length of order */\n int orderBits = MOD_BITSIZE(pGForder);\n int orderLen = MOD_LEN(pGForder);\n cpGFpElementCopyPad(pTmpScalar,orderLen+1, pScalar,scalarLen);\n\n gfec_point_mul(ECP_POINT_X(pR), ECP_POINT_X(pP),\n (Ipp8u*)pTmpScalar, orderBits,\n pEC, pScratchBuffer);\n cpGFpReleasePool(1, pGForder);\n\n ECP_POINT_FLAGS(pR) = gfec_IsPointAtInfinity(pR)? 0 : ECP_FINITE_POINT;\n return pR;\n }\n}\n#endif\nIppsGFpECPoint* gfec_MulPoint(IppsGFpECPoint* pR,\n const IppsGFpECPoint* pP,\n const BNU_CHUNK_T* pScalar, int scalarLen,\n IppsGFpECState* pEC, Ipp8u* pScratchBuffer)\n{\n FIX_BNU(pScalar, scalarLen);\n {\n gsModEngine* pME = GFP_PMA(ECP_GFP(pEC));\n\n BNU_CHUNK_T* pTmpScalar = cpGFpGetPool(2, pME);\n int orderBits = ECP_ORDBITSIZE(pEC);\n int orderLen = BITS_BNU_CHUNK(orderBits);\n cpGFpElementCopyPad(pTmpScalar, orderLen + 1, pScalar, scalarLen);\n\n gfec_point_mul(ECP_POINT_X(pR), ECP_POINT_X(pP),\n (Ipp8u*)pTmpScalar, orderBits,\n pEC, pScratchBuffer);\n cpGFpReleasePool(2, pME);\n\n ECP_POINT_FLAGS(pR) = gfec_IsPointAtInfinity(pR) ? 0 : ECP_FINITE_POINT;\n return pR;\n }\n}\n"} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n<Tasks>\n <!--\n Sha1 is a sequential task that generates SHA-256 hashes of a collection of files. The results are written\n to an XML file as follows:\n <Files>\n <File path=\"$filePath\" name=\"$fileName\" sha256=\"ddd23773d8724b8a40749046d8e3414402507a21a1ccc522653197b0803d268b\" />\n <File path=\"$filePath\" name=\"$fileName\" sha256=\"ddd23773d8724b8a40749046d8e3414402507a21a1ccc522653197b0803d268b\" />\n <File path=\"$filePath\" name=\"$fileName\" sha256=\"ddd23773d8724b8a40749046d8e3414402507a21a1ccc522653197b0803d268b\" />\n ...\n </Files>\n \n The XML file generated will be loaded by the Md5 task so that other tasks can select \n it through the selectFiles option.\n -->\n <Task id=\"$int\" name=\"Sha256\" description=\"$string\" enabled=\"true|false\">\n <!-- \n The files loaded by the task having as id $taskId will be\n used to calculate their SHA-256 hashes.\n -->\n <Setting name=\"selectFiles\" value=\"$taskId\" />\n <Setting name=\"selectFiles\" value=\"$taskId\" />\n <!-- You can add as many selecteFiles as you want.-->\n\n <!-- Optional. Samba computer name. -->\n <Setting name=\"smbComputerName\" value=\"$string\" />\n <!-- Optional. Samba domain name. -->\n <Setting name=\"smbDomain\" value=\"$string\" />\n <!-- Optional. Samba username. -->\n <Setting name=\"smbUsername\" value=\"$string\" />\n <!-- Optional. Samba password. -->\n <Setting name=\"smbPassword\" value=\"$string\" />\n </Task>\n</Tasks>"} +{"text": "// -*- C++ -*-\n\n//=============================================================================\n/**\n * @file Persistent_Entries.h\n *\n * @author Marina Spivak <marina@cs.wustl.edu>\n */\n//=============================================================================\n\n\n#ifndef TAO_PERSISTENT_ENTRIES_H\n#define TAO_PERSISTENT_ENTRIES_H\n#include /**/ \"ace/pre.h\"\n\n#include \"ace/Hash_Map_With_Allocator_T.h\"\n#include \"orbsvcs/CosNamingC.h\"\n#include \"orbsvcs/Naming/naming_serv_export.h\"\n\n#if !defined (ACE_LACKS_PRAGMA_ONCE)\n# pragma once\n#endif /* ACE_LACKS_PRAGMA_ONCE */\n\nTAO_BEGIN_VERSIONED_NAMESPACE_DECL\n\n/**\n * @class TAO_Persistent_IntId\n *\n * @brief Helper class for TAO_Persistent_Bindings_Map: unifies several\n * data items, so they can be stored together as a <value>\n * for a <key> in a hash table holding the state of a Persistent\n * Naming Context.\n *\n * This class holds a strigified IOR and a binding type, so\n * they can be stored together as a <value> for a <key> in a\n * hash table holding the state of a Persistent Naming Context.\n * Memory for the ior isn't allocated/deallocated, this class just\n * copies a pointer.\n */\nclass TAO_Naming_Serv_Export TAO_Persistent_IntId\n{\npublic:\n /// Constructor.\n TAO_Persistent_IntId (void);\n\n /// Constructor.\n TAO_Persistent_IntId (char * obj_ref,\n CosNaming::BindingType type /* = CosNaming::nobject */);\n\n /// Copy constructor.\n TAO_Persistent_IntId (const TAO_Persistent_IntId & rhs);\n\n /// Destructor.\n ~TAO_Persistent_IntId (void);\n\n /// Assignment operator.\n void operator= (const TAO_Persistent_IntId & rhs);\n\n // = Data members.\n\n /// Stringified IOR to be stored in a Persistent Naming Context.\n const char *ref_;\n\n /// Binding type for <ref_>.\n CosNaming::BindingType type_;\n};\n\n/**\n * @class TAO_Persistent_ExtId\n *\n * @brief Helper class for TAO_Persistent_Bindings_Map: unifies several\n * data items, so they can be stored together as a <key>\n * for a <value> in a hash table holding the state of a Persistent\n * Naming Context.\n *\n * This class holds id and kind strings, so\n * they can be stored together as a <key> for a <value> in a\n * hash table holding the state of a Persistent Naming Context.\n * Memory for id and kind isn't allocated/deallocated, this\n * class just copies pointers.\n */\nclass TAO_Naming_Serv_Export TAO_Persistent_ExtId\n{\npublic:\n /// Constructor.\n TAO_Persistent_ExtId (void);\n\n /// Constructor.\n TAO_Persistent_ExtId (const char *id,\n const char *kind);\n\n /// Copy constructor.\n TAO_Persistent_ExtId (const TAO_Persistent_ExtId & rhs);\n\n /// Destructor.\n ~TAO_Persistent_ExtId (void);\n\n // = Assignment and comparison methods.\n\n /// Assignment operator (does copy memory).\n void operator= (const TAO_Persistent_ExtId & rhs);\n\n /// Equality comparison operator (must match both id_ and kind_).\n bool operator== (const TAO_Persistent_ExtId &rhs) const;\n\n /// Inequality comparison operator.\n bool operator!= (const TAO_Persistent_ExtId &rhs) const;\n\n /// hash() function is required in order for this class to be usable by\n /// ACE_Hash_Map_Manager.\n u_long hash (void) const;\n\n // = Data members.\n\n /// id portion of the name to be associated with some object\n /// reference in a Persistent Naming Context.\n const char * id_;\n\n /// kind portion of the name to be associated with some object\n /// reference in a Persistent Naming Context.\n const char * kind_;\n\n // Accessors.\n\n const char * id (void);\n const char * kind (void);\n};\n\n/**\n * @class TAO_Persistent_Index_IntId\n *\n * @brief Helper class for TAO_Persistent_Context_Index: unifies several\n * data items, so they can be stored together as a <value>\n * for a <key> in a hash table holding the state of a Persistent\n * Context Index. (Persistent Context Index is like directory\n * that stores info about every active Naming Context).\n *\n * This class holds a counter and a hash map pointers, so\n * they can be stored together as a <value> for a <key> in a\n * hash table holding the state of a Persistent Context Index.\n */\nclass TAO_Naming_Serv_Export TAO_Persistent_Index_IntId\n{\npublic:\n /// Constructor.\n TAO_Persistent_Index_IntId (void);\n\n /// Constructor.\n TAO_Persistent_Index_IntId (ACE_UINT32 *counter,\n ACE_Hash_Map_With_Allocator<TAO_Persistent_ExtId,\n TAO_Persistent_IntId> * hash_map);\n\n /// Copy constructor.\n TAO_Persistent_Index_IntId (const TAO_Persistent_Index_IntId & rhs);\n\n /// Destructor.\n ~TAO_Persistent_Index_IntId (void);\n\n /// Assignment operator (does copy memory).\n void operator= (const TAO_Persistent_Index_IntId & rhs);\n\n // = Data members.\n\n /// Pointer to a Persistent Naming Context's counter.\n ACE_UINT32 *counter_;\n\n /// Pointer to a Persistent Naming Context's hash map.\n ACE_Hash_Map_With_Allocator<TAO_Persistent_ExtId,\n TAO_Persistent_IntId> * hash_map_;\n};\n\n/**\n * @class TAO_Persistent_Index_ExtId\n *\n * @brief Helper class for TAO_Persistent_Context_Index: holds\n * Persistent Naming Context POA id, so it can be stored as a <key>\n * for a <value> in a hash table holding state of a Persistent\n * Context Index. (Persistent Context Index is like directory\n * that stores info about every active Naming Context).\n *\n * We need this wrapper class around the actual data because we must\n * provide <hash> function for it to work with\n * ACE_Hash_Map_Manager.\n */\nclass TAO_Naming_Serv_Export TAO_Persistent_Index_ExtId\n{\npublic:\n /// Constructor.\n TAO_Persistent_Index_ExtId (void);\n\n /// Constructor.\n TAO_Persistent_Index_ExtId (const char *poa_id);\n\n /// Copy constructor.\n TAO_Persistent_Index_ExtId (const TAO_Persistent_Index_ExtId & rhs);\n\n /// Destructor.\n ~TAO_Persistent_Index_ExtId (void);\n\n // = Assignment and comparison methods.\n\n /// Assignment operator (does copy memory).\n void operator= (const TAO_Persistent_Index_ExtId & rhs);\n\n /// Equality comparison operator (must match both id_ and kind_).\n bool operator== (const TAO_Persistent_Index_ExtId &rhs) const;\n\n /// Inequality comparison operator.\n bool operator!= (const TAO_Persistent_Index_ExtId &rhs) const;\n\n /// <hash> function is required in order for this class to be usable by\n /// ACE_Hash_Map_Manager.\n u_long hash (void) const;\n\n // = Data member.\n\n /// POA id to be associated with the rest of the info for some\n /// Persistent Naming Context in the Persistent Context Index.\n const char * poa_id_;\n};\n\nTAO_END_VERSIONED_NAMESPACE_DECL\n\n#include /**/ \"ace/post.h\"\n#endif /* TAO_PERSISTENT_ENTRIES_H */\n"} +{"text": "map \"http://hl7.org/fhir/StructureMap/Timing3to4\" = \"R3 to R4 Conversions for Timing\"\r\n\r\nuses \"http://hl7.org/fhir/3.0/StructureDefinition/Timing\" alias TimingR3 as source\r\nuses \"http://hl7.org/fhir/StructureDefinition/Timing\" alias Timing as target\r\n\r\nimports \"http://hl7.org/fhir/StructureMap/*3to4\"\r\n\r\ngroup Timing(source src : TimingR3, target tgt : Timing) extends BackboneElement <<type+>> {\r\n src.event -> tgt.event;\r\n src.repeat as vs0 -> tgt.repeat as vt0 then repeat(vs0, vt0);\r\n src.code -> tgt.code;\r\n}\r\n\r\ngroup repeat(source src, target tgt) extends Element {\r\n src.bounds : Duration as vs -> tgt.bounds = create('Duration') as vt then Duration(vs, vt);\r\n src.bounds : Range as vs -> tgt.bounds = create('Range') as vt then Range(vs, vt);\r\n src.bounds : Period as vs -> tgt.bounds = create('Period') as vt then Period(vs, vt);\r\n src.count -> tgt.count;\r\n src.countMax -> tgt.countMax;\r\n src.duration -> tgt.duration;\r\n src.durationMax -> tgt.durationMax;\r\n src.durationUnit -> tgt.durationUnit;\r\n src.frequency -> tgt.frequency;\r\n src.frequencyMax -> tgt.frequencyMax;\r\n src.period -> tgt.period;\r\n src.periodMax -> tgt.periodMax;\r\n src.periodUnit -> tgt.periodUnit;\r\n src.dayOfWeek -> tgt.dayOfWeek;\r\n src.timeOfDay -> tgt.timeOfDay;\r\n src.when -> tgt.when;\r\n src.offset -> tgt.offset;\r\n}\r\n\r\n"} +{"text": "snd-hda-ext-core-objs := hdac_ext_bus.o hdac_ext_controller.o hdac_ext_stream.o\n\nobj-$(CONFIG_SND_HDA_EXT_CORE) += snd-hda-ext-core.o\n"} +{"text": "/**\n * Given an array of xcodeproj libraries and pbxFile,\n * it appends it to that group\n *\n * Important: That function mutates `libraries` and it's not pure.\n * It's mainly due to limitations of `xcode` library.\n */\nmodule.exports = function addProjectToLibraries(libraries, file) {\n return libraries.children.push({\n value: file.fileRef,\n comment: file.basename,\n });\n};\n"} +{"text": "'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _filter = require('./internal/filter');\n\nvar _filter2 = _interopRequireDefault(_filter);\n\nvar _doParallelLimit = require('./internal/doParallelLimit');\n\nvar _doParallelLimit2 = _interopRequireDefault(_doParallelLimit);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/**\n * The same as [`filter`]{@link module:Collections.filter} but runs a maximum of `limit` async operations at a\n * time.\n *\n * @name filterLimit\n * @static\n * @memberOf module:Collections\n * @method\n * @see [async.filter]{@link module:Collections.filter}\n * @alias selectLimit\n * @category Collection\n * @param {Array|Iterable|Object} coll - A collection to iterate over.\n * @param {number} limit - The maximum number of async operations at a time.\n * @param {Function} iteratee - A truth test to apply to each item in `coll`.\n * The `iteratee` is passed a `callback(err, truthValue)`, which must be called\n * with a boolean argument once it has completed. Invoked with (item, callback).\n * @param {Function} [callback] - A callback which is called after all the\n * `iteratee` functions have finished. Invoked with (err, results).\n */\nexports.default = (0, _doParallelLimit2.default)(_filter2.default);\nmodule.exports = exports['default'];"} +{"text": "//\n// _SwinjectStoryboardBase.m\n// Swinject\n//\n// Created by Yoichi Tagaya on 8/2/15.\n// Copyright © 2015 Swinject Contributors. All rights reserved.\n//\n\n#import \"_SwinjectStoryboardBase.h\"\n\n@implementation _SwinjectStoryboardBase\n\n+ (nonnull instancetype)_create:(nonnull NSString *)name bundle:(nullable NSBundle *)storyboardBundleOrNil {\n return (id)[self storyboardWithName:name bundle:storyboardBundleOrNil];\n}\n\n@end\n"} +{"text": "namespace NServiceBus\n{\n using System;\n using Transport;\n\n static class DelayedRetriesHeaderExtensions\n {\n public static int GetDelayedDeliveriesPerformed(this IncomingMessage message)\n {\n if (message.Headers.TryGetValue(Headers.DelayedRetries, out var value))\n {\n if (int.TryParse(value, out var i))\n {\n return i;\n }\n }\n\n return 0;\n }\n\n public static void SetCurrentDelayedDeliveries(this OutgoingMessage message, int currentDelayedRetry)\n {\n message.Headers[Headers.DelayedRetries] = currentDelayedRetry.ToString();\n }\n\n public static void SetDelayedDeliveryTimestamp(this OutgoingMessage message, DateTime timestamp)\n {\n message.Headers[Headers.DelayedRetriesTimestamp] = DateTimeExtensions.ToWireFormattedString(timestamp);\n }\n }\n}"} +{"text": "// http://codeforces.com/contest/322/problem/B\n\nusing namespace std;\n#include<algorithm>\n#include<iostream>\n#include<sstream>\n#include<string>\n#include<vector>\n#include<queue>\n#include<stack>\n#include<map>\n#include<set>\n\n#include<climits>\n#include<cstring>\n#include<cstdio>\n#include<cmath>\n#include<cctype>\n\n#define For(i,a) for(int i=0;i<a;++i)\n#define foreach(x,v) for(typeof (v).begin() x = (v).begin(); x!= (v).end(); x++)\n#define all(x) x.begin(),x.end()\n#define rall(x) x.rbegin(),x.rend()\n#define D(x) cout<< #x \" = \"<<(x)<<endl\n#define MAXNODES 100\n\ntemplate <class T> string to_str(const T &x)\n{ stringstream s; s << x; return s.str(); }\ntemplate <class T> int to_int(const T &x)\n{ stringstream s; s << x; int r; s >> r; return r; }\n\nconst double pi=acos(-1);\nconst double Pi2=acos(0);\ntypedef long long ll;\ntypedef pair<int , int> pii;\ntypedef vector<int> vi;\n\n\nint gcd(int a,int b){\n if(b==0) return a;\n return gcd(b,a%b);\n}\n\nset<ll> lucky;\nvoid gen_lucky(ll a=0){\n if(a>1000000000L) return;\n ll x = (a*10) + 4;\n ll y = (a*10) + 7;\n lucky.insert(x);\n lucky.insert(y);\n gen_lucky(x);\n gen_lucky(y);\n}\n\nint main(){\n ll a,b,c;\n while(cin>>a>>b>>c){\n ll ans = a/3LL;\n ans += b/3LL;\n ans += c/3LL;\n ans += min(min(a%3LL,b%3LL),c%3LL);\n \n ll k = min(a,min(b,c));\n ll aa = a - k;\n ll bb = b - k;\n ll cc = c - k;\n ll ans2 = k + (aa/3LL) + (bb/3LL) + (cc/3LL);\n \n For(i, min(k,100000LL)){\n aa = a - (ll)i;\n bb = b - (ll)i;\n cc = c - (ll)i;\n ans2 = i+ (aa/3LL) + (bb/3LL) + (cc/3LL) + min(min(aa%3LL,bb%3LL),cc%3LL);\n ans = max(ans,ans2);\n }\n ans = max(ans,ans2);\n cout<<ans<<endl;\n }\n \n \n return 0; \n}"} +{"text": "<?php\n\n return [\n 'not_found' => 'Asset Maintenance you were looking for was not found!',\n 'delete' => [\n 'confirm' => 'Are you sure you wish to delete this asset maintenance?',\n 'error' => 'There was an issue deleting the asset maintenance. Please try again.',\n 'success' => 'The asset maintenance was deleted successfully.'\n ],\n 'create' => [\n 'error' => 'Asset Maintenance was not created, please try again.',\n 'success' => 'Asset Maintenance created successfully.'\n ],\n 'edit' => [\n 'error' => 'Asset Maintenance was not edited, please try again.',\n 'success' => 'Asset Maintenance edited successfully.'\n ],\n 'asset_maintenance_incomplete' => 'Ekk klárað',\n 'warranty' => 'Ábyrgð',\n 'not_warranty' => 'Ekki ábyrgð',\n ];"} +{"text": "<!DOCTYPE HTML>\n<html lang=\"en\" >\n \n <head>\n \n <meta charset=\"UTF-8\">\n <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\" />\n <title>初始化下载引擎失败 | PanDownload</title>\n <meta content=\"text/html; charset=utf-8\" http-equiv=\"Content-Type\">\n <meta name=\"description\" content=\"\">\n <meta name=\"generator\" content=\"GitBook 2.6.7\">\n \n \n <meta name=\"HandheldFriendly\" content=\"true\"/>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, user-scalable=no\">\n <meta name=\"apple-mobile-web-app-capable\" content=\"yes\">\n <meta name=\"apple-mobile-web-app-status-bar-style\" content=\"black\">\n <link rel=\"apple-touch-icon-precomposed\" sizes=\"152x152\" href=\"../gitbook/images/apple-touch-icon-precomposed-152.png\">\n <link rel=\"shortcut icon\" href=\"../gitbook/images/favicon.ico\" type=\"image/x-icon\">\n \n <link rel=\"stylesheet\" href=\"../gitbook/style.css\">\n \n \n <link rel=\"stylesheet\" href=\"../gitbook/plugins/gitbook-plugin-donate/plugin.css\">\n \n \n \n <link rel=\"stylesheet\" href=\"../gitbook/plugins/gitbook-plugin-highlight/website.css\">\n \n \n \n <link rel=\"stylesheet\" href=\"../gitbook/plugins/gitbook-plugin-fontsettings/website.css\">\n \n \n \n\n \n \n \n <link rel=\"next\" href=\"../faq/initscript.html\" />\n \n \n <link rel=\"prev\" href=\"../faq/connect.html\" />\n \n\n \n </head>\n <body>\n \n \n <div class=\"book\"\n data-level=\"2.2\"\n data-chapter-title=\"初始化下载引擎失败\"\n data-filepath=\"faq/initaria2.md\"\n data-basepath=\"..\"\n data-revision=\"Fri Jan 24 2020 12:06:43 GMT+0800 (CST)\"\n data-innerlanguage=\"\">\n \n\n<div class=\"book-summary\">\n <nav role=\"navigation\">\n <ul class=\"summary\">\n \n \n \n \n\n \n\n \n \n <li class=\"chapter \" data-level=\"0\" data-path=\"index.html\">\n \n \n <a href=\"../index.html\">\n \n <i class=\"fa fa-check\"></i>\n \n PanDownload\n </a>\n \n \n </li>\n \n <li class=\"chapter \" data-level=\"1\" data-path=\"document.html\">\n \n \n <a href=\"../document.html\">\n \n <i class=\"fa fa-check\"></i>\n \n <b>1.</b>\n \n 使用说明\n </a>\n \n \n <ul class=\"articles\">\n \n \n <li class=\"chapter \" data-level=\"1.1\" data-path=\"document/login.html\">\n \n \n <a href=\"../document/login.html\">\n \n <i class=\"fa fa-check\"></i>\n \n <b>1.1.</b>\n \n 账号登录\n </a>\n \n \n </li>\n \n <li class=\"chapter \" data-level=\"1.2\" data-path=\"document/download.html\">\n \n \n <a href=\"../document/download.html\">\n \n <i class=\"fa fa-check\"></i>\n \n <b>1.2.</b>\n \n 文件下载\n </a>\n \n \n </li>\n \n <li class=\"chapter \" data-level=\"1.3\" data-path=\"document/share.html\">\n \n \n <a href=\"../document/share.html\">\n \n <i class=\"fa fa-check\"></i>\n \n <b>1.3.</b>\n \n 打开分享链接\n </a>\n \n \n </li>\n \n <li class=\"chapter \" data-level=\"1.4\" data-path=\"document/unzip.html\">\n \n \n <a href=\"../document/unzip.html\">\n \n <i class=\"fa fa-check\"></i>\n \n <b>1.4.</b>\n \n 在线解压\n </a>\n \n \n </li>\n \n <li class=\"chapter \" data-level=\"1.5\" data-path=\"document/clouddl.html\">\n \n \n <a href=\"../document/clouddl.html\">\n \n <i class=\"fa fa-check\"></i>\n \n <b>1.5.</b>\n \n 离线下载\n </a>\n \n \n </li>\n \n <li class=\"chapter \" data-level=\"1.6\" data-path=\"document/anime.html\">\n \n \n <a href=\"../document/anime.html\">\n \n <i class=\"fa fa-check\"></i>\n \n <b>1.6.</b>\n \n 新番下载\n </a>\n \n \n </li>\n \n <li class=\"chapter \" data-level=\"1.7\" data-path=\"document/remote.html\">\n \n \n <a href=\"../document/remote.html\">\n \n <i class=\"fa fa-check\"></i>\n \n <b>1.7.</b>\n \n 远程下载\n </a>\n \n \n </li>\n \n <li class=\"chapter \" data-level=\"1.8\" data-path=\"document/settings.html\">\n \n \n <a href=\"../document/settings.html\">\n \n <i class=\"fa fa-check\"></i>\n \n <b>1.8.</b>\n \n 设置\n </a>\n \n \n </li>\n \n\n </ul>\n \n </li>\n \n <li class=\"chapter \" data-level=\"2\" data-path=\"faq.html\">\n \n \n <a href=\"../faq.html\">\n \n <i class=\"fa fa-check\"></i>\n \n <b>2.</b>\n \n 常见问题\n </a>\n \n \n <ul class=\"articles\">\n \n \n <li class=\"chapter \" data-level=\"2.1\" data-path=\"faq/connect.html\">\n \n \n <a href=\"../faq/connect.html\">\n \n <i class=\"fa fa-check\"></i>\n \n <b>2.1.</b>\n \n 连接服务器失败\n </a>\n \n \n </li>\n \n <li class=\"chapter active\" data-level=\"2.2\" data-path=\"faq/initaria2.html\">\n \n \n <a href=\"../faq/initaria2.html\">\n \n <i class=\"fa fa-check\"></i>\n \n <b>2.2.</b>\n \n 初始化下载引擎失败\n </a>\n \n \n </li>\n \n <li class=\"chapter \" data-level=\"2.3\" data-path=\"faq/initscript.html\">\n \n \n <a href=\"../faq/initscript.html\">\n \n <i class=\"fa fa-check\"></i>\n \n <b>2.3.</b>\n \n 初始化脚本失败\n </a>\n \n \n </li>\n \n <li class=\"chapter \" data-level=\"2.4\" data-path=\"faq/login.html\">\n \n \n <a href=\"../faq/login.html\">\n \n <i class=\"fa fa-check\"></i>\n \n <b>2.4.</b>\n \n 无法登录网盘账号\n </a>\n \n \n </li>\n \n <li class=\"chapter \" data-level=\"2.5\" data-path=\"faq/download.html\">\n \n \n <a href=\"../faq/download.html\">\n \n <i class=\"fa fa-check\"></i>\n \n <b>2.5.</b>\n \n 下载失败,出现错误\n </a>\n \n \n </li>\n \n <li class=\"chapter \" data-level=\"2.6\" data-path=\"faq/slow.html\">\n \n \n <a href=\"../faq/slow.html\">\n \n <i class=\"fa fa-check\"></i>\n \n <b>2.6.</b>\n \n 下载速度慢,账号被限速\n </a>\n \n \n </li>\n \n <li class=\"chapter \" data-level=\"2.7\" data-path=\"faq/proxy.html\">\n \n \n <a href=\"../faq/proxy.html\">\n \n <i class=\"fa fa-check\"></i>\n \n <b>2.7.</b>\n \n 怎么设置代理\n </a>\n \n \n </li>\n \n <li class=\"chapter \" data-level=\"2.8\" data-path=\"faq/cookie.html\">\n \n \n <a href=\"../faq/cookie.html\">\n \n <i class=\"fa fa-check\"></i>\n \n <b>2.8.</b>\n \n 使用cookie登录网盘账号\n </a>\n \n \n </li>\n \n <li class=\"chapter \" data-level=\"2.9\" data-path=\"faq/script.html\">\n \n \n <a href=\"../faq/script.html\">\n \n <i class=\"fa fa-check\"></i>\n \n <b>2.9.</b>\n \n 安装扩展脚本\n </a>\n \n \n </li>\n \n <li class=\"chapter \" data-level=\"2.10\" data-path=\"faq/ua.html\">\n \n \n <a href=\"../faq/ua.html\">\n \n <i class=\"fa fa-check\"></i>\n \n <b>2.10.</b>\n \n 修改浏览器UA\n </a>\n \n \n </li>\n \n <li class=\"chapter \" data-level=\"2.11\" data-path=\"faq/about.html\">\n \n \n <a href=\"../faq/about.html\">\n \n <i class=\"fa fa-check\"></i>\n \n <b>2.11.</b>\n \n 交流反馈\n </a>\n \n \n </li>\n \n\n </ul>\n \n </li>\n \n\n\n \n <li class=\"divider\"></li>\n <li>\n <a href=\"https://www.gitbook.com\" target=\"blank\" class=\"gitbook-link\">\n Published with GitBook\n </a>\n </li>\n \n </ul>\n </nav>\n</div>\n\n <div class=\"book-body\">\n <div class=\"body-inner\">\n <div class=\"book-header\" role=\"navigation\">\n <!-- Actions Left -->\n \n\n <!-- Title -->\n <h1>\n <i class=\"fa fa-circle-o-notch fa-spin\"></i>\n <a href=\"../\" >PanDownload</a>\n </h1>\n</div>\n\n <div class=\"page-wrapper\" tabindex=\"-1\" role=\"main\">\n <div class=\"page-inner\">\n \n \n <section class=\"normal\" id=\"section-\">\n \n <h1 id=\"&#x521D;&#x59CB;&#x5316;&#x4E0B;&#x8F7D;&#x5F15;&#x64CE;&#x5931;&#x8D25;\">&#x521D;&#x59CB;&#x5316;&#x4E0B;&#x8F7D;&#x5F15;&#x64CE;&#x5931;&#x8D25;</h1>\n<ol>\n<li>&#x9632;&#x706B;&#x5899;&#x62E6;&#x622A;&#xFF0C;&#x6DFB;&#x52A0;&#x767D;&#x540D;&#x5355;&#x6216;&#x5173;&#x95ED;&#x9632;&#x706B;&#x5899;</li>\n<li>&#x7AEF;&#x53E3;&#x5360;&#x7528;&#xFF0C;&#x91CD;&#x542F;&#x7535;&#x8111;&#x6216;&#x4FEE;&#x6539;&#x7AEF;&#x53E3;&#x53F7;&#xFF08;&#x6253;&#x5F00;&#x914D;&#x7F6E;&#x6587;&#x4EF6;<strong>PanData/config.ini</strong>&#xFF0C;&#x4FEE;&#x6539;<strong>port</strong>&#x503C;&#xFF09;</li>\n</ol>\n\n \n </section>\n \n \n </div>\n </div>\n </div>\n\n \n <a href=\"../faq/connect.html\" class=\"navigation navigation-prev \" aria-label=\"Previous page: 连接服务器失败\"><i class=\"fa fa-angle-left\"></i></a>\n \n \n <a href=\"../faq/initscript.html\" class=\"navigation navigation-next \" aria-label=\"Next page: 初始化脚本失败\"><i class=\"fa fa-angle-right\"></i></a>\n \n </div>\n</div>\n\n \n<script src=\"../gitbook/app.js\"></script>\n\n \n <script src=\"../gitbook/plugins/gitbook-plugin-donate/plugin.js\"></script>\n \n\n \n <!--script src=\"../gitbook/plugins/gitbook-plugin-ga/plugin.js\"></script-->\n \n\n \n \n \n\n \n <script src=\"../gitbook/plugins/gitbook-plugin-pandownload/plugin.js\"></script>\n \n\n \n <script src=\"../gitbook/plugins/gitbook-plugin-sharing/buttons.js\"></script>\n \n\n \n <script src=\"../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js\"></script>\n \n\n<script>\nrequire([\"gitbook\"], function(gitbook) {\n var config = {\"donate\":{\"alipay\":\"./../images/alipay.png\",\"alipayText\":\" \",\"button\":\"捐助\",\"title\":\"\",\"wechat\":\"./../images/wechat.png\",\"wechatText\":\" \"},\"favicon\":{\"appleTouch\":\"assets/images/apple-touch-icon.png\",\"appleTouchMore\":{\"120x120\":\"assets/images/apple-touch-icon-120x120.png\",\"180x180\":\"assets/images/apple-touch-icon-180x180.png\"},\"bookmark\":\"assets/favicon.ico\",\"shortcut\":\"assets/favicon.ico\"},\"ga\":{\"token\":\"UA-112166098-1\",\"configuration\":\"auto\"},\"cnzz\":{\"visible\":true,\"style\":\"0\",\"siteid\":\"1276617762\"},\"pandownload\":{\"dlink\":\"/download.php\",\"icp\":\"粤ICP备19023326号\"},\"xianliao\":{\"token\":\"13011\"},\"highlight\":{},\"sharing\":{\"facebook\":true,\"twitter\":true,\"google\":false,\"weibo\":false,\"instapaper\":false,\"vk\":false,\"all\":[\"facebook\",\"google\",\"twitter\",\"weibo\",\"instapaper\"]},\"fontsettings\":{\"theme\":\"white\",\"family\":\"sans\",\"size\":2}};\n gitbook.start(config);\n});\n</script>\n\n \n </body>\n \n</html>\n"} +{"text": "Welcome to add.com\n"} +{"text": "#include \"script_component.hpp\"\n/*\n * Author: ACRE2Team\n * Function called when PTT key is released. The most important aspect is setting the PTTDown flag\n * of the radio to false.\n *\n * Arguments:\n * 0: Radio ID <STRING>\n * 1: Event: \"handlePTTUp\" <STRING> (Unused)\n * 2: Event data <ARRAY> (Unused)\n * 3: Radio data <HASH> (Unused)\n * 4: Remote <BOOL> (Unused)\n *\n * Return Value:\n * True <BOOL>\n *\n * Example:\n * [\"ACRE_PRC343_ID_1\", \"handlePTTUp\", [], [], false] call acre_sys_prc343_fnc_handlePTTUp\n *\n * Public: No\n */\n\nparams [\"_radioId\", \"\", \"\", \"\", \"\"];\n\nprivate _volume = [_radioId, \"getVolume\"] call EFUNC(sys_data,dataEvent);\n[_radioId, \"Acre_GenericClickOff\", [0, 0, 0], [0, 1, 0], _volume] call EFUNC(sys_radio,playRadioSound);\nSCRATCH_SET(_radioId, \"PTTDown\", false);\ntrue;\n"} +{"text": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n <head>\n <title>datasheet for ghrd_10as066n2_dipsw_pio</title>\n <style type=\"text/css\">\nbody { font-family:arial ;}\na { text-decoration:underline ; color:#003000 ;}\na:hover { text-decoration:underline ; color:0030f0 ;}\ntd { padding : 5px ;}\ntable.topTitle { width:100% ;}\ntable.topTitle td.l { text-align:left ; font-weight: bold ; font-size:30px ;}\ntable.topTitle td.r { text-align:right ; font-weight: bold ; font-size:16px ;}\ntable.blueBar { width : 100% ; border-spacing : 0px ;}\ntable.blueBar td { background:#0036ff ; font-size:12px ; color : white ; text-align : left ; font-weight : bold ;}\ntable.blueBar td.l { text-align : left ;}\ntable.blueBar td.r { text-align : right ;}\ntable.items { width:100% ; border-collapse:collapse ;}\ntable.items td.label { font-weight:bold ; font-size:16px ; vertical-align:top ;}\ntable.items td.mono { font-family:courier ; font-size:12px ; white-space:pre ;}\ndiv.label { font-weight:bold ; font-size:16px ; vertical-align:top ; text-align:center ;}\ntable.grid { border-collapse:collapse ;}\ntable.grid td { border:1px solid #bbb ; font-size:12px ;}\nbody { font-family:arial ;}\ntable.x { font-family:courier ; border-collapse:collapse ; padding:2px ;}\ntable.x td { border:1px solid #bbb ;}\ntd.tableTitle { font-weight:bold ; text-align:center ;}\ntable.grid { border-collapse:collapse ;}\ntable.grid td { border:1px solid #bbb ;}\ntable.grid td.tableTitle { font-weight:bold ; text-align:center ;}\ntable.mmap { border-collapse:collapse ; text-size:11px ; border:1px solid #d8d8d8 ;}\ntable.mmap td { border-color:#d8d8d8 ; border-width:1px ; border-style:solid ;}\ntable.mmap td.empty { border-style:none ; background-color:#f0f0f0 ;}\ntable.mmap td.slavemodule { text-align:left ; font-size:11px ; border-style:solid solid none solid ;}\ntable.mmap td.slavem { text-align:right ; font-size:9px ; font-style:italic ; border-style:none solid none solid ;}\ntable.mmap td.slaveb { text-align:right ; font-size:9px ; font-style:italic ; border-style:none solid solid solid ;}\ntable.mmap td.mastermodule { text-align:center ; font-size:11px ; border-style:solid solid none solid ;}\ntable.mmap td.masterlr { text-align:center ; font-size:9px ; font-style:italic ; border-style:none solid solid solid ;}\ntable.mmap td.masterl { text-align:center ; font-size:9px ; font-style:italic ; border-style:none none solid solid ;}\ntable.mmap td.masterm { text-align:center ; font-size:9px ; font-style:italic ; border-style:none none solid none ;}\ntable.mmap td.masterr { text-align:center ; font-size:9px ; font-style:italic ; border-style:none solid solid none ;}\ntable.mmap td.addr { font-family:courier ; font-size:9px ; text-align:right ;}\ntable.connectionboxes { border-collapse:separate ; border-spacing:0px ; font-family:arial ;}\ntable.connectionboxes td.from { border-bottom:1px solid black ; font-size:9px ; font-style:italic ; vertical-align:bottom ; text-align:left ;}\ntable.connectionboxes td.to { font-size:9px ; font-style:italic ; vertical-align:top ; text-align:right ;}\ntable.connectionboxes td.lefthandwire { border-bottom:1px solid black ; font-size:9px ; font-style:italic ; vertical-align:bottom ; text-align:right ;}\ntable.connectionboxes td.righthandwire { border-bottom:1px solid black ; font-size:9px ; font-style:italic ; vertical-align:bottom ; text-align:left ;}\ntable.connectionboxes td.righthandlabel { font-size:11px ; vertical-align:bottom ; text-align:left ;}\ntable.connectionboxes td.neighbor { padding:3px ; border:1px solid black ; font-size: 11px ; background:#e8e8e8 ; vertical-align:center ; text-align:center ;}\ntable.connectionboxes td.main { padding:8px ; border:1px solid black ; font-size: 14px ; font-weight:bold ; background:#ffffff ; vertical-align:center ; text-align:center ;}\n.parametersbox { border:1px solid #d0d0d0 ; display:inline-block ; max-height:160px ; overflow:auto ; width:360px ; font-size:10px ;}\n.flowbox { display:inline-block ;}\n.parametersbox table { font-size:10px ;}\ntd.parametername { font-style:italic ;}\ntd.parametervalue { font-weight:bold ;}\ndiv.greydiv { vertical-align:top ; text-align:center ; background:#eeeeee ; border-top:1px solid #707070 ; border-bottom:1px solid #707070 ; padding:20px ; margin:20px ; width:auto ;}</style>\n </head>\n <body>\n <table class=\"topTitle\">\n <tr>\n <td class=\"l\">ghrd_10as066n2_dipsw_pio</td>\n <td class=\"r\">\n <br/>\n <br/>\n </td>\n </tr>\n </table>\n <table class=\"blueBar\">\n <tr>\n <td class=\"l\">2018.01.09.14:30:07</td>\n <td class=\"r\">Datasheet</td>\n </tr>\n </table>\n <div style=\"width:100% ; height:10px\"> </div>\n <div class=\"label\">Overview</div>\n <div class=\"greydiv\">\n <div style=\"display:inline-block ; text-align:left\">\n <table class=\"connectionboxes\">\n <tr style=\"height:6px\">\n <td></td>\n </tr>\n </table>\n </div><span style=\"display:inline-block ; width:28px\"> </span>\n <div style=\"display:inline-block ; text-align:left\"><span>\n <br/>All Components\n <br/>&#160;&#160;\n <a href=\"#module_dipsw_pio\"><b>dipsw_pio</b>\n </a> altera_avalon_pio 17.1</span>\n </div>\n </div>\n <div style=\"width:100% ; height:10px\"> </div>\n <div class=\"label\">Memory Map</div>\n <table class=\"mmap\">\n <tr>\n <td class=\"empty\" rowspan=\"2\"></td>\n </tr>\n <tr>\n <td class=\"slavemodule\">&#160;\n <a href=\"#module_dipsw_pio\"><b>dipsw_pio</b>\n </a>\n </td>\n </tr>\n <tr>\n <td class=\"slaveb\">s1&#160;</td>\n </tr>\n </table>\n <a name=\"module_dipsw_pio\"> </a>\n <div>\n <hr/>\n <h2>dipsw_pio</h2>altera_avalon_pio v17.1\n <br/>\n <br/>\n <br/>\n <table class=\"flowbox\">\n <tr>\n <td class=\"parametersbox\">\n <h2>Parameters</h2>\n <table>\n <tr>\n <td class=\"parametername\">bitClearingEdgeCapReg</td>\n <td class=\"parametervalue\">true</td>\n </tr>\n <tr>\n <td class=\"parametername\">bitModifyingOutReg</td>\n <td class=\"parametervalue\">false</td>\n </tr>\n <tr>\n <td class=\"parametername\">captureEdge</td>\n <td class=\"parametervalue\">true</td>\n </tr>\n <tr>\n <td class=\"parametername\">direction</td>\n <td class=\"parametervalue\">Input</td>\n </tr>\n <tr>\n <td class=\"parametername\">edgeType</td>\n <td class=\"parametervalue\">ANY</td>\n </tr>\n <tr>\n <td class=\"parametername\">generateIRQ</td>\n <td class=\"parametervalue\">true</td>\n </tr>\n <tr>\n <td class=\"parametername\">irqType</td>\n <td class=\"parametervalue\">EDGE</td>\n </tr>\n <tr>\n <td class=\"parametername\">resetValue</td>\n <td class=\"parametervalue\">0</td>\n </tr>\n <tr>\n <td class=\"parametername\">simDoTestBenchWiring</td>\n <td class=\"parametervalue\">false</td>\n </tr>\n <tr>\n <td class=\"parametername\">simDrivenValue</td>\n <td class=\"parametervalue\">0</td>\n </tr>\n <tr>\n <td class=\"parametername\">width</td>\n <td class=\"parametervalue\">4</td>\n </tr>\n <tr>\n <td class=\"parametername\">deviceFamily</td>\n <td class=\"parametervalue\">UNKNOWN</td>\n </tr>\n <tr>\n <td class=\"parametername\">generateLegacySim</td>\n <td class=\"parametervalue\">false</td>\n </tr>\n </table>\n </td>\n </tr>\n </table>&#160;&#160;\n <table class=\"flowbox\">\n <tr>\n <td class=\"parametersbox\">\n <h2>Software Assignments</h2>\n <table>\n <tr>\n <td class=\"parametername\">BIT_CLEARING_EDGE_REGISTER</td>\n <td class=\"parametervalue\">1</td>\n </tr>\n <tr>\n <td class=\"parametername\">BIT_MODIFYING_OUTPUT_REGISTER</td>\n <td class=\"parametervalue\">0</td>\n </tr>\n <tr>\n <td class=\"parametername\">CAPTURE</td>\n <td class=\"parametervalue\">1</td>\n </tr>\n <tr>\n <td class=\"parametername\">DATA_WIDTH</td>\n <td class=\"parametervalue\">4</td>\n </tr>\n <tr>\n <td class=\"parametername\">DO_TEST_BENCH_WIRING</td>\n <td class=\"parametervalue\">0</td>\n </tr>\n <tr>\n <td class=\"parametername\">DRIVEN_SIM_VALUE</td>\n <td class=\"parametervalue\">0</td>\n </tr>\n <tr>\n <td class=\"parametername\">EDGE_TYPE</td>\n <td class=\"parametervalue\">ANY</td>\n </tr>\n <tr>\n <td class=\"parametername\">FREQ</td>\n <td class=\"parametervalue\">100000000</td>\n </tr>\n <tr>\n <td class=\"parametername\">HAS_IN</td>\n <td class=\"parametervalue\">1</td>\n </tr>\n <tr>\n <td class=\"parametername\">HAS_OUT</td>\n <td class=\"parametervalue\">0</td>\n </tr>\n <tr>\n <td class=\"parametername\">HAS_TRI</td>\n <td class=\"parametervalue\">0</td>\n </tr>\n <tr>\n <td class=\"parametername\">IRQ_TYPE</td>\n <td class=\"parametervalue\">EDGE</td>\n </tr>\n <tr>\n <td class=\"parametername\">RESET_VALUE</td>\n <td class=\"parametervalue\">0</td>\n </tr>\n </table>\n </td>\n </tr>\n </table>\n </div>\n <table class=\"blueBar\">\n <tr>\n <td class=\"l\">generation took 0.00 seconds</td>\n <td class=\"r\">rendering took 0.01 seconds</td>\n </tr>\n </table>\n </body>\n</html>\n"} +{"text": "package database\n\nimport (\n\t\"github.com/pagarme/teleport/action\"\n\t\"github.com/pagarme/teleport/batcher/ddldiff\"\n)\n\ntype Extension struct {\n\tOid string `json:\"oid\"`\n\tName string `json:\"extension_name\"`\n\tSchema *Schema\n}\n\nfunc (post *Extension) Diff(other ddldiff.Diffable, context ddldiff.Context) []action.Action {\n\tactions := make([]action.Action, 0)\n\n\tif other == nil {\n\t\tactions = append(actions, &action.CreateExtension{\n\t\t\tcontext.Schema,\n\t\t\tpost.Name,\n\t\t})\n\t}\n\n\treturn actions\n}\n\nfunc (e *Extension) Children() []ddldiff.Diffable {\n\treturn []ddldiff.Diffable{}\n}\n\nfunc (e *Extension) Drop(context ddldiff.Context) []action.Action {\n\treturn []action.Action{\n\t\t&action.DropExtension{\n\t\t\te.Name,\n\t\t},\n\t}\n}\n\nfunc (e *Extension) IsEqual(other ddldiff.Diffable) bool {\n\tif other == nil {\n\t\treturn false\n\t}\n\n\tif otherExtension, ok := other.(*Extension); ok {\n\t\treturn (e.Oid == otherExtension.Oid)\n\t}\n\n\treturn false\n}\n"} +{"text": "Knitlib Overview\n=============================\n\n\nKnitlib modules\n---------------\n\n.. automodule:: knitlib\n :members:\n\nKnitlib machine handler\n-----------------------\n\n.. automodule:: knitlib.machine_handler\n :members:\n\nKnitlib Knitting Jobs\n---------------------\n\n.. automodule:: knitlib.knitting_job\n :members:"} +{"text": "// Copyright 2011 Google Inc. All Rights Reserved.\n//\n// Use of this source code is governed by a BSD-style license\n// that can be found in the COPYING file in the root of the source\n// tree. An additional intellectual property rights grant can be found\n// in the file PATENTS. All contributing project authors may\n// be found in the AUTHORS file in the root of the source tree.\n// -----------------------------------------------------------------------------\n//\n// SSE2 version of some decoding functions (idct, loop filtering).\n//\n// Author: somnath@google.com (Somnath Banerjee)\n// cduvivier@google.com (Christian Duvivier)\n\n#include \"src/dsp/dsp.h\"\n\n#if defined(WEBP_USE_SSE2)\n\n// The 3-coeff sparse transform in SSE2 is not really faster than the plain-C\n// one it seems => disable it by default. Uncomment the following to enable:\n#if !defined(USE_TRANSFORM_AC3)\n#define USE_TRANSFORM_AC3 0 // ALTERNATE_CODE\n#endif\n\n#include <emmintrin.h>\n#include \"src/dsp/common_sse2.h\"\n#include \"src/dec/vp8i_dec.h\"\n#include \"src/utils/utils.h\"\n\n//------------------------------------------------------------------------------\n// Transforms (Paragraph 14.4)\n\nstatic void Transform_SSE2(const int16_t* in, uint8_t* dst, int do_two) {\n // This implementation makes use of 16-bit fixed point versions of two\n // multiply constants:\n // K1 = sqrt(2) * cos (pi/8) ~= 85627 / 2^16\n // K2 = sqrt(2) * sin (pi/8) ~= 35468 / 2^16\n //\n // To be able to use signed 16-bit integers, we use the following trick to\n // have constants within range:\n // - Associated constants are obtained by subtracting the 16-bit fixed point\n // version of one:\n // k = K - (1 << 16) => K = k + (1 << 16)\n // K1 = 85267 => k1 = 20091\n // K2 = 35468 => k2 = -30068\n // - The multiplication of a variable by a constant become the sum of the\n // variable and the multiplication of that variable by the associated\n // constant:\n // (x * K) >> 16 = (x * (k + (1 << 16))) >> 16 = ((x * k ) >> 16) + x\n const __m128i k1 = _mm_set1_epi16(20091);\n const __m128i k2 = _mm_set1_epi16(-30068);\n __m128i T0, T1, T2, T3;\n\n // Load and concatenate the transform coefficients (we'll do two transforms\n // in parallel). In the case of only one transform, the second half of the\n // vectors will just contain random value we'll never use nor store.\n __m128i in0, in1, in2, in3;\n {\n in0 = _mm_loadl_epi64((const __m128i*)&in[0]);\n in1 = _mm_loadl_epi64((const __m128i*)&in[4]);\n in2 = _mm_loadl_epi64((const __m128i*)&in[8]);\n in3 = _mm_loadl_epi64((const __m128i*)&in[12]);\n // a00 a10 a20 a30 x x x x\n // a01 a11 a21 a31 x x x x\n // a02 a12 a22 a32 x x x x\n // a03 a13 a23 a33 x x x x\n if (do_two) {\n const __m128i inB0 = _mm_loadl_epi64((const __m128i*)&in[16]);\n const __m128i inB1 = _mm_loadl_epi64((const __m128i*)&in[20]);\n const __m128i inB2 = _mm_loadl_epi64((const __m128i*)&in[24]);\n const __m128i inB3 = _mm_loadl_epi64((const __m128i*)&in[28]);\n in0 = _mm_unpacklo_epi64(in0, inB0);\n in1 = _mm_unpacklo_epi64(in1, inB1);\n in2 = _mm_unpacklo_epi64(in2, inB2);\n in3 = _mm_unpacklo_epi64(in3, inB3);\n // a00 a10 a20 a30 b00 b10 b20 b30\n // a01 a11 a21 a31 b01 b11 b21 b31\n // a02 a12 a22 a32 b02 b12 b22 b32\n // a03 a13 a23 a33 b03 b13 b23 b33\n }\n }\n\n // Vertical pass and subsequent transpose.\n {\n // First pass, c and d calculations are longer because of the \"trick\"\n // multiplications.\n const __m128i a = _mm_add_epi16(in0, in2);\n const __m128i b = _mm_sub_epi16(in0, in2);\n // c = MUL(in1, K2) - MUL(in3, K1) = MUL(in1, k2) - MUL(in3, k1) + in1 - in3\n const __m128i c1 = _mm_mulhi_epi16(in1, k2);\n const __m128i c2 = _mm_mulhi_epi16(in3, k1);\n const __m128i c3 = _mm_sub_epi16(in1, in3);\n const __m128i c4 = _mm_sub_epi16(c1, c2);\n const __m128i c = _mm_add_epi16(c3, c4);\n // d = MUL(in1, K1) + MUL(in3, K2) = MUL(in1, k1) + MUL(in3, k2) + in1 + in3\n const __m128i d1 = _mm_mulhi_epi16(in1, k1);\n const __m128i d2 = _mm_mulhi_epi16(in3, k2);\n const __m128i d3 = _mm_add_epi16(in1, in3);\n const __m128i d4 = _mm_add_epi16(d1, d2);\n const __m128i d = _mm_add_epi16(d3, d4);\n\n // Second pass.\n const __m128i tmp0 = _mm_add_epi16(a, d);\n const __m128i tmp1 = _mm_add_epi16(b, c);\n const __m128i tmp2 = _mm_sub_epi16(b, c);\n const __m128i tmp3 = _mm_sub_epi16(a, d);\n\n // Transpose the two 4x4.\n VP8Transpose_2_4x4_16b(&tmp0, &tmp1, &tmp2, &tmp3, &T0, &T1, &T2, &T3);\n }\n\n // Horizontal pass and subsequent transpose.\n {\n // First pass, c and d calculations are longer because of the \"trick\"\n // multiplications.\n const __m128i four = _mm_set1_epi16(4);\n const __m128i dc = _mm_add_epi16(T0, four);\n const __m128i a = _mm_add_epi16(dc, T2);\n const __m128i b = _mm_sub_epi16(dc, T2);\n // c = MUL(T1, K2) - MUL(T3, K1) = MUL(T1, k2) - MUL(T3, k1) + T1 - T3\n const __m128i c1 = _mm_mulhi_epi16(T1, k2);\n const __m128i c2 = _mm_mulhi_epi16(T3, k1);\n const __m128i c3 = _mm_sub_epi16(T1, T3);\n const __m128i c4 = _mm_sub_epi16(c1, c2);\n const __m128i c = _mm_add_epi16(c3, c4);\n // d = MUL(T1, K1) + MUL(T3, K2) = MUL(T1, k1) + MUL(T3, k2) + T1 + T3\n const __m128i d1 = _mm_mulhi_epi16(T1, k1);\n const __m128i d2 = _mm_mulhi_epi16(T3, k2);\n const __m128i d3 = _mm_add_epi16(T1, T3);\n const __m128i d4 = _mm_add_epi16(d1, d2);\n const __m128i d = _mm_add_epi16(d3, d4);\n\n // Second pass.\n const __m128i tmp0 = _mm_add_epi16(a, d);\n const __m128i tmp1 = _mm_add_epi16(b, c);\n const __m128i tmp2 = _mm_sub_epi16(b, c);\n const __m128i tmp3 = _mm_sub_epi16(a, d);\n const __m128i shifted0 = _mm_srai_epi16(tmp0, 3);\n const __m128i shifted1 = _mm_srai_epi16(tmp1, 3);\n const __m128i shifted2 = _mm_srai_epi16(tmp2, 3);\n const __m128i shifted3 = _mm_srai_epi16(tmp3, 3);\n\n // Transpose the two 4x4.\n VP8Transpose_2_4x4_16b(&shifted0, &shifted1, &shifted2, &shifted3, &T0, &T1,\n &T2, &T3);\n }\n\n // Add inverse transform to 'dst' and store.\n {\n const __m128i zero = _mm_setzero_si128();\n // Load the reference(s).\n __m128i dst0, dst1, dst2, dst3;\n if (do_two) {\n // Load eight bytes/pixels per line.\n dst0 = _mm_loadl_epi64((__m128i*)(dst + 0 * BPS));\n dst1 = _mm_loadl_epi64((__m128i*)(dst + 1 * BPS));\n dst2 = _mm_loadl_epi64((__m128i*)(dst + 2 * BPS));\n dst3 = _mm_loadl_epi64((__m128i*)(dst + 3 * BPS));\n } else {\n // Load four bytes/pixels per line.\n dst0 = _mm_cvtsi32_si128(WebPMemToUint32(dst + 0 * BPS));\n dst1 = _mm_cvtsi32_si128(WebPMemToUint32(dst + 1 * BPS));\n dst2 = _mm_cvtsi32_si128(WebPMemToUint32(dst + 2 * BPS));\n dst3 = _mm_cvtsi32_si128(WebPMemToUint32(dst + 3 * BPS));\n }\n // Convert to 16b.\n dst0 = _mm_unpacklo_epi8(dst0, zero);\n dst1 = _mm_unpacklo_epi8(dst1, zero);\n dst2 = _mm_unpacklo_epi8(dst2, zero);\n dst3 = _mm_unpacklo_epi8(dst3, zero);\n // Add the inverse transform(s).\n dst0 = _mm_add_epi16(dst0, T0);\n dst1 = _mm_add_epi16(dst1, T1);\n dst2 = _mm_add_epi16(dst2, T2);\n dst3 = _mm_add_epi16(dst3, T3);\n // Unsigned saturate to 8b.\n dst0 = _mm_packus_epi16(dst0, dst0);\n dst1 = _mm_packus_epi16(dst1, dst1);\n dst2 = _mm_packus_epi16(dst2, dst2);\n dst3 = _mm_packus_epi16(dst3, dst3);\n // Store the results.\n if (do_two) {\n // Store eight bytes/pixels per line.\n _mm_storel_epi64((__m128i*)(dst + 0 * BPS), dst0);\n _mm_storel_epi64((__m128i*)(dst + 1 * BPS), dst1);\n _mm_storel_epi64((__m128i*)(dst + 2 * BPS), dst2);\n _mm_storel_epi64((__m128i*)(dst + 3 * BPS), dst3);\n } else {\n // Store four bytes/pixels per line.\n WebPUint32ToMem(dst + 0 * BPS, _mm_cvtsi128_si32(dst0));\n WebPUint32ToMem(dst + 1 * BPS, _mm_cvtsi128_si32(dst1));\n WebPUint32ToMem(dst + 2 * BPS, _mm_cvtsi128_si32(dst2));\n WebPUint32ToMem(dst + 3 * BPS, _mm_cvtsi128_si32(dst3));\n }\n }\n}\n\n#if (USE_TRANSFORM_AC3 == 1)\n#define MUL(a, b) (((a) * (b)) >> 16)\nstatic void TransformAC3(const int16_t* in, uint8_t* dst) {\n static const int kC1 = 20091 + (1 << 16);\n static const int kC2 = 35468;\n const __m128i A = _mm_set1_epi16(in[0] + 4);\n const __m128i c4 = _mm_set1_epi16(MUL(in[4], kC2));\n const __m128i d4 = _mm_set1_epi16(MUL(in[4], kC1));\n const int c1 = MUL(in[1], kC2);\n const int d1 = MUL(in[1], kC1);\n const __m128i CD = _mm_set_epi16(0, 0, 0, 0, -d1, -c1, c1, d1);\n const __m128i B = _mm_adds_epi16(A, CD);\n const __m128i m0 = _mm_adds_epi16(B, d4);\n const __m128i m1 = _mm_adds_epi16(B, c4);\n const __m128i m2 = _mm_subs_epi16(B, c4);\n const __m128i m3 = _mm_subs_epi16(B, d4);\n const __m128i zero = _mm_setzero_si128();\n // Load the source pixels.\n __m128i dst0 = _mm_cvtsi32_si128(WebPMemToUint32(dst + 0 * BPS));\n __m128i dst1 = _mm_cvtsi32_si128(WebPMemToUint32(dst + 1 * BPS));\n __m128i dst2 = _mm_cvtsi32_si128(WebPMemToUint32(dst + 2 * BPS));\n __m128i dst3 = _mm_cvtsi32_si128(WebPMemToUint32(dst + 3 * BPS));\n // Convert to 16b.\n dst0 = _mm_unpacklo_epi8(dst0, zero);\n dst1 = _mm_unpacklo_epi8(dst1, zero);\n dst2 = _mm_unpacklo_epi8(dst2, zero);\n dst3 = _mm_unpacklo_epi8(dst3, zero);\n // Add the inverse transform.\n dst0 = _mm_adds_epi16(dst0, _mm_srai_epi16(m0, 3));\n dst1 = _mm_adds_epi16(dst1, _mm_srai_epi16(m1, 3));\n dst2 = _mm_adds_epi16(dst2, _mm_srai_epi16(m2, 3));\n dst3 = _mm_adds_epi16(dst3, _mm_srai_epi16(m3, 3));\n // Unsigned saturate to 8b.\n dst0 = _mm_packus_epi16(dst0, dst0);\n dst1 = _mm_packus_epi16(dst1, dst1);\n dst2 = _mm_packus_epi16(dst2, dst2);\n dst3 = _mm_packus_epi16(dst3, dst3);\n // Store the results.\n WebPUint32ToMem(dst + 0 * BPS, _mm_cvtsi128_si32(dst0));\n WebPUint32ToMem(dst + 1 * BPS, _mm_cvtsi128_si32(dst1));\n WebPUint32ToMem(dst + 2 * BPS, _mm_cvtsi128_si32(dst2));\n WebPUint32ToMem(dst + 3 * BPS, _mm_cvtsi128_si32(dst3));\n}\n#undef MUL\n#endif // USE_TRANSFORM_AC3\n\n//------------------------------------------------------------------------------\n// Loop Filter (Paragraph 15)\n\n// Compute abs(p - q) = subs(p - q) OR subs(q - p)\n#define MM_ABS(p, q) _mm_or_si128( \\\n _mm_subs_epu8((q), (p)), \\\n _mm_subs_epu8((p), (q)))\n\n// Shift each byte of \"x\" by 3 bits while preserving by the sign bit.\nstatic WEBP_INLINE void SignedShift8b_SSE2(__m128i* const x) {\n const __m128i zero = _mm_setzero_si128();\n const __m128i lo_0 = _mm_unpacklo_epi8(zero, *x);\n const __m128i hi_0 = _mm_unpackhi_epi8(zero, *x);\n const __m128i lo_1 = _mm_srai_epi16(lo_0, 3 + 8);\n const __m128i hi_1 = _mm_srai_epi16(hi_0, 3 + 8);\n *x = _mm_packs_epi16(lo_1, hi_1);\n}\n\n#define FLIP_SIGN_BIT2(a, b) { \\\n (a) = _mm_xor_si128(a, sign_bit); \\\n (b) = _mm_xor_si128(b, sign_bit); \\\n}\n\n#define FLIP_SIGN_BIT4(a, b, c, d) { \\\n FLIP_SIGN_BIT2(a, b); \\\n FLIP_SIGN_BIT2(c, d); \\\n}\n\n// input/output is uint8_t\nstatic WEBP_INLINE void GetNotHEV_SSE2(const __m128i* const p1,\n const __m128i* const p0,\n const __m128i* const q0,\n const __m128i* const q1,\n int hev_thresh, __m128i* const not_hev) {\n const __m128i zero = _mm_setzero_si128();\n const __m128i t_1 = MM_ABS(*p1, *p0);\n const __m128i t_2 = MM_ABS(*q1, *q0);\n\n const __m128i h = _mm_set1_epi8(hev_thresh);\n const __m128i t_max = _mm_max_epu8(t_1, t_2);\n\n const __m128i t_max_h = _mm_subs_epu8(t_max, h);\n *not_hev = _mm_cmpeq_epi8(t_max_h, zero); // not_hev <= t1 && not_hev <= t2\n}\n\n// input pixels are int8_t\nstatic WEBP_INLINE void GetBaseDelta_SSE2(const __m128i* const p1,\n const __m128i* const p0,\n const __m128i* const q0,\n const __m128i* const q1,\n __m128i* const delta) {\n // beware of addition order, for saturation!\n const __m128i p1_q1 = _mm_subs_epi8(*p1, *q1); // p1 - q1\n const __m128i q0_p0 = _mm_subs_epi8(*q0, *p0); // q0 - p0\n const __m128i s1 = _mm_adds_epi8(p1_q1, q0_p0); // p1 - q1 + 1 * (q0 - p0)\n const __m128i s2 = _mm_adds_epi8(q0_p0, s1); // p1 - q1 + 2 * (q0 - p0)\n const __m128i s3 = _mm_adds_epi8(q0_p0, s2); // p1 - q1 + 3 * (q0 - p0)\n *delta = s3;\n}\n\n// input and output are int8_t\nstatic WEBP_INLINE void DoSimpleFilter_SSE2(__m128i* const p0,\n __m128i* const q0,\n const __m128i* const fl) {\n const __m128i k3 = _mm_set1_epi8(3);\n const __m128i k4 = _mm_set1_epi8(4);\n __m128i v3 = _mm_adds_epi8(*fl, k3);\n __m128i v4 = _mm_adds_epi8(*fl, k4);\n\n SignedShift8b_SSE2(&v4); // v4 >> 3\n SignedShift8b_SSE2(&v3); // v3 >> 3\n *q0 = _mm_subs_epi8(*q0, v4); // q0 -= v4\n *p0 = _mm_adds_epi8(*p0, v3); // p0 += v3\n}\n\n// Updates values of 2 pixels at MB edge during complex filtering.\n// Update operations:\n// q = q - delta and p = p + delta; where delta = [(a_hi >> 7), (a_lo >> 7)]\n// Pixels 'pi' and 'qi' are int8_t on input, uint8_t on output (sign flip).\nstatic WEBP_INLINE void Update2Pixels_SSE2(__m128i* const pi, __m128i* const qi,\n const __m128i* const a0_lo,\n const __m128i* const a0_hi) {\n const __m128i a1_lo = _mm_srai_epi16(*a0_lo, 7);\n const __m128i a1_hi = _mm_srai_epi16(*a0_hi, 7);\n const __m128i delta = _mm_packs_epi16(a1_lo, a1_hi);\n const __m128i sign_bit = _mm_set1_epi8((char)0x80);\n *pi = _mm_adds_epi8(*pi, delta);\n *qi = _mm_subs_epi8(*qi, delta);\n FLIP_SIGN_BIT2(*pi, *qi);\n}\n\n// input pixels are uint8_t\nstatic WEBP_INLINE void NeedsFilter_SSE2(const __m128i* const p1,\n const __m128i* const p0,\n const __m128i* const q0,\n const __m128i* const q1,\n int thresh, __m128i* const mask) {\n const __m128i m_thresh = _mm_set1_epi8((char)thresh);\n const __m128i t1 = MM_ABS(*p1, *q1); // abs(p1 - q1)\n const __m128i kFE = _mm_set1_epi8((char)0xFE);\n const __m128i t2 = _mm_and_si128(t1, kFE); // set lsb of each byte to zero\n const __m128i t3 = _mm_srli_epi16(t2, 1); // abs(p1 - q1) / 2\n\n const __m128i t4 = MM_ABS(*p0, *q0); // abs(p0 - q0)\n const __m128i t5 = _mm_adds_epu8(t4, t4); // abs(p0 - q0) * 2\n const __m128i t6 = _mm_adds_epu8(t5, t3); // abs(p0-q0)*2 + abs(p1-q1)/2\n\n const __m128i t7 = _mm_subs_epu8(t6, m_thresh); // mask <= m_thresh\n *mask = _mm_cmpeq_epi8(t7, _mm_setzero_si128());\n}\n\n//------------------------------------------------------------------------------\n// Edge filtering functions\n\n// Applies filter on 2 pixels (p0 and q0)\nstatic WEBP_INLINE void DoFilter2_SSE2(__m128i* const p1, __m128i* const p0,\n __m128i* const q0, __m128i* const q1,\n int thresh) {\n __m128i a, mask;\n const __m128i sign_bit = _mm_set1_epi8((char)0x80);\n // convert p1/q1 to int8_t (for GetBaseDelta_SSE2)\n const __m128i p1s = _mm_xor_si128(*p1, sign_bit);\n const __m128i q1s = _mm_xor_si128(*q1, sign_bit);\n\n NeedsFilter_SSE2(p1, p0, q0, q1, thresh, &mask);\n\n FLIP_SIGN_BIT2(*p0, *q0);\n GetBaseDelta_SSE2(&p1s, p0, q0, &q1s, &a);\n a = _mm_and_si128(a, mask); // mask filter values we don't care about\n DoSimpleFilter_SSE2(p0, q0, &a);\n FLIP_SIGN_BIT2(*p0, *q0);\n}\n\n// Applies filter on 4 pixels (p1, p0, q0 and q1)\nstatic WEBP_INLINE void DoFilter4_SSE2(__m128i* const p1, __m128i* const p0,\n __m128i* const q0, __m128i* const q1,\n const __m128i* const mask,\n int hev_thresh) {\n const __m128i zero = _mm_setzero_si128();\n const __m128i sign_bit = _mm_set1_epi8((char)0x80);\n const __m128i k64 = _mm_set1_epi8(64);\n const __m128i k3 = _mm_set1_epi8(3);\n const __m128i k4 = _mm_set1_epi8(4);\n __m128i not_hev;\n __m128i t1, t2, t3;\n\n // compute hev mask\n GetNotHEV_SSE2(p1, p0, q0, q1, hev_thresh, &not_hev);\n\n // convert to signed values\n FLIP_SIGN_BIT4(*p1, *p0, *q0, *q1);\n\n t1 = _mm_subs_epi8(*p1, *q1); // p1 - q1\n t1 = _mm_andnot_si128(not_hev, t1); // hev(p1 - q1)\n t2 = _mm_subs_epi8(*q0, *p0); // q0 - p0\n t1 = _mm_adds_epi8(t1, t2); // hev(p1 - q1) + 1 * (q0 - p0)\n t1 = _mm_adds_epi8(t1, t2); // hev(p1 - q1) + 2 * (q0 - p0)\n t1 = _mm_adds_epi8(t1, t2); // hev(p1 - q1) + 3 * (q0 - p0)\n t1 = _mm_and_si128(t1, *mask); // mask filter values we don't care about\n\n t2 = _mm_adds_epi8(t1, k3); // 3 * (q0 - p0) + hev(p1 - q1) + 3\n t3 = _mm_adds_epi8(t1, k4); // 3 * (q0 - p0) + hev(p1 - q1) + 4\n SignedShift8b_SSE2(&t2); // (3 * (q0 - p0) + hev(p1 - q1) + 3) >> 3\n SignedShift8b_SSE2(&t3); // (3 * (q0 - p0) + hev(p1 - q1) + 4) >> 3\n *p0 = _mm_adds_epi8(*p0, t2); // p0 += t2\n *q0 = _mm_subs_epi8(*q0, t3); // q0 -= t3\n FLIP_SIGN_BIT2(*p0, *q0);\n\n // this is equivalent to signed (a + 1) >> 1 calculation\n t2 = _mm_add_epi8(t3, sign_bit);\n t3 = _mm_avg_epu8(t2, zero);\n t3 = _mm_sub_epi8(t3, k64);\n\n t3 = _mm_and_si128(not_hev, t3); // if !hev\n *q1 = _mm_subs_epi8(*q1, t3); // q1 -= t3\n *p1 = _mm_adds_epi8(*p1, t3); // p1 += t3\n FLIP_SIGN_BIT2(*p1, *q1);\n}\n\n// Applies filter on 6 pixels (p2, p1, p0, q0, q1 and q2)\nstatic WEBP_INLINE void DoFilter6_SSE2(__m128i* const p2, __m128i* const p1,\n __m128i* const p0, __m128i* const q0,\n __m128i* const q1, __m128i* const q2,\n const __m128i* const mask,\n int hev_thresh) {\n const __m128i zero = _mm_setzero_si128();\n const __m128i sign_bit = _mm_set1_epi8((char)0x80);\n __m128i a, not_hev;\n\n // compute hev mask\n GetNotHEV_SSE2(p1, p0, q0, q1, hev_thresh, &not_hev);\n\n FLIP_SIGN_BIT4(*p1, *p0, *q0, *q1);\n FLIP_SIGN_BIT2(*p2, *q2);\n GetBaseDelta_SSE2(p1, p0, q0, q1, &a);\n\n { // do simple filter on pixels with hev\n const __m128i m = _mm_andnot_si128(not_hev, *mask);\n const __m128i f = _mm_and_si128(a, m);\n DoSimpleFilter_SSE2(p0, q0, &f);\n }\n\n { // do strong filter on pixels with not hev\n const __m128i k9 = _mm_set1_epi16(0x0900);\n const __m128i k63 = _mm_set1_epi16(63);\n\n const __m128i m = _mm_and_si128(not_hev, *mask);\n const __m128i f = _mm_and_si128(a, m);\n\n const __m128i f_lo = _mm_unpacklo_epi8(zero, f);\n const __m128i f_hi = _mm_unpackhi_epi8(zero, f);\n\n const __m128i f9_lo = _mm_mulhi_epi16(f_lo, k9); // Filter (lo) * 9\n const __m128i f9_hi = _mm_mulhi_epi16(f_hi, k9); // Filter (hi) * 9\n\n const __m128i a2_lo = _mm_add_epi16(f9_lo, k63); // Filter * 9 + 63\n const __m128i a2_hi = _mm_add_epi16(f9_hi, k63); // Filter * 9 + 63\n\n const __m128i a1_lo = _mm_add_epi16(a2_lo, f9_lo); // Filter * 18 + 63\n const __m128i a1_hi = _mm_add_epi16(a2_hi, f9_hi); // Filter * 18 + 63\n\n const __m128i a0_lo = _mm_add_epi16(a1_lo, f9_lo); // Filter * 27 + 63\n const __m128i a0_hi = _mm_add_epi16(a1_hi, f9_hi); // Filter * 27 + 63\n\n Update2Pixels_SSE2(p2, q2, &a2_lo, &a2_hi);\n Update2Pixels_SSE2(p1, q1, &a1_lo, &a1_hi);\n Update2Pixels_SSE2(p0, q0, &a0_lo, &a0_hi);\n }\n}\n\n// reads 8 rows across a vertical edge.\nstatic WEBP_INLINE void Load8x4_SSE2(const uint8_t* const b, int stride,\n __m128i* const p, __m128i* const q) {\n // A0 = 63 62 61 60 23 22 21 20 43 42 41 40 03 02 01 00\n // A1 = 73 72 71 70 33 32 31 30 53 52 51 50 13 12 11 10\n const __m128i A0 = _mm_set_epi32(\n WebPMemToUint32(&b[6 * stride]), WebPMemToUint32(&b[2 * stride]),\n WebPMemToUint32(&b[4 * stride]), WebPMemToUint32(&b[0 * stride]));\n const __m128i A1 = _mm_set_epi32(\n WebPMemToUint32(&b[7 * stride]), WebPMemToUint32(&b[3 * stride]),\n WebPMemToUint32(&b[5 * stride]), WebPMemToUint32(&b[1 * stride]));\n\n // B0 = 53 43 52 42 51 41 50 40 13 03 12 02 11 01 10 00\n // B1 = 73 63 72 62 71 61 70 60 33 23 32 22 31 21 30 20\n const __m128i B0 = _mm_unpacklo_epi8(A0, A1);\n const __m128i B1 = _mm_unpackhi_epi8(A0, A1);\n\n // C0 = 33 23 13 03 32 22 12 02 31 21 11 01 30 20 10 00\n // C1 = 73 63 53 43 72 62 52 42 71 61 51 41 70 60 50 40\n const __m128i C0 = _mm_unpacklo_epi16(B0, B1);\n const __m128i C1 = _mm_unpackhi_epi16(B0, B1);\n\n // *p = 71 61 51 41 31 21 11 01 70 60 50 40 30 20 10 00\n // *q = 73 63 53 43 33 23 13 03 72 62 52 42 32 22 12 02\n *p = _mm_unpacklo_epi32(C0, C1);\n *q = _mm_unpackhi_epi32(C0, C1);\n}\n\nstatic WEBP_INLINE void Load16x4_SSE2(const uint8_t* const r0,\n const uint8_t* const r8,\n int stride,\n __m128i* const p1, __m128i* const p0,\n __m128i* const q0, __m128i* const q1) {\n // Assume the pixels around the edge (|) are numbered as follows\n // 00 01 | 02 03\n // 10 11 | 12 13\n // ... | ...\n // e0 e1 | e2 e3\n // f0 f1 | f2 f3\n //\n // r0 is pointing to the 0th row (00)\n // r8 is pointing to the 8th row (80)\n\n // Load\n // p1 = 71 61 51 41 31 21 11 01 70 60 50 40 30 20 10 00\n // q0 = 73 63 53 43 33 23 13 03 72 62 52 42 32 22 12 02\n // p0 = f1 e1 d1 c1 b1 a1 91 81 f0 e0 d0 c0 b0 a0 90 80\n // q1 = f3 e3 d3 c3 b3 a3 93 83 f2 e2 d2 c2 b2 a2 92 82\n Load8x4_SSE2(r0, stride, p1, q0);\n Load8x4_SSE2(r8, stride, p0, q1);\n\n {\n // p1 = f0 e0 d0 c0 b0 a0 90 80 70 60 50 40 30 20 10 00\n // p0 = f1 e1 d1 c1 b1 a1 91 81 71 61 51 41 31 21 11 01\n // q0 = f2 e2 d2 c2 b2 a2 92 82 72 62 52 42 32 22 12 02\n // q1 = f3 e3 d3 c3 b3 a3 93 83 73 63 53 43 33 23 13 03\n const __m128i t1 = *p1;\n const __m128i t2 = *q0;\n *p1 = _mm_unpacklo_epi64(t1, *p0);\n *p0 = _mm_unpackhi_epi64(t1, *p0);\n *q0 = _mm_unpacklo_epi64(t2, *q1);\n *q1 = _mm_unpackhi_epi64(t2, *q1);\n }\n}\n\nstatic WEBP_INLINE void Store4x4_SSE2(__m128i* const x,\n uint8_t* dst, int stride) {\n int i;\n for (i = 0; i < 4; ++i, dst += stride) {\n WebPUint32ToMem(dst, _mm_cvtsi128_si32(*x));\n *x = _mm_srli_si128(*x, 4);\n }\n}\n\n// Transpose back and store\nstatic WEBP_INLINE void Store16x4_SSE2(const __m128i* const p1,\n const __m128i* const p0,\n const __m128i* const q0,\n const __m128i* const q1,\n uint8_t* r0, uint8_t* r8,\n int stride) {\n __m128i t1, p1_s, p0_s, q0_s, q1_s;\n\n // p0 = 71 70 61 60 51 50 41 40 31 30 21 20 11 10 01 00\n // p1 = f1 f0 e1 e0 d1 d0 c1 c0 b1 b0 a1 a0 91 90 81 80\n t1 = *p0;\n p0_s = _mm_unpacklo_epi8(*p1, t1);\n p1_s = _mm_unpackhi_epi8(*p1, t1);\n\n // q0 = 73 72 63 62 53 52 43 42 33 32 23 22 13 12 03 02\n // q1 = f3 f2 e3 e2 d3 d2 c3 c2 b3 b2 a3 a2 93 92 83 82\n t1 = *q0;\n q0_s = _mm_unpacklo_epi8(t1, *q1);\n q1_s = _mm_unpackhi_epi8(t1, *q1);\n\n // p0 = 33 32 31 30 23 22 21 20 13 12 11 10 03 02 01 00\n // q0 = 73 72 71 70 63 62 61 60 53 52 51 50 43 42 41 40\n t1 = p0_s;\n p0_s = _mm_unpacklo_epi16(t1, q0_s);\n q0_s = _mm_unpackhi_epi16(t1, q0_s);\n\n // p1 = b3 b2 b1 b0 a3 a2 a1 a0 93 92 91 90 83 82 81 80\n // q1 = f3 f2 f1 f0 e3 e2 e1 e0 d3 d2 d1 d0 c3 c2 c1 c0\n t1 = p1_s;\n p1_s = _mm_unpacklo_epi16(t1, q1_s);\n q1_s = _mm_unpackhi_epi16(t1, q1_s);\n\n Store4x4_SSE2(&p0_s, r0, stride);\n r0 += 4 * stride;\n Store4x4_SSE2(&q0_s, r0, stride);\n\n Store4x4_SSE2(&p1_s, r8, stride);\n r8 += 4 * stride;\n Store4x4_SSE2(&q1_s, r8, stride);\n}\n\n//------------------------------------------------------------------------------\n// Simple In-loop filtering (Paragraph 15.2)\n\nstatic void SimpleVFilter16_SSE2(uint8_t* p, int stride, int thresh) {\n // Load\n __m128i p1 = _mm_loadu_si128((__m128i*)&p[-2 * stride]);\n __m128i p0 = _mm_loadu_si128((__m128i*)&p[-stride]);\n __m128i q0 = _mm_loadu_si128((__m128i*)&p[0]);\n __m128i q1 = _mm_loadu_si128((__m128i*)&p[stride]);\n\n DoFilter2_SSE2(&p1, &p0, &q0, &q1, thresh);\n\n // Store\n _mm_storeu_si128((__m128i*)&p[-stride], p0);\n _mm_storeu_si128((__m128i*)&p[0], q0);\n}\n\nstatic void SimpleHFilter16_SSE2(uint8_t* p, int stride, int thresh) {\n __m128i p1, p0, q0, q1;\n\n p -= 2; // beginning of p1\n\n Load16x4_SSE2(p, p + 8 * stride, stride, &p1, &p0, &q0, &q1);\n DoFilter2_SSE2(&p1, &p0, &q0, &q1, thresh);\n Store16x4_SSE2(&p1, &p0, &q0, &q1, p, p + 8 * stride, stride);\n}\n\nstatic void SimpleVFilter16i_SSE2(uint8_t* p, int stride, int thresh) {\n int k;\n for (k = 3; k > 0; --k) {\n p += 4 * stride;\n SimpleVFilter16_SSE2(p, stride, thresh);\n }\n}\n\nstatic void SimpleHFilter16i_SSE2(uint8_t* p, int stride, int thresh) {\n int k;\n for (k = 3; k > 0; --k) {\n p += 4;\n SimpleHFilter16_SSE2(p, stride, thresh);\n }\n}\n\n//------------------------------------------------------------------------------\n// Complex In-loop filtering (Paragraph 15.3)\n\n#define MAX_DIFF1(p3, p2, p1, p0, m) do { \\\n (m) = MM_ABS(p1, p0); \\\n (m) = _mm_max_epu8(m, MM_ABS(p3, p2)); \\\n (m) = _mm_max_epu8(m, MM_ABS(p2, p1)); \\\n} while (0)\n\n#define MAX_DIFF2(p3, p2, p1, p0, m) do { \\\n (m) = _mm_max_epu8(m, MM_ABS(p1, p0)); \\\n (m) = _mm_max_epu8(m, MM_ABS(p3, p2)); \\\n (m) = _mm_max_epu8(m, MM_ABS(p2, p1)); \\\n} while (0)\n\n#define LOAD_H_EDGES4(p, stride, e1, e2, e3, e4) { \\\n (e1) = _mm_loadu_si128((__m128i*)&(p)[0 * (stride)]); \\\n (e2) = _mm_loadu_si128((__m128i*)&(p)[1 * (stride)]); \\\n (e3) = _mm_loadu_si128((__m128i*)&(p)[2 * (stride)]); \\\n (e4) = _mm_loadu_si128((__m128i*)&(p)[3 * (stride)]); \\\n}\n\n#define LOADUV_H_EDGE(p, u, v, stride) do { \\\n const __m128i U = _mm_loadl_epi64((__m128i*)&(u)[(stride)]); \\\n const __m128i V = _mm_loadl_epi64((__m128i*)&(v)[(stride)]); \\\n (p) = _mm_unpacklo_epi64(U, V); \\\n} while (0)\n\n#define LOADUV_H_EDGES4(u, v, stride, e1, e2, e3, e4) { \\\n LOADUV_H_EDGE(e1, u, v, 0 * (stride)); \\\n LOADUV_H_EDGE(e2, u, v, 1 * (stride)); \\\n LOADUV_H_EDGE(e3, u, v, 2 * (stride)); \\\n LOADUV_H_EDGE(e4, u, v, 3 * (stride)); \\\n}\n\n#define STOREUV(p, u, v, stride) { \\\n _mm_storel_epi64((__m128i*)&(u)[(stride)], p); \\\n (p) = _mm_srli_si128(p, 8); \\\n _mm_storel_epi64((__m128i*)&(v)[(stride)], p); \\\n}\n\nstatic WEBP_INLINE void ComplexMask_SSE2(const __m128i* const p1,\n const __m128i* const p0,\n const __m128i* const q0,\n const __m128i* const q1,\n int thresh, int ithresh,\n __m128i* const mask) {\n const __m128i it = _mm_set1_epi8(ithresh);\n const __m128i diff = _mm_subs_epu8(*mask, it);\n const __m128i thresh_mask = _mm_cmpeq_epi8(diff, _mm_setzero_si128());\n __m128i filter_mask;\n NeedsFilter_SSE2(p1, p0, q0, q1, thresh, &filter_mask);\n *mask = _mm_and_si128(thresh_mask, filter_mask);\n}\n\n// on macroblock edges\nstatic void VFilter16_SSE2(uint8_t* p, int stride,\n int thresh, int ithresh, int hev_thresh) {\n __m128i t1;\n __m128i mask;\n __m128i p2, p1, p0, q0, q1, q2;\n\n // Load p3, p2, p1, p0\n LOAD_H_EDGES4(p - 4 * stride, stride, t1, p2, p1, p0);\n MAX_DIFF1(t1, p2, p1, p0, mask);\n\n // Load q0, q1, q2, q3\n LOAD_H_EDGES4(p, stride, q0, q1, q2, t1);\n MAX_DIFF2(t1, q2, q1, q0, mask);\n\n ComplexMask_SSE2(&p1, &p0, &q0, &q1, thresh, ithresh, &mask);\n DoFilter6_SSE2(&p2, &p1, &p0, &q0, &q1, &q2, &mask, hev_thresh);\n\n // Store\n _mm_storeu_si128((__m128i*)&p[-3 * stride], p2);\n _mm_storeu_si128((__m128i*)&p[-2 * stride], p1);\n _mm_storeu_si128((__m128i*)&p[-1 * stride], p0);\n _mm_storeu_si128((__m128i*)&p[+0 * stride], q0);\n _mm_storeu_si128((__m128i*)&p[+1 * stride], q1);\n _mm_storeu_si128((__m128i*)&p[+2 * stride], q2);\n}\n\nstatic void HFilter16_SSE2(uint8_t* p, int stride,\n int thresh, int ithresh, int hev_thresh) {\n __m128i mask;\n __m128i p3, p2, p1, p0, q0, q1, q2, q3;\n\n uint8_t* const b = p - 4;\n Load16x4_SSE2(b, b + 8 * stride, stride, &p3, &p2, &p1, &p0);\n MAX_DIFF1(p3, p2, p1, p0, mask);\n\n Load16x4_SSE2(p, p + 8 * stride, stride, &q0, &q1, &q2, &q3);\n MAX_DIFF2(q3, q2, q1, q0, mask);\n\n ComplexMask_SSE2(&p1, &p0, &q0, &q1, thresh, ithresh, &mask);\n DoFilter6_SSE2(&p2, &p1, &p0, &q0, &q1, &q2, &mask, hev_thresh);\n\n Store16x4_SSE2(&p3, &p2, &p1, &p0, b, b + 8 * stride, stride);\n Store16x4_SSE2(&q0, &q1, &q2, &q3, p, p + 8 * stride, stride);\n}\n\n// on three inner edges\nstatic void VFilter16i_SSE2(uint8_t* p, int stride,\n int thresh, int ithresh, int hev_thresh) {\n int k;\n __m128i p3, p2, p1, p0; // loop invariants\n\n LOAD_H_EDGES4(p, stride, p3, p2, p1, p0); // prologue\n\n for (k = 3; k > 0; --k) {\n __m128i mask, tmp1, tmp2;\n uint8_t* const b = p + 2 * stride; // beginning of p1\n p += 4 * stride;\n\n MAX_DIFF1(p3, p2, p1, p0, mask); // compute partial mask\n LOAD_H_EDGES4(p, stride, p3, p2, tmp1, tmp2);\n MAX_DIFF2(p3, p2, tmp1, tmp2, mask);\n\n // p3 and p2 are not just temporary variables here: they will be\n // re-used for next span. And q2/q3 will become p1/p0 accordingly.\n ComplexMask_SSE2(&p1, &p0, &p3, &p2, thresh, ithresh, &mask);\n DoFilter4_SSE2(&p1, &p0, &p3, &p2, &mask, hev_thresh);\n\n // Store\n _mm_storeu_si128((__m128i*)&b[0 * stride], p1);\n _mm_storeu_si128((__m128i*)&b[1 * stride], p0);\n _mm_storeu_si128((__m128i*)&b[2 * stride], p3);\n _mm_storeu_si128((__m128i*)&b[3 * stride], p2);\n\n // rotate samples\n p1 = tmp1;\n p0 = tmp2;\n }\n}\n\nstatic void HFilter16i_SSE2(uint8_t* p, int stride,\n int thresh, int ithresh, int hev_thresh) {\n int k;\n __m128i p3, p2, p1, p0; // loop invariants\n\n Load16x4_SSE2(p, p + 8 * stride, stride, &p3, &p2, &p1, &p0); // prologue\n\n for (k = 3; k > 0; --k) {\n __m128i mask, tmp1, tmp2;\n uint8_t* const b = p + 2; // beginning of p1\n\n p += 4; // beginning of q0 (and next span)\n\n MAX_DIFF1(p3, p2, p1, p0, mask); // compute partial mask\n Load16x4_SSE2(p, p + 8 * stride, stride, &p3, &p2, &tmp1, &tmp2);\n MAX_DIFF2(p3, p2, tmp1, tmp2, mask);\n\n ComplexMask_SSE2(&p1, &p0, &p3, &p2, thresh, ithresh, &mask);\n DoFilter4_SSE2(&p1, &p0, &p3, &p2, &mask, hev_thresh);\n\n Store16x4_SSE2(&p1, &p0, &p3, &p2, b, b + 8 * stride, stride);\n\n // rotate samples\n p1 = tmp1;\n p0 = tmp2;\n }\n}\n\n// 8-pixels wide variant, for chroma filtering\nstatic void VFilter8_SSE2(uint8_t* u, uint8_t* v, int stride,\n int thresh, int ithresh, int hev_thresh) {\n __m128i mask;\n __m128i t1, p2, p1, p0, q0, q1, q2;\n\n // Load p3, p2, p1, p0\n LOADUV_H_EDGES4(u - 4 * stride, v - 4 * stride, stride, t1, p2, p1, p0);\n MAX_DIFF1(t1, p2, p1, p0, mask);\n\n // Load q0, q1, q2, q3\n LOADUV_H_EDGES4(u, v, stride, q0, q1, q2, t1);\n MAX_DIFF2(t1, q2, q1, q0, mask);\n\n ComplexMask_SSE2(&p1, &p0, &q0, &q1, thresh, ithresh, &mask);\n DoFilter6_SSE2(&p2, &p1, &p0, &q0, &q1, &q2, &mask, hev_thresh);\n\n // Store\n STOREUV(p2, u, v, -3 * stride);\n STOREUV(p1, u, v, -2 * stride);\n STOREUV(p0, u, v, -1 * stride);\n STOREUV(q0, u, v, 0 * stride);\n STOREUV(q1, u, v, 1 * stride);\n STOREUV(q2, u, v, 2 * stride);\n}\n\nstatic void HFilter8_SSE2(uint8_t* u, uint8_t* v, int stride,\n int thresh, int ithresh, int hev_thresh) {\n __m128i mask;\n __m128i p3, p2, p1, p0, q0, q1, q2, q3;\n\n uint8_t* const tu = u - 4;\n uint8_t* const tv = v - 4;\n Load16x4_SSE2(tu, tv, stride, &p3, &p2, &p1, &p0);\n MAX_DIFF1(p3, p2, p1, p0, mask);\n\n Load16x4_SSE2(u, v, stride, &q0, &q1, &q2, &q3);\n MAX_DIFF2(q3, q2, q1, q0, mask);\n\n ComplexMask_SSE2(&p1, &p0, &q0, &q1, thresh, ithresh, &mask);\n DoFilter6_SSE2(&p2, &p1, &p0, &q0, &q1, &q2, &mask, hev_thresh);\n\n Store16x4_SSE2(&p3, &p2, &p1, &p0, tu, tv, stride);\n Store16x4_SSE2(&q0, &q1, &q2, &q3, u, v, stride);\n}\n\nstatic void VFilter8i_SSE2(uint8_t* u, uint8_t* v, int stride,\n int thresh, int ithresh, int hev_thresh) {\n __m128i mask;\n __m128i t1, t2, p1, p0, q0, q1;\n\n // Load p3, p2, p1, p0\n LOADUV_H_EDGES4(u, v, stride, t2, t1, p1, p0);\n MAX_DIFF1(t2, t1, p1, p0, mask);\n\n u += 4 * stride;\n v += 4 * stride;\n\n // Load q0, q1, q2, q3\n LOADUV_H_EDGES4(u, v, stride, q0, q1, t1, t2);\n MAX_DIFF2(t2, t1, q1, q0, mask);\n\n ComplexMask_SSE2(&p1, &p0, &q0, &q1, thresh, ithresh, &mask);\n DoFilter4_SSE2(&p1, &p0, &q0, &q1, &mask, hev_thresh);\n\n // Store\n STOREUV(p1, u, v, -2 * stride);\n STOREUV(p0, u, v, -1 * stride);\n STOREUV(q0, u, v, 0 * stride);\n STOREUV(q1, u, v, 1 * stride);\n}\n\nstatic void HFilter8i_SSE2(uint8_t* u, uint8_t* v, int stride,\n int thresh, int ithresh, int hev_thresh) {\n __m128i mask;\n __m128i t1, t2, p1, p0, q0, q1;\n Load16x4_SSE2(u, v, stride, &t2, &t1, &p1, &p0); // p3, p2, p1, p0\n MAX_DIFF1(t2, t1, p1, p0, mask);\n\n u += 4; // beginning of q0\n v += 4;\n Load16x4_SSE2(u, v, stride, &q0, &q1, &t1, &t2); // q0, q1, q2, q3\n MAX_DIFF2(t2, t1, q1, q0, mask);\n\n ComplexMask_SSE2(&p1, &p0, &q0, &q1, thresh, ithresh, &mask);\n DoFilter4_SSE2(&p1, &p0, &q0, &q1, &mask, hev_thresh);\n\n u -= 2; // beginning of p1\n v -= 2;\n Store16x4_SSE2(&p1, &p0, &q0, &q1, u, v, stride);\n}\n\n//------------------------------------------------------------------------------\n// 4x4 predictions\n\n#define DST(x, y) dst[(x) + (y) * BPS]\n#define AVG3(a, b, c) (((a) + 2 * (b) + (c) + 2) >> 2)\n\n// We use the following 8b-arithmetic tricks:\n// (a + 2 * b + c + 2) >> 2 = (AC + b + 1) >> 1\n// where: AC = (a + c) >> 1 = [(a + c + 1) >> 1] - [(a^c) & 1]\n// and:\n// (a + 2 * b + c + 2) >> 2 = (AB + BC + 1) >> 1 - (ab|bc)&lsb\n// where: AC = (a + b + 1) >> 1, BC = (b + c + 1) >> 1\n// and ab = a ^ b, bc = b ^ c, lsb = (AC^BC)&1\n\nstatic void VE4_SSE2(uint8_t* dst) { // vertical\n const __m128i one = _mm_set1_epi8(1);\n const __m128i ABCDEFGH = _mm_loadl_epi64((__m128i*)(dst - BPS - 1));\n const __m128i BCDEFGH0 = _mm_srli_si128(ABCDEFGH, 1);\n const __m128i CDEFGH00 = _mm_srli_si128(ABCDEFGH, 2);\n const __m128i a = _mm_avg_epu8(ABCDEFGH, CDEFGH00);\n const __m128i lsb = _mm_and_si128(_mm_xor_si128(ABCDEFGH, CDEFGH00), one);\n const __m128i b = _mm_subs_epu8(a, lsb);\n const __m128i avg = _mm_avg_epu8(b, BCDEFGH0);\n const uint32_t vals = _mm_cvtsi128_si32(avg);\n int i;\n for (i = 0; i < 4; ++i) {\n WebPUint32ToMem(dst + i * BPS, vals);\n }\n}\n\nstatic void LD4_SSE2(uint8_t* dst) { // Down-Left\n const __m128i one = _mm_set1_epi8(1);\n const __m128i ABCDEFGH = _mm_loadl_epi64((__m128i*)(dst - BPS));\n const __m128i BCDEFGH0 = _mm_srli_si128(ABCDEFGH, 1);\n const __m128i CDEFGH00 = _mm_srli_si128(ABCDEFGH, 2);\n const __m128i CDEFGHH0 = _mm_insert_epi16(CDEFGH00, dst[-BPS + 7], 3);\n const __m128i avg1 = _mm_avg_epu8(ABCDEFGH, CDEFGHH0);\n const __m128i lsb = _mm_and_si128(_mm_xor_si128(ABCDEFGH, CDEFGHH0), one);\n const __m128i avg2 = _mm_subs_epu8(avg1, lsb);\n const __m128i abcdefg = _mm_avg_epu8(avg2, BCDEFGH0);\n WebPUint32ToMem(dst + 0 * BPS, _mm_cvtsi128_si32( abcdefg ));\n WebPUint32ToMem(dst + 1 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(abcdefg, 1)));\n WebPUint32ToMem(dst + 2 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(abcdefg, 2)));\n WebPUint32ToMem(dst + 3 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(abcdefg, 3)));\n}\n\nstatic void VR4_SSE2(uint8_t* dst) { // Vertical-Right\n const __m128i one = _mm_set1_epi8(1);\n const int I = dst[-1 + 0 * BPS];\n const int J = dst[-1 + 1 * BPS];\n const int K = dst[-1 + 2 * BPS];\n const int X = dst[-1 - BPS];\n const __m128i XABCD = _mm_loadl_epi64((__m128i*)(dst - BPS - 1));\n const __m128i ABCD0 = _mm_srli_si128(XABCD, 1);\n const __m128i abcd = _mm_avg_epu8(XABCD, ABCD0);\n const __m128i _XABCD = _mm_slli_si128(XABCD, 1);\n const __m128i IXABCD = _mm_insert_epi16(_XABCD, (short)(I | (X << 8)), 0);\n const __m128i avg1 = _mm_avg_epu8(IXABCD, ABCD0);\n const __m128i lsb = _mm_and_si128(_mm_xor_si128(IXABCD, ABCD0), one);\n const __m128i avg2 = _mm_subs_epu8(avg1, lsb);\n const __m128i efgh = _mm_avg_epu8(avg2, XABCD);\n WebPUint32ToMem(dst + 0 * BPS, _mm_cvtsi128_si32( abcd ));\n WebPUint32ToMem(dst + 1 * BPS, _mm_cvtsi128_si32( efgh ));\n WebPUint32ToMem(dst + 2 * BPS, _mm_cvtsi128_si32(_mm_slli_si128(abcd, 1)));\n WebPUint32ToMem(dst + 3 * BPS, _mm_cvtsi128_si32(_mm_slli_si128(efgh, 1)));\n\n // these two are hard to implement in SSE2, so we keep the C-version:\n DST(0, 2) = AVG3(J, I, X);\n DST(0, 3) = AVG3(K, J, I);\n}\n\nstatic void VL4_SSE2(uint8_t* dst) { // Vertical-Left\n const __m128i one = _mm_set1_epi8(1);\n const __m128i ABCDEFGH = _mm_loadl_epi64((__m128i*)(dst - BPS));\n const __m128i BCDEFGH_ = _mm_srli_si128(ABCDEFGH, 1);\n const __m128i CDEFGH__ = _mm_srli_si128(ABCDEFGH, 2);\n const __m128i avg1 = _mm_avg_epu8(ABCDEFGH, BCDEFGH_);\n const __m128i avg2 = _mm_avg_epu8(CDEFGH__, BCDEFGH_);\n const __m128i avg3 = _mm_avg_epu8(avg1, avg2);\n const __m128i lsb1 = _mm_and_si128(_mm_xor_si128(avg1, avg2), one);\n const __m128i ab = _mm_xor_si128(ABCDEFGH, BCDEFGH_);\n const __m128i bc = _mm_xor_si128(CDEFGH__, BCDEFGH_);\n const __m128i abbc = _mm_or_si128(ab, bc);\n const __m128i lsb2 = _mm_and_si128(abbc, lsb1);\n const __m128i avg4 = _mm_subs_epu8(avg3, lsb2);\n const uint32_t extra_out = _mm_cvtsi128_si32(_mm_srli_si128(avg4, 4));\n WebPUint32ToMem(dst + 0 * BPS, _mm_cvtsi128_si32( avg1 ));\n WebPUint32ToMem(dst + 1 * BPS, _mm_cvtsi128_si32( avg4 ));\n WebPUint32ToMem(dst + 2 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(avg1, 1)));\n WebPUint32ToMem(dst + 3 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(avg4, 1)));\n\n // these two are hard to get and irregular\n DST(3, 2) = (extra_out >> 0) & 0xff;\n DST(3, 3) = (extra_out >> 8) & 0xff;\n}\n\nstatic void RD4_SSE2(uint8_t* dst) { // Down-right\n const __m128i one = _mm_set1_epi8(1);\n const __m128i XABCD = _mm_loadl_epi64((__m128i*)(dst - BPS - 1));\n const __m128i ____XABCD = _mm_slli_si128(XABCD, 4);\n const uint32_t I = dst[-1 + 0 * BPS];\n const uint32_t J = dst[-1 + 1 * BPS];\n const uint32_t K = dst[-1 + 2 * BPS];\n const uint32_t L = dst[-1 + 3 * BPS];\n const __m128i LKJI_____ =\n _mm_cvtsi32_si128(L | (K << 8) | (J << 16) | (I << 24));\n const __m128i LKJIXABCD = _mm_or_si128(LKJI_____, ____XABCD);\n const __m128i KJIXABCD_ = _mm_srli_si128(LKJIXABCD, 1);\n const __m128i JIXABCD__ = _mm_srli_si128(LKJIXABCD, 2);\n const __m128i avg1 = _mm_avg_epu8(JIXABCD__, LKJIXABCD);\n const __m128i lsb = _mm_and_si128(_mm_xor_si128(JIXABCD__, LKJIXABCD), one);\n const __m128i avg2 = _mm_subs_epu8(avg1, lsb);\n const __m128i abcdefg = _mm_avg_epu8(avg2, KJIXABCD_);\n WebPUint32ToMem(dst + 3 * BPS, _mm_cvtsi128_si32( abcdefg ));\n WebPUint32ToMem(dst + 2 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(abcdefg, 1)));\n WebPUint32ToMem(dst + 1 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(abcdefg, 2)));\n WebPUint32ToMem(dst + 0 * BPS, _mm_cvtsi128_si32(_mm_srli_si128(abcdefg, 3)));\n}\n\n#undef DST\n#undef AVG3\n\n//------------------------------------------------------------------------------\n// Luma 16x16\n\nstatic WEBP_INLINE void TrueMotion_SSE2(uint8_t* dst, int size) {\n const uint8_t* top = dst - BPS;\n const __m128i zero = _mm_setzero_si128();\n int y;\n if (size == 4) {\n const __m128i top_values = _mm_cvtsi32_si128(WebPMemToUint32(top));\n const __m128i top_base = _mm_unpacklo_epi8(top_values, zero);\n for (y = 0; y < 4; ++y, dst += BPS) {\n const int val = dst[-1] - top[-1];\n const __m128i base = _mm_set1_epi16(val);\n const __m128i out = _mm_packus_epi16(_mm_add_epi16(base, top_base), zero);\n WebPUint32ToMem(dst, _mm_cvtsi128_si32(out));\n }\n } else if (size == 8) {\n const __m128i top_values = _mm_loadl_epi64((const __m128i*)top);\n const __m128i top_base = _mm_unpacklo_epi8(top_values, zero);\n for (y = 0; y < 8; ++y, dst += BPS) {\n const int val = dst[-1] - top[-1];\n const __m128i base = _mm_set1_epi16(val);\n const __m128i out = _mm_packus_epi16(_mm_add_epi16(base, top_base), zero);\n _mm_storel_epi64((__m128i*)dst, out);\n }\n } else {\n const __m128i top_values = _mm_loadu_si128((const __m128i*)top);\n const __m128i top_base_0 = _mm_unpacklo_epi8(top_values, zero);\n const __m128i top_base_1 = _mm_unpackhi_epi8(top_values, zero);\n for (y = 0; y < 16; ++y, dst += BPS) {\n const int val = dst[-1] - top[-1];\n const __m128i base = _mm_set1_epi16(val);\n const __m128i out_0 = _mm_add_epi16(base, top_base_0);\n const __m128i out_1 = _mm_add_epi16(base, top_base_1);\n const __m128i out = _mm_packus_epi16(out_0, out_1);\n _mm_storeu_si128((__m128i*)dst, out);\n }\n }\n}\n\nstatic void TM4_SSE2(uint8_t* dst) { TrueMotion_SSE2(dst, 4); }\nstatic void TM8uv_SSE2(uint8_t* dst) { TrueMotion_SSE2(dst, 8); }\nstatic void TM16_SSE2(uint8_t* dst) { TrueMotion_SSE2(dst, 16); }\n\nstatic void VE16_SSE2(uint8_t* dst) {\n const __m128i top = _mm_loadu_si128((const __m128i*)(dst - BPS));\n int j;\n for (j = 0; j < 16; ++j) {\n _mm_storeu_si128((__m128i*)(dst + j * BPS), top);\n }\n}\n\nstatic void HE16_SSE2(uint8_t* dst) { // horizontal\n int j;\n for (j = 16; j > 0; --j) {\n const __m128i values = _mm_set1_epi8(dst[-1]);\n _mm_storeu_si128((__m128i*)dst, values);\n dst += BPS;\n }\n}\n\nstatic WEBP_INLINE void Put16_SSE2(uint8_t v, uint8_t* dst) {\n int j;\n const __m128i values = _mm_set1_epi8(v);\n for (j = 0; j < 16; ++j) {\n _mm_storeu_si128((__m128i*)(dst + j * BPS), values);\n }\n}\n\nstatic void DC16_SSE2(uint8_t* dst) { // DC\n const __m128i zero = _mm_setzero_si128();\n const __m128i top = _mm_loadu_si128((const __m128i*)(dst - BPS));\n const __m128i sad8x2 = _mm_sad_epu8(top, zero);\n // sum the two sads: sad8x2[0:1] + sad8x2[8:9]\n const __m128i sum = _mm_add_epi16(sad8x2, _mm_shuffle_epi32(sad8x2, 2));\n int left = 0;\n int j;\n for (j = 0; j < 16; ++j) {\n left += dst[-1 + j * BPS];\n }\n {\n const int DC = _mm_cvtsi128_si32(sum) + left + 16;\n Put16_SSE2(DC >> 5, dst);\n }\n}\n\nstatic void DC16NoTop_SSE2(uint8_t* dst) { // DC with top samples unavailable\n int DC = 8;\n int j;\n for (j = 0; j < 16; ++j) {\n DC += dst[-1 + j * BPS];\n }\n Put16_SSE2(DC >> 4, dst);\n}\n\nstatic void DC16NoLeft_SSE2(uint8_t* dst) { // DC with left samples unavailable\n const __m128i zero = _mm_setzero_si128();\n const __m128i top = _mm_loadu_si128((const __m128i*)(dst - BPS));\n const __m128i sad8x2 = _mm_sad_epu8(top, zero);\n // sum the two sads: sad8x2[0:1] + sad8x2[8:9]\n const __m128i sum = _mm_add_epi16(sad8x2, _mm_shuffle_epi32(sad8x2, 2));\n const int DC = _mm_cvtsi128_si32(sum) + 8;\n Put16_SSE2(DC >> 4, dst);\n}\n\nstatic void DC16NoTopLeft_SSE2(uint8_t* dst) { // DC with no top & left samples\n Put16_SSE2(0x80, dst);\n}\n\n//------------------------------------------------------------------------------\n// Chroma\n\nstatic void VE8uv_SSE2(uint8_t* dst) { // vertical\n int j;\n const __m128i top = _mm_loadl_epi64((const __m128i*)(dst - BPS));\n for (j = 0; j < 8; ++j) {\n _mm_storel_epi64((__m128i*)(dst + j * BPS), top);\n }\n}\n\n// helper for chroma-DC predictions\nstatic WEBP_INLINE void Put8x8uv_SSE2(uint8_t v, uint8_t* dst) {\n int j;\n const __m128i values = _mm_set1_epi8(v);\n for (j = 0; j < 8; ++j) {\n _mm_storel_epi64((__m128i*)(dst + j * BPS), values);\n }\n}\n\nstatic void DC8uv_SSE2(uint8_t* dst) { // DC\n const __m128i zero = _mm_setzero_si128();\n const __m128i top = _mm_loadl_epi64((const __m128i*)(dst - BPS));\n const __m128i sum = _mm_sad_epu8(top, zero);\n int left = 0;\n int j;\n for (j = 0; j < 8; ++j) {\n left += dst[-1 + j * BPS];\n }\n {\n const int DC = _mm_cvtsi128_si32(sum) + left + 8;\n Put8x8uv_SSE2(DC >> 4, dst);\n }\n}\n\nstatic void DC8uvNoLeft_SSE2(uint8_t* dst) { // DC with no left samples\n const __m128i zero = _mm_setzero_si128();\n const __m128i top = _mm_loadl_epi64((const __m128i*)(dst - BPS));\n const __m128i sum = _mm_sad_epu8(top, zero);\n const int DC = _mm_cvtsi128_si32(sum) + 4;\n Put8x8uv_SSE2(DC >> 3, dst);\n}\n\nstatic void DC8uvNoTop_SSE2(uint8_t* dst) { // DC with no top samples\n int dc0 = 4;\n int i;\n for (i = 0; i < 8; ++i) {\n dc0 += dst[-1 + i * BPS];\n }\n Put8x8uv_SSE2(dc0 >> 3, dst);\n}\n\nstatic void DC8uvNoTopLeft_SSE2(uint8_t* dst) { // DC with nothing\n Put8x8uv_SSE2(0x80, dst);\n}\n\n//------------------------------------------------------------------------------\n// Entry point\n\nextern void VP8DspInitSSE2(void);\n\nWEBP_TSAN_IGNORE_FUNCTION void VP8DspInitSSE2(void) {\n VP8Transform = Transform_SSE2;\n#if (USE_TRANSFORM_AC3 == 1)\n VP8TransformAC3 = TransformAC3_SSE2;\n#endif\n\n VP8VFilter16 = VFilter16_SSE2;\n VP8HFilter16 = HFilter16_SSE2;\n VP8VFilter8 = VFilter8_SSE2;\n VP8HFilter8 = HFilter8_SSE2;\n VP8VFilter16i = VFilter16i_SSE2;\n VP8HFilter16i = HFilter16i_SSE2;\n VP8VFilter8i = VFilter8i_SSE2;\n VP8HFilter8i = HFilter8i_SSE2;\n\n VP8SimpleVFilter16 = SimpleVFilter16_SSE2;\n VP8SimpleHFilter16 = SimpleHFilter16_SSE2;\n VP8SimpleVFilter16i = SimpleVFilter16i_SSE2;\n VP8SimpleHFilter16i = SimpleHFilter16i_SSE2;\n\n VP8PredLuma4[1] = TM4_SSE2;\n VP8PredLuma4[2] = VE4_SSE2;\n VP8PredLuma4[4] = RD4_SSE2;\n VP8PredLuma4[5] = VR4_SSE2;\n VP8PredLuma4[6] = LD4_SSE2;\n VP8PredLuma4[7] = VL4_SSE2;\n\n VP8PredLuma16[0] = DC16_SSE2;\n VP8PredLuma16[1] = TM16_SSE2;\n VP8PredLuma16[2] = VE16_SSE2;\n VP8PredLuma16[3] = HE16_SSE2;\n VP8PredLuma16[4] = DC16NoTop_SSE2;\n VP8PredLuma16[5] = DC16NoLeft_SSE2;\n VP8PredLuma16[6] = DC16NoTopLeft_SSE2;\n\n VP8PredChroma8[0] = DC8uv_SSE2;\n VP8PredChroma8[1] = TM8uv_SSE2;\n VP8PredChroma8[2] = VE8uv_SSE2;\n VP8PredChroma8[4] = DC8uvNoTop_SSE2;\n VP8PredChroma8[5] = DC8uvNoLeft_SSE2;\n VP8PredChroma8[6] = DC8uvNoTopLeft_SSE2;\n}\n\n#else // !WEBP_USE_SSE2\n\nWEBP_DSP_INIT_STUB(VP8DspInitSSE2)\n\n#endif // WEBP_USE_SSE2\n"} +{"text": "/*\n * The MIT License\n *\n * Copyright (c) 2009-2020 PrimeTek\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\npackage org.primefaces.model.chart;\n\nimport java.util.ArrayList;\nimport java.util.List;\nimport java.util.Map;\n\npublic class DonutChartModel extends ChartModel {\n\n private static final long serialVersionUID = 1L;\n\n private List<Map<String, Number>> data;\n private int sliceMargin;\n private boolean fill = true;\n private boolean showDataLabels = false;\n private String dataFormat;\n private String dataLabelFormatString;\n private int dataLabelThreshold;\n private boolean showDatatip = true;\n private String datatipFormat = \"%s - %d\";\n private String datatipEditor;\n\n public DonutChartModel() {\n data = new ArrayList<>();\n }\n\n public DonutChartModel(List<Map<String, Number>> data) {\n this.data = data;\n }\n\n public List<Map<String, Number>> getData() {\n return data;\n }\n\n public void setData(List<Map<String, Number>> data) {\n this.data = data;\n }\n\n public void addCircle(Map<String, Number> circle) {\n this.data.add(circle);\n }\n\n public void clear() {\n this.data.clear();\n }\n\n public int getSliceMargin() {\n return sliceMargin;\n }\n\n public void setSliceMargin(int sliceMargin) {\n this.sliceMargin = sliceMargin;\n }\n\n public boolean isFill() {\n return fill;\n }\n\n public void setFill(boolean fill) {\n this.fill = fill;\n }\n\n public boolean isShowDataLabels() {\n return showDataLabels;\n }\n\n public void setShowDataLabels(boolean showDataLabels) {\n this.showDataLabels = showDataLabels;\n }\n\n public String getDataFormat() {\n return dataFormat;\n }\n\n public void setDataFormat(String dataFormat) {\n this.dataFormat = dataFormat;\n }\n\n public String getDataLabelFormatString() {\n return dataLabelFormatString;\n }\n\n public void setDataLabelFormatString(String dataLabelFormatString) {\n this.dataLabelFormatString = dataLabelFormatString;\n }\n\n public int getDataLabelThreshold() {\n return dataLabelThreshold;\n }\n\n public void setDataLabelThreshold(int dataLabelThreshold) {\n this.dataLabelThreshold = dataLabelThreshold;\n }\n\n public boolean isShowDatatip() {\n return showDatatip;\n }\n\n public void setShowDatatip(boolean showDatatip) {\n this.showDatatip = showDatatip;\n }\n\n public String getDatatipFormat() {\n return datatipFormat;\n }\n\n public void setDatatipFormat(String datatipFormat) {\n this.datatipFormat = datatipFormat;\n }\n\n public String getDatatipEditor() {\n return datatipEditor;\n }\n\n public void setDatatipEditor(String datatipEditor) {\n this.datatipEditor = datatipEditor;\n }\n}\n"} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<xsl:stylesheet version=\"1.0\" xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"\n xmlns:msxsl=\"urn:schemas-microsoft-com:xslt\" exclude-result-prefixes=\"msxsl\"\n>\n <xsl:output method=\"xml\" indent=\"yes\"/>\n\n <xsl:template match=\"/\">\n <FinalProducts>\n <xsl:for-each select=\"Products/Product\">\n <FinalProduct name=\"{@name}\" description=\"{@description}\">\n </FinalProduct>\n </xsl:for-each>\n </FinalProducts>\n </xsl:template>\n</xsl:stylesheet>\n"} +{"text": "package org.infinispan.tools.store.migrator.marshaller.common;\n\nimport java.io.IOException;\nimport java.io.InputStream;\nimport java.io.ObjectInput;\nimport java.io.ObjectOutput;\nimport java.io.OutputStream;\n\nimport org.infinispan.commons.dataconversion.MediaType;\nimport org.infinispan.commons.io.ByteBuffer;\nimport org.infinispan.commons.marshall.AbstractMarshaller;\nimport org.infinispan.commons.marshall.StreamingMarshaller;\n\n/**\n * An implementation of {@link AbstractMarshaller} that throws {@link UnsupportedOperationException} for all methods.\n *\n * @author Ryan Emerson\n * @since 10.0\n */\nabstract public class AbstractUnsupportedStreamingMarshaller extends AbstractMarshaller implements StreamingMarshaller {\n\n @Override\n public void start() {\n }\n\n @Override\n public void stop() {\n }\n\n @Override\n protected ByteBuffer objectToBuffer(Object o, int estimatedSize) throws IOException, InterruptedException {\n throw new UnsupportedOperationException();\n }\n\n @Override\n public ObjectOutput startObjectOutput(OutputStream os, boolean isReentrant, int estimatedSize) throws IOException {\n throw new UnsupportedOperationException();\n }\n\n @Override\n public void finishObjectOutput(ObjectOutput oo) {\n throw new UnsupportedOperationException();\n }\n\n @Override\n public void objectToObjectStream(Object obj, ObjectOutput out) throws IOException {\n throw new UnsupportedOperationException();\n }\n\n @Override\n public ObjectInput startObjectInput(InputStream is, boolean isReentrant) throws IOException {\n throw new UnsupportedOperationException();\n }\n\n @Override\n public void finishObjectInput(ObjectInput oi) {\n throw new UnsupportedOperationException();\n }\n\n @Override\n public Object objectFromObjectStream(ObjectInput in) throws IOException, ClassNotFoundException, InterruptedException {\n throw new UnsupportedOperationException();\n }\n\n @Override\n public Object objectFromByteBuffer(byte[] buf, int offset, int length) throws IOException, ClassNotFoundException {\n throw new UnsupportedOperationException();\n }\n\n @Override\n public boolean isMarshallable(Object o) throws Exception {\n throw new UnsupportedOperationException();\n }\n\n @Override\n public MediaType mediaType() {\n throw new UnsupportedOperationException();\n }\n}\n"} +{"text": "<?php\n/*\n * Copyright 2014 Google Inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n * use this file except in compliance with the License. You may obtain a copy of\n * the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */\n\nclass Google_Service_Dns_ManagedZonePrivateVisibilityConfigNetwork extends Google_Model\n{\n public $kind;\n public $networkUrl;\n\n public function setKind($kind)\n {\n $this->kind = $kind;\n }\n public function getKind()\n {\n return $this->kind;\n }\n public function setNetworkUrl($networkUrl)\n {\n $this->networkUrl = $networkUrl;\n }\n public function getNetworkUrl()\n {\n return $this->networkUrl;\n }\n}\n"} +{"text": "/*\n * PowerPC64 LPAR Configuration Information Driver\n *\n * Dave Engebretsen engebret@us.ibm.com\n * Copyright (c) 2003 Dave Engebretsen\n * Will Schmidt willschm@us.ibm.com\n * SPLPAR updates, Copyright (c) 2003 Will Schmidt IBM Corporation.\n * seq_file updates, Copyright (c) 2004 Will Schmidt IBM Corporation.\n * Nathan Lynch nathanl@austin.ibm.com\n * Added lparcfg_write, Copyright (C) 2004 Nathan Lynch IBM Corporation.\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; either version\n * 2 of the License, or (at your option) any later version.\n *\n * This driver creates a proc file at /proc/ppc64/lparcfg which contains\n * keyword - value pairs that specify the configuration of the partition.\n */\n\n#include <linux/module.h>\n#include <linux/types.h>\n#include <linux/errno.h>\n#include <linux/proc_fs.h>\n#include <linux/init.h>\n#include <linux/seq_file.h>\n#include <asm/uaccess.h>\n#include <asm/iseries/hv_lp_config.h>\n#include <asm/lppaca.h>\n#include <asm/hvcall.h>\n#include <asm/firmware.h>\n#include <asm/rtas.h>\n#include <asm/system.h>\n#include <asm/time.h>\n#include <asm/prom.h>\n#include <asm/vdso_datapage.h>\n#include <asm/vio.h>\n#include <asm/mmu.h>\n\n#define MODULE_VERS \"1.8\"\n#define MODULE_NAME \"lparcfg\"\n\n/* #define LPARCFG_DEBUG */\n\nstatic struct proc_dir_entry *proc_ppc64_lparcfg;\n\n/*\n * Track sum of all purrs across all processors. This is used to further\n * calculate usage values by different applications\n */\nstatic unsigned long get_purr(void)\n{\n\tunsigned long sum_purr = 0;\n\tint cpu;\n\n\tfor_each_possible_cpu(cpu) {\n\t\tif (firmware_has_feature(FW_FEATURE_ISERIES))\n\t\t\tsum_purr += lppaca[cpu].emulated_time_base;\n\t\telse {\n\t\t\tstruct cpu_usage *cu;\n\n\t\t\tcu = &per_cpu(cpu_usage_array, cpu);\n\t\t\tsum_purr += cu->current_tb;\n\t\t}\n\t}\n\treturn sum_purr;\n}\n\n#ifdef CONFIG_PPC_ISERIES\n\n/*\n * Methods used to fetch LPAR data when running on an iSeries platform.\n */\nstatic int iseries_lparcfg_data(struct seq_file *m, void *v)\n{\n\tunsigned long pool_id;\n\tint shared, entitled_capacity, max_entitled_capacity;\n\tint processors, max_processors;\n\tunsigned long purr = get_purr();\n\n\tshared = (int)(local_paca->lppaca_ptr->shared_proc);\n\n\tseq_printf(m, \"system_active_processors=%d\\n\",\n\t\t (int)HvLpConfig_getSystemPhysicalProcessors());\n\n\tseq_printf(m, \"system_potential_processors=%d\\n\",\n\t\t (int)HvLpConfig_getSystemPhysicalProcessors());\n\n\tprocessors = (int)HvLpConfig_getPhysicalProcessors();\n\tseq_printf(m, \"partition_active_processors=%d\\n\", processors);\n\n\tmax_processors = (int)HvLpConfig_getMaxPhysicalProcessors();\n\tseq_printf(m, \"partition_potential_processors=%d\\n\", max_processors);\n\n\tif (shared) {\n\t\tentitled_capacity = HvLpConfig_getSharedProcUnits();\n\t\tmax_entitled_capacity = HvLpConfig_getMaxSharedProcUnits();\n\t} else {\n\t\tentitled_capacity = processors * 100;\n\t\tmax_entitled_capacity = max_processors * 100;\n\t}\n\tseq_printf(m, \"partition_entitled_capacity=%d\\n\", entitled_capacity);\n\n\tseq_printf(m, \"partition_max_entitled_capacity=%d\\n\",\n\t\t max_entitled_capacity);\n\n\tif (shared) {\n\t\tpool_id = HvLpConfig_getSharedPoolIndex();\n\t\tseq_printf(m, \"pool=%d\\n\", (int)pool_id);\n\t\tseq_printf(m, \"pool_capacity=%d\\n\",\n\t\t\t (int)(HvLpConfig_getNumProcsInSharedPool(pool_id) *\n\t\t\t\t 100));\n\t\tseq_printf(m, \"purr=%ld\\n\", purr);\n\t}\n\n\tseq_printf(m, \"shared_processor_mode=%d\\n\", shared);\n\n\treturn 0;\n}\n\n#else\t\t\t\t/* CONFIG_PPC_ISERIES */\n\nstatic int iseries_lparcfg_data(struct seq_file *m, void *v)\n{\n\treturn 0;\n}\n\n#endif\t\t\t\t/* CONFIG_PPC_ISERIES */\n\n#ifdef CONFIG_PPC_PSERIES\n/*\n * Methods used to fetch LPAR data when running on a pSeries platform.\n */\n/**\n * h_get_mpp\n * H_GET_MPP hcall returns info in 7 parms\n */\nint h_get_mpp(struct hvcall_mpp_data *mpp_data)\n{\n\tint rc;\n\tunsigned long retbuf[PLPAR_HCALL9_BUFSIZE];\n\n\trc = plpar_hcall9(H_GET_MPP, retbuf);\n\n\tmpp_data->entitled_mem = retbuf[0];\n\tmpp_data->mapped_mem = retbuf[1];\n\n\tmpp_data->group_num = (retbuf[2] >> 2 * 8) & 0xffff;\n\tmpp_data->pool_num = retbuf[2] & 0xffff;\n\n\tmpp_data->mem_weight = (retbuf[3] >> 7 * 8) & 0xff;\n\tmpp_data->unallocated_mem_weight = (retbuf[3] >> 6 * 8) & 0xff;\n\tmpp_data->unallocated_entitlement = retbuf[3] & 0xffffffffffff;\n\n\tmpp_data->pool_size = retbuf[4];\n\tmpp_data->loan_request = retbuf[5];\n\tmpp_data->backing_mem = retbuf[6];\n\n\treturn rc;\n}\nEXPORT_SYMBOL(h_get_mpp);\n\nstruct hvcall_ppp_data {\n\tu64\tentitlement;\n\tu64\tunallocated_entitlement;\n\tu16\tgroup_num;\n\tu16\tpool_num;\n\tu8\tcapped;\n\tu8\tweight;\n\tu8\tunallocated_weight;\n\tu16\tactive_procs_in_pool;\n\tu16\tactive_system_procs;\n\tu16\tphys_platform_procs;\n\tu32\tmax_proc_cap_avail;\n\tu32\tentitled_proc_cap_avail;\n};\n\n/*\n * H_GET_PPP hcall returns info in 4 parms.\n * entitled_capacity,unallocated_capacity,\n * aggregation, resource_capability).\n *\n * R4 = Entitled Processor Capacity Percentage.\n * R5 = Unallocated Processor Capacity Percentage.\n * R6 (AABBCCDDEEFFGGHH).\n * XXXX - reserved (0)\n * XXXX - reserved (0)\n * XXXX - Group Number\n * XXXX - Pool Number.\n * R7 (IIJJKKLLMMNNOOPP).\n * XX - reserved. (0)\n * XX - bit 0-6 reserved (0). bit 7 is Capped indicator.\n * XX - variable processor Capacity Weight\n * XX - Unallocated Variable Processor Capacity Weight.\n * XXXX - Active processors in Physical Processor Pool.\n * XXXX - Processors active on platform.\n * R8 (QQQQRRRRRRSSSSSS). if ibm,partition-performance-parameters-level >= 1\n *\tXXXX - Physical platform procs allocated to virtualization.\n *\t XXXXXX - Max procs capacity % available to the partitions pool.\n *\t XXXXXX - Entitled procs capacity % available to the\n *\t\t\t partitions pool.\n */\nstatic unsigned int h_get_ppp(struct hvcall_ppp_data *ppp_data)\n{\n\tunsigned long rc;\n\tunsigned long retbuf[PLPAR_HCALL9_BUFSIZE];\n\n\trc = plpar_hcall9(H_GET_PPP, retbuf);\n\n\tppp_data->entitlement = retbuf[0];\n\tppp_data->unallocated_entitlement = retbuf[1];\n\n\tppp_data->group_num = (retbuf[2] >> 2 * 8) & 0xffff;\n\tppp_data->pool_num = retbuf[2] & 0xffff;\n\n\tppp_data->capped = (retbuf[3] >> 6 * 8) & 0x01;\n\tppp_data->weight = (retbuf[3] >> 5 * 8) & 0xff;\n\tppp_data->unallocated_weight = (retbuf[3] >> 4 * 8) & 0xff;\n\tppp_data->active_procs_in_pool = (retbuf[3] >> 2 * 8) & 0xffff;\n\tppp_data->active_system_procs = retbuf[3] & 0xffff;\n\n\tppp_data->phys_platform_procs = retbuf[4] >> 6 * 8;\n\tppp_data->max_proc_cap_avail = (retbuf[4] >> 3 * 8) & 0xffffff;\n\tppp_data->entitled_proc_cap_avail = retbuf[4] & 0xffffff;\n\n\treturn rc;\n}\n\nstatic unsigned h_pic(unsigned long *pool_idle_time,\n\t\t unsigned long *num_procs)\n{\n\tunsigned long rc;\n\tunsigned long retbuf[PLPAR_HCALL_BUFSIZE];\n\n\trc = plpar_hcall(H_PIC, retbuf);\n\n\t*pool_idle_time = retbuf[0];\n\t*num_procs = retbuf[1];\n\n\treturn rc;\n}\n\n/*\n * parse_ppp_data\n * Parse out the data returned from h_get_ppp and h_pic\n */\nstatic void parse_ppp_data(struct seq_file *m)\n{\n\tstruct hvcall_ppp_data ppp_data;\n\tstruct device_node *root;\n\tconst int *perf_level;\n\tint rc;\n\n\trc = h_get_ppp(&ppp_data);\n\tif (rc)\n\t\treturn;\n\n\tseq_printf(m, \"partition_entitled_capacity=%lld\\n\",\n\t ppp_data.entitlement);\n\tseq_printf(m, \"group=%d\\n\", ppp_data.group_num);\n\tseq_printf(m, \"system_active_processors=%d\\n\",\n\t ppp_data.active_system_procs);\n\n\t/* pool related entries are apropriate for shared configs */\n\tif (lppaca[0].shared_proc) {\n\t\tunsigned long pool_idle_time, pool_procs;\n\n\t\tseq_printf(m, \"pool=%d\\n\", ppp_data.pool_num);\n\n\t\t/* report pool_capacity in percentage */\n\t\tseq_printf(m, \"pool_capacity=%d\\n\",\n\t\t\t ppp_data.active_procs_in_pool * 100);\n\n\t\th_pic(&pool_idle_time, &pool_procs);\n\t\tseq_printf(m, \"pool_idle_time=%ld\\n\", pool_idle_time);\n\t\tseq_printf(m, \"pool_num_procs=%ld\\n\", pool_procs);\n\t}\n\n\tseq_printf(m, \"unallocated_capacity_weight=%d\\n\",\n\t\t ppp_data.unallocated_weight);\n\tseq_printf(m, \"capacity_weight=%d\\n\", ppp_data.weight);\n\tseq_printf(m, \"capped=%d\\n\", ppp_data.capped);\n\tseq_printf(m, \"unallocated_capacity=%lld\\n\",\n\t\t ppp_data.unallocated_entitlement);\n\n\t/* The last bits of information returned from h_get_ppp are only\n\t * valid if the ibm,partition-performance-parameters-level\n\t * property is >= 1.\n\t */\n\troot = of_find_node_by_path(\"/\");\n\tif (root) {\n\t\tperf_level = of_get_property(root,\n\t\t\t\t\"ibm,partition-performance-parameters-level\",\n\t\t\t\t\t NULL);\n\t\tif (perf_level && (*perf_level >= 1)) {\n\t\t\tseq_printf(m,\n\t\t\t \"physical_procs_allocated_to_virtualization=%d\\n\",\n\t\t\t\t ppp_data.phys_platform_procs);\n\t\t\tseq_printf(m, \"max_proc_capacity_available=%d\\n\",\n\t\t\t\t ppp_data.max_proc_cap_avail);\n\t\t\tseq_printf(m, \"entitled_proc_capacity_available=%d\\n\",\n\t\t\t\t ppp_data.entitled_proc_cap_avail);\n\t\t}\n\n\t\tof_node_put(root);\n\t}\n}\n\n/**\n * parse_mpp_data\n * Parse out data returned from h_get_mpp\n */\nstatic void parse_mpp_data(struct seq_file *m)\n{\n\tstruct hvcall_mpp_data mpp_data;\n\tint rc;\n\n\trc = h_get_mpp(&mpp_data);\n\tif (rc)\n\t\treturn;\n\n\tseq_printf(m, \"entitled_memory=%ld\\n\", mpp_data.entitled_mem);\n\n\tif (mpp_data.mapped_mem != -1)\n\t\tseq_printf(m, \"mapped_entitled_memory=%ld\\n\",\n\t\t mpp_data.mapped_mem);\n\n\tseq_printf(m, \"entitled_memory_group_number=%d\\n\", mpp_data.group_num);\n\tseq_printf(m, \"entitled_memory_pool_number=%d\\n\", mpp_data.pool_num);\n\n\tseq_printf(m, \"entitled_memory_weight=%d\\n\", mpp_data.mem_weight);\n\tseq_printf(m, \"unallocated_entitled_memory_weight=%d\\n\",\n\t mpp_data.unallocated_mem_weight);\n\tseq_printf(m, \"unallocated_io_mapping_entitlement=%ld\\n\",\n\t mpp_data.unallocated_entitlement);\n\n\tif (mpp_data.pool_size != -1)\n\t\tseq_printf(m, \"entitled_memory_pool_size=%ld bytes\\n\",\n\t\t mpp_data.pool_size);\n\n\tseq_printf(m, \"entitled_memory_loan_request=%ld\\n\",\n\t mpp_data.loan_request);\n\n\tseq_printf(m, \"backing_memory=%ld bytes\\n\", mpp_data.backing_mem);\n}\n\n#define SPLPAR_CHARACTERISTICS_TOKEN 20\n#define SPLPAR_MAXLENGTH 1026*(sizeof(char))\n\n/*\n * parse_system_parameter_string()\n * Retrieve the potential_processors, max_entitled_capacity and friends\n * through the get-system-parameter rtas call. Replace keyword strings as\n * necessary.\n */\nstatic void parse_system_parameter_string(struct seq_file *m)\n{\n\tint call_status;\n\n\tunsigned char *local_buffer = kmalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);\n\tif (!local_buffer) {\n\t\tprintk(KERN_ERR \"%s %s kmalloc failure at line %d \\n\",\n\t\t __FILE__, __func__, __LINE__);\n\t\treturn;\n\t}\n\n\tspin_lock(&rtas_data_buf_lock);\n\tmemset(rtas_data_buf, 0, SPLPAR_MAXLENGTH);\n\tcall_status = rtas_call(rtas_token(\"ibm,get-system-parameter\"), 3, 1,\n\t\t\t\tNULL,\n\t\t\t\tSPLPAR_CHARACTERISTICS_TOKEN,\n\t\t\t\t__pa(rtas_data_buf),\n\t\t\t\tRTAS_DATA_BUF_SIZE);\n\tmemcpy(local_buffer, rtas_data_buf, SPLPAR_MAXLENGTH);\n\tspin_unlock(&rtas_data_buf_lock);\n\n\tif (call_status != 0) {\n\t\tprintk(KERN_INFO\n\t\t \"%s %s Error calling get-system-parameter (0x%x)\\n\",\n\t\t __FILE__, __func__, call_status);\n\t} else {\n\t\tint splpar_strlen;\n\t\tint idx, w_idx;\n\t\tchar *workbuffer = kzalloc(SPLPAR_MAXLENGTH, GFP_KERNEL);\n\t\tif (!workbuffer) {\n\t\t\tprintk(KERN_ERR \"%s %s kmalloc failure at line %d \\n\",\n\t\t\t __FILE__, __func__, __LINE__);\n\t\t\tkfree(local_buffer);\n\t\t\treturn;\n\t\t}\n#ifdef LPARCFG_DEBUG\n\t\tprintk(KERN_INFO \"success calling get-system-parameter \\n\");\n#endif\n\t\tsplpar_strlen = local_buffer[0] * 256 + local_buffer[1];\n\t\tlocal_buffer += 2;\t/* step over strlen value */\n\n\t\tw_idx = 0;\n\t\tidx = 0;\n\t\twhile ((*local_buffer) && (idx < splpar_strlen)) {\n\t\t\tworkbuffer[w_idx++] = local_buffer[idx++];\n\t\t\tif ((local_buffer[idx] == ',')\n\t\t\t || (local_buffer[idx] == '\\0')) {\n\t\t\t\tworkbuffer[w_idx] = '\\0';\n\t\t\t\tif (w_idx) {\n\t\t\t\t\t/* avoid the empty string */\n\t\t\t\t\tseq_printf(m, \"%s\\n\", workbuffer);\n\t\t\t\t}\n\t\t\t\tmemset(workbuffer, 0, SPLPAR_MAXLENGTH);\n\t\t\t\tidx++;\t/* skip the comma */\n\t\t\t\tw_idx = 0;\n\t\t\t} else if (local_buffer[idx] == '=') {\n\t\t\t\t/* code here to replace workbuffer contents\n\t\t\t\t with different keyword strings */\n\t\t\t\tif (0 == strcmp(workbuffer, \"MaxEntCap\")) {\n\t\t\t\t\tstrcpy(workbuffer,\n\t\t\t\t\t \"partition_max_entitled_capacity\");\n\t\t\t\t\tw_idx = strlen(workbuffer);\n\t\t\t\t}\n\t\t\t\tif (0 == strcmp(workbuffer, \"MaxPlatProcs\")) {\n\t\t\t\t\tstrcpy(workbuffer,\n\t\t\t\t\t \"system_potential_processors\");\n\t\t\t\t\tw_idx = strlen(workbuffer);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tkfree(workbuffer);\n\t\tlocal_buffer -= 2;\t/* back up over strlen value */\n\t}\n\tkfree(local_buffer);\n}\n\n/* Return the number of processors in the system.\n * This function reads through the device tree and counts\n * the virtual processors, this does not include threads.\n */\nstatic int lparcfg_count_active_processors(void)\n{\n\tstruct device_node *cpus_dn = NULL;\n\tint count = 0;\n\n\twhile ((cpus_dn = of_find_node_by_type(cpus_dn, \"cpu\"))) {\n#ifdef LPARCFG_DEBUG\n\t\tprintk(KERN_ERR \"cpus_dn %p \\n\", cpus_dn);\n#endif\n\t\tcount++;\n\t}\n\treturn count;\n}\n\nstatic void pseries_cmo_data(struct seq_file *m)\n{\n\tint cpu;\n\tunsigned long cmo_faults = 0;\n\tunsigned long cmo_fault_time = 0;\n\n\tseq_printf(m, \"cmo_enabled=%d\\n\", firmware_has_feature(FW_FEATURE_CMO));\n\n\tif (!firmware_has_feature(FW_FEATURE_CMO))\n\t\treturn;\n\n\tfor_each_possible_cpu(cpu) {\n\t\tcmo_faults += lppaca[cpu].cmo_faults;\n\t\tcmo_fault_time += lppaca[cpu].cmo_fault_time;\n\t}\n\n\tseq_printf(m, \"cmo_faults=%lu\\n\", cmo_faults);\n\tseq_printf(m, \"cmo_fault_time_usec=%lu\\n\",\n\t\t cmo_fault_time / tb_ticks_per_usec);\n\tseq_printf(m, \"cmo_primary_psp=%d\\n\", cmo_get_primary_psp());\n\tseq_printf(m, \"cmo_secondary_psp=%d\\n\", cmo_get_secondary_psp());\n\tseq_printf(m, \"cmo_page_size=%lu\\n\", cmo_get_page_size());\n}\n\nstatic void splpar_dispatch_data(struct seq_file *m)\n{\n\tint cpu;\n\tunsigned long dispatches = 0;\n\tunsigned long dispatch_dispersions = 0;\n\n\tfor_each_possible_cpu(cpu) {\n\t\tdispatches += lppaca[cpu].yield_count;\n\t\tdispatch_dispersions += lppaca[cpu].dispersion_count;\n\t}\n\n\tseq_printf(m, \"dispatches=%lu\\n\", dispatches);\n\tseq_printf(m, \"dispatch_dispersions=%lu\\n\", dispatch_dispersions);\n}\n\nstatic int pseries_lparcfg_data(struct seq_file *m, void *v)\n{\n\tint partition_potential_processors;\n\tint partition_active_processors;\n\tstruct device_node *rtas_node;\n\tconst int *lrdrp = NULL;\n\n\trtas_node = of_find_node_by_path(\"/rtas\");\n\tif (rtas_node)\n\t\tlrdrp = of_get_property(rtas_node, \"ibm,lrdr-capacity\", NULL);\n\n\tif (lrdrp == NULL) {\n\t\tpartition_potential_processors = vdso_data->processorCount;\n\t} else {\n\t\tpartition_potential_processors = *(lrdrp + 4);\n\t}\n\tof_node_put(rtas_node);\n\n\tpartition_active_processors = lparcfg_count_active_processors();\n\n\tif (firmware_has_feature(FW_FEATURE_SPLPAR)) {\n\t\t/* this call handles the ibm,get-system-parameter contents */\n\t\tparse_system_parameter_string(m);\n\t\tparse_ppp_data(m);\n\t\tparse_mpp_data(m);\n\t\tpseries_cmo_data(m);\n\t\tsplpar_dispatch_data(m);\n\n\t\tseq_printf(m, \"purr=%ld\\n\", get_purr());\n\t} else {\t\t/* non SPLPAR case */\n\n\t\tseq_printf(m, \"system_active_processors=%d\\n\",\n\t\t\t partition_potential_processors);\n\n\t\tseq_printf(m, \"system_potential_processors=%d\\n\",\n\t\t\t partition_potential_processors);\n\n\t\tseq_printf(m, \"partition_max_entitled_capacity=%d\\n\",\n\t\t\t partition_potential_processors * 100);\n\n\t\tseq_printf(m, \"partition_entitled_capacity=%d\\n\",\n\t\t\t partition_active_processors * 100);\n\t}\n\n\tseq_printf(m, \"partition_active_processors=%d\\n\",\n\t\t partition_active_processors);\n\n\tseq_printf(m, \"partition_potential_processors=%d\\n\",\n\t\t partition_potential_processors);\n\n\tseq_printf(m, \"shared_processor_mode=%d\\n\", lppaca[0].shared_proc);\n\n\tseq_printf(m, \"slb_size=%d\\n\", mmu_slb_size);\n\n\treturn 0;\n}\n\nstatic ssize_t update_ppp(u64 *entitlement, u8 *weight)\n{\n\tstruct hvcall_ppp_data ppp_data;\n\tu8 new_weight;\n\tu64 new_entitled;\n\tssize_t retval;\n\n\t/* Get our current parameters */\n\tretval = h_get_ppp(&ppp_data);\n\tif (retval)\n\t\treturn retval;\n\n\tif (entitlement) {\n\t\tnew_weight = ppp_data.weight;\n\t\tnew_entitled = *entitlement;\n\t} else if (weight) {\n\t\tnew_weight = *weight;\n\t\tnew_entitled = ppp_data.entitlement;\n\t} else\n\t\treturn -EINVAL;\n\n\tpr_debug(\"%s: current_entitled = %llu, current_weight = %u\\n\",\n\t\t __func__, ppp_data.entitlement, ppp_data.weight);\n\n\tpr_debug(\"%s: new_entitled = %llu, new_weight = %u\\n\",\n\t\t __func__, new_entitled, new_weight);\n\n\tretval = plpar_hcall_norets(H_SET_PPP, new_entitled, new_weight);\n\treturn retval;\n}\n\n/**\n * update_mpp\n *\n * Update the memory entitlement and weight for the partition. Caller must\n * specify either a new entitlement or weight, not both, to be updated\n * since the h_set_mpp call takes both entitlement and weight as parameters.\n */\nstatic ssize_t update_mpp(u64 *entitlement, u8 *weight)\n{\n\tstruct hvcall_mpp_data mpp_data;\n\tu64 new_entitled;\n\tu8 new_weight;\n\tssize_t rc;\n\n\tif (entitlement) {\n\t\t/* Check with vio to ensure the new memory entitlement\n\t\t * can be handled.\n\t\t */\n\t\trc = vio_cmo_entitlement_update(*entitlement);\n\t\tif (rc)\n\t\t\treturn rc;\n\t}\n\n\trc = h_get_mpp(&mpp_data);\n\tif (rc)\n\t\treturn rc;\n\n\tif (entitlement) {\n\t\tnew_weight = mpp_data.mem_weight;\n\t\tnew_entitled = *entitlement;\n\t} else if (weight) {\n\t\tnew_weight = *weight;\n\t\tnew_entitled = mpp_data.entitled_mem;\n\t} else\n\t\treturn -EINVAL;\n\n\tpr_debug(\"%s: current_entitled = %lu, current_weight = %u\\n\",\n\t __func__, mpp_data.entitled_mem, mpp_data.mem_weight);\n\n\tpr_debug(\"%s: new_entitled = %llu, new_weight = %u\\n\",\n\t\t __func__, new_entitled, new_weight);\n\n\trc = plpar_hcall_norets(H_SET_MPP, new_entitled, new_weight);\n\treturn rc;\n}\n\n/*\n * Interface for changing system parameters (variable capacity weight\n * and entitled capacity). Format of input is \"param_name=value\";\n * anything after value is ignored. Valid parameters at this time are\n * \"partition_entitled_capacity\" and \"capacity_weight\". We use\n * H_SET_PPP to alter parameters.\n *\n * This function should be invoked only on systems with\n * FW_FEATURE_SPLPAR.\n */\nstatic ssize_t lparcfg_write(struct file *file, const char __user * buf,\n\t\t\t size_t count, loff_t * off)\n{\n\tint kbuf_sz = 64;\n\tchar kbuf[kbuf_sz];\n\tchar *tmp;\n\tu64 new_entitled, *new_entitled_ptr = &new_entitled;\n\tu8 new_weight, *new_weight_ptr = &new_weight;\n\tssize_t retval;\n\n\tif (!firmware_has_feature(FW_FEATURE_SPLPAR) ||\n\t\t\tfirmware_has_feature(FW_FEATURE_ISERIES))\n\t\treturn -EINVAL;\n\n\tif (count > kbuf_sz)\n\t\treturn -EINVAL;\n\n\tif (copy_from_user(kbuf, buf, count))\n\t\treturn -EFAULT;\n\n\tkbuf[count - 1] = '\\0';\n\ttmp = strchr(kbuf, '=');\n\tif (!tmp)\n\t\treturn -EINVAL;\n\n\t*tmp++ = '\\0';\n\n\tif (!strcmp(kbuf, \"partition_entitled_capacity\")) {\n\t\tchar *endp;\n\t\t*new_entitled_ptr = (u64) simple_strtoul(tmp, &endp, 10);\n\t\tif (endp == tmp)\n\t\t\treturn -EINVAL;\n\n\t\tretval = update_ppp(new_entitled_ptr, NULL);\n\t} else if (!strcmp(kbuf, \"capacity_weight\")) {\n\t\tchar *endp;\n\t\t*new_weight_ptr = (u8) simple_strtoul(tmp, &endp, 10);\n\t\tif (endp == tmp)\n\t\t\treturn -EINVAL;\n\n\t\tretval = update_ppp(NULL, new_weight_ptr);\n\t} else if (!strcmp(kbuf, \"entitled_memory\")) {\n\t\tchar *endp;\n\t\t*new_entitled_ptr = (u64) simple_strtoul(tmp, &endp, 10);\n\t\tif (endp == tmp)\n\t\t\treturn -EINVAL;\n\n\t\tretval = update_mpp(new_entitled_ptr, NULL);\n\t} else if (!strcmp(kbuf, \"entitled_memory_weight\")) {\n\t\tchar *endp;\n\t\t*new_weight_ptr = (u8) simple_strtoul(tmp, &endp, 10);\n\t\tif (endp == tmp)\n\t\t\treturn -EINVAL;\n\n\t\tretval = update_mpp(NULL, new_weight_ptr);\n\t} else\n\t\treturn -EINVAL;\n\n\tif (retval == H_SUCCESS || retval == H_CONSTRAINED) {\n\t\tretval = count;\n\t} else if (retval == H_BUSY) {\n\t\tretval = -EBUSY;\n\t} else if (retval == H_HARDWARE) {\n\t\tretval = -EIO;\n\t} else if (retval == H_PARAMETER) {\n\t\tretval = -EINVAL;\n\t}\n\n\treturn retval;\n}\n\n#else\t\t\t\t/* CONFIG_PPC_PSERIES */\n\nstatic int pseries_lparcfg_data(struct seq_file *m, void *v)\n{\n\treturn 0;\n}\n\nstatic ssize_t lparcfg_write(struct file *file, const char __user * buf,\n\t\t\t size_t count, loff_t * off)\n{\n\treturn -EINVAL;\n}\n\n#endif\t\t\t\t/* CONFIG_PPC_PSERIES */\n\nstatic int lparcfg_data(struct seq_file *m, void *v)\n{\n\tstruct device_node *rootdn;\n\tconst char *model = \"\";\n\tconst char *system_id = \"\";\n\tconst char *tmp;\n\tconst unsigned int *lp_index_ptr;\n\tunsigned int lp_index = 0;\n\n\tseq_printf(m, \"%s %s \\n\", MODULE_NAME, MODULE_VERS);\n\n\trootdn = of_find_node_by_path(\"/\");\n\tif (rootdn) {\n\t\ttmp = of_get_property(rootdn, \"model\", NULL);\n\t\tif (tmp) {\n\t\t\tmodel = tmp;\n\t\t\t/* Skip \"IBM,\" - see platforms/iseries/dt.c */\n\t\t\tif (firmware_has_feature(FW_FEATURE_ISERIES))\n\t\t\t\tmodel += 4;\n\t\t}\n\t\ttmp = of_get_property(rootdn, \"system-id\", NULL);\n\t\tif (tmp) {\n\t\t\tsystem_id = tmp;\n\t\t\t/* Skip \"IBM,\" - see platforms/iseries/dt.c */\n\t\t\tif (firmware_has_feature(FW_FEATURE_ISERIES))\n\t\t\t\tsystem_id += 4;\n\t\t}\n\t\tlp_index_ptr = of_get_property(rootdn, \"ibm,partition-no\",\n\t\t\t\t\tNULL);\n\t\tif (lp_index_ptr)\n\t\t\tlp_index = *lp_index_ptr;\n\t\tof_node_put(rootdn);\n\t}\n\tseq_printf(m, \"serial_number=%s\\n\", system_id);\n\tseq_printf(m, \"system_type=%s\\n\", model);\n\tseq_printf(m, \"partition_id=%d\\n\", (int)lp_index);\n\n\tif (firmware_has_feature(FW_FEATURE_ISERIES))\n\t\treturn iseries_lparcfg_data(m, v);\n\treturn pseries_lparcfg_data(m, v);\n}\n\nstatic int lparcfg_open(struct inode *inode, struct file *file)\n{\n\treturn single_open(file, lparcfg_data, NULL);\n}\n\nstatic const struct file_operations lparcfg_fops = {\n\t.owner\t\t= THIS_MODULE,\n\t.read\t\t= seq_read,\n\t.write\t\t= lparcfg_write,\n\t.open\t\t= lparcfg_open,\n\t.release\t= single_release,\n};\n\nstatic int __init lparcfg_init(void)\n{\n\tstruct proc_dir_entry *ent;\n\tmode_t mode = S_IRUSR | S_IRGRP | S_IROTH;\n\n\t/* Allow writing if we have FW_FEATURE_SPLPAR */\n\tif (firmware_has_feature(FW_FEATURE_SPLPAR) &&\n\t\t\t!firmware_has_feature(FW_FEATURE_ISERIES))\n\t\tmode |= S_IWUSR;\n\n\tent = proc_create(\"powerpc/lparcfg\", mode, NULL, &lparcfg_fops);\n\tif (!ent) {\n\t\tprintk(KERN_ERR \"Failed to create powerpc/lparcfg\\n\");\n\t\treturn -EIO;\n\t}\n\n\tproc_ppc64_lparcfg = ent;\n\treturn 0;\n}\n\nstatic void __exit lparcfg_cleanup(void)\n{\n\tif (proc_ppc64_lparcfg)\n\t\tremove_proc_entry(\"lparcfg\", proc_ppc64_lparcfg->parent);\n}\n\nmodule_init(lparcfg_init);\nmodule_exit(lparcfg_cleanup);\nMODULE_DESCRIPTION(\"Interface for LPAR configuration data\");\nMODULE_AUTHOR(\"Dave Engebretsen\");\nMODULE_LICENSE(\"GPL\");\n"} +{"text": "/**\n * @author Kai Salmen / https://kaisalmen.de\n * Development repository: https://github.com/kaisalmen/WWOBJLoader\n */\n\nimport {\n\tDefaultLoadingManager,\n\tFileLoader,\n\tGroup\n} from \"../../../build/three.module.js\";\n\nimport { OBJLoader2Parser } from \"./obj2/worker/parallel/OBJLoader2Parser.js\";\nimport { MeshReceiver } from \"./obj2/shared/MeshReceiver.js\";\nimport { MaterialHandler } from \"./obj2/shared/MaterialHandler.js\";\n\n/**\n * Use this class to load OBJ data from files or to parse OBJ data from an arraybuffer\n * @class\n *\n * @param {DefaultLoadingManager} [manager] The loadingManager for the loader to use. Default is {@link DefaultLoadingManager}\n */\nconst OBJLoader2 = function ( manager ) {\n\n\tOBJLoader2Parser.call( this );\n\tthis.manager = ( manager !== undefined && manager !== null ) ? manager : DefaultLoadingManager;\n\n\tthis.modelName = '';\n\tthis.instanceNo = 0;\n\tthis.path = undefined;\n\tthis.resourcePath = undefined;\n\tthis.baseObject3d = new Group();\n\n\tthis.materialHandler = new MaterialHandler();\n\tthis.meshReceiver = new MeshReceiver( this.materialHandler );\n\n};\nOBJLoader2.OBJLOADER2_VERSION = '3.0.0';\nconsole.info( 'Using OBJLoader2 version: ' + OBJLoader2.OBJLOADER2_VERSION );\n\nOBJLoader2.prototype = Object.create( OBJLoader2Parser.prototype );\nOBJLoader2.prototype.constructor = OBJLoader2;\n\n\n/**\n * Set the name of the model.\n *\n * @param {string} modelName\n * @return {OBJLoader2}\n */\nOBJLoader2.prototype.setModelName = function ( modelName ) {\n\n\tthis.modelName = modelName ? modelName : this.modelName;\n\treturn this;\n\n};\n\n/**\n * The URL of the base path.\n *\n * @param {string} path URL\n * @return {OBJLoader2}\n */\nOBJLoader2.prototype.setPath = function ( path ) {\n\n\tthis.path = path ? path : this.path;\n\treturn this;\n\n};\n\n/**\n * Allow to specify resourcePath for dependencies of specified resource.\n *\n * @param {string} resourcePath\n * @return {OBJLoader2}\n */\nOBJLoader2.prototype.setResourcePath = function ( resourcePath ) {\n\n\tthis.resourcePath = resourcePath ? resourcePath : this.resourcePath;\n\treturn this;\n\n};\n\n/**\n * Set the node where the loaded objects will be attached directly.\n *\n * @param {Object3D} baseObject3d Object already attached to scenegraph where new meshes will be attached to\n * @return {OBJLoader2}\n */\nOBJLoader2.prototype.setBaseObject3d = function ( baseObject3d ) {\n\n\tthis.baseObject3d = ( baseObject3d === undefined || baseObject3d === null ) ? this.baseObject3d : baseObject3d;\n\treturn this;\n\n};\n\n/**\n * Add materials as associated array.\n *\n * @param {Object} materials Object with named {@link Material}\n * @return {OBJLoader2}\n */\nOBJLoader2.prototype.addMaterials = function ( materials ) {\n\n\tthis.materialHandler.addMaterials( materials );\n\treturn this;\n\n};\n\n/**\n * Register a function that is called once a single mesh is available and it could be altered by the supplied function.\n *\n * @param {Function} [onMeshAlter]\n * @return {OBJLoader2}\n */\nOBJLoader2.prototype.setCallbackOnMeshAlter = function ( onMeshAlter ) {\n\n\tthis.meshReceiver._setCallbacks( this.callbacks.onProgress, onMeshAlter );\n\treturn this;\n\n};\n\n/**\n * Register a function that is called once all materials have been loaded and they could be altered by the supplied function.\n *\n * @param {Function} [onLoadMaterials]\n * @return {OBJLoader2}\n */\nOBJLoader2.prototype.setCallbackOnLoadMaterials = function ( onLoadMaterials ) {\n\n\tthis.materialHandler._setCallbacks( onLoadMaterials );\n\treturn this;\n\n};\n\n/**\n * Use this convenient method to load a file at the given URL. By default the fileLoader uses an ArrayBuffer.\n *\n * @param {string} url A string containing the path/URL of the file to be loaded.\n * @param {function} onLoad A function to be called after loading is successfully completed. The function receives loaded Object3D as an argument.\n * @param {function} [onFileLoadProgress] A function to be called while the loading is in progress. The argument will be the XMLHttpRequest instance, which contains total and Integer bytes.\n * @param {function} [onError] A function to be called if an error occurs during loading. The function receives the error as an argument.\n * @param {function} [onMeshAlter] Called after every single mesh is made available by the parser\n */\nOBJLoader2.prototype.load = function ( url, onLoad, onFileLoadProgress, onError, onMeshAlter ) {\n\n\tlet scope = this;\n\tif ( onLoad === null || onLoad === undefined || ! ( onLoad instanceof Function ) ) {\n\n\t\tlet errorMessage = 'onLoad is not a function! Aborting...';\n\t\tscope.callbacks.onError( errorMessage );\n\t\tthrow errorMessage\n\n\t}\n\tif ( onError === null || onError === undefined || ! ( onError instanceof Function ) ) {\n\n\t\tonError = function ( event ) {\n\n\t\t\tlet errorMessage = event;\n\t\t\tif ( event.currentTarget && event.currentTarget.statusText !== null ) {\n\n\t\t\t\t errorMessage = 'Error occurred while downloading!\\nurl: ' + event.currentTarget.responseURL + '\\nstatus: ' + event.currentTarget.statusText;\n\n\t\t\t}\n\t\t\tscope.callbacks.onError( errorMessage );\n\n\t\t};\n\n\t}\n\tif ( ! url ) {\n\n\t\tonError( 'An invalid url was provided. Unable to continue!' );\n\n\t}\n\tlet urlFull = new URL( url, window.location.href ).href;\n\tlet filename = urlFull;\n\tlet urlParts = urlFull.split( '/' );\n\tif ( urlParts.length > 2 ) {\n\n\t\tfilename = urlParts[ urlParts.length - 1 ];\n\t\tlet urlPartsPath = urlParts.slice( 0, urlParts.length - 1 ).join( '/' ) + '/';\n\t\tif ( urlPartsPath !== undefined && urlPartsPath !== null ) this.path = urlPartsPath;\n\n\t}\n\tif ( onFileLoadProgress === null || onFileLoadProgress === undefined || ! ( onFileLoadProgress instanceof Function ) ) {\n\n\t\tlet numericalValueRef = 0;\n\t\tlet numericalValue = 0;\n\t\tonFileLoadProgress = function ( event ) {\n\n\t\t\tif ( ! event.lengthComputable ) return;\n\n\t\t\tnumericalValue = event.loaded / event.total;\n\t\t\tif ( numericalValue > numericalValueRef ) {\n\n\t\t\t\tnumericalValueRef = numericalValue;\n\t\t\t\tlet output = 'Download of \"' + url + '\": ' + ( numericalValue * 100 ).toFixed( 2 ) + '%';\n\t\t\t\tscope.callbacks.onProgress( 'progressLoad', output, numericalValue );\n\n\t\t\t}\n\n\t\t};\n\n\t}\n\n\tthis.setCallbackOnMeshAlter( onMeshAlter );\n\tlet fileLoaderOnLoad = function ( content ) {\n\n\t\tonLoad( scope.parse( content ) );\n\n\t};\n\tlet fileLoader = new FileLoader( this.manager );\n\tfileLoader.setPath( this.path || this.resourcePath );\n\tfileLoader.setResponseType( 'arraybuffer' );\n\tfileLoader.load( filename, fileLoaderOnLoad, onFileLoadProgress, onError );\n\n};\n\n/**\n * Parses OBJ data synchronously from arraybuffer or string.\n *\n * @param {arraybuffer|string} content OBJ data as Uint8Array or String\n */\nOBJLoader2.prototype.parse = function ( content ) {\n\n\t// fast-fail in case of illegal data\n\tif ( content === null || content === undefined ) {\n\n\t\tthrow 'Provided content is not a valid ArrayBuffer or String. Unable to continue parsing';\n\n\t}\n\tif ( this.logging.enabled ) {\n\n\t\tconsole.time( 'OBJLoader parse: ' + this.modelName );\n\n\t}\n\n\t// sync code works directly on the material references\n\tthis._setMaterials( this.materialHandler.getMaterials() );\n\n\tif ( content instanceof ArrayBuffer || content instanceof Uint8Array ) {\n\n\t\tif ( this.logging.enabled ) console.info( 'Parsing arrayBuffer...' );\n\t\tthis.execute( content );\n\n\t} else if ( typeof ( content ) === 'string' || content instanceof String ) {\n\n\t\tif ( this.logging.enabled ) console.info( 'Parsing text...' );\n\t\tthis.executeLegacy( content );\n\n\t} else {\n\n\t\tthis.callbacks.onError( 'Provided content was neither of type String nor Uint8Array! Aborting...' );\n\n\t}\n\tif ( this.logging.enabled ) {\n\n\t\tconsole.timeEnd( 'OBJLoader parse: ' + this.modelName );\n\n\t}\n\treturn this.baseObject3d;\n\n};\n\nOBJLoader2.prototype._onAssetAvailable = function ( payload ) {\n\n\tif ( payload.cmd !== 'assetAvailable' ) return;\n\n\tif ( payload.type === 'mesh' ) {\n\n\t\tlet meshes = this.meshReceiver.buildMeshes( payload );\n\t\tfor ( let mesh of meshes ) {\n\n\t\t\tthis.baseObject3d.add( mesh );\n\n\t\t}\n\n\t} else if ( payload.type === 'material' ) {\n\n\t\tthis.materialHandler.addPayloadMaterials( payload );\n\n\t}\n\n};\n\nexport { OBJLoader2 };\n"} +{"text": "# chunked\n\nThis sample shows running jersey inside vert.x returning a chunked response (Transfer-Encoding: chunked) and a streamed response using `WriteStreamOutput`\n\n## Run It\n\n1. Run from the command line `java -jar target/vertx-jersey-examples-chunked-Version-fat.jar -conf src/test/resources/config.json'\n2. Run from inside IDEA creating a JAR Application build configuration with program arguments `-conf src/test/resources/config.json`\n\n\nTry the following urls in your browser:\n* `http://localhost:8080/chunked`\n* `http://localhost:8080/chunked/async`\n* `http://localhost:8080/chunked/normal`\n* `http://localhost:8080/chunked/stream`\n"} +{"text": "/**********************************************************************\n * Copyright (c) 2014 Pieter Wuille *\n * Distributed under the MIT software license, see the accompanying *\n * file COPYING or http://www.opensource.org/licenses/mit-license.php.*\n **********************************************************************/\n\n#ifndef _SECP256K1_BENCH_H_\n#define _SECP256K1_BENCH_H_\n\n#include <stdio.h>\n#include <math.h>\n#include \"sys/time.h\"\n\nstatic double gettimedouble(void) {\n struct timeval tv;\n gettimeofday(&tv, NULL);\n return tv.tv_usec * 0.000001 + tv.tv_sec;\n}\n\nvoid print_number(double x) {\n double y = x;\n int c = 0;\n if (y < 0.0) {\n y = -y;\n }\n while (y < 100.0) {\n y *= 10.0;\n c++;\n }\n printf(\"%.*f\", c, x);\n}\n\nvoid run_benchmark(char *name, void (*benchmark)(void*), void (*setup)(void*), void (*teardown)(void*), void* data, int count, int iter) {\n int i;\n double min = HUGE_VAL;\n double sum = 0.0;\n double max = 0.0;\n for (i = 0; i < count; i++) {\n double begin, total;\n if (setup != NULL) {\n setup(data);\n }\n begin = gettimedouble();\n benchmark(data);\n total = gettimedouble() - begin;\n if (teardown != NULL) {\n teardown(data);\n }\n if (total < min) {\n min = total;\n }\n if (total > max) {\n max = total;\n }\n sum += total;\n }\n printf(\"%s: min \", name);\n print_number(min * 1000000.0 / iter);\n printf(\"us / avg \");\n print_number((sum / count) * 1000000.0 / iter);\n printf(\"us / max \");\n print_number(max * 1000000.0 / iter);\n printf(\"us\\n\");\n}\n\n#endif\n"} +{"text": "package useragent\n\nimport (\n\t\"math/rand\"\n\t\"sync\"\n\t\"time\"\n)\n\ntype useragent struct {\n\tdata map[string][]string\n\tlock sync.Mutex\n}\n\nvar (\n\tUA = useragent{data: make(map[string][]string)}\n\tr = rand.New(rand.NewSource(time.Now().UnixNano()))\n)\n\nfunc (u *useragent) Get(key string) []string {\n\treturn u.data[key]\n}\n\nfunc (u *useragent) GetAll() map[string][]string {\n\treturn u.data\n}\n\nfunc (u *useragent) GetRandom(key string) string {\n\tbrowser := u.Get(key)\n\tlen := len(browser)\n\tif len < 1 {\n\t\treturn \"\"\n\t}\n\n\tn := r.Intn(len)\n\treturn browser[n]\n}\n\nfunc (u *useragent) GetAllRandom() string {\n\tbrowsers := u.GetAll()\n\tdatas := []string{}\n\tfor _, uas := range browsers {\n\t\tdatas = append(datas, uas...)\n\t}\n\n\tlen := len(datas)\n\tif len < 1 {\n\t\treturn \"\"\n\t}\n\n\tn := r.Intn(len)\n\treturn datas[n]\n}\n\nfunc (u *useragent) Set(key, value string) {\n\tu.lock.Lock()\n\tdefer u.lock.Unlock()\n\tu.data[key] = append(u.data[key], value)\n}\n\nfunc (u *useragent) SetData(data map[string][]string) {\n\tu.data = data\n}\n"} +{"text": "import ConfigParser\nimport logging\nimport os\nimport random\nimport shutil\nimport transaction\nimport unittest\n\nfrom logging.config import fileConfig\nfrom pyramid import testing\n\n# tools we use to empty tables\nfrom bookie.models import bmarks_tags\nfrom bookie.models import DBSession\nfrom bookie.models import Bmark\nfrom bookie.models import Hashed\nfrom bookie.models import Readable\nfrom bookie.models import Tag\nfrom bookie.models.applog import AppLog\nfrom bookie.models.auth import Activation\nfrom bookie.models.auth import User\nfrom bookie.models.queue import ImportQueue\nfrom bookie.models.social import (\n BaseConnection,\n TwitterConnection,\n)\nfrom bookie.models.stats import StatBookmark\nfrom bookie.models.fulltext import _reset_index\n\nglobal_config = {}\n\nini = ConfigParser.ConfigParser()\n\n# we need to pull the right ini for the test we want to run\n# by default pullup test.ini, but we might want to test mysql, pgsql, etc\ntest_ini = os.environ.get('BOOKIE_TEST_INI', None)\nif not test_ini:\n test_ini = 'test.ini'\n\nini.read(test_ini)\nsettings = dict(ini.items('app:bookie'))\nfrom bookie.models import initialize_sql\n# Setup logging to read from the test ini file.\nfileConfig(test_ini)\nLOG = logging.getLogger(__name__)\n\n# Shut up the transaction logger\ntransaction._transaction._LOGGER = LOG\n\nBOOKIE_TEST_INI = test_ini\nprint \"\\nUSING TEST INI: \", BOOKIE_TEST_INI\n\n# clean up whoosh index between test runs\nwhoosh_idx = settings['fulltext.index']\ntry:\n # if this is a sqlite db then try to take care of the db file\n shutil.rmtree(whoosh_idx)\nexcept:\n pass\n\n\ndef gen_random_word(wordLen):\n word = u''\n for i in xrange(wordLen):\n word += random.choice((u'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrs'\n u'tuvwxyz0123456789/&='))\n return word\n\n\nclass TestDBBase(unittest.TestCase):\n def setUp(self):\n \"\"\"Setup Tests\"\"\"\n initialize_sql(settings)\n testing.setUp()\n self.trans = transaction.begin()\n\n def tearDown(self):\n \"\"\"Tear down each test\"\"\"\n testing.tearDown()\n self.trans.abort()\n\n\nclass TestViewBase(unittest.TestCase):\n \"\"\"In setup, bootstrap the app and make sure we clean up after ourselves\n\n \"\"\"\n def setUp(self):\n \"\"\"Setup Tests\"\"\"\n from pyramid.paster import get_app\n from bookie.tests import BOOKIE_TEST_INI\n app = get_app(BOOKIE_TEST_INI, 'bookie')\n from webtest import TestApp\n self.app = TestApp(app)\n self.config = testing.setUp()\n self.config.include('pyramid_mako')\n res = DBSession.execute(\n \"SELECT api_key FROM users WHERE username = 'admin'\").\\\n fetchone()\n self.api_key = res['api_key']\n\n def tearDown(self):\n \"\"\"Tear down each test\"\"\"\n testing.tearDown()\n empty_db()\n\n def _login_admin(self):\n \"\"\"Make the login call to the app\"\"\"\n self.app.post(\n '/login',\n params={\n \"login\": u\"admin\",\n \"password\": u\"admin\",\n \"form.submitted\": u\"Log In\",\n },\n status=302)\n\n\ndef empty_db():\n \"\"\"On teardown, remove all the db stuff\"\"\"\n DBSession.execute(bmarks_tags.delete())\n Readable.query.delete()\n Bmark.query.delete()\n StatBookmark.query.delete()\n # BaseConnection and TwitterConnection should be individually\n # deleted https://bitbucket.org/zzzeek/sqlalchemy/issue/2349\n BaseConnection.query.delete()\n TwitterConnection.query.delete()\n\n Tag.query.delete()\n # we can't remove the toread tag we have from our commands\n Hashed.query.delete()\n ImportQueue.query.delete()\n # Delete the users not admin in the system.\n Activation.query.delete()\n User.query.filter(User.username != u'admin').delete()\n\n AppLog.query.delete()\n DBSession.flush()\n transaction.commit()\n\n # Clear the fulltext index as well.\n _reset_index()\n"} +{"text": "/*\n * Copyright 2019 Red Hat, Inc. and/or its affiliates.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.kie.dmn.model.v1_3.dmndi;\n\nimport org.kie.dmn.model.v1_3.KieDMNModelInstrumentedBase;\n\npublic class Bounds extends KieDMNModelInstrumentedBase implements org.kie.dmn.model.api.dmndi.Bounds {\n\n protected double x;\n protected double y;\n protected double width;\n protected double height;\n\n /**\n * Gets the value of the x property.\n * \n */\n public double getX() {\n return x;\n }\n\n /**\n * Sets the value of the x property.\n * \n */\n public void setX(double value) {\n this.x = value;\n }\n\n /**\n * Gets the value of the y property.\n * \n */\n public double getY() {\n return y;\n }\n\n /**\n * Sets the value of the y property.\n * \n */\n public void setY(double value) {\n this.y = value;\n }\n\n /**\n * Gets the value of the width property.\n * \n */\n public double getWidth() {\n return width;\n }\n\n /**\n * Sets the value of the width property.\n * \n */\n public void setWidth(double value) {\n this.width = value;\n }\n\n /**\n * Gets the value of the height property.\n * \n */\n public double getHeight() {\n return height;\n }\n\n /**\n * Sets the value of the height property.\n * \n */\n public void setHeight(double value) {\n this.height = value;\n }\n\n}\n"} +{"text": "#!/bin/sh -e\n\nLINE=\"---------------\"\n\nstart() {\n if [ -d _harness ]; then\n echo \"Daemon setup already in place, stop it first.\"\n exit 1\n fi\n mkdir -p _harness\n cd _harness\n cp -a ../harness/daemons .\n cp -a ../harness/certs .\n echo keyfile > certs/keyfile\n chmod 600 certs/keyfile\n if ! mongod --help | grep -q -- --ssl; then\n rm -rf daemons/db3\n fi\n COUNT=$(ls daemons | wc -l)\n echo \"Running daemons...\"\n svscan daemons &\n SVSCANPID=$!\n echo $SVSCANPID > svscan.pid\n if ! kill -0 $SVSCANPID; then\n echo \"Cannot execute svscan.\"\n exit 1\n fi\n echo \"Starting $COUNT processes...\"\n for i in $(seq 30); do\n UP=$(svstat daemons/* | grep ' up ' | grep -v ' [0-3] seconds' | wc -l)\n echo \"$UP processes up...\"\n if [ x$COUNT = x$UP ]; then\n echo \"Running setup.js with mongo...\"\n mongo --nodb ../harness/mongojs/init.js\n exit 0\n fi\n sleep 1\n done\n echo \"Failed to start processes. svstat _harness/daemons/* output:\"\n echo $LINE\n svstat daemons/*\n echo $LINE\n for DAEMON in daemons/*; do\n if $(svstat $DAEMON | grep ' up ' | grep ' [0-3] seconds' > /dev/null); then\n echo \"Logs for _harness/$DAEMON:\"\n echo $LINE\n cat $DAEMON/log/log.txt\n echo $LINE\n fi\n done\n exit 1\n}\n\nstop() {\n if [ -d _harness ]; then\n cd _harness\n if [ -f svscan.pid ]; then\n kill -9 $(cat svscan.pid) 2> /dev/null || true\n svc -dx daemons/* daemons/*/log > /dev/null 2>&1 || true\n COUNT=$(ls daemons | wc -l)\n echo \"Shutting down $COUNT processes...\"\n while true; do\n DOWN=$(svstat daemons/* | grep 'supervise not running' | wc -l)\n echo \"$DOWN processes down...\"\n if [ x$DOWN = x$COUNT ]; then\n break\n fi\n sleep 1\n done\n rm svscan.pid\n echo \"Done.\"\n fi\n cd ..\n rm -rf _harness\n fi\n}\n\n\nif [ ! -f suite_test.go ]; then\n echo \"This script must be run from within the source directory.\"\n exit 1\nfi\n\ncase \"$1\" in\n\n start)\n start $2\n ;;\n\n stop)\n stop $2\n ;;\n\nesac\n\n# vim:ts=4:sw=4:et\n"} +{"text": "\"\"\"\nAll exceptions and warnings thrown by ``service_identity``.\n\nSeparated into an own package for nicer tracebacks, you should still import\nthem from __init__.py.\n\"\"\"\n\nfrom __future__ import absolute_import, division, print_function\n\nimport attr\n\n\nclass SubjectAltNameWarning(DeprecationWarning):\n \"\"\"\n Server Certificate does not contain a ``SubjectAltName``.\n\n Hostname matching is performed on the ``CommonName`` which is deprecated.\n \"\"\"\n\n\n@attr.s\nclass VerificationError(Exception):\n \"\"\"\n Service identity verification failed.\n \"\"\"\n\n errors = attr.ib()\n\n def __str__(self):\n return self.__repr__()\n\n\n@attr.s\nclass DNSMismatch(object):\n \"\"\"\n No matching DNSPattern could be found.\n \"\"\"\n\n mismatched_id = attr.ib()\n\n\n@attr.s\nclass SRVMismatch(object):\n \"\"\"\n No matching SRVPattern could be found.\n \"\"\"\n\n mismatched_id = attr.ib()\n\n\n@attr.s\nclass URIMismatch(object):\n \"\"\"\n No matching URIPattern could be found.\n \"\"\"\n\n mismatched_id = attr.ib()\n\n\n@attr.s\nclass IPAddressMismatch(object):\n \"\"\"\n No matching IPAddressPattern could be found.\n \"\"\"\n\n mismatched_id = attr.ib()\n\n\nclass CertificateError(Exception):\n \"\"\"\n Certificate contains invalid or unexpected data.\n \"\"\"\n"} +{"text": "# 1.1.2\n- add `Func.memoize`\n- fix `zip-all` and `zip-with-all` corner case (no input)\n- build with LiveScript 1.4.0\n\n# 1.1.1\n- curry `unique-by`, `minimum-by`\n\n# 1.1.0\n- added `List` functions: `maximum-by`, `minimum-by`, `unique-by`\n- added `List` functions: `at`, `elem-index`, `elem-indices`, `find-index`, `find-indices`\n- added `Str` functions: `capitalize`, `camelize`, `dasherize`\n- added `Func` function: `over` - eg. ``same-length = (==) `over` (.length)``\n- exported `Str.repeat` through main `prelude` object\n- fixed definition of `foldr` and `foldr1`, the new correct definition is backwards incompatible with the old, incorrect one\n- fixed issue with `fix`\n- improved code coverage\n\n# 1.0.3\n- build browser versions\n\n# 1.0.2\n- bug fix for `flatten` - slight change with bug fix, flattens arrays only, not array-like objects\n\n# 1.0.1\n- bug fixes for `drop-while` and `take-while`\n\n# 1.0.0\n* massive update - separated functions into separate modules\n* functions do not accept multiple types anymore - use different versions in their respective modules in some cases (eg. `Obj.map`), or use `chars` or `values` in other cases to transform into a list\n* objects are no longer transformed into functions, simply use `(obj.)` in LiveScript to do that\n* browser version now using browserify - use `prelude = require('prelude-ls')`\n* added `compact`, `split`, `flatten`, `difference`, `intersection`, `union`, `count-by`, `group-by`, `chars`, `unchars`, `apply`\n* added `lists-to-obj` which takes a list of keys and list of values and zips them up into an object, and the converse `obj-to-lists`\n* added `pairs-to-obj` which takes a list of pairs (2 element lists) and creates an object, and the converse `obj-to-pairs`\n* removed `cons`, `append` - use the concat operator\n* removed `compose` - use the compose operator\n* removed `obj-to-func` - use partially applied access (eg. `(obj.)`)\n* removed `length` - use `(.length)`\n* `sort-by` renamed to `sort-with`\n* added new `sort-by`\n* removed `compare` - just use the new `sort-by`\n* `break-it` renamed `break-list`, (`Str.break-str` for the string version)\n* added `Str.repeat` which creates a new string by repeating the input n times\n* `unfold` as alias to `unfoldr` is no longer used\n* fixed up style and compiled with LiveScript 1.1.1\n* use Make instead of Slake\n* greatly improved tests\n\n# 0.6.0\n* fixed various bugs\n* added `fix`, a fixpoint (Y combinator) for anonymous recursive functions\n* added `unfoldr` (alias `unfold`)\n* calling `replicate` with a string now returns a list of strings\n* removed `partial`, just use native partial application in LiveScript using the `_` placeholder, or currying\n* added `sort`, `sortBy`, and `compare`\n\n# 0.5.0\n* removed `lookup` - use (.prop)\n* removed `call` - use (.func arg1, arg2)\n* removed `pluck` - use map (.prop), xs\n* fixed buys wtih `head` and `last`\n* added non-minifed browser version, as `prelude-browser.js`\n* renamed `prelude-min.js` to `prelude-browser-min.js`\n* renamed `zip` to `zipAll`\n* renamed `zipWith` to `zipAllWith`\n* added `zip`, a curried zip that takes only two arguments\n* added `zipWith`, a curried zipWith that takes only two arguments\n\n# 0.4.0\n* added `parition` function\n* added `curry` function\n* removed `elem` function (use `in`)\n* removed `notElem` function (use `not in`)\n\n# 0.3.0\n* added `listToObject`\n* added `unique`\n* added `objToFunc`\n* added support for using strings in map and the like\n* added support for using objects in map and the like\n* added ability to use objects instead of functions in certain cases\n* removed `error` (just use throw)\n* added `tau` constant\n* added `join`\n* added `values`\n* added `keys`\n* added `partial`\n* renamed `log` to `ln`\n* added alias to `head`: `first`\n* added `installPrelude` helper\n\n# 0.2.0\n* removed functions that simply warp operators as you can now use operators as functions in LiveScript\n* `min/max` are now curried and take only 2 arguments\n* added `call`\n\n# 0.1.0\n* initial public release\n"} +{"text": "/*\n * File : fal_def.h\n * This file is part of FAL (Flash Abstraction Layer) package\n * COPYRIGHT (C) 2006 - 2018, RT-Thread Development Team\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * Change Logs:\n * Date Author Notes\n * 2018-05-17 armink the first version\n */\n\n#ifndef _FAL_DEF_H_\n#define _FAL_DEF_H_\n\n#include <stdint.h>\n#include <stdio.h>\n\n#define FAL_SW_VERSION \"0.2.0\"\n\n#ifndef FAL_MALLOC\n#define FAL_MALLOC malloc\n#endif\n\n#ifndef FAL_CALLOC\n#define FAL_CALLOC calloc\n#endif\n\n#ifndef FAL_REALLOC\n#define FAL_REALLOC realloc\n#endif\n\n#ifndef FAL_FREE\n#define FAL_FREE free\n#endif\n\n#ifndef FAL_DEBUG\n#define FAL_DEBUG 0\n#endif\n\n#if FAL_DEBUG\n#ifdef assert\n#undef assert\n#endif\n#define assert(EXPR) \\\nif (!(EXPR)) \\\n{ \\\n printf(\"(%s) has assert failed at %s.\\n\", #EXPR, __FUNCTION__); \\\n while (1); \\\n}\n\n\n/* debug level log */\n#ifdef log_d\n#undef log_d\n#endif\n#define log_d(...) printf(\"[D/FAL] (%s:%d) \", __FUNCTION__, __LINE__); printf(__VA_ARGS__);printf(\"\\n\")\n\n#else\n\n#ifdef assert\n#undef assert\n#endif\n#define assert(EXPR) ((void)0);\n\n/* debug level log */\n#ifdef log_d\n#undef log_d\n#endif\n#define log_d(...)\n#endif /* FAL_DEBUG */\n\n/* error level log */\n#ifdef log_e\n#undef log_e\n#endif\n#define log_e(...) printf(\"\\033[31;22m[E/FAL] (%s:%d) \", __FUNCTION__, __LINE__);printf(__VA_ARGS__);printf(\"\\033[0m\\n\")\n\n/* info level log */\n#ifdef log_i\n#undef log_i\n#endif\n#define log_i(...) printf(\"\\033[32;22m[I/FAL] \"); printf(__VA_ARGS__);printf(\"\\033[0m\\n\")\n\n/* FAL flash and partition device name max length */\n#ifndef FAL_DEV_NAME_MAX\n#define FAL_DEV_NAME_MAX 24\n#endif\n\nstruct fal_flash_dev\n{\n char name[FAL_DEV_NAME_MAX];\n\n /* flash device start address and len */\n uint32_t addr;\n size_t len;\n /* the block size in the flash for erase minimum granularity */\n size_t blk_size;\n\n struct\n {\n int (*init)(void);\n int (*read)(long offset, uint8_t *buf, size_t size);\n int (*write)(long offset, const uint8_t *buf, size_t size);\n int (*erase)(long offset, size_t size);\n } ops;\n};\ntypedef struct fal_flash_dev *fal_flash_dev_t;\n\n/**\n * FAL partition\n */\nstruct fal_partition\n{\n uint32_t magic_word;\n\n /* partition name */\n char name[FAL_DEV_NAME_MAX];\n /* flash device name for partition */\n char flash_name[FAL_DEV_NAME_MAX];\n\n /* partition offset address on flash device */\n long offset;\n size_t len;\n\n uint32_t reserved;\n};\ntypedef struct fal_partition *fal_partition_t;\n\n#endif /* _FAL_DEF_H_ */\n"} +{"text": "// Instantiation of vgl_scaled_shape_3d<double>\n#include <bvgl/bvgl_scaled_shape_3d.hxx>\nBVGL_SCALED_SHAPE_3D_INSTANTIATE(double);\n"} +{"text": "09:49 rm -rf .svn apache-* bin cron doc etc htdocs lib log/.svn mirror privatelib/.svn rc\n09:49 svn co http://localhost:5459/svn/pause/trunk .\n"} +{"text": "<?xml version=\"1.0\"?>\r\n<xs:schema xmlns:xs=\"http://www.w3.org/2001/XMLSchema\" xmlns:xml=\"http://www.w3.org/XML/1998/namespace\"\r\n targetNamespace=\"http://geowebcache.org/schema/1.6.0\" xmlns:gwc=\"http://geowebcache.org/schema/1.6.0\"\r\n elementFormDefault=\"qualified\" version=\"1.6.0\">\r\n\r\n <xs:element name=\"gwcConfiguration\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Wrapper element for XStream. Make sure it has the correct namespace\r\n </xs:documentation>\r\n </xs:annotation>\r\n <xs:complexType>\r\n <xs:sequence>\r\n <xs:element name=\"version\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The version number should match the XSD namespace\r\n and the version\r\n of GWC\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"backendTimeout\" type=\"xs:integer\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The backend timeout is the number of seconds GWC\r\n will wait for a\r\n backend server to return something\r\n before closing the connection.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"lockProvider\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The name of the lock provider. For single node installs don't set the property,\r\n for clustered implementation you can use \"nio\" instead (will work if your shared\r\n file-system supports file locks)\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n \r\n <xs:element name=\"cacheBypassAllowed\" type=\"xs:boolean\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Determines whether cached=false is allowed for\r\n requests going\r\n through the WMS service, including\r\n converters such as Google Maps. Enabling this\r\n disables caching for those\r\n requests.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"runtimeStats\" type=\"xs:boolean\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Runtime statistics run, by default, every three\r\n second and\r\n provide data about how many requests the\r\n system has been serving in the past 3, 15 and 60\r\n seconds, as well\r\n as aggregate numbers.\r\n\r\n The overhead of this system is extremely low, by\r\n default it is enabled.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"serviceInformation\" type=\"gwc:ServiceInformationType\" maxOccurs=\"1\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Service information such as you or your company's\r\n details that\r\n you want provided in capabilities\r\n documents.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"httpUsername\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n If you wish to have every connection to HTTP\r\n backends use HTTP\r\n Authentication set this to the\r\n username. You must then also set httpPassword for it\r\n to take effect.\r\n\r\n This\r\n feature should be considered experimental in\r\n 1.2.0.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"httpPassword\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n If you wish to have every connection to HTTP\r\n backends use HTTP\r\n Authentication set this to the\r\n password. You must then also set httpUsername for it\r\n to take effect.\r\n\r\n This\r\n feature should be considered experimental in\r\n 1.2.0.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"proxyUrl\" type=\"xs:string\" minOccurs=\"0\" />\r\n <xs:element name=\"formatModifiers\" type=\"gwc:formatModifiers\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n These are the global format modifiers that apply to\r\n all layers in\r\n this file, unless the layer has\r\n separately defined modifiers. They can be used to\r\n avoid repeated\r\n compression, by making image/png\r\n backend requests before compressing to image/jpeg .\r\n They can also be used\r\n for special tweaks, such as\r\n setting the background color for formats that do not\r\n support transparency.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"gridSets\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The list of grid sets provided by this\r\n configuration.\r\n </xs:documentation>\r\n </xs:annotation>\r\n <xs:complexType>\r\n <xs:sequence>\r\n <xs:element name=\"gridSet\" type=\"gwc:GridSet\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\r\n </xs:sequence>\r\n </xs:complexType>\r\n </xs:element>\r\n <xs:element name=\"layers\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The list of WMS layers provided by this\r\n configuration.\r\n </xs:documentation>\r\n </xs:annotation>\r\n <xs:complexType>\r\n <xs:choice minOccurs=\"0\" maxOccurs=\"unbounded\">\r\n <xs:element name=\"wmsLayer\" type=\"gwc:WmsLayer\" />\r\n <xs:element ref=\"gwc:arcgisLayer\" />\r\n </xs:choice>\r\n </xs:complexType>\r\n </xs:element>\r\n </xs:sequence>\r\n </xs:complexType>\r\n </xs:element>\r\n\r\n <xs:complexType name=\"AbstractTileLayer\" abstract=\"true\">\r\n <xs:sequence>\r\n <xs:element name=\"enabled\" type=\"xs:boolean\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Whether the layer is enabled or not. Defaults to true. If the\r\n Layer is not enabled\r\n it will not be listed in capabilities documents, and any attempt to perform a request\r\n against it will throw an exception. But a disabled layer CAN be seeded, as it's the\r\n administrator's choice\r\n whether to temporarily disable or not a Layer to perform a long seed\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"name\" type=\"xs:string\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The name of the layer that GWC should respond to. It is equivalent\r\n to the\r\n value of LAYERS= in WMS requests, and can contain commas. See wmsLayers\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"metaInformation\" type=\"gwc:LayerMetaInformation\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Meta information like a title and description intended for human\r\n consumption\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"mimeFormats\" type=\"gwc:MimeFormats\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n List of formats to be supported. These must be known to\r\n GeoWebCache. Legal values are\r\n image/png, image/png8, image/png24, image/gif, image/jpeg, image/tiff, gml,\r\n application/vnd.google-earth.kml+xml, application/vnd.google-earth.kmz+xml,\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"infoMimeFormats\" type=\"gwc:MimeFormats\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n List of formats to be supported for GetFeatureInfo. These must be known to\r\n GeoWebCache. Legal values are\r\n text/plain, text/html, application/vnd.ogc.gml and application/json \r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"formatModifiers\" type=\"gwc:formatModifiers\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n If formatModifiers are specified on the layer the global ones will\r\n be\r\n ignored. Format modifiers can be used to apply special tweaks depending\r\n on the requested format, such as\r\n requesting image/png from the backend\r\n and then persist that to disk.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"grids\" type=\"gwc:DEPRECATEDgrids\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n DEPRECATED\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"gridSubsets\" type=\"gwc:GridSubsets\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The grid definitions contain information about the SRS, the\r\n maximum extent for\r\n this SRS and the bounds of your data.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"updateSources\" type=\"gwc:UpdateSources\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n (1.2.2) Update sources provide information about when tiles should\r\n be expired\r\n in GeoWebCache. As of 1.2.2, only GeoRSS is supported.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"requestFilters\" type=\"gwc:RequestFilters\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Request filters are applied to all requests and make it possible\r\n to apply\r\n special rules for certain requests. The filters themselves are written\r\n in Java, though they can be\r\n made configurable through XML.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"useETags\" type=\"xs:boolean\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n (1.2.2) GeoWebCache can provide ETags based on the last time a\r\n tile was modified and\r\n thus support conditional gets. Note that most clients only refer to this tag\r\n once the\r\n data has expired, so set use small values for the client expiration.\r\n This functionality is not available if\r\n the metastore is disabled.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"metaWidthHeight\" type=\"gwc:MetaWidthHeight\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The metatiling factors used for this layer. These are used to\r\n scale the bounding\r\n box and height/width. With tiles that are 256 by 256 pixels, a 4 by 4 metatiled\r\n requests\r\n results in a 1024 by 1024 pixel image requested from the backend server.\r\n Higher reduced the number of\r\n repeated labels, but can overload the backend server.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r <xs:element name=\"expireCache\" type=\"xs:integer\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n How old the tile may be before it is refetched from the backend.\r\n The default value is 0, which means infinite, otherwise specified in seconds.\r\n As of GWC 1.1.0 this element is\r\n not fully implemented.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"expireCacheList\" type=\"gwc:ExpireList\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n A list of expiration rules, so that cache expiration can be\r\n controlled\r\n per layer per zoom level. Special expiration values are -1 to disable\r\n caching and -2 to never\r\n expire.\r\n\r\n This list must start with minZoom=\"0\" and be monotonically increasing.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"expireClients\" type=\"xs:integer\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The HTTP expiration header sent to client. Can either be a value\r\n in number of seconds\r\n or 0 to disable the header. A special value of -1 may be used to set no-cache\r\n headers. By\r\n default the expiration header from the WMS backend is used. If it is not\r\n set or not available (no request has\r\n been forwarded to backend since startup)\r\n then the value is set to 3600 seconds.\r\n\r\n This list must start with\r\n minZoom=\"0\" and be monotonically increasing.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"expireClientsList\" type=\"gwc:ExpireList\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n A list of expiration rules, so that client expiration (set through\r\n HTTP response\r\n headers) can be controlled per layer per zoom level\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"backendTimeout\" type=\"xs:integer\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The backend timeout is the number of seconds GWC will wait for a\r\n backend\r\n server to return something before closing the connection.\r\n The default value is the global value,\r\n alternatively 120s.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"cacheBypassAllowed\" type=\"xs:boolean\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Whether this layer allows the clients to bypass the cache. The\r\n default value\r\n is the global value, alternatively false.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"queryable\" type=\"xs:boolean\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Whether this layer supports getfeatureinfo requests, which are\r\n proxied to the WMS backend.\r\n The default is false.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"wmsQueryLayers\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The QUERY_LAYERS value sent to the WMS backend server. This should\r\n refer to one or more (comma separated) queryable layers. If omitted, \r\n the wmsLayers will be used.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"parameterFilters\" type=\"gwc:ParameterFilters\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n A list of parameter filters, meaning parameters the client may\r\n specify that GWC\r\n will forward to the backend. Each combination of parameters effectively\r\n results in a new set\r\n of tiles.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"WmsLayer\">\r\n <xs:complexContent>\r\n <xs:extension base=\"gwc:AbstractTileLayer\">\r\n <xs:sequence>\r <!-- WMS Specific stuff, some of which is not really WMS specific -->\r\n <xs:element name=\"wmsUrl\" type=\"gwc:WmsUrl\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n A list of URLs to backend servers than can render tiles for this\r\n layer. They are used in a\r\n round robin fashion for load balancing and automatic failover.\r\n \r\n The only time you can\r\n ommit this element is if you expect the layer to be merged\r\n with that from another source.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"wmsLayers\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The LAYERS parameter sent to the WMS backend.\r\n It may contain\r\n commas, to request composites of several layers from the backend,\r\n and be different from the name element.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"wmsStyles\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n This is the value sent to the backend server for the STYLES\r\n parameter.\r\n It may contain commas.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"gutter\" type=\"xs:integer\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The gutter is a buffer around the image that is sliced away when\r\n saving the tiles\r\n to disk. It only applies to metatiles and is not applied if the resulting request\r\n would\r\n exceed the layer bounds. Note that your styles on the backend should avoid\r\n rendering labels near the edges of\r\n requested images. The default is zero.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"errorMime\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The ERROR parameter sent to the WMS backend. The default is\r\n application/vnd.ogc.se_xml,\r\n the alternative is application/vnd.ogc.se_inimage\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"wmsVersion\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The VERSION parameter sent to the WMS backend.\r\n The default is 1.1.1\r\n </xs:documentation>\r\n </xs:annotation>\r\n <xs:simpleType>\r\n <xs:restriction base=\"xs:string\">\r\n <xs:enumeration value=\"1.0.0\"/>\r\n <xs:enumeration value=\"1.1.0\"/>\r\n <xs:enumeration value=\"1.1.1\"/>\r\n </xs:restriction>\r\n </xs:simpleType>\r\n </xs:element>\r\n <xs:element name=\"httpUsername\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n If you wish to have this WMS layer to use\r\n HTTP Authentication set\r\n this to the username. You must then also\r\n set httpPassword for it to take effect.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"httpPassword\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n If you wish to have this WMS layer to use\r\n HTTP Authentication set\r\n this to the username. You must then also\r\n set httpUsername for it to take effect.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"proxyUrl\" type=\"xs:string\" minOccurs=\"0\" />\r\n <xs:element name=\"tiled\" type=\"xs:boolean\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The TILED parameter sent to the WMS backend.\r\n The default is FALSE,\r\n you should generally not change this.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"transparent\" type=\"xs:boolean\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The TRANSPARENT parameter sent to the WMS backend.\r\n This will result\r\n in transparent PNGs and GIFs. The default is TRUE.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"bgColor\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The BGCOLOR parameter sent to the WMS backend.\r\n This tells the WMS\r\n backend what color to use where the image canvas is blank.\r\n It is specified as as an RGB string ( 0xFF0000 =\r\n red, 0x00FF00= green, 0x0000FF = blue )\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"palette\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The PALETTE parameter sent to the WMS backend.\r\n This tells the\r\n server whether it should use a palette, something that can often\r\n speed up rendering for 8 bit images (GIF and\r\n 8 bit PNG) because the WMS server\r\n does not have to determine the optimal palette for the tile.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"vendorParameters\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Fixed parameters that are appended to every request to the\r\n backend.\r\n For instance KEY1=value1&amp;amp;KEY2=value2\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"cachePrefix\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n As of GWC 1.1.0 this element is deprecated. The plugin for\r\n GeoServer will use\r\n %GEOSERVER_DATA_DIR%\\gwc , whereas users of the standalone version may specify\r\n this in\r\n geowebcache-servlet.xml\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"concurrency\" type=\"xs:positiveInteger\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n An indication of how many concurrent threads can simultaneously request tiles from this layer with\r\n minimal thread contention. If not set defaults to 32. This property is deprecated and scheduled to\r\n be removed in 1.4.0.\r\n </xs:documentation> \r\n </xs:annotation>\r\n </xs:element>\r </xs:sequence>\r\n </xs:extension>\r\n </xs:complexContent>\r\n </xs:complexType>\r\n\r\n <xs:element name=\"arcgisLayer\" type=\"gwc:ArcGISLayerType\">\r\n <xs:annotation>\r\n <xs:documentation>\r\n Defines the location of a read only Layer generated in the ArcGIS exploded format.\r\n This layer\r\n must be pre-seeded, as GWC does not support seeding nor on-demand caching of such a layer,\r\n hence its only utility\r\n is to allow GWC to serve pre seeded layers from ArcGIS Server 9.2+.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:complexType name=\"ArcGISLayerType\">\r\n <xs:annotation>\r\n <xs:documentation>\r\n Defines the configuration for a cached layer generated by ArcGIS Server in exploded format.\r\n ArcGIS\r\n compact cache format is not supported as it is not an open format.\r\n For this layer to work, there must be an\r\n accompanying file called conf.cdi next to conf.xml, that\r\n declared the layer's spatial extent, as oposed to\r\n conf.xml that declares the coordinate reference\r\n system, tile origin, and cache resolutions.\r\n Note that to serve\r\n ArcGIS cached layers generated by ArcGIS Server 9.2 and 9.3, a conf.cdi file must\r\n be created by hand in order to\r\n specify the layer's bounding box, and must be like the following:\r\n &lt;EnvelopeN&gt;\r\n &lt;XMin&gt;...&lt;/XMin&gt;\r\n &lt;YMin&gt;...&lt;/YMin&gt;\r\n &lt;XMax&gt;...&lt;/XMax&gt;\r\n &lt;YMax&gt;...&lt;/YMax&gt;\r\n &lt;/EnvelopeN&gt;\r\n\r\n With this\r\n information, GWC will generate a GridSet and GridSubset definition for the layer that\r\n match the ArcGIS tiling\r\n scheme and Layer bounding box.\r\n </xs:documentation>\r\n </xs:annotation>\r\n <xs:sequence>\r\n <xs:element name=\"enabled\" type=\"xs:boolean\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Whether the layer is enabled or not. Defaults to true. If the\r\n Layer is not enabled\r\n it will not be listed in capabilities documents, and any attempt to perform a request\r\n against it will throw an exception. But a disabled layer CAN be seeded, as it's the\r\n administrator's choice\r\n whether to temporarily disable or not a Layer to perform a long seed\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"name\" type=\"xs:string\">\r\n <xs:annotation>\r\n <xs:documentation>\r\n The name of the layer that GWC should respond to.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"tilingScheme\" type=\"xs:string\">\r\n <xs:annotation>\r\n <xs:documentation>\r\n The absolute path to the location of the ArcGIS tiling scheme definition file (conf.xml) for\r\n this layer.\r\n For example, \"/path/to/arcgis/cache/MyLayer/Layers/conf.xml\"\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"tileCachePath\" type=\"xs:string\">\r\n <xs:annotation>\r\n <xs:documentation>\r\n Optional. The absolute path to the location of the root tiles directory. Defaults to the\r\n \"__alllayers\"\r\n directory if not set, which shall be in the same directory than the conf.xml file.\r\n The default\r\n layout of an ArcGIS tiling schema is such \"conf.xml\" and \"__alllayers\" are in the same directory.\r\n This\r\n property allows to separate the location of the tiling scheme definition (conf.xml) and the actual\r\n directory\r\n containing the tiles.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"MimeFormats\">\r\n <xs:sequence>\r\n <xs:element name=\"string\" type=\"xs:string\" minOccurs=\"1\" maxOccurs=\"unbounded\" />\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"Srs\">\r\n <xs:sequence>\r\n <xs:element name=\"number\" type=\"xs:integer\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The numeric part of the EPSG code, i.e. for EPSG:4326 use \"4326\".\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"GridSet\">\r\n <xs:sequence>\r\n <xs:element name=\"name\" type=\"xs:string\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The name is the unique identifer of the grid set\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"description\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n A description of the gridset\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"srs\" type=\"gwc:Srs\" />\r\n <xs:element name=\"extent\" type=\"gwc:Bounds\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The extent of the grid. This should generally be the biggest\r\n bounding box that is valid for the selected SRS. If you change the\r\n grid bounds you must also clear all caches\r\n related to this layer.\r\n Coordinates must be specified in the context of the SRS for which the\r\n grid is being\r\n defined.\r\n\r\n To set tighter bounds and avoid repetitive tiles, use the gridSubset\r\n on each layer to define the\r\n exact bounds.\r\n\r\n The area does not have to be square, GeoWebCache will automatically\r\n pad it to form a set of\r\n suitable, rectangular grids\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"alignTopLeft\" type=\"xs:boolean\" minOccurs=\"0\" maxOccurs=\"1\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n In many cases the specified extent does not result in an integer\r\n height or width for every resolution. In these cases GeoWebCache\r\n will modify the extent in the X and/or Y\r\n direction.\r\n\r\n If you set this to true GWC will not change the top coordinate,\r\n but expand the bottom instead. This\r\n is convenient for systems\r\n like WMTS, but may confuse WMS-C clients.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:choice minOccurs=\"0\" maxOccurs=\"1\">\r\n <xs:element name=\"resolutions\" type=\"gwc:DoubleList\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n You can either specify an array of resolutions in descending\r\n order,\r\n scales in ascending order OR the number of zoom levels.\r\n\r\n Resolutions are specified as (SRS units) /\r\n pixel. For instance,\r\n if your grid bounds are 180 by 180 degrees (in WGS84, this would be\r\n either\r\n hemissphere), and the tiles are 256 by 256 pixels, then first\r\n resolution would be 180 degress / 256 pixels\r\n = 0.703125 degrees / pixel.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"scaleDenominators\" type=\"gwc:DoubleList\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n You can either specify an array of resolutions in descending\r\n order,\r\n scales in ascending order OR the number of zoom levels.\r\n\r\n Scales are calculated in accordance with the\r\n OGC WMS 1.3.0 standard.\r\n Slightly simplified: scale = resolution / 0.00028\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"levels\" type=\"xs:integer\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n You can either specify an array of resolutions in descending\r\n order,\r\n scales in ascending order OR the number of zoom levels.\r\n\r\n If the desired number of zoom levels is\r\n specified GWC will try to\r\n automatically determine a sensible set of resolutions.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:choice>\r\n <xs:element name=\"metersPerUnit\" type=\"xs:double\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The value of \"1 map unit\" in real world meters. This value is\r\n used\r\n for approximate scale calculations and is usually not very accurate.\r\n For lat/lon you should use\r\n 40041470\r\n meters / 360.0 degrees = 111226.31 m/degree\r\n\r\n If no value is specified, it is assumed that the coordinate\r\n system is defined in meters.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"pixelSize\" type=\"xs:double\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The size of one pixel in meters. OGC makes teh assumption this is\r\n 0.28mm, so the default value is 0.00028. The value is used for\r\n scale calculations and passed to the\r\n automatically generated\r\n OpenLayers demos.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"scaleNames\" type=\"gwc:StringList\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n If you specify scales or resolutions, you may optionally specify\r\n a\r\n list of scale names that, in WMTS, identify each Matrix.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"tileHeight\" type=\"xs:integer\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The number of pixels every tile is in the Y-direction. The default\r\n is 256\r\n\r\n If you change this value you must also reconsidering metatiling and\r\n clear the cache.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"tileWidth\" type=\"xs:integer\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The number of pixels every tile is in the X-direction. The default\r\n is 256\r\n\r\n If you change this value you must also reconsidering metatiling and\r\n clear the cache.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"yCoordinateFirst\" type=\"xs:boolean\" minOccurs=\"0\" default=\"false\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Indicates whether the Coordinate Reference System has lat/long - y/x axis order\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"GridSubsets\">\r\n <xs:sequence>\r\n <xs:element name=\"gridSubset\" type=\"gwc:GridSubset\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"GridSubset\">\r\n <xs:sequence>\r\n <xs:element name=\"gridSetName\" type=\"xs:string\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n This name must match the name of the parent gridSet exactly.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"extent\" type=\"gwc:Bounds\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n These bounds define the subset of the extent that this\r\n grid subset\r\n covers. The bounds must be given in the\r\n same spatial reference system as the extent.\r\n\r\n The default is the full\r\n extent of the parent grid set.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"zoomStart\" type=\"xs:integer\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n If the the layer does not make sense at high zoom levels\r\n you can\r\n define a starting point here.\r\n\r\n The default is 0.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"zoomStop\" type=\"xs:integer\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n If the layer does not contain features that make sense to show\r\n when\r\n zoomed in then you can set the stop level here.\r\n\r\n The default is the length of the resolutions / scale\r\n array, plus one.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"minCachedLevel\" type=\"xs:integer\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n If provided, requests for zoom levels below this threshold will\r\n pass through to the original service.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"maxCachedLevel\" type=\"xs:integer\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n If provided, requests for zoom levels above this threshold will\r\n pass through to the original service.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"Bounds\">\r\n <xs:sequence>\r\n <xs:element name=\"coords\" type=\"gwc:coords\" />\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"coords\">\r\n <xs:sequence>\r\n <xs:element name=\"double\" type=\"xs:double\" minOccurs=\"4\" maxOccurs=\"4\" />\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"WmsUrl\">\r\n <xs:sequence>\r\n <xs:element name=\"string\" type=\"xs:string\" minOccurs=\"1\" maxOccurs=\"unbounded\" />\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"MetaWidthHeight\">\r\n <xs:sequence>\r\n <xs:element name=\"int\" type=\"xs:integer\" minOccurs=\"2\" maxOccurs=\"2\" />\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"ParameterFilters\">\r\n <xs:sequence minOccurs=\"0\" maxOccurs=\"unbounded\">\r\n <xs:choice>\r\n <xs:element name=\"regexParameterFilter\" type=\"gwc:RegexParameterFilter\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Regular expression parameter filters\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"floatParameterFilter\" type=\"gwc:FloatParameterFilter\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Floating point parameter filters\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"stringParameterFilter\" type=\"gwc:StringParameterFilter\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n String parameter filters\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:choice>\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"RegexParameterFilter\">\r\n <xs:sequence>\r\n <xs:element name=\"key\" type=\"xs:string\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The key for which the filter should be invoked. The key is case\r\n insensitive.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"defaultValue\" type=\"xs:string\" minOccurs=\"0\" maxOccurs=\"1\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The default value. This value is used When the client does not\r\n specify\r\n the parameter in the request. If you omit this element, the entire parameter\r\n wil be omitted if the\r\n client does not include it in request.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"regex\" type=\"xs:string\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The regular expression used to match against the value requested\r\n by the client.\r\n Care should be taken to allow as few values as possible and to make the\r\n expression as efficient\r\n as possible. See Java's regular expression documentation,\r\n the dialect is similar to Perl's regular\r\n expressions.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"FloatParameterFilter\">\r\n <xs:sequence>\r\n <xs:element name=\"key\" type=\"xs:string\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The key for which the filter should be invoked. The key is NOT\r\n casesensitive.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"defaultValue\" type=\"xs:string\" minOccurs=\"0\" maxOccurs=\"1\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The default value. This value is used When the client does not\r\n specify\r\n the parameter in the request. If you omit this element, the entire parameter\r\n wil be omitted if the\r\n client does not include it in request.\r\n\r\n This value must be included in the list of values\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"values\" type=\"gwc:FloatList\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n A list of floating point numbers that are possible values. When a\r\n client request is\r\n received these are scanned linearly and that best match, in terms of smallest\r\n absolute\r\n difference, is used.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"threshold\" type=\"xs:float\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n For a request to be accepted, the difference between the value and\r\n the best match\r\n must not exceed the threshold specified here. A reasonable value is the largest\r\n difference\r\n between two adjacent values.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"StringParameterFilter\">\r\n <xs:sequence>\r\n <xs:element name=\"key\" type=\"xs:string\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The key for which the filter should be invoked. The key is NOT\r\n casesensitive.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"defaultValue\" type=\"xs:string\" minOccurs=\"0\" maxOccurs=\"1\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The default value. This value is used When the client does not\r\n specify\r\n the parameter in the request. If you omit this element, the entire parameter\r\n wil be omitted if the\r\n client does not include it in request.\r\n\r\n This value must be included in the list of values\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"values\" type=\"gwc:StringList\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n A list of strings that represent possible values. These are case\r\n sensitive.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"DoubleList\">\r\n <xs:sequence>\r\n <xs:element name=\"double\" type=\"xs:double\" minOccurs=\"1\" maxOccurs=\"unbounded\" />\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"FloatList\">\r\n <xs:sequence>\r\n <xs:element name=\"float\" type=\"xs:float\" minOccurs=\"1\" maxOccurs=\"unbounded\" />\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"StringList\">\r\n <xs:sequence>\r\n <xs:element name=\"string\" type=\"xs:string\" minOccurs=\"1\" maxOccurs=\"unbounded\" />\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"formatModifiers\">\r\n <xs:sequence>\r\n <xs:element name=\"formatModifier\" type=\"gwc:FormatModifier\" minOccurs=\"1\" maxOccurs=\"unbounded\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Format modifiers, used to request PNGs when compressing to JPEG,\r\n overriding transparency, palette and setting the background for specifc formats.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"FormatModifier\">\r\n <xs:sequence>\r\n <xs:element name=\"responseFormat\" type=\"xs:string\" minOccurs=\"1\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Format modifiers are keyed by the format requested by the client\r\n accessing GWC\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"requestFormat\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n This is the format used when GWC queries the backend server\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"transparent\" type=\"xs:boolean\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n This overrides the value for transparent when GWC queries the\r\n backend server.\r\n If the response format does not support transparency you generally want this off.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"bgColor\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n This is the bgColor used when GWC queries the backend server. It\r\n is a\r\n 0x prefixed RGB value, for example 0xDDDDDD is light grey. It only applies\r\n if transparency is off.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"palette\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n This is the palette used when GWC queries the backend server.\r\n The\r\n palette must be known on the backend server. It does not affect\r\n the palette used when GWC persists the tiles.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"compressionQuality\" type=\"xs:float\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n This is a floating point value that describes the compression. It\r\n has to be a postive number less than or equal to 1.0. For minimal\r\n compression (best quality) use 1.0, smaller\r\n values yield better\r\n file sizes. Note that as of GWC 1.1.3 this setting only applies\r\n to the response format\r\n JPEG.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"RequestFilters\">\r\n <xs:choice minOccurs=\"0\" maxOccurs=\"unbounded\">\r\n <xs:element name=\"circularExtentFilter\" type=\"gwc:circularExtentFilter\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The circular extent filter is just a dummy filter for testing\r\n purposes\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"wmsRasterFilter\" type=\"gwc:WmsRasterFilter\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n A filter that uses a raster to represent each tile on the grid. A\r\n black pixel represents\r\n one that has data which GWC will return. Other values are interpreted as meaning no\r\n data.\r\n This allows great refinement compared to the rectangular bounds. This particular implementation uses\r\n WMS requests to retrieve filters for each zoomlevel, which are then stored in memory until\r\n GWC is restarted.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"fileRasterFilter\" type=\"gwc:FileRasterFilter\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n A filter that uses a raster to represent each tile on the grid. A\r\n black pixel represents\r\n one that has data which GWC will return. Other values are interpreted as meaning no\r\n data.\r\n This allows great refinement compared to the rectangular bounds. This particular implementation uses\r\n reads raster files from a directory, which are then stored in memory until GWC is restarted.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:choice>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"circularExtentFilter\">\r\n <xs:sequence>\r\n <xs:element name=\"name\" type=\"xs:string\" minOccurs=\"1\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The name of the filter. This is added to the HTTP header when a\r\n filter triggers,\r\n to make debugging the filters easier. This name should be unique.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"WmsRasterFilter\">\r\n <xs:sequence>\r\n <xs:element name=\"name\" type=\"xs:string\" minOccurs=\"1\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The name of the filter. This is added to the HTTP header when a\r\n filter triggers,\r\n to make debugging the filters easier. This name should be unique.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"zoomStart\" type=\"xs:integer\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n This is the minimum zoom level for which the filter is applied. If\r\n the request\r\n is for a lower zoom level, and you do not enable resample below, it will\r\n be accepted.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"zoomStop\" type=\"xs:integer\" minOccurs=\"1\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The maximum zoom level for which to load a raster. For higher zoom\r\n levels\r\n the last supported level will be upsampled. The best value is a compromise\r\n between the size of the\r\n raster (depends on the bounds) and a zoom level\r\n that is sufficcient to approximate the shape of the actual\r\n data.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"resample\" type=\"xs:boolean\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n If you enable resampling and zoomStart, requests\r\n for zoom levels\r\n &lt; zoomStart will be upsampled and then checked against the\r\n zoomStart raster. This is useful if, due to\r\n rounding errors, the raster\r\n for zoom levels lowers than zoomStart do not contain all features.\r\n all features at\r\n higher zoom levels.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"preload\" type=\"xs:boolean\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Whether to load all the rasters from zoom level 0 to zoomStop upon\r\n initialization.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"debug\" type=\"xs:boolean\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Setting this variable to TRUE provides visual debug output by\r\n returning a bright\r\n green tile where normally a transparent one would be returned. This also means\r\n KML\r\n hierarchies will link to these particular tiles.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"wmsLayers\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The LAYERS value sent to the WMS backend server. This should refer\r\n to one\r\n or more (comma separated) layers that cover all data of interest. It can\r\n be the data itself, or a\r\n simpler metadata layer.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"wmsStyles\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The STYLES value sent to the WMS backend server. This should refer\r\n to an\r\n exaggerated style to ensure the tiles do not cut off any features.\r\n A sample SLD is distributed with GWC\r\n in the resource (WEB-INF/class) directory.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"backendTimeout\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The timeout for requesting a raster from the WMS server. The\r\n default is two\r\n minutes, since these can be quite large.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"FileRasterFilter\">\r\n <xs:sequence>\r\n <xs:element name=\"name\" type=\"xs:string\" minOccurs=\"1\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The name of the filter. This is added to the HTTP header when a\r\n filter triggers,\r\n to make debugging the filters easier. This name should be unique.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"zoomStart\" type=\"xs:integer\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n This is the minimum zoom level for which the filter is applied. If\r\n the request\r\n is for a lower zoom level, and you do not enable resample below, it will\r\n be accepted.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"zoomStop\" type=\"xs:integer\" minOccurs=\"1\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The maximum zoom level for which to load a raster. For higher zoom\r\n levels\r\n the last supported level will be upsampled. The best value is a compromise\r\n between the size of the\r\n raster (depends on the bounds) and a zoom level\r\n that is sufficcient to approximate the shape of the actual\r\n data.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"resample\" type=\"xs:boolean\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n If you enable resampling and zoomStart, requests\r\n for zoom levels\r\n &lt; zoomStart will be upsampled and then checked against the\r\n zoomStart raster. This is useful if, due to\r\n rounding errors, the raster\r\n for zoom levels lowers than zoomStart do not contain all features.\r\n all features at\r\n higher zoom levels.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"preload\" type=\"xs:boolean\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Whether to load all the rasters from zoom level 0 to zoomStop upon\r\n initialization.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"debug\" type=\"xs:boolean\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Setting this variable to TRUE provides visual debug output by\r\n returning a bright\r\n green tile where normally a transparent one would be returned. This also means\r\n KML\r\n hierarchies will link to these particular tiles.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"storagePath\" type=\"xs:string\" minOccurs=\"1\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The local storage path for the raster files used to build the\r\n filter.\r\n This should be a local path at least readable by the user\r\n that GWC runs as. The files should have\r\n names as follows:\r\n [name of filter]_EPSG_[EPSG code]_[zoom level, from 0 to zoomStop].[fileExtension]\r\n Example:\r\n testfilter_EPSG_4326_4.tiff\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"fileExtension\" type=\"xs:string\" minOccurs=\"1\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The extension of the raster files. Typically you would use a 1 bit\r\n TIFF,\r\n but PNG and GIF could also be used.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"ExpireList\">\r\n <xs:sequence>\r\n <xs:element name=\"expirationRule\" type=\"gwc:ExpirationRule\" minOccurs=\"1\" maxOccurs=\"unbounded\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The name of the filter. This is added to the HTTP header when a\r\n filter triggers,\r\n to make debugging the filters easier. This name should be unique.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"ExpirationRule\">\r\n <xs:attribute name=\"minZoom\" type=\"xs:int\" />\r\n <xs:attribute name=\"expiration\" type=\"xs:int\" />\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"DEPRECATEDgrids\">\r\n <xs:sequence>\r\n <xs:element name=\"entry\" type=\"gwc:DEPRECATEDentry\" minOccurs=\"1\" maxOccurs=\"unbounded\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n DEPRECATED\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"DEPRECATEDentry\">\r\n <xs:sequence>\r\n <xs:element name=\"srs\" type=\"gwc:Srs\" />\r\n <xs:element name=\"grid\" type=\"gwc:DEPRECATEDgrid\" />\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"DEPRECATEDgrid\">\r\n <xs:sequence>\r\n <xs:element name=\"srs\" type=\"gwc:Srs\" />\r\n <xs:element name=\"dataBounds\" type=\"gwc:Bounds\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n DEPRECATED\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"gridBounds\" type=\"gwc:Bounds\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n DEPRECATED\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:choice minOccurs=\"0\" maxOccurs=\"1\">\r\n <xs:element name=\"resolutions\" type=\"gwc:DoubleList\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n DEPRECATED\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:sequence>\r\n <xs:element name=\"zoomStart\" type=\"xs:integer\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n DEPRECATED\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"zoomStop\" type=\"xs:integer\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n DEPRECATED\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:sequence>\r\n </xs:choice>\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"UpdateSources\">\r\n <xs:sequence>\r\n <xs:choice minOccurs=\"0\" maxOccurs=\"1\">\r\n <xs:element name=\"geoRssFeed\" type=\"gwc:GeoRssFeed\" minOccurs=\"0\" maxOccurs=\"unbounded\" />\r\n </xs:choice>\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"GeoRssFeed\">\r\n <xs:sequence>\r\n <xs:element name=\"feedUrl\" type=\"xs:string\" minOccurs=\"1\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n A parameterized URL to a GeoRSS GML feed. If you insert\r\n someVariable=${lastUpdate},\r\n ${lastUpdate} will be replaced with the timestamp of the last processed update\r\n from this source.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"gridSetId\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The name of the grid set for which this feed applies. Note that\r\n the geometries\r\n provided by the feed must be in the spatial reference system of the grid set.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"pollInterval\" type=\"xs:integer\" minOccurs=\"1\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n How often the GeoRSS source should be polled. Omitting this value\r\n or setting it\r\n to -1 will disable this feed.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"operation\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n If omitted the operation is \"truncate\" by default, alternatively\r\n it can be \"reseed\".\r\n Note that even if you specify \"seed\", the affected area will first be truncated\r\n before\r\n seeding starts, to get rid of stale data as quickly as possible.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"format\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n By default all tiles in the affected area will be refreshed. You\r\n may specify a\r\n single format (use the MIME type) so that only tiles of that type are updated,\r\n e.g. \"image/png\"\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"seedingThreads\" type=\"xs:integer\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n This controls the number of threads to use per format while\r\n seeding,\r\n provided the operation is seed or reseed. (Truncate is synchronous\r\n and single threaded.) So if you\r\n write 2 threads here, and the layer\r\n supports 3 formats, and no format is specified above, then the total\r\n number of threads will be 3x2 = 6\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"maxMaskLevel\" type=\"xs:integer\" minOccurs=\"1\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n In order to determine what tiles are affected the geometries from\r\n the\r\n feed are rendered onto canvases where every pixel represents a tile.\r\n This number determines the max zoom\r\n level for which to create such a\r\n raster. A higher number means a higher resolution image and thus less\r\n tiles,\r\n but requires more memory. 11 is usually a good number.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n\r\n <xs:complexType name=\"LayerMetaInformation\">\r\n <xs:sequence>\r\n <xs:element name=\"title\" type=\"xs:string\" minOccurs=\"1\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n A human friendly title for the layer\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"description\" type=\"xs:string\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n A description / abstract for the layer\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"keywords\" type=\"gwc:KeywordsType\" maxOccurs=\"1\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Keywords that describe this layer.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n\r\n <xs:complexType name=\"ServiceInformationType\">\r\n <xs:sequence>\r\n <xs:element name=\"title\" type=\"xs:string\" minOccurs=\"0\" maxOccurs=\"1\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The title of this service as you would like others to see it.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"description\" type=\"xs:string\" minOccurs=\"0\" maxOccurs=\"1\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n A description of this service.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"keywords\" type=\"gwc:KeywordsType\" maxOccurs=\"1\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Keywords that describe this service.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"serviceProvider\" type=\"gwc:ServiceProviderType\" maxOccurs=\"1\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Contact information for the organisation and/or responsible person\r\n for this service.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"fees\" type=\"xs:string\" maxOccurs=\"1\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Any fees that relate to the use of this service.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"accessConstraints\" type=\"xs:string\" maxOccurs=\"1\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n Any access constraints that relate to the use of this service.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"providerName\" type=\"xs:string\" maxOccurs=\"1\" minOccurs=\"0\">\r\n </xs:element>\r\n <xs:element name=\"providerSite\" type=\"xs:string\" maxOccurs=\"1\" minOccurs=\"0\">\r\n </xs:element>\r\n </xs:sequence>\r\n\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"KeywordsType\">\r\n <xs:sequence>\r\n <xs:element name=\"string\" type=\"xs:string\" minOccurs=\"0\" maxOccurs=\"unbounded\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n A keyword that describes this service.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"ServiceProviderType\">\r\n <xs:sequence>\r\n <xs:element name=\"providerName\" type=\"xs:string\" maxOccurs=\"1\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The name of the provider of this service (i.e. organisation name).\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"providerSite\" type=\"xs:string\" maxOccurs=\"1\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The web site for the provider of this service.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"serviceContact\" type=\"gwc:ServiceContactType\" maxOccurs=\"1\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The contact details for this service.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:sequence>\r\n </xs:complexType>\r\n\r\n <xs:complexType name=\"ServiceContactType\">\r\n <xs:sequence>\r\n <xs:element name=\"individualName\" type=\"xs:string\" maxOccurs=\"1\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The contact person for this service.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"positionName\" type=\"xs:string\" maxOccurs=\"1\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The position within the organisation of the service contact.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"addressType\" type=\"xs:string\" maxOccurs=\"1\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The address type for the service contact, i.e. \"Home\", or \"Work\"\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"addressStreet\" type=\"xs:string\" maxOccurs=\"1\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The street address of the service contact.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"addressCity\" type=\"xs:string\" maxOccurs=\"1\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The city of the service contact.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"addressAdministrativeArea\" type=\"xs:string\" maxOccurs=\"1\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The state/province/territory of the service contact.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"addressPostalCode\" type=\"xs:string\" maxOccurs=\"1\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The postal code of the service contact.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"addressCountry\" type=\"xs:string\" maxOccurs=\"1\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The country of the service contact.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"phoneNumber\" type=\"xs:string\" maxOccurs=\"1\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The phone number of the service contact.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"faxNumber\" type=\"xs:string\" maxOccurs=\"1\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The fax number of the service contact.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n <xs:element name=\"addressEmail\" type=\"xs:string\" maxOccurs=\"1\" minOccurs=\"0\">\r\n <xs:annotation>\r\n <xs:documentation xml:lang=\"en\">\r\n The email address of the service contact.\r\n </xs:documentation>\r\n </xs:annotation>\r\n </xs:element>\r\n </xs:sequence>\r\n </xs:complexType>\r\n</xs:schema>\r\n"} +{"text": "/*\nCopyright 2020 The Magma Authors.\n\nThis source code is licensed under the BSD-style license found in the\nLICENSE file in the root directory of this source tree.\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\npackage server\n\nimport (\n\t\"context\"\n\t\"fbc/cwf/radius/config\"\n\t\"fbc/cwf/radius/modules\"\n\t\"fbc/cwf/radius/monitoring\"\n\t\"fbc/lib/go/radius\"\n\t\"fmt\"\n\t\"math/rand\"\n\n\t\"fbc/cwf/radius/session\"\n\t\"sync/atomic\"\n\n\t\"github.com/mitchellh/mapstructure\"\n\t\"github.com/patrickmn/go-cache\"\n\t\"go.opencensus.io/tag\"\n\t\"go.uber.org/zap\"\n)\n\n// UDPListener listens to Radius udp packets\ntype UDPListener struct {\n\tListener\n\tServer *radius.PacketServer\n\tready chan bool\n}\n\n// UDPListenerExtraConfig extra config for UDP listener\ntype UDPListenerExtraConfig struct {\n\tPort int `json:\"port\"`\n}\n\n// NewUDPListener ...\nfunc NewUDPListener() *UDPListener {\n\treturn &UDPListener{\n\t\tready: make(chan bool),\n\t}\n}\n\n// Init override\nfunc (l *UDPListener) Init(\n\tserver *Server,\n\tserverConfig config.ServerConfig,\n\tlistenerConfig config.ListenerConfig,\n\tctrs monitoring.ListenerCounters,\n) error {\n\t// Parse configuration\n\tvar cfg UDPListenerExtraConfig\n\terr := mapstructure.Decode(listenerConfig.Extra, &cfg)\n\tif err != nil {\n\t\treturn err\n\t}\n\n\t// Create packet server\n\tl.Server = &radius.PacketServer{\n\t\tHandler: radius.HandlerFunc(\n\t\t\tgeneratePacketHandler(l, server, ctrs),\n\t\t),\n\t\tSecretSource: radius.StaticSecretSource([]byte(serverConfig.Secret)),\n\t\tAddr: fmt.Sprintf(\":%d\", cfg.Port),\n\t\tReady: make(chan bool),\n\t}\n\treturn nil\n}\n\n// ListenAndServe override\nfunc (l *UDPListener) ListenAndServe() error {\n\tserverError := make(chan error, 1)\n\tgo func() {\n\t\terr := l.Server.ListenAndServe()\n\t\tserverError <- err\n\t}()\n\n\t// Wait to see if initialization was successful\n\tselect {\n\tcase _ = <-l.Server.Ready:\n\t\tl.ready <- true\n\t\treturn nil\n\tcase err := <-serverError:\n\t\tl.ready <- false\n\t\treturn err // might be nil if no error\n\t}\n}\n\n// GetHandleRequest override\nfunc (l *UDPListener) GetHandleRequest() modules.Middleware {\n\treturn l.HandleRequest\n}\n\n// Shutdown override\nfunc (l *UDPListener) Shutdown(ctx context.Context) error {\n\treturn l.Server.Shutdown(ctx)\n}\n\n// Ready override\nfunc (l *UDPListener) Ready() chan bool {\n\treturn l.ready\n}\n\n// SetConfig override\nfunc (l *UDPListener) SetConfig(c config.ListenerConfig) {\n\tl.Config = c\n}\n\n// generatePacketHandler A generic handler method to incoming RADIUS packets\nfunc generatePacketHandler(\n\tl ListenerInterface,\n\tserver *Server,\n\tctrs monitoring.ListenerCounters,\n) func(radius.ResponseWriter, *radius.Request) {\n\tserver.logger.Debug(\n\t\t\"Registering handler for listener\",\n\t\tzap.String(\"listener\", l.GetConfig().Name),\n\t)\n\treturn func(w radius.ResponseWriter, r *radius.Request) {\n\t\t// Make sure no duplicate packet\n\t\tdedupOperation := server.counters.DedupPacket.Start(\n\t\t\ttag.Upsert(monitoring.ListenerTag, l.GetConfig().Name),\n\t\t)\n\t\trequestKey := fmt.Sprintf(\"%s_%d\", r.RemoteAddr, r.Identifier)\n\n\t\tif _, found := server.dedupSet.Get(requestKey); found {\n\t\t\tserver.logger.Warn(\n\t\t\t\t\"Duplicate packet was receieved and dropped\",\n\t\t\t\tzap.Stringer(\"source_ip\", r.RemoteAddr),\n\t\t\t\tzap.Int(\"identifier\", int(r.Identifier)),\n\t\t\t)\n\t\t\tatomic.AddUint32(l.GetDupDropped(), 1)\n\t\t\tdedupOperation.Failure(\"duplicate_packet_dropped\")\n\t\t\treturn\n\t\t}\n\t\tserver.dedupSet.Set(requestKey, \"-\", cache.DefaultExpiration)\n\t\tdedupOperation.Success()\n\n\t\t// Get session ID from the request, if exists, and setup correlation ID\n\t\tvar correlationField = zap.Uint32(\"correlation\", rand.Uint32())\n\t\tsessionID := server.GetSessionID(r)\n\t\tgeneratedSessionID := server.GenSessionID(r)\n\n\t\t// Create request context\n\t\trequestContext := modules.RequestContext{\n\t\t\tRequestID: correlationField.Integer,\n\t\t\tLogger: server.logger.With(correlationField),\n\t\t\tSessionID: sessionID,\n\t\t\tSessionStorage: session.NewSessionStorageExt(server.multiSessionStorage, sessionID, generatedSessionID),\n\t\t}\n\n\t\t// Execute filters\n\t\tfilterProcessCounter := monitoring.NewOperation(\"filter_process\").Start()\n\t\tfor _, filter := range server.filters {\n\t\t\terr := filter.Code.Process(&requestContext, l.GetConfig().Name, r)\n\t\t\tif err != nil {\n\t\t\t\tserver.logger.Error(\"Failed to process reqeust by filter\", zap.Error(err), correlationField)\n\t\t\t\tfilterProcessCounter.Failure(\n\t\t\t\t\t\"filter_failed\",\n\t\t\t\t\ttag.Upsert(monitoring.FilterTag, filter.Name),\n\t\t\t\t)\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t\tfilterProcessCounter.Success()\n\n\t\t// Execute modules\n\t\tlistenerHandleCounter := ctrs.StartRequest(r.Code)\n\t\tresponse, err := l.GetHandleRequest()(&requestContext, r)\n\t\tif err != nil {\n\t\t\tserver.logger.Error(\"Failed to handle reqeust by listener\", zap.Error(err), correlationField)\n\t\t\tlistenerHandleCounter.Failure(\"handle_failed\")\n\t\t\treturn\n\t\t}\n\t\tif response == nil {\n\t\t\tserver.logger.Error(\"Got nil response from handler. Response will not be sent\", correlationField)\n\t\t\tlistenerHandleCounter.Failure(\"nil_response\")\n\t\t\treturn\n\t\t}\n\t\tlistenerHandleCounter.GotResponse(response.Code)\n\n\t\tif response == nil {\n\t\t\tserver.logger.Warn(\n\t\t\t\t\"Request failed to be handled, as no response returned\",\n\t\t\t\tcorrelationField,\n\t\t\t)\n\t\t\treturn\n\t\t}\n\n\t\t// Build response\n\t\tserver.logger.Warn(\n\t\t\t\"Request successfully handled\",\n\t\t\tcorrelationField,\n\t\t)\n\t\tradiusResponse := r.Response(response.Code)\n\t\tfor key, values := range response.Attributes {\n\t\t\tfor _, value := range values {\n\t\t\t\tradiusResponse.Add(key, value)\n\t\t\t}\n\t\t}\n\t\tw.Write(radiusResponse)\n\t}\n}\n"} +{"text": "/****************************************************************************\n *\n * MODULE: ReCalibrate\n *\n * DESCRIPTION:\n * Header for Re-cal module\n *\n *\n ****************************************************************************\n *\n * This software is owned by NXP B.V. and/or its supplier and is protected\n * under applicable copyright laws. All rights are reserved. We grant You,\n * and any third parties, a license to use this software solely and\n * exclusively on NXP products [NXP Microcontrollers such as JN5148, JN5142, JN5139]. \n * You, and any third parties must reproduce the copyright and warranty notice\n * and any other legend of ownership on each copy or partial copy of the \n * software.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *\n * Copyright NXP B.V. 2012. All rights reserved\n *\n ***************************************************************************/\n\n/****************************************************************************/\n/*** Include files ***/\n/****************************************************************************/\n#ifndef RECAL_H_INCLUDED\n#define RECAL_H_INCLUDED\n\n#ifdef __cplusplus\nextern \"C\" {\n#endif\n\n#include \"jendefs.h\"\n\ntypedef enum\n{\n E_CAL_SUCCESS,\n E_CAL_SCAN_IN_PROGRESS\n}teCalStatus;\n\nPUBLIC bool_t bAHI_PeriodicRecalInit(uint32 u32RecalCheckPeriod,uint8 u8TempDelta);\nPUBLIC bool_t bAHI_PeriodicRecal(void);\nPUBLIC bool_t bAHI_PeriodicRecalRange(uint32 u32RecalCheckPeriod, uint8 u8TempDelta);\nPUBLIC teCalStatus eAHI_AttemptCalibration(void);\n\n#ifdef __cplusplus\n};\n#endif\n\n#endif /* RECAL_H_INCLUDED */\n"} +{"text": "#ifndef Magnum_Platform_WindowlessWglApplication_h\n#define Magnum_Platform_WindowlessWglApplication_h\n/*\n This file is part of Magnum.\n\n Copyright © 2010, 2011, 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019,\n 2020 Vladimír Vondruš <mosra@centrum.cz>\n\n Permission is hereby granted, free of charge, to any person obtaining a\n copy of this software and associated documentation files (the \"Software\"),\n to deal in the Software without restriction, including without limitation\n the rights to use, copy, modify, merge, publish, distribute, sublicense,\n and/or sell copies of the Software, and to permit persons to whom the\n Software is furnished to do so, subject to the following conditions:\n\n The above copyright notice and this permission notice shall be included\n in all copies or substantial portions of the Software.\n\n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n DEALINGS IN THE SOFTWARE.\n*/\n\n/** @file\n * @brief Class @ref Magnum::Platform::WindowlessWglApplication, @ref Magnum::Platform::WindowlessWglContext, macro @ref MAGNUM_WINDOWLESSWGLAPPLICATION_MAIN()\n */\n\n#include \"Magnum/configure.h\"\n\n#ifdef MAGNUM_TARGET_GL\n#ifndef DOXYGEN_GENERATING_OUTPUT\n#define WIN32_LEAN_AND_MEAN 1\n#define VC_EXTRALEAN\n#endif\n#include <windows.h>\n#include <Corrade/Containers/EnumSet.h>\n#include <Corrade/Containers/Pointer.h>\n\n#include \"Magnum/Magnum.h\"\n#include \"Magnum/Tags.h\"\n#include \"Magnum/GL/OpenGL.h\"\n#include \"Magnum/Platform/Platform.h\"\n\n#ifndef DOXYGEN_GENERATING_OUTPUT\n/* Define stuff that we need because I can't be bothered with creating a new\n header just for a few defines */\n#define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001\n#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002\n#endif\n\nnamespace Magnum { namespace Platform {\n\n/**\n@brief Windowless WGL context\n\n@m_keywords{WindowlessGLContext WGL}\n\nGL context using pure WINAPI, used in @ref WindowlessWglApplication.\n\nMeant to be used when there is a need to manage (multiple) GL contexts\nmanually. See @ref platform-windowless-contexts for more information. If no\nother application header is included, this class is also aliased to\n@cpp Platform::WindowlessGLContext @ce.\n\n@note This class is available only if Magnum is compiled with\n @ref MAGNUM_TARGET_GL enabled (done by default). See @ref building-features\n for more information.\n*/\nclass WindowlessWglContext {\n public:\n class Configuration;\n\n /**\n * @brief Constructor\n * @param configuration Context configuration\n * @param context Optional Magnum context instance constructed\n * using @ref NoCreate to manage driver workarounds\n *\n * On desktop GL, if version is not specified in @p configuration, the\n * application first tries to create core context (OpenGL 3.1+) and if\n * that fails, falls back to compatibility OpenGL 2.1 context. However,\n * on binary AMD and NVidia drivers, creating core context does not use\n * the largest available version. If the application detects such case\n * (and given workaround is not disabled in optionally passed\n * @p context instance), the core context is destroyed and\n * compatibility OpenGL 2.1 context is created instead to make the\n * driver use the latest available version.\n *\n * Once the context is created, make it current using\n * @ref makeCurrent() and create @ref Platform::GLContext instance to\n * be able to use Magnum.\n * @see @ref isCreated()\n */\n explicit WindowlessWglContext(const Configuration& configuration, GLContext* context = nullptr);\n\n /**\n * @brief Construct without creating the context\n *\n * Move a instance with created context over to make it usable.\n */\n explicit WindowlessWglContext(NoCreateT) {}\n\n /** @brief Copying is not allowed */\n WindowlessWglContext(const WindowlessWglContext&) = delete;\n\n /** @brief Move constructor */\n WindowlessWglContext(WindowlessWglContext&& other);\n\n /** @brief Copying is not allowed */\n WindowlessWglContext& operator=(const WindowlessWglContext&) = delete;\n\n /** @brief Move assignment */\n WindowlessWglContext& operator=(WindowlessWglContext&& other);\n\n /**\n * @brief Destructor\n *\n * Destroys the context, if any.\n */\n ~WindowlessWglContext();\n\n /** @brief Whether the context is created */\n bool isCreated() const { return _context; }\n\n /**\n * @brief Make the context current\n *\n * Prints error message and returns @cpp false @ce on failure,\n * otherwise returns @cpp true @ce.\n */\n bool makeCurrent();\n\n /**\n * @brief Underlying OpenGL context\n * @m_since{2020,06}\n *\n * Use in case you need to call WGL functionality directly or in order\n * to create a shared context. Returns @cpp nullptr @ce in case the\n * context was not created yet.\n * @see @ref Configuration::setSharedContext()\n */\n HGLRC glContext() { return _context; }\n\n private:\n HWND _window{};\n HDC _deviceContext{};\n HGLRC _context{};\n};\n\n/**\n@brief Configuration\n\n@see @ref WindowlessWglContext(),\n @ref WindowlessWglApplication::WindowlessWglApplication(),\n @ref WindowlessWglApplication::createContext(),\n @ref WindowlessWglApplication::tryCreateContext()\n*/\nclass WindowlessWglContext::Configuration {\n public:\n /**\n * @brief Context flag\n *\n * @see @ref Flags, @ref setFlags(), @ref GL::Context::Flag\n */\n enum class Flag: int {\n #ifndef MAGNUM_TARGET_GLES\n /**\n * Forward compatible context\n *\n * @requires_gl Core/compatibility profile distinction and forward\n * compatibility applies only to desktop GL.\n */\n ForwardCompatible = WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB,\n #endif\n\n /**\n * Debug context. Enabled automatically if the\n * `--magnum-gpu-validation` @ref GL-Context-command-line \"command-line option\"\n * is present.\n */\n Debug = WGL_CONTEXT_DEBUG_BIT_ARB\n };\n\n /**\n * @brief Context flags\n *\n * @see @ref setFlags(), @ref Context::Flags\n */\n #ifndef DOXYGEN_GENERATING_OUTPUT\n typedef Containers::EnumSet<Flag, WGL_CONTEXT_DEBUG_BIT_ARB\n #ifndef MAGNUM_TARGET_GLES\n |WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB\n #endif\n > Flags;\n #else\n typedef Containers::EnumSet<Flag> Flags;\n #endif\n\n /*implicit*/ Configuration();\n\n /** @brief Context flags */\n Flags flags() const { return _flags; }\n\n /**\n * @brief Set context flags\n * @return Reference to self (for method chaining)\n *\n * Default is @ref Flag::ForwardCompatible on desktop GL and no flags\n * on OpenGL ES.\n * @see @ref addFlags(), @ref clearFlags(), @ref GL::Context::flags()\n */\n Configuration& setFlags(Flags flags) {\n _flags = flags;\n return *this;\n }\n\n /**\n * @brief Add context flags\n * @return Reference to self (for method chaining)\n *\n * Unlike @ref setFlags(), ORs the flags with existing instead of\n * replacing them. Useful for preserving the defaults.\n * @see @ref clearFlags()\n */\n Configuration& addFlags(Flags flags) {\n _flags |= flags;\n return *this;\n }\n\n /**\n * @brief Clear context flags\n * @return Reference to self (for method chaining)\n *\n * Unlike @ref setFlags(), ANDs the inverse of @p flags with existing\n * instead of replacing them. Useful for removing default flags.\n * @see @ref addFlags()\n */\n Configuration& clearFlags(Flags flags) {\n _flags &= ~flags;\n return *this;\n }\n\n /**\n * @brief Create a shared context\n * @return Reference to self (for method chaining)\n * @m_since{2020,06}\n *\n * When set, the created context will share a subset of OpenGL objects\n * with @p context, instead of being independent. Many caveats and\n * limitations apply to shared OpenGL contexts, please consult the\n * OpenGL specification for details. Default is @cpp nullptr @ce, i.e.\n * no sharing.\n * @see @ref WindowlessWglContext::glContext(),\n * @ref WindowlessWglApplication::glContext()\n */\n Configuration& setSharedContext(HGLRC context) {\n _sharedContext = context;\n return *this;\n }\n\n /**\n * @brief Shared context\n * @m_since{2020,06}\n */\n HGLRC sharedContext() const { return _sharedContext; }\n\n private:\n Flags _flags;\n HGLRC _sharedContext = nullptr;\n};\n\nCORRADE_ENUMSET_OPERATORS(WindowlessWglContext::Configuration::Flags)\n\n/**\n@brief Windowless WGL application\n\n@m_keywords{WindowlessApplication WGL}\n\nApplication for offscreen rendering using @ref WindowlessWglContext. This\napplication library is available on desktop OpenGL on Windows.\n\n@section Platform-WindowlessWglApplication-bootstrap Bootstrap application\n\nFully contained windowless application using @ref WindowlessWglApplication\nalong with CMake setup is available in `windowless` branch of\n[Magnum Bootstrap](https://github.com/mosra/magnum-bootstrap) repository,\ndownload it as [tar.gz](https://github.com/mosra/magnum-bootstrap/archive/windowless.tar.gz)\nor [zip](https://github.com/mosra/magnum-bootstrap/archive/windowless.zip)\nfile. After extracting the downloaded archive you can build and run the\napplication with these four commands:\n\n@code{.bat}\nmkdir build && cd build\ncmake ..\ncmake --build .\n./src/MyApplication # or ./src/Debug/MyApplication\n@endcode\n\nSee @ref cmake for more information.\n\n@section Platform-WindowlessWglApplication-usage General usage\n\nThis application library is built if `WITH_WINDOWLESSWGLAPPLICATION` is enabled\nwhen building Magnum. To use this library from CMake, request the\n`WindowlessWglApplication` component of the `Magnum` package and link to the\n`Magnum::WindowlessWglApplication` target:\n\n@code{.cmake}\nfind_package(Magnum REQUIRED)\nif(CORRADE_TARGET_WINDOWS)\n find_package(Magnum REQUIRED WindowlessWglApplication)\nendif()\n\n# ...\nif(CORRADE_TARGET_WINDOWS)\n target_link_libraries(your-app PRIVATE Magnum::WindowlessWglApplication)\nendif()\n@endcode\n\nAdditionally, if you're using Magnum as a CMake subproject, do the following\n* *before* calling @cmake find_package() @ce to ensure it's enabled, as the\nlibrary is not built by default:\n\n@code{.cmake}\nset(WITH_WINDOWLESSWGLAPPLICATION ON CACHE BOOL \"\" FORCE)\nadd_subdirectory(magnum EXCLUDE_FROM_ALL)\n@endcode\n\nIf no other application is requested, you can also use the generic\n`Magnum::WindowlessApplication` alias to simplify porting. Again, see\n@ref building and @ref cmake for more information.\n\nPlace your code into @ref exec(). The subclass can be then used in @cpp main() @ce\nfunction using @ref MAGNUM_WINDOWLESSWGLAPPLICATION_MAIN() macro. See\n@ref platform for more information.\n\n@code{.cpp}\nclass MyApplication: public Platform::WindowlessWglApplication {\n // implement required methods...\n};\nMAGNUM_WINDOWLESSWGLAPPLICATION_MAIN(MyApplication)\n@endcode\n\nIf no other application header is included, this class is also aliased to\n@cpp Platform::WindowlessApplication @ce and the macro is aliased to\n@cpp MAGNUM_WINDOWLESSAPPLICATION_MAIN() @ce to simplify porting.\n\n@note This class is available only if Magnum is compiled with\n @ref MAGNUM_TARGET_GL enabled (done by default). See @ref building-features\n for more information.\n*/\nclass WindowlessWglApplication {\n public:\n /** @brief Application arguments */\n struct Arguments {\n /** @brief Constructor */\n /*implicit*/ constexpr Arguments(int& argc, char** argv) noexcept: argc{argc}, argv{argv} {}\n\n int& argc; /**< @brief Argument count */\n char** argv; /**< @brief Argument values */\n };\n\n /**\n * @brief Configuration\n *\n * @see @ref WindowlessWglApplication(), @ref createContext(),\n * @ref tryCreateContext()\n */\n typedef WindowlessWglContext::Configuration Configuration;\n\n /**\n * @brief Default constructor\n * @param arguments Application arguments\n * @param configuration Configuration\n *\n * Creates application with default or user-specified configuration.\n * See @ref Configuration for more information. The program exits if\n * the context cannot be created, see @ref tryCreateContext() for an\n * alternative.\n * @see @ref WindowlessWglContext\n */\n #ifdef DOXYGEN_GENERATING_OUTPUT\n explicit WindowlessWglApplication(const Arguments& arguments, const Configuration& configuration = Configuration());\n #else\n /* To avoid \"invalid use of incomplete type\" */\n explicit WindowlessWglApplication(const Arguments& arguments, const Configuration& configuration);\n explicit WindowlessWglApplication(const Arguments& arguments);\n #endif\n\n /**\n * @brief Constructor\n * @param arguments Application arguments\n *\n * Unlike above, the context is not created and must be created later\n * with @ref createContext() or @ref tryCreateContext().\n */\n explicit WindowlessWglApplication(const Arguments& arguments, NoCreateT);\n\n /** @brief Copying is not allowed */\n WindowlessWglApplication(const WindowlessWglApplication&) = delete;\n\n /** @brief Moving is not allowed */\n WindowlessWglApplication(WindowlessWglApplication&&) = delete;\n\n /** @brief Copying is not allowed */\n WindowlessWglApplication& operator=(const WindowlessWglApplication&) = delete;\n\n /** @brief Moving is not allowed */\n WindowlessWglApplication& operator=(WindowlessWglApplication&&) = delete;\n\n /**\n * @brief Execute application\n * @return Value for returning from `main()`\n *\n * See @ref MAGNUM_WINDOWLESSWGLAPPLICATION_MAIN() for usage\n * information.\n */\n virtual int exec() = 0;\n\n /**\n * @brief Underlying OpenGL context\n * @m_since{2020,06}\n *\n * Use in case you need to call WGL functionality directly or in order\n * to create a shared context. Returns @cpp nullptr @ce in case the\n * context was not created yet.\n * @see @ref Configuration::setSharedContext()\n */\n HGLRC glContext() { return _glContext.glContext(); }\n\n protected:\n /* Nobody will need to have (and delete) WindowlessWglApplication*,\n thus this is faster than public pure virtual destructor */\n ~WindowlessWglApplication();\n\n /**\n * @brief Create context with given configuration\n *\n * Must be called if and only if the context wasn't created by the\n * constructor itself. Error message is printed and the program exits\n * if the context cannot be created, see @ref tryCreateContext() for an\n * alternative.\n * @see @ref WindowlessWglContext\n */\n #ifdef DOXYGEN_GENERATING_OUTPUT\n void createContext(const Configuration& configuration = Configuration());\n #else\n /* To avoid \"invalid use of incomplete type\" */\n void createContext(const Configuration& configuration);\n void createContext();\n #endif\n\n /**\n * @brief Try to create context with given configuration\n *\n * Unlike @ref createContext() returns @cpp false @ce if the context\n * cannot be created, @cpp true @ce otherwise.\n */\n bool tryCreateContext(const Configuration& configuration);\n\n private:\n WindowlessWglContext _glContext;\n Containers::Pointer<Platform::GLContext> _context;\n};\n\n/** @hideinitializer\n@brief Entry point for windowless WGL application\n@param className Class name\n\n@m_keywords{MAGNUM_WINDOWLESSAPPLICATION_MAIN()}\n\nSee @ref Magnum::Platform::WindowlessWglApplication \"Platform::WindowlessWglApplication\"\nfor usage information. This macro abstracts out platform-specific entry point\ncode and is equivalent to the following, see @ref portability-applications for\nmore information.\n\n@code{.cpp}\nint main(int argc, char** argv) {\n className app({argc, argv});\n return app.exec();\n}\n@endcode\n\nWhen no other windowless application header is included this macro is also\naliased to @cpp MAGNUM_WINDOWLESSAPPLICATION_MAIN() @ce.\n*/\n#define MAGNUM_WINDOWLESSWGLAPPLICATION_MAIN(className) \\\n int main(int argc, char** argv) { \\\n className app({argc, argv}); \\\n return app.exec(); \\\n }\n\n#ifndef DOXYGEN_GENERATING_OUTPUT\n#ifndef MAGNUM_WINDOWLESSAPPLICATION_MAIN\ntypedef WindowlessWglApplication WindowlessApplication;\ntypedef WindowlessWglContext WindowlessGLContext;\n#define MAGNUM_WINDOWLESSAPPLICATION_MAIN(className) MAGNUM_WINDOWLESSWGLAPPLICATION_MAIN(className)\n#else\n#undef MAGNUM_WINDOWLESSAPPLICATION_MAIN\n#endif\n#endif\n\n}}\n#else\n#error this header is available only in the OpenGL build\n#endif\n\n#endif\n"} +{"text": "// Copyright 2015-2020 Swim inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage swim.streamlet;\n\npublic interface StreamletScope<O> {\n\n /**\n * Returns the lexically scoped parent of this {@code StreamletScope}.\n * Returns {@code null} if this {@code StreamletScope} has no lexical parent.\n */\n StreamletScope<? extends O> streamletScope();\n\n /**\n * Returns the environment in which this {@code StreamletScope} operates.\n */\n StreamletContext streamletContext();\n\n /**\n * Returns an {@code Outlet} that updates when the specified {@code key}\n * updates.\n */\n Outlet<O> outlet(String key);\n\n}\n"} +{"text": "/*\n * Copyright 2017-2020 original authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\npackage io.micronaut.http.netty.stream;\n\nimport io.micronaut.core.annotation.Internal;\nimport io.micronaut.http.netty.reactive.HotObservable;\nimport io.netty.handler.codec.http.HttpContent;\nimport io.netty.handler.codec.http.HttpRequest;\nimport org.reactivestreams.Publisher;\nimport org.reactivestreams.Subscriber;\n\n/**\n * Delegate for Streamed HTTP Request.\n *\n * @author jroper\n * @author Graeme Rocher\n * @since 1.0\n */\n@Internal\nfinal class DelegateStreamedHttpRequest extends DelegateHttpRequest implements StreamedHttpRequest {\n\n private final Publisher<HttpContent> stream;\n\n /**\n * @param request The Http request\n * @param stream The publisher\n */\n DelegateStreamedHttpRequest(HttpRequest request, Publisher<HttpContent> stream) {\n super(request);\n this.stream = stream;\n }\n\n @Override\n public void subscribe(Subscriber<? super HttpContent> subscriber) {\n stream.subscribe(subscriber);\n }\n\n @Override\n public void closeIfNoSubscriber() {\n if (stream instanceof HotObservable) {\n ((HotObservable<HttpContent>) stream).closeIfNoSubscriber();\n }\n }\n}\n"} +{"text": "---\ntitle: Uma forma simples de criar um bom hábito\nauthors: Tailo Mateus Gonsalves\ntype: post\ndate: 2017-08-31\nexcerpt: O que é um hábito?\ncategories:\n - Opinião\ntags:\n - carreira\nimage: https://cdn-images-1.medium.com/max/1600/0*ZCwoIZn7IoacviC2.jpg\n---\n\nEm algum momento você já fez alguma coisa e não lembrava como tinha feito? Já fez algum código, sem no mínimo pensar no que estava fazendo?\n\nVamos fazer uma simples análise, pensemos no ato de tirar um carro da garagem. No início essa tarefa exigia mais concentração, pois ela envolve em destrancar a porta do carro, entrar no carro, ajustar o banco e os retrovisores, inserir a chave na ignição, entre outros tantos processos.\n\nNo entanto, depois de um tempo de prática, você faz tudo isso sem ao menos nem pensar. Isso é o que chamamos de hábitos, eles existem porque nosso cérebro procura maneiras de poupar esforços e nossa massa cinzenta está livre para outros pensamentos.\n\nO problema do nosso cérebro é que não sabe diferenciar um hábito ruim ou bom, está sempre esperando as recompensas. Por esse simples motivo, é tão difícil emagrecer ou parar de fumar. Quando recebemos um email criamos uma expectativa em visualiza-lo, por isso você vai encontrar muitos métodos de produtividade que focam em desativar notificações.\n\n![](https://cdn-images-1.medium.com/max/1600/1*UjRECqueUpTTt69_1KQDyA.png)\n\nEssa imagem foi retirada do livro O poder dos hábitos e demonstra como funciona o loop do hábito.\n\n## Mas como crio um hábito bom?\n\nUm hábito ruim com um padrão mensal, logo se torna um padrão mais frequente, conforme vamos recebendo mais recompensas. Não existe uma fórmula para remodelar todos os hábitos, mas os pesquisadores do MIT descobriram um padrão neurológico no cerne dos hábitos, consiste em três partes: uma deixa, uma rotina e uma recompensa.\n\n![](https://cdn-images-1.medium.com/max/1600/1*WT3MBvvsGqLM1Cqvs6RmHQ.jpeg)\n\nVamos a um exemplo, toda a tarde você come uma coxinha e toma um café. Digamos que esse hábito fez você ganhar alguns quilos. Você se sente bem e após uns minutos se sente mal, promete pra si mesmo que amanha vai parar, mas amanha é a mesma história. O primeiro passo é identificar a rotina, o ato de ir comer a coxinha e tomar o café, é o que você quer mudar. Segundo passo são as recompensas, é o que nos satisfaz, aqui deve avaliar se a vontade é da comida em si, ou outra coisa. E o terceiro passo é a deixa, o que esta levando você a sair para comer? Realmente é a fome? Ou o simples fato de poder relaxar um pouco? \n\nQualquer pessoa pode criar um hábito, estimule a fazer algo em troca de uma recompensa. Além disso, precisa acreditar que a mudança é possível. \n\nPara ler mais textos sobre produtividade, hábitos, maneiras para viver melhor, entre outras coisas da vida, assine a minha [newsletter](https://tinyletter.com/tailo), prometo que vou tentar lhe ajudar.\n\n## Saiba mais:\n\n[Livro: O poder do hábito](https://www.saraiva.com.br/o-poder-do-habito-por-que-fazemos-o-que-fazemos-na-vida-e-nos-negocios-4238667.html)\n\n[Ted: Uma forma simples de abandonar um mau hábito](https://www.ted.com/talks/judson_brewer_a_simple_way_to_break_a_bad_habit?language=pt-br )\n"} +{"text": "fileFormatVersion: 2\nguid: 42e5005ab513b0a43a69404ff53ddc19\nNativeFormatImporter:\n userData: \n"} +{"text": "package ircserver\n\nimport \"gopkg.in/sorcix/irc.v2\"\n\nfunc init() {\n\tCommands[\"server_SVSNICK\"] = &ircCommand{\n\t\tFunc: (*IRCServer).cmdServerSvsnick,\n\t\tMinParams: 2,\n\t}\n}\n\nfunc (i *IRCServer) cmdServerSvsnick(s *Session, reply *Replyctx, msg *irc.Message) {\n\t// e.g. “SVSNICK blArgh Guest30503 :1425036445”\n\tif !IsValidNickname(msg.Params[1]) {\n\t\ti.sendServices(reply, &irc.Message{\n\t\t\tPrefix: i.ServerPrefix,\n\t\t\tCommand: irc.ERR_ERRONEUSNICKNAME,\n\t\t\tParams: []string{\"*\", msg.Params[1], \"Erroneous nickname\"},\n\t\t})\n\t\treturn\n\t}\n\n\tsession, ok := i.nicks[NickToLower(msg.Params[0])]\n\tif !ok {\n\t\ti.sendServices(reply, &irc.Message{\n\t\t\tPrefix: i.ServerPrefix,\n\t\t\tCommand: irc.ERR_NOSUCHNICK,\n\t\t\tParams: []string{\"*\", msg.Params[0], \"No such nick/channel\"},\n\t\t})\n\t\treturn\n\t}\n\n\t// TODO(secure): kill this code duplication with cmdNick()\n\toldPrefix := session.ircPrefix\n\toldNick := NickToLower(msg.Params[0])\n\tsession.Nick = msg.Params[1]\n\ti.nicks[NickToLower(session.Nick)] = session\n\tdelete(i.nicks, oldNick)\n\tfor _, c := range i.channels {\n\t\tif modes, ok := c.nicks[oldNick]; ok {\n\t\t\tc.nicks[NickToLower(session.Nick)] = modes\n\t\t}\n\t\tdelete(c.nicks, oldNick)\n\t}\n\tsession.updateIrcPrefix()\n\ti.sendServices(reply,\n\t\ti.sendCommonChannels(session, reply,\n\t\t\ti.sendUser(session, reply, &irc.Message{\n\t\t\t\tPrefix: &oldPrefix,\n\t\t\t\tCommand: irc.NICK,\n\t\t\t\tParams: []string{session.Nick},\n\t\t\t})))\n}\n"} +{"text": "#ifndef AccountPLUGIN_H\n#define AccountPLUGIN_H\n\n#include \"interfaces/pluginsiteminterface.h\"\n#include <QObject>\n\nnamespace dtb {\nnamespace account {\n\nclass AccountWidget;\n\nclass AccountPlugin : public QObject, public PluginsItemInterface\n{\n Q_OBJECT\npublic:\n explicit AccountPlugin(QObject *parent = 0);\n\n const QString pluginName() const Q_DECL_OVERRIDE;\n void init(PluginProxyInterface *proxyInter) Q_DECL_OVERRIDE;\n QWidget *itemWidget(const QString &itemKey) Q_DECL_OVERRIDE;\n QMenu* itemContextMenu(const QString &itemKey) Q_DECL_OVERRIDE;\n\nprivate:\n PluginProxyInterface *m_proxyInter;\n AccountWidget *m_Account;\n};\n}\n}\n\n#endif // AccountPLUGIN_H\n"} +{"text": "defmodule Absinthe.Blueprint.Schema.ScalarTypeDefinition do\n @moduledoc false\n\n alias Absinthe.Blueprint\n\n @enforce_keys [:name]\n defstruct [\n :name,\n :identifier,\n :module,\n description: nil,\n parse: nil,\n serialize: nil,\n directives: [],\n source_location: nil,\n # Added by phases\n flags: %{},\n errors: [],\n __reference__: nil,\n __private__: []\n ]\n\n @type t :: %__MODULE__{\n name: String.t(),\n description: nil | String.t(),\n directives: [Blueprint.Directive.t()],\n source_location: nil | Blueprint.SourceLocation.t(),\n # Added by phases\n flags: Blueprint.flags_t(),\n errors: [Absinthe.Phase.Error.t()]\n }\n\n def build(type_def, _schema) do\n %Absinthe.Type.Scalar{\n identifier: type_def.identifier,\n name: type_def.name,\n description: type_def.description,\n definition: type_def.module,\n serialize: type_def.serialize,\n parse: type_def.parse\n }\n end\n\n @doc false\n def functions(), do: [:serialize, :parse]\n\n defimpl Inspect do\n defdelegate inspect(term, options),\n to: Absinthe.Schema.Notation.SDL.Render\n end\nend\n"} +{"text": "/*!The Treasure Box Library\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * \n * Copyright (C) 2009-2020, TBOOX Open Source Group.\n *\n * @author ruki\n * @file wcschr.c\n * @ingroup libc\n *\n */\n\n/* //////////////////////////////////////////////////////////////////////////////////////\n * includes\n */\n#include \"string.h\"\n#ifdef TB_CONFIG_LIBC_HAVE_WCSCHR\n# include <string.h>\n#endif\n/* //////////////////////////////////////////////////////////////////////////////////////\n * interfaces \n */\n\n#ifdef TB_CONFIG_LIBC_HAVE_WCSCHR\ntb_wchar_t* tb_wcschr(tb_wchar_t const* s, tb_wchar_t c)\n{\n tb_assert_and_check_return_val(s1 && s2, tb_null);\n return wcschr(s1, c);\n}\n#else\ntb_wchar_t* tb_wcschr(tb_wchar_t const* s, tb_wchar_t c)\n{\n tb_assert_and_check_return_val(s, tb_null);\n\n while (*s)\n {\n if (*s == c) return (tb_wchar_t* )s;\n s++;\n\n }\n return tb_null;\n}\n#endif\n\n"} +{"text": "\"\"\"The match_hostname() function from Python 3.3.3, essential when using SSL.\"\"\"\n\n# Note: This file is under the PSF license as the code comes from the python\n# stdlib. http://docs.python.org/3/license.html\n\nimport re\nimport sys\n\n# ipaddress has been backported to 2.6+ in pypi. If it is installed on the\n# system, use it to handle IPAddress ServerAltnames (this was added in\n# python-3.5) otherwise only do DNS matching. This allows\n# backports.ssl_match_hostname to continue to be used all the way back to\n# python-2.4.\ntry:\n import ipaddress\nexcept ImportError:\n ipaddress = None\n\n__version__ = '3.5.0.1'\n\n\nclass CertificateError(ValueError):\n pass\n\n\ndef _dnsname_match(dn, hostname, max_wildcards=1):\n \"\"\"Matching according to RFC 6125, section 6.4.3\n\n http://tools.ietf.org/html/rfc6125#section-6.4.3\n \"\"\"\n pats = []\n if not dn:\n return False\n\n # Ported from python3-syntax:\n # leftmost, *remainder = dn.split(r'.')\n parts = dn.split(r'.')\n leftmost = parts[0]\n remainder = parts[1:]\n\n wildcards = leftmost.count('*')\n if wildcards > max_wildcards:\n # Issue #17980: avoid denials of service by refusing more\n # than one wildcard per fragment. A survey of established\n # policy among SSL implementations showed it to be a\n # reasonable choice.\n raise CertificateError(\n \"too many wildcards in certificate DNS name: \" + repr(dn))\n\n # speed up common case w/o wildcards\n if not wildcards:\n return dn.lower() == hostname.lower()\n\n # RFC 6125, section 6.4.3, subitem 1.\n # The client SHOULD NOT attempt to match a presented identifier in which\n # the wildcard character comprises a label other than the left-most label.\n if leftmost == '*':\n # When '*' is a fragment by itself, it matches a non-empty dotless\n # fragment.\n pats.append('[^.]+')\n elif leftmost.startswith('xn--') or hostname.startswith('xn--'):\n # RFC 6125, section 6.4.3, subitem 3.\n # The client SHOULD NOT attempt to match a presented identifier\n # where the wildcard character is embedded within an A-label or\n # U-label of an internationalized domain name.\n pats.append(re.escape(leftmost))\n else:\n # Otherwise, '*' matches any dotless string, e.g. www*\n pats.append(re.escape(leftmost).replace(r'\\*', '[^.]*'))\n\n # add the remaining fragments, ignore any wildcards\n for frag in remainder:\n pats.append(re.escape(frag))\n\n pat = re.compile(r'\\A' + r'\\.'.join(pats) + r'\\Z', re.IGNORECASE)\n return pat.match(hostname)\n\n\ndef _to_unicode(obj):\n if isinstance(obj, str) and sys.version_info < (3,):\n obj = unicode(obj, encoding='ascii', errors='strict')\n return obj\n\ndef _ipaddress_match(ipname, host_ip):\n \"\"\"Exact matching of IP addresses.\n\n RFC 6125 explicitly doesn't define an algorithm for this\n (section 1.7.2 - \"Out of Scope\").\n \"\"\"\n # OpenSSL may add a trailing newline to a subjectAltName's IP address\n # Divergence from upstream: ipaddress can't handle byte str\n ip = ipaddress.ip_address(_to_unicode(ipname).rstrip())\n return ip == host_ip\n\n\ndef match_hostname(cert, hostname):\n \"\"\"Verify that *cert* (in decoded format as returned by\n SSLSocket.getpeercert()) matches the *hostname*. RFC 2818 and RFC 6125\n rules are followed, but IP addresses are not accepted for *hostname*.\n\n CertificateError is raised on failure. On success, the function\n returns nothing.\n \"\"\"\n if not cert:\n raise ValueError(\"empty or no certificate, match_hostname needs a \"\n \"SSL socket or SSL context with either \"\n \"CERT_OPTIONAL or CERT_REQUIRED\")\n try:\n # Divergence from upstream: ipaddress can't handle byte str\n host_ip = ipaddress.ip_address(_to_unicode(hostname))\n except ValueError:\n # Not an IP address (common case)\n host_ip = None\n except UnicodeError:\n # Divergence from upstream: Have to deal with ipaddress not taking\n # byte strings. addresses should be all ascii, so we consider it not\n # an ipaddress in this case\n host_ip = None\n except AttributeError:\n # Divergence from upstream: Make ipaddress library optional\n if ipaddress is None:\n host_ip = None\n else:\n raise\n dnsnames = []\n san = cert.get('subjectAltName', ())\n for key, value in san:\n if key == 'DNS':\n if host_ip is None and _dnsname_match(value, hostname):\n return\n dnsnames.append(value)\n elif key == 'IP Address':\n if host_ip is not None and _ipaddress_match(value, host_ip):\n return\n dnsnames.append(value)\n if not dnsnames:\n # The subject is only checked when there is no dNSName entry\n # in subjectAltName\n for sub in cert.get('subject', ()):\n for key, value in sub:\n # XXX according to RFC 2818, the most specific Common Name\n # must be used.\n if key == 'commonName':\n if _dnsname_match(value, hostname):\n return\n dnsnames.append(value)\n if len(dnsnames) > 1:\n raise CertificateError(\"hostname %r \"\n \"doesn't match either of %s\"\n % (hostname, ', '.join(map(repr, dnsnames))))\n elif len(dnsnames) == 1:\n raise CertificateError(\"hostname %r \"\n \"doesn't match %r\"\n % (hostname, dnsnames[0]))\n else:\n raise CertificateError(\"no appropriate commonName or \"\n \"subjectAltName fields were found\")\n"} +{"text": "using System;\r\nusing Server;\r\n\r\nnamespace Server.Items\r\n{\r\n\tpublic class AlchemistsBandage : Item\r\n\t{\r\n\t\tpublic override int LabelNumber{ get{ return 1075452; } } // Alchemist's Bandage\r\n\r\n\t\tpublic override bool Nontransferable { get { return true; } }\r\n\r\n\t\tpublic override void AddNameProperties( ObjectPropertyList list )\r\n\t\t{\r\n\t\t\tbase.AddNameProperties( list );\r\n\t\t\tAddQuestItemProperty( list );\r\n\t\t}\r\n\r\n\t\t[Constructable]\r\n\t\tpublic AlchemistsBandage() : base( 0xE21 )\r\n\t\t{\r\n\t\t\tLootType = LootType.Blessed;\r\n\t\t\tHue = 0x482;\r\n\t\t}\r\n\r\n\t\tpublic AlchemistsBandage( Serial serial ) : base( serial )\r\n\t\t{\r\n\t\t}\r\n\r\n\t\tpublic override void Serialize( GenericWriter writer )\r\n\t\t{\r\n\t\t\tbase.Serialize( writer );\r\n\r\n\t\t\twriter.Write( (int) 0 ); // Version\r\n\t\t}\r\n\r\n\t\tpublic override void Deserialize( GenericReader reader )\r\n\t\t{\r\n\t\t\tbase.Deserialize( reader );\r\n\r\n\t\t\tint version = reader.ReadInt();\r\n\t\t}\r\n\t}\r\n}\r\n"} +{"text": "<?php\n\n/*\n * This file is part of SwiftMailer.\n * (c) 2004-2009 Chris Corbyn\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\n/**\n * Generated when a TransportException is thrown from the Transport system.\n *\n * @author Chris Corbyn\n */\nclass Swift_Events_TransportExceptionEvent extends Swift_Events_EventObject\n{\n /**\n * The Exception thrown.\n *\n * @var Swift_TransportException\n */\n private $exception;\n\n /**\n * Create a new TransportExceptionEvent for $transport.\n *\n * @param Swift_Transport $transport\n * @param Swift_TransportException $ex\n */\n public function __construct(Swift_Transport $transport, Swift_TransportException $ex)\n {\n parent::__construct($transport);\n $this->exception = $ex;\n }\n\n /**\n * Get the TransportException thrown.\n *\n * @return Swift_TransportException\n */\n public function getException()\n {\n return $this->exception;\n }\n}\n"} +{"text": "[[eshadoop-7.0.0-rc1]]\n== Elasticsearch for Apache Hadoop version 7.0.0-rc1\n\n[[bugs-7.0.0-rc1]]\n=== Bug Fixes\nCore::\n* Fix missing service files in ES-Hadoop jars\nhttps://github.com/elastic/elasticsearch-hadoop/pull/1265[#1265]\n\n[[docs-7.0.0-rc1]]\n=== Documentation\n* Add documentation for Kerberos Authentication mode\nhttps://github.com/elastic/elasticsearch-hadoop/pull/1249[#1249]\n"} +{"text": "// +build s390x\n\n// Created by cgo -godefs - DO NOT EDIT\n// cgo -godefs types.go\n\npackage pty\n\ntype (\n\t_C_int int32\n\t_C_uint uint32\n)\n"} +{"text": "# Created by: Igor Pokrovsky <ip@doom.homeunix.org>\n# $FreeBSD$\n\nPORTNAME=\tgillo\nDISTVERSION=\t1.0beta1\nPORTREVISION=\t10\nCATEGORIES=\tgames\nMASTER_SITES=\tSF/${PORTNAME}/${PORTNAME}/1.0beta1\nDISTNAME=\t${PORTNAME}-${DISTVERSION}-src\n\nMAINTAINER=\tports@FreeBSD.org\nCOMMENT=\tPlayers are cars throwing a magnetic fuzzy ball into a goal\n\nLICENSE=\tGPLv2+\nLICENSE_FILE=\t${WRKSRC}/COPYING\n\nBUILD_DEPENDS=\t${JAM}:devel/jam \\\n\t\t${LOCALBASE}/lib/libplibsg.a:x11-toolkits/plib\nLIB_DEPENDS=\tlibode.so:devel/ode\n\nUSES=\t\tgl sdl tar:bzip2\nUSE_CXXSTD=\tc++98\nUSE_GL=\t\tgl glu\nUSE_SDL=\tsdl\n\nWRKSRC=\t\t${WRKDIR}/${PORTNAME}\n\nJAM?=\t\t${LOCALBASE}/bin/jam\n\npost-patch:\n\t@${REINPLACE_CMD} '/^LINKLIBS on gillo3/s|;$$|-L${LOCALBASE}/lib -lm ;|' \\\n\t\t${WRKSRC}/src/Jamfile\n\ndo-build:\n\tcd ${WRKSRC} && ${SETENV} C++=\"${CXX}\" C++FLAGS=\"${CXXFLAGS}\" \\\n\t\tCCFLAGS=\"${CFLAGS} -DDATADIR=\\\\\\\"${PREFIX}/share\\\\\\\"\" \\\n\t\tHDRS=\"${LOCALBASE}/include\" \\\n\t\tLINK=\"${CXX}\" LINKFLAGS=\"${LDFLAGS}\" \\\n\t\t${JAM} -dx -sPREFIX=${PREFIX}\n\ndo-install:\n\t(cd ${WRKSRC}/src && ${INSTALL_PROGRAM} gillo3 ${STAGEDIR}${PREFIX}/bin)\n\t@${MKDIR} ${STAGEDIR}${DATADIR}\n\t(cd ${WRKSRC}/data && ${INSTALL_DATA} *.* ${STAGEDIR}${DATADIR})\n\n.include <bsd.port.mk>\n"} +{"text": "\nrule k3e9_17c1294bc6620912\n{\n\n meta:\n copyright=\"Copyright (c) 2014-2018 Support Intelligence Inc, All Rights Reserved.\"\n engine=\"saphire/1.3.1 divinorum/0.998 icewater/0.4\"\n viz_url=\"http://icewater.io/en/cluster/query?h64=k3e9.17c1294bc6620912\"\n cluster=\"k3e9.17c1294bc6620912\"\n cluster_size=\"6\"\n filetype = \"application/x-dosexec\"\n tlp = \"amber\"\n version = \"icewater snowflake\"\n author = \"Rick Wesson (@wessorh) rick@support-intelligence.com\"\n date = \"20171123\"\n license = \"RIL-1.0 [Rick's Internet License] \"\n family=\"virut virtob malicious\"\n md5_hashes=\"['65b494c788cf6298f5fb93f507c44da9','bd1b8ec8ff787fafec26a89ce61169de','e6606e87b98ee102a9227e6cc3374eae']\"\n\n strings:\n $hex_string = { 33db395d1874238d85fcf7ffff50ff15d0100001592bf8578d8445fcf7ffff506a01ff3504320001ffd6391df83000015f5e75268b451cf7d81bc083e01083c0 }\n\n condition:\n \n filesize > 16384 and filesize < 65536\n and $hex_string\n}\n"} +{"text": "<?php\n\n/*\n * This file is part of the Sylius package.\n *\n * (c) Paweł Jędrzejewski\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\ndeclare(strict_types=1);\n\nnamespace Sylius\\Bundle\\CoreBundle\\Fixture;\n\nuse Symfony\\Component\\Config\\Definition\\Builder\\ArrayNodeDefinition;\n\nclass ProductReviewFixture extends AbstractResourceFixture\n{\n public function getName(): string\n {\n return 'product_review';\n }\n\n protected function configureResourceNode(ArrayNodeDefinition $resourceNode): void\n {\n $resourceNode\n ->children()\n ->scalarNode('title')->cannotBeEmpty()->end()\n ->scalarNode('rating')->cannotBeEmpty()->end()\n ->scalarNode('comment')->cannotBeEmpty()->end()\n ->scalarNode('author')->cannotBeEmpty()->end()\n ->scalarNode('product')->cannotBeEmpty()->end()\n ->scalarNode('status')->end()\n ;\n }\n}\n"} +{"text": "import path from 'path';\nimport _ from 'lodash';\n\n\nconst app = require.resolve('android-apidemos');\n\nconst DEFAULT_CAPS = {\n app,\n deviceName: 'Android',\n platformName: 'Android',\n};\n\nconst CONTACT_MANAGER_CAPS = _.defaults({\n app: path.resolve(__dirname, '..', '..', '..', 'test', 'assets', 'ContactManager.apk'),\n}, DEFAULT_CAPS);\n\nconst CHROME_CAPS = _.defaults({\n browserName: 'chrome',\n}, DEFAULT_CAPS);\ndelete CHROME_CAPS.app;\n\nexport { app, DEFAULT_CAPS, CONTACT_MANAGER_CAPS, CHROME_CAPS };\nexport default DEFAULT_CAPS;\n"} +{"text": "--- Makefile.PL.orig\t2017-07-03 02:57:42.000000000 -0700\n+++ Makefile.PL\t2017-07-03 02:58:02.000000000 -0700\n@@ -1,2 +1,3 @@\n #!/usr/bin/env perl\n+use lib '.';\n use inc::Module::Package 'Au:dry 1';\n"} +{"text": "package logrus\n\nimport (\n\t\"context\"\n\t\"io\"\n\t\"time\"\n)\n\nvar (\n\t// std is the name of the standard logger in stdlib `log`\n\tstd = New()\n)\n\nfunc StandardLogger() *Logger {\n\treturn std\n}\n\n// SetOutput sets the standard logger output.\nfunc SetOutput(out io.Writer) {\n\tstd.SetOutput(out)\n}\n\n// SetFormatter sets the standard logger formatter.\nfunc SetFormatter(formatter Formatter) {\n\tstd.SetFormatter(formatter)\n}\n\n// SetReportCaller sets whether the standard logger will include the calling\n// method as a field.\nfunc SetReportCaller(include bool) {\n\tstd.SetReportCaller(include)\n}\n\n// SetLevel sets the standard logger level.\nfunc SetLevel(level Level) {\n\tstd.SetLevel(level)\n}\n\n// GetLevel returns the standard logger level.\nfunc GetLevel() Level {\n\treturn std.GetLevel()\n}\n\n// IsLevelEnabled checks if the log level of the standard logger is greater than the level param\nfunc IsLevelEnabled(level Level) bool {\n\treturn std.IsLevelEnabled(level)\n}\n\n// AddHook adds a hook to the standard logger hooks.\nfunc AddHook(hook Hook) {\n\tstd.AddHook(hook)\n}\n\n// WithError creates an entry from the standard logger and adds an error to it, using the value defined in ErrorKey as key.\nfunc WithError(err error) *Entry {\n\treturn std.WithField(ErrorKey, err)\n}\n\n// WithContext creates an entry from the standard logger and adds a context to it.\nfunc WithContext(ctx context.Context) *Entry {\n\treturn std.WithContext(ctx)\n}\n\n// WithField creates an entry from the standard logger and adds a field to\n// it. If you want multiple fields, use `WithFields`.\n//\n// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal\n// or Panic on the Entry it returns.\nfunc WithField(key string, value interface{}) *Entry {\n\treturn std.WithField(key, value)\n}\n\n// WithFields creates an entry from the standard logger and adds multiple\n// fields to it. This is simply a helper for `WithField`, invoking it\n// once for each field.\n//\n// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal\n// or Panic on the Entry it returns.\nfunc WithFields(fields Fields) *Entry {\n\treturn std.WithFields(fields)\n}\n\n// WithTime creats an entry from the standard logger and overrides the time of\n// logs generated with it.\n//\n// Note that it doesn't log until you call Debug, Print, Info, Warn, Fatal\n// or Panic on the Entry it returns.\nfunc WithTime(t time.Time) *Entry {\n\treturn std.WithTime(t)\n}\n\n// Trace logs a message at level Trace on the standard logger.\nfunc Trace(args ...interface{}) {\n\tstd.Trace(args...)\n}\n\n// Debug logs a message at level Debug on the standard logger.\nfunc Debug(args ...interface{}) {\n\tstd.Debug(args...)\n}\n\n// Print logs a message at level Info on the standard logger.\nfunc Print(args ...interface{}) {\n\tstd.Print(args...)\n}\n\n// Info logs a message at level Info on the standard logger.\nfunc Info(args ...interface{}) {\n\tstd.Info(args...)\n}\n\n// Warn logs a message at level Warn on the standard logger.\nfunc Warn(args ...interface{}) {\n\tstd.Warn(args...)\n}\n\n// Warning logs a message at level Warn on the standard logger.\nfunc Warning(args ...interface{}) {\n\tstd.Warning(args...)\n}\n\n// Error logs a message at level Error on the standard logger.\nfunc Error(args ...interface{}) {\n\tstd.Error(args...)\n}\n\n// Panic logs a message at level Panic on the standard logger.\nfunc Panic(args ...interface{}) {\n\tstd.Panic(args...)\n}\n\n// Fatal logs a message at level Fatal on the standard logger then the process will exit with status set to 1.\nfunc Fatal(args ...interface{}) {\n\tstd.Fatal(args...)\n}\n\n// Tracef logs a message at level Trace on the standard logger.\nfunc Tracef(format string, args ...interface{}) {\n\tstd.Tracef(format, args...)\n}\n\n// Debugf logs a message at level Debug on the standard logger.\nfunc Debugf(format string, args ...interface{}) {\n\tstd.Debugf(format, args...)\n}\n\n// Printf logs a message at level Info on the standard logger.\nfunc Printf(format string, args ...interface{}) {\n\tstd.Printf(format, args...)\n}\n\n// Infof logs a message at level Info on the standard logger.\nfunc Infof(format string, args ...interface{}) {\n\tstd.Infof(format, args...)\n}\n\n// Warnf logs a message at level Warn on the standard logger.\nfunc Warnf(format string, args ...interface{}) {\n\tstd.Warnf(format, args...)\n}\n\n// Warningf logs a message at level Warn on the standard logger.\nfunc Warningf(format string, args ...interface{}) {\n\tstd.Warningf(format, args...)\n}\n\n// Errorf logs a message at level Error on the standard logger.\nfunc Errorf(format string, args ...interface{}) {\n\tstd.Errorf(format, args...)\n}\n\n// Panicf logs a message at level Panic on the standard logger.\nfunc Panicf(format string, args ...interface{}) {\n\tstd.Panicf(format, args...)\n}\n\n// Fatalf logs a message at level Fatal on the standard logger then the process will exit with status set to 1.\nfunc Fatalf(format string, args ...interface{}) {\n\tstd.Fatalf(format, args...)\n}\n\n// Traceln logs a message at level Trace on the standard logger.\nfunc Traceln(args ...interface{}) {\n\tstd.Traceln(args...)\n}\n\n// Debugln logs a message at level Debug on the standard logger.\nfunc Debugln(args ...interface{}) {\n\tstd.Debugln(args...)\n}\n\n// Println logs a message at level Info on the standard logger.\nfunc Println(args ...interface{}) {\n\tstd.Println(args...)\n}\n\n// Infoln logs a message at level Info on the standard logger.\nfunc Infoln(args ...interface{}) {\n\tstd.Infoln(args...)\n}\n\n// Warnln logs a message at level Warn on the standard logger.\nfunc Warnln(args ...interface{}) {\n\tstd.Warnln(args...)\n}\n\n// Warningln logs a message at level Warn on the standard logger.\nfunc Warningln(args ...interface{}) {\n\tstd.Warningln(args...)\n}\n\n// Errorln logs a message at level Error on the standard logger.\nfunc Errorln(args ...interface{}) {\n\tstd.Errorln(args...)\n}\n\n// Panicln logs a message at level Panic on the standard logger.\nfunc Panicln(args ...interface{}) {\n\tstd.Panicln(args...)\n}\n\n// Fatalln logs a message at level Fatal on the standard logger then the process will exit with status set to 1.\nfunc Fatalln(args ...interface{}) {\n\tstd.Fatalln(args...)\n}\n"} +{"text": "// Copyright (c) Microsoft Corporation. All rights reserved.\n// Licensed under the MIT License. See LICENSE in the project root for license information.\n\nusing System.Collections.Generic;\nusing UnityEngine;\n\nnamespace HoloToolkit.Unity\n{\n /// <summary>\n /// The AudioSourcesReference class encapsulates a cache of references to audio source components on a given\n /// local audio emitter game object. Used primarily by UAudioManager, it improves performance by bypassing\n /// having to requery for list of attached components on each use.\n /// </summary>\n public class AudioSourcesReference : MonoBehaviour\n {\n private List<AudioSource> audioSources;\n public List<AudioSource> AudioSources\n {\n get\n {\n return audioSources;\n }\n }\n\n public AudioSource AddNewAudioSource()\n {\n var source = this.gameObject.AddComponent<AudioSource>();\n source.playOnAwake = false;\n source.dopplerLevel = 0f;\n source.enabled = false;\n audioSources.Add(source);\n return source;\n }\n\n private void Awake()\n {\n audioSources = new List<AudioSource>();\n foreach (AudioSource audioSource in GetComponents<AudioSource>())\n {\n audioSources.Add(audioSource);\n }\n }\n\n private void OnDestroy()\n {\n // AudioSourcesReference created all these components and nothing else should use them.\n foreach (AudioSource audioSource in audioSources)\n {\n Object.Destroy(audioSource);\n }\n\n audioSources = null;\n }\n }\n}"} +{"text": "/////////////////////////////////////////////////////////////////////////////\n// Copyright (c) Electronic Arts Inc. All rights reserved.\n/////////////////////////////////////////////////////////////////////////////\n\n///////////////////////////////////////////////////////////////////////////////\n// Implements a generic iterator from a given iteratable type, such as a pointer.\n// We cannot put this file into our own iterator.h file because we need to \n// still be able to use this file when we have our iterator.h disabled.\n//\n///////////////////////////////////////////////////////////////////////////////\n\n\n#ifndef EASTL_INTERNAL_GENERIC_ITERATOR_H\n#define EASTL_INTERNAL_GENERIC_ITERATOR_H\n\n\n#include <EABase/eabase.h>\n#if defined(EA_PRAGMA_ONCE_SUPPORTED)\n\t#pragma once\n#endif\n\n#include <EASTL/internal/config.h>\n#include <EASTL/iterator.h>\n#include <EASTL/type_traits.h>\n\n\n#ifdef _MSC_VER\n\t#pragma warning(push) // VC++ generates a bogus warning that you cannot code away.\n\t#pragma warning(disable: 4619) // There is no warning number 'number'.\n\t#pragma warning(disable: 4217) // Member template functions cannot be used for copy-assignment or copy-construction.\n#endif\n\n\nnamespace eastl\n{\n\n\t/// generic_iterator\n\t///\n\t/// Converts something which can be iterated into a formal iterator.\n\t/// While this class' primary purpose is to allow the conversion of \n\t/// a pointer to an iterator, you can convert anything else to an \n\t/// iterator by defining an iterator_traits<> specialization for that\n\t/// object type. See EASTL iterator.h for this.\n\t///\n\t/// Example usage:\n\t/// typedef generic_iterator<int*> IntArrayIterator;\n\t/// typedef generic_iterator<int*, char> IntArrayIteratorOther;\n\t///\n\ttemplate <typename Iterator, typename Container = void>\n\tclass generic_iterator\n\t{\n\tprotected:\n\t\tIterator mIterator;\n\n\tpublic:\n\t\ttypedef typename eastl::iterator_traits<Iterator>::iterator_category iterator_category;\n\t\ttypedef typename eastl::iterator_traits<Iterator>::value_type value_type;\n\t\ttypedef typename eastl::iterator_traits<Iterator>::difference_type difference_type;\n\t\ttypedef typename eastl::iterator_traits<Iterator>::reference reference;\n\t\ttypedef typename eastl::iterator_traits<Iterator>::pointer pointer;\n\t\ttypedef Iterator iterator_type;\n\t\ttypedef iterator_type wrapped_iterator_type; // This is not in the C++ Standard; it's used by use to identify it as a wrapping iterator type.\n\t\ttypedef Container container_type;\n\t\ttypedef generic_iterator<Iterator, Container> this_type;\n\n\t\tgeneric_iterator()\n\t\t\t: mIterator(iterator_type()) { }\n\n\t\texplicit generic_iterator(const iterator_type& x)\n\t\t\t: mIterator(x) { }\n\n\t\tthis_type& operator=(const iterator_type& x)\n\t\t\t{ mIterator = x; return *this; }\n\n\t\ttemplate <typename Iterator2>\n\t\tgeneric_iterator(const generic_iterator<Iterator2, Container>& x)\n\t\t\t: mIterator(x.base()) { }\n\n\t\treference operator*() const\n\t\t\t{ return *mIterator; }\n\n\t\tpointer operator->() const\n\t\t\t{ return mIterator; }\n\n\t\tthis_type& operator++()\n\t\t\t{ ++mIterator; return *this; }\n\n\t\tthis_type operator++(int)\n\t\t\t{ return this_type(mIterator++); }\n\n\t\tthis_type& operator--()\n\t\t\t{ --mIterator; return *this; }\n\n\t\tthis_type operator--(int)\n\t\t\t{ return this_type(mIterator--); }\n\n\t\treference operator[](const difference_type& n) const\n\t\t\t{ return mIterator[n]; }\n\n\t\tthis_type& operator+=(const difference_type& n)\n\t\t\t{ mIterator += n; return *this; }\n\n\t\tthis_type operator+(const difference_type& n) const\n\t\t\t{ return this_type(mIterator + n); }\n\n\t\tthis_type& operator-=(const difference_type& n)\n\t\t\t{ mIterator -= n; return *this; }\n\n\t\tthis_type operator-(const difference_type& n) const\n\t\t\t{ return this_type(mIterator - n); }\n\n\t\tconst iterator_type& base() const\n\t\t\t{ return mIterator; }\n\n\t}; // class generic_iterator\n\n\n\ttemplate <typename IteratorL, typename IteratorR, typename Container>\n\tinline bool operator==(const generic_iterator<IteratorL, Container>& lhs, const generic_iterator<IteratorR, Container>& rhs)\n\t\t{ return lhs.base() == rhs.base(); }\n\n\ttemplate <typename Iterator, typename Container>\n\tinline bool operator==(const generic_iterator<Iterator, Container>& lhs, const generic_iterator<Iterator, Container>& rhs)\n\t\t{ return lhs.base() == rhs.base(); }\n\n\ttemplate <typename IteratorL, typename IteratorR, typename Container>\n\tinline bool operator!=(const generic_iterator<IteratorL, Container>& lhs, const generic_iterator<IteratorR, Container>& rhs)\n\t\t{ return lhs.base() != rhs.base(); }\n\n\ttemplate <typename Iterator, typename Container>\n\tinline bool operator!=(const generic_iterator<Iterator, Container>& lhs, const generic_iterator<Iterator, Container>& rhs)\n\t\t{ return lhs.base() != rhs.base(); }\n\n\ttemplate <typename IteratorL, typename IteratorR, typename Container>\n\tinline bool operator<(const generic_iterator<IteratorL, Container>& lhs, const generic_iterator<IteratorR, Container>& rhs)\n\t\t{ return lhs.base() < rhs.base(); }\n\n\ttemplate <typename Iterator, typename Container>\n\tinline bool operator<(const generic_iterator<Iterator, Container>& lhs, const generic_iterator<Iterator, Container>& rhs)\n\t\t{ return lhs.base() < rhs.base(); }\n\n\ttemplate <typename IteratorL, typename IteratorR, typename Container>\n\tinline bool operator>(const generic_iterator<IteratorL, Container>& lhs, const generic_iterator<IteratorR, Container>& rhs)\n\t\t{ return lhs.base() > rhs.base(); }\n\n\ttemplate <typename Iterator, typename Container>\n\tinline bool operator>(const generic_iterator<Iterator, Container>& lhs, const generic_iterator<Iterator, Container>& rhs)\n\t\t{ return lhs.base() > rhs.base(); }\n\n\ttemplate <typename IteratorL, typename IteratorR, typename Container>\n\tinline bool operator<=(const generic_iterator<IteratorL, Container>& lhs, const generic_iterator<IteratorR, Container>& rhs)\n\t\t{ return lhs.base() <= rhs.base(); }\n\n\ttemplate <typename Iterator, typename Container>\n\tinline bool operator<=(const generic_iterator<Iterator, Container>& lhs, const generic_iterator<Iterator, Container>& rhs)\n\t\t{ return lhs.base() <= rhs.base(); }\n\n\ttemplate <typename IteratorL, typename IteratorR, typename Container>\n\tinline bool operator>=(const generic_iterator<IteratorL, Container>& lhs, const generic_iterator<IteratorR, Container>& rhs)\n\t\t{ return lhs.base() >= rhs.base(); }\n\n\ttemplate <typename Iterator, typename Container>\n\tinline bool operator>=(const generic_iterator<Iterator, Container>& lhs, const generic_iterator<Iterator, Container>& rhs)\n\t\t{ return lhs.base() >= rhs.base(); }\n\n\ttemplate <typename IteratorL, typename IteratorR, typename Container>\n\tinline typename generic_iterator<IteratorL, Container>::difference_type\n\toperator-(const generic_iterator<IteratorL, Container>& lhs, const generic_iterator<IteratorR, Container>& rhs)\n\t\t{ return lhs.base() - rhs.base(); }\n\n\ttemplate <typename Iterator, typename Container>\n\tinline generic_iterator<Iterator, Container>\n\toperator+(typename generic_iterator<Iterator, Container>::difference_type n, const generic_iterator<Iterator, Container>& x)\n\t\t{ return generic_iterator<Iterator, Container>(x.base() + n); }\n\n\n\n\t/// is_generic_iterator\n\t///\n\t/// Tells if an iterator is one of these generic_iterators. This is useful if you want to \n\t/// write code that uses miscellaneous iterators but wants to tell if they are generic_iterators.\n\t/// A primary reason to do so is that you can get at the pointer within the generic_iterator.\n\t///\n\ttemplate <typename Iterator>\n\tstruct is_generic_iterator : public false_type { };\n\n\ttemplate <typename Iterator, typename Container>\n\tstruct is_generic_iterator<generic_iterator<Iterator, Container> > : public true_type { };\n\n\n\t/// unwrap_generic_iterator\n\t///\n\t/// Returns Iterator::get_base() if it's a generic_iterator, else returns Iterator as-is.\n\t///\n\t/// Example usage:\n\t/// vector<int> intVector;\n\t/// eastl::generic_iterator<vector<int>::iterator> genericIterator(intVector.begin());\n\t/// vector<int>::iterator it = unwrap_generic_iterator(genericIterator);\n\t///\n\ttemplate <typename Iterator>\n\tinline typename eastl::is_iterator_wrapper_helper<Iterator, eastl::is_generic_iterator<Iterator>::value>::iterator_type unwrap_generic_iterator(Iterator it)\n\t\t{ return eastl::is_iterator_wrapper_helper<Iterator, eastl::is_generic_iterator<Iterator>::value>::get_base(it); }\n\n\n} // namespace eastl\n\n\n#ifdef _MSC_VER\n\t#pragma warning(pop)\n#endif\n\n\n#endif // Header include guard\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n"} +{"text": "/*\n * Copyright (c) 2013-2014, Kevin Läufer\n * Copyright (c) 2014-2017, Niklas Hauser\n * Copyright (c) 2020, Erik Henriksson\n *\n * This file is part of the modm project.\n *\n * This Source Code Form is subject to the terms of the Mozilla Public\n * License, v. 2.0. If a copy of the MPL was not distributed with this\n * file, You can obtain one at http://mozilla.org/MPL/2.0/.\n */\n// ----------------------------------------------------------------------------\n\n#include \"../device.hpp\"\n#include \"gclk.hpp\"\n#include \"modm/math/units.hpp\"\n\nnamespace modm::platform\n{\nuint16_t modm_fastdata delay_fcpu_MHz(1);\nuint16_t modm_fastdata delay_ns_per_loop({{ loops * 1000 }});\n}\n\nbool\nmodm::platform::GenericClockController::initOsc8MHz(\n uint32_t waitCycles)\n{\n SYSCTRL->OSC8M.bit.PRESC = 0x0;\n SYSCTRL->OSC8M.bit.ONDEMAND = true;\n SYSCTRL->OSC8M.bit.RUNSTDBY = false;\n SYSCTRL->OSC8M.bit.ENABLE = true;\n while (!SYSCTRL->PCLKSR.bit.OSC8MRDY && --waitCycles);\n return waitCycles;\n}\n\nbool\nmodm::platform::GenericClockController::initExternalCrystal(\n uint32_t waitCycles)\n{\n // Enable external crystal.\n SYSCTRL->XOSC32K.reg =\n SYSCTRL_XOSC32K_STARTUP( 0x6u ) |\n SYSCTRL_XOSC32K_XTALEN |\n SYSCTRL_XOSC32K_RUNSTDBY |\n SYSCTRL_XOSC32K_EN32K;\n // separate call, as described in chapter 15.6.3\n SYSCTRL->XOSC32K.bit.ENABLE = 1;\n while (!SYSCTRL->PCLKSR.bit.XOSC32KRDY and --waitCycles);\n\n // Write Generic Clock Generator configuration\n GCLK->GENCTRL.reg =\n GCLK_GENCTRL_ID(uint32_t(ClockGenerator::ExternalCrystal32K)) |\n GCLK_GENCTRL_SRC_XOSC32K |\n GCLK_GENCTRL_IDC |\n GCLK_GENCTRL_GENEN;\n // Wait for synchronization.\n while (GCLK->STATUS.bit.SYNCBUSY and --waitCycles);\n return waitCycles;\n}\n\nbool\nmodm::platform::GenericClockController::initDFLL48MHz(\n uint32_t waitCycles)\n{\n // // Put ExternalCrystal as source for the PLL\n GCLK->CLKCTRL.reg =\n GCLK_CLKCTRL_ID(uint32_t(ClockMux::DFLL48M)) |\n GCLK_CLKCTRL_GEN(uint32_t(ClockGenerator::ExternalCrystal32K)) |\n // GCLK_CLKCTRL_GEN_GCLK1 |\n GCLK_CLKCTRL_CLKEN;\n // Wait for synchronization.\n while (GCLK->STATUS.bit.SYNCBUSY and --waitCycles);\n\n // Errata 1.2.1: Disable the OnDemand mode\n SYSCTRL->DFLLCTRL.bit.ONDEMAND = 0;\n // Wait for synchronization.\n while (!SYSCTRL->PCLKSR.bit.DFLLRDY and --waitCycles);\n\n SYSCTRL->DFLLMUL.reg =\n SYSCTRL_DFLLMUL_CSTEP( 31 ) |\n SYSCTRL_DFLLMUL_FSTEP( 511 ) |\n SYSCTRL_DFLLMUL_MUL((48_MHz + 32'768_Hz/2) / 32'768_Hz);\n // Wait for synchronization.\n while (!SYSCTRL->PCLKSR.bit.DFLLRDY and --waitCycles);\n // Write full configuration to DFLL control register\n SYSCTRL->DFLLCTRL.reg |=\n SYSCTRL_DFLLCTRL_MODE | // Enable the closed loop mode\n SYSCTRL_DFLLCTRL_WAITLOCK | // No output until DFLL is locked.\n SYSCTRL_DFLLCTRL_QLDIS ; // Disable Quick lock\n // Wait for synchronization.\n while (!SYSCTRL->PCLKSR.bit.DFLLRDY and --waitCycles);\n // Enable the DFLL\n SYSCTRL->DFLLCTRL.bit.ENABLE = true;\n // Wait for locks flags\n while (\n !(SYSCTRL->PCLKSR.reg & SYSCTRL_PCLKSR_DFLLLCKC) ||\n !(SYSCTRL->PCLKSR.reg & SYSCTRL_PCLKSR_DFLLLCKF));\n // Wait for synchronization.\n while (!SYSCTRL->PCLKSR.bit.DFLLRDY and --waitCycles);\n return waitCycles;\n}\n\nbool\nmodm::platform::GenericClockController::setSystemClock(\n ClockSource source, uint32_t waitCycles)\n{\n GCLK->GENDIV.reg =\n GCLK_GENDIV_ID(uint32_t(ClockGenerator::System)) |\n GCLK_GENDIV_DIV(0u);\n GCLK->GENCTRL.reg =\n\t\t\t\tGCLK_GENCTRL_ID(uint32_t(ClockGenerator::System)) |\n\t\t\t\tGCLK_GENCTRL_SRC(uint32_t(source)) |\n\t\t\t\tGCLK_GENCTRL_IDC |\n\t\t\t\tGCLK_GENCTRL_GENEN;\n // Wait for synchronization.\n while (GCLK->STATUS.reg & GCLK_STATUS_SYNCBUSY);\n return waitCycles;\n}\n"} +{"text": "\"use strict\";\nconst should = require(\"should\");\nconst fs = require(\"fs\");\n\nconst NodeId = require(\"node-opcua-nodeid\").NodeId;\n\nconst OPCUAServer = require(\"..\").OPCUAServer;\n\nconst { get_mini_nodeset_filename } = require(\"node-opcua-address-space/testHelpers\");\nconst mini_nodeset_filename = get_mini_nodeset_filename();\n\nfs.existsSync(mini_nodeset_filename).should.eql(true,\n \" expecting \" + mini_nodeset_filename + \" to exist\");\n\nconst describe = require(\"node-opcua-leak-detector\").describeWithLeakDetector;\ndescribe(\"OPCUAServer\", () => {\n let server;\n beforeEach((done) => {\n const options = {\n port: 2000,\n nodeset_filename: [mini_nodeset_filename]\n };\n\n server = new OPCUAServer(options);\n server.start((err) => {\n done(err);\n });\n });\n afterEach((done) => {\n if (server) {\n server.shutdown(() => {\n server = null;\n done();\n });\n\n } else {\n server = null;\n done();\n }\n });\n\n it(\"should dismiss all existing sessions upon termination\", (done) => {\n\n server.engine.currentSessionCount.should.equal(0);\n\n // let make sure that no session exists\n // (session and subscriptions )\n let session = server.createSession();\n\n server.engine.currentSessionCount.should.equal(1);\n server.engine.cumulatedSessionCount.should.equal(1);\n\n\n server.shutdown(function() {\n server.engine.currentSessionCount.should.equal(0);\n server.engine.cumulatedSessionCount.should.equal(1);\n server = null;\n session = null;\n done();\n });\n\n });\n\n it(\"server address space have a node matching session.nodeId\", (done) => {\n\n server.engine.currentSessionCount.should.equal(0);\n\n // let make sure that no session exists\n // (session and subscriptions )\n const session = server.createSession();\n\n session.sessionName = \"SessionNameGivenByClient\";\n // activate session\n session.status = \"active\";\n\n session.nodeId.should.be.instanceOf(NodeId);\n\n //xx session.nodeId.identifierType.should.eql(NodeId.NodeIdType.GUID);\n\n const sessionNode = server.engine.addressSpace.findNode(session.nodeId);\n\n should(!!sessionNode).eql(true, \" a session node must be found\");\n\n sessionNode.nodeId.should.eql(session.nodeId);\n\n sessionNode.browseName.toString().should.eql(\"1:SessionNameGivenByClient\");\n done();\n\n });\n});\n\ndescribe(\"OPCUAServer-2\", () => {\n\n let server;\n\n before((done) => {\n\n fs.existsSync(mini_nodeset_filename).should.eql(true);\n\n const options = {\n port: 2000,\n nodeset_filename: [mini_nodeset_filename]\n };\n server = new OPCUAServer(options);\n server.start(done);\n });\n\n after((done) => {\n server.shutdown(() => {\n server = null;\n done();\n });\n });\n\n it(\"#rejectedSessionCount\", () => {\n server.rejectedSessionCount.should.eql(server.engine.rejectedSessionCount);\n });\n\n it(\"#rejectedRequestsCount\", () => {\n server.rejectedRequestsCount.should.eql(server.engine.rejectedRequestsCount);\n });\n\n it(\"#sessionAbortCount\", () => {\n server.sessionAbortCount.should.eql(server.engine.sessionAbortCount);\n });\n\n it(\"#publishingIntervalCount\", () => {\n server.publishingIntervalCount.should.eql(server.engine.publishingIntervalCount);\n });\n\n it(\"#buildInfo\", () => {\n server.buildInfo.should.eql(server.engine.buildInfo);\n });\n\n});\ndescribe(\"OPCUAServer-3\", () => {\n\n let server;\n before((done) => {\n\n server = new OPCUAServer();\n done();\n });\n\n it(\"checking IOPCUAServer properties before startup\", () => {\n server.currentChannelCount.should.eql(0);\n server.rejectedSessionCount.should.eql(0);\n server.rejectedRequestsCount.should.eql(0);\n server.currentSubscriptionCount.should.eql(0);\n server.sessionAbortCount.should.eql(0);\n server.publishingIntervalCount.should.eql(0);\n server.currentSessionCount.should.eql(0);\n server.isAuditing.should.eql(false);\n should(server.getSession(NodeId.nullNodeId, true)).eql(null);\n\n });\n});\n\n"} +{"text": "/* TAPESPLT.C (c) Copyright Jay Maynard, 2000-2012 */\n/* Split AWSTAPE format tape image */\n/* */\n/* Released under \"The Q Public License Version 1\" */\n/* (http://www.hercules-390.org/herclic.html) as modifications to */\n/* Hercules. */\n\n/*-------------------------------------------------------------------*/\n/* This program reads an AWSTAPE format tape image file and produces */\n/* output files containing pieces of it, controlled by command line */\n/* options. */\n/*-------------------------------------------------------------------*/\n\n#include \"hstdinc.h\"\n\n#include \"hercules.h\"\n#include \"tapedev.h\"\n\n#define UTILITY_NAME \"tapesplt\"\n\n/*-------------------------------------------------------------------*/\n/* Static data areas */\n/*-------------------------------------------------------------------*/\nstatic BYTE vollbl[] = \"\\xE5\\xD6\\xD3\"; /* EBCDIC characters \"VOL\" */\nstatic BYTE hdrlbl[] = \"\\xC8\\xC4\\xD9\"; /* EBCDIC characters \"HDR\" */\nstatic BYTE eoflbl[] = \"\\xC5\\xD6\\xC6\"; /* EBCDIC characters \"EOF\" */\nstatic BYTE eovlbl[] = \"\\xC5\\xD6\\xE5\"; /* EBCDIC characters \"EOV\" */\nstatic BYTE buf[ MAX_BLKLEN ];\n\n#ifdef EXTERNALGUI\n/* Report progress every this many bytes */\n#define PROGRESS_MASK (~0x3FFFF /* 256K */)\n/* How many bytes we've read so far. */\nlong curpos = 0;\nlong prevpos = 0;\n#endif /*EXTERNALGUI*/\n\n/*-------------------------------------------------------------------*/\n/* tapesplt main entry point */\n/*-------------------------------------------------------------------*/\nint main (int argc, char *argv[])\n{\nchar *pgm; /* less any extension (.ext) */\nint rc; /* Return code */\nint i; /* Array subscript */\nint len; /* Block length */\nchar *infilename; /* -> Input file name */\nchar *outfilename; /* -> Current out file name */\nint infd = -1; /* Input file descriptor */\nint outfd = -1; /* Current out file desc */\nint fileno; /* Tape file number */\nint blkcount; /* Block count */\nint curblkl; /* Current block length */\nint minblksz; /* Minimum block size */\nint maxblksz; /* Maximum block size */\nint64_t file_bytes; /* File byte count */\nint outfilenum; /* Current out file# in argv */\nint outfilecount; /* Current # files copied */\nint files2copy; /* Current # files to copy */\nBYTE labelrec[81]; /* Standard label (ASCIIZ) */\nAWSTAPE_BLKHDR awshdr; /* AWSTAPE block header */\nchar pathname[MAX_PATH]; /* file path in host format */\n\n INITIALIZE_UTILITY( UTILITY_NAME, \"split AWS tape into pieces\", &pgm );\n\n /* The only argument is the tape image file name */\n if (argc > 3 && argv[1] != NULL)\n {\n infilename = argv[1];\n }\n else\n {\n // \"Usage: %s ...\n WRMSG( HHC02725, \"I\", pgm );\n exit (1);\n }\n\n /* Open the tape device */\n hostpath(pathname, infilename, sizeof(pathname));\n infd = HOPEN (pathname, O_RDONLY | O_BINARY);\n if (infd < 0)\n {\n // \"Tape %s: Error opening: errno=%d: %s\"\n FWRMSG( stderr, HHC02715, \"E\", infilename, errno, strerror( errno ));\n exit (2);\n }\n\n /* Copy blocks from input to output files */\n fileno = 1;\n blkcount = 0;\n minblksz = 0;\n maxblksz = 0;\n file_bytes = 0;\n len = 0;\n\n for (outfilenum = 2; outfilenum < argc; outfilenum += 2)\n {\n outfilename = argv[outfilenum];\n // \"File %s: writing output file\"\n WRMSG( HHC02740, \"I\", outfilename );\n hostpath(pathname, outfilename, sizeof(pathname));\n outfd = HOPEN (pathname, O_WRONLY | O_CREAT | O_BINARY,\n S_IRUSR | S_IWUSR | S_IRGRP);\n\n if (outfd < 0)\n {\n // \"Tape %s: Error opening: errno=%d: %s\"\n FWRMSG( stderr, HHC02715, \"E\", outfilename, errno, strerror( errno ));\n exit (3);\n }\n\n if (outfilenum == argc)\n {\n /* count not specified for last file, so use big number */\n files2copy = 32767;\n }\n else\n {\n files2copy = atoi(argv[outfilenum + 1]);\n }\n\n /* Copy just that many files */\n for (outfilecount = 0; outfilecount < files2copy; )\n {\n /* Read a block from the tape */\n len = read (infd, buf, sizeof(AWSTAPE_BLKHDR));\n if (len < 0)\n {\n // \"File %s: Error reading %s header: rc=%d, errno=%d: %s\"\n FWRMSG( stderr, HHC02707, \"E\", infilename, \"AWSTAPE\", len, errno, strerror( errno ));\n exit (4);\n }\n\n /* Did we finish too soon? */\n if ((len > 0) && (len < (int)sizeof(AWSTAPE_BLKHDR)))\n {\n // \"File %s: Error, incomplete %s header\"\n FWRMSG( stderr, HHC02741, \"E\", infilename, \"AWSTAPE\" );\n exit(5);\n }\n\n#ifdef EXTERNALGUI\n if (extgui)\n {\n curpos += len;\n /* Report progress every nnnK */\n if( ( curpos & PROGRESS_MASK ) != ( prevpos & PROGRESS_MASK ) )\n {\n prevpos = curpos;\n EXTGUIMSG( \"IPOS=%ld\\n\", curpos );\n }\n }\n#endif /*EXTERNALGUI*/\n\n /* Check for end of tape. */\n if (len == 0)\n {\n // \"End of tape\"\n WRMSG( HHC02704, \"I\" );\n break;\n }\n\n /* Copy the header to the output file. */\n rc = write(outfd, buf, sizeof(AWSTAPE_BLKHDR));\n if (rc < (int)sizeof(AWSTAPE_BLKHDR))\n {\n // \"File %s: Error writing %s header: rc=%d, errno=%d: %s\"\n FWRMSG( stderr, HHC02711, \"E\", outfilename, \"AWSTAPE\", rc, errno, strerror( errno ));\n exit(6);\n }\n\n /* Parse the block header */\n memcpy(&awshdr, buf, sizeof(AWSTAPE_BLKHDR));\n\n /* Tapemark? */\n if ((awshdr.flags1 & AWSTAPE_FLAG1_TAPEMARK) != 0)\n {\n /* Print summary of current file */\n if (blkcount)\n // \"File No. %u: Blocks=%u, Bytes=%\"PRId64\", Block size min=%u, max=%u, avg=%u\"\n WRMSG( HHC02721, \"I\", fileno, blkcount, file_bytes, minblksz, maxblksz, (int)file_bytes/blkcount );\n\n /* Reset counters for next file */\n fileno++;\n minblksz = 0;\n maxblksz = 0;\n blkcount = 0;\n file_bytes = 0;\n\n /* Count the file we just copied. */\n outfilecount++;\n\n }\n else /* if(tapemark) */\n {\n /* Count blocks and block sizes */\n blkcount++;\n curblkl = awshdr.curblkl[0] + (awshdr.curblkl[1] << 8);\n if (curblkl > maxblksz) maxblksz = curblkl;\n if (minblksz == 0 || curblkl < minblksz) minblksz = curblkl;\n\n file_bytes += curblkl;\n\n /* Read the data block. */\n len = read (infd, buf, curblkl);\n if (len < 0)\n {\n // \"File %s: Error reading %s data block: rc=%d, errno=%d: %s\"\n FWRMSG( stderr, HHC02709, \"E\", infilename, \"AWSTAPE\", rc, errno, strerror( errno ));\n exit (7);\n }\n\n /* Did we finish too soon? */\n if ((len > 0) && (len < curblkl))\n {\n // \"File %s: Error, incomplete final data block: expected %d bytes, read %d\"\n FWRMSG( stderr, HHC02742, \"E\", infilename, curblkl, len );\n exit(8);\n }\n\n /* Check for end of tape */\n if (len == 0)\n {\n // \"File %s: Error, %s header block without data\"\n FWRMSG( stderr, HHC02743, \"E\", infilename, \"AWSTAPE\" );\n exit(9);\n }\n\n#ifdef EXTERNALGUI\n if (extgui)\n {\n curpos += len;\n /* Report progress every nnnK */\n if( ( curpos & PROGRESS_MASK ) != ( prevpos & PROGRESS_MASK ) )\n {\n prevpos = curpos;\n EXTGUIMSG( \"IPOS=%ld\\n\", curpos );\n }\n }\n#endif /*EXTERNALGUI*/\n\n /* Copy the header to the output file. */\n rc = write(outfd, buf, len);\n if (rc < len)\n {\n // \"File %s: Error writing %s data block: rc=%d, errno=%d: %s\"\n FWRMSG( stderr, HHC02712, \"E\", outfilename, \"AWSTAPE\", rc, errno, strerror( errno ));\n exit(10);\n }\n\n /* Print standard labels */\n if (len == 80 && blkcount < 4\n && (memcmp(buf, vollbl, 3) == 0\n || memcmp(buf, hdrlbl, 3) == 0\n || memcmp(buf, eoflbl, 3) == 0\n || memcmp(buf, eovlbl, 3) == 0))\n {\n for (i=0; i < 80; i++)\n labelrec[i] = guest_to_host(buf[i]);\n labelrec[i] = '\\0';\n // \"Tape Label: %s\"\n WRMSG( HHC02722, \"I\", labelrec );\n }\n\n } /* end if(tapemark) */\n\n } /* end for(outfilecount) */\n\n close(outfd);\n\n } /* end for(outfilenum) */\n\n /* Close files and exit */\n close (infd);\n\n return 0;\n\n} /* end function main */\n"} +{"text": "require 'spec_helper'\n\ndescribe UsersController do\n\n before (:each) do\n @user = FactoryGirl.create(:user)\n sign_in @user\n end\n\n describe \"GET 'show'\" do\n \n it \"should be successful\" do\n get :show, :id => @user.id\n response.should be_success\n end\n \n it \"should find the right user\" do\n get :show, :id => @user.id\n assigns(:user).should == @user\n end\n \n end\n\nend\n"} +{"text": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`should put a page break 1`] = `\nWordDocument {\n \"doc\": officegen {\n \"_events\": Object {\n \"afterGen\": [Function],\n \"beforeGen\": [Function],\n \"clearData\": [Function],\n \"clearDoc\": [Function],\n \"clearDocType\": [Function],\n },\n \"_eventsCount\": 5,\n \"_maxListeners\": undefined,\n \"addPageBreak\": [Function],\n \"addResourceToParse\": [Function],\n \"cbMakeDocxDocument\": [Function],\n \"createByJson\": [Function],\n \"createJson\": [Function],\n \"createListOfDots\": [Function],\n \"createListOfNumbers\": [Function],\n \"createP\": [Function],\n \"createTable\": [Function],\n \"data\": Array [\n Object {\n \"data\": Array [\n Object {\n \"page_break\": true,\n },\n ],\n },\n ],\n \"domain\": null,\n \"generate\": [Function],\n \"getFooter\": [Function],\n \"getHeader\": [Function],\n \"info\": Object {\n \"cp:category\": Object {\n \"data\": \"\",\n \"def_data\": \"\",\n \"element\": \"cp:category\",\n },\n \"cp:contentStatus\": Object {\n \"data\": \"\",\n \"def_data\": \"\",\n \"element\": \"cp:contentStatus\",\n },\n \"cp:keywords\": Object {\n \"data\": \"\",\n \"def_data\": \"\",\n \"element\": \"cp:keywords\",\n },\n \"dc:description\": Object {\n \"data\": \"\",\n \"def_data\": \"\",\n \"element\": \"dc:description\",\n },\n \"dc:subject\": Object {\n \"data\": \"\",\n \"def_data\": \"\",\n \"element\": \"dc:subject\",\n },\n \"dc:title\": Object {\n \"data\": \"\",\n \"def_data\": \"\",\n \"element\": \"dc:title\",\n },\n },\n \"options\": Object {\n \"type\": \"docx\",\n },\n \"putPageBreak\": [Function],\n \"setDescription\": [Function],\n \"setDocCategory\": [Function],\n \"setDocKeywords\": [Function],\n \"setDocStatus\": [Function],\n \"setDocSubject\": [Function],\n \"setDocTitle\": [Function],\n \"setTheme\": [Function],\n \"startNewDoc\": [Function],\n \"theme\": null,\n },\n \"document\": PageBreak {\n \"adder\": Object {\n \"data\": Array [\n Object {\n \"page_break\": true,\n },\n ],\n },\n \"children\": Array [],\n \"parent\": null,\n \"props\": Object {},\n \"root\": [Circular],\n },\n}\n`;\n"} +{"text": "<?php\n\n/* For licensing terms, see /license.txt */\n\nnamespace Chamilo\\CourseBundle\\Settings;\n\nuse Chamilo\\CoreBundle\\Form\\Type\\YesNoType;\nuse Chamilo\\CoreBundle\\Settings\\AbstractSettingsSchema;\nuse Sylius\\Bundle\\SettingsBundle\\Schema\\AbstractSettingsBuilder;\nuse Symfony\\Component\\Form\\FormBuilderInterface;\n\n/**\n * Class SettingsCourseSettingsSchema.\n */\nclass SettingsCourseSettingsSchema extends AbstractSettingsSchema\n{\n public function buildSettings(AbstractSettingsBuilder $builder)\n {\n $builder\n ->setDefaults([\n 'enabled' => '',\n ])\n ;\n $allowedTypes = [\n 'enabled' => ['string'],\n ];\n $this->setMultipleAllowedTypes($allowedTypes, $builder);\n }\n\n public function buildForm(FormBuilderInterface $builder)\n {\n $builder\n ->add('enabled', YesNoType::class)\n ;\n }\n}\n"} +{"text": "; RUN: opt -S -basicaa -loop-vectorize < %s | FileCheck %s\ntarget datalayout = \"E-m:e-i64:64-n32:64\"\ntarget triple = \"powerpc64-unknown-linux-gnu\"\n\n; Function Attrs: nounwind\ndefine void @foo(double* noalias nocapture %a, double* noalias nocapture readonly %b, double* noalias nocapture readonly %c) #0 {\nentry:\n br label %for.body\n\n; CHECK-LABEL: @foo\n; CHECK: fmul <4 x double> %{{[^,]+}}, <double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00>\n; CHECK-NEXT: fmul <4 x double> %{{[^,]+}}, <double 2.000000e+00, double 2.000000e+00, double 2.000000e+00, double 2.000000e+00>\n\nfor.cond.cleanup: ; preds = %for.body\n ret void\n\nfor.body: ; preds = %for.body, %entry\n %indvars.iv = phi i64 [ 0, %entry ], [ %indvars.iv.next, %for.body ]\n %arrayidx = getelementptr inbounds double, double* %b, i64 %indvars.iv\n %0 = load double, double* %arrayidx, align 8\n %mul = fmul double %0, 2.000000e+00\n %mul3 = fmul double %0, %mul\n %arrayidx5 = getelementptr inbounds double, double* %c, i64 %indvars.iv\n %1 = load double, double* %arrayidx5, align 8\n %mul6 = fmul double %1, 3.000000e+00\n %mul9 = fmul double %1, %mul6\n %add = fadd double %mul3, %mul9\n %mul12 = fmul double %0, 4.000000e+00\n %mul15 = fmul double %mul12, %1\n %add16 = fadd double %mul15, %add\n %add17 = fadd double %add16, 1.000000e+00\n %arrayidx19 = getelementptr inbounds double, double* %a, i64 %indvars.iv\n store double %add17, double* %arrayidx19, align 8\n %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1\n %exitcond = icmp eq i64 %indvars.iv.next, 1600\n br i1 %exitcond, label %for.cond.cleanup, label %for.body\n}\n\nattributes #0 = { nounwind \"target-cpu\"=\"a2q\" }\n\n"} +{"text": "#include \"JSPresence.hpp\"\n#include \"JSFields.hpp\"\n#include \"../JSObjectStructs/JSPresenceStruct.hpp\"\n#include \"../JSObjectStructs/JSSystemStruct.hpp\"\n#include \"JSVec3.hpp\"\n#include \"JSQuaternion.hpp\"\n#include \"JSInvokableObject.hpp\"\n#include <sirikata/core/transfer/URI.hpp>\n#include \"JSObjectsUtils.hpp\"\n#include \"../JSLogging.hpp\"\n\nusing namespace v8;\n\nnamespace Sirikata{\nnamespace JS{\nnamespace JSPresence{\n\nbool isPresence(v8::Handle<v8::Value> v8Val)\n{\n if( v8Val->IsNull() || v8Val->IsUndefined() || !v8Val->IsObject())\n {\n return false;\n }\n\n // This is an object\n\n v8::Handle<v8::Object>v8Obj = v8Val->ToObject();\n\n if (TYPEID_FIELD >= v8Obj->InternalFieldCount()) return false;\n\n v8::Local<v8::Value> typeidVal = v8Obj->GetInternalField(TYPEID_FIELD);\n if(typeidVal->IsNull() || typeidVal->IsUndefined())\n {\n return false;\n }\n\n v8::Local<v8::External> wrapped = v8::Local<v8::External>::Cast(typeidVal);\n void* ptr = wrapped->Value();\n std::string* typeId = static_cast<std::string*>(ptr);\n if(typeId == NULL) return false;\n\n std::string typeIdString = *typeId;\n\n if(typeIdString == PRESENCE_TYPEID_STRING)\n {\n return true;\n }\n\n return false;\n\n}\n\n\n\nv8::Handle<v8::Value> pres_disconnect(const v8::Arguments& args)\n{\n if (args.Length() != 0)\n return v8::ThrowException(v8::Exception::Error(v8::String::New(\"Error. disconnect for presence requires no arguments.\")));\n\n String errorMessage = \"Error in disconnect while decoding presence. \";\n JSPresenceStruct* jspres = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (jspres == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str()) ));\n\n return jspres->disconnect();\n}\n\n\nv8::Handle<v8::Value> getIsConnected(const v8::Arguments& args)\n{\n if (args.Length() != 0)\n return v8::ThrowException(v8::Exception::Error(v8::String::New(\"Error. getIsConnected for presence requires no arguments.\")));\n\n String errorMessage = \"Error in getIsConnected while decoding presence. \";\n JSPresenceStruct* jspres = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (jspres == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str()) ));\n\n return v8::Boolean::New(jspres->getIsConnected());\n}\n\n\n\nv8::Handle<v8::Value> getAllData(const v8::Arguments& args)\n{\n if (args.Length() != 0)\n return v8::ThrowException(v8::Exception::Error(v8::String::New(\"Error. getAllData for presence requires no arguments.\")));\n\n String errorMessage = \"Error in getAllData while decoding presence. \";\n JSPresenceStruct* jspres = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (jspres == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str()) ));\n\n return jspres->getAllData();\n}\n\n\nv8::Handle<v8::Value> getSpace(const v8::Arguments& args)\n{\n if (args.Length() != 0)\n return v8::ThrowException(v8::Exception::Error(v8::String::New(\"Error. Getting spaceID requires no arguments.\")));\n\n String errorMessage = \"Error in getSpaceID while decoding presence. \";\n JSPresenceStruct* jspres = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (jspres == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str()) ));\n\n SpaceObjectReference sporef = jspres->getSporef();\n\n if (sporef == SpaceObjectReference::null())\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"Error. SpaceID is not defined.\")));\n\n return v8::String::New(sporef.space().toString().c_str());\n}\n\nv8::Handle<v8::Value> getOref(const v8::Arguments& args)\n{\n if (args.Length() != 0)\n return v8::ThrowException(v8::Exception::Error(v8::String::New(\"Error. Getting objectID requires no arguments.\")));\n\n String errorMessage = \"Error in getObjectID while decoding presence. \";\n JSPresenceStruct* jspres = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (jspres == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str()) ));\n\n SpaceObjectReference sporef = jspres->getSporef();\n\n if (sporef == SpaceObjectReference::null())\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"Error. ObjectID is not defined.\")));\n\n return v8::String::New(sporef.object().toString().c_str());\n}\n\n\n\n/**\nTakes presence and sets its current velocity and orientation velocity to zero.\nRequires no args.\n*/\nv8::Handle<v8::Value> pres_suspend(const v8::Arguments& args)\n{\n if (args.Length() != 0)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"ERROR: calling presence's suspend function should not take any args.\")) );\n\n String errorMessage = \"Error in suspend while decoding presence. \";\n JSPresenceStruct* jspres = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (jspres == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str()) ));\n\n return jspres->suspend();\n}\n\n/**\nReset's the presence's velocity and orientational velocity to what it was\nbefore suspend was called. If suspend had not been already called, do\nnothing. Requires no args.\n*/\nv8::Handle<v8::Value> pres_resume(const v8::Arguments& args)\n{\n if (args.Length() != 0)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"ERROR: calling presence's resume function should not take any args.\")) );\n\n String errorMessage = \"Error in resume while decoding presence. \";\n JSPresenceStruct* jspres = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (jspres == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str()) ));\n\n return jspres->resume();\n}\n\n\n/**\nthis function allows the presence to return a visible object version of\nitself. Requires no args\n*/\nv8::Handle<v8::Value> toVisible(const v8::Arguments& args)\n{\n v8::HandleScope handle_scope;\n if (args.Length() != 0)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"ERROR: calling presence's toVisible function should not take any args.\")) );\n\n String errorMessage = \"Error in toVisible while decoding presence. \";\n JSPresenceStruct* jspres = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (jspres == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str()) ));\n\n return handle_scope.Close(jspres->toVisible());\n}\n\n\n\n/**\n @param String uri of the mesh to set\n Changes the mesh of the associated presence.\n */\nHandle<v8::Value> setMesh(const v8::Arguments& args)\n{\n if (args.Length() != 1)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"ERROR: You need to specify exactly one argument to the setMesh function.\")) );\n\n String errorMessage = \"Error in setMesh while decoding presence. \";\n JSPresenceStruct* mStruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (mStruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n //get the uri object from args\n std::string uriLocation;\n bool uriArgValid = getURI(args,uriLocation);\n if (! uriArgValid)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"Oops. You didn't really specify an appropriate uri for your mesh.\")) );\n\n return mStruct->setVisualFunction(uriLocation);\n}\n\n\n/**\n Loads a graphical window associated with this presence.\n @param Single argument corresponds to what type of window to open. (Should\n probably be 'ogregraphics'.)\n */\nv8::Handle<v8::Value>runSimulation(const v8::Arguments& args)\n{\n v8::HandleScope handle_scope;\n\n if (args.Length() != 1)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"ERROR: You need to specify exactly one argument to the runSimulation function. (It should probably be 'ogregraphics'.)\\n\\n\")) );\n\n\n String errorMessage = \"Error in runSimulation while decoding presence. \";\n JSPresenceStruct* mStruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (mStruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n String strDecodeErrorMessage = \"Error decoding string as first argument of runSimulation to jspresence. \";\n String simname; //string to decode to.\n bool decodeStrSuccessful = decodeString(args[0],simname,strDecodeErrorMessage);\n if (! decodeStrSuccessful)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(strDecodeErrorMessage.c_str(), strDecodeErrorMessage.length())) );\n\n return handle_scope.Close(mStruct->runSimulation(simname));\n}\n\n\n/**\n Calculates the distance between this presence and a specified position vector\n @param Vec3 The position vector of the point to which to calculated distance\n @return distance to the argument\n*/\n\n\nv8::Handle<v8::Value>distance(const v8::Arguments& args)\n{\n if (args.Length() != 1)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"Invalid: need exactly one argument to distance method of presence\")));\n\n String errorMessage = \"Error in distance method of JSPresence.cpp. Cannot decode presence. \";\n JSPresenceStruct* jspres = JSPresenceStruct::decodePresenceStruct(args.This(),errorMessage);\n\n if (jspres == NULL)\n return v8::ThrowException(v8::Exception::Error(v8::String::New(errorMessage.c_str(),errorMessage.length())));\n\n\n if (! args[0]->IsObject())\n return v8::ThrowException(v8::Exception::Error(v8::String::New(\"Error in dist of JSPresence.cpp. Argument should be an objet.\")));\n\n v8::Handle<v8::Object> argObj = args[0]->ToObject();\n\n bool isVec3 = Vec3Validate(argObj);\n if (! isVec3)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"Invalid: argument to dist method of Presence needs to be a vec3\")));\n\n Vector3d vec3 = Vec3Extract(argObj);\n\n return jspres->struct_getDistance(vec3);\n}\n\n/**\n Tells whether a presence is connected to the world\n @param No params\n @return returns true if presence is connected else returns false\n*/\n\n\nv8::Handle<v8::Value>isConnectedGetter(v8::Local<v8::String> property, const AccessorInfo& info)\n{\n String errorMessage = \"Error in isConnectedGetter while decoding presence. \";\n JSPresenceStruct* jspres = JSPresenceStruct::decodePresenceStruct(info.Holder(),errorMessage);\n if (jspres == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n return jspres->getIsConnectedV8();\n}\n\nvoid isConnectedSetter(v8::Local<v8::String> property, v8::Local<v8::Value> toSetTo,const AccessorInfo& info)\n{\n String errorMessage = \"Error. Cannot write to isConnected variable.\";\n JSLOG(error, errorMessage);\n //return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n}\n\n\n\n\n //changine this function to actually do something\n //args should contain a string that can be converted to a uri\n //FIXME: Should maybe also have a callback function inside\n/**\n @return A string corresponding to the URI for your current mesh. Can pass\n this uri to setMesh functions.\n */\n Handle<v8::Value> getMesh(const v8::Arguments& args)\n {\n\n String errorMessage = \"Error in getMesh while decoding presence. \";\n JSPresenceStruct* mStruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (mStruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n return mStruct->struct_getMesh();\n }\n\n\n/**\n @param Vec3. (To create a Vec3, use new util.Vec3(0,0,0).)\n\n Teleports this presence to the position specified by argument.\n */\n v8::Handle<v8::Value> setPosition(const v8::Arguments& args)\n {\n if (args.Length() != 1)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"ERROR: You need to specify exactly one argument to the setPosition function.\")) );\n\n String errorMessage = \"Error in getMesh while decoding presence. \";\n JSPresenceStruct* mStruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (mStruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n if ( ! Vec3ValValidate(args[0]))\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"Error in setPosition function. Wrong argument: require a vector for new positions.\")) );\n\n Vector3f newPos (Vec3ValExtract(args[0]));\n return mStruct->struct_setPosition(newPos);\n }\n\n\n/**\n @return Returns a vec3 corresponding to the current position of this presence.\n */\n Handle<v8::Value> getPosition(const v8::Arguments& args)\n {\n\n String errorMessage = \"Error in getPosition while decoding presence. \";\n JSPresenceStruct* mStruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (mStruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n\n return mStruct->struct_getPosition();\n }\n\n\n/**\n @param Vec3. (To create a Vec3, use new util.Vec3(0,0,0).)\n\n Changes the velocity of this presence to be Vec3.\n */\n v8::Handle<v8::Value> setVelocity(const v8::Arguments& args)\n {\n if (args.Length() != 1)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"ERROR: You need to specify exactly one argument to the setVelocity function.\")) );\n\n String errorMessage = \"Error in setVelocity while decoding presence. \";\n JSPresenceStruct* mStruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (mStruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n\n //get first args\n if ( ! Vec3ValValidate(args[0]))\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"Error in setVelocity function. Wrong argument: require a vector for new positions.\")) );\n Vector3f newVel (Vec3ValExtract(args[0]));\n\n return mStruct->struct_setVelocity(newVel);\n }\n\n/**\n @return Returns a vec3 corresponding to the current velocity of this presence.\n */\n Handle<v8::Value> getVelocity(const v8::Arguments& args)\n {\n\n String errorMessage = \"Error in getVelocity while decoding presence. \";\n JSPresenceStruct* mStruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (mStruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n\n return mStruct->struct_getVelocity();\n }\n\n\n/**\n @return Returns a quaternion corresponding to the current orientation of this presence.\n */\n Handle<v8::Value> getOrientation(const v8::Arguments& args)\n {\n String errorMessage = \"Error in getOrientation while decoding presence. \";\n JSPresenceStruct* mStruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (mStruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n return mStruct->struct_getOrientation();\n }\n\n/**\n @param Requires a quaternion (new util.Quaternion(0,0,0,1);).\n\n Changes the orientation of the presence to that associated with quaternion\n passed in.\n */\n v8::Handle<v8::Value> setOrientation(const v8::Arguments& args)\n {\n if (args.Length() != 1)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"ERROR: You need to specify exactly one argument to the setOrientation function.\")) );\n\n String errorMessage = \"Error in setOrientation while decoding presence. \";\n JSPresenceStruct* mStruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (mStruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n\n //get first args\n if ( ! QuaternionValValidate(args[0]))\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"Error in setOrientation function. Wrong argument: require a quaternion for new orientation.\")) );\n Quaternion newOrientation (QuaternionValExtract(args[0]));\n\n return mStruct->setOrientationFunction(newOrientation.normal());\n\n }\n\n\n/**\n @return a number corresponding to angular velocity of presence (rads/s).\n */\n Handle<v8::Value> getOrientationVel(const v8::Arguments& args)\n {\n String errorMessage = \"Error in getOrientationVel while decoding presence. \";\n JSPresenceStruct* mStruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (mStruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n return mStruct->struct_getOrientationVel();\n }\n\n/**\n @param a number in rads/s\n\n Sets the angular velocity of the presence.\n */\n v8::Handle<v8::Value> setOrientationVel(const v8::Arguments& args)\n {\n if (args.Length() != 1)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"ERROR: You need to specify exactly one argument to the setOrientationVel function.\")) );\n\n\n String errorMessage = \"Error in setOrientationVel while decoding presence. \";\n JSPresenceStruct* mStruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (mStruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n\n if ( ! QuaternionValValidate(args[0]))\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"Error in setOrientation function. Wrong argument: require a quaternion for new orientation.\")) );\n Quaternion newOrientationVel (QuaternionValExtract(args[0]));\n\n return mStruct->setOrientationVelFunction(newOrientationVel);\n }\n\n\n/**\n @param Query parameters, as a string. Format depends on what the server supports.\n */\nv8::Handle<v8::Value> setQuery(const v8::Arguments& args)\n{\n if (args.Length() != 1)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"ERROR: You need to specify exactly one argument to setQuery.\")) );\n\n String errorMessage = \"Error in setQuery while decoding presence. \";\n JSPresenceStruct* mStruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (mStruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n\n if (!StringValidate(args[0]))\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"Error in setQuery function. Wrong argument: require a string for query angle.\")) );\n String new_qa(StringExtract(args[0]));\n\n return mStruct->setQueryFunction(new_qa);\n}\n\n\nv8::Handle<v8::Value> getQuery(const v8::Arguments& args)\n{\n String errorMessage = \"Error in getQuery while decoding presence. \";\n JSPresenceStruct* mStruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (mStruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n return mStruct->struct_getQuery();\n}\n\n\n/**\n @return A number indicating the scale of the presence.\n\n Returns the scale of the object. 1 is unit scale.\n */\nHandle<v8::Value> getScale(const v8::Arguments& args)\n{\n String errorMessage = \"Error in getScale while decoding presence. \";\n JSPresenceStruct* mStruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (mStruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n return mStruct->struct_getScale();\n}\n\n\n/**\n @param A number indicating the scale of the presence.\n\n Change the scale of this presence. Ie make it larger by putting in a number\n greater than its current scale, or smaller by putting in a number less than\n its current scale.\n */\nv8::Handle<v8::Value> setScale(const v8::Arguments& args)\n{\n if (args.Length() != 1)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"Error in setScale of JSPresence.cpp. You need to specify exactly one argument to setScale.\")) );\n\n String errorMessage = \"Error in setScale while decoding presence. \";\n JSPresenceStruct* mStruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (mStruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n\n if (!NumericValidate(args[0]))\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"Error in setScale function. Wrong argument: require a number for query angle.\")) );\n float new_scale = NumericExtract(args[0]);\n\n return mStruct->setVisualScaleFunction(new_scale);\n}\n\n\n//Takes in args, tries to get out the first argument, which should be a\n//string that we convert to a TransferURI object. If anything fails,\n//then we just return null\nbool getURI(const v8::Arguments& args,std::string& returner)\n{\n //assumes that the URI object is in the first 0th arg field\n Handle<Value> newVis = args[0];\n String dummy;\n return decodeString(newVis,returner,dummy);\n}\n\n/**\n @return String the string representation of the presence\n*/\n\nHandle<v8::Value> toString(const v8::Arguments& args)\n{\n String errorMessage = \"Error in toString of JSPresence while decoding presence. \";\n JSPresenceStruct* mStruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (mStruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n // Look up for the per space data\n //for now just print the space id\n return mStruct->toString();\n}\n\n\n/**\n @return A string corresponding to the URI for your current mesh. Can pass\n this uri to setMesh functions.\n*/\nHandle<v8::Value> getPhysics(const v8::Arguments& args)\n{\n String errorMessage = \"Error in getPhysics while decoding presence. \";\n JSPresenceStruct* mStruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (mStruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n return mStruct->struct_getPhysics();\n}\n\n/**\n @param String containing physics settings\n Changes the physical properties of the associated presence.\n*/\nHandle<v8::Value> setPhysics(const v8::Arguments& args)\n{\n if (args.Length() != 1)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"ERROR: You need to specify exactly one argument to the setPhysics function.\")) );\n\n String errorMessage = \"Error in setPhysics while decoding presence. \";\n JSPresenceStruct* mStruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (mStruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n if (!StringValidate(args[0]))\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"Error in setPhysics function. Wrong argument: require a string for physical parameters.\")) );\n String phy(StringExtract(args[0]));\n\n return mStruct->setPhysicsFunction(phy);\n}\n\n\nnamespace {\nv8::Handle<v8::Function> decodeCallbackArgument(const v8::Arguments& args, int32 idx) {\n v8::Handle<v8::Function> cb;\n if (args.Length() > idx) {\n v8::Handle<v8::Value> cbVal = args[idx];\n if (cbVal->IsFunction())\n cb = v8::Handle<v8::Function>::Cast(cbVal);\n }\n return cb;\n}\n}\n\nv8::Handle<v8::Value> loadMesh(const v8::Arguments& args)\n{\n if (args.Length() != 2 && args.Length() != 3) // only tell about one, first should be system\n return v8::ThrowException ( v8::Exception::Error(v8::String::New(\"Error calling presence.loadMesh. Requires 1 argument: the callback to invoke when loading is complete.\")));\n\n String errorMessage = \"Error in loadMesh while decoding presence.\";\n JSPresenceStruct* presstruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n if (presstruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n errorMessage = \"Error decoding system in presence.loadMesh\";\n JSSystemStruct* sysstruct = JSSystemStruct::decodeSystemStruct(args[0], errorMessage);\n\n v8::Handle<v8::Function> cb = decodeCallbackArgument(args, 1);\n if (cb.IsEmpty())\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"Invalid callback argument to presence.loadMesh.\")));\n\n bool downloadFullAsset = false;\n if (args.Length() >= 3) {\n errorMessage = \"Invalid downloadFullAsset argument.\";\n bool decoded = decodeBool(args[2], downloadFullAsset, errorMessage);\n if (!decoded) return v8::ThrowException( v8::Exception::Error(v8::String::New(\"Invalid argument to presence.loadMesh.\")));\n }\n\n return presstruct->loadMesh(sysstruct->getContext(), cb, downloadFullAsset);\n}\n\nv8::Handle<v8::Value> meshBounds(const v8::Arguments& args) {\n if (args.Length() != 0)\n return v8::ThrowException ( v8::Exception::Error(v8::String::New(\"Error calling presence.meshBounds. Should take no arguments.\")));\n\n String errorMessage = \"Error in meshBounds while decoding presence.\";\n JSPresenceStruct* presstruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n if (presstruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n return presstruct->meshBounds();\n}\n\nv8::Handle<v8::Value> untransformedMeshBounds(const v8::Arguments& args) {\n if (args.Length() != 0)\n return v8::ThrowException ( v8::Exception::Error(v8::String::New(\"Error calling presence.untransformedMeshBounds. Should take no arguments.\")));\n\n String errorMessage = \"Error in untransformedMeshBounds while decoding presence.\";\n JSPresenceStruct* presstruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n if (presstruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n return presstruct->untransformedMeshBounds();\n}\n\nv8::Handle<v8::Value> raytrace(const v8::Arguments& args) {\n if (args.Length() != 2)\n return v8::ThrowException ( v8::Exception::Error(v8::String::New(\"Error calling presence.raytrace. Should take ray start and ray direction.\")));\n\n String errorMessage = \"Error in raytrace while decoding presence.\";\n JSPresenceStruct* presstruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n if (presstruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n v8::Handle<v8::Object> arg0 = args[0]->ToObject();\n if (!args[0]->IsObject() || !Vec3Validate(arg0))\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"Invalid: first argument to raytrace should be vec3.\")));\n Vector3d ray_start = Vec3Extract(arg0);\n\n v8::Handle<v8::Object> arg1 = args[1]->ToObject();\n if (!args[1]->IsObject() || !Vec3Validate(arg1))\n return v8::ThrowException( v8::Exception::Error(v8::String::New(\"Invalid: second argument to raytrace should be vec3.\")));\n Vector3d ray_dir = Vec3Extract(arg1);\n\n return presstruct->raytrace(Vector3f(ray_start), Vector3f(ray_dir));\n}\n\nv8::Handle<v8::Value> unloadMesh(const v8::Arguments& args)\n{\n if (args.Length() != 0)\n return v8::ThrowException ( v8::Exception::Error(v8::String::New(\"Error calling presence.unloadMesh. Takes no arguments.\")));\n\n String errorMessage = \"Error in unloadMesh while decoding presence. \";\n JSPresenceStruct* presstruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n if (presstruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n return presstruct->unloadMesh();\n}\n\nv8::Handle<v8::Value> getAnimationList(const v8::Arguments& args)\n{\n String errorMessage = \"Error in getAnimationList while decoding presence. \";\n JSPresenceStruct* mStruct = JSPresenceStruct::decodePresenceStruct(args.This() ,errorMessage);\n\n if (mStruct == NULL)\n return v8::ThrowException( v8::Exception::Error(v8::String::New(errorMessage.c_str(), errorMessage.length())) );\n\n return mStruct->struct_getAnimationList();\n}\n\n\nvoid setNullPresence(const v8::Arguments& args)\n{\n v8::Handle<v8::Object> mPres = args.This();\n\n //grabs the internal pattern\n //(which has been saved as a pointer to JSEventHandler\n if (mPres->InternalFieldCount() > 0)\n mPres->SetInternalField(PRESENCE_FIELD_PRESENCE ,External::New(NULL));\n else\n v8::Handle<v8::Object>::Cast(mPres->GetPrototype())->SetInternalField(PRESENCE_FIELD_PRESENCE, External::New(NULL));\n}\n\n\n\n} //end jspresence namespace\n} //end js namespace\n} //end sirikata namespace\n"} +{"text": "var falafel = require('falafel');\nvar test = require('../');\n\ntest('array', function (t) {\n t.plan(3);\n \n var src = '(' + function () {\n var xs = [ 1, 2, [ 3, 4 ] ];\n var ys = [ 5, 6 ];\n g([ xs, ys ]);\n } + ')()';\n \n var output = falafel(src, function (node) {\n if (node.type === 'ArrayExpression') {\n node.update('fn(' + node.source() + ')');\n }\n });\n \n var arrays = [\n [ 3, 4 ],\n [ 1, 2, [ 3, 4 ] ],\n [ 5, 6 ],\n [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ],\n ];\n \n Function(['fn','g'], output)(\n function (xs) {\n t.same(arrays.shift(), xs);\n return xs;\n },\n function (xs) {\n t.same(xs, [ [ 1, 2, [ 3, 4 ] ], [ 5, 6 ] ]);\n }\n );\n});\n"} +{"text": "/* TNC : Minimization example */\n/* $Jeannot: example.c,v 1.19 2005/01/28 18:27:31 js Exp $ */\n\n#include <stdio.h>\n#include <stdlib.h>\n#include <math.h>\n\n#include \"tnc.h\"\n\nstatic tnc_function function;\n\nstatic int function(double x[], double *f, double g[], void *state)\n{\n *f = pow(x[0],2.0)+pow(fabs(x[1]),3.0);\n g[0] = 2.0*x[0];\n g[1] = 3.0*pow(fabs(x[1]),2.0);\n if(x[1]<0) g[1] = -g[1];\n return 0;\n}\n\nint main(int argc, char **argv)\n{\n int i, rc, maxCGit = 2, maxnfeval = 20, nfeval;\n double fopt = 1.0, f, g[2],\n x[2] = {-7.0, 3.0},\n xopt[2] = {0.0, 1.0},\n low[2], up[2],\n eta = -1.0, stepmx = -1.0,\n accuracy = -1.0, fmin = 0.0, ftol = -1.0, xtol = -1.0, pgtol = -1.0,\n rescale = -1.0;\n\n low[0] = - HUGE_VAL; low[1] = 1.0;\n up[0] = HUGE_VAL; up[1] = HUGE_VAL;\n\n rc = tnc(2, x, &f, g, function, NULL, low, up, NULL, NULL, TNC_MSG_ALL,\n maxCGit, maxnfeval, eta, stepmx, accuracy, fmin, ftol, xtol, pgtol,\n rescale, &nfeval, NULL);\n\n printf(\"After %d function evaluations, TNC returned:\\n%s\\n\", nfeval,\n tnc_rc_string[rc - TNC_MINRC]);\n\n for (i = 0; i < 2; i++)\n printf(\"x[%d] = %.15f / xopt[%d] = %.15f\\n\", i, x[i], i, xopt[i]);\n\n printf(\"\\n\");\n printf(\"f = %.15f / fopt = %.15f\\n\", f, fopt);\n\n return 0;\n}\n"} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<browserconfig>\n <msapplication>\n <tile>\n <square150x150logo src=\"/mstile-150x150.png\"/>\n <TileColor>#ffffff</TileColor>\n </tile>\n </msapplication>\n</browserconfig>\n"} +{"text": "#ifndef GIM_BOX_COLLISION_H_INCLUDED\n#define GIM_BOX_COLLISION_H_INCLUDED\n\n/*! \\file gim_box_collision.h\n\\author Francisco Leon Najera\n*/\n/*\n-----------------------------------------------------------------------------\nThis source file is part of GIMPACT Library.\n\nFor the latest info, see http://gimpact.sourceforge.net/\n\nCopyright (c) 2006 Francisco Leon Najera. C.C. 80087371.\nemail: projectileman@yahoo.com\n\n This library is free software; you can redistribute it and/or\n modify it under the terms of EITHER:\n (1) The GNU Lesser General Public License as published by the Free\n Software Foundation; either version 2.1 of the License, or (at\n your option) any later version. The text of the GNU Lesser\n General Public License is included with this library in the\n file GIMPACT-LICENSE-LGPL.TXT.\n (2) The BSD-style license that is included with this library in\n the file GIMPACT-LICENSE-BSD.TXT.\n (3) The zlib/libpng license that is included with this library in\n the file GIMPACT-LICENSE-ZLIB.TXT.\n\n This library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files\n GIMPACT-LICENSE-LGPL.TXT, GIMPACT-LICENSE-ZLIB.TXT and GIMPACT-LICENSE-BSD.TXT for more details.\n\n-----------------------------------------------------------------------------\n*/\n#include \"gim_basic_geometry_operations.h\"\n#include \"LinearMath/btTransform.h\"\n\n//SIMD_FORCE_INLINE bool test_cross_edge_box(\n//\tconst btVector3 & edge,\n//\tconst btVector3 & absolute_edge,\n//\tconst btVector3 & pointa,\n//\tconst btVector3 & pointb, const btVector3 & extend,\n//\tint dir_index0,\n//\tint dir_index1\n//\tint component_index0,\n//\tint component_index1)\n//{\n//\t// dir coords are -z and y\n//\n//\tconst btScalar dir0 = -edge[dir_index0];\n//\tconst btScalar dir1 = edge[dir_index1];\n//\tbtScalar pmin = pointa[component_index0]*dir0 + pointa[component_index1]*dir1;\n//\tbtScalar pmax = pointb[component_index0]*dir0 + pointb[component_index1]*dir1;\n//\t//find minmax\n//\tif(pmin>pmax)\n//\t{\n//\t\tGIM_SWAP_NUMBERS(pmin,pmax);\n//\t}\n//\t//find extends\n//\tconst btScalar rad = extend[component_index0] * absolute_edge[dir_index0] +\n//\t\t\t\t\textend[component_index1] * absolute_edge[dir_index1];\n//\n//\tif(pmin>rad || -rad>pmax) return false;\n//\treturn true;\n//}\n//\n//SIMD_FORCE_INLINE bool test_cross_edge_box_X_axis(\n//\tconst btVector3 & edge,\n//\tconst btVector3 & absolute_edge,\n//\tconst btVector3 & pointa,\n//\tconst btVector3 & pointb, btVector3 & extend)\n//{\n//\n//\treturn test_cross_edge_box(edge,absolute_edge,pointa,pointb,extend,2,1,1,2);\n//}\n//\n//\n//SIMD_FORCE_INLINE bool test_cross_edge_box_Y_axis(\n//\tconst btVector3 & edge,\n//\tconst btVector3 & absolute_edge,\n//\tconst btVector3 & pointa,\n//\tconst btVector3 & pointb, btVector3 & extend)\n//{\n//\n//\treturn test_cross_edge_box(edge,absolute_edge,pointa,pointb,extend,0,2,2,0);\n//}\n//\n//SIMD_FORCE_INLINE bool test_cross_edge_box_Z_axis(\n//\tconst btVector3 & edge,\n//\tconst btVector3 & absolute_edge,\n//\tconst btVector3 & pointa,\n//\tconst btVector3 & pointb, btVector3 & extend)\n//{\n//\n//\treturn test_cross_edge_box(edge,absolute_edge,pointa,pointb,extend,1,0,0,1);\n//}\n\n#ifndef TEST_CROSS_EDGE_BOX_MCR\n\n#define TEST_CROSS_EDGE_BOX_MCR(edge, absolute_edge, pointa, pointb, _extend, i_dir_0, i_dir_1, i_comp_0, i_comp_1) \\\n\t{ \\\n\t\tconst btScalar dir0 = -edge[i_dir_0]; \\\n\t\tconst btScalar dir1 = edge[i_dir_1]; \\\n\t\tbtScalar pmin = pointa[i_comp_0] * dir0 + pointa[i_comp_1] * dir1; \\\n\t\tbtScalar pmax = pointb[i_comp_0] * dir0 + pointb[i_comp_1] * dir1; \\\n\t\tif (pmin > pmax) \\\n\t\t{ \\\n\t\t\tGIM_SWAP_NUMBERS(pmin, pmax); \\\n\t\t} \\\n\t\tconst btScalar abs_dir0 = absolute_edge[i_dir_0]; \\\n\t\tconst btScalar abs_dir1 = absolute_edge[i_dir_1]; \\\n\t\tconst btScalar rad = _extend[i_comp_0] * abs_dir0 + _extend[i_comp_1] * abs_dir1; \\\n\t\tif (pmin > rad || -rad > pmax) return false; \\\n\t}\n\n#endif\n\n#define TEST_CROSS_EDGE_BOX_X_AXIS_MCR(edge, absolute_edge, pointa, pointb, _extend) \\\n\t{ \\\n\t\tTEST_CROSS_EDGE_BOX_MCR(edge, absolute_edge, pointa, pointb, _extend, 2, 1, 1, 2); \\\n\t}\n\n#define TEST_CROSS_EDGE_BOX_Y_AXIS_MCR(edge, absolute_edge, pointa, pointb, _extend) \\\n\t{ \\\n\t\tTEST_CROSS_EDGE_BOX_MCR(edge, absolute_edge, pointa, pointb, _extend, 0, 2, 2, 0); \\\n\t}\n\n#define TEST_CROSS_EDGE_BOX_Z_AXIS_MCR(edge, absolute_edge, pointa, pointb, _extend) \\\n\t{ \\\n\t\tTEST_CROSS_EDGE_BOX_MCR(edge, absolute_edge, pointa, pointb, _extend, 1, 0, 0, 1); \\\n\t}\n\n//! Class for transforming a model1 to the space of model0\nclass GIM_BOX_BOX_TRANSFORM_CACHE\n{\npublic:\n\tbtVector3 m_T1to0; //!< Transforms translation of model1 to model 0\n\tbtMatrix3x3 m_R1to0; //!< Transforms Rotation of model1 to model 0, equal to R0' * R1\n\tbtMatrix3x3 m_AR; //!< Absolute value of m_R1to0\n\n\tSIMD_FORCE_INLINE void calc_absolute_matrix()\n\t{\n\t\tstatic const btVector3 vepsi(1e-6f, 1e-6f, 1e-6f);\n\t\tm_AR[0] = vepsi + m_R1to0[0].absolute();\n\t\tm_AR[1] = vepsi + m_R1to0[1].absolute();\n\t\tm_AR[2] = vepsi + m_R1to0[2].absolute();\n\t}\n\n\tGIM_BOX_BOX_TRANSFORM_CACHE()\n\t{\n\t}\n\n\tGIM_BOX_BOX_TRANSFORM_CACHE(mat4f trans1_to_0)\n\t{\n\t\tCOPY_MATRIX_3X3(m_R1to0, trans1_to_0)\n\t\tMAT_GET_TRANSLATION(trans1_to_0, m_T1to0)\n\t\tcalc_absolute_matrix();\n\t}\n\n\t//! Calc the transformation relative 1 to 0. Inverts matrics by transposing\n\tSIMD_FORCE_INLINE void calc_from_homogenic(const btTransform &trans0, const btTransform &trans1)\n\t{\n\t\tm_R1to0 = trans0.getBasis().transpose();\n\t\tm_T1to0 = m_R1to0 * (-trans0.getOrigin());\n\n\t\tm_T1to0 += m_R1to0 * trans1.getOrigin();\n\t\tm_R1to0 *= trans1.getBasis();\n\n\t\tcalc_absolute_matrix();\n\t}\n\n\t//! Calcs the full invertion of the matrices. Useful for scaling matrices\n\tSIMD_FORCE_INLINE void calc_from_full_invert(const btTransform &trans0, const btTransform &trans1)\n\t{\n\t\tm_R1to0 = trans0.getBasis().inverse();\n\t\tm_T1to0 = m_R1to0 * (-trans0.getOrigin());\n\n\t\tm_T1to0 += m_R1to0 * trans1.getOrigin();\n\t\tm_R1to0 *= trans1.getBasis();\n\n\t\tcalc_absolute_matrix();\n\t}\n\n\tSIMD_FORCE_INLINE btVector3 transform(const btVector3 &point)\n\t{\n\t\treturn point.dot3(m_R1to0[0], m_R1to0[1], m_R1to0[2]) + m_T1to0;\n\t}\n};\n\n#ifndef BOX_PLANE_EPSILON\n#define BOX_PLANE_EPSILON 0.000001f\n#endif\n\n//! Axis aligned box\nclass GIM_AABB\n{\npublic:\n\tbtVector3 m_min;\n\tbtVector3 m_max;\n\n\tGIM_AABB()\n\t{\n\t}\n\n\tGIM_AABB(const btVector3 &V1,\n\t\t\t const btVector3 &V2,\n\t\t\t const btVector3 &V3)\n\t{\n\t\tm_min[0] = GIM_MIN3(V1[0], V2[0], V3[0]);\n\t\tm_min[1] = GIM_MIN3(V1[1], V2[1], V3[1]);\n\t\tm_min[2] = GIM_MIN3(V1[2], V2[2], V3[2]);\n\n\t\tm_max[0] = GIM_MAX3(V1[0], V2[0], V3[0]);\n\t\tm_max[1] = GIM_MAX3(V1[1], V2[1], V3[1]);\n\t\tm_max[2] = GIM_MAX3(V1[2], V2[2], V3[2]);\n\t}\n\n\tGIM_AABB(const btVector3 &V1,\n\t\t\t const btVector3 &V2,\n\t\t\t const btVector3 &V3,\n\t\t\t GREAL margin)\n\t{\n\t\tm_min[0] = GIM_MIN3(V1[0], V2[0], V3[0]);\n\t\tm_min[1] = GIM_MIN3(V1[1], V2[1], V3[1]);\n\t\tm_min[2] = GIM_MIN3(V1[2], V2[2], V3[2]);\n\n\t\tm_max[0] = GIM_MAX3(V1[0], V2[0], V3[0]);\n\t\tm_max[1] = GIM_MAX3(V1[1], V2[1], V3[1]);\n\t\tm_max[2] = GIM_MAX3(V1[2], V2[2], V3[2]);\n\n\t\tm_min[0] -= margin;\n\t\tm_min[1] -= margin;\n\t\tm_min[2] -= margin;\n\t\tm_max[0] += margin;\n\t\tm_max[1] += margin;\n\t\tm_max[2] += margin;\n\t}\n\n\tGIM_AABB(const GIM_AABB &other) : m_min(other.m_min), m_max(other.m_max)\n\t{\n\t}\n\n\tGIM_AABB(const GIM_AABB &other, btScalar margin) : m_min(other.m_min), m_max(other.m_max)\n\t{\n\t\tm_min[0] -= margin;\n\t\tm_min[1] -= margin;\n\t\tm_min[2] -= margin;\n\t\tm_max[0] += margin;\n\t\tm_max[1] += margin;\n\t\tm_max[2] += margin;\n\t}\n\n\tSIMD_FORCE_INLINE void invalidate()\n\t{\n\t\tm_min[0] = G_REAL_INFINITY;\n\t\tm_min[1] = G_REAL_INFINITY;\n\t\tm_min[2] = G_REAL_INFINITY;\n\t\tm_max[0] = -G_REAL_INFINITY;\n\t\tm_max[1] = -G_REAL_INFINITY;\n\t\tm_max[2] = -G_REAL_INFINITY;\n\t}\n\n\tSIMD_FORCE_INLINE void increment_margin(btScalar margin)\n\t{\n\t\tm_min[0] -= margin;\n\t\tm_min[1] -= margin;\n\t\tm_min[2] -= margin;\n\t\tm_max[0] += margin;\n\t\tm_max[1] += margin;\n\t\tm_max[2] += margin;\n\t}\n\n\tSIMD_FORCE_INLINE void copy_with_margin(const GIM_AABB &other, btScalar margin)\n\t{\n\t\tm_min[0] = other.m_min[0] - margin;\n\t\tm_min[1] = other.m_min[1] - margin;\n\t\tm_min[2] = other.m_min[2] - margin;\n\n\t\tm_max[0] = other.m_max[0] + margin;\n\t\tm_max[1] = other.m_max[1] + margin;\n\t\tm_max[2] = other.m_max[2] + margin;\n\t}\n\n\ttemplate <typename CLASS_POINT>\n\tSIMD_FORCE_INLINE void calc_from_triangle(\n\t\tconst CLASS_POINT &V1,\n\t\tconst CLASS_POINT &V2,\n\t\tconst CLASS_POINT &V3)\n\t{\n\t\tm_min[0] = GIM_MIN3(V1[0], V2[0], V3[0]);\n\t\tm_min[1] = GIM_MIN3(V1[1], V2[1], V3[1]);\n\t\tm_min[2] = GIM_MIN3(V1[2], V2[2], V3[2]);\n\n\t\tm_max[0] = GIM_MAX3(V1[0], V2[0], V3[0]);\n\t\tm_max[1] = GIM_MAX3(V1[1], V2[1], V3[1]);\n\t\tm_max[2] = GIM_MAX3(V1[2], V2[2], V3[2]);\n\t}\n\n\ttemplate <typename CLASS_POINT>\n\tSIMD_FORCE_INLINE void calc_from_triangle_margin(\n\t\tconst CLASS_POINT &V1,\n\t\tconst CLASS_POINT &V2,\n\t\tconst CLASS_POINT &V3, btScalar margin)\n\t{\n\t\tm_min[0] = GIM_MIN3(V1[0], V2[0], V3[0]);\n\t\tm_min[1] = GIM_MIN3(V1[1], V2[1], V3[1]);\n\t\tm_min[2] = GIM_MIN3(V1[2], V2[2], V3[2]);\n\n\t\tm_max[0] = GIM_MAX3(V1[0], V2[0], V3[0]);\n\t\tm_max[1] = GIM_MAX3(V1[1], V2[1], V3[1]);\n\t\tm_max[2] = GIM_MAX3(V1[2], V2[2], V3[2]);\n\n\t\tm_min[0] -= margin;\n\t\tm_min[1] -= margin;\n\t\tm_min[2] -= margin;\n\t\tm_max[0] += margin;\n\t\tm_max[1] += margin;\n\t\tm_max[2] += margin;\n\t}\n\n\t//! Apply a transform to an AABB\n\tSIMD_FORCE_INLINE void appy_transform(const btTransform &trans)\n\t{\n\t\tbtVector3 center = (m_max + m_min) * 0.5f;\n\t\tbtVector3 extends = m_max - center;\n\t\t// Compute new center\n\t\tcenter = trans(center);\n\n\t\tbtVector3 textends = extends.dot3(trans.getBasis().getRow(0).absolute(),\n\t\t\t\t\t\t\t\t\t\t trans.getBasis().getRow(1).absolute(),\n\t\t\t\t\t\t\t\t\t\t trans.getBasis().getRow(2).absolute());\n\n\t\tm_min = center - textends;\n\t\tm_max = center + textends;\n\t}\n\n\t//! Merges a Box\n\tSIMD_FORCE_INLINE void merge(const GIM_AABB &box)\n\t{\n\t\tm_min[0] = GIM_MIN(m_min[0], box.m_min[0]);\n\t\tm_min[1] = GIM_MIN(m_min[1], box.m_min[1]);\n\t\tm_min[2] = GIM_MIN(m_min[2], box.m_min[2]);\n\n\t\tm_max[0] = GIM_MAX(m_max[0], box.m_max[0]);\n\t\tm_max[1] = GIM_MAX(m_max[1], box.m_max[1]);\n\t\tm_max[2] = GIM_MAX(m_max[2], box.m_max[2]);\n\t}\n\n\t//! Merges a point\n\ttemplate <typename CLASS_POINT>\n\tSIMD_FORCE_INLINE void merge_point(const CLASS_POINT &point)\n\t{\n\t\tm_min[0] = GIM_MIN(m_min[0], point[0]);\n\t\tm_min[1] = GIM_MIN(m_min[1], point[1]);\n\t\tm_min[2] = GIM_MIN(m_min[2], point[2]);\n\n\t\tm_max[0] = GIM_MAX(m_max[0], point[0]);\n\t\tm_max[1] = GIM_MAX(m_max[1], point[1]);\n\t\tm_max[2] = GIM_MAX(m_max[2], point[2]);\n\t}\n\n\t//! Gets the extend and center\n\tSIMD_FORCE_INLINE void get_center_extend(btVector3 &center, btVector3 &extend) const\n\t{\n\t\tcenter = (m_max + m_min) * 0.5f;\n\t\textend = m_max - center;\n\t}\n\n\t//! Finds the intersecting box between this box and the other.\n\tSIMD_FORCE_INLINE void find_intersection(const GIM_AABB &other, GIM_AABB &intersection) const\n\t{\n\t\tintersection.m_min[0] = GIM_MAX(other.m_min[0], m_min[0]);\n\t\tintersection.m_min[1] = GIM_MAX(other.m_min[1], m_min[1]);\n\t\tintersection.m_min[2] = GIM_MAX(other.m_min[2], m_min[2]);\n\n\t\tintersection.m_max[0] = GIM_MIN(other.m_max[0], m_max[0]);\n\t\tintersection.m_max[1] = GIM_MIN(other.m_max[1], m_max[1]);\n\t\tintersection.m_max[2] = GIM_MIN(other.m_max[2], m_max[2]);\n\t}\n\n\tSIMD_FORCE_INLINE bool has_collision(const GIM_AABB &other) const\n\t{\n\t\tif (m_min[0] > other.m_max[0] ||\n\t\t\tm_max[0] < other.m_min[0] ||\n\t\t\tm_min[1] > other.m_max[1] ||\n\t\t\tm_max[1] < other.m_min[1] ||\n\t\t\tm_min[2] > other.m_max[2] ||\n\t\t\tm_max[2] < other.m_min[2])\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\n\t/*! \\brief Finds the Ray intersection parameter.\n\t\\param aabb Aligned box\n\t\\param vorigin A vec3f with the origin of the ray\n\t\\param vdir A vec3f with the direction of the ray\n\t*/\n\tSIMD_FORCE_INLINE bool collide_ray(const btVector3 &vorigin, const btVector3 &vdir)\n\t{\n\t\tbtVector3 extents, center;\n\t\tthis->get_center_extend(center, extents);\n\t\t;\n\n\t\tbtScalar Dx = vorigin[0] - center[0];\n\t\tif (GIM_GREATER(Dx, extents[0]) && Dx * vdir[0] >= 0.0f) return false;\n\t\tbtScalar Dy = vorigin[1] - center[1];\n\t\tif (GIM_GREATER(Dy, extents[1]) && Dy * vdir[1] >= 0.0f) return false;\n\t\tbtScalar Dz = vorigin[2] - center[2];\n\t\tif (GIM_GREATER(Dz, extents[2]) && Dz * vdir[2] >= 0.0f) return false;\n\n\t\tbtScalar f = vdir[1] * Dz - vdir[2] * Dy;\n\t\tif (btFabs(f) > extents[1] * btFabs(vdir[2]) + extents[2] * btFabs(vdir[1])) return false;\n\t\tf = vdir[2] * Dx - vdir[0] * Dz;\n\t\tif (btFabs(f) > extents[0] * btFabs(vdir[2]) + extents[2] * btFabs(vdir[0])) return false;\n\t\tf = vdir[0] * Dy - vdir[1] * Dx;\n\t\tif (btFabs(f) > extents[0] * btFabs(vdir[1]) + extents[1] * btFabs(vdir[0])) return false;\n\t\treturn true;\n\t}\n\n\tSIMD_FORCE_INLINE void projection_interval(const btVector3 &direction, btScalar &vmin, btScalar &vmax) const\n\t{\n\t\tbtVector3 center = (m_max + m_min) * 0.5f;\n\t\tbtVector3 extend = m_max - center;\n\n\t\tbtScalar _fOrigin = direction.dot(center);\n\t\tbtScalar _fMaximumExtent = extend.dot(direction.absolute());\n\t\tvmin = _fOrigin - _fMaximumExtent;\n\t\tvmax = _fOrigin + _fMaximumExtent;\n\t}\n\n\tSIMD_FORCE_INLINE ePLANE_INTERSECTION_TYPE plane_classify(const btVector4 &plane) const\n\t{\n\t\tbtScalar _fmin, _fmax;\n\t\tthis->projection_interval(plane, _fmin, _fmax);\n\n\t\tif (plane[3] > _fmax + BOX_PLANE_EPSILON)\n\t\t{\n\t\t\treturn G_BACK_PLANE; // 0\n\t\t}\n\n\t\tif (plane[3] + BOX_PLANE_EPSILON >= _fmin)\n\t\t{\n\t\t\treturn G_COLLIDE_PLANE; //1\n\t\t}\n\t\treturn G_FRONT_PLANE; //2\n\t}\n\n\tSIMD_FORCE_INLINE bool overlapping_trans_conservative(const GIM_AABB &box, btTransform &trans1_to_0)\n\t{\n\t\tGIM_AABB tbox = box;\n\t\ttbox.appy_transform(trans1_to_0);\n\t\treturn has_collision(tbox);\n\t}\n\n\t//! transcache is the transformation cache from box to this AABB\n\tSIMD_FORCE_INLINE bool overlapping_trans_cache(\n\t\tconst GIM_AABB &box, const GIM_BOX_BOX_TRANSFORM_CACHE &transcache, bool fulltest)\n\t{\n\t\t//Taken from OPCODE\n\t\tbtVector3 ea, eb; //extends\n\t\tbtVector3 ca, cb; //extends\n\t\tget_center_extend(ca, ea);\n\t\tbox.get_center_extend(cb, eb);\n\n\t\tbtVector3 T;\n\t\tbtScalar t, t2;\n\t\tint i;\n\n\t\t// Class I : A's basis vectors\n\t\tfor (i = 0; i < 3; i++)\n\t\t{\n\t\t\tT[i] = transcache.m_R1to0[i].dot(cb) + transcache.m_T1to0[i] - ca[i];\n\t\t\tt = transcache.m_AR[i].dot(eb) + ea[i];\n\t\t\tif (GIM_GREATER(T[i], t)) return false;\n\t\t}\n\t\t// Class II : B's basis vectors\n\t\tfor (i = 0; i < 3; i++)\n\t\t{\n\t\t\tt = MAT_DOT_COL(transcache.m_R1to0, T, i);\n\t\t\tt2 = MAT_DOT_COL(transcache.m_AR, ea, i) + eb[i];\n\t\t\tif (GIM_GREATER(t, t2)) return false;\n\t\t}\n\t\t// Class III : 9 cross products\n\t\tif (fulltest)\n\t\t{\n\t\t\tint j, m, n, o, p, q, r;\n\t\t\tfor (i = 0; i < 3; i++)\n\t\t\t{\n\t\t\t\tm = (i + 1) % 3;\n\t\t\t\tn = (i + 2) % 3;\n\t\t\t\to = i == 0 ? 1 : 0;\n\t\t\t\tp = i == 2 ? 1 : 2;\n\t\t\t\tfor (j = 0; j < 3; j++)\n\t\t\t\t{\n\t\t\t\t\tq = j == 2 ? 1 : 2;\n\t\t\t\t\tr = j == 0 ? 1 : 0;\n\t\t\t\t\tt = T[n] * transcache.m_R1to0[m][j] - T[m] * transcache.m_R1to0[n][j];\n\t\t\t\t\tt2 = ea[o] * transcache.m_AR[p][j] + ea[p] * transcache.m_AR[o][j] +\n\t\t\t\t\t\t eb[r] * transcache.m_AR[i][q] + eb[q] * transcache.m_AR[i][r];\n\t\t\t\t\tif (GIM_GREATER(t, t2)) return false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}\n\n\t//! Simple test for planes.\n\tSIMD_FORCE_INLINE bool collide_plane(\n\t\tconst btVector4 &plane)\n\t{\n\t\tePLANE_INTERSECTION_TYPE classify = plane_classify(plane);\n\t\treturn (classify == G_COLLIDE_PLANE);\n\t}\n\n\t//! test for a triangle, with edges\n\tSIMD_FORCE_INLINE bool collide_triangle_exact(\n\t\tconst btVector3 &p1,\n\t\tconst btVector3 &p2,\n\t\tconst btVector3 &p3,\n\t\tconst btVector4 &triangle_plane)\n\t{\n\t\tif (!collide_plane(triangle_plane)) return false;\n\n\t\tbtVector3 center, extends;\n\t\tthis->get_center_extend(center, extends);\n\n\t\tconst btVector3 v1(p1 - center);\n\t\tconst btVector3 v2(p2 - center);\n\t\tconst btVector3 v3(p3 - center);\n\n\t\t//First axis\n\t\tbtVector3 diff(v2 - v1);\n\t\tbtVector3 abs_diff = diff.absolute();\n\t\t//Test With X axis\n\t\tTEST_CROSS_EDGE_BOX_X_AXIS_MCR(diff, abs_diff, v1, v3, extends);\n\t\t//Test With Y axis\n\t\tTEST_CROSS_EDGE_BOX_Y_AXIS_MCR(diff, abs_diff, v1, v3, extends);\n\t\t//Test With Z axis\n\t\tTEST_CROSS_EDGE_BOX_Z_AXIS_MCR(diff, abs_diff, v1, v3, extends);\n\n\t\tdiff = v3 - v2;\n\t\tabs_diff = diff.absolute();\n\t\t//Test With X axis\n\t\tTEST_CROSS_EDGE_BOX_X_AXIS_MCR(diff, abs_diff, v2, v1, extends);\n\t\t//Test With Y axis\n\t\tTEST_CROSS_EDGE_BOX_Y_AXIS_MCR(diff, abs_diff, v2, v1, extends);\n\t\t//Test With Z axis\n\t\tTEST_CROSS_EDGE_BOX_Z_AXIS_MCR(diff, abs_diff, v2, v1, extends);\n\n\t\tdiff = v1 - v3;\n\t\tabs_diff = diff.absolute();\n\t\t//Test With X axis\n\t\tTEST_CROSS_EDGE_BOX_X_AXIS_MCR(diff, abs_diff, v3, v2, extends);\n\t\t//Test With Y axis\n\t\tTEST_CROSS_EDGE_BOX_Y_AXIS_MCR(diff, abs_diff, v3, v2, extends);\n\t\t//Test With Z axis\n\t\tTEST_CROSS_EDGE_BOX_Z_AXIS_MCR(diff, abs_diff, v3, v2, extends);\n\n\t\treturn true;\n\t}\n};\n\n#ifndef BT_BOX_COLLISION_H_INCLUDED\n//! Compairison of transformation objects\nSIMD_FORCE_INLINE bool btCompareTransformsEqual(const btTransform &t1, const btTransform &t2)\n{\n\tif (!(t1.getOrigin() == t2.getOrigin())) return false;\n\n\tif (!(t1.getBasis().getRow(0) == t2.getBasis().getRow(0))) return false;\n\tif (!(t1.getBasis().getRow(1) == t2.getBasis().getRow(1))) return false;\n\tif (!(t1.getBasis().getRow(2) == t2.getBasis().getRow(2))) return false;\n\treturn true;\n}\n#endif\n\n#endif // GIM_BOX_COLLISION_H_INCLUDED\n"} +{"text": "<!DOCTYPE html>\n<html>\n<head>\n\t<meta charset=\"utf-8\">\n\t<link rel=\"shortcut icon\" type=\"image/ico\" href=\"http://www.datatables.net/favicon.ico\">\n\t<meta name=\"viewport\" content=\"initial-scale=1.0, maximum-scale=2.0\">\n\n\t<title>Responsive example - Column control - right</title>\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"../../../../media/css/jquery.dataTables.css\">\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"../../css/dataTables.responsive.css\">\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"../../../../examples/resources/syntax/shCore.css\">\n\t<link rel=\"stylesheet\" type=\"text/css\" href=\"../../../../examples/resources/demo.css\">\n\t<style type=\"text/css\" class=\"init\">\n\n\t</style>\n\t<script type=\"text/javascript\" language=\"javascript\" src=\"../../../../media/js/jquery.js\"></script>\n\t<script type=\"text/javascript\" language=\"javascript\" src=\"../../../../media/js/jquery.dataTables.js\"></script>\n\t<script type=\"text/javascript\" language=\"javascript\" src=\"../../js/dataTables.responsive.js\"></script>\n\t<script type=\"text/javascript\" language=\"javascript\" src=\"../../../../examples/resources/syntax/shCore.js\"></script>\n\t<script type=\"text/javascript\" language=\"javascript\" src=\"../../../../examples/resources/demo.js\"></script>\n\t<script type=\"text/javascript\" language=\"javascript\" class=\"init\">\n\n\n\n$(document).ready(function() {\n\t$('#example').DataTable( {\n\t\tresponsive: {\n\t\t\tdetails: {\n\t\t\t\ttype: 'column',\n\t\t\t\ttarget: -1\n\t\t\t}\n\t\t},\n\t\tcolumnDefs: [ {\n\t\t\tclassName: 'control',\n\t\t\torderable: false,\n\t\t\ttargets: -1\n\t\t} ]\n\t} );\n} );\n\n\n\n\t</script>\n</head>\n\n<body class=\"dt-example\">\n\t<div class=\"container\">\n\t\t<section>\n\t\t\t<h1>Responsive example <span>Column control - right</span></h1>\n\n\t\t\t<div class=\"info\">\n\t\t\t\t<p>When using the <code>column</code> child row control type, Responsive has the ability to use any column or element as the show / hide control for the row\n\t\t\t\tdetails. This is provided through the <a href=\"//datatables.net/extensions/responsive/reference/option/responsive.details.target\"><code class=\"option\" title=\n\t\t\t\t\"Responsive initialisation option\">responsive.details.target<span>R</span></code></a> option, which can be either a column index, or a jQuery selector.</p>\n\n\t\t\t\t<p>This example shows the last column in the table being used as the control column.</p>\n\t\t\t</div>\n\n\t\t\t<table id=\"example\" class=\"display nowrap\" cellspacing=\"0\" width=\"100%\">\n\t\t\t\t<thead>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>First name</th>\n\t\t\t\t\t\t<th>Last name</th>\n\t\t\t\t\t\t<th>Position</th>\n\t\t\t\t\t\t<th>Office</th>\n\t\t\t\t\t\t<th>Age</th>\n\t\t\t\t\t\t<th>Start date</th>\n\t\t\t\t\t\t<th>Salary</th>\n\t\t\t\t\t\t<th>Extn.</th>\n\t\t\t\t\t\t<th></th>\n\t\t\t\t\t</tr>\n\t\t\t\t</thead>\n\n\t\t\t\t<tfoot>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>First name</th>\n\t\t\t\t\t\t<th>Last name</th>\n\t\t\t\t\t\t<th>Position</th>\n\t\t\t\t\t\t<th>Office</th>\n\t\t\t\t\t\t<th>Age</th>\n\t\t\t\t\t\t<th>Start date</th>\n\t\t\t\t\t\t<th>Salary</th>\n\t\t\t\t\t\t<th>Extn.</th>\n\t\t\t\t\t\t<th></th>\n\t\t\t\t\t</tr>\n\t\t\t\t</tfoot>\n\n\t\t\t\t<tbody>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Tiger</td>\n\t\t\t\t\t\t<td>Nixon</td>\n\t\t\t\t\t\t<td>System Architect</td>\n\t\t\t\t\t\t<td>Edinburgh</td>\n\t\t\t\t\t\t<td>61</td>\n\t\t\t\t\t\t<td>2011/04/25</td>\n\t\t\t\t\t\t<td>$320,800</td>\n\t\t\t\t\t\t<td>5421</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Garrett</td>\n\t\t\t\t\t\t<td>Winters</td>\n\t\t\t\t\t\t<td>Accountant</td>\n\t\t\t\t\t\t<td>Tokyo</td>\n\t\t\t\t\t\t<td>63</td>\n\t\t\t\t\t\t<td>2011/07/25</td>\n\t\t\t\t\t\t<td>$170,750</td>\n\t\t\t\t\t\t<td>8422</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Ashton</td>\n\t\t\t\t\t\t<td>Cox</td>\n\t\t\t\t\t\t<td>Junior Technical Author</td>\n\t\t\t\t\t\t<td>San Francisco</td>\n\t\t\t\t\t\t<td>66</td>\n\t\t\t\t\t\t<td>2009/01/12</td>\n\t\t\t\t\t\t<td>$86,000</td>\n\t\t\t\t\t\t<td>1562</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Cedric</td>\n\t\t\t\t\t\t<td>Kelly</td>\n\t\t\t\t\t\t<td>Senior Javascript Developer</td>\n\t\t\t\t\t\t<td>Edinburgh</td>\n\t\t\t\t\t\t<td>22</td>\n\t\t\t\t\t\t<td>2012/03/29</td>\n\t\t\t\t\t\t<td>$433,060</td>\n\t\t\t\t\t\t<td>6224</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Airi</td>\n\t\t\t\t\t\t<td>Satou</td>\n\t\t\t\t\t\t<td>Accountant</td>\n\t\t\t\t\t\t<td>Tokyo</td>\n\t\t\t\t\t\t<td>33</td>\n\t\t\t\t\t\t<td>2008/11/28</td>\n\t\t\t\t\t\t<td>$162,700</td>\n\t\t\t\t\t\t<td>5407</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Brielle</td>\n\t\t\t\t\t\t<td>Williamson</td>\n\t\t\t\t\t\t<td>Integration Specialist</td>\n\t\t\t\t\t\t<td>New York</td>\n\t\t\t\t\t\t<td>61</td>\n\t\t\t\t\t\t<td>2012/12/02</td>\n\t\t\t\t\t\t<td>$372,000</td>\n\t\t\t\t\t\t<td>4804</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Herrod</td>\n\t\t\t\t\t\t<td>Chandler</td>\n\t\t\t\t\t\t<td>Sales Assistant</td>\n\t\t\t\t\t\t<td>San Francisco</td>\n\t\t\t\t\t\t<td>59</td>\n\t\t\t\t\t\t<td>2012/08/06</td>\n\t\t\t\t\t\t<td>$137,500</td>\n\t\t\t\t\t\t<td>9608</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Rhona</td>\n\t\t\t\t\t\t<td>Davidson</td>\n\t\t\t\t\t\t<td>Integration Specialist</td>\n\t\t\t\t\t\t<td>Tokyo</td>\n\t\t\t\t\t\t<td>55</td>\n\t\t\t\t\t\t<td>2010/10/14</td>\n\t\t\t\t\t\t<td>$327,900</td>\n\t\t\t\t\t\t<td>6200</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Colleen</td>\n\t\t\t\t\t\t<td>Hurst</td>\n\t\t\t\t\t\t<td>Javascript Developer</td>\n\t\t\t\t\t\t<td>San Francisco</td>\n\t\t\t\t\t\t<td>39</td>\n\t\t\t\t\t\t<td>2009/09/15</td>\n\t\t\t\t\t\t<td>$205,500</td>\n\t\t\t\t\t\t<td>2360</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Sonya</td>\n\t\t\t\t\t\t<td>Frost</td>\n\t\t\t\t\t\t<td>Software Engineer</td>\n\t\t\t\t\t\t<td>Edinburgh</td>\n\t\t\t\t\t\t<td>23</td>\n\t\t\t\t\t\t<td>2008/12/13</td>\n\t\t\t\t\t\t<td>$103,600</td>\n\t\t\t\t\t\t<td>1667</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Jena</td>\n\t\t\t\t\t\t<td>Gaines</td>\n\t\t\t\t\t\t<td>Office Manager</td>\n\t\t\t\t\t\t<td>London</td>\n\t\t\t\t\t\t<td>30</td>\n\t\t\t\t\t\t<td>2008/12/19</td>\n\t\t\t\t\t\t<td>$90,560</td>\n\t\t\t\t\t\t<td>3814</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Quinn</td>\n\t\t\t\t\t\t<td>Flynn</td>\n\t\t\t\t\t\t<td>Support Lead</td>\n\t\t\t\t\t\t<td>Edinburgh</td>\n\t\t\t\t\t\t<td>22</td>\n\t\t\t\t\t\t<td>2013/03/03</td>\n\t\t\t\t\t\t<td>$342,000</td>\n\t\t\t\t\t\t<td>9497</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Charde</td>\n\t\t\t\t\t\t<td>Marshall</td>\n\t\t\t\t\t\t<td>Regional Director</td>\n\t\t\t\t\t\t<td>San Francisco</td>\n\t\t\t\t\t\t<td>36</td>\n\t\t\t\t\t\t<td>2008/10/16</td>\n\t\t\t\t\t\t<td>$470,600</td>\n\t\t\t\t\t\t<td>6741</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Haley</td>\n\t\t\t\t\t\t<td>Kennedy</td>\n\t\t\t\t\t\t<td>Senior Marketing Designer</td>\n\t\t\t\t\t\t<td>London</td>\n\t\t\t\t\t\t<td>43</td>\n\t\t\t\t\t\t<td>2012/12/18</td>\n\t\t\t\t\t\t<td>$313,500</td>\n\t\t\t\t\t\t<td>3597</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Tatyana</td>\n\t\t\t\t\t\t<td>Fitzpatrick</td>\n\t\t\t\t\t\t<td>Regional Director</td>\n\t\t\t\t\t\t<td>London</td>\n\t\t\t\t\t\t<td>19</td>\n\t\t\t\t\t\t<td>2010/03/17</td>\n\t\t\t\t\t\t<td>$385,750</td>\n\t\t\t\t\t\t<td>1965</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Michael</td>\n\t\t\t\t\t\t<td>Silva</td>\n\t\t\t\t\t\t<td>Marketing Designer</td>\n\t\t\t\t\t\t<td>London</td>\n\t\t\t\t\t\t<td>66</td>\n\t\t\t\t\t\t<td>2012/11/27</td>\n\t\t\t\t\t\t<td>$198,500</td>\n\t\t\t\t\t\t<td>1581</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Paul</td>\n\t\t\t\t\t\t<td>Byrd</td>\n\t\t\t\t\t\t<td>Chief Financial Officer (CFO)</td>\n\t\t\t\t\t\t<td>New York</td>\n\t\t\t\t\t\t<td>64</td>\n\t\t\t\t\t\t<td>2010/06/09</td>\n\t\t\t\t\t\t<td>$725,000</td>\n\t\t\t\t\t\t<td>3059</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Gloria</td>\n\t\t\t\t\t\t<td>Little</td>\n\t\t\t\t\t\t<td>Systems Administrator</td>\n\t\t\t\t\t\t<td>New York</td>\n\t\t\t\t\t\t<td>59</td>\n\t\t\t\t\t\t<td>2009/04/10</td>\n\t\t\t\t\t\t<td>$237,500</td>\n\t\t\t\t\t\t<td>1721</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Bradley</td>\n\t\t\t\t\t\t<td>Greer</td>\n\t\t\t\t\t\t<td>Software Engineer</td>\n\t\t\t\t\t\t<td>London</td>\n\t\t\t\t\t\t<td>41</td>\n\t\t\t\t\t\t<td>2012/10/13</td>\n\t\t\t\t\t\t<td>$132,000</td>\n\t\t\t\t\t\t<td>2558</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Dai</td>\n\t\t\t\t\t\t<td>Rios</td>\n\t\t\t\t\t\t<td>Personnel Lead</td>\n\t\t\t\t\t\t<td>Edinburgh</td>\n\t\t\t\t\t\t<td>35</td>\n\t\t\t\t\t\t<td>2012/09/26</td>\n\t\t\t\t\t\t<td>$217,500</td>\n\t\t\t\t\t\t<td>2290</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Jenette</td>\n\t\t\t\t\t\t<td>Caldwell</td>\n\t\t\t\t\t\t<td>Development Lead</td>\n\t\t\t\t\t\t<td>New York</td>\n\t\t\t\t\t\t<td>30</td>\n\t\t\t\t\t\t<td>2011/09/03</td>\n\t\t\t\t\t\t<td>$345,000</td>\n\t\t\t\t\t\t<td>1937</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Yuri</td>\n\t\t\t\t\t\t<td>Berry</td>\n\t\t\t\t\t\t<td>Chief Marketing Officer (CMO)</td>\n\t\t\t\t\t\t<td>New York</td>\n\t\t\t\t\t\t<td>40</td>\n\t\t\t\t\t\t<td>2009/06/25</td>\n\t\t\t\t\t\t<td>$675,000</td>\n\t\t\t\t\t\t<td>6154</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Caesar</td>\n\t\t\t\t\t\t<td>Vance</td>\n\t\t\t\t\t\t<td>Pre-Sales Support</td>\n\t\t\t\t\t\t<td>New York</td>\n\t\t\t\t\t\t<td>21</td>\n\t\t\t\t\t\t<td>2011/12/12</td>\n\t\t\t\t\t\t<td>$106,450</td>\n\t\t\t\t\t\t<td>8330</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Doris</td>\n\t\t\t\t\t\t<td>Wilder</td>\n\t\t\t\t\t\t<td>Sales Assistant</td>\n\t\t\t\t\t\t<td>Sidney</td>\n\t\t\t\t\t\t<td>23</td>\n\t\t\t\t\t\t<td>2010/09/20</td>\n\t\t\t\t\t\t<td>$85,600</td>\n\t\t\t\t\t\t<td>3023</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Angelica</td>\n\t\t\t\t\t\t<td>Ramos</td>\n\t\t\t\t\t\t<td>Chief Executive Officer (CEO)</td>\n\t\t\t\t\t\t<td>London</td>\n\t\t\t\t\t\t<td>47</td>\n\t\t\t\t\t\t<td>2009/10/09</td>\n\t\t\t\t\t\t<td>$1,200,000</td>\n\t\t\t\t\t\t<td>5797</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Gavin</td>\n\t\t\t\t\t\t<td>Joyce</td>\n\t\t\t\t\t\t<td>Developer</td>\n\t\t\t\t\t\t<td>Edinburgh</td>\n\t\t\t\t\t\t<td>42</td>\n\t\t\t\t\t\t<td>2010/12/22</td>\n\t\t\t\t\t\t<td>$92,575</td>\n\t\t\t\t\t\t<td>8822</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Jennifer</td>\n\t\t\t\t\t\t<td>Chang</td>\n\t\t\t\t\t\t<td>Regional Director</td>\n\t\t\t\t\t\t<td>Singapore</td>\n\t\t\t\t\t\t<td>28</td>\n\t\t\t\t\t\t<td>2010/11/14</td>\n\t\t\t\t\t\t<td>$357,650</td>\n\t\t\t\t\t\t<td>9239</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Brenden</td>\n\t\t\t\t\t\t<td>Wagner</td>\n\t\t\t\t\t\t<td>Software Engineer</td>\n\t\t\t\t\t\t<td>San Francisco</td>\n\t\t\t\t\t\t<td>28</td>\n\t\t\t\t\t\t<td>2011/06/07</td>\n\t\t\t\t\t\t<td>$206,850</td>\n\t\t\t\t\t\t<td>1314</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Fiona</td>\n\t\t\t\t\t\t<td>Green</td>\n\t\t\t\t\t\t<td>Chief Operating Officer (COO)</td>\n\t\t\t\t\t\t<td>San Francisco</td>\n\t\t\t\t\t\t<td>48</td>\n\t\t\t\t\t\t<td>2010/03/11</td>\n\t\t\t\t\t\t<td>$850,000</td>\n\t\t\t\t\t\t<td>2947</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Shou</td>\n\t\t\t\t\t\t<td>Itou</td>\n\t\t\t\t\t\t<td>Regional Marketing</td>\n\t\t\t\t\t\t<td>Tokyo</td>\n\t\t\t\t\t\t<td>20</td>\n\t\t\t\t\t\t<td>2011/08/14</td>\n\t\t\t\t\t\t<td>$163,000</td>\n\t\t\t\t\t\t<td>8899</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Michelle</td>\n\t\t\t\t\t\t<td>House</td>\n\t\t\t\t\t\t<td>Integration Specialist</td>\n\t\t\t\t\t\t<td>Sidney</td>\n\t\t\t\t\t\t<td>37</td>\n\t\t\t\t\t\t<td>2011/06/02</td>\n\t\t\t\t\t\t<td>$95,400</td>\n\t\t\t\t\t\t<td>2769</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Suki</td>\n\t\t\t\t\t\t<td>Burks</td>\n\t\t\t\t\t\t<td>Developer</td>\n\t\t\t\t\t\t<td>London</td>\n\t\t\t\t\t\t<td>53</td>\n\t\t\t\t\t\t<td>2009/10/22</td>\n\t\t\t\t\t\t<td>$114,500</td>\n\t\t\t\t\t\t<td>6832</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Prescott</td>\n\t\t\t\t\t\t<td>Bartlett</td>\n\t\t\t\t\t\t<td>Technical Author</td>\n\t\t\t\t\t\t<td>London</td>\n\t\t\t\t\t\t<td>27</td>\n\t\t\t\t\t\t<td>2011/05/07</td>\n\t\t\t\t\t\t<td>$145,000</td>\n\t\t\t\t\t\t<td>3606</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Gavin</td>\n\t\t\t\t\t\t<td>Cortez</td>\n\t\t\t\t\t\t<td>Team Leader</td>\n\t\t\t\t\t\t<td>San Francisco</td>\n\t\t\t\t\t\t<td>22</td>\n\t\t\t\t\t\t<td>2008/10/26</td>\n\t\t\t\t\t\t<td>$235,500</td>\n\t\t\t\t\t\t<td>2860</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Martena</td>\n\t\t\t\t\t\t<td>Mccray</td>\n\t\t\t\t\t\t<td>Post-Sales support</td>\n\t\t\t\t\t\t<td>Edinburgh</td>\n\t\t\t\t\t\t<td>46</td>\n\t\t\t\t\t\t<td>2011/03/09</td>\n\t\t\t\t\t\t<td>$324,050</td>\n\t\t\t\t\t\t<td>8240</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Unity</td>\n\t\t\t\t\t\t<td>Butler</td>\n\t\t\t\t\t\t<td>Marketing Designer</td>\n\t\t\t\t\t\t<td>San Francisco</td>\n\t\t\t\t\t\t<td>47</td>\n\t\t\t\t\t\t<td>2009/12/09</td>\n\t\t\t\t\t\t<td>$85,675</td>\n\t\t\t\t\t\t<td>5384</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Howard</td>\n\t\t\t\t\t\t<td>Hatfield</td>\n\t\t\t\t\t\t<td>Office Manager</td>\n\t\t\t\t\t\t<td>San Francisco</td>\n\t\t\t\t\t\t<td>51</td>\n\t\t\t\t\t\t<td>2008/12/16</td>\n\t\t\t\t\t\t<td>$164,500</td>\n\t\t\t\t\t\t<td>7031</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Hope</td>\n\t\t\t\t\t\t<td>Fuentes</td>\n\t\t\t\t\t\t<td>Secretary</td>\n\t\t\t\t\t\t<td>San Francisco</td>\n\t\t\t\t\t\t<td>41</td>\n\t\t\t\t\t\t<td>2010/02/12</td>\n\t\t\t\t\t\t<td>$109,850</td>\n\t\t\t\t\t\t<td>6318</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Vivian</td>\n\t\t\t\t\t\t<td>Harrell</td>\n\t\t\t\t\t\t<td>Financial Controller</td>\n\t\t\t\t\t\t<td>San Francisco</td>\n\t\t\t\t\t\t<td>62</td>\n\t\t\t\t\t\t<td>2009/02/14</td>\n\t\t\t\t\t\t<td>$452,500</td>\n\t\t\t\t\t\t<td>9422</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Timothy</td>\n\t\t\t\t\t\t<td>Mooney</td>\n\t\t\t\t\t\t<td>Office Manager</td>\n\t\t\t\t\t\t<td>London</td>\n\t\t\t\t\t\t<td>37</td>\n\t\t\t\t\t\t<td>2008/12/11</td>\n\t\t\t\t\t\t<td>$136,200</td>\n\t\t\t\t\t\t<td>7580</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Jackson</td>\n\t\t\t\t\t\t<td>Bradshaw</td>\n\t\t\t\t\t\t<td>Director</td>\n\t\t\t\t\t\t<td>New York</td>\n\t\t\t\t\t\t<td>65</td>\n\t\t\t\t\t\t<td>2008/09/26</td>\n\t\t\t\t\t\t<td>$645,750</td>\n\t\t\t\t\t\t<td>1042</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Olivia</td>\n\t\t\t\t\t\t<td>Liang</td>\n\t\t\t\t\t\t<td>Support Engineer</td>\n\t\t\t\t\t\t<td>Singapore</td>\n\t\t\t\t\t\t<td>64</td>\n\t\t\t\t\t\t<td>2011/02/03</td>\n\t\t\t\t\t\t<td>$234,500</td>\n\t\t\t\t\t\t<td>2120</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Bruno</td>\n\t\t\t\t\t\t<td>Nash</td>\n\t\t\t\t\t\t<td>Software Engineer</td>\n\t\t\t\t\t\t<td>London</td>\n\t\t\t\t\t\t<td>38</td>\n\t\t\t\t\t\t<td>2011/05/03</td>\n\t\t\t\t\t\t<td>$163,500</td>\n\t\t\t\t\t\t<td>6222</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Sakura</td>\n\t\t\t\t\t\t<td>Yamamoto</td>\n\t\t\t\t\t\t<td>Support Engineer</td>\n\t\t\t\t\t\t<td>Tokyo</td>\n\t\t\t\t\t\t<td>37</td>\n\t\t\t\t\t\t<td>2009/08/19</td>\n\t\t\t\t\t\t<td>$139,575</td>\n\t\t\t\t\t\t<td>9383</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Thor</td>\n\t\t\t\t\t\t<td>Walton</td>\n\t\t\t\t\t\t<td>Developer</td>\n\t\t\t\t\t\t<td>New York</td>\n\t\t\t\t\t\t<td>61</td>\n\t\t\t\t\t\t<td>2013/08/11</td>\n\t\t\t\t\t\t<td>$98,540</td>\n\t\t\t\t\t\t<td>8327</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Finn</td>\n\t\t\t\t\t\t<td>Camacho</td>\n\t\t\t\t\t\t<td>Support Engineer</td>\n\t\t\t\t\t\t<td>San Francisco</td>\n\t\t\t\t\t\t<td>47</td>\n\t\t\t\t\t\t<td>2009/07/07</td>\n\t\t\t\t\t\t<td>$87,500</td>\n\t\t\t\t\t\t<td>2927</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Serge</td>\n\t\t\t\t\t\t<td>Baldwin</td>\n\t\t\t\t\t\t<td>Data Coordinator</td>\n\t\t\t\t\t\t<td>Singapore</td>\n\t\t\t\t\t\t<td>64</td>\n\t\t\t\t\t\t<td>2012/04/09</td>\n\t\t\t\t\t\t<td>$138,575</td>\n\t\t\t\t\t\t<td>8352</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Zenaida</td>\n\t\t\t\t\t\t<td>Frank</td>\n\t\t\t\t\t\t<td>Software Engineer</td>\n\t\t\t\t\t\t<td>New York</td>\n\t\t\t\t\t\t<td>63</td>\n\t\t\t\t\t\t<td>2010/01/04</td>\n\t\t\t\t\t\t<td>$125,250</td>\n\t\t\t\t\t\t<td>7439</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Zorita</td>\n\t\t\t\t\t\t<td>Serrano</td>\n\t\t\t\t\t\t<td>Software Engineer</td>\n\t\t\t\t\t\t<td>San Francisco</td>\n\t\t\t\t\t\t<td>56</td>\n\t\t\t\t\t\t<td>2012/06/01</td>\n\t\t\t\t\t\t<td>$115,000</td>\n\t\t\t\t\t\t<td>4389</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Jennifer</td>\n\t\t\t\t\t\t<td>Acosta</td>\n\t\t\t\t\t\t<td>Junior Javascript Developer</td>\n\t\t\t\t\t\t<td>Edinburgh</td>\n\t\t\t\t\t\t<td>43</td>\n\t\t\t\t\t\t<td>2013/02/01</td>\n\t\t\t\t\t\t<td>$75,650</td>\n\t\t\t\t\t\t<td>3431</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Cara</td>\n\t\t\t\t\t\t<td>Stevens</td>\n\t\t\t\t\t\t<td>Sales Assistant</td>\n\t\t\t\t\t\t<td>New York</td>\n\t\t\t\t\t\t<td>46</td>\n\t\t\t\t\t\t<td>2011/12/06</td>\n\t\t\t\t\t\t<td>$145,600</td>\n\t\t\t\t\t\t<td>3990</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Hermione</td>\n\t\t\t\t\t\t<td>Butler</td>\n\t\t\t\t\t\t<td>Regional Director</td>\n\t\t\t\t\t\t<td>London</td>\n\t\t\t\t\t\t<td>47</td>\n\t\t\t\t\t\t<td>2011/03/21</td>\n\t\t\t\t\t\t<td>$356,250</td>\n\t\t\t\t\t\t<td>1016</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Lael</td>\n\t\t\t\t\t\t<td>Greer</td>\n\t\t\t\t\t\t<td>Systems Administrator</td>\n\t\t\t\t\t\t<td>London</td>\n\t\t\t\t\t\t<td>21</td>\n\t\t\t\t\t\t<td>2009/02/27</td>\n\t\t\t\t\t\t<td>$103,500</td>\n\t\t\t\t\t\t<td>6733</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Jonas</td>\n\t\t\t\t\t\t<td>Alexander</td>\n\t\t\t\t\t\t<td>Developer</td>\n\t\t\t\t\t\t<td>San Francisco</td>\n\t\t\t\t\t\t<td>30</td>\n\t\t\t\t\t\t<td>2010/07/14</td>\n\t\t\t\t\t\t<td>$86,500</td>\n\t\t\t\t\t\t<td>8196</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Shad</td>\n\t\t\t\t\t\t<td>Decker</td>\n\t\t\t\t\t\t<td>Regional Director</td>\n\t\t\t\t\t\t<td>Edinburgh</td>\n\t\t\t\t\t\t<td>51</td>\n\t\t\t\t\t\t<td>2008/11/13</td>\n\t\t\t\t\t\t<td>$183,000</td>\n\t\t\t\t\t\t<td>6373</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Michael</td>\n\t\t\t\t\t\t<td>Bruce</td>\n\t\t\t\t\t\t<td>Javascript Developer</td>\n\t\t\t\t\t\t<td>Singapore</td>\n\t\t\t\t\t\t<td>29</td>\n\t\t\t\t\t\t<td>2011/06/27</td>\n\t\t\t\t\t\t<td>$183,000</td>\n\t\t\t\t\t\t<td>5384</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>Donna</td>\n\t\t\t\t\t\t<td>Snider</td>\n\t\t\t\t\t\t<td>Customer Support</td>\n\t\t\t\t\t\t<td>New York</td>\n\t\t\t\t\t\t<td>27</td>\n\t\t\t\t\t\t<td>2011/01/25</td>\n\t\t\t\t\t\t<td>$112,000</td>\n\t\t\t\t\t\t<td>4226</td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\n\t\t\t<ul class=\"tabs\">\n\t\t\t\t<li class=\"active\">Javascript</li>\n\t\t\t\t<li>HTML</li>\n\t\t\t\t<li>CSS</li>\n\t\t\t\t<li>Ajax</li>\n\t\t\t\t<li>Server-side script</li>\n\t\t\t</ul>\n\n\t\t\t<div class=\"tabs\">\n\t\t\t\t<div class=\"js\">\n\t\t\t\t\t<p>The Javascript shown below is used to initialise the table shown in this example:</p><code class=\"multiline language-js\">$(document).ready(function() {\n\t$('#example').DataTable( {\n\t\tresponsive: {\n\t\t\tdetails: {\n\t\t\t\ttype: 'column',\n\t\t\t\ttarget: -1\n\t\t\t}\n\t\t},\n\t\tcolumnDefs: [ {\n\t\t\tclassName: 'control',\n\t\t\torderable: false,\n\t\t\ttargets: -1\n\t\t} ]\n\t} );\n} );</code>\n\n\t\t\t\t\t<p>In addition to the above code, the following Javascript library files are loaded for use in this example:</p>\n\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li><a href=\"../../../../media/js/jquery.js\">../../../../media/js/jquery.js</a></li>\n\t\t\t\t\t\t<li><a href=\"../../../../media/js/jquery.dataTables.js\">../../../../media/js/jquery.dataTables.js</a></li>\n\t\t\t\t\t\t<li><a href=\"../../js/dataTables.responsive.js\">../../js/dataTables.responsive.js</a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"table\">\n\t\t\t\t\t<p>The HTML shown below is the raw HTML table element, before it has been enhanced by DataTables:</p>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"css\">\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<p>This example uses a little bit of additional CSS beyond what is loaded from the library files (below), in order to correctly display the table. The\n\t\t\t\t\t\tadditional CSS used is shown below:</p><code class=\"multiline language-css\"></code>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<p>The following CSS library files are loaded for use in this example to provide the styling of the table:</p>\n\n\t\t\t\t\t<ul>\n\t\t\t\t\t\t<li><a href=\"../../../../media/css/jquery.dataTables.css\">../../../../media/css/jquery.dataTables.css</a></li>\n\t\t\t\t\t\t<li><a href=\"../../css/dataTables.responsive.css\">../../css/dataTables.responsive.css</a></li>\n\t\t\t\t\t</ul>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"ajax\">\n\t\t\t\t\t<p>This table loads data by Ajax. The latest data that has been loaded is shown below. This data will update automatically as any additional data is\n\t\t\t\t\tloaded.</p>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"php\">\n\t\t\t\t\t<p>The script used to perform the server-side processing for this table is shown below. Please note that this is just an example script using PHP. Server-side\n\t\t\t\t\tprocessing scripts can be written in any language, using <a href=\"//datatables.net/manual/server-side\">the protocol described in the DataTables\n\t\t\t\t\tdocumentation</a>.</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</section>\n\t</div>\n\n\t<section>\n\t\t<div class=\"footer\">\n\t\t\t<div class=\"gradient\"></div>\n\n\t\t\t<div class=\"liner\">\n\t\t\t\t<h2>Other examples</h2>\n\n\t\t\t\t<div class=\"toc\">\n\t\t\t\t\t<div class=\"toc-group\">\n\t\t\t\t\t\t<h3><a href=\"../initialisation/index.html\">Basic initialisation</a></h3>\n\t\t\t\t\t\t<ul class=\"toc\">\n\t\t\t\t\t\t\t<li><a href=\"../initialisation/className.html\">Class name</a></li>\n\t\t\t\t\t\t\t<li><a href=\"../initialisation/option.html\">Configuration option</a></li>\n\t\t\t\t\t\t\t<li><a href=\"../initialisation/new.html\">`new` constructor</a></li>\n\t\t\t\t\t\t\t<li><a href=\"../initialisation/ajax.html\">Ajax data</a></li>\n\t\t\t\t\t\t\t<li><a href=\"../initialisation/default.html\">Default initialisation</a></li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"toc-group\">\n\t\t\t\t\t\t<h3><a href=\"../styling/index.html\">Styling</a></h3>\n\t\t\t\t\t\t<ul class=\"toc\">\n\t\t\t\t\t\t\t<li><a href=\"../styling/bootstrap.html\">Bootstrap styling</a></li>\n\t\t\t\t\t\t\t<li><a href=\"../styling/foundation.html\">Foundation styling</a></li>\n\t\t\t\t\t\t\t<li><a href=\"../styling/scrolling.html\">Vertical scrolling</a></li>\n\t\t\t\t\t\t\t<li><a href=\"../styling/compact.html\">Compact styling</a></li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"toc-group\">\n\t\t\t\t\t\t<h3><a href=\"../display-control/index.html\">Display control</a></h3>\n\t\t\t\t\t\t<ul class=\"toc\">\n\t\t\t\t\t\t\t<li><a href=\"../display-control/auto.html\">Automatic column hiding</a></li>\n\t\t\t\t\t\t\t<li><a href=\"../display-control/classes.html\">Class control</a></li>\n\t\t\t\t\t\t\t<li><a href=\"../display-control/init-classes.html\">Assigned class control</a></li>\n\t\t\t\t\t\t\t<li><a href=\"../display-control/fixedHeader.html\">With FixedHeader</a></li>\n\t\t\t\t\t\t\t<li><a href=\"../display-control/complexHeader.html\">Complex headers (rowspan / colspan)</a></li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"toc-group\">\n\t\t\t\t\t\t<h3><a href=\"./index.html\">Child rows</a></h3>\n\t\t\t\t\t\t<ul class=\"toc active\">\n\t\t\t\t\t\t\t<li><a href=\"./disable-child-rows.html\">Disable child rows</a></li>\n\t\t\t\t\t\t\t<li><a href=\"./column-control.html\">Column controlled child rows</a></li>\n\t\t\t\t\t\t\t<li class=\"active\"><a href=\"./right-column.html\">Column control - right</a></li>\n\t\t\t\t\t\t\t<li><a href=\"./whole-row-control.html\">Whole row child row control</a></li>\n\t\t\t\t\t\t\t<li><a href=\"./custom-renderer.html\">Custom child row renderer</a></li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\n\t\t\t\t<div class=\"epilogue\">\n\t\t\t\t\t<p>Please refer to the <a href=\"http://www.datatables.net\">DataTables documentation</a> for full information about its API properties and methods.<br>\n\t\t\t\t\tAdditionally, there are a wide range of <a href=\"http://www.datatables.net/extras\">extras</a> and <a href=\"http://www.datatables.net/plug-ins\">plug-ins</a>\n\t\t\t\t\twhich extend the capabilities of DataTables.</p>\n\n\t\t\t\t\t<p class=\"copyright\">DataTables designed and created by <a href=\"http://www.sprymedia.co.uk\">SpryMedia Ltd</a> &#169; 2007-2015<br>\n\t\t\t\t\tDataTables is licensed under the <a href=\"http://www.datatables.net/mit\">MIT license</a>.</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</section>\n</body>\n</html>"} +{"text": "<menu xmlns:android=\"http://schemas.android.com/apk/res/android\" >\n\n <item\n android:id=\"@+id/action_settings\"\n android:orderInCategory=\"100\"\n android:showAsAction=\"never\"\n android:title=\"@string/action_settings\"/>\n\n</menu>\n"} +{"text": "/**\n * @author: Alec Fenichel\n * @webSite: https://fenichelar.com\n * @update: zhixin wen <wenzhixin2010@gmail.com>\n */\n\nconst Utils = $.fn.bootstrapTable.utils\n\n$.extend($.fn.bootstrapTable.defaults, {\n autoRefresh: false,\n autoRefreshInterval: 60,\n autoRefreshSilent: true,\n autoRefreshStatus: true,\n autoRefreshFunction: null\n})\n\n$.extend($.fn.bootstrapTable.defaults.icons, {\n autoRefresh: {\n bootstrap3: 'glyphicon-time icon-time',\n materialize: 'access_time',\n 'bootstrap-table': 'icon-clock'\n }[$.fn.bootstrapTable.theme] || 'fa-clock'\n})\n\n$.extend($.fn.bootstrapTable.locales, {\n formatAutoRefresh () {\n return 'Auto Refresh'\n }\n})\n\n$.extend($.fn.bootstrapTable.defaults, $.fn.bootstrapTable.locales)\n\n$.BootstrapTable = class extends $.BootstrapTable {\n init (...args) {\n super.init(...args)\n\n if (this.options.autoRefresh && this.options.autoRefreshStatus) {\n this.options.autoRefreshFunction = setInterval(() => {\n this.refresh({ silent: this.options.autoRefreshSilent })\n }, this.options.autoRefreshInterval * 1000)\n }\n }\n\n initToolbar (...args) {\n if (this.options.autoRefresh) {\n this.buttons = Object.assign(this.buttons, {\n autoRefresh: {\n html: `\n <button class=\"auto-refresh ${this.constants.buttonsClass}\n ${this.options.autoRefreshStatus ? ` ${this.constants.classes.buttonActive}` : ''}\"\n type=\"button\" name=\"autoRefresh\" title=\"${this.options.formatAutoRefresh()}\">\n ${ this.options.showButtonIcons ? Utils.sprintf(this.constants.html.icon, this.options.iconsPrefix, this.options.icons.autoRefresh) : ''}\n ${ this.options.showButtonText ? this.options.formatAutoRefresh() : ''}\n </button>\n `,\n event: this.toggleAutoRefresh\n }\n })\n }\n\n super.initToolbar(...args)\n }\n\n toggleAutoRefresh () {\n if (this.options.autoRefresh) {\n if (this.options.autoRefreshStatus) {\n clearInterval(this.options.autoRefreshFunction)\n this.$toolbar.find('>.columns .auto-refresh')\n .removeClass(this.constants.classes.buttonActive)\n } else {\n this.options.autoRefreshFunction = setInterval(() => {\n this.refresh({ silent: this.options.autoRefreshSilent })\n }, this.options.autoRefreshInterval * 1000)\n this.$toolbar.find('>.columns .auto-refresh')\n .addClass(this.constants.classes.buttonActive)\n }\n this.options.autoRefreshStatus = !this.options.autoRefreshStatus\n }\n }\n}\n"} +{"text": "the thirteenth floor is a bland , obligatory exercise in genre film-making . \nif i hadn't recently watched the matrix and open your eyes -- both of which are similar but far superior -- i might have been a little nicer to this picture . \ncraig bierko makes an adequate hero as douglas hall , the rich co-creator of a perfect human world simulation who is suddenly blamed for the murder of his boss ( armin mueller-stahl ) . \neverything that was subtle and smart about the previously mentioned films is battered over our heads in this one , and characters stare at each other for maddeningly-long periods of time and refuse to communicate on any realistic level . \nthe acting is okay , but the film suffers from every logical flaw one could think of , and features a script ( co-penned by director josef rusnak ) loaded with cliches and stock characters . \nthere are individual scenes and ideas that work -- i like the thought of a sentient computer program -- but none of the film's strengths are recognized to any meaningful degree . \nproducer roland emmerich , based on this and his previous directorial efforts , seems hell-bent on bringing us the ultimate standard in mediocre science-fiction . \n"} +{"text": "using System.Reflection;\r\nusing System.Resources;\r\nusing System.Runtime.CompilerServices;\r\nusing System.Runtime.InteropServices;\r\nusing System.Windows;\r\n\r\n// General Information about an assembly is controlled through the following \r\n// set of attributes. Change these attribute values to modify the information\r\n// associated with an assembly.\r\n[assembly: AssemblyTitle(\"Text Rendering Sample\")]\r\n[assembly: AssemblyDescription(\"Text Rendering Sample for SharpGL\")]\r\n[assembly: AssemblyConfiguration(\"\")]\r\n[assembly: AssemblyTrademark(\"\")]\r\n[assembly: AssemblyCulture(\"\")]\r\n\r\n// Setting ComVisible to false makes the types in this assembly not visible \r\n// to COM components. If you need to access a type in this assembly from \r\n// COM, set the ComVisible attribute to true on that type.\r\n[assembly: ComVisible(false)]\r\n\r\n//In order to begin building localizable applications, set \r\n//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file\r\n//inside a <PropertyGroup>. For example, if you are using US english\r\n//in your source files, set the <UICulture> to en-US. Then uncomment\r\n//the NeutralResourceLanguage attribute below. Update the \"en-US\" in\r\n//the line below to match the UICulture setting in the project file.\r\n\r\n//[assembly: NeutralResourcesLanguage(\"en-US\", UltimateResourceFallbackLocation.Satellite)]\r\n\r\n\r\n[assembly: ThemeInfo(\r\n ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located\r\n //(used if a resource is not found in the page, \r\n // or application resource dictionaries)\r\n ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located\r\n //(used if a resource is not found in the page, \r\n // app, or any theme specific resource dictionaries)\r\n)]"} +{"text": "// license:BSD-3-Clause\n// copyright-holders:Peter Trauner,Antoine Mine\n/*****************************************************************************\n *\n * saturnds.c\n * portable saturn emulator interface\n * (hp calculators)\n *\n *****************************************************************************/\n\n#include \"emu.h\"\n#include \"saturnds.h\"\n\n#define P \"P\"\n#define WP \"WP\"\n#define XS \"XS\"\n#define X \"X\"\n#define S \"S\"\n#define M \"M\"\n#define B \"B\"\n#define W \"W\"\n#define A \"A\"\n\nconst char *const saturn_disassembler::adr_b[]=\n{ P, WP, XS, X, S, M, B, W };\n\nconst char *const saturn_disassembler::adr_af[]=\n{ P, WP, XS, X, S, M, B, W, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, A };\n\nconst char *const saturn_disassembler::adr_a[]=\n\t{ P, WP, XS, X, S, M, B, W };\n\nconst char saturn_disassembler::number_2_hex[]=\n{ '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' };\n\n#define SATURN_PEEKOP_DIS8(v) v = (int8_t)( opcodes.r8(pos) | ( opcodes.r8(pos+1) << 4 ) ); pos+= 2;\n\n#define SATURN_PEEKOP_DIS12(v) v = opcodes.r8(pos) | ( opcodes.r8(pos+1) << 4 ) | ( opcodes.r8(pos+2) << 8 ); \\\n\t\t\t\t\t\t\t\tpos += 3; \\\n\t\t\t\t\t\t\t\tif ( v & 0x0800 ) v = -0x1000 + v;\n\n#define SATURN_PEEKOP_DIS16(v) v = (int16_t)( opcodes.r8(pos) | ( opcodes.r8(pos+1) << 4 ) | ( opcodes.r8(pos+2) << 8 ) | ( opcodes.r8(pos+3) << 12 ) ); pos += 4;\n\n#define SATURN_PEEKOP_ADR(v) v = opcodes.r8(pos) | ( opcodes.r8(pos+1) << 4 ) | ( opcodes.r8(pos+2) << 8 ) | ( opcodes.r8(pos+3) << 12 ) | ( opcodes.r8(pos+4) << 16 ); pos += 5;\n\n\nconst char *const saturn_disassembler::mnemonics[][2] = {\n\t{ \"rtn\", \"RET\" },\n\t{ \"rtnsXM\", \"RETSETXM\" },\n\t{ \"rtnsC\", \"RETSETC\" },\n\t{ \"rtncC\", \"RETCLRC\" },\n\t{ \"rti\", \"RETI\" },\n\t{ \"goto %05x\", \"JUMP.3 %05x\" },\n\t{ \"goto %05x\", \"JUMP.4 %05x\" },\n\t{ \"goto %05x\", \"JUMP %05x\" },\n\t{ \"gosub %05x\", \"CALL.3 %05x\" },\n\t{ \"gosub %05x\", \"CALL.4 %05x\" },\n\t{ \"gosub %05x\", \"CALL %05x\" },\n\t{ \"goC %05x\", \"BRCS %05x\" },\n\t{ \"rtnC\", \"RETCS\" },\n\t{ \"gonC %05x\", \"BRCC %05x\" },\n\t{ \"rtnnC\", \"RETCC\" },\n\n\t{ \"OUT=CS\", \"OUT.S C\" },\n\t{ \"OUT=C\", \"OUT.X C\" },\n\t{ \"A=IN\", \"IN.4 A\" },\n\t{ \"C=IN\", \"IN.4 C\" },\n\t{ \"uncnfg\", \"UNCNFG\" },\n\t{ \"config\", \"CONFIG\" },\n\t{ \"C=id\", \"MOVE.A ID,C\" },\n\t{ \"!shutdn\", \"!SHUTDN\" },\n\t{ \"C+P+1\", \"ADD.A P+1,C\" },\n\t{ \"reset\", \"RESET\" },\n\t{ \"!buscc\", \"!BUSCC\" },\n\t{ \"C=P %x\", \"MOVE.1 P,C,%x\" },\n\t{ \"P=C %x\", \"MOVE.1 C,%x,P\" },\n\t{ \"!sreq?\", \"!SREQ\" },\n\t{ \"CPex %x\", \"SWAP.1 P,C,%x\" },\n\n\t{ \"!inton\", \"!INTON\" },\n\t{ \"LA %-2x %s\", \"MOVE.P%-2x %s,A\" },\n\t{ \"!buscb\", \"!BUSCB\" },\n\t{ \"Abit=0 %x\", \"CLRB %x,A\" },\n\t{ \"Abit=1 %x\", \"SETB %x,A\" },\n\t{ \"?Abit=0 %x,%05x\", \"BRBC %x,A,%05x\" },\n\t{ \"?Abit=0 %x,rtn\", \"RETBC %x,A\" },\n\t{ \"?Abit=1 %x,%05x\", \"BRBS %x,A,%05x\" },\n\t{ \"?Abit=1 %x,rtn\", \"RETBS %x,A\" },\n\t{ \"Cbit=0 %x\", \"CLRB %x,C\" },\n\t{ \"Cbit=1 %x\", \"SETB %x,C\" },\n\t{ \"?Cbit=0 %x,%05x\", \"BRBC %x,C,%05x\" },\n\t{ \"?Cbit=0 %x,rtn\", \"RETBC %x,C\" },\n\t{ \"?Cbit=1 %x,%05x\", \"BRBS %x,C,%05x\" },\n\t{ \"?Cbit=1 %x,rtn\", \"RETBS %x,C\" },\n\t{ \"PC=(A)\", \"JUMP.A @A\" },\n\t{ \"!buscd\", \"!BUSCD\" },\n\t{ \"PC=(C)\", \"JUMP.A @C\" },\n\t{ \"!intoff\", \"!INTOFF\" },\n\t{ \"!rsi\", \"!RSI\" },\n\n\t{ \"PC=A\", \"JUMP.A A\" },\n\t{ \"PC=C\", \"JUMP.A C\" },\n\t{ \"A=PC\", \"MOVE.A PC,A\" },\n\t{ \"C=PC\", \"MOVE.A PC,C\" },\n\t{ \"APCex\", \"SWAP.A A,PC\" },\n\t{ \"CPCex\", \"SWAP.A C,PC\" },\n\n\t{ \"HST=0 %x\", \"CLRHST %x\" },\n\t{ \"?HST=0 %x,%05x\", \"BRBCHST %x,%05x\" },\n\t{ \"?HST=0 %x,rtn\", \"RETBCHST %x\" },\n\t{ \"ST=0 %x\", \"CLRB %x,ST\" },\n\t{ \"ST=1 %x\", \"SETB %x,ST\" },\n\t{ \"?ST=0 %x,%05x\", \"BRBC ST,%x,%05x\" },\n\t{ \"?ST=0 %x,rtn\", \"RETBC ST,%x\" },\n\t{ \"?ST=1 %x,%05x\", \"BRBS ST,%x,%05x\" },\n\t{ \"?ST=1 %x,rtn\", \"RETBS ST,%x\" },\n\t{ \"?P# %x,%05x\", \"BRNE P,%x,%05x\" },\n\t{ \"?P# %x,rtn\", \"RETNE P,%x\" },\n\t{ \"?P= %x,%05x\", \"BREQ P,%x,%05x\" },\n\t{ \"?P= %x,rtn\", \"RETEQ P,%x\" },\n\n\t{ \"?A=B %s,%05x\", \"BREQ.%-2s A,B,%05x\" },\n\t{ \"?A=B %s,rtn\", \"RETEQ.%-2s A,B\" },\n\t{ \"?B=C %s,%05x\", \"BREQ.%-2s B,C,%05x\" },\n\t{ \"?B=C %s,rtn\", \"RETEQ.%-2s B,C\" },\n\t{ \"?A=C %s,%05x\", \"BREQ.%-2s A,C,%05x\" },\n\t{ \"?A=C %s,rtn\", \"RETEQ.%-2s A,C\" },\n\t{ \"?C=D %s,%05x\", \"BREQ.%-2s C,D,%05x\" },\n\t{ \"?C=D %s,rtn\", \"RETEQ.%-2s C,D\" },\n\t{ \"?A#B %s,%05x\", \"BRNE.%-2s A,B,%05x\" },\n\t{ \"?A#B %s,rtn\", \"RETNE.%-2s A,B\" },\n\t{ \"?B#C %s,%05x\", \"BRNE.%-2s B,C,%05x\" },\n\t{ \"?B#C %s,rtn\", \"RETNE.%-2s B,C\" },\n\t{ \"?A#C %s,%05x\", \"BRNE.%-2s A,C,%05x\" },\n\t{ \"?A#C %s,rtn\", \"RETNE.%-2s A,C\" },\n\t{ \"?C#D %s,%05x\", \"BRNE.%-2s C,D,%05x\" },\n\t{ \"?C#D %s,rtn\", \"RETNE.%-2s C,D\" },\n\t{ \"?A=0 %s,%05x\", \"BRZ.%-2s A,%05x\" },\n\t{ \"?A=0 %s,rtn\", \"RETZ.%-2s A\" },\n\t{ \"?B=0 %s,%05x\", \"BRZ.%-2s B,%05x\" },\n\t{ \"?B=0 %s,rtn\", \"RETZ.%-2s B\" },\n\t{ \"?C=0 %s,%05x\", \"BRZ.%-2s C,%05x\" },\n\t{ \"?C=0 %s,rtn\", \"RETZ.%-2s C\" },\n\t{ \"?D=0 %s,%05x\", \"BRZ.%-2s D,%05x\" },\n\t{ \"?D=0 %s,rtn\", \"RETZ.%-2s D\" },\n\t{ \"?A#0 %s,%05x\", \"BRNZ.%-2s A,%05x\" },\n\t{ \"?A#0 %s,rtn\", \"RETNZ.%-2s A\" },\n\t{ \"?B#0 %s,%05x\", \"BRNZ.%-2s B,%05x\" },\n\t{ \"?B#0 %s,rtn\", \"RETNZ.%-2s B\" },\n\t{ \"?C#0 %s,%05x\", \"BRNZ.%-2s C,%05x\" },\n\t{ \"?C#0 %s,rtn\", \"RETNZ.%-2s C\" },\n\t{ \"?D#0 %s,%05x\", \"BRNZ.%-2s D,%05x\" },\n\t{ \"?D#0 %s,rtn\", \"RETNZ.%-2s D\" },\n\n\t{ \"?A>B %s,%05x\", \"BRGT.%-2s A,B,%05x\" },\n\t{ \"?A>B %s,rtn\", \"RETGT.%-2s A,B\" },\n\t{ \"?B>C %s,%05x\", \"BRGT.%-2s B,C,%05x\" },\n\t{ \"?B>C %s,rtn\", \"RETGT.%-2s B,C\" },\n\t{ \"?C>A %s,%05x\", \"BRGT.%-2s C,A,%05x\" },\n\t{ \"?C>A %s,rtn\", \"RETGT.%-2s C,A\" },\n\t{ \"?D>C %s,%05x\", \"BRGT.%-2s D,C,%05x\" },\n\t{ \"?D>C %s,rtn\", \"RETGT.%-2s D,C\" },\n\t{ \"?A<B %s,%05x\", \"BRLT.%-2s A,B,%05x\" },\n\t{ \"?A<B %s,rtn\", \"RETLT.%-2s A,B\" },\n\t{ \"?B<C %s,%05x\", \"BRLT.%-2s B,C,%05x\" },\n\t{ \"?B<C %s,rtn\", \"RETLT.%-2s B,C\" },\n\t{ \"?C<A %s,%05x\", \"BRLT.%-2s C,A,%05x\" },\n\t{ \"?C<A %s,rtn\", \"RETLT.%-2s C,A\" },\n\t{ \"?D<C %s,%05x\", \"BRLT.%-2s D,C,%05x\" },\n\t{ \"?D<C %s,rtn\", \"RETLT.%-2s D,C\" },\n\t{ \"?A>=B %s,%05x\", \"BRGE.%-2s A,B,%05x\" },\n\t{ \"?A>=B %s,rtn\", \"RETGE.%-2s A,B\" },\n\t{ \"?B>=C %s,%05x\", \"BRGE.%-2s B,C,%05x\" },\n\t{ \"?B>=C %s,rtn\", \"RETGE.%-2s B,C\" },\n\t{ \"?C>=A %s,%05x\", \"BRGE.%-2s C,A,%05x\" },\n\t{ \"?C>=A %s,rtn\", \"RETGE.%-2s C,A\" },\n\t{ \"?D>=C %s,%05x\", \"BRGE.%-2s D,C,%05x\" },\n\t{ \"?D>=C %s,rtn\", \"RETGE.%-2s D,C\" },\n\t{ \"?A<=B %s,%05x\", \"BRLE.%-2s A,B,%05x\" },\n\t{ \"?A<=B %s,rtn\", \"RETLE.%-2s A,B\" },\n\t{ \"?B<=C %s,%05x\", \"BRLE.%-2s B,C,%05x\" },\n\t{ \"?B<=C %s,rtn\", \"RETLE.%-2s B,C\" },\n\t{ \"?C<=A %s,%05x\", \"BRLE.%-2s C,A,%05x\" },\n\t{ \"?C<=A %s,rtn\", \"RETLE.%-2s C,A\" },\n\t{ \"?D<=C %s,%05x\", \"BRLE.%-2s D,C,%05x\" },\n\t{ \"?D<=C %s,rtn\", \"RETLE.%-2s D,C\" },\n\n\t{ \"sethex\", \"SETHEX\" },\n\t{ \"setdec\", \"SETDEC\" },\n\t{ \"RSTK=C\", \"PUSH.A C\" },\n\t{ \"C=RSTK\", \"POP.A C\" },\n\n\t// load immediate\n\t{ \"D0= %02x\", \"MOVE.2 %02x,D0\" },\n\t{ \"D0= %04x\", \"MOVE.4 %04x,D0\" },\n\t{ \"D0= %05x\", \"MOVE.5 %05x,D0\" },\n\n\t{ \"D1= %02x\", \"MOVE.2 %02x,D1\" },\n\t{ \"D1= %04x\", \"MOVE.4 %04x,D1\" },\n\t{ \"D1= %05x\", \"MOVE.5 %05x,D1\" },\n\n\t{ \"P= %x\", \"MOVE %x,P\" },\n\t{ \"lC %-2x %s\", \"MOVE.P%-2x %s,C\" },\n\n\t{ \"clrST\", \"CLR.X ST\" },\n\t{ \"C=ST\", \"MOVE.X ST,C\" },\n\t{ \"ST=C\", \"MOVE.X C,ST\" },\n\t{ \"CSTex\", \"SWAP.X C,ST\" },\n\n\t{ \"P=P+1\", \"INC P\" },\n\t{ \"P=P-1\", \"DEC P\" },\n\n\t// copy\n\t{ \"R0=A %s\", \"MOVE.%-2s A,R0\" },\n\t{ \"R1=A %s\", \"MOVE.%-2s A,R1\" },\n\t{ \"R2=A %s\", \"MOVE.%-2s A,R2\" },\n\t{ \"R3=A %s\", \"MOVE.%-2s A,R3\" },\n\t{ \"R4=A %s\", \"MOVE.%-2s A,R4\" },\n\n\t{ \"R0=C %s\", \"MOVE.%-2s C,R0\" },\n\t{ \"R1=C %s\", \"MOVE.%-2s C,R1\" },\n\t{ \"R2=C %s\", \"MOVE.%-2s C,R2\" },\n\t{ \"R3=C %s\", \"MOVE.%-2s C,R3\" },\n\t{ \"R4=C %s\", \"MOVE.%-2s C,R4\" },\n\n\t{ \"A=R0 %s\", \"MOVE.%-2s R0,A\" },\n\t{ \"A=R1 %s\", \"MOVE.%-2s R1,A\" },\n\t{ \"A=R2 %s\", \"MOVE.%-2s R2,A\" },\n\t{ \"A=R3 %s\", \"MOVE.%-2s R3,A\" },\n\t{ \"A=R4 %s\", \"MOVE.%-2s R4,A\" },\n\n\t{ \"C=R0 %s\", \"MOVE.%-2s R0,C\" },\n\t{ \"C=R1 %s\", \"MOVE.%-2s R1,C\" },\n\t{ \"C=R2 %s\", \"MOVE.%-2s R2,C\" },\n\t{ \"C=R3 %s\", \"MOVE.%-2s R3,C\" },\n\t{ \"C=R4 %s\", \"MOVE.%-2s R4,C\" },\n\n\t{ \"D0=A\", \"MOVE.A A,D0\" },\n\t{ \"D1=A\", \"MOVE.A A,D1\" },\n\t{ \"D0=C\", \"MOVE.A C,D0\" },\n\t{ \"D1=C\", \"MOVE.A C,D1\" },\n\t{ \"D0=As\", \"MOVE.S A,D0\" },\n\t{ \"D1=As\", \"MOVE.S A,D1\" },\n\t{ \"D0=Cs\", \"MOVE.S C,D0\" },\n\t{ \"D1=Cs\", \"MOVE.S C,D1\" },\n\n\t// swap operations\n\t{ \"AR0ex %s\", \"SWAP.%-2s A,R0\" },\n\t{ \"AR1ex %s\", \"SWAP.%-2s A,R1\" },\n\t{ \"AR2ex %s\", \"SWAP.%-2s A,R2\" },\n\t{ \"AR3ex %s\", \"SWAP.%-2s A,R3\" },\n\t{ \"AR4ex %s\", \"SWAP.%-2s A,R4\" },\n\n\t{ \"CR0ex %s\", \"SWAP.%-2s C,R0\" },\n\t{ \"CR1ex %s\", \"SWAP.%-2s C,R1\" },\n\t{ \"CR2ex %s\", \"SWAP.%-2s C,R2\" },\n\t{ \"CR3ex %s\", \"SWAP.%-2s C,R3\" },\n\t{ \"CR4ex %s\", \"SWAP.%-2s C,R4\" },\n\n\t{ \"AD0ex\", \"SWAP.A A,D0\" },\n\t{ \"AD1ex\", \"SWAP.A A,D1\" },\n\t{ \"CD0ex\", \"SWAP.A C,D0\" },\n\t{ \"CD1ex\", \"SWAP.A C,D1\" },\n\t{ \"AD0xs\", \"SWAP.S A,D0\" },\n\t{ \"AD1xs\", \"SWAP.S A,D1\" },\n\t{ \"CD0xs\", \"SWAP.S C,D0\" },\n\t{ \"CD1xs\", \"SWAP.S C,D1\" },\n\n\t// store\n\t{ \"Dat0=A %s\", \"MOVE.%-2s A,@D0\" },\n\t{ \"Dat1=A %s\", \"MOVE.%-2s A,@D0\" },\n\t{ \"Dat0=C %s\", \"MOVE.%-2s C,@D0\" },\n\t{ \"Dat1=C %s\", \"MOVE.%-2s C,@D0\" },\n\n\t// load\n\t{ \"A=Dat0 %s\", \"MOVE.%-2s @D0,A\" },\n\t{ \"A=Dat1 %s\", \"MOVE.%-2s @D0,A\" },\n\t{ \"C=Dat0 %s\", \"MOVE.%-2s @D0,C\" },\n\t{ \"C=Dat1 %s\", \"MOVE.%-2s @D0,C\" },\n\n\t// add/sub immediate\n\t{ \"D0=D0+ %x\", \"ADD.A %x,D0\" },\n\t{ \"D1=D1+ %x\", \"ADD.A %x,D1\" },\n\t{ \"D0=D0- %x\", \"SUB.A %x,D0\" },\n\t{ \"D1=D1- %x\", \"SUB.A %x,D1\" },\n\n\t{ \"A=A+ %s,%x\", \"ADD.%-2s %x,A\" },\n\t{ \"B=B+ %s,%x\", \"ADD.%-2s %x,B\" },\n\t{ \"C=C+ %s,%x\", \"ADD.%-2s %x,C\" },\n\t{ \"D=D+ %s,%x\", \"ADD.%-2s %x,D\" },\n\t{ \"A=A- %s,%x\", \"SUB.%-2s %x,A\" },\n\t{ \"B=B- %s,%x\", \"SUB.%-2s %x,B\" },\n\t{ \"C=C- %s,%x\", \"SUB.%-2s %x,C\" },\n\t{ \"D=D- %s,%x\", \"SUB.%-2s %x,D\" },\n\n\t{ \"A=A&B %s\", \"AND.%-2s B,A\" },\n\t{ \"B=B&C %s\", \"AND.%-2s C,B\" },\n\t{ \"C=C&A %s\", \"AND.%-2s A,C\" },\n\t{ \"D=D&C %s\", \"AND.%-2s C,D\" },\n\t{ \"B=B&A %s\", \"AND.%-2s A,B\" },\n\t{ \"C=C&B %s\", \"AND.%-2s B,C\" },\n\t{ \"A=A&C %s\", \"AND.%-2s C,A\" },\n\t{ \"C=C&D %s\", \"AND.%-2s D,C\" },\n\n\t{ \"A=A!B %s\", \"OR.%-2s B,A\" },\n\t{ \"B=B!C %s\", \"OR.%-2s C,B\" },\n\t{ \"C=C!A %s\", \"OR.%-2s A,C\" },\n\t{ \"D=D!C %s\", \"OR.%-2s C,D\" },\n\t{ \"B=B!A %s\", \"OR.%-2s A,B\" },\n\t{ \"C=C!B %s\", \"OR.%-2s B,C\" },\n\t{ \"A=A!C %s\", \"OR.%-2s C,A\" },\n\t{ \"C=C!D %s\", \"OR.%-2s D,C\" },\n\n\t{ \"Asrb %s\", \"SRB.%-2s A\" },\n\t{ \"Bsrb %s\", \"SRB.%-2s B\" },\n\t{ \"Csrb %s\", \"SRB.%-2s C\" },\n\t{ \"Dsrb %s\", \"SRB.%-2s D\" },\n\n\t{ \"Aslc %s\", \"RLN.%-2s A\" },\n\t{ \"Bslc %s\", \"RLN.%-2s B\" },\n\t{ \"Cslc %s\", \"RLN.%-2s C\" },\n\t{ \"Dslc %s\", \"RLN.%-2s D\" },\n\t{ \"Asrc %s\", \"RRN.%-2s A\" },\n\t{ \"Bsrc %s\", \"RRN.%-2s B\" },\n\t{ \"Csrc %s\", \"RRN.%-2s C\" },\n\t{ \"Dsrc %s\", \"RRN.%-2s D\" },\n\n\t{ \"A=A+B %s\", \"ADD.%-2s B,A\" },\n\t{ \"B=B+C %s\", \"ADD.%-2s C,B\" },\n\t{ \"C=C+A %s\", \"ADD.%-2s A,C\" },\n\t{ \"D=D+C %s\", \"ADD.%-2s C,D\" },\n\t{ \"A=A+A %s\", \"ADD.%-2s A,A\" },\n\t{ \"B=B+B %s\", \"ADD.%-2s B,B\" },\n\t{ \"C=C+C %s\", \"ADD.%-2s C,C\" },\n\t{ \"D=D+C %s\", \"ADD.%-2s D,D\" },\n\t{ \"B=B+A %s\", \"ADD.%-2s A,B\" },\n\t{ \"C=C+B %s\", \"ADD.%-2s B,C\" },\n\t{ \"A=A+C %s\", \"ADD.%-2s C,A\" },\n\t{ \"C=C+D %s\", \"ADD.%-2s D,C\" },\n\t{ \"A=A-1 %s\", \"DEC.%-2s A\" },\n\t{ \"B=B-1 %s\", \"DEC.%-2s B\" },\n\t{ \"C=C-1 %s\", \"DEC.%-2s C\" },\n\t{ \"D=D-1 %s\", \"DEC.%-2s D\" },\n\n\t{ \"A=A-B %s\", \"ADD.%-2s B,A\" },\n\t{ \"B=B-C %s\", \"ADD.%-2s C,B\" },\n\t{ \"C=C-A %s\", \"ADD.%-2s A,C\" },\n\t{ \"D=D-C %s\", \"ADD.%-2s C,D\" },\n\t{ \"A=A+1 %s\", \"INC.%-2s A\" },\n\t{ \"B=B+1 %s\", \"INC.%-2s B\" },\n\t{ \"C=C+1 %s\", \"INC.%-2s C\" },\n\t{ \"D=D+1 %s\", \"INC.%-2s D\" },\n\t{ \"B=B-A %s\", \"SUB.%-2s A,B\" },\n\t{ \"C=C-B %s\", \"SUB.%-2s B,C\" },\n\t{ \"A=A-C %s\", \"SUB.%-2s C,A\" },\n\t{ \"C=C-D %s\", \"SUB.%-2s D,C\" },\n\t{ \"A=B-A %s\", \"SUBN.%-2s B,A\" },\n\t{ \"B=C-B %s\", \"SUBN.%-2s C,B\" },\n\t{ \"C=A-C %s\", \"SUBN.%-2s A,C\" },\n\t{ \"D=C-D %s\", \"SUBN.%-2s C,D\" },\n\n\t{ \"A=0 %s\", \"CLR.%-2s A\" },\n\t{ \"B=0 %s\", \"CLR.%-2s B\" },\n\t{ \"C=0 %s\", \"CLR.%-2s C\" },\n\t{ \"D=0 %s\", \"CLR.%-2s D\" },\n\t{ \"A=B %s\", \"MOVE.%-2s B,A\" },\n\t{ \"B=C %s\", \"MOVE.%-2s C,B\" },\n\t{ \"C=A %s\", \"MOVE.%-2s A,C\" },\n\t{ \"D=C %s\", \"MOVE.%-2s C,D\" },\n\t{ \"B=A %s\", \"MOVE.%-2s A,B\" },\n\t{ \"C=B %s\", \"MOVE.%-2s B,C\" },\n\t{ \"A=C %s\", \"MOVE.%-2s C,A\" },\n\t{ \"C=D %s\", \"MOVE.%-2s D,C\" },\n\t{ \"ABex %s\", \"SWAP.%-2s A,B\" },\n\t{ \"BCex %s\", \"SWAP.%-2s B,C\" },\n\t{ \"ACex %s\", \"SWAP.%-2s A,C\" },\n\t{ \"CDex %s\", \"SWAP.%-2s C,D\" },\n\n\t{ \"Asl %s\", \"SLN.%-2s A\" },\n\t{ \"Bsl %s\", \"SLN.%-2s B\" },\n\t{ \"Csl %s\", \"SLN.%-2s C\" },\n\t{ \"Dsl %s\", \"SLN.%-2s D\" },\n\t{ \"Asr %s\", \"SRN.%-2s A\" },\n\t{ \"Bsr %s\", \"SRN.%-2s B\" },\n\t{ \"Csr %s\", \"SRN.%-2s C\" },\n\t{ \"Dsr %s\", \"SRN.%-2s D\" },\n\t{ \"A=-A %s\", \"NEG.%-2s A\" },\n\t{ \"B=-B %s\", \"NEG.%-2s B\" },\n\t{ \"C=-C %s\", \"NEG.%-2s C\" },\n\t{ \"D=-D %s\", \"NEG.%-2s D\" },\n\t{ \"A=-A-1 %s\", \"NOT.%-2s A\" },\n\t{ \"B=-B-1 %s\", \"NOT.%-2s B\" },\n\t{ \"C=-C-1 %s\", \"NOT.%-2s C\" },\n\t{ \"D=-D-1 %s\", \"NOT.%-2s D\" }\n};\n\n\n\nconst char *saturn_disassembler::field_2_string(int adr_enum)\n{\n\tswitch (adr_enum) {\n\tcase FieldP: return P;\n\tcase FieldWP: return WP;\n\tcase FieldXS: return XS;\n\tcase FieldX: return X;\n\tcase FieldS: return S;\n\tcase FieldM: return M;\n\tcase FieldB: return B;\n\tcase FieldW: return W;\n\tcase FieldA: return A;\n\t}\n\treturn nullptr;\n}\n\nconst saturn_disassembler::OPCODE saturn_disassembler::opcs[][0x10]= {\n\t{\n\t\t// first digit\n\t\t{ Opcode0 },\n\t\t{ Opcode1 },\n\t\t{ Complete, Imm, PloadImm },\n\t\t{ Complete, ImmCload, CloadImm },\n\t\t{ Complete, BranchReturn, branchCarrySet},\n\t\t{ Complete, BranchReturn, branchCarryClear },\n\t\t{ Complete, Dis3, jump3 },\n\t\t{ Complete, Dis3Call, call3 },\n\t\t{ Opcode8 },\n\t\t{ Opcode9 },\n\t\t{ OpcodeA },\n\t\t{ OpcodeB },\n\t\t{ OpcodeC },\n\t\t{ OpcodeD },\n\t\t{ OpcodeE },\n\t\t{ OpcodeF }\n\t}, { // 0\n\t\t{ Complete, AdrNone, ReturnSetXM },\n\t\t{ Complete, AdrNone, Return },\n\t\t{ Complete, AdrNone, ReturnSetCarry },\n\t\t{ Complete, AdrNone, ReturnClearCarry },\n\t\t{ Complete, AdrNone, SetHexMode },\n\t\t{ Complete, AdrNone, SetDecMode },\n\t\t{ Complete, AdrNone, PushC },\n\t\t{ Complete, AdrNone, PopC },\n\t\t{ Complete, AdrNone, clearST },\n\t\t{ Complete, AdrNone, CcopyST },\n\t\t{ Complete, AdrNone, STcopyC },\n\t\t{ Complete, AdrNone, swapCST },\n\t\t{ Complete, AdrNone, incP },\n\t\t{ Complete, AdrNone, decP },\n\t\t{ Opcode0E },\n\t\t{ Complete, AdrNone, ReturnFromInterrupt }\n\t}, { //0E\n\t\t{ Opcode0Ea, AdrAF },\n\t\t{ Opcode0Ea, AdrAF },\n\t\t{ Opcode0Ea, AdrAF },\n\t\t{ Opcode0Ea, AdrAF },\n\t\t{ Opcode0Ea, AdrAF },\n\t\t{ Opcode0Ea, AdrAF },\n\t\t{ Opcode0Ea, AdrAF },\n\t\t{ Opcode0Ea, AdrAF },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Opcode0Ea, AdrAF }\n\t}, { //0Ea\n\t\t{ Complete, AdrNone, AandB },\n\t\t{ Complete, AdrNone, BandC },\n\t\t{ Complete, AdrNone, CandA },\n\t\t{ Complete, AdrNone, DandC },\n\t\t{ Complete, AdrNone, BandA },\n\t\t{ Complete, AdrNone, CandB },\n\t\t{ Complete, AdrNone, AandC },\n\t\t{ Complete, AdrNone, CandD },\n\t\t{ Complete, AdrNone, AorB },\n\t\t{ Complete, AdrNone, BorC },\n\t\t{ Complete, AdrNone, CorA },\n\t\t{ Complete, AdrNone, DorC },\n\t\t{ Complete, AdrNone, BorA },\n\t\t{ Complete, AdrNone, CorB },\n\t\t{ Complete, AdrNone, AorC },\n\t\t{ Complete, AdrNone, CorD }\n\t}, { //1\n\t\t{ Opcode10 },\n\t\t{ Opcode11 },\n\t\t{ Opcode12 },\n\t\t{ Opcode13 },\n\t\t{ Opcode14 },\n\t\t{ Opcode15 },\n\t\t{ Complete, ImmCount, D0addImm },\n\t\t{ Complete, ImmCount, D1addImm },\n\t\t{ Complete, ImmCount, D0subImm },\n\t\t{ Complete, Imm2, D0loadImm2 },\n\t\t{ Complete, Imm4, D0loadImm4 },\n\t\t{ Complete, Imm5, D0loadImm5 },\n\t\t{ Complete, ImmCount, D1subImm },\n\t\t{ Complete, Imm2, D1loadImm2 },\n\t\t{ Complete, Imm4, D1loadImm4 },\n\t\t{ Complete, Imm5, D1loadImm5 }\n\t}, { //10\n\t\t{ Complete, FieldW, R0copyA },\n\t\t{ Complete, FieldW, R1copyA },\n\t\t{ Complete, FieldW, R2copyA },\n\t\t{ Complete, FieldW, R3copyA },\n\t\t{ Complete, FieldW, R4copyA },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Complete, FieldW, R0copyC },\n\t\t{ Complete, FieldW, R1copyC },\n\t\t{ Complete, FieldW, R2copyC },\n\t\t{ Complete, FieldW, R3copyC },\n\t\t{ Complete, FieldW, R4copyC },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal }\n\t}, { //11\n\t\t{ Complete, FieldW, AcopyR0 },\n\t\t{ Complete, FieldW, AcopyR1 },\n\t\t{ Complete, FieldW, AcopyR2 },\n\t\t{ Complete, FieldW, AcopyR3 },\n\t\t{ Complete, FieldW, AcopyR4 },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Complete, FieldW, CcopyR0 },\n\t\t{ Complete, FieldW, CcopyR1 },\n\t\t{ Complete, FieldW, CcopyR2 },\n\t\t{ Complete, FieldW, CcopyR3 },\n\t\t{ Complete, FieldW, CcopyR4 },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal }\n\t}, { //12\n\t\t{ Complete, FieldW, SwapAR0 },\n\t\t{ Complete, FieldW, SwapAR1 },\n\t\t{ Complete, FieldW, SwapAR2 },\n\t\t{ Complete, FieldW, SwapAR3 },\n\t\t{ Complete, FieldW, SwapAR4 },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Complete, FieldW, SwapCR0 },\n\t\t{ Complete, FieldW, SwapCR1 },\n\t\t{ Complete, FieldW, SwapCR2 },\n\t\t{ Complete, FieldW, SwapCR3 },\n\t\t{ Complete, FieldW, SwapCR4 },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal }\n\t}, { //13\n\t\t{ Complete, FieldA, D0copyA },\n\t\t{ Complete, FieldA, D1copyA },\n\t\t{ Complete, FieldA, SwapAD0 },\n\t\t{ Complete, FieldA, SwapAD1 },\n\t\t{ Complete, FieldA, D0copyC },\n\t\t{ Complete, FieldA, D1copyC },\n\t\t{ Complete, FieldA, SwapCD0 },\n\t\t{ Complete, FieldA, SwapCD1 },\n\t\t{ Complete, FieldS, D0copyAShort },\n\t\t{ Complete, FieldS, D1copyAShort },\n\t\t{ Complete, FieldS, SwapAD0Short },\n\t\t{ Complete, FieldS, SwapAD1Short },\n\t\t{ Complete, FieldS, D0copyCShort },\n\t\t{ Complete, FieldS, D1copyCShort },\n\t\t{ Complete, FieldS, SwapCD0Short },\n\t\t{ Complete, FieldS, SwapCD1Short }\n\t}, { //14\n\t\t{ Complete, FieldA, D0storeA },\n\t\t{ Complete, FieldA, D1storeA },\n\t\t{ Complete, FieldA, AloadD0 },\n\t\t{ Complete, FieldA, AloadD1 },\n\t\t{ Complete, FieldA, D0storeC },\n\t\t{ Complete, FieldA, D1storeC },\n\t\t{ Complete, FieldA, CloadD0 },\n\t\t{ Complete, FieldA, CloadD1 },\n\t\t{ Complete, FieldB, D0storeA },\n\t\t{ Complete, FieldB, D1storeA },\n\t\t{ Complete, FieldB, AloadD0 },\n\t\t{ Complete, FieldB, AloadD1 },\n\t\t{ Complete, FieldB, D0storeC },\n\t\t{ Complete, FieldB, D1storeC },\n\t\t{ Complete, FieldB, CloadD0 },\n\t\t{ Complete, FieldB, CloadD1 }\n\t}, { //15\n\t\t{ Complete, AdrA, D0storeA },\n\t\t{ Complete, AdrA, D1storeA },\n\t\t{ Complete, AdrA, AloadD0 },\n\t\t{ Complete, AdrA, AloadD1 },\n\t\t{ Complete, AdrA, D0storeC },\n\t\t{ Complete, AdrA, D1storeC },\n\t\t{ Complete, AdrA, CloadD0 },\n\t\t{ Complete, AdrA, CloadD1 },\n\t\t{ Complete, AdrCount, D0storeA },\n\t\t{ Complete, AdrCount, D1storeA },\n\t\t{ Complete, AdrCount, AloadD0 },\n\t\t{ Complete, AdrCount, AloadD1 },\n\t\t{ Complete, AdrCount, D0storeC },\n\t\t{ Complete, AdrCount, D1storeC },\n\t\t{ Complete, AdrCount, CloadD0 },\n\t\t{ Complete, AdrCount, CloadD1 },\n\t}, { //8\n\t\t{ Opcode80 },\n\t\t{ Opcode81 },\n\t\t{ Complete, Imm, clearHST },\n\t\t{ Complete, TestBranchRet, branchHSTclear },\n\t\t{ Complete, Imm, clearBitST },\n\t\t{ Complete, Imm, setBitST },\n\t\t{ Complete, TestBranchRet, branchSTclear },\n\t\t{ Complete, TestBranchRet, branchSTset },\n\t\t{ Complete, TestBranchRet, branchPdiffers},\n\t\t{ Complete, TestBranchRet, branchPequals},\n\t\t{ Opcode8A },\n\t\t{ Opcode8B },\n\t\t{ Complete, Dis4, jump4 },\n\t\t{ Complete, Abs, jump },\n\t\t{ Complete, Dis4Call, call4 },\n\t\t{ Complete, Abs, call }\n\t}, { //80\n\t\t{ Complete, AdrNone, outCS },\n\t\t{ Complete, AdrNone, outC },\n\t\t{ Complete, AdrNone, inA },\n\t\t{ Complete, AdrNone, inC },\n\t\t{ Complete, AdrNone, unconfig },\n\t\t{ Complete, AdrNone, xconfig },\n\t\t{ Complete, AdrNone, Cid },\n\t\t{ Complete, AdrNone, shutdown },\n\t\t{ Opcode808 },\n\t\t{ Complete, AdrNone, cp1 },\n\t\t{ Complete, AdrNone, reset },\n\t\t{ Complete, AdrNone, buscc },\n\t\t{ Complete, Imm, CcopyP },\n\t\t{ Complete, Imm, PcopyC },\n\t\t{ Complete, AdrNone, sreq },\n\t\t{ Complete, Imm, CswapP }\n\t}, { //808\n\t\t{ Complete, AdrNone, inton },\n\t\t{ Opcode8081 },\n\t\t{ Complete, ImmCload, AloadImm },\n\t\t{ Complete, AdrNone, buscb },\n\t\t{ Complete, Imm, clearAbit },\n\t\t{ Complete, Imm, setAbit },\n\t\t{ Complete, TestBranchRet, branchAbitclear },\n\t\t{ Complete, TestBranchRet, branchAbitset },\n\t\t{ Complete, Imm, clearCbit },\n\t\t{ Complete, Imm, setCbit },\n\t\t{ Complete, TestBranchRet, branchCbitclear },\n\t\t{ Complete, TestBranchRet, branchCbitset },\n\t\t{ Complete, AdrNone, PCloadA },\n\t\t{ Complete, AdrNone, buscd },\n\t\t{ Complete, AdrNone, PCloadC },\n\t\t{ Complete, AdrNone, intoff }\n\t}, { //8081\n\t\t{ Complete, AdrNone, rsi },\n\t\t//! rest illegal\n\t}, { //81\n\t\t{ Complete, FieldW, AshiftleftCarry },\n\t\t{ Complete, FieldW, BshiftleftCarry },\n\t\t{ Complete, FieldW, CshiftleftCarry },\n\t\t{ Complete, FieldW, DshiftleftCarry },\n\t\t{ Complete, FieldW, AshiftrightCarry },\n\t\t{ Complete, FieldW, BshiftrightCarry },\n\t\t{ Complete, FieldW, CshiftrightCarry },\n\t\t{ Complete, FieldW, DshiftrightCarry },\n\t\t{ Opcode818 },\n\t\t{ Opcode819 },\n\t\t{ Opcode81A },\n\t\t{ Opcode81B },\n\t\t{ Complete, FieldW, Ashiftrightbit },\n\t\t{ Complete, FieldW, Bshiftrightbit },\n\t\t{ Complete, FieldW, Cshiftrightbit },\n\t\t{ Complete, FieldW, Dshiftrightbit }\n\t}, { //818\n\t\t{ Opcode818a, AdrAF },\n\t\t{ Opcode818a, AdrAF },\n\t\t{ Opcode818a, AdrAF },\n\t\t{ Opcode818a, AdrAF },\n\t\t{ Opcode818a, AdrAF },\n\t\t{ Opcode818a, AdrAF },\n\t\t{ Opcode818a, AdrAF },\n\t\t{ Opcode818a, AdrAF },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Opcode818a, AdrAF },\n\t}, { //818a\n\t\t{ Complete, AdrImmCount, AaddImm },\n\t\t{ Complete, AdrImmCount, BaddImm },\n\t\t{ Complete, AdrImmCount, CaddImm },\n\t\t{ Complete, AdrImmCount, DaddImm },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Complete, AdrImmCount, AsubImm },\n\t\t{ Complete, AdrImmCount, BsubImm },\n\t\t{ Complete, AdrImmCount, CsubImm },\n\t\t{ Complete, AdrImmCount, DsubImm },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t}, { //819\n\t\t{ Opcode819a, AdrAF },\n\t\t{ Opcode819a, AdrAF },\n\t\t{ Opcode819a, AdrAF },\n\t\t{ Opcode819a, AdrAF },\n\t\t{ Opcode819a, AdrAF },\n\t\t{ Opcode819a, AdrAF },\n\t\t{ Opcode819a, AdrAF },\n\t\t{ Opcode819a, AdrAF }, //?\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Opcode819a, AdrAF },\n\t}, { //819a }\n\t\t{ Complete, AdrNone, Ashiftright },\n\t\t{ Complete, AdrNone, Bshiftright },\n\t\t{ Complete, AdrNone, Cshiftright },\n\t\t{ Complete, AdrNone, Dshiftright },\n\t\t//! rest illegal\n\t}, { //81A\n\t\t{ Opcode81Aa, AdrAF },\n\t\t{ Opcode81Aa, AdrAF },\n\t\t{ Opcode81Aa, AdrAF },\n\t\t{ Opcode81Aa, AdrAF },\n\t\t{ Opcode81Aa, AdrAF },\n\t\t{ Opcode81Aa, AdrAF },\n\t\t{ Opcode81Aa, AdrAF },\n\t\t{ Opcode81Aa, AdrAF },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Opcode81Aa, AdrAF },\n\t}, { //81Aa\n\t\t{ Opcode81Aa0 },\n\t\t{ Opcode81Aa1 },\n\t\t{ Opcode81Aa2 },\n\t\t//! rest illegal\n\t}, { //81Aa0\n\t\t{ Complete, AdrNone, R0copyA },\n\t\t{ Complete, AdrNone, R1copyA },\n\t\t{ Complete, AdrNone, R2copyA },\n\t\t{ Complete, AdrNone, R3copyA },\n\t\t{ Complete, AdrNone, R4copyA },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Complete, AdrNone, R0copyC },\n\t\t{ Complete, AdrNone, R1copyC },\n\t\t{ Complete, AdrNone, R2copyC },\n\t\t{ Complete, AdrNone, R3copyC },\n\t\t{ Complete, AdrNone, R4copyC },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal }\n\t}, { //81Aa1\n\t\t{ Complete, AdrNone, AcopyR0 },\n\t\t{ Complete, AdrNone, AcopyR1 },\n\t\t{ Complete, AdrNone, AcopyR2 },\n\t\t{ Complete, AdrNone, AcopyR3 },\n\t\t{ Complete, AdrNone, AcopyR4 },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Complete, AdrNone, CcopyR0 },\n\t\t{ Complete, AdrNone, CcopyR1 },\n\t\t{ Complete, AdrNone, CcopyR2 },\n\t\t{ Complete, AdrNone, CcopyR3 },\n\t\t{ Complete, AdrNone, CcopyR4 },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal }\n\t}, { //81Aa2\n\t\t{ Complete, AdrNone, SwapAR0 },\n\t\t{ Complete, AdrNone, SwapAR1 },\n\t\t{ Complete, AdrNone, SwapAR2 },\n\t\t{ Complete, AdrNone, SwapAR3 },\n\t\t{ Complete, AdrNone, SwapAR4 },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Complete, AdrNone, SwapCR0 },\n\t\t{ Complete, AdrNone, SwapCR1 },\n\t\t{ Complete, AdrNone, SwapCR2 },\n\t\t{ Complete, AdrNone, SwapCR3 },\n\t\t{ Complete, AdrNone, SwapCR4 },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal }\n\t}, { //81B\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Complete, AdrNone, jumpA },\n\t\t{ Complete, AdrNone, jumpC },\n\t\t{ Complete, AdrNone, PCcopyA },\n\t\t{ Complete, AdrNone, PCcopyC },\n\t\t{ Complete, AdrNone, AcopyPC },\n\t\t{ Complete, AdrNone, CcopyPC },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal },\n\t\t{ Illegal }\n\t}, { //8A\n\t\t{ Complete, ABranchReturn, branchAequalsB },\n\t\t{ Complete, ABranchReturn, branchBequalsC },\n\t\t{ Complete, ABranchReturn, branchAequalsC },\n\t\t{ Complete, ABranchReturn, branchCequalsD },\n\t\t{ Complete, ABranchReturn, branchAdiffersB },\n\t\t{ Complete, ABranchReturn, branchBdiffersC },\n\t\t{ Complete, ABranchReturn, branchAdiffersC },\n\t\t{ Complete, ABranchReturn, branchCdiffersD },\n\t\t{ Complete, ABranchReturn, branchAzero },\n\t\t{ Complete, ABranchReturn, branchBzero },\n\t\t{ Complete, ABranchReturn, branchCzero },\n\t\t{ Complete, ABranchReturn, branchDzero },\n\t\t{ Complete, ABranchReturn, branchAnotzero },\n\t\t{ Complete, ABranchReturn, branchBnotzero },\n\t\t{ Complete, ABranchReturn, branchCnotzero },\n\t\t{ Complete, ABranchReturn, branchDnotzero }\n\t}, { //8B\n\t\t{ Complete, ABranchReturn, branchAgreaterB },\n\t\t{ Complete, ABranchReturn, branchBgreaterC },\n\t\t{ Complete, ABranchReturn, branchCgreaterA },\n\t\t{ Complete, ABranchReturn, branchDgreaterC },\n\t\t{ Complete, ABranchReturn, branchAlowerB },\n\t\t{ Complete, ABranchReturn, branchBlowerC },\n\t\t{ Complete, ABranchReturn, branchClowerA },\n\t\t{ Complete, ABranchReturn, branchDlowerC },\n\t\t{ Complete, ABranchReturn, branchAnotlowerB },\n\t\t{ Complete, ABranchReturn, branchBnotlowerC },\n\t\t{ Complete, ABranchReturn, branchCnotlowerA },\n\t\t{ Complete, ABranchReturn, branchDnotlowerC },\n\t\t{ Complete, ABranchReturn, branchAnotgreaterB },\n\t\t{ Complete, ABranchReturn, branchBnotgreaterC },\n\t\t{ Complete, ABranchReturn, branchCnotgreaterA },\n\t\t{ Complete, ABranchReturn, branchDnotgreaterC }\n\t}, { //9\n\t\t{ Opcode9a, AdrA },\n\t\t{ Opcode9a, AdrA },\n\t\t{ Opcode9a, AdrA },\n\t\t{ Opcode9a, AdrA },\n\t\t{ Opcode9a, AdrA },\n\t\t{ Opcode9a, AdrA },\n\t\t{ Opcode9a, AdrA },\n\t\t{ Opcode9a, AdrA },\n\t\t{ Opcode9b, AdrB },\n\t\t{ Opcode9b, AdrB },\n\t\t{ Opcode9b, AdrB },\n\t\t{ Opcode9b, AdrB },\n\t\t{ Opcode9b, AdrB },\n\t\t{ Opcode9b, AdrB },\n\t\t{ Opcode9b, AdrB },\n\t\t{ Opcode9b, AdrB },\n\t}, { //9a\n\t\t{ Complete, xBranchReturn, branchAequalsB },\n\t\t{ Complete, xBranchReturn, branchBequalsC },\n\t\t{ Complete, xBranchReturn, branchAequalsC },\n\t\t{ Complete, xBranchReturn, branchCequalsD },\n\t\t{ Complete, xBranchReturn, branchAdiffersB },\n\t\t{ Complete, xBranchReturn, branchBdiffersC },\n\t\t{ Complete, xBranchReturn, branchAdiffersC },\n\t\t{ Complete, xBranchReturn, branchCdiffersD },\n\t\t{ Complete, xBranchReturn, branchAzero },\n\t\t{ Complete, xBranchReturn, branchBzero },\n\t\t{ Complete, xBranchReturn, branchCzero },\n\t\t{ Complete, xBranchReturn, branchDzero },\n\t\t{ Complete, xBranchReturn, branchAnotzero },\n\t\t{ Complete, xBranchReturn, branchBnotzero },\n\t\t{ Complete, xBranchReturn, branchCnotzero },\n\t\t{ Complete, xBranchReturn, branchDnotzero }\n\t}, { //9b\n\t\t{ Complete, xBranchReturn, branchAgreaterB },\n\t\t{ Complete, xBranchReturn, branchBgreaterC },\n\t\t{ Complete, xBranchReturn, branchCgreaterA },\n\t\t{ Complete, xBranchReturn, branchDgreaterC },\n\t\t{ Complete, xBranchReturn, branchAlowerB },\n\t\t{ Complete, xBranchReturn, branchBlowerC },\n\t\t{ Complete, xBranchReturn, branchClowerA },\n\t\t{ Complete, xBranchReturn, branchDlowerC },\n\t\t{ Complete, xBranchReturn, branchAnotlowerB },\n\t\t{ Complete, xBranchReturn, branchBnotlowerC },\n\t\t{ Complete, xBranchReturn, branchCnotlowerA },\n\t\t{ Complete, xBranchReturn, branchDnotlowerC },\n\t\t{ Complete, xBranchReturn, branchAnotgreaterB },\n\t\t{ Complete, xBranchReturn, branchBnotgreaterC },\n\t\t{ Complete, xBranchReturn, branchCnotgreaterA },\n\t\t{ Complete, xBranchReturn, branchDnotgreaterC }\n\t}, { //A\n\t\t{ OpcodeAa, AdrA },\n\t\t{ OpcodeAa, AdrA },\n\t\t{ OpcodeAa, AdrA },\n\t\t{ OpcodeAa, AdrA },\n\t\t{ OpcodeAa, AdrA },\n\t\t{ OpcodeAa, AdrA },\n\t\t{ OpcodeAa, AdrA },\n\t\t{ OpcodeAa, AdrA },\n\t\t{ OpcodeAb, AdrB },\n\t\t{ OpcodeAb, AdrB },\n\t\t{ OpcodeAb, AdrB },\n\t\t{ OpcodeAb, AdrB },\n\t\t{ OpcodeAb, AdrB },\n\t\t{ OpcodeAb, AdrB },\n\t\t{ OpcodeAb, AdrB },\n\t\t{ OpcodeAb, AdrB },\n\t}, { //Aa\n\t\t{ Complete, AdrNone, AaddB },\n\t\t{ Complete, AdrNone, BaddC },\n\t\t{ Complete, AdrNone, CaddA },\n\t\t{ Complete, AdrNone, DaddC },\n\t\t{ Complete, AdrNone, AaddA },\n\t\t{ Complete, AdrNone, BaddB },\n\t\t{ Complete, AdrNone, CaddC },\n\t\t{ Complete, AdrNone, DaddD },\n\t\t{ Complete, AdrNone, BaddA },\n\t\t{ Complete, AdrNone, CaddB },\n\t\t{ Complete, AdrNone, AaddC },\n\t\t{ Complete, AdrNone, CaddD },\n\t\t{ Complete, AdrNone, decA },\n\t\t{ Complete, AdrNone, decB },\n\t\t{ Complete, AdrNone, decC },\n\t\t{ Complete, AdrNone, decD },\n\t}, { //Ab\n\t\t{ Complete, AdrNone, clearA },\n\t\t{ Complete, AdrNone, clearB },\n\t\t{ Complete, AdrNone, clearC },\n\t\t{ Complete, AdrNone, clearD },\n\t\t{ Complete, AdrNone, AcopyB },\n\t\t{ Complete, AdrNone, BcopyC },\n\t\t{ Complete, AdrNone, CcopyA },\n\t\t{ Complete, AdrNone, DcopyC },\n\t\t{ Complete, AdrNone, BcopyA },\n\t\t{ Complete, AdrNone, CcopyB },\n\t\t{ Complete, AdrNone, AcopyC },\n\t\t{ Complete, AdrNone, CcopyD },\n\t\t{ Complete, AdrNone, AswapB },\n\t\t{ Complete, AdrNone, BswapC },\n\t\t{ Complete, AdrNone, CswapA },\n\t\t{ Complete, AdrNone, DswapC }\n\t}, { //B\n\t\t{ OpcodeBa, AdrA },\n\t\t{ OpcodeBa, AdrA },\n\t\t{ OpcodeBa, AdrA },\n\t\t{ OpcodeBa, AdrA },\n\t\t{ OpcodeBa, AdrA },\n\t\t{ OpcodeBa, AdrA },\n\t\t{ OpcodeBa, AdrA },\n\t\t{ OpcodeBa, AdrA },\n\t\t{ OpcodeBb, AdrB },\n\t\t{ OpcodeBb, AdrB },\n\t\t{ OpcodeBb, AdrB },\n\t\t{ OpcodeBb, AdrB },\n\t\t{ OpcodeBb, AdrB },\n\t\t{ OpcodeBb, AdrB },\n\t\t{ OpcodeBb, AdrB },\n\t\t{ OpcodeBb, AdrB },\n\t}, { //Ba\n\t\t{ Complete, AdrNone, AsubB },\n\t\t{ Complete, AdrNone, BsubC },\n\t\t{ Complete, AdrNone, CsubA },\n\t\t{ Complete, AdrNone, DsubC },\n\t\t{ Complete, AdrNone, incA },\n\t\t{ Complete, AdrNone, incB },\n\t\t{ Complete, AdrNone, incC },\n\t\t{ Complete, AdrNone, incD },\n\t\t{ Complete, AdrNone, BsubA },\n\t\t{ Complete, AdrNone, CsubB },\n\t\t{ Complete, AdrNone, AsubC },\n\t\t{ Complete, AdrNone, CsubD },\n\t\t{ Complete, AdrNone, AsubnB },\n\t\t{ Complete, AdrNone, BsubnC },\n\t\t{ Complete, AdrNone, CsubnA },\n\t\t{ Complete, AdrNone, DsubnC },\n\t}, { //Bb\n\t\t{ Complete, AdrNone, Ashiftleft },\n\t\t{ Complete, AdrNone, Bshiftleft },\n\t\t{ Complete, AdrNone, Cshiftleft },\n\t\t{ Complete, AdrNone, Dshiftleft },\n\t\t{ Complete, AdrNone, Ashiftright },\n\t\t{ Complete, AdrNone, Bshiftright },\n\t\t{ Complete, AdrNone, Cshiftright },\n\t\t{ Complete, AdrNone, Dshiftright },\n\t\t{ Complete, AdrNone, negateA },\n\t\t{ Complete, AdrNone, negateB },\n\t\t{ Complete, AdrNone, negateC },\n\t\t{ Complete, AdrNone, negateD },\n\t\t{ Complete, AdrNone, notA },\n\t\t{ Complete, AdrNone, notB },\n\t\t{ Complete, AdrNone, notC },\n\t\t{ Complete, AdrNone, notD }\n\t}, { //C\n\t\t{ Complete, FieldA, AaddB },\n\t\t{ Complete, FieldA, BaddC },\n\t\t{ Complete, FieldA, CaddA },\n\t\t{ Complete, FieldA, DaddC },\n\t\t{ Complete, FieldA, AaddA },\n\t\t{ Complete, FieldA, BaddB },\n\t\t{ Complete, FieldA, CaddC },\n\t\t{ Complete, FieldA, DaddD },\n\t\t{ Complete, FieldA, BaddA },\n\t\t{ Complete, FieldA, CaddB },\n\t\t{ Complete, FieldA, AaddC },\n\t\t{ Complete, FieldA, CaddD },\n\t\t{ Complete, FieldA, decA },\n\t\t{ Complete, FieldA, decB },\n\t\t{ Complete, FieldA, decC },\n\t\t{ Complete, FieldA, decD }\n\t}, { //D\n\t\t{ Complete, FieldA, clearA },\n\t\t{ Complete, FieldA, clearB },\n\t\t{ Complete, FieldA, clearC },\n\t\t{ Complete, FieldA, clearD },\n\t\t{ Complete, FieldA, AcopyB },\n\t\t{ Complete, FieldA, BcopyC },\n\t\t{ Complete, FieldA, CcopyA },\n\t\t{ Complete, FieldA, DcopyC },\n\t\t{ Complete, FieldA, BcopyA },\n\t\t{ Complete, FieldA, CcopyB },\n\t\t{ Complete, FieldA, AcopyC },\n\t\t{ Complete, FieldA, CcopyD },\n\t\t{ Complete, FieldA, AswapB },\n\t\t{ Complete, FieldA, BswapC },\n\t\t{ Complete, FieldA, CswapA },\n\t\t{ Complete, FieldA, DswapC }\n\t}, { //E\n\t\t{ Complete, FieldA, AsubB },\n\t\t{ Complete, FieldA, BsubC },\n\t\t{ Complete, FieldA, CsubA },\n\t\t{ Complete, FieldA, DsubC },\n\t\t{ Complete, FieldA, incA },\n\t\t{ Complete, FieldA, incB },\n\t\t{ Complete, FieldA, incC },\n\t\t{ Complete, FieldA, incD },\n\t\t{ Complete, FieldA, BsubA },\n\t\t{ Complete, FieldA, CsubB },\n\t\t{ Complete, FieldA, AsubC },\n\t\t{ Complete, FieldA, CsubD },\n\t\t{ Complete, FieldA, AsubnB },\n\t\t{ Complete, FieldA, BsubnC },\n\t\t{ Complete, FieldA, CsubnA },\n\t\t{ Complete, FieldA, DsubnC }\n\t}, { //F\n\t\t{ Complete, FieldA, Ashiftleft },\n\t\t{ Complete, FieldA, Bshiftleft },\n\t\t{ Complete, FieldA, Cshiftleft },\n\t\t{ Complete, FieldA, Dshiftleft },\n\t\t{ Complete, FieldA, Ashiftright },\n\t\t{ Complete, FieldA, Bshiftright },\n\t\t{ Complete, FieldA, Cshiftright },\n\t\t{ Complete, FieldA, Dshiftright },\n\t\t{ Complete, FieldA, negateA },\n\t\t{ Complete, FieldA, negateB },\n\t\t{ Complete, FieldA, negateC },\n\t\t{ Complete, FieldA, negateD },\n\t\t{ Complete, FieldA, notA },\n\t\t{ Complete, FieldA, notB },\n\t\t{ Complete, FieldA, notC },\n\t\t{ Complete, FieldA, notD }\n\t}\n};\n\nconst int saturn_disassembler::field_adr_af[]=\n{ FieldP, FieldWP, FieldXS, FieldX, FieldS, FieldM, FieldB, FieldW, 0, 0, 0, 0, 0, 0, 0, FieldA };\n\nconst int saturn_disassembler::field_adr_a[]=\n{ FieldP, FieldWP, FieldXS, FieldX, FieldS, FieldM, FieldB, FieldW};\n\nconst int saturn_disassembler::field_adr_b[]=\n{ FieldP, FieldWP, FieldXS, FieldX, FieldS, FieldM, FieldB, FieldW };\n\nsaturn_disassembler::saturn_disassembler(config *conf) : m_config(conf)\n{\n}\n\nu32 saturn_disassembler::opcode_alignment() const\n{\n\treturn 1;\n}\n\noffs_t saturn_disassembler::disassemble(std::ostream &stream, offs_t pc, const data_buffer &opcodes, const data_buffer &params)\n{\n\tint adr=0;\n\n\tint cont=1; // operation still not complete disassembled\n\tchar bin[10]; int binsize=0; // protocollizing fetched nibbles\n\tchar number[17];\n\tconst OPCODE *level=opcs[0]; //pointer to current digit\n\tint op; // currently fetched nibble\n\toffs_t pos = pc;\n\n\tint i,c,v;\n\n\tint mnemonics_bank = m_config->get_nonstandard_mnemonics_mode() ? 1 : 0;\n\n\twhile (cont)\n\t{\n\t\top = opcodes.r8(pos++) & 0xf;\n\t\tlevel+=op;\n\t\tswitch (level->sel) {\n\t\tcase Illegal:\n\t\t\tcont=0;\n\t\t\tbin[binsize++]=number_2_hex[op];\n\t\t\tbin[binsize]=0;\n\t\t\tutil::stream_format(stream, \"???%s\",bin);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbin[binsize++]=number_2_hex[op];\n\t\t\tswitch (level->adr) {\n\t\t\tcase AdrNone: break;\n\t\t\tcase AdrA:\n\t\t\t\tadr=field_adr_a[op];\n\t\t\t\tbreak;\n\t\t\tcase AdrAF:\n\t\t\t\tadr=field_adr_af[op];\n\t\t\t\tbreak;\n\t\t\tcase AdrB:\n\t\t\t\tadr=field_adr_b[op&7];\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tcont = 0;\n\t\t\t\tbin[binsize++]=number_2_hex[op];\n\t\t\t\tbin[binsize]=0;\n\t\t\t\tutil::stream_format(stream, \"???%s\",bin);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase Complete:\n\t\t\tcont=0;\n\t\t\tswitch (level->adr==AdrNone?adr:level->adr) {\n\t\t\tcase AdrNone:\n\t\t\t\tstream << mnemonics[level->mnemonic][mnemonics_bank];\n\t\t\t\tbreak;\n\t\t\tcase Imm:\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], opcodes.r8(pos++));\n\t\t\t\tbreak;\n\t\t\tcase ImmCount:\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], opcodes.r8(pos++)+1);\n\t\t\t\tbreak;\n\t\t\tcase AdrImmCount:\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], field_2_string(adr), opcodes.r8(pos++)+1);\n\t\t\t\tbreak;\n\t\t\tcase AdrCount: // mnemonics have string %s for address field\n\t\t\t\tsnprintf(number,sizeof(number),\"%x\",opcodes.r8(pos++)+1);\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], number);\n\t\t\t\tbreak;\n\t\t\tcase Imm2:\n\t\t\t\tv=opcodes.r8(pos++);\n\t\t\t\tv|=opcodes.r8(pos++)<<4;\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], v);\n\t\t\t\tbreak;\n\t\t\tcase Imm4:\n\t\t\t\tv=opcodes.r8(pos++);\n\t\t\t\tv|=opcodes.r8(pos++)<<4;\n\t\t\t\tv|=opcodes.r8(pos++)<<8;\n\t\t\t\tv|=opcodes.r8(pos++)<<12;\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], v);\n\t\t\t\tbreak;\n\t\t\tcase Imm5:\n\t\t\t\tv=opcodes.r8(pos++);\n\t\t\t\tv|=opcodes.r8(pos++)<<4;\n\t\t\t\tv|=opcodes.r8(pos++)<<8;\n\t\t\t\tv|=opcodes.r8(pos++)<<12;\n\t\t\t\tv|=opcodes.r8(pos++)<<16;\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], v);\n\t\t\t\tbreak;\n\t\t\tcase ImmCload:\n\t\t\t\tc=i=opcodes.r8(pos++) & 0xf;\n\t\t\t\tnumber[i+1]=0;\n\t\t\t\tfor (;i>=0; i--) number[i]=number_2_hex[opcodes.r8(pos++) & 0xf];\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], c+1, number);\n\t\t\t\tbreak;\n\t\t\tcase Dis3:\n\t\t\t\tSATURN_PEEKOP_DIS12(v);\n\t\t\t\tc=(pc+pos-3+v)&0xfffff;\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], c );\n\t\t\t\tbreak;\n\t\t\tcase Dis3Call:\n\t\t\t\tSATURN_PEEKOP_DIS12(v);\n\t\t\t\tc=(pc+pos+v)&0xfffff;\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], c );\n\t\t\t\tbreak;\n\t\t\tcase Dis4:\n\t\t\t\tSATURN_PEEKOP_DIS16(v);\n\t\t\t\tc=(pc+pos-4+v)&0xfffff;\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], c );\n\t\t\t\tbreak;\n\t\t\tcase Dis4Call:\n\t\t\t\tSATURN_PEEKOP_DIS16(v);\n\t\t\t\tc=(pc+pos+v)&0xfffff;\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], c );\n\t\t\t\tbreak;\n\t\t\tcase Abs:\n\t\t\t\tSATURN_PEEKOP_ADR(v);\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], v );\n\t\t\t\tbreak;\n\t\t\tcase BranchReturn:\n\t\t\t\tSATURN_PEEKOP_DIS8(v);\n\t\t\t\tif (v==0) {\n\t\t\t\t\tstream << mnemonics[level->mnemonic+1][mnemonics_bank];\n\t\t\t\t} else {\n\t\t\t\t\tc=(pc+pos-2+v)&0xfffff;\n\t\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], c);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase ABranchReturn:\n\t\t\t\tSATURN_PEEKOP_DIS8(v);\n\t\t\t\tif (v==0) {\n\t\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic+1][mnemonics_bank], A);\n\t\t\t\t} else {\n\t\t\t\t\tc=(pc+pos-2+v)&0xfffff;\n\t\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], A, c);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase xBranchReturn:\n\t\t\t\tSATURN_PEEKOP_DIS8(v);\n\t\t\t\tif (v==0) {\n\t\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic+1][mnemonics_bank], field_2_string(adr));\n\t\t\t\t} else {\n\t\t\t\t\tc=(pc+pos-2+v)&0xfffff;\n\t\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], field_2_string(adr), c);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase TestBranchRet:\n\t\t\t\ti=opcodes.r8(pos++);\n\t\t\t\tSATURN_PEEKOP_DIS8(v);\n\t\t\t\tif (v==0) {\n\t\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic+1][mnemonics_bank], i);\n\t\t\t\t} else {\n\t\t\t\t\tc=(pc+pos-2+v)&0xfffff;\n\t\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], i, c);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase ImmBranch:\n\t\t\t\ti=opcodes.r8(pos++);\n\t\t\t\tSATURN_PEEKOP_DIS8(v);\n\t\t\t\tc=(pc+pos-2+v)&0xfffff;\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], i, c);\n\t\t\t\tbreak;\n\t\t\tcase FieldP:\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], P );\n\t\t\t\tbreak;\n\t\t\tcase FieldWP:\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], WP );\n\t\t\t\tbreak;\n\t\t\tcase FieldXS:\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], XS );\n\t\t\t\tbreak;\n\t\t\tcase FieldX:\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], X );\n\t\t\t\tbreak;\n\t\t\tcase FieldS:\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], S );\n\t\t\t\tbreak;\n\t\t\tcase FieldM:\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], M );\n\t\t\t\tbreak;\n\t\t\tcase FieldB:\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], B );\n\t\t\t\tbreak;\n\t\t\tcase FieldA:\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], A );\n\t\t\t\tbreak;\n\t\t\tcase FieldW:\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], W );\n\t\t\t\tbreak;\n\t\t\tcase AdrA:\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], adr_a[opcodes.r8(pos++) & 0x7] );\n\t\t\t\tbreak;\n\t\t\tcase AdrAF:\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], adr_af[opcodes.r8(pos++) & 0xf] );\n\t\t\t\tbreak;\n\t\t\tcase AdrB:\n\t\t\t\tutil::stream_format(stream, mnemonics[level->mnemonic][mnemonics_bank], adr_b[opcodes.r8(pos++) & 0x7] );\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\tlevel = opcs[level->sel];\n\t}\n\n\treturn pos - pc;\n}\n"} +{"text": "fileFormatVersion: 2\nguid: 3d19ef31c4b26684788a0135dfb455c0\nTextureImporter:\n fileIDToRecycleName: {}\n externalObjects: {}\n serializedVersion: 7\n mipmaps:\n mipMapMode: 0\n enableMipMap: 0\n sRGBTexture: 1\n linearTexture: 0\n fadeOut: 0\n borderMipMap: 0\n mipMapsPreserveCoverage: 0\n alphaTestReferenceValue: 0.5\n mipMapFadeDistanceStart: 1\n mipMapFadeDistanceEnd: 3\n bumpmap:\n convertToNormalMap: 0\n externalNormalMap: 0\n heightScale: 0.25\n normalMapFilter: 0\n isReadable: 0\n streamingMipmaps: 0\n streamingMipmapsPriority: 0\n grayScaleToAlpha: 0\n generateCubemap: 6\n cubemapConvolution: 0\n seamlessCubemap: 0\n textureFormat: 1\n maxTextureSize: 2048\n textureSettings:\n serializedVersion: 2\n filterMode: -1\n aniso: -1\n mipBias: -100\n wrapU: 1\n wrapV: 1\n wrapW: -1\n nPOTScale: 0\n lightmap: 0\n compressionQuality: 50\n spriteMode: 1\n spriteExtrude: 1\n spriteMeshType: 1\n alignment: 4\n spritePivot: {x: 0.5, y: 0.5}\n spritePixelsToUnits: 100\n spriteBorder: {x: 0, y: 0, z: 0, w: 0}\n spriteGenerateFallbackPhysicsShape: 0\n alphaUsage: 1\n alphaIsTransparency: 1\n spriteTessellationDetail: -1\n textureType: 8\n textureShape: 1\n singleChannelComponent: 0\n maxTextureSizeSet: 0\n compressionQualitySet: 0\n textureFormatSet: 0\n platformSettings:\n - serializedVersion: 2\n buildTarget: DefaultTexturePlatform\n maxTextureSize: 2048\n resizeAlgorithm: 0\n textureFormat: -1\n textureCompression: 1\n compressionQuality: 50\n crunchedCompression: 0\n allowsAlphaSplitting: 0\n overridden: 0\n androidETC2FallbackOverride: 0\n - serializedVersion: 2\n buildTarget: Standalone\n maxTextureSize: 2048\n resizeAlgorithm: 0\n textureFormat: -1\n textureCompression: 1\n compressionQuality: 50\n crunchedCompression: 0\n allowsAlphaSplitting: 0\n overridden: 0\n androidETC2FallbackOverride: 0\n - serializedVersion: 2\n buildTarget: iPhone\n maxTextureSize: 2048\n resizeAlgorithm: 0\n textureFormat: -1\n textureCompression: 1\n compressionQuality: 50\n crunchedCompression: 0\n allowsAlphaSplitting: 0\n overridden: 0\n androidETC2FallbackOverride: 0\n - serializedVersion: 2\n buildTarget: Android\n maxTextureSize: 2048\n resizeAlgorithm: 0\n textureFormat: -1\n textureCompression: 1\n compressionQuality: 50\n crunchedCompression: 0\n allowsAlphaSplitting: 0\n overridden: 0\n androidETC2FallbackOverride: 0\n spriteSheet:\n serializedVersion: 2\n sprites: []\n outline: []\n physicsShape: []\n bones: []\n spriteID: d1b31e1a8789dd34780b7422aa5bfcb1\n vertices: []\n indices: \n edges: []\n weights: []\n spritePackingTag: \n pSDRemoveMatte: 0\n pSDShowRemoveMatteOption: 0\n userData: \n assetBundleName: \n assetBundleVariant: \n"} +{"text": "/*--------------------------------------------------------------------------\n\nThreadBox - Recursive Worker Threads in NodeJS\n\nThe MIT License (MIT)\n\nCopyright (c) 2020 Haydn Paterson (sinclair) <haydn.developer@gmail.com>\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the 'Software'), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n---------------------------------------------------------------------------*/\n\nexport { ThreadRegistry } from './registry'\nexport { ThreadLocal } from './local'\nexport { ThreadHandle, ThreadResourceLimits } from './handle'\n\n"} +{"text": "package versions // import \"github.com/docker/docker/api/types/versions\"\n\nimport (\n\t\"strconv\"\n\t\"strings\"\n)\n\n// compare compares two version strings\n// returns -1 if v1 < v2, 1 if v1 > v2, 0 otherwise.\nfunc compare(v1, v2 string) int {\n\tvar (\n\t\tcurrTab = strings.Split(v1, \".\")\n\t\totherTab = strings.Split(v2, \".\")\n\t)\n\n\tmax := len(currTab)\n\tif len(otherTab) > max {\n\t\tmax = len(otherTab)\n\t}\n\tfor i := 0; i < max; i++ {\n\t\tvar currInt, otherInt int\n\n\t\tif len(currTab) > i {\n\t\t\tcurrInt, _ = strconv.Atoi(currTab[i])\n\t\t}\n\t\tif len(otherTab) > i {\n\t\t\totherInt, _ = strconv.Atoi(otherTab[i])\n\t\t}\n\t\tif currInt > otherInt {\n\t\t\treturn 1\n\t\t}\n\t\tif otherInt > currInt {\n\t\t\treturn -1\n\t\t}\n\t}\n\treturn 0\n}\n\n// LessThan checks if a version is less than another\nfunc LessThan(v, other string) bool {\n\treturn compare(v, other) == -1\n}\n\n// LessThanOrEqualTo checks if a version is less than or equal to another\nfunc LessThanOrEqualTo(v, other string) bool {\n\treturn compare(v, other) <= 0\n}\n\n// GreaterThan checks if a version is greater than another\nfunc GreaterThan(v, other string) bool {\n\treturn compare(v, other) == 1\n}\n\n// GreaterThanOrEqualTo checks if a version is greater than or equal to another\nfunc GreaterThanOrEqualTo(v, other string) bool {\n\treturn compare(v, other) >= 0\n}\n\n// Equal checks if a version is equal to another\nfunc Equal(v, other string) bool {\n\treturn compare(v, other) == 0\n}\n"} +{"text": "/*\n*******************************************************************************\n* Copyright (C) 2011-2012, International Business Machines\n* Corporation and others. All Rights Reserved.\n*******************************************************************************\n* file name: uposixdefs.h\n* encoding: US-ASCII\n* tab size: 8 (not used)\n* indentation:4\n*\n* created on: 2011jul25\n* created by: Markus W. Scherer\n*\n* Common definitions for implementation files working with POSIX functions.\n* *Important*: #include this file before any other header files!\n*/\n\n#ifndef __UPOSIXDEFS_H__\n#define __UPOSIXDEFS_H__\n\n/*\n * Define _XOPEN_SOURCE for access to POSIX functions.\n *\n * We cannot use U_PLATFORM from platform.h/utypes.h because\n * \"The Open Group Base Specifications\"\n * chapter \"2.2 The Compilation Environment\" says:\n * \"In the compilation of an application that #defines a feature test macro\n * specified by IEEE Std 1003.1-2001,\n * no header defined by IEEE Std 1003.1-2001 shall be included prior to\n * the definition of the feature test macro.\"\n */\n#ifdef _XOPEN_SOURCE\n /* Use the predefined value. */\n#else\n /*\n * Version 6.0:\n * The Open Group Base Specifications Issue 6 (IEEE Std 1003.1, 2004 Edition)\n * also known as\n * SUSv3 = Open Group Single UNIX Specification, Version 3 (UNIX03)\n *\n * Note: This definition used to be in C source code (e.g., putil.c)\n * and define _XOPEN_SOURCE to different values depending on __STDC_VERSION__.\n * In C++ source code (e.g., putil.cpp), __STDC_VERSION__ is not defined at all.\n */\n# define _XOPEN_SOURCE 600\n#endif\n\n/*\n * Make sure things like readlink and such functions work.\n * Poorly upgraded Solaris machines can't have this defined.\n * Cleanly installed Solaris can use this #define.\n *\n * z/OS needs this definition for timeval and to get usleep.\n */\n#if !defined(_XOPEN_SOURCE_EXTENDED)\n# define _XOPEN_SOURCE_EXTENDED 1\n#endif\n\n/*\n * There is an issue with turning on _XOPEN_SOURCE_EXTENDED on certain platforms.\n * A compatibility issue exists between turning on _XOPEN_SOURCE_EXTENDED and using\n * standard C++ string class. As a result, standard C++ string class needs to be\n * turned off for the follwing platforms:\n * -AIX/VACPP\n * -Solaris/GCC\n */\n#if (U_PLATFORM == U_PF_AIX && !defined(__GNUC__)) || (U_PLATFORM == U_PF_SOLARIS && defined(__GNUC__))\n# if _XOPEN_SOURCE_EXTENDED && !defined(U_HAVE_STD_STRING)\n# define U_HAVE_STD_STRING 0\n# endif\n#endif\n\n#endif /* __UPOSIXDEFS_H__ */\n"} +{"text": "package org.wikidata.wdtk.datamodel.interfaces;\n\n/*\n * #%L\n * Wikidata Toolkit Data Model\n * %%\n * Copyright (C) 2014 Wikidata Toolkit Developers\n * %%\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * #L%\n */\n\nimport java.util.Collection;\nimport java.util.List;\n\n/**\n * A snak group represents an ordered list of {@link Snak} objects that use the\n * same property.\n * \n * @author Markus Kroetzsch\n * \n */\npublic interface SnakGroup extends Collection<Snak> {\n\n\t/**\n\t * Get the list of Snaks of this group.\n\t * \n\t * @return a list of Snaks\n\t */\n\tList<Snak> getSnaks();\n\n\t/**\n\t * Get the property used by each snak in this group.\n\t * \n\t * @return a PropertyIdValue\n\t */\n\tPropertyIdValue getProperty();\n\n}"} +{"text": "// Copyright (c) Committed Software 2018, opensource@committed.io\npackage uk.gov.dstl.baleen.annotators.cleaners;\n\nimport static org.junit.Assert.assertEquals;\n\nimport org.apache.uima.analysis_engine.AnalysisEngine;\nimport org.apache.uima.fit.factory.AnalysisEngineFactory;\nimport org.apache.uima.fit.util.JCasUtil;\nimport org.apache.uima.jcas.JCas;\nimport org.junit.Test;\n\nimport uk.gov.dstl.baleen.annotators.testing.Annotations;\nimport uk.gov.dstl.baleen.annotators.testing.AnnotatorTestBase;\nimport uk.gov.dstl.baleen.types.common.Person;\nimport uk.gov.dstl.baleen.types.semantic.Location;\nimport uk.gov.dstl.baleen.types.semantic.Temporal;\n\npublic class DiscardEntityWithSameIdTest extends AnnotatorTestBase {\n\n @Test\n public void testDuplicateRemoved() throws Exception {\n AnalysisEngine rneAE = AnalysisEngineFactory.createEngine(DiscardEntityWithSameId.class);\n\n populateJCas(jCas);\n rneAE.process(jCas);\n\n // duplicate person removed\n assertEquals(1, JCasUtil.select(jCas, Person.class).size());\n }\n\n @Test\n public void testNonDuplicatesUnaffected() throws Exception {\n AnalysisEngine rneAE = AnalysisEngineFactory.createEngine(DiscardEntityWithSameId.class);\n\n populateJCas(jCas);\n rneAE.process(jCas);\n\n assertEquals(1, JCasUtil.select(jCas, Temporal.class).size());\n assertEquals(1, JCasUtil.select(jCas, Location.class).size());\n }\n\n private void populateJCas(JCas jCas) {\n jCas.setDocumentText(\"Eliza was born in December 1972 in Oxford\");\n\n Annotations.createTemporal(jCas, 18, 31, \"December 1972\");\n\n Annotations.createLocation(jCas, 35, 41, \"Oxford\", null);\n\n // deliberate creation of 2 identical people\n Person eliza1 = Annotations.createPerson(jCas, 0, 5, \"Eliza\");\n Person eliza2 = Annotations.createPerson(jCas, 0, 5, \"Eliza\");\n\n // externalId is based on hash of entity properties\n assertEquals(eliza1.getExternalId(), eliza2.getExternalId());\n assertEquals(2, JCasUtil.select(jCas, Person.class).size());\n assertEquals(1, JCasUtil.select(jCas, Temporal.class).size());\n assertEquals(1, JCasUtil.select(jCas, Location.class).size());\n }\n}\n"} +{"text": "/*\nThe eXtended Keccak Code Package (XKCP)\nhttps://github.com/XKCP/XKCP\n\nKravatte, designed by Guido Bertoni, Joan Daemen, Seth Hoffert, Michaël Peeters, Gilles Van Assche and Ronny Van Keer.\n\nImplementation by Ronny Van Keer, hereby denoted as \"the implementer\".\n\nFor more information, feedback or questions, please refer to the Keccak Team website:\nhttps://keccak.team/\n\nTo the extent possible under law, the implementer has waived all copyright\nand related or neighboring rights to the source code in this file.\nhttp://creativecommons.org/publicdomain/zero/1.0/\n*/\n\n#ifndef _KravatteModes_h_\n#define _KravatteModes_h_\n\n#include \"config.h\"\n#ifdef XKCP_has_KeccakP1600\n\n#include <stddef.h>\n#include <stdint.h>\n#include \"align.h\"\n#include \"Kravatte.h\"\n\n/**\n * Kravatte-SANE Tag Length in bytes.\n */\n#define Kravatte_SANE_TagLength 16\n\n/**\n * Definition of the constant l.\n */\n#define Kravatte_SANE_l 8\n\ntypedef struct {\n Kravatte_Instance kravatte;\n unsigned int e;\n} Kravatte_SANE_Instance;\n\n\n/**\n * Function to initialize a Kravatte SANE instance with given key and nonce.\n * @param kvInstance Pointer to the instance to be initialized.\n * @param Key Pointer to the key (K).\n * @param KeyBitLen The length of the key in bits.\n * @param Nonce Pointer to the nonce (N).\n * @param NonceBitLen The length of the nonce in bits.\n * @param tag The buffer where to store the tag.\n * This buffer must be minimum Kravatte_SANE_TagLength bytes long.\n * @return 0 if successful, 1 otherwise.\n */\nint Kravatte_SANE_Initialize(Kravatte_SANE_Instance *kvInstance, const BitSequence *Key, BitLength KeyBitLen, \n const BitSequence *Nonce, BitLength NonceBitLen, unsigned char *tag);\n\n/**\n * Function to wrap plaintext into ciphertext.\n * @param kvInstance Pointer to the instance initialized by Kravatte_SANE_Initialize().\n * @param plaintext Pointer to plaintext data to wrap.\n * @param ciphertext Pointer to buffer where the full wrapped data will be stored.\n * The ciphertext buffer must not overlap plaintext.\n * @param dataBitLen The size of the plaintext/ciphertext data.\n * @param AD Pointer to the Associated Data.\n * @param ADBitLen The number of bytes provided in the Associated Data.\n * @param tag The buffer where to store the tag.\n * This buffer must be minimum Kravatte_SANE_TagLength bytes long.\n * @return 0 if successful, 1 otherwise.\n */\nint Kravatte_SANE_Wrap(Kravatte_SANE_Instance *kvInstance, const BitSequence *plaintext, BitSequence *ciphertext, BitLength dataBitLen, \n const BitSequence *AD, BitLength ADBitLen, unsigned char *tag);\n\n/**\n * Function to unwrap ciphertext into plaintext.\n * @param kvInstance Pointer to the instance initialized by Kravatte_SANE_Initialize().\n * @param ciphertext Pointer to ciphertext data to unwrap.\n * @param plaintext Pointer to buffer where the full unwrapped data will be stored.\n * The plaintext buffer must not overlap ciphertext.\n * @param dataBitLen The size of the ciphertext/plaintext data.\n * @param AD Pointer to the Associated Data.\n * @param ADBitLen The number of bytes provided in the Associated Data.\n * @param tag The buffer where to read the tag to check (when lastFlag is set).\n * This buffer must be minimum Kravatte_SANE_TagLength bytes long.\n * @return 0 if successful, 1 otherwise.\n */\nint Kravatte_SANE_Unwrap(Kravatte_SANE_Instance *kvInstance, const BitSequence *ciphertext, BitSequence *plaintext, BitLength dataBitLen, \n const BitSequence *AD, BitLength ADBitLen, const unsigned char *tag);\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Kravatte-SANSE Tag Length in bytes.\n */\n#define Kravatte_SANSE_TagLength 32\n\ntypedef struct {\n Kravatte_Instance kravatte;\n unsigned int e;\n} Kravatte_SANSE_Instance;\n\n\n/**\n * Function to initialize a Kravatte SANSE instance with given key and nonce.\n * @param kvInstance Pointer to the instance to be initialized.\n * @param Key Pointer to the key (K).\n * @param KeyBitLen The length of the key in bits.\n * @return 0 if successful, 1 otherwise.\n */\nint Kravatte_SANSE_Initialize(Kravatte_SANSE_Instance *kvInstance, const BitSequence *Key, BitLength KeyBitLen);\n\n/**\n * Function to wrap plaintext into ciphertext.\n * @param kvInstance Pointer to the instance initialized by Kravatte_SANSE_Initialize().\n * @param plaintext Pointer to plaintext data to wrap.\n * @param ciphertext Pointer to buffer where the full wrapped data will be stored.\n * The ciphertext buffer must not overlap plaintext.\n * @param dataBitLen The size of the plaintext/ciphertext data.\n * @param AD Pointer to the Associated Data.\n * @param ADBitLen The number of bytes provided in the Associated Data.\n * @param tag The buffer where to store the tag.\n * This buffer must be minimum Kravatte_SANSE_TagLength bytes long.\n * @return 0 if successful, 1 otherwise.\n */\nint Kravatte_SANSE_Wrap(Kravatte_SANSE_Instance *kvInstance, const BitSequence *plaintext, BitSequence *ciphertext, BitLength dataBitLen, \n const BitSequence *AD, BitLength ADBitLen, unsigned char *tag);\n\n/**\n * Function to unwrap ciphertext into plaintext.\n * @param kvInstance Pointer to the instance initialized by Kravatte_SANSE_Initialize().\n * @param ciphertext Pointer to ciphertext data to unwrap.\n * @param plaintext Pointer to buffer where the full unwrapped data will be stored.\n * The plaintext buffer must not overlap ciphertext.\n * @param dataBitLen The size of the ciphertext/plaintext data.\n * @param AD Pointer to the Associated Data.\n * @param ADBitLen The number of bytes provided in the Associated Data.\n * @param tag The buffer where to read the tag to check (when lastFlag is set).\n * This buffer must be minimum Kravatte_SANSE_TagLength bytes long.\n * @return 0 if successful, 1 otherwise.\n */\nint Kravatte_SANSE_Unwrap(Kravatte_SANSE_Instance *kvInstance, const BitSequence *ciphertext, BitSequence *plaintext, BitLength dataBitLen, \n const BitSequence *AD, BitLength ADBitLen, const unsigned char *tag);\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Definition of the constant l, used to split the input into two parts.\n * The left part of the input will be a multiple of l bits.\n */\n#define Kravatte_WBC_l 8\n\n/**\n * Definition of the constant b block length.\n */\n#define Kravatte_WBC_b (SnP_widthInBytes*8)\n\n/**\n * Macro to initialize a Kravatte_WBC instance with given key.\n * @param kvw Pointer to the instance to be initialized.\n * @param Key Pointer to the key (K).\n * @param KeyBitLen The length of the key in bits.\n * @return 0 if successful, 1 otherwise.\n */\n#define Kravatte_WBC_Initialize(kvw, Key, KeyBitLen) Kravatte_MaskDerivation(kvw, Key, KeyBitLen)\n\n/**\n * Function to encipher plaintext into ciphertext.\n * @param kvInstance Pointer to the instance initialized by Kravatte_WBC_Initialize().\n * @param plaintext Pointer to plaintext data to encipher.\n * @param ciphertext Pointer to buffer where the enciphered data will be stored.\n * The ciphertext buffer must not overlap plaintext.\n * @param dataBitLen The size in bits of the plaintext/ciphertext data.\n * @param W Pointer to the tweak W.\n * @param WBitLen The number of bits provided in the tweak.\n * @return 0 if successful, 1 otherwise.\n */\nint Kravatte_WBC_Encipher(Kravatte_Instance *kvwInstance, const BitSequence *plaintext, BitSequence *ciphertext, BitLength dataBitLen, \n const BitSequence *W, BitLength WBitLen);\n\n/**\n * Function to decipher ciphertext into plaintext.\n * @param kvInstance Pointer to the instance initialized by Kravatte_WBC_Initialize().\n * @param ciphertext Pointer to ciphertext data to decipher.\n * @param plaintext Pointer to buffer where the deciphered data will be stored.\n * The plaintext buffer must not overlap ciphertext.\n * @param dataBitLen The size in bits of the plaintext/ciphertext data.\n * @param W Pointer to the tweak W.\n * @param WBitLen The number of bits provided in the tweak.\n * @return 0 if successful, 1 otherwise.\n */\nint Kravatte_WBC_Decipher(Kravatte_Instance *kvwInstance, const BitSequence *ciphertext, BitSequence *plaintext, BitLength dataBitLen, \n const BitSequence *W, BitLength WBitLen);\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Definition of the constant t, expansion length (in bits).\n */\n#define Kravatte_WBCAE_t 128\n\n/**\n * Macro to initialize a Kravatte_WBC instance with given key.\n * @param kvw Pointer to the instance to be initialized.\n * @param Key Pointer to the key (K).\n * @param KeyBitLen The length of the key in bits.\n * @return 0 if successful, 1 otherwise.\n */\n#define Kravatte_WBCAE_Initialize(kvw, Key, KeyBitLen) Kravatte_MaskDerivation(kvw, Key, KeyBitLen)\n\n/**\n * Function to encipher plaintext into ciphertext.\n * @param kvInstance Pointer to the instance initialized by Kravatte_WBC_Initialize().\n * @param plaintext Pointer to plaintext data to encipher.\n * The last ::Kravatte_WBCAE_t bits of the buffer will be overwritten with zeros.\n * @param ciphertext Pointer to buffer where the enciphered data will be stored.\n * The ciphertext buffer must not overlap plaintext.\n * Ciphertext will be ::Kravatte_WBCAE_t bits longer than plaintext.\n * @param dataBitLen The size in bits of the plaintext data.\n * Plaintext and ciphertext buffers must be ::Kravatte_WBCAE_t bits longer than dataBitLen.\n * @param AD Pointer to the metadata AD.\n * @param ADBitLen The number of bits provided in the metadata.\n * @return 0 if successful, 1 otherwise.\n */\nint Kravatte_WBCAE_Encipher(Kravatte_Instance *kvwInstance, BitSequence *plaintext, BitSequence *ciphertext, BitLength dataBitLen, \n const BitSequence *AD, BitLength ADBitLen);\n\n/**\n * Function to decipher ciphertext into plaintext.\n * @param kvInstance Pointer to the instance initialized by Kravatte_WBC_Initialize().\n * @param ciphertext Pointer to ciphertext data to decipher.\n * Ciphertext is ::Kravatte_WBCAE_t bits longer than plaintext.\n * @param plaintext Pointer to buffer where the deciphered data will be stored.\n * The plaintext buffer must not overlap ciphertext.\n * @param dataBitLen The size in bits of the plaintext data.\n * Ciphertext and plaintext buffers must be ::Kravatte_WBCAE_t bits longer than dataBitLen.\n * @param AD Pointer to the metadata AD.\n * @param ADBitLen The number of bits provided in the metadata.\n * @return 0 if successful, 1 otherwise.\n */\nint Kravatte_WBCAE_Decipher(Kravatte_Instance *kvwInstance, const BitSequence *ciphertext, BitSequence *plaintext, BitLength dataBitLen, \n const BitSequence *AD, BitLength ADBitLen);\n\n#else\n#error This requires an implementation of Keccak-p[1600]\n#endif\n\n#endif\n"} +{"text": "EXAMPLE O84_4\nHYPOTHESES:\n POINT P Q;\n MIDPOINT E P Q;\n ON_BLINE N P Q;\n INTERSECTION_LC D E N N P;\n INTERSECTION_TT A P P N Q Q N;\n# INTERSECTION_LT A P P N Q Q N;\n# MIDPOINT O A D;\n# INTERSECTION_LC B A P O A;\n# INTERSECTION_LC C A Q O A;\n FOOT B D A P;\n FOOT C D A Q;\nSHOW: EQANGLE A B E E B C.\n\n"} +{"text": "#ifndef PRINTF_H\n#define PRINTF_H\n\nint vsprintf(char *buf, const char *fmt, va_list args);\nint sprintf(char *buf, const char *fmt, ...);\nint vprintf(const char *fmt, va_list args);\nint printf(const char *fmt, ...);\nint puts(const char *str);\n#endif\n"} +{"text": "PetscFE Object: Q1 1 MPI processes\n type: basic\n Basic Finite Element in 2 dimensions with 3 components\n PetscSpace Object: Q1 1 MPI processes\n type: poly\n Space in 2 variables with 3 components, size 12\n Tensor polynomial space of degree 1\n PetscDualSpace Object: Q1 1 MPI processes\n type: lagrange\n Dual space with 3 components, size 12\n Continuous tensor Lagrange dual space\n Quadrature of order 3 on 4 points (dim 2)\nPetscFE Object: Q2 1 MPI processes\n type: basic\n Basic Finite Element in 2 dimensions with 3 components\n PetscSpace Object: Q2 1 MPI processes\n type: poly\n Space in 2 variables with 3 components, size 27\n Tensor polynomial space of degree 2\n PetscDualSpace Object: Q2 1 MPI processes\n type: lagrange\n Dual space with 3 components, size 27\n Continuous tensor Lagrange dual space\n Quadrature of order 5 on 9 points (dim 2)\n"} +{"text": "/* To learn more about this file see: https://angular.io/config/tsconfig. */\n{\n \"extends\": \"./tsconfig.json\",\n \"compilerOptions\": {\n \"outDir\": \"./out-tsc/app\",\n \"types\": []\n },\n \"files\": [\n \"src/main.ts\",\n \"src/polyfills.ts\"\n ],\n \"include\": [\n \"src/**/*.d.ts\"\n ]\n}\n"} +{"text": "// Copyright 2020 The Defold Foundation\n// Licensed under the Defold License version 1.0 (the \"License\"); you may not use\n// this file except in compliance with the License.\n// \n// You may obtain a copy of the License, together with FAQs at\n// https://www.defold.com/license\n// \n// Unless required by applicable law or agreed to in writing, software distributed\n// under the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR\n// CONDITIONS OF ANY KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations under the License.\n\n#ifndef RESOURCE_ARCHIVE_PRIVATE_H\n#define RESOURCE_ARCHIVE_PRIVATE_H\n\n#include <stdio.h>\n#include <stdint.h>\n\n#include \"resource_archive.h\"\n#include <dlib/path.h>\n\n#define MD5_SIZE (16)\n\nnamespace dmResourceArchive\n{\n enum EntryFlag\n {\n ENTRY_FLAG_ENCRYPTED = 1 << 0,\n ENTRY_FLAG_COMPRESSED = 1 << 1,\n ENTRY_FLAG_LIVEUPDATE_DATA = 1 << 2,\n };\n\n struct DM_ALIGNED(16) ArchiveIndex\n {\n ArchiveIndex()\n {\n memset(this, 0, sizeof(ArchiveIndex));\n }\n\n uint32_t m_Version;\n uint32_t m_Pad;\n uint64_t m_Userdata;\n uint32_t m_EntryDataCount;\n uint32_t m_EntryDataOffset;\n uint32_t m_HashOffset;\n uint32_t m_HashLength;\n uint8_t m_ArchiveIndexMD5[MD5_SIZE];\n };\n\n struct ArchiveIndexContainer\n {\n ArchiveIndexContainer()\n {\n memset(this, 0, sizeof(ArchiveIndexContainer));\n }\n\n ArchiveIndex* m_ArchiveIndex; // this could be mem-mapped or loaded into memory from file\n bool m_IsMemMapped;\n bool m_ResourcesMemMapped;\n bool m_LiveUpdateResourcesMemMapped;\n\n /// Used if the archive is loaded from file (bundled archive)\n uint8_t* m_Hashes;\n EntryData* m_Entries;\n uint8_t* m_ResourceData; // mem-mapped game.arcd\n FILE* m_FileResourceData; // game.arcd file handle\n\n /// Resources acquired with LiveUpdate\n char m_LiveUpdateResourcePath[DMPATH_MAX_PATH];\n uint8_t* m_LiveUpdateResourceData; // mem-mapped liveupdate.arcd\n uint32_t m_LiveUpdateResourceSize;\n FILE* m_LiveUpdateFileResourceData; // liveupdate.arcd file handle\n };\n\n\tstruct LiveUpdateEntries {\n LiveUpdateEntries(const uint8_t* hashes, uint32_t hash_len, EntryData* entry_datas, uint32_t num_entries) {\n m_Hashes = hashes;\n m_HashLen = hash_len;\n m_Entries = entry_datas;\n m_Count = num_entries;\n }\n\n LiveUpdateEntries() {\n memset(this, 0, sizeof(LiveUpdateEntries));\n }\n\n const uint8_t* m_Hashes;\n uint32_t m_HashLen;\n EntryData* m_Entries;\n uint32_t m_Count;\n };\n\t\n\tResult ShiftAndInsert(ArchiveIndexContainer* archive_container, ArchiveIndex* archive, const uint8_t* hash_digest, uint32_t hash_digest_len, int insertion_index, const dmResourceArchive::LiveUpdateResource* resource, const EntryData* entry);\n\n\tResult WriteResourceToArchive(ArchiveIndexContainer*& archive, const uint8_t* buf, uint32_t buf_len, uint32_t& bytes_written, uint32_t& offset);\n\n\tvoid NewArchiveIndexFromCopy(ArchiveIndex*& dst, ArchiveIndexContainer* src, uint32_t extra_entries_alloc);\n\n Result GetInsertionIndex(HArchiveIndexContainer archive, const uint8_t* hash_digest, int* index);\n\t\n Result GetInsertionIndex(ArchiveIndex* archive, const uint8_t* hash_digest, const uint8_t* hashes, int* index);\n\n void CacheLiveUpdateEntries(const ArchiveIndexContainer* archive_container, const ArchiveIndexContainer* bundled_archive_container, LiveUpdateEntries* lu_hashes_entries);\n\n uint32_t GetEntryDataOffset(ArchiveIndexContainer* archive_container);\n\n uint32_t GetEntryDataOffset(ArchiveIndex* archive);\n\n void Delete(ArchiveIndex* archive);\n\n}\n#endif // RESOURCE_ARCHIVE_PRIVATE_H"} +{"text": "\r\n// Copyright Aleksey Gurtovoy 2002-2004\r\n//\r\n// Distributed under the Boost Software License, Version 1.0. \r\n// (See accompanying file LICENSE_1_0.txt or copy at \r\n// http://www.boost.org/LICENSE_1_0.txt)\r\n//\r\n// See http://www.boost.org/libs/mpl for documentation.\r\n\r\n// $Id: deque.cpp 49268 2008-10-11 06:26:17Z agurtovoy $\r\n// $Date: 2008-10-10 23:26:17 -0700 (Fri, 10 Oct 2008) $\r\n// $Revision: 49268 $\r\n\r\n#define BOOST_MPL_PREPROCESSING_MODE\r\n#include <boost/config.hpp>\r\n#include <boost/mpl/deque.hpp>\r\n"} +{"text": "\n%dx.types.Handle = type { i8* }\n%dx.types.CBufRet.i32 = type { i32, i32, i32, i32 }\n%dx.types.i8x224 = type { [224 x i8] }\n\ndefine void @main() {\nentry:\n %dx.v32.x01 = alloca [24 x i32], align 4\n %0 = call %dx.types.Handle @dx.op.createHandle(i32 57, i8 2, i32 0, i32 0, i1 false)\n %1 = call i32 @dx.op.loadInput.i32(i32 4, i32 1, i32 0, i8 0, i32 undef)\n %2 = call %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32 59, %dx.types.Handle %0, i32 %1)\n %3 = extractvalue %dx.types.CBufRet.i32 %2, 0\n %4 = getelementptr [24 x i32], [24 x i32]* %dx.v32.x01, i32 0, i32 0\n store i32 %3, i32* %4, align 4\n %5 = add i32 %1, 6\n %6 = call %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32 59, %dx.types.Handle %0, i32 %5)\n %7 = extractvalue %dx.types.CBufRet.i32 %6, 0\n %8 = getelementptr [24 x i32], [24 x i32]* %dx.v32.x01, i32 0, i32 4\n store i32 %7, i32* %8, align 4\n %9 = call i32 @dx.op.loadInput.i32(i32 4, i32 1, i32 0, i8 0, i32 undef)\n %10 = add i32 %9, 2\n %11 = add i32 %9, 3\n %12 = add i32 %9, 4\n %13 = add i32 %9, 5\n %14 = call %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32 59, %dx.types.Handle %0, i32 %10)\n %15 = extractvalue %dx.types.CBufRet.i32 %14, 0\n %16 = getelementptr [24 x i32], [24 x i32]* %dx.v32.x01, i32 0, i32 8\n store i32 %15, i32* %16, align 4\n %17 = call %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32 59, %dx.types.Handle %0, i32 %11)\n %18 = extractvalue %dx.types.CBufRet.i32 %17, 0\n %19 = getelementptr [24 x i32], [24 x i32]* %dx.v32.x01, i32 0, i32 12\n store i32 %18, i32* %19, align 4\n %20 = call %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32 59, %dx.types.Handle %0, i32 %12)\n %21 = extractvalue %dx.types.CBufRet.i32 %20, 0\n %22 = getelementptr [24 x i32], [24 x i32]* %dx.v32.x01, i32 0, i32 16\n store i32 %21, i32* %22, align 4\n %23 = call %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32 59, %dx.types.Handle %0, i32 %13)\n %24 = extractvalue %dx.types.CBufRet.i32 %23, 0\n %25 = getelementptr [24 x i32], [24 x i32]* %dx.v32.x01, i32 0, i32 20\n store i32 %24, i32* %25, align 4\n %26 = call i32 @dx.op.loadInput.i32(i32 4, i32 1, i32 0, i8 0, i32 undef)\n %27 = call i32 @dx.op.loadInput.i32(i32 4, i32 2, i32 0, i8 0, i32 undef)\n %28 = add i32 %26, %27\n %29 = mul i32 %28, 4\n %30 = add i32 %29, 0\n %31 = getelementptr [24 x i32], [24 x i32]* %dx.v32.x01, i32 0, i32 %30\n %32 = load i32, i32* %31, align 4\n %33 = call float @dx.op.bitcastI32toF32(i32 126, i32 %32)\n call void @dx.op.storeOutput.f32(i32 5, i32 0, i32 0, i8 0, float %33)\n ret void\n}\n\n; Function Attrs: nounwind readonly\ndeclare %dx.types.Handle @dx.op.createHandle(i32, i8, i32, i32, i1) #0\n\n; Function Attrs: nounwind readnone\ndeclare i32 @dx.op.loadInput.i32(i32, i32, i32, i8, i32) #1\n\n; Function Attrs: nounwind\ndeclare void @dx.op.tempRegStore.i32(i32, i32, i32) #2\n\n; Function Attrs: nounwind readonly\ndeclare i32 @dx.op.tempRegLoad.i32(i32, i32) #0\n\n; Function Attrs: nounwind readonly\ndeclare %dx.types.CBufRet.i32 @dx.op.cbufferLoadLegacy.i32(i32, %dx.types.Handle, i32) #0\n\n; Function Attrs: nounwind readnone\ndeclare float @dx.op.bitcastI32toF32(i32, i32) #1\n\n; Function Attrs: nounwind\ndeclare void @dx.op.storeOutput.f32(i32, i32, i32, i8, float) #2\n\n; Function Attrs: nounwind readnone\ndeclare i32 @dx.op.bitcastF32toI32(i32, float) #1\n\nattributes #0 = { nounwind readonly }\nattributes #1 = { nounwind readnone }\nattributes #2 = { nounwind }\n\n!dx.version = !{!0}\n!dx.valver = !{!0}\n!dx.shaderModel = !{!1}\n!dx.resources = !{!2}\n!dx.entryPoints = !{!5}\n!llvm.ident = !{!15}\n\n!0 = !{i32 1, i32 0}\n!1 = !{!\"ps\", i32 6, i32 0}\n!2 = !{null, null, !3, null}\n!3 = !{!4}\n!4 = !{i32 0, %dx.types.i8x224 addrspace(2)* undef, !\"CB0\", i32 0, i32 0, i32 1, i32 224, null}\n!5 = !{void ()* @main, !\"main\", !6, !2, !14}\n!6 = !{!7, !12, null}\n!7 = !{!8, !10, !11}\n!8 = !{i32 0, !\"A\", i8 9, i8 0, !9, i8 0, i32 1, i8 4, i32 0, i8 0, null}\n!9 = !{i32 0}\n!10 = !{i32 1, !\"B\", i8 4, i8 0, !9, i8 1, i32 1, i8 1, i32 1, i8 0, null}\n!11 = !{i32 2, !\"C\", i8 4, i8 0, !9, i8 1, i32 1, i8 1, i32 1, i8 1, null}\n!12 = !{!13}\n!13 = !{i32 0, !\"SV_Target\", i8 9, i8 16, !9, i8 0, i32 1, i8 1, i32 0, i8 0, null}\n!14 = !{i32 0, i64 256}\n!15 = !{!\"dxbc2dxil 1.2\"}\n"} +{"text": "<!DOCTYPE HTML>\n<html>\n<head>\n <title>Bug 1272239 - Test gethash.</title>\n <script src=\"/tests/SimpleTest/SimpleTest.js\"></script>\n <script type=\"text/javascript\" src=\"classifierHelper.js\"></script>\n <link rel=\"stylesheet\" type=\"text/css\" href=\"/tests/SimpleTest/test.css\" />\n</head>\n\n<body>\n<p id=\"display\"></p>\n<div id=\"content\" style=\"display: none\">\n</div>\n<pre id=\"test\">\n<iframe id=\"testFrame1\" onload=\"\"></iframe>\n<iframe id=\"testFrame2\" onload=\"\"></iframe>\n\n<script src=\"head.js\"></script>\n<script class=\"testbody\" type=\"text/javascript\">\nconst MALWARE_LIST = \"test-malware-simple\";\nconst MALWARE_HOST = \"malware.example.com/\";\n\nconst UNWANTED_LIST = \"test-unwanted-simple\";\nconst UNWANTED_HOST = \"unwanted.example.com/\";\n\nconst GETHASH_URL = \"http://mochi.test:8888/tests/toolkit/components/url-classifier/tests/mochitest/gethash.sjs\";\nconst NOTEXIST_URL = \"http://mochi.test:8888/tests/toolkit/components/url-classifier/tests/mochitest/nonexistserver.sjs\";\n\nvar shouldLoad = false;\n\n// In this testcase we store prefixes to localdb and send the fullhash to gethash server.\n// When access the test page gecko should trigger gethash request to server and\n// get the completion response.\nfunction loadTestFrame(id) {\n return new Promise(function(resolve, reject) {\n var iframe = document.getElementById(id);\n iframe.setAttribute(\"src\", \"gethashFrame.html\");\n\n iframe.onload = function() {\n resolve();\n };\n });\n}\n\n// add 4-bytes prefixes to local database, so when we access the url,\n// it will trigger gethash request.\nfunction addPrefixToDB(list, url) {\n var testData = [{ db: list, url, len: 4 }];\n\n return classifierHelper.addUrlToDB(testData)\n .catch(function(err) {\n ok(false, \"Couldn't update classifier. Error code: \" + err);\n // Abort test.\n SimpleTest.finish();\n });\n}\n\nfunction setup404() {\n shouldLoad = true;\n\n classifierHelper.allowCompletion([MALWARE_LIST, UNWANTED_LIST], NOTEXIST_URL);\n\n return Promise.all([\n addPrefixToDB(MALWARE_LIST, MALWARE_HOST),\n addPrefixToDB(UNWANTED_LIST, UNWANTED_HOST),\n ]);\n}\n\nfunction setup() {\n classifierHelper.allowCompletion([MALWARE_LIST, UNWANTED_LIST], GETHASH_URL);\n\n return Promise.all([\n addPrefixToDB(MALWARE_LIST, MALWARE_HOST),\n addPrefixToDB(UNWANTED_LIST, UNWANTED_HOST),\n addCompletionToServer(MALWARE_LIST, MALWARE_HOST, GETHASH_URL),\n addCompletionToServer(UNWANTED_LIST, UNWANTED_HOST, GETHASH_URL),\n ]);\n}\n\n// manually reset DB to make sure next test won't be affected by cache.\nfunction reset() {\n return classifierHelper.resetDatabase();\n}\n\nfunction runTest() {\n Promise.resolve()\n // This test resources get blocked when gethash returns successfully\n .then(classifierHelper.waitForInit)\n .then(setup)\n .then(() => loadTestFrame(\"testFrame1\"))\n .then(reset)\n // This test resources are not blocked when gethash returns an error\n .then(setup404)\n .then(() => loadTestFrame(\"testFrame2\"))\n .then(function() {\n SimpleTest.finish();\n }).catch(function(e) {\n ok(false, \"Some test failed with error \" + e);\n SimpleTest.finish();\n });\n}\n\nSimpleTest.waitForExplicitFinish();\n\n// 'network.predictor.enabled' is disabled because if other testcase load\n// evil.js, evil.css ...etc resources, it may cause we load them from cache\n// directly and bypass classifier check\nSpecialPowers.pushPrefEnv({\"set\": [\n [\"browser.safebrowsing.malware.enabled\", true],\n [\"urlclassifier.malwareTable\", \"test-malware-simple,test-unwanted-simple\"],\n [\"network.predictor.enabled\", false],\n [\"urlclassifier.gethash.timeout_ms\", 30000],\n]}, runTest);\n\n</script>\n</pre>\n</body>\n</html>\n"} +{"text": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<!-- NewPage -->\n<html lang=\"en\">\n<head>\n<!-- Generated by javadoc (1.8.0) on Thu Jun 21 00:32:55 EDT 2018 -->\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n<title>JmxEmitter.JmxResponseMBean (appsensor-parent 2.3.3 API)</title>\n<meta name=\"date\" content=\"2018-06-21\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"../../../../../stylesheet.css\" title=\"Style\">\n<script type=\"text/javascript\" src=\"../../../../../script.js\"></script>\n</head>\n<body>\n<script type=\"text/javascript\"><!--\n try {\n if (location.href.indexOf('is-external=true') == -1) {\n parent.document.title=\"JmxEmitter.JmxResponseMBean (appsensor-parent 2.3.3 API)\";\n }\n }\n catch(err) {\n }\n//-->\n</script>\n<noscript>\n<div>JavaScript is disabled on your browser.</div>\n</noscript>\n<!-- ======== START OF CLASS DATA ======== -->\n<div class=\"header\">\n<div class=\"subTitle\">org.owasp.appsensor.integration.jmx</div>\n<h2 title=\"Interface JmxEmitter.JmxResponseMBean\" class=\"title\">Interface JmxEmitter.JmxResponseMBean</h2>\n</div>\n<div class=\"contentContainer\">\n<div class=\"description\">\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<dl>\n<dt>All Superinterfaces:</dt>\n<dd><a href=\"../../../../../org/owasp/appsensor/integration/jmx/JmxEmitter.JmxAppSensorMBean.html\" title=\"interface in org.owasp.appsensor.integration.jmx\">JmxEmitter.JmxAppSensorMBean</a></dd>\n</dl>\n<dl>\n<dt>Enclosing class:</dt>\n<dd><a href=\"../../../../../org/owasp/appsensor/integration/jmx/JmxEmitter.html\" title=\"class in org.owasp.appsensor.integration.jmx\">JmxEmitter</a></dd>\n</dl>\n<hr>\n<br>\n<pre>public static interface <span class=\"typeNameLabel\">JmxEmitter.JmxResponseMBean</span>\nextends <a href=\"../../../../../org/owasp/appsensor/integration/jmx/JmxEmitter.JmxAppSensorMBean.html\" title=\"interface in org.owasp.appsensor.integration.jmx\">JmxEmitter.JmxAppSensorMBean</a></pre>\n</li>\n</ul>\n</div>\n</div>\n<!-- ========= END OF CLASS DATA ========= -->\n<p class=\"legalCopy\"><small>Copyright &#169; 2018 <a href=\"http://www.owasp.org\">The Open Web Application Security Project (OWASP)</a>. All rights reserved.</small></p>\n</body>\n</html>\n"} +{"text": "<?php\n\nnamespace NiuGengYun\\EasyTBK\\TaoBao\\Request;\n\nuse NiuGengYun\\EasyTBK\\TaoBao\\RequestCheckUtil;\n/**\n * TOP API: taobao.tbk.spread.get request\n *\n * @author auto create\n * @since 1.0, 2018.07.25\n */\nclass TbkSpreadGetRequest\n{\n /**\n * 请求列表,内部包含多个url\n **/\n private $requests;\n\n private $apiParas = array();\n\n public function setRequests($requests)\n {\n $this->requests = $requests;\n $this->apiParas[\"requests\"] = $requests;\n }\n\n public function getRequests()\n {\n return $this->requests;\n }\n\n public function getApiMethodName()\n {\n return \"taobao.tbk.spread.get\";\n }\n\n public function getApiParas()\n {\n return $this->apiParas;\n }\n\n public function check()\n {\n\n }\n\n public function putOtherTextParam($key, $value)\n {\n $this->apiParas[$key] = $value;\n $this->$key = $value;\n }\n}\n"} +{"text": "# Catalan translations for WTForms.\n# Copyright (C) 2013 WTForms Team\n# This file is distributed under the same license as the WTForms project.\n#\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: WTForms 2.0dev\\n\"\n\"Report-Msgid-Bugs-To: wtforms+i18n@jamescrasta.com\\n\"\n\"POT-Creation-Date: 2013-11-08 15:21-0700\\n\"\n\"PO-Revision-Date: 2014-01-16 09:58+0100\\n\"\n\"Last-Translator: Òscar Vilaplana <oscar.vilaplana@paylogic.eu>\\n\"\n\"Language-Team: ca <oscar.vilaplana@paylogic.eu>\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=utf-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Generated-By: Babel 1.3\\n\"\n\n#: wtforms/validators.py:55\n#, python-format\nmsgid \"Invalid field name '%s'.\"\nmsgstr \"Nom de camp no vàlid '%s'.\"\n\n#: wtforms/validators.py:63\n#, python-format\nmsgid \"Field must be equal to %(other_name)s.\"\nmsgstr \"El camp ha de ser igual a %(other_name)s.\"\n\n#: wtforms/validators.py:96\n#, python-format\nmsgid \"Field must be at least %(min)d character long.\"\nmsgid_plural \"Field must be at least %(min)d characters long.\"\nmsgstr[0] \"El camp ha de contenir almenys %(min)d caràcter.\"\nmsgstr[1] \"El camp ha de contenir almenys %(min)d caràcters.\"\n\n#: wtforms/validators.py:99\n#, python-format\nmsgid \"Field cannot be longer than %(max)d character.\"\nmsgid_plural \"Field cannot be longer than %(max)d characters.\"\nmsgstr[0] \"El camp no pot contenir més d'%(max)d caràcter.\"\nmsgstr[1] \"El camp no pot contenir més de %(max)d caràcters.\"\n\n#: wtforms/validators.py:102\n#, python-format\nmsgid \"Field must be between %(min)d and %(max)d characters long.\"\nmsgstr \"El camp ha de contenir entre %(min)d i %(min)d caràcters.\"\n\n#: wtforms/validators.py:138\n#, python-format\nmsgid \"Number must be at least %(min)s.\"\nmsgstr \"El nombre ha de ser major o igual a %(min)s.\"\n\n#: wtforms/validators.py:140\n#, python-format\nmsgid \"Number must be at most %(max)s.\"\nmsgstr \"El nombre ha de ser com a màxim %(max)s.\"\n\n#: wtforms/validators.py:142\n#, python-format\nmsgid \"Number must be between %(min)s and %(max)s.\"\nmsgstr \"El nombre ha d'estar entre %(min)s i %(max)s.\"\n\n#: wtforms/validators.py:198 wtforms/validators.py:233\nmsgid \"This field is required.\"\nmsgstr \"Aquest camp és obligatori.\"\n\n#: wtforms/validators.py:264\nmsgid \"Invalid input.\"\nmsgstr \"Valor no vàlid.\"\n\n#: wtforms/validators.py:286\nmsgid \"Invalid email address.\"\nmsgstr \"Adreça d'e-mail no vàlida.\"\n\n#: wtforms/validators.py:318\nmsgid \"Invalid IP address.\"\nmsgstr \"Adreça IP no vàlida.\"\n\n#: wtforms/validators.py:367\nmsgid \"Invalid Mac address.\"\nmsgstr \"Adreça MAC no vàlida.\"\n\n#: wtforms/validators.py:393\nmsgid \"Invalid URL.\"\nmsgstr \"URL no vàlida.\"\n\n#: wtforms/validators.py:412\nmsgid \"Invalid UUID.\"\nmsgstr \"UUID no vàlid.\"\n\n#: wtforms/validators.py:440\n#, python-format\nmsgid \"Invalid value, must be one of: %(values)s.\"\nmsgstr \"Valor no vàlid, ha de ser un d'entre: %(values)s.\"\n\n#: wtforms/validators.py:472\n#, python-format\nmsgid \"Invalid value, can't be any of: %(values)s.\"\nmsgstr \"Valor no vàlid, no pot ser cap d'aquests: %(values)s.\"\n\n#: wtforms/csrf/core.py:83 wtforms/ext/csrf/form.py:47\nmsgid \"Invalid CSRF Token\"\nmsgstr \"Token CSRF no vàlid\"\n\n#: wtforms/csrf/session.py:61 wtforms/ext/csrf/session.py:58\nmsgid \"CSRF token missing\"\nmsgstr \"Falta el token CSRF\"\n\n#: wtforms/csrf/session.py:69 wtforms/ext/csrf/session.py:66\nmsgid \"CSRF failed\"\nmsgstr \"Ha fallat la comprovació de CSRF\"\n\n#: wtforms/csrf/session.py:74 wtforms/ext/csrf/session.py:71\nmsgid \"CSRF token expired\"\nmsgstr \"Token CSRF caducat\"\n\n#: wtforms/ext/appengine/fields.py:87 wtforms/ext/appengine/fields.py:164\n#: wtforms/ext/appengine/fields.py:166 wtforms/ext/django/fields.py:96\n#: wtforms/ext/sqlalchemy/fields.py:125 wtforms/ext/sqlalchemy/fields.py:127\n#: wtforms/ext/sqlalchemy/fields.py:177 wtforms/ext/sqlalchemy/fields.py:182\n#: wtforms/fields/core.py:456\nmsgid \"Not a valid choice\"\nmsgstr \"Opció no acceptada\"\n\n#: wtforms/ext/appengine/fields.py:185\nmsgid \"Not a valid list\"\nmsgstr \"Llista no vàlida\"\n\n#: wtforms/ext/appengine/fields.py:204\nmsgid \"Not a valid integer list\"\nmsgstr \"Llista d'enters no vàlida\"\n\n#: wtforms/ext/dateutil/fields.py:63\nmsgid \"Please input a date/time value\"\nmsgstr \"Introduïu una data i hora vàlides\"\n\n#: wtforms/ext/dateutil/fields.py:75 wtforms/ext/dateutil/fields.py:83\nmsgid \"Invalid date/time input\"\nmsgstr \"Data/hora no vàlides\"\n\n#: wtforms/ext/sqlalchemy/validators.py:34\nmsgid \"Already exists.\"\nmsgstr \"Ja existeix.\"\n\n#: wtforms/fields/core.py:449\nmsgid \"Invalid Choice: could not coerce\"\nmsgstr \"Opció no vàlida\"\n\n#: wtforms/fields/core.py:482\nmsgid \"Invalid choice(s): one or more data inputs could not be coerced\"\nmsgstr \"Opció o opcions no vàlides: alguna de les entrades no s'ha pogut processar\"\n\n#: wtforms/fields/core.py:489\n#, python-format\nmsgid \"'%(value)s' is not a valid choice for this field\"\nmsgstr \"'%(value)s' no és una opció acceptada per a aquest camp\"\n\n#: wtforms/fields/core.py:572\nmsgid \"Not a valid integer value\"\nmsgstr \"Valor enter no vàlid\"\n\n#: wtforms/fields/core.py:638\nmsgid \"Not a valid decimal value\"\nmsgstr \"Valor decimal no vàlid\"\n\n#: wtforms/fields/core.py:665\nmsgid \"Not a valid float value\"\nmsgstr \"Valor en coma flotant no vàlid\"\n\n#: wtforms/fields/core.py:724\nmsgid \"Not a valid datetime value\"\nmsgstr \"Valor de data i hora no vàlid\"\n\n#: wtforms/fields/core.py:741\nmsgid \"Not a valid date value\"\nmsgstr \"Valor de data no vàlid\"\n\n"} +{"text": "/**\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License version 2 as\n * published by the Free Software Foundation.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program; if not, write to the Free Software Foundation, Inc.,\n * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * AUTHORS\n * Maciek Borzecki <maciek.borzecki (at] gmail.com>\n */\nusing Gee;\n\n[DBus (name = \"org.mconnect.DeviceManager\")]\nclass DeviceManagerDBusProxy : Object {\n private DeviceManager manager;\n\n public string certificate {\n owned get {\n return Core.instance ().certificate.certificate_pem;\n }\n private set {\n }\n }\n\n public signal void device_added (string path);\n\n public signal void device_removed (string path);\n\n private const string DBUS_PATH = \"/org/mconnect/manager\";\n private DBusConnection bus = null;\n private HashMap<string, DeviceDBusProxy> devices;\n\n private int device_idx = 0;\n\n public DeviceManagerDBusProxy.with_manager (DBusConnection bus,\n DeviceManager manager) {\n this.manager = manager;\n this.bus = bus;\n this.devices = new HashMap<string, DeviceDBusProxy>();\n\n manager.found_new_device.connect ((d) => {\n this.add_device (d);\n });\n manager.device_capability_added.connect (this.add_device_capability);\n }\n\n [DBus (visible = false)]\n public void publish () throws Error {\n assert (this.bus != null);\n\n this.bus.register_object (DBUS_PATH, this);\n }\n\n /**\n * allow_device:\n * @path: device object path\n *\n * Allow given device\n */\n public void allow_device (string path) throws Error {\n debug (\"allow device %s\", path);\n\n var dev_proxy = this.devices.@get (path);\n\n if (dev_proxy == null) {\n warning (\"no device under path %s\", path);\n return;\n }\n\n this.manager.allow_device (dev_proxy.device);\n }\n\n /**\n * disallow_device:\n * @path: device object path\n *\n * Disallow given device\n */\n public void disallow_device (string path) throws Error {\n debug (\"disallow device %s\", path);\n\n var dev_proxy = this.devices.@get (path);\n\n if (dev_proxy == null) {\n warning (\"no device under path %s\", path);\n return;\n }\n\n this.manager.disallow_device (dev_proxy.device);\n }\n\n /**\n * list_devices:\n *\n * Returns a list of DBus paths of all known devices\n */\n public ObjectPath[] list_devices () throws Error {\n ObjectPath[] devices = {};\n\n foreach (var path in this.devices.keys) {\n devices += new ObjectPath (path);\n }\n return devices;\n }\n\n private void add_device (Device dev) {\n var path = make_device_path ();\n var device_proxy = new DeviceDBusProxy.for_device_with_path (dev,\n new ObjectPath (path));\n\n this.devices.@set (path, device_proxy);\n\n info (\"register device %s under path %s\",\n dev.to_string (), path);\n device_proxy.bus_register (this.bus);\n device_added (path);\n }\n\n private DeviceDBusProxy ? find_proxy_for_device (Device dev) {\n DeviceDBusProxy dp = null;\n foreach (var entry in this.devices.entries) {\n if (entry.value.device == dev) {\n dp = entry.value;\n break;\n }\n }\n return dp;\n }\n\n private void add_device_capability (Device dev,\n string capability,\n PacketHandlerInterface iface) {\n DeviceDBusProxy dp = find_proxy_for_device (dev);\n\n if (dp == null) {\n warning (\"no bus proxy for device %s\", dev.to_string ());\n return;\n }\n\n if (dp.has_handler (capability)) {\n return;\n }\n\n info (\"add capability handler %s for device at path %s\",\n capability, dp.object_path.to_string ());\n\n var h = PacketHandlersProxy.new_device_capability_handler (dev,\n capability,\n iface);\n if (h != null) {\n try {\n h.bus_register (this.bus, dp.object_path);\n } catch (Error e) {\n warning (\"cannot register handler at path %s: %s\", dp.object_path, e.message);\n }\n }\n }\n\n /**\n * make_device_path:\n *\n * return device path string that can be used as ObjectPath\n */\n private string make_device_path () {\n var path = \"/org/mconnect/device/%d\".printf (this.device_idx);\n\n // bump device index\n this.device_idx++;\n\n return path;\n }\n}\n"} +{"text": "import React, { Component } from 'react';\n\nimport Header from '../header';\nimport RandomPlanet from '../random-planet';\nimport ErrorBoundry from '../error-boundry';\nimport SwapiService from '../../services/swapi-service';\nimport DummySwapiService from '../../services/dummy-swapi-service';\n\nimport { PeoplePage, PlanetsPage, StarshipsPage } from '../pages';\nimport { SwapiServiceProvider } from '../swapi-service-context';\n\nimport './app.css';\n\nimport { BrowserRouter as Router, Route } from 'react-router-dom';\n\nexport default class App extends Component {\n\n state = {\n swapiService: new SwapiService()\n };\n\n onServiceChange = () => {\n this.setState(({ swapiService }) => {\n const Service = swapiService instanceof SwapiService ?\n DummySwapiService : SwapiService;\n return {\n swapiService: new Service()\n };\n });\n };\n\n render() {\n\n return (\n <ErrorBoundry>\n <SwapiServiceProvider value={this.state.swapiService} >\n <Router>\n <div className=\"stardb-app\">\n <Header onServiceChange={this.onServiceChange} />\n <RandomPlanet />\n\n <Route path=\"/\"\n render={() => <h2>Welcome to StarDB</h2>}\n exact />\n <Route path=\"/people\"\n render={() => <h2>People</h2>}\n exact />\n <Route path=\"/people\" component={PeoplePage} />\n <Route path=\"/planets\" component={PlanetsPage} />\n <Route path=\"/starships\" component={StarshipsPage} />\n\n </div>\n </Router>\n </SwapiServiceProvider>\n </ErrorBoundry>\n );\n }\n}\n"} +{"text": ":10FC000001C0DDC0112484B790E890936100109288\r\n:10FC10006100882361F0982F9A70923041F081FF43\r\n:10FC200002C097EF94BF282E80E0ECD0E9C185E0B8\r\n:10FC30008093810082E08093C00088E18093C100BE\r\n:10FC400081E08093C40086E08093C2008EE0DAD029\r\n:10FC5000209A84E028E13EEF91E0309385002093E4\r\n:10FC6000840096BBB09BFECF189AA8954091C00027\r\n:10FC700047FD02C0815089F7B9D0813479F4B6D0FC\r\n:10FC8000C82FC6D0C23811F480E004C088E0C13863\r\n:10FC900009F083E0A4D080E1A2D0EECF823419F441\r\n:10FCA00084E1BED0F8CF853411F485E0FACF8535F4\r\n:10FCB00041F49CD0E82E9AD0F82EEE0CFF1CA8D070\r\n:10FCC000EACF863519F484E0ABD0DECF843609F074\r\n:10FCD00045C08CD0C82FD0E0DC2FCC2787D0C82BD4\r\n:10FCE00085D0D82E5E01B39400E011E04801EFEF1B\r\n:10FCF0008E1A9E0A7BD0F801808384018A149B04AB\r\n:10FD0000A9F786D0F5E410E000E0DF1609F150E035\r\n:10FD100040E063E0C70153D08701C12CDD24D394B8\r\n:10FD2000F601419151916F0161E0C80148D00E5F29\r\n:10FD30001F4F2297A9F750E040E065E0C7013FD090\r\n:10FD4000AACF6081C8018E0D9F1D79D00F5F1F4F14\r\n:10FD5000F801F395C017D107A1F79DCF843701F5BE\r\n:10FD600045D0C82FD0E0DC2FCC2740D0C82B3ED0C8\r\n:10FD7000D82E4ED08701F5E4DF120BC0CE0DDF1D6B\r\n:10FD8000C80155D02CD00F5F1F4FC017D107C1F746\r\n:10FD900082CFF80185918F0122D02197D1F77BCFB7\r\n:10FDA000853739F435D08EE11AD086E918D089E04C\r\n:10FDB00071CF813509F083CF88E024D080CFFC015A\r\n:10FDC0000A0167BFE895112407B600FCFDCF6670F5\r\n:10FDD00029F0452B19F481E187BFE89508959091AA\r\n:10FDE000C00095FFFCCF8093C60008958091C000AD\r\n:10FDF00087FFFCCF8091C00084FD01C0A895809151\r\n:10FE0000C6000895E0E6F0E098E1908380830895CD\r\n:10FE1000EDDF803219F088E0F5DFFFCF84E1DFCF3E\r\n:10FE2000CF93C82FE3DFC150E9F7CF91F1CFF99914\r\n:10FE3000FECF92BD81BDF89A992780B50895262FEF\r\n:10FE4000F999FECF1FBA92BD81BD20BD0FB6F894BF\r\n:0AFE5000FA9AF99A0FBE0196089580\r\n:02FFFE000008F9\r\n:040000030000FC00FD\r\n:00000001FF\r\n"} +{"text": "'use strict';\n\n\nconst validator = require('validator');\n\nconst db = require('../database');\nconst user = require('../user');\nconst plugins = require('../plugins');\nconst meta = require('../meta');\nconst utils = require('../utils');\n\nconst Messaging = module.exports;\n\nrequire('./data')(Messaging);\nrequire('./create')(Messaging);\nrequire('./delete')(Messaging);\nrequire('./edit')(Messaging);\nrequire('./rooms')(Messaging);\nrequire('./unread')(Messaging);\nrequire('./notifications')(Messaging);\n\n\nMessaging.getMessages = async (params) => {\n\tconst isNew = params.isNew || false;\n\tconst start = params.hasOwnProperty('start') ? params.start : 0;\n\tconst stop = parseInt(start, 10) + ((params.count || 50) - 1);\n\n\tconst indices = {};\n\tconst ok = await canGet('filter:messaging.canGetMessages', params.callerUid, params.uid);\n\tif (!ok) {\n\t\treturn;\n\t}\n\n\tconst mids = await db.getSortedSetRevRange('uid:' + params.uid + ':chat:room:' + params.roomId + ':mids', start, stop);\n\tif (!mids.length) {\n\t\treturn [];\n\t}\n\tmids.forEach(function (mid, index) {\n\t\tindices[mid] = start + index;\n\t});\n\tmids.reverse();\n\n\tconst messageData = await Messaging.getMessagesData(mids, params.uid, params.roomId, isNew);\n\tmessageData.forEach(function (messageData) {\n\t\tmessageData.index = indices[messageData.messageId.toString()];\n\t\tmessageData.isOwner = messageData.fromuid === parseInt(params.uid, 10);\n\t\tif (messageData.deleted && !messageData.isOwner) {\n\t\t\tmessageData.content = '[[modules:chat.message-deleted]]';\n\t\t}\n\t});\n\n\treturn messageData;\n};\n\nasync function canGet(hook, callerUid, uid) {\n\tconst data = await plugins.fireHook(hook, {\n\t\tcallerUid: callerUid,\n\t\tuid: uid,\n\t\tcanGet: parseInt(callerUid, 10) === parseInt(uid, 10),\n\t});\n\n\treturn data ? data.canGet : false;\n}\n\nMessaging.parse = async (message, fromuid, uid, roomId, isNew) => {\n\tconst parsed = await plugins.fireHook('filter:parse.raw', message);\n\tlet messageData = {\n\t\tmessage: message,\n\t\tparsed: parsed,\n\t\tfromuid: fromuid,\n\t\tuid: uid,\n\t\troomId: roomId,\n\t\tisNew: isNew,\n\t\tparsedMessage: parsed,\n\t};\n\n\tmessageData = await plugins.fireHook('filter:messaging.parse', messageData);\n\treturn messageData ? messageData.parsedMessage : '';\n};\n\nMessaging.isNewSet = async (uid, roomId, timestamp) => {\n\tconst setKey = 'uid:' + uid + ':chat:room:' + roomId + ':mids';\n\tconst messages = await db.getSortedSetRevRangeWithScores(setKey, 0, 0);\n\tif (messages && messages.length) {\n\t\treturn parseInt(timestamp, 10) > parseInt(messages[0].score, 10) + Messaging.newMessageCutoff;\n\t}\n\treturn true;\n};\n\nMessaging.getRecentChats = async (callerUid, uid, start, stop) => {\n\tconst ok = await canGet('filter:messaging.canGetRecentChats', callerUid, uid);\n\tif (!ok) {\n\t\treturn null;\n\t}\n\n\tconst roomIds = await db.getSortedSetRevRange('uid:' + uid + ':chat:rooms', start, stop);\n\tconst results = await utils.promiseParallel({\n\t\troomData: Messaging.getRoomsData(roomIds),\n\t\tunread: db.isSortedSetMembers('uid:' + uid + ':chat:rooms:unread', roomIds),\n\t\tusers: Promise.all(roomIds.map(async (roomId) => {\n\t\t\tlet uids = await db.getSortedSetRevRange('chat:room:' + roomId + ':uids', 0, 9);\n\t\t\tuids = uids.filter(_uid => _uid && parseInt(_uid, 10) !== parseInt(uid, 10));\n\t\t\treturn await user.getUsersFields(uids, ['uid', 'username', 'userslug', 'picture', 'status', 'lastonline']);\n\t\t})),\n\t\tteasers: Promise.all(roomIds.map(async roomId => Messaging.getTeaser(uid, roomId))),\n\t});\n\n\tresults.roomData.forEach(function (room, index) {\n\t\tif (room) {\n\t\t\troom.users = results.users[index];\n\t\t\troom.groupChat = room.hasOwnProperty('groupChat') ? room.groupChat : room.users.length > 2;\n\t\t\troom.unread = results.unread[index];\n\t\t\troom.teaser = results.teasers[index];\n\n\t\t\troom.users.forEach(function (userData) {\n\t\t\t\tif (userData && parseInt(userData.uid, 10)) {\n\t\t\t\t\tuserData.status = user.getStatus(userData);\n\t\t\t\t}\n\t\t\t});\n\t\t\troom.users = room.users.filter(function (user) {\n\t\t\t\treturn user && parseInt(user.uid, 10);\n\t\t\t});\n\t\t\troom.lastUser = room.users[0];\n\n\t\t\troom.usernames = Messaging.generateUsernames(room.users, uid);\n\t\t}\n\t});\n\n\tresults.roomData = results.roomData.filter(Boolean);\n\tconst ref = { rooms: results.roomData, nextStart: stop + 1 };\n\treturn await plugins.fireHook('filter:messaging.getRecentChats', {\n\t\trooms: ref.rooms,\n\t\tnextStart: ref.nextStart,\n\t\tuid: uid,\n\t\tcallerUid: callerUid,\n\t});\n};\n\nMessaging.generateUsernames = (users, excludeUid) => users.filter(user => user && parseInt(user.uid, 10) !== excludeUid)\n\t.map(user => user.username).join(', ');\n\nMessaging.getTeaser = async (uid, roomId) => {\n\tconst mid = await Messaging.getLatestUndeletedMessage(uid, roomId);\n\tif (!mid) {\n\t\treturn null;\n\t}\n\tconst teaser = await Messaging.getMessageFields(mid, ['fromuid', 'content', 'timestamp']);\n\tif (!teaser.fromuid) {\n\t\treturn null;\n\t}\n\tconst blocked = await user.blocks.is(teaser.fromuid, uid);\n\tif (blocked) {\n\t\treturn null;\n\t}\n\n\tteaser.user = await user.getUserFields(teaser.fromuid, ['uid', 'username', 'userslug', 'picture', 'status', 'lastonline']);\n\tif (teaser.content) {\n\t\tteaser.content = utils.stripHTMLTags(utils.decodeHTMLEntities(teaser.content));\n\t\tteaser.content = validator.escape(String(teaser.content));\n\t}\n\n\tconst payload = await plugins.fireHook('filter:messaging.getTeaser', { teaser: teaser });\n\treturn payload.teaser;\n};\n\nMessaging.getLatestUndeletedMessage = async (uid, roomId) => {\n\tlet done = false;\n\tlet latestMid = null;\n\tlet index = 0;\n\tlet mids;\n\n\twhile (!done) {\n\t\t/* eslint-disable no-await-in-loop */\n\t\tmids = await db.getSortedSetRevRange('uid:' + uid + ':chat:room:' + roomId + ':mids', index, index);\n\t\tif (mids.length) {\n\t\t\tconst states = await Messaging.getMessageFields(mids[0], ['deleted', 'system']);\n\t\t\tdone = !states.deleted && !states.system;\n\t\t\tif (done) {\n\t\t\t\tlatestMid = mids[0];\n\t\t\t}\n\t\t\tindex += 1;\n\t\t} else {\n\t\t\tdone = true;\n\t\t}\n\t}\n\n\treturn latestMid;\n};\n\nMessaging.canMessageUser = async (uid, toUid) => {\n\tif (meta.config.disableChat || uid <= 0 || uid === toUid) {\n\t\tthrow new Error('[[error:chat-disabled]]');\n\t}\n\n\tif (parseInt(uid, 10) === parseInt(toUid, 10)) {\n\t\tthrow new Error('[[error:cant-chat-with-yourself');\n\t}\n\n\tconst exists = await user.exists(toUid);\n\tif (!exists) {\n\t\tthrow new Error('[[error:no-user]]');\n\t}\n\n\tconst userData = await user.getUserFields(uid, ['banned', 'email:confirmed']);\n\tif (userData.banned) {\n\t\tthrow new Error('[[error:user-banned]]');\n\t}\n\n\tif (meta.config.requireEmailConfirmation && !userData['email:confirmed']) {\n\t\tthrow new Error('[[error:email-not-confirmed-chat]]');\n\t}\n\n\tconst results = await utils.promiseParallel({\n\t\tsettings: user.getSettings(toUid),\n\t\tisAdmin: user.isAdministrator(uid),\n\t\tisModerator: user.isModeratorOfAnyCategory(uid),\n\t\tisFollowing: user.isFollowing(toUid, uid),\n\t});\n\n\tif (results.settings.restrictChat && !results.isAdmin && !results.isModerator && !results.isFollowing) {\n\t\tthrow new Error('[[error:chat-restricted]]');\n\t}\n\n\tawait plugins.fireHook('static:messaging.canMessageUser', {\n\t\tuid: uid,\n\t\ttoUid: toUid,\n\t});\n};\n\nMessaging.canMessageRoom = async (uid, roomId) => {\n\tif (meta.config.disableChat || uid <= 0) {\n\t\tthrow new Error('[[error:chat-disabled]]');\n\t}\n\n\tconst inRoom = await Messaging.isUserInRoom(uid, roomId);\n\tif (!inRoom) {\n\t\tthrow new Error('[[error:not-in-room]]');\n\t}\n\n\tconst userData = await user.getUserFields(uid, ['banned', 'email:confirmed']);\n\tif (userData.banned) {\n\t\tthrow new Error('[[error:user-banned]]');\n\t}\n\n\tif (meta.config.requireEmailConfirmation && !userData['email:confirmed']) {\n\t\tthrow new Error('[[error:email-not-confirmed-chat]]');\n\t}\n\n\tawait plugins.fireHook('static:messaging.canMessageRoom', {\n\t\tuid: uid,\n\t\troomId: roomId,\n\t});\n};\n\nMessaging.hasPrivateChat = async (uid, withUid) => {\n\tif (parseInt(uid, 10) === parseInt(withUid, 10)) {\n\t\treturn 0;\n\t}\n\n\tconst results = await utils.promiseParallel({\n\t\tmyRooms: db.getSortedSetRevRange('uid:' + uid + ':chat:rooms', 0, -1),\n\t\ttheirRooms: db.getSortedSetRevRange('uid:' + withUid + ':chat:rooms', 0, -1),\n\t});\n\tconst roomIds = results.myRooms.filter(function (roomId) {\n\t\treturn roomId && results.theirRooms.includes(roomId);\n\t});\n\n\tif (!roomIds.length) {\n\t\treturn 0;\n\t}\n\n\tvar index = 0;\n\tvar roomId = 0;\n\twhile (index < roomIds.length && !roomId) {\n\t\t/* eslint-disable no-await-in-loop */\n\t\tconst count = await Messaging.getUserCountInRoom(roomIds[index]);\n\t\tif (count === 2) {\n\t\t\troomId = roomIds[index];\n\t\t} else {\n\t\t\tindex += 1;\n\t\t}\n\t}\n\n\treturn roomId;\n};\n\nrequire('../promisify')(Messaging);\n"} +{"text": "# -*- coding:utf-8 -*-\n\nfrom flask_wtf import Form\nfrom flask_wtf.file import FileField, FileAllowed, FileRequired\nfrom wtforms import StringField, PasswordField, BooleanField, SubmitField,\\\n SelectField, TextField, TextAreaField, RadioField, FileField\nfrom wtforms import ValidationError, TextField, DateField, IntegerField\nfrom wtforms.validators import Required, Length, Email, InputRequired, Regexp, EqualTo\nfrom wtforms.widgets import CheckboxInput\nfrom flask import request\nfrom app.admin.models import Depart\nfrom flask_pagedown.fields import PageDownField\nfrom app.drops.models import Category\n\n# 图片表单\n\n\nclass UploadImgForm(Form):\n upload = FileField(u'上传图片', validators=[\n FileRequired(),\n FileAllowed(['jpg', 'png'], 'Images only!')\n ]\n )\n submit = SubmitField('Submit')\n\n# 搜索表单\n\n\nclass SearchForm(Form):\n search = StringField('search', validators=[Required(), Length(1, 20)])\n\n# category表单\n\n\nclass CateForm(Form):\n catename = StringField(u'类别名', validators=[Required(), Length(1, 64)])\n submit = SubmitField(u'提交')\n\n\n# drops提交表单\n\nclass DropForm(Form):\n title = StringField(u'标题', validators=[Required(), Length(\n 1.50)], id='title_id')\n dropname = StringField(u'drop名', validators=[\n Required(), Length(1.50)], id='dropname_id')\n category = RadioField(\n u'类型', coerce=int, id='category_id')\n tag = StringField(u'标签', validators=[Required(), Length(1.50)],\n render_kw={\"placeholder\": u\"多个tag用英文逗号隔开\"})\n content = PageDownField(u'drop内容', id='content_id',validators=[Required(),Length(min=10)])\n submit = SubmitField(u'提交')\n\n def __init__(self, *args, **kwargs):\n super(DropForm, self).__init__(*args, **kwargs)\n self.category.choices = [(i.id, i.category_name)\n for i in Category.query.order_by(Category.id).all()]\n# 评论表单\n\n\nclass CommentForm(Form):\n author_name = StringField(u'Name',validators=[\n InputRequired(message=u\"Need an name\"), Length(max=50)],\n render_kw={\"placeholder\": u\"请输入昵称\"})\n author_email = StringField(u\"Email\",validators=[\n InputRequired(message=u\"Need an email address\"),\n Email(message=u\"Need a valid email address\")],\n render_kw={\"placeholder\": u\"请输入邮箱\"})\n content = PageDownField(u\"Content\")\n comt_id = IntegerField()\n submit = SubmitField(u\"Save\")\n"} +{"text": "#!/bin/sh\n\n: << =cut\n\n=head1 NAME\n\nwireless_signal_ranges_ - Group and count all connected wifi peers by signal strength ranges\n\n\n=head1 APPLICABLE SYSTEMS\n\nInformation is parsed from the output of the tool \"iwinfo\" (OpenWrt) or \"iw\" (most systems).\n\nThis plugin is suitable for wifi interfaces with a variable selection of peers (e.g. mobile\nclients).\n\n\n=head1 CONFIGURATION\n\nSymlink this plugin with the name of the wifi interface added (e.g. \"wlan0\").\n\nRoot permissions are probably required for accessing \"iw\".\n\n [wireless_signal_ranges_*]\n user root\n\n\n=head1 VERSION\n\n 1.1\n\n\n=head1 AUTHOR\n\nLars Kruse <devel@sumpfralle.de>\n\n\n=head1 LICENSE\n\nGPLv3 or above\n\n\n=head1 MAGIC MARKERS\n\n #%# family=auto\n #%# capabilities=autoconf suggest\n\n=cut\n\nset -eu\n\n\nSCRIPT_PREFIX=\"wireless_signal_ranges_\"\n\n# thresholds for signal quality ranges: ascending values\nSIGNAL_THRESHOLDS=\"-88 -80 -60 0\"\n\n\n# prefer \"iwinfo\" for information retrieval, if it is available\nif which iwinfo >/dev/null; then\n\t# \"iwinfo\" has a stable output format but is only available on openwrt\n\tget_wifi_interfaces() { iwinfo | grep \"^[a-zA-Z]\" | awk '{print $1}'; }\n\t# return MAC of peer and the signal strength\n\tget_wifi_peers() { iwinfo \"$1\" assoclist | grep \"^[0-9a-fA-F]\" | awk '{print $2}'; }\nelse\n\t# \"iw\" is available everywhere - but its output format is not recommended for non-humans\n\tget_wifi_interfaces() { iw dev | awk '{ if ($1 == \"Interface\") print $2; }'; }\n\tget_wifi_peers() { iw dev wlan0 station dump \\\n\t\t| awk '{ if (($1 == \"signal\") && ($2 == \"avg:\")) print $3}'; }\nfi\n\n\nclean_fieldname() {\n\techo \"$1\" | sed 's/^\\([^A-Za-z_]\\)/_\\1/; s/[^A-Za-z0-9_]/_/g'\n}\n\n\nget_level_fieldname() {\n\techo \"range_${1#-}\"\n}\n\n\nget_wifi_device_from_suffix() {\n\tlocal suffix\n\tlocal real_dev\n\t# pick the part after the basename of the real file\n\tsuffix=$(basename \"$0\" | sed \"s/^$SCRIPT_PREFIX//\")\n\tfor real_dev in $(get_wifi_interfaces); do\n\t\t[ \"$suffix\" != \"$(clean_fieldname \"$real_dev\")\" ] || echo \"$real_dev\"\n\tdone | head -1\n}\n\n\ndo_config() {\n\tlocal wifi\n\tlocal lower\n\twifi=$(get_wifi_device_from_suffix)\n\t[ -z \"$wifi\" ] && echo >&2 \"Missing wifi: $wifi\" && return 1\n\techo \"graph_title Wireless signal quality ranges - $wifi\"\n\techo \"graph_args --upper-limit 0\"\n\techo \"graph_vlabel Signal ranges\"\n\techo \"graph_category wireless\"\n\techo \"graph_info This graph shows numbers of peers with defined wifi signal ranges\"\n\tlower=\"noise\"\n\tfor level in $SIGNAL_THRESHOLDS; do\n\t\tfieldname=$(get_level_fieldname \"$level\")\n\t\techo \"${fieldname}.label $lower...$level\"\n\t\techo \"${fieldname}.draw AREASTACK\"\n\t\tlower=\"$level\"\n\tdone\n}\n\n\ndo_fetch() {\n\tlocal wifi\n\tlocal peer_data\n\tlocal previous_count\n\tlocal current_count\n\tlocal fieldname\n\twifi=$(get_wifi_device_from_suffix)\n\t[ -z \"$wifi\" ] && echo >&2 \"Missing wifi: $wifi\" && return 1\n\tpeer_data=$(get_wifi_peers \"$wifi\")\n\tprevious_count=0\n\tfor level in $SIGNAL_THRESHOLDS; do\n\t\tcurrent_count=$(echo \"$peer_data\" | awk '\n\t\t\tBEGIN { count=0; }\n\t\t\t{ if (($1 != \"\") && ($1 <= '\"$level\"')) count++; }\n\t\t\tEND { print count; }')\n\t\tfieldname=$(get_level_fieldname \"$level\")\n\t\techo \"${fieldname}.value $((current_count - previous_count))\"\n\t\tprevious_count=\"$current_count\"\n\tdone\n}\n\n\nACTION=\"${1:-}\"\n\ncase \"$ACTION\" in\n\tconfig)\n\t\tdo_config || exit 1\n\t\tif [ \"${MUNIN_CAP_DIRTYCONFIG:-0}\" = \"1\" ]; then do_fetch; fi\n\t\t;;\n\tautoconf)\n\t\t[ -z \"$(get_wifi_interfaces)\" ] && echo \"no (no wifi interfaces found)\" && exit 1\n\t\techo \"yes\"\n\t\t;;\n\tsuggest)\n\t\tget_wifi_interfaces | while read -r ifname; do\n\t\t\tclean_fieldname \"$ifname\"\n\t\tdone\n\t\t;;\n\t\"\")\n\t\tdo_fetch\n\t\t;;\n\t*)\n\t\techo >&2 \"Invalid action (valid: config / autoconf / suggest / <empty>)\"\n\t\techo >&2\n\t\texit 2\n\t\t;;\nesac\n"} +{"text": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<!-- NewPage -->\n<html lang=\"en\">\n<head>\n<!-- Generated by javadoc (1.8.0_45) on Wed Jun 10 21:06:45 PDT 2015 -->\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n<title>Uses of Interface org.glyptodon.guacamole.net.GuacamoleTunnel (guacamole-common 0.9.7 API)</title>\n<meta name=\"date\" content=\"2015-06-10\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"../../../../../stylesheet.css\" title=\"Style\">\n<script type=\"text/javascript\" src=\"../../../../../script.js\"></script>\n</head>\n<body>\n<script type=\"text/javascript\"><!--\n try {\n if (location.href.indexOf('is-external=true') == -1) {\n parent.document.title=\"Uses of Interface org.glyptodon.guacamole.net.GuacamoleTunnel (guacamole-common 0.9.7 API)\";\n }\n }\n catch(err) {\n }\n//-->\n</script>\n<noscript>\n<div>JavaScript is disabled on your browser.</div>\n</noscript>\n<!-- ========= START OF TOP NAVBAR ======= -->\n<div class=\"topNav\"><a name=\"navbar.top\">\n<!-- -->\n</a>\n<div class=\"skipNav\"><a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a></div>\n<a name=\"navbar.top.firstrow\">\n<!-- -->\n</a>\n<ul class=\"navList\" title=\"Navigation\">\n<li><a href=\"../../../../../overview-summary.html\">Overview</a></li>\n<li><a href=\"../package-summary.html\">Package</a></li>\n<li><a href=\"../../../../../org/glyptodon/guacamole/net/GuacamoleTunnel.html\" title=\"interface in org.glyptodon.guacamole.net\">Class</a></li>\n<li class=\"navBarCell1Rev\">Use</li>\n<li><a href=\"../package-tree.html\">Tree</a></li>\n<li><a href=\"../../../../../deprecated-list.html\">Deprecated</a></li>\n<li><a href=\"../../../../../index-all.html\">Index</a></li>\n<li><a href=\"../../../../../help-doc.html\">Help</a></li>\n</ul>\n</div>\n<div class=\"subNav\">\n<ul class=\"navList\">\n<li>Prev</li>\n<li>Next</li>\n</ul>\n<ul class=\"navList\">\n<li><a href=\"../../../../../index.html?org/glyptodon/guacamole/net/class-use/GuacamoleTunnel.html\" target=\"_top\">Frames</a></li>\n<li><a href=\"GuacamoleTunnel.html\" target=\"_top\">No&nbsp;Frames</a></li>\n</ul>\n<ul class=\"navList\" id=\"allclasses_navbar_top\">\n<li><a href=\"../../../../../allclasses-noframe.html\">All&nbsp;Classes</a></li>\n</ul>\n<div>\n<script type=\"text/javascript\"><!--\n allClassesLink = document.getElementById(\"allclasses_navbar_top\");\n if(window==top) {\n allClassesLink.style.display = \"block\";\n }\n else {\n allClassesLink.style.display = \"none\";\n }\n //-->\n</script>\n</div>\n<a name=\"skip.navbar.top\">\n<!-- -->\n</a></div>\n<!-- ========= END OF TOP NAVBAR ========= -->\n<div class=\"header\">\n<h2 title=\"Uses of Interface org.glyptodon.guacamole.net.GuacamoleTunnel\" class=\"title\">Uses of Interface<br>org.glyptodon.guacamole.net.GuacamoleTunnel</h2>\n</div>\n<div class=\"classUseContainer\">\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use table, listing packages, and an explanation\">\n<caption><span>Packages that use <a href=\"../../../../../org/glyptodon/guacamole/net/GuacamoleTunnel.html\" title=\"interface in org.glyptodon.guacamole.net\">GuacamoleTunnel</a></span><span class=\"tabEnd\">&nbsp;</span></caption>\n<tr>\n<th class=\"colFirst\" scope=\"col\">Package</th>\n<th class=\"colLast\" scope=\"col\">Description</th>\n</tr>\n<tbody>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><a href=\"#org.glyptodon.guacamole.net\">org.glyptodon.guacamole.net</a></td>\n<td class=\"colLast\">\n<div class=\"block\">Classes which apply to network-specific concepts, such as low-level sockets\n and tunnels.</div>\n</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><a href=\"#org.glyptodon.guacamole.servlet\">org.glyptodon.guacamole.servlet</a></td>\n<td class=\"colLast\">\n<div class=\"block\">Classes which build upon the Java Servlet API, providing an HTTP-based\n tunnel and session management.</div>\n</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><a href=\"#org.glyptodon.guacamole.websocket\">org.glyptodon.guacamole.websocket</a></td>\n<td class=\"colLast\">&nbsp;</td>\n</tr>\n</tbody>\n</table>\n</li>\n<li class=\"blockList\">\n<ul class=\"blockList\">\n<li class=\"blockList\"><a name=\"org.glyptodon.guacamole.net\">\n<!-- -->\n</a>\n<h3>Uses of <a href=\"../../../../../org/glyptodon/guacamole/net/GuacamoleTunnel.html\" title=\"interface in org.glyptodon.guacamole.net\">GuacamoleTunnel</a> in <a href=\"../../../../../org/glyptodon/guacamole/net/package-summary.html\">org.glyptodon.guacamole.net</a></h3>\n<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use table, listing classes, and an explanation\">\n<caption><span>Classes in <a href=\"../../../../../org/glyptodon/guacamole/net/package-summary.html\">org.glyptodon.guacamole.net</a> that implement <a href=\"../../../../../org/glyptodon/guacamole/net/GuacamoleTunnel.html\" title=\"interface in org.glyptodon.guacamole.net\">GuacamoleTunnel</a></span><span class=\"tabEnd\">&nbsp;</span></caption>\n<tr>\n<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n<th class=\"colLast\" scope=\"col\">Class and Description</th>\n</tr>\n<tbody>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>class&nbsp;</code></td>\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../../../../org/glyptodon/guacamole/net/AbstractGuacamoleTunnel.html\" title=\"class in org.glyptodon.guacamole.net\">AbstractGuacamoleTunnel</a></span></code>\n<div class=\"block\">Base GuacamoleTunnel implementation which synchronizes access to the\n underlying reader and writer with reentrant locks.</div>\n</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>class&nbsp;</code></td>\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../../../../org/glyptodon/guacamole/net/DelegatingGuacamoleTunnel.html\" title=\"class in org.glyptodon.guacamole.net\">DelegatingGuacamoleTunnel</a></span></code>\n<div class=\"block\">GuacamoleTunnel implementation which simply delegates all function calls to\n an underlying GuacamoleTunnel.</div>\n</td>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>class&nbsp;</code></td>\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../../../../org/glyptodon/guacamole/net/SimpleGuacamoleTunnel.html\" title=\"class in org.glyptodon.guacamole.net\">SimpleGuacamoleTunnel</a></span></code>\n<div class=\"block\">GuacamoleTunnel implementation which uses a provided socket.</div>\n</td>\n</tr>\n</tbody>\n</table>\n<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use table, listing constructors, and an explanation\">\n<caption><span>Constructors in <a href=\"../../../../../org/glyptodon/guacamole/net/package-summary.html\">org.glyptodon.guacamole.net</a> with parameters of type <a href=\"../../../../../org/glyptodon/guacamole/net/GuacamoleTunnel.html\" title=\"interface in org.glyptodon.guacamole.net\">GuacamoleTunnel</a></span><span class=\"tabEnd\">&nbsp;</span></caption>\n<tr>\n<th class=\"colOne\" scope=\"col\">Constructor and Description</th>\n</tr>\n<tbody>\n<tr class=\"altColor\">\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../../../../../org/glyptodon/guacamole/net/DelegatingGuacamoleTunnel.html#DelegatingGuacamoleTunnel-org.glyptodon.guacamole.net.GuacamoleTunnel-\">DelegatingGuacamoleTunnel</a></span>(<a href=\"../../../../../org/glyptodon/guacamole/net/GuacamoleTunnel.html\" title=\"interface in org.glyptodon.guacamole.net\">GuacamoleTunnel</a>&nbsp;tunnel)</code>\n<div class=\"block\">Wraps the given tunnel such that all function calls against this tunnel\n will be delegated to it.</div>\n</td>\n</tr>\n</tbody>\n</table>\n</li>\n<li class=\"blockList\"><a name=\"org.glyptodon.guacamole.servlet\">\n<!-- -->\n</a>\n<h3>Uses of <a href=\"../../../../../org/glyptodon/guacamole/net/GuacamoleTunnel.html\" title=\"interface in org.glyptodon.guacamole.net\">GuacamoleTunnel</a> in <a href=\"../../../../../org/glyptodon/guacamole/servlet/package-summary.html\">org.glyptodon.guacamole.servlet</a></h3>\n<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use table, listing methods, and an explanation\">\n<caption><span>Methods in <a href=\"../../../../../org/glyptodon/guacamole/servlet/package-summary.html\">org.glyptodon.guacamole.servlet</a> that return <a href=\"../../../../../org/glyptodon/guacamole/net/GuacamoleTunnel.html\" title=\"interface in org.glyptodon.guacamole.net\">GuacamoleTunnel</a></span><span class=\"tabEnd\">&nbsp;</span></caption>\n<tr>\n<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n<th class=\"colLast\" scope=\"col\">Method and Description</th>\n</tr>\n<tbody>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>protected abstract <a href=\"../../../../../org/glyptodon/guacamole/net/GuacamoleTunnel.html\" title=\"interface in org.glyptodon.guacamole.net\">GuacamoleTunnel</a></code></td>\n<td class=\"colLast\"><span class=\"typeNameLabel\">GuacamoleHTTPTunnelServlet.</span><code><span class=\"memberNameLink\"><a href=\"../../../../../org/glyptodon/guacamole/servlet/GuacamoleHTTPTunnelServlet.html#doConnect-javax.servlet.http.HttpServletRequest-\">doConnect</a></span>(javax.servlet.http.HttpServletRequest&nbsp;request)</code>\n<div class=\"block\">Called whenever the JavaScript Guacamole client makes a connection\n request.</div>\n</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code><a href=\"../../../../../org/glyptodon/guacamole/net/GuacamoleTunnel.html\" title=\"interface in org.glyptodon.guacamole.net\">GuacamoleTunnel</a></code></td>\n<td class=\"colLast\"><span class=\"typeNameLabel\">GuacamoleSession.</span><code><span class=\"memberNameLink\"><a href=\"../../../../../org/glyptodon/guacamole/servlet/GuacamoleSession.html#getTunnel-java.lang.String-\">getTunnel</a></span>(<a href=\"http://docs.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true\" title=\"class or interface in java.lang\">String</a>&nbsp;tunnelUUID)</code>\n<div class=\"block\">Returns the tunnel with the given UUID attached to this GuacamoleSession,\n if any.</div>\n</td>\n</tr>\n</tbody>\n</table>\n<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use table, listing methods, and an explanation\">\n<caption><span>Methods in <a href=\"../../../../../org/glyptodon/guacamole/servlet/package-summary.html\">org.glyptodon.guacamole.servlet</a> with parameters of type <a href=\"../../../../../org/glyptodon/guacamole/net/GuacamoleTunnel.html\" title=\"interface in org.glyptodon.guacamole.net\">GuacamoleTunnel</a></span><span class=\"tabEnd\">&nbsp;</span></caption>\n<tr>\n<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n<th class=\"colLast\" scope=\"col\">Method and Description</th>\n</tr>\n<tbody>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>void</code></td>\n<td class=\"colLast\"><span class=\"typeNameLabel\">GuacamoleSession.</span><code><span class=\"memberNameLink\"><a href=\"../../../../../org/glyptodon/guacamole/servlet/GuacamoleSession.html#attachTunnel-org.glyptodon.guacamole.net.GuacamoleTunnel-\">attachTunnel</a></span>(<a href=\"../../../../../org/glyptodon/guacamole/net/GuacamoleTunnel.html\" title=\"interface in org.glyptodon.guacamole.net\">GuacamoleTunnel</a>&nbsp;tunnel)</code>\n<div class=\"block\">Attaches the given tunnel to this GuacamoleSession.</div>\n</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colFirst\"><code>void</code></td>\n<td class=\"colLast\"><span class=\"typeNameLabel\">GuacamoleSession.</span><code><span class=\"memberNameLink\"><a href=\"../../../../../org/glyptodon/guacamole/servlet/GuacamoleSession.html#detachTunnel-org.glyptodon.guacamole.net.GuacamoleTunnel-\">detachTunnel</a></span>(<a href=\"../../../../../org/glyptodon/guacamole/net/GuacamoleTunnel.html\" title=\"interface in org.glyptodon.guacamole.net\">GuacamoleTunnel</a>&nbsp;tunnel)</code>\n<div class=\"block\">Detaches the given tunnel to this GuacamoleSession.</div>\n</td>\n</tr>\n</tbody>\n</table>\n</li>\n<li class=\"blockList\"><a name=\"org.glyptodon.guacamole.websocket\">\n<!-- -->\n</a>\n<h3>Uses of <a href=\"../../../../../org/glyptodon/guacamole/net/GuacamoleTunnel.html\" title=\"interface in org.glyptodon.guacamole.net\">GuacamoleTunnel</a> in <a href=\"../../../../../org/glyptodon/guacamole/websocket/package-summary.html\">org.glyptodon.guacamole.websocket</a></h3>\n<table class=\"useSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use table, listing methods, and an explanation\">\n<caption><span>Methods in <a href=\"../../../../../org/glyptodon/guacamole/websocket/package-summary.html\">org.glyptodon.guacamole.websocket</a> that return <a href=\"../../../../../org/glyptodon/guacamole/net/GuacamoleTunnel.html\" title=\"interface in org.glyptodon.guacamole.net\">GuacamoleTunnel</a></span><span class=\"tabEnd\">&nbsp;</span></caption>\n<tr>\n<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n<th class=\"colLast\" scope=\"col\">Method and Description</th>\n</tr>\n<tbody>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>protected abstract <a href=\"../../../../../org/glyptodon/guacamole/net/GuacamoleTunnel.html\" title=\"interface in org.glyptodon.guacamole.net\">GuacamoleTunnel</a></code></td>\n<td class=\"colLast\"><span class=\"typeNameLabel\">GuacamoleWebSocketTunnelEndpoint.</span><code><span class=\"memberNameLink\"><a href=\"../../../../../org/glyptodon/guacamole/websocket/GuacamoleWebSocketTunnelEndpoint.html#createTunnel-javax.websocket.Session-javax.websocket.EndpointConfig-\">createTunnel</a></span>(javax.websocket.Session&nbsp;session,\n javax.websocket.EndpointConfig&nbsp;config)</code>\n<div class=\"block\">Returns a new tunnel for the given session.</div>\n</td>\n</tr>\n</tbody>\n</table>\n</li>\n</ul>\n</li>\n</ul>\n</div>\n<!-- ======= START OF BOTTOM NAVBAR ====== -->\n<div class=\"bottomNav\"><a name=\"navbar.bottom\">\n<!-- -->\n</a>\n<div class=\"skipNav\"><a href=\"#skip.navbar.bottom\" title=\"Skip navigation links\">Skip navigation links</a></div>\n<a name=\"navbar.bottom.firstrow\">\n<!-- -->\n</a>\n<ul class=\"navList\" title=\"Navigation\">\n<li><a href=\"../../../../../overview-summary.html\">Overview</a></li>\n<li><a href=\"../package-summary.html\">Package</a></li>\n<li><a href=\"../../../../../org/glyptodon/guacamole/net/GuacamoleTunnel.html\" title=\"interface in org.glyptodon.guacamole.net\">Class</a></li>\n<li class=\"navBarCell1Rev\">Use</li>\n<li><a href=\"../package-tree.html\">Tree</a></li>\n<li><a href=\"../../../../../deprecated-list.html\">Deprecated</a></li>\n<li><a href=\"../../../../../index-all.html\">Index</a></li>\n<li><a href=\"../../../../../help-doc.html\">Help</a></li>\n</ul>\n</div>\n<div class=\"subNav\">\n<ul class=\"navList\">\n<li>Prev</li>\n<li>Next</li>\n</ul>\n<ul class=\"navList\">\n<li><a href=\"../../../../../index.html?org/glyptodon/guacamole/net/class-use/GuacamoleTunnel.html\" target=\"_top\">Frames</a></li>\n<li><a href=\"GuacamoleTunnel.html\" target=\"_top\">No&nbsp;Frames</a></li>\n</ul>\n<ul class=\"navList\" id=\"allclasses_navbar_bottom\">\n<li><a href=\"../../../../../allclasses-noframe.html\">All&nbsp;Classes</a></li>\n</ul>\n<div>\n<script type=\"text/javascript\"><!--\n allClassesLink = document.getElementById(\"allclasses_navbar_bottom\");\n if(window==top) {\n allClassesLink.style.display = \"block\";\n }\n else {\n allClassesLink.style.display = \"none\";\n }\n //-->\n</script>\n</div>\n<a name=\"skip.navbar.bottom\">\n<!-- -->\n</a></div>\n<!-- ======== END OF BOTTOM NAVBAR ======= -->\n<p class=\"legalCopy\"><small>Copyright &#169; 2015. All rights reserved.</small></p>\n\n<!-- Google Analytics -->\n<script type=\"text/javascript\">\n (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){\n (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),\n m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)\n })(window,document,'script','//www.google-analytics.com/analytics.js','ga');\n\n ga('create', 'UA-75289145-1', 'auto');\n ga('send', 'pageview');\n\n</script>\n<!-- End Google Analytics -->\n</body>\n</html>\n"} +{"text": "# Automatically created by Widelands bzr8543-201712201214 (Release)\n\n[global]\nmap_source_url=\nmap_release=\nmap_creator_version=\"bzr8543-201712201214\"\nmap_version_major=\"0\"\nmap_version_minor=\"2\"\nmap_version_timestamp=\"1514390111\"\npacket_version=\"1\"\npacket_compatibility=\"1\"\n"} +{"text": "### FILE=\"Main.annotation\"\n## Copyright: Public domain.\n## Filename: P51-P53.agc\n## Purpose: A section of LUM69 revision 2.\n## It is part of the reconstructed source code for the flown\n## version of the flight software for the Lunar Module's (LM)\n## Apollo Guidance Computer (AGC) for Apollo 10. The code has\n## been recreated from a copy of Luminary revsion 069, using\n## changes present in Luminary 099 which were described in\n## Luminary memos 75 and 78. The code has been adapted such\n## that the resulting bugger words exactly match those specified\n## for LUM69 revision 2 in NASA drawing 2021152B, which gives\n## relatively high confidence that the reconstruction is correct.\n## Reference: pp. 925-978\n## Assembler: yaYUL\n## Contact: Ron Burkey <info@sandroid.org>.\n## Website: www.ibiblio.org/apollo/index.html\n## Mod history: 2019-07-27 MAS Created from Luminary 69.\n\n## Page 925\n# PROGRAM NAME- PROG52 DATE- JAN 9, 1967\n# MOD NO- 0 LOG SECTION- P51-P53\n# MODIFICATION BY- LONSKE ASSEMBLY- SUNDANCE REV 46\n\n# FUNCTIONAL DESCRIPTION-\n\n# ALIGNS THE IMU TO ONE OF THREE ORIENTATIONS SELECTED BY THE ASTRONAUT. THE PRESENT IMU ORIENTATION IS KNOWN\n# AND IS STORED IN REFSMMAT. THE THREE POSSIBLE ORIENTATIONS MAY BE_\n\n# (A) PREFERRED ORIENTATION\n\n# AN OPTIMUM ORIENTATION FOR A PREVIOUSLY CALCULATED MANUEVER. THIS ORIENTATION MUST BE CALCULATED AND\n# STORED BY A PREVIOUSLY SELECTED PROGRAM.\n\n# (B) NOMINAL ORIENTATION\n#\n# X = UNIT ( R )\n# -SM\n\n# Y = UNIT (V X R)\n# SM\n\n# Z = UNIT (X X Y )\n# SM SM SM\n\n# WHERE_\n# R = THE GEOCENTRIC RADIUS VECTOR AT TIME T(ALIGN) SELECTED BY THE ASTRONAUT\n# -\n\n# V = THE INERTIAL VELOCITY VECTOR AT TIME T(ALIGN) SELECTED BY THE ASTRONAUT\n# -\n\n# (C) REFSMMAT ORIENTATION\n\n# (D) LANDING SITE - THIS IS NOT AVAILIBLE IN SUNDANCE\n\n# THIS SELECTION CORRECTS THE PRESENT IMU ORIENTATION. THE PRESENT ORIENTATION DIFFERS FROM THAT TO WHICH IT\n# WAS LAST ALIGNED ONLY DUE TO GYRO DRIFT(I.E. NEITHER GIMBAL LOCK NOR IMU POWER INTERRUPTION HAS OCCURED\n# SINCE THE LAST ALIGNMENT).\n\n# AFTER A IMU ORIENTATION HAS BEEN SELECTED ROUTINE S52.2 IS OPERATED TO COMPUTE THE GIMBAL ANGLES USING THE\n# NEW ORIENTATION AND THE PRESENT VEHICLE ATTITUDE. CAL52A THEN USES THESE ANGLES, STORED IN THETAD,+1,+2, TO\n# COARSE ALIGN THE IMU. THE STAR SELECTION ROUTINE, R56, IS THEN OPERATED. IF 2 STARS ARE NOT AVAILABLE AN ALARM\n# IS FLASHED TO NOTIFY THE ASTRONAUT. AT THIS POINT THE ASTRONAUT WILL MANUEVER THE VEHICLE AND SELECT 2 STARS\n# EITHER MANUALLY OR AUTOMATICALLY. AFTER 2 STARS HAVE BEEN SELECTED THE IMU IS FINE ALIGNED USING ROUTINE R51. IF\n# THE RENDEZVOUS NAVIGATION PROCESS IS OPERATING(INDICATED BY RNDVZFLG) P20 IS DISPLAYED. OTHERWISE P00 IS\n# REQUESTED.\n\n# CALLING SEQUENCE-\n\n## Page 926\n# THE PROGRAM IS CALLED BY THE ASTRONAUT BY DSKY ENTRY.\n\n# SUBROUTINES CALLED-\n\n# 1. FLAGDOWN 7. S52.2 13. NEWMODEX\n# 2. R02BOTH 8. CAL53A 14. PRIOLARM\n# 3. GOPERF4 9. FLAGUP\n# 4. MATMOVE 10. R56\n# 5. GOFLASH 11. R51\n# 6. S52.3 12. GOPERF3\n\n# NORMAL EXIT MODES-\n\n# EXITS TO ENDOFJOB\n\n# ALARM OR ABORT EXIT MODES-\n\n# NONE\n\n# OUTPUT-\n\n# THE FOLLOWING MAY BE FLASHED ON THE DSKY\n# 1. IMU ORIENTATION CODE\n# 2. ALARM CODE 215 -PREFERRED IMU ORIENTATION NOT SPECIFIED\n# 3. TIME OF NEXT IGNITION\n# 4. GIMBAL ANGLES\n# 5. ALARM CODE 405 -TWO STARS NOT AVAILABLE\n# 6. PLEASE PERFORM P00\n# THE MODE DISPLAY MAY BE CHANGED TO 20\n\n# ERASABLE INITIALIZATION REQUIRED-\n\n# PFRATFLG SHOULD BE SET IF A PREFERRED ORIENTATION HAS BEEN COMPUTED.IF IT HAS BEEN COMPUTED IT IS STORED IN\n# XSMD,YSMD,ZSMD.\n# RNDVZFLG INDICATES WHETHER THE RENDEZVOUS NAVIGATION PROCESS IS OPERATING.\n\n# DEBRIS-\n\n# WORK AREA\n BANK 33\n SETLOC P50S\n BANK\n\n EBANK= BESTI\n COUNT* $$/P52\nPROG52 TC BANKCALL\n CADR R02BOTH # IMU STATUS CHECK\n CAF PFRATBIT\n MASK FLAGWRD2 # IS PFRATFLG SET?\n CCS A\n\n## Page 927\n TC P52A # YES\n CAF BIT2 # NO\n TC P52A +1\nP52A CAF BIT1\n TS OPTION2\nP52B CAF BIT1\n TC BANKCALL # FLASH OPTION CODE AND ORIENTATION CODE\n CADR GOPERF4R # FLASH V04N06\n TC GOTOPOOH\n TCF +5 # V33-PROCEED\n TC P52B # NEW CODE - NEW ORIENTATION CODE INPUT\n TC PHASCHNG # DISPLAY RETURN\n OCT 00014\n TC ENDOFJOB\n\n CA OPTION2\n MASK THREE\n INDEX A\n TC +1\n TC P52T\n TC P52H\n TC P52T\nP52E TC INTPRET\n GOTO\n P52F\nP52T EXTEND\n DCA NEG0\n DXCH DSPTEM1\n CAF V06N34*\n TC BANKCALL\n CADR GOFLASH\n TC GOTOPOOH\n TC +2\n TC -5\n DXCH DSPTEM1\n EXTEND\n BZMF +2 # IF TIME ZERO OR NEG USE TIME2\n TCF +3\n EXTEND\n DCA TIME2\n DXCH TALIGN\nP52V CA OPTION2\n MASK BIT2\n CCS A\n TC P52W\n TC INTPRET # OPTION 4 - GET LS ORIENTATION\n GOTO\n P52LS\n\n## Page 928\n# START ALIGNMENT\n\nP52W TC INTPRET\n DLOAD\n TALIGN # PICK UP ALIGN TIME\n CALL # COMPUTE NOMINAL IMU\n S52.3 # ORIENTATION\nP52D CALL # READ VEHICLE ATTITUDE AND\n S52.2 # COMPUTE GIMBAL ANGLES\n EXIT\n CAF V06N22*\n TC BANKCALL # DISPLAY GIMBAL ANGLES\n CADR GOFLASH\n TC GOTOPOOH\n TCF COARSTYP # V33-PROCEED, SEE IF GYRO TORQUE COARSE\n TC INTPRET # RECYCLE - VEHICLE HAS BEEN MANUEVERED\n GOTO\n P52D\nREGCOARS TC INTPRET\n CALL # DO COARSE ALIGN\n CAL53A # ROUTINE\n SET CLEAR\n REFSMFLG\n PFRATFLG\nP52F CALL\n R51\nP52OUT EXIT\n TC GOTOPOOH\nP52H TC INTPRET # PREFERRED OPTION, GO COMPUTE GIMBALS\n GOTO\n P52D\n\nVB05N09 = V05N09\nV06N22* VN 00622\nV06N34* VN 634\n\nV06N89* VN 0689\n\n## Page 929\n# CHECK FOR GRRO TORQUE COARSE ALIGNMENT\nCOARSTYP CAF OCT13\n TC BANKCALL # DISPLAY V 50N25 WITH COARSE ALIGN OPTION\n CADR GOPERF1\n TCF GOTOPOOH # V34-TERMIN&OE\n TCF REGCOARS # V33-NORMAL COARSE\n TC INTPRET # V32-GYRO TORQUE COARSE\n VLOAD MXV\n XSMD # GET SM(DESIRED) WRT SM(PRESENT)\n REFSMMAT\n UNIT\n STOVL XDC\n YSMD\n MXV UNIT\n REFSMMAT\n STOVL YDC\n ZSMD\n MXV UNIT\n REFSMMAT\n STCALL ZDC\n GYCOARS\n GOTO\n P52OUT\nOCT13 OCT 13\n\n## Page 930\n# COMPUTE LANDING ORIENTATION FOR OPTION 4\nP52LS SET CLEAR # GET LANDING SITE ORIENTATION\n LUNAFLAG\n ERADFLAG # TO PICK UP RLS\n SETPD VLOAD\n 0\n RLS # PICK UP LANDING SITE VEC IN MF\n PDDL PUSH # RLS PD 0-5\n TALIGN\n CALL\n RP-TO-R # TRANS RLS TO REF\n VSR2\n STODL ALPHAV # INPUT TO LAT-LONG\n TALIGN\n CALL\n LAT-LONG # GET LAT, LONG, AND ALT\n DLOAD SR1 # RESCALE LONG TO DEGREES/2\n LONG\n STODL LANDLONG\n ALT\n STODL LANDALT # ALT ALREADY AT 2(29) METERS\n LAT\n STORE LANDLAT\n EXIT\n\nLSDISP CAF V06N89* # DISPLAY LAT,LONG/2, ALT\n TC BANKCALL\n CADR GOFLASH\n TCF GOTOPOOH # VB34 TERMINATE\n TCF +2 # VB33 PROCEED\n TCF LSDISP # VB32 RECYCLE\n\n TC INTPRET\n DLOAD SL1\n LANDLONG\n STODL LONG\n LANDALT\n STODL ALT\n LANDLAT\n STODL LAT\n TALIGN\n CALL\n LALOTORV\n VLOAD UNIT # COMPUTE LANDING SITE ORIENT (XSMD)\n ALPHAV\n STCALL XSMD\n LSORIENT\n GOTO\n P52D # NOW GO COMPUTE GIMBAL ANGLES\n\n## Page 931\n# NAME -S50 ALIAS LOCSAM\n# BY\n# VINCENT\n# FUNCTION - COMPUTE INPUTS FOR PICAPAR AND PLANET\n\n# DEFINE\n\n#\n# U = UNIT( SUN WRT EARTH)\n# ES\n\n# U =UNIT( MOON WRT EARTH)\n# EM\n\n# R =POSITION VECTOR OF LEM\n# L\n\n# R =MEAN DISTANCE (384402KM) BETWEEN EARTH AND MOON\n# EM\n\n# P =RATIO R /(DISTANCE SUN TO EARTH) >.00257125\n# EM\n\n# R =EQUATORIAL RADIUSS (6378.166KM) OF EARTH\n# E\n\n# LOCSAM COMPUTES IN EARTH INFLUENCE\n#\n\n# VSUN = U\n# ES\n\n# VEARTH = -UNIT( R )\n# L\n\n# VMOON = UNIT(R .U - R )\n# EM EM L\n\n# CSUN = COS 90\n\n# CEARTH = COS(5 + ARCSIN(R /MAG(R )))\n# E L\n\n# CMOON = COS 5\n\n#\n# INPUT - TIME IN MPAC\n# OUTPUT - LISTED ABOVE\n# SUBROUTINES -LSPOS,LEMPREC\n# DEBRIS - VAC AREA ,TSIGHT\n\n## Page 932\n SETLOC P50S1\n BANK\n EBANK= XSM\n\n COUNT* $$/LOSAM\n\nS50 = LOCSAM\nLOCSAM STQ\n QMIN\n STCALL TSIGHT\n LSPOS\n DLOAD\n TSIGHT\n STCALL TDEC1\n LEMPREC\n SSP TIX,2\n S2\n 0\n MOONCNTR\nEARTCNTR VLOAD VXSC\n VMOON\n RSUBEM\n VSL1 VSU\n RATT\n UNIT\n STOVL VMOON\n RATT\n UNIT VCOMP\n STODL VEARTH\n RSUBE\n CALL\n OCCOS\n STODL CEARTH\n CSS5\n STCALL CMOON\n ENDSAM\nMOONCNTR VLOAD VXSC\n VMOON\n ROE\n BVSU UNIT\n VSUN\n STOVL VSUN\n VMOON\n VXSC VAD\n RSUBEM\n RATT\n UNIT VCOMP\n STOVL VEARTH\n RATT\n UNIT VCOMP\n\n## Page 933\n STODL VMOON\n RSUBM\n CALL\n OCCOS\n STODL CMOON\n CSS5\n STORE CEARTH\nENDSAM DLOAD\n CSSUN\n STORE CSUN\n GOTO\n QMIN\nOCCOS DDV SR1\n 36D\n ASIN DAD\n 5DEGREES\n COS SR1\n RVQ\nCEARTH = 14D\nCSUN = 16D\nCMOON = 18D\nCSS5 2DEC .2490475 # (COS 5)/4\nCSSUN 2DEC .125 # (COS 60)/4\n5DEGREES 2DEC .013888889 # SCALED IN REVS\n\n## Page 934\n# PROGRAM NAME - R56 DATE DEC 20 66\n# MOD 1 LOG SECTION P51-P53\n# ASSEMBLY SUNDISK REV40\n# BY KEN VINCENT\n#\n# FUNCTION\n# THIS PROGRAM READ THE IMU-CDUS AND COMPUTES THE VEHICLE ORIENTATION\n# WITH RESPECT TO INERTIAL SPACE. IT THEN COMPUTES THE SHAFT AXIS (SAX)\n# WITH RESPECT TO REFERENCE INERTIAL. EACH STAR IN THE CATALOG IS TESTED\n# TO DETERMINE IF IT IS OCCULTED BY EITHER THE EARTH,SUN OR MOON. IF A\n# STAR IS NOT OCCULTED THEN IT IS PAIRED WITH ALL STAR OF LOWER INDEX.\n# THE PAIRED STAR IS TESTED FOR OCCULTATION. PAIRS OF STARS THAT PASS\n# THE OCCULTATION TESTS ARE TESTED FOR GOOD SEPARATION.A PAIR OF STARS\n# HAVE GOOD SEPERATION IF THE ANGLE BETWEEN THEM IS LESS THAN 100 DEGREES\n# AND MORE THAN 50 DEGREES. THOSE PAIRS WITH GOOD SEPARATION\n# ARE THEN TESTED TO SEE IF THEY LIE IN CURRENT FIELD OF VIEW.(WITHIN\n# 50 DEGREESOF SAX).THE PAIR WITH MAX SEPARATION IS CHOSEN FROM\n# THOSE WITH GOOD SEPARATION,AND IN FIELD OF VIEW.\n#\n# CALLING SEQUENCE\n# L TC BANKCALL\n# L+1 CADR R56\n# L+2 ERROR RETURN - NO STARS IN FIELD OF VIEW\n# L+3 NORMAL RETURN\n#\n# OUTPUT\n# BESTI,BESTJ -SINGLE PREC,INTEGERS,STAR NUMBERS TIMES 6\n# VFLAG - FLAG BIT SET IMPLIES NO STARS IN FIELD OF VIEW\n#\n# INITIALIZATION\n# 1)A CALL TO LOCSAM MUST BE MADE\n#\n# DEBRIS\n# WORK AREA\n# X,Y,ZNB\n# SINCDU,COSCDU\n# STARAD - STAR +5\nR56 = PICAPAR\n COUNT* $$/R56\nPICAPAR TC MAKECADR\n TS QMIN\n TC INTPRET\n CALL\n CDUTRIG\n CALL\n CALCSMSC\n SETPD\n 0\n SET DLOAD # VFLAG = 1\n VFLAG\n\n## Page 935\n DPZERO\n STOVL BESTI\n XNB\n VXSC PDVL\n HALFDP\n ZNB\n AXT,1 VXSC\n 228D # X1 = 37 X 6 + 6\n HALFDP\n VAD\n VXM UNIT\n REFSMMAT\n STORE SAX # SAX = SHAFT AXIS\n SSP SSP # S1=S2=6\n S1\n 6\n S2\n 6\nPIC1 TIX,1 GOTO # MAJOR STAR\n PIC2\n PICEND\nPIC2 VLOAD* DOT\n CATLOG,1\n SAX\n DSU BMN\n CSS33\n PIC1\n LXA,2\n X1\nPIC3 TIX,2 GOTO\n PIC4\n PIC1\nPIC4 VLOAD* DOT\n CATLOG,2\n SAX\n DSU BMN\n CSS33\n PIC3\n VLOAD* DOT*\n CATLOG,1\n CATLOG,2\n DSU BPL\n CSS40\n PIC3\n VLOAD* CALL\n CATLOG,1\n OCCULT\n BON\n CULTFLAG\n PIC1\n\n## Page 936\n VLOAD* CALL\n CATLOG,2\n OCCULT\n BON\n CULTFLAG\n PIC3\nSTRATGY BONCLR\n VFLAG\n NEWPAR\n XCHX,1 XCHX,2\n BESTI\n BESTJ\nSTRAT VLOAD* DOT*\n CATLOG,1\n CATLOG,2\n PUSH BOFINV\n VFLAG\n STRAT -3\n DLOAD DSU\n BPL\n PIC3\nNEWPAR SXA,1 SXA,2\n BESTI\n BESTJ\n GOTO\n PIC3\nOCCULT MXV BVSU\n CULTRIX\n CSS\n BZE\n CULTED\n BMN SIGN\n CULTED\n MPAC +3\n BMN SIGN\n CULTED\n MPAC +5\n BMN CLRGO\n CULTED\n CULTFLAG\n QPRET\nCULTED SETGO\n CULTFLAG\n QPRET\nCSS = CEARTH\nCSS40 2DEC .16070 # COS 50 / 4\nCSS33 2DEC .16070 # COS 50 / 4\nPICEND BOFF EXIT\n\n## Page 937\n VFLAG\n PICGXT\n TC PICBXT\nPICGXT LXA,1 LXA,2\n BESTI\n BESTJ\n VLOAD DOT*\n SAX\n CATLOG,1\n PDVL DOT*\n SAX\n CATLOG,2\n DSU\n BPL SXA,1\n PICNSWP\n BESTJ\n SXA,2\n BESTI\nPICNSWP EXIT\n INCR QMIN\nPICBXT CA QMIN\n TC SWCALL\nVPD = 0D\nV0 = 6D\nV1 = 12D\nV2 = 18D\nV3 = 24D\nDP0 = 30D\nDP1 = 32D\n\n## Page 938\n# NAME-R51 FINE ALIGN\n# FUNCTION-TO ALIGN THE STABLE MEMBER TO REFSMMAT\n# CALLING SEQ- CALL R51\n# INPUT - REFSMMAT\n# OUTPUT- GYRO TORQUE PULSES\n# SUBROUTINES -LOCSAM,PICAPAR,R52,R53,R54,R55\n COUNT* $$/R51\nR51 STQ\n QMAJ\nR51.1 EXIT\nR51C CAF OCT15\n TC BANKCALL\n CADR GOPERF1\n TC GOTOPOOH\n TC +2 # V33E\n TC R51E # ENTER\n TC INTPRET\n RTB DAD\n LOADTIME\n TSIGHT1\n CALL\n LOCSAM\n EXIT\n TC BANKCALL\n CADR R56\n TC R51I\nR51F TC R51E\nR51I TC ALARM\n OCT 405\n CAF VB05N09\n TC BANKCALL\n CADR GOFLASH\n TC GOTOPOOH\n TC R51E\n TC R51C\nR51E CAF ZERO\n TS STARIND\nR51.2 TC INTPRET\nR51.3 EXIT\n TC PHASCHNG\n OCT 05024\n OCT 13000\n TC INTPRET\n CALL\n R52 # AOP WILL MAKE CALLS TO SIGHTING\n EXIT\n TC BANKCALL\n CADR AOTMARK\n TC BANKCALL\n CADR OPTSTALL\n\n## Page 939\n TC CURTAINS\n CCS STARIND\n TCF +2\n TC R51.4\n TC INTPRET\n VLOAD\n STARAD +6\n STORE STARSAV2\n EXIT\n TC PHASCHNG\n OCT 05024\n OCT 13000\n TC INTPRET\n DLOAD CALL\n TSIGHT\n PLANET\n MXV UNIT\n REFSMMAT\n STOVL STARAD +6\n PLANVEC\n MXV UNIT\n REFSMMAT\n STOVL STARAD\n STARSAV1\n STOVL 6D\n STARSAV2\n STCALL 12D\n R54 # STAR DATA TEST\n BOFF CALL\n FREEFLAG\n R51K\n AXISGEN\n CALL\n R55 # GYRO TORQUE\n CLEAR\n PFRATFLG\nR51K EXIT\nR51P63 CAF OCT14\n TC BANKCALL\n CADR GOPERF1\n TC GOTOPOOH\n TC R51C\n TC INTPRET\n GOTO\n QMAJ\nR51.4 TC INTPRET\n VLOAD\n STARAD +6\n STORE STARSAV1\n DLOAD CALL\n\n## Page 940\n TSIGHT\n PLANET\n STORE PLANVEC\n SSP\n STARIND\n 1\n GOTO\n R51.3\nTSIGHT1 2DEC 36000 # 6 MIN TO MARKING\n\n## Page 941\n# GYRO TORQUE COARSE ALIGNMENT\nGYCOARS STQ CALL\n QMAJ\n CALCGTA\n CLEAR CLEAR\n DRIFTFLG\n REFSMFLG\n EXIT\n CAF V16N20 # MONITOR GIMBALS\n TC BANKCALL\n CADR GODSPR\n CA R55CDR\n TC BANKCALL\n CADR IMUPULSE\n TC BANKCALL\n CADR IMUSTALL\n TC CURTAINS\n TC PHASCHNG\n OCT 05024\n OCT 13000\n TC INTPRET\n AXC,1 AXC,2\n XSMD\n REFSMMAT\n CALL # STORE DESIRED REFSMMAT\n MATMOVE\n CLEAR SET\n PFRATFLG\n REFSMFLG\n CALL\n NCOARSE # SET DRIFT AND INITIALIZE 1/PIPADT\n GOTO\n R51K\nV16N20 VN 1620\n\n## Page 942\n# R55 GYRO TORQUE\n# FUNCTION-COMPUTE AND SEND GYRO PULSES\n# CALLING SEQ- CALL R55\n# INPUT- X,Y,ZDC- REFSMMAT WRT PRESENT STABLE MEMBER\n# OUTPUT- GYRO PULSES\n# SUBROUTINES- CALCGTA,GOFLASH,GODSPR,IMUFINE, IMUPULSE,GOPERF1\n COUNT* $$/R55\nR55 STQ\n QMIN\n CALL\n CALCGTA\nPULSEM EXIT\nR55.1 CAF V06N93\n TC BANKCALL\n CADR GOFLASH\n TC GOTOPOOH\n TC R55.2\n TC R55RET\nR55.2 TC PHASCHNG\n OCT 00214\n CA R55CDR\n TC BANKCALL\n CADR IMUPULSE\n TC BANKCALL\n CADR IMUSTALL\n TC CURTAINS\n TC PHASCHNG\n OCT 05024\n OCT 13000\nR55RET TC INTPRET\n GOTO\n QMIN\nV06N93 VN 0693\nR55CDR ECADR OGC\nR54 = CHKSDATA\n# ROUTINE NAME- CHKSDATA DATE- JAN 9, 1967\n# MOD NO- 0 LOG SECTION- P51-P53\n# MODIFICATION BY- LONSKE ASSEMBLY-\n\n# FUNCTIONAL DESCRIPTION - CHECKS THE VALIDITY OF A PAIR OF STAR SIGHTINGS. WHEN A PAIR OF STAR SIGHTINGS ARE MADE\n# BY THE ASTRONAUT THIS ROUTINE OPERATES AND CHECKS THE OBSERVED SIGHTINGS AGAINST STORED STAR VECTORS IN THE\n# COMPUTER TO INSURE A PROPER SIGHTING WAS MADE. THE FOLLOWING COMPUTATIONS ARE PERFORMED_\n\n# OS1 = OBSERVED STAR 1 VECTOR\n# OS2 = OBSERVED STAR 2 VECTOR\n# SS1 = STORED STAR 1 VECTOR\n# SS2 = STORED STAR 2 VECTOR\n# A1 = ARCCOS(OS1 - OS2)\n# A2 = ARCCOS(SS1 - SS2)\n# A = ABS(2(A1 - A2))\n\n## Page 943\n# THE ANGULAR DIFFERENCE IS DISPLAYED FOR ASTRONAUT ACCEPTENCE\n# EXIT MODE 1. FREEFLAG SET IMPLIES ASTRONAUT WANTS TO PROCEED\n# 2. FREEFLAG RESET IMPLIES ASTRONAUT WANTS TO RECYCLE ERANCE)\n# OUTPUT - 1.VERB 6,NOUN 3- DISPLAYS ANGULAR DIFFERENCE BETWEEN 2 SETS OF STARS.\n# 2.STAR VECTORS FROM STAR CATALOG ARE LEFT IN 6D AND 12D.\n\n# ERASABLE INITIALIZATION REQUIRED -\n# 1.MARK VECTORS ARE STORED IN STARAD AND STARAD +6.\n# 2.CATALOG VECTORS ARE STORED IN 6D AND 12D.\n# DEBRIS -\n COUNT* $$/R54\nCHKSDATA STQ SET\n QMIN\n FREEFLAG\nCHKSAB AXC,1 # SET X1 TO STORE EPHEMERIS DATA\n STARAD\n\nCHKSB VLOAD* DOT* # CAL. ANGLE THETA\n 0,1\n 6,1\n SL1 ACOS\n STORE THETA\n BOFF INVERT # BRANCH TO CHKSD IF THIS IS 2ND PASS\n FREEFLAG\n CHKSD\n FREEFLAG # CLEAR FREEFLAG\n AXC,1 DLOAD # SET X1 TO MARK ANGLES\n 6D\n THETA\n STORE 18D\n GOTO\n CHKSB # RETURN TO CAL. 2ND ANGLE\nCHKSD DLOAD DSU\n THETA\n 18D\n ABS RTB # COMPUTE POS DIFF\n SGNAGREE\n STORE NORMTEM1\n SET EXIT\n FREEFLAG\n CAF VB6N5\n TC BANKCALL\n CADR GOFLASH\n TCF GOTOPOOH\n TC CHKSDA # PROCEED\n TC INTPRET\n CLEAR GOTO\n FREEFLAG\n QMIN\nCHKSDA TC INTPRET\n\n## Page 944\n GOTO\n QMIN\nVB6N5 VN 605\n# NAME - CAL53A\n# FUNCTION -COMPUTE DESIRED GIMBAL ANGLES AND COARSE ALIGN IF NECESSARY\n# CALLING SEQUENCE - CALL CAL53A\n# INPUT - X,Y,ZSMD ,CDUX,Y,Z\n# DESIRED GIMBAL ANGLES - THETAD,+1,+2\n# OUTPUT - THE IMU COORDINATES ARE STORED IN REFSMMAT\n# SUBROUTINES - S52.2, IMUCOARSE , IMUFINE\n COUNT* $$/R50\nCAL53A STQ CALL\n 29D\n S52.2 # MAKE ONE FINAL COMP OF GIMBLE ANGLES\n RTB SSP\n RDCDUS # READ CDUS\n S1\n 1\n AXT,1 SETPD\n 3\n 4\nCALOOP DLOAD* SR1\n THETAD +3D,1\n PDDL* SR1\n 4,1\n DSU ABS\n PUSH DSU\n DEGREE1\n BMN DLOAD\n CALOOP1\n DSU BPL\n DEG359\n CALOOP1\nCOARFINE CALL\n COARSE\n CALL\n NCOARSE\n GOTO\n FINEONLY\nCALOOP1 TIX,1\n CALOOP\nFINEONLY AXC,1 AXC,2\n XSM\n REFSMMAT\n CALL\n MATMOVE\n GOTO\n 29D\nMATMOVE VLOAD* # TRANSFER MATRIX\n 0,1\n\n## Page 945\n STORE 0,2\n VLOAD*\n 6D,1\n STORE 6D,2\n VLOAD*\n 12D,1\n STORE 12D,2\n RVQ\nDEGREE1 DEC 46 # 1 DEG SCALED CDU/2\nDEG359 DEC 16338 # 359 DEG SCALED CDU/2\nRDCDUS INHINT # READ CDUS\n CA CDUX\n INDEX FIXLOC\n TS 1\n CA CDUY\n INDEX FIXLOC\n TS 2\n CA CDUZ\n INDEX FIXLOC\n TS 3\n RELINT\n TC DANZIG\t\t\t#\t\t\t\t\t+\n COUNT* $$/INFLT\nCALCSMSC AXC,1\n XNB\n\nXNBNDX DLOAD DMP\n SINCDUY\n COSCDUZ\n DCOMP\n PDDL SR1\n SINCDUZ\n PDDL DMP\n COSCDUY\n COSCDUZ\n VDEF VSL1\n STORE 0,1\n DLOAD DMP\n SINCDUX\n SINCDUZ\n SL1\n STORE 26D\n DMP\n SINCDUY\n PDDL DMP\n COSCDUX\n COSCDUY\n DSU\n PDDL DMP\n SINCDUX\n\n## Page 946\n COSCDUZ\n DCOMP\n PDDL DMP\n COSCDUX\n SINCDUY\n PDDL DMP\n COSCDUY\n 26D\n DAD VDEF\n VSL1\n STORE 14,1\n VXV* VSL1\n 0,1\n STORE 6,1\n RVQ\n\n## Page 947\n# NAME - P51 - IMU ORIENTATION DETERMINATION\n# MOD.NO.1 23 JAN 67 LOG SECTION - P51-P53\n# MOD BY STURLAUGSON ASSEMBLY SUNDANCE REV56\n\n# FUNCTIONAL DESCRIPTION\n\n# DETERMINES THE INERTIAL ORIENTATION OF THE IMU. THE PROGRAM IS SELECTED BY DSKY ENTRY. THE SIGHTING\n# (AOTMARK)ROUTINE IS CALLED TO COLLECT AND PROCESS MARKED-STAR DATA. AOTMARK(R53) RETURNS THE STAR NUMBER AND THE\n# STAR LOS VECTOR IN STARAD+6. TWO STARS ARE THUS SIGHTED. THE ANGLE BETWEEN THE TWO STARS IS THEN CHECKED AT\n# CHKSDATA(R54). REFSMMAT IS THEN COMPUTED AT AXISGEN.\n\n# CALLING SEQUENCE\n\n# THE PROGRAM IS CALLED BY THE ASTRONAUT BY DSKY ENTRY.\n\n# SUBROUTINES CALLED.\n\n# GOPERF3\n# GOPERF1\n# GODSPR\n# IMUCOARS\n# IMUFIN20\n# AOTMARK(R53)\n# CHKSDATA(R54)\n# MKRELEAS\n# AXISGEN\n# MATMOVE\n\n# ALARMS\n\n# NONE.\n\n# ERASABLE INITIALIZATION\n\n# IMU ZERO FLAG SHOULD BE SET.\n\n# OUTPUT\n\n# REFSMMAT\n# REFSMFLG\n\n# DEBRIS\n\n# WORK AREA\n# STARAD\n# STARIND\n# BESTI\n# BESTJ\n\n COUNT* $$/P51\n## Page 948\nP51 TC BANKCALL # IS ISS ON - IF NOT, IMUCHK WILL SEND\n CADR IMUCHK # ALARM CODE 210 AND EXIT VIA GOTOPOOH.\n\n CAF PRFMSTAQ\n TC BANKCALL\n CADR GOPERF1\n TC GOTOPOOH # TERM.\n TCF P51B # V33\n TC PHASCHNG\n OCT 05024\n OCT 13000\n CAF P51ZERO\n TS THETAD # ZERO THE GIMBALS\n TS THETAD +1\n TS THETAD +2\n CAF V6N22\n TC BANKCALL\n CADR GODSPRET\n CAF V41K # NOW DISPLAY COARSE ALIGN VERB 41\n TC BANKCALL\n CADR GODSPRET\n TC INTPRET\n CALL\n COARSE\n EXIT\n TC PHASCHNG\n OCT 05024\n OCT 13000\n TCF P51 +2\n\nP51B TC PHASCHNG\n OCT 00014\n TC INTPRET\n CALL\n NCOARSE\n SSP SETPD\n STARIND # INDEX-STAR 1 OR 2\n 0\n 0\nP51C EXIT\n TC PHASCHNG\n OCT 05024\n OCT 13000\n TC BANKCALL\n CADR AOTMARK # R53\n TC BANKCALL\n CADR AOTSTALL\n TC CURTAINS\n CCS STARIND\n TCF P51D +1\n\n## Page 949\n TC INTPRET\n VLOAD\n STARAD +6\n STORE STARSAV1\nP51D EXIT\n TC PHASCHNG\n OCT 05024\n OCT 13000\n CCS STARIND\n TCF P51E\n TC PHASCHNG\n OCT 05024\n OCT 13000\n TC INTPRET\n DLOAD CALL\n TSIGHT\n PLANET\n STORE PLANVEC\n EXIT\n CAF BIT1\n TS STARIND\n TCF P51C +1 # DO SECOND STAR\nP51E TC PHASCHNG\n OCT 05024\n OCT 13000\n TC INTPRET\n DLOAD CALL\n TSIGHT\n PLANET\n STOVL 12D\n PLANVEC\n STOVL 6D\n STARSAV1\n STOVL STARAD\n STARSAV2\n STCALL STARAD +6\n CHKSDATA # CHECK STAR ANGLES IN STARAD AND\n BON EXIT\n FREEFLAG\n P51G\n TC P51 +2\nP51G CALL\n AXISGEN # COME BACK WITH REFSMMAT IN XDC\n AXC,1 AXC,2\n XDC\n REFSMMAT\n CALL\n MATMOVE\n SET\n REFSMFLG\n\n## Page 950\n EXIT\n TC GOTOPOOH # FINIS\nPRFMSTAQ = OCT15\nP51ZERO = ZERO\nP51FIVE = FIVE\nV6N22 VN 0622\nV41K VN 4100\nCOARSE EXIT\n TC BANKCALL\n CADR IMUCOARS\n TC BANKCALL\n CADR IMUSTALL\n TC CURTAINS\n TC BANKCALL\n CADR IMUFINE\n TC BANKCALL\n CADR IMUSTALL\n TC CURTAINS\n TC INTPRET\n RVQ\nNCOARSE EXIT\n CA TIME1\n TS 1/PIPADT\n TC INTPRET\n VLOAD\n ZEROVEC\n STORE GCOMP\n SET RVQ\n DRIFTFLG\n\n## Page 951\n# NAME-S52.2\n# FUNCTION-COMPUTE GIMBAL ANGLES FOR DESIRED SM AND PRESENT VEHICLE\n# CALL- CALL S52.2\n# INPUT- X,Y,ZSMD\n# OUTPUT- OGC,IGC,MGC,THETAD,+1,+2\n# SUBROUTINES-CDUTRIG,CALCSMSC,MATMOVE,CALCGA\n COUNT* $$/S52.1\nS52.2 STQ\n QMAJ\n CALL\n CDUTRIG\n CALL\n CALCSMSC\n AXT,1 SSP\n 18D\n S1\n 6D\nS52.2A VLOAD* VXM\n XNB +18D,1\n REFSMMAT\n UNIT\n STORE XNB +18D,1\n TIX,1\n S52.2A\nS52.2.1 AXC,1 AXC,2\n XSMD\n XSM\n CALL\n MATMOVE\n CALL\n CALCGA\n GOTO\n QMAJ\n\n## Page 952\n# NAME-S52.3\n# FUNCTION XSMD= UNIT R\n# YSMD= UNIT(V X R)\n# ZSMD= UNIT(XSMD X YSMD)\n# CALL DLOAD CALL\n# TALIGN\n# S52.3\n# INPUT- TIME OF ALIGNMENT IN MPAC\n# OUTPUT- X,Y,ZSMD\n# SUBROUTINES- CSMCONIC\n COUNT* $$/S52.3\nS52.3 STQ\n QMAJ\n STCALL TDEC1\n LEMCONIC\n SETPD\n 0\n VLOAD UNIT\n RATT\n STOVL XSMD\n VATT\n VXV UNIT\n RATT\n STOVL YSMD\n XSMD\n VXV UNIT\n YSMD\n STCALL ZSMD\n QMAJ\n\n## Page 953\n# NAME -R52 (AUTOMATIC OPTICS POSITIONING ROUTINE)\n\n# FUNCTION-POINT THE AOT OPTIC AXIS BY MANEUVERING THE LEM TO A NAVIGATION\n# STAR SELECTED BY ALIGNMENT PROGRAMS OR DSKY INPUT\n\n# CALLING -CALL R52\n\n# INPUT -BESTI AND BESTJ (STAR CODES TIMES 6)\n# OUTPUT -STAR CODE IN BITS1-6, DETENT CODE IN BITS 7-9\n# (NO CHECK IS MADE TO INSURE THE DETENT CODE TO BE VALID)\n# POINTVSM-1/2 UNIT NAV STAR VEC IN SM\n# SCAXIS-AOT OPTIC AXIS VEC IN NB X-Z PLANE\n\n# SUBROUT -R60LEM\n\n COUNT* $$/R52\nR52 STQ EXIT\n SAVQR52\n INDEX STARIND\n CA BESTI # PICK UP STARCODE DETERMINED BY R56\n EXTEND\n MP 1/6TH\n AD BIT8 # SET DETENT POSITION 2\n TS STARCODE # SCALE AND STORE IN STARCODE\n\nR52A CAF V01N70\n TC BANKCALL\n CADR GOFLASH # DISPLAY STARCODE AND WAIT FOR RESPONSE\n TC GOTOPOOH # V34-TERMINATE\n TCF R52B # V33-PROCEED TO ORIENT LEM\n TCF R52A # ENTER-SELECT NEW STARCODE-RECYCLE\n\nR52B TC DOWNFLAG\n ADRES 3AXISFLG # BIT6 OF FLAGWRD5 ZERO TO ALLOW VECPOINT\n CA STARCODE # GRAB DETENT CODE\n MASK HIGH9\n EXTEND\n BZMF R52A # DONT ALLOW ZERO CODE-RECYCLE\n MASK BIT9 # SEE IF CODE 4 OR 5\n CCS A\n TCF GETAZEL # CODE 4 OR 5-GET CALIBRATION AZ EL\n EBANK= XYMARK\n CA EBANK7\n TS EBANK\n CAF HIGH9 # FORWARD DETENT, INDEX DETENT AND GRAB\n MASK STARCODE # AZIMUTH ANGLE AND ELV = 45 DEG\n EXTEND\n MP BIT9 # SHIFT DETENT TO BITS1-2 FOR INDEX\n INDEX A\n CA AOTAZ -1 # PICK UP AZ CORRESPONDING TO DETENT\n\n## Page 954\n TS L\n EBANK= XSM\n CA EBANK5 # CHANGE TO EBANK5 BUT DONT DISTURB L\n TS EBANK\n CA BIT13 # SET ELV TO 45 DEG\n XCH L # SET C(A)=AZ, C(L)=45 DEG\n TCF AZEL # GO COMP OPTIC AXIS\n\nGETAZEL CAF V06N87 # CODE 4 OR 5-GET AZ AND EL FROM ASTRO\n TC BANKCALL\n CADR GOFLASH\n TC GOTOPOOH # V34-TERMINATE\n TCF +2 # PROCEED-CALC OPTIC AXIS\n TCF GETAZEL # ENTER-RECYCLE\n\n EXTEND\n DCA AZ # PICK UP AZ AND EL IN SP 2S COMP\nAZEL INDEX FIXLOC # JAM AZ AND EL IN 8 AND 9 OF VAC\n DXCH 8D\n TC INTPRET\n CALL # GO COMPUTE OPTIC AXIS AND STORE IN\n OANB # SCAXIS IN NB COORDS\n RTB CALL\n LOADTIME\n PLANET\n MXV UNIT\n REFSMMAT\n STORE POINTVSM # STORE FOR VECPOINT\n\n EXIT\n TC BANKCALL\n CADR R60LEM # GO TORQUE LEM OPTIC AXIS TO STAR LOS\n\n TC INTPRET # RETURN FROM KALCMANU\n GOTO\n SAVQR52 # RETURN TO CALLER\n\n1/6TH DEC .1666667\nV01N70 VN 0170\nV06N87 VN 687\n\n## Page 955\n# LUNAR SURFACE STAR AQUISITION\n\n BANK 15\n SETLOC P50S\n BANK\n COUNT* $$/R59\n\nR59 CS FLAGWRD3\n MASK REFSMBIT # IF REFSMMAT FLAG CLEAR BYPASS STAR AQUIR\n CCS A\n TCF R59OUT # NO REFSMMAT GO TO AOTMARK\n\n CAF V01N70* # SELECT STAR CODE FOR ACQUISITION\n TC BANKCALL\n CADR GOFLASH\n TC GOTOPOOH # V34-TERMINATE\n TCF R59A # V33-PROCEED\n TCF R59 # V32-RECYCLE\n\nR59A CS HIGH9 # GRAB STARCODE FOR INDEX\n MASK AOTCODE\n EXTEND\n MP REVCNT # JUST 6\n XCH L\n INDEX STARIND\n TS BESTI\n INDEX FIXLOC\n TS X1 # CODE X 6 FOR CATLOG STAR INDEX\n EXTEND\n BZF R59OUT # BYPASS AQUISITION IF NOT CATLOG STAR\n COM\n AD DEC227\n EXTEND\n BZMF R59OUT\n\n TC INTPRET\n CALL\n CDUTRIG # GET CDU JAZZ FOR SMNB\n VLOAD* MXV\n CATLOG,1 # GRAB STAR VECTOR\n REFSMMAT # TRANSFORM TO SM\n UNIT CALL\n *SMNB*\t\t\t# TRANSFORM TO NB\n STORE STAR # TEMP STORE STAR VEC(NB)\n EXIT\n\n CAF BIT1 # INITIALIZE POS TO ONE\n TS POSCODE\n CS DEG60 # AS(N) TO -60 DEG\n TS QMIN\n\n## Page 956\n\n\nSTORPOS TS A # DETECT OVF AZ = -120\n TCF +3 # NO OVF\n CAF BIT15 # OVF SKIP-ADD NEGMAX TO OVF CORRECT QMIN\n ADS QMIN\n CAF BIT13 # ELV=45 DEG\n TS L\n CA QMIN\n INDEX FIXLOC\n DXCH 8D # JAM AZ IN 8D, 45 DEG IN 9D FOR OANB\n\n TC INTPRET\n CALL\n OANB # GO CALC OPTIC AXIS WRT NB\n VLOAD DOT\n STAR # DOT STAR WITH OA\n SCAXIS\n SL1 ARCCOS\n STORE 24D # TEMP STORE ARCCOS(STAR.OPTAXIS)\n\n DSU BPL\n DEG30 # SEE IF STAR IN AOT FIELD-OF-VIEW\n NXAX # NOT IN FIELD - TRY NEXT POSITION\n DLOAD DSU # SEE IF STAR AT FIELD CENTER\n 24D\n DEG.5\n BMN DLOAD # CALC SPIRAL AND CURSOR\n ZSPCR # GO ZERO CURSOR AND SPIRAL\n 24D # GET SPIRAL\n DMP SL4\n 3/4 # 12 SCALED AT 16\n STOVL 24D # 12(ARCCOS(AO.STAR)) SCALED IN REVS\n\n SCAXIS # OA\n VXV UNIT\n XUNIT\n PUSH VXV # OA X UNITX PD 0-5\n SCAXIS\n VCOMP\n UNIT PDVL # UNIT(OA X(OA X UNITX)) PD 6-11\n SCAXIS\n VXV UNIT\n STAR\n PUSH DOT # 1/2(OA X STAR) PD 12-17\n 0 # DOT WITH 1/2(OA X UNITX) FOR YROT\n SL1 ARCCOS\n STOVL 26D # STORE THET SCALED IN REVS\n\n DOT # UP 12-17, UP 6-11 FOR C2\n BPL DLOAD # IF THET NEG-GET 360-THET\n R59D\n\n## Page 957\n ABOUTONE\n DSU\n 26D\n STORE 26D # 360-THET SCALED IN REVS\n\nR59D SLOAD SR1\n QMIN # RESCALE AZ(N) TO REVS\n DAD PUSH # PUSH YROT + AZ(N) REVS\n 26D\n RTB\n 1STO2S\n STODL CURSOR # YROT IN 1/2 REVS\n 24D # LOAD SROT IN REVS\n DAD # 12(SEP) + YROT\n RTB\n 1STO2S\n STORE SPIRAL # SROT IN 1/2 REVS\n EXIT\n TCF 79DISP # GO DISPLAY CURSOR-SPIRAL-POS CODE\n\nZSPCR EXIT\n CAF ZERO # STAR ALMOST OPTIC AXIS,ZERO CURSOR\n TS CURSOR # AND SPIRAL ANGLES\n TS SPIRAL\n TCF 79DISP\n\nNXAX EXIT\n INCR POSCODE\n CS POSCODE\n AD SEVEN\n EXTEND\n BZMF R59ALM # THIS STAR NOT AT ANY POSITION\n CAF DEG60 # ADVANCE AZ(N) BY 60 DEG\n ADS QMIN # IF OVF, QMIN CONTAINS OVF CORRECTED\n TCF STORPOS\nR59ALM TC ALARM # THIS STAR CANT BE LOCATED IN AOT FIELD\n OCT 404\n CAF VB05N09 # DISPLAY ALARM\n TC BANKCALL\n CADR GOFLASH\n TCF GOTOPOOH # VB34-TERMINATE\n TCF R59OUT # VB33-PROCEED, GO WITHOUT AQUIRE\n TCF R59 # VB32-RECYCLE AND TRY ANOTHER STAR\n\n79DISP CAF V06N79 # DISPLAY CURSOR, SPIRAL AND POS CODE\n TC BANKCALL\n CADR GOFLASH\n TCF GOTOPOOH # V34-TERMINATE\n TCF R59E # V33-PROCEED TO MARK ROUTINE\n TCF R59 # V32-RECYCLE TO TOP OF R59 AGAIN\n\n## Page 958\nR59E CAF BIT3 # GET DETENT CORRESPONDING TO POSITION COD\n MASK POSCODE # KEYED IN POS CODE\n EXTEND\n BZF +2 # FORWARD DETENT\n TCF +3 # ITS REAR DETENT, 4 ALREADY IN (A)\n CAF SEVEN # GET FORWARD DETENT\n MASK POSCODE\n EXTEND\n MP BIT7\n XCH L\n TS QMIN\n CS HIGH9\n MASK AOTCODE\n AD QMIN\n TS AOTCODE # STORE DETENT IN 7-9\n\nR59OUT TC BANKCALL # GO TO AOTMARK FOR SIGHTING\n CADR AOTMARK\n TC BANKCALL\n CADR AOTSTALL # SLEEP TILL SIGHTING DONE\n TC CURTAINS # BADEND RETURN FROM AOTMARK\n TCF R59RET # RETURN TO 1 STAR OR 2STAR\n\nV01N70* VN 170\nV06N79 VN 679\nDEG30 2DEC .083333333 # 30 DEGRESS\nDEG.5 2DEC .00138888 # .5 DEGRESS SCALED IN REVS\nDEG60 OCT 12525 # 60 DEG CDU SCALING\nCURSOR EQUALS DSPTEM1\nSPIRAL EQUALS DSPTEM1 +1\nPOSCODE EQUALS DSPTEM2 +2\n\n## Page 959\n# NAME - PLANET\n# FUNCTION -TO PROVIDE THE REFERENCE VECTOR FOR THE SIGHTED CELESTIAL\n# BODY. STARS ARE FETCHED FROM THE CATALOG,SUN,EARTH AND\n# MOON ARE COMPUTED BY LOCSAM,PLANET VECTORS ARE ENTERED\n# BY DSDY INPUT\n# CALL - CALL\n# PLANET\n# INPUT - TIME IN MPAC\n# OUTPUT - VECTOR IN MPAC\n# SUBROUTINES - LOCSAM\n# DEBRIS - VAC ,STARAD - STARAD +17\n\n SETLOC P50S\n BANK\n COUNT* $$/P51\n\nPLANET STORE TSIGHT\n STQ EXIT\n GCTR\n CS HIGH9\n MASK AOTCODE\n EXTEND\n MP REVCNT\n XCH L\n INDEX STARIND\n TS BESTI\n CCS A\n TCF NOTPLAN\n CAF VNPLANV\n TC BANKCALL\n CADR GOFLASH\n TC -3\n TC +2\n TC -5\n TC INTPRET\n VLOAD UNIT\n STARAD\n GOTO\n GCTR\nNOTPLAN CS A\n AD DEC227\n EXTEND\n BZMF CALSAM1\n INDEX STARIND\n CA BESTI\n INDEX FIXLOC\n TS X1\n TC INTPRET\n VLOAD* GOTO\n CATLOG,1\n\n## Page 960\n GCTR\nCALSAM1 TC INTPRET\nCALSAM DLOAD CALL\n TSIGHT\n LOCSAM\n LXC,1 VLOAD\n STARIND\n VEARTH\n STOVL 0D\n VSUN\n STOVL VEARTH\n 0D\n STORE VSUN\n DLOAD* LXC,1\n BESTI,1\n MPAC\n VLOAD* GOTO\n STARAD -228D,1\n GCTR\nDEC227 DEC 227\nVNPLANV VN 0688\nPIPSRINE = PIPASR +3 # EBANK NOT 4 SO DONT LOAD PIPTIME1\n\n## Page 961\n# GRAVITY VECTOR DETERMINATION ROUTINE\n# BY KEN VINCENT\n# FOR DETAILED DESCRIPTION SEE 504GSOP 5.6.3.2.5\n# THIS PROGRAM FINDS THE DIRECTION OF THE MOONS GRAVITY\n# WHILE THE LM IS ON THE MOONS SURFACE. IT WILL BE USED\n# FOR LUNAR SURFACE ALIGNMENT. THE GRAVITY VECTOR IS\n# DETERMINED BY READING THE PIPAS WITH THE IMU AT TWO\n# PARTICULAR ORIONTATIONS. THE TWO READINGS ARE AVERAGED\n# AND UNITIZED AND TRANSFORMED TO NB COORDINATES. THE TWO\n# ORIENTATION WERE CHOSEN TO REDUCE BIAS ERRORS IN THE\n# READINGS.\n#\n# CALL-\n# TC BANKCALL\n# CADR GVDETER\n# INPUTS-\n# PIPAS,CDUS\n# OUTPUTS-\n# STARSAV1 = UNIT GRAVITY\n# GSAV = DITTO\n# GRAVBIT = 1\n# SUBROUTINES-\n# PIPASR,IMUCOARS,IMUFINE,IMUSTALL,1/PIPA,DELAYJOB,CDUTRIG,\n# *NBSM* ,*SNMB*, CALCGA,FOFLASH\n# DEBRIS-\n# VAC,SAC,STARAD,XSM,XNB,THETAD,DELV,COSCDU,SINCDU\nGVDETER CS BIT13\t\t\t# JAM 45 DEG IN DESIRED GIMBAL ANGLES\n TS THETAD +1\n COM\n TS THETAD +2\n TS THETAD\n TC INTPRET\n CLEAR CALL\n REFSMFLG\n LUNG\n# FIND GIMBAL ANGLES WHICH ROTATE SM 180DEG ABOUT G VEC\n#\n# DEFINE G COOR SYS\n# -\n# X UNIT G\n# * - -\n# M= Y = UNITEZSM * X )\n# - - -\n# Z UNIT(X * Y )\n# THEN ROTATED SM WRT PRESENT IS\n#\n#\n# 1, 0 , 0\n# * *T * * *\n# XSM = M 0, -1 , 0 M = 2 (X X ) - 1/2 I *\n\n## Page 962\n# I J\n# 0, 0 ,-1\n#\n# ALSO NB WRT PRES SM IS\n#\n# * * *\n# XNB = NBSM I\n# * *\n# GIMBAL ANGLES = CALCGA( XSM , XNB )\n\n SETLOC P50S\n BANK\n COUNT* $$/P57\n AXT,1 SSP # X1=18\n 18D # S1= 6\n S1 # X2, -2\n 6D\n LXC,2\n S1\nGRAVEL VLOAD* CALL\n XUNIT -6,2\n *NBSM* # SIN AND COS COMPUTED IN LUNG\n STORE XNB +18D,1\n VLOAD\n STAR\n LXC,2 VXSC* # COMPLEMENT- UNITX ARE BACKWARD -\n X2\n STAR +6,2 # OUTER PRODUCT\n VSL2 LXC,2\n X2\n VSU* INCR,2\n XUNIT -6,2\n 2D\n STORE XSM +18D,1\n TIX,1 CALL\n GRAVEL\n CALCGA\n VLOAD VSR1\n GOUT\n STCALL STARAD +12D\n LUNG\n VLOAD VSR1\n GOUT\n VAD UNIT\n STARAD +12D\n STORE STARSAV1\n DOT\n GSAV\n SL1 ACOS\n STORE DSPTEM1\n\n## Page 963\n EXIT\n TC DOWNFLAG # CLEAR FREEFLAG IN CASE OF RECYCLE\n ADRES FREEFLAG\n\n CA DISGRVER\n TC BANKCALL\n CADR GOFLASH\n TC GOTOPOOH\n TCF PROGRAV # VB33-PROCEED\n TC UPFLAG # VB32-RECYCLE-STORE GRAV AND DO IT AGAIN\n ADRES FREEFLAG # AND SET FREEFLAG TO SHOW RECYCLE\n\nPROGRAV TC PHASCHNG\n OCT 05024\n OCT 13000\n TC INTPRET\n VLOAD\n STARSAV1\n STORE GSAV\n EXIT\n CAF FREEFBIT # IF FREEFLAG SET, RE-COMPUTE GRAVITY.\n MASK FLAGWRD0\n CCS A\n TCF GVDETER # SET\n TCF ATTCHK # EXIT FROM GVDETER\n\nLUNG STQ VLOAD\n QMIN\n ZEROVEC\n STORE GACC\n EXIT\n TC PHASCHNG\n OCT 05024\n OCT 13000\n TC BANKCALL\n CADR IMUCOARS\n TC BANKCALL\n CADR IMUSTALL\n TC CURTAINS\n TC BANKCALL\n CADR IMUFINE\n TC BANKCALL\n CADR IMUSTALL\n TC CURTAINS\n CA T/2SEC\n TS GCTR\n CA PRIO31\n TS 1/PIPADT\n TC BANKCALL\n CADR GCOMPZER # INITIALIZE COMPENSATION\n\n## Page 964\n TC PHASCHNG\n OCT 05024\n OCT 13000\n TC BANKCALL # DONT NEED TO INHINY THIS USED TO\n CADR PIPSRINE # INITIALIZE PIPAS DONT USE DATA\n TC INTPRET\nGREED EXIT # = MASK 7776 IN BASIC SO DONT CARE\n CAF 2SECS\n TC TWIDDLE # SET UP 2 SEC TASK TO READ PIPAS\n ADRES GRABGRAV\n\n TC ENDOFJOB\n\nGRABGRAV TC IBNKCALL\n CADR PIPSRINE\n CAF PRIO13 # RE-ESTABLISH MAINLINE JOB\n TC FINDVAC\n EBANK= STARAD\n 2CADR ADDGRAV\n\n TC TASKOVER\n\nADDGRAV TC BANKCALL\n CADR 1/PIPA\n INCR GCTR\n TC INTPRET\n VLOAD VAD\n DELV\n GACC\n STORE GACC # ACCUMULATE G VECTOR\n SLOAD BMN\n GCTR\n GREED\n VLOAD UNIT\n GACC\n STCALL STAR\n CDUTRIG # TRANSFORM IN NB COOR AND STORE\n CALL # IN OUTPUT\n *SMNB*\n STORE GOUT\n EXIT\n TC PHASCHNG\n OCT 05024\n OCT 13000\n TC INTPRET\n GOTO\n QMIN\nT/2SEC DEC -22\nDISGRVER VN 0604\n\n## Page 965\n# NAME GYROTRIM\n#\n# THIS PROGRAM COMPUTES AND SENDS GYRO COMMANDS WHICH CAUSE THE CDUS\n# TO ATTAIN A PRESCRIBED SET OF ANGLES. THIS ROUTINE ASSUMES THE\n# VEHICLES ATTITUDE REMAINS STATIONARY DURING ITS OPERATION.\n#\n# CALL CALL\n# GYROTRIM\n#\n# INPUT THETAD,+1,+2 = DESIRED CDU ANGLES\n# CDUX,CDUY,CDUZ\n#\n# OUTPUT - GYRO TORQUE PULSES\n#\n# SUBROUTINES- TRG*NBSM,*NBSM*,CDUTRIG,AXISGEN,CALCGTA,IMUFINE\n# IMPULSE,IMUSTALL\n# - - - * * -\n# DEBRIS - CDUSPOT ,SINCDU ,COSCDU , STARAD ,VAC , XDC , OGC\n COUNT* $$/P57\nGYROTRIM STQ DLOAD\n QMIN\n THETAD\n PDDL PDDL\n THETAD +2\n THETAD +1\n VDEF\n STOVL CDUSPOT\n XUNIT\n CALL\n TRG*NBSM\n STOVL STARAD\n YUNIT\n CALL\n *NBSM*\n STCALL STARAD +6\n CDUTRIG\n CALL\n CALCSMSC\n VLOAD\n XNB\n STOVL 6D\n YNB\n STCALL 12D\n AXISGEN\n CALL\n CALCGTA\nJUSTTRIM EXIT\n TC BANKCALL\n CADR IMUFINE\n TC BANKCALL\n\n## Page 966\n CADR IMUSTALL\n TC CURTAINS\n CA GYRCDR\n TC BANKCALL\n CADR IMUPULSE\n TC BANKCALL\n CADR IMUSTALL\n TC CURTAINS\n TC INTPRET\n GOTO\n QMIN\nGYRCDR ECADR OGC\n\n## Page 967\n# PERFORM STAR AQUISITION AND STAR SIGHTINGS\n\n2STARS CAF ZERO # INITALIZE STARIND\n TCF +2 # ZERO FOR 1ST STAR, ONE FOR 2ND STAR\n1STAR CAF BIT1\n TS STARIND\n\n TC PHASCHNG\n OCT 04024\n\n TCF R59 # GO DO STAR AQUIRE AND AOTMARK\n\nR59RET CA STARIND # BACK FROM SURFACE MARKING\n EXTEND\n BZF ASTAR # 1ST STAR MARKED\n\n TC INTPRET # 2ND STAR MARKED\n VLOAD\n STARAD +6\n STORE STARSAV2 # 2ND STAR IN SM\n\n EXIT\n TC PHASCHNG\n OCT 05024\n OCT 13000\n\n TC INTPRET\n DLOAD CALL\n TSIGHT # TIME OF 2ND MARK\n PLANET\n STCALL VEC2 # STORE 2ND CATALOG VEC (REF)\n SURFLINE\n\nASTAR TC INTPRET\n VLOAD\n STARAD +6\n STORE STARSAV1 # 1ST OBSERVED STAR (SM)\n DLOAD CALL\n TSIGHT # TIME OF 1ST MARK\n PLANET\n STORE VEC1 # STORE 1ST CATALOG VEC (REF)\n EXIT\n TCF 1STAR # GO GET 2ND STAR SIGHTING\n\n## Page 968\n# DO FINE OR COARSE ALIGNMENT OF IMU\n\nSURFLINE SSP AXT,2\n S2\n 6\n 12D\nWRTDESIR VLOAD* MXV\n VEC1 +12D,2 # PICK UP VEC IN REF, TRANS TO DESIRED SH\n XSMD\n UNIT\n STORE STARAD +12D,2 # VEC IN SM\n VLOAD*\n STARSAV1 +12D,2 # PICK UP VEC IN PRESENT SM\n STORE 18D,2\n TIX,2 BON\n WRTDESIR\n INITALGN # IF INITIAL PASS (OPTION 0) BYPASS R54\n INITBY\nDOALIGN CALL\n R54 # DO CHKSDATA\n BOFF\n FREEFLAG\n P57POST # ASTRO DOES NOT LIKE DATA TEST RESULTS\nINITBY CALL\n AXISGEN # GET DESIRED ORIENT WRT PRES.XDC,YDC,ZDC\n CALL\n CALCGTA # GET GYRO TORQ ANGLES, OGC,IGC,MGC\n EXIT\n CAF INITABIT # IF INITIAL PASS BYPASS NOUN 93 DISPLAY\n MASK FLAGWRD8\n CCS A\n TCF 5DEGTEST\n CAF DISPGYRO # DISPLAY GYRO TORQ ANGLES V 06N93\n TC BANKCALL\n CADR GOFLASH\n TC GOTOPOOH # V34-TERMINATE\n TCF 5DEGTEST # VB33-PROCEED TO COARSE OR FINE\n TCF P57POST +1 # VB32-RECYCLE, MAYBE RE-ALIGN\n\n5DEGTEST TC INTPRET # IF ANGLES GREATER THAN 5 DEGS, DO COARSE\n VLOAD BOV\n OGC\n SURFSUP\nSURFSUP STORE OGCT\n V/SC BOV\n 5DEGREES\n COATRIM\n SSP GOTO\n QMIN\n SURFDISP\n\n## Page 969\n JUSTTRIM # ANGLES LESS THAN 5 DEG, DO GYRO TORQ\n\nSURFDISP EXIT\n TC PHASCHNG\n OCT 05024 # STORE REFSMMAT ,SET REFSMFLG AND\n OCT 13000 # DISPLAY ORIGINAL TORQ ANGLES\n TC INTPRET\n AXC,1 AXC,2\n XSMD\n REFSMMAT\n SET CALL\n REFSMFLG\n MATMOVE\n EXIT\n CCS OPTION2 # IF OPTION ZERO DO FINISH\n TCF B2F8\n TCF P57POST +1\n\nB2F8 CAF INITABIT # IF INITIAL FLAG SET, RE-CYCLE.\n MASK FLAGWRD8\n CCS A\n TCF P57JUMP # ITS SET\n TC INTPRET\n CALL\n REFMF # GO GET ATTITUDE VEC IN MF(YNBSAV,XNBSAV)\nP57POST EXIT\n CAF OCT14 # DISPLAY V50N25 CHK CODE 14\n TC BANKCALL\n CADR GOPERF1\n TCF GOTOPOOH # VB34-TERMINATE\n TCF P57JUMP # VB33-PROCEED TO RE-ALIGN\n TCF GOTOPOOH # VB32-R59 DONE-GO TO PROG 00\n\n## Page 970\n# COARSE AND FINE ALIGN IMU\nCOATRIM AXC,1 AXC,2\n XDC\n XSM\n CALL\n MATMOVE\n CALL\n CDUTRIG\n CALL\n CALCSMSC\n CALL\n CALCGA\n CALL\n COARSE\n CALL\n NCOARSE\n CALL\n GYROTRIM\n GOTO\n SURFDISP\nDISPGYRO VN 0693\n\n## Page 971\n# LUNAR SURFACE IMU ALIGNMENT PROGRAM\n\nP57 TC BANKCALL # IS ISS ON - IF NOT, IMUCHK WILL SEND\n CADR IMUCHK # ALARM CODE 210 AND EXIT VIA GOTOPOOH.\n\n TC INTPRET\n DLOAD\n TIG # LOAD ASCENT TIME FOR DISPLAY\nP57A STORE DSPTEM1\n EXIT\nP57AA CAF V06N34* # DISPLAY TALIGN, TALIGN : DSPTEM1\n TC BANKCALL\n CADR GOFLASHR\n TCF GOTOPOOH # V34-TERMINATE\n TCF +5\n TCF P57AA # VB32-RECYCLE\n\n TC PHASCHNG\n OCT 00014\n TC ENDOFJOB\n\n TC INTPRET\n DLOAD BMN\n DSPTEM1\n PACKOPTN -1 # NEG TIME-PREF ORIENT IN XSMD MATRIX\n RTB PDDL\n LOADTIME # PUSH CURRENT TIME AND PICK UP KEY IN\n DSPTEM1\n BZE PDDL\n P57C # IF KEY IN TIME ZERO-TALIGN=CURRENT TIME\n DSU BPL # NOT ZERO SO EXCHANGE PD WITH DSPTEM1\n DSPTEM1\n P57C\n DLOAD STADR # IF KEYIN TIME GREATER THAN CURRENT TIME\n STORE TIG # STORE IT IN TIG\n STCALL TALIGN\n P57D\nP57C DLOAD STADR\n STORE TALIGN\nP57D STCALL TDEC1\n LEMPREC # COMPUTE DESIRED IMU ORIENTATION STORE\n VLOAD UNIT # IN X,Y,ZSMD\n RATT\n STCALL XSMD\n LSORIENT\n EXIT\nPACKOPTN CAF ZERO # PACK FLAG BITS FOR OPTION DISPLAY\n TS OPTION1 +1 # JAM ZERO IN ALIGNMENT OPTION\n TS OPTION1 +2 # INITIALIZE FLAG BIT CONFIGURATION\n CAF REFSMBIT\n\n## Page 972\n MASK FLAGWRD3 # REFSMFLG\n CCS A\n CAF BIT7 # SET\n ADS OPTION1 +2 # CLEAR-JUST ZERO\n CAF ATTFLBIT\n MASK FLAGWRD6 # ATTFLG\n CCS A\n CAF BIT4 # SET\n ADS OPTION1 +2 # CLEAR-ZERO IN A\n CAF BIT4\n TS OPTION1 # JAM 00010 IN OPTION1 FOR CHECK LIST\n\nDSPOPTN CAF VB05N06 # DISPLAY OPTION CODE AND FLAG BITS\n TC BANKCALL\n CADR GOFLASH\n TCF GOTOPOOH # VB34-TERMINATE\n TCF +2 # V33-PROCEED\n TCF DSPOPTN # V32-RECYCLE\n\n TC PHASCHNG\n OCT 05024\n OCT 13000\n CAF REFSMBIT\n MASK FLAGWRD3\n CCS A\n TCF GETLMATT # SET, GO COMPUTE LM ATTITUDE\n CAF ATTFLBIT # CLEAR-CHECK ATTFLAG FOR STORED ATTITUDE.\n MASK FLAGWRD6\n CCS A\n TCF BYLMATT # ALLFLG SET, CHK OPTION FOR GRAVITY COMP\n CAF BIT2 # SEE IF OPTION 2 OR 3\n MASK OPTION2\n CCS A\n TCF BYLMATT # OPTION 2 OR 3 BUT DONT HAVE ATTITUDE\n TC ALARM # OPTION INCONSISTANT WITH FLAGS-ALARM 701\n OCT 701\n CAF VB05N09 # DISPLAY ALARM FOR ACTION\n TC BANKCALL\n CADR GOFLASH\n TCF GOTOPOOH # VB34-TERMINATE\n TCF DSPOPTN # V33-PROCEED ********TEMPORARY\n TCF DSPOPTN # VB32-RECYCLE TO OPTION DISPLAY V 05N06\n\n## Page 973\n# TRANSFORM VEC1,2 FROM MOON FIXED TO REF AND JAM BACK IN VEC1,2\n\nMFREF STQ SETPD\n QMAJ\n 0\n RTB\n LOADTIME\n STOVL TSIGHT\n VEC1\n PDDL PUSH\n TSIGHT\n CALL\n RP-TO-R\n STOVL VEC1\n VEC2\n SETPD PDDL\n 0\n TSIGHT\n PUSH CALL\n RP-TO-R\n STCALL VEC2\n QMAJ\n\n## Page 974\n# COMPUTE LM ATTITUDE IN MOON FIXED COORDINATES USING REFSMMAT AND\n# STORE IN YNBSAV AND ZNBSAV\n\nREFMF STQ CALL\n QMAJ\n CDUTRIG # GET SIN AND COS OF CDUS\n RTB SETPD\n LOADTIME\n 0\n STCALL TSIGHT\n CALCSMSC # GET YNB IN SM\n VLOAD VXM\n YNB\n REFSMMAT # YNB TO REF\n UNIT PDDL\n TSIGHT\n PUSH CALL\n R-TO-RP\n STOVL YNBSAV # YNB TO MF\n ZNB\n VXM UNIT\n REFSMMAT # ZNB TO REF\n PDDL PUSH\n TSIGHT\n CALL\n R-TO-RP # ZNB TO MF\n STORE ZNBSAV\n SETGO\n ATTFLAG\n QMAJ\n\n## Page 975\n# BRANCH TO ALIGNMENT OPTION\n\nGETLMATT TC INTPRET\n CALL\n REFMF # GO TRANSFORM TO MF IN YNBSAV,ZNBSAV\n EXIT\n\nBYLMATT TC UPFLAG # SET INITIAL ALIGN FLAG\n ADRES INITALGN\n CAF BIT1\n MASK OPTION2 # SEE IF OPTION 1 OR 3\n CCS A\n TCF GVDETER # OPTION 1 OR 2, GET GRAVITY\n\nATTCHK TC PHASCHNG\n OCT 04024\n\n CAF ATTFLBIT # NOT 1 OR 3, CHECK ATTFLAG\n MASK FLAGWRD6\n CCS A\n TCF P57OPT0 # GET ALIGNMENT VECS FOR OPTION 0\nP57JUMP TC PHASCHNG\n OCT 04024\n\n TC DOWNFLAG # ATTFLG CLEAR-RESET INTALIGN FLAG\n ADRES INITALGN\n CAF THREE\n MASK OPTION2 # BRANCH ON OPTION CODE\n INDEX A\n TCF +1\n TCF P57OPT0 # OPTION IS 0\n TCF P57OPT1 # OPTION IS 1\n TCF P57OPT2 # OPTION IS 2\n TCF P57OPT3 # OPTION IS 3\n\n## Page 976\n# OPTION 0, GET TWO ATTITUDE VECS\n\nP57OPT0 TC INTPRET\n VLOAD\n YNBSAV # Y AND Z ATTITUDE WILL BE PUT IN REF\n STOVL VEC1\n ZNBSAV\n STCALL VEC2\n CDUTRIG\n CALL\n CALCSMSC # COMPUTE SC AXIS WRT PRESENT SM\n VLOAD\n YNB\nSAMETYP STOVL STARSAV1 # Y SC AXIS WRT PRESENT SM\n ZNB\n STCALL STARSAV2 # Z SC AXIS WRT PRESENT SM\n MFREF # TRANSFORM VEC1,2 FROM MF TO REF\n GOTO\n SURFLINE\n\n# OPTION 1, GET LANDING SITE AND Z-ATTITUDE VEC\n\nP57OPT1 TC INTPRET\n VLOAD UNIT\n RLS # LANDING SITE VEC\n STOVL VEC1\n ZNBSAV # Z ATTITUDE VEC\n STCALL VEC2\n CDUTRIG\n CALL\n CALCSMSC # GET ZNB AXIS WRT PRES SM FOR STARSAV2\n VLOAD CALL\n GSAV # TRANS GSAV FROM NB TO SM FOR STARSAV1\n CDU*NBSM\n GOTO\n SAMETYP # NOW DO SAME AS OPTION 0\n\n## Page 977\n# OPTION 2, GET TWO STAR SIGHTINGS\n\nP57OPT2 TCF 2STARS # DO SIGHTING ON 2 STARS\n\n# OPTION 3, GET LANDING SITE VEC AND ONE STAR SIGHTING\n\nP57OPT3 TC INTPRET\n VLOAD UNIT\n RLS # LANDING SITE VEC\n STORE VEC1\n STOVL VEC2 # DUMMY VEC2 FOR 2ND CATALOG STAR\n GSAV # GRAVITY VEC NB\n CALL\n CDU*NBSM # TRANS GSAV FROM NB TO SM FOR STARSAV1\n STCALL STARSAV1\n MFREF # STARSAV2 IS STORED AS 2ND OBSERVED STAR\n EXIT\n TCF 1STAR # 1STAR GET VEC2,STARSAV2,GOES TO SURFLINE\n\nBADOPT OCT 00701 # **** TEMP ****\nVB05N06 VN 506\n\n## Page 978\n# CHECK IMODES30 TO VARIFY IMU IS ON\n\nIMUCHK CS IMODES30\n MASK BIT9\n CCS A # IS IMU ON\n TCF +4 # YES\n\n TC ALARM # NO, SEND ALARM AND EXIT\n OCT 210\n TC GOTOPOOH\n\n TC UPFLAG\n ADRES IMUSE # SET IMUSE FLAG\n\n TC SWRETURN\n\nLSORIENT STQ VLOAD\n QMAJ\n RRECTCSM\n VXV VXV\n VRECTCSM\n XSMD\n UNIT\n STORE ZSMD\n VXV UNIT\n XSMD\n STCALL YSMD\n QMAJ\n"} +{"text": "const path = require('path')\nconst boilerplate = require('workshopper-boilerplate')\nconst copy = require('../../lib/copy')\nconst gyp = require('../../lib/gyp')\nconst solutions = require('../../lib/solutions')\nconst check = require('../../lib/check')\nconst compile = require('../../lib/compile')\nconst packagejson = require('../../lib/packagejson')\nconst execWith = require('../../lib/execWith')\n\nconst solutionFiles = ['myaddon.cc']\n// a place to make a full copy to run a test compile\nconst copyTempDir = path.join(process.cwd(), '~test-addon.' + Math.floor(Math.random() * 10000))\n// a place to make a full copy to replace myaddon.cc with a mock to do a mocked run to test JS\nconst copyFauxTempDir = path.join(process.cwd(), '~test-addon-faux.' + Math.floor(Math.random() * 10000))\n// what we should get on stdout for this to pass\n\nvar exercise = require('workshopper-exercise')()\n\n// add solutions file listing from solutions/ directory\nexercise = solutions(exercise, solutionFiles)\n// add boilerplate functionality\nexercise = boilerplate(exercise)\n\n// boilerplate files for them to start from\nexercise.addBoilerplate(path.join(__dirname, 'boilerplate/index.js'))\nexercise.addBoilerplate(path.join(__dirname, 'boilerplate/myaddon.cc'))\n\n// the steps towards verification\nexercise.addProcessor(check.checkSubmissionDir)\nexercise.addProcessor(copy.copyTemp([copyTempDir, copyFauxTempDir]))\nexercise.addProcessor(copyFauxAddon)\nexercise.addProcessor(packagejson.checkPackageJson)\nexercise.addProcessor(gyp.checkBinding)\nexercise.addProcessor(compile.checkCompile(copyTempDir))\nexercise.addProcessor(checkJs)\nexercise.addProcessor(checkExec)\n\n// always clean up the temp directories\nexercise.addCleanup(copy.cleanup([copyTempDir, copyFauxTempDir]))\n\nfunction copyFauxAddon (mode, callback) {\n copy(path.join(__dirname, 'faux', 'myaddon.cc'), copyFauxTempDir, { overwrite: true }, function (err) {\n if (err) { return callback(err) }\n\n callback(null, true)\n })\n}\n\nconst resolvePass = (expected, stdout) => expected.test(stdout.toString().replace(/\\r/g, ''))\n\n// run `node-gyp rebuild` on a mocked version of the addon that prints what we want\n// so we can test that their JS is doing what it is supposed to be doing and there\n// is no cheating! (e.g. console.log(...))\nfunction checkJs (mode, callback) {\n var exercise = this\n var expect = /FAUX 1\\nFAUX 2\\nWaiting\\.*FAUX 3\\n\\.+FAUX 4\\n\\.*Done!\\n/m\n\n if (!exercise.passed) { return callback(null, true) } // shortcut if we've already had a failure\n\n gyp.rebuild(copyFauxTempDir, function (err) {\n if (err) {\n exercise.emit('fail', 'Compile mock C++ to test JavaScript: ' + err.message)\n return callback(null, false)\n }\n\n execWith(copyFauxTempDir, 111, expect, { resolvePass }, function (err, pass) {\n if (err) { return callback(err) }\n\n if (!pass) {\n exercise.emit('fail', 'JavaScript code loads addon and invokes `delay(x, cb)` method')\n return callback(null, false)\n }\n\n execWith(copyFauxTempDir, 1111, expect, { resolvePass }, function (err, pass) {\n if (err) { return callback(err) }\n\n exercise.emit(pass ? 'pass' : 'fail'\n , 'JavaScript code loads addon and invokes `delay(x, cb)` method')\n callback(null, pass)\n })\n })\n })\n}\n\n// run a full execution of their code & addon, uses a `require()` in a child process\n// and check the stdout for expected\nfunction checkExec (mode, callback) {\n if (!exercise.passed) { return callback(null, true) } // shortcut if we've already had a failure\n\n var expect = /Waiting\\.\\.*Done!\\n/m\n var start = Date.now()\n\n execWith(copyTempDir, 111, expect, { resolvePass }, function (err, pass) {\n if (err) { return callback(err) }\n\n if (!pass) {\n exercise.emit('fail', 'JavaScript code loads addon, invokes `delay(x, cb)` method and sleeps for x seconds')\n return callback(null, false)\n }\n\n var delay = Date.now() - start\n\n if (delay < 100 || delay > 600) {\n exercise.emit('fail', 'Slept for the right amount of time (asked for 111ms, slept for ' + delay + 'ms)')\n return callback(null, false)\n }\n\n start = Date.now()\n execWith(copyTempDir, 1111, expect, { resolvePass }, function (err, pass) {\n if (err) { return callback(err) }\n\n delay = Date.now() - start\n\n if (delay < 1000 || delay > 1500) {\n exercise.emit('fail', 'Slept for the right amount of time (asked for 1111ms, slept for ' + delay + 'ms)')\n return callback(null, false)\n }\n\n exercise.emit(pass ? 'pass' : 'fail'\n , 'JavaScript code loads addon, invokes `delay(x, cb)` method and sleeps for x seconds')\n callback(null, pass)\n })\n })\n}\n\nmodule.exports = exercise\n"} +{"text": "---\nid: 5900f5451000cf542c510057\nchallengeType: 5\ntitle: 'Problem 472: Comfortable Distance II'\nvideoUrl: ''\nlocaleTitle: 'Problema 472: Distancia cómoda II'\n---\n\n## Description\n<section id=\"description\"> Hay N asientos en una fila. N personas vienen una tras otra para llenar los asientos de acuerdo con las siguientes reglas: Ninguna persona se sienta al lado de otra. La primera persona elige cualquier asiento. Cada persona subsiguiente elige el asiento más alejado de cualquier otra persona que ya esté sentada, siempre que no infrinja la regla 1. Si hay más de una opción que satisface esta condición, la persona elige la opción más a la izquierda. Tenga en cuenta que debido a la regla 1, algunos asientos seguramente quedarán desocupados, y el número máximo de personas que pueden sentarse es menor que N (para N&gt; 1). <p> Aquí están los arreglos de asientos posibles para N = 15: </p><p> Vemos que si la primera persona elige correctamente, los 15 asientos pueden acomodar hasta 7 personas. También podemos ver que la primera persona tiene 9 opciones para maximizar el número de personas que pueden estar sentadas. </p><p> Sea f (N) el número de opciones que tiene la primera persona para maximizar el número de ocupantes para N asientos en una fila. Por lo tanto, f (1) = 1, f (15) = 9, f (20) = 6, y f (500) = 16. </p><p> Además, ∑f (N) = 83 para 1 ≤ N ≤ 20 y ∑f (N) = 13343 para 1 ≤ N ≤ 500. </p><p> Encuentra ∑f (N) para 1 ≤ N ≤ 1012. Da los últimos 8 dígitos de tu respuesta. </p></section>\n\n## Instructions\n<section id=\"instructions\">\n</section>\n\n## Tests\n<section id='tests'>\n\n```yml\ntests:\n - text: <code>euler472()</code> debe devolver 73811586.\n testString: 'assert.strictEqual(euler472(), 73811586, \"<code>euler472()</code> should return 73811586.\");'\n\n```\n\n</section>\n\n## Challenge Seed\n<section id='challengeSeed'>\n\n<div id='js-seed'>\n\n```js\nfunction euler472() {\n // Good luck!\n return true;\n}\n\neuler472();\n\n```\n\n</div>\n\n\n\n</section>\n\n## Solution\n<section id='solution'>\n\n```js\n// solution required\n```\n</section>\n"} +{"text": "// Output listings matching search terms: \n\n// Populate our search term variables:\nDECLARE @State string = \"WA\"; // WA, CA, TX, or DC \nDECLARE @City string = \"Seattle\"; // Seattle, Austin, Los Angeles, or Washington\nDECLARE @Neighbourhood string = \"Capitol Hill\";\nDECLARE @Property_type string = \"Apartment\"; // \"Private room\" or \"Entire home/apt\"\nDECLARE @Room_type string = \"Entire home/apt\"; // \"Entire home/apt\", \"Shared room\", or \"Private room\"\nDECLARE @Bedrooms int = 1;\n\n// Read the data file Listings.csv into @AllListings variable:\n@AllListings =\nEXTRACT\n id int\n, neighbourhood string\n, city string\n, state string\n, zipcode string\n, property_type string\n, room_type string\n, bedrooms int\n, price string\n, last_review string\n, review_scores_rating string\n, review_scores_value string\n, reviews_per_month string\n, availability_30 string\n, availability_365 string\nFROM \"Listings-MyDates.csv\"\nUSING Extractors.Csv(skipFirstNRows: 1, silent:true) ;\n\n// SELECT Listing records, matching our search terms, into @ListingsBetweenDates variable:\n@ListingsMatchingSearchTerms =\nSELECT al.*\nFROM @AllListings AS al // Using \"al\" as an alias for @AllListings\nWHERE\n state == @State\nAND city == @City\nAND neighbourhood == @Neighbourhood\nAND property_type == @Property_type\nAND room_type == @Room_type\nAND bedrooms == @Bedrooms ;\n\n// Save the results from @ListingsMatchingSearchTerms variable to a data file:\n// ORDER BY the review score rating, largest values first.\nOUTPUT @ListingsMatchingSearchTerms\n TO \"Listings-MatchingSearchTerms.csv\"\n ORDER BY review_scores_rating DESC \n USING Outputters.Csv(outputHeader:true);\n "} +{"text": "DataverseUse test\nQuery:\nSELECT ELEMENT [\nRecordConstructor [\n (\n LiteralExpr [STRING] [c_custkey]\n :\n FieldAccessor [\n Variable [ Name=$c ]\n Field=c_custkey\n ]\n )\n (\n LiteralExpr [STRING] [o_orderkey]\n :\n FieldAccessor [\n Variable [ Name=$o ]\n Field=o_orderkey\n ]\n )\n (\n LiteralExpr [STRING] [len_c_comment]\n :\n FunctionCall asterix.string-length@1[\n FieldAccessor [\n Variable [ Name=$c ]\n Field=c_comment\n ]\n ]\n )\n (\n LiteralExpr [STRING] [len_o_comment]\n :\n FunctionCall asterix.string-length@1[\n FieldAccessor [\n Variable [ Name=$o ]\n Field=o_comment\n ]\n ]\n )\n (\n LiteralExpr [STRING] [c_comment]\n :\n FieldAccessor [\n Variable [ Name=$c ]\n Field=c_comment\n ]\n )\n]\n]\nFROM [ FunctionCall asterix.dataset@1[\n LiteralExpr [STRING] [test.Customer]\n ]\n AS Variable [ Name=$c ]\n,\n FunctionCall asterix.dataset@1[\n LiteralExpr [STRING] [test.Order]\n ]\n AS Variable [ Name=$o ]\n]\nWhere\n OperatorExpr [\n FieldAccessor [\n Variable [ Name=$c ]\n Field=c_custkey\n ]\n =\n FieldAccessor [\n Variable [ Name=$o ]\n Field=o_custkey\n ]\n ]\nOrderby\n FieldAccessor [\n Variable [ Name=$o ]\n Field=o_orderkey\n ]\n ASC\n FieldAccessor [\n Variable [ Name=$c ]\n Field=c_custkey\n ]\n ASC\n\n"} +{"text": "from __future__ import absolute_import, unicode_literals\nimport atexit\nimport hashlib\nimport logging\nimport os\nimport subprocess\nfrom binascii import unhexlify\nfrom types import GeneratorType\nfrom io import BytesIO\nfrom .exceptions import NoHelperAbort, HelperClosedError\nfrom .git import (\n EMPTY_BLOB,\n Git,\n NULL_NODE_ID,\n split_ls_tree,\n)\nfrom .hg.changegroup import (\n RawRevChunk01,\n RawRevChunk02,\n)\nfrom .util import (\n environ,\n fsdecode,\n iteritems,\n IOLogger,\n lrucache,\n Process,\n)\nfrom contextlib import contextmanager\n\n\ndef git_hash(type, data):\n h = hashlib.sha1(b'%s %d\\0' % (type, len(data)))\n h.update(data)\n return h.hexdigest().encode('ascii')\n\n\ndef tree_hash(files, full_base, base=b''):\n if base:\n base = base + b'/'\n tree = {}\n for f in files:\n p = f.split(os.sep.encode('ascii'), 1)\n if len(p) == 1:\n tree[p[0]] = None\n else:\n tree.setdefault(p[0], list()).append(p[1])\n content = b''\n for f, subtree in sorted(tree.items()):\n path = os.path.join(full_base, f.decode('ascii'))\n if subtree:\n sha1 = tree_hash(subtree, path, b'%s%s' % (base, f))\n attr = b'40000'\n else:\n sha1 = git_hash(\n b'blob', open(path, 'rb').read().replace(b'\\r\\n', b'\\n'))\n attr = b'100644'\n logging.debug('%s %s %s%s', attr, sha1, base, f)\n content += b'%s %s\\0%s' % (attr, f, unhexlify(sha1))\n sha1 = git_hash(b'tree', content)\n logging.debug('040000 %s %s', sha1, base.rstrip(b'/'))\n return sha1\n\n\ndef helper_hash():\n script_path = os.path.join(os.path.dirname(__file__), '..')\n d = os.path.join(script_path, 'helper')\n files = (os.listdir(d) if os.path.exists(d) else ())\n\n def match(f):\n return (f.endswith(('.h', '.c', '.c.patch')) and\n 'patched' not in f) or \\\n f in ('GIT-VERSION.mk', 'helper.mk')\n files = list(f.encode('ascii') for f in files if match(f))\n\n if b'cinnabar-helper.c' not in files:\n return None\n\n return tree_hash(files, d)\n\n\nclass ReadWriter(object):\n def __init__(self, reader, writer):\n self._reader = reader\n self._writer = writer\n\n def read(self, size=None):\n if size is None:\n return self._reader.read()\n return self._reader.read(size)\n\n def readline(self):\n return self._reader.readline()\n\n def write(self, data=b''):\n self._writer.write(data)\n\n def flush(self):\n self._writer.flush()\n\n\nclass BaseHelper(object):\n _helper_hash = None\n\n @classmethod\n def close(self):\n if self._helper and self._helper is not self:\n self._helper.wait()\n self._helper = self\n\n @classmethod\n def _ensure_helper(self):\n if self._helper is False:\n helper_path = Git.config('cinnabar.helper')\n env = {\n b'GIT_REPLACE_REF_BASE': b'refs/cinnabar/replace/',\n }\n for k, v in iteritems(environ()):\n if k.startswith(b'GIT_CINNABAR_'):\n env[k] = v\n if helper_path:\n helper_path = fsdecode(helper_path)\n if helper_path and os.path.exists(helper_path):\n command = [helper_path]\n else:\n command = ['git', 'cinnabar-helper']\n command.append('--{}'.format(self.MODE))\n\n try:\n self._helper = Process(*command, stdin=subprocess.PIPE,\n stderr=None, env=env,\n logger='helper-{}'.format(self.MODE))\n self._helper.stdin.write(b'version %d\\n' % self.VERSION)\n self._helper.stdin.flush()\n response = self._helper.stdout.readline()\n except Exception:\n self._helper = None\n response = None\n\n outdated = ('Cinnabar helper executable is outdated. '\n 'Please try `git cinnabar download` or '\n 'rebuild it.')\n\n if not response:\n if self._helper and self._helper.wait() == 128:\n message = outdated\n else:\n message = ('Cannot find cinnabar helper executable. '\n 'Please try `git cinnabar download` or '\n 'build it.')\n\n raise NoHelperAbort(message)\n else:\n version = response.lstrip(b'ok\\n') or b'unknown'\n self._revision, _, version = version.partition(b' ')\n if version:\n self._version = int(version)\n else:\n self._version = self.VERSION\n self._helper.stdin.write(b'helpercaps\\n')\n self._helper.stdin.flush()\n response = self._read_data(self._helper.stdout)\n self._caps = {\n k: v.split(b',')\n for k, _, v in (l.partition(b'=')\n for l in response.splitlines())\n }\n\n if BaseHelper._helper_hash is None:\n BaseHelper._helper_hash = helper_hash() or False\n if BaseHelper._helper_hash is not False and \\\n BaseHelper._helper_hash != self._revision and \\\n self._version <= self.VERSION:\n logging.warning(outdated)\n\n atexit.register(self.close)\n\n if self._helper is self:\n raise HelperClosedError\n\n @classmethod\n @contextmanager\n def query(self, name, *args):\n self._ensure_helper()\n if name == b'revision':\n yield BytesIO(self._revision)\n return\n\n helper = self._helper\n logger = logging.getLogger(name.decode('ascii'))\n if logger.isEnabledFor(logging.INFO):\n wrapper = IOLogger(logger, helper.stdout, helper.stdin,\n prefix='[%d]' % helper.pid)\n else:\n wrapper = helper.stdin\n\n if args:\n wrapper.write(b'%s %s\\n' % (name, b' '.join(args)))\n else:\n wrapper.write(b'%s\\n' % name)\n wrapper.flush()\n if logger.isEnabledFor(logging.DEBUG):\n yield wrapper\n else:\n yield ReadWriter(helper.stdout, helper.stdin)\n\n @classmethod\n def _read_file(self, expected_typ, stdout):\n hg_sha1 = stdout.read(41)\n if hg_sha1[-1:] == b'\\n':\n assert hg_sha1[:40] == NULL_NODE_ID\n if expected_typ == b'auto':\n return b'missing', None\n return None\n typ, size = stdout.readline().split()\n size = int(size)\n assert expected_typ == b'auto' or typ == expected_typ\n ret = stdout.read(size)\n lf = stdout.read(1)\n assert lf == b'\\n'\n if expected_typ == b'auto':\n return typ, ret\n return ret\n\n @classmethod\n def _read_data(self, stdout):\n size = int(stdout.readline().strip())\n if size < 0:\n ret = None\n else:\n ret = stdout.read(size)\n lf = stdout.read(1)\n assert lf == b'\\n'\n return ret\n\n @classmethod\n def supports(self, feature):\n self._ensure_helper()\n if isinstance(feature, int):\n return feature <= self._version\n assert isinstance(feature, tuple) and len(feature) == 2\n k, v = feature\n return v in self._caps.get(k, ())\n\n\nclass GitHgHelper(BaseHelper):\n VERSION = 3003\n MODE = 'import'\n _helper = False\n\n @classmethod\n def reload(self):\n with self.query(b'reload'):\n pass\n self.git2hg.invalidate()\n self.hg2git.invalidate()\n self._cat_commit.invalidate()\n\n @classmethod\n def _cat_file(self, typ, sha1):\n with self.query(b'cat-file', sha1) as stdout:\n return self._read_file(typ, stdout)\n\n @classmethod\n @lrucache(16)\n def _cat_commit(self, sha1):\n return self._cat_file(b'commit', sha1)\n\n @classmethod\n def cat_file(self, typ, sha1):\n if typ == b'commit':\n return self._cat_commit(sha1)\n return self._cat_file(typ, sha1)\n\n @classmethod\n @lrucache(16)\n def git2hg(self, sha1):\n assert sha1 != b'changeset'\n with self.query(b'git2hg', sha1) as stdout:\n return self._read_file(b'blob', stdout)\n\n @classmethod\n def file_meta(self, sha1):\n with self.query(b'file-meta', sha1) as stdout:\n return self._read_file(b'blob', stdout)\n\n @classmethod\n @lrucache(16)\n def hg2git(self, hg_sha1):\n with self.query(b'hg2git', hg_sha1) as stdout:\n sha1 = stdout.read(41)\n assert sha1[-1:] == b'\\n'\n return sha1[:40]\n\n @classmethod\n def manifest(self, hg_sha1):\n with self.query(b'manifest', hg_sha1) as stdout:\n return self._read_data(stdout)\n\n @classmethod\n def check_manifest(self, hg_sha1):\n with self.query(b'check-manifest', hg_sha1) as stdout:\n return stdout.readline().strip() == b'ok'\n\n @classmethod\n def check_file(self, hg_sha1, *parents):\n with self.query(b'check-file', hg_sha1, *parents) as stdout:\n return stdout.readline().strip() == b'ok'\n\n @classmethod\n def ls_tree(self, sha1, recursive=False):\n extra = () if not recursive else (b'-r',)\n with self.query(b'ls-tree', sha1, *extra) as stdout:\n for line in self._read_data(stdout).split(b'\\0'):\n if line:\n yield split_ls_tree(line)\n\n @classmethod\n def rev_list(self, *args):\n with self.query(b'rev-list', *args) as stdout:\n for line in self._read_data(stdout).splitlines():\n parents = line.split()\n commit = parents.pop(0)\n tree = parents.pop(0)\n yield commit, tree, parents\n\n @classmethod\n def diff_tree(self, rev1, rev2, detect_copy=False):\n extra = () if not detect_copy else (b'-C100%',)\n extra = extra + (b'--ignore-submodules=dirty', b'--')\n with self.query(b'diff-tree', rev1, rev2, *extra) as stdout:\n data = self._read_data(stdout)\n off = 0\n while off < len(data):\n tab = data.find(b'\\t', off)\n assert tab != -1\n (mode_before, mode_after, sha1_before, sha1_after,\n status) = data[off:tab].split(b' ')\n if detect_copy and status[:1] in b'RC':\n orig = data.find(b'\\0', tab + 1)\n status = status[:1] + data[tab + 1:orig]\n tab = orig\n end = data.find(b'\\0', tab + 1)\n path = data[tab + 1:end]\n off = end + 1\n yield (mode_before, mode_after, sha1_before, sha1_after,\n status, path)\n\n @classmethod\n def set(self, *args):\n if args[0] == b'changeset-metadata':\n self.git2hg.invalidate(self, self.hg2git(args[1]))\n elif args[0] != b'file-meta':\n self.hg2git.invalidate(self, args[1])\n with self.query(b'set', *args):\n pass\n\n @classmethod\n def store(self, what, *args):\n if what == b'metadata':\n with self.query(b'store', what, *args) as stdout:\n sha1 = stdout.read(41)\n assert sha1[-1:] == b'\\n'\n return sha1[:40]\n elif what in (b'file', b'manifest'):\n obj = args[0]\n if isinstance(obj, RawRevChunk01):\n delta_node = obj.delta_node\n elif isinstance(obj, RawRevChunk02):\n delta_node = b'cg2'\n else:\n assert False\n with self.query(b'store', what, delta_node, b'%d' % len(obj)):\n self._helper.stdin.write(obj)\n self._helper.stdin.flush()\n elif what == b'manifest_changegroup':\n with self.query(b'store', what, *args):\n return self._helper.stdin\n else:\n assert False\n\n @classmethod\n @contextmanager\n def store_changegroup(self, version):\n with self.query(b'store', b'changegroup', b'%d' % version):\n yield self._helper.stdin\n\n @classmethod\n def heads(self, what):\n with self.query(b'heads', what) as stdout:\n data = self._read_data(stdout)\n return data.split()\n\n @classmethod\n def reset_heads(self, what):\n with self.query(b'reset-heads', what):\n pass\n\n @classmethod\n def upgrade(self):\n with self.query(b'upgrade') as stdout:\n return stdout.readline().strip() == b'ok'\n\n @classmethod\n def create_git_tree(self, manifest_sha1, ref_commit=None):\n extra_arg = (ref_commit,) if ref_commit else ()\n with self.query(b'create-git-tree', manifest_sha1,\n *extra_arg) as stdout:\n sha1 = stdout.read(41)\n assert sha1[-1:] == b'\\n'\n return sha1[:40]\n\n @classmethod\n def seen(self, typ, sha1):\n with self.query(b'seen', typ, sha1) as stdout:\n return stdout.readline().strip() == b'yes'\n\n @classmethod\n def dangling(self, typ):\n with self.query(b'dangling', typ) as stdout:\n data = self._read_data(stdout)\n return data.splitlines()\n\n @classmethod\n def update_ref(self, ref, newvalue):\n with self.query(b'reset', b'%s\\nfrom %s\\n' % (ref, newvalue)):\n self._helper.stdin.flush()\n\n @classmethod\n def cat_blob(self, ref):\n with self.query(b'cat-blob', ref) as stdout:\n sha1, blob, size = stdout.readline().split()\n assert blob == b'blob'\n size = int(size)\n content = stdout.read(size)\n lf = stdout.read(1)\n assert lf == b'\\n'\n return content\n\n @classmethod\n def _get_last(self):\n with self.query(b'get-mark', b':1') as stdout:\n sha1 = stdout.read(41)\n assert sha1[-1:] == b'\\n'\n return sha1[:40]\n\n @classmethod\n def put_blob(self, data=b'', want_sha1=True):\n with self.query(b'blob') as io:\n io.write(b'mark :1\\n')\n io.write(b'data %d\\n' % len(data))\n io.write(data)\n io.write(b'\\n')\n io.flush()\n if want_sha1:\n return self._get_last()\n\n @classmethod\n @contextmanager\n def commit(self, ref, committer=b'<cinnabar@git> 0 +0000', author=None,\n message=b'', from_commit=None, parents=(), pseudo_mark=None):\n if isinstance(parents, GeneratorType):\n parents = tuple(parents)\n from_tree = None\n if parents and parents[0] == from_commit:\n _from = parents[0]\n merges = parents[1:]\n else:\n _from = NULL_NODE_ID\n merges = parents\n if from_commit:\n with self.query(b'ls', from_commit, b'') as stdout:\n line = stdout.readline()\n if line.startswith(b'missing '):\n from_tree = None\n else:\n mode, typ, from_tree, path = split_ls_tree(line[:-1])\n\n helper = CommitHelper()\n helper.write(b'mark :1\\n')\n # TODO: properly handle errors, like from the committer being badly\n # formatted.\n if author:\n helper.write(b'author %s\\n' % author)\n helper.write(b'committer %s\\n' % committer)\n helper.cmd_data(message)\n\n helper.write(b'from %s\\n' % _from)\n for merge in merges:\n helper.write(b'merge %s\\n' % merge)\n if from_tree:\n helper.write(b'M 040000 %s \\n' % from_tree)\n\n yield helper\n helper.write(b'\\n')\n\n with self.query(b'commit', ref) as stdout:\n stdout.write(helper.flush_buffer())\n stdout.flush()\n\n if not pseudo_mark:\n helper.sha1 = self._get_last()\n\n @classmethod\n def close(self, rollback=True):\n if not rollback and self._helper != self:\n with self.query(b'done'):\n pass\n super(GitHgHelper, self).close()\n\n\nclass CommitHelper(object):\n __slots__ = '_queue', 'sha1'\n\n def __init__(self):\n self._queue = []\n self.sha1 = None\n\n def write(self, data):\n self._queue.append(data)\n\n def cmd_data(self, data):\n self._queue.append(b'data %d\\n' % len(data))\n self._queue.append(data)\n self._queue.append(b'\\n')\n\n def flush_buffer(self):\n queue = self._queue\n self._queue = []\n return b''.join(queue)\n\n def filedelete(self, path):\n self.write(b'D %s\\n' % path)\n\n MODE = {\n b'regular': b'644',\n b'exec': b'755',\n b'tree': b'040000',\n b'symlink': b'120000',\n b'commit': b'160000',\n }\n\n def filemodify(self, path, sha1=None, typ=b'regular', content=None):\n assert sha1 or (content and typ == b'regular')\n # We may receive the sha1 for an empty blob, even though there is no\n # empty blob stored in the repository. So for empty blobs, use an\n # inline filemodify.\n dataref = b'inline' if sha1 in (EMPTY_BLOB, None) else sha1\n self.write(b'M %s %s %s\\n' % (\n self.MODE.get(typ, typ),\n dataref,\n path,\n ))\n if sha1 == EMPTY_BLOB:\n self.cmd_data(b'')\n elif sha1 is None:\n self.cmd_data(content)\n\n\nclass HgRepoHelper(BaseHelper):\n VERSION = 3003\n MODE = 'wire'\n _helper = False\n\n @classmethod\n def connect(self, url):\n with self.query(b'connect', url) as stdout:\n resp = stdout.readline().rstrip()\n if resp == b'bundle':\n return stdout\n if resp != b'ok':\n raise Exception(resp.decode('ascii'))\n\n @classmethod\n def state(self):\n with self.query(b'state') as stdout:\n return {\n 'branchmap': self._read_data(stdout),\n 'heads': self._read_data(stdout),\n 'bookmarks': self._read_data(stdout),\n }\n\n @classmethod\n def capable(self, name):\n with self.query(b'capable', name) as stdout:\n return self._read_data(stdout)\n\n @classmethod\n def known(self, nodes):\n with self.query(b'known', *nodes) as stdout:\n return self._read_data(stdout)\n\n @classmethod\n def listkeys(self, namespace):\n with self.query(b'listkeys', namespace) as stdout:\n return self._read_data(stdout)\n\n @classmethod\n def getbundle(self, heads, common, bundle2caps=False):\n with self.query(b'getbundle', b','.join(heads), b','.join(common),\n bundle2caps) as stdout:\n return stdout\n\n @classmethod\n def unbundle(self, input_iterator, heads):\n with self.query(b'unbundle', *heads) as stdout:\n for data in input_iterator:\n self._helper.stdin.write(data)\n self._helper.stdin.flush()\n ret = self._read_data(stdout)\n try:\n return int(ret)\n except ValueError:\n return ret\n\n @classmethod\n def pushkey(self, namespace, key, old, new):\n with self.query(b'pushkey', namespace, key, old, new) as stdout:\n ret = self._read_data(stdout).rstrip()\n try:\n return bool(int(ret))\n except ValueError:\n return ret\n\n @classmethod\n def lookup(self, key):\n with self.query(b'lookup', key) as stdout:\n success, data = self._read_data(stdout).rstrip().split(b' ', 1)\n return data if int(success) else None\n\n @classmethod\n def clonebundles(self):\n with self.query(b'clonebundles') as stdout:\n return self._read_data(stdout)\n\n @classmethod\n def cinnabarclone(self):\n with self.query(b'cinnabarclone') as stdout:\n return self._read_data(stdout)\n\n\nclass BundleHelper(HgRepoHelper):\n _helper = False\n"} +{"text": "// stdafx.h : include file for standard system include files,\r\n// or project specific include files that are used frequently, but\r\n// are changed infrequently\r\n//\r\n\r\n#if !defined(AFX_STDAFX_H__2DE9C572_8FC0_4D3F_8AF5_A576D9D48238__INCLUDED_)\r\n#define AFX_STDAFX_H__2DE9C572_8FC0_4D3F_8AF5_A576D9D48238__INCLUDED_\r\n\r\n#if _MSC_VER > 1000\r\n#pragma once\r\n#endif // _MSC_VER > 1000\r\n\r\n#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers\r\n\r\n#include <afxwin.h> // MFC core and standard components\r\n#include <afxext.h> // MFC extensions\r\n#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls\r\n#ifndef _AFX_NO_AFXCMN_SUPPORT\r\n#include <afxcmn.h> // MFC support for Windows Common Controls\r\n#endif // _AFX_NO_AFXCMN_SUPPORT\r\n\r\n\r\n//{{AFX_INSERT_LOCATION}}\r\n// Microsoft Visual C++ will insert additional declarations immediately before the previous line.\r\n\r\n#endif // !defined(AFX_STDAFX_H__2DE9C572_8FC0_4D3F_8AF5_A576D9D48238__INCLUDED_)\r\n"} +{"text": "/*\n * This file is part of the flashrom project.\n *\n * Copyright (C) 2000 Silicon Integrated System Corporation\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n */\n\n/*\n * Datasheet:\n * - Name: Intel 82802AB/82802AC Firmware Hub (FWH)\n * - URL: http://www.intel.com/design/chipsets/datashts/290658.htm\n * - PDF: http://download.intel.com/design/chipsets/datashts/29065804.pdf\n * - Order number: 290658-004\n */\n\n#include \"flash.h\"\n#include \"chipdrivers.h\"\n\nvoid print_status_82802ab(uint8_t status)\n{\n\tmsg_cdbg(\"%s\", status & 0x80 ? \"Ready:\" : \"Busy:\");\n\tmsg_cdbg(\"%s\", status & 0x40 ? \"BE SUSPEND:\" : \"BE RUN/FINISH:\");\n\tmsg_cdbg(\"%s\", status & 0x20 ? \"BE ERROR:\" : \"BE OK:\");\n\tmsg_cdbg(\"%s\", status & 0x10 ? \"PROG ERR:\" : \"PROG OK:\");\n\tmsg_cdbg(\"%s\", status & 0x8 ? \"VP ERR:\" : \"VPP OK:\");\n\tmsg_cdbg(\"%s\", status & 0x4 ? \"PROG SUSPEND:\" : \"PROG RUN/FINISH:\");\n\tmsg_cdbg(\"%s\", status & 0x2 ? \"WP|TBL#|WP#,ABORT:\" : \"UNLOCK:\");\n}\n\nint probe_82802ab(struct flashctx *flash)\n{\n\tchipaddr bios = flash->virtual_memory;\n\tuint8_t id1, id2, flashcontent1, flashcontent2;\n\tint shifted = (flash->chip->feature_bits & FEATURE_ADDR_SHIFTED) ? 1 : 0;\n\n\t/* Reset to get a clean state */\n\tchip_writeb(flash, 0xFF, bios);\n\tprogrammer_delay(10);\n\n\t/* Enter ID mode */\n\tchip_writeb(flash, 0x90, bios);\n\tprogrammer_delay(10);\n\n\tid1 = chip_readb(flash, bios + (0x00 << shifted));\n\tid2 = chip_readb(flash, bios + (0x01 << shifted));\n\n\t/* Leave ID mode */\n\tchip_writeb(flash, 0xFF, bios);\n\n\tprogrammer_delay(10);\n\n\tmsg_cdbg(\"%s: id1 0x%02x, id2 0x%02x\", __func__, id1, id2);\n\n\tif (!oddparity(id1))\n\t\tmsg_cdbg(\", id1 parity violation\");\n\n\t/*\n\t * Read the product ID location again. We should now see normal\n\t * flash contents.\n\t */\n\tflashcontent1 = chip_readb(flash, bios + (0x00 << shifted));\n\tflashcontent2 = chip_readb(flash, bios + (0x01 << shifted));\n\n\tif (id1 == flashcontent1)\n\t\tmsg_cdbg(\", id1 is normal flash content\");\n\tif (id2 == flashcontent2)\n\t\tmsg_cdbg(\", id2 is normal flash content\");\n\n\tmsg_cdbg(\"\\n\");\n\tif (id1 != flash->chip->manufacture_id || id2 != flash->chip->model_id)\n\t\treturn 0;\n\n\treturn 1;\n}\n\n/* FIXME: needs timeout */\nuint8_t wait_82802ab(struct flashctx *flash)\n{\n\tuint8_t status;\n\tchipaddr bios = flash->virtual_memory;\n\n\tchip_writeb(flash, 0x70, bios);\n\n\twhile ((chip_readb(flash, bios) & 0x80) == 0)\t// it's busy\n\t\t;\n\n\tstatus = chip_readb(flash, bios);\n\n\t/* Reset to get a clean state */\n\tchip_writeb(flash, 0xFF, bios);\n\n\treturn status;\n}\n\nint erase_block_82802ab(struct flashctx *flash, unsigned int page,\n\t\t\tunsigned int pagesize)\n{\n\tchipaddr bios = flash->virtual_memory;\n\tuint8_t status;\n\n\t// clear status register\n\tchip_writeb(flash, 0x50, bios + page);\n\n\t// now start it\n\tchip_writeb(flash, 0x20, bios + page);\n\tchip_writeb(flash, 0xd0, bios + page);\n\tprogrammer_delay(10);\n\n\t// now let's see what the register is\n\tstatus = wait_82802ab(flash);\n\tprint_status_82802ab(status);\n\n\t/* FIXME: Check the status register for errors. */\n\treturn 0;\n}\n\n/* chunksize is 1 */\nint write_82802ab(struct flashctx *flash, const uint8_t *src, unsigned int start, unsigned int len)\n{\n\tunsigned int i;\n\tchipaddr dst = flash->virtual_memory + start;\n\n\tfor (i = 0; i < len; i++) {\n\t\t/* transfer data from source to destination */\n\t\tchip_writeb(flash, 0x40, dst);\n\t\tchip_writeb(flash, *src++, dst++);\n\t\twait_82802ab(flash);\n\t}\n\n\t/* FIXME: Ignore errors for now. */\n\treturn 0;\n}\n\nint unlock_28f004s5(struct flashctx *flash)\n{\n\tchipaddr bios = flash->virtual_memory;\n\tuint8_t mcfg, bcfg, need_unlock = 0, can_unlock = 0;\n\tunsigned int i;\n\n\t/* Clear status register */\n\tchip_writeb(flash, 0x50, bios);\n\n\t/* Read identifier codes */\n\tchip_writeb(flash, 0x90, bios);\n\n\t/* Read master lock-bit */\n\tmcfg = chip_readb(flash, bios + 0x3);\n\tmsg_cdbg(\"master lock is \");\n\tif (mcfg) {\n\t\tmsg_cdbg(\"locked!\\n\");\n\t} else {\n\t\tmsg_cdbg(\"unlocked!\\n\");\n\t\tcan_unlock = 1;\n\t}\n\n\t/* Read block lock-bits */\n\tfor (i = 0; i < flash->chip->total_size * 1024; i+= (64 * 1024)) {\n\t\tbcfg = chip_readb(flash, bios + i + 2); // read block lock config\n\t\tmsg_cdbg(\"block lock at %06x is %slocked!\\n\", i, bcfg ? \"\" : \"un\");\n\t\tif (bcfg) {\n\t\t\tneed_unlock = 1;\n\t\t}\n\t}\n\n\t/* Reset chip */\n\tchip_writeb(flash, 0xFF, bios);\n\n\t/* Unlock: clear block lock-bits, if needed */\n\tif (can_unlock && need_unlock) {\n\t\tmsg_cdbg(\"Unlock: \");\n\t\tchip_writeb(flash, 0x60, bios);\n\t\tchip_writeb(flash, 0xD0, bios);\n\t\tchip_writeb(flash, 0xFF, bios);\n\t\tmsg_cdbg(\"Done!\\n\");\n\t}\n\n\t/* Error: master locked or a block is locked */\n\tif (!can_unlock && need_unlock) {\n\t\tmsg_cerr(\"At least one block is locked and lockdown is active!\\n\");\n\t\treturn -1;\n\t}\n\n\treturn 0;\n}\n\nint unlock_lh28f008bjt(struct flashctx *flash)\n{\n\tchipaddr bios = flash->virtual_memory;\n\tuint8_t mcfg, bcfg;\n\tuint8_t need_unlock = 0, can_unlock = 0;\n\tunsigned int i;\n\n\t/* Wait if chip is busy */\n\twait_82802ab(flash);\n\n\t/* Read identifier codes */\n\tchip_writeb(flash, 0x90, bios);\n\n\t/* Read master lock-bit */\n\tmcfg = chip_readb(flash, bios + 0x3);\n\tmsg_cdbg(\"master lock is \");\n\tif (mcfg) {\n\t\tmsg_cdbg(\"locked!\\n\");\n\t} else {\n\t\tmsg_cdbg(\"unlocked!\\n\");\n\t\tcan_unlock = 1;\n\t}\n\n\t/* Read block lock-bits, 8 * 8 KB + 15 * 64 KB */\n\tfor (i = 0; i < flash->chip->total_size * 1024;\n\t i += (i >= (64 * 1024) ? 64 * 1024 : 8 * 1024)) {\n\t\tbcfg = chip_readb(flash, bios + i + 2); /* read block lock config */\n\t\tmsg_cdbg(\"block lock at %06x is %slocked!\\n\", i,\n\t\t\t bcfg ? \"\" : \"un\");\n\t\tif (bcfg)\n\t\t\tneed_unlock = 1;\n\t}\n\n\t/* Reset chip */\n\tchip_writeb(flash, 0xFF, bios);\n\n\t/* Unlock: clear block lock-bits, if needed */\n\tif (can_unlock && need_unlock) {\n\t\tmsg_cdbg(\"Unlock: \");\n\t\tchip_writeb(flash, 0x60, bios);\n\t\tchip_writeb(flash, 0xD0, bios);\n\t\tchip_writeb(flash, 0xFF, bios);\n\t\twait_82802ab(flash);\n\t\tmsg_cdbg(\"Done!\\n\");\n\t}\n\n\t/* Error: master locked or a block is locked */\n\tif (!can_unlock && need_unlock) {\n\t\tmsg_cerr(\"At least one block is locked and lockdown is active!\\n\");\n\t\treturn -1;\n\t}\n\n\treturn 0;\n}\n"} +{"text": "// Copyright (c) 2011 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef VIRTUAL_METHODS_H_\n#define VIRTUAL_METHODS_H_\n\n// Should warn about virtual method usage.\nclass VirtualMethodsInHeaders {\n public:\n // Don't complain about these.\n virtual void MethodIsAbstract() = 0;\n virtual void MethodHasNoArguments();\n virtual void MethodHasEmptyDefaultImpl() {}\n\n // But complain about this:\n virtual bool ComplainAboutThis() { return true; }\n};\n\n// Complain on missing 'virtual' keyword in overrides.\nclass WarnOnMissingVirtual : public VirtualMethodsInHeaders {\n public:\n void MethodHasNoArguments() override;\n};\n\n// Don't complain about things in a 'testing' namespace.\nnamespace testing {\nstruct TestStruct {};\n} // namespace testing\n\nclass VirtualMethodsInHeadersTesting : public VirtualMethodsInHeaders {\n public:\n // Don't complain about no virtual testing methods.\n void MethodHasNoArguments();\n private:\n testing::TestStruct tester_;\n};\n\n#endif // VIRTUAL_METHODS_H_\n"} +{"text": "<?php\n/**\n * This file is part of PHP Mess Detector.\n *\n * Copyright (c) Manuel Pichler <mapi@phpmd.org>.\n * All rights reserved.\n *\n * Licensed under BSD License\n * For full copyright and license information, please see the LICENSE file.\n * Redistributions of files must retain the above copyright notice.\n *\n * @author Manuel Pichler <mapi@phpmd.org>\n * @copyright Manuel Pichler. All rights reserved.\n * @license https://opensource.org/licenses/bsd-license.php BSD License\n * @link http://phpmd.org/\n */\n\nnamespace PHPMD\\Rule\\Controversial;\n\nuse PHPMD\\AbstractNode;\nuse PHPMD\\AbstractRule;\nuse PHPMD\\Rule\\ClassAware;\nuse PHPMD\\Rule\\InterfaceAware;\n\n/**\n * This rule class detects classes not named in CamelCase.\n *\n * @author Francis Besset <francis.besset@gmail.com>\n * @since 1.1.0\n */\nclass CamelCaseClassName extends AbstractRule implements ClassAware, InterfaceAware\n{\n /**\n * This method checks if a class is not named in CamelCase\n * and emits a rule violation.\n *\n * @param \\PHPMD\\AbstractNode $node\n * @return void\n */\n public function apply(AbstractNode $node)\n {\n if (!preg_match('/^[A-Z][a-zA-Z0-9]*$/', $node->getName())) {\n $this->addViolation(\n $node,\n array(\n $node->getName(),\n )\n );\n }\n }\n}\n"} +{"text": "cheats = 24\n\ncheat0_desc = \"Infinite Life [Except Against Spikes]\"\ncheat0_code = \"SXSLEKSE\"\ncheat0_enable = false\n\ncheat1_desc = \"Infinite Life [Against Spikes]\"\ncheat1_code = \"SXUVOEVK\"\ncheat1_enable = false\n\ncheat2_desc = \"Infinite Lives\"\ncheat2_code = \"SZUGSXVK\"\ncheat2_enable = false\n\ncheat3_desc = \"Infinite MP\"\ncheat3_code = \"SXXPPVSE\"\ncheat3_enable = false\n\ncheat4_desc = \"Infinite Time\"\ncheat4_code = \"SXUAVXVK+SXXANXVK\"\ncheat4_enable = false\n\ncheat5_desc = \"Infinite Energy\"\ncheat5_code = \"0581:06\"\ncheat5_enable = false\n\ncheat6_desc = \"Infinte Special\"\ncheat6_code = \"058B:06\"\ncheat6_enable = false\n\ncheat7_desc = \"Infinite Lives\"\ncheat7_code = \"04F5:02\"\ncheat7_enable = false\n\ncheat8_desc = \"Fly\"\ncheat8_code = \"0070:01\"\ncheat8_enable = false\n\ncheat9_desc = \"Invincibility\"\ncheat9_code = \"00A6:00\"\ncheat9_enable = false\n\ncheat10_desc = \"Alternate Invincibility\"\ncheat10_code = \"00B9:01\"\ncheat10_enable = false\n\ncheat11_desc = \"Invincibility\"\ncheat11_code = \"ENNVEZEI\"\ncheat11_enable = false\n\ncheat12_desc = \"Infinite Life\"\ncheat12_code = \"0581:06\"\ncheat12_enable = false\n\ncheat13_desc = \"Infinite Time (Seconds)\"\ncheat13_code = \"057A:25\"\ncheat13_enable = false\n\ncheat14_desc = \"Infinite Time (Minutes)\"\ncheat14_code = \"057B:25\"\ncheat14_enable = false\n\ncheat15_desc = \"Infinite M.P.\"\ncheat15_code = \"058B:06\"\ncheat15_enable = false\n\ncheat16_desc = \"Infinite Lives\"\ncheat16_code = \"055E:19\"\ncheat16_enable = false\n\ncheat17_desc = \"Walk Through Walls\"\ncheat17_code = \"0069:01\"\ncheat17_enable = false\n\ncheat18_desc = \"Have Mouse Widget\"\ncheat18_code = \"0331:01\"\ncheat18_enable = false\n\ncheat19_desc = \"Have Rock-Man Widget\"\ncheat19_code = \"0332:01\"\ncheat19_enable = false\n\ncheat20_desc = \"Have Bird-Man Widget\"\ncheat20_code = \"0333:01\"\ncheat20_enable = false\n\ncheat21_desc = \"Have Dolphin Widget\"\ncheat21_code = \"0334:01\"\ncheat21_enable = false\n\ncheat22_desc = \"Stage Modifier\"\ncheat22_code = \"04FC:00\"\ncheat22_enable = false\n\ncheat23_desc = \"Powered Up Gun\"\ncheat23_code = \"0594:03+0595:03\"\ncheat23_enable = false"} +{"text": "/*\n * Integer wide range test\n*/\n\n`define WIDTH 32\n`define operator and\n`include \"../.generic/replicate_any_width_binary_test.v\""} +{"text": "//===----------------------------------------------------------------------===//\n//\n// The LLVM Compiler Infrastructure\n//\n// This file is dual licensed under the MIT and the University of Illinois Open\n// Source Licenses. See LICENSE.TXT for details.\n//\n//===----------------------------------------------------------------------===//\n\n// <istream>\n\n// basic_istream<charT,traits>& seekg(off_type off, ios_base::seekdir dir);\n\n#include <istream>\n#include <cassert>\n\nint seekoff_called = 0;\n\ntemplate <class CharT>\nstruct testbuf\n : public std::basic_streambuf<CharT>\n{\n typedef std::basic_string<CharT> string_type;\n typedef std::basic_streambuf<CharT> base;\nprivate:\n string_type str_;\npublic:\n\n testbuf() {}\n testbuf(const string_type& str)\n : str_(str)\n {\n base::setg(const_cast<CharT*>(str_.data()),\n const_cast<CharT*>(str_.data()),\n const_cast<CharT*>(str_.data()) + str_.size());\n }\n\n CharT* eback() const {return base::eback();}\n CharT* gptr() const {return base::gptr();}\n CharT* egptr() const {return base::egptr();}\nprotected:\n typename base::pos_type seekoff(typename base::off_type off,\n std::ios_base::seekdir way,\n std::ios_base::openmode which)\n {\n assert(which == std::ios_base::in);\n ++seekoff_called;\n return off;\n }\n};\n\nint main()\n{\n {\n testbuf<char> sb(\" 123456789\");\n std::istream is(&sb);\n is.seekg(5, std::ios_base::cur);\n assert(is.good());\n assert(seekoff_called == 1);\n is.seekg(-1, std::ios_base::beg);\n assert(is.fail());\n assert(seekoff_called == 2);\n }\n {\n testbuf<wchar_t> sb(L\" 123456789\");\n std::wistream is(&sb);\n is.seekg(5, std::ios_base::cur);\n assert(is.good());\n assert(seekoff_called == 3);\n is.seekg(-1, std::ios_base::beg);\n assert(is.fail());\n assert(seekoff_called == 4);\n }\n}\n"} +{"text": "\n\nBypassing Anti Viruses by C#.NET Programming\n\nPart 2 (Infil/Exfiltration/Transferring Techniques by C#)\n\nChapter 11 : Hiding Payloads via BMP Image Pixels (PART1)\n\nChapter 11 : Hiding Payloads via BMP Image Pixels (PART2)\n\nRelated Videos :\n\nVideo 1 Script and C# Code : https://www.youtube.com/watch?v=D5tfh23vIOQ\n\nVideo 2 (Chat Mode) Script Code : https://www.youtube.com/watch?v=2n6ZLbJxlkw\n\n\nC# Source Code : https://github.com/DamonMohammadbagher/NativePayload_Image\n\nScript Code : https://github.com/DamonMohammadbagher/NativePayload_Image/tree/master/Chapter%2011%20-%20Hiding%20Payloads%20via%20BMP%20Image%20Pixels\n\n\nRelated Article :\n\nlink 1 : https://www.linkedin.com/pulse/transferring-backdoor-payloads-bmp-image-pixels-damon-mohammadbagher/\n\nlink 2 : https://www.peerlyst.com/posts/transferring-backdoor-payloads-with-bmp-image-pixels-damon-mohammadbagher\n\nWarning :Don't Use \"www.virustotal.com\" or something like that , Never Ever ;D\n\nRecommended:\n\nSTEP 1 : Use each AV one by one in your LAB .\n\nSTEP 2 : after \"AV Signature Database Updated\" your Internet Connection should be \"Disconnect\" .\n\nSTEP 3 : Now you can Copy and Paste your C# code to your Virtual Machine for test .\n\n"} +{"text": "package org.apereo.cas.adaptors.x509.authentication.revocation;\n\nimport org.apereo.cas.util.DateTimeUtils;\n\nimport lombok.Getter;\nimport lombok.RequiredArgsConstructor;\nimport lombok.extern.slf4j.Slf4j;\nimport lombok.val;\n\nimport java.math.BigInteger;\nimport java.security.GeneralSecurityException;\nimport java.security.cert.X509CRLEntry;\nimport java.time.ZonedDateTime;\n\n\n/**\n * Exception that describes a revoked X.509 certificate.\n *\n * @author Marvin S. Addison\n * @since 3.4.6\n */\n@Slf4j\n@RequiredArgsConstructor\n@Getter\npublic class RevokedCertificateException extends GeneralSecurityException {\n\n /**\n * OID for reasonCode CRL extension.\n */\n public static final String CRL_REASON_OID = \"2.5.29.21\";\n\n private static final long serialVersionUID = 8827788431199129708L;\n\n /**\n * The revocation date.\n */\n private final ZonedDateTime revocationDate;\n\n /**\n * The serial.\n */\n private final BigInteger serial;\n\n /**\n * The reason.\n */\n private final Reason reason;\n\n /**\n * Instantiates a new revoked certificate exception.\n *\n * @param revoked the revoked\n * @param serial the serial\n */\n public RevokedCertificateException(final ZonedDateTime revoked, final BigInteger serial) {\n this(revoked, serial, null);\n }\n\n /**\n * Instantiates a new revoked certificate exception.\n *\n * @param entry the entry\n */\n public RevokedCertificateException(final X509CRLEntry entry) {\n this(DateTimeUtils.zonedDateTimeOf(entry.getRevocationDate()), entry.getSerialNumber(), getReasonFromX509Entry(entry));\n }\n\n @Override\n public String getMessage() {\n if (this.reason != null) {\n return String.format(\"Certificate %s revoked on %s for reason %s\",\n this.serial, this.revocationDate, this.reason);\n }\n return String.format(\"Certificate %s revoked on %s\", this.serial, this.revocationDate);\n }\n\n /**\n * Get reason from the x509 entry.\n *\n * @param entry the entry\n * @return reason or null\n */\n private static Reason getReasonFromX509Entry(final X509CRLEntry entry) {\n if (entry.hasExtensions()) {\n try {\n val code = Integer.parseInt(\n new String(entry.getExtensionValue(CRL_REASON_OID), \"ASCII\"));\n if (code < Reason.values().length) {\n return Reason.fromCode(code);\n }\n } catch (final Exception e) {\n LOGGER.trace(\"An exception occurred when resolving extension value: [{}]\", e.getMessage());\n }\n }\n return null;\n }\n\n /**\n * CRL revocation reason codes per RFC 3280.\n */\n public enum Reason {\n\n /**\n * The Unspecified.\n */\n Unspecified,\n\n /**\n * The Key compromise.\n */\n KeyCompromise,\n\n /**\n * The CA compromise.\n */\n CACompromise,\n\n /**\n * The Affiliation changed.\n */\n AffiliationChanged,\n\n /**\n * The Superseded.\n */\n Superseded,\n\n /**\n * The Cessation of operation.\n */\n CessationOfOperation,\n\n /**\n * The Certificate hold.\n */\n CertificateHold,\n\n /**\n * The Remove from crl.\n */\n RemoveFromCRL,\n\n /**\n * The Privilege withdrawn.\n */\n PrivilegeWithdrawn,\n\n /**\n * The AA compromise.\n */\n AACompromise;\n\n /**\n * Convert code to reason.\n *\n * @param code the code\n * @return the reason\n */\n public static Reason fromCode(final int code) {\n val reasons = Reason.values();\n\n for (var i = 0; i < reasons.length; i++) {\n if (i == code) {\n return reasons[i];\n }\n }\n throw new IllegalArgumentException(\"Unknown CRL reason code.\");\n }\n }\n}\n"} +{"text": "<?php\n/**\n * Zend Framework\n *\n * LICENSE\n *\n * This source file is subject to the new BSD license that is bundled\n * with this package in the file LICENSE.txt.\n * It is also available through the world-wide-web at this URL:\n * http://framework.zend.com/license/new-bsd\n * If you did not receive a copy of the license and are unable to\n * obtain it through the world-wide-web, please send an email\n * to license@zend.com so we can send you a copy immediately.\n *\n * @category Zend\n * @package Zend_Service_ReCaptcha\n * @subpackage UnitTests\n * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)\n * @license http://framework.zend.com/license/new-bsd New BSD License\n * @version $Id: ResponseTest.php 23775 2011-03-01 17:25:24Z ralph $\n */\n\n/** @see Zend_Service_ReCaptcha_Response */\nrequire_once 'Zend/Service/ReCaptcha/Response.php';\n\n/**\n * @category Zend\n * @package Zend_Service_ReCaptcha\n * @subpackage UnitTests\n * @copyright Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)\n * @license http://framework.zend.com/license/new-bsd New BSD License\n * @group Zend_Service\n * @group Zend_Service_ReCaptcha\n */\nclass Zend_Service_ReCaptcha_ResponseTest extends PHPUnit_Framework_TestCase\n{\n protected $_response = null;\n\n public function setUp() {\n $this->_response = new Zend_Service_ReCaptcha_Response();\n }\n\n public function testSetAndGet() {\n /* Set and get status */\n $status = 'true';\n $this->_response->setStatus($status);\n $this->assertSame(true, $this->_response->getStatus());\n\n $status = 'false';\n $this->_response->setStatus($status);\n $this->assertSame(false, $this->_response->getStatus());\n\n /* Set and get the error code */\n $errorCode = 'foobar';\n $this->_response->setErrorCode($errorCode);\n $this->assertSame($errorCode, $this->_response->getErrorCode());\n }\n\n public function testIsValid() {\n $this->_response->setStatus('true');\n $this->assertSame(true, $this->_response->isValid());\n }\n\n public function testIsInvalid() {\n $this->_response->setStatus('false');\n $this->assertSame(false, $this->_response->isValid());\n }\n\n public function testSetFromHttpResponse() {\n $status = 'false';\n $errorCode = 'foobar';\n $responseBody = $status . \"\\n\" . $errorCode;\n $httpResponse = new Zend_Http_Response(200, array('Content-Type' => 'text/html'), $responseBody);\n\n $this->_response->setFromHttpResponse($httpResponse);\n\n $this->assertSame(false, $this->_response->getStatus());\n $this->assertSame($errorCode, $this->_response->getErrorCode());\n }\n\n public function testConstructor() {\n $status = 'true';\n $errorCode = 'ok';\n\n $response = new Zend_Service_ReCaptcha_Response($status, $errorCode);\n\n $this->assertSame(true, $response->getStatus());\n $this->assertSame($errorCode, $response->getErrorCode());\n }\n\n public function testConstructorWithHttpResponse() {\n $status = 'false';\n $errorCode = 'foobar';\n $responseBody = $status . \"\\n\" . $errorCode;\n $httpResponse = new Zend_Http_Response(200, array('Content-Type' => 'text/html'), $responseBody);\n\n $response = new Zend_Service_ReCaptcha_Response(null, null, $httpResponse);\n\n $this->assertSame(false, $response->getStatus());\n $this->assertSame($errorCode, $response->getErrorCode());\n }\n}\n"} +{"text": "/**\n * @file\n *\n * @author OmniBlade\n * @author CCHyper\n *\n * @brief Base of the IOMap hierachy responsible for handling message list drawing.\n *\n * @copyright Chronoshift is free software: you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation, either version\n * 2 of the License, or (at your option) any later version.\n * A full copy of the GNU General Public License can be found in\n * LICENSE\n */\n#include \"gscreen.h\"\n#include \"bench.h\"\n#include \"gadget.h\"\n#include \"gbuffer.h\"\n#include \"globals.h\"\n#include \"mouse.h\"\n#include \"msglist.h\"\n#include \"session.h\"\n#include \"iomap.h\"\n#include <captainslog.h>\n\n#ifndef GAME_DLL\nGadgetClass *GameScreenClass::g_Buttons = nullptr;\nGraphicViewPortClass *GameScreenClass::g_ShadowPage = nullptr;\n#endif\n\nGameScreenClass::GameScreenClass() :\n m_RedrawFlag(REDRAW_FORCE | REDRAW_2)\n{\n}\n\nGameScreenClass::~GameScreenClass()\n{\n}\n\nvoid GameScreenClass::One_Time()\n{\n g_Buttons = nullptr;\n g_ShadowPage = new GraphicBufferClass(320, 200, nullptr);\n g_ShadowPage->Clear();\n g_HidPage.Clear();\n}\n\nvoid GameScreenClass::Init(TheaterType theater)\n{\n Init_Clear();\n Init_IO();\n Init_Theater(theater);\n}\n\nvoid GameScreenClass::Init_Clear()\n{\n if (g_ShadowPage != nullptr) {\n g_ShadowPage->Clear();\n g_HidPage.Clear();\n }\n\n m_RedrawFlag |= REDRAW_FORCE;\n}\n\nvoid GameScreenClass::Init_IO()\n{\n g_Buttons = nullptr;\n}\n\nvoid GameScreenClass::Flag_To_Redraw(BOOL redraw)\n{\n m_RedrawFlag |= REDRAW_2;\n\n if (redraw) {\n m_RedrawFlag |= REDRAW_FORCE;\n }\n}\n\nvoid GameScreenClass::Input(KeyNumType &key, int &mouse_x, int &mouse_y)\n{\n key = KeyNumType(g_Keyboard->Check());\n mouse_x = g_Mouse->Get_Mouse_X();\n mouse_y = g_Mouse->Get_Mouse_Y();\n\n if (g_Buttons != nullptr) {\n if (g_Buttons->Is_List_To_Redraw()) {\n Flag_To_Redraw();\n }\n\n GraphicViewPortClass *old = Set_Logic_Page(g_HidPage);\n key = g_Buttons->Input();\n Set_Logic_Page(old);\n\n } else if (key != KN_NONE) {\n key = KeyNumType(g_Keyboard->Get());\n }\n\n AI(key, mouse_x, mouse_y);\n}\n\nvoid GameScreenClass::Add_A_Button(GadgetClass &gadget)\n{\n if (&gadget == g_Buttons) {\n Remove_A_Button(gadget);\n } else {\n gadget.Remove();\n }\n\n if (g_Buttons != nullptr) {\n gadget.Add_Tail(*g_Buttons);\n } else {\n g_Buttons = &gadget;\n }\n}\n\nvoid GameScreenClass::Remove_A_Button(GadgetClass &gadget)\n{\n g_Buttons = gadget.Remove();\n}\n\n// TODO: This function should probably be bumped up to DisplayClass as it relies on DisplayClass members.\nvoid GameScreenClass::Render()\n{\n // This if is only done in EDWIN, so editor only?\n if (g_InMapEditor && g_Buttons != nullptr && g_Buttons->Is_List_To_Redraw()) {\n m_RedrawFlag |= REDRAW_2;\n }\n\n if ((m_RedrawFlag & REDRAW_FORCE) || (m_RedrawFlag & REDRAW_2)) {\n\n BENCHMARK_START(BENCH_FULL_PROCESS);\n\n GraphicViewPortClass *old = Set_Logic_Page(g_HidPage);\n\n BOOL to_redraw = (m_RedrawFlag & REDRAW_FORCE) != 0;\n\n if (g_InMapEditor && to_redraw) {\n g_HidPage.Clear();\n }\n\n Draw_It(to_redraw);\n\n if (g_Buttons != nullptr) {\n g_Buttons->Draw_All(false);\n }\n\n\n if (!g_InMapEditor) {\n if (g_Session.Get_Messages().Num_Messages() > 0) {\n // Calculate the width of the message buffer based on the current tactical width.\n g_Session.Get_Messages().Set_Width(CELL_PIXELS * Lepton_To_Cell_Coord(g_Map.Get_DisplayWidth()));\n }\n\n g_Session.Get_Messages().Draw();\n }\n\n Blit_Display();\n\n m_RedrawFlag &= ~(REDRAW_FORCE | REDRAW_2); // Clear any redraw flags.\n\n BENCHMARK_END(BENCH_FULL_PROCESS);\n\n Set_Logic_Page(old);\n }\n}\n\nvoid GameScreenClass::Draw_It(BOOL force_redraw)\n{\n}\n\nvoid GameScreenClass::Blit_Display()\n{\n BENCHMARK_START(BENCH_BLIT);\n\n g_Mouse->Draw_Mouse(g_HidPage);\n\n g_HidPage.Blit(g_SeenBuff,\n g_HidPage.Get_XPos(),\n g_HidPage.Get_YPos(),\n g_SeenBuff.Get_XPos(),\n g_SeenBuff.Get_YPos(),\n g_HidPage.Get_Width(),\n g_HidPage.Get_Height());\n\n g_Mouse->Erase_Mouse(g_HidPage);\n\n BENCHMARK_END(BENCH_BLIT);\n}\n\nvoid GameScreenClass::AI(KeyNumType &key, int mouse_x, int mouse_y)\n{\n}\n"} +{"text": "#include <iostream>\n#include <vector>\n\nusing namespace std;\n\nclass Solution {\npublic:\n vector<int> diffWaysToCompute(string input) {\n vector<int> result;\n for (int k = 0; k < input.length(); k++) {\n if (input[k] == '*' || input[k] == '-' || input[k] == '+') {\n vector<int> a = diffWaysToCompute(input.substr(0, k));\n vector<int> b = diffWaysToCompute(input.substr(k + 1));\n for (int i = 0; i < a.size(); i++) {\n for (int j = 0; j < b.size(); j++) {\n if (input[k] == '+') {\n result.push_back(a[i] + b[j]);\n }\n else if (input[k] == '-') {\n result.push_back(a[i] - b[j]);\n }\n else {\n result.push_back(a[i] * b[j]);\n }\n }\n }\n\n }\n }\n if (result.size() == 0) {\n result.push_back(stoi(input));\n }\n return result;\n }\n};\n\nint main() {\n\n Solution s;\n vector<int> ans = s.diffWaysToCompute(\"2*3-4*5\");\n\n for (int i = 0; i < ans.size(); i++) {\n printf(\"%d \", ans[i]);\n }\n printf(\"\\n\");\n\n return 0;\n}\n"} +{"text": "/*\n * Copyright (c) Microsoft Corporation. All rights reserved.\n * Licensed under the MIT License. See License.txt in the project root for\n * license information.\n *\n * Code generated by Microsoft (R) AutoRest Code Generator.\n * Changes may cause incorrect behavior and will be lost if the code is\n * regenerated.\n */\n\nimport * as msRest from \"@azure/ms-rest-js\";\n\nexport const acceptLanguage: msRest.OperationParameter = {\n parameterPath: \"acceptLanguage\",\n mapper: {\n serializedName: \"accept-language\",\n defaultValue: 'en-US',\n type: {\n name: \"String\"\n }\n }\n};\nexport const apiVersion: msRest.OperationQueryParameter = {\n parameterPath: \"apiVersion\",\n mapper: {\n required: true,\n serializedName: \"api-version\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const clientRequestId: msRest.OperationParameter = {\n parameterPath: [\n \"options\",\n \"searchManagementRequestOptions\",\n \"clientRequestId\"\n ],\n mapper: {\n serializedName: \"x-ms-client-request-id\",\n type: {\n name: \"Uuid\"\n }\n }\n};\nexport const key: msRest.OperationURLParameter = {\n parameterPath: \"key\",\n mapper: {\n required: true,\n serializedName: \"key\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const keyKind: msRest.OperationURLParameter = {\n parameterPath: \"keyKind\",\n mapper: {\n required: true,\n serializedName: \"keyKind\",\n type: {\n name: \"Enum\",\n allowedValues: [\n \"primary\",\n \"secondary\"\n ]\n }\n }\n};\nexport const name: msRest.OperationURLParameter = {\n parameterPath: \"name\",\n mapper: {\n required: true,\n serializedName: \"name\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const resourceGroupName: msRest.OperationURLParameter = {\n parameterPath: \"resourceGroupName\",\n mapper: {\n required: true,\n serializedName: \"resourceGroupName\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const searchServiceName: msRest.OperationURLParameter = {\n parameterPath: \"searchServiceName\",\n mapper: {\n required: true,\n serializedName: \"searchServiceName\",\n type: {\n name: \"String\"\n }\n }\n};\nexport const subscriptionId: msRest.OperationURLParameter = {\n parameterPath: \"subscriptionId\",\n mapper: {\n required: true,\n serializedName: \"subscriptionId\",\n type: {\n name: \"String\"\n }\n }\n};\n"} +{"text": "\n; <<>> DiG 9.9.5-3ubuntu0.8-Ubuntu <<>> AXFR xn--kcrx77d1x4a. @c.nic.xn--kcrx77d1x4a. +nocomments +nocmd +noquestion +nostats +time=15\n;; global options: +cmd\n; Transfer failed.\n"} +{"text": "<?php declare(strict_types=1);\n/**\n * This file is part of the Yasumi package.\n *\n * Copyright (c) 2015 - 2020 AzuyaLabs\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n *\n * @author Sacha Telgenhof <me@sachatelgenhof.com>\n */\n\nnamespace Yasumi\\tests\\Australia\\WesternAustralia;\n\n/**\n * Class for testing Christmas Day in Western Australia (Australia)..\n */\nclass ChristmasDayTest extends \\Yasumi\\tests\\Australia\\ChristmasDayTest\n{\n}\n"} +{"text": ".\\\"\n.\\\" Copyright 2010 by Ben Greear <greearb@candelatech.com>\n.\\\"\n.\\\" Permission to use, copy, modify, and distribute this\n.\\\" software and its documentation for any purpose and without\n.\\\" fee is hereby granted, provided that the above copyright\n.\\\" notice appear in all copies and that both that copyright\n.\\\" notice and this permission notice appear in supporting\n.\\\" documentation, and that the name of M.I.T. not be used in\n.\\\" advertising or publicity pertaining to distribution of the\n.\\\" software without specific, written prior permission.\n.\\\" M.I.T. makes no representations about the suitability of\n.\\\" this software for any purpose. It is provided \"as is\"\n.\\\" without express or implied warranty.\n.\\\"\n.TH ARES_SET_SERVERS_CSV 3 \"30 June 2010\"\n.SH NAME\nares_set_servers_csv, ares_set_servers_ports_csv \\- Set list of DNS servers to be used.\n.SH SYNOPSIS\n.nf\n.B #include <ares.h>\n.PP\n.B int ares_set_servers_csv(ares_channel \\fIchannel\\fP, const char* \\fIservers\\fP)\n.B int ares_set_servers_ports_csv(ares_channel \\fIchannel\\fP, const char* \\fIservers\\fP)\n.fi\n.SH DESCRIPTION\nThe \\fBares_set_servers_csv\\fP and \\fBares_set_servers_ports_csv\\fPfunctions set\nthe list of DNS servers that ARES will query. The format of the servers option is:\n\nhost[:port][,host[:port]]...\n\nFor example:\n\n192.168.1.100,192.168.1.101,3.4.5.6\n.PP\nThe \\fBares_set_servers_csv\\fP function will ignore any port values specified in\nthe input string, whereare the \\fBares_set_servers_ports_csv\\fP function will\napply any specified port values as the UDP and TCP port to be used for that\nparticular nameserver.\n\n.SH RETURN VALUES\n.B ares_set_servers_csv(3)\nThis function may return any of the following values:\n.TP 15\n.B ARES_SUCCESS\nThe name servers configuration was successfully initialized.\n.TP 15\n.B ARES_ENOMEM\nThe process's available memory was exhausted.\n.TP 15\n.B ARES_ENODATA\nThe channel data identified by\n.IR channel\nwas invalid.\n.TP 15\n.B ARES_ENOTINITIALIZED\nc-ares library initialization not yet performed.\n.SH SEE ALSO\n.BR ares_set_servers (3)\n.SH AVAILABILITY\n\\fBares_set_servers_csv\\fP was added in c-ares 1.7.2;\n\\fBares_set_servers_ports_csv\\fP was added in c-ares 1.11.0.\n.SH AUTHOR\nBen Greear\n"} +{"text": "{{extend 'default.mobile/layout.html'}}\n\n{{block sectionclass}}peek{{end}}\n\n<h2>{{=T(\"Peeking at file\")}} \"{{=filename}}\"</h2>\n\n<p>\n{{=button(URL('design',args=request.args[0]), T('back'))}}\n{{=button(URL('edit',args=request.args), T('Edit'))}}\n</p>\n\n{{\nif filename[-3:]=='.py': language='python'\nelse: language='html'\n}}\n{{=CODE(data,language=language,link='/examples/global/vars/')}}\n\n"} +{"text": "CREATE TABLE list (id VARCHAR(64) NOT NULL, value VARCHAR(64) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;\n\nINSERT INTO `list` (`id`, `value`) VALUES ('AT', 'অষ্ট্ৰিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('AU', 'অষ্ট্ৰেলিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('IS', 'আইচলেণ্ড');\nINSERT INTO `list` (`id`, `value`) VALUES ('IM', 'আইল অফ মেন');\nINSERT INTO `list` (`id`, `value`) VALUES ('AZ', 'আজাৰবেইজান');\nINSERT INTO `list` (`id`, `value`) VALUES ('AD', 'আন্দোৰা');\nINSERT INTO `list` (`id`, `value`) VALUES ('AF', 'আফগানিস্তান');\nINSERT INTO `list` (`id`, `value`) VALUES ('AS', 'আমেৰিকান চামোৱা');\nINSERT INTO `list` (`id`, `value`) VALUES ('IE', 'আয়াৰলেণ্ড');\nINSERT INTO `list` (`id`, `value`) VALUES ('AW', 'আৰুবা');\nINSERT INTO `list` (`id`, `value`) VALUES ('AR', 'আৰ্জেণ্টিনা');\nINSERT INTO `list` (`id`, `value`) VALUES ('AM', 'আৰ্মেনিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('DZ', 'আলজেৰিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('AX', 'আলণ্ড দ্বীপপুঞ্জ');\nINSERT INTO `list` (`id`, `value`) VALUES ('AL', 'আলবেনিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('UM', 'ইউ. এছ. আউটলায়িং দ্বীপপুঞ্জ');\nINSERT INTO `list` (`id`, `value`) VALUES ('VI', 'ইউ. এছ. ভাৰ্জিন দ্বীপপুঞ্জ');\nINSERT INTO `list` (`id`, `value`) VALUES ('UA', 'ইউক্ৰেইন');\nINSERT INTO `list` (`id`, `value`) VALUES ('GQ', 'ইকুৱেটৰিয়েল গিনি');\nINSERT INTO `list` (`id`, `value`) VALUES ('EC', 'ইকুৱেডৰ');\nINSERT INTO `list` (`id`, `value`) VALUES ('SZ', 'ইচ্চুটিনি');\nINSERT INTO `list` (`id`, `value`) VALUES ('IL', 'ইজৰাইল');\nINSERT INTO `list` (`id`, `value`) VALUES ('EG', 'ইজিপ্ত');\nINSERT INTO `list` (`id`, `value`) VALUES ('IT', 'ইটালি');\nINSERT INTO `list` (`id`, `value`) VALUES ('ID', 'ইণ্ডোনেচিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('ET', 'ইথিঅ’পিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('IQ', 'ইৰাক');\nINSERT INTO `list` (`id`, `value`) VALUES ('IR', 'ইৰান');\nINSERT INTO `list` (`id`, `value`) VALUES ('EE', 'ইষ্টোনিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('UG', 'উগাণ্ডা');\nINSERT INTO `list` (`id`, `value`) VALUES ('UZ', 'উজবেকিস্তান');\nINSERT INTO `list` (`id`, `value`) VALUES ('KP', 'উত্তৰ কোৰিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('MP', 'উত্তৰ মাৰিয়ানা দ্বীপপুঞ্জ');\nINSERT INTO `list` (`id`, `value`) VALUES ('MK', 'উত্তৰ মেচিডোনীয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('UY', 'উৰুগুৱে');\nINSERT INTO `list` (`id`, `value`) VALUES ('AO', 'এংগোলা');\nINSERT INTO `list` (`id`, `value`) VALUES ('AQ', 'এণ্টাৰ্কটিকা');\nINSERT INTO `list` (`id`, `value`) VALUES ('AG', 'এণ্টিগুৱা আৰু বাৰ্বুডা');\nINSERT INTO `list` (`id`, `value`) VALUES ('AI', 'এনগুইলা');\nINSERT INTO `list` (`id`, `value`) VALUES ('ER', 'এৰিত্ৰিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('SV', 'এল ছেলভেড’ৰ');\nINSERT INTO `list` (`id`, `value`) VALUES ('OM', 'ওমান');\nINSERT INTO `list` (`id`, `value`) VALUES ('CD', 'কঙ্গো - কিনচাছা');\nINSERT INTO `list` (`id`, `value`) VALUES ('CG', 'কঙ্গো - ব্রাজাভিল');\nINSERT INTO `list` (`id`, `value`) VALUES ('KH', 'কম্বোডিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('CO', 'কলম্বিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('KZ', 'কাজাখাস্তান');\nINSERT INTO `list` (`id`, `value`) VALUES ('QA', 'কাটাৰ');\nINSERT INTO `list` (`id`, `value`) VALUES ('CA', 'কানাডা');\nINSERT INTO `list` (`id`, `value`) VALUES ('CU', 'কিউবা');\nINSERT INTO `list` (`id`, `value`) VALUES ('KI', 'কিৰিবাটি');\nINSERT INTO `list` (`id`, `value`) VALUES ('KG', 'কিৰ্গিজস্তান');\nINSERT INTO `list` (`id`, `value`) VALUES ('CK', 'কুক দ্বীপপুঞ্জ');\nINSERT INTO `list` (`id`, `value`) VALUES ('CW', 'কুৰাকাও');\nINSERT INTO `list` (`id`, `value`) VALUES ('KW', 'কুৱেইট');\nINSERT INTO `list` (`id`, `value`) VALUES ('KY', 'কেইমেন দ্বীপপুঞ্জ');\nINSERT INTO `list` (`id`, `value`) VALUES ('KE', 'কেনিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('CV', 'কেপ ভার্দে');\nINSERT INTO `list` (`id`, `value`) VALUES ('CM', 'কেমেৰুণ');\nINSERT INTO `list` (`id`, `value`) VALUES ('BQ', 'কেৰিবিয়ান নেদাৰলেণ্ডছ');\nINSERT INTO `list` (`id`, `value`) VALUES ('CC', 'কোকোচ (কীলিং) দ্বীপপুঞ্জ');\nINSERT INTO `list` (`id`, `value`) VALUES ('CI', 'কোটে ডি আইভৰ');\nINSERT INTO `list` (`id`, `value`) VALUES ('KM', 'কোমোৰোজ');\nINSERT INTO `list` (`id`, `value`) VALUES ('CR', 'কোষ্টা ৰিকা');\nINSERT INTO `list` (`id`, `value`) VALUES ('HR', 'ক্ৰোৱেছিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('CX', 'খ্ৰীষ্টমাছ দ্বীপ');\nINSERT INTO `list` (`id`, `value`) VALUES ('GM', 'গাম্বিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('GY', 'গায়ানা');\nINSERT INTO `list` (`id`, `value`) VALUES ('GN', 'গিনি');\nINSERT INTO `list` (`id`, `value`) VALUES ('GW', 'গিনি-বিছাও');\nINSERT INTO `list` (`id`, `value`) VALUES ('GT', 'গুৱাটেমালা');\nINSERT INTO `list` (`id`, `value`) VALUES ('GP', 'গুৱাডেলুপ');\nINSERT INTO `list` (`id`, `value`) VALUES ('GU', 'গুৱাম');\nINSERT INTO `list` (`id`, `value`) VALUES ('GA', 'গেবন');\nINSERT INTO `list` (`id`, `value`) VALUES ('GG', 'গোৰেনচি');\nINSERT INTO `list` (`id`, `value`) VALUES ('GR', 'গ্ৰীচ');\nINSERT INTO `list` (`id`, `value`) VALUES ('GL', 'গ্ৰীণলেণ্ড');\nINSERT INTO `list` (`id`, `value`) VALUES ('GD', 'গ্ৰেনাডা');\nINSERT INTO `list` (`id`, `value`) VALUES ('GH', 'ঘানা');\nINSERT INTO `list` (`id`, `value`) VALUES ('CY', 'চাইপ্ৰাছ');\nINSERT INTO `list` (`id`, `value`) VALUES ('ST', 'চাও টোমে আৰু প্ৰিনচিপে');\nINSERT INTO `list` (`id`, `value`) VALUES ('TD', 'চাড');\nINSERT INTO `list` (`id`, `value`) VALUES ('SM', 'চান মাৰিনো');\nINSERT INTO `list` (`id`, `value`) VALUES ('SJ', 'চাভালবাৰ্ড আৰু জন মেয়ন');\nINSERT INTO `list` (`id`, `value`) VALUES ('WS', 'চামোৱা');\nINSERT INTO `list` (`id`, `value`) VALUES ('CZ', 'চিজেচিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('SX', 'চিণ্ট মাৰ্টেন');\nINSERT INTO `list` (`id`, `value`) VALUES ('SL', 'চিয়েৰা লিঅ’ন');\nINSERT INTO `list` (`id`, `value`) VALUES ('SY', 'চিৰিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('CL', 'চিলি');\nINSERT INTO `list` (`id`, `value`) VALUES ('CN', 'চীন');\nINSERT INTO `list` (`id`, `value`) VALUES ('CH', 'চুইজাৰলেণ্ড');\nINSERT INTO `list` (`id`, `value`) VALUES ('SE', 'চুইডেন');\nINSERT INTO `list` (`id`, `value`) VALUES ('SD', 'চুডান');\nINSERT INTO `list` (`id`, `value`) VALUES ('SN', 'চেনেগাল');\nINSERT INTO `list` (`id`, `value`) VALUES ('SO', 'চোমালিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('SB', 'চোলোমোন দ্বীপপুঞ্জ');\nINSERT INTO `list` (`id`, `value`) VALUES ('SA', 'চৌডি আৰবিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('RS', 'ছাৰ্বিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('SG', 'ছিংগাপুৰ');\nINSERT INTO `list` (`id`, `value`) VALUES ('SC', 'ছিচিলিছ');\nINSERT INTO `list` (`id`, `value`) VALUES ('SR', 'ছুৰিনাম');\nINSERT INTO `list` (`id`, `value`) VALUES ('KN', 'ছেইণ্ট কিটছ আৰু নেভিছ');\nINSERT INTO `list` (`id`, `value`) VALUES ('PM', 'ছেইণ্ট পিয়েৰে আৰু মিকিউৱেলন');\nINSERT INTO `list` (`id`, `value`) VALUES ('BL', 'ছেইণ্ট বাৰ্থলেমে');\nINSERT INTO `list` (`id`, `value`) VALUES ('VC', 'ছেইণ্ট ভিনচেণ্ট আৰু গ্ৰীণাডাইনছ');\nINSERT INTO `list` (`id`, `value`) VALUES ('MF', 'ছেইণ্ট মাৰ্টিন');\nINSERT INTO `list` (`id`, `value`) VALUES ('LC', 'ছেইণ্ট লুচিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('SH', 'ছেইণ্ট হেলেনা');\nINSERT INTO `list` (`id`, `value`) VALUES ('GE', 'জৰ্জিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('JO', 'জৰ্ডান');\nINSERT INTO `list` (`id`, `value`) VALUES ('JP', 'জাপান');\nINSERT INTO `list` (`id`, `value`) VALUES ('JM', 'জামাইকা');\nINSERT INTO `list` (`id`, `value`) VALUES ('ZM', 'জাম্বিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('JE', 'জাৰ্চি');\nINSERT INTO `list` (`id`, `value`) VALUES ('DE', 'জাৰ্মানী');\nINSERT INTO `list` (`id`, `value`) VALUES ('DJ', 'জিবুটি');\nINSERT INTO `list` (`id`, `value`) VALUES ('GI', 'জিব্ৰাল্টৰ');\nINSERT INTO `list` (`id`, `value`) VALUES ('ZW', 'জিম্বাবৱে');\nINSERT INTO `list` (`id`, `value`) VALUES ('TO', 'টংগা');\nINSERT INTO `list` (`id`, `value`) VALUES ('TW', 'টাইৱান');\nINSERT INTO `list` (`id`, `value`) VALUES ('TC', 'টাৰ্কছ অৰু কেইক’ছ দ্বীপপুঞ্জ');\nINSERT INTO `list` (`id`, `value`) VALUES ('TL', 'টিমোৰ-লেচটে');\nINSERT INTO `list` (`id`, `value`) VALUES ('TN', 'টুনিচিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('TV', 'টুভালু');\nINSERT INTO `list` (`id`, `value`) VALUES ('TK', 'টোকেলাউ');\nINSERT INTO `list` (`id`, `value`) VALUES ('TG', 'টোগো');\nINSERT INTO `list` (`id`, `value`) VALUES ('TT', 'ট্ৰিনিডাড আৰু টোবাগো');\nINSERT INTO `list` (`id`, `value`) VALUES ('DM', 'ড’মিনিকা');\nINSERT INTO `list` (`id`, `value`) VALUES ('DO', 'ড’মিনিকান ৰিপাব্লিক');\nINSERT INTO `list` (`id`, `value`) VALUES ('DK', 'ডেনমাৰ্ক');\nINSERT INTO `list` (`id`, `value`) VALUES ('TJ', 'তাজিকিস্তান');\nINSERT INTO `list` (`id`, `value`) VALUES ('TZ', 'তাঞ্জানিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('TM', 'তুৰ্কমেনিস্তান');\nINSERT INTO `list` (`id`, `value`) VALUES ('TR', 'তুৰ্কি');\nINSERT INTO `list` (`id`, `value`) VALUES ('TH', 'থাইলেণ্ড');\nINSERT INTO `list` (`id`, `value`) VALUES ('ZA', 'দক্ষিণ আফ্রিকা');\nINSERT INTO `list` (`id`, `value`) VALUES ('KR', 'দক্ষিণ কোৰিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('SS', 'দক্ষিণ চুডান');\nINSERT INTO `list` (`id`, `value`) VALUES ('GS', 'দক্ষিণ জৰ্জিয়া আৰু দক্ষিণ চেণ্ডৱিচ দ্বীপপুঞ্জ');\nINSERT INTO `list` (`id`, `value`) VALUES ('TF', 'দক্ষিণ ফ্ৰান্সৰ অঞ্চল');\nINSERT INTO `list` (`id`, `value`) VALUES ('NF', 'ন’ৰফ’ক দ্বীপ');\nINSERT INTO `list` (`id`, `value`) VALUES ('NO', 'নৰৱে');\nINSERT INTO `list` (`id`, `value`) VALUES ('NE', 'নাইজাৰ');\nINSERT INTO `list` (`id`, `value`) VALUES ('NG', 'নাইজেৰিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('NR', 'নাউৰু');\nINSERT INTO `list` (`id`, `value`) VALUES ('NA', 'নামিবিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('NU', 'নিউ');\nINSERT INTO `list` (`id`, `value`) VALUES ('NC', 'নিউ কেলিডোনিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('NZ', 'নিউজিলেণ্ড');\nINSERT INTO `list` (`id`, `value`) VALUES ('NI', 'নিকাৰাগুৱা');\nINSERT INTO `list` (`id`, `value`) VALUES ('NL', 'নেডাৰলেণ্ড');\nINSERT INTO `list` (`id`, `value`) VALUES ('NP', 'নেপাল');\nINSERT INTO `list` (`id`, `value`) VALUES ('PT', 'পৰ্তুগাল');\nINSERT INTO `list` (`id`, `value`) VALUES ('EH', 'পশ্চিমীয় ছাহাৰা');\nINSERT INTO `list` (`id`, `value`) VALUES ('PK', 'পাকিস্তান');\nINSERT INTO `list` (`id`, `value`) VALUES ('PA', 'পানামা');\nINSERT INTO `list` (`id`, `value`) VALUES ('PG', 'পাপুৱা নিউ গিনি');\nINSERT INTO `list` (`id`, `value`) VALUES ('PY', 'পাৰাগুৱে');\nINSERT INTO `list` (`id`, `value`) VALUES ('PW', 'পালাউ');\nINSERT INTO `list` (`id`, `value`) VALUES ('PN', 'পিটকেইৰ্ণ দ্বীপপুঞ্জ');\nINSERT INTO `list` (`id`, `value`) VALUES ('PR', 'পুৱেৰ্টো ৰিকো');\nINSERT INTO `list` (`id`, `value`) VALUES ('PE', 'পেৰু');\nINSERT INTO `list` (`id`, `value`) VALUES ('PL', 'পোলেণ্ড');\nINSERT INTO `list` (`id`, `value`) VALUES ('FK', 'ফকলেণ্ড দ্বীপপুঞ্জ');\nINSERT INTO `list` (`id`, `value`) VALUES ('FO', 'ফাৰো দ্বীপপুঞ্জ');\nINSERT INTO `list` (`id`, `value`) VALUES ('FJ', 'ফিজি');\nINSERT INTO `list` (`id`, `value`) VALUES ('FI', 'ফিনলেণ্ড');\nINSERT INTO `list` (`id`, `value`) VALUES ('PH', 'ফিলিপাইনছ');\nINSERT INTO `list` (`id`, `value`) VALUES ('PS', 'ফিলিস্তিন অঞ্চল');\nINSERT INTO `list` (`id`, `value`) VALUES ('FR', 'ফ্ৰান্স');\nINSERT INTO `list` (`id`, `value`) VALUES ('GF', 'ফ্ৰান্স গয়ানা');\nINSERT INTO `list` (`id`, `value`) VALUES ('PF', 'ফ্ৰান্স পোলেনচিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('BA', 'ব’ছনিয়া আৰু হাৰ্জেগ’ভিনা');\nINSERT INTO `list` (`id`, `value`) VALUES ('BW', 'ব’টচোৱানা');\nINSERT INTO `list` (`id`, `value`) VALUES ('BO', 'বলিভিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('BD', 'বাংলাদেশ');\nINSERT INTO `list` (`id`, `value`) VALUES ('BB', 'বাৰ্বাডোচ');\nINSERT INTO `list` (`id`, `value`) VALUES ('BM', 'বাৰ্মুডা');\nINSERT INTO `list` (`id`, `value`) VALUES ('BH', 'বাহৰেইন');\nINSERT INTO `list` (`id`, `value`) VALUES ('BS', 'বাহামাছ');\nINSERT INTO `list` (`id`, `value`) VALUES ('BV', 'বুভে দ্বীপ');\nINSERT INTO `list` (`id`, `value`) VALUES ('BF', 'বুৰকিনা ফাচো');\nINSERT INTO `list` (`id`, `value`) VALUES ('BI', 'বুৰুণ্ডি');\nINSERT INTO `list` (`id`, `value`) VALUES ('BG', 'বুলগেৰিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('BJ', 'বেনিন');\nINSERT INTO `list` (`id`, `value`) VALUES ('BE', 'বেলজিয়াম');\nINSERT INTO `list` (`id`, `value`) VALUES ('BY', 'বেলাৰুছ');\nINSERT INTO `list` (`id`, `value`) VALUES ('BZ', 'বেলিজ');\nINSERT INTO `list` (`id`, `value`) VALUES ('BR', 'ব্ৰাজিল');\nINSERT INTO `list` (`id`, `value`) VALUES ('IO', 'ব্ৰিটিছ ইণ্ডিয়ান অ’চন টেৰিট’ৰি');\nINSERT INTO `list` (`id`, `value`) VALUES ('VG', 'ব্ৰিটিছ ভাৰ্জিন দ্বীপপুঞ্জ');\nINSERT INTO `list` (`id`, `value`) VALUES ('BN', 'ব্ৰুনেই');\nINSERT INTO `list` (`id`, `value`) VALUES ('VU', 'ভানাটু');\nINSERT INTO `list` (`id`, `value`) VALUES ('IN', 'ভাৰত');\nINSERT INTO `list` (`id`, `value`) VALUES ('VN', 'ভিয়েটনাম');\nINSERT INTO `list` (`id`, `value`) VALUES ('BT', 'ভুটান');\nINSERT INTO `list` (`id`, `value`) VALUES ('VA', 'ভেটিকান চিটি');\nINSERT INTO `list` (`id`, `value`) VALUES ('VE', 'ভেনি���ুৱেলা');\nINSERT INTO `list` (`id`, `value`) VALUES ('MZ', 'ম’জামবিক');\nINSERT INTO `list` (`id`, `value`) VALUES ('MS', 'ম’ণ্টছেৰাট');\nINSERT INTO `list` (`id`, `value`) VALUES ('MN', 'মঙ্গোলিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('ME', 'মণ্টেনেগ্ৰু');\nINSERT INTO `list` (`id`, `value`) VALUES ('CF', 'মধ্য আফ্রিকান প্রজাতন্ত্র');\nINSERT INTO `list` (`id`, `value`) VALUES ('MA', 'মৰক্কো');\nINSERT INTO `list` (`id`, `value`) VALUES ('MU', 'মৰিছাছ');\nINSERT INTO `list` (`id`, `value`) VALUES ('FM', 'মাইক্ৰোনেচিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('MR', 'মাউৰিটানিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('MO', 'মাকাও এছ. এ. আৰ. চীন');\nINSERT INTO `list` (`id`, `value`) VALUES ('MG', 'মাদাগাস্কাৰ');\nINSERT INTO `list` (`id`, `value`) VALUES ('YT', 'মায়োট্টে');\nINSERT INTO `list` (`id`, `value`) VALUES ('US', 'মাৰ্কিন যুক্তৰাষ্ট্ৰ');\nINSERT INTO `list` (`id`, `value`) VALUES ('MQ', 'মাৰ্টিনিক');\nINSERT INTO `list` (`id`, `value`) VALUES ('MH', 'মাৰ্শ্বাল দ্বীপপুঞ্জ');\nINSERT INTO `list` (`id`, `value`) VALUES ('MV', 'মালদ্বীপ');\nINSERT INTO `list` (`id`, `value`) VALUES ('MY', 'মালয়েচিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('MW', 'মালাৱি');\nINSERT INTO `list` (`id`, `value`) VALUES ('ML', 'মালি');\nINSERT INTO `list` (`id`, `value`) VALUES ('MT', 'মাল্টা');\nINSERT INTO `list` (`id`, `value`) VALUES ('MX', 'মেক্সিকো');\nINSERT INTO `list` (`id`, `value`) VALUES ('MC', 'মোনাকো');\nINSERT INTO `list` (`id`, `value`) VALUES ('MD', 'মোলডোভা');\nINSERT INTO `list` (`id`, `value`) VALUES ('MM', 'ম্যানমাৰ (বাৰ্মা)');\nINSERT INTO `list` (`id`, `value`) VALUES ('YE', 'য়েমেন');\nINSERT INTO `list` (`id`, `value`) VALUES ('RU', 'ৰাছিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('RE', 'ৰিইউনিয়ন');\nINSERT INTO `list` (`id`, `value`) VALUES ('RO', 'ৰোমানিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('RW', 'ৰোৱাণ্ডা');\nINSERT INTO `list` (`id`, `value`) VALUES ('LA', 'লাওচ');\nINSERT INTO `list` (`id`, `value`) VALUES ('LU', 'লাক্সেমবাৰ্গ');\nINSERT INTO `list` (`id`, `value`) VALUES ('LV', 'লাটভিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('LI', 'লিচটেনষ্টেইন');\nINSERT INTO `list` (`id`, `value`) VALUES ('LT', 'লিথুৱানিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('LY', 'লিবিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('LR', 'লিবেৰিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('LS', 'লেছ’থ’');\nINSERT INTO `list` (`id`, `value`) VALUES ('LB', 'লেবানন');\nINSERT INTO `list` (`id`, `value`) VALUES ('WF', 'ৱালিছ আৰু ফুটুনা');\nINSERT INTO `list` (`id`, `value`) VALUES ('LK', 'শ্রীলংকা');\nINSERT INTO `list` (`id`, `value`) VALUES ('SK', 'শ্লোভাকিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('SI', 'শ্লোভেনিয়া');\nINSERT INTO `list` (`id`, `value`) VALUES ('AE', 'সংযুক্ত আৰব আমিৰাত');\nINSERT INTO `list` (`id`, `value`) VALUES ('GB', 'সংযুক্ত ৰাজ্য');\nINSERT INTO `list` (`id`, `value`) VALUES ('ES', 'স্পেইন');\nINSERT INTO `list` (`id`, `value`) VALUES ('HK', 'হং কং এছ. এ. আৰ. চীন');\nINSERT INTO `list` (`id`, `value`) VALUES ('HN', 'হন্দুৰাছ');\nINSERT INTO `list` (`id`, `value`) VALUES ('HT', 'হাইটি');\nINSERT INTO `list` (`id`, `value`) VALUES ('HU', 'হাংগেৰী');\nINSERT INTO `list` (`id`, `value`) VALUES ('HM', 'হাৰ্ড দ্বীপ আৰু মেকডোনাল্ড দ্বীপপুঞ্জ');\n"} +{"text": "/**\r\n * Copyright 2013-2019 the original author or authors from the Jeddict project (https://jeddict.github.io/).\r\n *\r\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\r\n * use this file except in compliance with the License. You may obtain a copy of\r\n * the License at\r\n *\r\n * http://www.apache.org/licenses/LICENSE-2.0\r\n *\r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\r\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\r\n * License for the specific language governing permissions and limitations under\r\n * the License.\r\n */\r\npackage io.github.jeddict.jpa.spec.validator;\r\n\r\nimport javax.xml.bind.annotation.adapters.XmlAdapter;\r\n\r\n/**\r\n *\r\n * @author Gaurav Gupta\r\n */\r\npublic abstract class MarshalValidator<E> extends XmlAdapter<E, E> {\r\n\r\n @Override\r\n public E unmarshal(E e) throws Exception {\r\n return e;\r\n\r\n }\r\n}\r\n"} +{"text": "{\n \"ver\": \"1.0.1\",\n \"uuid\": \"7b81d4e8-ec84-4716-968d-500ac1d78a54\",\n \"isGroup\": false,\n \"subMetas\": {}\n}"} +{"text": "---\ntitle: IrqlZwPassive rule (wdm)\ndescription: The IrqlZwPassive rule specifies that the driver calls ZwClose only when it is executing at IRQL PASSIVE_LEVEL.\nms.assetid: d31612ad-e869-4fc7-bc09-e5b4d5362585\nms.date: 05/21/2018\nkeywords: [\"IrqlZwPassive rule (wdm)\"]\ntopic_type:\n- apiref\napi_name:\n- IrqlZwPassive\napi_type:\n- NA\nms.localizationpriority: medium\n---\n\n# IrqlZwPassive rule (wdm)\n\n\nThe **IrqlZwPassive** rule specifies that the driver calls [**ZwClose**](/windows-hardware/drivers/ddi/ntifs/nf-ntifs-ntclose) only when it is executing at IRQL = PASSIVE\\_LEVEL.\n\n**Driver model: WDM**\n\n**Bug check(s) found with this rule**: [**Bug Check 0xC4: DRIVER\\_VERIFIER\\_DETECTED\\_VIOLATION**](../debugger/bug-check-0xc4--driver-verifier-detected-violation.md) (0x2001F)\n\n\nExample\n-------\n\nThe following code violates this rule:\n\n``` syntax\nNTSTATUS \nDriverCloseResources (\n _In_ PDRIVER_CONTEXT Context\n )\n{\n …\n\n NT_ASSERT(KeGetCurrentIrql() == PASSIVE_LEVEL);\n\n //\n // ExAcquireFastMutex sets the IRQL to APC_LEVEL, and the caller continues \n // to run at APC_LEVEL after ExAcquireFastMutex returns.\n //\n \n ExAcquireFastMutex(&Context->FastMutex);\n \n ....\n \n if (NULL != Context->Handle) {\n\n //\n // RULE VIOLATION! - ZwClose can be called only at PASSIVE_LEVEL \n //\n \n ZwClose(Context->Handle); \n Context->Handle = NULL;\n }\n \n ....\n\n //\n // N.B. ExReleaseFastMutex restores the original IRQL.\n //\n \n ExReleaseFastMutex(&Context->FastMutex);\n \n ....\n}\n```\n\nHow to test\n-----------\n\n<table>\n<colgroup>\n<col width=\"100%\" />\n</colgroup>\n<thead>\n<tr class=\"header\">\n<th align=\"left\">At compile time</th>\n</tr>\n</thead>\n<tbody>\n<tr class=\"odd\">\n<td align=\"left\"><p>Run <a href=\"/windows-hardware/drivers/devtest/static-driver-verifier\" data-raw-source=\"[Static Driver Verifier](./static-driver-verifier.md)\">Static Driver Verifier</a> and specify the <strong>IrqlZwPassive</strong> rule.</p>\nUse the following steps to run an analysis of your code:\n<ol>\n<li><a href=\"/windows-hardware/drivers/devtest/using-static-driver-verifier-to-find-defects-in-drivers#preparing-your-source-code\" data-raw-source=\"[Prepare your code (use role type declarations).](./using-static-driver-verifier-to-find-defects-in-drivers.md#preparing-your-source-code)\">Prepare your code (use role type declarations).</a></li>\n<li><a href=\"/windows-hardware/drivers/devtest/using-static-driver-verifier-to-find-defects-in-drivers#running-static-driver-verifier\" data-raw-source=\"[Run Static Driver Verifier.](./using-static-driver-verifier-to-find-defects-in-drivers.md#running-static-driver-verifier)\">Run Static Driver Verifier.</a></li>\n<li><a href=\"/windows-hardware/drivers/devtest/using-static-driver-verifier-to-find-defects-in-drivers#viewing-and-analyzing-the-results\" data-raw-source=\"[View and analyze the results.](./using-static-driver-verifier-to-find-defects-in-drivers.md#viewing-and-analyzing-the-results)\">View and analyze the results.</a></li>\n</ol>\n<p>For more information, see <a href=\"/windows-hardware/drivers/devtest/using-static-driver-verifier-to-find-defects-in-drivers\" data-raw-source=\"[Using Static Driver Verifier to Find Defects in Drivers](./using-static-driver-verifier-to-find-defects-in-drivers.md)\">Using Static Driver Verifier to Find Defects in Drivers</a>.</p></td>\n</tr>\n</tbody>\n</table>\n\n<table>\n<colgroup>\n<col width=\"100%\" />\n</colgroup>\n<thead>\n<tr class=\"header\">\n<th align=\"left\">At run time</th>\n</tr>\n</thead>\n<tbody>\n<tr class=\"odd\">\n<td align=\"left\"><p>Run <a href=\"/windows-hardware/drivers/devtest/driver-verifier\" data-raw-source=\"[Driver Verifier](./driver-verifier.md)\">Driver Verifier</a> and select the <a href=\"/windows-hardware/drivers/devtest/ddi-compliance-checking\" data-raw-source=\"[DDI compliance checking](./ddi-compliance-checking.md)\">DDI compliance checking</a> option.</p></td>\n</tr>\n</tbody>\n</table>\n\n \n\nApplies to\n----------\n\n[**ZwClose**](/windows-hardware/drivers/ddi/ntifs/nf-ntifs-ntclose)\n[**ZwCreateKey**](/windows-hardware/drivers/ddi/wdm/nf-wdm-zwcreatekey)\n[**ZwDeleteKey**](/windows-hardware/drivers/ddi/wdm/nf-wdm-zwdeletekey)\n[**ZwEnumerateKey**](/windows-hardware/drivers/ddi/wdm/nf-wdm-zwenumeratekey)\n[**ZwEnumerateValueKey**](/windows-hardware/drivers/ddi/wdm/nf-wdm-zwenumeratevaluekey)\n[**ZwFlushKey**](/windows-hardware/drivers/ddi/wdm/nf-wdm-zwflushkey)\n[**ZwOpenKey**](/windows-hardware/drivers/ddi/wdm/nf-wdm-zwopenkey)\n[**ZwQueryKey**](/windows-hardware/drivers/ddi/wdm/nf-wdm-zwquerykey)\n[**ZwQueryValueKey**](/windows-hardware/drivers/ddi/wdm/nf-wdm-zwqueryvaluekey)\n[**ZwSetValueKey**](/windows-hardware/drivers/ddi/wdm/nf-wdm-zwsetvaluekey)\n"} +{"text": "DELETE FROM `disables` WHERE `sourcetype`=0 AND `entry`=53038 AND `flags`=64;\nINSERT INTO `disables` (`sourceType`, `entry`, `flags`, `params_0`, `params_1`, `comment`) VALUES\n(0,53038,64, '', '', 'Disable Vmaps for Didgeridoo of Contemplation');\n\nDELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (29056,29057,29069,29058);\nUPDATE `creature_template` SET `ainame`='SmartAI',`scriptname`='' WHERE `entry` IN (29056,29057,29069,29058); \nDELETE FROM `smart_scripts` WHERE `entryorguid` IN (29056,29057,29069,29058) AND `source_type`=0;\nINSERT INTO `smart_scripts` VALUES\n(29056,0,0,0,8,0,100,0,53038,0,0,0,33,29056,0,0,0,0,0,7,0,0,0,0,0,0,0,'Glimmering Pillar Credit - On Spell Hit - Give Quest Credit'),\n(29057,0,0,0,8,0,100,0,53038,0,0,0,33,29057,0,0,0,0,0,7,0,0,0,0,0,0,0,'Mosslight Pillar Credit - On Spell Hit - Give Quest Credit'),\n(29069,0,0,0,8,0,100,0,53038,0,0,0,33,29069,0,0,0,0,0,7,0,0,0,0,0,0,0,'Skyreach Pillar Credit - On Spell Hit - Give Quest Credit'),\n(29058,0,0,0,8,0,100,0,53038,0,0,0,33,29058,0,0,0,0,0,7,0,0,0,0,0,0,0,'Suntouched Pillar Credit - On Spell Hit - Give Quest Credit');\n"} +{"text": "{\n \"url\": \"kenney-ui-16x16.png\",\n \"sprite_size\" : {\"x\": 16, \"y\": 16},\n \"license\" : \"By Kenney.nl and Morgan McGuire 2018 https://kenney.nl/assets/ui-pack, in the Public Domain/CC0 1.0\"\n}\n"} +{"text": "#!/usr/bin/env node\nvar minimist = require('minimist');\n\nvar command = minimist(process.argv.slice(2), {\n\talias: {\n\t\t// Short options\n\t\th: 'help',\n\t\ti: 'input',\n\t\tm: 'sourcemap',\n\t\to: 'output',\n\t\tv: 'version',\n\t\tt: 'target',\n\t\ty: 'yes',\n\t\tn: 'no'\n\t}\n});\n\nif (command.help || (process.argv.length <= 2 && process.stdin.isTTY)) {\n\trequire('./showHelp')();\n} else if (command.version) {\n\tconsole.log('Bublé version ' + require('../package.json').version);\n} else {\n\trequire('./runBuble')(command);\n}\n"} +{"text": "package com.allaboutscala.chapter.five\n\n/**\n * /**\n * Created by Nadim Bahadoor on 28/06/2016.\n *\n * Tutorial: Learn How To Extend Multiple Traits\n *\n * [[http://allaboutscala.com/tutorials/chapter-5-traits/scala-extend-multiple-traits/]]\n *\n * Copyright 2016 Nadim Bahadoor (http://allaboutscala.com)\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not\n * use this file except in compliance with the License. You may obtain a copy of\n * the License at\n *\n * [http://www.apache.org/licenses/LICENSE-2.0]\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the\n * License for the specific language governing permissions and limitations under\n * the License.\n */\n */\nobject ExtendMultipleTraits extends App {\n\n println(\"Step 1: Create a trait with type which will define the methods for a data access layer\")\n trait DonutShoppingCartDao[A] {\n\n def add(donut: A): Long\n\n def update(donut: A): Boolean\n\n def search(donut: A): A\n\n def delete(donut: A): Boolean\n }\n\n\n\n println(\"\\nStep 2: Create a second trait which will define the methods for checking donut inventory\")\n trait DonutInventoryService[A] {\n\n def checkStockQuantity(donut: A): Int\n\n }\n\n\n println(\"\\nStep 3: Create a DonutShoppingCart class which extends multiple traits namely trait DonutShoppingCartDao and trait DonutInventoryService\")\n class DonutShoppingCart[A] extends DonutShoppingCartDao[A] with DonutInventoryService[A] {\n\n override def add(donut: A): Long = {\n println(s\"DonutShoppingCart-> add method -> donut: $donut\")\n 1\n }\n\n override def update(donut: A): Boolean = {\n println(s\"DonutShoppingCart-> update method -> donut: $donut\")\n true\n }\n\n override def search(donut: A): A = {\n println(s\"DonutShoppingCart-> search method -> donut: $donut\")\n donut\n }\n\n override def delete(donut: A): Boolean = {\n println(s\"DonutShoppingCart-> delete method -> donut: $donut\")\n true\n }\n\n override def checkStockQuantity(donut: A): Int = {\n println(s\"DonutShoppingCart-> checkStockQuantity method -> donut: $donut\")\n 10\n }\n }\n\n\n println(\"\\nStep 4: Create an instance of DonutShoppingCart and call the add, update, search and delete methods\")\n val donutShoppingCart: DonutShoppingCart[String] = new DonutShoppingCart[String]()\n donutShoppingCart.add(\"Vanilla Donut\")\n donutShoppingCart.update(\"Vanilla Donut\")\n donutShoppingCart.search(\"Vanilla Donut\")\n donutShoppingCart.delete(\"Vanilla Donut\")\n\n\n println(\"\\nStep 5: Call the checkStockQuantity method which was inherited from trait DonutInventoryService\")\n donutShoppingCart.checkStockQuantity(\"Vanilla Donut\")\n}\n"} +{"text": "/*\n * Copyright 2008 Veselin Georgiev,\n * anrieffNOSPAM @ mgail_DOT.com (convert to gmail)\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n *\n * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR\n * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES\n * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.\n * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF\n * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#include <stdio.h>\n#include <string.h>\n#include <ctype.h>\n#include \"libcpuid.h\"\n#include \"libcpuid_util.h\"\n#include \"libcpuid_internal.h\"\n#include \"recog_amd.h\"\n\nconst struct amd_code_str { amd_code_t code; char *str; } amd_code_str[] = {\n\t#define CODE(x) { x, #x }\n\t#define CODE2(x, y) CODE(x)\n\t#include \"amd_code_t.h\"\n\t#undef CODE\n};\n\nstruct amd_code_and_bits_t {\n\tint code;\n\tuint64_t bits;\n};\n\nenum _amd_model_codes_t {\n\t// Only for Ryzen CPUs:\n\t_1400,\n\t_1500,\n\t_1600,\n};\n\n\nconst struct match_entry_t cpudb_amd[] = {\n\t{ -1, -1, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"Unknown AMD CPU\" },\n\t\n\t/* 486 and the likes */\n\t{ 4, -1, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"Unknown AMD 486\" },\n\t{ 4, 3, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"AMD 486DX2\" },\n\t{ 4, 7, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"AMD 486DX2WB\" },\n\t{ 4, 8, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"AMD 486DX4\" },\n\t{ 4, 9, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"AMD 486DX4WB\" },\n\t\n\t/* Pentia clones */\n\t{ 5, -1, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"Unknown AMD 586\" },\n\t{ 5, 0, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"K5\" },\n\t{ 5, 1, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"K5\" },\n\t{ 5, 2, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"K5\" },\n\t{ 5, 3, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"K5\" },\n\t\n\t/* The K6 */\n\t{ 5, 6, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"K6\" },\n\t{ 5, 7, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"K6\" },\n\t\n\t{ 5, 8, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"K6-2\" },\n\t{ 5, 9, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"K6-III\" },\n\t{ 5, 10, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"Unknown K6\" },\n\t{ 5, 11, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"Unknown K6\" },\n\t{ 5, 12, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"Unknown K6\" },\n\t{ 5, 13, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"K6-2+\" },\n\t\n\t/* Athlon et al. */\n\t{ 6, 1, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"Athlon (Slot-A)\" },\n\t{ 6, 2, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"Athlon (Slot-A)\" },\n\t{ 6, 3, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"Duron (Spitfire)\" },\n\t{ 6, 4, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"Athlon (ThunderBird)\" },\n\t\n\t{ 6, 6, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"Unknown Athlon\" },\n\t{ 6, 6, -1, -1, -1, 1, -1, -1, NC, ATHLON_ , 0, \"Athlon (Palomino)\" },\n\t{ 6, 6, -1, -1, -1, 1, -1, -1, NC, ATHLON_|_MP_ , 0, \"Athlon MP (Palomino)\" },\n\t{ 6, 6, -1, -1, -1, 1, -1, -1, NC, DURON_ , 0, \"Duron (Palomino)\" },\n\t{ 6, 6, -1, -1, -1, 1, -1, -1, NC, ATHLON_|_XP_ , 0, \"Athlon XP\" },\n\t\n\t{ 6, 7, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"Unknown Athlon XP\" },\n\t{ 6, 7, -1, -1, -1, 1, -1, -1, NC, DURON_ , 0, \"Duron (Morgan)\" },\n\t\n\t{ 6, 8, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"Athlon XP\" },\n\t{ 6, 8, -1, -1, -1, 1, -1, -1, NC, ATHLON_ , 0, \"Athlon XP (Thoroughbred)\" },\n\t{ 6, 8, -1, -1, -1, 1, -1, -1, NC, ATHLON_|_XP_ , 0, \"Athlon XP (Thoroughbred)\" },\n\t{ 6, 8, -1, -1, -1, 1, -1, -1, NC, DURON_ , 0, \"Duron (Applebred)\" },\n\t{ 6, 8, -1, -1, -1, 1, -1, -1, NC, SEMPRON_ , 0, \"Sempron (Thoroughbred)\" },\n\t{ 6, 8, -1, -1, -1, 1, 128, -1, NC, SEMPRON_ , 0, \"Sempron (Thoroughbred)\" },\n\t{ 6, 8, -1, -1, -1, 1, 256, -1, NC, SEMPRON_ , 0, \"Sempron (Thoroughbred)\" },\n\t{ 6, 8, -1, -1, -1, 1, -1, -1, NC, ATHLON_|_MP_ , 0, \"Athlon MP (Thoroughbred)\" },\n\t{ 6, 8, -1, -1, -1, 1, -1, -1, NC, ATHLON_|_XP_|_M_ , 0, \"Mobile Athlon (T-Bred)\" },\n\t{ 6, 8, -1, -1, -1, 1, -1, -1, NC, ATHLON_|_XP_|_M_|_LV_, 0, \"Mobile Athlon (T-Bred)\" },\n\t\n\t{ 6, 10, -1, -1, -1, 1, -1, -1, NC, 0 , 0, \"Athlon XP (Barton)\" },\n\t{ 6, 10, -1, -1, -1, 1, 512, -1, NC, ATHLON_|_XP_ , 0, \"Athlon XP (Barton)\" },\n\t{ 6, 10, -1, -1, -1, 1, 512, -1, NC, SEMPRON_ , 0, \"Sempron (Barton)\" },\n\t{ 6, 10, -1, -1, -1, 1, 256, -1, NC, SEMPRON_ , 0, \"Sempron (Thorton)\" },\n\t{ 6, 10, -1, -1, -1, 1, 256, -1, NC, ATHLON_|_XP_ , 0, \"Athlon XP (Thorton)\" },\n\t{ 6, 10, -1, -1, -1, 1, -1, -1, NC, ATHLON_|_MP_ , 0, \"Athlon MP (Barton)\" },\n\t{ 6, 10, -1, -1, -1, 1, -1, -1, NC, ATHLON_|_XP_|_M_ , 0, \"Mobile Athlon (Barton)\" },\n\t{ 6, 10, -1, -1, -1, 1, -1, -1, NC, ATHLON_|_XP_|_M_|_LV_, 0, \"Mobile Athlon (Barton)\" },\n\t\n\t/* K8 Architecture */\n\t{ 15, -1, -1, 15, -1, 1, -1, -1, NC, 0 , 0, \"Unknown K8\" },\n\t{ 15, -1, -1, 16, -1, 1, -1, -1, NC, 0 , 0, \"Unknown K9\" },\n\t\n\t{ 15, -1, -1, 15, -1, 1, -1, -1, NC, 0 , 0, \"Unknown A64\" },\n\t{ 15, -1, -1, 15, -1, 1, -1, -1, NC, OPTERON_ , 0, \"Opteron\" },\n\t{ 15, -1, -1, 15, -1, 2, -1, -1, NC, OPTERON_|_X2 , 0, \"Opteron (Dual Core)\" },\n\t{ 15, 3, -1, 15, -1, 1, -1, -1, NC, OPTERON_ , 0, \"Opteron\" },\n\t{ 15, 3, -1, 15, -1, 2, -1, -1, NC, OPTERON_|_X2 , 0, \"Opteron (Dual Core)\" },\n\t{ 15, -1, -1, 15, -1, 1, 512, -1, NC, ATHLON_|_64_ , 0, \"Athlon 64 (512K)\" },\n\t{ 15, -1, -1, 15, -1, 1, 1024, -1, NC, ATHLON_|_64_ , 0, \"Athlon 64 (1024K)\" },\n\t{ 15, -1, -1, 15, -1, 1, -1, -1, NC, ATHLON_|_FX , 0, \"Athlon FX\" },\n\t{ 15, -1, -1, 15, -1, 1, -1, -1, NC, ATHLON_|_64_|_FX , 0, \"Athlon 64 FX\" },\n\t{ 15, 3, -1, 15, 35, 2, -1, -1, NC, ATHLON_|_64_|_FX , 0, \"Athlon 64 FX X2 (Toledo)\" },\n\t{ 15, -1, -1, 15, -1, 2, 512, -1, NC, ATHLON_|_64_|_X2 , 0, \"Athlon 64 X2 (512K)\" },\n\t{ 15, -1, -1, 15, -1, 2, 1024, -1, NC, ATHLON_|_64_|_X2 , 0, \"Athlon 64 X2 (1024K)\" },\n\t{ 15, -1, -1, 15, -1, 1, 512, -1, NC, TURION_|_64_ , 0, \"Turion 64 (512K)\" },\n\t{ 15, -1, -1, 15, -1, 1, 1024, -1, NC, TURION_|_64_ , 0, \"Turion 64 (1024K)\" },\n\t{ 15, -1, -1, 15, -1, 2, 512, -1, NC, TURION_|_X2 , 0, \"Turion 64 X2 (512K)\" },\n\t{ 15, -1, -1, 15, -1, 2, 1024, -1, NC, TURION_|_X2 , 0, \"Turion 64 X2 (1024K)\" },\n\t{ 15, -1, -1, 15, -1, 1, 128, -1, NC, SEMPRON_ , 0, \"A64 Sempron (128K)\" },\n\t{ 15, -1, -1, 15, -1, 1, 256, -1, NC, SEMPRON_ , 0, \"A64 Sempron (256K)\" },\n\t{ 15, -1, -1, 15, -1, 1, 512, -1, NC, SEMPRON_ , 0, \"A64 Sempron (512K)\" },\n\t{ 15, -1, -1, 15, 0x4f, 1, 512, -1, NC, ATHLON_|_64_ , 0, \"Athlon 64 (Orleans/512K)\" },\n\t{ 15, -1, -1, 15, 0x5f, 1, 512, -1, NC, ATHLON_|_64_ , 0, \"Athlon 64 (Orleans/512K)\" },\n\t{ 15, -1, -1, 15, 0x2f, 1, 512, -1, NC, ATHLON_|_64_ , 0, \"Athlon 64 (Venice/512K)\" },\n\t{ 15, -1, -1, 15, 0x2c, 1, 512, -1, NC, ATHLON_|_64_ , 0, \"Athlon 64 (Venice/512K)\" },\n\t{ 15, -1, -1, 15, 0x1f, 1, 512, -1, NC, ATHLON_|_64_ , 0, \"Athlon 64 (Winchester/512K)\" },\n\t{ 15, -1, -1, 15, 0x0c, 1, 512, -1, NC, ATHLON_|_64_ , 0, \"Athlon 64 (Newcastle/512K)\" },\n\t{ 15, -1, -1, 15, 0x27, 1, 512, -1, NC, ATHLON_|_64_ , 0, \"Athlon 64 (San Diego/512K)\" },\n\t{ 15, -1, -1, 15, 0x37, 1, 512, -1, NC, ATHLON_|_64_ , 0, \"Athlon 64 (San Diego/512K)\" },\n\t{ 15, -1, -1, 15, 0x04, 1, 512, -1, NC, ATHLON_|_64_ , 0, \"Athlon 64 (ClawHammer/512K)\" },\n\t\n\t{ 15, -1, -1, 15, 0x5f, 1, 1024, -1, NC, ATHLON_|_64_ , 0, \"Athlon 64 (Orleans/1024K)\" },\n\t{ 15, -1, -1, 15, 0x27, 1, 1024, -1, NC, ATHLON_|_64_ , 0, \"Athlon 64 (San Diego/1024K)\" },\n\t{ 15, -1, -1, 15, 0x04, 1, 1024, -1, NC, ATHLON_|_64_ , 0, \"Athlon 64 (ClawHammer/1024K)\" },\n\t\n\t{ 15, -1, -1, 15, 0x4b, 2, 256, -1, NC, SEMPRON_ , 0, \"Athlon 64 X2 (Windsor/256K)\" },\n\t\n\t{ 15, -1, -1, 15, 0x23, 2, 512, -1, NC, ATHLON_|_64_|_X2 , 0, \"Athlon 64 X2 (Toledo/512K)\" },\n\t{ 15, -1, -1, 15, 0x4b, 2, 512, -1, NC, ATHLON_|_64_|_X2 , 0, \"Athlon 64 X2 (Windsor/512K)\" },\n\t{ 15, -1, -1, 15, 0x43, 2, 512, -1, NC, ATHLON_|_64_|_X2 , 0, \"Athlon 64 X2 (Windsor/512K)\" },\n\t{ 15, -1, -1, 15, 0x6b, 2, 512, -1, NC, ATHLON_|_64_|_X2 , 0, \"Athlon 64 X2 (Brisbane/512K)\" },\n\t{ 15, -1, -1, 15, 0x2b, 2, 512, -1, NC, ATHLON_|_64_|_X2 , 0, \"Athlon 64 X2 (Manchester/512K)\"},\n\t\n\t{ 15, -1, -1, 15, 0x23, 2, 1024, -1, NC, ATHLON_|_64_|_X2 , 0, \"Athlon 64 X2 (Toledo/1024K)\" },\n\t{ 15, -1, -1, 15, 0x43, 2, 1024, -1, NC, ATHLON_|_64_|_X2 , 0, \"Athlon 64 X2 (Windsor/1024K)\" },\n\t\n\t{ 15, -1, -1, 15, 0x08, 1, 128, -1, NC, MOBILE_|SEMPRON_ , 0, \"Mobile Sempron 64 (Dublin/128K)\"},\n\t{ 15, -1, -1, 15, 0x08, 1, 256, -1, NC, MOBILE_|SEMPRON_ , 0, \"Mobile Sempron 64 (Dublin/256K)\"},\n\t{ 15, -1, -1, 15, 0x0c, 1, 256, -1, NC, SEMPRON_ , 0, \"Sempron 64 (Paris)\" },\n\t{ 15, -1, -1, 15, 0x1c, 1, 128, -1, NC, SEMPRON_ , 0, \"Sempron 64 (Palermo/128K)\" },\n\t{ 15, -1, -1, 15, 0x1c, 1, 256, -1, NC, SEMPRON_ , 0, \"Sempron 64 (Palermo/256K)\" },\n\t{ 15, -1, -1, 15, 0x1c, 1, 128, -1, NC, MOBILE_| SEMPRON_ , 0, \"Mobile Sempron 64 (Sonora/128K)\"},\n\t{ 15, -1, -1, 15, 0x1c, 1, 256, -1, NC, MOBILE_| SEMPRON_ , 0, \"Mobile Sempron 64 (Sonora/256K)\"},\n\t{ 15, -1, -1, 15, 0x2c, 1, 128, -1, NC, SEMPRON_ , 0, \"Sempron 64 (Palermo/128K)\" },\n\t{ 15, -1, -1, 15, 0x2c, 1, 256, -1, NC, SEMPRON_ , 0, \"Sempron 64 (Palermo/256K)\" },\n\t{ 15, -1, -1, 15, 0x2c, 1, 128, -1, NC, MOBILE_| SEMPRON_ , 0, \"Mobile Sempron 64 (Albany/128K)\"},\n\t{ 15, -1, -1, 15, 0x2c, 1, 256, -1, NC, MOBILE_| SEMPRON_ , 0, \"Mobile Sempron 64 (Albany/256K)\"},\n\t{ 15, -1, -1, 15, 0x2f, 1, 128, -1, NC, SEMPRON_ , 0, \"Sempron 64 (Palermo/128K)\" },\n\t{ 15, -1, -1, 15, 0x2f, 1, 256, -1, NC, SEMPRON_ , 0, \"Sempron 64 (Palermo/256K)\" },\n\t{ 15, -1, -1, 15, 0x4f, 1, 128, -1, NC, SEMPRON_ , 0, \"Sempron 64 (Manila/128K)\" },\n\t{ 15, -1, -1, 15, 0x4f, 1, 256, -1, NC, SEMPRON_ , 0, \"Sempron 64 (Manila/256K)\" },\n\t{ 15, -1, -1, 15, 0x5f, 1, 128, -1, NC, SEMPRON_ , 0, \"Sempron 64 (Manila/128K)\" },\n\t{ 15, -1, -1, 15, 0x5f, 1, 256, -1, NC, SEMPRON_ , 0, \"Sempron 64 (Manila/256K)\" },\n\t{ 15, -1, -1, 15, 0x6b, 2, 256, -1, NC, SEMPRON_ , 0, \"Sempron 64 Dual (Sherman/256K)\"},\n\t{ 15, -1, -1, 15, 0x6b, 2, 512, -1, NC, SEMPRON_ , 0, \"Sempron 64 Dual (Sherman/512K)\"},\n\t{ 15, -1, -1, 15, 0x7f, 1, 256, -1, NC, SEMPRON_ , 0, \"Sempron 64 (Sparta/256K)\" },\n\t{ 15, -1, -1, 15, 0x7f, 1, 512, -1, NC, SEMPRON_ , 0, \"Sempron 64 (Sparta/512K)\" },\n\t{ 15, -1, -1, 15, 0x4c, 1, 256, -1, NC, MOBILE_| SEMPRON_ , 0, \"Mobile Sempron 64 (Keene/256K)\"},\n\t{ 15, -1, -1, 15, 0x4c, 1, 512, -1, NC, MOBILE_| SEMPRON_ , 0, \"Mobile Sempron 64 (Keene/512K)\"},\n\t{ 15, -1, -1, 15, -1, 2, -1, -1, NC, SEMPRON_ , 0, \"Sempron Dual Core\" },\n\t\n\t{ 15, -1, -1, 15, 0x24, 1, 512, -1, NC, TURION_|_64_ , 0, \"Turion 64 (Lancaster/512K)\" },\n\t{ 15, -1, -1, 15, 0x24, 1, 1024, -1, NC, TURION_|_64_ , 0, \"Turion 64 (Lancaster/1024K)\" },\n\t{ 15, -1, -1, 15, 0x48, 2, 256, -1, NC, TURION_|_X2 , 0, \"Turion X2 (Taylor)\" },\n\t{ 15, -1, -1, 15, 0x48, 2, 512, -1, NC, TURION_|_X2 , 0, \"Turion X2 (Trinidad)\" },\n\t{ 15, -1, -1, 15, 0x4c, 1, 512, -1, NC, TURION_|_64_ , 0, \"Turion 64 (Richmond)\" },\n\t{ 15, -1, -1, 15, 0x68, 2, 256, -1, NC, TURION_|_X2 , 0, \"Turion X2 (Tyler/256K)\" },\n\t{ 15, -1, -1, 15, 0x68, 2, 512, -1, NC, TURION_|_X2 , 0, \"Turion X2 (Tyler/512K)\" },\n\t{ 15, -1, -1, 17, 3, 2, 512, -1, NC, TURION_|_X2 , 0, \"Turion X2 (Griffin/512K)\" },\n\t{ 15, -1, -1, 17, 3, 2, 1024, -1, NC, TURION_|_X2 , 0, \"Turion X2 (Griffin/1024K)\" },\n\n\t/* K10 Architecture (2007) */\n\t{ 15, -1, -1, 16, -1, 1, -1, -1, PHENOM, 0 , 0, \"Unknown AMD Phenom\" },\n\t{ 15, 2, -1, 16, -1, 1, -1, -1, PHENOM, 0 , 0, \"Phenom\" },\n\t{ 15, 2, -1, 16, -1, 3, -1, -1, PHENOM, 0 , 0, \"Phenom X3 (Toliman)\" },\n\t{ 15, 2, -1, 16, -1, 4, -1, -1, PHENOM, 0 , 0, \"Phenom X4 (Agena)\" },\n\t{ 15, 2, -1, 16, -1, 3, 512, -1, PHENOM, 0 , 0, \"Phenom X3 (Toliman/256K)\" },\n\t{ 15, 2, -1, 16, -1, 3, 512, -1, PHENOM, 0 , 0, \"Phenom X3 (Toliman/512K)\" },\n\t{ 15, 2, -1, 16, -1, 4, 128, -1, PHENOM, 0 , 0, \"Phenom X4 (Agena/128K)\" },\n\t{ 15, 2, -1, 16, -1, 4, 256, -1, PHENOM, 0 , 0, \"Phenom X4 (Agena/256K)\" },\n\t{ 15, 2, -1, 16, -1, 4, 512, -1, PHENOM, 0 , 0, \"Phenom X4 (Agena/512K)\" },\n\t{ 15, 2, -1, 16, -1, 2, 512, -1, NC, ATHLON_|_64_|_X2 , 0, \"Athlon X2 (Kuma)\" },\n\t/* Phenom II derivates: */\n\t{ 15, 4, -1, 16, -1, 4, -1, -1, NC, 0 , 0, \"Phenom (Deneb-based)\" },\n\t{ 15, 4, -1, 16, -1, 1, 1024, -1, NC, SEMPRON_ , 0, \"Sempron (Sargas)\" },\n\t{ 15, 4, -1, 16, -1, 2, 512, -1, PHENOM2, 0 , 0, \"Phenom II X2 (Callisto)\" },\n\t{ 15, 4, -1, 16, -1, 3, 512, -1, PHENOM2, 0 , 0, \"Phenom II X3 (Heka)\" },\n\t{ 15, 4, -1, 16, -1, 4, 512, -1, PHENOM2, 0 , 0, \"Phenom II X4\" },\n\t{ 15, 4, -1, 16, 4, 4, 512, -1, PHENOM2, 0 , 0, \"Phenom II X4 (Deneb)\" },\n\t{ 15, 5, -1, 16, 5, 4, 512, -1, PHENOM2, 0 , 0, \"Phenom II X4 (Deneb)\" },\n\t{ 15, 4, -1, 16, 10, 4, 512, -1, PHENOM2, 0 , 0, \"Phenom II X4 (Zosma)\" },\n\t{ 15, 4, -1, 16, 10, 6, 512, -1, PHENOM2, 0 , 0, \"Phenom II X6 (Thuban)\" },\n\t/* Athlon II derivates: */\n\t{ 15, 6, -1, 16, 6, 2, 512, -1, NC, ATHLON_|_X2 , 0, \"Athlon II (Champlain)\" },\n\t{ 15, 6, -1, 16, 6, 2, 512, -1, NC, ATHLON_|_64_|_X2 , 0, \"Athlon II X2 (Regor)\" },\n\t{ 15, 6, -1, 16, 6, 2, 1024, -1, NC, ATHLON_|_64_|_X2 , 0, \"Athlon II X2 (Regor)\" },\n\t{ 15, 5, -1, 16, 5, 3, 512, -1, NC, ATHLON_|_64_|_X3 , 0, \"Athlon II X3 (Rana)\" },\n\t{ 15, 5, -1, 16, 5, 4, 512, -1, NC, ATHLON_|_64_|_X4 , 0, \"Athlon II X4 (Propus)\" },\n\t/* Llano APUs (2011): */\n\t{ 15, 1, -1, 18, 1, 2, -1, -1, FUSION_EA, 0 , 0, \"Llano X2\" },\n\t{ 15, 1, -1, 18, 1, 3, -1, -1, FUSION_EA, 0 , 0, \"Llano X3\" },\n\t{ 15, 1, -1, 18, 1, 4, -1, -1, FUSION_EA, 0 , 0, \"Llano X4\" },\n\n\t/* Family 14h: Bobcat Architecture (2011) */\n\t{ 15, 2, -1, 20, -1, 1, -1, -1, FUSION_C, 0 , 0, \"Brazos Ontario\" },\n\t{ 15, 2, -1, 20, -1, 2, -1, -1, FUSION_C, 0 , 0, \"Brazos Ontario (Dual-core)\" },\n\t{ 15, 1, -1, 20, -1, 1, -1, -1, FUSION_E, 0 , 0, \"Brazos Zacate\" },\n\t{ 15, 1, -1, 20, -1, 2, -1, -1, FUSION_E, 0 , 0, \"Brazos Zacate (Dual-core)\" },\n\t{ 15, 2, -1, 20, -1, 2, -1, -1, FUSION_Z, 0 , 0, \"Brazos Desna (Dual-core)\" },\n\n\t/* Family 15h: Bulldozer Architecture (2011) */\n\t{ 15, -1, -1, 21, 0, 4, -1, -1, NC, 0 , 0, \"Bulldozer X2\" },\n\t{ 15, -1, -1, 21, 1, 4, -1, -1, NC, 0 , 0, \"Bulldozer X2\" },\n\t{ 15, -1, -1, 21, 1, 6, -1, -1, NC, 0 , 0, \"Bulldozer X3\" },\n\t{ 15, -1, -1, 21, 1, 8, -1, -1, NC, 0 , 0, \"Bulldozer X4\" },\n\t/* 2nd-gen, Piledriver core (2012): */\n\t{ 15, -1, -1, 21, 2, 4, -1, -1, NC, 0 , 0, \"Vishera X2\" },\n\t{ 15, -1, -1, 21, 2, 6, -1, -1, NC, 0 , 0, \"Vishera X3\" },\n\t{ 15, -1, -1, 21, 2, 8, -1, -1, NC, 0 , 0, \"Vishera X4\" },\n\t{ 15, 0, -1, 21, 16, 2, -1, -1, FUSION_A, 0 , 0, \"Trinity X2\" },\n\t{ 15, 0, -1, 21, 16, 4, -1, -1, FUSION_A, 0 , 0, \"Trinity X4\" },\n\t{ 15, 3, -1, 21, 19, 2, -1, -1, FUSION_A, 0 , 0, \"Richland X2\" },\n\t{ 15, 3, -1, 21, 19, 4, -1, -1, FUSION_A, 0 , 0, \"Richland X4\" },\n\t/* 3rd-gen, Steamroller core (2014): */\n\t{ 15, 0, -1, 21, 48, 2, -1, -1, FUSION_A, 0 , 0, \"Kaveri X2\" },\n\t{ 15, 0, -1, 21, 48, 4, -1, -1, FUSION_A, 0 , 0, \"Kaveri X4\" },\n\t{ 15, 8, -1, 21, 56, 4, -1, -1, FUSION_A, 0 , 0, \"Godavari X4\" },\n\t/* 4th-gen, Excavator core (2015): */\n\t{ 15, 1, -1, 21, 96, 2, -1, -1, FUSION_A, 0 , 0, \"Carrizo X2\" },\n\t{ 15, 1, -1, 21, 96, 4, -1, -1, FUSION_A, 0 , 0, \"Carrizo X4\" },\n\t{ 15, 5, -1, 21, 101, 2, -1, -1, FUSION_A, 0 , 0, \"Bristol Ridge X2\" },\n\t{ 15, 5, -1, 21, 101, 4, -1, -1, FUSION_A, 0 , 0, \"Bristol Ridge X4\" },\n\t{ 15, 0, -1, 21, 112, 2, -1, -1, FUSION_A, 0 , 0, \"Stoney Ridge X2\" },\n\t{ 15, 0, -1, 21, 112, 2, -1, -1, FUSION_E, 0 , 0, \"Stoney Ridge X2\" },\n\n\t/* Family 16h: Jaguar Architecture (2013) */\n\t{ 15, 0, -1, 22, 0, 2, -1, -1, FUSION_A, 0 , 0, \"Kabini X2\" },\n\t{ 15, 0, -1, 22, 0, 4, -1, -1, FUSION_A, 0 , 0, \"Kabini X4\" },\n\t/* 2nd-gen, Puma core (2013): */\n\t{ 15, 0, -1, 22, 48, 2, -1, -1, FUSION_E, 0 , 0, \"Mullins X2\" },\n\t{ 15, 0, -1, 22, 48, 4, -1, -1, FUSION_A, 0 , 0, \"Mullins X4\" },\n\n\t/* Family 17h: Zen Architecture (2017) */\n\t{ 15, -1, -1, 23, 1, 8, -1, -1, NC, 0 , 0, \"Ryzen 7\" },\n\t{ 15, -1, -1, 23, 1, 6, -1, -1, NC, 0 , _1600, \"Ryzen 5\" },\n\t{ 15, -1, -1, 23, 1, 4, -1, -1, NC, 0 , _1500, \"Ryzen 5\" },\n\t{ 15, -1, -1, 23, 1, 4, -1, -1, NC, 0 , _1400, \"Ryzen 5\" },\n\t{ 15, -1, -1, 23, 1, 4, -1, -1, NC, 0 , 0, \"Ryzen 3\" },\n\t//{ 15, -1, -1, 23, 1, 4, -1, -1, NC, 0 , 0, \"Raven Ridge\" }, //TBA\n\n\t/* Newer Opterons: */\n\t{ 15, 9, -1, 22, 9, 8, -1, -1, NC, OPTERON_ , 0, \"Magny-Cours Opteron\" },\n};\n\n\nstatic void load_amd_features(struct cpu_raw_data_t* raw, struct cpu_id_t* data)\n{\n\tconst struct feature_map_t matchtable_edx81[] = {\n\t\t{ 20, CPU_FEATURE_NX },\n\t\t{ 22, CPU_FEATURE_MMXEXT },\n\t\t{ 25, CPU_FEATURE_FXSR_OPT },\n\t\t{ 30, CPU_FEATURE_3DNOWEXT },\n\t\t{ 31, CPU_FEATURE_3DNOW },\n\t};\n\tconst struct feature_map_t matchtable_ecx81[] = {\n\t\t{ 1, CPU_FEATURE_CMP_LEGACY },\n\t\t{ 2, CPU_FEATURE_SVM },\n\t\t{ 5, CPU_FEATURE_ABM },\n\t\t{ 6, CPU_FEATURE_SSE4A },\n\t\t{ 7, CPU_FEATURE_MISALIGNSSE },\n\t\t{ 8, CPU_FEATURE_3DNOWPREFETCH },\n\t\t{ 9, CPU_FEATURE_OSVW },\n\t\t{ 10, CPU_FEATURE_IBS },\n\t\t{ 11, CPU_FEATURE_XOP },\n\t\t{ 12, CPU_FEATURE_SKINIT },\n\t\t{ 13, CPU_FEATURE_WDT },\n\t\t{ 16, CPU_FEATURE_FMA4 },\n\t\t{ 21, CPU_FEATURE_TBM },\n\t};\n\tconst struct feature_map_t matchtable_edx87[] = {\n\t\t{ 0, CPU_FEATURE_TS },\n\t\t{ 1, CPU_FEATURE_FID },\n\t\t{ 2, CPU_FEATURE_VID },\n\t\t{ 3, CPU_FEATURE_TTP },\n\t\t{ 4, CPU_FEATURE_TM_AMD },\n\t\t{ 5, CPU_FEATURE_STC },\n\t\t{ 6, CPU_FEATURE_100MHZSTEPS },\n\t\t{ 7, CPU_FEATURE_HWPSTATE },\n\t\t/* id 8 is handled in common */\n\t\t{ 9, CPU_FEATURE_CPB },\n\t\t{ 10, CPU_FEATURE_APERFMPERF },\n\t\t{ 11, CPU_FEATURE_PFI },\n\t\t{ 12, CPU_FEATURE_PA },\n\t};\n\tif (raw->ext_cpuid[0][0] >= 0x80000001) {\n\t\tmatch_features(matchtable_edx81, COUNT_OF(matchtable_edx81), raw->ext_cpuid[1][3], data);\n\t\tmatch_features(matchtable_ecx81, COUNT_OF(matchtable_ecx81), raw->ext_cpuid[1][2], data);\n\t}\n\tif (raw->ext_cpuid[0][0] >= 0x80000007)\n\t\tmatch_features(matchtable_edx87, COUNT_OF(matchtable_edx87), raw->ext_cpuid[7][3], data);\n\tif (raw->ext_cpuid[0][0] >= 0x8000001a) {\n\t\t/* We have the extended info about SSE unit size */\n\t\tdata->detection_hints[CPU_HINT_SSE_SIZE_AUTH] = 1;\n\t\tdata->sse_size = (raw->ext_cpuid[0x1a][0] & 1) ? 128 : 64;\n\t}\n}\n\nstatic void decode_amd_cache_info(struct cpu_raw_data_t* raw, struct cpu_id_t* data)\n{\n\tint l3_result;\n\tconst int assoc_table[16] = {\n\t\t0, 1, 2, 0, 4, 0, 8, 0, 16, 0, 32, 48, 64, 96, 128, 255\n\t};\n\tunsigned n = raw->ext_cpuid[0][0];\n\t\n\tif (n >= 0x80000005) {\n\t\tdata->l1_data_cache = (raw->ext_cpuid[5][2] >> 24) & 0xff;\n\t\tdata->l1_assoc = (raw->ext_cpuid[5][2] >> 16) & 0xff;\n\t\tdata->l1_cacheline = (raw->ext_cpuid[5][2]) & 0xff;\n\t\tdata->l1_instruction_cache = (raw->ext_cpuid[5][3] >> 24) & 0xff;\n\t}\n\tif (n >= 0x80000006) {\n\t\tdata->l2_cache = (raw->ext_cpuid[6][2] >> 16) & 0xffff;\n\t\tdata->l2_assoc = assoc_table[(raw->ext_cpuid[6][2] >> 12) & 0xf];\n\t\tdata->l2_cacheline = (raw->ext_cpuid[6][2]) & 0xff;\n\t\t\n\t\tl3_result = (raw->ext_cpuid[6][3] >> 18);\n\t\tif (l3_result > 0) {\n\t\t\tl3_result = 512 * l3_result; /* AMD spec says it's a range,\n\t\t\t but we take the lower bound */\n\t\t\tdata->l3_cache = l3_result;\n\t\t\tdata->l3_assoc = assoc_table[(raw->ext_cpuid[6][3] >> 12) & 0xf];\n\t\t\tdata->l3_cacheline = (raw->ext_cpuid[6][3]) & 0xff;\n\t\t} else {\n\t\t\tdata->l3_cache = 0;\n\t\t}\n\t}\n}\n\nstatic void decode_amd_number_of_cores(struct cpu_raw_data_t* raw, struct cpu_id_t* data)\n{\n\tint logical_cpus = -1, num_cores = -1;\n\t\n\tif (raw->basic_cpuid[0][0] >= 1) {\n\t\tlogical_cpus = (raw->basic_cpuid[1][1] >> 16) & 0xff;\n\t\tif (raw->ext_cpuid[0][0] >= 8) {\n\t\t\tnum_cores = 1 + (raw->ext_cpuid[8][2] & 0xff);\n\t\t}\n\t}\n\tif (data->flags[CPU_FEATURE_HT]) {\n\t\tif (num_cores > 1) {\n\t\t\tif (data->ext_family >= 23)\n\t\t\t\tnum_cores /= 2; // e.g., Ryzen 7 reports 16 \"real\" cores, but they are really just 8.\n\t\t\tdata->num_cores = num_cores;\n\t\t\tdata->num_logical_cpus = logical_cpus;\n\t\t} else {\n\t\t\tdata->num_cores = 1;\n\t\t\tdata->num_logical_cpus = (logical_cpus >= 2 ? logical_cpus : 2);\n\t\t}\n\t} else {\n\t\tdata->num_cores = data->num_logical_cpus = 1;\n\t}\n}\n\nstatic int amd_has_turion_modelname(const char *bs)\n{\n\t/* We search for something like TL-60. Ahh, I miss regexes...*/\n\tint i, l, k;\n\tchar code[3] = {0};\n\tconst char* codes[] = { \"ML\", \"MT\", \"MK\", \"TK\", \"TL\", \"RM\", \"ZM\", \"\" };\n\tl = (int) strlen(bs);\n\tfor (i = 3; i < l - 2; i++) {\n\t\tif (bs[i] == '-' &&\n\t\t isupper(bs[i-1]) && isupper(bs[i-2]) && !isupper(bs[i-3]) &&\n\t\t isdigit(bs[i+1]) && isdigit(bs[i+2]) && !isdigit(bs[i+3]))\n\t\t{\n\t\t\tcode[0] = bs[i-2];\n\t\t\tcode[1] = bs[i-1];\n\t\t\tfor (k = 0; codes[k][0]; k++)\n\t\t\t\tif (!strcmp(codes[k], code)) return 1;\n\t\t}\n\t}\n\treturn 0;\n}\n\nstatic struct amd_code_and_bits_t decode_amd_codename_part1(const char *bs)\n{\n\tamd_code_t code = NC;\n\tuint64_t bits = 0;\n\tstruct amd_code_and_bits_t result;\n\n\tif (strstr(bs, \"Dual Core\") ||\n\t strstr(bs, \"Dual-Core\") ||\n\t strstr(bs, \" X2 \"))\n\t\tbits |= _X2;\n\tif (strstr(bs, \" X4 \")) bits |= _X4;\n\tif (strstr(bs, \" X3 \")) bits |= _X3;\n\tif (strstr(bs, \"Opteron\")) bits |= OPTERON_;\n\tif (strstr(bs, \"Phenom\")) {\n\t\tcode = (strstr(bs, \"II\")) ? PHENOM2 : PHENOM;\n\t}\n\tif (amd_has_turion_modelname(bs)) {\n\t\tbits |= TURION_;\n\t}\n\tif (strstr(bs, \"Athlon(tm)\")) bits |= ATHLON_;\n\tif (strstr(bs, \"Sempron(tm)\")) bits |= SEMPRON_;\n\tif (strstr(bs, \"Duron\")) bits |= DURON_;\n\tif (strstr(bs, \" 64 \")) bits |= _64_;\n\tif (strstr(bs, \" FX\")) bits |= _FX;\n\tif (strstr(bs, \" MP\")) bits |= _MP_;\n\tif (strstr(bs, \"Athlon(tm) 64\") || strstr(bs, \"Athlon(tm) II X\") || match_pattern(bs, \"Athlon(tm) X#\")) {\n\t\tbits |= ATHLON_ | _64_;\n\t}\n\tif (strstr(bs, \"Turion\")) bits |= TURION_;\n\t\n\tif (strstr(bs, \"mobile\") || strstr(bs, \"Mobile\")) {\n\t\tbits |= MOBILE_;\n\t}\n\t\n\tif (strstr(bs, \"XP\")) bits |= _XP_;\n\tif (strstr(bs, \"XP-M\")) bits |= _M_;\n\tif (strstr(bs, \"(LV)\")) bits |= _LV_;\n\tif (strstr(bs, \" APU \")) bits |= _APU_;\n\n\tif (match_pattern(bs, \"C-##\")) code = FUSION_C;\n\tif (match_pattern(bs, \"E-###\")) code = FUSION_E;\n\tif (match_pattern(bs, \"Z-##\")) code = FUSION_Z;\n\tif (match_pattern(bs, \"[EA]#-####\")) code = FUSION_EA;\n\n\tresult.code = code;\n\tresult.bits = bits;\n\treturn result;\n}\n\nstatic int decode_amd_ryzen_model_code(const char* bs)\n{\n\tconst struct {\n\t\tint model_code;\n\t\tconst char* match_str;\n\t} patterns[] = {\n\t\t{ _1600, \"1600\" },\n\t\t{ _1500, \"1500\" },\n\t\t{ _1400, \"1400\" },\n\t};\n\tint i;\n\n\tfor (i = 0; i < COUNT_OF(patterns); i++)\n\t\tif (strstr(bs, patterns[i].match_str))\n\t\t\treturn patterns[i].model_code;\n\t//\n\treturn 0;\n}\n\nstatic void decode_amd_codename(struct cpu_raw_data_t* raw, struct cpu_id_t* data, struct internal_id_info_t* internal)\n{\n\tstruct amd_code_and_bits_t code_and_bits = decode_amd_codename_part1(data->brand_str);\n\tint i = 0;\n\tchar* code_str = NULL;\n\tint model_code;\n\n\tfor (i = 0; i < COUNT_OF(amd_code_str); i++) {\n\t\tif (code_and_bits.code == amd_code_str[i].code) {\n\t\t\tcode_str = amd_code_str[i].str;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif (/*code == ATHLON_64_X2*/ match_all(code_and_bits.bits, ATHLON_|_64_|_X2) && data->l2_cache < 512) {\n\t\tcode_and_bits.bits &= ~(ATHLON_ | _64_);\n\t\tcode_and_bits.bits |= SEMPRON_;\n\t}\n\tif (code_str)\n\t\tdebugf(2, \"Detected AMD brand code: %d (%s)\\n\", code_and_bits.code, code_str);\n\telse\n\t\tdebugf(2, \"Detected AMD brand code: %d\\n\", code_and_bits.code);\n\n\tif (code_and_bits.bits) {\n\t\tdebugf(2, \"Detected AMD bits: \");\n\t\tdebug_print_lbits(2, code_and_bits.bits);\n\t}\n\t// is it Ryzen? if so, we need to detect discern between the four-core 1400/1500 (Ryzen 5) and the four-core Ryzen 3:\n\tmodel_code = (data->ext_family == 23) ? decode_amd_ryzen_model_code(data->brand_str) : 0;\n\n\tinternal->code.amd = code_and_bits.code;\n\tinternal->bits = code_and_bits.bits;\n\tinternal->score = match_cpu_codename(cpudb_amd, COUNT_OF(cpudb_amd), data, code_and_bits.code,\n\t code_and_bits.bits, model_code);\n}\n\nint cpuid_identify_amd(struct cpu_raw_data_t* raw, struct cpu_id_t* data, struct internal_id_info_t* internal)\n{\n\tload_amd_features(raw, data);\n\tdecode_amd_cache_info(raw, data);\n\tdecode_amd_number_of_cores(raw, data);\n\tdecode_amd_codename(raw, data, internal);\n\treturn 0;\n}\n\nvoid cpuid_get_list_amd(struct cpu_list_t* list)\n{\n\tgeneric_get_cpu_list(cpudb_amd, COUNT_OF(cpudb_amd), list);\n}\n"} +{"text": "/*\n * Copyright Beijing 58 Information Technology Co.,Ltd.\n *\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n/*\n * Written by Doug Lea with assistance from members of JCP JSR-166\n * Expert Group and released to the public domain, as explained at\n * http://creativecommons.org/licenses/publicdomain\n */\n\npackage com.bj58.spat.gaea.server.util.jsr166;\n\nimport java.util.Random;\n\n/**\n * A random number generator isolated to the current thread. Like the\n * global {@link java.util.Random} generator used by the {@link\n * java.lang.Math} class, a {@code ThreadLocalRandom} is initialized\n * with an internally generated seed that may not otherwise be\n * modified. When applicable, use of {@code ThreadLocalRandom} rather\n * than shared {@code Random} objects in concurrent programs will\n * typically encounter much less overhead and contention. Use of\n * {@code ThreadLocalRandom} is particularly appropriate when multiple\n * tasks (for example, each a {@link ForkJoinTask}) use random numbers\n * in parallel in thread pools.\n *\n * <p>Usages of this class should typically be of the form:\n * {@code ThreadLocalRandom.current().nextX(...)} (where\n * {@code X} is {@code Int}, {@code Long}, etc).\n * When all usages are of this form, it is never possible to\n * accidently share a {@code ThreadLocalRandom} across multiple threads.\n *\n * <p>This class also provides additional commonly used bounded random\n * generation methods.\n *\n * @since 1.7\n * @author Doug Lea\n */\n@SuppressWarnings(\"all\")\npublic class ThreadLocalRandom extends Random {\n // same constants as Random, but must be redeclared because private\n private final static long multiplier = 0x5DEECE66DL;\n private final static long addend = 0xBL;\n private final static long mask = (1L << 48) - 1;\n\n /**\n * The random seed. We can't use super.seed.\n */\n private long rnd;\n\n /**\n * Initialization flag to permit the first and only allowed call\n * to setSeed (inside Random constructor) to succeed. We can't\n * allow others since it would cause setting seed in one part of a\n * program to unintentionally impact other usages by the thread.\n */\n boolean initialized;\n\n // Padding to help avoid memory contention among seed updates in\n // different TLRs in the common case that they are located near\n // each other.\n private long pad0, pad1, pad2, pad3, pad4, pad5, pad6, pad7;\n\n /**\n * The actual ThreadLocal\n */\n private static final ThreadLocal<ThreadLocalRandom> localRandom =\n new ThreadLocal<ThreadLocalRandom>() {\n protected ThreadLocalRandom initialValue() {\n return new ThreadLocalRandom();\n }\n };\n\n\n /**\n * Constructor called only by localRandom.initialValue.\n * We rely on the fact that the superclass no-arg constructor\n * invokes setSeed exactly once to initialize.\n */\n ThreadLocalRandom() {\n super();\n }\n\n /**\n * Returns the current thread's {@code ThreadLocalRandom}.\n *\n * @return the current thread's {@code ThreadLocalRandom}\n */\n public static ThreadLocalRandom current() {\n return localRandom.get();\n }\n\n /**\n * Throws {@code UnsupportedOperationException}. Setting seeds in\n * this generator is not supported.\n *\n * @throws UnsupportedOperationException always\n */\n public void setSeed(long seed) {\n if (initialized)\n throw new UnsupportedOperationException();\n initialized = true;\n rnd = (seed ^ multiplier) & mask;\n }\n\n protected int next(int bits) {\n rnd = (rnd * multiplier + addend) & mask;\n return (int) (rnd >>> (48-bits));\n }\n\n /**\n * Returns a pseudorandom, uniformly distributed value between the\n * given least value (inclusive) and bound (exclusive).\n *\n * @param least the least value returned\n * @param bound the upper bound (exclusive)\n * @throws IllegalArgumentException if least greater than or equal\n * to bound\n * @return the next value\n */\n public int nextInt(int least, int bound) {\n if (least >= bound)\n throw new IllegalArgumentException();\n return nextInt(bound - least) + least;\n }\n\n /**\n * Returns a pseudorandom, uniformly distributed value\n * between 0 (inclusive) and the specified value (exclusive).\n *\n * @param n the bound on the random number to be returned. Must be\n * positive.\n * @return the next value\n * @throws IllegalArgumentException if n is not positive\n */\n public long nextLong(long n) {\n if (n <= 0)\n throw new IllegalArgumentException(\"n must be positive\");\n // Divide n by two until small enough for nextInt. On each\n // iteration (at most 31 of them but usually much less),\n // randomly choose both whether to include high bit in result\n // (offset) and whether to continue with the lower vs upper\n // half (which makes a difference only if odd).\n long offset = 0;\n while (n >= Integer.MAX_VALUE) {\n int bits = next(2);\n long half = n >>> 1;\n long nextn = ((bits & 2) == 0) ? half : n - half;\n if ((bits & 1) == 0)\n offset += n - nextn;\n n = nextn;\n }\n return offset + nextInt((int) n);\n }\n\n /**\n * Returns a pseudorandom, uniformly distributed value between the\n * given least value (inclusive) and bound (exclusive).\n *\n * @param least the least value returned\n * @param bound the upper bound (exclusive)\n * @return the next value\n * @throws IllegalArgumentException if least greater than or equal\n * to bound\n */\n public long nextLong(long least, long bound) {\n if (least >= bound)\n throw new IllegalArgumentException();\n return nextLong(bound - least) + least;\n }\n\n /**\n * Returns a pseudorandom, uniformly distributed {@code double} value\n * between 0 (inclusive) and the specified value (exclusive).\n *\n * @param n the bound on the random number to be returned. Must be\n * positive.\n * @return the next value\n * @throws IllegalArgumentException if n is not positive\n */\n public double nextDouble(double n) {\n if (n <= 0)\n throw new IllegalArgumentException(\"n must be positive\");\n return nextDouble() * n;\n }\n\n /**\n * Returns a pseudorandom, uniformly distributed value between the\n * given least value (inclusive) and bound (exclusive).\n *\n * @param least the least value returned\n * @param bound the upper bound (exclusive)\n * @return the next value\n * @throws IllegalArgumentException if least greater than or equal\n * to bound\n */\n public double nextDouble(double least, double bound) {\n if (least >= bound)\n throw new IllegalArgumentException();\n return nextDouble() * (bound - least) + least;\n }\n\n private static final long serialVersionUID = -5851777807851030925L;\n}"} +{"text": "apiVersion: v1\nkind: Template\nlabels:\n demo: coolstore-microservice\n template: gateway-pipeline\nmetadata:\n name: gateway-pipeline\nobjects:\n- apiVersion: v1\n kind: BuildConfig\n metadata:\n labels:\n build: ${PIPELINE_NAME}\n name: ${PIPELINE_NAME}\n annotations:\n pipeline.alpha.openshift.io/uses: '[{\"name\": \"coolstore-gw-pre\", \"namespace\": \"${DEV_PROJECT}\", \"kind\": \"BuildConfig\"},{\"name\": \"coolstore-gw-pre\", \"namespace\": \"${DEV_PROJECT}\", \"kind\": \"DeploymentConfig\"},,{\"name\": \"coolstore-gw\", \"namespace\": \"${DEV_PROJECT}\", \"kind\": \"DeploymentConfig\"}]'\n spec:\n runPolicy: Serial\n strategy:\n jenkinsPipelineStrategy:\n jenkinsfile: |-\n node('maven') {\n stage('build') {\n print 'Building'\n openshiftBuild(buildConfig: 'coolstore-gw-pre', namespace: '${DEV_PROJECT}', showBuildLogs: 'true')\n }\n stage('stage-green') {\n print 'Staging - GREEN Deployment'\n openshiftDeploy(deploymentConfig: 'coolstore-gw-pre', namespace: '${DEV_PROJECT}' )\n }\n stage ('promotionCheck') {\n def userInput = input( id: 'userInput', message: 'Is this build staging ready?', parameters: [ [$class: 'TextParameterDefinition', defaultValue: 'Good to go', description: 'Comments and notes?', name: 'comments'] ])\n print 'promotionCheck'\n openshiftTag(namespace: '${DEV_PROJECT}', sourceStream: 'coolstore-gwgreen', sourceTag: 'latest', destinationStream: 'coolstore-gw', destinationTag: 'latest')\n }\n stage('stage-blue') {\n print 'Staging - BLUE Deployment'\n openshiftDeploy(deploymentConfig: 'coolstore-gw', namespace: '${DEV_PROJECT}')\n }\n }\n type: JenkinsPipeline\n triggers:\n - github:\n secret: ${GITHUB_WEBHOOK_SECRET}\n type: GitHub\n - generic:\n secret: ${GENERIC_WEBHOOK_SECRET}\n type: Generic\nparameters:\n- description: The name for the pipeline.\n displayName: Pipeline Name\n name: PIPELINE_NAME\n required: true\n value: gateway-pipeline\n- description: DEV project name containting the buildconfigs\n displayName: DEV Project Name\n name: DEV_PROJECT\n required: true\n value: coolstore\n- description: GitHub webhook secret\n displayName: GitHub Webhook Secret\n from: '[a-zA-Z0-9]{8}'\n generate: expression\n name: GITHUB_WEBHOOK_SECRET\n required: true\n- description: Generic webhook secret\n displayName: Generic Webhook Secret\n from: '[a-zA-Z0-9]{8}'\n generate: expression\n name: GENERIC_WEBHOOK_SECRET\n required: true\n"} +{"text": "package fuse.geolocation;\nimport android.location.Location;\nimport android.location.LocationManager;\nimport com.foreign.Uno.Action_Object;\n\npublic class UpdateListener implements android.location.LocationListener{\n\n Action_Object _onLocationChanged;\n\n public UpdateListener(Action_Object onLocationChanged)\n {\n _onLocationChanged = onLocationChanged;\n }\n\n public void\tonLocationChanged(Location location)\n {\n _onLocationChanged.run(location);\n }\n\n public void\tonProviderDisabled(String provider)\n {\n }\n\n public void\tonProviderEnabled(String provider)\n {\n }\n\n public void\tonStatusChanged(String provider, int status, android.os.Bundle extras)\n {\n }\n}\n"} +{"text": "# Copyright (C) 2018 Google Inc.\n#\n# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n\nload(\"@io_bazel_rules_go//go:def.bzl\", \"go_binary\", \"go_library\")\n\ngo_library(\n name = \"go_default_library\",\n srcs = [\"main.go\"],\n importpath = \"github.com/google/gapid/cmd/make-debuggable\",\n visibility = [\"//visibility:private\"],\n deps = [\n \"//core/app:go_default_library\",\n \"//core/log:go_default_library\",\n \"//core/os/android/apk:go_default_library\",\n \"//core/os/file:go_default_library\",\n ],\n)\n\ngo_binary(\n name = \"make-debuggable\",\n embed = [\":go_default_library\"],\n visibility = [\"//visibility:public\"],\n)\n"} +{"text": "import Foundation\n\npublic final class Atomic<T> {\n private var lock: pthread_mutex_t\n private var value: T\n \n public init(value: T) {\n self.lock = pthread_mutex_t()\n self.value = value\n \n pthread_mutex_init(&self.lock, nil)\n }\n \n deinit {\n pthread_mutex_destroy(&self.lock)\n }\n \n public func with<R>(_ f: (T) -> R) -> R {\n pthread_mutex_lock(&self.lock)\n let result = f(self.value)\n pthread_mutex_unlock(&self.lock)\n \n return result\n }\n \n public func modify(_ f: (T) -> T) -> T {\n pthread_mutex_lock(&self.lock)\n let result = f(self.value)\n self.value = result\n pthread_mutex_unlock(&self.lock)\n \n return result\n }\n \n public func swap(_ value: T) -> T {\n pthread_mutex_lock(&self.lock)\n let previous = self.value\n self.value = value\n pthread_mutex_unlock(&self.lock)\n \n return previous\n }\n}\n"} +{"text": "<?xml version='1.0'?>\n<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"\n xmlns:d=\"http://docbook.org/ns/docbook\"\nxmlns:doc=\"http://nwalsh.com/xsl/documentation/1.0\"\n xmlns:xlink=\"http://www.w3.org/1999/xlink\"\n exclude-result-prefixes=\"doc d\"\n version='1.0'>\n\n<!-- ********************************************************************\n $Id: pi.xsl 8394 2009-04-02 20:31:30Z mzjn $\n ********************************************************************\n\n This file is part of the XSL DocBook Stylesheet distribution.\n See ../README or http://docbook.sf.net/release/xsl/current/ for\n copyright and other information.\n\n ******************************************************************** -->\n\n<doc:reference xmlns=\"\"><info><title>HTML Processing Instruction Reference</title>\n <releaseinfo role=\"meta\">\n $Id: pi.xsl 8394 2009-04-02 20:31:30Z mzjn $\n </releaseinfo>\n </info>\n <partintro xml:id=\"partintro\">\n <title>Introduction</title>\n <para>This is generated reference documentation for all\n user-specifiable processing instructions (PIs) in the DocBook\n XSL stylesheets for HTML output.\n <note>\n <para>You add these PIs at particular points in a document to\n cause specific “exceptions” to formatting/output behavior. To\n make global changes in formatting/output behavior across an\n entire document, it’s better to do it by setting an\n appropriate stylesheet parameter (if there is one).</para>\n </note>\n </para>\n </partintro>\n</doc:reference>\n\n<!-- ==================================================================== -->\n\n<doc:pi name=\"dbhtml_background-color\" xmlns=\"\">\n <refpurpose>Sets background color for an image</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbhtml background-color</tag> PI before or\n after an image (<tag>graphic</tag>, <tag>inlinegraphic</tag>,\n <tag>imagedata</tag>, or <tag>videodata</tag> element) as a\n sibling to the element, to set a background color for the\n image.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml background-color=\"<replaceable>color</replaceable>\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>background-color=\"<replaceable>color</replaceable>\"</term>\n <listitem>\n <para>An HTML color value</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"BGcolor.html\"\n >Background color</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_background-color\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'background-color'\"/>\n </xsl:call-template>\n</xsl:template>\n\n<doc:pi name=\"dbhtml_bgcolor\" xmlns=\"\">\n <refpurpose>Sets background color on a CALS table row or table cell</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbhtml bgcolor</tag> PI as child of a CALS table row\n or cell to set a background color for that table row or cell.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml bgcolor=\"<replaceable>color</replaceable>\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>bgcolor=\"<replaceable>color</replaceable>\"</term>\n <listitem>\n <para>An HTML color value</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"BGtableColor.html#CellBGColor\"\n >Cell background color</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_bgcolor\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'bgcolor'\"/>\n </xsl:call-template>\n</xsl:template>\n\n<doc:pi name=\"dbhtml_cellpadding\" xmlns=\"\">\n <refpurpose>Specifies cellpadding in CALS table or qandaset output</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbhtml cellpadding</tag> PI as a child of a\n CALS <tag>table</tag> or <tag>qandaset</tag> to specify the value\n for the HTML <literal>cellpadding</literal> attribute in the\n output HTML table.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml cellpadding=\"<replaceable>number</replaceable>\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>cellpadding=\"<replaceable>number</replaceable>\"</term>\n <listitem>\n <para>Specifies the cellpadding</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"params\">\n <para><parameter>html.cellpadding</parameter></para>\n </refsee>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"CellSpacing.html\"\n >Cell spacing and cell padding</link>,\n <link role=\"tcg\" xlink:href=\"QandAformat.html\"\n >Q and A formatting</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_cellpadding\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'cellpadding'\"/>\n </xsl:call-template>\n</xsl:template>\n\n<doc:pi name=\"dbhtml_cellspacing\" xmlns=\"\">\n <refpurpose>Specifies cellspacing in CALS table or qandaset output</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbhtml cellspacing</tag> PI as a child of a\n CALS <tag>table</tag> or <tag>qandaset</tag> to specify the value\n for the HTML <literal>cellspacing</literal> attribute in the\n output HTML table.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml cellspacing=\"<replaceable>number</replaceable>\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>cellspacing=\"<replaceable>number</replaceable>\"</term>\n <listitem>\n <para>Specifies the cellspacing</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"params\">\n <para><parameter>html.cellspacing</parameter></para>\n </refsee>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"CellSpacing.html\"\n >Cell spacing and cell padding</link>,\n <link role=\"tcg\"\n xlink:href=\"QandAformat.html\"\n >Q and A formatting</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_cellspacing\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'cellspacing'\"/>\n </xsl:call-template>\n</xsl:template>\n\n<doc:pi name=\"dbhtml_class\" xmlns=\"\">\n <refpurpose>Set value of the class attribute for a CALS table row</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbhtml class</tag> PI as a child of a\n <tag>row</tag> to specify a <literal>class</literal>\n attribute and value in the HTML output for that row.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml class=\"<replaceable>name</replaceable>\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>class=\"<replaceable>name</replaceable>\"</term>\n <listitem>\n <para>Specifies the class name</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"CSSTableCells.html\"\n >Table styles in HTML output</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_class\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'class'\"/>\n </xsl:call-template>\n</xsl:template> \n\n<doc:pi name=\"dbhtml_dir\" xmlns=\"\">\n <refpurpose>Specifies a directory name in which to write files</refpurpose>\n <refdescription>\n <para>When chunking output, use the <tag class=\"xmlpi\">dbhtml dir</tag> PI\n as a child of a chunk source to cause the output of that\n chunk to be written to the specified directory; also, use it\n as a child of a <tag>mediaobject</tag> to specify a\n directory into which any long-description files for that\n <tag>mediaobject</tag> will be written.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml dir=\"<replaceable>path</replaceable>\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>dir=\"<replaceable>path</replaceable>\"</term>\n <listitem>\n <para>Specifies the pathname for the directory</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"params\">\n <para><parameter>base.dir</parameter></para>\n </refsee>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"Chunking.html#dbhtmlDirPI\"\n >dbhtml dir processing instruction</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_dir\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'dir'\"/>\n </xsl:call-template>\n</xsl:template>\n\n<doc:pi name=\"dbhtml_filename\" xmlns=\"\">\n <refpurpose>Specifies a filename for a chunk</refpurpose>\n <refdescription>\n <para>When chunking output, use the <tag class=\"xmlpi\">dbhtml filename</tag>\n PI as a child of a chunk source to specify a filename for\n the output file for that chunk.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml filename=\"<replaceable>filename</replaceable>\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>filename=\"<replaceable>path</replaceable>\"</term>\n <listitem>\n <para>Specifies the filename for the file</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"params\">\n <para><parameter>use.id.as.filename</parameter></para>\n </refsee>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"Chunking.html#DbhtmlFilenames\"\n >dbhtml filenames</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_filename\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'filename'\"/>\n </xsl:call-template>\n</xsl:template>\n\n<doc:pi name=\"dbhtml_funcsynopsis-style\" xmlns=\"\">\n <refpurpose>Specifies presentation style for a funcsynopsis</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbhtml funcsynopsis-style</tag> PI as a child of\n a <tag>funcsynopsis</tag> or anywhere within a funcsynopsis\n to control the presentation style for output of all\n <tag>funcprototype</tag> instances within that funcsynopsis.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml funcsynopsis-style=\"kr\"|\"ansi\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>funcsynopsis-style=\"kr\"</term>\n <listitem>\n <para>Displays <tag>funcprototype</tag> output in K&amp;R style</para>\n </listitem>\n </varlistentry>\n <varlistentry><term>funcsynopsis-style=\"ansi\"</term>\n <listitem>\n <para>Displays <tag>funcprototype</tag> output in ANSI style</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"params\">\n <para><parameter>funcsynopsis.style</parameter></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_funcsynopsis-style\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'funcsynopsis-style'\"/>\n </xsl:call-template>\n</xsl:template>\n\n<doc:pi name=\"dbhtml_img.src.path\" xmlns=\"\">\n <refpurpose>Specifies a path to the location of an image file</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbhtml img.src.path</tag> PI before or\n after an image (<tag>graphic</tag>,\n <tag>inlinegraphic</tag>, <tag>imagedata</tag>, or\n <tag>videodata</tag> element) as a sibling to the element,\n to specify a path to the location of the image; in HTML\n output, the value specified for the\n <code>img.src.path</code> attribute is prepended to the\n filename.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml img.src.path=\"<replaceable>path</replaceable>\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>img.src.path=\"<replaceable>path</replaceable>\"</term>\n <listitem>\n <para>Specifies the pathname to prepend to the name of the image file</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"params\">\n <para><parameter>img.src.path</parameter></para>\n </refsee>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"GraphicsLocations.html#UsingFileref\"\n >Using fileref</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_img.src.path\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'img.src.path'\"/>\n </xsl:call-template>\n</xsl:template>\n\n<doc:pi name=\"dbhtml_label-width\" xmlns=\"\">\n <refpurpose>Specifies the label width for a qandaset</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbhtml label-width</tag> PI as a child of a\n <tag>qandaset</tag> to specify the width of labels.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml label-width=\"<replaceable>width</replaceable>\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>label-width=\"<replaceable>width</replaceable>\"</term>\n <listitem>\n <para>Specifies the label width (including units)</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"QandAformat.html\"\n >Q and A formatting</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_label-width\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'label-width'\"/>\n </xsl:call-template>\n</xsl:template> \n\n<doc:pi name=\"dbhtml_linenumbering.everyNth\" xmlns=\"\">\n <refpurpose>Specifies interval for line numbers in verbatims</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbhtml linenumbering.everyNth</tag> PI as a child\n of a “verbatim” element – <tag>programlisting</tag>,\n <tag>screen</tag>, <tag>synopsis</tag> — to specify\n the interval at which lines are numbered.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml linenumbering.everyNth=\"<replaceable>N</replaceable>\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>linenumbering.everyNth=\"<replaceable>N</replaceable>\"</term>\n <listitem>\n <para>Specifies numbering interval; a number is output\n before every <replaceable>N</replaceable>th line</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"params\">\n <para><parameter>linenumbering.everyNth</parameter></para>\n </refsee>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"AnnotateListing.html#LineNumbering\"\n >Line numbering</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_linenumbering.everyNth\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'linenumbering.everyNth'\"/>\n </xsl:call-template>\n</xsl:template>\n\n<doc:pi name=\"dbhtml_linenumbering.separator\" xmlns=\"\">\n <refpurpose>Specifies separator text for line numbers in verbatims</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbhtml linenumbering.separator</tag> PI as a child\n of a “verbatim” element – <tag>programlisting</tag>,\n <tag>screen</tag>, <tag>synopsis</tag> — to specify\n the separator text output between the line numbers and content.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml linenumbering.separator=\"<replaceable>text</replaceable>\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>linenumbering.separator=\"<replaceable>text</replaceable>\"</term>\n <listitem>\n <para>Specifies the text (zero or more characters)</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"params\">\n <para><parameter>linenumbering.separator</parameter></para>\n </refsee>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"AnnotateListing.html#LineNumbering\"\n >Line numbering</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_linenumbering.separator\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'linenumbering.separator'\"/>\n </xsl:call-template>\n</xsl:template>\n\n<doc:pi name=\"dbhtml_linenumbering.width\" xmlns=\"\">\n <refpurpose>Specifies width for line numbers in verbatims</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbhtml linenumbering.width</tag> PI as a child\n of a “verbatim” element – <tag>programlisting</tag>,\n <tag>screen</tag>, <tag>synopsis</tag> — to specify\n the width set aside for line numbers.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml linenumbering.width=\"<replaceable>width</replaceable>\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>linenumbering.width=\"<replaceable>width</replaceable>\"</term>\n <listitem>\n <para>Specifies the width (inluding units)</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"params\">\n <para><parameter>linenumbering.width</parameter></para>\n </refsee>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"AnnotateListing.html#LineNumbering\"\n >Line numbering</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_linenumbering.width\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'linenumbering.width'\"/>\n </xsl:call-template>\n</xsl:template>\n\n<doc:pi name=\"dbhtml_list-presentation\" xmlns=\"\">\n <refpurpose>Specifies presentation style for a variablelist or\n segmentedlist</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbhtml list-presentation</tag> PI as a child of\n a <tag>variablelist</tag> or <tag>segmentedlist</tag> to\n control the presentation style for the list (to cause it, for\n example, to be displayed as a table).</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml list-presentation=\"list\"|\"table\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>list-presentation=\"list\"</term>\n <listitem>\n <para>Displays the list as a list</para>\n </listitem>\n </varlistentry>\n <varlistentry><term>list-presentation=\"table\"</term>\n <listitem>\n <para>Displays the list as a table</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"params\">\n <itemizedlist>\n <listitem>\n <para><parameter>variablelist.as.table</parameter></para>\n </listitem>\n <listitem>\n <para><parameter>segmentedlist.as.table</parameter></para>\n </listitem>\n </itemizedlist>\n </refsee>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"Variablelists.html#VarListFormatting\"\n >Variable list formatting in HTML</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_list-presentation\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'list-presentation'\"/>\n </xsl:call-template>\n</xsl:template>\n\n<doc:pi name=\"dbhtml_list-width\" xmlns=\"\">\n <refpurpose>Specifies the width of a variablelist or simplelist</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbhtml list-width</tag> PI as a child of a\n <tag>variablelist</tag> or a <tag>simplelist</tag> presented\n as a table, to specify the output width.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml list-width=\"<replaceable>width</replaceable>\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>list-width=\"<replaceable>width</replaceable>\"</term>\n <listitem>\n <para>Specifies the output width (including units)</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"Variablelists.html#VarListFormatting\"\n >Variable list formatting in HTML</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_list-width\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'list-width'\"/>\n </xsl:call-template>\n</xsl:template>\n\n<doc:pi name=\"dbhtml_row-height\" xmlns=\"\">\n <refpurpose>Specifies the height for a CALS table row</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbhtml row-height</tag> PI as a child of a\n <tag>row</tag> to specify the height of the row.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml row-height=\"<replaceable>height</replaceable>\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>row-height=\"<replaceable>height</replaceable>\"</term>\n <listitem>\n <para>Specifies the row height (including units)</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"RowHeight.html\"\n >Row height</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_row-height\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'row-height'\"/>\n </xsl:call-template>\n</xsl:template> \n\n<doc:pi name=\"dbhtml_start\" xmlns=\"\">\n <refpurpose>(obsolete) Sets the starting number on an ordered list</refpurpose>\n <refdescription>\n <para><emphasis>This PI is obsolete</emphasis>. The intent of\n this PI was to provide a means for setting a specific starting\n number for an ordered list. Instead of this PI, set a value\n for the <literal>override</literal> attribute on the first\n <tag>listitem</tag> in the list; that will have the same\n effect as what this PI was intended for.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml start=\"<replaceable>character</replaceable>\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>start=\"<replaceable>character</replaceable>\"</term>\n <listitem>\n <para>Specifies the character to use as the starting\n number; use 0-9, a-z, A-Z, or lowercase or uppercase\n Roman numerals</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"Orderedlists.html#ListStartNum\"\n >List starting number</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_start\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"pi-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'start'\"/>\n </xsl:call-template>\n</xsl:template>\n\n <doc:pi name=\"dbhtml_stop-chunking\" xmlns=\"\">\n\t<refpurpose>Do not chunk any descendants of this element.</refpurpose>\n\t<refdescription>\n <para>When generating chunked HTML output, adding this PI as the child of an element that contains elements that would normally be generated on separate pages if generating chunked output causes chunking to stop at this point. No descendants of the current element will be split into new HTML pages:\n<programlisting><![CDATA[<section>\n<title>Configuring pencil</title>\n<?dbhtml stop-chunking?>\n\n...\n\n</section>]]></programlisting>\n</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml stop-chunking</tag></synopsis>\n </refsynopsisdiv>\t\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"Chunking.html\"\n >Chunking into multiple HTML files</link></para>\n </refsee>\n </doc:pi>\n <!-- The code that handles the stop-chunking pi is in chunk-common.xsl -->\n\n<doc:pi name=\"dbhtml_table-summary\" xmlns=\"\">\n <refpurpose>Specifies summary for CALS table, variablelist, segmentedlist, or qandaset output</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbhtml table-summary</tag> PI as a child of\n a CALS <tag>table</tag>, <tag>variablelist</tag>,\n <tag>segmentedlist</tag>, or <tag>qandaset</tag> to specify\n the text for the HTML <literal>summary</literal> attribute\n in the output HTML table.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml table-summary=\"<replaceable>text</replaceable>\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>table-summary=\"<replaceable>text</replaceable>\"</term>\n <listitem>\n <para>Specifies the summary text (zero or more characters)</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"Variablelists.html#VarListFormatting\"\n >Variable list formatting in HTML</link>,\n <link role=\"tcg\" xlink:href=\"TableSummary.html\"\n >Table summary text</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_table-summary\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'table-summary'\"/>\n </xsl:call-template>\n</xsl:template>\n\n<doc:pi name=\"dbhtml_table-width\" xmlns=\"\">\n <refpurpose>Specifies the width for a CALS table</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbhtml table-width</tag> PI as a child of a\n CALS <tag>table</tag> to specify the width of the table in\n output.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml table-width=\"<replaceable>width</replaceable>\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>table-width=\"<replaceable>width</replaceable>\"</term>\n <listitem>\n <para>Specifies the table width (including units or as a percentage)</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"params\">\n <para><parameter>default.table.width</parameter></para>\n </refsee>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"Tables.html#TableWidth\"\n >Table width</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_table-width\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'table-width'\"/>\n </xsl:call-template>\n</xsl:template>\n\n<doc:pi name=\"dbhtml_term-presentation\" xmlns=\"\">\n <refpurpose>Sets character formatting for terms in a variablelist</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbhtml term-presentation</tag> PI as a child\n of a <tag>variablelist</tag> to set character formatting for\n the <tag>term</tag> output of the list.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml term-presentation=\"bold\"|\"italic\"|\"bold-italic\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>term-presentation=\"<replaceable>bold</replaceable>\"</term>\n <listitem>\n <para>Specifies that terms are displayed in bold</para>\n </listitem>\n </varlistentry>\n <varlistentry><term>term-presentation=\"<replaceable>italic</replaceable>\"</term>\n <listitem>\n <para>Specifies that terms are displayed in italic</para>\n </listitem>\n </varlistentry>\n <varlistentry><term>term-presentation=\"<replaceable>bold-italic</replaceable>\"</term>\n <listitem>\n <para>Specifies that terms are displayed in bold-italic</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"Variablelists.html#VarListFormatting\"\n >Variable list formatting in HTML</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_term-presentation\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'term-presentation'\"/>\n </xsl:call-template>\n</xsl:template>\n\n<doc:pi name=\"dbhtml_term-separator\" xmlns=\"\">\n <refpurpose>Specifies separator text among terms in a varlistentry</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbhtml term-separator</tag> PI as a child\n of a <tag>variablelist</tag> to specify the separator text\n among <tag>term</tag> instances.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml term-separator=\"<replaceable>text</replaceable>\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>term-separator=\"<replaceable>text</replaceable>\"</term>\n <listitem>\n <para>Specifies the text (zero or more characters)</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"params\">\n <para><parameter>variablelist.term.separator</parameter></para>\n </refsee>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"Variablelists.html#VarListFormatting\"\n >Variable list formatting in HTML</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_term-separator\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'term-separator'\"/>\n </xsl:call-template>\n</xsl:template>\n\n<doc:pi name=\"dbhtml_term-width\" xmlns=\"\">\n <refpurpose>Specifies the term width for a variablelist</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbhtml term-width</tag> PI as a child of a\n <tag>variablelist</tag> to specify the width for\n <tag>term</tag> output.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml term-width=\"<replaceable>width</replaceable>\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>term-width=\"<replaceable>width</replaceable>\"</term>\n <listitem>\n <para>Specifies the term width (including units)</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"Variablelists.html#VarListFormatting\"\n >Variable list formatting in HTML</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_term-width\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'term-width'\"/>\n </xsl:call-template>\n</xsl:template>\n\n<doc:pi name=\"dbhtml_toc\" xmlns=\"\">\n <refpurpose>Specifies whether a TOC should be generated for a qandaset</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbhtml toc</tag> PI as a child of a\n <tag>qandaset</tag> to specify whether a table of contents\n (TOC) is generated for the <tag>qandaset</tag>.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml toc=\"0\"|\"1\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>toc=\"0\"</term>\n <listitem>\n <para>If zero, no TOC is generated</para>\n </listitem>\n </varlistentry>\n <varlistentry><term>toc=\"1\"</term>\n <listitem>\n <para>If <code>1</code> (or any non-zero value),\n a TOC is generated</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"QandAtoc.html\"\n >Q and A list of questions</link>,\n <link role=\"tcg\"\n xlink:href=\"QandAformat.html\"\n >Q and A formatting</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml_toc\">\n <xsl:param name=\"node\" select=\".\"/>\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\"$node/processing-instruction('dbhtml')\"/>\n <xsl:with-param name=\"attribute\" select=\"'toc'\"/>\n </xsl:call-template>\n</xsl:template>\n\n<doc:pi name=\"dbcmdlist\" xmlns=\"\">\n <refpurpose>Generates a hyperlinked list of commands</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbcmdlist</tag> PI as the child of any\n element (for example, <tag>refsynopsisdiv</tag>) containing multiple\n <tag>cmdsynopsis</tag> instances; a hyperlinked navigational\n “command list” will be generated at the top of output for that\n element, enabling users to quickly jump\n to each command synopsis.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbcmdlist</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <para>[No parameters]</para>\n </refparameter>\n</doc:pi>\n<xsl:template name=\"pi.dbcmdlist\">\n <xsl:variable name=\"cmdsynopses\" select=\"..//d:cmdsynopsis\"/>\n <xsl:if test=\"count($cmdsynopses)&lt;1\">\n <xsl:message><xsl:text>No cmdsynopsis elements matched dbcmdlist PI, perhaps it's nested too deep?</xsl:text>\n </xsl:message>\n </xsl:if>\n <dl>\n <xsl:call-template name=\"process.cmdsynopsis.list\">\n <xsl:with-param name=\"cmdsynopses\" select=\"$cmdsynopses\"/>\n </xsl:call-template>\n </dl>\n</xsl:template>\n\n<doc:pi name=\"dbfunclist\" xmlns=\"\">\n <refpurpose>Generates a hyperlinked list of functions</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbfunclist</tag> PI as the child of any\n element (for example, <tag>refsynopsisdiv</tag>) containing multiple\n <tag>funcsynopsis</tag> instances; a hyperlinked\n navigational “function list” will be generated at the top of\n output for that element, enabling users to quickly\n jump to to each function synopsis.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbfunclist</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <para>[No parameters]</para>\n </refparameter>\n</doc:pi>\n<xsl:template name=\"pi.dbfunclist\">\n <xsl:variable name=\"funcsynopses\" select=\"..//d:funcsynopsis\"/>\n <xsl:if test=\"count($funcsynopses)&lt;1\">\n <xsl:message><xsl:text>No funcsynopsis elements matched dbfunclist PI, perhaps it's nested too deep?</xsl:text>\n </xsl:message>\n </xsl:if>\n <dl>\n <xsl:call-template name=\"process.funcsynopsis.list\">\n <xsl:with-param name=\"funcsynopses\" select=\"$funcsynopses\"/>\n </xsl:call-template>\n </dl>\n</xsl:template>\n\n<doc:pi name=\"dbhtml-include_href\" xmlns=\"\">\n <refpurpose>Copies an external well-formed HTML/XML file into current doc</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbhtml-include href</tag> PI anywhere in a\n document to cause the contents of the file referenced by the\n <code>href</code> pseudo-attribute to be copied/inserted “as\n is” into your HTML output at the point in document order\n where the PI occurs in the source.</para>\n <note>\n <para>The referenced file may contain plain text (as long as\n it is “wrapped” in an <tag>html</tag> element — see the\n note below) or markup in any arbitrary vocabulary,\n including HTML — but it must conform to XML\n well-formedness constraints (because the feature in XSLT\n 1.0 for opening external files, the\n <function>document()</function> function, can only handle\n files that meet XML well-formedness constraints).</para>\n <para>Among other things, XML well-formedness constraints\n require a document to have <emphasis>a single root\n element</emphasis>. So if the content you want to\n include is plain text or is markup that does\n <emphasis>not</emphasis> have a single root element,\n <emphasis role=\"strong\">wrap the content in an\n <tag>html</tag> element</emphasis>. The stylesheets will\n strip out that surrounding <tag>html</tag> “wrapper” when\n they find it, leaving just the content you want to\n insert.</para>\n </note>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhtml-include href=\"<replaceable>URI</replaceable>\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>href=\"<replaceable>URI</replaceable>\"</term>\n <listitem>\n <para>Specifies the URI for the file to include; the URI\n can be, for example, a remote <literal>http:</literal>\n URI, or a local filesystem <literal>file:</literal>\n URI</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"params\">\n <para><parameter>textinsert.extension</parameter></para>\n </refsee>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"InsertExtHtml.html\"\n >Inserting external HTML code</link>,\n <link role=\"tcg\"\n xlink:href=\"ExternalCode.html\"\n >External code files</link></para>\n </refsee>\n</doc:pi>\n<xsl:template name=\"pi.dbhtml-include\">\n <xsl:param name=\"href\">\n <xsl:call-template name=\"dbhtml-attribute\">\n <xsl:with-param name=\"pis\" select=\".\"/>\n <xsl:with-param name=\"attribute\">href</xsl:with-param>\n </xsl:call-template>\n </xsl:param>\n <xsl:choose>\n <xsl:when test=\"$href != ''\">\n <xsl:variable name=\"content\" select=\"document($href,/)\"/>\n <xsl:choose>\n <xsl:when test=\"$content/*\">\n <xsl:choose>\n <xsl:when test=\"$content/*[1][self::d:html]\">\n <!-- include just the children of html wrapper -->\n <xsl:copy-of select=\"$content/*[1]/node()\"/>\n </xsl:when>\n <xsl:otherwise>\n <xsl:copy-of select=\"$content\"/>\n </xsl:otherwise>\n </xsl:choose>\n </xsl:when>\n <xsl:otherwise>\n <xsl:message>\n <xsl:text>ERROR: dbhtml-include processing instruction </xsl:text>\n <xsl:text>href has no content.</xsl:text>\n </xsl:message>\n </xsl:otherwise>\n </xsl:choose>\n </xsl:when>\n <xsl:otherwise>\n <xsl:message>\n <xsl:text>ERROR: dbhtml-include processing instruction has </xsl:text>\n <xsl:text>missing or empty href value.</xsl:text>\n </xsl:message>\n </xsl:otherwise>\n </xsl:choose>\n</xsl:template>\n\n<!-- There are two templates matching this PI in htmlhelp-common.xsl -->\n<doc:pi name=\"dbhh\" xmlns=\"\">\n <refpurpose>Sets topic name and topic id for context-sensitive HTML Help</refpurpose>\n <refdescription>\n <para>Use the <tag class=\"xmlpi\">dbhh</tag> PI as a child of components\n that should be used as targets for context-sensitive help requests.</para>\n </refdescription>\n <refsynopsisdiv>\n <synopsis><tag class=\"xmlpi\">dbhh topicname=\"<replaceable>name</replaceable>\" topicid=\"<replaceable>id</replaceable>\"</tag></synopsis>\n </refsynopsisdiv>\n <refparameter>\n <variablelist>\n <varlistentry><term>topicname=\"<replaceable>name</replaceable>\"</term>\n <listitem>\n <para>Specifies a unique string constant that identifies a help topic</para>\n </listitem>\n </varlistentry>\n <varlistentry><term>topicid=\"<replaceable>id</replaceable>\"</term>\n <listitem>\n <para>Specifies a unique integer value for the <literal>topicname</literal> string</para>\n </listitem>\n </varlistentry>\n </variablelist>\n </refparameter>\n <refsee role=\"tcg\">\n <para><link role=\"tcg\"\n xlink:href=\"HtmlHelp.html#HHContextHelp\"\n >Context-sensitive help</link></para>\n </refsee>\n</doc:pi>\n\n<!-- ==================================================================== -->\n\n<xsl:template name=\"dbhtml-attribute\">\n <!-- * dbhtml-attribute is an interal utility template for retrieving -->\n <!-- * pseudo-attributes/parameters from PIs -->\n <xsl:param name=\"pis\" select=\"processing-instruction('dbhtml')\"/>\n <xsl:param name=\"attribute\">filename</xsl:param>\n <xsl:call-template name=\"pi-attribute\">\n <xsl:with-param name=\"pis\" select=\"$pis\"/>\n <xsl:with-param name=\"attribute\" select=\"$attribute\"/>\n </xsl:call-template>\n</xsl:template>\n\n<!-- ==================================================================== -->\n\n<xsl:template match=\"processing-instruction()\">\n</xsl:template>\n\n<xsl:template match=\"processing-instruction('dbhtml')\">\n <!-- nop -->\n</xsl:template>\n\n<!-- ==================================================================== -->\n\n<xsl:template match=\"processing-instruction('dbcmdlist')\">\n <xsl:call-template name=\"pi.dbcmdlist\"/>\n</xsl:template>\n<xsl:template name=\"process.cmdsynopsis.list\">\n <xsl:param name=\"cmdsynopses\"/><!-- empty node list by default -->\n <xsl:param name=\"count\" select=\"1\"/>\n\n <xsl:choose>\n <xsl:when test=\"$count>count($cmdsynopses)\"></xsl:when>\n <xsl:otherwise>\n <xsl:variable name=\"cmdsyn\" select=\"$cmdsynopses[$count]\"/>\n\n <dt>\n <a>\n <xsl:attribute name=\"href\">\n <xsl:text>#</xsl:text>\n <xsl:call-template name=\"object.id\">\n <xsl:with-param name=\"object\" select=\"$cmdsyn\"/>\n </xsl:call-template>\n </xsl:attribute>\n\n <xsl:choose>\n <xsl:when test=\"$cmdsyn/@xreflabel\">\n <xsl:call-template name=\"xref.xreflabel\">\n <xsl:with-param name=\"target\" select=\"$cmdsyn\"/>\n </xsl:call-template>\n </xsl:when>\n <xsl:otherwise>\n <xsl:apply-templates select=\"$cmdsyn\" mode=\"xref-to\">\n <xsl:with-param name=\"target\" select=\"$cmdsyn\"/>\n </xsl:apply-templates>\n </xsl:otherwise>\n </xsl:choose>\n </a>\n </dt>\n\n <xsl:call-template name=\"process.cmdsynopsis.list\">\n <xsl:with-param name=\"cmdsynopses\" select=\"$cmdsynopses\"/>\n <xsl:with-param name=\"count\" select=\"$count+1\"/>\n </xsl:call-template>\n </xsl:otherwise>\n </xsl:choose>\n</xsl:template>\n\n<!-- ==================================================================== -->\n\n<xsl:template match=\"processing-instruction('dbfunclist')\">\n <xsl:call-template name=\"pi.dbfunclist\"/>\n</xsl:template>\n<xsl:template name=\"process.funcsynopsis.list\">\n <xsl:param name=\"funcsynopses\"/><!-- empty node list by default -->\n <xsl:param name=\"count\" select=\"1\"/>\n\n <xsl:choose>\n <xsl:when test=\"$count>count($funcsynopses)\"></xsl:when>\n <xsl:otherwise>\n <xsl:variable name=\"cmdsyn\" select=\"$funcsynopses[$count]\"/>\n\n <dt>\n <a>\n <xsl:attribute name=\"href\">\n <xsl:text>#</xsl:text>\n <xsl:call-template name=\"object.id\">\n <xsl:with-param name=\"object\" select=\"$cmdsyn\"/>\n </xsl:call-template>\n </xsl:attribute>\n\n <xsl:choose>\n <xsl:when test=\"$cmdsyn/@xreflabel\">\n <xsl:call-template name=\"xref.xreflabel\">\n <xsl:with-param name=\"target\" select=\"$cmdsyn\"/>\n </xsl:call-template>\n </xsl:when>\n <xsl:otherwise>\n <xsl:apply-templates select=\"$cmdsyn\" mode=\"xref-to\">\n <xsl:with-param name=\"target\" select=\"$cmdsyn\"/>\n </xsl:apply-templates>\n </xsl:otherwise>\n </xsl:choose>\n </a>\n </dt>\n\n <xsl:call-template name=\"process.funcsynopsis.list\">\n <xsl:with-param name=\"funcsynopses\" select=\"$funcsynopses\"/>\n <xsl:with-param name=\"count\" select=\"$count+1\"/>\n </xsl:call-template>\n </xsl:otherwise>\n </xsl:choose>\n</xsl:template>\n\n<!-- ==================================================================== -->\n\n<xsl:template match=\"processing-instruction('dbhtml-include')\">\n <xsl:call-template name=\"pi.dbhtml-include\"/>\n</xsl:template>\n\n<!-- ==================================================================== -->\n\n<xsl:template name=\"dbhtml-dir\">\n <xsl:param name=\"context\" select=\".\"/>\n <!-- directories are now inherited from previous levels -->\n <xsl:variable name=\"ppath\">\n <xsl:if test=\"$context/parent::*\">\n <xsl:call-template name=\"dbhtml-dir\">\n <xsl:with-param name=\"context\" select=\"$context/parent::*\"/>\n </xsl:call-template>\n </xsl:if>\n </xsl:variable>\n <xsl:variable name=\"path\">\n <xsl:call-template name=\"pi.dbhtml_dir\">\n <xsl:with-param name=\"node\" select=\"$context\"/>\n </xsl:call-template>\n </xsl:variable>\n <xsl:choose>\n <xsl:when test=\"$path = ''\">\n <xsl:if test=\"$ppath != ''\">\n <xsl:value-of select=\"$ppath\"/>\n </xsl:if>\n </xsl:when>\n <xsl:otherwise>\n <xsl:if test=\"$ppath != ''\">\n <xsl:value-of select=\"$ppath\"/>\n <xsl:if test=\"substring($ppath, string-length($ppath), 1) != '/'\">\n <xsl:text>/</xsl:text>\n </xsl:if>\n </xsl:if>\n <xsl:value-of select=\"$path\"/>\n <xsl:text>/</xsl:text>\n </xsl:otherwise>\n </xsl:choose>\n</xsl:template>\n\n</xsl:stylesheet>\n"} +{"text": ";; copyright 2003-2005 stefan kersten <steve@k-hornz.de>\n;;\n;; This program is free software; you can redistribute it and/or\n;; modify it under the terms of the GNU General Public License as\n;; published by the Free Software Foundation; either version 2 of the\n;; License, or (at your option) any later version.\n;;\n;; This program is distributed in the hope that it will be useful, but\n;; WITHOUT ANY WARRANTY; without even the implied warranty of\n;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n;; General Public License for more details.\n;;\n;; You should have received a copy of the GNU General Public License\n;; along with this program; if not, write to the Free Software\n;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301\n;; USA\n\n(eval-when-compile\n (require 'cl)\n (load \"cl-seq\" nil t)\n (require 'font-lock)\n (require 'sclang-util))\n\n(require 'sclang-interp)\n(require 'sclang-language)\n(require 'sclang-dev)\n\n(defun sclang-fill-syntax-table (table)\n ;; string\n (modify-syntax-entry ?\\\" \"\\\"\" table)\n (modify-syntax-entry ?\\' \"\\\"\" table) ; no string syntax class for single quotes\n ;; expression prefix\n (modify-syntax-entry ?~ \"'\" table)\n ;; escape\n (modify-syntax-entry ?\\\\ \"\\\\\" table)\n ;; character quote\n (modify-syntax-entry ?$ \"/\" table)\n ;; symbol\n (modify-syntax-entry ?_ \"_\" table)\n ;; symbol/punctuation\n (modify-syntax-entry ?! \".\" table)\n (modify-syntax-entry ?% \".\" table)\n (modify-syntax-entry ?& \".\" table)\n (modify-syntax-entry ?* \". 23n\" table)\n (modify-syntax-entry ?+ \".\" table)\n (modify-syntax-entry ?- \".\" table)\n (modify-syntax-entry ?/ \". 124b\" table)\n (modify-syntax-entry ?< \".\" table)\n (modify-syntax-entry ?= \".\" table)\n (modify-syntax-entry ?> \".\" table)\n (modify-syntax-entry ?? \".\" table)\n (modify-syntax-entry ?@ \".\" table)\n (modify-syntax-entry ?| \".\" table)\n ;; punctuation\n (modify-syntax-entry ?: \".\" table)\n (modify-syntax-entry ?\\; \".\" table)\n (modify-syntax-entry ?^ \".\" table)\n ;; parenthesis\n (modify-syntax-entry ?\\( \"()\" table)\n (modify-syntax-entry ?\\) \")(\" table)\n (modify-syntax-entry ?\\[ \"(]\" table)\n (modify-syntax-entry ?\\] \")[\" table)\n (modify-syntax-entry ?\\{ \"(}\" table)\n (modify-syntax-entry ?\\} \"){\" table)\n ;; comment end\n (modify-syntax-entry ?\\n \"> b\" table)\n ;; Give CR the same syntax as newline, for selective-display\n (modify-syntax-entry ?\\^m \"> b\" table)\n ;; return table\n table)\n\n(defun sclang-mode-make-menu (title)\n (easy-menu-create-menu\n title\n '(\n\t [\"Start Interpreter\"\t\tsclang-start :included (not (sclang-library-initialized-p))]\n\t [\"Restart Interpreter\"\t\tsclang-start :included (sclang-library-initialized-p)]\n\t [\"Recompile Class Library\"\tsclang-recompile :included (sclang-library-initialized-p)]\n\t [\"Stop Interpreter\"\t\tsclang-stop\t :included (sclang-get-process)]\n\t [\"Kill Interpreter\"\t\tsclang-kill\t :included (sclang-get-process)]\n\t \"-\"\n\t [\"Show Post Buffer\"\t\tsclang-show-post-buffer]\n\t [\"Clear Post Buffer\"\t\tsclang-clear-post-buffer]\n\t \"-\"\n\t [\"Switch To Workspace\"\t\tsclang-switch-to-workspace]\n\t \"-\"\n\t [\"Evaluate Region\"\t\t\tsclang-eval-region]\n\t [\"Evaluate Line\"\t\t\tsclang-eval-region-or-line]\n\t [\"Evaluate Defun\"\t\t\tsclang-eval-defun]\n\t [\"Evaluate Expression ...\"\tsclang-eval-expression]\n\t [\"Evaluate Document\"\t\tsclang-eval-document]\n\t \"-\"\n\t [\"Find Definitions ...\"\tsclang-find-definitions]\n\t [\"Find References ...\"\t\tsclang-find-references]\n\t [\"Pop Mark\"\t\t\t\tsclang-pop-definition-mark]\n\t [\"Show Method Arguments\"\tsclang-show-method-args]\n\t [\"Complete keyword\"\t\tsclang-complete-symbol]\n\t [\"Dump Interface\"\t\t\tsclang-dump-interface]\n\t [\"Dump Full Interface\"\t\tsclang-dump-full-interface]\n\t \"-\"\n\t [\"Index Help Topics\"\t\tsclang-index-help-topics]\n\t [\"Find Help ...\"\t\t\tsclang-find-help]\n\t [\"Switch to Help Browser\"\tsclang-goto-help-browser]\n\t [\"Open Help GUI\"\t\t\tsclang-open-help-gui]\n\t \"-\"\n\t [\"Run Main\"\t\t\t\tsclang-main-run]\n\t [\"Stop Main\"\t\t\t\tsclang-main-stop]\n\t [\"Show Server Panels\"\t\tsclang-show-server-panel]\n\t )))\n\n(defun sclang-fill-mode-map (map)\n ;; process control\n (define-key map \"\\C-c\\C-l\"\t\t'sclang-recompile)\n (define-key map \"\\C-c\\C-o\"\t\t'sclang-start)\n ;; post buffer control\n (define-key map \"\\C-c<\"\t\t\t'sclang-clear-post-buffer)\n (define-key map \"\\C-c>\"\t\t\t'sclang-show-post-buffer)\n ;; workspace access\n (define-key map \"\\C-c\\C-w\"\t\t'sclang-switch-to-workspace)\n ;; code evaluation\n (define-key map \"\\C-c\\C-c\"\t\t'sclang-eval-region-or-line)\n (define-key map \"\\C-c\\C-d\"\t\t'sclang-eval-region)\n (define-key map \"\\C-\\M-x\"\t\t\t'sclang-eval-defun)\n (define-key map \"\\C-c\\C-e\"\t\t'sclang-eval-expression)\n (define-key map \"\\C-c\\C-f\"\t\t'sclang-eval-document)\n ;; language information\n (define-key map \"\\C-c\\C-n\"\t\t'sclang-complete-symbol)\n (define-key map \"\\M-\\t\"\t\t\t'sclang-complete-symbol)\n (define-key map \"\\C-c:\"\t\t\t'sclang-find-definitions)\n (define-key map \"\\C-c;\"\t\t\t'sclang-find-references)\n (define-key map \"\\C-c}\"\t\t\t'sclang-pop-definition-mark)\n (define-key map \"\\C-c\\C-m\"\t\t'sclang-show-method-args)\n (define-key map \"\\C-c{\"\t\t\t'sclang-dump-full-interface)\n (define-key map \"\\C-c[\"\t\t\t'sclang-dump-interface)\n ;; documentation access\n (define-key map \"\\C-c\\C-h\"\t\t'sclang-find-help)\n (define-key map \"\\C-\\M-h\"\t\t\t'sclang-goto-help-browser)\n (define-key map \"\\C-c\\C-y\"\t\t'sclang-open-help-gui)\n (define-key map \"\\C-ch\"\t\t\t'sclang-find-help-in-gui)\n ;; language control\n (define-key map \"\\C-c\\C-r\"\t\t'sclang-main-run)\n (define-key map \"\\C-c\\C-s\"\t\t'sclang-main-stop)\n (define-key map \"\\C-c\\C-p\"\t\t'sclang-show-server-panel)\n (define-key map \"\\C-c\\C-k\"\t\t'sclang-edit-dev-source)\n ;; electric characters\n (define-key map \"}\"\t\t\t\t'sclang-electric-brace)\n (define-key map \")\"\t\t\t\t'sclang-electric-brace)\n (define-key map \"]\"\t\t\t\t'sclang-electric-brace)\n (define-key map \"/\"\t\t\t\t'sclang-electric-slash)\n (define-key map \"*\"\t\t\t\t'sclang-electric-star)\n ;; menu\n (let ((title \"SCLang\"))\n\t(define-key map [menu-bar sclang] (cons title (sclang-mode-make-menu title))))\n ;; return map\n map)\n\n;; =====================================================================\n;; font-lock support\n;; =====================================================================\n\n(defconst sclang-font-lock-keyword-list\n '(\n \"arg\"\n \"classvar\"\n \"const\"\n \"super\"\n \"this\"\n \"thisFunction\"\n \"thisFunctionDef\"\n \"thisMethod\"\n \"thisProcess\"\n \"thisThread\"\n \"var\"\n )\n \"*List of keywords to highlight in SCLang mode.\")\n\n(defconst sclang-font-lock-builtin-list\n '(\n \"false\"\n \"inf\"\n \"nil\"\n \"true\"\n )\n \"*List of builtins to highlight in SCLang mode.\")\n\n(defconst sclang-font-lock-method-list\n '(\n \"ar\"\n \"for\"\n \"forBy\"\n \"if\"\n \"ir\"\n \"kr\"\n \"tr\"\n \"loop\"\n \"while\"\n )\n \"*List of methods to highlight in SCLang mode.\")\n\n(defconst sclang-font-lock-error-list\n '(\n \"die\"\n \"error\"\n \"exit\"\n \"halt\"\n \"verboseHalt\"\n \"warn\"\n )\n \"*List of methods signalling errors or warnings.\")\n\n(defvar sclang-font-lock-class-keywords nil)\n\n(defvar sclang-font-lock-keywords-1 nil\n \"Subdued level highlighting for SCLang mode.\")\n\n(defvar sclang-font-lock-keywords-2 nil\n \"Medium level highlighting for SCLang mode.\")\n\n(defvar sclang-font-lock-keywords-3 nil\n \"Gaudy level highlighting for SCLang mode.\")\n\n(defvar sclang-font-lock-keywords nil\n \"Default expressions to highlight in SCLang mode.\")\n\n(defconst sclang-font-lock-defaults '((sclang-font-lock-keywords\n\t\t\t\t sclang-font-lock-keywords-1\n\t\t\t\t sclang-font-lock-keywords-2\n\t\t\t\t sclang-font-lock-keywords-3\n\t\t\t\t )\n\t\t\t\t nil nil\n\t\t\t\t nil\n\t\t\t\t beginning-of-defun\n\t\t\t\t ))\n\n(defun sclang-font-lock-syntactic-face (state)\n (cond ((eq (nth 3 state) ?')\n\t ;; symbol\n\t 'font-lock-constant-face)\n\t((nth 3 state)\n\t ;; string\n\t 'font-lock-string-face)\n\t((nth 4 state)\n\t ;; comment\n\t 'font-lock-comment-face)))\n\n(defun sclang-font-lock-class-keyword-matcher (limit)\n (let ((regexp (or sclang-font-lock-class-keywords\n\t\t (concat \"\\\\<\" sclang-class-name-regexp \"\\\\>\")))\n\t(case-fold-search nil))\n (re-search-forward regexp limit t)))\n\n(defun sclang-set-font-lock-keywords ()\n (setq\n ;; level 1\n sclang-font-lock-keywords-1\n (list\n ;; keywords\n (cons (regexp-opt sclang-font-lock-keyword-list'words)\n\t 'font-lock-keyword-face)\n ;; builtins\n (cons (regexp-opt sclang-font-lock-builtin-list 'words)\n\t 'font-lock-builtin-face)\n ;; pi is a special case\n (cons \"\\\\<\\\\([0-9]+\\\\(\\\\.\\\\)\\\\)pi\\\\>\" 'font-lock-builtin-face)\n ;; constants\n (cons \"\\\\s/\\\\s\\\\?.\" 'font-lock-constant-face) ; characters\n (cons (concat \"\\\\\\\\\\\\(\" sclang-symbol-regexp \"\\\\)\")\n\t 'font-lock-constant-face)\t; symbols\n )\n ;; level 2\n sclang-font-lock-keywords-2\n (append\n sclang-font-lock-keywords-1\n (list\n ;; variables\n (cons (concat \"\\\\s'\\\\(\" sclang-identifier-regexp \"\\\\)\")\n\t 'font-lock-variable-name-face) ; environment variables\n (cons (concat \"\\\\<\\\\(\" sclang-identifier-regexp \"\\\\)\\\\>:\")\t; keyword arguments\n\t 'font-lock-variable-name-face)\n ;; method definitions\n (cons sclang-method-definition-regexp\n\t (list 1 'font-lock-function-name-face))\n ;; methods\n (cons (regexp-opt sclang-font-lock-method-list 'words)\n\t 'font-lock-function-name-face)\n ;; errors\n (cons (regexp-opt sclang-font-lock-error-list 'words)\n\t 'font-lock-warning-face)\n ))\n ;; level 3\n sclang-font-lock-keywords-3\n (append\n sclang-font-lock-keywords-2\n (list\n ;; classes\n (cons 'sclang-font-lock-class-keyword-matcher 'font-lock-type-face)\n;; (cons (concat \"\\\\<\" sclang-class-name-regexp \"\\\\>\") 'font-lock-type-face)\n ))\n ;; default level\n sclang-font-lock-keywords sclang-font-lock-keywords-1\n ))\n\n(defun sclang-update-font-lock ()\n \"Update font-lock information in all sclang-mode buffers.\"\n (setq sclang-font-lock-class-keywords\n\t(and sclang-symbol-table\n\t (let* ((list (remove-if\n\t\t\t (lambda (x) (or (not (sclang-class-name-p x))\n\t\t\t\t\t (sclang-string-match \"^Meta_\" x)))\n\t\t\t sclang-symbol-table))\n\t\t ;; need to set this for large numbers of classes\n\t\t (max-specpdl-size (* (length list) 2)))\n\t (condition-case nil\n\t\t (concat \"\\\\<\\\\(?:Meta_\\\\)?\\\\(?:\" (regexp-opt list) \"\\\\)\\\\>\")\n\t\t (error nil)))))\n ;; too expensive\n ;; (dolist (buffer (buffer-list))\n ;; (with-current-buffer buffer\n ;; (and (eq major-mode 'sclang-mode)\n ;; \t (eq t (car font-lock-keywords))\n ;; \t (setq font-lock-keywords (cdr font-lock-keywords)))))\n (if (eq major-mode 'sclang-mode)\n (font-lock-fontify-buffer)))\n\n;; =====================================================================\n;; indentation\n;; =====================================================================\n\n(defcustom sclang-indent-level 4\n \"*Indentation offset for SCLang statements.\"\n :group 'sclang-mode\n :type 'integer)\n\n(defun sclang-indent-line ()\n \"Indent current line as sclang code.\nReturn the amount the indentation changed by.\"\n (let ((indent (calculate-sclang-indent))\n\tbeg shift-amt\n\t(case-fold-search nil)\n\t(pos (- (point-max) (point))))\n (beginning-of-line)\n (setq beg (point))\n (skip-chars-forward \" \\t\")\n (setq shift-amt (- indent (current-column)))\n (if (zerop shift-amt)\n\t(if (> (- (point-max) pos) (point))\n\t (goto-char (- (point-max) pos)))\n (delete-region beg (point))\n (indent-to indent)\n ;; if initial point was within line's indentation, position\n ;; after the indentation, else stay at same point in text.\n (if (> (- (point-max) pos) (point))\n\t (goto-char (- (point-max) pos))))\n shift-amt))\n\n(defun calculate-sclang-indent (&optional parse-start)\n \"Return appropriate indentation for current line as sclang code.\nReturns the column to indent to.\"\n (save-excursion\n (beginning-of-line)\n (let ((indent-point (point))\n\t (case-fold-search nil)\n\t state)\n (if parse-start\n\t (goto-char parse-start)\n\t(beginning-of-defun))\n (while (< (point) indent-point)\n\t(setq state (parse-partial-sexp (point) indent-point 0)))\n (let* ((containing-sexp (nth 1 state))\n\t (inside-string-p (nth 3 state))\n\t (inside-comment-p (nth 4 state)))\n\t(cond (inside-string-p\n\t ;; inside string: no change\n\t (current-indentation))\n\t ((integerp inside-comment-p)\n\t ;; inside comment\n\t (let ((base (if containing-sexp\n\t\t\t (save-excursion\n\t\t\t\t (goto-char containing-sexp)\n\t\t\t\t (+ (current-indentation) sclang-indent-level))\n\t\t\t 0))\n\t\t (offset (* sclang-indent-level\n\t\t\t\t(- inside-comment-p\n\t\t\t\t (if (save-excursion\n\t\t\t\t\t (back-to-indentation)\n\t\t\t\t\t (looking-at \"\\\\*/\"))\n\t\t\t\t 1 0)))))\n\t\t (+ base offset)))\n\t ((null containing-sexp)\n\t ;; top-level: no indentation\n\t 0)\n\t (t\n\t (back-to-indentation)\n\t (let ((open-paren (and (looking-at \"\\\\s)\")\n\t\t\t\t (matching-paren (char-after))))\n\t\t (indent (current-indentation)))\n\t\t (goto-char containing-sexp)\n\t\t (if (or (not open-paren) (eq open-paren (char-after)))\n\t\t (cond ((progn (beginning-of-line) (looking-at sclang-block-regexp)) 0)\n\t\t\t (open-paren (current-indentation))\n\t\t\t (t (+ (current-indentation) sclang-indent-level)))\n\t\t ;; paren mismatch: do nothing\n\t\t indent))))))))\n\n;; =====================================================================\n;; electric character commands\n;; =====================================================================\n\n(defun sclang-electric-brace (arg)\n (interactive \"*P\")\n (self-insert-command (prefix-numeric-value arg))\n (and (save-excursion\n\t (beginning-of-line)\n\t (looking-at \"\\\\s *\\\\s)\"))\n (indent-according-to-mode)))\n\n(defun sclang-electric-slash (arg)\n (interactive \"*P\")\n (let* ((char (char-before))\n\t (indent-p (or (eq char ?/)\n\t\t (eq char ?*))))\n (self-insert-command (prefix-numeric-value arg))\n (if indent-p (indent-according-to-mode))))\n\n(defun sclang-electric-star (arg)\n (interactive \"*P\")\n (let ((indent-p (eq (char-before) ?/)))\n (self-insert-command (prefix-numeric-value arg))\n (if indent-p (indent-according-to-mode))))\n\n;; =====================================================================\n;; document interface\n;; =====================================================================\n\n(defvar sclang-document-id nil)\n(defvar sclang-document-state nil)\n(defvar sclang-document-envir nil)\n\n(defvar sclang-document-counter 0)\n(defvar sclang-document-list nil)\n(defvar sclang-current-document nil\n \"Currently active document.\")\n\n(defvar sclang-document-idle-timer nil)\n\n(defconst sclang-document-property-map\n '((sclang-document-name . (prSetTitle (buffer-name)))\n (sclang-document-path . (prSetFileName (buffer-file-name)))\n (sclang-document-listener-p . (prSetIsListener (eq (current-buffer) (sclang-get-post-buffer))))\n (sclang-document-editable-p . (prSetEditable (not buffer-read-only)))\n (sclang-document-edited-p . (prSetEdited (buffer-modified-p)))))\n\n(defmacro sclang-next-document-id ()\n `(incf sclang-document-counter))\n\n(defun sclang-document-list ()\n sclang-document-list)\n\n(defun sclang-document-id (buffer)\n (cdr (assq 'sclang-document-id (buffer-local-variables buffer))))\n\n(defun sclang-document-p (buffer)\n (integerp (sclang-document-id buffer)))\n\n(defmacro with-sclang-document (buffer &rest body)\n `(when (sclang-document-p buffer)\n (with-current-buffer buffer\n ,@body)))\n\n(defun sclang-get-document (id)\n (find-if (lambda (doc) (eq id (sclang-document-id doc)))\n\t (sclang-document-list)))\n\n(defun sclang-init-document ()\n (set (make-local-variable 'sclang-document-id) (sclang-next-document-id))\n (set (make-local-variable 'sclang-document-envir) nil)\n (dolist (assoc sclang-document-property-map)\n (set (make-local-variable (car assoc)) nil))\n (pushnew (current-buffer) sclang-document-list))\n\n(defun sclang-document-update-property-1 (assoc &optional force)\n (when (consp assoc)\n (let* ((key (car assoc))\n\t (prop (cdr assoc))\n\t (prev-value (eval key))\n\t (cur-value (eval (cadr prop))))\n (when (or force (not (equal prev-value cur-value)))\n\t(set key cur-value)\n\t(sclang-perform-command-no-result\n\t 'documentSetProperty sclang-document-id\n\t (car prop) cur-value)))))\n\n(defun sclang-document-update-property (key &optional force)\n (sclang-document-update-property-1 (assq key sclang-document-property-map) force))\n\n(defun sclang-document-update-properties (&optional force)\n (dolist (assoc sclang-document-property-map)\n (sclang-document-update-property-1 assoc force)))\n\n(defun sclang-make-document ()\n (sclang-perform-command-no-result 'documentNew sclang-document-id)\n (sclang-document-update-properties t))\n\n(defun sclang-close-document (buffer)\n (with-sclang-document\n buffer\n (setq sclang-document-list (delq buffer sclang-document-list))\n (sclang-perform-command-no-result\n 'documentClosed sclang-document-id)))\n\n(defun sclang-set-current-document (buffer &optional force)\n (when (or force (not (eq buffer sclang-current-document)))\n (setq sclang-current-document buffer)\n (sclang-perform-command-no-result 'documentSetCurrent (sclang-document-id buffer))\n t))\n\n(defun sclang-document-library-startup-hook-function ()\n (dolist (buffer (sclang-document-list))\n (with-current-buffer buffer\n (sclang-make-document)))\n (sclang-set-current-document (current-buffer) t))\n\n(defun sclang-document-kill-buffer-hook-function ()\n (sclang-close-document (current-buffer)))\n\n(defun sclang-document-post-command-hook-function ()\n (when (and (sclang-library-initialized-p)\n\t (sclang-document-p (current-buffer)))\n (sclang-document-update-properties))\n (sclang-set-current-document (current-buffer)))\n\n(defun sclang-document-change-major-mode-hook-function ()\n (sclang-close-document (current-buffer)))\n\n;; =====================================================================\n;; command handlers\n;; =====================================================================\n\n(sclang-set-command-handler\n '_documentOpen\n (lambda (arg)\n (multiple-value-bind (file-name region-start region-length) arg\n (let ((buffer (get-file-buffer file-name)))\n (unless buffer\n\t (setf buffer (find-file-noselect file-name)))\n (when buffer\n\t (unless (sclang-document-p buffer)\n\t (with-current-buffer buffer (sclang-mode)))\n\t (goto-char (max (point-min) (min (point-max) region-start)))\n\t ;; TODO: how to activate region in transient-mark-mode?\n\t (sclang-document-id buffer))))))\n\n(sclang-set-command-handler\n '_documentNew\n (lambda (arg)\n (multiple-value-bind (name str make-listener) arg\n (let ((buffer (generate-new-buffer name)))\n (with-current-buffer buffer\n\t (insert str)\n\t (set-buffer-modified-p nil)\n\t (sclang-mode))\n (sclang-document-id buffer)))))\n\n(sclang-set-command-handler\n '_documentClose\n (lambda (arg)\n (let ((doc (and (integerp arg) (sclang-get-document arg))))\n (and doc (kill-buffer doc)))\n nil))\n\n(sclang-set-command-handler\n '_documentRename\n (lambda (arg)\n (multiple-value-bind (id name) arg\n (when (stringp name)\n (let ((doc (and (integerp id) (sclang-get-document id))))\n\t (when doc\n\t (with-current-buffer doc\n\t (rename-buffer name t)\n\t (sclang-document-update-property 'sclang-document-name))))))\n nil))\n\n(sclang-set-command-handler\n '_documentSetEditable\n (lambda (arg)\n (multiple-value-bind (id flag) arg\n (let ((doc (and (integerp id) (sclang-get-document id))))\n (when doc\n\t (with-current-buffer doc\n\t (setq buffer-read-only (not flag))\n\t (sclang-document-update-property 'sclang-editable-p)))))\n nil))\n\n(sclang-set-command-handler\n '_documentSwitchTo\n (lambda (arg)\n (let ((doc (and (integerp arg) (sclang-get-document arg))))\n (and doc (switch-to-buffer doc)))\n nil))\n\n(sclang-set-command-handler\n '_documentPutString\n(lambda (arg)\n (multiple-value-bind (id str) arg\n (let ((doc (and (integerp id) (sclang-get-document id))))\n (when doc\n\t (with-current-buffer doc\n\t (insert str)\n\t )\n nil)))))\n\n(sclang-set-command-handler\n '_documentPopTo\n (lambda (arg)\n (let ((doc (and (integerp arg) (sclang-get-document arg))))\n (and doc (display-buffer doc)))\n nil))\n\n;; =====================================================================\n;; sclang-mode\n;; =====================================================================\n\n(defun sclang-mode-set-local-variables ()\n (set (make-local-variable 'require-final-newline) nil)\n ;; indentation\n (set (make-local-variable 'indent-line-function)\n 'sclang-indent-line)\n (set (make-local-variable 'tab-width) 4)\n (set (make-local-variable 'indent-tabs-mode) t)\n ;; comment formatting\n (set (make-local-variable 'comment-start) \"// \")\n (set (make-local-variable 'comment-end) \"\")\n (set (make-local-variable 'comment-column) 40)\n (set (make-local-variable 'comment-start-skip) \"/\\\\*+ *\\\\|//+ *\")\n ;; \"\\\\(^\\\\|\\\\s-\\\\);?// *\")\n (set (make-local-variable 'comment-multi-line) t)\n ;; parsing and movement\n (set (make-local-variable 'parse-sexp-ignore-comments) t)\n (set (make-local-variable 'beginning-of-defun-function)\n 'sclang-beginning-of-defun)\n (set (make-local-variable 'end-of-defun-function)\n 'sclang-end-of-defun)\n ;; paragraph formatting\n ;; (set (make-local-variable 'paragraph-start) (concat \"$\\\\|\" page-delimiter))\n ;; mostly copied from c++-mode, seems to work\n (set (make-local-variable 'paragraph-start)\n \"[ \\t]*\\\\(//+\\\\|\\\\**\\\\)[ \\t]*$\\\\|^\f\")\n (set (make-local-variable 'paragraph-separate) paragraph-start)\n (set (make-local-variable 'paragraph-ignore-fill-prefix) t)\n (set (make-local-variable 'adaptive-fill-mode) t)\n (set (make-local-variable 'adaptive-fill-regexp)\n \"[ \\t]*\\\\(//+\\\\|\\\\**\\\\)[ \\t]*\\\\([ \\t]*\\\\([-|#;>*]+[ \\t]*\\\\|(?[0-9]+[.)][ \\t]*\\\\)*\\\\)\")\n ;; font lock\n (set (make-local-variable 'font-lock-syntactic-face-function)\n 'sclang-font-lock-syntactic-face)\n (set (make-local-variable 'font-lock-defaults)\n sclang-font-lock-defaults)\n ;; ---\n nil)\n\n(defvar sclang-mode-map (sclang-fill-mode-map (make-sparse-keymap))\n \"Keymap used in SuperCollider mode.\")\n\n(defvar sclang-mode-syntax-table (sclang-fill-syntax-table (make-syntax-table))\n \"Syntax table used in SuperCollider mode.\")\n\n(defcustom sclang-mode-hook nil\n \"*Hook run when entering SCLang mode.\"\n :group 'sclang-mode\n :type 'hook)\n\n(defun sclang-mode ()\n \"Major mode for editing SuperCollider language code.\n\\\\{sclang-mode-map}\n\"\n (interactive)\n (kill-all-local-variables)\n (set-syntax-table sclang-mode-syntax-table)\n (use-local-map sclang-mode-map)\n (setq mode-name \"SCLang\")\n (setq major-mode 'sclang-mode)\n (sclang-mode-set-local-variables)\n (sclang-set-font-lock-keywords)\n (sclang-init-document)\n (sclang-make-document)\n (run-hooks 'sclang-mode-hook))\n\n;; =====================================================================\n;; module initialization\n;; =====================================================================\n\n(add-to-list 'auto-mode-alist '(\"\\\\.\\\\(sc\\\\|scd\\\\)$\" . sclang-mode))\n(add-to-list 'interpreter-mode-alist '(\"sclang\" . sclang-mode))\n\n(add-hook 'sclang-library-startup-hook 'sclang-document-library-startup-hook-function)\n(add-hook 'kill-buffer-hook 'sclang-document-kill-buffer-hook-function)\n(add-hook 'post-command-hook 'sclang-document-post-command-hook-function)\n(add-hook 'change-major-mode-hook 'sclang-document-change-major-mode-hook-function)\n\n(provide 'sclang-mode)\n\n;; EOF\n"} +{"text": "function h = fast_hann(x,tau)\n% h = hann(x,tau)\n%\n% Hann window \n% alpha = 0.5; % 0.54 for Hamming\n% h = alpha + (1-alpha)*cos(pi*x(ind)/tau);\n%\n\nalpha = 0.5; % 0.54 for Hamming\nh = zeros(size(x));\nind = find(abs(x) < tau);\nh(ind) = alpha + (1-alpha)*cos(pi*x(ind)/tau);\n\nreturn;\n"} +{"text": "#pragma once\n\n// Local.\n#include <RadeonGPUAnalyzerGUI/Include/rgDataTypes.h>\n#include <ui_rgMenuPipelineStateItem.h>\n#include <RadeonGPUAnalyzerGUI/Include/Qt/rgMenuItem.h>\n\n// Forward declarations:\nclass QPushButton;\n\nclass rgMenuPipelineStateItem\n : public rgMenuItem\n{\n Q_OBJECT\n\npublic:\n explicit rgMenuPipelineStateItem(rgPipelineType pipelineType, rgMenu* pParent = nullptr);\n virtual ~rgMenuPipelineStateItem() = default;\n\n // Handler invoked when the user drags a file over.\n virtual void dragEnterEvent(QDragEnterEvent* pEvent) override;\n\n // Handler invoked when the user drops a dragged file.\n virtual void dropEvent(QDropEvent *pEvent) override;\n\n // Handler invoked when the user leaves the button.\n virtual void dragLeaveEvent(QDragLeaveEvent* pEvent);\n\n // Get a pointer to the pipeline state button within the item.\n QPushButton* GetPipelineStateButton() const;\n\n // Set the cursor to the specified type.\n void SetCursor(const QCursor& cursor);\n\n // Alter the visual style of the item if it is currently selected.\n void SetCurrent(bool isCurrent);\n\n // Get the current state.\n bool IsCurrent() const;\n\n // Simulate a click on the menu item.\n void ClickMenuItem() const;\n\nsignals:\n // A signal emitted when a PSO editor file is dragged and dropped.\n void DragAndDropExistingFile(const std::string& filePath);\n\n // Signal emitted when the pipeline state button is clicked.\n void PipelineStateButtonClicked(rgMenuPipelineStateItem* pItem);\n\nprivate slots:\n // Handler invoked when the Pipeline State button is clicked.\n void HandlePipelineStateButtonClicked(bool checked);\n\nprivate:\n // Connect signals.\n void ConnectSignals();\n\n // Set the text for the build settings item.\n void SetItemText(const std::string& itemText);\n\n // Change appearance to \"focus in\".\n void GotFocus();\n\n // Change appearance to \"focus out\".\n void LostFocus();\n\n // The Build Settings file item interface.\n Ui::rgMenuPipelineStateItem ui;\n\n // Flag to keep track of whether this item is currently selected.\n bool m_current = false;\n\n // The pipeline type.\n rgPipelineType m_pipelineType;\n};"} +{"text": "{\n \"name\": \"Theme-MagicWBAmiga\",\n \"displayName\": \"MagicWB_Amiga Theme\",\n \"description\": \"MagicWB_Amiga Theme ported from the MagicWBAmiga TextMate Theme\",\n \"version\": \"0.0.5\",\n \"publisher\": \"gerane\",\n \"engines\": {\n \"vscode\": \"^0.10.1\"\n },\n \"categories\": [\n \"Themes\"\n ],\n \"icon\": \"icon.png\",\n \"homepage\": \"https://github.com/gerane/VSCodeThemes/blob/master/gerane.Theme-MagicWB_Amiga/README.md\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/gerane/VSCodeThemes.git\"\n },\n \"contributes\": {\n \"themes\": [\n {\n \"label\": \"MagicWB_Amiga\",\n \"path\": \"./themes/MagicWB_Amiga.tmTheme\",\n \"uiTheme\": \"vs\"\n }\n ]\n }\n}\n"} +{"text": "/*!\n * \\file board-config.h\n *\n * \\brief Board configuration\n *\n * \\copyright Revised BSD License, see section \\ref LICENSE.\n *\n * \\code\n * ______ _\n * / _____) _ | |\n * ( (____ _____ ____ _| |_ _____ ____| |__\n * \\____ \\| ___ | (_ _) ___ |/ ___) _ \\\n * _____) ) ____| | | || |_| ____( (___| | | |\n * (______/|_____)_|_|_| \\__)_____)\\____)_| |_|\n * (C)2013-2017 Semtech\n *\n * ___ _____ _ ___ _ _____ ___ ___ ___ ___\n * / __|_ _/_\\ / __| |/ / __/ _ \\| _ \\/ __| __|\n * \\__ \\ | |/ _ \\ (__| ' <| _| (_) | / (__| _|\n * |___/ |_/_/ \\_\\___|_|\\_\\_| \\___/|_|_\\\\___|___|\n * embedded.connectivity.solutions===============\n *\n * \\endcode\n *\n * \\author Miguel Luis ( Semtech )\n *\n * \\author Gregory Cristian ( Semtech )\n *\n * \\author Daniel Jaeckle ( STACKFORCE )\n *\n * \\author Johannes Bruder ( STACKFORCE )\n */\n#ifndef __BOARD_CONFIG_H__\n#define __BOARD_CONFIG_H__\n#include \"gpio.h\"\n\n/*!\n * Defines the time required for the TCXO to wakeup [ms].\n */\n\n/*\nenum {\n RESET_PIN = 50,\n BUSY_PIN,\n DIO1_PIN,\n DIO2_PIN,\n DIO3_PIN,\n MOSI_PIN,\n MISO_PIN,\n SCLK_PIN,\n NSS_PIN,\n ANTPOW_PIN,\n DEVICE_SEL_PIN,\n};\n*/\n/*!\n * STM32 Pin Names\n */\n\n#define BOARD_TCXO_WAKEUP_TIME 5\n#define RADIO_NSS NSS_PIN\n#define RADIO_BUSY BUSY_PIN\n#define RADIO_DIO_1 DIO1_PIN\n\n/*!\n * Board MCU pins definitions\n */\n#define RADIO_RESET RESET_PIN\n\n#define RADIO_MOSI MOSI_PIN\n#define RADIO_MISO MISO_PIN\n#define RADIO_SCLK SCLK_PIN\n\n#define RADIO_ANT_SWITCH_POWER ANTPOW_PIN\n//#define RADIO_FREQ_SEL PA_1\n//#define RADIO_XTAL_SEL PB_0\n#define RADIO_DEVICE_SEL DEVICE_SEL_PIN\n\n//#define LED_1 PC_1\n//#define LED_2 PC_0\n\n\n//#define OSC_LSE_IN PC_14\n//#define OSC_LSE_OUT PC_15\n\n//#define OSC_HSE_IN PH_0\n//#define OSC_HSE_OUT PH_1\n\n//#define SWCLK PA_14\n//#define SWDAT PA_13\n\n//#define I2C_SCL PB_8\n//#define I2C_SDA PB_9\n\n//#define UART_TX PA_2\n//#define UART_RX PA_3\n\n// Debug pins definition.\n#define RADIO_DBG_PIN_TX NC\n#define RADIO_DBG_PIN_RX NC\n\n#endif // __BOARD_CONFIG_H__\n"} +{"text": "// stylelint-disable declaration-no-important\n\n.align-baseline { vertical-align: baseline !important; } // Browser default\n.align-top { vertical-align: top !important; }\n.align-middle { vertical-align: middle !important; }\n.align-bottom { vertical-align: bottom !important; }\n.align-text-bottom { vertical-align: text-bottom !important; }\n.align-text-top { vertical-align: text-top !important; }\n"} +{"text": "<?php namespace MrJuliuss\\Syntara\\Models\\Permissions;\n\nuse Illuminate\\Database\\Eloquent\\Model;\nuse MrJuliuss\\Syntara\\Models\\Permissions\\PermissionExistsException;\nuse MrJuliuss\\Syntara\\Models\\Permissions\\NameRequiredException;\nuse MrJuliuss\\Syntara\\Models\\Permissions\\ValueRequiredException;\n\nclass Permission extends Model\n{\n\n /**\n * Model 'Permission' table\n * @var string\n */\n protected $table = 'permissions';\n\n /**\n * The attributes that are mass assignable.\n *\n * @var array\n */\n protected $fillable = array('name','value', 'description');\n\n /**\n * The attributes that aren't mass assignable.\n *\n * @var array\n */\n protected $guarded = array('id');\n\n /**\n * Return the identifiant of the permission\n * @return int id of the permission\n */\n public function getId()\n {\n return $this->id;\n }\n\n /**\n * Return the name of the permission\n * @return string name of the permission\n */\n public function getName()\n {\n return $this->name;\n }\n\n /**\n * Return the value of the permission\n * @return string value of the permission\n */\n public function getValue()\n {\n return $this->value;\n }\n\n /**\n * Return description of the permission\n * @return string description of the permission\n */\n public function getDescription()\n {\n return $this->description;\n }\n\n /**\n * Saves the permission.\n *\n * @param array $options\n * @return bool\n */\n public function save(array $options = array())\n {\n $this->validate();\n\n return parent::save($options);\n }\n\n /**\n * Validate permissions\n * @return bool\n */\n public function validate()\n {\n if(!$name = $this->getName()) {\n throw new NameRequiredException(\"A name is required for a permission, none given.\");\n }\n\n if(!$value = $this->getValue()) {\n throw new ValueRequiredException(\"A value is required for a permission, none given.\");\n }\n\n // Check if the permission already exists\n $query = $this->newQuery();\n $persistedPermission = $query->where('value', '=', $value)->first();\n\n if($persistedPermission and $persistedPermission->getId() != $this->getId()) {\n throw new PermissionExistsException(\"A permission already exists with value [$value], values must be unique for permissions.\");\n }\n\n return true;\n }\n}\n"} +{"text": "package iotanalytics\n\nimport (\n\t\"github.com/awslabs/goformation/v4/cloudformation/policies\"\n)\n\n// Dataset_Action AWS CloudFormation Resource (AWS::IoTAnalytics::Dataset.Action)\n// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-dataset-action.html\ntype Dataset_Action struct {\n\n\t// ActionName AWS CloudFormation Property\n\t// Required: true\n\t// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-dataset-action.html#cfn-iotanalytics-dataset-action-actionname\n\tActionName string `json:\"ActionName,omitempty\"`\n\n\t// ContainerAction AWS CloudFormation Property\n\t// Required: false\n\t// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-dataset-action.html#cfn-iotanalytics-dataset-action-containeraction\n\tContainerAction *Dataset_ContainerAction `json:\"ContainerAction,omitempty\"`\n\n\t// QueryAction AWS CloudFormation Property\n\t// Required: false\n\t// See: http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iotanalytics-dataset-action.html#cfn-iotanalytics-dataset-action-queryaction\n\tQueryAction *Dataset_QueryAction `json:\"QueryAction,omitempty\"`\n\n\t// AWSCloudFormationDeletionPolicy represents a CloudFormation DeletionPolicy\n\tAWSCloudFormationDeletionPolicy policies.DeletionPolicy `json:\"-\"`\n\n\t// AWSCloudFormationUpdateReplacePolicy represents a CloudFormation UpdateReplacePolicy\n\tAWSCloudFormationUpdateReplacePolicy policies.UpdateReplacePolicy `json:\"-\"`\n\n\t// AWSCloudFormationDependsOn stores the logical ID of the resources to be created before this resource\n\tAWSCloudFormationDependsOn []string `json:\"-\"`\n\n\t// AWSCloudFormationMetadata stores structured data associated with this resource\n\tAWSCloudFormationMetadata map[string]interface{} `json:\"-\"`\n\n\t// AWSCloudFormationCondition stores the logical ID of the condition that must be satisfied for this resource to be created\n\tAWSCloudFormationCondition string `json:\"-\"`\n}\n\n// AWSCloudFormationType returns the AWS CloudFormation resource type\nfunc (r *Dataset_Action) AWSCloudFormationType() string {\n\treturn \"AWS::IoTAnalytics::Dataset.Action\"\n}\n"} +{"text": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<!--NewPage-->\n<HTML>\n<HEAD>\n<!-- Generated by javadoc (build 1.6.0_23) on Fri Nov 23 14:03:49 GMT 2012 -->\n<TITLE>\nSolrIndexer (apache-nutch 1.6 API)\n</TITLE>\n\n<META NAME=\"date\" CONTENT=\"2012-11-23\">\n\n<LINK REL =\"stylesheet\" TYPE=\"text/css\" HREF=\"../../../../../stylesheet.css\" TITLE=\"Style\">\n\n<SCRIPT type=\"text/javascript\">\nfunction windowTitle()\n{\n if (location.href.indexOf('is-external=true') == -1) {\n parent.document.title=\"SolrIndexer (apache-nutch 1.6 API)\";\n }\n}\n</SCRIPT>\n<NOSCRIPT>\n</NOSCRIPT>\n\n</HEAD>\n\n<BODY BGCOLOR=\"white\" onload=\"windowTitle();\">\n<HR>\n\n\n<!-- ========= START OF TOP NAVBAR ======= -->\n<A NAME=\"navbar_top\"><!-- --></A>\n<A HREF=\"#skip-navbar_top\" title=\"Skip navigation links\"></A>\n<TABLE BORDER=\"0\" WIDTH=\"100%\" CELLPADDING=\"1\" CELLSPACING=\"0\" SUMMARY=\"\">\n<TR>\n<TD COLSPAN=2 BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\">\n<A NAME=\"navbar_top_firstrow\"><!-- --></A>\n<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"3\" SUMMARY=\"\">\n <TR ALIGN=\"center\" VALIGN=\"top\">\n <TD BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> <A HREF=\"../../../../../overview-summary.html\"><FONT CLASS=\"NavBarFont1\"><B>Overview</B></FONT></A>&nbsp;</TD>\n <TD BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> <A HREF=\"package-summary.html\"><FONT CLASS=\"NavBarFont1\"><B>Package</B></FONT></A>&nbsp;</TD>\n <TD BGCOLOR=\"#FFFFFF\" CLASS=\"NavBarCell1Rev\"> &nbsp;<FONT CLASS=\"NavBarFont1Rev\"><B>Class</B></FONT>&nbsp;</TD>\n <TD BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> <A HREF=\"class-use/SolrIndexer.html\"><FONT CLASS=\"NavBarFont1\"><B>Use</B></FONT></A>&nbsp;</TD>\n <TD BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> <A HREF=\"package-tree.html\"><FONT CLASS=\"NavBarFont1\"><B>Tree</B></FONT></A>&nbsp;</TD>\n <TD BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> <A HREF=\"../../../../../deprecated-list.html\"><FONT CLASS=\"NavBarFont1\"><B>Deprecated</B></FONT></A>&nbsp;</TD>\n <TD BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> <A HREF=\"../../../../../index-all.html\"><FONT CLASS=\"NavBarFont1\"><B>Index</B></FONT></A>&nbsp;</TD>\n <TD BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> <A HREF=\"../../../../../help-doc.html\"><FONT CLASS=\"NavBarFont1\"><B>Help</B></FONT></A>&nbsp;</TD>\n </TR>\n</TABLE>\n</TD>\n<TD ALIGN=\"right\" VALIGN=\"top\" ROWSPAN=3><EM>\n</EM>\n</TD>\n</TR>\n\n<TR>\n<TD BGCOLOR=\"white\" CLASS=\"NavBarCell2\"><FONT SIZE=\"-2\">\n&nbsp;<A HREF=\"../../../../../org/apache/nutch/indexer/solr/SolrDeleteDuplicates.SolrRecord.html\" title=\"class in org.apache.nutch.indexer.solr\"><B>PREV CLASS</B></A>&nbsp;\n&nbsp;<A HREF=\"../../../../../org/apache/nutch/indexer/solr/SolrMappingReader.html\" title=\"class in org.apache.nutch.indexer.solr\"><B>NEXT CLASS</B></A></FONT></TD>\n<TD BGCOLOR=\"white\" CLASS=\"NavBarCell2\"><FONT SIZE=\"-2\">\n <A HREF=\"../../../../../index.html?org/apache/nutch/indexer/solr/SolrIndexer.html\" target=\"_top\"><B>FRAMES</B></A> &nbsp;\n&nbsp;<A HREF=\"SolrIndexer.html\" target=\"_top\"><B>NO FRAMES</B></A> &nbsp;\n&nbsp;<SCRIPT type=\"text/javascript\">\n <!--\n if(window==top) {\n document.writeln('<A HREF=\"../../../../../allclasses-noframe.html\"><B>All Classes</B></A>');\n }\n //-->\n</SCRIPT>\n<NOSCRIPT>\n <A HREF=\"../../../../../allclasses-noframe.html\"><B>All Classes</B></A>\n</NOSCRIPT>\n\n\n</FONT></TD>\n</TR>\n<TR>\n<TD VALIGN=\"top\" CLASS=\"NavBarCell3\"><FONT SIZE=\"-2\">\n SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF=\"#field_summary\">FIELD</A>&nbsp;|&nbsp;<A HREF=\"#constructor_summary\">CONSTR</A>&nbsp;|&nbsp;<A HREF=\"#method_summary\">METHOD</A></FONT></TD>\n<TD VALIGN=\"top\" CLASS=\"NavBarCell3\"><FONT SIZE=\"-2\">\nDETAIL:&nbsp;<A HREF=\"#field_detail\">FIELD</A>&nbsp;|&nbsp;<A HREF=\"#constructor_detail\">CONSTR</A>&nbsp;|&nbsp;<A HREF=\"#method_detail\">METHOD</A></FONT></TD>\n</TR>\n</TABLE>\n<A NAME=\"skip-navbar_top\"></A>\n<!-- ========= END OF TOP NAVBAR ========= -->\n\n<HR>\n<!-- ======== START OF CLASS DATA ======== -->\n<H2>\n<FONT SIZE=\"-1\">\norg.apache.nutch.indexer.solr</FONT>\n<BR>\nClass SolrIndexer</H2>\n<PRE>\n<A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true\" title=\"class or interface in java.lang\">java.lang.Object</A>\n <IMG SRC=\"../../../../../resources/inherit.gif\" ALT=\"extended by \"><A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/conf/Configured.html?is-external=true\" title=\"class or interface in org.apache.hadoop.conf\">org.apache.hadoop.conf.Configured</A>\n <IMG SRC=\"../../../../../resources/inherit.gif\" ALT=\"extended by \"><B>org.apache.nutch.indexer.solr.SolrIndexer</B>\n</PRE>\n<DL>\n<DT><B>All Implemented Interfaces:</B> <DD><A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/conf/Configurable.html?is-external=true\" title=\"class or interface in org.apache.hadoop.conf\">Configurable</A>, <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/util/Tool.html?is-external=true\" title=\"class or interface in org.apache.hadoop.util\">Tool</A></DD>\n</DL>\n<HR>\n<DL>\n<DT><PRE>public class <B>SolrIndexer</B><DT>extends <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/conf/Configured.html?is-external=true\" title=\"class or interface in org.apache.hadoop.conf\">Configured</A><DT>implements <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/util/Tool.html?is-external=true\" title=\"class or interface in org.apache.hadoop.util\">Tool</A></DL>\n</PRE>\n\n<P>\n<HR>\n\n<P>\n<!-- =========== FIELD SUMMARY =========== -->\n\n<A NAME=\"field_summary\"><!-- --></A>\n<TABLE BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">\n<TR BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\">\n<TH ALIGN=\"left\" COLSPAN=\"2\"><FONT SIZE=\"+2\">\n<B>Field Summary</B></FONT></TH>\n</TR>\n<TR BGCOLOR=\"white\" CLASS=\"TableRowColor\">\n<TD ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"><FONT SIZE=\"-1\">\n<CODE>static&nbsp;org.slf4j.Logger</CODE></FONT></TD>\n<TD><CODE><B><A HREF=\"../../../../../org/apache/nutch/indexer/solr/SolrIndexer.html#LOG\">LOG</A></B></CODE>\n\n<BR>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>\n</TR>\n</TABLE>\n&nbsp;\n<!-- ======== CONSTRUCTOR SUMMARY ======== -->\n\n<A NAME=\"constructor_summary\"><!-- --></A>\n<TABLE BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">\n<TR BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\">\n<TH ALIGN=\"left\" COLSPAN=\"2\"><FONT SIZE=\"+2\">\n<B>Constructor Summary</B></FONT></TH>\n</TR>\n<TR BGCOLOR=\"white\" CLASS=\"TableRowColor\">\n<TD><CODE><B><A HREF=\"../../../../../org/apache/nutch/indexer/solr/SolrIndexer.html#SolrIndexer()\">SolrIndexer</A></B>()</CODE>\n\n<BR>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>\n</TR>\n<TR BGCOLOR=\"white\" CLASS=\"TableRowColor\">\n<TD><CODE><B><A HREF=\"../../../../../org/apache/nutch/indexer/solr/SolrIndexer.html#SolrIndexer(org.apache.hadoop.conf.Configuration)\">SolrIndexer</A></B>(<A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/conf/Configuration.html?is-external=true\" title=\"class or interface in org.apache.hadoop.conf\">Configuration</A>&nbsp;conf)</CODE>\n\n<BR>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>\n</TR>\n</TABLE>\n&nbsp;\n<!-- ========== METHOD SUMMARY =========== -->\n\n<A NAME=\"method_summary\"><!-- --></A>\n<TABLE BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">\n<TR BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\">\n<TH ALIGN=\"left\" COLSPAN=\"2\"><FONT SIZE=\"+2\">\n<B>Method Summary</B></FONT></TH>\n</TR>\n<TR BGCOLOR=\"white\" CLASS=\"TableRowColor\">\n<TD ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"><FONT SIZE=\"-1\">\n<CODE>&nbsp;void</CODE></FONT></TD>\n<TD><CODE><B><A HREF=\"../../../../../org/apache/nutch/indexer/solr/SolrIndexer.html#indexSolr(java.lang.String, org.apache.hadoop.fs.Path, org.apache.hadoop.fs.Path, java.util.List)\">indexSolr</A></B>(<A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true\" title=\"class or interface in java.lang\">String</A>&nbsp;solrUrl,\n <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&nbsp;crawlDb,\n <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&nbsp;linkDb,\n <A HREF=\"http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true\" title=\"class or interface in java.util\">List</A>&lt;<A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&gt;&nbsp;segments)</CODE>\n\n<BR>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>\n</TR>\n<TR BGCOLOR=\"white\" CLASS=\"TableRowColor\">\n<TD ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"><FONT SIZE=\"-1\">\n<CODE>&nbsp;void</CODE></FONT></TD>\n<TD><CODE><B><A HREF=\"../../../../../org/apache/nutch/indexer/solr/SolrIndexer.html#indexSolr(java.lang.String, org.apache.hadoop.fs.Path, org.apache.hadoop.fs.Path, java.util.List, boolean)\">indexSolr</A></B>(<A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true\" title=\"class or interface in java.lang\">String</A>&nbsp;solrUrl,\n <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&nbsp;crawlDb,\n <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&nbsp;linkDb,\n <A HREF=\"http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true\" title=\"class or interface in java.util\">List</A>&lt;<A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&gt;&nbsp;segments,\n boolean&nbsp;noCommit)</CODE>\n\n<BR>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>\n</TR>\n<TR BGCOLOR=\"white\" CLASS=\"TableRowColor\">\n<TD ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"><FONT SIZE=\"-1\">\n<CODE>&nbsp;void</CODE></FONT></TD>\n<TD><CODE><B><A HREF=\"../../../../../org/apache/nutch/indexer/solr/SolrIndexer.html#indexSolr(java.lang.String, org.apache.hadoop.fs.Path, org.apache.hadoop.fs.Path, java.util.List, boolean, boolean)\">indexSolr</A></B>(<A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true\" title=\"class or interface in java.lang\">String</A>&nbsp;solrUrl,\n <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&nbsp;crawlDb,\n <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&nbsp;linkDb,\n <A HREF=\"http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true\" title=\"class or interface in java.util\">List</A>&lt;<A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&gt;&nbsp;segments,\n boolean&nbsp;noCommit,\n boolean&nbsp;deleteGone)</CODE>\n\n<BR>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>\n</TR>\n<TR BGCOLOR=\"white\" CLASS=\"TableRowColor\">\n<TD ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"><FONT SIZE=\"-1\">\n<CODE>&nbsp;void</CODE></FONT></TD>\n<TD><CODE><B><A HREF=\"../../../../../org/apache/nutch/indexer/solr/SolrIndexer.html#indexSolr(java.lang.String, org.apache.hadoop.fs.Path, org.apache.hadoop.fs.Path, java.util.List, boolean, boolean, java.lang.String)\">indexSolr</A></B>(<A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true\" title=\"class or interface in java.lang\">String</A>&nbsp;solrUrl,\n <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&nbsp;crawlDb,\n <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&nbsp;linkDb,\n <A HREF=\"http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true\" title=\"class or interface in java.util\">List</A>&lt;<A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&gt;&nbsp;segments,\n boolean&nbsp;noCommit,\n boolean&nbsp;deleteGone,\n <A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true\" title=\"class or interface in java.lang\">String</A>&nbsp;solrParams)</CODE>\n\n<BR>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>\n</TR>\n<TR BGCOLOR=\"white\" CLASS=\"TableRowColor\">\n<TD ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"><FONT SIZE=\"-1\">\n<CODE>&nbsp;void</CODE></FONT></TD>\n<TD><CODE><B><A HREF=\"../../../../../org/apache/nutch/indexer/solr/SolrIndexer.html#indexSolr(java.lang.String, org.apache.hadoop.fs.Path, org.apache.hadoop.fs.Path, java.util.List, boolean, boolean, java.lang.String, boolean, boolean)\">indexSolr</A></B>(<A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true\" title=\"class or interface in java.lang\">String</A>&nbsp;solrUrl,\n <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&nbsp;crawlDb,\n <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&nbsp;linkDb,\n <A HREF=\"http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true\" title=\"class or interface in java.util\">List</A>&lt;<A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&gt;&nbsp;segments,\n boolean&nbsp;noCommit,\n boolean&nbsp;deleteGone,\n <A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true\" title=\"class or interface in java.lang\">String</A>&nbsp;solrParams,\n boolean&nbsp;filter,\n boolean&nbsp;normalize)</CODE>\n\n<BR>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>\n</TR>\n<TR BGCOLOR=\"white\" CLASS=\"TableRowColor\">\n<TD ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"><FONT SIZE=\"-1\">\n<CODE>static&nbsp;void</CODE></FONT></TD>\n<TD><CODE><B><A HREF=\"../../../../../org/apache/nutch/indexer/solr/SolrIndexer.html#main(java.lang.String[])\">main</A></B>(<A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true\" title=\"class or interface in java.lang\">String</A>[]&nbsp;args)</CODE>\n\n<BR>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>\n</TR>\n<TR BGCOLOR=\"white\" CLASS=\"TableRowColor\">\n<TD ALIGN=\"right\" VALIGN=\"top\" WIDTH=\"1%\"><FONT SIZE=\"-1\">\n<CODE>&nbsp;int</CODE></FONT></TD>\n<TD><CODE><B><A HREF=\"../../../../../org/apache/nutch/indexer/solr/SolrIndexer.html#run(java.lang.String[])\">run</A></B>(<A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true\" title=\"class or interface in java.lang\">String</A>[]&nbsp;args)</CODE>\n\n<BR>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>\n</TR>\n</TABLE>\n&nbsp;<A NAME=\"methods_inherited_from_class_org.apache.hadoop.conf.Configured\"><!-- --></A>\n<TABLE BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">\n<TR BGCOLOR=\"#EEEEFF\" CLASS=\"TableSubHeadingColor\">\n<TH ALIGN=\"left\"><B>Methods inherited from class org.apache.hadoop.conf.<A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/conf/Configured.html?is-external=true\" title=\"class or interface in org.apache.hadoop.conf\">Configured</A></B></TH>\n</TR>\n<TR BGCOLOR=\"white\" CLASS=\"TableRowColor\">\n<TD><CODE><A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/conf/Configured.html?is-external=true#getConf()\" title=\"class or interface in org.apache.hadoop.conf\">getConf</A>, <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/conf/Configured.html?is-external=true#setConf(org.apache.hadoop.conf.Configuration)\" title=\"class or interface in org.apache.hadoop.conf\">setConf</A></CODE></TD>\n</TR>\n</TABLE>\n&nbsp;<A NAME=\"methods_inherited_from_class_java.lang.Object\"><!-- --></A>\n<TABLE BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">\n<TR BGCOLOR=\"#EEEEFF\" CLASS=\"TableSubHeadingColor\">\n<TH ALIGN=\"left\"><B>Methods inherited from class java.lang.<A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true\" title=\"class or interface in java.lang\">Object</A></B></TH>\n</TR>\n<TR BGCOLOR=\"white\" CLASS=\"TableRowColor\">\n<TD><CODE><A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()\" title=\"class or interface in java.lang\">clone</A>, <A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)\" title=\"class or interface in java.lang\">equals</A>, <A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()\" title=\"class or interface in java.lang\">finalize</A>, <A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()\" title=\"class or interface in java.lang\">getClass</A>, <A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()\" title=\"class or interface in java.lang\">hashCode</A>, <A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()\" title=\"class or interface in java.lang\">notify</A>, <A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()\" title=\"class or interface in java.lang\">notifyAll</A>, <A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()\" title=\"class or interface in java.lang\">toString</A>, <A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()\" title=\"class or interface in java.lang\">wait</A>, <A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)\" title=\"class or interface in java.lang\">wait</A>, <A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)\" title=\"class or interface in java.lang\">wait</A></CODE></TD>\n</TR>\n</TABLE>\n&nbsp;<A NAME=\"methods_inherited_from_class_org.apache.hadoop.conf.Configurable\"><!-- --></A>\n<TABLE BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">\n<TR BGCOLOR=\"#EEEEFF\" CLASS=\"TableSubHeadingColor\">\n<TH ALIGN=\"left\"><B>Methods inherited from interface org.apache.hadoop.conf.<A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/conf/Configurable.html?is-external=true\" title=\"class or interface in org.apache.hadoop.conf\">Configurable</A></B></TH>\n</TR>\n<TR BGCOLOR=\"white\" CLASS=\"TableRowColor\">\n<TD><CODE><A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/conf/Configurable.html?is-external=true#getConf()\" title=\"class or interface in org.apache.hadoop.conf\">getConf</A>, <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/conf/Configurable.html?is-external=true#setConf(org.apache.hadoop.conf.Configuration)\" title=\"class or interface in org.apache.hadoop.conf\">setConf</A></CODE></TD>\n</TR>\n</TABLE>\n&nbsp;\n<P>\n\n<!-- ============ FIELD DETAIL =========== -->\n\n<A NAME=\"field_detail\"><!-- --></A>\n<TABLE BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">\n<TR BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\">\n<TH ALIGN=\"left\" COLSPAN=\"1\"><FONT SIZE=\"+2\">\n<B>Field Detail</B></FONT></TH>\n</TR>\n</TABLE>\n\n<A NAME=\"LOG\"><!-- --></A><H3>\nLOG</H3>\n<PRE>\npublic static org.slf4j.Logger <B>LOG</B></PRE>\n<DL>\n<DL>\n</DL>\n</DL>\n\n<!-- ========= CONSTRUCTOR DETAIL ======== -->\n\n<A NAME=\"constructor_detail\"><!-- --></A>\n<TABLE BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">\n<TR BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\">\n<TH ALIGN=\"left\" COLSPAN=\"1\"><FONT SIZE=\"+2\">\n<B>Constructor Detail</B></FONT></TH>\n</TR>\n</TABLE>\n\n<A NAME=\"SolrIndexer()\"><!-- --></A><H3>\nSolrIndexer</H3>\n<PRE>\npublic <B>SolrIndexer</B>()</PRE>\n<DL>\n</DL>\n<HR>\n\n<A NAME=\"SolrIndexer(org.apache.hadoop.conf.Configuration)\"><!-- --></A><H3>\nSolrIndexer</H3>\n<PRE>\npublic <B>SolrIndexer</B>(<A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/conf/Configuration.html?is-external=true\" title=\"class or interface in org.apache.hadoop.conf\">Configuration</A>&nbsp;conf)</PRE>\n<DL>\n</DL>\n\n<!-- ============ METHOD DETAIL ========== -->\n\n<A NAME=\"method_detail\"><!-- --></A>\n<TABLE BORDER=\"1\" WIDTH=\"100%\" CELLPADDING=\"3\" CELLSPACING=\"0\" SUMMARY=\"\">\n<TR BGCOLOR=\"#CCCCFF\" CLASS=\"TableHeadingColor\">\n<TH ALIGN=\"left\" COLSPAN=\"1\"><FONT SIZE=\"+2\">\n<B>Method Detail</B></FONT></TH>\n</TR>\n</TABLE>\n\n<A NAME=\"indexSolr(java.lang.String, org.apache.hadoop.fs.Path, org.apache.hadoop.fs.Path, java.util.List)\"><!-- --></A><H3>\nindexSolr</H3>\n<PRE>\npublic void <B>indexSolr</B>(<A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true\" title=\"class or interface in java.lang\">String</A>&nbsp;solrUrl,\n <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&nbsp;crawlDb,\n <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&nbsp;linkDb,\n <A HREF=\"http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true\" title=\"class or interface in java.util\">List</A>&lt;<A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&gt;&nbsp;segments)\n throws <A HREF=\"http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true\" title=\"class or interface in java.io\">IOException</A></PRE>\n<DL>\n<DD><DL>\n</DL>\n</DD>\n<DD><DL>\n\n<DT><B>Throws:</B>\n<DD><CODE><A HREF=\"http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true\" title=\"class or interface in java.io\">IOException</A></CODE></DL>\n</DD>\n</DL>\n<HR>\n\n<A NAME=\"indexSolr(java.lang.String, org.apache.hadoop.fs.Path, org.apache.hadoop.fs.Path, java.util.List, boolean)\"><!-- --></A><H3>\nindexSolr</H3>\n<PRE>\npublic void <B>indexSolr</B>(<A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true\" title=\"class or interface in java.lang\">String</A>&nbsp;solrUrl,\n <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&nbsp;crawlDb,\n <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&nbsp;linkDb,\n <A HREF=\"http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true\" title=\"class or interface in java.util\">List</A>&lt;<A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&gt;&nbsp;segments,\n boolean&nbsp;noCommit)\n throws <A HREF=\"http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true\" title=\"class or interface in java.io\">IOException</A></PRE>\n<DL>\n<DD><DL>\n</DL>\n</DD>\n<DD><DL>\n\n<DT><B>Throws:</B>\n<DD><CODE><A HREF=\"http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true\" title=\"class or interface in java.io\">IOException</A></CODE></DL>\n</DD>\n</DL>\n<HR>\n\n<A NAME=\"indexSolr(java.lang.String, org.apache.hadoop.fs.Path, org.apache.hadoop.fs.Path, java.util.List, boolean, boolean)\"><!-- --></A><H3>\nindexSolr</H3>\n<PRE>\npublic void <B>indexSolr</B>(<A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true\" title=\"class or interface in java.lang\">String</A>&nbsp;solrUrl,\n <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&nbsp;crawlDb,\n <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&nbsp;linkDb,\n <A HREF=\"http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true\" title=\"class or interface in java.util\">List</A>&lt;<A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&gt;&nbsp;segments,\n boolean&nbsp;noCommit,\n boolean&nbsp;deleteGone)\n throws <A HREF=\"http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true\" title=\"class or interface in java.io\">IOException</A></PRE>\n<DL>\n<DD><DL>\n</DL>\n</DD>\n<DD><DL>\n\n<DT><B>Throws:</B>\n<DD><CODE><A HREF=\"http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true\" title=\"class or interface in java.io\">IOException</A></CODE></DL>\n</DD>\n</DL>\n<HR>\n\n<A NAME=\"indexSolr(java.lang.String, org.apache.hadoop.fs.Path, org.apache.hadoop.fs.Path, java.util.List, boolean, boolean, java.lang.String)\"><!-- --></A><H3>\nindexSolr</H3>\n<PRE>\npublic void <B>indexSolr</B>(<A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true\" title=\"class or interface in java.lang\">String</A>&nbsp;solrUrl,\n <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&nbsp;crawlDb,\n <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&nbsp;linkDb,\n <A HREF=\"http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true\" title=\"class or interface in java.util\">List</A>&lt;<A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&gt;&nbsp;segments,\n boolean&nbsp;noCommit,\n boolean&nbsp;deleteGone,\n <A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true\" title=\"class or interface in java.lang\">String</A>&nbsp;solrParams)\n throws <A HREF=\"http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true\" title=\"class or interface in java.io\">IOException</A></PRE>\n<DL>\n<DD><DL>\n</DL>\n</DD>\n<DD><DL>\n\n<DT><B>Throws:</B>\n<DD><CODE><A HREF=\"http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true\" title=\"class or interface in java.io\">IOException</A></CODE></DL>\n</DD>\n</DL>\n<HR>\n\n<A NAME=\"indexSolr(java.lang.String, org.apache.hadoop.fs.Path, org.apache.hadoop.fs.Path, java.util.List, boolean, boolean, java.lang.String, boolean, boolean)\"><!-- --></A><H3>\nindexSolr</H3>\n<PRE>\npublic void <B>indexSolr</B>(<A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true\" title=\"class or interface in java.lang\">String</A>&nbsp;solrUrl,\n <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&nbsp;crawlDb,\n <A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&nbsp;linkDb,\n <A HREF=\"http://java.sun.com/javase/6/docs/api/java/util/List.html?is-external=true\" title=\"class or interface in java.util\">List</A>&lt;<A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/fs/Path.html?is-external=true\" title=\"class or interface in org.apache.hadoop.fs\">Path</A>&gt;&nbsp;segments,\n boolean&nbsp;noCommit,\n boolean&nbsp;deleteGone,\n <A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true\" title=\"class or interface in java.lang\">String</A>&nbsp;solrParams,\n boolean&nbsp;filter,\n boolean&nbsp;normalize)\n throws <A HREF=\"http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true\" title=\"class or interface in java.io\">IOException</A></PRE>\n<DL>\n<DD><DL>\n</DL>\n</DD>\n<DD><DL>\n\n<DT><B>Throws:</B>\n<DD><CODE><A HREF=\"http://java.sun.com/javase/6/docs/api/java/io/IOException.html?is-external=true\" title=\"class or interface in java.io\">IOException</A></CODE></DL>\n</DD>\n</DL>\n<HR>\n\n<A NAME=\"run(java.lang.String[])\"><!-- --></A><H3>\nrun</H3>\n<PRE>\npublic int <B>run</B>(<A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true\" title=\"class or interface in java.lang\">String</A>[]&nbsp;args)\n throws <A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true\" title=\"class or interface in java.lang\">Exception</A></PRE>\n<DL>\n<DD><DL>\n<DT><B>Specified by:</B><DD><CODE><A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/util/Tool.html?is-external=true#run(java.lang.String[])\" title=\"class or interface in org.apache.hadoop.util\">run</A></CODE> in interface <CODE><A HREF=\"http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/util/Tool.html?is-external=true\" title=\"class or interface in org.apache.hadoop.util\">Tool</A></CODE></DL>\n</DD>\n<DD><DL>\n\n<DT><B>Throws:</B>\n<DD><CODE><A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true\" title=\"class or interface in java.lang\">Exception</A></CODE></DL>\n</DD>\n</DL>\n<HR>\n\n<A NAME=\"main(java.lang.String[])\"><!-- --></A><H3>\nmain</H3>\n<PRE>\npublic static void <B>main</B>(<A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/String.html?is-external=true\" title=\"class or interface in java.lang\">String</A>[]&nbsp;args)\n throws <A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true\" title=\"class or interface in java.lang\">Exception</A></PRE>\n<DL>\n<DD><DL>\n</DL>\n</DD>\n<DD><DL>\n\n<DT><B>Throws:</B>\n<DD><CODE><A HREF=\"http://java.sun.com/javase/6/docs/api/java/lang/Exception.html?is-external=true\" title=\"class or interface in java.lang\">Exception</A></CODE></DL>\n</DD>\n</DL>\n<!-- ========= END OF CLASS DATA ========= -->\n<HR>\n\n\n<!-- ======= START OF BOTTOM NAVBAR ====== -->\n<A NAME=\"navbar_bottom\"><!-- --></A>\n<A HREF=\"#skip-navbar_bottom\" title=\"Skip navigation links\"></A>\n<TABLE BORDER=\"0\" WIDTH=\"100%\" CELLPADDING=\"1\" CELLSPACING=\"0\" SUMMARY=\"\">\n<TR>\n<TD COLSPAN=2 BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\">\n<A NAME=\"navbar_bottom_firstrow\"><!-- --></A>\n<TABLE BORDER=\"0\" CELLPADDING=\"0\" CELLSPACING=\"3\" SUMMARY=\"\">\n <TR ALIGN=\"center\" VALIGN=\"top\">\n <TD BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> <A HREF=\"../../../../../overview-summary.html\"><FONT CLASS=\"NavBarFont1\"><B>Overview</B></FONT></A>&nbsp;</TD>\n <TD BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> <A HREF=\"package-summary.html\"><FONT CLASS=\"NavBarFont1\"><B>Package</B></FONT></A>&nbsp;</TD>\n <TD BGCOLOR=\"#FFFFFF\" CLASS=\"NavBarCell1Rev\"> &nbsp;<FONT CLASS=\"NavBarFont1Rev\"><B>Class</B></FONT>&nbsp;</TD>\n <TD BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> <A HREF=\"class-use/SolrIndexer.html\"><FONT CLASS=\"NavBarFont1\"><B>Use</B></FONT></A>&nbsp;</TD>\n <TD BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> <A HREF=\"package-tree.html\"><FONT CLASS=\"NavBarFont1\"><B>Tree</B></FONT></A>&nbsp;</TD>\n <TD BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> <A HREF=\"../../../../../deprecated-list.html\"><FONT CLASS=\"NavBarFont1\"><B>Deprecated</B></FONT></A>&nbsp;</TD>\n <TD BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> <A HREF=\"../../../../../index-all.html\"><FONT CLASS=\"NavBarFont1\"><B>Index</B></FONT></A>&nbsp;</TD>\n <TD BGCOLOR=\"#EEEEFF\" CLASS=\"NavBarCell1\"> <A HREF=\"../../../../../help-doc.html\"><FONT CLASS=\"NavBarFont1\"><B>Help</B></FONT></A>&nbsp;</TD>\n </TR>\n</TABLE>\n</TD>\n<TD ALIGN=\"right\" VALIGN=\"top\" ROWSPAN=3><EM>\n</EM>\n</TD>\n</TR>\n\n<TR>\n<TD BGCOLOR=\"white\" CLASS=\"NavBarCell2\"><FONT SIZE=\"-2\">\n&nbsp;<A HREF=\"../../../../../org/apache/nutch/indexer/solr/SolrDeleteDuplicates.SolrRecord.html\" title=\"class in org.apache.nutch.indexer.solr\"><B>PREV CLASS</B></A>&nbsp;\n&nbsp;<A HREF=\"../../../../../org/apache/nutch/indexer/solr/SolrMappingReader.html\" title=\"class in org.apache.nutch.indexer.solr\"><B>NEXT CLASS</B></A></FONT></TD>\n<TD BGCOLOR=\"white\" CLASS=\"NavBarCell2\"><FONT SIZE=\"-2\">\n <A HREF=\"../../../../../index.html?org/apache/nutch/indexer/solr/SolrIndexer.html\" target=\"_top\"><B>FRAMES</B></A> &nbsp;\n&nbsp;<A HREF=\"SolrIndexer.html\" target=\"_top\"><B>NO FRAMES</B></A> &nbsp;\n&nbsp;<SCRIPT type=\"text/javascript\">\n <!--\n if(window==top) {\n document.writeln('<A HREF=\"../../../../../allclasses-noframe.html\"><B>All Classes</B></A>');\n }\n //-->\n</SCRIPT>\n<NOSCRIPT>\n <A HREF=\"../../../../../allclasses-noframe.html\"><B>All Classes</B></A>\n</NOSCRIPT>\n\n\n</FONT></TD>\n</TR>\n<TR>\n<TD VALIGN=\"top\" CLASS=\"NavBarCell3\"><FONT SIZE=\"-2\">\n SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF=\"#field_summary\">FIELD</A>&nbsp;|&nbsp;<A HREF=\"#constructor_summary\">CONSTR</A>&nbsp;|&nbsp;<A HREF=\"#method_summary\">METHOD</A></FONT></TD>\n<TD VALIGN=\"top\" CLASS=\"NavBarCell3\"><FONT SIZE=\"-2\">\nDETAIL:&nbsp;<A HREF=\"#field_detail\">FIELD</A>&nbsp;|&nbsp;<A HREF=\"#constructor_detail\">CONSTR</A>&nbsp;|&nbsp;<A HREF=\"#method_detail\">METHOD</A></FONT></TD>\n</TR>\n</TABLE>\n<A NAME=\"skip-navbar_bottom\"></A>\n<!-- ======== END OF BOTTOM NAVBAR ======= -->\n\n<HR>\nCopyright &copy; 2012 The Apache Software Foundation\n</BODY>\n</HTML>\n"} +{"text": "using Microsoft.Bot.Schema;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\n\nnamespace PictureBot.Models\n{\n public class SearchHitStyler\n {\n public void Apply<T>(ref IMessageActivity activity, string prompt, IReadOnlyList<T> options, IReadOnlyList<string> descriptions = null)\n {\n var hits = options as IList<SearchHit>;\n if (hits != null)\n {\n var cards = hits.Select(h => new HeroCard\n {\n Title = h.Title,\n Images = new[] { new CardImage(h.PictureUrl) },\n Text = h.Description\n });\n\n activity.AttachmentLayout = AttachmentLayoutTypes.Carousel;\n activity.Attachments = cards.Select(c => c.ToAttachment()).ToList();\n activity.Text = prompt;\n }\n }\n }\n}\n"} +{"text": "load(\"@io_bazel_rules_go//go:def.bzl\", \"go_library\", \"go_test\")\n\ngo_library(\n name = \"go_default_library\",\n srcs = [\"logs.go\"],\n importpath = \"k8s.io/kubernetes/pkg/kubectl/cmd/logs\",\n visibility = [\"//visibility:public\"],\n deps = [\n \"//pkg/kubectl/cmd/util:go_default_library\",\n \"//pkg/kubectl/polymorphichelpers:go_default_library\",\n \"//pkg/kubectl/scheme:go_default_library\",\n \"//pkg/kubectl/util:go_default_library\",\n \"//pkg/kubectl/util/i18n:go_default_library\",\n \"//pkg/kubectl/util/templates:go_default_library\",\n \"//staging/src/k8s.io/api/core/v1:go_default_library\",\n \"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library\",\n \"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library\",\n \"//staging/src/k8s.io/cli-runtime/pkg/genericclioptions:go_default_library\",\n \"//staging/src/k8s.io/client-go/rest:go_default_library\",\n \"//vendor/github.com/spf13/cobra:go_default_library\",\n ],\n)\n\ngo_test(\n name = \"go_default_test\",\n srcs = [\"logs_test.go\"],\n embed = [\":go_default_library\"],\n deps = [\n \"//pkg/kubectl/cmd/testing:go_default_library\",\n \"//staging/src/k8s.io/api/core/v1:go_default_library\",\n \"//staging/src/k8s.io/apimachinery/pkg/apis/meta/v1:go_default_library\",\n \"//staging/src/k8s.io/apimachinery/pkg/runtime:go_default_library\",\n \"//staging/src/k8s.io/cli-runtime/pkg/genericclioptions:go_default_library\",\n \"//staging/src/k8s.io/client-go/rest:go_default_library\",\n ],\n)\n\nfilegroup(\n name = \"package-srcs\",\n srcs = glob([\"**\"]),\n tags = [\"automanaged\"],\n visibility = [\"//visibility:private\"],\n)\n\nfilegroup(\n name = \"all-srcs\",\n srcs = [\":package-srcs\"],\n tags = [\"automanaged\"],\n visibility = [\"//visibility:public\"],\n)\n"} +{"text": "{\n \"items\": [{\n \"id\": 1,\n \"img\": \"/static/samples/img/product1_640x426.jpg\",\n \"name\": \"Apple\",\n \"price\": \"1.99\",\n \"stars\": \"&#9733;&#9733;&#9733;&#9733;&#9733;\",\n \"attribution\": \"visualhunt\",\n \"url\": \"#\",\n \"color\": \"green\"\n }, {\n \"id\": 2,\n \"img\": \"/static/samples/img/product2_640x426.jpg\",\n \"name\": \"Orange\",\n \"attribution\": \"visualhunt\",\n \"price\": \"0.99\",\n \"stars\": \"&#9733;&#9733;&#9733;&#9733;&#9734;\",\n \"url\": \"#\",\n \"color\": \"orange\"\n }, {\n \"id\": 3,\n \"img\": \"/static/samples/img/product3_640x426.jpg\",\n \"name\": \"Pear\",\n \"attribution\": \"visualhunt\",\n \"price\": \"1.50\",\n \"stars\": \"&#9733;&#9733;&#9733;&#9734;&#9734;\",\n \"url\": \"#\",\n \"color\": \"green\"\n }, {\n \"id\": 4,\n \"img\": \"/static/samples/img/product4_640x426.jpg\",\n \"name\": \"Banana\",\n \"attribution\": \"pixabay\",\n \"price\": \"1.50\",\n \"stars\": \"&#9733;&#9733;&#9733;&#9733;&#9733;\",\n \"url\": \"#\",\n \"color\": \"yellow\"\n }, {\n \"id\": 5,\n \"img\": \"/static/samples/img/product5_640x408.jpg\",\n \"name\": \"Watermelon\",\n \"attribution\": \"pixabay\",\n \"price\": \"4.50\",\n \"stars\": \"&#9733;&#9733;&#9733;&#9733;&#9733;\",\n \"url\": \"#\",\n \"color\": \"red\"\n }, {\n \"id\": 6,\n \"img\": \"/static/samples/img/product6_640x424.jpg\",\n \"name\": \"Melon\",\n \"attribution\": \"pixabay\",\n \"price\": \"3.50\",\n \"stars\": \"&#9733;&#9733;&#9733;&#9733;&#9733;\",\n \"url\": \"#\",\n \"color\": \"yellow\"\n }]\n}\n"} +{"text": "---\ntitle: \"Changing the Default Class Factory and Aggregation Model\"\nms.date: \"11/04/2016\"\nhelpviewer_keywords: [\"CComClassFactory class, making the default\", \"aggregation [C++], using ATL\", \"aggregation [C++], aggregation models\", \"defaults [C++], aggregation model in ATL\", \"default class factory\", \"class factories, changing default\", \"CComCoClass class, default class factory and aggregation model\", \"default class factory, ATL\", \"defaults [C++], class factory\"]\nms.assetid: 6e040e95-0f38-4839-8a8b-c9800dd47e8c\n---\n# Changing the Default Class Factory and Aggregation Model\n\nATL uses [CComCoClass](../atl/reference/ccomcoclass-class.md) to define the default class factory and aggregation model for your object. `CComCoClass` specifies the following two macros:\n\n- [DECLARE_CLASSFACTORY](reference/aggregation-and-class-factory-macros.md#declare_classfactory) Declares the class factory to be [CComClassFactory](../atl/reference/ccomclassfactory-class.md).\n\n- [DECLARE_AGGREGATABLE](reference/aggregation-and-class-factory-macros.md#declare_aggregatable) Declares that your object can be aggregated.\n\nYou can override either of these defaults by specifying another macro in your class definition. For example, to use [CComClassFactory2](../atl/reference/ccomclassfactory2-class.md) instead of `CComClassFactory`, specify the [DECLARE_CLASSFACTORY2](reference/aggregation-and-class-factory-macros.md#declare_classfactory2) macro:\n\n[!code-cpp[NVC_ATL_COM#2](../atl/codesnippet/cpp/changing-the-default-class-factory-and-aggregation-model_1.h)]\n\nTwo other macros that define a class factory are [DECLARE_CLASSFACTORY_AUTO_THREAD](reference/aggregation-and-class-factory-macros.md#declare_classfactory_auto_thread) and [DECLARE_CLASSFACTORY_SINGLETON](reference/aggregation-and-class-factory-macros.md#declare_classfactory_singleton).\n\nATL also uses the **`typedef`** mechanism to implement default behavior. For example, the DECLARE_AGGREGATABLE macro uses **`typedef`** to define a type called `_CreatorClass`, which is then referenced throughout ATL. Note that in a derived class, a **`typedef`** using the same name as the base class's **`typedef`** results in ATL using your definition and overriding the default behavior.\n\n## See also\n\n[Fundamentals of ATL COM Objects](../atl/fundamentals-of-atl-com-objects.md)<br/>\n[Aggregation and Class Factory Macros](../atl/reference/aggregation-and-class-factory-macros.md)\n"} +{"text": "services:\n _defaults:\n"} +{"text": "//\n// LineBackgroundView.h\n// LineBackgroundView\n//\n// Created by XianMingYou on 15/3/4.\n//\n// https://github.com/YouXianMing\n// http://www.cnblogs.com/YouXianMing/\n//\n\n#import <UIKit/UIKit.h>\n\n@interface LineBackgroundView : UIView\n\n@property (nonatomic) CGFloat lineWidth;\n@property (nonatomic) CGFloat lineGap;\n@property (nonatomic, strong) UIColor *lineColor;\n\n- (void)buildView;\n+ (instancetype)createViewWithFrame:(CGRect)frame lineWidth:(CGFloat)width lineGap:(CGFloat)lineGap lineColor:(UIColor *)color;\n\n@end\n"} +{"text": "{\r\n \"iisSettings\": {\r\n \"windowsAuthentication\": false,\r\n \"anonymousAuthentication\": true,\r\n \"iisExpress\": {\r\n \"applicationUrl\": \"http://localhost:34405/\",\r\n \"sslPort\": 0\r\n }\r\n },\r\n \"profiles\": {\r\n \"IIS Express\": {\r\n \"commandName\": \"IISExpress\",\r\n \"launchBrowser\": true,\r\n \"environmentVariables\": {\r\n \"ASPNETCORE_ENVIRONMENT\": \"Development\"\r\n }\r\n },\r\n \"Web.UI_Core_VS2017\": {\r\n \"commandName\": \"Project\",\r\n \"launchBrowser\": true,\r\n \"environmentVariables\": {\r\n \"ASPNETCORE_ENVIRONMENT\": \"Development\"\r\n },\r\n \"applicationUrl\": \"http://localhost:34405/\"\r\n }\r\n }\r\n}"} +{"text": "# Copyright 2015 The Chromium Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nimport itertools\nimport symbol\nimport token\n\nfrom py_utils.refactor.annotated_symbol import base_symbol\nfrom py_utils.refactor import snippet\n\n\n__all__ = [\n 'Reference',\n]\n\n\nclass Reference(base_symbol.AnnotatedSymbol):\n @classmethod\n def Annotate(cls, nodes):\n if not nodes:\n return None\n if nodes[0].type != symbol.atom:\n return None\n if not nodes[0].children or nodes[0].children[0].type != token.NAME:\n return None\n\n for i in xrange(1, len(nodes)):\n if not nodes:\n break\n if nodes[i].type != symbol.trailer:\n break\n if len(nodes[i].children) != 2:\n break\n if (nodes[i].children[0].type != token.DOT or\n nodes[i].children[1].type != token.NAME):\n break\n else:\n i = len(nodes)\n\n return [cls(nodes[:i])] + nodes[i:]\n\n def __init__(self, children):\n super(Reference, self).__init__(-1, children)\n\n @property\n def type_name(self):\n return 'attribute_reference'\n\n @property\n def value(self):\n return ''.join(token_snippet.value\n for child in self.children\n for token_snippet in child.children)\n\n @value.setter\n def value(self, value):\n value_parts = value.split('.')\n\n # If we have too many children, cut the list down to size.\n # pylint: disable=attribute-defined-outside-init\n self._children = self._children[:len(value_parts)]\n\n # Update child nodes.\n for child, value_part in itertools.izip_longest(\n self._children, value_parts):\n if child:\n # Modify existing children. This helps preserve comments and spaces.\n child.children[-1].value = value_part\n else:\n # Add children as needed.\n token_snippets = [\n snippet.TokenSnippet.Create(token.DOT, '.'),\n snippet.TokenSnippet.Create(token.NAME, value_part),\n ]\n self._children.append(snippet.Symbol(symbol.trailer, token_snippets))\n"} +{"text": "PROPERTIES\n\ncontent=The time is currently 12:30.\n\nLOG\n\nSymbol Rows: 7\nFirst Check Digit: 13\nSecond Check Digit: 19\nCodewords: 36 52 72 69 0 84 73 77 69 0 73 83 0 67 85 82 82 69 78 84 76 89 0 17 18 26 19 16 14 106 106 106 106 13 19\nBlocks Merged: 148 -> 119\n\nCODEWORDS\n\n321111123132133111224111122142122223211\n222111241121421124131111122142122222221\n212211421121142122122221411221242112122\n141111212411212411122142411121241121411\n113212211142121412122221232212232111132\n123113212212211321231221222312111331231\n111412111332111332111331221322211321114\n"} +{"text": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<!DOCTYPE ldml SYSTEM \"../../common/dtd/ldml.dtd\">\n<!-- Copyright © 1991-2013 Unicode, Inc.\nCLDR data files are interpreted according to the LDML specification (http://unicode.org/reports/tr35/)\nFor terms of use, see http://www.unicode.org/copyright.html\n-->\n<ldml>\n\t<identity>\n\t\t<version number=\"$Revision: 9061 $\"/>\n\t\t<generation date=\"$Date: 2013-07-20 12:27:45 -0500 (Sat, 20 Jul 2013) $\"/>\n\t\t<language type=\"nr\"/>\n\t\t<territory type=\"ZA\"/>\n\t</identity>\n</ldml>\n"} +{"text": "---\ntitle: \"call: updateRecordingStatus\"\ndescription: \"Update the application's recording status associated with a call.\"\nauthor: \"ananmishr\"\nlocalization_priority: Normal\nms.prod: \"cloud-communications\"\ndoc_type: apiPageType\n---\n\n# call: updateRecordingStatus\n\nNamespace: microsoft.graph\n\n[!INCLUDE [beta-disclaimer](../../includes/beta-disclaimer.md)]\n\nUpdate the application's recording status associated with a call. This requires the use of the [Teams policy-based recording](https://docs.microsoft.com/MicrosoftTeams/teams-recording-policy) solution.\n\n> **Additional Restriction**: You may NOT use the Media Access API to record or otherwise persist media content from calls or meetings that your application accesses, or data derived from that media content (\"record\" or \"recording\"), without first calling the **updateRecordingStatus** API to indicate that recording has begun, and receiving a success reply from that API. If your application begins recording any meeting, it must end the recording prior to calling the **updateRecordingStatus** API to indicate that the recording has ended.\n\n## Permissions\nOne of the following permissions is required to call this API. To learn more, including how to choose permissions, see [Permissions](/graph/permissions-reference).\n\n| Permission type | Permissions (from least to most privileged) |\n|:---------------------------------------|:-------------------------------------------------|\n| Delegated (work or school account) | Not Supported |\n| Delegated (personal Microsoft account) | Not Supported |\n| Application | Calls.JoinGroupCalls.All, Calls.AccessMedia.All |\n\n## HTTP request\n<!-- { \"blockType\": \"ignored\" } -->\n```http\nPOST /app/calls/{id}/updateRecordingStatus\nPOST /communications/calls/{id}/updateRecordingStatus\n```\n> **Note:** The `/app` path is deprecated. Going forward, use the `/communications` path.\n\n## Request headers\n| Name | Description |\n|:--------------|:--------------------------|\n| Authorization | Bearer {token}. Required. |\n| Content-type | application/json. Required. |\n\n## Request body\nIn the request body, provide a JSON object with the following parameters.\n\n| Parameter | Type | Description |\n|:----------------|:--------|:--------------------------------------------------------------------------------------|\n| clientContext | String | Unique Client Context string. Max limit is 256 chars. |\n| status | String | The recording status. Possible values are: `notRecording`, `recording`, or `failed`. |\n\n## Response\nThis method returns a `200 OK` response code and a Location header with a URI to the [updateRecordingStatusOperation](../resources/updaterecordingstatusoperation.md) object created for this request.\n\n## Example\nThe following example shows how to call this API.\n\n### Request\nThe following example shows the request.\n\n\n# [HTTP](#tab/http)\n<!-- {\n \"blockType\": \"request\",\n \"name\": \"call-updateRecordingStatus\"\n}-->\n```http\nPOST https://graph.microsoft.com/beta/communications/calls/{id}/updateRecordingStatus\nContent-Type: application/json\nContent-Length: 79\n\n{\n \"clientContext\": \"clientContext-value\",\n \"status\": \"notRecording | recording | failed\"\n}\n```\n# [C#](#tab/csharp)\n[!INCLUDE [sample-code](../includes/snippets/csharp/call-updaterecordingstatus-csharp-snippets.md)]\n[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]\n\n# [JavaScript](#tab/javascript)\n[!INCLUDE [sample-code](../includes/snippets/javascript/call-updaterecordingstatus-javascript-snippets.md)]\n[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]\n\n# [Objective-C](#tab/objc)\n[!INCLUDE [sample-code](../includes/snippets/objc/call-updaterecordingstatus-objc-snippets.md)]\n[!INCLUDE [sdk-documentation](../includes/snippets/snippets-sdk-documentation-link.md)]\n\n---\n\n\n### Response\n\n> **Note:** The response object shown here might be shortened for readability. All the properties will be returned from an actual call.\n\n<!-- {\n \"blockType\": \"response\",\n \"name\": \"call-updateRecordingStatus\",\n \"truncated\": true,\n \"@odata.type\": \"microsoft.graph.updateRecordingStatusOperation\"\n} -->\n```http\nHTTP/1.1 200 OK\nLocation: https://graph.microsoft.com/beta/communications/calls/57dab8b1-894c-409a-b240-bd8beae78896/operations/0fe0623f-d628-42ed-b4bd-8ac290072cc5\n\n{\n \"@odata.type\": \"#microsoft.graph.updateRecordingStatusOperation\",\n \"clientContext\": \"clientContext-value\",\n \"id\": \"0fe0623f-d628-42ed-b4bd-8ac290072cc5\",\n \"resultInfo\": null,\n \"status\": \"completed\"\n}\n```\n\n<!-- uuid: 8fcb5dbc-d5aa-4681-8e31-b001d5168d79\n2015-10-25 14:57:30 UTC -->\n<!--\n{\n \"type\": \"#page.annotation\",\n \"description\": \"call: updateRecordingStatus\",\n \"keywords\": \"\",\n \"section\": \"documentation\",\n \"tocPath\": \"\",\n \"suppressions\": [\n ]\n}\n-->\n\n\n"} +{"text": "/**\n * @file\n *\n * @date Aug 29, 2013\n * @author: Anton Bondarev\n */\n\n#include <string.h>\n\nsize_t strnlen(const char *str, size_t maxlen) {\n\tsize_t len;\n\tconst char *s = str;\n\n\tfor (len = 0; len < maxlen; len++) {\n\t\tif ('\\0' == *s++) {\n\t\t\tbreak;\n\t\t}\n\t}\n\n\treturn len;\n}\n"} +{"text": "## htsjdk.samtools.metrics.StringHeader\n# CollectArraysVariantCallingMetrics --INPUT /cromwell_root/broad-gotc-dev-cromwell-execution/Arrays/9972b43c-df1e-414a-9017-24edc37b5250/call-IlluminaGenotypingArray/IlluminaGenotypingArray/805b2e59-add2-4794-ae89-350d69a0f7c3/call-MergePedIntoVcf/7991775143_R01C01.vcf.gz --OUTPUT 7991775143_R01C01 --CALL_RATE_PF_THRESHOLD 0.98 --DBSNP /cromwell_root/gcp-public-data--broad-references/hg19/v0/dbsnp_138.b37.vcf.gz --NUM_PROCESSORS 0 --VERBOSITY INFO --QUIET false --VALIDATION_STRINGENCY STRICT --COMPRESSION_LEVEL 5 --MAX_RECORDS_IN_RAM 500000 --CREATE_INDEX false --CREATE_MD5_FILE false --GA4GH_CLIENT_SECRETS client_secrets.json --help false --version false --showHidden false --USE_JDK_DEFLATER false --USE_JDK_INFLATER false\n## htsjdk.samtools.metrics.StringHeader\n# Started on: Thu Mar 05 18:21:35 UTC 2020\n\n## METRICS CLASS\tpicard.arrays.CollectArraysVariantCallingMetrics$ArraysVariantCallingSummaryMetrics\nNUM_ASSAYS\tNUM_NON_FILTERED_ASSAYS\tNUM_FILTERED_ASSAYS\tNUM_ZEROED_OUT_ASSAYS\tNUM_SNPS\tNUM_INDELS\tNUM_CALLS\tNUM_AUTOCALL_CALLS\tNUM_NO_CALLS\tNUM_IN_DB_SNP\tNOVEL_SNPS\tPCT_DBSNP\tCALL_RATE\tAUTOCALL_CALL_RATE\tNUM_SINGLETONS\n242513\t242493\t20\t0\t242450\t43\t242318\t241250\t175\t238085\t4365\t0.981996\t0.999278\t0.994874\t10418\n\n\n"} +{"text": "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>\r\n<title>Coverage Report Classes</title>\r\n<link title=\"Style\" type=\"text/css\" rel=\"stylesheet\" href=\"css/main.css\"/>\r\n</head>\r\n<body>\r\n<h5>\r\nAll Packages\r\n</h5>\r\n<div class=\"separator\">&nbsp;</div>\r\n<h5>Classes</h5>\r\n<table width=\"100%\">\r\n<tbody>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.BezierPointTransformer.html\">BezierPointTransformer</a> <i>(100%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.CoreSemanticModelBridgeTransformer.html\">CoreSemanticModelBridgeTransformer</a> <i>(100%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.Diagram2XMITransformer.html\">Diagram2XMITransformer</a> <i>(91%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.DiagramElementTransformer.html\">DiagramElementTransformer</a> <i>(100%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.DiagramInterchangeElementTransformer.html\">DiagramInterchangeElementTransformer</a> <i>(N/A)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.DiagramLinkTransformer.html\">DiagramLinkTransformer</a> <i>(100%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.DiagramTransformer.html\">DiagramTransformer</a> <i>(100%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.DimensionTransformer.html\">DimensionTransformer</a> <i>(100%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.EllipseTransformer.html\">EllipseTransformer</a> <i>(100%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.GraphConnectorTransformer.html\">GraphConnectorTransformer</a> <i>(100%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.GraphEdgeTransformer.html\">GraphEdgeTransformer</a> <i>(100%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.GraphElementTransformer.html\">GraphElementTransformer</a> <i>(100%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.GraphNodeTransformer.html\">GraphNodeTransformer</a> <i>(100%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.GraphicPrimitiveTransformer.html\">GraphicPrimitiveTransformer</a> <i>(100%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.Helper.html\">Helper</a> <i>(71%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.ImageTransformer.html\">ImageTransformer</a> <i>(100%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.LeafElementTransformer.html\">LeafElementTransformer</a> <i>(100%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.PointTransformer.html\">PointTransformer</a> <i>(100%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.PolylineTransformer.html\">PolylineTransformer</a> <i>(100%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.PropertyTransformer.html\">PropertyTransformer</a> <i>(100%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.ReferenceTransformer.html\">ReferenceTransformer</a> <i>(100%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.SemanticModelBridgeTransformer.html\">SemanticModelBridgeTransformer</a> <i>(100%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.SimpleSemanticModelElementTransformer.html\">SimpleSemanticModelElementTransformer</a> <i>(100%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.StructureXMLNode.html\">StructureXMLNode</a> <i>(87%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.TextElementTransformer.html\">TextElementTransformer</a> <i>(100%)</i></td>\r\n</tr>\r\n<tr>\r\n<td nowrap=\"nowrap\"><a target=\"summary\" href=\"com.topcoder.xmi.writer.transformers.diagram.elementtransformers.Uml1SemanticModelBridgeTransformer.html\">Uml1SemanticModelBridgeTransformer</a> <i>(83%)</i></td>\r\n</tr>\r\n</tbody>\r\n</table>\r\n</body>\r\n</html>\r\n"} +{"text": "# -*- coding: utf-8 -*-\n# ------------------------------------------------------------------------------\n# Name: upload.py\n# Purpose: music21 documentation upload utility\n#\n# Authors: Christopher Ariza\n#\n# Copyright: Copyright © 2009-2010, 2013 Michael Scott Cuthbert and the music21 Project\n# License: BSD, see license.txt\n# ------------------------------------------------------------------------------\n# pylint: disable=line-too-long\n'''\nif you get a 'ssh_askpass' not found error, create this file in\n/usr/libexec/ssh-askpass and sudo chmod +x it afterwards:\n\n..raw::\n #!/bin/bash\n # Script: ssh-askpass\n # Author: Mark Carver\n # Created: 2011-09-14\n # Copyright (c) 2011 Beyond Eden Development, LLC. All rights reserved.\n\n # A ssh-askpass command for Mac OS X\n # Based from author: Joseph Mocker, Sun Microsystems\n # http://blogs.oracle.com/mock/entry/and_now_chicken_of_the\n # To use this script:\n # Install this script running INSTALL as root\n #\n # If you plan on manually installing this script, please note that you will have\n # to set the following variable for SSH to recognize where the script is located:\n # export SSH_ASKPASS=\"/path/to/ssh-askpass\"\n TITLE=\"${SSH_ASKPASS_TITLE:-SSH}\";\n TEXT=\"$(whoami)'s password:\";\n IFS=$(printf \"\\n\");\n CODE=(\"on GetCurrentApp()\");\n CODE=(${CODE[*]} \"tell application \\\"System Events\\\" to get short name of first process whose frontmost is true\");\n CODE=(${CODE[*]} \"end GetCurrentApp\");\n CODE=(${CODE[*]} \"tell application GetCurrentApp()\");\n CODE=(${CODE[*]} \"activate\");\n CODE=(${CODE[*]} \"display dialog \\\"${@:-$TEXT}\\\" default answer \\\"\\\" with title \\\"${TITLE}\\\" with icon caution with hidden answer\");\n CODE=(${CODE[*]} \"text returned of result\");\n CODE=(${CODE[*]} \"end tell\");\n SCRIPT=\"/usr/bin/osascript\"\n for LINE in ${CODE[*]}; do\n SCRIPT=\"${SCRIPT} -e $(printf \"%q\" \"${LINE}\")\";\n done;\n eval \"${SCRIPT}\";\n\n\nOtherwise just contact MSC...\n'''\n\nimport getpass, os\n\n\ndef getDirBuildHtml():\n '''Return the html directory\n '''\n from music21 import common\n parentDir = common.getRootFilePath()\n dirBuild = os.path.join(parentDir, 'documentation', 'build')\n dirBuildHtml = os.path.join(dirBuild, 'html')\n return dirBuildHtml\n\n\ndef main():\n\n # this needs to be on level higher then the level of the source\n # DST_MIT = 'athena.dialup.mit.edu:/afs/athena.mit.edu/org/m/music21/doc/'\n remoteHost = 'athena.dialup.mit.edu'\n remoteDir = '/afs/athena.mit.edu/org/m/music21/doc/'\n # tar czpf - -C build/html/ . | ssh cuthbert@linux.mit.edu \"tar xzpf - -C /afs/athena.mit.edu/org/m/music21/doc/\"\n\n user = getpass.getpass('provide user name : ')\n\n\n src = getDirBuildHtml()\n # -r flag makes this recursive\n cmdStr = 'tar czpf - -C %s . | ssh %s@%s \"tar xzpf - -C %s\"' % (src, user, remoteHost, remoteDir)\n # cmdStr = 'scp -r \"%s\" %s@%s' % (src + \"/*\", user, DST_MIT)\n print(cmdStr)\n\n os.system(cmdStr)\n"} +{"text": "package org.zstack.header.identity;\n\n/**\n * Created by frank on 2/26/2016.\n */\npublic interface AfterCreateAccountExtensionPoint {\n void afterCreateAccount(AccountInventory account);\n}\n"} +{"text": "This is a blank file of the .blk extension used for testing in case we have excluded .txt file extensions but need\r\nto force an application update."} +{"text": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n<plist version=\"1.0\">\n<dict>\n\t<key>CFBundleDevelopmentRegion</key>\n\t<string>en</string>\n\t<key>CFBundleDisplayName</key>\n\t<string>${PRODUCT_NAME}</string>\n\t<key>CFBundleExecutable</key>\n\t<string>${EXECUTABLE_NAME}</string>\n\t<key>CFBundleIdentifier</key>\n\t<string>katze.bertieliu.waterflow</string>\n\t<key>CFBundleInfoDictionaryVersion</key>\n\t<string>6.0</string>\n\t<key>CFBundleName</key>\n\t<string>${PRODUCT_NAME}</string>\n\t<key>CFBundlePackageType</key>\n\t<string>APPL</string>\n\t<key>CFBundleShortVersionString</key>\n\t<string>1.0</string>\n\t<key>CFBundleSignature</key>\n\t<string>????</string>\n\t<key>CFBundleVersion</key>\n\t<string>1.0</string>\n\t<key>LSRequiresIPhoneOS</key>\n\t<true/>\n\t<key>UIRequiredDeviceCapabilities</key>\n\t<array>\n\t\t<string>armv7</string>\n\t</array>\n\t<key>UISupportedInterfaceOrientations</key>\n\t<array>\n\t\t<string>UIInterfaceOrientationPortrait</string>\n\t\t<string>UIInterfaceOrientationLandscapeLeft</string>\n\t\t<string>UIInterfaceOrientationLandscapeRight</string>\n\t</array>\n</dict>\n</plist>\n"} +{"text": "using System;\nusing Microsoft.Tools.ServiceModel.Svcutil;\nusing System.Linq;\nusing System.Text.RegularExpressions;\n\nnamespace UpdateServiceRefOptionsExtraOptions\n{\n class Program\n {\n static int Main(string[] args)\n {\n var re = new Regex(@\"'[^\\\"\"]*'|[^\\\"\"^\\s]+|\"\"[^\\\"\"]*\"\"\");\n string optstring = @\"-u -nl -v minimal\";\n string[] opts = re.Matches(optstring).Cast<Match>().Select(m => m.Value).ToArray();\n return Tool.Main(opts);\n }\n }\n}"} +{"text": "// Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n// Generated from the Linux kernel's syscall_32.tbl.\n#ifndef SANDBOX_LINUX_SYSTEM_HEADERS_X86_32_LINUX_SYSCALLS_H_\n#define SANDBOX_LINUX_SYSTEM_HEADERS_X86_32_LINUX_SYSCALLS_H_\n\n#if !defined(__i386__)\n#error \"Including header on wrong architecture\"\n#endif\n\n#if !defined(__NR_restart_syscall)\n#define __NR_restart_syscall 0\n#endif\n\n#if !defined(__NR_exit)\n#define __NR_exit 1\n#endif\n\n#if !defined(__NR_fork)\n#define __NR_fork 2\n#endif\n\n#if !defined(__NR_read)\n#define __NR_read 3\n#endif\n\n#if !defined(__NR_write)\n#define __NR_write 4\n#endif\n\n#if !defined(__NR_open)\n#define __NR_open 5\n#endif\n\n#if !defined(__NR_close)\n#define __NR_close 6\n#endif\n\n#if !defined(__NR_waitpid)\n#define __NR_waitpid 7\n#endif\n\n#if !defined(__NR_creat)\n#define __NR_creat 8\n#endif\n\n#if !defined(__NR_link)\n#define __NR_link 9\n#endif\n\n#if !defined(__NR_unlink)\n#define __NR_unlink 10\n#endif\n\n#if !defined(__NR_execve)\n#define __NR_execve 11\n#endif\n\n#if !defined(__NR_chdir)\n#define __NR_chdir 12\n#endif\n\n#if !defined(__NR_time)\n#define __NR_time 13\n#endif\n\n#if !defined(__NR_mknod)\n#define __NR_mknod 14\n#endif\n\n#if !defined(__NR_chmod)\n#define __NR_chmod 15\n#endif\n\n#if !defined(__NR_lchown)\n#define __NR_lchown 16\n#endif\n\n#if !defined(__NR_break)\n#define __NR_break 17\n#endif\n\n#if !defined(__NR_oldstat)\n#define __NR_oldstat 18\n#endif\n\n#if !defined(__NR_lseek)\n#define __NR_lseek 19\n#endif\n\n#if !defined(__NR_getpid)\n#define __NR_getpid 20\n#endif\n\n#if !defined(__NR_mount)\n#define __NR_mount 21\n#endif\n\n#if !defined(__NR_umount)\n#define __NR_umount 22\n#endif\n\n#if !defined(__NR_setuid)\n#define __NR_setuid 23\n#endif\n\n#if !defined(__NR_getuid)\n#define __NR_getuid 24\n#endif\n\n#if !defined(__NR_stime)\n#define __NR_stime 25\n#endif\n\n#if !defined(__NR_ptrace)\n#define __NR_ptrace 26\n#endif\n\n#if !defined(__NR_alarm)\n#define __NR_alarm 27\n#endif\n\n#if !defined(__NR_oldfstat)\n#define __NR_oldfstat 28\n#endif\n\n#if !defined(__NR_pause)\n#define __NR_pause 29\n#endif\n\n#if !defined(__NR_utime)\n#define __NR_utime 30\n#endif\n\n#if !defined(__NR_stty)\n#define __NR_stty 31\n#endif\n\n#if !defined(__NR_gtty)\n#define __NR_gtty 32\n#endif\n\n#if !defined(__NR_access)\n#define __NR_access 33\n#endif\n\n#if !defined(__NR_nice)\n#define __NR_nice 34\n#endif\n\n#if !defined(__NR_ftime)\n#define __NR_ftime 35\n#endif\n\n#if !defined(__NR_sync)\n#define __NR_sync 36\n#endif\n\n#if !defined(__NR_kill)\n#define __NR_kill 37\n#endif\n\n#if !defined(__NR_rename)\n#define __NR_rename 38\n#endif\n\n#if !defined(__NR_mkdir)\n#define __NR_mkdir 39\n#endif\n\n#if !defined(__NR_rmdir)\n#define __NR_rmdir 40\n#endif\n\n#if !defined(__NR_dup)\n#define __NR_dup 41\n#endif\n\n#if !defined(__NR_pipe)\n#define __NR_pipe 42\n#endif\n\n#if !defined(__NR_times)\n#define __NR_times 43\n#endif\n\n#if !defined(__NR_prof)\n#define __NR_prof 44\n#endif\n\n#if !defined(__NR_brk)\n#define __NR_brk 45\n#endif\n\n#if !defined(__NR_setgid)\n#define __NR_setgid 46\n#endif\n\n#if !defined(__NR_getgid)\n#define __NR_getgid 47\n#endif\n\n#if !defined(__NR_signal)\n#define __NR_signal 48\n#endif\n\n#if !defined(__NR_geteuid)\n#define __NR_geteuid 49\n#endif\n\n#if !defined(__NR_getegid)\n#define __NR_getegid 50\n#endif\n\n#if !defined(__NR_acct)\n#define __NR_acct 51\n#endif\n\n#if !defined(__NR_umount2)\n#define __NR_umount2 52\n#endif\n\n#if !defined(__NR_lock)\n#define __NR_lock 53\n#endif\n\n#if !defined(__NR_ioctl)\n#define __NR_ioctl 54\n#endif\n\n#if !defined(__NR_fcntl)\n#define __NR_fcntl 55\n#endif\n\n#if !defined(__NR_mpx)\n#define __NR_mpx 56\n#endif\n\n#if !defined(__NR_setpgid)\n#define __NR_setpgid 57\n#endif\n\n#if !defined(__NR_ulimit)\n#define __NR_ulimit 58\n#endif\n\n#if !defined(__NR_oldolduname)\n#define __NR_oldolduname 59\n#endif\n\n#if !defined(__NR_umask)\n#define __NR_umask 60\n#endif\n\n#if !defined(__NR_chroot)\n#define __NR_chroot 61\n#endif\n\n#if !defined(__NR_ustat)\n#define __NR_ustat 62\n#endif\n\n#if !defined(__NR_dup2)\n#define __NR_dup2 63\n#endif\n\n#if !defined(__NR_getppid)\n#define __NR_getppid 64\n#endif\n\n#if !defined(__NR_getpgrp)\n#define __NR_getpgrp 65\n#endif\n\n#if !defined(__NR_setsid)\n#define __NR_setsid 66\n#endif\n\n#if !defined(__NR_sigaction)\n#define __NR_sigaction 67\n#endif\n\n#if !defined(__NR_sgetmask)\n#define __NR_sgetmask 68\n#endif\n\n#if !defined(__NR_ssetmask)\n#define __NR_ssetmask 69\n#endif\n\n#if !defined(__NR_setreuid)\n#define __NR_setreuid 70\n#endif\n\n#if !defined(__NR_setregid)\n#define __NR_setregid 71\n#endif\n\n#if !defined(__NR_sigsuspend)\n#define __NR_sigsuspend 72\n#endif\n\n#if !defined(__NR_sigpending)\n#define __NR_sigpending 73\n#endif\n\n#if !defined(__NR_sethostname)\n#define __NR_sethostname 74\n#endif\n\n#if !defined(__NR_setrlimit)\n#define __NR_setrlimit 75\n#endif\n\n#if !defined(__NR_getrlimit)\n#define __NR_getrlimit 76\n#endif\n\n#if !defined(__NR_getrusage)\n#define __NR_getrusage 77\n#endif\n\n#if !defined(__NR_gettimeofday)\n#define __NR_gettimeofday 78\n#endif\n\n#if !defined(__NR_settimeofday)\n#define __NR_settimeofday 79\n#endif\n\n#if !defined(__NR_getgroups)\n#define __NR_getgroups 80\n#endif\n\n#if !defined(__NR_setgroups)\n#define __NR_setgroups 81\n#endif\n\n#if !defined(__NR_select)\n#define __NR_select 82\n#endif\n\n#if !defined(__NR_symlink)\n#define __NR_symlink 83\n#endif\n\n#if !defined(__NR_oldlstat)\n#define __NR_oldlstat 84\n#endif\n\n#if !defined(__NR_readlink)\n#define __NR_readlink 85\n#endif\n\n#if !defined(__NR_uselib)\n#define __NR_uselib 86\n#endif\n\n#if !defined(__NR_swapon)\n#define __NR_swapon 87\n#endif\n\n#if !defined(__NR_reboot)\n#define __NR_reboot 88\n#endif\n\n#if !defined(__NR_readdir)\n#define __NR_readdir 89\n#endif\n\n#if !defined(__NR_mmap)\n#define __NR_mmap 90\n#endif\n\n#if !defined(__NR_munmap)\n#define __NR_munmap 91\n#endif\n\n#if !defined(__NR_truncate)\n#define __NR_truncate 92\n#endif\n\n#if !defined(__NR_ftruncate)\n#define __NR_ftruncate 93\n#endif\n\n#if !defined(__NR_fchmod)\n#define __NR_fchmod 94\n#endif\n\n#if !defined(__NR_fchown)\n#define __NR_fchown 95\n#endif\n\n#if !defined(__NR_getpriority)\n#define __NR_getpriority 96\n#endif\n\n#if !defined(__NR_setpriority)\n#define __NR_setpriority 97\n#endif\n\n#if !defined(__NR_profil)\n#define __NR_profil 98\n#endif\n\n#if !defined(__NR_statfs)\n#define __NR_statfs 99\n#endif\n\n#if !defined(__NR_fstatfs)\n#define __NR_fstatfs 100\n#endif\n\n#if !defined(__NR_ioperm)\n#define __NR_ioperm 101\n#endif\n\n#if !defined(__NR_socketcall)\n#define __NR_socketcall 102\n#endif\n\n#if !defined(__NR_syslog)\n#define __NR_syslog 103\n#endif\n\n#if !defined(__NR_setitimer)\n#define __NR_setitimer 104\n#endif\n\n#if !defined(__NR_getitimer)\n#define __NR_getitimer 105\n#endif\n\n#if !defined(__NR_stat)\n#define __NR_stat 106\n#endif\n\n#if !defined(__NR_lstat)\n#define __NR_lstat 107\n#endif\n\n#if !defined(__NR_fstat)\n#define __NR_fstat 108\n#endif\n\n#if !defined(__NR_olduname)\n#define __NR_olduname 109\n#endif\n\n#if !defined(__NR_iopl)\n#define __NR_iopl 110\n#endif\n\n#if !defined(__NR_vhangup)\n#define __NR_vhangup 111\n#endif\n\n#if !defined(__NR_idle)\n#define __NR_idle 112\n#endif\n\n#if !defined(__NR_vm86old)\n#define __NR_vm86old 113\n#endif\n\n#if !defined(__NR_wait4)\n#define __NR_wait4 114\n#endif\n\n#if !defined(__NR_swapoff)\n#define __NR_swapoff 115\n#endif\n\n#if !defined(__NR_sysinfo)\n#define __NR_sysinfo 116\n#endif\n\n#if !defined(__NR_ipc)\n#define __NR_ipc 117\n#endif\n\n#if !defined(__NR_fsync)\n#define __NR_fsync 118\n#endif\n\n#if !defined(__NR_sigreturn)\n#define __NR_sigreturn 119\n#endif\n\n#if !defined(__NR_clone)\n#define __NR_clone 120\n#endif\n\n#if !defined(__NR_setdomainname)\n#define __NR_setdomainname 121\n#endif\n\n#if !defined(__NR_uname)\n#define __NR_uname 122\n#endif\n\n#if !defined(__NR_modify_ldt)\n#define __NR_modify_ldt 123\n#endif\n\n#if !defined(__NR_adjtimex)\n#define __NR_adjtimex 124\n#endif\n\n#if !defined(__NR_mprotect)\n#define __NR_mprotect 125\n#endif\n\n#if !defined(__NR_sigprocmask)\n#define __NR_sigprocmask 126\n#endif\n\n#if !defined(__NR_create_module)\n#define __NR_create_module 127\n#endif\n\n#if !defined(__NR_init_module)\n#define __NR_init_module 128\n#endif\n\n#if !defined(__NR_delete_module)\n#define __NR_delete_module 129\n#endif\n\n#if !defined(__NR_get_kernel_syms)\n#define __NR_get_kernel_syms 130\n#endif\n\n#if !defined(__NR_quotactl)\n#define __NR_quotactl 131\n#endif\n\n#if !defined(__NR_getpgid)\n#define __NR_getpgid 132\n#endif\n\n#if !defined(__NR_fchdir)\n#define __NR_fchdir 133\n#endif\n\n#if !defined(__NR_bdflush)\n#define __NR_bdflush 134\n#endif\n\n#if !defined(__NR_sysfs)\n#define __NR_sysfs 135\n#endif\n\n#if !defined(__NR_personality)\n#define __NR_personality 136\n#endif\n\n#if !defined(__NR_afs_syscall)\n#define __NR_afs_syscall 137\n#endif\n\n#if !defined(__NR_setfsuid)\n#define __NR_setfsuid 138\n#endif\n\n#if !defined(__NR_setfsgid)\n#define __NR_setfsgid 139\n#endif\n\n#if !defined(__NR__llseek)\n#define __NR__llseek 140\n#endif\n\n#if !defined(__NR_getdents)\n#define __NR_getdents 141\n#endif\n\n#if !defined(__NR__newselect)\n#define __NR__newselect 142\n#endif\n\n#if !defined(__NR_flock)\n#define __NR_flock 143\n#endif\n\n#if !defined(__NR_msync)\n#define __NR_msync 144\n#endif\n\n#if !defined(__NR_readv)\n#define __NR_readv 145\n#endif\n\n#if !defined(__NR_writev)\n#define __NR_writev 146\n#endif\n\n#if !defined(__NR_getsid)\n#define __NR_getsid 147\n#endif\n\n#if !defined(__NR_fdatasync)\n#define __NR_fdatasync 148\n#endif\n\n#if !defined(__NR__sysctl)\n#define __NR__sysctl 149\n#endif\n\n#if !defined(__NR_mlock)\n#define __NR_mlock 150\n#endif\n\n#if !defined(__NR_munlock)\n#define __NR_munlock 151\n#endif\n\n#if !defined(__NR_mlockall)\n#define __NR_mlockall 152\n#endif\n\n#if !defined(__NR_munlockall)\n#define __NR_munlockall 153\n#endif\n\n#if !defined(__NR_sched_setparam)\n#define __NR_sched_setparam 154\n#endif\n\n#if !defined(__NR_sched_getparam)\n#define __NR_sched_getparam 155\n#endif\n\n#if !defined(__NR_sched_setscheduler)\n#define __NR_sched_setscheduler 156\n#endif\n\n#if !defined(__NR_sched_getscheduler)\n#define __NR_sched_getscheduler 157\n#endif\n\n#if !defined(__NR_sched_yield)\n#define __NR_sched_yield 158\n#endif\n\n#if !defined(__NR_sched_get_priority_max)\n#define __NR_sched_get_priority_max 159\n#endif\n\n#if !defined(__NR_sched_get_priority_min)\n#define __NR_sched_get_priority_min 160\n#endif\n\n#if !defined(__NR_sched_rr_get_interval)\n#define __NR_sched_rr_get_interval 161\n#endif\n\n#if !defined(__NR_nanosleep)\n#define __NR_nanosleep 162\n#endif\n\n#if !defined(__NR_mremap)\n#define __NR_mremap 163\n#endif\n\n#if !defined(__NR_setresuid)\n#define __NR_setresuid 164\n#endif\n\n#if !defined(__NR_getresuid)\n#define __NR_getresuid 165\n#endif\n\n#if !defined(__NR_vm86)\n#define __NR_vm86 166\n#endif\n\n#if !defined(__NR_query_module)\n#define __NR_query_module 167\n#endif\n\n#if !defined(__NR_poll)\n#define __NR_poll 168\n#endif\n\n#if !defined(__NR_nfsservctl)\n#define __NR_nfsservctl 169\n#endif\n\n#if !defined(__NR_setresgid)\n#define __NR_setresgid 170\n#endif\n\n#if !defined(__NR_getresgid)\n#define __NR_getresgid 171\n#endif\n\n#if !defined(__NR_prctl)\n#define __NR_prctl 172\n#endif\n\n#if !defined(__NR_rt_sigreturn)\n#define __NR_rt_sigreturn 173\n#endif\n\n#if !defined(__NR_rt_sigaction)\n#define __NR_rt_sigaction 174\n#endif\n\n#if !defined(__NR_rt_sigprocmask)\n#define __NR_rt_sigprocmask 175\n#endif\n\n#if !defined(__NR_rt_sigpending)\n#define __NR_rt_sigpending 176\n#endif\n\n#if !defined(__NR_rt_sigtimedwait)\n#define __NR_rt_sigtimedwait 177\n#endif\n\n#if !defined(__NR_rt_sigqueueinfo)\n#define __NR_rt_sigqueueinfo 178\n#endif\n\n#if !defined(__NR_rt_sigsuspend)\n#define __NR_rt_sigsuspend 179\n#endif\n\n#if !defined(__NR_pread64)\n#define __NR_pread64 180\n#endif\n\n#if !defined(__NR_pwrite64)\n#define __NR_pwrite64 181\n#endif\n\n#if !defined(__NR_chown)\n#define __NR_chown 182\n#endif\n\n#if !defined(__NR_getcwd)\n#define __NR_getcwd 183\n#endif\n\n#if !defined(__NR_capget)\n#define __NR_capget 184\n#endif\n\n#if !defined(__NR_capset)\n#define __NR_capset 185\n#endif\n\n#if !defined(__NR_sigaltstack)\n#define __NR_sigaltstack 186\n#endif\n\n#if !defined(__NR_sendfile)\n#define __NR_sendfile 187\n#endif\n\n#if !defined(__NR_getpmsg)\n#define __NR_getpmsg 188\n#endif\n\n#if !defined(__NR_putpmsg)\n#define __NR_putpmsg 189\n#endif\n\n#if !defined(__NR_vfork)\n#define __NR_vfork 190\n#endif\n\n#if !defined(__NR_ugetrlimit)\n#define __NR_ugetrlimit 191\n#endif\n\n#if !defined(__NR_mmap2)\n#define __NR_mmap2 192\n#endif\n\n#if !defined(__NR_truncate64)\n#define __NR_truncate64 193\n#endif\n\n#if !defined(__NR_ftruncate64)\n#define __NR_ftruncate64 194\n#endif\n\n#if !defined(__NR_stat64)\n#define __NR_stat64 195\n#endif\n\n#if !defined(__NR_lstat64)\n#define __NR_lstat64 196\n#endif\n\n#if !defined(__NR_fstat64)\n#define __NR_fstat64 197\n#endif\n\n#if !defined(__NR_lchown32)\n#define __NR_lchown32 198\n#endif\n\n#if !defined(__NR_getuid32)\n#define __NR_getuid32 199\n#endif\n\n#if !defined(__NR_getgid32)\n#define __NR_getgid32 200\n#endif\n\n#if !defined(__NR_geteuid32)\n#define __NR_geteuid32 201\n#endif\n\n#if !defined(__NR_getegid32)\n#define __NR_getegid32 202\n#endif\n\n#if !defined(__NR_setreuid32)\n#define __NR_setreuid32 203\n#endif\n\n#if !defined(__NR_setregid32)\n#define __NR_setregid32 204\n#endif\n\n#if !defined(__NR_getgroups32)\n#define __NR_getgroups32 205\n#endif\n\n#if !defined(__NR_setgroups32)\n#define __NR_setgroups32 206\n#endif\n\n#if !defined(__NR_fchown32)\n#define __NR_fchown32 207\n#endif\n\n#if !defined(__NR_setresuid32)\n#define __NR_setresuid32 208\n#endif\n\n#if !defined(__NR_getresuid32)\n#define __NR_getresuid32 209\n#endif\n\n#if !defined(__NR_setresgid32)\n#define __NR_setresgid32 210\n#endif\n\n#if !defined(__NR_getresgid32)\n#define __NR_getresgid32 211\n#endif\n\n#if !defined(__NR_chown32)\n#define __NR_chown32 212\n#endif\n\n#if !defined(__NR_setuid32)\n#define __NR_setuid32 213\n#endif\n\n#if !defined(__NR_setgid32)\n#define __NR_setgid32 214\n#endif\n\n#if !defined(__NR_setfsuid32)\n#define __NR_setfsuid32 215\n#endif\n\n#if !defined(__NR_setfsgid32)\n#define __NR_setfsgid32 216\n#endif\n\n#if !defined(__NR_pivot_root)\n#define __NR_pivot_root 217\n#endif\n\n#if !defined(__NR_mincore)\n#define __NR_mincore 218\n#endif\n\n#if !defined(__NR_madvise)\n#define __NR_madvise 219\n#endif\n\n#if !defined(__NR_getdents64)\n#define __NR_getdents64 220\n#endif\n\n#if !defined(__NR_fcntl64)\n#define __NR_fcntl64 221\n#endif\n\n#if !defined(__NR_gettid)\n#define __NR_gettid 224\n#endif\n\n#if !defined(__NR_readahead)\n#define __NR_readahead 225\n#endif\n\n#if !defined(__NR_setxattr)\n#define __NR_setxattr 226\n#endif\n\n#if !defined(__NR_lsetxattr)\n#define __NR_lsetxattr 227\n#endif\n\n#if !defined(__NR_fsetxattr)\n#define __NR_fsetxattr 228\n#endif\n\n#if !defined(__NR_getxattr)\n#define __NR_getxattr 229\n#endif\n\n#if !defined(__NR_lgetxattr)\n#define __NR_lgetxattr 230\n#endif\n\n#if !defined(__NR_fgetxattr)\n#define __NR_fgetxattr 231\n#endif\n\n#if !defined(__NR_listxattr)\n#define __NR_listxattr 232\n#endif\n\n#if !defined(__NR_llistxattr)\n#define __NR_llistxattr 233\n#endif\n\n#if !defined(__NR_flistxattr)\n#define __NR_flistxattr 234\n#endif\n\n#if !defined(__NR_removexattr)\n#define __NR_removexattr 235\n#endif\n\n#if !defined(__NR_lremovexattr)\n#define __NR_lremovexattr 236\n#endif\n\n#if !defined(__NR_fremovexattr)\n#define __NR_fremovexattr 237\n#endif\n\n#if !defined(__NR_tkill)\n#define __NR_tkill 238\n#endif\n\n#if !defined(__NR_sendfile64)\n#define __NR_sendfile64 239\n#endif\n\n#if !defined(__NR_futex)\n#define __NR_futex 240\n#endif\n\n#if !defined(__NR_sched_setaffinity)\n#define __NR_sched_setaffinity 241\n#endif\n\n#if !defined(__NR_sched_getaffinity)\n#define __NR_sched_getaffinity 242\n#endif\n\n#if !defined(__NR_set_thread_area)\n#define __NR_set_thread_area 243\n#endif\n\n#if !defined(__NR_get_thread_area)\n#define __NR_get_thread_area 244\n#endif\n\n#if !defined(__NR_io_setup)\n#define __NR_io_setup 245\n#endif\n\n#if !defined(__NR_io_destroy)\n#define __NR_io_destroy 246\n#endif\n\n#if !defined(__NR_io_getevents)\n#define __NR_io_getevents 247\n#endif\n\n#if !defined(__NR_io_submit)\n#define __NR_io_submit 248\n#endif\n\n#if !defined(__NR_io_cancel)\n#define __NR_io_cancel 249\n#endif\n\n#if !defined(__NR_fadvise64)\n#define __NR_fadvise64 250\n#endif\n\n#if !defined(__NR_exit_group)\n#define __NR_exit_group 252\n#endif\n\n#if !defined(__NR_lookup_dcookie)\n#define __NR_lookup_dcookie 253\n#endif\n\n#if !defined(__NR_epoll_create)\n#define __NR_epoll_create 254\n#endif\n\n#if !defined(__NR_epoll_ctl)\n#define __NR_epoll_ctl 255\n#endif\n\n#if !defined(__NR_epoll_wait)\n#define __NR_epoll_wait 256\n#endif\n\n#if !defined(__NR_remap_file_pages)\n#define __NR_remap_file_pages 257\n#endif\n\n#if !defined(__NR_set_tid_address)\n#define __NR_set_tid_address 258\n#endif\n\n#if !defined(__NR_timer_create)\n#define __NR_timer_create 259\n#endif\n\n#if !defined(__NR_timer_settime)\n#define __NR_timer_settime 260\n#endif\n\n#if !defined(__NR_timer_gettime)\n#define __NR_timer_gettime 261\n#endif\n\n#if !defined(__NR_timer_getoverrun)\n#define __NR_timer_getoverrun 262\n#endif\n\n#if !defined(__NR_timer_delete)\n#define __NR_timer_delete 263\n#endif\n\n#if !defined(__NR_clock_settime)\n#define __NR_clock_settime 264\n#endif\n\n#if !defined(__NR_clock_gettime)\n#define __NR_clock_gettime 265\n#endif\n\n#if !defined(__NR_clock_getres)\n#define __NR_clock_getres 266\n#endif\n\n#if !defined(__NR_clock_nanosleep)\n#define __NR_clock_nanosleep 267\n#endif\n\n#if !defined(__NR_statfs64)\n#define __NR_statfs64 268\n#endif\n\n#if !defined(__NR_fstatfs64)\n#define __NR_fstatfs64 269\n#endif\n\n#if !defined(__NR_tgkill)\n#define __NR_tgkill 270\n#endif\n\n#if !defined(__NR_utimes)\n#define __NR_utimes 271\n#endif\n\n#if !defined(__NR_fadvise64_64)\n#define __NR_fadvise64_64 272\n#endif\n\n#if !defined(__NR_vserver)\n#define __NR_vserver 273\n#endif\n\n#if !defined(__NR_mbind)\n#define __NR_mbind 274\n#endif\n\n#if !defined(__NR_get_mempolicy)\n#define __NR_get_mempolicy 275\n#endif\n\n#if !defined(__NR_set_mempolicy)\n#define __NR_set_mempolicy 276\n#endif\n\n#if !defined(__NR_mq_open)\n#define __NR_mq_open 277\n#endif\n\n#if !defined(__NR_mq_unlink)\n#define __NR_mq_unlink 278\n#endif\n\n#if !defined(__NR_mq_timedsend)\n#define __NR_mq_timedsend 279\n#endif\n\n#if !defined(__NR_mq_timedreceive)\n#define __NR_mq_timedreceive 280\n#endif\n\n#if !defined(__NR_mq_notify)\n#define __NR_mq_notify 281\n#endif\n\n#if !defined(__NR_mq_getsetattr)\n#define __NR_mq_getsetattr 282\n#endif\n\n#if !defined(__NR_kexec_load)\n#define __NR_kexec_load 283\n#endif\n\n#if !defined(__NR_waitid)\n#define __NR_waitid 284\n#endif\n\n#if !defined(__NR_add_key)\n#define __NR_add_key 286\n#endif\n\n#if !defined(__NR_request_key)\n#define __NR_request_key 287\n#endif\n\n#if !defined(__NR_keyctl)\n#define __NR_keyctl 288\n#endif\n\n#if !defined(__NR_ioprio_set)\n#define __NR_ioprio_set 289\n#endif\n\n#if !defined(__NR_ioprio_get)\n#define __NR_ioprio_get 290\n#endif\n\n#if !defined(__NR_inotify_init)\n#define __NR_inotify_init 291\n#endif\n\n#if !defined(__NR_inotify_add_watch)\n#define __NR_inotify_add_watch 292\n#endif\n\n#if !defined(__NR_inotify_rm_watch)\n#define __NR_inotify_rm_watch 293\n#endif\n\n#if !defined(__NR_migrate_pages)\n#define __NR_migrate_pages 294\n#endif\n\n#if !defined(__NR_openat)\n#define __NR_openat 295\n#endif\n\n#if !defined(__NR_mkdirat)\n#define __NR_mkdirat 296\n#endif\n\n#if !defined(__NR_mknodat)\n#define __NR_mknodat 297\n#endif\n\n#if !defined(__NR_fchownat)\n#define __NR_fchownat 298\n#endif\n\n#if !defined(__NR_futimesat)\n#define __NR_futimesat 299\n#endif\n\n#if !defined(__NR_fstatat64)\n#define __NR_fstatat64 300\n#endif\n\n#if !defined(__NR_unlinkat)\n#define __NR_unlinkat 301\n#endif\n\n#if !defined(__NR_renameat)\n#define __NR_renameat 302\n#endif\n\n#if !defined(__NR_linkat)\n#define __NR_linkat 303\n#endif\n\n#if !defined(__NR_symlinkat)\n#define __NR_symlinkat 304\n#endif\n\n#if !defined(__NR_readlinkat)\n#define __NR_readlinkat 305\n#endif\n\n#if !defined(__NR_fchmodat)\n#define __NR_fchmodat 306\n#endif\n\n#if !defined(__NR_faccessat)\n#define __NR_faccessat 307\n#endif\n\n#if !defined(__NR_pselect6)\n#define __NR_pselect6 308\n#endif\n\n#if !defined(__NR_ppoll)\n#define __NR_ppoll 309\n#endif\n\n#if !defined(__NR_unshare)\n#define __NR_unshare 310\n#endif\n\n#if !defined(__NR_set_robust_list)\n#define __NR_set_robust_list 311\n#endif\n\n#if !defined(__NR_get_robust_list)\n#define __NR_get_robust_list 312\n#endif\n\n#if !defined(__NR_splice)\n#define __NR_splice 313\n#endif\n\n#if !defined(__NR_sync_file_range)\n#define __NR_sync_file_range 314\n#endif\n\n#if !defined(__NR_tee)\n#define __NR_tee 315\n#endif\n\n#if !defined(__NR_vmsplice)\n#define __NR_vmsplice 316\n#endif\n\n#if !defined(__NR_move_pages)\n#define __NR_move_pages 317\n#endif\n\n#if !defined(__NR_getcpu)\n#define __NR_getcpu 318\n#endif\n\n#if !defined(__NR_epoll_pwait)\n#define __NR_epoll_pwait 319\n#endif\n\n#if !defined(__NR_utimensat)\n#define __NR_utimensat 320\n#endif\n\n#if !defined(__NR_signalfd)\n#define __NR_signalfd 321\n#endif\n\n#if !defined(__NR_timerfd_create)\n#define __NR_timerfd_create 322\n#endif\n\n#if !defined(__NR_eventfd)\n#define __NR_eventfd 323\n#endif\n\n#if !defined(__NR_fallocate)\n#define __NR_fallocate 324\n#endif\n\n#if !defined(__NR_timerfd_settime)\n#define __NR_timerfd_settime 325\n#endif\n\n#if !defined(__NR_timerfd_gettime)\n#define __NR_timerfd_gettime 326\n#endif\n\n#if !defined(__NR_signalfd4)\n#define __NR_signalfd4 327\n#endif\n\n#if !defined(__NR_eventfd2)\n#define __NR_eventfd2 328\n#endif\n\n#if !defined(__NR_epoll_create1)\n#define __NR_epoll_create1 329\n#endif\n\n#if !defined(__NR_dup3)\n#define __NR_dup3 330\n#endif\n\n#if !defined(__NR_pipe2)\n#define __NR_pipe2 331\n#endif\n\n#if !defined(__NR_inotify_init1)\n#define __NR_inotify_init1 332\n#endif\n\n#if !defined(__NR_preadv)\n#define __NR_preadv 333\n#endif\n\n#if !defined(__NR_pwritev)\n#define __NR_pwritev 334\n#endif\n\n#if !defined(__NR_rt_tgsigqueueinfo)\n#define __NR_rt_tgsigqueueinfo 335\n#endif\n\n#if !defined(__NR_perf_event_open)\n#define __NR_perf_event_open 336\n#endif\n\n#if !defined(__NR_recvmmsg)\n#define __NR_recvmmsg 337\n#endif\n\n#if !defined(__NR_fanotify_init)\n#define __NR_fanotify_init 338\n#endif\n\n#if !defined(__NR_fanotify_mark)\n#define __NR_fanotify_mark 339\n#endif\n\n#if !defined(__NR_prlimit64)\n#define __NR_prlimit64 340\n#endif\n\n#if !defined(__NR_name_to_handle_at)\n#define __NR_name_to_handle_at 341\n#endif\n\n#if !defined(__NR_open_by_handle_at)\n#define __NR_open_by_handle_at 342\n#endif\n\n#if !defined(__NR_clock_adjtime)\n#define __NR_clock_adjtime 343\n#endif\n\n#if !defined(__NR_syncfs)\n#define __NR_syncfs 344\n#endif\n\n#if !defined(__NR_sendmmsg)\n#define __NR_sendmmsg 345\n#endif\n\n#if !defined(__NR_setns)\n#define __NR_setns 346\n#endif\n\n#if !defined(__NR_process_vm_readv)\n#define __NR_process_vm_readv 347\n#endif\n\n#if !defined(__NR_process_vm_writev)\n#define __NR_process_vm_writev 348\n#endif\n\n#if !defined(__NR_kcmp)\n#define __NR_kcmp 349\n#endif\n\n#if !defined(__NR_finit_module)\n#define __NR_finit_module 350\n#endif\n\n#if !defined(__NR_sched_setattr)\n#define __NR_sched_setattr 351\n#endif\n\n#if !defined(__NR_sched_getattr)\n#define __NR_sched_getattr 352\n#endif\n\n#if !defined(__NR_renameat2)\n#define __NR_renameat2 353\n#endif\n\n#if !defined(__NR_seccomp)\n#define __NR_seccomp 354\n#endif\n\n#if !defined(__NR_getrandom)\n#define __NR_getrandom 355\n#endif\n\n#if !defined(__NR_memfd_create)\n#define __NR_memfd_create 356\n#endif\n\n#if !defined(__NR_bpf)\n#define __NR_bpf 357\n#endif\n\n#if !defined(__NR_execveat)\n#define __NR_execveat 358\n#endif\n\n#if !defined(__NR_socket)\n#define __NR_socket 359\n#endif\n\n#if !defined(__NR_socketpair)\n#define __NR_socketpair 360\n#endif\n\n#if !defined(__NR_bind)\n#define __NR_bind 361\n#endif\n\n#if !defined(__NR_connect)\n#define __NR_connect 362\n#endif\n\n#if !defined(__NR_listen)\n#define __NR_listen 363\n#endif\n\n#if !defined(__NR_accept4)\n#define __NR_accept4 364\n#endif\n\n#if !defined(__NR_getsockopt)\n#define __NR_getsockopt 365\n#endif\n\n#if !defined(__NR_setsockopt)\n#define __NR_setsockopt 366\n#endif\n\n#if !defined(__NR_getsockname)\n#define __NR_getsockname 367\n#endif\n\n#if !defined(__NR_getpeername)\n#define __NR_getpeername 368\n#endif\n\n#if !defined(__NR_sendto)\n#define __NR_sendto 369\n#endif\n\n#if !defined(__NR_sendmsg)\n#define __NR_sendmsg 370\n#endif\n\n#if !defined(__NR_recvfrom)\n#define __NR_recvfrom 371\n#endif\n\n#if !defined(__NR_recvmsg)\n#define __NR_recvmsg 372\n#endif\n\n#if !defined(__NR_shutdown)\n#define __NR_shutdown 373\n#endif\n\n#endif // SANDBOX_LINUX_SYSTEM_HEADERS_X86_32_LINUX_SYSCALLS_H_\n\n"} +{"text": "/*!\n * Angular Material Design\n * https://github.com/angular/material\n * @license MIT\n * v0.7.0-rc3\n */\nmd-switch {\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center; }\n md-switch .md-container {\n cursor: -webkit-grab;\n cursor: grab;\n width: 36px;\n height: 24px;\n position: relative;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n margin-right: 8px; }\n md-switch:not([disabled]) .md-dragging, md-switch:not([disabled]).md-dragging .md-container {\n cursor: -webkit-grabbing;\n cursor: grabbing; }\n md-switch .md-label {\n border-color: transparent;\n border-width: 1px; }\n md-switch .md-bar {\n left: 1px;\n width: 34px;\n top: 5px;\n height: 14px;\n border-radius: 8px;\n position: absolute; }\n md-switch .md-thumb-container {\n top: 2px;\n left: 0;\n width: 16px;\n position: absolute;\n -webkit-transform: translate3d(0, 0, 0);\n transform: translate3d(0, 0, 0);\n z-index: 1; }\n md-switch.md-checked .md-thumb-container {\n -webkit-transform: translate3d(100%, 0, 0);\n transform: translate3d(100%, 0, 0); }\n md-switch .md-thumb {\n position: absolute;\n margin: 0;\n left: 0;\n top: 0;\n outline: none;\n height: 20px;\n width: 20px;\n border-radius: 50%;\n box-shadow: 0px 2px 5px 0 rgba(0, 0, 0, 0.26); }\n md-switch .md-thumb .md-ripple-container {\n position: absolute;\n display: block;\n width: auto;\n height: auto;\n left: -20px;\n top: -20px;\n right: -20px;\n bottom: -20px; }\n md-switch:not(.md-dragging) .md-bar, md-switch:not(.md-dragging) .md-thumb-container, md-switch:not(.md-dragging) .md-thumb {\n -webkit-transition: all 0.5s cubic-bezier(0.35, 0, 0.25, 1);\n transition: all 0.5s cubic-bezier(0.35, 0, 0.25, 1);\n -webkit-transition-property: -webkit-transform, background-color;\n transition-property: transform, background-color; }\n md-switch:not(.md-dragging) .md-bar, md-switch:not(.md-dragging) .md-thumb {\n -webkit-transition-delay: 0.05s;\n transition-delay: 0.05s; }\n"} +{"text": "{\n \"network\": [\n [\n \"probeNetwork - default - end\",\n 0,\n 0\n ],\n [\n \"probeNetwork - default - start\",\n 0,\n 0\n ]\n ],\n \"gfx\": [\n [\n \"probeGFX - default - end\",\n 4,\n 15,\n 13,\n 1,\n [\n 229376,\n 229376\n ],\n [\n 742,\n 742\n ],\n [\n 3088,\n 3088\n ]\n ]\n ]\n}"} +{"text": "> project test-dot-file-generation\n> check\n"} +{"text": "fileFormatVersion: 2\nguid: ca301e5cc8db79c46a5b573f541969c8\ntimeCreated: 1455194358\nlicenseType: Pro\nMonoImporter:\n serializedVersion: 2\n defaultReferences: []\n executionOrder: 0\n icon: {instanceID: 0}\n userData: \n assetBundleName: \n assetBundleVariant: \n"} +{"text": "/*\nCopyright 2014 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\npackage json\n\nimport (\n\t\"encoding/json\"\n\t\"io\"\n\t\"strconv\"\n\t\"unsafe\"\n\n\tjsoniter \"github.com/json-iterator/go\"\n\t\"github.com/modern-go/reflect2\"\n\t\"sigs.k8s.io/yaml\"\n\n\t\"k8s.io/apimachinery/pkg/runtime\"\n\t\"k8s.io/apimachinery/pkg/runtime/schema\"\n\t\"k8s.io/apimachinery/pkg/runtime/serializer/recognizer\"\n\t\"k8s.io/apimachinery/pkg/util/framer\"\n\tutilyaml \"k8s.io/apimachinery/pkg/util/yaml\"\n\t\"k8s.io/klog\"\n)\n\n// NewSerializer creates a JSON serializer that handles encoding versioned objects into the proper JSON form. If typer\n// is not nil, the object has the group, version, and kind fields set.\n// Deprecated: use NewSerializerWithOptions instead.\nfunc NewSerializer(meta MetaFactory, creater runtime.ObjectCreater, typer runtime.ObjectTyper, pretty bool) *Serializer {\n\treturn NewSerializerWithOptions(meta, creater, typer, SerializerOptions{false, pretty, false})\n}\n\n// NewYAMLSerializer creates a YAML serializer that handles encoding versioned objects into the proper YAML form. If typer\n// is not nil, the object has the group, version, and kind fields set. This serializer supports only the subset of YAML that\n// matches JSON, and will error if constructs are used that do not serialize to JSON.\n// Deprecated: use NewSerializerWithOptions instead.\nfunc NewYAMLSerializer(meta MetaFactory, creater runtime.ObjectCreater, typer runtime.ObjectTyper) *Serializer {\n\treturn NewSerializerWithOptions(meta, creater, typer, SerializerOptions{true, false, false})\n}\n\n// NewSerializerWithOptions creates a JSON/YAML serializer that handles encoding versioned objects into the proper JSON/YAML\n// form. If typer is not nil, the object has the group, version, and kind fields set. Options are copied into the Serializer\n// and are immutable.\nfunc NewSerializerWithOptions(meta MetaFactory, creater runtime.ObjectCreater, typer runtime.ObjectTyper, options SerializerOptions) *Serializer {\n\treturn &Serializer{\n\t\tmeta: meta,\n\t\tcreater: creater,\n\t\ttyper: typer,\n\t\toptions: options,\n\t\tidentifier: identifier(options),\n\t}\n}\n\n// identifier computes Identifier of Encoder based on the given options.\nfunc identifier(options SerializerOptions) runtime.Identifier {\n\tresult := map[string]string{\n\t\t\"name\": \"json\",\n\t\t\"yaml\": strconv.FormatBool(options.Yaml),\n\t\t\"pretty\": strconv.FormatBool(options.Pretty),\n\t}\n\tidentifier, err := json.Marshal(result)\n\tif err != nil {\n\t\tklog.Fatalf(\"Failed marshaling identifier for json Serializer: %v\", err)\n\t}\n\treturn runtime.Identifier(identifier)\n}\n\n// SerializerOptions holds the options which are used to configure a JSON/YAML serializer.\n// example:\n// (1) To configure a JSON serializer, set `Yaml` to `false`.\n// (2) To configure a YAML serializer, set `Yaml` to `true`.\n// (3) To configure a strict serializer that can return strictDecodingError, set `Strict` to `true`.\ntype SerializerOptions struct {\n\t// Yaml: configures the Serializer to work with JSON(false) or YAML(true).\n\t// When `Yaml` is enabled, this serializer only supports the subset of YAML that\n\t// matches JSON, and will error if constructs are used that do not serialize to JSON.\n\tYaml bool\n\n\t// Pretty: configures a JSON enabled Serializer(`Yaml: false`) to produce human-readable output.\n\t// This option is silently ignored when `Yaml` is `true`.\n\tPretty bool\n\n\t// Strict: configures the Serializer to return strictDecodingError's when duplicate fields are present decoding JSON or YAML.\n\t// Note that enabling this option is not as performant as the non-strict variant, and should not be used in fast paths.\n\tStrict bool\n}\n\ntype Serializer struct {\n\tmeta MetaFactory\n\toptions SerializerOptions\n\tcreater runtime.ObjectCreater\n\ttyper runtime.ObjectTyper\n\n\tidentifier runtime.Identifier\n}\n\n// Serializer implements Serializer\nvar _ runtime.Serializer = &Serializer{}\nvar _ recognizer.RecognizingDecoder = &Serializer{}\n\ntype customNumberExtension struct {\n\tjsoniter.DummyExtension\n}\n\nfunc (cne *customNumberExtension) CreateDecoder(typ reflect2.Type) jsoniter.ValDecoder {\n\tif typ.String() == \"interface {}\" {\n\t\treturn customNumberDecoder{}\n\t}\n\treturn nil\n}\n\ntype customNumberDecoder struct {\n}\n\nfunc (customNumberDecoder) Decode(ptr unsafe.Pointer, iter *jsoniter.Iterator) {\n\tswitch iter.WhatIsNext() {\n\tcase jsoniter.NumberValue:\n\t\tvar number jsoniter.Number\n\t\titer.ReadVal(&number)\n\t\ti64, err := strconv.ParseInt(string(number), 10, 64)\n\t\tif err == nil {\n\t\t\t*(*interface{})(ptr) = i64\n\t\t\treturn\n\t\t}\n\t\tf64, err := strconv.ParseFloat(string(number), 64)\n\t\tif err == nil {\n\t\t\t*(*interface{})(ptr) = f64\n\t\t\treturn\n\t\t}\n\t\titer.ReportError(\"DecodeNumber\", err.Error())\n\tdefault:\n\t\t*(*interface{})(ptr) = iter.Read()\n\t}\n}\n\n// CaseSensitiveJsonIterator returns a jsoniterator API that's configured to be\n// case-sensitive when unmarshalling, and otherwise compatible with\n// the encoding/json standard library.\nfunc CaseSensitiveJsonIterator() jsoniter.API {\n\tconfig := jsoniter.Config{\n\t\tEscapeHTML: true,\n\t\tSortMapKeys: true,\n\t\tValidateJsonRawMessage: true,\n\t\tCaseSensitive: true,\n\t}.Froze()\n\t// Force jsoniter to decode number to interface{} via int64/float64, if possible.\n\tconfig.RegisterExtension(&customNumberExtension{})\n\treturn config\n}\n\n// StrictCaseSensitiveJsonIterator returns a jsoniterator API that's configured to be\n// case-sensitive, but also disallows unknown fields when unmarshalling. It is compatible with\n// the encoding/json standard library.\nfunc StrictCaseSensitiveJsonIterator() jsoniter.API {\n\tconfig := jsoniter.Config{\n\t\tEscapeHTML: true,\n\t\tSortMapKeys: true,\n\t\tValidateJsonRawMessage: true,\n\t\tCaseSensitive: true,\n\t\tDisallowUnknownFields: true,\n\t}.Froze()\n\t// Force jsoniter to decode number to interface{} via int64/float64, if possible.\n\tconfig.RegisterExtension(&customNumberExtension{})\n\treturn config\n}\n\n// Private copies of jsoniter to try to shield against possible mutations\n// from outside. Still does not protect from package level jsoniter.Register*() functions - someone calling them\n// in some other library will mess with every usage of the jsoniter library in the whole program.\n// See https://github.com/json-iterator/go/issues/265\nvar caseSensitiveJsonIterator = CaseSensitiveJsonIterator()\nvar strictCaseSensitiveJsonIterator = StrictCaseSensitiveJsonIterator()\n\n// gvkWithDefaults returns group kind and version defaulting from provided default\nfunc gvkWithDefaults(actual, defaultGVK schema.GroupVersionKind) schema.GroupVersionKind {\n\tif len(actual.Kind) == 0 {\n\t\tactual.Kind = defaultGVK.Kind\n\t}\n\tif len(actual.Version) == 0 && len(actual.Group) == 0 {\n\t\tactual.Group = defaultGVK.Group\n\t\tactual.Version = defaultGVK.Version\n\t}\n\tif len(actual.Version) == 0 && actual.Group == defaultGVK.Group {\n\t\tactual.Version = defaultGVK.Version\n\t}\n\treturn actual\n}\n\n// Decode attempts to convert the provided data into YAML or JSON, extract the stored schema kind, apply the provided default gvk, and then\n// load that data into an object matching the desired schema kind or the provided into.\n// If into is *runtime.Unknown, the raw data will be extracted and no decoding will be performed.\n// If into is not registered with the typer, then the object will be straight decoded using normal JSON/YAML unmarshalling.\n// If into is provided and the original data is not fully qualified with kind/version/group, the type of the into will be used to alter the returned gvk.\n// If into is nil or data's gvk different from into's gvk, it will generate a new Object with ObjectCreater.New(gvk)\n// On success or most errors, the method will return the calculated schema kind.\n// The gvk calculate priority will be originalData > default gvk > into\nfunc (s *Serializer) Decode(originalData []byte, gvk *schema.GroupVersionKind, into runtime.Object) (runtime.Object, *schema.GroupVersionKind, error) {\n\tdata := originalData\n\tif s.options.Yaml {\n\t\taltered, err := yaml.YAMLToJSON(data)\n\t\tif err != nil {\n\t\t\treturn nil, nil, err\n\t\t}\n\t\tdata = altered\n\t}\n\n\tactual, err := s.meta.Interpret(data)\n\tif err != nil {\n\t\treturn nil, nil, err\n\t}\n\n\tif gvk != nil {\n\t\t*actual = gvkWithDefaults(*actual, *gvk)\n\t}\n\n\tif unk, ok := into.(*runtime.Unknown); ok && unk != nil {\n\t\tunk.Raw = originalData\n\t\tunk.ContentType = runtime.ContentTypeJSON\n\t\tunk.GetObjectKind().SetGroupVersionKind(*actual)\n\t\treturn unk, actual, nil\n\t}\n\n\tif into != nil {\n\t\t_, isUnstructured := into.(runtime.Unstructured)\n\t\ttypes, _, err := s.typer.ObjectKinds(into)\n\t\tswitch {\n\t\tcase runtime.IsNotRegisteredError(err), isUnstructured:\n\t\t\tif err := caseSensitiveJsonIterator.Unmarshal(data, into); err != nil {\n\t\t\t\treturn nil, actual, err\n\t\t\t}\n\t\t\treturn into, actual, nil\n\t\tcase err != nil:\n\t\t\treturn nil, actual, err\n\t\tdefault:\n\t\t\t*actual = gvkWithDefaults(*actual, types[0])\n\t\t}\n\t}\n\n\tif len(actual.Kind) == 0 {\n\t\treturn nil, actual, runtime.NewMissingKindErr(string(originalData))\n\t}\n\tif len(actual.Version) == 0 {\n\t\treturn nil, actual, runtime.NewMissingVersionErr(string(originalData))\n\t}\n\n\t// use the target if necessary\n\tobj, err := runtime.UseOrCreateObject(s.typer, s.creater, *actual, into)\n\tif err != nil {\n\t\treturn nil, actual, err\n\t}\n\n\tif err := caseSensitiveJsonIterator.Unmarshal(data, obj); err != nil {\n\t\treturn nil, actual, err\n\t}\n\n\t// If the deserializer is non-strict, return successfully here.\n\tif !s.options.Strict {\n\t\treturn obj, actual, nil\n\t}\n\n\t// In strict mode pass the data trough the YAMLToJSONStrict converter.\n\t// This is done to catch duplicate fields regardless of encoding (JSON or YAML). For JSON data,\n\t// the output would equal the input, unless there is a parsing error such as duplicate fields.\n\t// As we know this was successful in the non-strict case, the only error that may be returned here\n\t// is because of the newly-added strictness. hence we know we can return the typed strictDecoderError\n\t// the actual error is that the object contains duplicate fields.\n\taltered, err := yaml.YAMLToJSONStrict(originalData)\n\tif err != nil {\n\t\treturn nil, actual, runtime.NewStrictDecodingError(err.Error(), string(originalData))\n\t}\n\t// As performance is not an issue for now for the strict deserializer (one has regardless to do\n\t// the unmarshal twice), we take the sanitized, altered data that is guaranteed to have no duplicated\n\t// fields, and unmarshal this into a copy of the already-populated obj. Any error that occurs here is\n\t// due to that a matching field doesn't exist in the object. hence we can return a typed strictDecoderError,\n\t// the actual error is that the object contains unknown field.\n\tstrictObj := obj.DeepCopyObject()\n\tif err := strictCaseSensitiveJsonIterator.Unmarshal(altered, strictObj); err != nil {\n\t\treturn nil, actual, runtime.NewStrictDecodingError(err.Error(), string(originalData))\n\t}\n\t// Always return the same object as the non-strict serializer to avoid any deviations.\n\treturn obj, actual, nil\n}\n\n// Encode serializes the provided object to the given writer.\nfunc (s *Serializer) Encode(obj runtime.Object, w io.Writer) error {\n\tif co, ok := obj.(runtime.CacheableObject); ok {\n\t\treturn co.CacheEncode(s.Identifier(), s.doEncode, w)\n\t}\n\treturn s.doEncode(obj, w)\n}\n\nfunc (s *Serializer) doEncode(obj runtime.Object, w io.Writer) error {\n\tif s.options.Yaml {\n\t\tjson, err := caseSensitiveJsonIterator.Marshal(obj)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\tdata, err := yaml.JSONToYAML(json)\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = w.Write(data)\n\t\treturn err\n\t}\n\n\tif s.options.Pretty {\n\t\tdata, err := caseSensitiveJsonIterator.MarshalIndent(obj, \"\", \" \")\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\t\t_, err = w.Write(data)\n\t\treturn err\n\t}\n\tencoder := json.NewEncoder(w)\n\treturn encoder.Encode(obj)\n}\n\n// Identifier implements runtime.Encoder interface.\nfunc (s *Serializer) Identifier() runtime.Identifier {\n\treturn s.identifier\n}\n\n// RecognizesData implements the RecognizingDecoder interface.\nfunc (s *Serializer) RecognizesData(peek io.Reader) (ok, unknown bool, err error) {\n\tif s.options.Yaml {\n\t\t// we could potentially look for '---'\n\t\treturn false, true, nil\n\t}\n\t_, _, ok = utilyaml.GuessJSONStream(peek, 2048)\n\treturn ok, false, nil\n}\n\n// Framer is the default JSON framing behavior, with newlines delimiting individual objects.\nvar Framer = jsonFramer{}\n\ntype jsonFramer struct{}\n\n// NewFrameWriter implements stream framing for this serializer\nfunc (jsonFramer) NewFrameWriter(w io.Writer) io.Writer {\n\t// we can write JSON objects directly to the writer, because they are self-framing\n\treturn w\n}\n\n// NewFrameReader implements stream framing for this serializer\nfunc (jsonFramer) NewFrameReader(r io.ReadCloser) io.ReadCloser {\n\t// we need to extract the JSON chunks of data to pass to Decode()\n\treturn framer.NewJSONFramedReader(r)\n}\n\n// YAMLFramer is the default JSON framing behavior, with newlines delimiting individual objects.\nvar YAMLFramer = yamlFramer{}\n\ntype yamlFramer struct{}\n\n// NewFrameWriter implements stream framing for this serializer\nfunc (yamlFramer) NewFrameWriter(w io.Writer) io.Writer {\n\treturn yamlFrameWriter{w}\n}\n\n// NewFrameReader implements stream framing for this serializer\nfunc (yamlFramer) NewFrameReader(r io.ReadCloser) io.ReadCloser {\n\t// extract the YAML document chunks directly\n\treturn utilyaml.NewDocumentDecoder(r)\n}\n\ntype yamlFrameWriter struct {\n\tw io.Writer\n}\n\n// Write separates each document with the YAML document separator (`---` followed by line\n// break). Writers must write well formed YAML documents (include a final line break).\nfunc (w yamlFrameWriter) Write(data []byte) (n int, err error) {\n\tif _, err := w.w.Write([]byte(\"---\\n\")); err != nil {\n\t\treturn 0, err\n\t}\n\treturn w.w.Write(data)\n}\n"} +{"text": "mke2fs version 0.2b created filesystem\n"} +{"text": "use std::ops::Bound;\nuse std::sync::atomic::{AtomicUsize, Ordering};\n\nuse crossbeam_epoch as epoch;\nuse crossbeam_skiplist::SkipList;\n\n#[test]\nfn new() {\n SkipList::<i32, i32>::new(epoch::default_collector().clone());\n SkipList::<String, Box<i32>>::new(epoch::default_collector().clone());\n}\n\n#[test]\nfn is_empty() {\n let guard = &epoch::pin();\n let s = SkipList::new(epoch::default_collector().clone());\n assert!(s.is_empty());\n\n s.insert(1, 10, guard);\n assert!(!s.is_empty());\n s.insert(2, 20, guard);\n s.insert(3, 30, guard);\n assert!(!s.is_empty());\n\n s.remove(&2, guard);\n assert!(!s.is_empty());\n\n s.remove(&1, guard);\n assert!(!s.is_empty());\n\n s.remove(&3, guard);\n assert!(s.is_empty());\n}\n\n#[test]\nfn insert() {\n let guard = &epoch::pin();\n let insert = [0, 4, 2, 12, 8, 7, 11, 5];\n let not_present = [1, 3, 6, 9, 10];\n let s = SkipList::new(epoch::default_collector().clone());\n\n for &x in &insert {\n s.insert(x, x * 10, guard);\n assert_eq!(*s.get(&x, guard).unwrap().value(), x * 10);\n }\n\n for &x in &not_present {\n assert!(s.get(&x, guard).is_none());\n }\n}\n\n#[test]\nfn remove() {\n let guard = &epoch::pin();\n let insert = [0, 4, 2, 12, 8, 7, 11, 5];\n let not_present = [1, 3, 6, 9, 10];\n let remove = [2, 12, 8];\n let remaining = [0, 4, 5, 7, 11];\n\n let s = SkipList::new(epoch::default_collector().clone());\n\n for &x in &insert {\n s.insert(x, x * 10, guard);\n }\n for x in &not_present {\n assert!(s.remove(x, guard).is_none());\n }\n for x in &remove {\n assert!(s.remove(x, guard).is_some());\n }\n\n let mut v = vec![];\n let mut e = s.front(guard).unwrap();\n loop {\n v.push(*e.key());\n if !e.move_next() {\n break;\n }\n }\n\n assert_eq!(v, remaining);\n for x in &insert {\n s.remove(x, guard);\n }\n assert!(s.is_empty());\n}\n\n#[test]\nfn entry() {\n let guard = &epoch::pin();\n let s = SkipList::new(epoch::default_collector().clone());\n\n assert!(s.front(guard).is_none());\n assert!(s.back(guard).is_none());\n\n for &x in &[4, 2, 12, 8, 7, 11, 5] {\n s.insert(x, x * 10, guard);\n }\n\n let mut e = s.front(guard).unwrap();\n assert_eq!(*e.key(), 2);\n assert!(!e.move_prev());\n assert!(e.move_next());\n assert_eq!(*e.key(), 4);\n\n e = s.back(guard).unwrap();\n assert_eq!(*e.key(), 12);\n assert!(!e.move_next());\n assert!(e.move_prev());\n assert_eq!(*e.key(), 11);\n}\n\n#[test]\nfn entry_remove() {\n let guard = &epoch::pin();\n let s = SkipList::new(epoch::default_collector().clone());\n\n for &x in &[4, 2, 12, 8, 7, 11, 5] {\n s.insert(x, x * 10, guard);\n }\n\n let mut e = s.get(&7, guard).unwrap();\n assert!(!e.is_removed());\n assert!(e.remove());\n assert!(e.is_removed());\n\n e.move_prev();\n e.move_next();\n assert_ne!(*e.key(), 7);\n\n for e in s.iter(guard) {\n assert!(!s.is_empty());\n assert_ne!(s.len(), 0);\n e.remove();\n }\n assert!(s.is_empty());\n assert_eq!(s.len(), 0);\n}\n\n#[test]\nfn entry_reposition() {\n let guard = &epoch::pin();\n let s = SkipList::new(epoch::default_collector().clone());\n\n for &x in &[4, 2, 12, 8, 7, 11, 5] {\n s.insert(x, x * 10, guard);\n }\n\n let mut e = s.get(&7, guard).unwrap();\n assert!(!e.is_removed());\n assert!(e.remove());\n assert!(e.is_removed());\n\n s.insert(7, 700, guard);\n e.move_prev();\n e.move_next();\n assert_eq!(*e.key(), 7);\n}\n\n#[test]\nfn len() {\n let guard = &epoch::pin();\n let s = SkipList::new(epoch::default_collector().clone());\n assert_eq!(s.len(), 0);\n\n for (i, &x) in [4, 2, 12, 8, 7, 11, 5].iter().enumerate() {\n s.insert(x, x * 1, guard);\n assert_eq!(s.len(), i + 1);\n }\n\n s.insert(5, 0, guard);\n assert_eq!(s.len(), 7);\n s.insert(5, 0, guard);\n assert_eq!(s.len(), 7);\n\n s.remove(&6, guard);\n assert_eq!(s.len(), 7);\n s.remove(&5, guard);\n assert_eq!(s.len(), 6);\n s.remove(&12, guard);\n assert_eq!(s.len(), 5);\n}\n\n#[test]\nfn insert_and_remove() {\n let guard = &epoch::pin();\n let s = SkipList::new(epoch::default_collector().clone());\n let keys = || s.iter(guard).map(|e| *e.key()).collect::<Vec<_>>();\n\n s.insert(3, 0, guard);\n s.insert(5, 0, guard);\n s.insert(1, 0, guard);\n s.insert(4, 0, guard);\n s.insert(2, 0, guard);\n assert_eq!(keys(), [1, 2, 3, 4, 5]);\n\n assert!(s.remove(&4, guard).is_some());\n assert_eq!(keys(), [1, 2, 3, 5]);\n assert!(s.remove(&3, guard).is_some());\n assert_eq!(keys(), [1, 2, 5]);\n assert!(s.remove(&1, guard).is_some());\n assert_eq!(keys(), [2, 5]);\n\n assert!(s.remove(&1, guard).is_none());\n assert_eq!(keys(), [2, 5]);\n assert!(s.remove(&3, guard).is_none());\n assert_eq!(keys(), [2, 5]);\n\n assert!(s.remove(&2, guard).is_some());\n assert_eq!(keys(), [5]);\n assert!(s.remove(&5, guard).is_some());\n assert_eq!(keys(), []);\n\n s.insert(3, 0, guard);\n assert_eq!(keys(), [3]);\n s.insert(1, 0, guard);\n assert_eq!(keys(), [1, 3]);\n s.insert(3, 0, guard);\n assert_eq!(keys(), [1, 3]);\n s.insert(5, 0, guard);\n assert_eq!(keys(), [1, 3, 5]);\n\n assert!(s.remove(&3, guard).is_some());\n assert_eq!(keys(), [1, 5]);\n assert!(s.remove(&1, guard).is_some());\n assert_eq!(keys(), [5]);\n assert!(s.remove(&3, guard).is_none());\n assert_eq!(keys(), [5]);\n assert!(s.remove(&5, guard).is_some());\n assert_eq!(keys(), []);\n}\n\n#[test]\nfn get() {\n let guard = &epoch::pin();\n let s = SkipList::new(epoch::default_collector().clone());\n s.insert(30, 3, guard);\n s.insert(50, 5, guard);\n s.insert(10, 1, guard);\n s.insert(40, 4, guard);\n s.insert(20, 2, guard);\n\n assert_eq!(*s.get(&10, guard).unwrap().value(), 1);\n assert_eq!(*s.get(&20, guard).unwrap().value(), 2);\n assert_eq!(*s.get(&30, guard).unwrap().value(), 3);\n assert_eq!(*s.get(&40, guard).unwrap().value(), 4);\n assert_eq!(*s.get(&50, guard).unwrap().value(), 5);\n\n assert!(s.get(&7, guard).is_none());\n assert!(s.get(&27, guard).is_none());\n assert!(s.get(&31, guard).is_none());\n assert!(s.get(&97, guard).is_none());\n}\n\n#[test]\nfn lower_bound() {\n let guard = &epoch::pin();\n let s = SkipList::new(epoch::default_collector().clone());\n s.insert(30, 3, guard);\n s.insert(50, 5, guard);\n s.insert(10, 1, guard);\n s.insert(40, 4, guard);\n s.insert(20, 2, guard);\n\n assert_eq!(*s.lower_bound(Bound::Unbounded, guard).unwrap().value(), 1);\n\n assert_eq!(\n *s.lower_bound(Bound::Included(&10), guard).unwrap().value(),\n 1\n );\n assert_eq!(\n *s.lower_bound(Bound::Included(&20), guard).unwrap().value(),\n 2\n );\n assert_eq!(\n *s.lower_bound(Bound::Included(&30), guard).unwrap().value(),\n 3\n );\n assert_eq!(\n *s.lower_bound(Bound::Included(&40), guard).unwrap().value(),\n 4\n );\n assert_eq!(\n *s.lower_bound(Bound::Included(&50), guard).unwrap().value(),\n 5\n );\n\n assert_eq!(\n *s.lower_bound(Bound::Included(&7), guard).unwrap().value(),\n 1\n );\n assert_eq!(\n *s.lower_bound(Bound::Included(&27), guard).unwrap().value(),\n 3\n );\n assert_eq!(\n *s.lower_bound(Bound::Included(&31), guard).unwrap().value(),\n 4\n );\n assert!(s.lower_bound(Bound::Included(&97), guard).is_none());\n\n assert_eq!(\n *s.lower_bound(Bound::Excluded(&10), guard).unwrap().value(),\n 2\n );\n assert_eq!(\n *s.lower_bound(Bound::Excluded(&20), guard).unwrap().value(),\n 3\n );\n assert_eq!(\n *s.lower_bound(Bound::Excluded(&30), guard).unwrap().value(),\n 4\n );\n assert_eq!(\n *s.lower_bound(Bound::Excluded(&40), guard).unwrap().value(),\n 5\n );\n assert!(s.lower_bound(Bound::Excluded(&50), guard).is_none());\n\n assert_eq!(\n *s.lower_bound(Bound::Excluded(&7), guard).unwrap().value(),\n 1\n );\n assert_eq!(\n *s.lower_bound(Bound::Excluded(&27), guard).unwrap().value(),\n 3\n );\n assert_eq!(\n *s.lower_bound(Bound::Excluded(&31), guard).unwrap().value(),\n 4\n );\n assert!(s.lower_bound(Bound::Excluded(&97), guard).is_none());\n}\n\n#[test]\nfn upper_bound() {\n let guard = &epoch::pin();\n let s = SkipList::new(epoch::default_collector().clone());\n s.insert(30, 3, guard);\n s.insert(50, 5, guard);\n s.insert(10, 1, guard);\n s.insert(40, 4, guard);\n s.insert(20, 2, guard);\n\n assert_eq!(*s.upper_bound(Bound::Unbounded, guard).unwrap().value(), 5);\n\n assert_eq!(\n *s.upper_bound(Bound::Included(&10), guard).unwrap().value(),\n 1\n );\n assert_eq!(\n *s.upper_bound(Bound::Included(&20), guard).unwrap().value(),\n 2\n );\n assert_eq!(\n *s.upper_bound(Bound::Included(&30), guard).unwrap().value(),\n 3\n );\n assert_eq!(\n *s.upper_bound(Bound::Included(&40), guard).unwrap().value(),\n 4\n );\n assert_eq!(\n *s.upper_bound(Bound::Included(&50), guard).unwrap().value(),\n 5\n );\n\n assert!(s.upper_bound(Bound::Included(&7), guard).is_none());\n assert_eq!(\n *s.upper_bound(Bound::Included(&27), guard).unwrap().value(),\n 2\n );\n assert_eq!(\n *s.upper_bound(Bound::Included(&31), guard).unwrap().value(),\n 3\n );\n assert_eq!(\n *s.upper_bound(Bound::Included(&97), guard).unwrap().value(),\n 5\n );\n\n assert!(s.upper_bound(Bound::Excluded(&10), guard).is_none());\n assert_eq!(\n *s.upper_bound(Bound::Excluded(&20), guard).unwrap().value(),\n 1\n );\n assert_eq!(\n *s.upper_bound(Bound::Excluded(&30), guard).unwrap().value(),\n 2\n );\n assert_eq!(\n *s.upper_bound(Bound::Excluded(&40), guard).unwrap().value(),\n 3\n );\n assert_eq!(\n *s.upper_bound(Bound::Excluded(&50), guard).unwrap().value(),\n 4\n );\n\n assert!(s.upper_bound(Bound::Excluded(&7), guard).is_none());\n assert_eq!(\n *s.upper_bound(Bound::Excluded(&27), guard).unwrap().value(),\n 2\n );\n assert_eq!(\n *s.upper_bound(Bound::Excluded(&31), guard).unwrap().value(),\n 3\n );\n assert_eq!(\n *s.upper_bound(Bound::Excluded(&97), guard).unwrap().value(),\n 5\n );\n}\n\n#[test]\nfn get_or_insert() {\n let guard = &epoch::pin();\n let s = SkipList::new(epoch::default_collector().clone());\n s.insert(3, 3, guard);\n s.insert(5, 5, guard);\n s.insert(1, 1, guard);\n s.insert(4, 4, guard);\n s.insert(2, 2, guard);\n\n assert_eq!(*s.get(&4, guard).unwrap().value(), 4);\n assert_eq!(*s.insert(4, 40, guard).value(), 40);\n assert_eq!(*s.get(&4, guard).unwrap().value(), 40);\n\n assert_eq!(*s.get_or_insert(4, 400, guard).value(), 40);\n assert_eq!(*s.get(&4, guard).unwrap().value(), 40);\n assert_eq!(*s.get_or_insert(6, 600, guard).value(), 600);\n}\n\n#[test]\nfn get_next_prev() {\n let guard = &epoch::pin();\n let s = SkipList::new(epoch::default_collector().clone());\n s.insert(3, 3, guard);\n s.insert(5, 5, guard);\n s.insert(1, 1, guard);\n s.insert(4, 4, guard);\n s.insert(2, 2, guard);\n\n let mut e = s.get(&3, guard).unwrap();\n assert_eq!(*e.next().unwrap().value(), 4);\n assert_eq!(*e.prev().unwrap().value(), 2);\n assert_eq!(*e.value(), 3);\n\n e.move_prev();\n assert_eq!(*e.next().unwrap().value(), 3);\n assert_eq!(*e.prev().unwrap().value(), 1);\n assert_eq!(*e.value(), 2);\n\n e.move_prev();\n assert_eq!(*e.next().unwrap().value(), 2);\n assert!(e.prev().is_none());\n assert_eq!(*e.value(), 1);\n\n e.move_next();\n e.move_next();\n e.move_next();\n e.move_next();\n assert!(e.next().is_none());\n assert_eq!(*e.prev().unwrap().value(), 4);\n assert_eq!(*e.value(), 5);\n}\n\n#[test]\nfn front_and_back() {\n let guard = &epoch::pin();\n let s = SkipList::new(epoch::default_collector().clone());\n assert!(s.front(guard).is_none());\n assert!(s.back(guard).is_none());\n\n for &x in &[4, 2, 12, 8, 7, 11, 5] {\n s.insert(x, x * 10, guard);\n }\n\n assert_eq!(*s.front(guard).unwrap().key(), 2);\n assert_eq!(*s.back(guard).unwrap().key(), 12);\n}\n\n#[test]\nfn iter() {\n let guard = &epoch::pin();\n let s = SkipList::new(epoch::default_collector().clone());\n for &x in &[4, 2, 12, 8, 7, 11, 5] {\n s.insert(x, x * 10, guard);\n }\n\n assert_eq!(\n s.iter(guard).map(|e| *e.key()).collect::<Vec<_>>(),\n &[2, 4, 5, 7, 8, 11, 12]\n );\n\n let mut it = s.iter(guard);\n s.remove(&2, guard);\n assert_eq!(*it.next().unwrap().key(), 4);\n s.remove(&7, guard);\n assert_eq!(*it.next().unwrap().key(), 5);\n s.remove(&5, guard);\n assert_eq!(*it.next().unwrap().key(), 8);\n s.remove(&12, guard);\n assert_eq!(*it.next().unwrap().key(), 11);\n assert!(it.next().is_none());\n}\n\n#[test]\nfn iter_range() {\n use crate::Bound::*;\n let guard = &epoch::pin();\n let s = SkipList::new(epoch::default_collector().clone());\n let v = (0..10).map(|x| x * 10).collect::<Vec<_>>();\n for &x in v.iter() {\n s.insert(x, x, guard);\n }\n\n assert_eq!(\n s.iter(guard).map(|x| *x.value()).collect::<Vec<_>>(),\n vec![0, 10, 20, 30, 40, 50, 60, 70, 80, 90]\n );\n assert_eq!(\n s.iter(guard).rev().map(|x| *x.value()).collect::<Vec<_>>(),\n vec![90, 80, 70, 60, 50, 40, 30, 20, 10, 0]\n );\n assert_eq!(\n s.range(.., guard).map(|x| *x.value()).collect::<Vec<_>>(),\n vec![0, 10, 20, 30, 40, 50, 60, 70, 80, 90]\n );\n\n assert_eq!(\n s.range((Included(&0), Unbounded), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![0, 10, 20, 30, 40, 50, 60, 70, 80, 90]\n );\n assert_eq!(\n s.range((Excluded(&0), Unbounded), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![10, 20, 30, 40, 50, 60, 70, 80, 90]\n );\n assert_eq!(\n s.range((Included(&25), Unbounded), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![30, 40, 50, 60, 70, 80, 90]\n );\n assert_eq!(\n s.range((Excluded(&25), Unbounded), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![30, 40, 50, 60, 70, 80, 90]\n );\n assert_eq!(\n s.range((Included(&70), Unbounded), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![70, 80, 90]\n );\n assert_eq!(\n s.range((Excluded(&70), Unbounded), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![80, 90]\n );\n assert_eq!(\n s.range((Included(&100), Unbounded), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![]\n );\n assert_eq!(\n s.range((Excluded(&100), Unbounded), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![]\n );\n\n assert_eq!(\n s.range((Unbounded, Included(&90)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![0, 10, 20, 30, 40, 50, 60, 70, 80, 90]\n );\n assert_eq!(\n s.range((Unbounded, Excluded(&90)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![0, 10, 20, 30, 40, 50, 60, 70, 80]\n );\n assert_eq!(\n s.range((Unbounded, Included(&25)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![0, 10, 20]\n );\n assert_eq!(\n s.range((Unbounded, Excluded(&25)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![0, 10, 20]\n );\n assert_eq!(\n s.range((Unbounded, Included(&70)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![0, 10, 20, 30, 40, 50, 60, 70]\n );\n assert_eq!(\n s.range((Unbounded, Excluded(&70)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![0, 10, 20, 30, 40, 50, 60]\n );\n assert_eq!(\n s.range((Unbounded, Included(&-1)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![]\n );\n assert_eq!(\n s.range((Unbounded, Excluded(&-1)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![]\n );\n\n assert_eq!(\n s.range((Included(&25), Included(&80)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![30, 40, 50, 60, 70, 80]\n );\n assert_eq!(\n s.range((Included(&25), Excluded(&80)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![30, 40, 50, 60, 70]\n );\n assert_eq!(\n s.range((Excluded(&25), Included(&80)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![30, 40, 50, 60, 70, 80]\n );\n assert_eq!(\n s.range((Excluded(&25), Excluded(&80)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![30, 40, 50, 60, 70]\n );\n\n assert_eq!(\n s.range((Included(&25), Included(&25)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![]\n );\n assert_eq!(\n s.range((Included(&25), Excluded(&25)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![]\n );\n assert_eq!(\n s.range((Excluded(&25), Included(&25)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![]\n );\n assert_eq!(\n s.range((Excluded(&25), Excluded(&25)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![]\n );\n\n assert_eq!(\n s.range((Included(&50), Included(&50)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![50]\n );\n assert_eq!(\n s.range((Included(&50), Excluded(&50)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![]\n );\n assert_eq!(\n s.range((Excluded(&50), Included(&50)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![]\n );\n assert_eq!(\n s.range((Excluded(&50), Excluded(&50)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![]\n );\n\n assert_eq!(\n s.range((Included(&100), Included(&-2)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![]\n );\n assert_eq!(\n s.range((Included(&100), Excluded(&-2)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![]\n );\n assert_eq!(\n s.range((Excluded(&100), Included(&-2)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![]\n );\n assert_eq!(\n s.range((Excluded(&100), Excluded(&-2)), guard)\n .map(|x| *x.value())\n .collect::<Vec<_>>(),\n vec![]\n );\n}\n\n#[test]\nfn into_iter() {\n let guard = &epoch::pin();\n let s = SkipList::new(epoch::default_collector().clone());\n for &x in &[4, 2, 12, 8, 7, 11, 5] {\n s.insert(x, x * 10, guard);\n }\n\n assert_eq!(\n s.into_iter().collect::<Vec<_>>(),\n &[\n (2, 20),\n (4, 40),\n (5, 50),\n (7, 70),\n (8, 80),\n (11, 110),\n (12, 120),\n ]\n );\n}\n\n#[test]\nfn clear() {\n let guard = &mut epoch::pin();\n let s = SkipList::new(epoch::default_collector().clone());\n for &x in &[4, 2, 12, 8, 7, 11, 5] {\n s.insert(x, x * 10, guard);\n }\n\n assert!(!s.is_empty());\n assert_ne!(s.len(), 0);\n s.clear(guard);\n assert!(s.is_empty());\n assert_eq!(s.len(), 0);\n}\n\n#[test]\nfn drops() {\n static KEYS: AtomicUsize = AtomicUsize::new(0);\n static VALUES: AtomicUsize = AtomicUsize::new(0);\n\n let collector = epoch::Collector::new();\n let handle = collector.register();\n {\n let guard = &handle.pin();\n\n #[derive(Eq, PartialEq, Ord, PartialOrd)]\n struct Key(i32);\n\n impl Drop for Key {\n fn drop(&mut self) {\n KEYS.fetch_add(1, Ordering::SeqCst);\n }\n }\n\n struct Value;\n\n impl Drop for Value {\n fn drop(&mut self) {\n VALUES.fetch_add(1, Ordering::SeqCst);\n }\n }\n\n let s = SkipList::new(collector.clone());\n for &x in &[4, 2, 12, 8, 7, 11, 5] {\n s.insert(Key(x), Value, guard).release(guard);\n }\n assert_eq!(KEYS.load(Ordering::SeqCst), 0);\n assert_eq!(VALUES.load(Ordering::SeqCst), 0);\n\n let key7 = Key(7);\n s.remove(&key7, guard).unwrap().release(guard);\n assert_eq!(KEYS.load(Ordering::SeqCst), 0);\n assert_eq!(VALUES.load(Ordering::SeqCst), 0);\n\n drop(s);\n }\n\n handle.pin().flush();\n handle.pin().flush();\n assert_eq!(KEYS.load(Ordering::SeqCst), 8);\n assert_eq!(VALUES.load(Ordering::SeqCst), 7);\n}\n"} +{"text": "# -*- coding: utf-8 -*-\nfrom __future__ import unicode_literals\n\nfrom django.db import models, migrations\nfrom django.utils.timezone import utc\nimport datetime\n\n\nclass Migration(migrations.Migration):\n\n dependencies = [\n ('taskManager', '0024_auto_20150324_1737'),\n ]\n\n operations = [\n migrations.RenameField(\n model_name='project',\n old_name='project_title',\n new_name='title',\n ),\n migrations.AlterField(\n model_name='project',\n name='due_date',\n field=models.DateTimeField(verbose_name='date due', default=datetime.datetime(2015, 3, 31, 23, 40, 33, 763694, tzinfo=utc)),\n preserve_default=True,\n ),\n migrations.AlterField(\n model_name='task',\n name='due_date',\n field=models.DateTimeField(verbose_name='date due', default=datetime.datetime(2015, 3, 31, 23, 40, 33, 765148, tzinfo=utc)),\n preserve_default=True,\n ),\n ]\n"} +{"text": "/*\n * -\\-\\-\n * DataEnum\n * --\n * Copyright (c) 2017 Spotify AB\n * --\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * -/-/-\n */\npackage com.spotify.dataenum.processor.generator.data;\n\nimport static org.assertj.core.api.Assertions.assertThatThrownBy;\nimport static org.hamcrest.core.Is.is;\nimport static org.junit.Assert.assertThat;\n\nimport com.spotify.dataenum.processor.parser.ParserException;\nimport com.squareup.javapoet.ClassName;\nimport org.junit.Test;\n\npublic class OutputSpecFactoryTest {\n\n @Test\n public void shouldRemoveDataEnumInterfaceSuffix() throws Exception {\n assertThat(\n OutputSpecFactory.toOutputClassName(ClassName.get(\"com.spotify\", \"My_dataenum\")),\n is(ClassName.get(\"com.spotify\", \"My\")));\n }\n\n @Test\n public void shouldThrowForNonDataenumClassName() throws Exception {\n assertThatThrownBy(\n () -> OutputSpecFactory.toOutputClassName(ClassName.get(\"com.spotify\", \"My\")))\n .isInstanceOf(ParserException.class)\n .hasMessageContaining(\"Bad name\");\n }\n}\n"} +{"text": "Document:\n - Element:\n tag_name: root\n children:\n - Text: \" \"\n"} +{"text": "/**\n * Automatic perspective correction for quadrilateral objects. See the tutorial at\n * http://opencv-code.com/tutorials/automatic-perspective-correction-for-quadrilateral-objects/\n */\n#include <opencv2/imgproc/imgproc.hpp>\n#include <opencv2/highgui/highgui.hpp>\n#include <iostream>\n\ncv::Point2f center(0,0);\n\ncv::Point2f computeIntersect(cv::Vec4i a, \n cv::Vec4i b)\n{\n\tint x1 = a[0], y1 = a[1], x2 = a[2], y2 = a[3], x3 = b[0], y3 = b[1], x4 = b[2], y4 = b[3];\n\tfloat denom;\n\n\tif (float d = ((float)(x1 - x2) * (y3 - y4)) - ((y1 - y2) * (x3 - x4)))\n\t{\n\t\tcv::Point2f pt;\n\t\tpt.x = ((x1 * y2 - y1 * x2) * (x3 - x4) - (x1 - x2) * (x3 * y4 - y3 * x4)) / d;\n\t\tpt.y = ((x1 * y2 - y1 * x2) * (y3 - y4) - (y1 - y2) * (x3 * y4 - y3 * x4)) / d;\n\t\treturn pt;\n\t}\n\telse\n\t\treturn cv::Point2f(-1, -1);\n}\n\nvoid sortCorners(std::vector<cv::Point2f>& corners, \n cv::Point2f center)\n{\n\tstd::vector<cv::Point2f> top, bot;\n\n\tfor (int i = 0; i < corners.size(); i++)\n\t{\n\t\tif (corners[i].y < center.y)\n\t\t\ttop.push_back(corners[i]);\n\t\telse\n\t\t\tbot.push_back(corners[i]);\n\t}\n\tcorners.clear();\n\t\n\tif (top.size() == 2 && bot.size() == 2){\n\t\tcv::Point2f tl = top[0].x > top[1].x ? top[1] : top[0];\n\t\tcv::Point2f tr = top[0].x > top[1].x ? top[0] : top[1];\n\t\tcv::Point2f bl = bot[0].x > bot[1].x ? bot[1] : bot[0];\n\t\tcv::Point2f br = bot[0].x > bot[1].x ? bot[0] : bot[1];\n\t\n\t\t\n\t\tcorners.push_back(tl);\n\t\tcorners.push_back(tr);\n\t\tcorners.push_back(br);\n\t\tcorners.push_back(bl);\n\t}\n}\n\nint main()\n{\n\tcv::Mat src = cv::imread(\"image.jpg\");\n\tif (src.empty())\n\t\treturn -1;\n\n\tcv::Mat bw;\n\tcv::cvtColor(src, bw, CV_BGR2GRAY);\n\tcv::blur(bw, bw, cv::Size(3, 3));\n\tcv::Canny(bw, bw, 100, 100, 3);\n\n\tstd::vector<cv::Vec4i> lines;\n\tcv::HoughLinesP(bw, lines, 1, CV_PI/180, 70, 30, 10);\n\n\t// Expand the lines\n\tfor (int i = 0; i < lines.size(); i++)\n\t{\n\t\tcv::Vec4i v = lines[i];\n\t\tlines[i][0] = 0;\n\t\tlines[i][1] = ((float)v[1] - v[3]) / (v[0] - v[2]) * -v[0] + v[1]; \n\t\tlines[i][2] = src.cols; \n\t\tlines[i][3] = ((float)v[1] - v[3]) / (v[0] - v[2]) * (src.cols - v[2]) + v[3];\n\t}\n\t\n\tstd::vector<cv::Point2f> corners;\n\tfor (int i = 0; i < lines.size(); i++)\n\t{\n\t\tfor (int j = i+1; j < lines.size(); j++)\n\t\t{\n\t\t\tcv::Point2f pt = computeIntersect(lines[i], lines[j]);\n\t\t\tif (pt.x >= 0 && pt.y >= 0)\n\t\t\t\tcorners.push_back(pt);\n\t\t}\n\t}\n\n\tstd::vector<cv::Point2f> approx;\n\tcv::approxPolyDP(cv::Mat(corners), approx, cv::arcLength(cv::Mat(corners), true) * 0.02, true);\n\n\tif (approx.size() != 4)\n\t{\n\t\tstd::cout << \"The object is not quadrilateral!\" << std::endl;\n\t\treturn -1;\n\t}\n\t\n\t// Get mass center\n\tfor (int i = 0; i < corners.size(); i++)\n\t\tcenter += corners[i];\n\tcenter *= (1. / corners.size());\n\n\tsortCorners(corners, center);\n\tif (corners.size() == 0){\n\t\tstd::cout << \"The corners were not sorted correctly!\" << std::endl;\n\t\treturn -1;\n\t}\n\tcv::Mat dst = src.clone();\n\n\t// Draw lines\n\tfor (int i = 0; i < lines.size(); i++)\n\t{\n\t\tcv::Vec4i v = lines[i];\n\t\tcv::line(dst, cv::Point(v[0], v[1]), cv::Point(v[2], v[3]), CV_RGB(0,255,0));\n\t}\n\n\t// Draw corner points\n\tcv::circle(dst, corners[0], 3, CV_RGB(255,0,0), 2);\n\tcv::circle(dst, corners[1], 3, CV_RGB(0,255,0), 2);\n\tcv::circle(dst, corners[2], 3, CV_RGB(0,0,255), 2);\n\tcv::circle(dst, corners[3], 3, CV_RGB(255,255,255), 2);\n\n\t// Draw mass center\n\tcv::circle(dst, center, 3, CV_RGB(255,255,0), 2);\n\n\tcv::Mat quad = cv::Mat::zeros(300, 220, CV_8UC3);\n\n\tstd::vector<cv::Point2f> quad_pts;\n\tquad_pts.push_back(cv::Point2f(0, 0));\n\tquad_pts.push_back(cv::Point2f(quad.cols, 0));\n\tquad_pts.push_back(cv::Point2f(quad.cols, quad.rows));\n\tquad_pts.push_back(cv::Point2f(0, quad.rows));\n\n\tcv::Mat transmtx = cv::getPerspectiveTransform(corners, quad_pts);\n\tcv::warpPerspective(src, quad, transmtx, quad.size());\n\n\tcv::imshow(\"image\", dst);\n\tcv::imshow(\"quadrilateral\", quad);\n\tcv::waitKey();\n\treturn 0;\n}\n\n"} +{"text": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!114 &11400000\nMonoBehaviour:\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n m_GameObject: {fileID: 0}\n m_Enabled: 1\n m_EditorHideFlags: 0\n m_Script: {fileID: 11500000, guid: e7e7db9a2688ed540af9819c456ba2e2, type: 3}\n m_Name: PressableButtonFrontPlate\n m_EditorClassIdentifier: \n Name: \n Settings:\n - Name: InteractableShaderTheme\n AssemblyQualifiedName: Microsoft.MixedReality.Toolkit.UI.InteractableShaderTheme,\n Microsoft.MixedReality.Toolkit.SDK\n Properties:\n - Name: Shader\n Type: 3\n Values:\n - Name: Default\n String: \n Bool: 0\n Int: 0\n Float: 32\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n - Name: Focus\n String: \n Bool: 0\n Int: 0\n Float: 32\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n - Name: Pressed\n String: \n Bool: 0\n Int: 0\n Float: 6\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n - Name: Disabled\n String: \n Bool: 0\n Int: 0\n Float: 32\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n StartValue:\n Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n PropId: 45\n ShaderOptions:\n - Name: _AlbedoAlphaMode\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _AlbedoAssignedAtRuntime\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _Cutoff\n Type: 2\n Range: {x: 0, y: 1}\n - Name: _Metallic\n Type: 2\n Range: {x: 0, y: 1}\n - Name: _Smoothness\n Type: 2\n Range: {x: 0, y: 1}\n - Name: _EnableChannelMap\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _EnableNormalMap\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _NormalMapScale\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _EnableEmission\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _EnableTriplanarMapping\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _EnableLocalSpaceTriplanarMapping\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _TriplanarMappingBlendSharpness\n Type: 2\n Range: {x: 1, y: 16}\n - Name: _DirectionalLight\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _SpecularHighlights\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _SphericalHarmonics\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _Reflections\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _Refraction\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _RefractiveIndex\n Type: 2\n Range: {x: 0, y: 3}\n - Name: _RimLight\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _RimPower\n Type: 2\n Range: {x: 0, y: 8}\n - Name: _VertexColors\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _ClippingPlane\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _ClippingSphere\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _ClippingBox\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _ClippingBorder\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _ClippingBorderWidth\n Type: 2\n Range: {x: 0.005, y: 1}\n - Name: _NearPlaneFade\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _NearLightFade\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _FadeBeginDistance\n Type: 2\n Range: {x: 0.01, y: 10}\n - Name: _FadeCompleteDistance\n Type: 2\n Range: {x: 0.01, y: 10}\n - Name: _HoverLight\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _EnableHoverColorOverride\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _ProximityLight\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _RoundCorners\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _RoundCornerRadius\n Type: 2\n Range: {x: 0, y: 0.5}\n - Name: _RoundCornerMargin\n Type: 2\n Range: {x: 0, y: 0.5}\n - Name: _BorderLight\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _BorderLightUsesHoverColor\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _BorderLightReplacesAlbedo\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _BorderLightOpaque\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _BorderWidth\n Type: 2\n Range: {x: 0, y: 1}\n - Name: _BorderMinValue\n Type: 2\n Range: {x: 0, y: 1}\n - Name: _EdgeSmoothingValue\n Type: 2\n Range: {x: 0.0001, y: 0.2}\n - Name: _BorderLightOpaqueAlpha\n Type: 2\n Range: {x: 0, y: 1}\n - Name: _InnerGlow\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _InnerGlowPower\n Type: 2\n Range: {x: 2, y: 32}\n - Name: _Iridescence\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _IridescenceIntensity\n Type: 2\n Range: {x: 0, y: 1}\n - Name: _IridescenceThreshold\n Type: 2\n Range: {x: 0, y: 1}\n - Name: _IridescenceAngle\n Type: 2\n Range: {x: -0.78, y: 0.78}\n - Name: _EnvironmentColoring\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _EnvironmentColorThreshold\n Type: 2\n Range: {x: 0, y: 3}\n - Name: _EnvironmentColorIntensity\n Type: 2\n Range: {x: 0, y: 1}\n - Name: _Mode\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _CustomMode\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _SrcBlend\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _DstBlend\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _BlendOp\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _ZTest\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _ZWrite\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _ColorWriteMask\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _CullMode\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _RenderQueueOverride\n Type: 2\n Range: {x: -1, y: 5000}\n - Name: _InstancedColor\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _Stencil\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _StencilReference\n Type: 2\n Range: {x: 0, y: 255}\n - Name: _StencilComparison\n Type: 1\n Range: {x: 0, y: 0}\n - Name: _StencilOperation\n Type: 1\n Range: {x: 0, y: 0}\n ShaderOptionNames:\n - _AlbedoAlphaMode\n - _AlbedoAssignedAtRuntime\n - _Cutoff\n - _Metallic\n - _Smoothness\n - _EnableChannelMap\n - _EnableNormalMap\n - _NormalMapScale\n - _EnableEmission\n - _EnableTriplanarMapping\n - _EnableLocalSpaceTriplanarMapping\n - _TriplanarMappingBlendSharpness\n - _DirectionalLight\n - _SpecularHighlights\n - _SphericalHarmonics\n - _Reflections\n - _Refraction\n - _RefractiveIndex\n - _RimLight\n - _RimPower\n - _VertexColors\n - _ClippingPlane\n - _ClippingSphere\n - _ClippingBox\n - _ClippingBorder\n - _ClippingBorderWidth\n - _NearPlaneFade\n - _NearLightFade\n - _FadeBeginDistance\n - _FadeCompleteDistance\n - _HoverLight\n - _EnableHoverColorOverride\n - _ProximityLight\n - _RoundCorners\n - _RoundCornerRadius\n - _RoundCornerMargin\n - _BorderLight\n - _BorderLightUsesHoverColor\n - _BorderLightReplacesAlbedo\n - _BorderLightOpaque\n - _BorderWidth\n - _BorderMinValue\n - _EdgeSmoothingValue\n - _BorderLightOpaqueAlpha\n - _InnerGlow\n - _InnerGlowPower\n - _Iridescence\n - _IridescenceIntensity\n - _IridescenceThreshold\n - _IridescenceAngle\n - _EnvironmentColoring\n - _EnvironmentColorThreshold\n - _EnvironmentColorIntensity\n - _Mode\n - _CustomMode\n - _SrcBlend\n - _DstBlend\n - _BlendOp\n - _ZTest\n - _ZWrite\n - _ColorWriteMask\n - _CullMode\n - _RenderQueueOverride\n - _InstancedColor\n - _Stencil\n - _StencilReference\n - _StencilComparison\n - _StencilOperation\n Default:\n Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n ShaderName: Mixed Reality Toolkit/Standard\n History:\n - Name: Color\n Type: 2\n Values:\n - Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 1, g: 1, b: 1, a: 1}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n - Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 1, g: 1, b: 1, a: 1}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n - Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 1, g: 1, b: 1, a: 1}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n - Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 1, g: 1, b: 1, a: 1}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n StartValue:\n Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n PropId: 0\n ShaderOptions: []\n ShaderOptionNames: []\n Default:\n Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n ShaderName: \n - Name: Offset\n Type: 6\n Values:\n - Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n - Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0.007}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n - Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: -0.007}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n - Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n StartValue:\n Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n PropId: 0\n ShaderOptions: []\n ShaderOptionNames: []\n Default:\n Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n ShaderName: \n - Name: Scale\n Type: 6\n Values:\n - Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 1, y: 1, z: 1}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n - Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 1, y: 1, z: 1}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n - Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 1, y: 1, z: 1}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n - Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 1, y: 1, z: 1}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n StartValue:\n Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n PropId: 0\n ShaderOptions: []\n ShaderOptionNames: []\n Default:\n Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n ShaderName: \n - Name: Shader\n Type: 3\n Values:\n - Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n - Name: \n String: \n Bool: 0\n Int: 0\n Float: 0.15\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n - Name: \n String: \n Bool: 0\n Int: 0\n Float: 0.15\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n - Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n StartValue:\n Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n PropId: 40\n ShaderOptions: []\n ShaderOptionNames: []\n Default:\n Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n ShaderName: \n - Name: Activate\n Type: 15\n Values:\n - Name: \n String: \n Bool: 1\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n - Name: \n String: \n Bool: 1\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n - Name: \n String: \n Bool: 1\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n - Name: \n String: \n Bool: 1\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n StartValue:\n Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n PropId: 0\n ShaderOptions: []\n ShaderOptionNames: []\n Default:\n Name: \n String: \n Bool: 0\n Int: 0\n Float: 0\n Texture: {fileID: 0}\n Material: {fileID: 0}\n GameObject: {fileID: 0}\n Vector2: {x: 0, y: 0}\n Vector3: {x: 0, y: 0, z: 0}\n Vector4: {x: 0, y: 0, z: 0, w: 0}\n Color: {r: 0, g: 0, b: 0, a: 0}\n Quaternion: {x: 0, y: 0, z: 0, w: 0}\n AudioClip: {fileID: 0}\n Animation: {fileID: 0}\n ShaderName: \n Easing:\n Enabled: 1\n Curve:\n serializedVersion: 2\n m_Curve:\n - serializedVersion: 3\n time: 0\n value: 1\n inSlope: 0\n outSlope: 0\n tangentMode: 0\n weightedMode: 0\n inWeight: 0\n outWeight: 0\n - serializedVersion: 3\n time: 1\n value: 1\n inSlope: 0\n outSlope: 0\n tangentMode: 0\n weightedMode: 0\n inWeight: 0\n outWeight: 0\n m_PreInfinity: 2\n m_PostInfinity: 2\n m_RotationOrder: 4\n LerpTime: 0.05\n NoEasing: 0\n IsValid: 1\n ThemeTarget:\n Properties: []\n Target: {fileID: 0}\n States: []\n CustomSettings: []\n States: {fileID: 11400000, guid: 5eac1712038236e4b8ffdb3893804fe1, type: 2}\n"} +{"text": "// unquoted attributes should be ok in non-strict mode\n// https://github.com/isaacs/sax-js/issues/31\nrequire(__dirname).test\n ( { xml :\n \"<span class=test hello=world></span>\"\n , expect :\n [ [ \"attribute\", { name: \"CLASS\", value: \"test\" } ]\n , [ \"attribute\", { name: \"HELLO\", value: \"world\" } ]\n , [ \"opentag\", { name: \"SPAN\",\n attributes: { CLASS: \"test\", HELLO: \"world\" },\n isSelfClosing: false } ]\n , [ \"closetag\", \"SPAN\" ]\n ]\n , strict : false\n , opt : {}\n }\n )\n\n"} +{"text": "# Powershell supports only TLS 1.0 by default. Add support up to TLS 1.2\n[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]'Tls,Tls11,Tls12'\n\nFunction DownloadFileWithProgress {\n\n # Code for this function borrowed from http://poshcode.org/2461\n # Thanks Crazy Dave\n\n # This function downloads the passed file and shows a progress bar\n # It receives two parameters:\n # $url - the file source\n # $localfile - the file destination on the local machine\n\n param(\n [Parameter(Mandatory=$true)]\n [String] $url,\n [Parameter(Mandatory=$false)]\n [String] $localFile = (Join-Path $pwd.Path $url.SubString($url.LastIndexOf('/')))\n )\n\n\n begin {\n Write-Host -ForegroundColor DarkGreen \" download-module.DownloadFileWithProgress $url\"\n $client = New-Object System.Net.WebClient\n $Global:downloadComplete = $false\n $eventDataComplete = Register-ObjectEvent $client DownloadFileCompleted `\n -SourceIdentifier WebClient.DownloadFileComplete `\n -Action {$Global:downloadComplete = $true}\n $eventDataProgress = Register-ObjectEvent $client DownloadProgressChanged `\n -SourceIdentifier WebClient.DownloadProgressChanged `\n -Action { $Global:DPCEventArgs = $EventArgs }\n }\n process {\n Write-Progress -Activity 'Downloading file' -Status $url\n $client.DownloadFileAsync($url, $localFile)\n\n while (!($Global:downloadComplete)) {\n $pc = $Global:DPCEventArgs.ProgressPercentage\n if ($pc -ne $null) {\n Write-Progress -Activity 'Downloading file' -Status $url -PercentComplete $pc\n }\n }\n Write-Progress -Activity 'Downloading file' -Status $url -Complete\n }\n\n end {\n Unregister-Event -SourceIdentifier WebClient.DownloadProgressChanged\n Unregister-Event -SourceIdentifier WebClient.DownloadFileComplete\n $client.Dispose()\n $Global:downloadComplete = $null\n $Global:DPCEventArgs = $null\n Remove-Variable client\n Remove-Variable eventDataComplete\n Remove-Variable eventDataProgress\n [GC]::Collect()\n # 2016-07-06 mkr Errorchecking added. nice-to-have: integration into the above code.\n If (!((Test-Path \"$localfile\") -and ((Get-Item \"$localfile\").length -gt 0kb))) {\n Write-Error \"Exiting because download missing or zero-length: $localfile\"\n exit 2\n }\n\n }\n}\n"} +{"text": "// (C) Copyright Gennadiy Rozental 2001.\r\n// Distributed under the Boost Software License, Version 1.0.\r\n// (See accompanying file LICENSE_1_0.txt or copy at\r\n// http://www.boost.org/LICENSE_1_0.txt)\r\n\r\n// See http://www.boost.org/libs/test for the library home page.\r\n//\r\n//!@file\r\n//!@brief defines abstract interface for test observer\r\n// ***************************************************************************\r\n\r\n#ifndef BOOST_TEST_TEST_OBSERVER_HPP_021005GER\r\n#define BOOST_TEST_TEST_OBSERVER_HPP_021005GER\r\n\r\n// Boost.Test\r\n#include <boost/test/detail/fwd_decl.hpp>\r\n#include <boost/test/detail/global_typedef.hpp>\r\n#include <boost/test/detail/config.hpp>\r\n\r\n#include <boost/test/detail/suppress_warnings.hpp>\r\n\r\n//____________________________________________________________________________//\r\n\r\nnamespace boost {\r\nnamespace unit_test {\r\n\r\n// ************************************************************************** //\r\n// ************** test_observer ************** //\r\n// ************************************************************************** //\r\n\r\n/// @brief Generic test observer interface\r\n///\r\n/// This interface is used by observers in order to receive notifications from the\r\n/// Boost.Test framework on the current execution state.\r\n///\r\n/// Several observers can be running at the same time, and it is not unusual to\r\n/// have interactions among them. The test_observer#priority member function allows the specification\r\n/// of a particular order among them (lowest priority executed first, except specified otherwise).\r\n///\r\nclass BOOST_TEST_DECL test_observer {\r\npublic:\r\n\r\n //! Called before the framework starts executing the test cases\r\n //!\r\n //! @param[in] number_of_test_cases indicates the number of test cases. Only active\r\n //! test cases are taken into account.\r\n //!\r\n virtual void test_start( counter_t /* number_of_test_cases */ ) {}\r\n\r\n\r\n //! Called after the framework ends executing the test cases\r\n //!\r\n //! @note The call is made with a reversed priority order.\r\n virtual void test_finish() {}\r\n\r\n //! Called when a critical error is detected\r\n //!\r\n //! The critical errors are mainly the signals sent by the system and caught by the Boost.Test framework.\r\n //! Since the running binary may be in incoherent/instable state, the test execution is aborted and all remaining\r\n //! tests are discarded.\r\n //!\r\n //! @note may be called before test_observer::test_unit_finish()\r\n virtual void test_aborted() {}\r\n\r\n //! Called before the framework starts executing a test unit\r\n //!\r\n //! @param[in] test_unit the test being executed\r\n virtual void test_unit_start( test_unit const& /* test */) {}\r\n\r\n //! Called at each end of a test unit.\r\n //!\r\n //! @param elapsed duration of the test unit in microseconds.\r\n virtual void test_unit_finish( test_unit const& /* test */, unsigned long /* elapsed */ ) {}\r\n virtual void test_unit_skipped( test_unit const& tu, const_string ) { test_unit_skipped( tu ); }\r\n virtual void test_unit_skipped( test_unit const& ) {} ///< backward compatibility\r\n\r\n //! Called when a test unit indicates a fatal error.\r\n //!\r\n //! A fatal error happens when\r\n //! - a strong assertion (with @c REQUIRE) fails, which indicates that the test case cannot continue\r\n //! - an unexpected exception is caught by the Boost.Test framework\r\n virtual void test_unit_aborted( test_unit const& ) {}\r\n\r\n virtual void assertion_result( unit_test::assertion_result ar )\r\n {\r\n switch( ar ) {\r\n case AR_PASSED: assertion_result( true ); break;\r\n case AR_FAILED: assertion_result( false ); break;\r\n case AR_TRIGGERED: break;\r\n default: break;\r\n }\r\n }\r\n\r\n //! Called when an exception is intercepted\r\n //!\r\n //! In case an exception is intercepted, this call happens before the call\r\n //! to @ref test_unit_aborted in order to log\r\n //! additional data about the exception.\r\n virtual void exception_caught( execution_exception const& ) {}\r\n\r\n virtual int priority() { return 0; }\r\n\r\nprotected:\r\n //! Deprecated\r\n virtual void assertion_result( bool /* passed */ ) {}\r\n\r\n BOOST_TEST_PROTECTED_VIRTUAL ~test_observer() {}\r\n};\r\n\r\n} // namespace unit_test\r\n} // namespace boost\r\n\r\n#include <boost/test/detail/enable_warnings.hpp>\r\n\r\n#endif // BOOST_TEST_TEST_OBSERVER_HPP_021005GER\r\n\r\n"} +{"text": "import React from 'react';\nimport classNames from 'classnames';\nimport Icon from './icon.jsx';\nimport * as Photon from './photon.jsx';\n\nexport default class TabItem extends Photon.Component {\n\tgetIconComponent() {\n\t\tif (this.props.glyph) {\n\t\t\treturn (<Icon glyph={this.props.glyph} withText/>);\n\t\t}\n\t}\n\n\trender() {\n\t\tconst props = Object.assign({}, this.props);\n\t\tconst classes = this.getPtClassSet();\n\t\tclasses.active = props.active;\n\t\tconst className = classNames(props.className, classes);\n\t\tconst icon = this.getIconComponent();\n\n\t\tdelete props.ptClass;\n\t\tdelete props.active;\n\t\tdelete props.eventKey;\n\n\t\treturn (\n\t\t\t<a {...props} className={className}>\n\t\t\t\t{icon}{this.props.title}\n\t\t\t</a>\n\t\t);\n\t}\n}\n\nTabItem.defaultProps = {\n\tptClass: 'tab-item',\n\tactive: false\n};\n\nTabItem.propTypes = {\n\tactive: React.PropTypes.bool,\n\ttitle: React.PropTypes.string.isRequired,\n\tglyph: React.PropTypes.string\n};\n"} +{"text": "import 'dart:isolate';\nimport 'dart:ui';\n\nimport 'package:flutter_downloader/flutter_downloader.dart';\n\nclass DownloaderCallBack {\n static void callback(String id, DownloadTaskStatus status, int progress) {\n print('id:$id, status:$status, progress:$progress');\n final SendPort send =\n IsolateNameServer.lookupPortByName('downloader_send_port');\n send.send([id, status, progress]);\n }\n}\n"} +{"text": "import sys\nimport peak\nimport trace\nimport algorithms\nimport json\nimport utils\n\n################################################################################\n################################ The Main Method ###############################\n################################################################################\n\ndef loadProblem(file = \"problem.py\", variable = \"problemMatrix\"):\n \"\"\"\n Loads a matrix from a python file, and constructs a PeakProblem from it.\n \"\"\"\n\n namespace = dict()\n with open(file) as handle:\n exec(handle.read(), namespace)\n return peak.createProblem(namespace[variable])\n\ndef main():\n if len(sys.argv) > 1:\n problem = loadProblem(sys.argv[1])\n else:\n problem = loadProblem(utils.getOpenFilename(\"problem.py\"))\n\n # run all algorithms, gathering the traces and printing out the results as\n # we go\n algorithmList = [(\"Algorithm 1\", algorithms.algorithm1),\n (\"Algorithm 2\", algorithms.algorithm2),\n (\"Algorithm 3\", algorithms.algorithm3),\n (\"Algorithm 4\", algorithms.algorithm4)]\n\n steps = []\n \n for (name, function) in algorithmList:\n tracer = trace.TraceRecord()\n peak = function(problem, trace = tracer)\n steps.append(tracer.sequence)\n \n status = \"is NOT a peak (INCORRECT!)\"\n if problem.isPeak(peak):\n status = \"is a peak\"\n\n print(name + \" : \" + str(peak) + \" => \" + status)\n\n # write the trace out to a file\n with open(\"trace.jsonp\", \"w\") as traceFile:\n traceFile.write(\"parse(\")\n\n json.dump({\n \"input\" : problem.array,\n \"steps\" : steps\n }, traceFile)\n\n traceFile.write(\")\")\n\nif __name__ == \"__main__\":\n main()\n"} +{"text": "import React from 'react';\nimport styles from './styles';\n\nimport injectSheet from 'react-jss';\nimport cn from 'classnames';\n\nimport Typography from 'src/common/components/Typography';\n\nconst DesktopNav = ({ classes, links, activeLink, inverted }) => (\n <div>\n {links.map((link, index) => (\n <Typography\n key={`desktop_nav_link${index}`}\n tagName=\"span\"\n inverted={inverted}\n >\n <a\n href={link.href}\n className={cn(classes.link, {\n [classes.active]:\n activeLink !== undefined && link.page === activeLink,\n })}\n >\n {link.text}\n </a>\n </Typography>\n ))}\n </div>\n);\n\nexport default injectSheet(styles)(DesktopNav);\n"} +{"text": "/* QuiteRSS Dark Style */\n\nQWidget {\n background-color: #464546; /* dark */\n alternate-background-color: #3a393a; /* veryDark */\n color: #e1e0e1; /* veryLight */\n selection-background-color: #3A393B;\n selection-color: #F8FD99;\n}\nQWidget:disabled {\n\tcolor: gray;\n}\n\nQMenuBar {\n\tbackground: #3a393a;\n\tcolor: #e1e0e1;\n\tpadding: 1px;\n}\n\nQMenuBar::item {\n\tpadding: 3px 6px;\n\tbackground: transparent;\n}\n\nQMenuBar::item:selected {\n\tbackground: #555555;\n}\n\n#feedsView_, #newsCategoriesTree_ {\n\tbackground: #464546;\n\tcolor: #e1e0e1;\n}\n\n#feedsView_::item, #newsView_::item, #newsCategoriesTree_::item {\n\tmin-height: 20px;\n}\n#feedsView_::item:selected, #newsView_::item:selected, #newsCategoriesTree_::item:selected {\n\tbackground-color: #3A393B;\n\tcolor: #F8FD99;\n}\n\n\n#categoriesLabel_, #newsTextTitle_ {\n\tcolor: #e1e0e1;\n}\n\n#feedsPanel_, #categoriesPanel_, #stackedWidget_ {\n\tbackground: #464546;\n}\n\nQTabWidget::pane {\n\tborder: 1px solid gray;\n}\n\nQTabWidget::tab-bar {\n\tbottom: -1px;\n}\n\nQTabBar::tab, #tabBar_::tab {\n\tbackground-color: transparent;\n\tborder: 1px solid gray;\n\tborder-bottom: none;\n\tborder-top-left-radius: 4px;\n\tborder-top-right-radius: 4px;\n\tmargin: 0;\n\tmargin-top: 1px;\n\tmargin-right: -1px;\n}\n\nQTabBar::tab {\n\tpadding: 4px;\n}\n\n#tabBar_::tab {\n\tpadding: 4px 1px 4px 1px;\n}\n\nQTabBar::tab:last, #tabBar_::tab:last {\n\tmargin-right: 0px;\n}\n\nQTabBar::tab:selected, #tabBar_::tab:selected {\n\tbackground: #464546;\n\tborder-bottom: none;\n\tpadding-bottom: 5px;\n}\n\nQTabBar::tab:!selected, #tabBar_::tab:!selected {\n\tbackground-color: #3a393a;\n\tborder-bottom: 1px solid gray;\n}\n\nQTabBar QToolButton {\n\tborder: 1px solid gray;\n\tborder-radius: 2px;\n}\n\nQTabBar QWidget {\n\tbackground: none;\n}\n\n#tabBarWidget {\n\tborder-bottom: 1px solid gray;\n}\n\nQToolBar {\n\tborder-style: none;\n}\n\n#buttonColumnView {\n\tborder: 1px solid gray;\n\tborder-radius: 0px;\n\tborder-top: none;\n\tborder-bottom: none;\n\tmargin-bottom: 1px;\n\tpadding: 5px 0px 2px 0px;\n\tbackground-color: #3a393a;\n\tmin-width: 10px;\n}\n\n#progressBar_, #splashProgress {\n\tborder: 1px solid #A5A5A5;\n\tborder-radius: 2px;\n\tbackground: #464546;\n}\n\n#progressBar_::chunk, #splashProgress::chunk {\n\tbackground: #2a82da;\n\twidth: 1px;\n}\n\nQHeaderView {\n\tbackground-color: #3a393a;\n\tcolor: #e1e0e1;\n}\n\nQHeaderView::section {\n\tborder-right: 1px solid gray;\n\tborder-bottom: 1px solid gray;\n\tborder-top: none;\n\tborder-left: none;\n\tbackground-color: transparent;\n\t/*padding: 2px;*/\n\tpadding-left: 3px;\n}\n\nQHeaderView::down-arrow {\n\tsubcontrol-origin: padding;\n\tsubcontrol-position: center top;\n\timage: url(:/images/images/sortIndicatorD.png);\n}\n\nQHeaderView::up-arrow {\n\tsubcontrol-origin: padding;\n\tsubcontrol-position: center top;\n\timage: url(:/images/images/sortIndicatorA.png);\n}\n\n#webViewProgress_ {\n\tborder: 1px solid #D5D5D5;\n\tborder-left: none;\n\tborder-right: none;\n\tborder-bottom: none;\n\ttext-align: center;\n\tbackground: qlineargradient(x1:0, y1:0, x2:0, y2:1,\n\t\t\t\t\t\t\t\tstop:0 #f9f9f9,\n\t\t\t\t\t\t\t\tstop:0.4 #f1f1f1,\n\t\t\t\t\t\t\t\tstop:0.6 #e9e9e9,\n\t\t\t\t\t\t\t\tstop:1 #f1f1f1);\n\tcolor: #000000;\n}\n\n#webViewProgress_::chunk {\n\tbackground: qlineargradient(x1:0, y1:0, x2:0, y2:1,\n\t\t\t\t\t\t\t\tstop:0 #f1f1f1,\n\t\t\t\t\t\t\t\tstop:0.4 #d9d9d9,\n\t\t\t\t\t\t\t\tstop:0.6 #d1d1d1,\n\t\t\t\t\t\t\t\tstop:1 #d9d9d9);\n\twidth: 10px;\n}\n\n#webViewProgressLabel_ {\n\tcolor: #000000;\n}\n\n#contentLabel_ {\n\tbackground-color: #464546;\n\tcolor: #e1e0e1;\n}\n\n#categoriesTree {\n\tpadding: 1px;\n}\n\n#categoriesTree::item, #fontTree::item,\n#languageFileList_::item, #filtersTree::item,\n#shortcutTree::item, #labelsTree_::item,\n#colorsTree_::item {\n\tmin-height: 20px;\n}\n\n#foldersTree_::item, #feedsTreeFR::item, #feedsTreeNotify_::item {\n\tmin-height: 18px;\n}\n\nQStatusBar #progressBar_{\n\tmargin-right: 5px;\n}\n\nQMainWindow::separator {\n\tborder: none;\n}\n\n#infoWidgetFR, #actionsWidgetFR {\n\t\n}\n\n#notificationWidget {\n\tborder: 1px solid gray;\n\tborder-radius: 8px;\n}\n\n#titleNotification {\n\tborder-bottom: 1px solid gray;\n\tborder-top-left-radius: 8px;\n\tborder-top-right-radius: 8px;\n}\n\n#bottomNotification {\n\tborder-top: 1px solid gray;\n\tborder-bottom-left-radius: 8px;\n\tborder-bottom-right-radius: 8px;\n}\n\n#feedItemNotification {\n\tborder-bottom: 1px solid gray;\n}\n\nQLineEdit {\n\tborder: 1px solid #3a393a;\n\tbackground-color: #555555;\n\tborder-radius: 2px;\n}\n\nQLineEdit:focus {\n\tborder: 1px solid #2a82da;\n\tcolor: #e1e0e1;\n}\n\n#click2flash-frame {\n\tborder: 1px solid #e4e4e4;\n\tbackground: #f4f4f4;\n}\n\n#click2flash-toolbutton {\n\tbackground: url(:/images/images/flash.png) no-repeat;\n\tbackground-position: center;\n\tborder: none;\n}\n\n#click2flash-toolbutton:hover {\n\tbackground: url(:/images/images/flashstart.png) no-repeat;\n\tbackground-position: center;\n\tborder:none;\n}\n\n#pushButtonNull {\n\tbackground: #3a393a;\n\tborder: none; \n\tpadding: 0px;\n\tmin-width: 6px;\n}\n\nQPushButton {\n\tborder: 1px solid #3a393a;\n\tbackground-color: #555555;\n\tpadding: 4px;\n\tborder-radius: 2px;\n\tmin-width: 80px;\n}\n\nQPushButton:focus {\n\tborder: 1px solid #2a82da;\n\tcolor: #e1e0e1;\n}\n\n#ToolButton {\n\tborder: 1px solid #3a393a;\n\tbackground-color: #555555;\n\tpadding: 2px;\n\tborder-radius: 2px;\n}\n\n#ToolButton:hover {\n\tborder: 1px solid #2a82da;\n\tcolor: #e1e0e1;\n}\n\n#ToolButton[popupMode=\"1\"] {\n\tpadding-right: 16px;\n}\n\n#ToolButton::menu-button {\n border: none;\n width: 16px;\n}\n\nQScrollBar {\n background: none;\n border: none;\n margin: 0px;\n padding: 0px;\n}\n\nQScrollBar:vertical {\n width: 10px;\n}\n\nQScrollBar:horizontal {\n height: 10px;\n}\n\nQScrollBar::add-page:vertical, QScrollBar::sub-page:vertical,\nQScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal{\n background: #3a393a;\n}\n\nQScrollBar::handle:vertical {\n background: #555555;\n min-height: 20px;\n}\n\nQScrollBar::handle:horizontal {\n background: #555555;\n min-width: 20px;\n}\n\nQScrollBar::add-line:vertical, QScrollBar::sub-line:vertical {\n height: 0px;\n}\n\nQScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal {\n width: 0px;\n}\n\nQGroupBox {\n\tborder: 1px solid gray;\n\tmargin-top: 2ex;\n}\n\nQGroupBox::title {\n\tsubcontrol-origin: margin;\n\tleft: 5px;\n\tpadding-left: 3px;\n}\n\nQComboBox {\n\tborder: 1px solid #3a393a;\n\tbackground-color: #555555;\n\tborder-radius: 2px;\n\tpadding: 2px;\n\tpadding-left: 4px;\n\tmin-width: 2em;\n}\n\nQComboBox:on { \n\tcolor: #e1e0e1;\n}\n\nQComboBox::drop-down {\n\tborder: none;\n\tsubcontrol-origin: padding;\n\tsubcontrol-position: top right;\n\twidth: 15px;\n}\n\nQComboBox::down-arrow {\n\timage: url(:/images/images/bullet_down.png);\n}\n\nQComboBox::down-arrow:on {\n\ttop: 1px;\n\tleft: 1px;\n}\n\nQSpinBox {\n\tborder: 1px solid #3a393a;\n\tbackground-color: #555555;\n\tborder-radius: 2px;\n\tpadding: 2px;\n\tpadding-left: 4px;\n}\n\nQSpinBox:focus {\n\tborder: 1px solid #2a82da;\n\tcolor: #e1e0e1;\n}\n"} +{"text": "import { readFileSync } from 'fs';\nimport { sync as globSync } from 'glob';\nimport { dirname, resolve } from 'path';\nimport callsites from 'callsites';\nimport Parser from 'gherkin/dist/src/Parser';\nimport AstBuilder from 'gherkin/dist/src/AstBuilder';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { getJestCucumberConfiguration } from './configuration';\nimport { ParsedFeature, ParsedScenario, ParsedStep, ParsedScenarioOutline, Options } from './models';\n\nconst parseDataTableRow = (astDataTableRow: any) => {\n return astDataTableRow.cells.map((col: any) => col.value) as string[];\n};\n\nconst parseDataTable = (astDataTable: any, astDataTableHeader?: any) => {\n let headerRow: string[];\n let bodyRows: string[];\n\n if (astDataTableHeader) {\n headerRow = parseDataTableRow(astDataTableHeader);\n bodyRows = astDataTable;\n } else {\n headerRow = parseDataTableRow(astDataTable.rows[0]);\n bodyRows = astDataTable && astDataTable.rows && astDataTable.rows.length && astDataTable.rows.slice(1);\n }\n\n if (bodyRows && bodyRows.length > 0) {\n return bodyRows.map((nextRow) => {\n const parsedRow = parseDataTableRow(nextRow);\n\n return parsedRow.reduce((rowObj, nextCol, index) => {\n return {\n ...rowObj,\n [headerRow[index]]: nextCol,\n };\n }, {});\n });\n } else {\n return [];\n }\n};\n\nconst parseStepArgument = (astStep: any) => {\n if (astStep) {\n switch (astStep.argument) {\n case 'dataTable':\n return parseDataTable(astStep.dataTable);\n case 'docString':\n return astStep.docString.content;\n default:\n return null;\n }\n } else {\n return null;\n }\n};\n\nconst parseStep = (astStep: any) => {\n return {\n stepText: astStep.text,\n keyword: (astStep.keyword).trim().toLowerCase() as string,\n stepArgument: parseStepArgument(astStep),\n lineNumber: astStep.location.line,\n } as ParsedStep;\n};\n\nconst parseSteps = (astScenario: any) => {\n return astScenario.steps.map((astStep: any) => parseStep(astStep));\n};\n\nconst parseTags = (ast: any) => {\n if (!ast.tags) {\n return [] as string[];\n } else {\n return ast.tags.map((tag: any) => tag.name.toLowerCase());\n }\n};\n\nconst parseScenario = (astScenario: any) => {\n return {\n title: astScenario.name,\n steps: parseSteps(astScenario),\n tags: parseTags(astScenario),\n lineNumber: astScenario.location.line,\n } as ParsedScenario;\n};\n\nconst parseScenarioOutlineExampleSteps = (exampleTableRow: any, scenarioSteps: ParsedStep[]) => {\n return scenarioSteps.map((scenarioStep) => {\n const stepText = Object.keys(exampleTableRow).reduce((processedStepText, nextTableColumn) => {\n return processedStepText.replace(new RegExp(`<${nextTableColumn}>`, 'g'), exampleTableRow[nextTableColumn]);\n }, scenarioStep.stepText);\n\n let stepArgument: string | {} = '';\n\n if (scenarioStep.stepArgument) {\n if (Array.isArray(scenarioStep.stepArgument)) {\n stepArgument = (scenarioStep.stepArgument as any).map((stepArgumentRow: any) => {\n const modifiedStepArgumentRow = { ...stepArgumentRow };\n\n Object.keys(exampleTableRow).forEach((nextTableColumn) => {\n Object.keys(modifiedStepArgumentRow).forEach((prop) => {\n modifiedStepArgumentRow[prop] =\n modifiedStepArgumentRow[prop].replace(\n new RegExp(`<${nextTableColumn}>`, 'g'),\n exampleTableRow[nextTableColumn],\n );\n });\n });\n\n return modifiedStepArgumentRow;\n });\n } else {\n stepArgument = scenarioStep.stepArgument;\n\n if (\n typeof scenarioStep.stepArgument === 'string' ||\n scenarioStep.stepArgument instanceof String\n ) {\n Object.keys(exampleTableRow).forEach((nextTableColumn) => {\n stepArgument = (stepArgument as string).replace(\n new RegExp(`<${nextTableColumn}>`, 'g'),\n exampleTableRow[nextTableColumn],\n );\n });\n }\n }\n }\n\n return {\n ...scenarioStep,\n stepText,\n stepArgument,\n } as ParsedStep;\n });\n};\n\nconst getOutlineDynamicTitle = (exampleTableRow: any, title: string) => {\n return title.replace(/<(\\S*)>/g, (_, firstMatch) => {\n return exampleTableRow[firstMatch || ''];\n });\n};\n\nconst parseScenarioOutlineExample = (\n exampleTableRow: any,\n outlineScenario: ParsedScenario,\n exampleSetTags: string[],\n) => {\n return {\n title: getOutlineDynamicTitle(exampleTableRow, outlineScenario.title),\n steps: parseScenarioOutlineExampleSteps(exampleTableRow, outlineScenario.steps),\n tags: Array.from(new Set<string>([...outlineScenario.tags, ...exampleSetTags])),\n } as ParsedScenario;\n};\n\nconst parseScenarioOutlineExampleSet = (astExampleSet: any, outlineScenario: ParsedScenario) => {\n const exampleTable = parseDataTable(astExampleSet.tableBody, astExampleSet.tableHeader);\n\n return exampleTable.map(\n (tableRow) => parseScenarioOutlineExample(tableRow, outlineScenario, parseTags(astExampleSet)),\n );\n};\n\nconst parseScenarioOutlineExampleSets = (astExampleSets: any, outlineScenario: ParsedScenario) => {\n const exampleSets = astExampleSets.map((astExampleSet: any) => {\n return parseScenarioOutlineExampleSet(astExampleSet, outlineScenario);\n });\n\n return exampleSets.reduce((scenarios: ParsedScenario[], nextExampleSet: ParsedScenario[][]) => {\n return [\n ...scenarios,\n ...nextExampleSet,\n ];\n }, [] as ParsedScenario[]);\n};\n\nconst parseScenarioOutline = (astScenarioOutline: any) => {\n const outlineScenario = parseScenario(astScenarioOutline.scenario);\n\n return {\n title: outlineScenario.title,\n scenarios: parseScenarioOutlineExampleSets(astScenarioOutline.scenario.examples, outlineScenario),\n tags: outlineScenario.tags,\n steps: outlineScenario.steps,\n lineNumber: astScenarioOutline.scenario.location.line,\n } as ParsedScenarioOutline;\n};\n\nconst parseScenarios = (astFeature: any) => {\n return astFeature.children\n .filter((child: any) => {\n const keywords = ['Scenario Outline', 'Scenario Template'];\n\n return child.scenario && keywords.indexOf(child.scenario.keyword) === -1;\n })\n .map((astScenario: any) => parseScenario(astScenario.scenario));\n};\n\nconst parseScenarioOutlines = (astFeature: any) => {\n return astFeature.children\n .filter((child: any) => {\n const keywords = ['Scenario Outline', 'Scenario Template'];\n\n return child.scenario && keywords.indexOf(child.scenario.keyword) !== -1;\n })\n .map((astScenarioOutline: any) => parseScenarioOutline(astScenarioOutline));\n};\n\nconst collapseBackgrounds = (astChildren: any[], backgrounds: any[]) => {\n const backgroundSteps = backgrounds\n .reduce((allBackgroundSteps, nextBackground) => {\n return [\n ...allBackgroundSteps,\n ...nextBackground.steps,\n ];\n }, []);\n\n astChildren.forEach((child) => {\n if (child.scenario) {\n child.scenario.steps = [...backgroundSteps, ...child.scenario.steps];\n }\n });\n\n return astChildren;\n};\n\nconst parseBackgrounds = (ast: any) => {\n return ast.children\n .filter((child: any) => child.background)\n .map((child: any) => child.background);\n};\n\nconst collapseRulesAndBackgrounds = (astFeature: any) => {\n const featureBackgrounds = parseBackgrounds(astFeature);\n\n const children = collapseBackgrounds(astFeature.children, featureBackgrounds)\n .reduce((newChildren: [], nextChild: any) => {\n if (nextChild.rule) {\n const rule = nextChild.rule;\n const ruleBackgrounds = parseBackgrounds(rule);\n\n return [\n ...newChildren,\n ...collapseBackgrounds(rule.children, [...featureBackgrounds, ...ruleBackgrounds]),\n ];\n } else {\n return [...newChildren, nextChild];\n }\n }, []);\n\n return {\n ...astFeature,\n children,\n };\n};\n\nexport const parseFeature = (featureText: string, options?: Options): ParsedFeature => {\n let ast: any;\n\n try {\n const builder = new AstBuilder(uuidv4 as any);\n ast = new Parser(builder).parse(featureText);\n } catch (err) {\n throw new Error(`Error parsing feature Gherkin: ${err.message}`);\n }\n\n const astFeature = collapseRulesAndBackgrounds(ast.feature);\n\n return {\n title: astFeature.name,\n scenarios: parseScenarios(astFeature),\n scenarioOutlines: parseScenarioOutlines(astFeature),\n tags: parseTags(astFeature),\n options,\n } as ParsedFeature;\n};\n\nexport const loadFeature = (featureFilePath: string, options?: Options) => {\n options = getJestCucumberConfiguration(options);\n\n const callSite = callsites()[1];\n const fileOfCaller = callSite && callSite.getFileName() || '';\n const dirOfCaller = dirname(fileOfCaller);\n const absoluteFeatureFilePath = resolve(options.loadRelativePath ? dirOfCaller : '', featureFilePath);\n\n try {\n const featureText: string = readFileSync(absoluteFeatureFilePath, 'utf8');\n return parseFeature(featureText, options);\n } catch (err) {\n if (err.code === 'ENOENT') {\n throw new Error(`Feature file not found (${absoluteFeatureFilePath})`);\n }\n\n throw err;\n }\n};\n\nexport const loadFeatures = (globPattern: string, options?: Options) => {\n const featureFiles = globSync(globPattern);\n\n return featureFiles.map((featureFilePath) => loadFeature(featureFilePath, options));\n};\n"} +{"text": "using BepuUtilities;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Numerics;\nusing System.Runtime.CompilerServices;\n\nnamespace BepuPhysics.Trees\n{\n partial struct Tree\n {\n //TODO: No good reason for recursion. This is holdovers from the prototype.\n unsafe void DispatchTestForNodeAgainstLeaf<TOverlapHandler>(int leafIndex, ref Vector3 leafMin, ref Vector3 leafMax, int nodeIndex, ref TOverlapHandler results) where TOverlapHandler : IOverlapHandler\n {\n if (nodeIndex < 0)\n {\n results.Handle(Encode(nodeIndex), leafIndex);\n }\n else\n {\n TestNodeAgainstLeaf(nodeIndex, leafIndex, ref leafMin, ref leafMax, ref results);\n }\n }\n private unsafe void TestNodeAgainstLeaf<TOverlapHandler>(int nodeIndex, int leafIndex, ref Vector3 leafMin, ref Vector3 leafMax, ref TOverlapHandler results) where TOverlapHandler : IOverlapHandler\n {\n ref var node = ref Nodes[nodeIndex];\n ref var a = ref node.A;\n ref var b = ref node.B;\n //Despite recursion, leafBounds should remain in L1- it'll be used all the way down the recursion from here.\n //However, while we likely loaded child B when we loaded child A, there's no guarantee that it will stick around.\n //Reloading that in the event of eviction would require more work than keeping the derived data on the stack.\n //TODO: this is some pretty questionable microtuning. It's not often that the post-leaf-found recursion will be long enough to evict L1. Definitely test it.\n var bIndex = b.Index;\n var aIntersects = BoundingBox.Intersects(leafMin, leafMax, a.Min, a.Max);\n var bIntersects = BoundingBox.Intersects(leafMin, leafMax, b.Min, b.Max);\n if (aIntersects)\n {\n DispatchTestForNodeAgainstLeaf(leafIndex, ref leafMin, ref leafMax, a.Index, ref results);\n }\n if (bIntersects)\n {\n DispatchTestForNodeAgainstLeaf(leafIndex, ref leafMin, ref leafMax, bIndex, ref results);\n }\n }\n\n unsafe void DispatchTestForLeafAgainstNode<TOverlapHandler>(int leafIndex, ref Vector3 leafMin, ref Vector3 leafMax, int nodeIndex, ref Tree treeB, ref TOverlapHandler results) where TOverlapHandler : IOverlapHandler\n {\n if (nodeIndex < 0)\n {\n results.Handle(leafIndex, Encode(nodeIndex));\n }\n else\n {\n TestLeafAgainstNode(leafIndex, ref leafMin, ref leafMax, nodeIndex, ref treeB, ref results);\n }\n }\n unsafe void TestLeafAgainstNode<TOverlapHandler>(int leafIndex, ref Vector3 leafMin, ref Vector3 leafMax, int nodeIndex, ref Tree treeB, ref TOverlapHandler results)\n where TOverlapHandler : IOverlapHandler\n {\n ref var node = ref treeB.Nodes[nodeIndex];\n ref var a = ref node.A;\n ref var b = ref node.B;\n //Despite recursion, leafBounds should remain in L1- it'll be used all the way down the recursion from here.\n //However, while we likely loaded child B when we loaded child A, there's no guarantee that it will stick around.\n //Reloading that in the event of eviction would require more work than keeping the derived data on the stack.\n //TODO: this is some pretty questionable microtuning. It's not often that the post-leaf-found recursion will be long enough to evict L1. Definitely test it.\n var bIndex = b.Index;\n var aIntersects = BoundingBox.Intersects(leafMin, leafMax, a.Min, a.Max);\n var bIntersects = BoundingBox.Intersects(leafMin, leafMax, b.Min, b.Max);\n if (aIntersects)\n {\n DispatchTestForLeafAgainstNode(leafIndex, ref leafMin, ref leafMax, a.Index, ref treeB, ref results);\n }\n if (bIntersects)\n {\n DispatchTestForLeafAgainstNode(leafIndex, ref leafMin, ref leafMax, bIndex, ref treeB, ref results);\n }\n }\n\n [MethodImpl(MethodImplOptions.AggressiveInlining)]\n unsafe void DispatchTestForNodes<TOverlapHandler>(ref NodeChild a, ref NodeChild b, ref Tree treeB, ref TOverlapHandler results) where TOverlapHandler : IOverlapHandler\n {\n if (a.Index >= 0)\n {\n if (b.Index >= 0)\n {\n GetOverlapsBetweenDifferentNodes(ref Nodes[a.Index], ref treeB.Nodes[b.Index], ref treeB, ref results);\n }\n else\n {\n //leaf B versus node A. Note that we have to maintain order; treeB nodes always should be in the second slot.\n TestNodeAgainstLeaf(a.Index, Encode(b.Index), ref b.Min, ref b.Max, ref results);\n }\n }\n else if (b.Index >= 0)\n {\n //leaf A versus node B. Note that we have to maintain order; treeB nodes always should be in the second slot.\n TestLeafAgainstNode(Encode(a.Index), ref a.Min, ref a.Max, b.Index, ref treeB, ref results);\n }\n else\n {\n //Two leaves.\n results.Handle(Encode(a.Index), Encode(b.Index));\n }\n }\n\n private unsafe void GetOverlapsBetweenDifferentNodes<TOverlapHandler>(ref Node a, ref Node b, ref Tree treeB, ref TOverlapHandler results) where TOverlapHandler : IOverlapHandler\n {\n ref var aa = ref a.A;\n ref var ab = ref a.B;\n ref var ba = ref b.A;\n ref var bb = ref b.B;\n var aaIntersects = Intersects(aa, ba);\n var abIntersects = Intersects(aa, bb);\n var baIntersects = Intersects(ab, ba);\n var bbIntersects = Intersects(ab, bb);\n\n if (aaIntersects)\n {\n DispatchTestForNodes(ref aa, ref ba, ref treeB, ref results);\n }\n if (abIntersects)\n {\n DispatchTestForNodes(ref aa, ref bb, ref treeB, ref results);\n }\n if (baIntersects)\n {\n DispatchTestForNodes(ref ab, ref ba, ref treeB, ref results);\n }\n if (bbIntersects)\n {\n DispatchTestForNodes(ref ab, ref bb, ref treeB, ref results);\n }\n }\n\n\n public unsafe void GetOverlaps<TOverlapHandler>(ref Tree treeB, ref TOverlapHandler overlapHandler) where TOverlapHandler : struct, IOverlapHandler\n {\n if (leafCount == 0 || treeB.leafCount == 0)\n return;\n if (leafCount >= 2 && treeB.leafCount >= 2)\n {\n //Both trees have complete nodes; we can use a general case.\n GetOverlapsBetweenDifferentNodes(ref Nodes[0], ref treeB.Nodes[0], ref treeB, ref overlapHandler);\n }\n else if (leafCount == 1 && treeB.leafCount >= 2)\n {\n //Tree A is degenerate; needs a special case.\n ref var a = ref Nodes[0];\n ref var b = ref treeB.Nodes[0];\n var aaIntersects = Intersects(a.A, b.A);\n var abIntersects = Intersects(a.A, b.B);\n if (aaIntersects)\n {\n DispatchTestForNodes(ref a.A, ref b.A, ref treeB, ref overlapHandler);\n }\n if (abIntersects)\n {\n DispatchTestForNodes(ref a.A, ref b.B, ref treeB, ref overlapHandler);\n }\n }\n else if (leafCount >= 2 && treeB.leafCount == 1)\n {\n //Tree B is degenerate; needs a special case.\n ref var a = ref Nodes[0];\n ref var b = ref treeB.Nodes[0];\n var aaIntersects = Intersects(a.A, b.A);\n var baIntersects = Intersects(a.B, b.A);\n if (aaIntersects)\n {\n DispatchTestForNodes(ref a.A, ref b.A, ref treeB, ref overlapHandler);\n }\n if (baIntersects)\n {\n DispatchTestForNodes(ref a.B, ref b.A, ref treeB, ref overlapHandler);\n }\n }\n else\n {\n Debug.Assert(leafCount == 1 && treeB.leafCount == 1);\n if (Intersects(Nodes[0].A, treeB.Nodes[0].A))\n {\n DispatchTestForNodes(ref Nodes[0].A, ref treeB.Nodes[0].A, ref treeB, ref overlapHandler);\n }\n }\n }\n\n }\n}\n"} +{"text": "import numpy as np\nimport pandas as pd\n\n\ndef cast_64(df: pd.DataFrame) -> pd.DataFrame:\n for c in df.columns:\n if df[c].dtype == 'float64':\n df[c] = df[c].astype(np.float32)\n if df[c].dtype == 'int64':\n df[c] = df[c].astype(np.int32)\n return df\n"} +{"text": "<!doctype html>\n<!--\n@license\nCopyright (c) 2017 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n-->\n<html>\n\n<head>\n <meta charset=\"utf-8\">\n <script src=\"../../../../@webcomponents/webcomponentsjs/webcomponents-bundle.js\"></script>\n <script src=\"../../../../wct-browser-legacy/browser.js\"></script>\n <script type=\"module\" src=\"../../polymer-legacy.js\"></script>\n</head>\n\n<body>\n <custom-style>\n <style is=\"custom-style\">\n html {\n --mixin: {\n border: 2px solid rgb(255, 0, 0);\n };\n }\n </style>\n </custom-style>\n\n <custom-style>\n <style is=\"custom-style\">\n #target {\n @apply --mixin;\n }\n </style>\n </custom-style>\n\n <div id=\"target\"></div>\n <dom-if><template></template></dom-if>\n <dom-repeat><template></template></dom-repeat>\n\n <script type=\"module\">\nimport '../../polymer-legacy.js';\nimport { PolymerElement } from '../../polymer-element.js';\nclass XFoo extends PolymerElement {\n connectedCallback() {\n this.spy = sinon.spy(window.ShadyCSS, 'styleElement');\n super.connectedCallback();\n this.spy.restore();\n }\n}\ncustomElements.define('x-foo', XFoo);\n</script>\n\n <script type=\"module\">\nimport '../../polymer-legacy.js';\nsuite('styling-only-template', function () {\n\n function assertComputed(element, value, pseudo) {\n var computed = getComputedStyle(element, pseudo);\n assert.equal(computed['border-top-width'], value, 'computed style incorrect');\n }\n\n test('elements without templates do not call ShadyCSS', () => {\n let el = document.createElement('x-foo');\n document.body.appendChild(el);\n assert.ok(el.spy);\n assert.isTrue(el.spy.notCalled);\n });\n\n test('dom-repeat and dom-if do not break custom-style', () => {\n // force custom-style flushing\n let target = document.querySelector('#target');\n window.ShadyCSS.styleDocument();\n assertComputed(target, '2px');\n });\n});\n</script>\n</body>"} +{"text": "// license:BSD-3-Clause\n// copyright-holders:Sean Young\n#include <cassert>\n\n#include \"formats/fmsx_cas.h\"\n\n\n#define CAS_PERIOD (16)\n#define CAS_HEADER_PERIODS (4000)\n#define CAS_EMPTY_PERIODS (1000)\nstatic const uint8_t CasHeader[8] = { 0x1F,0xA6,0xDE,0xBA,0xCC,0x13,0x7D,0x74 };\n\nstatic int cas_size;\n\n\n/*******************************************************************\n Calculate the number of samples needed for this tape image\n********************************************************************/\nstatic int fmsx_cas_to_wav_size (const uint8_t *casdata, int caslen)\n{\n\tint pos, size;\n\n\tif (caslen < 8) return -1;\n\tif (memcmp (casdata, CasHeader, sizeof (CasHeader) ) ) return -1;\n\n\tpos = size = 0;\n\n\twhile (pos < caslen)\n\t{\n\t\tif ( (pos + 8) < caslen)\n\t\t\tif (!memcmp (casdata + pos, CasHeader, 8) )\n\t\t\t{\n\t\t\t\tsize += (CAS_EMPTY_PERIODS + CAS_HEADER_PERIODS) * CAS_PERIOD;\n\t\t\t\tpos += 8;\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\tsize += CAS_PERIOD * 12;\n\t\tpos++;\n\t}\n\n\tcas_size = caslen;\n\n\treturn size;\n}\n\n\n/*******************************************************************\n Generate samples for the tape image\n********************************************************************/\nstatic int fmsx_cas_fill_wave(int16_t *buffer, int sample_count, uint8_t *bytes)\n{\n\tint cas_pos, bit, state = 1, samples_pos, size, n, i, p;\n\n\tcas_pos = 0;\n\tsamples_pos = 0;\n\n\twhile (samples_pos < sample_count && cas_pos < cas_size)\n\t{\n\t\t/* Check if we need to output a header */\n\t\tif ( cas_pos + 8 < cas_size )\n\t\t{\n\t\t\tif ( ! memcmp( bytes + cas_pos, CasHeader, 8 ) )\n\t\t\t{\n\t\t\t\t/* Write CAS_EMPTY_PERIODS of silence */\n\t\t\t\tn = CAS_EMPTY_PERIODS * CAS_PERIOD; while (n--) buffer[samples_pos++] = 0;\n\n\t\t\t\t/* Write CAS_HEADER_PERIODS of header (high frequency) */\n\t\t\t\tfor (i=0;i<CAS_HEADER_PERIODS*4;i++)\n\t\t\t\t{\n\t\t\t\t\tfor (n=0;n<CAS_PERIOD / 4;n++)\n\t\t\t\t\t\tbuffer[samples_pos + n] = (state ? 32767 : -32767);\n\n\t\t\t\t\tsamples_pos += CAS_PERIOD / 4 ;\n\t\t\t\t\tstate = !state;\n\t\t\t\t}\n\n\t\t\t\tcas_pos += 8;\n\t\t\t}\n\t\t}\n\n\t\tfor (i=0;i<=11;i++)\n\t\t{\n\t\t\tif (i == 0) bit = 0;\n\t\t\telse if (i < 9) bit = (bytes[cas_pos] & (1 << (i - 1) ) );\n\t\t\telse bit = 1;\n\n\t\t\t/* write this one bit */\n\t\t\tfor (n=0;n<(bit ? 4 : 2);n++)\n\t\t\t{\n\t\t\t\tsize = (bit ? CAS_PERIOD / 4 : CAS_PERIOD / 2);\n\t\t\t\tfor (p=0;p<size;p++)\n\t\t\t\t{\n\t\t\t\t\tbuffer[samples_pos + p] = (state ? 32767 : -32767);\n\t\t\t\t}\n\t\t\t\tstate = !state;\n\t\t\t\tsamples_pos += size;\n\t\t\t}\n\t\t}\n\t\tcas_pos++;\n\t}\n\n\treturn samples_pos;\n}\n\n\nstatic const struct CassetteLegacyWaveFiller fmsx_legacy_fill_wave =\n{\n\tfmsx_cas_fill_wave, /* fill_wave */\n\t-1, /* chunk_size */\n\t0, /* chunk_samples */\n\tfmsx_cas_to_wav_size, /* chunk_sample_calc */\n\t22050, /* sample_frequency */\n\t0, /* header_samples */\n\t0 /* trailer_samples */\n};\n\n\n\nstatic cassette_image::error fmsx_cas_identify(cassette_image *cassette, struct CassetteOptions *opts)\n{\n\treturn cassette_legacy_identify(cassette, opts, &fmsx_legacy_fill_wave);\n}\n\n\n\nstatic cassette_image::error fmsx_cas_load(cassette_image *cassette)\n{\n\treturn cassette_legacy_construct(cassette, &fmsx_legacy_fill_wave);\n}\n\n\n\nstatic const struct CassetteFormat fmsx_cas_format =\n{\n\t\"tap,cas\",\n\tfmsx_cas_identify,\n\tfmsx_cas_load,\n\tnullptr\n};\n\n\n\nCASSETTE_FORMATLIST_START(fmsx_cassette_formats)\n\tCASSETTE_FORMAT(fmsx_cas_format)\nCASSETTE_FORMATLIST_END\n"} +{"text": "var untilde = function(str) {\n return str.replace(/~./g, function(m) {\n switch (m) {\n case \"~0\":\n return \"~\";\n case \"~1\":\n return \"/\";\n }\n throw new Error(\"Invalid tilde escape: \" + m);\n });\n}\n\nvar traverse = function(obj, pointer, value) {\n // assert(isArray(pointer))\n var part = untilde(pointer.shift());\n if(!obj.hasOwnProperty(part)) {\n return null;\n }\n if(pointer.length !== 0) { // keep traversin!\n return traverse(obj[part], pointer, value);\n }\n // we're done\n if(typeof value === \"undefined\") {\n // just reading\n return obj[part];\n }\n // set new value, return old value\n var old_value = obj[part];\n if(value === null) {\n delete obj[part];\n } else {\n obj[part] = value;\n }\n return old_value;\n}\n\nvar validate_input = function(obj, pointer) {\n if(typeof obj !== \"object\") {\n throw new Error(\"Invalid input object.\");\n }\n\n if(pointer === \"\") {\n return [];\n }\n\n if(!pointer) {\n throw new Error(\"Invalid JSON pointer.\");\n }\n\n pointer = pointer.split(\"/\");\n var first = pointer.shift();\n if (first !== \"\") {\n throw new Error(\"Invalid JSON pointer.\");\n }\n\n return pointer;\n}\n\nvar get = function(obj, pointer) {\n pointer = validate_input(obj, pointer);\n if (pointer.length === 0) {\n return obj;\n }\n return traverse(obj, pointer);\n}\n\nvar set = function(obj, pointer, value) {\n pointer = validate_input(obj, pointer);\n if (pointer.length === 0) {\n throw new Error(\"Invalid JSON pointer for set.\")\n }\n return traverse(obj, pointer, value);\n}\n\nexports.get = get\nexports.set = set\n"} +{"text": "message(STATUS \"Building example\")\n\nset(target dkm_example)\n\nset(sources\n\tmain.cpp\n)\n\nadd_executable(${target} ${sources})"} +{"text": "// iLO scanner\n// Attempt to reach '/xmldata?item=ALL' page and parse the result.\n// (c) Airbus Group, Airbus Group Innovations\n\npackage main\n\nimport (\n\t\"bufio\"\n\t\"crypto/tls\"\n\t\"encoding/xml\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"net\"\n\t\"net/http\"\n\t\"os\"\n\t\"sync\"\n\t\"time\"\n)\n\n// List of targets in CIDR format\n// can be commented and used args instead in the main func\nvar (\n\tdefaultTargets = []string{\n\t\t\"10.0.0.0/8\"}\n)\n\n// All result are store in /tmp/iloscan.log , not necessary the best location :p\nvar path = \"/tmp/iloscan.log\"\n\n// A WaitGroup waits for a collection of goroutines to finish. The main loop calls Add(1)\n// to set the number of goroutines to wait for. Then each of the goroutines runs and calls Done\n// when finished.\nvar wg sync.WaitGroup\n\n// A channel that acts as a counting semaphore. Only allow X concurrent connections.\n// The number here can be adjusted up or down. If too many open files/sockets then\n// adjust this down. Lower numbers mean slower scan times.\n// `ls /proc/pidof netscan/fd | wc -l` should be just under this\nvar sem = make(chan struct{}, 254)\n\n// ILO struct which contains the complete\n// array of all iinformations\ntype rimp struct {\n\tXMLName xml.Name `xml:\"RIMP\"`\n\tRIMP []HSI `xml:\"HSI\"`\n\tRIMP1 []MP `xml:\"MP\"`\n\t//\trimp []spatial `xml:\"SPATIAL\"`\n\t//\trimp []health `xml:\"HEALTH\"`\n}\n\n// the HSI struct, which contains product info\ntype HSI struct {\n\tXMLName xml.Name `xml:\"HSI\"`\n\tSPN string `xml:\"SPN\"`\n}\n\n// the MP struct, which contains version\ntype MP struct {\n\tXMLName xml.Name `xml:\"MP\"`\n\tFWRI string `xml:\"FWRI\"`\n\tSN string `xml:\"SN\"`\n\tUUID string `xml:\"UUID\"`\n}\n\n// Structure for http response\ntype ContentResponse struct {\n\turl string\n\tresponse *http.Response\n\tdata []byte\n\terr error\n}\n\n// Channel for all urls from targets\nvar urls = make(chan string, 512)\n\n// CIDR to IP address list\nfunc Hosts(cidr string) ([]string, error) {\n\tip, ipnet, err := net.ParseCIDR(cidr)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tvar ips []string\n\tfor ip := ip.Mask(ipnet.Mask); ipnet.Contains(ip); inc(ip) {\n\t\tips = append(ips, ip.String())\n\t}\n\t// remove network address and broadcast address\n\treturn ips[1 : len(ips)-1], nil\n}\n\n// http://play.golang.org/p/m8TNTtygK0\nfunc inc(ip net.IP) {\n\tfor j := len(ip) - 1; j >= 0; j-- {\n\t\tip[j]++\n\t\tif ip[j] > 0 {\n\t\t\tbreak\n\t\t}\n\t}\n}\n\n// Get XML on iLO interface\nfunc getContent(url string) {\n\n\t// bypass SSL handcheck\n\ttr := &http.Transport{\n\t\tTLSClientConfig: &tls.Config{InsecureSkipVerify: true},\n\t}\n\ttimeout := time.Duration(5 * time.Second)\n\tclient := &http.Client{Transport: tr, Timeout: timeout}\n\tfmt.Printf(\"Fetching %s \\n\", url)\n\tresp, err := client.Get(\"https://\" + url + \"/xmldata?item=ALL\")\n\n\tif err != nil {\n\t\tfmt.Printf(\"No iLO on %s \\n\", url)\n\t\t//\t\tfmt.Printf(\"Problem getting the response: %s\\n\\n\", err)\n\t\t//if resp != nil && resp.StatusCode == http.StatusOK {\n\t\t//\tfmt.Printf(\"Getting a response: \\n\")\n\t} else {\n\t\tdefer resp.Body.Close() // don't leak resources\n\t\tdata, err := ioutil.ReadAll(resp.Body)\n\n\t\tif err != nil {\n\t\t\tfmt.Sprintf(\"while reading %s: %v\", url, err)\n\t\t}\n\n\t\tfmt.Printf(\"%s status: %s\\n\", url, resp.Status)\n\t\tif resp.StatusCode == http.StatusOK {\n\t\t\tvar info rimp\n\t\t\txml.Unmarshal(data, &info)\n\t\t\tfmt.Println(info)\n\n\t\t\t// open file using READ & WRITE permission\n\t\t\tf, _ := os.OpenFile(path, os.O_APPEND|os.O_WRONLY, 0600)\n\t\t\tw := bufio.NewWriter(f)\n\t\t\tw.WriteString(url)\n\t\t\tfmt.Fprintln(w, info)\n\t\t\tw.Flush()\n\t\t\tf.Close()\n\n\t\t\tresp.Body.Close()\n\t\t}\n\t}\n}\n\nfunc GenerateUrlsFromTargets(targets []string) {\n\tfor _, target := range targets {\n\t\tip, ipnet, _ := net.ParseCIDR(target)\n\t\tfor ip := ip.Mask(ipnet.Mask); ipnet.Contains(ip); inc(ip) {\n\t\t\turls <- ip.String()\n\t\t\tfmt.Println(\"Generated\", ip.String())\n\t\t}\n\t}\n\tclose(urls)\n}\n\nfunc main() {\n\n\tvar targets []string = defaultTargets\n\tif len(os.Args) > 1 {\n\t\ttargets = []string{os.Args[1]}\n\t}\n\n\t// Remember your path location\n\tvar _, err = os.Stat(path)\n\n\t// create file if not exists\n\tif os.IsNotExist(err) {\n\t\tvar file, err = os.Create(path)\n\t\tif err != nil {\n\t\t\tfmt.Printf(\"file %s has not been created\", path)\n\t\t}\n\t\tdefer file.Close()\n\t}\n\tgenerate := func(t []string) {\n\t\twg.Add(1)\n\t\tdefer wg.Done()\n\t\tGenerateUrlsFromTargets(t)\n\t}\n\tgo generate(targets)\n\n\tf := func(u string) {\n\t\twg.Add(1)\n\t\tdefer wg.Done()\n\t\tgetContent(u)\n\t\t<-sem\n\t}\n\n\tfor url := range urls {\n\t\tsem <- struct{}{}\n\t\tgo f(url)\n\t}\n\twg.Wait()\n\tclose(sem)\n\n\tfmt.Printf(\"Done\")\n\n}\n"} +{"text": "The apps in this folder are intentionally bad-behaving apps that are intended\nto trigger the smoke tests to fail. They are otherwise not useful.\n\n"} +{"text": "/* @flow strict-local */\nimport React from 'react';\nimport type { Context } from 'react';\n\nimport type { ThemeName } from '../reduxTypes';\n\nexport type ThemeData = {|\n color: string,\n backgroundColor: string,\n cardColor: string,\n dividerColor: string,\n|};\n\nexport const themeData: { [name: ThemeName | 'light']: ThemeData } = {\n night: {\n color: 'hsl(210, 11%, 85%)',\n backgroundColor: 'hsl(212, 28%, 18%)',\n cardColor: 'hsl(212, 31%, 21%)',\n // Dividers follow Material Design: opacity 12% black or 12% white.\n // See https://material.io/guidelines/components/dividers.html\n dividerColor: 'hsla(0, 0%, 100%, 0.12)',\n },\n light: {\n color: 'hsl(0, 0%, 20%)',\n backgroundColor: 'white',\n cardColor: 'hsl(0, 0%, 97%)',\n // Dividers follow Material Design: opacity 12% black or 12% white.\n // See https://material.io/guidelines/components/dividers.html\n dividerColor: 'hsla(0, 0%, 0%, 0.12)',\n },\n};\nthemeData.default = themeData.light;\n\nexport const ThemeContext: Context<ThemeData> = React.createContext(themeData.default);\n"} +{"text": "<!DOCTYPE html>\n<html lang=\"en\">\n <!--\n Licensed to the Apache Software Foundation (ASF) under one or more\n contributor license agreements. See the NOTICE file distributed with\n this work for additional information regarding copyright ownership.\n The ASF licenses this file to You under the Apache License, Version 2.0\n (the \"License\"); you may not use this file except in compliance with\n the License. You may obtain a copy of the License at\n http://www.apache.org/licenses/LICENSE-2.0\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n -->\n <head>\n <meta charset=\"utf-8\" />\n <title>PutKudu</title>\n\n <link rel=\"stylesheet\" href=\"../../../../../css/component-usage.css\" type=\"text/css\" />\n </head>\n\n <body>\n <!-- Processor Documentation ================================================== -->\n <h2>Description:</h2>\n <p>\n This processor writes Records to a Kudu table. \n \n A Record Reader must be supplied to read the records from the FlowFile.\n The schema supplied to the Record Reader is used to match fields in the Record to the columns of the Kudu table.\n See the <a href='#tableSchema'>Table Schema</a> section for more.\n </p>\n\n <h3>Table Name</h3>\n <p>When Hive MetaStore integration is enabled for Impala/Kudu, do not use the \"impala::\" syntax for the table name. Simply use the Hive \"dbname.tablename\" syntax.</p>\n\n <p>\n For example, without HMS integration, you might use\n </p>\n <code>\n <pre>\n Table Name: impala::default.testtable\n </pre>\n </code>\n <p>\n With HMS integration, you would simply use\n </p>\n <code>\n <pre>\n Table Name: default.testtable\n </pre>\n </code>\n\n\n <h3 name='tableSchema'>Table Schema</h3>\n\n <p>\n When writing to Kudu, NiFi must map the fields from the Record to the columns of the Kudu table. It does this by acquiring the schema of the table from Kudu and the schema\n provided by the Record Reader. It can now compare the Record field names against the Kudu table column names. Additionally, it also compares the field and colunm types, to\n apply the appropriate type conversions.\n </p>\n\n <p>\n For example, assuming you have the following data:\n </p>\n\n <code>\n <pre>\n {\n \"forename\":\"Jessica\",\n \"surname\":\"Smith\",\n \"employee_id\":123456789\n }\n </pre>\n </code>\n\n <p>\n With the following schema in the Record Reader:\n </p>\n\n <code>\n <pre>\n {\n \"type\": \"record\",\n \"namespace\": \"nifi\",\n \"name\": \"employee\",\n \"fields\": [\n { \"name\": \"forename\", \"type\": \"string\" },\n { \"name\": \"surname\", \"type\": \"string\" },\n { \"name\": \"employee_id\", \"type\": \"long\" }\n ]\n }\n </pre>\n </code>\n\n <p>\n With a Kudu table created via Impala using the following create table:\n </p>\n\n <code>\n <pre>\n CREATE TABLE employees\n (\n forename STRING,\n surname STRING,\n employee_id BIGINT,\n PRIMARY KEY(employee_id)\n )\n PARTITION BY HASH PARTITIONS 16\n STORED AS KUDU; \n </pre>\n </code>\n\n <p>NiFi will acquire the table schema from Kudu, so it knows the column names and types. (e.g. forename STRING, surname STRING, employee_id BIGINT)\n Then, it matches the Record field names against the Kudu column names (e.g. record forename -> column forename, etc.)\n Next, it matches the Record data types to the column data types. See the <a href='#dataTypes'>Data Types</a> section for more.</p>\n\n <p>Where there is deviation in Record schema and Table schema, there is two existing options.</p>\n\n <p>Firstly, the <b>Lowercase Field Names</b> option allows NiFi to handle differences in casing.\n For example, if your Kudu columns were FORENAME, SURNAME and EMPLOYEE_ID these would not match the Record Schema above, as they are case senstive.\n This option would simply convert the names to lowercase for the purpose of comparison. It <b>does not</b> change the Kudu table schema.</p>\n\n <p>Secondly, the <b>Handle Schema Drift</b> options allows for un-matched fields to be added to the table schema. This <b>does</b> modify the Kudu table schema.\n For example, if we add a \"dateOfBirth\" field to the above data & record schema examples, these would not map to a column in the Kudu table.\n With this option enabled, NiFi would modify the Kudu table to add a new column called \"dateOfBirth\" and then insert the Record.</p>\n\n \n \n <h3 name='dataTypes'>Data Types</h3>\n <p>NiFi data types are mapped to the following Kudu types:</p>\n <table>\n <tr>\n <th>NiFi Type</th>\n <th>Kudu Type</th>\n </tr>\n <tr>\n <td>BOOLEAN</td>\n <td>BOOL</td>\n </tr>\n <tr>\n <td>BYTE</td>\n <td>INT8</td>\n </tr>\n <tr>\n <td>SHORT</td>\n <td>INT16</td>\n </tr>\n <tr>\n <td>INT</td>\n <td>INT32</td>\n </tr>\n <tr>\n <td>LONG</td>\n <td>INT64</td>\n </tr>\n <tr>\n <td>FLOAT</td>\n <td>FLOAT</td>\n </tr>\n <tr>\n <td>DOUBLE</td>\n <td>DOUBLE</td>\n </tr>\n <tr>\n <td>DECIMAL</td>\n <td>DECIMAL</td>\n </tr>\n <tr>\n <td>TIMESTAMP</td>\n <td>UNIXTIME_MICROS</td>\n </tr>\n <tr>\n <td>STRING</td>\n <td>STRING</td>\n </tr>\n <tr>\n <td>CHAR</td>\n <td>STRING</td>\n </tr>\n </table>\n\n </body>\n</html>\n"} +{"text": "/* ScummVM - Graphic Adventure Engine\n *\n * ScummVM is the legal property of its developers, whose names\n * are too numerous to list here. Please refer to the COPYRIGHT\n * file distributed with this source distribution.\n *\n * This program is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation; either version 2\n * of the License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n *\n */\n\n#include \"common/file.h\"\n#include \"common/system.h\"\n#include \"graphics/palette.h\"\n\n#include \"sci/sci.h\"\n#include \"sci/event.h\"\n#include \"sci/resource.h\"\n#include \"sci/util.h\"\n#include \"sci/engine/features.h\"\n#include \"sci/graphics/palette32.h\"\n#include \"sci/graphics/remap32.h\"\n#include \"sci/graphics/screen.h\"\n\nnamespace Sci {\n\n#pragma mark HunkPalette\n\nHunkPalette::HunkPalette(const SciSpan<const byte> &rawPalette) :\n\t_version(0),\n\t// The header size in palettes is garbage. In at least KQ7 2.00b and Phant1,\n\t// the 999.pal sets this value to 0. In most other palettes it is set to 14,\n\t// but the *actual* size of the header structure used in SSCI is 13, which\n\t// is reflected by `kHunkPaletteHeaderSize`.\n\t_numPalettes(rawPalette.getUint8At(kNumPaletteEntriesOffset)),\n\t_data() {\n\tassert(_numPalettes == 0 || _numPalettes == 1);\n\tif (_numPalettes) {\n\t\t_data = rawPalette;\n\t\t_version = getEntryHeader().version;\n\t}\n}\n\nvoid HunkPalette::write(SciSpan<byte> &out, const Palette &palette) {\n\tconst uint8 numPalettes = 1;\n\tconst uint16 paletteOffset = kHunkPaletteHeaderSize + 2 * numPalettes;\n\n\tout[kNumPaletteEntriesOffset] = numPalettes;\n\tout[kHunkPaletteHeaderSize + 2] = paletteOffset;\n\n\tSciSpan<byte> entry = out.subspan(paletteOffset);\n\tentry[kEntryStartColorOffset] = 0;\n\tentry.setUint16SEAt(kEntryNumColorsOffset, ARRAYSIZE(palette.colors));\n\tentry[kEntryUsedOffset] = 1;\n\tentry[kEntrySharedUsedOffset] = 0;\n\tentry.setUint32SEAt(kEntryVersionOffset, 1);\n\n\tSciSpan<byte> paletteData = entry.subspan(kEntryHeaderSize);\n\tfor (uint i = 0; i < ARRAYSIZE(palette.colors); ++i) {\n\t\t*paletteData++ = palette.colors[i].used;\n\t\t*paletteData++ = palette.colors[i].r;\n\t\t*paletteData++ = palette.colors[i].g;\n\t\t*paletteData++ = palette.colors[i].b;\n\t}\n}\n\nvoid HunkPalette::setVersion(const uint32 version) const {\n\tif (_numPalettes != _data.getUint8At(kNumPaletteEntriesOffset)) {\n\t\terror(\"Invalid HunkPalette\");\n\t}\n\n\tif (_numPalettes) {\n\t\tconst EntryHeader header = getEntryHeader();\n\t\tif (header.version != _version) {\n\t\t\terror(\"Invalid HunkPalette\");\n\t\t}\n\n\t\tbyte *palette = const_cast<byte *>(getPalPointer().getUnsafeDataAt(kEntryVersionOffset, sizeof(uint32)));\n\t\tWRITE_SCI11ENDIAN_UINT32(palette, version);\n\t\t_version = version;\n\t}\n}\n\nconst HunkPalette::EntryHeader HunkPalette::getEntryHeader() const {\n\tconst SciSpan<const byte> data(getPalPointer());\n\n\tEntryHeader header;\n\theader.startColor = data.getUint8At(kEntryStartColorOffset);\n\theader.numColors = data.getUint16SEAt(kEntryNumColorsOffset);\n\theader.used = data.getUint8At(kEntryUsedOffset);\n\theader.sharedUsed = data.getUint8At(kEntrySharedUsedOffset);\n\theader.version = data.getUint32SEAt(kEntryVersionOffset);\n\n\treturn header;\n}\n\nconst Palette HunkPalette::toPalette() const {\n\tPalette outPalette;\n\n\t// Set outPalette structures to 0\n\tfor (int16 i = 0; i < ARRAYSIZE(outPalette.mapping); ++i) {\n\t\toutPalette.mapping[i] = 0;\n\t}\n\toutPalette.timestamp = 0;\n\tfor (int16 i = 0; i < ARRAYSIZE(outPalette.colors); ++i) {\n\t\toutPalette.colors[i].used = false;\n\t\toutPalette.colors[i].r = 0;\n\t\toutPalette.colors[i].g = 0;\n\t\toutPalette.colors[i].b = 0;\n\t}\n\tfor (int16 i = 0; i < ARRAYSIZE(outPalette.intensity); ++i) {\n\t\toutPalette.intensity[i] = 0;\n\t}\n\n\tif (_numPalettes) {\n\t\tconst EntryHeader header = getEntryHeader();\n\t\tconst uint32 dataSize = header.numColors * (/* RGB */ 3 + (header.sharedUsed ? 0 : 1));\n\t\tconst byte *data = getPalPointer().getUnsafeDataAt(kEntryHeaderSize, dataSize);\n\n\t\tconst int16 end = header.startColor + header.numColors;\n\t\tassert(end <= 256);\n\n\t\tif (header.sharedUsed) {\n\t\t\tfor (int16 i = header.startColor; i < end; ++i) {\n\t\t\t\toutPalette.colors[i].used = header.used;\n\t\t\t\toutPalette.colors[i].r = *data++;\n\t\t\t\toutPalette.colors[i].g = *data++;\n\t\t\t\toutPalette.colors[i].b = *data++;\n\t\t\t}\n\t\t} else {\n\t\t\tfor (int16 i = header.startColor; i < end; ++i) {\n\t\t\t\toutPalette.colors[i].used = *data++;\n\t\t\t\toutPalette.colors[i].r = *data++;\n\t\t\t\toutPalette.colors[i].g = *data++;\n\t\t\t\toutPalette.colors[i].b = *data++;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn outPalette;\n}\n\n#pragma mark -\n#pragma mark Gamma correction tables\n\nstatic const uint8 gammaTables[GfxPalette32::numGammaTables][256] = {\n\t{ 0, 2, 3, 5, 6, 7, 9, 10,\n\t11, 13, 14, 15, 16, 18, 19, 20,\n\t21, 22, 23, 25, 26, 27, 28, 29,\n\t30, 32, 33, 34, 35, 36, 37, 38,\n\t39, 41, 42, 43, 44, 45, 46, 47,\n\t48, 49, 50, 51, 52, 54, 55, 56,\n\t57, 58, 59, 60, 61, 62, 63, 64,\n\t65, 66, 67, 68, 69, 70, 71, 72,\n\t74, 75, 76, 77, 78, 79, 80, 81,\n\t82, 83, 84, 85, 86, 87, 88, 89,\n\t90, 91, 92, 93, 94, 95, 96, 97,\n\t98, 99, 100, 101, 102, 103, 104, 105,\n\t106, 107, 108, 109, 110, 111, 112, 113,\n\t114, 115, 116, 117, 118, 119, 120, 121,\n\t122, 123, 124, 125, 126, 127, 128, 128,\n\t129, 130, 131, 132, 133, 134, 135, 136,\n\t137, 138, 139, 140, 141, 142, 143, 144,\n\t145, 146, 147, 148, 149, 150, 151, 152,\n\t153, 153, 154, 155, 156, 157, 158, 159,\n\t160, 161, 162, 163, 164, 165, 166, 167,\n\t168, 169, 170, 171, 171, 172, 173, 174,\n\t175, 176, 177, 178, 179, 180, 181, 182,\n\t183, 184, 185, 186, 186, 187, 188, 189,\n\t190, 191, 192, 193, 194, 195, 196, 197,\n\t198, 199, 199, 200, 201, 202, 203, 204,\n\t205, 206, 207, 208, 209, 210, 211, 211,\n\t212, 213, 214, 215, 216, 217, 218, 219,\n\t220, 221, 222, 222, 223, 224, 225, 226,\n\t227, 228, 229, 230, 231, 232, 232, 233,\n\t234, 235, 236, 237, 238, 239, 240, 241,\n\t242, 242, 243, 244, 245, 246, 247, 248,\n\t249, 250, 251, 251, 252, 253, 254, 255 },\n\n\t{ 0, 3, 5, 6, 8, 10, 11, 13,\n\t14, 16, 17, 19, 20, 22, 23, 24,\n\t26, 27, 28, 30, 31, 32, 33, 35,\n\t36, 37, 38, 40, 41, 42, 43, 44,\n\t46, 47, 48, 49, 50, 51, 53, 54,\n\t55, 56, 57, 58, 59, 60, 62, 63,\n\t64, 65, 66, 67, 68, 69, 70, 71,\n\t73, 74, 75, 76, 77, 78, 79, 80,\n\t81, 82, 83, 84, 85, 86, 87, 88,\n\t89, 90, 91, 92, 93, 94, 95, 96,\n\t97, 99, 100, 101, 102, 103, 104, 105,\n\t106, 107, 108, 108, 109, 110, 111, 112,\n\t113, 114, 115, 116, 117, 118, 119, 120,\n\t121, 122, 123, 124, 125, 126, 127, 128,\n\t129, 130, 131, 132, 133, 134, 135, 136,\n\t136, 137, 138, 139, 140, 141, 142, 143,\n\t144, 145, 146, 147, 148, 149, 150, 151,\n\t151, 152, 153, 154, 155, 156, 157, 158,\n\t159, 160, 161, 162, 162, 163, 164, 165,\n\t166, 167, 168, 169, 170, 171, 172, 172,\n\t173, 174, 175, 176, 177, 178, 179, 180,\n\t180, 181, 182, 183, 184, 185, 186, 187,\n\t188, 188, 189, 190, 191, 192, 193, 194,\n\t195, 196, 196, 197, 198, 199, 200, 201,\n\t202, 202, 203, 204, 205, 206, 207, 208,\n\t209, 209, 210, 211, 212, 213, 214, 215,\n\t215, 216, 217, 218, 219, 220, 221, 221,\n\t222, 223, 224, 225, 226, 227, 227, 228,\n\t229, 230, 231, 232, 233, 233, 234, 235,\n\t236, 237, 238, 238, 239, 240, 241, 242,\n\t243, 243, 244, 245, 246, 247, 248, 249,\n\t249, 250, 251, 252, 253, 254, 254, 255 },\n\n\t{ 0, 4, 6, 8, 10, 12, 14, 16,\n\t18, 19, 21, 23, 24, 26, 27, 29,\n\t30, 32, 33, 35, 36, 37, 39, 40,\n\t41, 43, 44, 45, 47, 48, 49, 50,\n\t52, 53, 54, 55, 57, 58, 59, 60,\n\t61, 62, 64, 65, 66, 67, 68, 69,\n\t71, 72, 73, 74, 75, 76, 77, 78,\n\t79, 81, 82, 83, 84, 85, 86, 87,\n\t88, 89, 90, 91, 92, 93, 94, 95,\n\t96, 97, 98, 99, 100, 102, 103, 104,\n\t105, 106, 107, 108, 109, 110, 111, 112,\n\t112, 113, 114, 115, 116, 117, 118, 119,\n\t120, 121, 122, 123, 124, 125, 126, 127,\n\t128, 129, 130, 131, 132, 133, 134, 135,\n\t135, 136, 137, 138, 139, 140, 141, 142,\n\t143, 144, 145, 146, 146, 147, 148, 149,\n\t150, 151, 152, 153, 154, 155, 156, 156,\n\t157, 158, 159, 160, 161, 162, 163, 163,\n\t164, 165, 166, 167, 168, 169, 170, 170,\n\t171, 172, 173, 174, 175, 176, 177, 177,\n\t178, 179, 180, 181, 182, 183, 183, 184,\n\t185, 186, 187, 188, 188, 189, 190, 191,\n\t192, 193, 194, 194, 195, 196, 197, 198,\n\t199, 199, 200, 201, 202, 203, 203, 204,\n\t205, 206, 207, 208, 208, 209, 210, 211,\n\t212, 212, 213, 214, 215, 216, 217, 217,\n\t218, 219, 220, 221, 221, 222, 223, 224,\n\t225, 225, 226, 227, 228, 229, 229, 230,\n\t231, 232, 233, 233, 234, 235, 236, 237,\n\t237, 238, 239, 240, 240, 241, 242, 243,\n\t244, 244, 245, 246, 247, 247, 248, 249,\n\t250, 251, 251, 252, 253, 254, 254, 255 },\n\n\t{ 0, 5, 9, 11, 14, 16, 19, 21,\n\t23, 25, 26, 28, 30, 32, 33, 35,\n\t37, 38, 40, 41, 43, 44, 46, 47,\n\t49, 50, 52, 53, 54, 56, 57, 58,\n\t60, 61, 62, 64, 65, 66, 67, 69,\n\t70, 71, 72, 73, 75, 76, 77, 78,\n\t79, 80, 82, 83, 84, 85, 86, 87,\n\t88, 89, 91, 92, 93, 94, 95, 96,\n\t97, 98, 99, 100, 101, 102, 103, 104,\n\t105, 106, 107, 108, 109, 110, 111, 112,\n\t113, 114, 115, 116, 117, 118, 119, 120,\n\t121, 122, 123, 124, 125, 126, 127, 128,\n\t129, 130, 131, 132, 133, 134, 134, 135,\n\t136, 137, 138, 139, 140, 141, 142, 143,\n\t144, 144, 145, 146, 147, 148, 149, 150,\n\t151, 152, 152, 153, 154, 155, 156, 157,\n\t158, 158, 159, 160, 161, 162, 163, 164,\n\t164, 165, 166, 167, 168, 169, 169, 170,\n\t171, 172, 173, 174, 174, 175, 176, 177,\n\t178, 179, 179, 180, 181, 182, 183, 183,\n\t184, 185, 186, 187, 187, 188, 189, 190,\n\t191, 191, 192, 193, 194, 195, 195, 196,\n\t197, 198, 199, 199, 200, 201, 202, 202,\n\t203, 204, 205, 205, 206, 207, 208, 209,\n\t209, 210, 211, 212, 212, 213, 214, 215,\n\t215, 216, 217, 218, 218, 219, 220, 221,\n\t221, 222, 223, 224, 224, 225, 226, 227,\n\t227, 228, 229, 230, 230, 231, 232, 232,\n\t233, 234, 235, 235, 236, 237, 238, 238,\n\t239, 240, 240, 241, 242, 243, 243, 244,\n\t245, 245, 246, 247, 248, 248, 249, 250,\n\t250, 251, 252, 252, 253, 254, 255, 255 },\n\n\t{ 0, 9, 14, 18, 21, 24, 27, 29,\n\t32, 34, 37, 39, 41, 43, 45, 47,\n\t48, 50, 52, 54, 55, 57, 59, 60,\n\t62, 63, 65, 66, 68, 69, 71, 72,\n\t73, 75, 76, 77, 79, 80, 81, 83,\n\t84, 85, 86, 88, 89, 90, 91, 92,\n\t94, 95, 96, 97, 98, 99, 100, 102,\n\t103, 104, 105, 106, 107, 108, 109, 110,\n\t111, 112, 113, 114, 115, 116, 117, 118,\n\t119, 120, 121, 122, 123, 124, 125, 126,\n\t127, 128, 129, 130, 131, 132, 133, 134,\n\t135, 136, 137, 137, 138, 139, 140, 141,\n\t142, 143, 144, 145, 145, 146, 147, 148,\n\t149, 150, 151, 151, 152, 153, 154, 155,\n\t156, 156, 157, 158, 159, 160, 161, 161,\n\t162, 163, 164, 165, 165, 166, 167, 168,\n\t169, 169, 170, 171, 172, 173, 173, 174,\n\t175, 176, 176, 177, 178, 179, 179, 180,\n\t181, 182, 182, 183, 184, 185, 185, 186,\n\t187, 188, 188, 189, 190, 191, 191, 192,\n\t193, 194, 194, 195, 196, 196, 197, 198,\n\t199, 199, 200, 201, 201, 202, 203, 203,\n\t204, 205, 206, 206, 207, 208, 208, 209,\n\t210, 210, 211, 212, 212, 213, 214, 214,\n\t215, 216, 216, 217, 218, 218, 219, 220,\n\t220, 221, 222, 222, 223, 224, 224, 225,\n\t226, 226, 227, 228, 228, 229, 230, 230,\n\t231, 231, 232, 233, 233, 234, 235, 235,\n\t236, 237, 237, 238, 238, 239, 240, 240,\n\t241, 242, 242, 243, 243, 244, 245, 245,\n\t246, 247, 247, 248, 248, 249, 250, 250,\n\t251, 251, 252, 253, 253, 254, 254, 255 },\n\n\t{ 0, 16, 23, 28, 32, 36, 39, 42,\n\t45, 48, 50, 53, 55, 58, 60, 62,\n\t64, 66, 68, 70, 71, 73, 75, 77,\n\t78, 80, 81, 83, 84, 86, 87, 89,\n\t90, 92, 93, 94, 96, 97, 98, 100,\n\t101, 102, 103, 105, 106, 107, 108, 109,\n\t111, 112, 113, 114, 115, 116, 117, 118,\n\t119, 121, 122, 123, 124, 125, 126, 127,\n\t128, 129, 130, 131, 132, 133, 134, 135,\n\t135, 136, 137, 138, 139, 140, 141, 142,\n\t143, 144, 145, 145, 146, 147, 148, 149,\n\t150, 151, 151, 152, 153, 154, 155, 156,\n\t156, 157, 158, 159, 160, 160, 161, 162,\n\t163, 164, 164, 165, 166, 167, 167, 168,\n\t169, 170, 170, 171, 172, 173, 173, 174,\n\t175, 176, 176, 177, 178, 179, 179, 180,\n\t181, 181, 182, 183, 183, 184, 185, 186,\n\t186, 187, 188, 188, 189, 190, 190, 191,\n\t192, 192, 193, 194, 194, 195, 196, 196,\n\t197, 198, 198, 199, 199, 200, 201, 201,\n\t202, 203, 203, 204, 204, 205, 206, 206,\n\t207, 208, 208, 209, 209, 210, 211, 211,\n\t212, 212, 213, 214, 214, 215, 215, 216,\n\t217, 217, 218, 218, 219, 220, 220, 221,\n\t221, 222, 222, 223, 224, 224, 225, 225,\n\t226, 226, 227, 228, 228, 229, 229, 230,\n\t230, 231, 231, 232, 233, 233, 234, 234,\n\t235, 235, 236, 236, 237, 237, 238, 238,\n\t239, 240, 240, 241, 241, 242, 242, 243,\n\t243, 244, 244, 245, 245, 246, 246, 247,\n\t247, 248, 248, 249, 249, 250, 250, 251,\n\t251, 252, 252, 253, 253, 254, 254, 255 }\n};\n\n#pragma mark -\n#pragma mark GfxPalette32\n\n\tGfxPalette32::GfxPalette32(ResourceManager *resMan)\n\t: _resMan(resMan),\n\n\t// Palette versioning\n\t_version(1),\n\t_needsUpdate(false),\n#ifdef USE_RGB_COLOR\n\t_hardwarePalette(),\n#endif\n\t_currentPalette(),\n\t_sourcePalette(),\n\t_nextPalette(),\n\n\t// Palette varying\n\t_varyStartPalette(nullptr),\n\t_varyTargetPalette(nullptr),\n\t_varyFromColor(0),\n\t_varyToColor(255),\n\t_varyLastTick(0),\n\t_varyTime(0),\n\t_varyDirection(0),\n\t_varyPercent(0),\n\t_varyTargetPercent(0),\n\t_varyNumTimesPaused(0),\n\n\t// Palette cycling\n\t_cycleMap(),\n\n\t// Gamma correction\n\t_gammaLevel(g_sci->_features->useMacGammaLevel() ? 2 : -1),\n\t_gammaChanged(false) {\n\n\tfor (int i = 0, len = ARRAYSIZE(_fadeTable); i < len; ++i) {\n\t\t_fadeTable[i] = 100;\n\t}\n\n\tloadPalette(999);\n}\n\nbool GfxPalette32::loadPalette(const GuiResourceId resourceId) {\n\tResource *palResource = _resMan->findResource(ResourceId(kResourceTypePalette, resourceId), false);\n\n\tif (!palResource) {\n\t\treturn false;\n\t}\n\n\tconst HunkPalette palette(*palResource);\n\tsubmit(palette);\n\treturn true;\n}\n\nint16 GfxPalette32::matchColor(const uint8 r, const uint8 g, const uint8 b) {\n\tint16 bestIndex = 0;\n\tint bestDifference = 0xFFFFF;\n\tint difference;\n\n\tfor (int i = 0, channelDifference; i < g_sci->_gfxRemap32->getStartColor(); ++i) {\n\t\tdifference = _currentPalette.colors[i].r - r;\n\t\tdifference *= difference;\n\t\tif (bestDifference <= difference) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tchannelDifference = _currentPalette.colors[i].g - g;\n\t\tdifference += channelDifference * channelDifference;\n\t\tif (bestDifference <= difference) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tchannelDifference = _currentPalette.colors[i].b - b;\n\t\tdifference += channelDifference * channelDifference;\n\t\tif (bestDifference <= difference) {\n\t\t\tcontinue;\n\t\t}\n\t\tbestDifference = difference;\n\t\tbestIndex = i;\n\t}\n\n\treturn bestIndex;\n}\n\nvoid GfxPalette32::submit(const Palette &palette) {\n\t// If `_needsUpdate` is already set, there is no need to test whether\n\t// this palette submission causes a change to `_sourcePalette` since it is\n\t// going to be updated already anyway\n\tif (_needsUpdate) {\n\t\tmergePalette(_sourcePalette, palette);\n\t} else {\n\t\tconst Palette oldSourcePalette(_sourcePalette);\n\t\tmergePalette(_sourcePalette, palette);\n\n\t\tif (_sourcePalette != oldSourcePalette) {\n\t\t\t++_version;\n\t\t\t_needsUpdate = true;\n\t\t}\n\t}\n}\n\nvoid GfxPalette32::submit(const HunkPalette &hunkPalette) {\n\tif (hunkPalette.getVersion() == _version) {\n\t\treturn;\n\t}\n\n\tsubmit(hunkPalette.toPalette());\n\thunkPalette.setVersion(_version);\n}\n\nbool GfxPalette32::updateForFrame() {\n\tapplyAll();\n\t_needsUpdate = false;\n\treturn g_sci->_gfxRemap32->remapAllTables(_nextPalette != _currentPalette);\n}\n\nvoid GfxPalette32::updateFFrame() {\n\tfor (int i = 0; i < ARRAYSIZE(_nextPalette.colors); ++i) {\n\t\t_nextPalette.colors[i] = _sourcePalette.colors[i];\n\t}\n\t_needsUpdate = false;\n\tg_sci->_gfxRemap32->remapAllTables(_nextPalette != _currentPalette);\n}\n\nvoid GfxPalette32::updateHardware() {\n\tif (_currentPalette == _nextPalette && !_gammaChanged) {\n\t\treturn;\n\t}\n\n#ifdef USE_RGB_COLOR\n\tuint8 *bpal = _hardwarePalette;\n#else\n\tuint8 bpal[256 * 3];\n#endif\n\n\t// HACK: There are resources in a couple of Windows-only games that seem to\n\t// include bogus palette entries above 236. SSCI does a lot of extra work\n\t// when running in Windows to shift palettes and rewrite view & pic pixel\n\t// data on-the-fly to account for the way Windows palettes work, which\n\t// seems to end up masking the fact that there is some bad palette data.\n\t// Since only one demo and one game seem to have this problem, we instead\n\t// \"fix\" the problem here by ignoring attempts to send high palette entries\n\t// to the backend. This makes those high pixels render black, which seems to\n\t// match what would happen in the original interpreter, and saves us from\n\t// having to clutter up the engine with a bunch of palette shifting garbage.\n\t//\n\t// This workaround also handles Mac games, as they use 236 for black to avoid\n\t// conflicting with the operating system's palette which uses 0 for white.\n\tint maxIndex = ARRAYSIZE(_currentPalette.colors) - 2;\n\tif (g_sci->getGameId() == GID_HOYLE5 ||\n\t\t(g_sci->getGameId() == GID_GK2 && g_sci->isDemo()) ||\n\t\tg_sci->getPlatform() == Common::kPlatformMacintosh) {\n\t\tmaxIndex = 235;\n\t}\n\n\tfor (int i = 0; i <= maxIndex; ++i) {\n\t\t_currentPalette.colors[i] = _nextPalette.colors[i];\n\n\t\t// All color entries MUST be copied, not just \"used\" entries, otherwise\n\t\t// uninitialised memory from bpal makes its way into the system palette.\n\t\t// This would not normally be a problem, except that games sometimes use\n\t\t// unused palette entries. e.g. Phant1 title screen references palette\n\t\t// entries outside its own palette, so will render garbage colors where\n\t\t// the game expects them to be black\n\t\tif (_gammaLevel == -1) {\n\t\t\tbpal[i * 3 ] = _currentPalette.colors[i].r;\n\t\t\tbpal[i * 3 + 1] = _currentPalette.colors[i].g;\n\t\t\tbpal[i * 3 + 2] = _currentPalette.colors[i].b;\n\t\t} else {\n\t\t\tbpal[i * 3 ] = gammaTables[_gammaLevel][_currentPalette.colors[i].r];\n\t\t\tbpal[i * 3 + 1] = gammaTables[_gammaLevel][_currentPalette.colors[i].g];\n\t\t\tbpal[i * 3 + 2] = gammaTables[_gammaLevel][_currentPalette.colors[i].b];\n\t\t}\n\t}\n\n#ifndef USE_RGB_COLOR\n\t// When creating a raw palette on the stack, any skipped area of the palette\n\t// needs to be blacked out or else it will contain garbage memory\n\tmemset(bpal + (maxIndex + 1) * 3, 0, (255 - maxIndex - 1) * 3);\n#endif\n\n\t// The last color must always be white\n\tbpal[255 * 3 ] = 255;\n\tbpal[255 * 3 + 1] = 255;\n\tbpal[255 * 3 + 2] = 255;\n\n\t// If the system is in a high color mode, which can happen during video\n\t// playback, attempting to send the palette to OSystem is illegal and will\n\t// result in a crash\n\tif (g_system->getScreenFormat().bytesPerPixel == 1) {\n\t\tg_system->getPaletteManager()->setPalette(bpal, 0, 256);\n\t}\n\n\t_gammaChanged = false;\n}\n\nPalette GfxPalette32::getPaletteFromResource(const GuiResourceId resourceId) const {\n\tResource *palResource = _resMan->findResource(ResourceId(kResourceTypePalette, resourceId), false);\n\n\tif (!palResource) {\n\t\terror(\"Could not load vary palette %d\", resourceId);\n\t}\n\n\tconst HunkPalette rawPalette(*palResource);\n\treturn rawPalette.toPalette();\n}\n\nvoid GfxPalette32::mergePalette(Palette &to, const Palette &from) {\n\t// All colors MUST be copied, even index 255, despite the fact that games\n\t// cannot actually change index 255 (it is forced to white when generating\n\t// the hardware palette in updateHardware). While this causes some\n\t// additional unnecessary source palette invalidations, not doing it breaks\n\t// some badly programmed rooms, like room 6400 in Phant1 (see Trac#9788).\n\t// (Note, however, that that specific glitch is fully fixed by ignoring a\n\t// bad palette in the CelObjView constructor)\n\tfor (int i = 0; i < ARRAYSIZE(to.colors); ++i) {\n\t\tif (from.colors[i].used) {\n\t\t\tto.colors[i] = from.colors[i];\n\t\t}\n\t}\n}\n\nvoid GfxPalette32::applyAll() {\n\tapplyVary();\n\tapplyCycles();\n\tapplyFade();\n}\n\n#pragma mark -\n#pragma mark Varying\n\nvoid GfxPalette32::setVary(const Palette &target, const int16 percent, const int32 ticks, const int16 fromColor, const int16 toColor) {\n\tsetTarget(target);\n\tsetVaryTime(percent, ticks);\n\n\tif (fromColor > -1) {\n\t\t_varyFromColor = fromColor;\n\t}\n\tif (toColor > -1) {\n\t\tassert(toColor < 256);\n\t\t_varyToColor = toColor;\n\t}\n}\n\nvoid GfxPalette32::setVaryPercent(const int16 percent, const int32 ticks) {\n\tif (_varyTargetPalette) {\n\t\tsetVaryTime(percent, ticks);\n\t}\n\n\t// SSCI had two additional parameters for this function to change the\n\t// `_varyFromColor`, but they were always hardcoded to be ignored\n}\n\nvoid GfxPalette32::setVaryTime(const int32 time) {\n\tif (_varyTargetPalette) {\n\t\tsetVaryTime(_varyTargetPercent, time);\n\t}\n}\n\nvoid GfxPalette32::setVaryTime(const int16 percent, const int32 ticks) {\n\t_varyLastTick = g_sci->getTickCount();\n\tif (!ticks || _varyPercent == percent) {\n\t\t_varyDirection = 0;\n\t\t_varyTargetPercent = _varyPercent = percent;\n\t} else {\n\t\t_varyTime = ticks / (percent - _varyPercent);\n\t\t_varyTargetPercent = percent;\n\n\t\tif (_varyTime > 0) {\n\t\t\t_varyDirection = 1;\n\t\t} else if (_varyTime < 0) {\n\t\t\t_varyDirection = -1;\n\t\t\t_varyTime = -_varyTime;\n\t\t} else {\n\t\t\t_varyDirection = 0;\n\t\t\t_varyTargetPercent = _varyPercent = percent;\n\t\t}\n\t}\n}\n\nvoid GfxPalette32::varyOff() {\n\t_varyNumTimesPaused = 0;\n\t_varyPercent = _varyTargetPercent = 0;\n\t_varyFromColor = 0;\n\t_varyToColor = 255;\n\t_varyDirection = 0;\n\t_varyTargetPalette.reset();\n\t_varyStartPalette.reset();\n}\n\nvoid GfxPalette32::varyPause() {\n\t_varyDirection = 0;\n\t++_varyNumTimesPaused;\n}\n\nvoid GfxPalette32::varyOn() {\n\tif (_varyNumTimesPaused > 0) {\n\t\t--_varyNumTimesPaused;\n\t}\n\n\tif (_varyTargetPalette && _varyNumTimesPaused == 0) {\n\t\tif (_varyPercent != _varyTargetPercent && _varyTime != 0) {\n\t\t\t_varyDirection = (_varyTargetPercent - _varyPercent > 0) ? 1 : -1;\n\t\t} else {\n\t\t\t_varyPercent = _varyTargetPercent;\n\t\t}\n\t}\n}\n\nvoid GfxPalette32::setTarget(const Palette &palette) {\n\t_varyTargetPalette.reset(new Palette(palette));\n}\n\nvoid GfxPalette32::setStart(const Palette &palette) {\n\t_varyStartPalette.reset(new Palette(palette));\n}\n\nvoid GfxPalette32::mergeStart(const Palette &palette) {\n\tif (_varyStartPalette) {\n\t\tmergePalette(*_varyStartPalette, palette);\n\t} else {\n\t\t_varyStartPalette.reset(new Palette(palette));\n\t}\n}\n\nvoid GfxPalette32::mergeTarget(const Palette &palette) {\n\tif (_varyTargetPalette) {\n\t\tmergePalette(*_varyTargetPalette, palette);\n\t} else {\n\t\t_varyTargetPalette.reset(new Palette(palette));\n\t}\n}\n\nvoid GfxPalette32::applyVary() {\n\tconst uint32 now = g_sci->getTickCount();\n\twhile ((int32)(now - _varyLastTick) > _varyTime && _varyDirection != 0) {\n\t\t_varyLastTick += _varyTime;\n\n\t\tif (_varyPercent == _varyTargetPercent) {\n\t\t\t_varyDirection = 0;\n\t\t}\n\n\t\t_varyPercent += _varyDirection;\n\t}\n\n\tif (_varyPercent == 0 || !_varyTargetPalette) {\n\t\tfor (int i = 0; i < ARRAYSIZE(_nextPalette.colors); ++i) {\n\t\t\tif (_varyStartPalette && i >= _varyFromColor && i <= _varyToColor) {\n\t\t\t\t_nextPalette.colors[i] = _varyStartPalette->colors[i];\n\t\t\t} else {\n\t\t\t\t_nextPalette.colors[i] = _sourcePalette.colors[i];\n\t\t\t}\n\t\t}\n\t} else {\n\t\tfor (int i = 0; i < ARRAYSIZE(_nextPalette.colors); ++i) {\n\t\t\tif (i >= _varyFromColor && i <= _varyToColor) {\n\t\t\t\tColor targetColor = _varyTargetPalette->colors[i];\n\t\t\t\tColor sourceColor;\n\n\t\t\t\tif (_varyStartPalette) {\n\t\t\t\t\tsourceColor = _varyStartPalette->colors[i];\n\t\t\t\t} else {\n\t\t\t\t\tsourceColor = _sourcePalette.colors[i];\n\t\t\t\t}\n\n\t\t\t\tColor computedColor;\n\n\t\t\t\tint color;\n\t\t\t\tcolor = targetColor.r - sourceColor.r;\n\t\t\t\tcomputedColor.r = ((color * _varyPercent) / 100) + sourceColor.r;\n\t\t\t\tcolor = targetColor.g - sourceColor.g;\n\t\t\t\tcomputedColor.g = ((color * _varyPercent) / 100) + sourceColor.g;\n\t\t\t\tcolor = targetColor.b - sourceColor.b;\n\t\t\t\tcomputedColor.b = ((color * _varyPercent) / 100) + sourceColor.b;\n\t\t\t\tcomputedColor.used = sourceColor.used;\n\n\t\t\t\t_nextPalette.colors[i] = computedColor;\n\t\t\t}\n\t\t\telse {\n\t\t\t\t_nextPalette.colors[i] = _sourcePalette.colors[i];\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid GfxPalette32::kernelPalVarySet(const GuiResourceId paletteId, const int16 percent, const int32 ticks, const int16 fromColor, const int16 toColor) {\n\tPalette palette;\n\n\tif (getSciVersion() == SCI_VERSION_3 && paletteId == 0xFFFF) {\n\t\tpalette = _currentPalette;\n\t\tassert(fromColor >= 0 && fromColor < 256);\n\t\tassert(toColor >= 0 && toColor < 256);\n\t\t// While palette varying is normally inclusive of `toColor`, the\n\t\t// palette inversion code in SSCI excludes `toColor`, and RAMA room\n\t\t// 6201 requires this or else parts of the game's UI get inverted\n\t\tfor (int i = fromColor; i < toColor; ++i) {\n\t\t\tpalette.colors[i].r = ~palette.colors[i].r;\n\t\t\tpalette.colors[i].g = ~palette.colors[i].g;\n\t\t\tpalette.colors[i].b = ~palette.colors[i].b;\n\t\t}\n\t} else {\n\t\tpalette = getPaletteFromResource(paletteId);\n\t}\n\n\tsetVary(palette, percent, ticks, fromColor, toColor);\n}\n\nvoid GfxPalette32::kernelPalVaryMergeTarget(const GuiResourceId paletteId) {\n\tconst Palette palette = getPaletteFromResource(paletteId);\n\tmergeTarget(palette);\n}\n\nvoid GfxPalette32::kernelPalVarySetTarget(const GuiResourceId paletteId) {\n\tconst Palette palette = getPaletteFromResource(paletteId);\n\tsetTarget(palette);\n}\n\nvoid GfxPalette32::kernelPalVarySetStart(const GuiResourceId paletteId) {\n\tconst Palette palette = getPaletteFromResource(paletteId);\n\tsetStart(palette);\n}\n\nvoid GfxPalette32::kernelPalVaryMergeStart(const GuiResourceId paletteId) {\n\tconst Palette palette = getPaletteFromResource(paletteId);\n\tmergeStart(palette);\n}\n\nvoid GfxPalette32::kernelPalVaryPause(const bool pause) {\n\tif (pause) {\n\t\tvaryPause();\n\t} else {\n\t\tvaryOn();\n\t}\n}\n\n#pragma mark -\n#pragma mark Cycling\n\nvoid GfxPalette32::setCycle(const uint8 fromColor, const uint8 toColor, const int16 direction, const int16 delay) {\n\tassert(fromColor < toColor);\n\n\tPalCycler *cycler = getCycler(fromColor);\n\n\tif (cycler != nullptr) {\n\t\tclearCycleMap(fromColor, cycler->numColorsToCycle);\n\t} else {\n\t\tfor (int i = 0; i < kNumCyclers; ++i) {\n\t\t\tif (!_cyclers[i]) {\n\t\t\t\tcycler = new PalCycler;\n\t\t\t\t_cyclers[i].reset(cycler);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\t// If there are no free cycler slots, SSCI overrides the first oldest cycler\n\t// that it finds, where \"oldest\" is determined by the difference between the\n\t// tick and now\n\tif (cycler == nullptr) {\n\t\tconst uint32 now = g_sci->getTickCount();\n\t\tuint32 minUpdateDelta = 0xFFFFFFFF;\n\n\t\tfor (int i = 0; i < kNumCyclers; ++i) {\n\t\t\tPalCyclerOwner &candidate = _cyclers[i];\n\n\t\t\tconst uint32 updateDelta = now - candidate->lastUpdateTick;\n\t\t\tif (updateDelta < minUpdateDelta) {\n\t\t\t\tminUpdateDelta = updateDelta;\n\t\t\t\tcycler = candidate.get();\n\t\t\t}\n\t\t}\n\n\t\tclearCycleMap(cycler->fromColor, cycler->numColorsToCycle);\n\t}\n\n\tuint16 numColorsToCycle = toColor - fromColor;\n\tif (g_sci->_features->hasMidPaletteCode()) {\n\t\tnumColorsToCycle += 1;\n\t}\n\tcycler->fromColor = fromColor;\n\tcycler->numColorsToCycle = numColorsToCycle;\n\tcycler->currentCycle = fromColor;\n\tcycler->direction = direction < 0 ? kPalCycleBackward : kPalCycleForward;\n\tcycler->delay = delay;\n\tcycler->lastUpdateTick = g_sci->getTickCount();\n\tcycler->numTimesPaused = 0;\n\n\tsetCycleMap(fromColor, numColorsToCycle);\n}\n\nvoid GfxPalette32::doCycle(const uint8 fromColor, const int16 speed) {\n\tPalCycler *const cycler = getCycler(fromColor);\n\tif (cycler != nullptr) {\n\t\tcycler->lastUpdateTick = g_sci->getTickCount();\n\t\tupdateCycler(*cycler, speed);\n\t}\n}\n\nvoid GfxPalette32::cycleOn(const uint8 fromColor) {\n\tPalCycler *const cycler = getCycler(fromColor);\n\tif (cycler != nullptr && cycler->numTimesPaused > 0) {\n\t\t--cycler->numTimesPaused;\n\t}\n}\n\nvoid GfxPalette32::cyclePause(const uint8 fromColor) {\n\tPalCycler *const cycler = getCycler(fromColor);\n\tif (cycler != nullptr) {\n\t\t++cycler->numTimesPaused;\n\t}\n}\n\nvoid GfxPalette32::cycleAllOn() {\n\tfor (int i = 0; i < kNumCyclers; ++i) {\n\t\tPalCyclerOwner &cycler = _cyclers[i];\n\t\tif (cycler && cycler->numTimesPaused > 0) {\n\t\t\t--cycler->numTimesPaused;\n\t\t}\n\t}\n}\n\nvoid GfxPalette32::cycleAllPause() {\n\t// SSCI did not check for null pointers in the palette cyclers pointer array\n\tfor (int i = 0; i < kNumCyclers; ++i) {\n\t\tPalCyclerOwner &cycler = _cyclers[i];\n\t\tif (cycler) {\n\t\t\t// This seems odd, because currentCycle is 0..numColorsPerCycle,\n\t\t\t// but fromColor is 0..255. When applyAllCycles runs, the values\n\t\t\t// end up back in range\n\t\t\tcycler->currentCycle = cycler->fromColor;\n\t\t}\n\t}\n\n\tapplyAllCycles();\n\n\tfor (int i = 0; i < kNumCyclers; ++i) {\n\t\tPalCyclerOwner &cycler = _cyclers[i];\n\t\tif (cycler) {\n\t\t\t++cycler->numTimesPaused;\n\t\t}\n\t}\n}\n\nvoid GfxPalette32::cycleOff(const uint8 fromColor) {\n\tfor (int i = 0; i < kNumCyclers; ++i) {\n\t\tPalCyclerOwner &cycler = _cyclers[i];\n\t\tif (cycler && cycler->fromColor == fromColor) {\n\t\t\tclearCycleMap(fromColor, cycler->numColorsToCycle);\n\t\t\t_cyclers[i].reset();\n\t\t\tbreak;\n\t\t}\n\t}\n}\n\nvoid GfxPalette32::cycleAllOff() {\n\tfor (int i = 0; i < kNumCyclers; ++i) {\n\t\tPalCyclerOwner &cycler = _cyclers[i];\n\t\tif (cycler) {\n\t\t\tclearCycleMap(cycler->fromColor, cycler->numColorsToCycle);\n\t\t\t_cyclers[i].reset();\n\t\t}\n\t}\n}\n\nvoid GfxPalette32::updateCycler(PalCycler &cycler, const int16 speed) {\n\tint16 currentCycle = cycler.currentCycle;\n\tconst uint16 numColorsToCycle = cycler.numColorsToCycle;\n\n\tif (cycler.direction == kPalCycleBackward) {\n\t\tcurrentCycle = (currentCycle - (speed % numColorsToCycle)) + numColorsToCycle;\n\t} else {\n\t\tcurrentCycle = currentCycle + speed;\n\t}\n\n\tcycler.currentCycle = currentCycle % numColorsToCycle;\n}\n\nvoid GfxPalette32::clearCycleMap(const uint16 fromColor, const uint16 numColorsToClear) {\n\tbool *mapEntry = _cycleMap + fromColor;\n\tconst bool *const lastEntry = _cycleMap + numColorsToClear;\n\twhile (mapEntry < lastEntry) {\n\t\t*mapEntry++ = false;\n\t}\n}\n\nvoid GfxPalette32::setCycleMap(const uint16 fromColor, const uint16 numColorsToSet) {\n\tbool *mapEntry = _cycleMap + fromColor;\n\tconst bool *const lastEntry = _cycleMap + numColorsToSet;\n\twhile (mapEntry < lastEntry) {\n\t\tif (*mapEntry != false) {\n\t\t\terror(\"Cycles intersect\");\n\t\t}\n\t\t*mapEntry++ = true;\n\t}\n}\n\nPalCycler *GfxPalette32::getCycler(const uint16 fromColor) {\n\tfor (int cyclerIndex = 0; cyclerIndex < kNumCyclers; ++cyclerIndex) {\n\t\tPalCyclerOwner &cycler = _cyclers[cyclerIndex];\n\t\tif (cycler && cycler->fromColor == fromColor) {\n\t\t\treturn cycler.get();\n\t\t}\n\t}\n\n\treturn nullptr;\n}\n\nvoid GfxPalette32::applyAllCycles() {\n\tColor paletteCopy[256];\n\tmemcpy(paletteCopy, _nextPalette.colors, sizeof(paletteCopy));\n\n\tfor (int i = 0; i < kNumCyclers; ++i) {\n\t\tPalCyclerOwner &cycler = _cyclers[i];\n\t\tif (cycler) {\n\t\t\tcycler->currentCycle = (cycler->currentCycle + 1) % cycler->numColorsToCycle;\n\t\t\tfor (int j = 0; j < cycler->numColorsToCycle; j++) {\n\t\t\t\t_nextPalette.colors[cycler->fromColor + j] = paletteCopy[cycler->fromColor + (cycler->currentCycle + j) % cycler->numColorsToCycle];\n\t\t\t}\n\t\t}\n\t}\n}\n\nvoid GfxPalette32::applyCycles() {\n\tColor paletteCopy[256];\n\tmemcpy(paletteCopy, _nextPalette.colors, sizeof(paletteCopy));\n\n\tconst uint32 now = g_sci->getTickCount();\n\tfor (int i = 0; i < kNumCyclers; ++i) {\n\t\tPalCyclerOwner &cycler = _cyclers[i];\n\t\tif (!cycler) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (cycler->delay != 0 && cycler->numTimesPaused == 0) {\n\t\t\twhile ((cycler->delay + cycler->lastUpdateTick) < now) {\n\t\t\t\tupdateCycler(*cycler, 1);\n\t\t\t\tcycler->lastUpdateTick += cycler->delay;\n\t\t\t}\n\t\t}\n\n\t\tfor (int j = 0; j < cycler->numColorsToCycle; j++) {\n\t\t\t_nextPalette.colors[cycler->fromColor + j] = paletteCopy[cycler->fromColor + (cycler->currentCycle + j) % cycler->numColorsToCycle];\n\t\t}\n\t}\n}\n\n#pragma mark -\n#pragma mark Fading\n\nvoid GfxPalette32::setFade(const uint16 percent, const uint8 fromColor, uint16 toColor) {\n\tif (fromColor > toColor) {\n\t\treturn;\n\t}\n\n\t// Some game scripts (like SQ6 Sierra logo and main menu) incorrectly call\n\t// setFade with toColor set to 256\n\tif (toColor > 255) {\n\t\ttoColor = 255;\n\t}\n\n\tfor (int i = fromColor; i <= toColor; i++) {\n\t\t_fadeTable[i] = percent;\n\t}\n}\n\nvoid GfxPalette32::fadeOff() {\n\tsetFade(100, 0, 255);\n}\n\nvoid GfxPalette32::applyFade() {\n\tfor (int i = 0; i < ARRAYSIZE(_fadeTable); ++i) {\n\t\tif (_fadeTable[i] == 100) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tColor &color = _nextPalette.colors[i];\n\n\t\tcolor.r = MIN(255, (uint16)color.r * _fadeTable[i] / 100);\n\t\tcolor.g = MIN(255, (uint16)color.g * _fadeTable[i] / 100);\n\t\tcolor.b = MIN(255, (uint16)color.b * _fadeTable[i] / 100);\n\t}\n}\n\n} // End of namespace Sci\n"} +{"text": "/*\nCopyright 2018 The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n\n// This file was autogenerated by go-to-protobuf. Do not edit it manually!\n\nsyntax = 'proto2';\n\npackage k8s.io.api.autoscaling.v2beta1;\n\nimport \"k8s.io/api/core/v1/generated.proto\";\nimport \"k8s.io/apimachinery/pkg/api/resource/generated.proto\";\nimport \"k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto\";\nimport \"k8s.io/apimachinery/pkg/runtime/generated.proto\";\nimport \"k8s.io/apimachinery/pkg/runtime/schema/generated.proto\";\nimport \"k8s.io/apimachinery/pkg/util/intstr/generated.proto\";\n\n// Package-wide variables from generator \"generated\".\noption go_package = \"v2beta1\";\n\n// CrossVersionObjectReference contains enough information to let you identify the referred resource.\nmessage CrossVersionObjectReference {\n // Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds\"\n optional string kind = 1;\n\n // Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names\n optional string name = 2;\n\n // API version of the referent\n // +optional\n optional string apiVersion = 3;\n}\n\n// HorizontalPodAutoscaler is the configuration for a horizontal pod\n// autoscaler, which automatically manages the replica count of any resource\n// implementing the scale subresource based on the metrics specified.\nmessage HorizontalPodAutoscaler {\n // metadata is the standard object metadata.\n // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#metadata\n // +optional\n optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;\n\n // spec is the specification for the behaviour of the autoscaler.\n // More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.\n // +optional\n optional HorizontalPodAutoscalerSpec spec = 2;\n\n // status is the current information about the autoscaler.\n // +optional\n optional HorizontalPodAutoscalerStatus status = 3;\n}\n\n// HorizontalPodAutoscalerCondition describes the state of\n// a HorizontalPodAutoscaler at a certain point.\nmessage HorizontalPodAutoscalerCondition {\n // type describes the current condition\n optional string type = 1;\n\n // status is the status of the condition (True, False, Unknown)\n optional string status = 2;\n\n // lastTransitionTime is the last time the condition transitioned from\n // one status to another\n // +optional\n optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastTransitionTime = 3;\n\n // reason is the reason for the condition's last transition.\n // +optional\n optional string reason = 4;\n\n // message is a human-readable explanation containing details about\n // the transition\n // +optional\n optional string message = 5;\n}\n\n// HorizontalPodAutoscaler is a list of horizontal pod autoscaler objects.\nmessage HorizontalPodAutoscalerList {\n // metadata is the standard list metadata.\n // +optional\n optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;\n\n // items is the list of horizontal pod autoscaler objects.\n repeated HorizontalPodAutoscaler items = 2;\n}\n\n// HorizontalPodAutoscalerSpec describes the desired functionality of the HorizontalPodAutoscaler.\nmessage HorizontalPodAutoscalerSpec {\n // scaleTargetRef points to the target resource to scale, and is used to the pods for which metrics\n // should be collected, as well as to actually change the replica count.\n optional CrossVersionObjectReference scaleTargetRef = 1;\n\n // minReplicas is the lower limit for the number of replicas to which the autoscaler can scale down.\n // It defaults to 1 pod.\n // +optional\n optional int32 minReplicas = 2;\n\n // maxReplicas is the upper limit for the number of replicas to which the autoscaler can scale up.\n // It cannot be less that minReplicas.\n optional int32 maxReplicas = 3;\n\n // metrics contains the specifications for which to use to calculate the\n // desired replica count (the maximum replica count across all metrics will\n // be used). The desired replica count is calculated multiplying the\n // ratio between the target value and the current value by the current\n // number of pods. Ergo, metrics used must decrease as the pod count is\n // increased, and vice-versa. See the individual metric source types for\n // more information about how each type of metric must respond.\n // +optional\n repeated MetricSpec metrics = 4;\n}\n\n// HorizontalPodAutoscalerStatus describes the current status of a horizontal pod autoscaler.\nmessage HorizontalPodAutoscalerStatus {\n // observedGeneration is the most recent generation observed by this autoscaler.\n // +optional\n optional int64 observedGeneration = 1;\n\n // lastScaleTime is the last time the HorizontalPodAutoscaler scaled the number of pods,\n // used by the autoscaler to control how often the number of pods is changed.\n // +optional\n optional k8s.io.apimachinery.pkg.apis.meta.v1.Time lastScaleTime = 2;\n\n // currentReplicas is current number of replicas of pods managed by this autoscaler,\n // as last seen by the autoscaler.\n optional int32 currentReplicas = 3;\n\n // desiredReplicas is the desired number of replicas of pods managed by this autoscaler,\n // as last calculated by the autoscaler.\n optional int32 desiredReplicas = 4;\n\n // currentMetrics is the last read state of the metrics used by this autoscaler.\n repeated MetricStatus currentMetrics = 5;\n\n // conditions is the set of conditions required for this autoscaler to scale its target,\n // and indicates whether or not those conditions are met.\n repeated HorizontalPodAutoscalerCondition conditions = 6;\n}\n\n// MetricSpec specifies how to scale based on a single metric\n// (only `type` and one other matching field should be set at once).\nmessage MetricSpec {\n // type is the type of metric source. It should match one of the fields below.\n optional string type = 1;\n\n // object refers to a metric describing a single kubernetes object\n // (for example, hits-per-second on an Ingress object).\n // +optional\n optional ObjectMetricSource object = 2;\n\n // pods refers to a metric describing each pod in the current scale target\n // (for example, transactions-processed-per-second). The values will be\n // averaged together before being compared to the target value.\n // +optional\n optional PodsMetricSource pods = 3;\n\n // resource refers to a resource metric (such as those specified in\n // requests and limits) known to Kubernetes describing each pod in the\n // current scale target (e.g. CPU or memory). Such metrics are built in to\n // Kubernetes, and have special scaling options on top of those available\n // to normal per-pod metrics using the \"pods\" source.\n // +optional\n optional ResourceMetricSource resource = 4;\n}\n\n// MetricStatus describes the last-read state of a single metric.\nmessage MetricStatus {\n // type is the type of metric source. It will match one of the fields below.\n optional string type = 1;\n\n // object refers to a metric describing a single kubernetes object\n // (for example, hits-per-second on an Ingress object).\n // +optional\n optional ObjectMetricStatus object = 2;\n\n // pods refers to a metric describing each pod in the current scale target\n // (for example, transactions-processed-per-second). The values will be\n // averaged together before being compared to the target value.\n // +optional\n optional PodsMetricStatus pods = 3;\n\n // resource refers to a resource metric (such as those specified in\n // requests and limits) known to Kubernetes describing each pod in the\n // current scale target (e.g. CPU or memory). Such metrics are built in to\n // Kubernetes, and have special scaling options on top of those available\n // to normal per-pod metrics using the \"pods\" source.\n // +optional\n optional ResourceMetricStatus resource = 4;\n}\n\n// ObjectMetricSource indicates how to scale on a metric describing a\n// kubernetes object (for example, hits-per-second on an Ingress object).\nmessage ObjectMetricSource {\n // target is the described Kubernetes object.\n optional CrossVersionObjectReference target = 1;\n\n // metricName is the name of the metric in question.\n optional string metricName = 2;\n\n // targetValue is the target value of the metric (as a quantity).\n optional k8s.io.apimachinery.pkg.api.resource.Quantity targetValue = 3;\n}\n\n// ObjectMetricStatus indicates the current value of a metric describing a\n// kubernetes object (for example, hits-per-second on an Ingress object).\nmessage ObjectMetricStatus {\n // target is the described Kubernetes object.\n optional CrossVersionObjectReference target = 1;\n\n // metricName is the name of the metric in question.\n optional string metricName = 2;\n\n // currentValue is the current value of the metric (as a quantity).\n optional k8s.io.apimachinery.pkg.api.resource.Quantity currentValue = 3;\n}\n\n// PodsMetricSource indicates how to scale on a metric describing each pod in\n// the current scale target (for example, transactions-processed-per-second).\n// The values will be averaged together before being compared to the target\n// value.\nmessage PodsMetricSource {\n // metricName is the name of the metric in question\n optional string metricName = 1;\n\n // targetAverageValue is the target value of the average of the\n // metric across all relevant pods (as a quantity)\n optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 2;\n}\n\n// PodsMetricStatus indicates the current value of a metric describing each pod in\n// the current scale target (for example, transactions-processed-per-second).\nmessage PodsMetricStatus {\n // metricName is the name of the metric in question\n optional string metricName = 1;\n\n // currentAverageValue is the current value of the average of the\n // metric across all relevant pods (as a quantity)\n optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 2;\n}\n\n// ResourceMetricSource indicates how to scale on a resource metric known to\n// Kubernetes, as specified in requests and limits, describing each pod in the\n// current scale target (e.g. CPU or memory). The values will be averaged\n// together before being compared to the target. Such metrics are built in to\n// Kubernetes, and have special scaling options on top of those available to\n// normal per-pod metrics using the \"pods\" source. Only one \"target\" type\n// should be set.\nmessage ResourceMetricSource {\n // name is the name of the resource in question.\n optional string name = 1;\n\n // targetAverageUtilization is the target value of the average of the\n // resource metric across all relevant pods, represented as a percentage of\n // the requested value of the resource for the pods.\n // +optional\n optional int32 targetAverageUtilization = 2;\n\n // targetAverageValue is the target value of the average of the\n // resource metric across all relevant pods, as a raw value (instead of as\n // a percentage of the request), similar to the \"pods\" metric source type.\n // +optional\n optional k8s.io.apimachinery.pkg.api.resource.Quantity targetAverageValue = 3;\n}\n\n// ResourceMetricStatus indicates the current value of a resource metric known to\n// Kubernetes, as specified in requests and limits, describing each pod in the\n// current scale target (e.g. CPU or memory). Such metrics are built in to\n// Kubernetes, and have special scaling options on top of those available to\n// normal per-pod metrics using the \"pods\" source.\nmessage ResourceMetricStatus {\n // name is the name of the resource in question.\n optional string name = 1;\n\n // currentAverageUtilization is the current value of the average of the\n // resource metric across all relevant pods, represented as a percentage of\n // the requested value of the resource for the pods. It will only be\n // present if `targetAverageValue` was set in the corresponding metric\n // specification.\n // +optional\n optional int32 currentAverageUtilization = 2;\n\n // currentAverageValue is the current value of the average of the\n // resource metric across all relevant pods, as a raw value (instead of as\n // a percentage of the request), similar to the \"pods\" metric source type.\n // It will always be set, regardless of the corresponding metric specification.\n optional k8s.io.apimachinery.pkg.api.resource.Quantity currentAverageValue = 3;\n}\n\n"} +{"text": "/****************************************************************************/\n// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo\n// Copyright (C) 2001-2020 German Aerospace Center (DLR) and others.\n// This program and the accompanying materials are made available under the\n// terms of the Eclipse Public License 2.0 which is available at\n// https://www.eclipse.org/legal/epl-2.0/\n// This Source Code may also be made available under the following Secondary\n// Licenses when the conditions for such availability set forth in the Eclipse\n// Public License 2.0 are satisfied: GNU General Public License, version 2\n// or later which is available at\n// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html\n// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later\n/****************************************************************************/\n/// @file GNEStop.cpp\n/// @author Pablo Alvarez Lopez\n/// @date March 2019\n///\n// Representation of Stops in NETEDIT\n/****************************************************************************/\n#include <cmath>\n#include <netedit/GNENet.h>\n#include <netedit/GNEUndoList.h>\n#include <netedit/GNEViewNet.h>\n#include <netedit/changes/GNEChange_EnableAttribute.h>\n#include <netedit/changes/GNEChange_Attribute.h>\n#include <utils/gui/div/GLHelper.h>\n#include <utils/gui/globjects/GLIncludes.h>\n#include <utils/vehicle/SUMORouteHandler.h>\n\n#include \"GNEStop.h\"\n\n// ===========================================================================\n// member method definitions\n// ===========================================================================\n\nGNEStop::GNEStop(SumoXMLTag tag, GNENet* net, const SUMOVehicleParameter::Stop& stopParameter, GNEAdditional* stoppingPlace, GNEDemandElement* stopParent) :\n GNEDemandElement(stopParent, net, GLO_STOP, tag,\n{}, {}, {}, {stoppingPlace}, {}, {}, {stopParent}, {}),\nSUMOVehicleParameter::Stop(stopParameter) {\n}\n\n\nGNEStop::GNEStop(GNENet* net, const SUMOVehicleParameter::Stop& stopParameter, GNELane* lane, GNEDemandElement* stopParent) :\n GNEDemandElement(stopParent, net, GLO_STOP, SUMO_TAG_STOP_LANE,\n{}, {}, {lane}, {}, {}, {}, {stopParent}, {}),\nSUMOVehicleParameter::Stop(stopParameter) {\n}\n\n\nGNEStop::~GNEStop() {}\n\n\nstd::string\nGNEStop::getBegin() const {\n return \"\";\n}\n\n\nvoid\nGNEStop::writeDemandElement(OutputDevice& device) const {\n write(device);\n}\n\n\nbool\nGNEStop::isDemandElementValid() const {\n // only Stops placed over lanes can be invalid\n if (myTagProperty.getTag() != SUMO_TAG_STOP_LANE) {\n return true;\n } else if (friendlyPos) {\n // with friendly position enabled position are \"always fixed\"\n return true;\n } else {\n // obtain lane length\n double laneLength = getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength() * getParentLanes().front()->getLengthGeometryFactor();\n // declare a copy of start and end positions\n double startPosCopy = startPos;\n double endPosCopy = endPos;\n // check if position has to be fixed\n if (startPosCopy < 0) {\n startPosCopy += laneLength;\n }\n if (endPosCopy < 0) {\n endPosCopy += laneLength;\n }\n // check values\n if (!(parametersSet & STOP_START_SET) && !(parametersSet & STOP_END_SET)) {\n return true;\n } else if (!(parametersSet & STOP_START_SET)) {\n return (endPosCopy <= getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength());\n } else if (!(parametersSet & STOP_END_SET)) {\n return (startPosCopy >= 0);\n } else {\n return ((startPosCopy >= 0) && (endPosCopy <= getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength()) && ((endPosCopy - startPosCopy) >= POSITION_EPS));\n }\n }\n}\n\n\nstd::string\nGNEStop::getDemandElementProblem() const {\n // declare a copy of start and end positions\n double startPosCopy = startPos;\n double endPosCopy = endPos;\n // obtain lane length\n double laneLength = getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength();\n // check if position has to be fixed\n if (startPosCopy < 0) {\n startPosCopy += laneLength;\n }\n if (endPosCopy < 0) {\n endPosCopy += laneLength;\n }\n // declare variables\n std::string errorStart, separator, errorEnd;\n // check positions over lane\n if (startPosCopy < 0) {\n errorStart = (toString(SUMO_ATTR_STARTPOS) + \" < 0\");\n } else if (startPosCopy > getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength()) {\n errorStart = (toString(SUMO_ATTR_STARTPOS) + \" > lanes's length\");\n }\n if (endPosCopy < 0) {\n errorEnd = (toString(SUMO_ATTR_ENDPOS) + \" < 0\");\n } else if (endPosCopy > getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength()) {\n errorEnd = (toString(SUMO_ATTR_ENDPOS) + \" > lanes's length\");\n }\n // check separator\n if ((errorStart.size() > 0) && (errorEnd.size() > 0)) {\n separator = \" and \";\n }\n return errorStart + separator + errorEnd;\n}\n\n\nvoid\nGNEStop::fixDemandElementProblem() {\n //\n}\n\n\nSUMOVehicleClass\nGNEStop::getVClass() const {\n return getParentDemandElements().front()->getVClass();\n}\n\n\nconst RGBColor&\nGNEStop::getColor() const {\n return myNet->getViewNet()->getVisualisationSettings().colorSettings.stops;\n}\n\n\nvoid\nGNEStop::startGeometryMoving() {\n // only start geometry moving if stop is placed over a lane\n if (getParentLanes().size() > 0) {\n // always save original position over view\n myStopMove.originalViewPosition = getPositionInView();\n // save start and end position\n myStopMove.firstOriginalLanePosition = getAttribute(SUMO_ATTR_STARTPOS);\n myStopMove.secondOriginalPosition = getAttribute(SUMO_ATTR_ENDPOS);\n // save current centering boundary\n myStopMove.movingGeometryBoundary = getCenteringBoundary();\n }\n}\n\n\nvoid\nGNEStop::endGeometryMoving() {\n // check that stop is placed over a lane and endGeometryMoving was called only once\n if ((getParentLanes().size() > 0) && myStopMove.movingGeometryBoundary.isInitialised()) {\n // reset myMovingGeometryBoundary\n myStopMove.movingGeometryBoundary.reset();\n }\n}\n\n\nvoid\nGNEStop::moveGeometry(const Position& offset) {\n // only move if at leats start or end positions is defined\n if ((getParentLanes().size() > 0) && ((parametersSet & STOP_START_SET) || (parametersSet & STOP_END_SET))) {\n // Calculate new position using old position\n Position newPosition = myStopMove.originalViewPosition;\n newPosition.add(offset);\n // filtern position using snap to active grid\n newPosition = myNet->getViewNet()->snapToActiveGrid(newPosition);\n double offsetLane = getParentLanes().front()->getLaneShape().nearest_offset_to_point2D(newPosition, false) - getParentLanes().front()->getLaneShape().nearest_offset_to_point2D(myStopMove.originalViewPosition, false);\n // check if both position has to be moved\n if ((parametersSet & STOP_START_SET) && (parametersSet & STOP_END_SET)) {\n // calculate stoppingPlace length and lane length (After apply geometry factor)\n double stoppingPlaceLength = fabs(parse<double>(myStopMove.secondOriginalPosition) - parse<double>(myStopMove.firstOriginalLanePosition));\n double laneLengt = getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength() * getParentLanes().front()->getLengthGeometryFactor();\n // avoid changing stopping place's length\n if ((parse<double>(myStopMove.firstOriginalLanePosition) + offsetLane) < 0) {\n startPos = 0;\n endPos = stoppingPlaceLength;\n } else if ((parse<double>(myStopMove.secondOriginalPosition) + offsetLane) > laneLengt) {\n startPos = laneLengt - stoppingPlaceLength;\n endPos = laneLengt;\n } else {\n startPos = parse<double>(myStopMove.firstOriginalLanePosition) + offsetLane;\n endPos = parse<double>(myStopMove.secondOriginalPosition) + offsetLane;\n }\n } else {\n // check if start position must be moved\n if ((parametersSet & STOP_START_SET)) {\n startPos = parse<double>(myStopMove.firstOriginalLanePosition) + offsetLane;\n }\n // check if start position must be moved\n if ((parametersSet & STOP_END_SET)) {\n endPos = parse<double>(myStopMove.secondOriginalPosition) + offsetLane;\n }\n }\n // update geometry\n updateGeometry();\n }\n}\n\n\nvoid\nGNEStop::commitGeometryMoving(GNEUndoList* undoList) {\n // only commit geometry moving if at leats start or end positions is defined\n if ((getParentLanes().size() > 0) && ((parametersSet & STOP_START_SET) || (parametersSet & STOP_END_SET))) {\n undoList->p_begin(\"position of \" + getTagStr());\n if (parametersSet & STOP_START_SET) {\n undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_STARTPOS, toString(startPos), myStopMove.firstOriginalLanePosition));\n }\n if (parametersSet & STOP_END_SET) {\n undoList->p_add(new GNEChange_Attribute(this, SUMO_ATTR_ENDPOS, toString(endPos), myStopMove.secondOriginalPosition));\n }\n undoList->p_end();\n }\n}\n\n\nvoid\nGNEStop::updateGeometry() {\n //only update Stops over lanes, because other uses the geometry of stopping place parent\n if (getParentLanes().size() > 0) {\n // Cut shape using as delimitators fixed start position and fixed end position\n myDemandElementGeometry.updateGeometry(getParentLanes().front()->getLaneShape(), getStartGeometryPositionOverLane(), getEndGeometryPositionOverLane());\n } else if (getParentAdditionals().size() > 0) {\n // use geometry of additional (busStop)\n myDemandElementGeometry.updateGeometry(getParentAdditionals().at(0));\n }\n // recompute geometry of all Demand elements related with this this stop\n if (getParentDemandElements().front()->getTagProperty().isRoute()) {\n getParentDemandElements().front()->updateGeometry();\n }\n}\n\n\nvoid\nGNEStop::computePath() {\n // nothing to compute\n}\n\n\nvoid\nGNEStop::invalidatePath() {\n // nothing to invalidate\n}\n\n\nPosition\nGNEStop::getPositionInView() const {\n if (getParentLanes().size() > 0) {\n // calculate start and end positions as absolute values\n double start = fabs(parametersSet & STOP_START_SET ? startPos : 0);\n double end = fabs(parametersSet & STOP_END_SET ? endPos : getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength());\n // obtain position in view depending if both positions are defined\n if (!(parametersSet & STOP_START_SET) && !(parametersSet & STOP_END_SET)) {\n return getParentLanes().front()->getLaneShape().positionAtOffset(getParentLanes().front()->getLaneShape().length() / 2);\n } else if (!(parametersSet & STOP_START_SET)) {\n return getParentLanes().front()->getLaneShape().positionAtOffset(end);\n } else if (!(parametersSet & STOP_END_SET)) {\n return getParentLanes().front()->getLaneShape().positionAtOffset(start);\n } else {\n return getParentLanes().front()->getLaneShape().positionAtOffset((start + end) / 2.0);\n }\n } else if (getParentDemandElements().size() > 0) {\n return getParentDemandElements().front()->getPositionInView();\n } else {\n throw ProcessError(\"Invalid Stop parent\");\n }\n}\n\n\nstd::string\nGNEStop::getParentName() const {\n if (getParentDemandElements().size() > 0) {\n return getParentDemandElements().front()->getID();\n } else if (getParentAdditionals().size() > 0) {\n return getParentAdditionals().front()->getID();\n } else if (getParentLanes().size() > 0) {\n return getParentLanes().front()->getID();\n } else {\n throw ProcessError(\"Invalid parent\");\n }\n}\n\n\nBoundary\nGNEStop::getCenteringBoundary() const {\n // Return Boundary depending if myMovingGeometryBoundary is initialised (important for move geometry)\n if (getParentAdditionals().size() > 0) {\n return getParentAdditionals().at(0)->getCenteringBoundary();\n } else if (myStopMove.movingGeometryBoundary.isInitialised()) {\n return myStopMove.movingGeometryBoundary;\n } else if (myDemandElementGeometry.getShape().size() > 0) {\n Boundary b = myDemandElementGeometry.getShape().getBoxBoundary();\n b.grow(20);\n return b;\n } else {\n return Boundary(-0.1, -0.1, 0.1, 0.1);\n }\n}\n\n\nvoid\nGNEStop::splitEdgeGeometry(const double /*splitPosition*/, const GNENetworkElement* /*originalElement*/, const GNENetworkElement* /*newElement*/, GNEUndoList* /*undoList*/) {\n // geometry of this element cannot be splitted\n}\n\n\nvoid\nGNEStop::drawGL(const GUIVisualizationSettings& s) const {\n // declare flag to enable or disable draw person plan\n bool drawPersonPlan = false;\n if (myTagProperty.isStop()) {\n if (myNet->getViewNet()->getNetworkViewOptions().showDemandElements() && myNet->getViewNet()->getDataViewOptions().showDemandElements() &&\n myNet->getViewNet()->getDemandViewOptions().showNonInspectedDemandElements(this)) {\n drawPersonPlan = true;\n }\n } else if (myNet->getViewNet()->getDemandViewOptions().showAllPersonPlans()) {\n drawPersonPlan = true;\n } else if (myNet->getViewNet()->isAttributeCarrierInspected(getParentDemandElements().front())) {\n drawPersonPlan = true;\n } else if (myNet->getViewNet()->getDemandViewOptions().getLockedPerson() == getParentDemandElements().front()) {\n drawPersonPlan = true;\n } else if (!myNet->getViewNet()->getInspectedAttributeCarriers().empty() &&\n (myNet->getViewNet()->getInspectedAttributeCarriers().front()->getAttribute(GNE_ATTR_PARENT) == getAttribute(GNE_ATTR_PARENT))) {\n drawPersonPlan = true;\n }\n // check if stop can be drawn\n if (drawPersonPlan) {\n // Obtain exaggeration of the draw\n const double exaggeration = s.addSize.getExaggeration(s, this);\n // declare value to save stop color\n RGBColor stopColor;\n // Set color\n if (drawUsingSelectColor()) {\n stopColor = s.colorSettings.selectedRouteColor;\n } else {\n stopColor = s.colorSettings.stops;\n }\n // Start drawing adding an gl identificator\n glPushName(getGlID());\n // Add a draw matrix\n glPushMatrix();\n // set Color\n GLHelper::setColor(stopColor);\n // Start with the drawing of the area traslating matrix to origin\n myNet->getViewNet()->drawTranslateFrontAttributeCarrier(this, getType());\n // draw depending of details\n if (s.drawDetail(s.detailSettings.stopsDetails, exaggeration) && getParentLanes().size() > 0) {\n // Draw the area using shape, shapeRotations, shapeLengths and value of exaggeration\n GLHelper::drawBoxLines(myDemandElementGeometry.getShape(), myDemandElementGeometry.getShapeRotations(), myDemandElementGeometry.getShapeLengths(), exaggeration * 0.1, 0,\n getParentLanes().front()->getParentEdge()->getNBEdge()->getLaneWidth(getParentLanes().front()->getIndex()) * 0.5);\n GLHelper::drawBoxLines(myDemandElementGeometry.getShape(), myDemandElementGeometry.getShapeRotations(), myDemandElementGeometry.getShapeLengths(), exaggeration * 0.1, 0,\n getParentLanes().front()->getParentEdge()->getNBEdge()->getLaneWidth(getParentLanes().front()->getIndex()) * -0.5);\n // pop draw matrix\n glPopMatrix();\n // Add a draw matrix\n glPushMatrix();\n // move to geometry front\n glTranslated(myDemandElementGeometry.getShape().back().x(), myDemandElementGeometry.getShape().back().y(), getType());\n glRotated(myDemandElementGeometry.getShapeRotations().back(), 0, 0, 1);\n // draw front of Stop depending if it's placed over a lane or over a stoppingPlace\n if (getParentLanes().size() > 0) {\n // draw front of Stop\n GLHelper::drawBoxLine(Position(0, 0), 0, exaggeration * 0.5,\n getParentLanes().front()->getParentEdge()->getNBEdge()->getLaneWidth(getParentLanes().front()->getIndex()) * 0.5);\n } else {\n // draw front of Stop\n GLHelper::drawBoxLine(Position(0, 0), 0, exaggeration * 0.5, exaggeration);\n }\n // move to \"S\" position\n glTranslated(0, 1, 0);\n // only draw text if isn't being drawn for selecting\n if (s.drawForRectangleSelection) {\n GLHelper::setColor(stopColor);\n GLHelper::drawBoxLine(Position(0, 1), 0, 2, 1);\n } else if (s.drawDetail(s.detailSettings.stopsText, exaggeration)) {\n // draw \"S\" symbol\n GLHelper::drawText(\"S\", Position(), .1, 2.8, stopColor);\n // move to subtitle positin\n glTranslated(0, 1.4, 0);\n // draw subtitle depending of tag\n GLHelper::drawText(\"lane\", Position(), .1, 1, stopColor, 180);\n }\n // pop draw matrix\n glPopMatrix();\n // Draw name if isn't being drawn for selecting\n drawName(getCenteringBoundary().getCenter(), s.scale, s.addName);\n // check if dotted contour has to be drawn\n if (s.drawDottedContour() || myNet->getViewNet()->isAttributeCarrierInspected(this)) {\n // draw dooted contour depending if it's placed over a lane or over a stoppingPlace\n if (getParentLanes().size() > 0) {\n // GLHelper::drawShapeDottedContourAroundShape(s, getType(), myDemandElementGeometry.getShape(),\n // getParentLanes().front()->getParentEdge()->getNBEdge()->getLaneWidth(getParentLanes().front()->getIndex()) * 0.5);\n } else {\n // GLHelper::drawShapeDottedContourAroundShape(s, getType(), myDemandElementGeometry.getShape(), exaggeration);\n }\n }\n } else {\n // Draw the area using shape, shapeRotations, shapeLengths and value of exaggeration\n GNEGeometry::drawGeometry(myNet->getViewNet(), myDemandElementGeometry, exaggeration * 0.8);\n // pop draw matrix\n glPopMatrix();\n }\n // Pop name\n glPopName();\n // draw person parent if this stop if their first person plan child\n if ((getParentDemandElements().size() == 1) && getParentDemandElements().front()->getChildDemandElements().front() == this) {\n getParentDemandElements().front()->drawGL(s);\n }\n }\n}\n\n\nvoid\nGNEStop::drawPartialGL(const GUIVisualizationSettings& /*s*/, const GNELane* /*lane*/, const double /*offsetFront*/) const {\n // Stops don't use drawPartialGL\n}\n\n\nvoid\nGNEStop::drawPartialGL(const GUIVisualizationSettings& /*s*/, const GNELane* /* fromLane */, const GNELane* /* toLane */, const double /*offsetFront*/) const {\n // Stops don't use drawPartialGL\n}\n\n\nstd::string\nGNEStop::getAttribute(SumoXMLAttr key) const {\n switch (key) {\n case SUMO_ATTR_DURATION:\n if (parametersSet & STOP_DURATION_SET) {\n return time2string(duration);\n } else {\n return \"\";\n }\n case SUMO_ATTR_UNTIL:\n if (parametersSet & STOP_UNTIL_SET) {\n return time2string(until);\n } else {\n return \"\";\n }\n case SUMO_ATTR_EXTENSION:\n if (parametersSet & STOP_EXTENSION_SET) {\n return time2string(extension);\n } else {\n return \"\";\n }\n case SUMO_ATTR_TRIGGERED:\n // this is an special case\n if (parametersSet & STOP_TRIGGER_SET) {\n return \"1\";\n } else {\n return \"0\";\n }\n case SUMO_ATTR_CONTAINER_TRIGGERED:\n // this is an special case\n if (parametersSet & STOP_CONTAINER_TRIGGER_SET) {\n return \"1\";\n } else {\n return \"0\";\n }\n case SUMO_ATTR_EXPECTED:\n if (parametersSet & STOP_EXPECTED_SET) {\n return toString(awaitedPersons);\n } else {\n return \"\";\n }\n case SUMO_ATTR_EXPECTED_CONTAINERS:\n if (parametersSet & STOP_EXPECTED_CONTAINERS_SET) {\n return toString(awaitedContainers);\n } else {\n return \"\";\n }\n case SUMO_ATTR_PARKING:\n return toString(parking);\n case SUMO_ATTR_ACTTYPE:\n return actType;\n case SUMO_ATTR_TRIP_ID:\n if (parametersSet & STOP_TRIP_ID_SET) {\n return tripId;\n } else {\n return \"\";\n }\n // specific of Stops over stoppingPlaces\n case SUMO_ATTR_BUS_STOP:\n case SUMO_ATTR_CONTAINER_STOP:\n case SUMO_ATTR_CHARGING_STATION:\n case SUMO_ATTR_PARKING_AREA:\n return getParentAdditionals().front()->getID();\n // specific of stops over lanes\n case SUMO_ATTR_LANE:\n return getParentLanes().front()->getID();\n case SUMO_ATTR_STARTPOS:\n if (parametersSet & STOP_START_SET) {\n return toString(startPos);\n } else {\n return \"\";\n }\n case SUMO_ATTR_ENDPOS:\n if (parametersSet & STOP_END_SET) {\n return toString(endPos);\n } else {\n return \"\";\n }\n case SUMO_ATTR_FRIENDLY_POS:\n return toString(friendlyPos);\n //\n case GNE_ATTR_SELECTED:\n return toString(isAttributeCarrierSelected());\n case GNE_ATTR_PARENT:\n return getParentDemandElements().front()->getID();\n default:\n throw InvalidArgument(getTagStr() + \" doesn't have an attribute of type '\" + toString(key) + \"'\");\n }\n}\n\n\ndouble\nGNEStop::getAttributeDouble(SumoXMLAttr key) const {\n switch (key) {\n case SUMO_ATTR_STARTPOS:\n if (parametersSet & STOP_START_SET) {\n return startPos;\n } else {\n return 0;\n }\n case SUMO_ATTR_ENDPOS:\n if (parametersSet & STOP_END_SET) {\n return endPos;\n } else {\n return getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength();\n }\n default:\n throw InvalidArgument(getTagStr() + \" doesn't have an attribute of type '\" + toString(key) + \"'\");\n }\n}\n\n\nvoid\nGNEStop::setAttribute(SumoXMLAttr key, const std::string& value, GNEUndoList* undoList) {\n if (value == getAttribute(key)) {\n return; //avoid needless changes, later logic relies on the fact that attributes have changed\n }\n switch (key) {\n case SUMO_ATTR_DURATION:\n case SUMO_ATTR_UNTIL:\n case SUMO_ATTR_EXTENSION:\n case SUMO_ATTR_TRIGGERED:\n case SUMO_ATTR_CONTAINER_TRIGGERED:\n case SUMO_ATTR_EXPECTED:\n case SUMO_ATTR_EXPECTED_CONTAINERS:\n case SUMO_ATTR_PARKING:\n case SUMO_ATTR_ACTTYPE:\n case SUMO_ATTR_TRIP_ID:\n // specific of Stops over stoppingPlaces\n case SUMO_ATTR_BUS_STOP:\n case SUMO_ATTR_CONTAINER_STOP:\n case SUMO_ATTR_CHARGING_STATION:\n case SUMO_ATTR_PARKING_AREA:\n // specific of stops over lanes\n case SUMO_ATTR_LANE:\n case SUMO_ATTR_STARTPOS:\n case SUMO_ATTR_ENDPOS:\n case SUMO_ATTR_FRIENDLY_POS:\n //\n case GNE_ATTR_SELECTED:\n undoList->p_add(new GNEChange_Attribute(this, key, value));\n break;\n default:\n throw InvalidArgument(getTagStr() + \" doesn't have an attribute of type '\" + toString(key) + \"'\");\n }\n}\n\n\nbool\nGNEStop::isValid(SumoXMLAttr key, const std::string& value) {\n // declare string error\n std::string error;\n switch (key) {\n case SUMO_ATTR_DURATION:\n case SUMO_ATTR_UNTIL:\n case SUMO_ATTR_EXTENSION:\n if (canParse<SUMOTime>(value)) {\n return parse<SUMOTime>(value) >= 0;\n } else {\n return false;\n }\n case SUMO_ATTR_TRIGGERED:\n return canParse<bool>(value);\n case SUMO_ATTR_CONTAINER_TRIGGERED:\n return canParse<bool>(value);\n case SUMO_ATTR_EXPECTED:\n case SUMO_ATTR_EXPECTED_CONTAINERS:\n if (value.empty()) {\n return true;\n } else {\n std::vector<std::string> IDs = parse<std::vector<std::string>>(value);\n for (const auto& i : IDs) {\n if (SUMOXMLDefinitions::isValidVehicleID(i) == false) {\n return false;\n }\n }\n return true;\n }\n case SUMO_ATTR_PARKING:\n return canParse<bool>(value);\n case SUMO_ATTR_ACTTYPE:\n return true;\n case SUMO_ATTR_TRIP_ID:\n return SUMOXMLDefinitions::isValidVehicleID(value);\n // specific of Stops over stoppingPlaces\n case SUMO_ATTR_BUS_STOP:\n return (myNet->retrieveAdditional(SUMO_TAG_BUS_STOP, value, false) != nullptr);\n case SUMO_ATTR_CONTAINER_STOP:\n return (myNet->retrieveAdditional(SUMO_TAG_CONTAINER_STOP, value, false) != nullptr);\n case SUMO_ATTR_CHARGING_STATION:\n return (myNet->retrieveAdditional(SUMO_TAG_CHARGING_STATION, value, false) != nullptr);\n case SUMO_ATTR_PARKING_AREA:\n return (myNet->retrieveAdditional(SUMO_TAG_PARKING_AREA, value, false) != nullptr);\n // specific of stops over lanes\n case SUMO_ATTR_LANE:\n if (myNet->retrieveLane(value, false) != nullptr) {\n return true;\n } else {\n return false;\n }\n case SUMO_ATTR_STARTPOS:\n if (value.empty()) {\n return true;\n } else if (canParse<double>(value)) {\n return SUMORouteHandler::isStopPosValid(parse<double>(value), endPos, getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength(), POSITION_EPS, friendlyPos);\n } else {\n return false;\n }\n case SUMO_ATTR_ENDPOS:\n if (value.empty()) {\n return true;\n } else if (canParse<double>(value)) {\n return SUMORouteHandler::isStopPosValid(startPos, parse<double>(value), getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength(), POSITION_EPS, friendlyPos);\n } else {\n return false;\n }\n case SUMO_ATTR_FRIENDLY_POS:\n return canParse<bool>(value);\n //\n case GNE_ATTR_SELECTED:\n return canParse<bool>(value);\n default:\n throw InvalidArgument(getTagStr() + \" doesn't have an attribute of type '\" + toString(key) + \"'\");\n }\n}\n\n\nvoid\nGNEStop::enableAttribute(SumoXMLAttr key, GNEUndoList* undoList) {\n // obtain a copy of parameter sets\n int newParametersSet = parametersSet;\n // modify parametersSetCopy depending of attr\n switch (key) {\n case SUMO_ATTR_STARTPOS:\n newParametersSet |= STOP_START_SET;\n break;\n case SUMO_ATTR_ENDPOS:\n newParametersSet |= STOP_END_SET;\n break;\n case SUMO_ATTR_DURATION:\n newParametersSet |= STOP_DURATION_SET;\n break;\n case SUMO_ATTR_UNTIL:\n newParametersSet |= STOP_UNTIL_SET;\n break;\n case SUMO_ATTR_EXTENSION:\n newParametersSet |= STOP_EXTENSION_SET;\n break;\n case SUMO_ATTR_EXPECTED:\n newParametersSet |= STOP_TRIGGER_SET;\n break;\n case SUMO_ATTR_EXPECTED_CONTAINERS:\n newParametersSet |= STOP_CONTAINER_TRIGGER_SET;\n break;\n case SUMO_ATTR_PARKING:\n newParametersSet |= STOP_PARKING_SET;\n break;\n default:\n break;\n }\n // add GNEChange_EnableAttribute\n undoList->add(new GNEChange_EnableAttribute(this, parametersSet, newParametersSet), true);\n // modify parametersSetCopy depending of attr\n switch (key) {\n case SUMO_ATTR_STARTPOS:\n if (parametersSet & STOP_END_SET) {\n undoList->p_add(new GNEChange_Attribute(this, key, toString(endPos - MIN_STOP_LENGTH)));\n } else {\n undoList->p_add(new GNEChange_Attribute(this, key, toString(getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength() - MIN_STOP_LENGTH)));\n }\n break;\n case SUMO_ATTR_ENDPOS:\n undoList->p_add(new GNEChange_Attribute(this, key, toString(getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength())));\n break;\n case SUMO_ATTR_DURATION:\n undoList->p_add(new GNEChange_Attribute(this, key, myTagProperty.getAttributeProperties(key).getDefaultValue()));\n break;\n case SUMO_ATTR_UNTIL:\n case SUMO_ATTR_EXTENSION:\n undoList->p_add(new GNEChange_Attribute(this, key, myTagProperty.getAttributeProperties(key).getDefaultValue()));\n break;\n default:\n break;\n }\n}\n\n\nvoid\nGNEStop::disableAttribute(SumoXMLAttr key, GNEUndoList* undoList) {\n // obtain a copy of parameter sets\n int newParametersSet = parametersSet;\n // modify parametersSetCopy depending of attr\n switch (key) {\n case SUMO_ATTR_STARTPOS:\n newParametersSet &= ~STOP_START_SET;\n break;\n case SUMO_ATTR_ENDPOS:\n newParametersSet &= ~STOP_END_SET;\n break;\n case SUMO_ATTR_DURATION:\n newParametersSet &= ~STOP_DURATION_SET;\n break;\n case SUMO_ATTR_UNTIL:\n newParametersSet &= ~STOP_UNTIL_SET;\n break;\n case SUMO_ATTR_EXTENSION:\n newParametersSet &= ~STOP_EXTENSION_SET;\n break;\n case SUMO_ATTR_EXPECTED:\n newParametersSet &= ~STOP_TRIGGER_SET;\n break;\n case SUMO_ATTR_EXPECTED_CONTAINERS:\n newParametersSet &= ~STOP_CONTAINER_TRIGGER_SET;\n break;\n case SUMO_ATTR_PARKING:\n newParametersSet &= ~STOP_PARKING_SET;\n break;\n default:\n break;\n }\n // add GNEChange_EnableAttribute\n undoList->add(new GNEChange_EnableAttribute(this, parametersSet, newParametersSet), true);\n}\n\n\nbool\nGNEStop::isAttributeEnabled(SumoXMLAttr key) const {\n switch (key) {\n // Currently stops parents cannot be edited\n case SUMO_ATTR_BUS_STOP:\n case SUMO_ATTR_CONTAINER_STOP:\n case SUMO_ATTR_CHARGING_STATION:\n case SUMO_ATTR_PARKING_AREA:\n return false;\n case SUMO_ATTR_STARTPOS:\n return (parametersSet & STOP_START_SET) != 0;\n case SUMO_ATTR_ENDPOS:\n return (parametersSet & STOP_END_SET) != 0;\n case SUMO_ATTR_DURATION:\n return (parametersSet & STOP_DURATION_SET) != 0;\n case SUMO_ATTR_UNTIL:\n return (parametersSet & STOP_UNTIL_SET) != 0;\n case SUMO_ATTR_EXTENSION:\n return (parametersSet & STOP_EXTENSION_SET) != 0;\n case SUMO_ATTR_EXPECTED:\n return (parametersSet & STOP_TRIGGER_SET) != 0;\n case SUMO_ATTR_EXPECTED_CONTAINERS:\n return (parametersSet & STOP_CONTAINER_TRIGGER_SET) != 0;\n case SUMO_ATTR_PARKING:\n return (parametersSet & STOP_PARKING_SET) != 0;\n default:\n return true;\n }\n}\n\n\nstd::string\nGNEStop::getPopUpID() const {\n return getTagStr();\n}\n\n\nstd::string\nGNEStop::getHierarchyName() const {\n if (getParentAdditionals().size() > 0) {\n return \"vehicle stop: \" + getParentAdditionals().front()->getTagStr();\n } else {\n return \"vehicle stop: lane\";\n }\n}\n\n\ndouble\nGNEStop::getStartGeometryPositionOverLane() const {\n double fixedPos = 0;\n if (parametersSet & STOP_START_SET) {\n fixedPos = startPos;\n } else if (parametersSet & STOP_END_SET) {\n fixedPos = endPos - MIN_STOP_LENGTH;\n } else {\n fixedPos = getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength() - MIN_STOP_LENGTH;\n }\n const double len = getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength();\n if (fixedPos < 0) {\n fixedPos += len;\n }\n return fixedPos * getParentLanes().front()->getLengthGeometryFactor();\n}\n\n\ndouble\nGNEStop::getEndGeometryPositionOverLane() const {\n double fixedPos = 0;\n if (parametersSet & STOP_END_SET) {\n fixedPos = endPos;\n } else {\n fixedPos = getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength();\n }\n const double len = getParentLanes().front()->getParentEdge()->getNBEdge()->getFinalLength();\n if (fixedPos < 0) {\n fixedPos += len;\n }\n return fixedPos * getParentLanes().front()->getLengthGeometryFactor();\n}\n\n// ===========================================================================\n// private\n// ===========================================================================\n\nvoid\nGNEStop::setAttribute(SumoXMLAttr key, const std::string& value) {\n switch (key) {\n case SUMO_ATTR_DURATION:\n if (value.empty()) {\n parametersSet &= ~STOP_DURATION_SET;\n } else {\n duration = string2time(value);\n parametersSet |= STOP_DURATION_SET;\n }\n break;\n case SUMO_ATTR_UNTIL:\n if (value.empty()) {\n parametersSet &= ~STOP_UNTIL_SET;\n } else {\n until = string2time(value);\n parametersSet |= STOP_UNTIL_SET;\n }\n break;\n case SUMO_ATTR_EXTENSION:\n if (value.empty()) {\n parametersSet &= ~STOP_EXTENSION_SET;\n } else {\n extension = string2time(value);\n parametersSet |= STOP_EXTENSION_SET;\n }\n break;\n case SUMO_ATTR_TRIGGERED:\n triggered = parse<bool>(value);\n // this is an special case: only if SUMO_ATTR_TRIGGERED is true, it will be written in XML\n if (triggered) {\n parametersSet |= STOP_TRIGGER_SET;\n } else {\n parametersSet &= ~STOP_TRIGGER_SET;\n }\n break;\n case SUMO_ATTR_CONTAINER_TRIGGERED:\n containerTriggered = parse<bool>(value);\n // this is an special case: only if SUMO_ATTR_CONTAINER_TRIGGERED is true, it will be written in XML\n if (containerTriggered) {\n parametersSet |= STOP_CONTAINER_TRIGGER_SET;\n } else {\n parametersSet &= ~STOP_CONTAINER_TRIGGER_SET;\n }\n break;\n case SUMO_ATTR_EXPECTED:\n if (value.empty()) {\n parametersSet &= ~STOP_EXPECTED_SET;\n } else {\n awaitedPersons = parse<std::set<std::string> >(value);\n parametersSet |= STOP_EXPECTED_SET;\n }\n break;\n case SUMO_ATTR_EXPECTED_CONTAINERS:\n if (value.empty()) {\n parametersSet &= ~STOP_EXPECTED_CONTAINERS_SET;\n } else {\n awaitedContainers = parse<std::set<std::string> >(value);\n parametersSet |= STOP_EXPECTED_CONTAINERS_SET;\n }\n break;\n case SUMO_ATTR_PARKING:\n parking = parse<bool>(value);\n break;\n case SUMO_ATTR_ACTTYPE:\n actType = value;\n break;\n case SUMO_ATTR_TRIP_ID:\n if (value.empty()) {\n parametersSet &= ~STOP_TRIP_ID_SET;\n } else {\n tripId = value;\n parametersSet |= STOP_TRIP_ID_SET;\n }\n break;\n // specific of Stops over stoppingPlaces\n case SUMO_ATTR_BUS_STOP:\n replaceAdditionalParent(SUMO_TAG_BUS_STOP, value, 0);\n updateGeometry();\n break;\n case SUMO_ATTR_CONTAINER_STOP:\n replaceAdditionalParent(SUMO_TAG_CONTAINER_STOP, value, 0);\n updateGeometry();\n break;\n case SUMO_ATTR_CHARGING_STATION:\n replaceAdditionalParent(SUMO_TAG_CHARGING_STATION, value, 0);\n updateGeometry();\n break;\n case SUMO_ATTR_PARKING_AREA:\n replaceAdditionalParent(SUMO_TAG_PARKING_AREA, value, 0);\n updateGeometry();\n break;\n // specific of Stops over lanes\n case SUMO_ATTR_LANE:\n replaceDemandParentLanes(value);\n updateGeometry();\n break;\n case SUMO_ATTR_STARTPOS:\n if (value.empty()) {\n parametersSet &= ~STOP_START_SET;\n } else {\n startPos = parse<double>(value);\n parametersSet |= STOP_START_SET;\n }\n updateGeometry();\n break;\n case SUMO_ATTR_ENDPOS:\n if (value.empty()) {\n parametersSet &= ~STOP_END_SET;\n } else {\n endPos = parse<double>(value);\n parametersSet |= STOP_END_SET;\n }\n updateGeometry();\n break;\n case SUMO_ATTR_FRIENDLY_POS:\n friendlyPos = parse<bool>(value);\n break;\n //\n case GNE_ATTR_SELECTED:\n if (parse<bool>(value)) {\n selectAttributeCarrier();\n } else {\n unselectAttributeCarrier();\n }\n break;\n default:\n throw InvalidArgument(getTagStr() + \" doesn't have an attribute of type '\" + toString(key) + \"'\");\n }\n}\n\n\nvoid\nGNEStop::setEnabledAttribute(const int enabledAttributes) {\n parametersSet = enabledAttributes;\n}\n\n\n/****************************************************************************/\n"} +{"text": "// /**\n// * Copyright © Magento, Inc. All rights reserved.\n// * See COPYING.txt for license details.\n// */\n\n//\n// Lists\n// _____________________________________________\n\n@list-item__margin-bottom: 1.2rem;\n\n.list {\n margin-bottom: 3rem;\n}\n\n.list-dot {\n .list-item {\n display: list-item;\n list-style-position: inside;\n margin-bottom: @list-item__margin-bottom;\n }\n}\n\n.list-title {\n color: @text__color;\n font-size: @font-size__base;\n font-weight: @font-weight__bold;\n letter-spacing: @letter-spacing__small;\n margin-bottom: @list-item__margin-bottom;\n}\n\n.list-item-success,\n.list-item-failed,\n.list-item-warning {\n &:before {\n font-family: @icons__font-family;\n font-size: 1.6rem;\n top: 0;\n }\n}\n\n.list-item-success {\n &:before {\n content: @icon-check-mage__content;\n font-size: 1.6rem;\n }\n}\n\n.list-item-failed {\n &:before {\n content: @icon-error__content;\n font-size: 1.4rem;\n left: .1rem;\n top: .2rem;\n }\n}\n\n.list-item-warning {\n &:before {\n content: @icon-warning__content;\n font-size: 1.3rem;\n left: .2rem;\n }\n}\n"} +{"text": "<?php declare(strict_types = 1);\nclass C\n{\n /** @var array */\n private $source;\n public function __construct(array $source)\n {\n $this->source = $source;\n }\n /**\n * @return mixed\n */\n public function getSource(string $index)\n {\n return $this->source[$index];\n }\n}\n"} +{"text": "<?php\n// +----------------------------------------------------------------------\n// | ThinkPHP [ WE CAN DO IT JUST THINK ]\n// +----------------------------------------------------------------------\n// | Copyright (c) 2006~2015 http://thinkphp.cn All rights reserved.\n// +----------------------------------------------------------------------\n// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )\n// +----------------------------------------------------------------------\n// | Author: yunwuxin <448901948@qq.com>\n// +----------------------------------------------------------------------\n\nnamespace think\\process\\pipes;\n\nuse think\\Process;\n\nclass Unix extends Pipes\n{\n\n /** @var bool */\n private $ttyMode;\n /** @var bool */\n private $ptyMode;\n /** @var bool */\n private $disableOutput;\n\n public function __construct($ttyMode, $ptyMode, $input, $disableOutput)\n {\n $this->ttyMode = (bool) $ttyMode;\n $this->ptyMode = (bool) $ptyMode;\n $this->disableOutput = (bool) $disableOutput;\n\n if (is_resource($input)) {\n $this->input = $input;\n } else {\n $this->inputBuffer = (string) $input;\n }\n }\n\n public function __destruct()\n {\n $this->close();\n }\n\n /**\n * {@inheritdoc}\n */\n public function getDescriptors()\n {\n if ($this->disableOutput) {\n $nullstream = fopen('/dev/null', 'c');\n\n return [\n ['pipe', 'r'],\n $nullstream,\n $nullstream,\n ];\n }\n\n if ($this->ttyMode) {\n return [\n ['file', '/dev/tty', 'r'],\n ['file', '/dev/tty', 'w'],\n ['file', '/dev/tty', 'w'],\n ];\n }\n\n if ($this->ptyMode && Process::isPtySupported()) {\n return [\n ['pty'],\n ['pty'],\n ['pty'],\n ];\n }\n\n return [\n ['pipe', 'r'],\n ['pipe', 'w'], // stdout\n ['pipe', 'w'], // stderr\n ];\n }\n\n /**\n * {@inheritdoc}\n */\n public function getFiles()\n {\n return [];\n }\n\n /**\n * {@inheritdoc}\n */\n public function readAndWrite($blocking, $close = false)\n {\n\n if (1 === count($this->pipes) && [0] === array_keys($this->pipes)) {\n fclose($this->pipes[0]);\n unset($this->pipes[0]);\n }\n\n if (empty($this->pipes)) {\n return [];\n }\n\n $this->unblock();\n\n $read = [];\n\n if (null !== $this->input) {\n $r = array_merge($this->pipes, ['input' => $this->input]);\n } else {\n $r = $this->pipes;\n }\n\n unset($r[0]);\n\n $w = isset($this->pipes[0]) ? [$this->pipes[0]] : null;\n $e = null;\n\n if (false === $n = @stream_select($r, $w, $e, 0, $blocking ? Process::TIMEOUT_PRECISION * 1E6 : 0)) {\n\n if (!$this->hasSystemCallBeenInterrupted()) {\n $this->pipes = [];\n }\n\n return $read;\n }\n\n if (0 === $n) {\n return $read;\n }\n\n foreach ($r as $pipe) {\n\n $type = (false !== $found = array_search($pipe, $this->pipes)) ? $found : 'input';\n $data = '';\n while ('' !== $dataread = (string) fread($pipe, self::CHUNK_SIZE)) {\n $data .= $dataread;\n }\n\n if ('' !== $data) {\n if ('input' === $type) {\n $this->inputBuffer .= $data;\n } else {\n $read[$type] = $data;\n }\n }\n\n if (false === $data || (true === $close && feof($pipe) && '' === $data)) {\n if ('input' === $type) {\n $this->input = null;\n } else {\n fclose($this->pipes[$type]);\n unset($this->pipes[$type]);\n }\n }\n }\n\n if (null !== $w && 0 < count($w)) {\n while (strlen($this->inputBuffer)) {\n $written = fwrite($w[0], $this->inputBuffer, 2 << 18); // write 512k\n if ($written > 0) {\n $this->inputBuffer = (string) substr($this->inputBuffer, $written);\n } else {\n break;\n }\n }\n }\n\n if ('' === $this->inputBuffer && null === $this->input && isset($this->pipes[0])) {\n fclose($this->pipes[0]);\n unset($this->pipes[0]);\n }\n\n return $read;\n }\n\n /**\n * {@inheritdoc}\n */\n public function areOpen()\n {\n return (bool) $this->pipes;\n }\n\n /**\n * 创建一个新的 UnixPipes 实例\n * @param Process $process\n * @param string|resource $input\n * @return self\n */\n public static function create(Process $process, $input)\n {\n return new static($process->isTty(), $process->isPty(), $input, $process->isOutputDisabled());\n }\n}\n"} +{"text": "\"use strict\";\nconst definitions = require(\"../../lib/definitions\");\n\nconst has = Function.call.bind(Object.prototype.hasOwnProperty);\n\nfunction joinComparisons(leftArr, right) {\n return (\n leftArr.map(JSON.stringify).join(` === ${right} || `) + ` === ${right}`\n );\n}\n\nfunction addIsHelper(type, aliasKeys, deprecated) {\n const targetType = JSON.stringify(type);\n let aliasSource = \"\";\n if (aliasKeys) {\n aliasSource = \" || \" + joinComparisons(aliasKeys, \"nodeType\");\n }\n\n let placeholderSource = \"\";\n const placeholderTypes = [];\n if (\n definitions.PLACEHOLDERS.includes(type) &&\n has(definitions.FLIPPED_ALIAS_KEYS, type)\n ) {\n placeholderTypes.push(type);\n }\n if (has(definitions.PLACEHOLDERS_FLIPPED_ALIAS, type)) {\n placeholderTypes.push(...definitions.PLACEHOLDERS_FLIPPED_ALIAS[type]);\n }\n if (placeholderTypes.length > 0) {\n placeholderSource =\n ' || nodeType === \"Placeholder\" && (' +\n joinComparisons(placeholderTypes, \"node.expectedNode\") +\n \")\";\n }\n\n return `export function is${type}(node: ?Object, opts?: Object): boolean {\n ${deprecated || \"\"}\n if (!node) return false;\n\n const nodeType = node.type;\n if (nodeType === ${targetType}${aliasSource}${placeholderSource}) {\n if (typeof opts === \"undefined\") {\n return true;\n } else {\n return shallowEqual(node, opts);\n }\n }\n\n return false;\n }\n `;\n}\n\nmodule.exports = function generateValidators() {\n let output = `// @flow\n/*\n * This file is auto-generated! Do not modify it directly.\n * To re-generate run 'make build'\n */\nimport shallowEqual from \"../../utils/shallowEqual\";\\n\\n`;\n\n Object.keys(definitions.VISITOR_KEYS).forEach(type => {\n output += addIsHelper(type);\n });\n\n Object.keys(definitions.FLIPPED_ALIAS_KEYS).forEach(type => {\n output += addIsHelper(type, definitions.FLIPPED_ALIAS_KEYS[type]);\n });\n\n Object.keys(definitions.DEPRECATED_KEYS).forEach(type => {\n const newType = definitions.DEPRECATED_KEYS[type];\n const deprecated = `console.trace(\"The node type ${type} has been renamed to ${newType}\");`;\n output += addIsHelper(type, null, deprecated);\n });\n\n return output;\n};\n"} +{"text": "<div class=\"admin-detail-header\">\n <div class=\"admin-breadcrumb\">\n <div><a ui-sref=\".^\">All organizations</a></div>\n <span class=\"icon-caret-right\"></span>\n <div class=\"admin-logo\"></div>\n <div>Organization Name</div>\n </div>\n</div>\n<div class=\"admin-detail-container\">\n <div class=\"admin-detail-sidebar\">\n <div><a ui-sref=\".features\" ui-sref-active=\"active\">Features</a></div>\n <div><a ui-sref=\".limits\" ui-sref-active=\"active\">Limits/Sharing</a></div>\n <div><a ui-sref=\".settings\" ui-sref-active=\"active\">Settings</a></div>\n </div>\n <div class=\"admin-detail-content\">\n <ui-view></ui-view>\n </div>\n</div>\n"} +{"text": "package com.artemzin.qualitymatters.other;\n\nimport com.artemzin.qualitymatters.performance.AsyncJob;\nimport com.artemzin.qualitymatters.performance.AsyncJobsObserver;\n\nimport org.junit.Test;\n\nimport static org.mockito.Mockito.mock;\nimport static org.mockito.Mockito.verify;\nimport static org.mockito.Mockito.verifyZeroInteractions;\n\npublic class FinishAsyncJobSubscriptionTest {\n\n @Test\n public void constructor_shouldCreateSuchActionThatWillUnregisterAsyncJob() {\n AsyncJobsObserver asyncJobsObserver = mock(AsyncJobsObserver.class);\n AsyncJob asyncJob = mock(AsyncJob.class);\n\n DisposableSubscription disposableSubscription = new FinishAsyncJobSubscription(asyncJobsObserver, asyncJob);\n verifyZeroInteractions(asyncJobsObserver, asyncJob);\n\n disposableSubscription.unsubscribe();\n verify(asyncJobsObserver).asyncJobFinished(asyncJob);\n }\n}"} +{"text": "/**\r\n * vim: set ts=4 :\r\n * =============================================================================\r\n * SourceMod\r\n * Copyright (C) 2004-2008 AlliedModders LLC. All rights reserved.\r\n * =============================================================================\r\n *\r\n * This program is free software; you can redistribute it and/or modify it under\r\n * the terms of the GNU General Public License, version 3.0, as published by the\r\n * Free Software Foundation.\r\n * \r\n * This program is distributed in the hope that it will be useful, but WITHOUT\r\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\r\n * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\r\n * details.\r\n *\r\n * You should have received a copy of the GNU General Public License along with\r\n * this program. If not, see <http://www.gnu.org/licenses/>.\r\n *\r\n * As a special exception, AlliedModders LLC gives you permission to link the\r\n * code of this program (as well as its derivative works) to \"Half-Life 2,\" the\r\n * \"Source Engine,\" the \"SourcePawn JIT,\" and any Game MODs that run on software\r\n * by the Valve Corporation. You must obey the GNU General Public License in\r\n * all respects for all other code used. Additionally, AlliedModders LLC grants\r\n * this exception to all derivative works. AlliedModders LLC defines further\r\n * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),\r\n * or <http://www.sourcemod.net/license.php>.\r\n *\r\n * Version: $Id$\r\n */\r\n\r\n#include <string.h>\r\n#include <stdlib.h>\r\n#include \"GameConfigs.h\"\r\n//#include \"sm_stringutil.h\"\r\n//#include \"sourcemod.h\"\r\n//#include \"sourcemm_api.h\"\r\n//#include \"HalfLife2.h\"\r\n//#include \"Logger.h\"\r\n//#include \"ShareSys.h\"\r\n//#include \"MemoryUtils.h\"\r\n//#include \"LibrarySys.h\"\r\n//#include \"HandleSys.h\"\r\n//#include \"sm_crc32.h\"\r\n\r\n//#if defined PLATFORM_LINUX\r\n//#include <dlfcn.h>\r\n//#endif\r\n\r\n#define PSTATE_NONE\t\t\t\t\t\t0\r\n#define PSTATE_GAMES\t\t\t\t\t1\r\n#define PSTATE_GAMEDEFS\t\t\t\t\t2\r\n#define PSTATE_GAMEDEFS_OFFSETS\t\t\t3\r\n#define PSTATE_GAMEDEFS_OFFSETS_OFFSET\t4\r\n#define PSTATE_GAMEDEFS_KEYS\t\t\t5\r\n#define PSTATE_GAMEDEFS_SUPPORTED\t\t6\r\n#define PSTATE_GAMEDEFS_SIGNATURES\t\t7\r\n#define PSTATE_GAMEDEFS_SIGNATURES_SIG\t8\r\n#define PSTATE_GAMEDEFS_CRC\t\t\t\t9\r\n#define PSTATE_GAMEDEFS_CRC_BINARY\t\t10\r\n#define PSTATE_GAMEDEFS_CUSTOM\t\t\t11\r\n\r\n#define WIN 0\r\n#define LIN 1\r\n\r\n#define PLATFORM_NAME\t\t\t\t\"linux\"\r\n#define PLATFORM_SERVER_BINARY\t\t\"server_i486.so\"\r\n\r\nOffset *tempOffset;\r\nSig *tempSig;\r\n\r\nunsigned int s_ServerBinCRC;\r\nbool s_ServerBinCRC_Ok = false;\r\n\r\nbool /*CGameConfig::*/DoesGameMatch(const char *value)\r\n{\r\n\tif (strcmp(value, /*m_gdcG*/game) == 0)\r\n\t{\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nbool /*CGameConfig::*/DoesEngineMatch(const char *value)\r\n{\r\n\tif (strcmp(value, /*m_gdcE*/engine) == 0)\r\n\t{\r\n\t\treturn true;\r\n\t}\r\n\treturn false;\r\n}\r\n\r\nCGameConfig::CGameConfig()//const char *file)//, const char *game, const char *engine)\r\n{\r\n//\tstrncopy(m_File, file, sizeof(m_File));\r\n//\tstrncopy(m_gdcGame, game, sizeof(m_gdcGame));\r\n//\tstrncopy(m_gdcEngine, engine, sizeof(m_gdcEngine));\r\n\t//m_pStrings = new BaseStringTable(512);\r\n\tm_RefCount = 0;\r\n\r\n\tm_CustomLevel = 0;\r\n\tm_CustomHandler = NULL;\r\n}\r\n\r\nCGameConfig::~CGameConfig()\r\n{\r\n//\tdelete m_pStrings;\r\n}\r\n\r\nSMCResult CGameConfig::ReadSMC_NewSection(const SMCStates *states, const char *name)\r\n{\r\n\tif (m_IgnoreLevel)\r\n\t{\r\n\t\tm_IgnoreLevel++;\r\n\t\treturn SMCResult_Continue;\r\n\t}\r\n\r\n\tswitch (m_ParseState)\r\n\t{\r\n\tcase PSTATE_NONE:\r\n\t\t{\r\n\t\t\tif (strcmp(name, \"Games\") == 0)\r\n\t\t\t{\r\n\t\t\t\tm_ParseState = PSTATE_GAMES;\r\n\t\t\t} else {\r\n\t\t\t\tm_IgnoreLevel++;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\tcase PSTATE_GAMES:\r\n\t\t{\r\n\t\t\tif (strcmp(name, \"*\") == 0 ||\r\n\t\t\t\tstrcmp(name, \"#default\") == 0 ||\r\n\t\t\t\tDoesGameMatch(name))\r\n\t\t\t{\r\n\t\t\t\tbShouldBeReadingDefault = true;\r\n\t\t\t\tm_ParseState = PSTATE_GAMEDEFS;\r\n\t\t\t\tstrncopy(m_Game, name, sizeof(m_Game));\r\n\t\t\t} else {\r\n\t\t\t\tm_IgnoreLevel++;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\tcase PSTATE_GAMEDEFS:\r\n\t\t{\r\n\t\t\tif (strcmp(name, \"Offsets\") == 0)\r\n\t\t\t{\r\n\t\t\t\tm_ParseState = PSTATE_GAMEDEFS_OFFSETS;\r\n\t\t\t}\r\n\t\t\telse if (strcmp(name, \"Keys\") == 0)\r\n\t\t\t{\r\n\t\t\t\tm_ParseState = PSTATE_GAMEDEFS_KEYS;\r\n\t\t\t}\r\n\t\t\telse if ((strcmp(name, \"#supported\") == 0) && (strcmp(m_Game, \"#default\") == 0))\r\n\t\t\t{\r\n\t\t\t\tm_ParseState = PSTATE_GAMEDEFS_SUPPORTED;\r\n\t\t\t\t/* Ignore this section unless we get a game. */\r\n\t\t\t\tbShouldBeReadingDefault = false;\r\n\t\t\t\thad_game = false;\r\n\t\t\t\tmatched_game = false;\r\n\t\t\t\thad_engine = false;\r\n\t\t\t\tmatched_engine = false;\r\n\t\t\t}\r\n\t\t\telse if (strcmp(name, \"Signatures\") == 0)\r\n\t\t\t{\r\n\t\t\t\tm_ParseState = PSTATE_GAMEDEFS_SIGNATURES;\r\n\t\t\t}\r\n\t\t\telse if (strcmp(name, \"CRC\") == 0)\r\n\t\t\t{\r\n#if 0\r\n\t\t\t\tm_ParseState = PSTATE_GAMEDEFS_CRC;\r\n\t\t\t\tbShouldBeReadingDefault = false;\r\n#endif\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n#if 0\r\n\t\t\t\tITextListener_SMC **pListen = g_GameConfigs.m_customHandlers.retrieve(name);\r\n\r\n\t\t\t\tif (pListen != NULL)\r\n\t\t\t\t{\r\n\t\t\t\t\tm_CustomLevel = 0;\r\n\t\t\t\t\tm_ParseState = PSTATE_GAMEDEFS_CUSTOM;\r\n\t\t\t\t\tm_CustomHandler = *pListen;\r\n\t\t\t\t\tm_CustomHandler->ReadSMC_ParseStart();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n#endif\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\tcase PSTATE_GAMEDEFS_OFFSETS:\r\n\t\t{\r\n\t\t\tm_Prop[0] = '\\0';\r\n\t\t\tm_Class[0] = '\\0';\r\n\t\t\ttempOffset = new Offset();\r\n\t\t\ttempOffset->setName(name);\r\n\t\t\tm_ParseState = PSTATE_GAMEDEFS_OFFSETS_OFFSET;\r\n\t\t\tbreak;\r\n\t\t}\r\n\tcase PSTATE_GAMEDEFS_SIGNATURES:\r\n\t\t{\r\n\t\t\ttempSig = new Sig();\r\n\t\t\ttempSig->setName(name);\r\n\t\t\tm_ParseState = PSTATE_GAMEDEFS_SIGNATURES_SIG;\r\n\t\t\tbreak;\r\n\t\t}\r\n#if 0\r\n\tcase PSTATE_GAMEDEFS_CRC:\r\n\t\t{\r\n\t\t\tchar error[255];\r\n\t\t\terror[0] = '\\0';\r\n\t\t\tif (strcmp(name, \"server\") != 0)\r\n\t\t\t{\r\n\t\t\t\tUTIL_Format(error, sizeof(error), \"Unrecognized library \\\"%s\\\"\", name);\r\n\t\t\t} \r\n\t\t\telse if (!s_ServerBinCRC_Ok)\r\n\t\t\t{\r\n\t\t\t\tFILE *fp;\r\n\t\t\t\tchar path[PLATFORM_MAX_PATH];\r\n\r\n\t\t\t\tg_SourceMod.BuildPath(Path_Game, path, sizeof(path), \"bin/\" PLATFORM_SERVER_BINARY);\r\n\t\t\t\tif ((fp = fopen(path, \"rb\")) == NULL)\r\n\t\t\t\t{\r\n\t\t\t\t\tUTIL_Format(error, sizeof(error), \"Could not open binary: %s\", path);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tsize_t size;\r\n\t\t\t\t\tvoid *buffer;\r\n\r\n\t\t\t\t\tfseek(fp, 0, SEEK_END);\r\n\t\t\t\t\tsize = ftell(fp);\r\n\t\t\t\t\tfseek(fp, 0, SEEK_SET);\r\n\r\n\t\t\t\t\tbuffer = malloc(size);\r\n\t\t\t\t\tfread(buffer, size, 1, fp);\r\n\t\t\t\t\ts_ServerBinCRC = UTIL_CRC32(buffer, size);\r\n\t\t\t\t\tfree(buffer);\r\n\t\t\t\t\ts_ServerBinCRC_Ok = true;\r\n\t\t\t\t\tfclose(fp);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (error[0] != '\\0')\r\n\t\t\t{\r\n\t\t\t\tm_IgnoreLevel = 1;\r\n\t\t\t\tg_Logger.LogError(\"[SM] Error while parsing CRC section for \\\"%s\\\" (%s):\", m_Game, m_CurFile);\r\n\t\t\t\tg_Logger.LogError(\"[SM] %s\", error);\r\n\t\t\t} else {\r\n\t\t\t\tm_ParseState = PSTATE_GAMEDEFS_CRC_BINARY;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\tcase PSTATE_GAMEDEFS_CUSTOM:\r\n\t\t{\r\n\t\t\tm_CustomLevel++;\r\n\t\t\treturn m_CustomHandler->ReadSMC_NewSection(states, name);\r\n\t\t\tbreak;\r\n\t\t}\r\n#endif\r\n\t/* No sub-sections allowed:\r\n\t case PSTATE_GAMEDEFS_OFFSETS_OFFSET:\r\n\t case PSTATE_GAMEDEFS_KEYS:\r\n\t case PSTATE_GAMEDEFS_SUPPORTED:\r\n\t case PSTATE_GAMEDEFS_SIGNATURES_SIG:\r\n\t case PSTATE_GAMEDEFS_CRC_BINARY:\r\n\t */\r\n\tdefault:\r\n\t\t{\r\n\t\t\t/* If we don't know what we got, start ignoring */\r\n\t\t\tm_IgnoreLevel++;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\treturn SMCResult_Continue;\r\n}\r\n\r\nSMCResult CGameConfig::ReadSMC_KeyValue(const SMCStates *states, const char *key, const char *value)\r\n{\r\n\tif (m_IgnoreLevel)\r\n\t{\r\n\t\treturn SMCResult_Continue;\r\n\t}\r\n\r\n\tif (m_ParseState == PSTATE_GAMEDEFS_OFFSETS_OFFSET)\r\n\t{\r\n\t\tif (strcmp(key, \"class\") == 0)\r\n\t\t{\r\n\t\t\tstrncopy(m_Class, value, sizeof(m_Class));\r\n\t\t} else if (strcmp(key, \"prop\") == 0) {\r\n\t\t\tstrncopy(m_Prop, value, sizeof(m_Prop));\r\n\t\t} else /*if (strcmp(key, PLATFORM_NAME) == 0) */ {\r\n\t\t\tint val = atoi(value);\r\n//\t\t\tsm_trie_replace(m_pOffsets, m_offset, (void *)val);\r\n\t\t\tif (strcmp(key, \"windows\") == 0) tempOffset->setWin(val);\r\n\t\t\telse if (strcmp(key, \"linux\") == 0) tempOffset->setLin(val);\r\n\t\t}\r\n\t} else if (m_ParseState == PSTATE_GAMEDEFS_KEYS) {\r\n\t\tm_Keys[key] = value;\r\n//\t\tprintf(\"Inserting %s - %s\\n\", key, value);\r\n//\t\tint id = m_pStrings->AddString(value);\r\n//\t\tsm_trie_replace(m_pKeys, key, (void *)id);\r\n\t} else if (m_ParseState == PSTATE_GAMEDEFS_SUPPORTED) {\r\n\t\tif (strcmp(key, \"game\") == 0)\r\n\t\t{\r\n\t\t\thad_game = true;\r\n\t\t\tif (DoesGameMatch(value))\r\n\t\t\t{\r\n\t\t\t\tmatched_game = true;\r\n\t\t\t}\r\n\t\t\tif ((!had_engine && matched_game) || (matched_engine && matched_game))\r\n\t\t\t{\r\n\t\t\t\tbShouldBeReadingDefault = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (strcmp(key, \"engine\") == 0)\r\n\t\t{\r\n\t\t\thad_engine = true;\r\n\t\t\tif (DoesEngineMatch(value))\r\n\t\t\t{\r\n\t\t\t\tmatched_engine = true;\r\n\t\t\t}\r\n\t\t\tif ((!had_game && matched_engine) || (matched_game && matched_engine))\r\n\t\t\t{\r\n\t\t\t\tbShouldBeReadingDefault = true;\r\n\t\t\t}\r\n\t\t}\r\n\t} else if (m_ParseState == PSTATE_GAMEDEFS_SIGNATURES_SIG) {\r\n\t\tif (strcmp(key, \"windows\") == 0) tempSig->setWin(value);\r\n\t\telse if (strcmp(key, \"linux\") == 0) tempSig->setLin(value);\r\n\t\telse if (strcmp(key, \"library\") == 0) tempSig->setLib(value);\r\n\t} else if (m_ParseState == PSTATE_GAMEDEFS_CRC_BINARY) {\r\n\t\tif (strcmp(key, PLATFORM_NAME) == 0 \r\n\t\t\t&& s_ServerBinCRC_Ok\r\n\t\t\t&& !bShouldBeReadingDefault)\r\n\t\t{\r\n\t\t\tunsigned int crc = 0;\r\n\t\t\tsscanf(value, \"%08X\", &crc);\r\n\t\t\tif (s_ServerBinCRC == crc)\r\n\t\t\t{\r\n\t\t\t\tbShouldBeReadingDefault = true;\r\n\t\t\t}\r\n\t\t}\r\n\t} else if (m_ParseState == PSTATE_GAMEDEFS_CUSTOM) {\r\n\t\treturn m_CustomHandler->ReadSMC_KeyValue(states, key, value);\r\n\t}\r\n\r\n\treturn SMCResult_Continue;\r\n}\r\n\r\nSMCResult CGameConfig::ReadSMC_LeavingSection(const SMCStates *states)\r\n{\r\n\tif (m_IgnoreLevel)\r\n\t{\r\n\t\tm_IgnoreLevel--;\r\n\t\treturn SMCResult_Continue;\r\n\t}\r\n\r\n\tif (m_CustomLevel)\r\n\t{\r\n\t\tm_CustomLevel--;\r\n\t\tm_CustomHandler->ReadSMC_LeavingSection(states);\r\n\t\treturn SMCResult_Continue;\r\n\t}\r\n\r\n\tswitch (m_ParseState)\r\n\t{\r\n\tcase PSTATE_GAMES:\r\n\t\t{\r\n\t\t\tm_ParseState = PSTATE_NONE;\r\n\t\t\tbreak;\r\n\t\t}\r\n\tcase PSTATE_GAMEDEFS:\r\n\t\t{\r\n\t\t\tm_ParseState = PSTATE_GAMES;\r\n\t\t\tbreak;\r\n\t\t}\r\n\tcase PSTATE_GAMEDEFS_CUSTOM:\r\n\t\t{\r\n\t\t\tm_ParseState = PSTATE_GAMEDEFS;\r\n\t\t\tm_CustomHandler->ReadSMC_ParseEnd(false, false);\r\n\t\t\tbreak;\r\n\t\t}\r\n\tcase PSTATE_GAMEDEFS_KEYS:\r\n\tcase PSTATE_GAMEDEFS_OFFSETS:\r\n\t\t{\r\n\t\t\tm_ParseState = PSTATE_GAMEDEFS;\r\n\t\t\tbreak;\r\n\t\t}\r\n\tcase PSTATE_GAMEDEFS_OFFSETS_OFFSET:\r\n\t\t{\r\n\t\t\tm_Offsets.push_back(*tempOffset);\r\n#if 0\r\n\t\t\t/* Parse the offset... */\r\n\t\t\tif (m_Class[0] != '\\0'\r\n\t\t\t\t&& m_Prop[0] != '\\0')\r\n\t\t\t{\r\n\t\t\t\tSendProp *pProp = g_HL2.FindInSendTable(m_Class, m_Prop);\r\n\t\t\t\tif (pProp)\r\n\t\t\t\t{\r\n\t\t\t\t\tint val = pProp->GetOffset();\r\n\t\t\t\t\tsm_trie_replace(m_pOffsets, m_offset, (void *)val);\r\n\t\t\t\t\tsm_trie_replace(m_pProps, m_offset, pProp);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t/* Check if it's a non-default game and no offsets exist */\r\n\t\t\t\t\tif (((strcmp(m_Game, \"*\") != 0) && strcmp(m_Game, \"#default\") != 0)\r\n\t\t\t\t\t\t&& (!sm_trie_retrieve(m_pOffsets, m_offset, NULL)))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tg_Logger.LogError(\"[SM] Unable to find property %s.%s (file \\\"%s\\\") (mod \\\"%s\\\")\", \r\n\t\t\t\t\t\t\tm_Class,\r\n\t\t\t\t\t\t\tm_Prop,\r\n\t\t\t\t\t\t\tm_CurFile,\r\n\t\t\t\t\t\t\tm_Game);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n#endif\r\n\t\t\tm_ParseState = PSTATE_GAMEDEFS_OFFSETS;\r\n\t\t\tbreak;\r\n\t\t}\r\n\tcase PSTATE_GAMEDEFS_CRC:\r\n\tcase PSTATE_GAMEDEFS_SUPPORTED:\r\n\t\t{\r\n\t\t\tif (!bShouldBeReadingDefault)\r\n\t\t\t{\r\n\t\t\t\t/* If we shouldn't read the rest of this section, set the ignore level. */\r\n\t\t\t\tm_IgnoreLevel = 1;\r\n\t\t\t\tm_ParseState = PSTATE_GAMES;\r\n\t\t\t} else {\r\n\t\t\t\tm_ParseState = PSTATE_GAMEDEFS;\r\n\t\t\t}\r\n\t\t\tbreak;\r\n\t\t}\r\n\tcase PSTATE_GAMEDEFS_CRC_BINARY:\r\n\t\t{\r\n\t\t\tm_ParseState = PSTATE_GAMEDEFS_CRC;\r\n\t\t\tbreak;\r\n\t\t}\r\n\tcase PSTATE_GAMEDEFS_SIGNATURES:\r\n\t\t{\r\n\t\t\tm_ParseState = PSTATE_GAMEDEFS;\r\n\t\t\tbreak;\r\n\t\t}\r\n\tcase PSTATE_GAMEDEFS_SIGNATURES_SIG:\r\n\t\t{\r\n\t\t\tm_Sigs.push_back(*tempSig);\r\n#if 0\r\n\t\t\tif (s_TempSig.library[0] == '\\0')\r\n\t\t\t{\r\n\t\t\t\t/* assume server */\r\n\t\t\t\tstrncopy(s_TempSig.library, \"server\", sizeof(s_TempSig.library));\r\n\t\t\t}\r\n\t\t\tvoid *addrInBase = NULL;\r\n\t\t\tif (strcmp(s_TempSig.library, \"server\") == 0)\r\n\t\t\t{\r\n\t\t\t\taddrInBase = (void *)g_SMAPI->GetServerFactory(false);\r\n\t\t\t} else if (strcmp(s_TempSig.library, \"engine\") == 0) {\r\n\t\t\t\taddrInBase = (void *)g_SMAPI->GetEngineFactory(false);\r\n\t\t\t}\r\n\t\t\tvoid *final_addr = NULL;\r\n\t\t\tif (addrInBase == NULL)\r\n\t\t\t{\r\n\t\t\t\tg_Logger.LogError(\"[SM] Unrecognized library \\\"%s\\\" (gameconf \\\"%s\\\")\", \r\n\t\t\t\t\ts_TempSig.library, \r\n\t\t\t\t\tm_CurFile);\r\n\t\t\t} else {\r\n#if defined PLATFORM_LINUX\r\n\t\t\t\tif (s_TempSig.sig[0] == '@')\r\n\t\t\t\t{\r\n\t\t\t\t\tDl_info info;\r\n\t\t\t\t\t/* GNU only: returns 0 on error, inconsistent! >:[ */\r\n\t\t\t\t\tif (dladdr(addrInBase, &info) != 0)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tvoid *handle = dlopen(info.dli_fname, RTLD_NOW);\r\n\t\t\t\t\t\tif (handle)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tfinal_addr = dlsym(handle, &s_TempSig.sig[1]);\r\n\t\t\t\t\t\t\tdlclose(handle);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tg_Logger.LogError(\"[SM] Unable to load library \\\"%s\\\" (gameconf \\\"%s\\\")\",\r\n\t\t\t\t\t\t\t\ts_TempSig.library,\r\n\t\t\t\t\t\t\t\tm_File);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tg_Logger.LogError(\"[SM] Unable to find library \\\"%s\\\" in memory (gameconf \\\"%s\\\")\",\r\n\t\t\t\t\t\t\ts_TempSig.library,\r\n\t\t\t\t\t\t\tm_File);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tif (final_addr)\r\n\t\t\t\t{\r\n\t\t\t\t\tgoto skip_find;\r\n\t\t\t\t}\r\n#endif\r\n\t\t\t\t/* First, preprocess the signature */\r\n\t\t\t\tchar real_sig[511];\r\n\t\t\t\tsize_t real_bytes;\r\n\t\t\t\tsize_t length;\r\n\r\n\t\t\t\treal_bytes = 0;\r\n\t\t\t\tlength = strlen(s_TempSig.sig);\r\n\r\n\t\t\t\tfor (size_t i=0; i<length; i++)\r\n\t\t\t\t{\r\n\t\t\t\t\tif (real_bytes >= sizeof(real_sig))\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t\treal_sig[real_bytes++] = s_TempSig.sig[i];\r\n\t\t\t\t\tif (s_TempSig.sig[i] == '\\\\'\r\n\t\t\t\t\t\t&& s_TempSig.sig[i+1] == 'x')\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif (i + 3 >= length)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t/* Get the hex part */\r\n\t\t\t\t\t\tchar s_byte[3];\r\n\t\t\t\t\t\tint r_byte;\r\n\t\t\t\t\t\ts_byte[0] = s_TempSig.sig[i+2];\r\n\t\t\t\t\t\ts_byte[1] = s_TempSig.sig[i+3];\r\n\t\t\t\t\t\ts_byte[2] = '\\0';\r\n\t\t\t\t\t\t/* Read it as an integer */\r\n\t\t\t\t\t\tsscanf(s_byte, \"%x\", &r_byte);\r\n\t\t\t\t\t\t/* Save the value */\r\n\t\t\t\t\t\treal_sig[real_bytes-1] = r_byte;\r\n\t\t\t\t\t\t/* Adjust index */\r\n\t\t\t\t\t\ti += 3;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tif (real_bytes >= 1)\r\n\t\t\t\t{\r\n\t\t\t\t\tfinal_addr = g_MemUtils.FindPattern(addrInBase, real_sig, real_bytes);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n#if defined PLATFORM_LINUX\r\nskip_find:\r\n#endif\r\n\t\t\tsm_trie_replace(m_pSigs, m_offset, final_addr);\r\n#endif\r\n\t\t\tm_ParseState = PSTATE_GAMEDEFS_SIGNATURES;\r\n\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\r\n\treturn SMCResult_Continue;\r\n}\r\n\r\n#define MSTATE_NONE\t\t0\r\n#define MSTATE_MAIN\t\t1\r\n#define MSTATE_FILE\t\t2\r\n\r\nclass MasterReader : public ITextListener_SMC\r\n{\r\npublic:\r\n\tvirtual void ReadSMC_ParseStart()\r\n\t{\r\n\t\tstate = MSTATE_NONE;\r\n\t\tignoreLevel = 0;\r\n\t}\r\n\r\n\tvirtual SMCResult ReadSMC_NewSection(const SMCStates *states, const char *name)\r\n\t{\r\n\t\tif (ignoreLevel)\r\n\t\t{\r\n\t\t\treturn SMCResult_Continue;\r\n\t\t}\r\n\r\n\t\tif (state == MSTATE_NONE)\r\n\t\t{\r\n\t\t\tif (strcmp(name, \"Game Master\") == 0)\r\n\t\t\t{\r\n\t\t\t\tstate = MSTATE_MAIN;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tignoreLevel++;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (state == MSTATE_MAIN)\r\n\t\t{\r\n\t\t\tstrncopy(cur_file, name, sizeof(cur_file));\r\n\t\t\thad_engine = false;\r\n\t\t\tmatched_engine = false;\r\n\t\t\thad_game = false;\r\n\t\t\tmatched_game = false;\r\n\t\t\tstate = MSTATE_FILE;\r\n\t\t}\r\n\t\telse if (state == MSTATE_FILE)\r\n\t\t{\r\n\t\t\tignoreLevel++;\r\n\t\t}\r\n\r\n\t\treturn SMCResult_Continue;\r\n\t}\r\n\r\n\tvirtual SMCResult ReadSMC_KeyValue(const SMCStates *states, const char *key, const char *value)\r\n\t{\r\n\t\tif (ignoreLevel || state != MSTATE_FILE)\r\n\t\t{\r\n\t\t\treturn SMCResult_Continue;\r\n\t\t}\r\n\r\n\t\tif (strcmp(key, \"engine\") == 0)\r\n\t\t{\r\n\t\t\thad_engine = true;\r\n\t\t\tif (DoesEngineMatch(value))\r\n\t\t\t{\r\n\t\t\t\tmatched_engine = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if (strcmp(key, \"game\") == 0)\r\n\t\t{\r\n\t\t\thad_game = true;\r\n\t\t\tif (DoesGameMatch(value))\r\n\t\t\t{\r\n\t\t\t\tmatched_game = true;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn SMCResult_Continue;\r\n\t}\r\n\r\n\tvirtual SMCResult ReadSMC_LeavingSection(const SMCStates *states)\r\n\t{\r\n\t\tif (ignoreLevel)\r\n\t\t{\r\n\t\t\tignoreLevel--;\r\n\t\t\treturn SMCResult_Continue;\r\n\t\t}\r\n\r\n\t\tif (state == MSTATE_FILE)\r\n\t\t{\r\n\t\t\t/* The four success conditions:\r\n\t\t\t * 1. Needed nothing.\r\n\t\t\t * 2. Needed game only.\r\n\t\t\t * 3. Needed engine only.\r\n\t\t\t * 4. Needed both engine and game.\r\n\t\t\t * Final result is minimized via k-map.\r\n\t\t\t */\r\n#if 0\r\n\t\t\tif ((!had_engine && !had_game) ||\r\n\t\t\t\t(!had_engine && (had_game && matched_game)) ||\r\n\t\t\t\t(!had_game && (had_engine && matched_engine)) ||\r\n\t\t\t\t((had_game && had_engine) && (matched_game && matched_engine)))\r\n#endif\r\n\t\t\tif ((!had_engine && !had_game) ||\r\n\t\t\t\t(!had_engine && matched_game) ||\r\n\t\t\t\t(!had_game && matched_engine) ||\r\n\t\t\t\t(matched_engine && matched_game))\r\n\t\t\t{\r\n\t\t\t\tfileList->push_back(cur_file);\r\n\t\t\t}\r\n\t\t\tstate = MSTATE_MAIN;\r\n\t\t}\r\n\t\telse if (state == MSTATE_MAIN)\r\n\t\t{\r\n\t\t\tstate = MSTATE_NONE;\r\n\t\t}\r\n\r\n\t\treturn SMCResult_Continue;\r\n\t}\r\npublic:\r\n\tlist<char*> *fileList;\r\n\tunsigned int state;\r\n\tunsigned int ignoreLevel;\r\n\tchar cur_file[PLATFORM_MAX_PATH];\r\n\tbool had_engine;\r\n\tbool matched_engine;\r\n\tbool had_game;\r\n\tbool matched_game;\r\n};\r\n\r\nstatic MasterReader master_reader;\r\n\r\nbool CGameConfig::Reparse(char *error, size_t maxlength)\r\n{\r\n\t/* Reset cached data */\r\n//\tm_pStrings->Reset();\r\n\tm_Offsets.clear();\r\n\tm_Sigs.clear();\r\n\t\r\n\r\n\tchar path[PLATFORM_MAX_PATH];\r\n\r\n\t/* See if we can use the extended gamedata format. */\r\n\t//TODO pass in path to gamedata somehow\r\n//\tg_SourceMod.BuildPath(Path_SM, path, sizeof(path), \"gamedata/%s/master.games.txt\", m_File);\r\n\r\n\t/* Otherwise, it's time to parse the master. */\r\n\tSMCError err;\r\n\tSMCStates state = {0, 0};\r\n\tlist<char*> fileList;\r\n\tmaster_reader.fileList = &fileList;\r\n\r\n\terr = textparsers->ParseSMCFile(path, &master_reader, &state, error, maxlength);\r\n\tif (err != SMCError_Okay)\r\n\t{\r\n\t\tconst char *msg = textparsers->GetSMCErrorString(err);\r\n\r\n\t\tprintf(\"[SM] Error parsing master gameconf file \\\"%s\\\":\", path);\r\n\t\tprintf(\"[SM] Error %d on line %d, col %d: %s\", \r\n\t\t\terr,\r\n\t\t\tstate.line,\r\n\t\t\tstate.col,\r\n\t\t\tmsg ? msg : \"Unknown error\");\r\n\t\texit(PARSE_ERROR);\r\n\t}\r\n\r\n\t/* Go through each file we found and parse it. */\r\n\tlist<char*>::iterator iter;\r\n\tfor (iter = fileList.begin(); iter != fileList.end(); iter++)\r\n\t{\r\n\t\tUTIL_Format(path, sizeof(path), \"%s/%s\", m_File, *iter);\r\n\t\tif (!EnterFile(path, error, maxlength))\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\nbool CGameConfig::EnterFile(const char *file, char *error, size_t maxlength)\r\n{\r\n\tSMCError err;\r\n\tSMCStates state = {0, 0};\r\n\r\n\t/* Initialize parse states */\r\n\tm_IgnoreLevel = 0;\r\n\tbShouldBeReadingDefault = true;\r\n\tm_ParseState = PSTATE_NONE;\r\n\r\n\tif ((err=textparsers->ParseSMCFile(file, this, &state, error, maxlength))\r\n\t\t!= SMCError_Okay)\r\n\t{\r\n\t\tconst char *msg;\r\n\r\n\t\tmsg = textparsers->GetSMCErrorString(err);\r\n\r\n\t\tprintf(\"[SM] Error parsing gameconfig file \\\"%s\\\":\\n\", file);\r\n\t\tprintf(\"[SM] Error %d on line %d, col %d: %s\\n\", \r\n\t\t\terr,\r\n\t\t\tstate.line,\r\n\t\t\tstate.col,\r\n\t\t\tmsg ? msg : \"Unknown error\");\r\n\r\n\t\tif (m_ParseState == PSTATE_GAMEDEFS_CUSTOM)\r\n\t\t{\r\n\t\t\t//error occurred while parsing a custom section\r\n\t\t\tm_CustomHandler->ReadSMC_ParseEnd(true, true);\r\n\t\t\tm_CustomHandler = NULL;\r\n\t\t\tm_CustomLevel = 0;\r\n\t\t}\r\n\r\n\t\texit(PARSE_ERROR);\r\n\t}\r\n\r\n\treturn true;\r\n}\r\n\r\n#if 0\r\nbool CGameConfig::GetOffset(const char *key, int *value)\r\n{\r\n\tvoid *obj;\r\n\r\n\tif (!sm_trie_retrieve(m_pOffsets, key, &obj))\r\n\t{\r\n\t\treturn false;\r\n\t}\r\n\r\n\t*value = (int)obj;\r\n\t\r\n\treturn true;\r\n}\r\n\r\nconst char *CGameConfig::GetKeyValue(const char *key)\r\n{\r\n\tvoid *obj;\r\n\tif (!sm_trie_retrieve(m_pKeys, key, &obj))\r\n\t{\r\n\t\treturn NULL;\r\n\t}\r\n\treturn m_pStrings->GetString((int)obj);\r\n}\r\n\r\nSendProp *CGameConfig::GetSendProp(const char *key)\r\n{\r\n\tSendProp *pProp;\r\n\r\n\tif (!sm_trie_retrieve(m_pProps, key, (void **)&pProp))\r\n\t{\r\n\t\treturn NULL;\r\n\t}\r\n\r\n\treturn pProp;\r\n}\r\n\r\nbool CGameConfig::GetMemSig(const char *key, void **addr)\r\n{\r\n\treturn sm_trie_retrieve(m_pSigs, key, addr);\r\n}\r\n\r\nvoid CGameConfig::IncRefCount()\r\n{\r\n\tm_RefCount++;\r\n}\r\n\r\nunsigned int CGameConfig::DecRefCount()\r\n{\r\n\tm_RefCount--;\r\n\treturn m_RefCount;\r\n}\r\n#endif\r\n\r\nconst char *CGameConfig::GetKeyValue(const char *key)\r\n{\r\n\tmap<const char*,const char*,cmp_str>::iterator it = m_Keys.find(key);\r\n\tif (it == m_Keys.end()) return NULL;\r\n\r\n\treturn it->second;\r\n}\r\n\r\nlist<Offset> CGameConfig::GetOffsets() { return m_Offsets; }\r\nlist<Sig> CGameConfig::GetSigs() { return m_Sigs; }\r\n\r\n"} +{"text": "// +build 386 arm\n\npackage etw\n\nimport (\n\t\"unsafe\"\n)\n\n// byteptr64 defines a struct containing a pointer. The struct is guaranteed to\n// be 64 bits, regardless of the actual size of a pointer on the platform. This\n// is intended for use with certain Windows APIs that expect a pointer as a\n// ULONGLONG.\ntype ptr64 struct {\n\tptr unsafe.Pointer\n\t_ uint32\n}\n"} +{"text": "\r\n// Copyright Aleksey Gurtovoy 2000-2004\r\n//\r\n// Distributed under the Boost Software License, Version 1.0. \r\n// (See accompanying file LICENSE_1_0.txt or copy at \r\n// http://www.boost.org/LICENSE_1_0.txt)\r\n//\r\n\r\n// Preprocessed version of \"boost/mpl/aux_/reverse_fold_impl.hpp\" header\r\n// -- DO NOT modify by hand!\r\n\r\nnamespace boost { namespace mpl { namespace aux {\r\n\r\n/// forward declaration\r\n\r\ntemplate<\r\n long N\r\n , typename First\r\n , typename Last\r\n , typename State\r\n , typename BackwardOp\r\n , typename ForwardOp\r\n >\r\nstruct reverse_fold_impl;\r\n\r\ntemplate< long N >\r\nstruct reverse_fold_chunk;\r\n\r\ntemplate<> struct reverse_fold_chunk<0>\r\n{\r\n template<\r\n typename First\r\n , typename Last\r\n , typename State\r\n , typename BackwardOp\r\n , typename ForwardOp\r\n >\r\n struct result_\r\n {\r\n typedef First iter0;\r\n typedef State fwd_state0;\r\n typedef fwd_state0 bkwd_state0;\r\n typedef bkwd_state0 state;\r\n typedef iter0 iterator;\r\n };\r\n\r\n /// ETI workaround\r\n template<> struct result_< int,int,int,int,int >\r\n {\r\n typedef int state;\r\n typedef int iterator;\r\n };\r\n\r\n};\r\n\r\ntemplate<> struct reverse_fold_chunk<1>\r\n{\r\n template<\r\n typename First\r\n , typename Last\r\n , typename State\r\n , typename BackwardOp\r\n , typename ForwardOp\r\n >\r\n struct result_\r\n {\r\n typedef First iter0;\r\n typedef State fwd_state0;\r\n typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;\r\n typedef typename mpl::next<iter0>::type iter1;\r\n \r\n\r\n typedef fwd_state1 bkwd_state1;\r\n typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;\r\n typedef bkwd_state0 state;\r\n typedef iter1 iterator;\r\n };\r\n\r\n /// ETI workaround\r\n template<> struct result_< int,int,int,int,int >\r\n {\r\n typedef int state;\r\n typedef int iterator;\r\n };\r\n\r\n};\r\n\r\ntemplate<> struct reverse_fold_chunk<2>\r\n{\r\n template<\r\n typename First\r\n , typename Last\r\n , typename State\r\n , typename BackwardOp\r\n , typename ForwardOp\r\n >\r\n struct result_\r\n {\r\n typedef First iter0;\r\n typedef State fwd_state0;\r\n typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;\r\n typedef typename mpl::next<iter0>::type iter1;\r\n typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;\r\n typedef typename mpl::next<iter1>::type iter2;\r\n \r\n\r\n typedef fwd_state2 bkwd_state2;\r\n typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;\r\n typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;\r\n \r\n\r\n typedef bkwd_state0 state;\r\n typedef iter2 iterator;\r\n };\r\n\r\n /// ETI workaround\r\n template<> struct result_< int,int,int,int,int >\r\n {\r\n typedef int state;\r\n typedef int iterator;\r\n };\r\n\r\n};\r\n\r\ntemplate<> struct reverse_fold_chunk<3>\r\n{\r\n template<\r\n typename First\r\n , typename Last\r\n , typename State\r\n , typename BackwardOp\r\n , typename ForwardOp\r\n >\r\n struct result_\r\n {\r\n typedef First iter0;\r\n typedef State fwd_state0;\r\n typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;\r\n typedef typename mpl::next<iter0>::type iter1;\r\n typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;\r\n typedef typename mpl::next<iter1>::type iter2;\r\n typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;\r\n typedef typename mpl::next<iter2>::type iter3;\r\n \r\n\r\n typedef fwd_state3 bkwd_state3;\r\n typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;\r\n typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;\r\n typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;\r\n \r\n\r\n typedef bkwd_state0 state;\r\n typedef iter3 iterator;\r\n };\r\n\r\n /// ETI workaround\r\n template<> struct result_< int,int,int,int,int >\r\n {\r\n typedef int state;\r\n typedef int iterator;\r\n };\r\n\r\n};\r\n\r\ntemplate<> struct reverse_fold_chunk<4>\r\n{\r\n template<\r\n typename First\r\n , typename Last\r\n , typename State\r\n , typename BackwardOp\r\n , typename ForwardOp\r\n >\r\n struct result_\r\n {\r\n typedef First iter0;\r\n typedef State fwd_state0;\r\n typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;\r\n typedef typename mpl::next<iter0>::type iter1;\r\n typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;\r\n typedef typename mpl::next<iter1>::type iter2;\r\n typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;\r\n typedef typename mpl::next<iter2>::type iter3;\r\n typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;\r\n typedef typename mpl::next<iter3>::type iter4;\r\n \r\n\r\n typedef fwd_state4 bkwd_state4;\r\n typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;\r\n typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;\r\n typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;\r\n typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;\r\n \r\n\r\n typedef bkwd_state0 state;\r\n typedef iter4 iterator;\r\n };\r\n\r\n /// ETI workaround\r\n template<> struct result_< int,int,int,int,int >\r\n {\r\n typedef int state;\r\n typedef int iterator;\r\n };\r\n\r\n};\r\n\r\ntemplate< long N >\r\nstruct reverse_fold_chunk\r\n{\r\n template<\r\n typename First\r\n , typename Last\r\n , typename State\r\n , typename BackwardOp\r\n , typename ForwardOp\r\n >\r\n struct result_\r\n {\r\n typedef First iter0;\r\n typedef State fwd_state0;\r\n typedef typename apply2< ForwardOp, fwd_state0, typename deref<iter0>::type >::type fwd_state1;\r\n typedef typename mpl::next<iter0>::type iter1;\r\n typedef typename apply2< ForwardOp, fwd_state1, typename deref<iter1>::type >::type fwd_state2;\r\n typedef typename mpl::next<iter1>::type iter2;\r\n typedef typename apply2< ForwardOp, fwd_state2, typename deref<iter2>::type >::type fwd_state3;\r\n typedef typename mpl::next<iter2>::type iter3;\r\n typedef typename apply2< ForwardOp, fwd_state3, typename deref<iter3>::type >::type fwd_state4;\r\n typedef typename mpl::next<iter3>::type iter4;\r\n \r\n\r\n typedef reverse_fold_impl<\r\n ( (N - 4) < 0 ? 0 : N - 4 )\r\n , iter4\r\n , Last\r\n , fwd_state4\r\n , BackwardOp\r\n , ForwardOp\r\n > nested_chunk;\r\n\r\n typedef typename nested_chunk::state bkwd_state4;\r\n typedef typename apply2< BackwardOp, bkwd_state4, typename deref<iter3>::type >::type bkwd_state3;\r\n typedef typename apply2< BackwardOp, bkwd_state3, typename deref<iter2>::type >::type bkwd_state2;\r\n typedef typename apply2< BackwardOp, bkwd_state2, typename deref<iter1>::type >::type bkwd_state1;\r\n typedef typename apply2< BackwardOp, bkwd_state1, typename deref<iter0>::type >::type bkwd_state0;\r\n \r\n\r\n typedef bkwd_state0 state;\r\n typedef typename nested_chunk::iterator iterator;\r\n };\r\n};\r\n\r\ntemplate<\r\n typename First\r\n , typename Last\r\n , typename State\r\n , typename BackwardOp\r\n , typename ForwardOp\r\n >\r\nstruct reverse_fold_step;\r\n\r\ntemplate<\r\n typename Last\r\n , typename State\r\n >\r\nstruct reverse_fold_null_step\r\n{\r\n typedef Last iterator;\r\n typedef State state;\r\n};\r\n\r\ntemplate<>\r\nstruct reverse_fold_chunk< -1 >\r\n{\r\n template<\r\n typename First\r\n , typename Last\r\n , typename State\r\n , typename BackwardOp\r\n , typename ForwardOp\r\n >\r\n struct result_\r\n {\r\n typedef typename if_<\r\n typename is_same< First,Last >::type\r\n , reverse_fold_null_step< Last,State >\r\n , reverse_fold_step< First,Last,State,BackwardOp,ForwardOp >\r\n >::type res_;\r\n\r\n typedef typename res_::state state;\r\n typedef typename res_::iterator iterator;\r\n };\r\n\r\n /// ETI workaround\r\n template<> struct result_< int,int,int,int,int >\r\n {\r\n typedef int state;\r\n typedef int iterator;\r\n };\r\n\r\n};\r\n\r\ntemplate<\r\n typename First\r\n , typename Last\r\n , typename State\r\n , typename BackwardOp\r\n , typename ForwardOp\r\n >\r\nstruct reverse_fold_step\r\n{\r\n typedef reverse_fold_chunk< -1 >::template result_<\r\n typename mpl::next<First>::type\r\n , Last\r\n , typename apply2<ForwardOp,State, typename deref<First>::type>::type\r\n , BackwardOp\r\n , ForwardOp\r\n > nested_step;\r\n\r\n typedef typename apply2<\r\n BackwardOp\r\n , typename nested_step::state\r\n , typename deref<First>::type\r\n >::type state;\r\n\r\n typedef typename nested_step::iterator iterator;\r\n};\r\n\r\ntemplate<\r\n long N\r\n , typename First\r\n , typename Last\r\n , typename State\r\n , typename BackwardOp\r\n , typename ForwardOp\r\n >\r\nstruct reverse_fold_impl\r\n : reverse_fold_chunk<N>\r\n ::template result_< First,Last,State,BackwardOp,ForwardOp >\r\n{\r\n};\r\n\r\n}}}\r\n"} +{"text": "/*\n * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n *\n * This code is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License version 2 only, as\n * published by the Free Software Foundation. Oracle designates this\n * particular file as subject to the \"Classpath\" exception as provided\n * by Oracle in the LICENSE file that accompanied this code.\n *\n * This code is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License\n * version 2 for more details (a copy is included in the LICENSE file that\n * accompanied this code).\n *\n * You should have received a copy of the GNU General Public License version\n * 2 along with this work; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n * or visit www.oracle.com if you need additional information or have any\n * questions.\n */\n\npackage test.com.sun.glass.ui.monocle.headless;\n\nimport com.sun.glass.ui.Screen;\nimport javafx.application.Application;\nimport javafx.stage.Stage;\nimport junit.framework.Assert;\nimport org.junit.BeforeClass;\nimport org.junit.Test;\n\nimport java.util.concurrent.CountDownLatch;\nimport java.util.concurrent.TimeUnit;\n\npublic class HeadlessGeometry2Test {\n\n private static CountDownLatch startupLatch = new CountDownLatch(1);\n\n private static int width;\n private static int height;\n private static int depth;\n\n public static class TestApp extends Application {\n @Override\n public void start(Stage t) {\n width = Screen.getMainScreen().getWidth();\n height = Screen.getMainScreen().getHeight();\n depth = Screen.getMainScreen().getDepth();\n startupLatch.countDown();\n }\n }\n\n @BeforeClass\n public static void setup() throws Exception {\n System.setProperty(\"glass.platform\", \"Monocle\");\n System.setProperty(\"monocle.platform\", \"Headless\");\n System.setProperty(\"prism.order\", \"sw\");\n System.setProperty(\"headless.geometry\", \"150x250-16\");\n new Thread(() -> Application.launch(TestApp.class)).start();\n startupLatch.await(5, TimeUnit.SECONDS);\n Assert.assertEquals(0, startupLatch.getCount());\n }\n\n @Test\n public void setScreenBounds() throws Exception {\n Assert.assertEquals(150, width);\n Assert.assertEquals(250, height);\n Assert.assertEquals(16, depth);\n }\n\n}\n"} +{"text": "步步高教育电子 Android应用工程师\n==========\n\n#### 公司介绍\n&emsp;&emsp;步步高教育电子有限公司于1995年在广东省东莞市成立。我们以给学习者带来便捷和学习的进步为宗旨,始终坚守本分、诚信的核心价值观,致力于电教产品的研发、生产、销售和服务,产品涵盖学习机、点读机、学习电脑、电子词典、复读机等多个品类。2011年,我们将儿童教育理念与创新科技相结合,启用“小天才”品牌,将快乐学习的体验带给幼龄儿童。\n\n- [步步高教育电子](http://www.eebbk.com)\n\n- [小天才](https://www.okii.com)\n\n#### 职位描述\n\n**岗位职责:**\n\n1. 负责Android平台应用软件的设计、实现、优化和维护\n\n2. 负责Android应用程序的内存、性能和体验优化\n\n3. 负责核心业务的技术攻坚和指标达成,解决项目中的技术难点\n\n**岗位要求:**\n\n1. 本科及以上学历,计算机、软件、通信相关专业,1年及以上Android应用开发经验\n\n2. 扎实的Java、C/C++语言编程能力,熟悉计算机原理、操作系统、数据库、网络、常用算法和数据结构等基础知识\n\n3. 独立或者作为主程序员完成过至少一个Android应用的开发优先考虑,注重程序设计和编码规范,有一定的程序架构能力\n\n4. 注重软件的开发质量和稳定性,有良好的自测意识\n\n5. 对应用开发有追求,注重细节和体验,有志于开发优秀用户体验的产品,有过性能优化经验者优先\n\n6. 熟悉Android常用API和主流开源项目的实现原理,有实际框架开发经验者优先\n\n7. 积极、沟通顺畅、对新技术感兴趣\n\n#### 联系方式\n\n**简历投递:**\n\n1. 邮箱:**zmywly8866@gmail.com**\n\n2. 格式:标题:应聘Android应用开发工程师+姓名+工作年限+联系方式,比如“应聘Android应用开发工程师+张明云+6年+138**”;邮件内容:简历附件。\n\n**招聘咨询:**\n\n1. 知乎私信:[张明云](https://www.zhihu.com/people/zhang-ming-yun-88)\n\n#### 工作地点\n\n- 广东 东莞 长安镇(二线城市,临近一线,生活开支低,适合定居长期发展)\n\n#### 其它\n\n1. 待遇:提供行业内有竞争力的薪资待遇,表现优异可以有获得年终奖的机会\n\n2. 公司实景:\n\n![宿舍楼](https://pic2.zhimg.com/v2-8b06db30944551f25681a240c69fbf4b_b.jpg)\n\n![办公大楼](https://pic2.zhimg.com/v2-675bcaa384f1aee3fa70df3f2c8ac5fa_b.jpg)\n"} +{"text": "/*\n * Copyright (C)2005-2019 Haxe Foundation\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n */\n\npackage sys.db;\n\ninterface Connection {\n\tfunction request(s:String):ResultSet;\n\tfunction close():Void;\n\tfunction escape(s:String):String;\n\tfunction quote(s:String):String;\n\tfunction addValue(s:StringBuf, v:Dynamic):Void;\n\tfunction lastInsertId():Int;\n\tfunction dbName():String;\n\tfunction startTransaction():Void;\n\tfunction commit():Void;\n\tfunction rollback():Void;\n}\n"} +{"text": "[name]\nTRUE (1) and FALSE (0)\n\n[input]\n=head1 TRUE (1)\n\npodlators prior to 4.08 misrendered TRUE (1) and FALSE (0) with escaped nroff\nin the output because it tried to apply both small caps and man page reference\ncode and got it wrong.\n\n[output]\n.SH \"TRUE (1)\"\n.IX Header \"TRUE (1)\"\npodlators prior to 4.08 misrendered \\s-1TRUE\\s0 (1) and \\s-1FALSE\\s0 (0) with escaped nroff\nin the output because it tried to apply both small caps and man page reference\ncode and got it wrong.\n"} +{"text": "// Copyright 2019 The Brave Authors. All rights reserved.\n// This Source Code Form is subject to the terms of the Mozilla Public\n// License, v. 2.0. If a copy of the MPL was not distributed with this file,\n// you can obtain one at http://mozilla.org/MPL/2.0/.\n\n#include \"chrome/browser/browser_process.h\"\n#include \"chrome/browser/chrome_notification_types.h\"\n#include \"chrome/browser/profiles/profile.h\"\n#include \"chrome/browser/profiles/profile_attributes_storage.h\"\n#include \"chrome/browser/profiles/profile_manager.h\"\n#include \"chrome/browser/profiles/profile_window.h\"\n#include \"chrome/browser/search_engines/template_url_service_factory.h\"\n#include \"chrome/browser/ui/browser.h\"\n#include \"chrome/browser/ui/browser_finder.h\"\n#include \"chrome/browser/ui/browser_list.h\"\n#include \"chrome/browser/ui/views/frame/browser_view.h\"\n#include \"chrome/browser/ui/views/frame/toolbar_button_provider.h\"\n#include \"chrome/browser/ui/views/toolbar/toolbar_view.h\"\n#include \"chrome/test/base/in_process_browser_test.h\"\n#include \"chrome/test/base/search_test_utils.h\"\n#include \"content/public/browser/notification_service.h\"\n#include \"content/public/test/browser_test.h\"\n#include \"content/public/test/test_utils.h\"\n#include \"ui/views/view.h\"\n\n// An observer that returns back to test code after a new profile is\n// initialized.\nvoid OnUnblockOnProfileCreation(base::RunLoop* run_loop,\n Profile* profile,\n Profile::CreateStatus status) {\n if (status == Profile::CREATE_STATUS_INITIALIZED)\n run_loop->Quit();\n}\n\nclass BraveToolbarViewTest : public InProcessBrowserTest {\n public:\n BraveToolbarViewTest() = default;\n ~BraveToolbarViewTest() override = default;\n\n void SetUpOnMainThread() override {\n Init(browser());\n }\n\n void Init(Browser* browser) {\n BrowserView* browser_view =\n BrowserView::GetBrowserViewForBrowser(browser);\n ASSERT_NE(browser_view, nullptr);\n ASSERT_NE(browser_view->toolbar(), nullptr);\n toolbar_button_provider_ = browser_view->toolbar_button_provider();\n ASSERT_NE(toolbar_button_provider_, nullptr);\n }\n\n protected:\n bool is_avatar_button_shown() {\n views::View* button = toolbar_button_provider_->GetAvatarToolbarButton();\n DCHECK(button);\n return button->GetVisible();\n }\n\n private:\n ToolbarButtonProvider* toolbar_button_provider_;\n DISALLOW_COPY_AND_ASSIGN(BraveToolbarViewTest);\n};\n\nIN_PROC_BROWSER_TEST_F(BraveToolbarViewTest,\n AvatarButtonNotShownSingleProfile) {\n EXPECT_EQ(false, is_avatar_button_shown());\n}\n\nIN_PROC_BROWSER_TEST_F(BraveToolbarViewTest, AvatarButtonIsShownGuestProfile) {\n // Open a Guest window.\n EXPECT_EQ(1U, BrowserList::GetInstance()->size());\n content::WindowedNotificationObserver browser_creation_observer(\n chrome::NOTIFICATION_BROWSER_OPENED,\n content::NotificationService::AllSources());\n profiles::SwitchToGuestProfile(ProfileManager::CreateCallback());\n base::RunLoop().RunUntilIdle();\n browser_creation_observer.Wait();\n EXPECT_EQ(2U, BrowserList::GetInstance()->size());\n\n // Retrieve the new Guest profile.\n Profile* guest = g_browser_process->profile_manager()->GetProfileByPath(\n ProfileManager::GetGuestProfilePath());\n\n // Access the browser with the Guest profile and re-init test for it.\n Browser* browser = chrome::FindAnyBrowser(guest, true);\n EXPECT_TRUE(browser);\n Init(browser);\n EXPECT_EQ(true, is_avatar_button_shown());\n}\n\nIN_PROC_BROWSER_TEST_F(BraveToolbarViewTest,\n AvatarButtonIsShownMultipleProfiles) {\n // Should not be shown in first profile, at first\n EXPECT_EQ(false, is_avatar_button_shown());\n\n // Create an additional profile.\n ProfileManager* profile_manager = g_browser_process->profile_manager();\n ProfileAttributesStorage& storage =\n profile_manager->GetProfileAttributesStorage();\n base::FilePath current_profile_path = browser()->profile()->GetPath();\n base::FilePath new_path = profile_manager->GenerateNextProfileDirectoryPath();\n base::RunLoop run_loop;\n profile_manager->CreateProfileAsync(\n new_path, base::Bind(&OnUnblockOnProfileCreation, &run_loop),\n base::string16(), std::string());\n run_loop.Run();\n ASSERT_EQ(2u, storage.GetNumberOfProfiles());\n Profile* new_profile = profile_manager->GetProfileByPath(new_path);\n\n // check it's now shown in first profile\n EXPECT_EQ(true, is_avatar_button_shown());\n\n // Open the new profile\n EXPECT_EQ(1U, BrowserList::GetInstance()->size());\n content::WindowedNotificationObserver browser_creation_observer(\n chrome::NOTIFICATION_BROWSER_OPENED,\n content::NotificationService::AllSources());\n profiles::OpenBrowserWindowForProfile(\n ProfileManager::CreateCallback(),\n false, true, true,\n new_profile,\n Profile::CREATE_STATUS_INITIALIZED);\n base::RunLoop().RunUntilIdle();\n browser_creation_observer.Wait();\n EXPECT_EQ(2U, BrowserList::GetInstance()->size());\n\n // Check it's shown in second profile\n Browser* browser = chrome::FindAnyBrowser(new_profile, true);\n EXPECT_TRUE(browser);\n Init(browser);\n EXPECT_EQ(true, is_avatar_button_shown());\n}\n"} +{"text": "#\n# Created by Boyd Multerer on 2018-03-27.\n# Copyright © 2018 Kry10 Industries. All rights reserved.\n#\n\n# Supervisor for non-dynamic scenes\n\ndefmodule Scenic.Scene.Supervisor do\n @moduledoc false\n use Supervisor\n\n def child_spec({scene_module, args, opts}) do\n %{\n id: opts[:name] || make_ref(),\n start: {__MODULE__, :start_link, [{scene_module, args, opts}]},\n type: :supervisor,\n restart: :permanent,\n shutdown: 500\n }\n end\n\n def start_link({scene_module, args, opts}) do\n Supervisor.start_link(__MODULE__, {scene_module, args, opts})\n end\n\n def init(args) do\n [\n {DynamicSupervisor, strategy: :one_for_one},\n {Scenic.Scene, args}\n ]\n |> Supervisor.init(strategy: :one_for_all)\n end\nend\n"} +{"text": "---\ntitle: Pie & Doughnut Charts\nanchor: doughnut-pie-chart\n---\n###Introduction\nPie and doughnut charts are probably the most commonly used chart there are. They are divided into segments, the arc of each segment shows the proportional value of each piece of data.\n\nThey are excellent at showing the relational proportions between data.\n\nPie and doughnut charts are effectively the same class in Chart.js, but have one different default value - their `percentageInnerCutout`. This equates what percentage of the inner should be cut out. This defaults to `0` for pie charts, and `50` for doughnuts.\n\nThey are also registered under two aliases in the `Chart` core. Other than their different default value, and different alias, they are exactly the same.\n\n<div class=\"canvas-holder half\">\n\t<canvas width=\"250\" height=\"125\"></canvas>\n</div>\n\n<div class=\"canvas-holder half\">\n\t<canvas width=\"250\" height=\"125\"></canvas>\n</div>\n\n\n### Example usage\n\n```javascript\n// For a pie chart\nvar myPieChart = new Chart(ctx[0]).Pie(data,options);\n\n// And for a doughnut chart\nvar myDoughnutChart = new Chart(ctx[1]).Doughnut(data,options);\n```\n\n### Data structure\n\n```javascript\nvar data = [\n\t{\n\t\tvalue: 300,\n\t\tcolor:\"#F7464A\",\n\t\thighlight: \"#FF5A5E\",\n\t\tlabel: \"Red\"\n\t},\n\t{\n\t\tvalue: 50,\n\t\tcolor: \"#46BFBD\",\n\t\thighlight: \"#5AD3D1\",\n\t\tlabel: \"Green\"\n\t},\n\t{\n\t\tvalue: 100,\n\t\tcolor: \"#FDB45C\",\n\t\thighlight: \"#FFC870\",\n\t\tlabel: \"Yellow\"\n\t}\n]\n```\n\nFor a pie chart, you must pass in an array of objects with a value and a color property. The value attribute should be a number, Chart.js will total all of the numbers and calculate the relative proportion of each. The color attribute should be a string. Similar to CSS, for this string you can use HEX notation, RGB, RGBA or HSL.\n\n### Chart options\n\nThese are the customisation options specific to Pie & Doughnut charts. These options are merged with the [global chart configuration options](#getting-started-global-chart-configuration), and form the options of the chart.\n\n```javascript\n{\n\t//Boolean - Whether we should show a stroke on each segment\n\tsegmentShowStroke : true,\n\n\t//String - The colour of each segment stroke\n\tsegmentStrokeColor : \"#fff\",\n\n\t//Number - The width of each segment stroke\n\tsegmentStrokeWidth : 2,\n\n\t//Number - The percentage of the chart that we cut out of the middle\n\tpercentageInnerCutout : 50, // This is 0 for Pie charts\n\n\t//Number - Amount of animation steps\n\tanimationSteps : 100,\n\n\t//String - Animation easing effect\n\tanimationEasing : \"easeOutBounce\",\n\n\t//Boolean - Whether we animate the rotation of the Doughnut\n\tanimateRotate : true,\n\n\t//Boolean - Whether we animate scaling the Doughnut from the centre\n\tanimateScale : false,\n\t{% raw %}\n\t//String - A legend template\n\tlegendTemplate : \"<ul class=\\\"<%=name.toLowerCase()%>-legend\\\"><% for (var i=0; i<segments.length; i++){%><li><span style=\\\"background-color:<%=segments[i].fillColor%>\\\"></span><%if(segments[i].label){%><%=segments[i].label%><%}%></li><%}%></ul>\"\n\t{% endraw %}\n}\n```\nYou can override these for your `Chart` instance by passing a second argument into the `Doughnut` method as an object with the keys you want to override.\n\nFor example, we could have a doughnut chart that animates by scaling out from the centre like so:\n\n```javascript\nnew Chart(ctx).Doughnut(data, {\n\tanimateScale: true\n});\n// This will create a chart with all of the default options, merged from the global config,\n// and the Doughnut chart defaults but this particular instance will have `animateScale` set to `true`.\n```\n\nWe can also change these default values for each Doughnut type that is created, this object is available at `Chart.defaults.Doughnut`. Pie charts also have a clone of these defaults available to change at `Chart.defaults.Pie`, with the only difference being `percentageInnerCutout` being set to 0.\n\n### Prototype methods\n\n#### .getSegmentsAtEvent( event )\n\nCalling `getSegmentsAtEvent(event)` on your Chart instance passing an argument of an event, or jQuery event, will return the segment elements that are at the same position of that event.\n\n```javascript\ncanvas.onclick = function(evt){\n\tvar activePoints = myDoughnutChart.getSegmentsAtEvent(evt);\n\t// => activePoints is an array of segments on the canvas that are at the same position as the click event.\n};\n```\n\nThis functionality may be useful for implementing DOM based tooltips, or triggering custom behaviour in your application.\n\n#### .update( )\n\nCalling `update()` on your Chart instance will re-render the chart with any updated values, allowing you to edit the value of multiple existing points, then render those in one animated render loop.\n\n```javascript\nmyDoughnutChart.segments[1].value = 10;\n// Would update the first dataset's value of 'Green' to be 10\nmyDoughnutChart.update();\n// Calling update now animates the circumference of the segment 'Green' from 50 to 10.\n// and transitions other segment widths\n```\n\n#### .addData( segmentData, index )\n\nCalling `addData(segmentData, index)` on your Chart instance passing an object in the same format as in the constructor. There is an optional second argument of 'index', this determines at what index the new segment should be inserted into the chart.\n\n```javascript\n// An object in the same format as the original data source\nmyDoughnutChart.addData({\n\tvalue: 130,\n\tcolor: \"#B48EAD\",\n\thighlight: \"#C69CBE\",\n\tlabel: \"Purple\"\n});\n// The new segment will now animate in.\n```\n\n#### .removeData( index )\n\nCalling `removeData(index)` on your Chart instance will remove segment at that particular index. If none is provided, it will default to the last segment.\n\n```javascript\nmyDoughnutChart.removeData();\n// Other segments will update to fill the empty space left.\n```\n"} +{"text": "PDF author: 'HAVI Solutions GmbH & Co. KG, phg'\nPDFBox Version: 1.8.16\n-----------------------------------------\n@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\nKundennr. /BLZ Bezeichnung\n1234567 Max Mustermann \n \n \n111 111 11 Muster Str. 11 12345 Stadt \nabweichend wirtschaftlich Berechtigter\n \n ---- \nc o m d i r e c t b a n k A G \n \n 2 5 4 5 1 Q u i c k b o r n \n0 1 0 1 1872\n \nT e le f o n : 0 4 1 0 6 - 7 0 8 25 00\n \nHerrn D a t u m : 0 2 . 0 3 .2020 \n M a x M u s t e r m a n n D e p o t n u m m er: 1 1 1 1 1 1 1 11 \nM u s t e r-Str. 1 \n1 R e f e r e n z - N u mmer: 0Y I F O L 1 P M KP000DL 1 1 1 1 Stadt \n \n \n \n \nSteuerliche Behandlung: Inländische Dividende vom 03.03.2020 \nStk. 50 AURUBIS AG , WKN / ISIN: 676650 / DE0006766504 \nZ u Ih r e n G u n s t e n v o r S te u e r n : E U R 62,5 0 \n \n \n \n \n \n \n \n \nS te u e rb e m e ss u n g s g r u n d la g e E U R 6 2 , 5 0 \n \n \n K ap i ta le r tr a gs t e ue r ( 2 ) E U R - 1 5 , 3 2 \n S ol id a ri tä t sz u s c hl a g E U R - 0 , 8 4 \nK irc h e n s te u e r _E U_ _R _ _ _ _ _ _ _ _ _ _ _ _ _ -_ 1_ ,_ 2_ 2_ \na b g e f ü h rt e S t e u er n _E U_ R_ _ _ _ _ _ _ _ _ __ __ -__1_7_,3_ _8 \n \n Zu Ih r e n G u n s t e n n a c h S t e u er n : E U R 45,1 2 \n \n \n \n \n \nDie Gutschrift erfolgt mit Valuta 03.03.2020 auf Konto EUR mit der IBAN DE12 3456 7890 1234 5678 00 \n \n \n \n \n \n \n \n(2) Durch die Berücksichtigung der Kirchensteuer (8% bzw. 9%) als Sonderausgabe reduziert sich der Kapitalertragsteuersatz auf 24,51% bzw. 24,45%. \nKEINE STEUERBESCHEINIGUNG ...\nBisher einbehaltene bzw. angerechnete Steuer in EUR (4)\nin 2020 einbehaltene einbehaltener einbehaltene angerechneteKapitalertragsteuer Solidaritätszuschlag Kirchensteuer ausländische Quellensteuer\nvor Ermittlung\n 0,00 0,00\n 0,00 0,00\nnach Ermittlung\n 0,00 0,00 0,00 0,0 \nVerrechnungssalden in EUR (4)\nin 2020 Gewinne / Verluste sonstige anrechenbare verfügbareraus Aktien Gewinne / Verluste ausländische Quellensteuer Freistellungsauftrag\nvor Ermittlung\n 0,0 0,0 0,0 0,0\nnach Ermittlung\n 0,0 0,0\n 0,0 0,0 \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \ncomdirect bank AG \nDiese Abrechnung ist maschinell erstellt und wird nicht unterschrieben. \n \n \n \n \n \n(4) Die ausgewiesenen EUR-Beträge spiegeln den Stand zum Abrechnungszeitpunkt wider. \nKEINE STEUERBESCHEINIGUNG\n"} +{"text": "*> \\brief \\b ZLARFX applies an elementary reflector to a general rectangular matrix, with loop unrolling when the reflector has order ≤ 10.\n*\n* =========== DOCUMENTATION ===========\n*\n* Online html documentation available at\n* http://www.netlib.org/lapack/explore-html/\n*\n*> \\htmlonly\n*> Download ZLARFX + dependencies\n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/zlarfx.f\">\n*> [TGZ]</a>\n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/zlarfx.f\">\n*> [ZIP]</a>\n*> <a href=\"http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/zlarfx.f\">\n*> [TXT]</a>\n*> \\endhtmlonly\n*\n* Definition:\n* ===========\n*\n* SUBROUTINE ZLARFX( SIDE, M, N, V, TAU, C, LDC, WORK )\n*\n* .. Scalar Arguments ..\n* CHARACTER SIDE\n* INTEGER LDC, M, N\n* COMPLEX*16 TAU\n* ..\n* .. Array Arguments ..\n* COMPLEX*16 C( LDC, * ), V( * ), WORK( * )\n* ..\n*\n*\n*> \\par Purpose:\n* =============\n*>\n*> \\verbatim\n*>\n*> ZLARFX applies a complex elementary reflector H to a complex m by n\n*> matrix C, from either the left or the right. H is represented in the\n*> form\n*>\n*> H = I - tau * v * v**H\n*>\n*> where tau is a complex scalar and v is a complex vector.\n*>\n*> If tau = 0, then H is taken to be the unit matrix\n*>\n*> This version uses inline code if H has order < 11.\n*> \\endverbatim\n*\n* Arguments:\n* ==========\n*\n*> \\param[in] SIDE\n*> \\verbatim\n*> SIDE is CHARACTER*1\n*> = 'L': form H * C\n*> = 'R': form C * H\n*> \\endverbatim\n*>\n*> \\param[in] M\n*> \\verbatim\n*> M is INTEGER\n*> The number of rows of the matrix C.\n*> \\endverbatim\n*>\n*> \\param[in] N\n*> \\verbatim\n*> N is INTEGER\n*> The number of columns of the matrix C.\n*> \\endverbatim\n*>\n*> \\param[in] V\n*> \\verbatim\n*> V is COMPLEX*16 array, dimension (M) if SIDE = 'L'\n*> or (N) if SIDE = 'R'\n*> The vector v in the representation of H.\n*> \\endverbatim\n*>\n*> \\param[in] TAU\n*> \\verbatim\n*> TAU is COMPLEX*16\n*> The value tau in the representation of H.\n*> \\endverbatim\n*>\n*> \\param[in,out] C\n*> \\verbatim\n*> C is COMPLEX*16 array, dimension (LDC,N)\n*> On entry, the m by n matrix C.\n*> On exit, C is overwritten by the matrix H * C if SIDE = 'L',\n*> or C * H if SIDE = 'R'.\n*> \\endverbatim\n*>\n*> \\param[in] LDC\n*> \\verbatim\n*> LDC is INTEGER\n*> The leading dimension of the array C. LDA >= max(1,M).\n*> \\endverbatim\n*>\n*> \\param[out] WORK\n*> \\verbatim\n*> WORK is COMPLEX*16 array, dimension (N) if SIDE = 'L'\n*> or (M) if SIDE = 'R'\n*> WORK is not referenced if H has order < 11.\n*> \\endverbatim\n*\n* Authors:\n* ========\n*\n*> \\author Univ. of Tennessee\n*> \\author Univ. of California Berkeley\n*> \\author Univ. of Colorado Denver\n*> \\author NAG Ltd.\n*\n*> \\date December 2016\n*\n*> \\ingroup complex16OTHERauxiliary\n*\n* =====================================================================\n SUBROUTINE ZLARFX( SIDE, M, N, V, TAU, C, LDC, WORK )\n*\n* -- LAPACK auxiliary routine (version 3.7.0) --\n* -- LAPACK is a software package provided by Univ. of Tennessee, --\n* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--\n* December 2016\n*\n* .. Scalar Arguments ..\n CHARACTER SIDE\n INTEGER LDC, M, N\n COMPLEX*16 TAU\n* ..\n* .. Array Arguments ..\n COMPLEX*16 C( LDC, * ), V( * ), WORK( * )\n* ..\n*\n* =====================================================================\n*\n* .. Parameters ..\n COMPLEX*16 ZERO, ONE\n PARAMETER ( ZERO = ( 0.0D+0, 0.0D+0 ),\n $ ONE = ( 1.0D+0, 0.0D+0 ) )\n* ..\n* .. Local Scalars ..\n INTEGER J\n COMPLEX*16 SUM, T1, T10, T2, T3, T4, T5, T6, T7, T8, T9,\n $ V1, V10, V2, V3, V4, V5, V6, V7, V8, V9\n* ..\n* .. External Functions ..\n LOGICAL LSAME\n EXTERNAL LSAME\n* ..\n* .. External Subroutines ..\n EXTERNAL ZLARF\n* ..\n* .. Intrinsic Functions ..\n INTRINSIC DCONJG\n* ..\n* .. Executable Statements ..\n*\n IF( TAU.EQ.ZERO )\n $ RETURN\n IF( LSAME( SIDE, 'L' ) ) THEN\n*\n* Form H * C, where H has order m.\n*\n GO TO ( 10, 30, 50, 70, 90, 110, 130, 150,\n $ 170, 190 )M\n*\n* Code for general M\n*\n CALL ZLARF( SIDE, M, N, V, 1, TAU, C, LDC, WORK )\n GO TO 410\n 10 CONTINUE\n*\n* Special code for 1 x 1 Householder\n*\n T1 = ONE - TAU*V( 1 )*DCONJG( V( 1 ) )\n DO 20 J = 1, N\n C( 1, J ) = T1*C( 1, J )\n 20 CONTINUE\n GO TO 410\n 30 CONTINUE\n*\n* Special code for 2 x 2 Householder\n*\n V1 = DCONJG( V( 1 ) )\n T1 = TAU*DCONJG( V1 )\n V2 = DCONJG( V( 2 ) )\n T2 = TAU*DCONJG( V2 )\n DO 40 J = 1, N\n SUM = V1*C( 1, J ) + V2*C( 2, J )\n C( 1, J ) = C( 1, J ) - SUM*T1\n C( 2, J ) = C( 2, J ) - SUM*T2\n 40 CONTINUE\n GO TO 410\n 50 CONTINUE\n*\n* Special code for 3 x 3 Householder\n*\n V1 = DCONJG( V( 1 ) )\n T1 = TAU*DCONJG( V1 )\n V2 = DCONJG( V( 2 ) )\n T2 = TAU*DCONJG( V2 )\n V3 = DCONJG( V( 3 ) )\n T3 = TAU*DCONJG( V3 )\n DO 60 J = 1, N\n SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J )\n C( 1, J ) = C( 1, J ) - SUM*T1\n C( 2, J ) = C( 2, J ) - SUM*T2\n C( 3, J ) = C( 3, J ) - SUM*T3\n 60 CONTINUE\n GO TO 410\n 70 CONTINUE\n*\n* Special code for 4 x 4 Householder\n*\n V1 = DCONJG( V( 1 ) )\n T1 = TAU*DCONJG( V1 )\n V2 = DCONJG( V( 2 ) )\n T2 = TAU*DCONJG( V2 )\n V3 = DCONJG( V( 3 ) )\n T3 = TAU*DCONJG( V3 )\n V4 = DCONJG( V( 4 ) )\n T4 = TAU*DCONJG( V4 )\n DO 80 J = 1, N\n SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) +\n $ V4*C( 4, J )\n C( 1, J ) = C( 1, J ) - SUM*T1\n C( 2, J ) = C( 2, J ) - SUM*T2\n C( 3, J ) = C( 3, J ) - SUM*T3\n C( 4, J ) = C( 4, J ) - SUM*T4\n 80 CONTINUE\n GO TO 410\n 90 CONTINUE\n*\n* Special code for 5 x 5 Householder\n*\n V1 = DCONJG( V( 1 ) )\n T1 = TAU*DCONJG( V1 )\n V2 = DCONJG( V( 2 ) )\n T2 = TAU*DCONJG( V2 )\n V3 = DCONJG( V( 3 ) )\n T3 = TAU*DCONJG( V3 )\n V4 = DCONJG( V( 4 ) )\n T4 = TAU*DCONJG( V4 )\n V5 = DCONJG( V( 5 ) )\n T5 = TAU*DCONJG( V5 )\n DO 100 J = 1, N\n SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) +\n $ V4*C( 4, J ) + V5*C( 5, J )\n C( 1, J ) = C( 1, J ) - SUM*T1\n C( 2, J ) = C( 2, J ) - SUM*T2\n C( 3, J ) = C( 3, J ) - SUM*T3\n C( 4, J ) = C( 4, J ) - SUM*T4\n C( 5, J ) = C( 5, J ) - SUM*T5\n 100 CONTINUE\n GO TO 410\n 110 CONTINUE\n*\n* Special code for 6 x 6 Householder\n*\n V1 = DCONJG( V( 1 ) )\n T1 = TAU*DCONJG( V1 )\n V2 = DCONJG( V( 2 ) )\n T2 = TAU*DCONJG( V2 )\n V3 = DCONJG( V( 3 ) )\n T3 = TAU*DCONJG( V3 )\n V4 = DCONJG( V( 4 ) )\n T4 = TAU*DCONJG( V4 )\n V5 = DCONJG( V( 5 ) )\n T5 = TAU*DCONJG( V5 )\n V6 = DCONJG( V( 6 ) )\n T6 = TAU*DCONJG( V6 )\n DO 120 J = 1, N\n SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) +\n $ V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J )\n C( 1, J ) = C( 1, J ) - SUM*T1\n C( 2, J ) = C( 2, J ) - SUM*T2\n C( 3, J ) = C( 3, J ) - SUM*T3\n C( 4, J ) = C( 4, J ) - SUM*T4\n C( 5, J ) = C( 5, J ) - SUM*T5\n C( 6, J ) = C( 6, J ) - SUM*T6\n 120 CONTINUE\n GO TO 410\n 130 CONTINUE\n*\n* Special code for 7 x 7 Householder\n*\n V1 = DCONJG( V( 1 ) )\n T1 = TAU*DCONJG( V1 )\n V2 = DCONJG( V( 2 ) )\n T2 = TAU*DCONJG( V2 )\n V3 = DCONJG( V( 3 ) )\n T3 = TAU*DCONJG( V3 )\n V4 = DCONJG( V( 4 ) )\n T4 = TAU*DCONJG( V4 )\n V5 = DCONJG( V( 5 ) )\n T5 = TAU*DCONJG( V5 )\n V6 = DCONJG( V( 6 ) )\n T6 = TAU*DCONJG( V6 )\n V7 = DCONJG( V( 7 ) )\n T7 = TAU*DCONJG( V7 )\n DO 140 J = 1, N\n SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) +\n $ V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) +\n $ V7*C( 7, J )\n C( 1, J ) = C( 1, J ) - SUM*T1\n C( 2, J ) = C( 2, J ) - SUM*T2\n C( 3, J ) = C( 3, J ) - SUM*T3\n C( 4, J ) = C( 4, J ) - SUM*T4\n C( 5, J ) = C( 5, J ) - SUM*T5\n C( 6, J ) = C( 6, J ) - SUM*T6\n C( 7, J ) = C( 7, J ) - SUM*T7\n 140 CONTINUE\n GO TO 410\n 150 CONTINUE\n*\n* Special code for 8 x 8 Householder\n*\n V1 = DCONJG( V( 1 ) )\n T1 = TAU*DCONJG( V1 )\n V2 = DCONJG( V( 2 ) )\n T2 = TAU*DCONJG( V2 )\n V3 = DCONJG( V( 3 ) )\n T3 = TAU*DCONJG( V3 )\n V4 = DCONJG( V( 4 ) )\n T4 = TAU*DCONJG( V4 )\n V5 = DCONJG( V( 5 ) )\n T5 = TAU*DCONJG( V5 )\n V6 = DCONJG( V( 6 ) )\n T6 = TAU*DCONJG( V6 )\n V7 = DCONJG( V( 7 ) )\n T7 = TAU*DCONJG( V7 )\n V8 = DCONJG( V( 8 ) )\n T8 = TAU*DCONJG( V8 )\n DO 160 J = 1, N\n SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) +\n $ V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) +\n $ V7*C( 7, J ) + V8*C( 8, J )\n C( 1, J ) = C( 1, J ) - SUM*T1\n C( 2, J ) = C( 2, J ) - SUM*T2\n C( 3, J ) = C( 3, J ) - SUM*T3\n C( 4, J ) = C( 4, J ) - SUM*T4\n C( 5, J ) = C( 5, J ) - SUM*T5\n C( 6, J ) = C( 6, J ) - SUM*T6\n C( 7, J ) = C( 7, J ) - SUM*T7\n C( 8, J ) = C( 8, J ) - SUM*T8\n 160 CONTINUE\n GO TO 410\n 170 CONTINUE\n*\n* Special code for 9 x 9 Householder\n*\n V1 = DCONJG( V( 1 ) )\n T1 = TAU*DCONJG( V1 )\n V2 = DCONJG( V( 2 ) )\n T2 = TAU*DCONJG( V2 )\n V3 = DCONJG( V( 3 ) )\n T3 = TAU*DCONJG( V3 )\n V4 = DCONJG( V( 4 ) )\n T4 = TAU*DCONJG( V4 )\n V5 = DCONJG( V( 5 ) )\n T5 = TAU*DCONJG( V5 )\n V6 = DCONJG( V( 6 ) )\n T6 = TAU*DCONJG( V6 )\n V7 = DCONJG( V( 7 ) )\n T7 = TAU*DCONJG( V7 )\n V8 = DCONJG( V( 8 ) )\n T8 = TAU*DCONJG( V8 )\n V9 = DCONJG( V( 9 ) )\n T9 = TAU*DCONJG( V9 )\n DO 180 J = 1, N\n SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) +\n $ V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) +\n $ V7*C( 7, J ) + V8*C( 8, J ) + V9*C( 9, J )\n C( 1, J ) = C( 1, J ) - SUM*T1\n C( 2, J ) = C( 2, J ) - SUM*T2\n C( 3, J ) = C( 3, J ) - SUM*T3\n C( 4, J ) = C( 4, J ) - SUM*T4\n C( 5, J ) = C( 5, J ) - SUM*T5\n C( 6, J ) = C( 6, J ) - SUM*T6\n C( 7, J ) = C( 7, J ) - SUM*T7\n C( 8, J ) = C( 8, J ) - SUM*T8\n C( 9, J ) = C( 9, J ) - SUM*T9\n 180 CONTINUE\n GO TO 410\n 190 CONTINUE\n*\n* Special code for 10 x 10 Householder\n*\n V1 = DCONJG( V( 1 ) )\n T1 = TAU*DCONJG( V1 )\n V2 = DCONJG( V( 2 ) )\n T2 = TAU*DCONJG( V2 )\n V3 = DCONJG( V( 3 ) )\n T3 = TAU*DCONJG( V3 )\n V4 = DCONJG( V( 4 ) )\n T4 = TAU*DCONJG( V4 )\n V5 = DCONJG( V( 5 ) )\n T5 = TAU*DCONJG( V5 )\n V6 = DCONJG( V( 6 ) )\n T6 = TAU*DCONJG( V6 )\n V7 = DCONJG( V( 7 ) )\n T7 = TAU*DCONJG( V7 )\n V8 = DCONJG( V( 8 ) )\n T8 = TAU*DCONJG( V8 )\n V9 = DCONJG( V( 9 ) )\n T9 = TAU*DCONJG( V9 )\n V10 = DCONJG( V( 10 ) )\n T10 = TAU*DCONJG( V10 )\n DO 200 J = 1, N\n SUM = V1*C( 1, J ) + V2*C( 2, J ) + V3*C( 3, J ) +\n $ V4*C( 4, J ) + V5*C( 5, J ) + V6*C( 6, J ) +\n $ V7*C( 7, J ) + V8*C( 8, J ) + V9*C( 9, J ) +\n $ V10*C( 10, J )\n C( 1, J ) = C( 1, J ) - SUM*T1\n C( 2, J ) = C( 2, J ) - SUM*T2\n C( 3, J ) = C( 3, J ) - SUM*T3\n C( 4, J ) = C( 4, J ) - SUM*T4\n C( 5, J ) = C( 5, J ) - SUM*T5\n C( 6, J ) = C( 6, J ) - SUM*T6\n C( 7, J ) = C( 7, J ) - SUM*T7\n C( 8, J ) = C( 8, J ) - SUM*T8\n C( 9, J ) = C( 9, J ) - SUM*T9\n C( 10, J ) = C( 10, J ) - SUM*T10\n 200 CONTINUE\n GO TO 410\n ELSE\n*\n* Form C * H, where H has order n.\n*\n GO TO ( 210, 230, 250, 270, 290, 310, 330, 350,\n $ 370, 390 )N\n*\n* Code for general N\n*\n CALL ZLARF( SIDE, M, N, V, 1, TAU, C, LDC, WORK )\n GO TO 410\n 210 CONTINUE\n*\n* Special code for 1 x 1 Householder\n*\n T1 = ONE - TAU*V( 1 )*DCONJG( V( 1 ) )\n DO 220 J = 1, M\n C( J, 1 ) = T1*C( J, 1 )\n 220 CONTINUE\n GO TO 410\n 230 CONTINUE\n*\n* Special code for 2 x 2 Householder\n*\n V1 = V( 1 )\n T1 = TAU*DCONJG( V1 )\n V2 = V( 2 )\n T2 = TAU*DCONJG( V2 )\n DO 240 J = 1, M\n SUM = V1*C( J, 1 ) + V2*C( J, 2 )\n C( J, 1 ) = C( J, 1 ) - SUM*T1\n C( J, 2 ) = C( J, 2 ) - SUM*T2\n 240 CONTINUE\n GO TO 410\n 250 CONTINUE\n*\n* Special code for 3 x 3 Householder\n*\n V1 = V( 1 )\n T1 = TAU*DCONJG( V1 )\n V2 = V( 2 )\n T2 = TAU*DCONJG( V2 )\n V3 = V( 3 )\n T3 = TAU*DCONJG( V3 )\n DO 260 J = 1, M\n SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 )\n C( J, 1 ) = C( J, 1 ) - SUM*T1\n C( J, 2 ) = C( J, 2 ) - SUM*T2\n C( J, 3 ) = C( J, 3 ) - SUM*T3\n 260 CONTINUE\n GO TO 410\n 270 CONTINUE\n*\n* Special code for 4 x 4 Householder\n*\n V1 = V( 1 )\n T1 = TAU*DCONJG( V1 )\n V2 = V( 2 )\n T2 = TAU*DCONJG( V2 )\n V3 = V( 3 )\n T3 = TAU*DCONJG( V3 )\n V4 = V( 4 )\n T4 = TAU*DCONJG( V4 )\n DO 280 J = 1, M\n SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) +\n $ V4*C( J, 4 )\n C( J, 1 ) = C( J, 1 ) - SUM*T1\n C( J, 2 ) = C( J, 2 ) - SUM*T2\n C( J, 3 ) = C( J, 3 ) - SUM*T3\n C( J, 4 ) = C( J, 4 ) - SUM*T4\n 280 CONTINUE\n GO TO 410\n 290 CONTINUE\n*\n* Special code for 5 x 5 Householder\n*\n V1 = V( 1 )\n T1 = TAU*DCONJG( V1 )\n V2 = V( 2 )\n T2 = TAU*DCONJG( V2 )\n V3 = V( 3 )\n T3 = TAU*DCONJG( V3 )\n V4 = V( 4 )\n T4 = TAU*DCONJG( V4 )\n V5 = V( 5 )\n T5 = TAU*DCONJG( V5 )\n DO 300 J = 1, M\n SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) +\n $ V4*C( J, 4 ) + V5*C( J, 5 )\n C( J, 1 ) = C( J, 1 ) - SUM*T1\n C( J, 2 ) = C( J, 2 ) - SUM*T2\n C( J, 3 ) = C( J, 3 ) - SUM*T3\n C( J, 4 ) = C( J, 4 ) - SUM*T4\n C( J, 5 ) = C( J, 5 ) - SUM*T5\n 300 CONTINUE\n GO TO 410\n 310 CONTINUE\n*\n* Special code for 6 x 6 Householder\n*\n V1 = V( 1 )\n T1 = TAU*DCONJG( V1 )\n V2 = V( 2 )\n T2 = TAU*DCONJG( V2 )\n V3 = V( 3 )\n T3 = TAU*DCONJG( V3 )\n V4 = V( 4 )\n T4 = TAU*DCONJG( V4 )\n V5 = V( 5 )\n T5 = TAU*DCONJG( V5 )\n V6 = V( 6 )\n T6 = TAU*DCONJG( V6 )\n DO 320 J = 1, M\n SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) +\n $ V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 )\n C( J, 1 ) = C( J, 1 ) - SUM*T1\n C( J, 2 ) = C( J, 2 ) - SUM*T2\n C( J, 3 ) = C( J, 3 ) - SUM*T3\n C( J, 4 ) = C( J, 4 ) - SUM*T4\n C( J, 5 ) = C( J, 5 ) - SUM*T5\n C( J, 6 ) = C( J, 6 ) - SUM*T6\n 320 CONTINUE\n GO TO 410\n 330 CONTINUE\n*\n* Special code for 7 x 7 Householder\n*\n V1 = V( 1 )\n T1 = TAU*DCONJG( V1 )\n V2 = V( 2 )\n T2 = TAU*DCONJG( V2 )\n V3 = V( 3 )\n T3 = TAU*DCONJG( V3 )\n V4 = V( 4 )\n T4 = TAU*DCONJG( V4 )\n V5 = V( 5 )\n T5 = TAU*DCONJG( V5 )\n V6 = V( 6 )\n T6 = TAU*DCONJG( V6 )\n V7 = V( 7 )\n T7 = TAU*DCONJG( V7 )\n DO 340 J = 1, M\n SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) +\n $ V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) +\n $ V7*C( J, 7 )\n C( J, 1 ) = C( J, 1 ) - SUM*T1\n C( J, 2 ) = C( J, 2 ) - SUM*T2\n C( J, 3 ) = C( J, 3 ) - SUM*T3\n C( J, 4 ) = C( J, 4 ) - SUM*T4\n C( J, 5 ) = C( J, 5 ) - SUM*T5\n C( J, 6 ) = C( J, 6 ) - SUM*T6\n C( J, 7 ) = C( J, 7 ) - SUM*T7\n 340 CONTINUE\n GO TO 410\n 350 CONTINUE\n*\n* Special code for 8 x 8 Householder\n*\n V1 = V( 1 )\n T1 = TAU*DCONJG( V1 )\n V2 = V( 2 )\n T2 = TAU*DCONJG( V2 )\n V3 = V( 3 )\n T3 = TAU*DCONJG( V3 )\n V4 = V( 4 )\n T4 = TAU*DCONJG( V4 )\n V5 = V( 5 )\n T5 = TAU*DCONJG( V5 )\n V6 = V( 6 )\n T6 = TAU*DCONJG( V6 )\n V7 = V( 7 )\n T7 = TAU*DCONJG( V7 )\n V8 = V( 8 )\n T8 = TAU*DCONJG( V8 )\n DO 360 J = 1, M\n SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) +\n $ V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) +\n $ V7*C( J, 7 ) + V8*C( J, 8 )\n C( J, 1 ) = C( J, 1 ) - SUM*T1\n C( J, 2 ) = C( J, 2 ) - SUM*T2\n C( J, 3 ) = C( J, 3 ) - SUM*T3\n C( J, 4 ) = C( J, 4 ) - SUM*T4\n C( J, 5 ) = C( J, 5 ) - SUM*T5\n C( J, 6 ) = C( J, 6 ) - SUM*T6\n C( J, 7 ) = C( J, 7 ) - SUM*T7\n C( J, 8 ) = C( J, 8 ) - SUM*T8\n 360 CONTINUE\n GO TO 410\n 370 CONTINUE\n*\n* Special code for 9 x 9 Householder\n*\n V1 = V( 1 )\n T1 = TAU*DCONJG( V1 )\n V2 = V( 2 )\n T2 = TAU*DCONJG( V2 )\n V3 = V( 3 )\n T3 = TAU*DCONJG( V3 )\n V4 = V( 4 )\n T4 = TAU*DCONJG( V4 )\n V5 = V( 5 )\n T5 = TAU*DCONJG( V5 )\n V6 = V( 6 )\n T6 = TAU*DCONJG( V6 )\n V7 = V( 7 )\n T7 = TAU*DCONJG( V7 )\n V8 = V( 8 )\n T8 = TAU*DCONJG( V8 )\n V9 = V( 9 )\n T9 = TAU*DCONJG( V9 )\n DO 380 J = 1, M\n SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) +\n $ V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) +\n $ V7*C( J, 7 ) + V8*C( J, 8 ) + V9*C( J, 9 )\n C( J, 1 ) = C( J, 1 ) - SUM*T1\n C( J, 2 ) = C( J, 2 ) - SUM*T2\n C( J, 3 ) = C( J, 3 ) - SUM*T3\n C( J, 4 ) = C( J, 4 ) - SUM*T4\n C( J, 5 ) = C( J, 5 ) - SUM*T5\n C( J, 6 ) = C( J, 6 ) - SUM*T6\n C( J, 7 ) = C( J, 7 ) - SUM*T7\n C( J, 8 ) = C( J, 8 ) - SUM*T8\n C( J, 9 ) = C( J, 9 ) - SUM*T9\n 380 CONTINUE\n GO TO 410\n 390 CONTINUE\n*\n* Special code for 10 x 10 Householder\n*\n V1 = V( 1 )\n T1 = TAU*DCONJG( V1 )\n V2 = V( 2 )\n T2 = TAU*DCONJG( V2 )\n V3 = V( 3 )\n T3 = TAU*DCONJG( V3 )\n V4 = V( 4 )\n T4 = TAU*DCONJG( V4 )\n V5 = V( 5 )\n T5 = TAU*DCONJG( V5 )\n V6 = V( 6 )\n T6 = TAU*DCONJG( V6 )\n V7 = V( 7 )\n T7 = TAU*DCONJG( V7 )\n V8 = V( 8 )\n T8 = TAU*DCONJG( V8 )\n V9 = V( 9 )\n T9 = TAU*DCONJG( V9 )\n V10 = V( 10 )\n T10 = TAU*DCONJG( V10 )\n DO 400 J = 1, M\n SUM = V1*C( J, 1 ) + V2*C( J, 2 ) + V3*C( J, 3 ) +\n $ V4*C( J, 4 ) + V5*C( J, 5 ) + V6*C( J, 6 ) +\n $ V7*C( J, 7 ) + V8*C( J, 8 ) + V9*C( J, 9 ) +\n $ V10*C( J, 10 )\n C( J, 1 ) = C( J, 1 ) - SUM*T1\n C( J, 2 ) = C( J, 2 ) - SUM*T2\n C( J, 3 ) = C( J, 3 ) - SUM*T3\n C( J, 4 ) = C( J, 4 ) - SUM*T4\n C( J, 5 ) = C( J, 5 ) - SUM*T5\n C( J, 6 ) = C( J, 6 ) - SUM*T6\n C( J, 7 ) = C( J, 7 ) - SUM*T7\n C( J, 8 ) = C( J, 8 ) - SUM*T8\n C( J, 9 ) = C( J, 9 ) - SUM*T9\n C( J, 10 ) = C( J, 10 ) - SUM*T10\n 400 CONTINUE\n GO TO 410\n END IF\n 410 CONTINUE\n RETURN\n*\n* End of ZLARFX\n*\n END\n"} +{"text": "/**\n * This function is like `baseIndexOf` except that it accepts a comparator.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOfWith(array, value, fromIndex, comparator) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(array[index], value)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseIndexOfWith;\n"} +{"text": "{% for member in object_list %}\r\n{{ member.first_name }} - {{ member.last_name }} - {{ member.email }}<br>\r\n{% endfor %}"} +{"text": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<archive type=\"com.apple.InterfaceBuilder3.CocoaTouch.XIB\" version=\"8.00\">\n\t<data>\n\t\t<int key=\"IBDocument.SystemTarget\">1072</int>\n\t\t<string key=\"IBDocument.SystemVersion\">12E55</string>\n\t\t<string key=\"IBDocument.InterfaceBuilderVersion\">4488.2</string>\n\t\t<string key=\"IBDocument.AppKitVersion\">1187.39</string>\n\t\t<string key=\"IBDocument.HIToolboxVersion\">626.00</string>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.PluginVersions\">\n\t\t\t<string key=\"NS.key.0\">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>\n\t\t\t<string key=\"NS.object.0\">3715.3</string>\n\t\t</object>\n\t\t<array key=\"IBDocument.IntegratedClassDependencies\">\n\t\t\t<string>IBMKMapView</string>\n\t\t\t<string>IBProxyObject</string>\n\t\t\t<string>IBUIImageView</string>\n\t\t\t<string>IBUILabel</string>\n\t\t\t<string>IBUITextView</string>\n\t\t\t<string>IBUIView</string>\n\t\t</array>\n\t\t<array key=\"IBDocument.PluginDependencies\">\n\t\t\t<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>\n\t\t</array>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.Metadata\">\n\t\t\t<string key=\"NS.key.0\">PluginDependencyRecalculationVersion</string>\n\t\t\t<integer value=\"1\" key=\"NS.object.0\"/>\n\t\t</object>\n\t\t<array class=\"NSMutableArray\" key=\"IBDocument.RootObjects\" id=\"221769935\">\n\t\t\t<object class=\"IBProxyObject\" id=\"349759446\">\n\t\t\t\t<string key=\"IBProxiedObjectIdentifier\">IBFilesOwner</string>\n\t\t\t\t<string key=\"targetRuntimeIdentifier\">IBCocoaTouchFramework</string>\n\t\t\t</object>\n\t\t\t<object class=\"IBProxyObject\" id=\"17623494\">\n\t\t\t\t<string key=\"IBProxiedObjectIdentifier\">IBFirstResponder</string>\n\t\t\t\t<string key=\"targetRuntimeIdentifier\">IBCocoaTouchFramework</string>\n\t\t\t</object>\n\t\t\t<object class=\"IBUIView\" id=\"671738694\">\n\t\t\t\t<reference key=\"NSNextResponder\"/>\n\t\t\t\t<int key=\"NSvFlags\">1298</int>\n\t\t\t\t<array class=\"NSMutableArray\" key=\"NSSubviews\">\n\t\t\t\t\t<object class=\"IBUIImageView\" id=\"411493787\">\n\t\t\t\t\t\t<reference key=\"NSNextResponder\" ref=\"671738694\"/>\n\t\t\t\t\t\t<int key=\"NSvFlags\">1298</int>\n\t\t\t\t\t\t<object class=\"NSPSMatrix\" key=\"NSFrameMatrix\"/>\n\t\t\t\t\t\t<string key=\"NSFrameSize\">{320, 167}</string>\n\t\t\t\t\t\t<reference key=\"NSSuperview\" ref=\"671738694\"/>\n\t\t\t\t\t\t<reference key=\"NSWindow\"/>\n\t\t\t\t\t\t<reference key=\"NSNextKeyView\" ref=\"244069909\"/>\n\t\t\t\t\t\t<bool key=\"IBUIUserInteractionEnabled\">NO</bool>\n\t\t\t\t\t\t<string key=\"targetRuntimeIdentifier\">IBCocoaTouchFramework</string>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBUIImageView\" id=\"244069909\">\n\t\t\t\t\t\t<reference key=\"NSNextResponder\" ref=\"671738694\"/>\n\t\t\t\t\t\t<int key=\"NSvFlags\">1312</int>\n\t\t\t\t\t\t<object class=\"NSPSMatrix\" key=\"NSFrameMatrix\"/>\n\t\t\t\t\t\t<string key=\"NSFrame\">{{12, 59}, {35, 35}}</string>\n\t\t\t\t\t\t<reference key=\"NSSuperview\" ref=\"671738694\"/>\n\t\t\t\t\t\t<reference key=\"NSWindow\"/>\n\t\t\t\t\t\t<reference key=\"NSNextKeyView\" ref=\"96009839\"/>\n\t\t\t\t\t\t<bool key=\"IBUIUserInteractionEnabled\">NO</bool>\n\t\t\t\t\t\t<string key=\"targetRuntimeIdentifier\">IBCocoaTouchFramework</string>\n\t\t\t\t\t\t<object class=\"NSCustomResource\" key=\"IBUIImage\">\n\t\t\t\t\t\t\t<string key=\"NSClassName\">NSImage</string>\n\t\t\t\t\t\t\t<string key=\"NSResourceName\">UMSocialSDKResourcesNew.bundle/Buttons/UMS_User-Avatar-Placeholder</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBUILabel\" id=\"767030701\">\n\t\t\t\t\t\t<reference key=\"NSNextResponder\" ref=\"671738694\"/>\n\t\t\t\t\t\t<int key=\"NSvFlags\">1298</int>\n\t\t\t\t\t\t<object class=\"NSPSMatrix\" key=\"NSFrameMatrix\"/>\n\t\t\t\t\t\t<string key=\"NSFrame\">{{86, 210}, {148, 35}}</string>\n\t\t\t\t\t\t<reference key=\"NSSuperview\" ref=\"671738694\"/>\n\t\t\t\t\t\t<reference key=\"NSWindow\"/>\n\t\t\t\t\t\t<bool key=\"IBUIOpaque\">NO</bool>\n\t\t\t\t\t\t<bool key=\"IBUIClipsSubviews\">YES</bool>\n\t\t\t\t\t\t<int key=\"IBUIContentMode\">7</int>\n\t\t\t\t\t\t<bool key=\"IBUIUserInteractionEnabled\">NO</bool>\n\t\t\t\t\t\t<string key=\"targetRuntimeIdentifier\">IBCocoaTouchFramework</string>\n\t\t\t\t\t\t<string key=\"IBUIText\">用户未分享地理位置</string>\n\t\t\t\t\t\t<object class=\"NSColor\" key=\"IBUITextColor\">\n\t\t\t\t\t\t\t<int key=\"NSColorSpace\">1</int>\n\t\t\t\t\t\t\t<bytes key=\"NSRGB\">MC40MTk1OTM3ODczIDAuNDIwNjk2MjY1MyAwLjQzNzUxOTkyOTgAA</bytes>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<object class=\"NSColor\" key=\"IBUIHighlightedColor\" id=\"502447451\">\n\t\t\t\t\t\t\t<int key=\"NSColorSpace\">3</int>\n\t\t\t\t\t\t\t<bytes key=\"NSWhite\">MQA</bytes>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<object class=\"NSColor\" key=\"IBUIShadowColor\">\n\t\t\t\t\t\t\t<int key=\"NSColorSpace\">1</int>\n\t\t\t\t\t\t\t<bytes key=\"NSRGB\">MCAwIDAgMC44AA</bytes>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<int key=\"IBUIBaselineAdjustment\">1</int>\n\t\t\t\t\t\t<float key=\"IBUIMinimumFontSize\">10</float>\n\t\t\t\t\t\t<int key=\"IBUITextAlignment\">1</int>\n\t\t\t\t\t\t<object class=\"IBUIFontDescription\" key=\"IBUIFontDescription\">\n\t\t\t\t\t\t\t<string key=\"name\">Helvetica</string>\n\t\t\t\t\t\t\t<string key=\"family\">Helvetica</string>\n\t\t\t\t\t\t\t<int key=\"traits\">0</int>\n\t\t\t\t\t\t\t<double key=\"pointSize\">14</double>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<object class=\"NSFont\" key=\"IBUIFont\">\n\t\t\t\t\t\t\t<string key=\"NSName\">Helvetica</string>\n\t\t\t\t\t\t\t<double key=\"NSSize\">14</double>\n\t\t\t\t\t\t\t<int key=\"NSfFlags\">16</int>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<bool key=\"IBUIAdjustsFontSizeToFit\">NO</bool>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBMKMapView\" id=\"152427245\">\n\t\t\t\t\t\t<reference key=\"NSNextResponder\" ref=\"671738694\"/>\n\t\t\t\t\t\t<int key=\"NSvFlags\">1288</int>\n\t\t\t\t\t\t<object class=\"NSPSMatrix\" key=\"NSFrameMatrix\"/>\n\t\t\t\t\t\t<string key=\"NSFrame\">{{0, 164}, {320, 252}}</string>\n\t\t\t\t\t\t<reference key=\"NSSuperview\" ref=\"671738694\"/>\n\t\t\t\t\t\t<reference key=\"NSWindow\"/>\n\t\t\t\t\t\t<reference key=\"NSNextKeyView\" ref=\"767030701\"/>\n\t\t\t\t\t\t<bool key=\"IBUIClipsSubviews\">YES</bool>\n\t\t\t\t\t\t<bool key=\"IBUIMultipleTouchEnabled\">YES</bool>\n\t\t\t\t\t\t<string key=\"targetRuntimeIdentifier\">IBCocoaTouchFramework</string>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBUILabel\" id=\"489614640\">\n\t\t\t\t\t\t<reference key=\"NSNextResponder\" ref=\"671738694\"/>\n\t\t\t\t\t\t<int key=\"NSvFlags\">1313</int>\n\t\t\t\t\t\t<object class=\"NSPSMatrix\" key=\"NSFrameMatrix\"/>\n\t\t\t\t\t\t<string key=\"NSFrame\">{{61, 136}, {76, 20}}</string>\n\t\t\t\t\t\t<reference key=\"NSSuperview\" ref=\"671738694\"/>\n\t\t\t\t\t\t<reference key=\"NSWindow\"/>\n\t\t\t\t\t\t<reference key=\"NSNextKeyView\" ref=\"152427245\"/>\n\t\t\t\t\t\t<bool key=\"IBUIOpaque\">NO</bool>\n\t\t\t\t\t\t<bool key=\"IBUIClipsSubviews\">YES</bool>\n\t\t\t\t\t\t<int key=\"IBUIContentMode\">7</int>\n\t\t\t\t\t\t<bool key=\"IBUIUserInteractionEnabled\">NO</bool>\n\t\t\t\t\t\t<string key=\"targetRuntimeIdentifier\">IBCocoaTouchFramework</string>\n\t\t\t\t\t\t<string key=\"IBUIText\">100 months</string>\n\t\t\t\t\t\t<object class=\"NSColor\" key=\"IBUITextColor\">\n\t\t\t\t\t\t\t<int key=\"NSColorSpace\">2</int>\n\t\t\t\t\t\t\t<bytes key=\"NSRGB\">MC43MDk4MDM5Mzg5IDAuNzEzNzI1NTA3MyAwLjcyOTQxMTc4MDgAA</bytes>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<reference key=\"IBUIHighlightedColor\" ref=\"502447451\"/>\n\t\t\t\t\t\t<object class=\"NSColor\" key=\"IBUIShadowColor\">\n\t\t\t\t\t\t\t<int key=\"NSColorSpace\">1</int>\n\t\t\t\t\t\t\t<bytes key=\"NSRGB\">MCAwIDAgMC4yAA</bytes>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<int key=\"IBUIBaselineAdjustment\">1</int>\n\t\t\t\t\t\t<float key=\"IBUIMinimumFontSize\">10</float>\n\t\t\t\t\t\t<object class=\"IBUIFontDescription\" key=\"IBUIFontDescription\">\n\t\t\t\t\t\t\t<string key=\"name\">Helvetica</string>\n\t\t\t\t\t\t\t<string key=\"family\">Helvetica</string>\n\t\t\t\t\t\t\t<int key=\"traits\">0</int>\n\t\t\t\t\t\t\t<double key=\"pointSize\">12</double>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<object class=\"NSFont\" key=\"IBUIFont\">\n\t\t\t\t\t\t\t<string key=\"NSName\">Helvetica</string>\n\t\t\t\t\t\t\t<double key=\"NSSize\">12</double>\n\t\t\t\t\t\t\t<int key=\"NSfFlags\">16</int>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<bool key=\"IBUIAdjustsFontSizeToFit\">NO</bool>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBUITextView\" id=\"96009839\">\n\t\t\t\t\t\t<reference key=\"NSNextResponder\" ref=\"671738694\"/>\n\t\t\t\t\t\t<int key=\"NSvFlags\">1284</int>\n\t\t\t\t\t\t<object class=\"NSPSMatrix\" key=\"NSFrameMatrix\"/>\n\t\t\t\t\t\t<string key=\"NSFrame\">{{61, 8}, {240, 128}}</string>\n\t\t\t\t\t\t<reference key=\"NSSuperview\" ref=\"671738694\"/>\n\t\t\t\t\t\t<reference key=\"NSWindow\"/>\n\t\t\t\t\t\t<reference key=\"NSNextKeyView\" ref=\"489614640\"/>\n\t\t\t\t\t\t<bool key=\"IBUIClipsSubviews\">YES</bool>\n\t\t\t\t\t\t<bool key=\"IBUIMultipleTouchEnabled\">YES</bool>\n\t\t\t\t\t\t<object class=\"IBUIAccessibilityConfiguration\" key=\"IBUIAccessibilityConfiguration\">\n\t\t\t\t\t\t\t<integer value=\"256\" key=\"IBUIAccessibilityTraits\"/>\n\t\t\t\t\t\t\t<boolean value=\"NO\" key=\"IBUIIsAccessibilityElement\"/>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<string key=\"targetRuntimeIdentifier\">IBCocoaTouchFramework</string>\n\t\t\t\t\t\t<bool key=\"IBUIEditable\">NO</bool>\n\t\t\t\t\t\t<string key=\"IBUIText\">Lorem ipsum dolor sit er elit </string>\n\t\t\t\t\t\t<reference key=\"IBUITextColor\" ref=\"502447451\"/>\n\t\t\t\t\t\t<object class=\"IBUITextInputTraits\" key=\"IBUITextInputTraits\">\n\t\t\t\t\t\t\t<int key=\"IBUIAutocapitalizationType\">2</int>\n\t\t\t\t\t\t\t<string key=\"targetRuntimeIdentifier\">IBCocoaTouchFramework-SevenAndLater</string>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<object class=\"IBUIFontDescription\" key=\"IBUIFontDescription\">\n\t\t\t\t\t\t\t<int key=\"type\">1</int>\n\t\t\t\t\t\t\t<double key=\"pointSize\">13</double>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t\t<object class=\"NSFont\" key=\"IBUIFont\">\n\t\t\t\t\t\t\t<string key=\"NSName\">HelveticaNeue</string>\n\t\t\t\t\t\t\t<double key=\"NSSize\">13</double>\n\t\t\t\t\t\t\t<int key=\"NSfFlags\">16</int>\n\t\t\t\t\t\t</object>\n\t\t\t\t\t</object>\n\t\t\t\t</array>\n\t\t\t\t<object class=\"NSPSMatrix\" key=\"NSFrameMatrix\"/>\n\t\t\t\t<string key=\"NSFrame\">{{0, 64}, {320, 416}}</string>\n\t\t\t\t<reference key=\"NSSuperview\"/>\n\t\t\t\t<reference key=\"NSWindow\"/>\n\t\t\t\t<reference key=\"NSNextKeyView\" ref=\"411493787\"/>\n\t\t\t\t<object class=\"NSColor\" key=\"IBUIBackgroundColor\">\n\t\t\t\t\t<int key=\"NSColorSpace\">1</int>\n\t\t\t\t\t<bytes key=\"NSRGB\">MC4yMTU2ODYyNzQ1IDAuMjM5MjE1Njg2MyAwLjI3MDU4ODIzNTMAA</bytes>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBUISimulatedStatusBarMetrics\" key=\"IBUISimulatedStatusBarMetrics\"/>\n\t\t\t\t<object class=\"IBUISimulatedNavigationBarMetrics\" key=\"IBUISimulatedTopBarMetrics\">\n\t\t\t\t\t<bool key=\"IBUITranslucent\">NO</bool>\n\t\t\t\t\t<bool key=\"IBUIPrompted\">NO</bool>\n\t\t\t\t</object>\n\t\t\t\t<string key=\"targetRuntimeIdentifier\">IBCocoaTouchFramework</string>\n\t\t\t</object>\n\t\t</array>\n\t\t<object class=\"IBObjectContainer\" key=\"IBDocument.Objects\">\n\t\t\t<bool key=\"usesAutoincrementingIDs\">NO</bool>\n\t\t\t<array class=\"NSMutableArray\" key=\"connectionRecords\">\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBCocoaTouchOutletConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">commentBackgroundImage</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"349759446\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"411493787\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<string key=\"id\">53</string>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBCocoaTouchOutletConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">commentTextView</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"349759446\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"96009839\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<string key=\"id\">61</string>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBCocoaTouchOutletConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">mapView</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"349759446\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"152427245\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<string key=\"id\">49</string>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBCocoaTouchOutletConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">profileImage</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"349759446\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"244069909\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<string key=\"id\">6</string>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBCocoaTouchOutletConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">timeLabel</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"349759446\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"489614640\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<string key=\"id\">47</string>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBCocoaTouchOutletConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">view</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"349759446\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"671738694\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<string key=\"id\">45</string>\n\t\t\t\t</object>\n\t\t\t\t<object class=\"IBConnectionRecord\">\n\t\t\t\t\t<object class=\"IBCocoaTouchOutletConnection\" key=\"connection\">\n\t\t\t\t\t\t<string key=\"label\">delegate</string>\n\t\t\t\t\t\t<reference key=\"source\" ref=\"152427245\"/>\n\t\t\t\t\t\t<reference key=\"destination\" ref=\"349759446\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<string key=\"id\">48</string>\n\t\t\t\t</object>\n\t\t\t</array>\n\t\t\t<object class=\"IBMutableOrderedSet\" key=\"objectRecords\">\n\t\t\t\t<array key=\"orderedObjects\">\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<string key=\"id\">0</string>\n\t\t\t\t\t\t<array key=\"object\" id=\"0\"/>\n\t\t\t\t\t\t<reference key=\"children\" ref=\"221769935\"/>\n\t\t\t\t\t\t<nil key=\"parent\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<string key=\"id\">-1</string>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"349759446\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t\t<string key=\"objectName\">File's Owner</string>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<string key=\"id\">-2</string>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"17623494\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<string key=\"id\">1</string>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"671738694\"/>\n\t\t\t\t\t\t<array class=\"NSMutableArray\" key=\"children\">\n\t\t\t\t\t\t\t<reference ref=\"411493787\"/>\n\t\t\t\t\t\t\t<reference ref=\"244069909\"/>\n\t\t\t\t\t\t\t<reference ref=\"767030701\"/>\n\t\t\t\t\t\t\t<reference ref=\"152427245\"/>\n\t\t\t\t\t\t\t<reference ref=\"489614640\"/>\n\t\t\t\t\t\t\t<reference ref=\"96009839\"/>\n\t\t\t\t\t\t</array>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"0\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<string key=\"id\">8</string>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"411493787\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"671738694\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<string key=\"id\">4</string>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"244069909\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"671738694\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<string key=\"id\">51</string>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"767030701\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"671738694\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<string key=\"id\">9</string>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"152427245\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"671738694\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<string key=\"id\">46</string>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"489614640\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"671738694\"/>\n\t\t\t\t\t</object>\n\t\t\t\t\t<object class=\"IBObjectRecord\">\n\t\t\t\t\t\t<string key=\"id\">59</string>\n\t\t\t\t\t\t<reference key=\"object\" ref=\"96009839\"/>\n\t\t\t\t\t\t<reference key=\"parent\" ref=\"671738694\"/>\n\t\t\t\t\t</object>\n\t\t\t\t</array>\n\t\t\t</object>\n\t\t\t<dictionary class=\"NSMutableDictionary\" key=\"flattenedProperties\">\n\t\t\t\t<string key=\"-1.CustomClassName\">UMSCommentDetailController</string>\n\t\t\t\t<string key=\"-1.IBPluginDependency\">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>\n\t\t\t\t<boolean value=\"NO\" key=\"-1.showNotes\"/>\n\t\t\t\t<string key=\"-2.CustomClassName\">UIResponder</string>\n\t\t\t\t<string key=\"-2.IBPluginDependency\">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>\n\t\t\t\t<boolean value=\"NO\" key=\"-2.showNotes\"/>\n\t\t\t\t<string key=\"1.IBPluginDependency\">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>\n\t\t\t\t<reference key=\"1.IBUserGuides\" ref=\"0\"/>\n\t\t\t\t<boolean value=\"NO\" key=\"1.showNotes\"/>\n\t\t\t\t<string key=\"4.CustomClassName\">UMImageView</string>\n\t\t\t\t<string key=\"4.IBPluginDependency\">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>\n\t\t\t\t<reference key=\"4.IBUserGuides\" ref=\"0\"/>\n\t\t\t\t<boolean value=\"NO\" key=\"4.showNotes\"/>\n\t\t\t\t<string key=\"46.IBPluginDependency\">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>\n\t\t\t\t<reference key=\"46.IBUserGuides\" ref=\"0\"/>\n\t\t\t\t<boolean value=\"NO\" key=\"46.showNotes\"/>\n\t\t\t\t<string key=\"51.IBPluginDependency\">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>\n\t\t\t\t<reference key=\"51.IBUserGuides\" ref=\"0\"/>\n\t\t\t\t<boolean value=\"NO\" key=\"51.showNotes\"/>\n\t\t\t\t<string key=\"59.IBPluginDependency\">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>\n\t\t\t\t<reference key=\"59.IBUserGuides\" ref=\"0\"/>\n\t\t\t\t<boolean value=\"NO\" key=\"59.showNotes\"/>\n\t\t\t\t<string key=\"8.IBPluginDependency\">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>\n\t\t\t\t<reference key=\"8.IBUserGuides\" ref=\"0\"/>\n\t\t\t\t<boolean value=\"NO\" key=\"8.showNotes\"/>\n\t\t\t\t<string key=\"9.IBPluginDependency\">com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>\n\t\t\t\t<reference key=\"9.IBUserGuides\" ref=\"0\"/>\n\t\t\t\t<boolean value=\"NO\" key=\"9.showNotes\"/>\n\t\t\t</dictionary>\n\t\t\t<dictionary class=\"NSMutableDictionary\" key=\"unlocalizedProperties\"/>\n\t\t\t<nil key=\"activeLocalization\"/>\n\t\t\t<dictionary class=\"NSMutableDictionary\" key=\"localizations\"/>\n\t\t\t<nil key=\"sourceID\"/>\n\t\t</object>\n\t\t<object class=\"IBClassDescriber\" key=\"IBDocument.Classes\"/>\n\t\t<int key=\"IBDocument.localizationMode\">0</int>\n\t\t<string key=\"IBDocument.TargetRuntimeIdentifier\">IBCocoaTouchFramework</string>\n\t\t<bool key=\"IBDocument.previouslyAttemptedUpgradeToXcode5\">YES</bool>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.PluginDeclaredDependencies\">\n\t\t\t<string key=\"NS.key.0\">com.apple.InterfaceBuilder.CocoaTouchPlugin.iPhoneOS</string>\n\t\t\t<real value=\"1072\" key=\"NS.object.0\"/>\n\t\t</object>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.PluginDeclaredDevelopmentDependencies\">\n\t\t\t<string key=\"NS.key.0\">com.apple.InterfaceBuilder.CocoaTouchPlugin.InterfaceBuilder3</string>\n\t\t\t<integer value=\"4600\" key=\"NS.object.0\"/>\n\t\t</object>\n\t\t<bool key=\"IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion\">YES</bool>\n\t\t<int key=\"IBDocument.defaultPropertyAccessControl\">3</int>\n\t\t<object class=\"NSMutableDictionary\" key=\"IBDocument.LastKnownImageSizes\">\n\t\t\t<string key=\"NS.key.0\">UMSocialSDKResourcesNew.bundle/Buttons/UMS_User-Avatar-Placeholder</string>\n\t\t\t<string key=\"NS.object.0\">{16, 16}</string>\n\t\t</object>\n\t\t<string key=\"IBCocoaTouchPluginVersion\">3715.3</string>\n\t</data>\n</archive>\n"} +{"text": "#!/usr/bin/env bash\n\nset -e\n\nif ! [[ \"$0\" =~ scripts/updatebom.sh ]]; then\n\techo \"must be run from repository root\"\n\texit 255\nfi\n\necho \"installing 'bill-of-materials.json'\"\ngo get -v -u github.com/coreos/license-bill-of-materials\n\necho \"setting up GOPATH\"\nrm -rf ./gopath\nmkdir ./gopath\nmv ./cmd/vendor ./gopath/src\n\necho \"generating bill-of-materials.json\"\nGOPATH=$(pwd)/gopath license-bill-of-materials \\\n --override-file ./bill-of-materials.override.json \\\n github.com/coreos/etcd github.com/coreos/etcd/etcdctl > bill-of-materials.json\n\necho \"reverting GOPATH,vendor\"\nmv ./gopath/src ./cmd/vendor\nrm -rf ./gopath\n\necho \"generated bill-of-materials.json\"\n\n"} +{"text": "/* win32.h\n *\n */\n\n#ifndef WIN32_H\n#define WIN32_H\n\n#undef _WIN32_WINNT\n#define _WIN32_WINNT 0x0501 /* Needed to resolve getaddrinfo et al. */\n\n#include <winsock2.h>\n#include <ws2tcpip.h>\n\n#include <stdio.h>\n#include <io.h>\n#include <time.h>\n#include <fcntl.h>\n#include <errno.h>\n#include <stdint.h>\n#include <process.h>\n\n#define EWOULDBLOCK EAGAIN\n#define EAFNOSUPPORT 47\n#define EADDRINUSE WSAEADDRINUSE\n#define ENOTCONN WSAENOTCONN\n#define ECONNRESET WSAECONNRESET\n#define EAI_SYSTEM -11\n\n#ifndef SIGHUP\n#define SIGHUP -1\n#endif\n\ntypedef char *caddr_t;\n\n#define O_BLOCK 0\n#define O_NONBLOCK 1\n#define F_GETFL 3\n#define F_SETFL 4\n\n#define RUSAGE_SELF 0\n\n#define IOV_MAX 1024\n\nstruct msghdr {\n void *msg_name; /* Socket name */\n int msg_namelen; /* Length of name */\n struct iovec *msg_iov; /* Data blocks */\n int msg_iovlen; /* Number of blocks */\n void *msg_accrights; /* Per protocol magic (eg BSD file descriptor passing) */\n int msg_accrightslen; /* Length of rights list */\n};\n\n#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS)\n #define DELTA_EPOCH_IN_MICROSECS 11644473600000000Ui64\n#else\n #define DELTA_EPOCH_IN_MICROSECS 11644473600000000ULL\n#endif\n\n/* Structure which says how much of each resource has been used. */\nstruct rusage {\n /* Total amount of user time used. */\n struct timeval ru_utime;\n /* Total amount of system time used. */\n struct timeval ru_stime;\n /* Maximum resident set size (in kilobytes). */\n long int ru_maxrss;\n /* Amount of sharing of text segment memory\n with other processes (kilobyte-seconds). */\n long int ru_ixrss;\n /* Amount of data segment memory used (kilobyte-seconds). */\n long int ru_idrss;\n /* Amount of stack memory used (kilobyte-seconds). */\n long int ru_isrss;\n /* Number of soft page faults (i.e. those serviced by reclaiming\n a page from the list of pages awaiting reallocation. */\n long int ru_minflt;\n /* Number of hard page faults (i.e. those that required I/O). */\n long int ru_majflt;\n /* Number of times a process was swapped out of physical memory. */\n long int ru_nswap;\n /* Number of input operations via the file system. Note: This\n and `ru_oublock' do not include operations with the cache. */\n long int ru_inblock;\n /* Number of output operations via the file system. */\n long int ru_oublock;\n /* Number of IPC messages sent. */\n long int ru_msgsnd;\n /* Number of IPC messages received. */\n long int ru_msgrcv;\n /* Number of signals delivered. */\n long int ru_nsignals;\n /* Number of voluntary context switches, i.e. because the process\n gave up the process before it had to (usually to wait for some\n resource to be available). */\n long int ru_nvcsw;\n /* Number of involuntary context switches, i.e. a higher priority process\n became runnable or the current process used up its time slice. */\n long int ru_nivcsw;\n};\n\nint inet_aton(register const char *cp, struct in_addr *addr);\n\n#define close(s) closesocket(s)\n\n#if !defined(strtok_r)\n#define strtok_r( _s, _sep, _lasts ) \\\n ( *(_lasts) = strtok( (_s), (_sep) ) )\n#endif /* strtok_r */\n\nstatic inline void mapErr(int error) {\n switch(error) {\n default:\n errno = ECONNRESET;\n break;\n case WSAEPFNOSUPPORT:\n errno = EAFNOSUPPORT;\n break;\n case WSA_IO_PENDING:\n case WSATRY_AGAIN:\n errno = EAGAIN;\n break;\n case WSAEWOULDBLOCK:\n errno = EWOULDBLOCK;\n break;\n case WSAEMSGSIZE:\n errno = E2BIG;\n break;\n case WSAECONNRESET:\n errno = 0;\n break;\n }\n}\n\n#define write mem_write\n\nstatic inline size_t mem_write(int s, void *buf, size_t len)\n{\n DWORD dwBufferCount = 0;\n int error;\n\n WSABUF wsabuf = { len, (char *)buf} ;\n if(WSASend(s, &wsabuf, 1, &dwBufferCount, 0, NULL, NULL) == 0) {\n return dwBufferCount;\n }\n error = WSAGetLastError();\n if(error == WSAECONNRESET) return 0;\n mapErr(error);\n return -1;\n}\n\n#define read(a,b,c) mem_recv(a,b,c,0)\n#define recv(a,b,c,d) mem_recv(a,b,c,d)\n\nstatic inline size_t mem_recv(int s, void *buf, size_t len, int unused)\n{\n DWORD flags = 0;\n DWORD dwBufferCount;\n WSABUF wsabuf = { len, (char *)buf };\n int error;\n\n if(WSARecv((SOCKET)s, &wsabuf, 1, &dwBufferCount, &flags,\n NULL, NULL) == 0) {\n return dwBufferCount;\n }\n error = WSAGetLastError();\n if (error == WSAECONNRESET) {\n return 0;\n }\n mapErr(error);\n return -1;\n}\n\nstatic inline int sendmsg(int s, const struct msghdr *msg, int flags)\n{\n DWORD dwBufferCount;\n int error;\n\n if(WSASendTo((SOCKET) s,\n (LPWSABUF)msg->msg_iov,\n (DWORD)msg->msg_iovlen,\n &dwBufferCount,\n flags,\n msg->msg_name,\n msg->msg_namelen,\n NULL,\n NULL\n ) == 0) {\n return dwBufferCount;\n }\n error = WSAGetLastError();\n if (error == WSAECONNRESET) return 0;\n mapErr(error);\n return -1;\n}\n\nint getrusage(int who, struct rusage *usage);\nint kill(int pid, int sig);\nint sleep(int seconds);\n\nstruct sigaction {\n void (*sa_handler)(int);\n int sa_mask;\n int sa_flags;\n};\n\n#define sigemptyset(a) 0\nextern int sigaction(int sig, struct sigaction *act, struct sigaction *oact);\n#define daemonize(a,b) spawn_memcached(argc, argv)\nextern int spawn_memcached(int argc, char **argv);\n#endif\n"} +{"text": "/*\nCopyright The Kubernetes Authors.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n// Code generated by informer-gen. DO NOT EDIT.\n\npackage v1\n\nimport (\n\t\"context\"\n\ttime \"time\"\n\n\tstoragev1 \"k8s.io/api/storage/v1\"\n\tmetav1 \"k8s.io/apimachinery/pkg/apis/meta/v1\"\n\truntime \"k8s.io/apimachinery/pkg/runtime\"\n\twatch \"k8s.io/apimachinery/pkg/watch\"\n\tinternalinterfaces \"k8s.io/client-go/informers/internalinterfaces\"\n\tkubernetes \"k8s.io/client-go/kubernetes\"\n\tv1 \"k8s.io/client-go/listers/storage/v1\"\n\tcache \"k8s.io/client-go/tools/cache\"\n)\n\n// StorageClassInformer provides access to a shared informer and lister for\n// StorageClasses.\ntype StorageClassInformer interface {\n\tInformer() cache.SharedIndexInformer\n\tLister() v1.StorageClassLister\n}\n\ntype storageClassInformer struct {\n\tfactory internalinterfaces.SharedInformerFactory\n\ttweakListOptions internalinterfaces.TweakListOptionsFunc\n}\n\n// NewStorageClassInformer constructs a new informer for StorageClass type.\n// Always prefer using an informer factory to get a shared informer instead of getting an independent\n// one. This reduces memory footprint and number of connections to the server.\nfunc NewStorageClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer {\n\treturn NewFilteredStorageClassInformer(client, resyncPeriod, indexers, nil)\n}\n\n// NewFilteredStorageClassInformer constructs a new informer for StorageClass type.\n// Always prefer using an informer factory to get a shared informer instead of getting an independent\n// one. This reduces memory footprint and number of connections to the server.\nfunc NewFilteredStorageClassInformer(client kubernetes.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer {\n\treturn cache.NewSharedIndexInformer(\n\t\t&cache.ListWatch{\n\t\t\tListFunc: func(options metav1.ListOptions) (runtime.Object, error) {\n\t\t\t\tif tweakListOptions != nil {\n\t\t\t\t\ttweakListOptions(&options)\n\t\t\t\t}\n\t\t\t\treturn client.StorageV1().StorageClasses().List(context.TODO(), options)\n\t\t\t},\n\t\t\tWatchFunc: func(options metav1.ListOptions) (watch.Interface, error) {\n\t\t\t\tif tweakListOptions != nil {\n\t\t\t\t\ttweakListOptions(&options)\n\t\t\t\t}\n\t\t\t\treturn client.StorageV1().StorageClasses().Watch(context.TODO(), options)\n\t\t\t},\n\t\t},\n\t\t&storagev1.StorageClass{},\n\t\tresyncPeriod,\n\t\tindexers,\n\t)\n}\n\nfunc (f *storageClassInformer) defaultInformer(client kubernetes.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer {\n\treturn NewFilteredStorageClassInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions)\n}\n\nfunc (f *storageClassInformer) Informer() cache.SharedIndexInformer {\n\treturn f.factory.InformerFor(&storagev1.StorageClass{}, f.defaultInformer)\n}\n\nfunc (f *storageClassInformer) Lister() v1.StorageClassLister {\n\treturn v1.NewStorageClassLister(f.Informer().GetIndexer())\n}\n"} +{"text": "/*\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under the License\n * is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express\n * or implied. See the License for the specific language governing permissions and limitations under\n * the License.\n */\n/*\n * This code was generated by https://github.com/googleapis/google-api-java-client-services/\n * Modify at your own risk.\n */\n\npackage com.google.api.services.calendar.model;\n\n/**\n * Model definition for FreeBusyGroup.\n *\n * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is\n * transmitted over HTTP when working with the Calendar API. For a detailed explanation see:\n * <a href=\"https://developers.google.com/api-client-library/java/google-http-java-client/json\">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>\n * </p>\n *\n * @author Google, Inc.\n */\n@SuppressWarnings(\"javadoc\")\npublic final class FreeBusyGroup extends com.google.api.client.json.GenericJson {\n\n /**\n * List of calendars' identifiers within a group.\n * The value may be {@code null}.\n */\n @com.google.api.client.util.Key\n private java.util.List<java.lang.String> calendars;\n\n /**\n * Optional error(s) (if computation for the group failed).\n * The value may be {@code null}.\n */\n @com.google.api.client.util.Key\n private java.util.List<Error> errors;\n\n static {\n // hack to force ProGuard to consider Error used, since otherwise it would be stripped out\n // see https://github.com/google/google-api-java-client/issues/543\n com.google.api.client.util.Data.nullOf(Error.class);\n }\n\n /**\n * List of calendars' identifiers within a group.\n * @return value or {@code null} for none\n */\n public java.util.List<java.lang.String> getCalendars() {\n return calendars;\n }\n\n /**\n * List of calendars' identifiers within a group.\n * @param calendars calendars or {@code null} for none\n */\n public FreeBusyGroup setCalendars(java.util.List<java.lang.String> calendars) {\n this.calendars = calendars;\n return this;\n }\n\n /**\n * Optional error(s) (if computation for the group failed).\n * @return value or {@code null} for none\n */\n public java.util.List<Error> getErrors() {\n return errors;\n }\n\n /**\n * Optional error(s) (if computation for the group failed).\n * @param errors errors or {@code null} for none\n */\n public FreeBusyGroup setErrors(java.util.List<Error> errors) {\n this.errors = errors;\n return this;\n }\n\n @Override\n public FreeBusyGroup set(String fieldName, Object value) {\n return (FreeBusyGroup) super.set(fieldName, value);\n }\n\n @Override\n public FreeBusyGroup clone() {\n return (FreeBusyGroup) super.clone();\n }\n\n}\n"} +{"text": "//------------------------------------------------------------------------------\n// <auto-generated>\n// This code was generated by a tool.\n// Runtime Version:4.0.30319.34209\n//\n// Changes to this file may cause incorrect behavior and will be lost if\n// the code is regenerated.\n// </auto-generated>\n//------------------------------------------------------------------------------\n\nnamespace ACAT.Extensions.Default.WordPredictors.Presage.PresageService {\n \n \n [System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.ServiceModel\", \"4.0.0.0\")]\n [System.ServiceModel.ServiceContractAttribute(Namespace=\"urn:Presage/2015/03/10\", ConfigurationName=\"PresageService.Presage\")]\n public interface Presage {\n \n [System.ServiceModel.OperationContractAttribute(Action=\"urn:Presage/2015/03/10/Presage/predict\", ReplyAction=\"urn:Presage/2015/03/10/Presage/predictResponse\")]\n string[] predict(string previous_words, string current_word);\n \n [System.ServiceModel.OperationContractAttribute(Action=\"urn:Presage/2015/03/10/Presage/predict\", ReplyAction=\"urn:Presage/2015/03/10/Presage/predictResponse\")]\n System.Threading.Tasks.Task<string[]> predictAsync(string previous_words, string current_word);\n \n [System.ServiceModel.OperationContractAttribute(Action=\"urn:Presage/2015/03/10/Presage/context\", ReplyAction=\"urn:Presage/2015/03/10/Presage/contextResponse\")]\n string context();\n \n [System.ServiceModel.OperationContractAttribute(Action=\"urn:Presage/2015/03/10/Presage/context\", ReplyAction=\"urn:Presage/2015/03/10/Presage/contextResponse\")]\n System.Threading.Tasks.Task<string> contextAsync();\n \n [System.ServiceModel.OperationContractAttribute(Action=\"urn:Presage/2015/03/10/Presage/context_change\", ReplyAction=\"urn:Presage/2015/03/10/Presage/context_changeResponse\")]\n bool context_change();\n \n [System.ServiceModel.OperationContractAttribute(Action=\"urn:Presage/2015/03/10/Presage/context_change\", ReplyAction=\"urn:Presage/2015/03/10/Presage/context_changeResponse\")]\n System.Threading.Tasks.Task<bool> context_changeAsync();\n \n [System.ServiceModel.OperationContractAttribute(Action=\"urn:Presage/2015/03/10/Presage/prefix\", ReplyAction=\"urn:Presage/2015/03/10/Presage/prefixResponse\")]\n string prefix();\n \n [System.ServiceModel.OperationContractAttribute(Action=\"urn:Presage/2015/03/10/Presage/prefix\", ReplyAction=\"urn:Presage/2015/03/10/Presage/prefixResponse\")]\n System.Threading.Tasks.Task<string> prefixAsync();\n \n [System.ServiceModel.OperationContractAttribute(Action=\"urn:Presage/2015/03/10/Presage/learn\", ReplyAction=\"urn:Presage/2015/03/10/Presage/learnResponse\")]\n void learn(string text);\n \n [System.ServiceModel.OperationContractAttribute(Action=\"urn:Presage/2015/03/10/Presage/learn\", ReplyAction=\"urn:Presage/2015/03/10/Presage/learnResponse\")]\n System.Threading.Tasks.Task learnAsync(string text);\n \n [System.ServiceModel.OperationContractAttribute(Action=\"urn:Presage/2015/03/10/Presage/completion\", ReplyAction=\"urn:Presage/2015/03/10/Presage/completionResponse\")]\n string completion(string token);\n \n [System.ServiceModel.OperationContractAttribute(Action=\"urn:Presage/2015/03/10/Presage/completion\", ReplyAction=\"urn:Presage/2015/03/10/Presage/completionResponse\")]\n System.Threading.Tasks.Task<string> completionAsync(string token);\n \n [System.ServiceModel.OperationContractAttribute(Action=\"urn:Presage/2015/03/10/Presage/get_config\", ReplyAction=\"urn:Presage/2015/03/10/Presage/get_configResponse\")]\n string get_config(string variable);\n \n [System.ServiceModel.OperationContractAttribute(Action=\"urn:Presage/2015/03/10/Presage/get_config\", ReplyAction=\"urn:Presage/2015/03/10/Presage/get_configResponse\")]\n System.Threading.Tasks.Task<string> get_configAsync(string variable);\n \n [System.ServiceModel.OperationContractAttribute(Action=\"urn:Presage/2015/03/10/Presage/set_config\", ReplyAction=\"urn:Presage/2015/03/10/Presage/set_configResponse\")]\n void set_config(string variable, string value);\n \n [System.ServiceModel.OperationContractAttribute(Action=\"urn:Presage/2015/03/10/Presage/set_config\", ReplyAction=\"urn:Presage/2015/03/10/Presage/set_configResponse\")]\n System.Threading.Tasks.Task set_configAsync(string variable, string value);\n \n [System.ServiceModel.OperationContractAttribute(Action=\"urn:Presage/2015/03/10/Presage/save_config\", ReplyAction=\"urn:Presage/2015/03/10/Presage/save_configResponse\")]\n void save_config();\n \n [System.ServiceModel.OperationContractAttribute(Action=\"urn:Presage/2015/03/10/Presage/save_config\", ReplyAction=\"urn:Presage/2015/03/10/Presage/save_configResponse\")]\n System.Threading.Tasks.Task save_configAsync();\n }\n \n [System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.ServiceModel\", \"4.0.0.0\")]\n public interface PresageChannel : ACAT.Extensions.Default.WordPredictors.Presage.PresageService.Presage, System.ServiceModel.IClientChannel {\n }\n \n [System.Diagnostics.DebuggerStepThroughAttribute()]\n [System.CodeDom.Compiler.GeneratedCodeAttribute(\"System.ServiceModel\", \"4.0.0.0\")]\n public partial class PresageClient : System.ServiceModel.ClientBase<ACAT.Extensions.Default.WordPredictors.Presage.PresageService.Presage>, ACAT.Extensions.Default.WordPredictors.Presage.PresageService.Presage {\n \n public PresageClient() {\n }\n \n public PresageClient(string endpointConfigurationName) : \n base(endpointConfigurationName) {\n }\n \n public PresageClient(string endpointConfigurationName, string remoteAddress) : \n base(endpointConfigurationName, remoteAddress) {\n }\n \n public PresageClient(string endpointConfigurationName, System.ServiceModel.EndpointAddress remoteAddress) : \n base(endpointConfigurationName, remoteAddress) {\n }\n \n public PresageClient(System.ServiceModel.Channels.Binding binding, System.ServiceModel.EndpointAddress remoteAddress) : \n base(binding, remoteAddress) {\n }\n \n public string[] predict(string previous_words, string current_word) {\n return base.Channel.predict(previous_words, current_word);\n }\n \n public System.Threading.Tasks.Task<string[]> predictAsync(string previous_words, string current_word) {\n return base.Channel.predictAsync(previous_words, current_word);\n }\n \n public string context() {\n return base.Channel.context();\n }\n \n public System.Threading.Tasks.Task<string> contextAsync() {\n return base.Channel.contextAsync();\n }\n \n public bool context_change() {\n return base.Channel.context_change();\n }\n \n public System.Threading.Tasks.Task<bool> context_changeAsync() {\n return base.Channel.context_changeAsync();\n }\n \n public string prefix() {\n return base.Channel.prefix();\n }\n \n public System.Threading.Tasks.Task<string> prefixAsync() {\n return base.Channel.prefixAsync();\n }\n \n public void learn(string text) {\n base.Channel.learn(text);\n }\n \n public System.Threading.Tasks.Task learnAsync(string text) {\n return base.Channel.learnAsync(text);\n }\n \n public string completion(string token) {\n return base.Channel.completion(token);\n }\n \n public System.Threading.Tasks.Task<string> completionAsync(string token) {\n return base.Channel.completionAsync(token);\n }\n \n public string get_config(string variable) {\n return base.Channel.get_config(variable);\n }\n \n public System.Threading.Tasks.Task<string> get_configAsync(string variable) {\n return base.Channel.get_configAsync(variable);\n }\n \n public void set_config(string variable, string value) {\n base.Channel.set_config(variable, value);\n }\n \n public System.Threading.Tasks.Task set_configAsync(string variable, string value) {\n return base.Channel.set_configAsync(variable, value);\n }\n \n public void save_config() {\n base.Channel.save_config();\n }\n \n public System.Threading.Tasks.Task save_configAsync() {\n return base.Channel.save_configAsync();\n }\n }\n}\n"} +{"text": "<?xml version='1.0' encoding='UTF-8'?>\n<versions xmlns:atom=\"http://www.w3.org/2005/Atom\" xmlns=\"http://docs.openstack.org/common/api/v1.0\">\n <version status=\"CURRENT\" updated=\"2011-01-21T11:33:21Z\" id=\"v2.0\">\n <atom:link href=\"http://openstack.example.com/v2/\" rel=\"self\"/>\n </version>\n</versions>\n"} +{"text": "<?xml version=\"1.0\"?>\n<package xmlns=\"http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd\">\n <metadata>\n <id>Ninject</id>\n <version>3.0.1.10</version>\n <authors>Ninject Project Contributors</authors>\n <owners>Ninject Project Contributors</owners>\n <licenseUrl>https://github.com/ninject/ninject/raw/master/LICENSE.txt</licenseUrl>\n <projectUrl>http://www.ninject.org/</projectUrl>\n <iconUrl>https://github.com/ninject/ninject/raw/master/logos/Ninject-Logo32.png</iconUrl>\n <requireLicenseAcceptance>true</requireLicenseAcceptance>\n <description>Stop writing monolithic applications that make you feel like you have to move mountains to make the simplest of changes. Ninject helps you use the technique of dependency injection to break your applications into loosely-coupled, highly-cohesive components, and then glue them back together in a flexible manner.</description>\n <summary>IoC container for .NET</summary>\n <tags>Ninject ioc di</tags>\n </metadata>\n</package>"} +{"text": "<!DOCTYPE html>\n<html>\n<head>\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1, minimum-scale=1\">\n <title>Pikaday - disableDayFn example</title>\n <meta name=\"author\" content=\"Ramiro Rikkert\">\n <link rel=\"stylesheet\" href=\"../css/pikaday.css\">\n <link rel=\"stylesheet\" href=\"../css/site.css\">\n</head>\n<body>\n <a href=\"https://github.com/Pikaday/Pikaday\"><img style=\"position: absolute; top: 0; right: 0; border: 0;\" src=\"https://s3.amazonaws.com/github/ribbons/forkme_right_gray_6d6d6d.png\" alt=\"Fork me on GitHub\"></a>\n\n <h1>Pikaday - disableDayFn example</h1>\n\n <p class=\"large\">A refreshing JavaScript Datepicker — lightweight, no dependencies, modular CSS.</p>\n\n <label for=\"datepicker\">Date:</label>\n <br>\n <input type=\"text\" id=\"datepicker\">\n\n <h2>What is this?</h2>\n\n <p>Since version 1.0 Pikaday is a stable and battle tested date-picker. Feel free to use it however you like but please report any bugs or feature requests to the <a href=\"https://github.com/Pikaday/Pikaday/issues\">GitHub issue tracker</a>, thanks!</p>\n\n <p class=\"small\">Copyright © 2014 <a href=\"https://dbushell.com/\">David Bushell</a> | BSD &amp; MIT license | Example by <a href=\"https://github.com/rikkert\">Ramiro Rikkert</a></p>\n\n <script src=\"../pikaday.js\"></script>\n <script>\n\n var disable = false, picker = new Pikaday({\n field: document.getElementById('datepicker'),\n firstDay: 1,\n minDate: new Date(2000, 0, 1),\n maxDate: new Date(2020, 12, 31),\n yearRange: [2000,2020],\n\n disableDayFn: function(theDate) {\n return disable = !disable;\n }\n });\n\n </script>\n</body>\n</html>\n"} +{"text": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<!-- NewPage -->\n<html lang=\"en\">\n<head>\n<!-- Generated by javadoc (1.8.0) on Fri Oct 02 00:10:13 EDT 2015 -->\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">\n<title>Uses of Class org.owasp.appsensor.rest.AccessControlUtils (appsensor-parent 2.2.0 API)</title>\n<meta name=\"date\" content=\"2015-10-02\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"../../../../../stylesheet.css\" title=\"Style\">\n<script type=\"text/javascript\" src=\"../../../../../script.js\"></script>\n</head>\n<body>\n<script type=\"text/javascript\"><!--\n try {\n if (location.href.indexOf('is-external=true') == -1) {\n parent.document.title=\"Uses of Class org.owasp.appsensor.rest.AccessControlUtils (appsensor-parent 2.2.0 API)\";\n }\n }\n catch(err) {\n }\n//-->\n</script>\n<noscript>\n<div>JavaScript is disabled on your browser.</div>\n</noscript>\n<div class=\"header\">\n<h2 title=\"Uses of Class org.owasp.appsensor.rest.AccessControlUtils\" class=\"title\">Uses of Class<br>org.owasp.appsensor.rest.AccessControlUtils</h2>\n</div>\n<div class=\"classUseContainer\">No usage of org.owasp.appsensor.rest.AccessControlUtils</div>\n<p class=\"legalCopy\"><small>Copyright &#169; 2015 <a href=\"http://www.owasp.org\">The Open Web Application Security Project (OWASP)</a>. All rights reserved.</small></p>\n</body>\n</html>\n"} +{"text": "/* SPDX-License-Identifier: GPL-2.0 */\n/*\n * (C) COPYRIGHT 2018 ARM Limited. All rights reserved.\n * Author: James.Qian.Wang <james.qian.wang@arm.com>\n *\n */\n#ifndef _KOMEDA_PIPELINE_H_\n#define _KOMEDA_PIPELINE_H_\n\n#include <linux/types.h>\n#include <drm/drm_atomic.h>\n#include <drm/drm_atomic_helper.h>\n#include \"malidp_utils.h\"\n#include \"komeda_color_mgmt.h\"\n\n#define KOMEDA_MAX_PIPELINES\t\t2\n#define KOMEDA_PIPELINE_MAX_LAYERS\t4\n#define KOMEDA_PIPELINE_MAX_SCALERS\t2\n#define KOMEDA_COMPONENT_N_INPUTS\t5\n\n/* pipeline component IDs */\nenum {\n\tKOMEDA_COMPONENT_LAYER0\t\t= 0,\n\tKOMEDA_COMPONENT_LAYER1\t\t= 1,\n\tKOMEDA_COMPONENT_LAYER2\t\t= 2,\n\tKOMEDA_COMPONENT_LAYER3\t\t= 3,\n\tKOMEDA_COMPONENT_WB_LAYER\t= 7, /* write back layer */\n\tKOMEDA_COMPONENT_SCALER0\t= 8,\n\tKOMEDA_COMPONENT_SCALER1\t= 9,\n\tKOMEDA_COMPONENT_SPLITTER\t= 12,\n\tKOMEDA_COMPONENT_MERGER\t\t= 14,\n\tKOMEDA_COMPONENT_COMPIZ0\t= 16, /* compositor */\n\tKOMEDA_COMPONENT_COMPIZ1\t= 17,\n\tKOMEDA_COMPONENT_IPS0\t\t= 20, /* post image processor */\n\tKOMEDA_COMPONENT_IPS1\t\t= 21,\n\tKOMEDA_COMPONENT_TIMING_CTRLR\t= 22, /* timing controller */\n};\n\n#define KOMEDA_PIPELINE_LAYERS\t\t(BIT(KOMEDA_COMPONENT_LAYER0) |\\\n\t\t\t\t\t BIT(KOMEDA_COMPONENT_LAYER1) |\\\n\t\t\t\t\t BIT(KOMEDA_COMPONENT_LAYER2) |\\\n\t\t\t\t\t BIT(KOMEDA_COMPONENT_LAYER3))\n\n#define KOMEDA_PIPELINE_SCALERS\t\t(BIT(KOMEDA_COMPONENT_SCALER0) |\\\n\t\t\t\t\t BIT(KOMEDA_COMPONENT_SCALER1))\n\n#define KOMEDA_PIPELINE_COMPIZS\t\t(BIT(KOMEDA_COMPONENT_COMPIZ0) |\\\n\t\t\t\t\t BIT(KOMEDA_COMPONENT_COMPIZ1))\n\n#define KOMEDA_PIPELINE_IMPROCS\t\t(BIT(KOMEDA_COMPONENT_IPS0) |\\\n\t\t\t\t\t BIT(KOMEDA_COMPONENT_IPS1))\nstruct komeda_component;\nstruct komeda_component_state;\n\n/** komeda_component_funcs - component control functions */\nstruct komeda_component_funcs {\n\t/** @validate: optional,\n\t * component may has special requirements or limitations, this function\n\t * supply HW the ability to do the further HW specific check.\n\t */\n\tint (*validate)(struct komeda_component *c,\n\t\t\tstruct komeda_component_state *state);\n\t/** @update: update is a active update */\n\tvoid (*update)(struct komeda_component *c,\n\t\t struct komeda_component_state *state);\n\t/** @disable: disable component */\n\tvoid (*disable)(struct komeda_component *c);\n\t/** @dump_register: Optional, dump registers to seq_file */\n\tvoid (*dump_register)(struct komeda_component *c, struct seq_file *seq);\n};\n\n/**\n * struct komeda_component\n *\n * struct komeda_component describe the data flow capabilities for how to link a\n * component into the display pipeline.\n * all specified components are subclass of this structure.\n */\nstruct komeda_component {\n\t/** @obj: treat component as private obj */\n\tstruct drm_private_obj obj;\n\t/** @pipeline: the komeda pipeline this component belongs to */\n\tstruct komeda_pipeline *pipeline;\n\t/** @name: component name */\n\tchar name[32];\n\t/**\n\t * @reg:\n\t * component register base,\n\t * which is initialized by chip and used by chip only\n\t */\n\tu32 __iomem *reg;\n\t/** @id: component id */\n\tu32 id;\n\t/**\n\t * @hw_id: component hw id,\n\t * which is initialized by chip and used by chip only\n\t */\n\tu32 hw_id;\n\n\t/**\n\t * @max_active_inputs:\n\t * @max_active_outputs:\n\t *\n\t * maximum number of inputs/outputs that can be active at the same time\n\t * Note:\n\t * the number isn't the bit number of @supported_inputs or\n\t * @supported_outputs, but may be less than it, since component may not\n\t * support enabling all @supported_inputs/outputs at the same time.\n\t */\n\tu8 max_active_inputs;\n\t/** @max_active_outputs: maximum number of outputs */\n\tu8 max_active_outputs;\n\t/**\n\t * @supported_inputs:\n\t * @supported_outputs:\n\t *\n\t * bitmask of BIT(component->id) for the supported inputs/outputs,\n\t * describes the possibilities of how a component is linked into a\n\t * pipeline.\n\t */\n\tu32 supported_inputs;\n\t/** @supported_outputs: bitmask of supported output componenet ids */\n\tu32 supported_outputs;\n\n\t/**\n\t * @funcs: chip functions to access HW\n\t */\n\tconst struct komeda_component_funcs *funcs;\n};\n\n/**\n * struct komeda_component_output\n *\n * a component has multiple outputs, if want to know where the data\n * comes from, only know the component is not enough, we still need to know\n * its output port\n */\nstruct komeda_component_output {\n\t/** @component: indicate which component the data comes from */\n\tstruct komeda_component *component;\n\t/**\n\t * @output_port:\n\t * the output port of the &komeda_component_output.component\n\t */\n\tu8 output_port;\n};\n\n/**\n * struct komeda_component_state\n *\n * component_state is the data flow configuration of the component, and it's\n * the superclass of all specific component_state like @komeda_layer_state,\n * @komeda_scaler_state\n */\nstruct komeda_component_state {\n\t/** @obj: tracking component_state by drm_atomic_state */\n\tstruct drm_private_state obj;\n\t/** @component: backpointer to the component */\n\tstruct komeda_component *component;\n\t/**\n\t * @binding_user:\n\t * currently bound user, the user can be @crtc, @plane or @wb_conn,\n\t * which is valid decided by @component and @inputs\n\t *\n\t * - Layer: its user always is plane.\n\t * - compiz/improc/timing_ctrlr: the user is crtc.\n\t * - wb_layer: wb_conn;\n\t * - scaler: plane when input is layer, wb_conn if input is compiz.\n\t */\n\tunion {\n\t\t/** @crtc: backpointer for user crtc */\n\t\tstruct drm_crtc *crtc;\n\t\t/** @plane: backpointer for user plane */\n\t\tstruct drm_plane *plane;\n\t\t/** @wb_conn: backpointer for user wb_connector */\n\t\tstruct drm_connector *wb_conn;\n\t\tvoid *binding_user;\n\t};\n\n\t/**\n\t * @active_inputs:\n\t *\n\t * active_inputs is bitmask of @inputs index\n\t *\n\t * - active_inputs = changed_active_inputs | unchanged_active_inputs\n\t * - affected_inputs = old->active_inputs | new->active_inputs;\n\t * - disabling_inputs = affected_inputs ^ active_inputs;\n\t * - changed_inputs = disabling_inputs | changed_active_inputs;\n\t *\n\t * NOTE:\n\t * changed_inputs doesn't include all active_input but only\n\t * @changed_active_inputs, and this bitmask can be used in chip\n\t * level for dirty update.\n\t */\n\tu16 active_inputs;\n\t/** @changed_active_inputs: bitmask of the changed @active_inputs */\n\tu16 changed_active_inputs;\n\t/** @affected_inputs: bitmask for affected @inputs */\n\tu16 affected_inputs;\n\t/**\n\t * @inputs:\n\t *\n\t * the specific inputs[i] only valid on BIT(i) has been set in\n\t * @active_inputs, if not the inputs[i] is undefined.\n\t */\n\tstruct komeda_component_output inputs[KOMEDA_COMPONENT_N_INPUTS];\n};\n\nstatic inline u16 component_disabling_inputs(struct komeda_component_state *st)\n{\n\treturn st->affected_inputs ^ st->active_inputs;\n}\n\nstatic inline u16 component_changed_inputs(struct komeda_component_state *st)\n{\n\treturn component_disabling_inputs(st) | st->changed_active_inputs;\n}\n\n#define for_each_changed_input(st, i)\t\\\n\tfor ((i) = 0; (i) < (st)->component->max_active_inputs; (i)++)\t\\\n\t\tif (has_bit((i), component_changed_inputs(st)))\n\n#define to_comp(__c)\t(((__c) == NULL) ? NULL : &((__c)->base))\n#define to_cpos(__c)\t((struct komeda_component **)&(__c))\n\nstruct komeda_layer {\n\tstruct komeda_component base;\n\t/* accepted h/v input range before rotation */\n\tstruct malidp_range hsize_in, vsize_in;\n\tu32 layer_type; /* RICH, SIMPLE or WB */\n\tu32 line_sz;\n\tu32 yuv_line_sz; /* maximum line size for YUV422 and YUV420 */\n\tu32 supported_rots;\n\t/* komeda supports layer split which splits a whole image to two parts\n\t * left and right and handle them by two individual layer processors\n\t * Note: left/right are always according to the final display rect,\n\t * not the source buffer.\n\t */\n\tstruct komeda_layer *right;\n};\n\nstruct komeda_layer_state {\n\tstruct komeda_component_state base;\n\t/* layer specific configuration state */\n\tu16 hsize, vsize;\n\tu32 rot;\n\tu16 afbc_crop_l;\n\tu16 afbc_crop_r;\n\tu16 afbc_crop_t;\n\tu16 afbc_crop_b;\n\tdma_addr_t addr[3];\n};\n\nstruct komeda_scaler {\n\tstruct komeda_component base;\n\tstruct malidp_range hsize, vsize;\n\tu32 max_upscaling;\n\tu32 max_downscaling;\n\tu8 scaling_split_overlap; /* split overlap for scaling */\n\tu8 enh_split_overlap; /* split overlap for image enhancement */\n};\n\nstruct komeda_scaler_state {\n\tstruct komeda_component_state base;\n\tu16 hsize_in, vsize_in;\n\tu16 hsize_out, vsize_out;\n\tu16 total_hsize_in, total_vsize_in;\n\tu16 total_hsize_out; /* total_xxxx are size before split */\n\tu16 left_crop, right_crop;\n\tu8 en_scaling : 1,\n\t en_alpha : 1, /* enable alpha processing */\n\t en_img_enhancement : 1,\n\t en_split : 1,\n\t right_part : 1; /* right part of split image */\n};\n\nstruct komeda_compiz {\n\tstruct komeda_component base;\n\tstruct malidp_range hsize, vsize;\n};\n\nstruct komeda_compiz_input_cfg {\n\tu16 hsize, vsize;\n\tu16 hoffset, voffset;\n\tu8 pixel_blend_mode, layer_alpha;\n};\n\nstruct komeda_compiz_state {\n\tstruct komeda_component_state base;\n\t/* composition size */\n\tu16 hsize, vsize;\n\tstruct komeda_compiz_input_cfg cins[KOMEDA_COMPONENT_N_INPUTS];\n};\n\nstruct komeda_merger {\n\tstruct komeda_component base;\n\tstruct malidp_range hsize_merged;\n\tstruct malidp_range vsize_merged;\n};\n\nstruct komeda_merger_state {\n\tstruct komeda_component_state base;\n\tu16 hsize_merged;\n\tu16 vsize_merged;\n};\n\nstruct komeda_splitter {\n\tstruct komeda_component base;\n\tstruct malidp_range hsize, vsize;\n};\n\nstruct komeda_splitter_state {\n\tstruct komeda_component_state base;\n\tu16 hsize, vsize;\n\tu16 overlap;\n};\n\nstruct komeda_improc {\n\tstruct komeda_component base;\n\tu32 supported_color_formats; /* DRM_RGB/YUV444/YUV420*/\n\tu32 supported_color_depths; /* BIT(8) | BIT(10)*/\n\tu8 supports_degamma : 1;\n\tu8 supports_csc : 1;\n\tu8 supports_gamma : 1;\n};\n\nstruct komeda_improc_state {\n\tstruct komeda_component_state base;\n\tu8 color_format, color_depth;\n\tu16 hsize, vsize;\n\tu32 fgamma_coeffs[KOMEDA_N_GAMMA_COEFFS];\n\tu32 ctm_coeffs[KOMEDA_N_CTM_COEFFS];\n};\n\n/* display timing controller */\nstruct komeda_timing_ctrlr {\n\tstruct komeda_component base;\n\tu8 supports_dual_link : 1;\n};\n\nstruct komeda_timing_ctrlr_state {\n\tstruct komeda_component_state base;\n};\n\n/* Why define A separated structure but not use plane_state directly ?\n * 1. Komeda supports layer_split which means a plane_state can be split and\n * handled by two layers, one layer only handle half of plane image.\n * 2. Fix up the user properties according to HW's capabilities, like user\n * set rotation to R180, but HW only supports REFLECT_X+Y. the rot here is\n * after drm_rotation_simplify()\n */\nstruct komeda_data_flow_cfg {\n\tstruct komeda_component_output input;\n\tu16 in_x, in_y, in_w, in_h;\n\tu32 out_x, out_y, out_w, out_h;\n\tu16 total_in_h, total_in_w;\n\tu16 total_out_w;\n\tu16 left_crop, right_crop, overlap;\n\tu32 rot;\n\tint blending_zorder;\n\tu8 pixel_blend_mode, layer_alpha;\n\tu8 en_scaling : 1,\n\t en_img_enhancement : 1,\n\t en_split : 1,\n\t is_yuv : 1,\n\t right_part : 1; /* right part of display image if split enabled */\n};\n\nstruct komeda_pipeline_funcs {\n\t/* check if the aclk (main engine clock) can satisfy the clock\n\t * requirements of the downscaling that specified by dflow\n\t */\n\tint (*downscaling_clk_check)(struct komeda_pipeline *pipe,\n\t\t\t\t struct drm_display_mode *mode,\n\t\t\t\t unsigned long aclk_rate,\n\t\t\t\t struct komeda_data_flow_cfg *dflow);\n\t/* dump_register: Optional, dump registers to seq_file */\n\tvoid (*dump_register)(struct komeda_pipeline *pipe,\n\t\t\t struct seq_file *sf);\n};\n\n/**\n * struct komeda_pipeline\n *\n * Represent a complete display pipeline and hold all functional components.\n */\nstruct komeda_pipeline {\n\t/** @obj: link pipeline as private obj of drm_atomic_state */\n\tstruct drm_private_obj obj;\n\t/** @mdev: the parent komeda_dev */\n\tstruct komeda_dev *mdev;\n\t/** @pxlclk: pixel clock */\n\tstruct clk *pxlclk;\n\t/** @id: pipeline id */\n\tint id;\n\t/** @avail_comps: available components mask of pipeline */\n\tu32 avail_comps;\n\t/**\n\t * @standalone_disabled_comps:\n\t *\n\t * When disable the pipeline, some components can not be disabled\n\t * together with others, but need a sparated and standalone disable.\n\t * The standalone_disabled_comps are the components which need to be\n\t * disabled standalone, and this concept also introduce concept of\n\t * two phase.\n\t * phase 1: for disabling the common components.\n\t * phase 2: for disabling the standalong_disabled_comps.\n\t */\n\tu32 standalone_disabled_comps;\n\t/** @n_layers: the number of layer on @layers */\n\tint n_layers;\n\t/** @layers: the pipeline layers */\n\tstruct komeda_layer *layers[KOMEDA_PIPELINE_MAX_LAYERS];\n\t/** @n_scalers: the number of scaler on @scalers */\n\tint n_scalers;\n\t/** @scalers: the pipeline scalers */\n\tstruct komeda_scaler *scalers[KOMEDA_PIPELINE_MAX_SCALERS];\n\t/** @compiz: compositor */\n\tstruct komeda_compiz *compiz;\n\t/** @splitter: for split the compiz output to two half data flows */\n\tstruct komeda_splitter *splitter;\n\t/** @merger: merger */\n\tstruct komeda_merger *merger;\n\t/** @wb_layer: writeback layer */\n\tstruct komeda_layer *wb_layer;\n\t/** @improc: post image processor */\n\tstruct komeda_improc *improc;\n\t/** @ctrlr: timing controller */\n\tstruct komeda_timing_ctrlr *ctrlr;\n\t/** @funcs: chip private pipeline functions */\n\tconst struct komeda_pipeline_funcs *funcs;\n\n\t/** @of_node: pipeline dt node */\n\tstruct device_node *of_node;\n\t/** @of_output_port: pipeline output port */\n\tstruct device_node *of_output_port;\n\t/** @of_output_links: output connector device nodes */\n\tstruct device_node *of_output_links[2];\n\t/** @dual_link: true if of_output_links[0] and [1] are both valid */\n\tbool dual_link;\n};\n\n/**\n * struct komeda_pipeline_state\n *\n * NOTE:\n * Unlike the pipeline, pipeline_state doesn’t gather any component_state\n * into it. It because all component will be managed by drm_atomic_state.\n */\nstruct komeda_pipeline_state {\n\t/** @obj: tracking pipeline_state by drm_atomic_state */\n\tstruct drm_private_state obj;\n\t/** @pipe: backpointer to the pipeline */\n\tstruct komeda_pipeline *pipe;\n\t/** @crtc: currently bound crtc */\n\tstruct drm_crtc *crtc;\n\t/**\n\t * @active_comps:\n\t *\n\t * bitmask - BIT(component->id) of active components\n\t */\n\tu32 active_comps;\n};\n\n#define to_layer(c)\tcontainer_of(c, struct komeda_layer, base)\n#define to_compiz(c)\tcontainer_of(c, struct komeda_compiz, base)\n#define to_scaler(c)\tcontainer_of(c, struct komeda_scaler, base)\n#define to_splitter(c)\tcontainer_of(c, struct komeda_splitter, base)\n#define to_merger(c)\tcontainer_of(c, struct komeda_merger, base)\n#define to_improc(c)\tcontainer_of(c, struct komeda_improc, base)\n#define to_ctrlr(c)\tcontainer_of(c, struct komeda_timing_ctrlr, base)\n\n#define to_layer_st(c)\tcontainer_of(c, struct komeda_layer_state, base)\n#define to_compiz_st(c)\tcontainer_of(c, struct komeda_compiz_state, base)\n#define to_scaler_st(c)\tcontainer_of(c, struct komeda_scaler_state, base)\n#define to_splitter_st(c) container_of(c, struct komeda_splitter_state, base)\n#define to_merger_st(c)\tcontainer_of(c, struct komeda_merger_state, base)\n#define to_improc_st(c)\tcontainer_of(c, struct komeda_improc_state, base)\n#define to_ctrlr_st(c)\tcontainer_of(c, struct komeda_timing_ctrlr_state, base)\n\n#define priv_to_comp_st(o) container_of(o, struct komeda_component_state, obj)\n#define priv_to_pipe_st(o) container_of(o, struct komeda_pipeline_state, obj)\n\n/* pipeline APIs */\nstruct komeda_pipeline *\nkomeda_pipeline_add(struct komeda_dev *mdev, size_t size,\n\t\t const struct komeda_pipeline_funcs *funcs);\nvoid komeda_pipeline_destroy(struct komeda_dev *mdev,\n\t\t\t struct komeda_pipeline *pipe);\nstruct komeda_pipeline *\nkomeda_pipeline_get_slave(struct komeda_pipeline *master);\nint komeda_assemble_pipelines(struct komeda_dev *mdev);\nstruct komeda_component *\nkomeda_pipeline_get_component(struct komeda_pipeline *pipe, int id);\nstruct komeda_component *\nkomeda_pipeline_get_first_component(struct komeda_pipeline *pipe,\n\t\t\t\t u32 comp_mask);\n\nvoid komeda_pipeline_dump_register(struct komeda_pipeline *pipe,\n\t\t\t\t struct seq_file *sf);\n\n/* component APIs */\nextern __printf(10, 11)\nstruct komeda_component *\nkomeda_component_add(struct komeda_pipeline *pipe,\n\t\t size_t comp_sz, u32 id, u32 hw_id,\n\t\t const struct komeda_component_funcs *funcs,\n\t\t u8 max_active_inputs, u32 supported_inputs,\n\t\t u8 max_active_outputs, u32 __iomem *reg,\n\t\t const char *name_fmt, ...);\n\nvoid komeda_component_destroy(struct komeda_dev *mdev,\n\t\t\t struct komeda_component *c);\n\nstatic inline struct komeda_component *\nkomeda_component_pickup_output(struct komeda_component *c, u32 avail_comps)\n{\n\tu32 avail_inputs = c->supported_outputs & (avail_comps);\n\n\treturn komeda_pipeline_get_first_component(c->pipeline, avail_inputs);\n}\n\nstruct komeda_plane_state;\nstruct komeda_crtc_state;\nstruct komeda_crtc;\n\nvoid pipeline_composition_size(struct komeda_crtc_state *kcrtc_st,\n\t\t\t u16 *hsize, u16 *vsize);\n\nint komeda_build_layer_data_flow(struct komeda_layer *layer,\n\t\t\t\t struct komeda_plane_state *kplane_st,\n\t\t\t\t struct komeda_crtc_state *kcrtc_st,\n\t\t\t\t struct komeda_data_flow_cfg *dflow);\nint komeda_build_wb_data_flow(struct komeda_layer *wb_layer,\n\t\t\t struct drm_connector_state *conn_st,\n\t\t\t struct komeda_crtc_state *kcrtc_st,\n\t\t\t struct komeda_data_flow_cfg *dflow);\nint komeda_build_display_data_flow(struct komeda_crtc *kcrtc,\n\t\t\t\t struct komeda_crtc_state *kcrtc_st);\n\nint komeda_build_layer_split_data_flow(struct komeda_layer *left,\n\t\t\t\t struct komeda_plane_state *kplane_st,\n\t\t\t\t struct komeda_crtc_state *kcrtc_st,\n\t\t\t\t struct komeda_data_flow_cfg *dflow);\nint komeda_build_wb_split_data_flow(struct komeda_layer *wb_layer,\n\t\t\t\t struct drm_connector_state *conn_st,\n\t\t\t\t struct komeda_crtc_state *kcrtc_st,\n\t\t\t\t struct komeda_data_flow_cfg *dflow);\n\nint komeda_release_unclaimed_resources(struct komeda_pipeline *pipe,\n\t\t\t\t struct komeda_crtc_state *kcrtc_st);\n\nstruct komeda_pipeline_state *\nkomeda_pipeline_get_old_state(struct komeda_pipeline *pipe,\n\t\t\t struct drm_atomic_state *state);\nbool komeda_pipeline_disable(struct komeda_pipeline *pipe,\n\t\t\t struct drm_atomic_state *old_state);\nvoid komeda_pipeline_update(struct komeda_pipeline *pipe,\n\t\t\t struct drm_atomic_state *old_state);\n\nvoid komeda_complete_data_flow_cfg(struct komeda_layer *layer,\n\t\t\t\t struct komeda_data_flow_cfg *dflow,\n\t\t\t\t struct drm_framebuffer *fb);\n\n#endif /* _KOMEDA_PIPELINE_H_*/\n"} +{"text": "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <title>YMSortTableView Class Reference</title>\n <link rel=\"stylesheet\" type=\"text/css\" href=\"../css/jazzy.css\" />\n <link rel=\"stylesheet\" type=\"text/css\" href=\"../css/highlight.css\" />\n <meta charset='utf-8'>\n <script src=\"../js/jquery.min.js\" defer></script>\n <script src=\"../js/jazzy.js\" defer></script>\n \n </head>\n <body>\n <a name=\"//apple_ref/swift/Class/YMSortTableView\" class=\"dashAnchor\"></a>\n <a title=\"YMSortTableView Class Reference\"></a>\n <header>\n <div class=\"content-wrapper\">\n <p><a href=\"../index.html\"> Docs</a> (18% documented)</p>\n </div>\n </header>\n <div class=\"content-wrapper\">\n <p id=\"breadcrumbs\">\n <a href=\"../index.html\"> Reference</a>\n <img id=\"carat\" src=\"../img/carat.png\" />\n YMSortTableView Class Reference\n </p>\n </div>\n <div class=\"content-wrapper\">\n <nav class=\"sidebar\">\n <ul class=\"nav-groups\">\n <li class=\"nav-group-name\">\n <a href=\"../Classes.html\">Classes</a>\n <ul class=\"nav-group-tasks\">\n <li class=\"nav-group-task\">\n <a href=\"../Classes/AppDelegate.html\">AppDelegate</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/User.html\">User</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMActionSheet.html\">YMActionSheet</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMBaseViewController.html\">YMBaseViewController</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMCategoryBottomView.html\">YMCategoryBottomView</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMCategoryCollectionViewCell.html\">YMCategoryCollectionViewCell</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMCategoryHeaderViewController.html\">YMCategoryHeaderViewController</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMCategoryViewController.html\">YMCategoryViewController</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMChannel.html\">YMChannel</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMCollection.html\">YMCollection</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMCollectionDetailController.html\">YMCollectionDetailController</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMCollectionPost.html\">YMCollectionPost</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMCollectionTableViewCell.html\">YMCollectionTableViewCell</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMCollectionViewCell.html\">YMCollectionViewCell</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMComment.html\">YMComment</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMCommentCell.html\">YMCommentCell</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMDanTangViewController.html\">YMDanTangViewController</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMDetailChoiceButtonView.html\">YMDetailChoiceButtonView</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMDetailCollectionViewCell.html\">YMDetailCollectionViewCell</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMDetailLayout.html\">YMDetailLayout</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMDetailScrollView.html\">YMDetailScrollView</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMDetailViewController.html\">YMDetailViewController</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMGroup.html\">YMGroup</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMHomeCell.html\">YMHomeCell</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMHomeItem.html\">YMHomeItem</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMLoginViewController.html\">YMLoginViewController</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMMeChoiceView.html\">YMMeChoiceView</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMMeFooterView.html\">YMMeFooterView</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMMeViewController.html\">YMMeViewController</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMMessageViewController.html\">YMMessageViewController</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMMineHeaderView.html\">YMMineHeaderView</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMNavigationController.html\">YMNavigationController</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMNetworkTool.html\">YMNetworkTool</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMNewfeatureCell.html\">YMNewfeatureCell</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMNewfeatureLayout.html\">YMNewfeatureLayout</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMNewfeatureViewController.html\">YMNewfeatureViewController</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMPostDetailViewController.html\">YMPostDetailViewController</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMProduct.html\">YMProduct</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMProductDetail.html\">YMProductDetail</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMProductDetailBottomView.html\">YMProductDetailBottomView</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMProductDetailToolBar.html\">YMProductDetailToolBar</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMProductDetailTopView.html\">YMProductDetailTopView</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMProductDetailViewController.html\">YMProductDetailViewController</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMProductViewController.html\">YMProductViewController</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMRefreshControl.html\">YMRefreshControl</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMRefreshView.html\">YMRefreshView</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMRegisterViewController.html\">YMRegisterViewController</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMSearchRecordView.html\">YMSearchRecordView</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMSearchResult.html\">YMSearchResult</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMSearchViewController.html\">YMSearchViewController</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMSeeAllController.html\">YMSeeAllController</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMSeeAllTopicCell.html\">YMSeeAllTopicCell</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMSetting.html\">YMSetting</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMSettingCell.html\">YMSettingCell</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMSettingViewController.html\">YMSettingViewController</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMShareButtonView.html\">YMShareButtonView</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMSortCell.html\">YMSortCell</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMSortTableView.html\">YMSortTableView</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMTMALLViewController.html\">YMTMALLViewController</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMTabBarController.html\">YMTabBarController</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMTopHeaderView.html\">YMTopHeaderView</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMTopicViewController.html\">YMTopicViewController</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Classes/YMVerticalButton.html\">YMVerticalButton</a>\n </li>\n </ul>\n </li>\n <li class=\"nav-group-name\">\n <a href=\"../Global Variables.html\">Global Variables</a>\n <ul class=\"nav-group-tasks\">\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang8BASE_URLSS\">BASE_URL</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang9RETURN_OKSi\">RETURN_OK</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang7SCREENHV12CoreGraphics7CGFloat\">SCREENH</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang7SCREENWV12CoreGraphics7CGFloat\">SCREENW</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang13YMFirstLaunchSS\">YMFirstLaunch</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang24categoryCollectionCellIDSS\">categoryCollectionCellID</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang16collectionCellIDSS\">collectionCellID</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang21collectionTableCellIDSS\">collectionTableCellID</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang13commentCellIDSS\">commentCellID</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang26detailCollectionViewCellIDSS\">detailCollectionViewCellID</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang10homeCellIDSS\">homeCellID</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang9isIPhone5Sb\">isIPhone5</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang9isIPhone6Sb\">isIPhone6</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang10isIPhone6PSb\">isIPhone6P</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang7isLoginSS\">isLogin</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang18kAnimationDurationSd\">kAnimationDuration</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang13kCornerRadiusV12CoreGraphics7CGFloat\">kCornerRadius</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang15kIndicatorViewHV12CoreGraphics7CGFloat\">kIndicatorViewH</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang7kMarginV12CoreGraphics7CGFloat\">kMargin</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang16kNewFeatureCountSi\">kNewFeatureCount</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang12kTitlesViewHV12CoreGraphics7CGFloat\">kTitlesViewH</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang12kTitlesViewYV12CoreGraphics7CGFloat\">kTitlesViewY</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang9kTopViewHV12CoreGraphics7CGFloat\">kTopViewH</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang24kYMMineHeaderImageHeightV12CoreGraphics7CGFloat\">kYMMineHeaderImageHeight</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang6kitemHV12CoreGraphics7CGFloat\">kitemH</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang6kitemWV12CoreGraphics7CGFloat\">kitemW</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang10klineWidthV12CoreGraphics7CGFloat\">klineWidth</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang13messageCellIDSS\">messageCellID</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang12newFeatureIDSS\">newFeatureID</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang22searchCollectionCellIDSS\">searchCollectionCellID</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang12seeAllcellIDSS\">seeAllcellID</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Global Variables.html#/s:v7DanTang19sortTableViewCellIDSS\">sortTableViewCellID</a>\n </li>\n </ul>\n </li>\n <li class=\"nav-group-name\">\n <a href=\"../Enums.html\">Enums</a>\n <ul class=\"nav-group-tasks\">\n <li class=\"nav-group-task\">\n <a href=\"../Enums/YMOtherLoginButtonType.html\">YMOtherLoginButtonType</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Enums/YMShareButtonType.html\">YMShareButtonType</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Enums/YMTopicType.html\">YMTopicType</a>\n </li>\n </ul>\n </li>\n <li class=\"nav-group-name\">\n <a href=\"../Extensions.html\">Extensions</a>\n <ul class=\"nav-group-tasks\">\n <li class=\"nav-group-task\">\n <a href=\"../Extensions/String.html\">String</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Extensions/UITableView.html\">UITableView</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Extensions/UIView.html\">UIView</a>\n </li>\n </ul>\n </li>\n <li class=\"nav-group-name\">\n <a href=\"../Functions.html\">Functions</a>\n <ul class=\"nav-group-tasks\">\n <li class=\"nav-group-task\">\n <a href=\"../Functions.html#/s:F7DanTang7YMColorFTV12CoreGraphics7CGFloat1gS1_1bS1_1aS1__CSo7UIColor\">YMColor(_:g:b:a:)</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Functions.html#/s:F7DanTang13YMGlobalColorFT_CSo7UIColor\">YMGlobalColor()</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Functions.html#/s:F7DanTang16YMGlobalRedColorFT_CSo7UIColor\">YMGlobalRedColor()</a>\n </li>\n </ul>\n </li>\n <li class=\"nav-group-name\">\n <a href=\"../Protocols.html\">Protocols</a>\n <ul class=\"nav-group-tasks\">\n <li class=\"nav-group-task\">\n <a href=\"../Protocols/YMCategoryBottomViewDelegate.html\">YMCategoryBottomViewDelegate</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Protocols/YMCollectionViewCellDelegate.html\">YMCollectionViewCellDelegate</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Protocols/YMDetailChoiceButtonViewDegegate.html\">YMDetailChoiceButtonViewDegegate</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Protocols/YMHomeCellDelegate.html\">YMHomeCellDelegate</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Protocols/YMProductDetailToolBarDelegate.html\">YMProductDetailToolBarDelegate</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Protocols/YMSortTableViewDelegate.html\">YMSortTableViewDelegate</a>\n </li>\n <li class=\"nav-group-task\">\n <a href=\"../Protocols/YMTopHeaderViewDelegate.html\">YMTopHeaderViewDelegate</a>\n </li>\n </ul>\n </li>\n </ul>\n </nav>\n <article class=\"main-content\">\n <section>\n <section class=\"section\">\n <h1>YMSortTableView</h1>\n <p>Undocumented</p>\n\n </section>\n <section class=\"section task-group-section\">\n <div class=\"task-group\">\n <ul>\n <li class=\"item\">\n <div>\n <code>\n <a name=\"/s:vC7DanTang15YMSortTableView8delegateXwGSqPS_23YMSortTableViewDelegate__\"></a>\n <a name=\"//apple_ref/swift/Property/delegate\" class=\"dashAnchor\"></a>\n <a class=\"token\" href=\"#/s:vC7DanTang15YMSortTableView8delegateXwGSqPS_23YMSortTableViewDelegate__\">delegate</a>\n </code>\n </div>\n <div class=\"height-container\">\n <div class=\"pointer-container\"></div>\n <section class=\"section\">\n <div class=\"pointer\"></div>\n <div class=\"abstract\">\n <p>Undocumented</p>\n\n </div>\n </section>\n </div>\n </li>\n <li class=\"item\">\n <div>\n <code>\n <a name=\"/s:vC7DanTang15YMSortTableView5cellsGSaSS_\"></a>\n <a name=\"//apple_ref/swift/Property/cells\" class=\"dashAnchor\"></a>\n <a class=\"token\" href=\"#/s:vC7DanTang15YMSortTableView5cellsGSaSS_\">cells</a>\n </code>\n </div>\n <div class=\"height-container\">\n <div class=\"pointer-container\"></div>\n <section class=\"section\">\n <div class=\"pointer\"></div>\n <div class=\"abstract\">\n <p>Undocumented</p>\n\n </div>\n </section>\n </div>\n </li>\n <li class=\"item\">\n <div>\n <code>\n <a name=\"/s:vC7DanTang15YMSortTableView5sortsGSaSS_\"></a>\n <a name=\"//apple_ref/swift/Property/sorts\" class=\"dashAnchor\"></a>\n <a class=\"token\" href=\"#/s:vC7DanTang15YMSortTableView5sortsGSaSS_\">sorts</a>\n </code>\n </div>\n <div class=\"height-container\">\n <div class=\"pointer-container\"></div>\n <section class=\"section\">\n <div class=\"pointer\"></div>\n <div class=\"abstract\">\n <p>排序方式</p>\n\n </div>\n <div class=\"declaration\">\n <h4>Declaration</h4>\n <div class=\"language\">\n <p class=\"aside-title\">Swift</p>\n <pre class=\"highlight\"><code><span class=\"k\">let</span> <span class=\"nv\">sorts</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"s\">\"\"</span><span class=\"p\">,</span> <span class=\"s\">\"hot\"</span><span class=\"p\">,</span> <span class=\"s\">\"price%3Aasc\"</span><span class=\"p\">,</span> <span class=\"s\">\"price%3Adesc\"</span><span class=\"p\">]</span></code></pre>\n\n </div>\n </div>\n </section>\n </div>\n </li>\n <li class=\"item\">\n <div>\n <code>\n <a name=\"/s:FC7DanTang15YMSortTableView4showFT_T_\"></a>\n <a name=\"//apple_ref/swift/Method/show()\" class=\"dashAnchor\"></a>\n <a class=\"token\" href=\"#/s:FC7DanTang15YMSortTableView4showFT_T_\">show()</a>\n </code>\n </div>\n <div class=\"height-container\">\n <div class=\"pointer-container\"></div>\n <section class=\"section\">\n <div class=\"pointer\"></div>\n <div class=\"abstract\">\n <p>Undocumented</p>\n\n </div>\n </section>\n </div>\n </li>\n <li class=\"item\">\n <div>\n <code>\n <a name=\"/s:FC7DanTang15YMSortTableView33touchesEstimatedPropertiesUpdatedFGVs3SetCSo8NSObject_T_\"></a>\n <a name=\"//apple_ref/swift/Method/touchesEstimatedPropertiesUpdated(_:)\" class=\"dashAnchor\"></a>\n <a class=\"token\" href=\"#/s:FC7DanTang15YMSortTableView33touchesEstimatedPropertiesUpdatedFGVs3SetCSo8NSObject_T_\">touchesEstimatedPropertiesUpdated(_:)</a>\n </code>\n </div>\n <div class=\"height-container\">\n <div class=\"pointer-container\"></div>\n <section class=\"section\">\n <div class=\"pointer\"></div>\n <div class=\"abstract\">\n <p>Undocumented</p>\n\n </div>\n </section>\n </div>\n </li>\n <li class=\"item\">\n <div>\n <code>\n <a name=\"/s:FC7DanTang15YMSortTableView7dismissFT_T_\"></a>\n <a name=\"//apple_ref/swift/Method/dismiss()\" class=\"dashAnchor\"></a>\n <a class=\"token\" href=\"#/s:FC7DanTang15YMSortTableView7dismissFT_T_\">dismiss()</a>\n </code>\n </div>\n <div class=\"height-container\">\n <div class=\"pointer-container\"></div>\n <section class=\"section\">\n <div class=\"pointer\"></div>\n <div class=\"abstract\">\n <p>Undocumented</p>\n\n </div>\n </section>\n </div>\n </li>\n <li class=\"item\">\n <div>\n <code>\n <a name=\"/s:FC7DanTang15YMSortTableViewcFT5frameVSC6CGRect_S0_\"></a>\n <a name=\"//apple_ref/swift/Method/init(frame:)\" class=\"dashAnchor\"></a>\n <a class=\"token\" href=\"#/s:FC7DanTang15YMSortTableViewcFT5frameVSC6CGRect_S0_\">init(frame:)</a>\n </code>\n </div>\n <div class=\"height-container\">\n <div class=\"pointer-container\"></div>\n <section class=\"section\">\n <div class=\"pointer\"></div>\n <div class=\"abstract\">\n <p>Undocumented</p>\n\n </div>\n </section>\n </div>\n </li>\n <li class=\"item\">\n <div>\n <code>\n <a name=\"/s:FC7DanTang15YMSortTableViewcFT5coderCSo7NSCoder_GSqS0__\"></a>\n <a name=\"//apple_ref/swift/Method/init(coder:)\" class=\"dashAnchor\"></a>\n <a class=\"token\" href=\"#/s:FC7DanTang15YMSortTableViewcFT5coderCSo7NSCoder_GSqS0__\">init(coder:)</a>\n </code>\n </div>\n <div class=\"height-container\">\n <div class=\"pointer-container\"></div>\n <section class=\"section\">\n <div class=\"pointer\"></div>\n <div class=\"abstract\">\n <p>Undocumented</p>\n\n </div>\n </section>\n </div>\n </li>\n <li class=\"item\">\n <div>\n <code>\n <a name=\"/s:vC7DanTang15YMSortTableViewP33_BE0B20D6D8B11AD0D13A1DE3FF0630D86bgViewCSo11UIImageView\"></a>\n <a name=\"//apple_ref/swift/Property/bgView\" class=\"dashAnchor\"></a>\n <a class=\"token\" href=\"#/s:vC7DanTang15YMSortTableViewP33_BE0B20D6D8B11AD0D13A1DE3FF0630D86bgViewCSo11UIImageView\">bgView</a>\n </code>\n </div>\n <div class=\"height-container\">\n <div class=\"pointer-container\"></div>\n <section class=\"section\">\n <div class=\"pointer\"></div>\n <div class=\"abstract\">\n <p>Undocumented</p>\n\n </div>\n </section>\n </div>\n </li>\n <li class=\"item\">\n <div>\n <code>\n <a name=\"/s:vC7DanTang15YMSortTableViewP33_BE0B20D6D8B11AD0D13A1DE3FF0630D89tableViewCSo11UITableView\"></a>\n <a name=\"//apple_ref/swift/Property/tableView\" class=\"dashAnchor\"></a>\n <a class=\"token\" href=\"#/s:vC7DanTang15YMSortTableViewP33_BE0B20D6D8B11AD0D13A1DE3FF0630D89tableViewCSo11UITableView\">tableView</a>\n </code>\n </div>\n <div class=\"height-container\">\n <div class=\"pointer-container\"></div>\n <section class=\"section\">\n <div class=\"pointer\"></div>\n <div class=\"abstract\">\n <p>Undocumented</p>\n\n </div>\n </section>\n </div>\n </li>\n </ul>\n </div>\n <div class=\"task-group\">\n <ul>\n <li class=\"item\">\n <div>\n <code>\n <a name=\"/s:FC7DanTang15YMSortTableView9tableViewFTCSo11UITableView21numberOfRowsInSectionSi_Si\"></a>\n <a name=\"//apple_ref/swift/Method/tableView(_:numberOfRowsInSection:)\" class=\"dashAnchor\"></a>\n <a class=\"token\" href=\"#/s:FC7DanTang15YMSortTableView9tableViewFTCSo11UITableView21numberOfRowsInSectionSi_Si\">tableView(_:numberOfRowsInSection:)</a>\n </code>\n </div>\n <div class=\"height-container\">\n <div class=\"pointer-container\"></div>\n <section class=\"section\">\n <div class=\"pointer\"></div>\n <div class=\"abstract\">\n <p>Undocumented</p>\n\n </div>\n </section>\n </div>\n </li>\n <li class=\"item\">\n <div>\n <code>\n <a name=\"/s:FC7DanTang15YMSortTableView9tableViewFTCSo11UITableView21cellForRowAtIndexPathCSo11NSIndexPath_CSo15UITableViewCell\"></a>\n <a name=\"//apple_ref/swift/Method/tableView(_:cellForRowAtIndexPath:)\" class=\"dashAnchor\"></a>\n <a class=\"token\" href=\"#/s:FC7DanTang15YMSortTableView9tableViewFTCSo11UITableView21cellForRowAtIndexPathCSo11NSIndexPath_CSo15UITableViewCell\">tableView(_:cellForRowAtIndexPath:)</a>\n </code>\n </div>\n <div class=\"height-container\">\n <div class=\"pointer-container\"></div>\n <section class=\"section\">\n <div class=\"pointer\"></div>\n <div class=\"abstract\">\n <p>Undocumented</p>\n\n </div>\n </section>\n </div>\n </li>\n <li class=\"item\">\n <div>\n <code>\n <a name=\"/s:FC7DanTang15YMSortTableView9tableViewFTCSo11UITableView23didSelectRowAtIndexPathCSo11NSIndexPath_T_\"></a>\n <a name=\"//apple_ref/swift/Method/tableView(_:didSelectRowAtIndexPath:)\" class=\"dashAnchor\"></a>\n <a class=\"token\" href=\"#/s:FC7DanTang15YMSortTableView9tableViewFTCSo11UITableView23didSelectRowAtIndexPathCSo11NSIndexPath_T_\">tableView(_:didSelectRowAtIndexPath:)</a>\n </code>\n </div>\n <div class=\"height-container\">\n <div class=\"pointer-container\"></div>\n <section class=\"section\">\n <div class=\"pointer\"></div>\n <div class=\"abstract\">\n <p>Undocumented</p>\n\n </div>\n </section>\n </div>\n </li>\n </ul>\n </div>\n </section>\n </section>\n <section id=\"footer\">\n <p>&copy; 2016 <a class=\"link\" href=\"\" target=\"_blank\" rel=\"external\"></a>. All rights reserved. (Last updated: 2016-07-27)</p>\n <p>Generated by <a class=\"link\" href=\"https://github.com/realm/jazzy\" target=\"_blank\" rel=\"external\">jazzy ♪♫ v0.6.2</a>, a <a class=\"link\" href=\"http://realm.io\" target=\"_blank\" rel=\"external\">Realm</a> project.</p>\n </section>\n </article>\n </div>\n </body>\n</div>\n</html>\n"} +{"text": "$! Copyright 2015 Artur Shepilko.\n$!\n$! Distributed under the Boost Software License, Version 1.0.\n$! (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)\n$!\n$ THIS_FACILITY = \"BOOSTBUILD\"\n$\n$ verify = f$trnlnm(\"VERIFY_''THIS_FACILITY'\")\n$ save_verify = f$verify(verify)\n$ save_default = f$env(\"DEFAULT\")\n$\n$ SAY := WRITE SYS$OUTPUT\n$\n$ ON WARNING THEN CONTINUE\n$ ON ERROR THEN GOTO ERROR\n$\n$ SAY \"I|Bootstrapping the build engine...\"\n$\n$ set def [.src.engine]\n$ @build_vms /out=[--]bootstrap.log\n$\n$ set def 'save_default'\n$\n$ if f$search(\"[.src.engine.bin_vms]b2.exe\") .eqs. \"\" then goto ERROR\n$ copy [.src.engine.bin_vms]b2.exe []\n$ copy [.src.engine.bin_vms]bjam.exe []\n$\n$ SAY \"I|Bootstrapping is done, B2.EXE created.\"\n$ type sys$input\n$DECK\n\n To build and install under ROOT: directory, run:\n MC []B2 --prefix=\"/root\" install\n\n Set B2 command:\n B2 :== $ROOT:[BIN]B2.EXE\n\n$EOD\n$ sts = 1\n$\n$EXIT:\n$ set def 'save_default'\n$ exit 'sts' + (0 * f$verify(save_verify))\n\n$ERROR:\n$ SAY \"E|Failed to bootstrap build engine, see BOOTSTRAP.LOG for details.\"\n$ sts = 4\n$ goto EXIT\n"} +{"text": "#!/usr/bin/python3 -Es\ntry:\n from subprocess import getstatusoutput\nexcept ImportError:\n from commands import getstatusoutput\nimport sys\nrc = [-1, '']\ntry:\n rc = getstatusoutput(sys.argv[1])\nexcept:\n pass\nif rc[0] == 0:\n print(rc[1])\n"} +{"text": "/*\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef FOLLY_FORMAT_H_\n#error This file may only be included from Format.h.\n#endif\n\n#include <array>\n#include <cinttypes>\n#include <deque>\n#include <map>\n#include <unordered_map>\n#include <vector>\n\n#include <folly/Exception.h>\n#include <folly/FormatTraits.h>\n#include <folly/MapUtil.h>\n#include <folly/Traits.h>\n#include <folly/lang/Exception.h>\n#include <folly/portability/Windows.h>\n\n// Ignore -Wformat-nonliteral and -Wconversion warnings within this file\nFOLLY_PUSH_WARNING\nFOLLY_GNU_DISABLE_WARNING(\"-Wformat-nonliteral\")\nFOLLY_GNU_DISABLE_WARNING(\"-Wconversion\")\n\nnamespace folly {\n\nnamespace detail {\n\n// Updates the end of the buffer after the comma separators have been added.\nvoid insertThousandsGroupingUnsafe(char* start_buffer, char** end_buffer);\n\nextern const std::array<std::array<char, 2>, 256> formatHexUpper;\nextern const std::array<std::array<char, 2>, 256> formatHexLower;\nextern const std::array<std::array<char, 3>, 512> formatOctal;\nextern const std::array<std::array<char, 8>, 256> formatBinary;\n\nconst size_t kMaxHexLength = 2 * sizeof(uintmax_t);\nconst size_t kMaxOctalLength = 3 * sizeof(uintmax_t);\nconst size_t kMaxBinaryLength = 8 * sizeof(uintmax_t);\n\n/**\n * Convert an unsigned to hex, using repr (which maps from each possible\n * 2-hex-bytes value to the 2-character representation).\n *\n * Just like folly::detail::uintToBuffer in Conv.h, writes at the *end* of\n * the supplied buffer and returns the offset of the beginning of the string\n * from the start of the buffer. The formatted string will be in range\n * [buf+begin, buf+bufLen).\n */\ntemplate <class Uint>\nsize_t uintToHex(\n char* buffer,\n size_t bufLen,\n Uint v,\n std::array<std::array<char, 2>, 256> const& repr) {\n // 'v >>= 7, v >>= 1' is no more than a work around to get rid of shift size\n // warning when Uint = uint8_t (it's false as v >= 256 implies sizeof(v) > 1).\n for (; !less_than<unsigned, 256>(v); v >>= 7, v >>= 1) {\n auto b = v & 0xff;\n bufLen -= 2;\n buffer[bufLen] = repr[b][0];\n buffer[bufLen + 1] = repr[b][1];\n }\n buffer[--bufLen] = repr[v][1];\n if (v >= 16) {\n buffer[--bufLen] = repr[v][0];\n }\n return bufLen;\n}\n\n/**\n * Convert an unsigned to hex, using lower-case letters for the digits\n * above 9. See the comments for uintToHex.\n */\ntemplate <class Uint>\ninline size_t uintToHexLower(char* buffer, size_t bufLen, Uint v) {\n return uintToHex(buffer, bufLen, v, formatHexLower);\n}\n\n/**\n * Convert an unsigned to hex, using upper-case letters for the digits\n * above 9. See the comments for uintToHex.\n */\ntemplate <class Uint>\ninline size_t uintToHexUpper(char* buffer, size_t bufLen, Uint v) {\n return uintToHex(buffer, bufLen, v, formatHexUpper);\n}\n\n/**\n * Convert an unsigned to octal.\n *\n * Just like folly::detail::uintToBuffer in Conv.h, writes at the *end* of\n * the supplied buffer and returns the offset of the beginning of the string\n * from the start of the buffer. The formatted string will be in range\n * [buf+begin, buf+bufLen).\n */\ntemplate <class Uint>\nsize_t uintToOctal(char* buffer, size_t bufLen, Uint v) {\n auto& repr = formatOctal;\n // 'v >>= 7, v >>= 2' is no more than a work around to get rid of shift size\n // warning when Uint = uint8_t (it's false as v >= 512 implies sizeof(v) > 1).\n for (; !less_than<unsigned, 512>(v); v >>= 7, v >>= 2) {\n auto b = v & 0x1ff;\n bufLen -= 3;\n buffer[bufLen] = repr[b][0];\n buffer[bufLen + 1] = repr[b][1];\n buffer[bufLen + 2] = repr[b][2];\n }\n buffer[--bufLen] = repr[v][2];\n if (v >= 8) {\n buffer[--bufLen] = repr[v][1];\n }\n if (v >= 64) {\n buffer[--bufLen] = repr[v][0];\n }\n return bufLen;\n}\n\n/**\n * Convert an unsigned to binary.\n *\n * Just like folly::detail::uintToBuffer in Conv.h, writes at the *end* of\n * the supplied buffer and returns the offset of the beginning of the string\n * from the start of the buffer. The formatted string will be in range\n * [buf+begin, buf+bufLen).\n */\ntemplate <class Uint>\nsize_t uintToBinary(char* buffer, size_t bufLen, Uint v) {\n auto& repr = formatBinary;\n if (v == 0) {\n buffer[--bufLen] = '0';\n return bufLen;\n }\n for (; v; v >>= 7, v >>= 1) {\n auto b = v & 0xff;\n bufLen -= 8;\n memcpy(buffer + bufLen, &(repr[b][0]), 8);\n }\n while (buffer[bufLen] == '0') {\n ++bufLen;\n }\n return bufLen;\n}\n\n} // namespace detail\n\ntemplate <class Derived, bool containerMode, class... Args>\nBaseFormatter<Derived, containerMode, Args...>::BaseFormatter(\n StringPiece str,\n Args&&... args)\n : str_(str), values_(std::forward<Args>(args)...) {}\n\ntemplate <class Derived, bool containerMode, class... Args>\ntemplate <class Output>\nvoid BaseFormatter<Derived, containerMode, Args...>::operator()(\n Output& out) const {\n // Copy raw string (without format specifiers) to output;\n // not as simple as we'd like, as we still need to translate \"}}\" to \"}\"\n // and throw if we see any lone \"}\"\n auto outputString = [&out](StringPiece s) {\n auto p = s.begin();\n auto end = s.end();\n while (p != end) {\n auto q = static_cast<const char*>(memchr(p, '}', size_t(end - p)));\n if (!q) {\n out(StringPiece(p, end));\n break;\n }\n ++q;\n out(StringPiece(p, q));\n p = q;\n\n if (p == end || *p != '}') {\n throw_exception<BadFormatArg>(\n \"folly::format: single '}' in format string\");\n }\n ++p;\n }\n };\n\n auto p = str_.begin();\n auto end = str_.end();\n\n int nextArg = 0;\n bool hasDefaultArgIndex = false;\n bool hasExplicitArgIndex = false;\n while (p != end) {\n auto q = static_cast<const char*>(memchr(p, '{', size_t(end - p)));\n if (!q) {\n outputString(StringPiece(p, end));\n break;\n }\n outputString(StringPiece(p, q));\n p = q + 1;\n\n if (p == end) {\n throw_exception<BadFormatArg>(\n \"folly::format: '}' at end of format string\");\n }\n\n // \"{{\" -> \"{\"\n if (*p == '{') {\n out(StringPiece(p, 1));\n ++p;\n continue;\n }\n\n // Format string\n q = static_cast<const char*>(memchr(p, '}', size_t(end - p)));\n if (q == nullptr) {\n throw_exception<BadFormatArg>(\"folly::format: missing ending '}'\");\n }\n FormatArg arg(StringPiece(p, q));\n p = q + 1;\n\n int argIndex = 0;\n auto piece = arg.splitKey<true>(); // empty key component is okay\n if (containerMode) { // static\n arg.enforce(\n arg.width != FormatArg::kDynamicWidth,\n \"dynamic field width not supported in vformat()\");\n if (piece.empty()) {\n arg.setNextIntKey(nextArg++);\n hasDefaultArgIndex = true;\n } else {\n arg.setNextKey(piece);\n hasExplicitArgIndex = true;\n }\n } else {\n if (piece.empty()) {\n if (arg.width == FormatArg::kDynamicWidth) {\n arg.enforce(\n arg.widthIndex == FormatArg::kNoIndex,\n \"cannot provide width arg index without value arg index\");\n int sizeArg = nextArg++;\n arg.width = asDerived().getSizeArg(size_t(sizeArg), arg);\n }\n\n argIndex = nextArg++;\n hasDefaultArgIndex = true;\n } else {\n if (arg.width == FormatArg::kDynamicWidth) {\n arg.enforce(\n arg.widthIndex != FormatArg::kNoIndex,\n \"cannot provide value arg index without width arg index\");\n arg.width = asDerived().getSizeArg(size_t(arg.widthIndex), arg);\n }\n\n auto result = tryTo<int>(piece);\n arg.enforce(result, \"argument index must be integer\");\n argIndex = *result;\n arg.enforce(argIndex >= 0, \"argument index must be non-negative\");\n hasExplicitArgIndex = true;\n }\n }\n\n if (hasDefaultArgIndex && hasExplicitArgIndex) {\n throw_exception<BadFormatArg>(\n \"folly::format: may not have both default and explicit arg indexes\");\n }\n\n asDerived().doFormat(size_t(argIndex), arg, out);\n }\n}\n\ntemplate <class Derived, bool containerMode, class... Args>\nvoid writeTo(\n FILE* fp,\n const BaseFormatter<Derived, containerMode, Args...>& formatter) {\n auto writer = [fp](StringPiece sp) {\n size_t n = fwrite(sp.data(), 1, sp.size(), fp);\n if (n < sp.size()) {\n throwSystemError(\"Formatter writeTo\", \"fwrite failed\");\n }\n };\n formatter(writer);\n}\n\nnamespace format_value {\n\ntemplate <class FormatCallback>\nvoid formatString(StringPiece val, FormatArg& arg, FormatCallback& cb) {\n if (arg.width != FormatArg::kDefaultWidth && arg.width < 0) {\n throw_exception<BadFormatArg>(\"folly::format: invalid width\");\n }\n if (arg.precision != FormatArg::kDefaultPrecision && arg.precision < 0) {\n throw_exception<BadFormatArg>(\"folly::format: invalid precision\");\n }\n\n if (arg.precision != FormatArg::kDefaultPrecision &&\n val.size() > static_cast<size_t>(arg.precision)) {\n val.reset(val.data(), static_cast<size_t>(arg.precision));\n }\n\n constexpr int padBufSize = 128;\n char padBuf[padBufSize];\n\n // Output padding, no more than padBufSize at once\n auto pad = [&padBuf, &cb, padBufSize](int chars) {\n while (chars) {\n int n = std::min(chars, padBufSize);\n cb(StringPiece(padBuf, size_t(n)));\n chars -= n;\n }\n };\n\n int padRemaining = 0;\n if (arg.width != FormatArg::kDefaultWidth &&\n val.size() < static_cast<size_t>(arg.width)) {\n char fill = arg.fill == FormatArg::kDefaultFill ? ' ' : arg.fill;\n int padChars = static_cast<int>(arg.width - val.size());\n memset(padBuf, fill, size_t(std::min(padBufSize, padChars)));\n\n switch (arg.align) {\n case FormatArg::Align::DEFAULT:\n case FormatArg::Align::LEFT:\n padRemaining = padChars;\n break;\n case FormatArg::Align::CENTER:\n pad(padChars / 2);\n padRemaining = padChars - padChars / 2;\n break;\n case FormatArg::Align::RIGHT:\n case FormatArg::Align::PAD_AFTER_SIGN:\n pad(padChars);\n break;\n case FormatArg::Align::INVALID:\n default:\n abort();\n break;\n }\n }\n\n cb(val);\n\n if (padRemaining) {\n pad(padRemaining);\n }\n}\n\ntemplate <class FormatCallback>\nvoid formatNumber(\n StringPiece val,\n int prefixLen,\n FormatArg& arg,\n FormatCallback& cb) {\n // precision means something different for numbers\n arg.precision = FormatArg::kDefaultPrecision;\n if (arg.align == FormatArg::Align::DEFAULT) {\n arg.align = FormatArg::Align::RIGHT;\n } else if (prefixLen && arg.align == FormatArg::Align::PAD_AFTER_SIGN) {\n // Split off the prefix, then do any padding if necessary\n cb(val.subpiece(0, size_t(prefixLen)));\n val.advance(size_t(prefixLen));\n arg.width = std::max(arg.width - prefixLen, 0);\n }\n format_value::formatString(val, arg, cb);\n}\n\ntemplate <\n class FormatCallback,\n class Derived,\n bool containerMode,\n class... Args>\nvoid formatFormatter(\n const BaseFormatter<Derived, containerMode, Args...>& formatter,\n FormatArg& arg,\n FormatCallback& cb) {\n if (arg.width == FormatArg::kDefaultWidth &&\n arg.precision == FormatArg::kDefaultPrecision) {\n // nothing to do\n formatter(cb);\n } else if (\n arg.align != FormatArg::Align::LEFT &&\n arg.align != FormatArg::Align::DEFAULT) {\n // We can only avoid creating a temporary string if we align left,\n // as we'd need to know the size beforehand otherwise\n format_value::formatString(formatter.fbstr(), arg, cb);\n } else {\n auto fn = [&arg, &cb](StringPiece sp) mutable {\n int sz = static_cast<int>(sp.size());\n if (arg.precision != FormatArg::kDefaultPrecision) {\n sz = std::min(arg.precision, sz);\n sp.reset(sp.data(), size_t(sz));\n arg.precision -= sz;\n }\n if (!sp.empty()) {\n cb(sp);\n if (arg.width != FormatArg::kDefaultWidth) {\n arg.width = std::max(arg.width - sz, 0);\n }\n }\n };\n formatter(fn);\n if (arg.width != FormatArg::kDefaultWidth && arg.width != 0) {\n // Rely on formatString to do appropriate padding\n format_value::formatString(StringPiece(), arg, cb);\n }\n }\n}\n\n} // namespace format_value\n\n// Definitions for default FormatValue classes\n\n// Integral types (except bool)\ntemplate <class T>\nclass FormatValue<\n T,\n typename std::enable_if<\n std::is_integral<T>::value && !std::is_same<T, bool>::value>::type> {\n public:\n explicit FormatValue(T val) : val_(val) {}\n\n T getValue() const {\n return val_;\n }\n\n template <class FormatCallback>\n void format(FormatArg& arg, FormatCallback& cb) const {\n arg.validate(FormatArg::Type::INTEGER);\n doFormat(arg, cb);\n }\n\n template <class FormatCallback>\n void doFormat(FormatArg& arg, FormatCallback& cb) const {\n char presentation = arg.presentation;\n if (presentation == FormatArg::kDefaultPresentation) {\n presentation = std::is_same<T, char>::value ? 'c' : 'd';\n }\n\n // Do all work as unsigned, we'll add the prefix ('0' or '0x' if necessary)\n // and sign ourselves.\n typedef typename std::make_unsigned<T>::type UT;\n UT uval;\n char sign;\n if (std::is_signed<T>::value) {\n if (folly::is_negative(val_)) {\n // avoid unary negation of unsigned types, which may be warned against\n // avoid ub signed integer overflow, which ubsan checks against\n uval = UT(0 - static_cast<UT>(val_));\n sign = '-';\n } else {\n uval = static_cast<UT>(val_);\n switch (arg.sign) {\n case FormatArg::Sign::PLUS_OR_MINUS:\n sign = '+';\n break;\n case FormatArg::Sign::SPACE_OR_MINUS:\n sign = ' ';\n break;\n case FormatArg::Sign::DEFAULT:\n case FormatArg::Sign::MINUS:\n case FormatArg::Sign::INVALID:\n default:\n sign = '\\0';\n break;\n }\n }\n } else {\n uval = static_cast<UT>(val_);\n sign = '\\0';\n\n arg.enforce(\n arg.sign == FormatArg::Sign::DEFAULT,\n \"sign specifications not allowed for unsigned values\");\n }\n\n // 1 byte for sign, plus max of:\n // #x: two byte \"0x\" prefix + kMaxHexLength\n // #o: one byte \"0\" prefix + kMaxOctalLength\n // #b: two byte \"0b\" prefix + kMaxBinaryLength\n // n: 19 bytes + 1 NUL\n // ,d: 26 bytes (including thousands separators!)\n //\n // Binary format must take the most space, so we use that.\n //\n // Note that we produce a StringPiece rather than NUL-terminating,\n // so we don't need an extra byte for a NUL.\n constexpr size_t valBufSize = 1 + 2 + detail::kMaxBinaryLength;\n char valBuf[valBufSize];\n char* valBufBegin = nullptr;\n char* valBufEnd = nullptr;\n\n int prefixLen = 0;\n switch (presentation) {\n case 'n': {\n arg.enforce(\n !arg.basePrefix,\n \"base prefix not allowed with '\",\n presentation,\n \"' specifier\");\n\n arg.enforce(\n !arg.thousandsSeparator,\n \"cannot use ',' with the '\",\n presentation,\n \"' specifier\");\n\n valBufBegin = valBuf + 1; // room for sign\n#if defined(__ANDROID__)\n int len = snprintf(\n valBufBegin,\n (valBuf + valBufSize) - valBufBegin,\n \"%\" PRIuMAX,\n static_cast<uintmax_t>(uval));\n#else\n int len = snprintf(\n valBufBegin,\n size_t((valBuf + valBufSize) - valBufBegin),\n \"%ju\",\n static_cast<uintmax_t>(uval));\n#endif\n // valBufSize should always be big enough, so this should never\n // happen.\n assert(len < valBuf + valBufSize - valBufBegin);\n valBufEnd = valBufBegin + len;\n break;\n }\n case 'd':\n arg.enforce(\n !arg.basePrefix,\n \"base prefix not allowed with '\",\n presentation,\n \"' specifier\");\n valBufBegin = valBuf + 1; // room for sign\n\n // Use uintToBuffer, faster than sprintf\n valBufEnd = valBufBegin + uint64ToBufferUnsafe(uval, valBufBegin);\n if (arg.thousandsSeparator) {\n detail::insertThousandsGroupingUnsafe(valBufBegin, &valBufEnd);\n }\n break;\n case 'c':\n arg.enforce(\n !arg.basePrefix,\n \"base prefix not allowed with '\",\n presentation,\n \"' specifier\");\n arg.enforce(\n !arg.thousandsSeparator,\n \"thousands separator (',') not allowed with '\",\n presentation,\n \"' specifier\");\n valBufBegin = valBuf + 1; // room for sign\n *valBufBegin = static_cast<char>(uval);\n valBufEnd = valBufBegin + 1;\n break;\n case 'o':\n case 'O':\n arg.enforce(\n !arg.thousandsSeparator,\n \"thousands separator (',') not allowed with '\",\n presentation,\n \"' specifier\");\n valBufEnd = valBuf + valBufSize;\n valBufBegin = &valBuf[detail::uintToOctal(valBuf, valBufSize, uval)];\n if (arg.basePrefix) {\n *--valBufBegin = '0';\n prefixLen = 1;\n }\n break;\n case 'x':\n arg.enforce(\n !arg.thousandsSeparator,\n \"thousands separator (',') not allowed with '\",\n presentation,\n \"' specifier\");\n valBufEnd = valBuf + valBufSize;\n valBufBegin = &valBuf[detail::uintToHexLower(valBuf, valBufSize, uval)];\n if (arg.basePrefix) {\n *--valBufBegin = 'x';\n *--valBufBegin = '0';\n prefixLen = 2;\n }\n break;\n case 'X':\n arg.enforce(\n !arg.thousandsSeparator,\n \"thousands separator (',') not allowed with '\",\n presentation,\n \"' specifier\");\n valBufEnd = valBuf + valBufSize;\n valBufBegin = &valBuf[detail::uintToHexUpper(valBuf, valBufSize, uval)];\n if (arg.basePrefix) {\n *--valBufBegin = 'X';\n *--valBufBegin = '0';\n prefixLen = 2;\n }\n break;\n case 'b':\n case 'B':\n arg.enforce(\n !arg.thousandsSeparator,\n \"thousands separator (',') not allowed with '\",\n presentation,\n \"' specifier\");\n valBufEnd = valBuf + valBufSize;\n valBufBegin = &valBuf[detail::uintToBinary(valBuf, valBufSize, uval)];\n if (arg.basePrefix) {\n *--valBufBegin = presentation; // 0b or 0B\n *--valBufBegin = '0';\n prefixLen = 2;\n }\n break;\n default:\n arg.error(\"invalid specifier '\", presentation, \"'\");\n }\n\n if (sign) {\n *--valBufBegin = sign;\n ++prefixLen;\n }\n\n format_value::formatNumber(\n StringPiece(valBufBegin, valBufEnd), prefixLen, arg, cb);\n }\n\n private:\n T val_;\n};\n\n// Bool\ntemplate <>\nclass FormatValue<bool> {\n public:\n explicit FormatValue(bool val) : val_(val) {}\n\n template <class FormatCallback>\n void format(FormatArg& arg, FormatCallback& cb) const {\n if (arg.presentation == FormatArg::kDefaultPresentation) {\n arg.validate(FormatArg::Type::OTHER);\n format_value::formatString(val_ ? \"true\" : \"false\", arg, cb);\n } else { // number\n FormatValue<int>(val_).format(arg, cb);\n }\n }\n\n private:\n bool val_;\n};\n\n// double\ntemplate <>\nclass FormatValue<double> {\n public:\n explicit FormatValue(double val) : val_(val) {}\n\n template <class FormatCallback>\n void format(FormatArg& arg, FormatCallback& cb) const {\n fbstring piece;\n int prefixLen;\n formatHelper(piece, prefixLen, arg);\n format_value::formatNumber(piece, prefixLen, arg, cb);\n }\n\n private:\n void formatHelper(fbstring& piece, int& prefixLen, FormatArg& arg) const;\n\n double val_;\n};\n\n// float (defer to double)\ntemplate <>\nclass FormatValue<float> {\n public:\n explicit FormatValue(float val) : val_(val) {}\n\n template <class FormatCallback>\n void format(FormatArg& arg, FormatCallback& cb) const {\n FormatValue<double>(val_).format(arg, cb);\n }\n\n private:\n float val_;\n};\n\n// String-y types (implicitly convertible to StringPiece, except char*)\ntemplate <class T>\nclass FormatValue<\n T,\n typename std::enable_if<\n (!std::is_pointer<T>::value ||\n !std::is_same<\n char,\n typename std::decay<typename std::remove_pointer<T>::type>::type>::\n value) &&\n std::is_convertible<T, StringPiece>::value>::type> {\n public:\n explicit FormatValue(StringPiece val) : val_(val) {}\n\n template <class FormatCallback>\n void format(FormatArg& arg, FormatCallback& cb) const {\n if (arg.keyEmpty()) {\n arg.validate(FormatArg::Type::OTHER);\n arg.enforce(\n arg.presentation == FormatArg::kDefaultPresentation ||\n arg.presentation == 's',\n \"invalid specifier '\",\n arg.presentation,\n \"'\");\n format_value::formatString(val_, arg, cb);\n } else {\n FormatValue<char>(val_.at(size_t(arg.splitIntKey()))).format(arg, cb);\n }\n }\n\n private:\n StringPiece val_;\n};\n\n// Null\ntemplate <>\nclass FormatValue<std::nullptr_t> {\n public:\n explicit FormatValue(std::nullptr_t) {}\n\n template <class FormatCallback>\n void format(FormatArg& arg, FormatCallback& cb) const {\n arg.validate(FormatArg::Type::OTHER);\n arg.enforce(\n arg.presentation == FormatArg::kDefaultPresentation,\n \"invalid specifier '\",\n arg.presentation,\n \"'\");\n format_value::formatString(\"(null)\", arg, cb);\n }\n};\n\n// Partial specialization of FormatValue for char*\ntemplate <class T>\nclass FormatValue<\n T*,\n typename std::enable_if<\n std::is_same<char, typename std::decay<T>::type>::value>::type> {\n public:\n explicit FormatValue(T* val) : val_(val) {}\n\n template <class FormatCallback>\n void format(FormatArg& arg, FormatCallback& cb) const {\n if (arg.keyEmpty()) {\n if (!val_) {\n FormatValue<std::nullptr_t>(nullptr).format(arg, cb);\n } else {\n FormatValue<StringPiece>(val_).format(arg, cb);\n }\n } else {\n FormatValue<typename std::decay<T>::type>(val_[arg.splitIntKey()])\n .format(arg, cb);\n }\n }\n\n private:\n T* val_;\n};\n\n// Partial specialization of FormatValue for void*\ntemplate <class T>\nclass FormatValue<\n T*,\n typename std::enable_if<\n std::is_same<void, typename std::decay<T>::type>::value>::type> {\n public:\n explicit FormatValue(T* val) : val_(val) {}\n\n template <class FormatCallback>\n void format(FormatArg& arg, FormatCallback& cb) const {\n if (!val_) {\n FormatValue<std::nullptr_t>(nullptr).format(arg, cb);\n } else {\n // Print as a pointer, in hex.\n arg.validate(FormatArg::Type::OTHER);\n arg.enforce(\n arg.presentation == FormatArg::kDefaultPresentation,\n \"invalid specifier '\",\n arg.presentation,\n \"'\");\n arg.basePrefix = true;\n arg.presentation = 'x';\n if (arg.align == FormatArg::Align::DEFAULT) {\n arg.align = FormatArg::Align::LEFT;\n }\n FormatValue<uintptr_t>(reinterpret_cast<uintptr_t>(val_))\n .doFormat(arg, cb);\n }\n }\n\n private:\n T* val_;\n};\n\ntemplate <class T, class = void>\nclass TryFormatValue {\n public:\n template <class FormatCallback>\n static void\n formatOrFail(T& /* value */, FormatArg& arg, FormatCallback& /* cb */) {\n arg.error(\"No formatter available for this type\");\n }\n};\n\ntemplate <class T>\nclass TryFormatValue<\n T,\n typename std::enable_if<\n 0 < sizeof(FormatValue<typename std::decay<T>::type>)>::type> {\n public:\n template <class FormatCallback>\n static void formatOrFail(T& value, FormatArg& arg, FormatCallback& cb) {\n FormatValue<typename std::decay<T>::type>(value).format(arg, cb);\n }\n};\n\n// Partial specialization of FormatValue for other pointers\ntemplate <class T>\nclass FormatValue<\n T*,\n typename std::enable_if<\n !std::is_same<char, typename std::decay<T>::type>::value &&\n !std::is_same<void, typename std::decay<T>::type>::value>::type> {\n public:\n explicit FormatValue(T* val) : val_(val) {}\n\n template <class FormatCallback>\n void format(FormatArg& arg, FormatCallback& cb) const {\n if (arg.keyEmpty()) {\n FormatValue<void*>((void*)val_).format(arg, cb);\n } else {\n TryFormatValue<T>::formatOrFail(val_[arg.splitIntKey()], arg, cb);\n }\n }\n\n private:\n T* val_;\n};\n\nnamespace detail {\n\n// std::array\ntemplate <class T, size_t N>\nstruct IndexableTraits<std::array<T, N>>\n : public IndexableTraitsSeq<std::array<T, N>> {};\n\n// std::vector\ntemplate <class T, class A>\nstruct IndexableTraits<std::vector<T, A>>\n : public IndexableTraitsSeq<std::vector<T, A>> {};\n\n// std::deque\ntemplate <class T, class A>\nstruct IndexableTraits<std::deque<T, A>>\n : public IndexableTraitsSeq<std::deque<T, A>> {};\n\n// std::map with integral keys\ntemplate <class K, class T, class C, class A>\nstruct IndexableTraits<\n std::map<K, T, C, A>,\n typename std::enable_if<std::is_integral<K>::value>::type>\n : public IndexableTraitsAssoc<std::map<K, T, C, A>> {};\n\n// std::unordered_map with integral keys\ntemplate <class K, class T, class H, class E, class A>\nstruct IndexableTraits<\n std::unordered_map<K, T, H, E, A>,\n typename std::enable_if<std::is_integral<K>::value>::type>\n : public IndexableTraitsAssoc<std::unordered_map<K, T, H, E, A>> {};\n\n} // namespace detail\n\n// Partial specialization of FormatValue for integer-indexable containers\ntemplate <class T>\nclass FormatValue<T, typename detail::IndexableTraits<T>::enabled> {\n public:\n explicit FormatValue(const T& val) : val_(val) {}\n\n template <class FormatCallback>\n void format(FormatArg& arg, FormatCallback& cb) const {\n FormatValue<typename std::decay<\n typename detail::IndexableTraits<T>::value_type>::type>(\n detail::IndexableTraits<T>::at(val_, arg.splitIntKey()))\n .format(arg, cb);\n }\n\n private:\n const T& val_;\n};\n\ntemplate <class Container, class Value>\nclass FormatValue<\n detail::DefaultValueWrapper<Container, Value>,\n typename detail::IndexableTraits<Container>::enabled> {\n public:\n explicit FormatValue(const detail::DefaultValueWrapper<Container, Value>& val)\n : val_(val) {}\n\n template <class FormatCallback>\n void format(FormatArg& arg, FormatCallback& cb) const {\n FormatValue<typename std::decay<\n typename detail::IndexableTraits<Container>::value_type>::type>(\n detail::IndexableTraits<Container>::at(\n val_.container, arg.splitIntKey(), val_.defaultValue))\n .format(arg, cb);\n }\n\n private:\n const detail::DefaultValueWrapper<Container, Value>& val_;\n};\n\nnamespace detail {\n\n// Define enabled, key_type, convert from StringPiece to the key types\n// that we support\ntemplate <class T>\nstruct KeyFromStringPiece;\n\n// std::string\ntemplate <>\nstruct KeyFromStringPiece<std::string> : public FormatTraitsBase {\n typedef std::string key_type;\n static std::string convert(StringPiece s) {\n return s.toString();\n }\n typedef void enabled;\n};\n\n// fbstring\ntemplate <>\nstruct KeyFromStringPiece<fbstring> : public FormatTraitsBase {\n typedef fbstring key_type;\n static fbstring convert(StringPiece s) {\n return s.to<fbstring>();\n }\n};\n\n// StringPiece\ntemplate <>\nstruct KeyFromStringPiece<StringPiece> : public FormatTraitsBase {\n typedef StringPiece key_type;\n static StringPiece convert(StringPiece s) {\n return s;\n }\n};\n\n// Base class for associative types keyed by strings\ntemplate <class T>\nstruct KeyableTraitsAssoc : public FormatTraitsBase {\n typedef typename T::key_type key_type;\n typedef typename T::value_type::second_type value_type;\n static const value_type& at(const T& map, StringPiece key) {\n if (auto ptr = get_ptr(map, KeyFromStringPiece<key_type>::convert(key))) {\n return *ptr;\n }\n throw_exception<FormatKeyNotFoundException>(key);\n }\n static const value_type&\n at(const T& map, StringPiece key, const value_type& dflt) {\n auto pos = map.find(KeyFromStringPiece<key_type>::convert(key));\n return pos != map.end() ? pos->second : dflt;\n }\n};\n\n// Define enabled, key_type, value_type, at() for supported string-keyed\n// types\ntemplate <class T, class Enabled = void>\nstruct KeyableTraits;\n\n// std::map with string key\ntemplate <class K, class T, class C, class A>\nstruct KeyableTraits<\n std::map<K, T, C, A>,\n typename KeyFromStringPiece<K>::enabled>\n : public KeyableTraitsAssoc<std::map<K, T, C, A>> {};\n\n// std::unordered_map with string key\ntemplate <class K, class T, class H, class E, class A>\nstruct KeyableTraits<\n std::unordered_map<K, T, H, E, A>,\n typename KeyFromStringPiece<K>::enabled>\n : public KeyableTraitsAssoc<std::unordered_map<K, T, H, E, A>> {};\n\n} // namespace detail\n\n// Partial specialization of FormatValue for string-keyed containers\ntemplate <class T>\nclass FormatValue<T, typename detail::KeyableTraits<T>::enabled> {\n public:\n explicit FormatValue(const T& val) : val_(val) {}\n\n template <class FormatCallback>\n void format(FormatArg& arg, FormatCallback& cb) const {\n FormatValue<typename std::decay<\n typename detail::KeyableTraits<T>::value_type>::type>(\n detail::KeyableTraits<T>::at(val_, arg.splitKey()))\n .format(arg, cb);\n }\n\n private:\n const T& val_;\n};\n\ntemplate <class Container, class Value>\nclass FormatValue<\n detail::DefaultValueWrapper<Container, Value>,\n typename detail::KeyableTraits<Container>::enabled> {\n public:\n explicit FormatValue(const detail::DefaultValueWrapper<Container, Value>& val)\n : val_(val) {}\n\n template <class FormatCallback>\n void format(FormatArg& arg, FormatCallback& cb) const {\n FormatValue<typename std::decay<\n typename detail::KeyableTraits<Container>::value_type>::type>(\n detail::KeyableTraits<Container>::at(\n val_.container, arg.splitKey(), val_.defaultValue))\n .format(arg, cb);\n }\n\n private:\n const detail::DefaultValueWrapper<Container, Value>& val_;\n};\n\n// Partial specialization of FormatValue for pairs\ntemplate <class A, class B>\nclass FormatValue<std::pair<A, B>> {\n public:\n explicit FormatValue(const std::pair<A, B>& val) : val_(val) {}\n\n template <class FormatCallback>\n void format(FormatArg& arg, FormatCallback& cb) const {\n int key = arg.splitIntKey();\n switch (key) {\n case 0:\n FormatValue<typename std::decay<A>::type>(val_.first).format(arg, cb);\n break;\n case 1:\n FormatValue<typename std::decay<B>::type>(val_.second).format(arg, cb);\n break;\n default:\n arg.error(\"invalid index for pair\");\n }\n }\n\n private:\n const std::pair<A, B>& val_;\n};\n\n// Partial specialization of FormatValue for tuples\ntemplate <class... Args>\nclass FormatValue<std::tuple<Args...>> {\n typedef std::tuple<Args...> Tuple;\n\n public:\n explicit FormatValue(const Tuple& val) : val_(val) {}\n\n template <class FormatCallback>\n void format(FormatArg& arg, FormatCallback& cb) const {\n int key = arg.splitIntKey();\n arg.enforce(key >= 0, \"tuple index must be non-negative\");\n doFormat(size_t(key), arg, cb);\n }\n\n private:\n static constexpr size_t valueCount = std::tuple_size<Tuple>::value;\n\n template <size_t K, class Callback>\n typename std::enable_if<K == valueCount>::type\n doFormatFrom(size_t i, FormatArg& arg, Callback& /* cb */) const {\n arg.error(\"tuple index out of range, max=\", i);\n }\n\n template <size_t K, class Callback>\n typename std::enable_if<(K < valueCount)>::type\n doFormatFrom(size_t i, FormatArg& arg, Callback& cb) const {\n if (i == K) {\n FormatValue<typename std::decay<\n typename std::tuple_element<K, Tuple>::type>::type>(std::get<K>(val_))\n .format(arg, cb);\n } else {\n doFormatFrom<K + 1>(i, arg, cb);\n }\n }\n\n template <class Callback>\n void doFormat(size_t i, FormatArg& arg, Callback& cb) const {\n return doFormatFrom<0>(i, arg, cb);\n }\n\n const Tuple& val_;\n};\n\n// Partial specialization of FormatValue for nested Formatters\ntemplate <bool containerMode, class... Args, template <bool, class...> class F>\nclass FormatValue<\n F<containerMode, Args...>,\n typename std::enable_if<\n detail::IsFormatter<F<containerMode, Args...>>::value>::type> {\n typedef typename F<containerMode, Args...>::BaseType FormatterValue;\n\n public:\n explicit FormatValue(const FormatterValue& f) : f_(f) {}\n\n template <class FormatCallback>\n void format(FormatArg& arg, FormatCallback& cb) const {\n format_value::formatFormatter(f_, arg, cb);\n }\n\n private:\n const FormatterValue& f_;\n};\n\n/**\n * Formatter objects can be appended to strings, and therefore they're\n * compatible with folly::toAppend and folly::to.\n */\ntemplate <class Tgt, class Derived, bool containerMode, class... Args>\ntypename std::enable_if<IsSomeString<Tgt>::value>::type toAppend(\n const BaseFormatter<Derived, containerMode, Args...>& value,\n Tgt* result) {\n value.appendTo(*result);\n}\n\n} // namespace folly\n\nFOLLY_POP_WARNING\n"} +{"text": "/*\nCopyright_License {\n\n XCSoar Glide Computer - http://www.xcsoar.org/\n Copyright (C) 2000-2016 The XCSoar Project\n A detailed list of copyright holders can be found in the file \"AUTHORS\".\n\n This program is free software; you can redistribute it and/or\n modify it under the terms of the GNU General Public License\n as published by the Free Software Foundation; either version 2\n of the License, or (at your option) any later version.\n\n This program is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n GNU General Public License for more details.\n\n You should have received a copy of the GNU General Public License\n along with this program; if not, write to the Free Software\n Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n}\n*/\n\n#ifndef XCSOAR_DEBUG_REPLAY_FILE_HPP\n#define XCSOAR_DEBUG_REPLAY_FILE_HPP\n\n#include \"DebugReplay.hpp\"\n#include \"IO/FileLineReader.hpp\"\n\nclass DebugReplayFile : public DebugReplay {\nprotected:\n FileLineReaderA *reader;\n\npublic:\n DebugReplayFile(FileLineReaderA *_reader)\n : reader(_reader) {\n }\n\n ~DebugReplayFile() {\n delete reader;\n }\n\n long Size() const {\n return reader->GetSize();\n }\n\n long Tell() const {\n return reader->Tell();\n }\n};\n\n#endif\n"} +{"text": "/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n.components-customnumber-editor {\r\n width: 100%;\r\n height: 100%;\r\n margin: 0;\r\n}\r\n"} +{"text": "/*\nCopyright (c) 2018-2020 Uber Technologies, Inc.\n\nThis source code is licensed under the MIT license found in the\nLICENSE file in the root directory of this source tree.\n*/\n// @flow\nimport * as React from 'react';\nimport {Button} from '../../button/index.js';\nimport {toaster, ToasterContainer, PLACEMENT} from '../index.js';\n\nexport default function Scenario() {\n return (\n <React.Fragment>\n {/* eslint-disable-next-line jsx-a11y/no-autofocus */}\n <ToasterContainer placement={PLACEMENT.bottomRight} autoFocus />\n <p>\n Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean\n ultricies lacus non quam placerat vehicula.\n </p>\n <p>\n Maecenas ullamcorper volutpat lectus, eget placerat nisi hendrerit at.\n Sed at erat mauris.\n </p>\n <Button\n id=\"default\"\n type=\"button\"\n onClick={() => {\n toaster.positive('Your toast is ready.');\n }}\n >\n Activate toast\n </Button>\n <p>\n Praesent non sodales nunc. Quisque sagittis, ligula eu lacinia\n fringilla, urna nisi porttitor ligula, ac fringilla felis leo eu augue.\n </p>\n <p>Integer eget ligula magna. Morbi tincidunt fringilla consequat.</p>\n <Button>This does nothing</Button>\n </React.Fragment>\n );\n}\n"} +{"text": "{-# LANGUAGE TypeFamilies #-}\n\nmodule Graphics.Hoodle.Render.Type.Select where\n\nimport Control.Lens\nimport Data.Hoodle.Generic\nimport Data.Hoodle.Select\nimport Data.Hoodle.Zipper\nimport Data.IntMap hiding (fromList, map)\nimport Graphics.Hoodle.Render.Type.Background\nimport Graphics.Hoodle.Render.Type.HitTest\nimport Graphics.Hoodle.Render.Type.Hoodle\nimport Graphics.Hoodle.Render.Type.Item\n\n----------------------------\n-- select state rendering --\n----------------------------\n\ntype SLayerF a = GLayer (BufOf a) TEitherAlterHitted (ItmOf a)\n\ntype family ItmOf a :: *\n\ntype family BufOf a :: *\n\ntype instance BufOf (GLayer b s a) = b\n\ntype instance ItmOf RLayer = RItem\n\ndata HLayersF s a\n = HLayersF\n { hlyrt_selectedLayer :: SLayerF a,\n hlyrt_otherLayers :: s a\n }\n\ntype HLayers = HLayersF ZipperSelect RLayer\n\ntype HLayer = SLayerF RLayer\n\nselectedLayer :: Simple Lens HLayers HLayer\nselectedLayer = lens hlyrt_selectedLayer (\\f a -> f {hlyrt_selectedLayer = a})\n\notherLayers :: Simple Lens HLayers (ZipperSelect RLayer)\notherLayers = lens hlyrt_otherLayers (\\f a -> f {hlyrt_otherLayers = a})\n\n-- |\ntype HPage =\n GPage RBackground (HLayersF ZipperSelect) RLayer\n\n-- |\ntype HHoodle =\n GSelect (IntMap RPage) (Maybe (Int, HPage))\n\n-- |\nhLayer2RLayer :: HLayer -> RLayer\nhLayer2RLayer l =\n case unTEitherAlterHitted (view gitems l) of\n Left strs -> GLayer (view gbuffer l) strs\n Right alist ->\n GLayer (view gbuffer l) . Prelude.concat $\n interleave id unHitted alist\n\n-- |\nhPage2RPage :: HPage -> RPage\nhPage2RPage p =\n let HLayersF s others = view glayers p\n s' = hLayer2RLayer s\n in GPage (view gdimension p) (view gbackground p) (replace s' others)\n\n-- |\nmkHPage :: RPage -> HPage\nmkHPage p =\n let sz = view glayers p\n curr = current sz\n currtemp = GLayer (view gbuffer curr) (TEitherAlterHitted . Left . view gitems $ curr)\n in GPage\n (view gdimension p)\n (view gbackground p)\n (HLayersF currtemp sz)\n"} +{"text": "# Licensed under the Apache License, Version 2.0 (the \"License\");\n# you may not use this file except in compliance with the License.\n# You may obtain a copy of the License at\n#\n# http://www.apache.org/licenses/LICENSE-2.0\n#\n# Unless required by applicable law or agreed to in writing, software\n# distributed under the License is distributed on an \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n# See the License for the specific language governing permissions and\n# limitations under the License.\n"} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<!--\n Copyright 2015 Google Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n -->\n\n<objectAnimator\n xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:propertyName=\"pathData\"\n android:valueFrom=\"@string/path_follow_minus\"\n android:valueTo=\"@string/path_follow_plus\"\n android:valueType=\"pathType\"\n android:duration=\"@android:integer/config_mediumAnimTime\"\n android:interpolator=\"@android:interpolator/fast_out_slow_in\" />\n"} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<metadata>\n\t<layout title=\"com_content_article_view_default_title\" option=\"com_content_article_view_default_option\">\n\t\t<help\n\t\t\tkey = \"JHELP_MENUS_MENU_ITEM_ARTICLE_SINGLE_ARTICLE\"\n\t\t/>\n\t\t<message>\n\t\t\t<![CDATA[com_content_article_view_default_desc]]>\n\t\t</message>\n\t</layout>\n\n\t<!-- Add fields to the request variables for the layout. -->\n\t<fields name=\"request\">\n\t\t<fieldset name=\"request\"\n\t\t\taddfieldpath=\"/administrator/components/com_content/models/fields\">\n\n\t\t\t<field \n\t\t\t\tname=\"id\" \n\t\t\t\ttype=\"modal_article\"\n\t\t\t\tlabel=\"COM_CONTENT_FIELD_SELECT_ARTICLE_LABEL\"\n\t\t\t\tdescription=\"COM_CONTENT_FIELD_SELECT_ARTICLE_DESC\"\n\t\t\t\trequired=\"true\"\n\t\t\t\tselect=\"true\"\n\t\t\t\tnew=\"true\"\n\t\t\t\tedit=\"true\"\n\t\t\t\tclear=\"true\"\n\t\t\t/>\n\t\t</fieldset>\n\t</fields>\n\n\t<!-- Add fields to the parameters object for the layout. -->\n\t<fields name=\"params\">\n\n\t\t<!-- Basic options. -->\n\t\t<fieldset name=\"basic\"\n\t\t\tlabel=\"COM_CONTENT_ATTRIBS_ARTICLE_SETTINGS_LABEL\">\n\n\t\t<field\n\t\t\tname=\"show_title\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"JGLOBAL_SHOW_TITLE_LABEL\"\n\t\t\tdescription=\"JGLOBAL_SHOW_TITLE_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\tclass=\"chzn-color\"\n\t\t\t>\n\t\t\t<option value=\"1\">JSHOW</option>\n\t\t\t<option value=\"0\">JHIDE</option>\n\t\t</field>\n\n\t\t<field\n\t\t\tname=\"link_titles\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"JGLOBAL_LINKED_TITLES_LABEL\"\n\t\t\tdescription=\"JGLOBAL_LINKED_TITLES_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\tclass=\"chzn-color\"\n\t\t\t>\n\t\t\t<option value=\"1\">JYES</option>\n\t\t\t<option value=\"0\">JNO</option>\n\t\t</field>\n\n\t\t<field \n\t\t\tname=\"show_intro\" \n\t\t\ttype=\"list\"\n\t\t\tlabel=\"JGLOBAL_SHOW_INTRO_LABEL\"\n\t\t\tdescription=\"JGLOBAL_SHOW_INTRO_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\tclass=\"chzn-color\"\n\t\t\t>\n\t\t\t<option value=\"1\">JSHOW</option>\n\t\t\t<option value=\"0\">JHIDE</option>\n\t\t</field>\n\n\t\t<field\n\t\t\tname=\"info_block_position\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL\"\n\t\t\tdescription=\"COM_CONTENT_FIELD_INFOBLOCK_POSITION_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\t>\n\t\t\t<option value=\"0\">COM_CONTENT_FIELD_OPTION_ABOVE</option>\n\t\t\t<option value=\"1\">COM_CONTENT_FIELD_OPTION_BELOW</option>\n\t\t\t<option value=\"2\">COM_CONTENT_FIELD_OPTION_SPLIT</option>\n\t\t</field>\n\n\t\t<field\n\t\t\tname=\"info_block_show_title\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"COM_CONTENT_FIELD_INFOBLOCK_TITLE_LABEL\"\n\t\t\tdescription=\"COM_CONTENT_FIELD_INFOBLOCK_TITLE_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\tclass=\"chzn-color\"\n\t\t\t>\n\t\t\t<option\tvalue=\"1\">JSHOW</option>\n\t\t\t<option\tvalue=\"0\">JHIDE</option>\n\t\t</field>\n\n\t\t<field\n\t\t\tname=\"show_category\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"JGLOBAL_SHOW_CATEGORY_LABEL\"\n\t\t\tdescription=\"JGLOBAL_SHOW_CATEGORY_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\tclass=\"chzn-color\"\n\t\t\t>\n\t\t\t<option value=\"1\">JSHOW</option>\n\t\t\t<option value=\"0\">JHIDE</option>\n\t\t</field>\n\n\t\t<field\n\t\t\tname=\"link_category\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"JGLOBAL_LINK_CATEGORY_LABEL\"\n\t\t\tdescription=\"JGLOBAL_LINK_CATEGORY_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\tclass=\"chzn-color\"\n\t\t\t>\n\t\t\t<option value=\"1\">JYES</option>\n\t\t\t<option value=\"0\">JNO</option>\n\t\t</field>\n\n\t\t<field\n\t\t\tname=\"show_parent_category\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"JGLOBAL_SHOW_PARENT_CATEGORY_LABEL\"\n\t\t\tdescription=\"JGLOBAL_SHOW_PARENT_CATEGORY_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\tclass=\"chzn-color\"\n\t\t\t>\n\t\t\t<option value=\"1\">JSHOW</option>\n\t\t\t<option value=\"0\">JHIDE</option>\n\t\t</field>\n\n\t\t<field\n\t\t\tname=\"link_parent_category\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"JGLOBAL_LINK_PARENT_CATEGORY_LABEL\"\n\t\t\tdescription=\"JGLOBAL_LINK_PARENT_CATEGORY_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\tclass=\"chzn-color\"\n\t\t\t>\n\t\t\t<option value=\"1\">JYES</option>\n\t\t\t<option value=\"0\">JNO</option>\n\t\t</field>\n\n\t\t<field\n\t\t\tname=\"show_associations\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"JGLOBAL_SHOW_ASSOCIATIONS_LABEL\"\n\t\t\tdescription=\"JGLOBAL_SHOW_ASSOCIATIONS_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\tclass=\"chzn-color\"\n\t\t\t>\n\t\t\t<option value=\"1\">JSHOW</option>\n\t\t\t<option value=\"0\">JHIDE</option>\n\t\t</field>\n\n\t\t<field\n\t\t\tname=\"show_author\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"JGLOBAL_SHOW_AUTHOR_LABEL\"\n\t\t\tdescription=\"JGLOBAL_SHOW_AUTHOR_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\tclass=\"chzn-color\"\n\t\t\t>\n\t\t\t<option value=\"1\">JSHOW</option>\n\t\t\t<option value=\"0\">JHIDE</option>\n\t\t</field>\n\n\t\t<field\n\t\t\tname=\"link_author\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"JGLOBAL_LINK_AUTHOR_LABEL\"\n\t\t\tdescription=\"JGLOBAL_LINK_AUTHOR_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\tclass=\"chzn-color\"\n\t\t\t>\n\t\t\t<option value=\"1\">JYES</option>\n\t\t\t<option value=\"0\">JNO</option>\n\t\t</field>\n\n\t\t<field\n\t\t\tname=\"show_create_date\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"JGLOBAL_SHOW_CREATE_DATE_LABEL\"\n\t\t\tdescription=\"JGLOBAL_SHOW_CREATE_DATE_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\tclass=\"chzn-color\"\n\t\t\t>\n\t\t\t<option value=\"1\">JSHOW</option>\n\t\t\t<option value=\"0\">JHIDE</option>\n\t\t</field>\n\n\t\t<field\n\t\t\tname=\"show_modify_date\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"JGLOBAL_SHOW_MODIFY_DATE_LABEL\"\n\t\t\tdescription=\"JGLOBAL_SHOW_MODIFY_DATE_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\tclass=\"chzn-color\"\n\t\t\t>\n\t\t\t<option value=\"1\">JSHOW</option>\n\t\t\t<option value=\"0\">JHIDE</option>\n\t\t</field>\n\n\t\t<field\n\t\t\tname=\"show_publish_date\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"JGLOBAL_SHOW_PUBLISH_DATE_LABEL\"\n\t\t\tdescription=\"JGLOBAL_SHOW_PUBLISH_DATE_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\tclass=\"chzn-color\"\n\t\t\t>\n\t\t\t<option value=\"1\">JSHOW</option>\n\t\t\t<option value=\"0\">JHIDE</option>\n\t\t</field>\n\n\t\t<field\n\t\t\tname=\"show_item_navigation\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"JGLOBAL_SHOW_NAVIGATION_LABEL\"\n\t\t\tdescription=\"JGLOBAL_SHOW_NAVIGATION_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\tclass=\"chzn-color\"\n\t\t\t>\n\t\t\t<option value=\"1\">JSHOW</option>\n\t\t\t<option value=\"0\">JHIDE</option>\n\t\t</field>\n\n\t\t<field\n\t\t\tname=\"show_vote\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"JGLOBAL_SHOW_VOTE_LABEL\"\n\t\t\tdescription=\"JGLOBAL_SHOW_VOTE_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\tclass=\"chzn-color\"\n\t\t\t>\n\t\t\t<option value=\"1\">JSHOW</option>\n\t\t\t<option value=\"0\">JHIDE</option>\n\t\t</field>\n\n\t\t<field\n\t\t\tname=\"show_icons\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"JGLOBAL_SHOW_ICONS_LABEL\"\n\t\t\tdescription=\"JGLOBAL_SHOW_ICONS_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\tclass=\"chzn-color\"\n\t\t\t>\n\t\t\t<option value=\"1\">JSHOW</option>\n\t\t\t<option value=\"0\">JHIDE</option>\n\t\t</field>\n\n\t\t<field\n\t\t\tname=\"show_print_icon\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"JGLOBAL_SHOW_PRINT_ICON_LABEL\"\n\t\t\tdescription=\"JGLOBAL_SHOW_PRINT_ICON_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\tclass=\"chzn-color\"\n\t\t\t>\n\t\t\t<option value=\"1\">JSHOW</option>\n\t\t\t<option value=\"0\">JHIDE</option>\n\t\t</field>\n\n\t\t<field\n\t\t\tname=\"show_email_icon\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"JGLOBAL_SHOW_EMAIL_ICON_LABEL\"\n\t\t\tdescription=\"JGLOBAL_SHOW_EMAIL_ICON_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\tclass=\"chzn-color\"\n\t\t\t>\n\t\t\t<option value=\"1\">JSHOW</option>\n\t\t\t<option value=\"0\">JHIDE</option>\n\t\t</field>\n\n\t\t<field\n\t\t\tname=\"show_hits\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"JGLOBAL_SHOW_HITS_LABEL\"\n\t\t\tdescription=\"JGLOBAL_SHOW_HITS_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\tclass=\"chzn-color\"\n\t\t\t>\n\t\t\t<option value=\"1\">JSHOW</option>\n\t\t\t<option value=\"0\">JHIDE</option>\n\t\t</field>\n\n\t\t<field\n\t\t\tname=\"show_tags\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"JGLOBAL_SHOW_TAGS_LABEL\"\n\t\t\tdescription=\"JGLOBAL_SHOW_TAGS_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\tclass=\"chzn-color\"\n\t\t\t>\n\t\t\t<option value=\"1\">JSHOW</option>\n\t\t\t<option value=\"0\">JHIDE</option>\n\t\t</field>\n\n\t\t<field\n\t\t\tname=\"show_noauth\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"JGLOBAL_SHOW_UNAUTH_LINKS_LABEL\"\n\t\t\tdescription=\"JGLOBAL_SHOW_UNAUTH_LINKS_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\tclass=\"chzn-color\"\n\t\t\t>\n\t\t\t<option value=\"1\">JYES</option>\n\t\t\t<option value=\"0\">JNO</option>\n\t\t</field>\n\t\t<field\n\t\t\tname=\"urls_position\"\n\t\t\ttype=\"list\"\n\t\t\tlabel=\"COM_CONTENT_FIELD_URLSPOSITION_LABEL\"\n\t\t\tdescription=\"COM_CONTENT_FIELD_URLSPOSITION_DESC\"\n\t\t\tuseglobal=\"true\"\n\t\t\t>\n\t\t\t<option value=\"0\">COM_CONTENT_FIELD_OPTION_ABOVE</option>\n\t\t\t<option value=\"1\">COM_CONTENT_FIELD_OPTION_BELOW</option>\n\t\t</field>\n\t\t</fieldset>\n\t</fields>\n</metadata>\n"} +{"text": "// Extensions for Protocol Buffers to create more go like structures.\n//\n// Copyright (c) 2013, Vastech SA (PTY) LTD. All rights reserved.\n// http://github.com/gogo/protobuf/gogoproto\n//\n// Go support for Protocol Buffers - Google's data interchange format\n//\n// Copyright 2010 The Go Authors. All rights reserved.\n// https://github.com/golang/protobuf\n//\n// Redistribution and use in source and binary forms, with or without\n// modification, are permitted provided that the following conditions are\n// met:\n//\n// * Redistributions of source code must retain the above copyright\n// notice, this list of conditions and the following disclaimer.\n// * Redistributions in binary form must reproduce the above\n// copyright notice, this list of conditions and the following disclaimer\n// in the documentation and/or other materials provided with the\n// distribution.\n// * Neither the name of Google Inc. nor the names of its\n// contributors may be used to endorse or promote products derived from\n// this software without specific prior written permission.\n//\n// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n// \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n\npackage proto\n\n/*\n * Routines for encoding data into the wire format for protocol buffers.\n */\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"os\"\n\t\"reflect\"\n\t\"sort\"\n\t\"strconv\"\n\t\"strings\"\n\t\"sync\"\n)\n\nconst debug bool = false\n\n// Constants that identify the encoding of a value on the wire.\nconst (\n\tWireVarint = 0\n\tWireFixed64 = 1\n\tWireBytes = 2\n\tWireStartGroup = 3\n\tWireEndGroup = 4\n\tWireFixed32 = 5\n)\n\nconst startSize = 10 // initial slice/string sizes\n\n// Encoders are defined in encode.go\n// An encoder outputs the full representation of a field, including its\n// tag and encoder type.\ntype encoder func(p *Buffer, prop *Properties, base structPointer) error\n\n// A valueEncoder encodes a single integer in a particular encoding.\ntype valueEncoder func(o *Buffer, x uint64) error\n\n// Sizers are defined in encode.go\n// A sizer returns the encoded size of a field, including its tag and encoder\n// type.\ntype sizer func(prop *Properties, base structPointer) int\n\n// A valueSizer returns the encoded size of a single integer in a particular\n// encoding.\ntype valueSizer func(x uint64) int\n\n// Decoders are defined in decode.go\n// A decoder creates a value from its wire representation.\n// Unrecognized subelements are saved in unrec.\ntype decoder func(p *Buffer, prop *Properties, base structPointer) error\n\n// A valueDecoder decodes a single integer in a particular encoding.\ntype valueDecoder func(o *Buffer) (x uint64, err error)\n\n// A oneofMarshaler does the marshaling for all oneof fields in a message.\ntype oneofMarshaler func(Message, *Buffer) error\n\n// A oneofUnmarshaler does the unmarshaling for a oneof field in a message.\ntype oneofUnmarshaler func(Message, int, int, *Buffer) (bool, error)\n\n// A oneofSizer does the sizing for all oneof fields in a message.\ntype oneofSizer func(Message) int\n\n// tagMap is an optimization over map[int]int for typical protocol buffer\n// use-cases. Encoded protocol buffers are often in tag order with small tag\n// numbers.\ntype tagMap struct {\n\tfastTags []int\n\tslowTags map[int]int\n}\n\n// tagMapFastLimit is the upper bound on the tag number that will be stored in\n// the tagMap slice rather than its map.\nconst tagMapFastLimit = 1024\n\nfunc (p *tagMap) get(t int) (int, bool) {\n\tif t > 0 && t < tagMapFastLimit {\n\t\tif t >= len(p.fastTags) {\n\t\t\treturn 0, false\n\t\t}\n\t\tfi := p.fastTags[t]\n\t\treturn fi, fi >= 0\n\t}\n\tfi, ok := p.slowTags[t]\n\treturn fi, ok\n}\n\nfunc (p *tagMap) put(t int, fi int) {\n\tif t > 0 && t < tagMapFastLimit {\n\t\tfor len(p.fastTags) < t+1 {\n\t\t\tp.fastTags = append(p.fastTags, -1)\n\t\t}\n\t\tp.fastTags[t] = fi\n\t\treturn\n\t}\n\tif p.slowTags == nil {\n\t\tp.slowTags = make(map[int]int)\n\t}\n\tp.slowTags[t] = fi\n}\n\n// StructProperties represents properties for all the fields of a struct.\n// decoderTags and decoderOrigNames should only be used by the decoder.\ntype StructProperties struct {\n\tProp []*Properties // properties for each field\n\treqCount int // required count\n\tdecoderTags tagMap // map from proto tag to struct field number\n\tdecoderOrigNames map[string]int // map from original name to struct field number\n\torder []int // list of struct field numbers in tag order\n\tunrecField field // field id of the XXX_unrecognized []byte field\n\textendable bool // is this an extendable proto\n\n\toneofMarshaler oneofMarshaler\n\toneofUnmarshaler oneofUnmarshaler\n\toneofSizer oneofSizer\n\tstype reflect.Type\n\n\t// OneofTypes contains information about the oneof fields in this message.\n\t// It is keyed by the original name of a field.\n\tOneofTypes map[string]*OneofProperties\n}\n\n// OneofProperties represents information about a specific field in a oneof.\ntype OneofProperties struct {\n\tType reflect.Type // pointer to generated struct type for this oneof field\n\tField int // struct field number of the containing oneof in the message\n\tProp *Properties\n}\n\n// Implement the sorting interface so we can sort the fields in tag order, as recommended by the spec.\n// See encode.go, (*Buffer).enc_struct.\n\nfunc (sp *StructProperties) Len() int { return len(sp.order) }\nfunc (sp *StructProperties) Less(i, j int) bool {\n\treturn sp.Prop[sp.order[i]].Tag < sp.Prop[sp.order[j]].Tag\n}\nfunc (sp *StructProperties) Swap(i, j int) { sp.order[i], sp.order[j] = sp.order[j], sp.order[i] }\n\n// Properties represents the protocol-specific behavior of a single struct field.\ntype Properties struct {\n\tName string // name of the field, for error messages\n\tOrigName string // original name before protocol compiler (always set)\n\tJSONName string // name to use for JSON; determined by protoc\n\tWire string\n\tWireType int\n\tTag int\n\tRequired bool\n\tOptional bool\n\tRepeated bool\n\tPacked bool // relevant for repeated primitives only\n\tEnum string // set for enum types only\n\tproto3 bool // whether this is known to be a proto3 field; set for []byte only\n\toneof bool // whether this is a oneof field\n\n\tDefault string // default value\n\tHasDefault bool // whether an explicit default was provided\n\tCustomType string\n\tdef_uint64 uint64\n\n\tenc encoder\n\tvalEnc valueEncoder // set for bool and numeric types only\n\tfield field\n\ttagcode []byte // encoding of EncodeVarint((Tag<<3)|WireType)\n\ttagbuf [8]byte\n\tstype reflect.Type // set for struct types only\n\tsstype reflect.Type // set for slices of structs types only\n\tctype reflect.Type // set for custom types only\n\tsprop *StructProperties // set for struct types only\n\tisMarshaler bool\n\tisUnmarshaler bool\n\n\tmtype reflect.Type // set for map types only\n\tmkeyprop *Properties // set for map types only\n\tmvalprop *Properties // set for map types only\n\n\tsize sizer\n\tvalSize valueSizer // set for bool and numeric types only\n\n\tdec decoder\n\tvalDec valueDecoder // set for bool and numeric types only\n\n\t// If this is a packable field, this will be the decoder for the packed version of the field.\n\tpackedDec decoder\n}\n\n// String formats the properties in the protobuf struct field tag style.\nfunc (p *Properties) String() string {\n\ts := p.Wire\n\ts = \",\"\n\ts += strconv.Itoa(p.Tag)\n\tif p.Required {\n\t\ts += \",req\"\n\t}\n\tif p.Optional {\n\t\ts += \",opt\"\n\t}\n\tif p.Repeated {\n\t\ts += \",rep\"\n\t}\n\tif p.Packed {\n\t\ts += \",packed\"\n\t}\n\ts += \",name=\" + p.OrigName\n\tif p.JSONName != p.OrigName {\n\t\ts += \",json=\" + p.JSONName\n\t}\n\tif p.proto3 {\n\t\ts += \",proto3\"\n\t}\n\tif p.oneof {\n\t\ts += \",oneof\"\n\t}\n\tif len(p.Enum) > 0 {\n\t\ts += \",enum=\" + p.Enum\n\t}\n\tif p.HasDefault {\n\t\ts += \",def=\" + p.Default\n\t}\n\treturn s\n}\n\n// Parse populates p by parsing a string in the protobuf struct field tag style.\nfunc (p *Properties) Parse(s string) {\n\t// \"bytes,49,opt,name=foo,def=hello!\"\n\tfields := strings.Split(s, \",\") // breaks def=, but handled below.\n\tif len(fields) < 2 {\n\t\tfmt.Fprintf(os.Stderr, \"proto: tag has too few fields: %q\\n\", s)\n\t\treturn\n\t}\n\n\tp.Wire = fields[0]\n\tswitch p.Wire {\n\tcase \"varint\":\n\t\tp.WireType = WireVarint\n\t\tp.valEnc = (*Buffer).EncodeVarint\n\t\tp.valDec = (*Buffer).DecodeVarint\n\t\tp.valSize = sizeVarint\n\tcase \"fixed32\":\n\t\tp.WireType = WireFixed32\n\t\tp.valEnc = (*Buffer).EncodeFixed32\n\t\tp.valDec = (*Buffer).DecodeFixed32\n\t\tp.valSize = sizeFixed32\n\tcase \"fixed64\":\n\t\tp.WireType = WireFixed64\n\t\tp.valEnc = (*Buffer).EncodeFixed64\n\t\tp.valDec = (*Buffer).DecodeFixed64\n\t\tp.valSize = sizeFixed64\n\tcase \"zigzag32\":\n\t\tp.WireType = WireVarint\n\t\tp.valEnc = (*Buffer).EncodeZigzag32\n\t\tp.valDec = (*Buffer).DecodeZigzag32\n\t\tp.valSize = sizeZigzag32\n\tcase \"zigzag64\":\n\t\tp.WireType = WireVarint\n\t\tp.valEnc = (*Buffer).EncodeZigzag64\n\t\tp.valDec = (*Buffer).DecodeZigzag64\n\t\tp.valSize = sizeZigzag64\n\tcase \"bytes\", \"group\":\n\t\tp.WireType = WireBytes\n\t\t// no numeric converter for non-numeric types\n\tdefault:\n\t\tfmt.Fprintf(os.Stderr, \"proto: tag has unknown wire type: %q\\n\", s)\n\t\treturn\n\t}\n\n\tvar err error\n\tp.Tag, err = strconv.Atoi(fields[1])\n\tif err != nil {\n\t\treturn\n\t}\n\n\tfor i := 2; i < len(fields); i++ {\n\t\tf := fields[i]\n\t\tswitch {\n\t\tcase f == \"req\":\n\t\t\tp.Required = true\n\t\tcase f == \"opt\":\n\t\t\tp.Optional = true\n\t\tcase f == \"rep\":\n\t\t\tp.Repeated = true\n\t\tcase f == \"packed\":\n\t\t\tp.Packed = true\n\t\tcase strings.HasPrefix(f, \"name=\"):\n\t\t\tp.OrigName = f[5:]\n\t\tcase strings.HasPrefix(f, \"json=\"):\n\t\t\tp.JSONName = f[5:]\n\t\tcase strings.HasPrefix(f, \"enum=\"):\n\t\t\tp.Enum = f[5:]\n\t\tcase f == \"proto3\":\n\t\t\tp.proto3 = true\n\t\tcase f == \"oneof\":\n\t\t\tp.oneof = true\n\t\tcase strings.HasPrefix(f, \"def=\"):\n\t\t\tp.HasDefault = true\n\t\t\tp.Default = f[4:] // rest of string\n\t\t\tif i+1 < len(fields) {\n\t\t\t\t// Commas aren't escaped, and def is always last.\n\t\t\t\tp.Default += \",\" + strings.Join(fields[i+1:], \",\")\n\t\t\t\tbreak\n\t\t\t}\n\t\tcase strings.HasPrefix(f, \"embedded=\"):\n\t\t\tp.OrigName = strings.Split(f, \"=\")[1]\n\t\tcase strings.HasPrefix(f, \"customtype=\"):\n\t\t\tp.CustomType = strings.Split(f, \"=\")[1]\n\t\t}\n\t}\n}\n\nfunc logNoSliceEnc(t1, t2 reflect.Type) {\n\tfmt.Fprintf(os.Stderr, \"proto: no slice oenc for %T = []%T\\n\", t1, t2)\n}\n\nvar protoMessageType = reflect.TypeOf((*Message)(nil)).Elem()\n\n// Initialize the fields for encoding and decoding.\nfunc (p *Properties) setEncAndDec(typ reflect.Type, f *reflect.StructField, lockGetProp bool) {\n\tp.enc = nil\n\tp.dec = nil\n\tp.size = nil\n\tif len(p.CustomType) > 0 {\n\t\tp.setCustomEncAndDec(typ)\n\t\tp.setTag(lockGetProp)\n\t\treturn\n\t}\n\tswitch t1 := typ; t1.Kind() {\n\tdefault:\n\t\tfmt.Fprintf(os.Stderr, \"proto: no coders for %v\\n\", t1)\n\n\t// proto3 scalar types\n\n\tcase reflect.Bool:\n\t\tif p.proto3 {\n\t\t\tp.enc = (*Buffer).enc_proto3_bool\n\t\t\tp.dec = (*Buffer).dec_proto3_bool\n\t\t\tp.size = size_proto3_bool\n\t\t} else {\n\t\t\tp.enc = (*Buffer).enc_ref_bool\n\t\t\tp.dec = (*Buffer).dec_proto3_bool\n\t\t\tp.size = size_ref_bool\n\t\t}\n\tcase reflect.Int32:\n\t\tif p.proto3 {\n\t\t\tp.enc = (*Buffer).enc_proto3_int32\n\t\t\tp.dec = (*Buffer).dec_proto3_int32\n\t\t\tp.size = size_proto3_int32\n\t\t} else {\n\t\t\tp.enc = (*Buffer).enc_ref_int32\n\t\t\tp.dec = (*Buffer).dec_proto3_int32\n\t\t\tp.size = size_ref_int32\n\t\t}\n\tcase reflect.Uint32:\n\t\tif p.proto3 {\n\t\t\tp.enc = (*Buffer).enc_proto3_uint32\n\t\t\tp.dec = (*Buffer).dec_proto3_int32 // can reuse\n\t\t\tp.size = size_proto3_uint32\n\t\t} else {\n\t\t\tp.enc = (*Buffer).enc_ref_uint32\n\t\t\tp.dec = (*Buffer).dec_proto3_int32 // can reuse\n\t\t\tp.size = size_ref_uint32\n\t\t}\n\tcase reflect.Int64, reflect.Uint64:\n\t\tif p.proto3 {\n\t\t\tp.enc = (*Buffer).enc_proto3_int64\n\t\t\tp.dec = (*Buffer).dec_proto3_int64\n\t\t\tp.size = size_proto3_int64\n\t\t} else {\n\t\t\tp.enc = (*Buffer).enc_ref_int64\n\t\t\tp.dec = (*Buffer).dec_proto3_int64\n\t\t\tp.size = size_ref_int64\n\t\t}\n\tcase reflect.Float32:\n\t\tif p.proto3 {\n\t\t\tp.enc = (*Buffer).enc_proto3_uint32 // can just treat them as bits\n\t\t\tp.dec = (*Buffer).dec_proto3_int32\n\t\t\tp.size = size_proto3_uint32\n\t\t} else {\n\t\t\tp.enc = (*Buffer).enc_ref_uint32 // can just treat them as bits\n\t\t\tp.dec = (*Buffer).dec_proto3_int32\n\t\t\tp.size = size_ref_uint32\n\t\t}\n\tcase reflect.Float64:\n\t\tif p.proto3 {\n\t\t\tp.enc = (*Buffer).enc_proto3_int64 // can just treat them as bits\n\t\t\tp.dec = (*Buffer).dec_proto3_int64\n\t\t\tp.size = size_proto3_int64\n\t\t} else {\n\t\t\tp.enc = (*Buffer).enc_ref_int64 // can just treat them as bits\n\t\t\tp.dec = (*Buffer).dec_proto3_int64\n\t\t\tp.size = size_ref_int64\n\t\t}\n\tcase reflect.String:\n\t\tif p.proto3 {\n\t\t\tp.enc = (*Buffer).enc_proto3_string\n\t\t\tp.dec = (*Buffer).dec_proto3_string\n\t\t\tp.size = size_proto3_string\n\t\t} else {\n\t\t\tp.enc = (*Buffer).enc_ref_string\n\t\t\tp.dec = (*Buffer).dec_proto3_string\n\t\t\tp.size = size_ref_string\n\t\t}\n\tcase reflect.Struct:\n\t\tp.stype = typ\n\t\tp.isMarshaler = isMarshaler(typ)\n\t\tp.isUnmarshaler = isUnmarshaler(typ)\n\t\tif p.Wire == \"bytes\" {\n\t\t\tp.enc = (*Buffer).enc_ref_struct_message\n\t\t\tp.dec = (*Buffer).dec_ref_struct_message\n\t\t\tp.size = size_ref_struct_message\n\t\t} else {\n\t\t\tfmt.Fprintf(os.Stderr, \"proto: no coders for struct %T\\n\", typ)\n\t\t}\n\n\tcase reflect.Ptr:\n\t\tswitch t2 := t1.Elem(); t2.Kind() {\n\t\tdefault:\n\t\t\tfmt.Fprintf(os.Stderr, \"proto: no encoder function for %v -> %v\\n\", t1, t2)\n\t\t\tbreak\n\t\tcase reflect.Bool:\n\t\t\tp.enc = (*Buffer).enc_bool\n\t\t\tp.dec = (*Buffer).dec_bool\n\t\t\tp.size = size_bool\n\t\tcase reflect.Int32:\n\t\t\tp.enc = (*Buffer).enc_int32\n\t\t\tp.dec = (*Buffer).dec_int32\n\t\t\tp.size = size_int32\n\t\tcase reflect.Uint32:\n\t\t\tp.enc = (*Buffer).enc_uint32\n\t\t\tp.dec = (*Buffer).dec_int32 // can reuse\n\t\t\tp.size = size_uint32\n\t\tcase reflect.Int64, reflect.Uint64:\n\t\t\tp.enc = (*Buffer).enc_int64\n\t\t\tp.dec = (*Buffer).dec_int64\n\t\t\tp.size = size_int64\n\t\tcase reflect.Float32:\n\t\t\tp.enc = (*Buffer).enc_uint32 // can just treat them as bits\n\t\t\tp.dec = (*Buffer).dec_int32\n\t\t\tp.size = size_uint32\n\t\tcase reflect.Float64:\n\t\t\tp.enc = (*Buffer).enc_int64 // can just treat them as bits\n\t\t\tp.dec = (*Buffer).dec_int64\n\t\t\tp.size = size_int64\n\t\tcase reflect.String:\n\t\t\tp.enc = (*Buffer).enc_string\n\t\t\tp.dec = (*Buffer).dec_string\n\t\t\tp.size = size_string\n\t\tcase reflect.Struct:\n\t\t\tp.stype = t1.Elem()\n\t\t\tp.isMarshaler = isMarshaler(t1)\n\t\t\tp.isUnmarshaler = isUnmarshaler(t1)\n\t\t\tif p.Wire == \"bytes\" {\n\t\t\t\tp.enc = (*Buffer).enc_struct_message\n\t\t\t\tp.dec = (*Buffer).dec_struct_message\n\t\t\t\tp.size = size_struct_message\n\t\t\t} else {\n\t\t\t\tp.enc = (*Buffer).enc_struct_group\n\t\t\t\tp.dec = (*Buffer).dec_struct_group\n\t\t\t\tp.size = size_struct_group\n\t\t\t}\n\t\t}\n\n\tcase reflect.Slice:\n\t\tswitch t2 := t1.Elem(); t2.Kind() {\n\t\tdefault:\n\t\t\tlogNoSliceEnc(t1, t2)\n\t\t\tbreak\n\t\tcase reflect.Bool:\n\t\t\tif p.Packed {\n\t\t\t\tp.enc = (*Buffer).enc_slice_packed_bool\n\t\t\t\tp.size = size_slice_packed_bool\n\t\t\t} else {\n\t\t\t\tp.enc = (*Buffer).enc_slice_bool\n\t\t\t\tp.size = size_slice_bool\n\t\t\t}\n\t\t\tp.dec = (*Buffer).dec_slice_bool\n\t\t\tp.packedDec = (*Buffer).dec_slice_packed_bool\n\t\tcase reflect.Int32:\n\t\t\tif p.Packed {\n\t\t\t\tp.enc = (*Buffer).enc_slice_packed_int32\n\t\t\t\tp.size = size_slice_packed_int32\n\t\t\t} else {\n\t\t\t\tp.enc = (*Buffer).enc_slice_int32\n\t\t\t\tp.size = size_slice_int32\n\t\t\t}\n\t\t\tp.dec = (*Buffer).dec_slice_int32\n\t\t\tp.packedDec = (*Buffer).dec_slice_packed_int32\n\t\tcase reflect.Uint32:\n\t\t\tif p.Packed {\n\t\t\t\tp.enc = (*Buffer).enc_slice_packed_uint32\n\t\t\t\tp.size = size_slice_packed_uint32\n\t\t\t} else {\n\t\t\t\tp.enc = (*Buffer).enc_slice_uint32\n\t\t\t\tp.size = size_slice_uint32\n\t\t\t}\n\t\t\tp.dec = (*Buffer).dec_slice_int32\n\t\t\tp.packedDec = (*Buffer).dec_slice_packed_int32\n\t\tcase reflect.Int64, reflect.Uint64:\n\t\t\tif p.Packed {\n\t\t\t\tp.enc = (*Buffer).enc_slice_packed_int64\n\t\t\t\tp.size = size_slice_packed_int64\n\t\t\t} else {\n\t\t\t\tp.enc = (*Buffer).enc_slice_int64\n\t\t\t\tp.size = size_slice_int64\n\t\t\t}\n\t\t\tp.dec = (*Buffer).dec_slice_int64\n\t\t\tp.packedDec = (*Buffer).dec_slice_packed_int64\n\t\tcase reflect.Uint8:\n\t\t\tp.enc = (*Buffer).enc_slice_byte\n\t\t\tp.dec = (*Buffer).dec_slice_byte\n\t\t\tp.size = size_slice_byte\n\t\t\t// This is a []byte, which is either a bytes field,\n\t\t\t// or the value of a map field. In the latter case,\n\t\t\t// we always encode an empty []byte, so we should not\n\t\t\t// use the proto3 enc/size funcs.\n\t\t\t// f == nil iff this is the key/value of a map field.\n\t\t\tif p.proto3 && f != nil {\n\t\t\t\tp.enc = (*Buffer).enc_proto3_slice_byte\n\t\t\t\tp.size = size_proto3_slice_byte\n\t\t\t}\n\t\tcase reflect.Float32, reflect.Float64:\n\t\t\tswitch t2.Bits() {\n\t\t\tcase 32:\n\t\t\t\t// can just treat them as bits\n\t\t\t\tif p.Packed {\n\t\t\t\t\tp.enc = (*Buffer).enc_slice_packed_uint32\n\t\t\t\t\tp.size = size_slice_packed_uint32\n\t\t\t\t} else {\n\t\t\t\t\tp.enc = (*Buffer).enc_slice_uint32\n\t\t\t\t\tp.size = size_slice_uint32\n\t\t\t\t}\n\t\t\t\tp.dec = (*Buffer).dec_slice_int32\n\t\t\t\tp.packedDec = (*Buffer).dec_slice_packed_int32\n\t\t\tcase 64:\n\t\t\t\t// can just treat them as bits\n\t\t\t\tif p.Packed {\n\t\t\t\t\tp.enc = (*Buffer).enc_slice_packed_int64\n\t\t\t\t\tp.size = size_slice_packed_int64\n\t\t\t\t} else {\n\t\t\t\t\tp.enc = (*Buffer).enc_slice_int64\n\t\t\t\t\tp.size = size_slice_int64\n\t\t\t\t}\n\t\t\t\tp.dec = (*Buffer).dec_slice_int64\n\t\t\t\tp.packedDec = (*Buffer).dec_slice_packed_int64\n\t\t\tdefault:\n\t\t\t\tlogNoSliceEnc(t1, t2)\n\t\t\t\tbreak\n\t\t\t}\n\t\tcase reflect.String:\n\t\t\tp.enc = (*Buffer).enc_slice_string\n\t\t\tp.dec = (*Buffer).dec_slice_string\n\t\t\tp.size = size_slice_string\n\t\tcase reflect.Ptr:\n\t\t\tswitch t3 := t2.Elem(); t3.Kind() {\n\t\t\tdefault:\n\t\t\t\tfmt.Fprintf(os.Stderr, \"proto: no ptr oenc for %T -> %T -> %T\\n\", t1, t2, t3)\n\t\t\t\tbreak\n\t\t\tcase reflect.Struct:\n\t\t\t\tp.stype = t2.Elem()\n\t\t\t\tp.isMarshaler = isMarshaler(t2)\n\t\t\t\tp.isUnmarshaler = isUnmarshaler(t2)\n\t\t\t\tif p.Wire == \"bytes\" {\n\t\t\t\t\tp.enc = (*Buffer).enc_slice_struct_message\n\t\t\t\t\tp.dec = (*Buffer).dec_slice_struct_message\n\t\t\t\t\tp.size = size_slice_struct_message\n\t\t\t\t} else {\n\t\t\t\t\tp.enc = (*Buffer).enc_slice_struct_group\n\t\t\t\t\tp.dec = (*Buffer).dec_slice_struct_group\n\t\t\t\t\tp.size = size_slice_struct_group\n\t\t\t\t}\n\t\t\t}\n\t\tcase reflect.Slice:\n\t\t\tswitch t2.Elem().Kind() {\n\t\t\tdefault:\n\t\t\t\tfmt.Fprintf(os.Stderr, \"proto: no slice elem oenc for %T -> %T -> %T\\n\", t1, t2, t2.Elem())\n\t\t\t\tbreak\n\t\t\tcase reflect.Uint8:\n\t\t\t\tp.enc = (*Buffer).enc_slice_slice_byte\n\t\t\t\tp.dec = (*Buffer).dec_slice_slice_byte\n\t\t\t\tp.size = size_slice_slice_byte\n\t\t\t}\n\t\tcase reflect.Struct:\n\t\t\tp.setSliceOfNonPointerStructs(t1)\n\t\t}\n\n\tcase reflect.Map:\n\t\tp.enc = (*Buffer).enc_new_map\n\t\tp.dec = (*Buffer).dec_new_map\n\t\tp.size = size_new_map\n\n\t\tp.mtype = t1\n\t\tp.mkeyprop = &Properties{}\n\t\tp.mkeyprop.init(reflect.PtrTo(p.mtype.Key()), \"Key\", f.Tag.Get(\"protobuf_key\"), nil, lockGetProp)\n\t\tp.mvalprop = &Properties{}\n\t\tvtype := p.mtype.Elem()\n\t\tif vtype.Kind() != reflect.Ptr && vtype.Kind() != reflect.Slice {\n\t\t\t// The value type is not a message (*T) or bytes ([]byte),\n\t\t\t// so we need encoders for the pointer to this type.\n\t\t\tvtype = reflect.PtrTo(vtype)\n\t\t}\n\t\tp.mvalprop.init(vtype, \"Value\", f.Tag.Get(\"protobuf_val\"), nil, lockGetProp)\n\t}\n\tp.setTag(lockGetProp)\n}\n\nfunc (p *Properties) setTag(lockGetProp bool) {\n\t// precalculate tag code\n\twire := p.WireType\n\tif p.Packed {\n\t\twire = WireBytes\n\t}\n\tx := uint32(p.Tag)<<3 | uint32(wire)\n\ti := 0\n\tfor i = 0; x > 127; i++ {\n\t\tp.tagbuf[i] = 0x80 | uint8(x&0x7F)\n\t\tx >>= 7\n\t}\n\tp.tagbuf[i] = uint8(x)\n\tp.tagcode = p.tagbuf[0 : i+1]\n\n\tif p.stype != nil {\n\t\tif lockGetProp {\n\t\t\tp.sprop = GetProperties(p.stype)\n\t\t} else {\n\t\t\tp.sprop = getPropertiesLocked(p.stype)\n\t\t}\n\t}\n}\n\nvar (\n\tmarshalerType = reflect.TypeOf((*Marshaler)(nil)).Elem()\n\tunmarshalerType = reflect.TypeOf((*Unmarshaler)(nil)).Elem()\n)\n\n// isMarshaler reports whether type t implements Marshaler.\nfunc isMarshaler(t reflect.Type) bool {\n\treturn t.Implements(marshalerType)\n}\n\n// isUnmarshaler reports whether type t implements Unmarshaler.\nfunc isUnmarshaler(t reflect.Type) bool {\n\treturn t.Implements(unmarshalerType)\n}\n\n// Init populates the properties from a protocol buffer struct tag.\nfunc (p *Properties) Init(typ reflect.Type, name, tag string, f *reflect.StructField) {\n\tp.init(typ, name, tag, f, true)\n}\n\nfunc (p *Properties) init(typ reflect.Type, name, tag string, f *reflect.StructField, lockGetProp bool) {\n\t// \"bytes,49,opt,def=hello!\"\n\tp.Name = name\n\tp.OrigName = name\n\tif f != nil {\n\t\tp.field = toField(f)\n\t}\n\tif tag == \"\" {\n\t\treturn\n\t}\n\tp.Parse(tag)\n\tp.setEncAndDec(typ, f, lockGetProp)\n}\n\nvar (\n\tpropertiesMu sync.RWMutex\n\tpropertiesMap = make(map[reflect.Type]*StructProperties)\n)\n\n// GetProperties returns the list of properties for the type represented by t.\n// t must represent a generated struct type of a protocol message.\nfunc GetProperties(t reflect.Type) *StructProperties {\n\tif t.Kind() != reflect.Struct {\n\t\tpanic(\"proto: type must have kind struct\")\n\t}\n\n\t// Most calls to GetProperties in a long-running program will be\n\t// retrieving details for types we have seen before.\n\tpropertiesMu.RLock()\n\tsprop, ok := propertiesMap[t]\n\tpropertiesMu.RUnlock()\n\tif ok {\n\t\tif collectStats {\n\t\t\tstats.Chit++\n\t\t}\n\t\treturn sprop\n\t}\n\n\tpropertiesMu.Lock()\n\tsprop = getPropertiesLocked(t)\n\tpropertiesMu.Unlock()\n\treturn sprop\n}\n\n// getPropertiesLocked requires that propertiesMu is held.\nfunc getPropertiesLocked(t reflect.Type) *StructProperties {\n\tif prop, ok := propertiesMap[t]; ok {\n\t\tif collectStats {\n\t\t\tstats.Chit++\n\t\t}\n\t\treturn prop\n\t}\n\tif collectStats {\n\t\tstats.Cmiss++\n\t}\n\n\tprop := new(StructProperties)\n\t// in case of recursive protos, fill this in now.\n\tpropertiesMap[t] = prop\n\n\t// build properties\n\tprop.extendable = reflect.PtrTo(t).Implements(extendableProtoType)\n\tprop.unrecField = invalidField\n\tprop.Prop = make([]*Properties, t.NumField())\n\tprop.order = make([]int, t.NumField())\n\n\tisOneofMessage := false\n\tfor i := 0; i < t.NumField(); i++ {\n\t\tf := t.Field(i)\n\t\tp := new(Properties)\n\t\tname := f.Name\n\t\tp.init(f.Type, name, f.Tag.Get(\"protobuf\"), &f, false)\n\n\t\tif f.Name == \"XXX_extensions\" { // special case\n\t\t\tif len(f.Tag.Get(\"protobuf\")) > 0 {\n\t\t\t\tp.enc = (*Buffer).enc_ext_slice_byte\n\t\t\t\tp.dec = nil // not needed\n\t\t\t\tp.size = size_ext_slice_byte\n\t\t\t} else {\n\t\t\t\tp.enc = (*Buffer).enc_map\n\t\t\t\tp.dec = nil // not needed\n\t\t\t\tp.size = size_map\n\t\t\t}\n\t\t}\n\t\tif f.Name == \"XXX_unrecognized\" { // special case\n\t\t\tprop.unrecField = toField(&f)\n\t\t}\n\t\toneof := f.Tag.Get(\"protobuf_oneof\") != \"\" // special case\n\t\tif oneof {\n\t\t\tisOneofMessage = true\n\t\t}\n\t\tprop.Prop[i] = p\n\t\tprop.order[i] = i\n\t\tif debug {\n\t\t\tprint(i, \" \", f.Name, \" \", t.String(), \" \")\n\t\t\tif p.Tag > 0 {\n\t\t\t\tprint(p.String())\n\t\t\t}\n\t\t\tprint(\"\\n\")\n\t\t}\n\t\tif p.enc == nil && !strings.HasPrefix(f.Name, \"XXX_\") && !oneof {\n\t\t\tfmt.Fprintln(os.Stderr, \"proto: no encoder for\", f.Name, f.Type.String(), \"[GetProperties]\")\n\t\t}\n\t}\n\n\t// Re-order prop.order.\n\tsort.Sort(prop)\n\n\ttype oneofMessage interface {\n\t\tXXX_OneofFuncs() (func(Message, *Buffer) error, func(Message, int, int, *Buffer) (bool, error), func(Message) int, []interface{})\n\t}\n\tif om, ok := reflect.Zero(reflect.PtrTo(t)).Interface().(oneofMessage); isOneofMessage && ok {\n\t\tvar oots []interface{}\n\t\tprop.oneofMarshaler, prop.oneofUnmarshaler, prop.oneofSizer, oots = om.XXX_OneofFuncs()\n\t\tprop.stype = t\n\n\t\t// Interpret oneof metadata.\n\t\tprop.OneofTypes = make(map[string]*OneofProperties)\n\t\tfor _, oot := range oots {\n\t\t\toop := &OneofProperties{\n\t\t\t\tType: reflect.ValueOf(oot).Type(), // *T\n\t\t\t\tProp: new(Properties),\n\t\t\t}\n\t\t\tsft := oop.Type.Elem().Field(0)\n\t\t\toop.Prop.Name = sft.Name\n\t\t\toop.Prop.Parse(sft.Tag.Get(\"protobuf\"))\n\t\t\t// There will be exactly one interface field that\n\t\t\t// this new value is assignable to.\n\t\t\tfor i := 0; i < t.NumField(); i++ {\n\t\t\t\tf := t.Field(i)\n\t\t\t\tif f.Type.Kind() != reflect.Interface {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\tif !oop.Type.AssignableTo(f.Type) {\n\t\t\t\t\tcontinue\n\t\t\t\t}\n\t\t\t\toop.Field = i\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tprop.OneofTypes[oop.Prop.OrigName] = oop\n\t\t}\n\t}\n\n\t// build required counts\n\t// build tags\n\treqCount := 0\n\tprop.decoderOrigNames = make(map[string]int)\n\tfor i, p := range prop.Prop {\n\t\tif strings.HasPrefix(p.Name, \"XXX_\") {\n\t\t\t// Internal fields should not appear in tags/origNames maps.\n\t\t\t// They are handled specially when encoding and decoding.\n\t\t\tcontinue\n\t\t}\n\t\tif p.Required {\n\t\t\treqCount++\n\t\t}\n\t\tprop.decoderTags.put(p.Tag, i)\n\t\tprop.decoderOrigNames[p.OrigName] = i\n\t}\n\tprop.reqCount = reqCount\n\n\treturn prop\n}\n\n// Return the Properties object for the x[0]'th field of the structure.\nfunc propByIndex(t reflect.Type, x []int) *Properties {\n\tif len(x) != 1 {\n\t\tfmt.Fprintf(os.Stderr, \"proto: field index dimension %d (not 1) for type %s\\n\", len(x), t)\n\t\treturn nil\n\t}\n\tprop := GetProperties(t)\n\treturn prop.Prop[x[0]]\n}\n\n// Get the address and type of a pointer to a struct from an interface.\nfunc getbase(pb Message) (t reflect.Type, b structPointer, err error) {\n\tif pb == nil {\n\t\terr = ErrNil\n\t\treturn\n\t}\n\t// get the reflect type of the pointer to the struct.\n\tt = reflect.TypeOf(pb)\n\t// get the address of the struct.\n\tvalue := reflect.ValueOf(pb)\n\tb = toStructPointer(value)\n\treturn\n}\n\n// A global registry of enum types.\n// The generated code will register the generated maps by calling RegisterEnum.\n\nvar enumValueMaps = make(map[string]map[string]int32)\nvar enumStringMaps = make(map[string]map[int32]string)\n\n// RegisterEnum is called from the generated code to install the enum descriptor\n// maps into the global table to aid parsing text format protocol buffers.\nfunc RegisterEnum(typeName string, unusedNameMap map[int32]string, valueMap map[string]int32) {\n\tif _, ok := enumValueMaps[typeName]; ok {\n\t\tpanic(\"proto: duplicate enum registered: \" + typeName)\n\t}\n\tenumValueMaps[typeName] = valueMap\n\tif _, ok := enumStringMaps[typeName]; ok {\n\t\tpanic(\"proto: duplicate enum registered: \" + typeName)\n\t}\n\tenumStringMaps[typeName] = unusedNameMap\n}\n\n// EnumValueMap returns the mapping from names to integers of the\n// enum type enumType, or a nil if not found.\nfunc EnumValueMap(enumType string) map[string]int32 {\n\treturn enumValueMaps[enumType]\n}\n\n// A registry of all linked message types.\n// The string is a fully-qualified proto name (\"pkg.Message\").\nvar (\n\tprotoTypes = make(map[string]reflect.Type)\n\trevProtoTypes = make(map[reflect.Type]string)\n)\n\n// RegisterType is called from generated code and maps from the fully qualified\n// proto name to the type (pointer to struct) of the protocol buffer.\nfunc RegisterType(x Message, name string) {\n\tif _, ok := protoTypes[name]; ok {\n\t\t// TODO: Some day, make this a panic.\n\t\tlog.Printf(\"proto: duplicate proto type registered: %s\", name)\n\t\treturn\n\t}\n\tt := reflect.TypeOf(x)\n\tprotoTypes[name] = t\n\trevProtoTypes[t] = name\n}\n\n// MessageName returns the fully-qualified proto name for the given message type.\nfunc MessageName(x Message) string { return revProtoTypes[reflect.TypeOf(x)] }\n\n// MessageType returns the message type (pointer to struct) for a named message.\nfunc MessageType(name string) reflect.Type { return protoTypes[name] }\n"} +{"text": "// Copyright 2014 The Prometheus Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage prometheus\n\nimport \"testing\"\n\nfunc TestBuildFQName(t *testing.T) {\n\tscenarios := []struct{ namespace, subsystem, name, result string }{\n\t\t{\"a\", \"b\", \"c\", \"a_b_c\"},\n\t\t{\"\", \"b\", \"c\", \"b_c\"},\n\t\t{\"a\", \"\", \"c\", \"a_c\"},\n\t\t{\"\", \"\", \"c\", \"c\"},\n\t\t{\"a\", \"b\", \"\", \"\"},\n\t\t{\"a\", \"\", \"\", \"\"},\n\t\t{\"\", \"b\", \"\", \"\"},\n\t\t{\" \", \"\", \"\", \"\"},\n\t}\n\n\tfor i, s := range scenarios {\n\t\tif want, got := s.result, BuildFQName(s.namespace, s.subsystem, s.name); want != got {\n\t\t\tt.Errorf(\"%d. want %s, got %s\", i, want, got)\n\t\t}\n\t}\n}\n"} +{"text": "<?php\n\n$one = 'success';\n\nreturn $one ? : 'fail';\n"} +{"text": "<testcase>\n<info>\n<keywords>\nFTP\nRETR\n-J\n</keywords>\n</info>\n\n# Server-side\n<reply>\n# file1389 contents...\n<data nocheck=\"yes\">\nHTTP/1.1 200 OK\r\nDate: Thu, 09 Nov 2010 14:49:00 GMT\r\nServer: test-server/fake\r\nContent-Length: 6\r\nConnection: close\r\nContent-Type: text/html\r\nContent-Disposition: filename=name1389; charset=funny; option=strange\r\n\r\nMOOOO\n</data>\n</reply>\n\n# Client-side\n<client>\n<server>\nftp\n</server>\n<name>\nFTP DL, file with C-D inside, using -o fname -J -D file\n</name>\n<command option=\"no-output,no-include\">\nftp://%HOSTIP:%FTPPORT/path/file1389 -o log/download1389 -J -D log/heads1389\n</command>\n<postcheck>\nperl %SRCDIR/libtest/notexists.pl log/file1389 log/name1389\n</postcheck>\n</client>\n\n# Verify data after the test has been \"shot\"\n<verify>\n<protocol>\nUSER anonymous\r\nPASS ftp@example.com\r\nPWD\r\nCWD path\r\nEPSV\r\nTYPE I\r\nSIZE file1389\r\nRETR file1389\r\nQUIT\r\n</protocol>\n\n<file1 name=\"log/download1389\">\nHTTP/1.1 200 OK\r\nDate: Thu, 09 Nov 2010 14:49:00 GMT\r\nServer: test-server/fake\r\nContent-Length: 6\r\nConnection: close\r\nContent-Type: text/html\r\nContent-Disposition: filename=name1389; charset=funny; option=strange\r\n\r\nMOOOO\n</file1>\n\n<file2 name=\"log/heads1389\">\n220- _ _ ____ _ \r\n220- ___| | | | _ \\| | \r\n220- / __| | | | |_) | | \r\n220- | (__| |_| | _ {| |___ \r\n220 \\___|\\___/|_| \\_\\_____|\r\n331 We are happy you popped in!\r\n230 Welcome you silly person\r\n257 \"/\" is current directory\r\n250 CWD command successful.\r\n229 Entering Passive Mode (stripped)\n200 I modify TYPE as you wanted\r\n213 222\r\n150 Binary data connection for 1389 () (222 bytes).\r\n226 File transfer complete\r\n</file2>\n<stripfile2>\ns/^(229 Entering Passive Mode \\().*(\\).*)/${1}stripped${2}/\n</stripfile2>\n\n<file3 name=\"log/stdout1389\">\n</file3>\n\n</verify>\n</testcase>\n"} +{"text": "COMMENT @----------------------------------------------------------------------\r\n\r\n\tCopyright (c) GeoWorks 1988 -- All Rights Reserved\r\n\r\nPROJECT:\tPC GEOS\r\nMODULE:\t\tUserInterface/Gen\r\nFILE:\t\tgenActive.asm\r\n\r\nROUTINES:\r\n\tName\t\t\tDescription\r\n\t----\t\t\t-----------\r\n GLB\tGenActiveListClass\tActiveList class - subclassed by Generic objects\r\n\t\t\t\twho might be (or whose children might be) listed\r\n\t\t\t\ton an active list, so that they will be\r\n\t\t\t\tpreserved during system shut-down.\r\n\r\nREVISION HISTORY:\r\n\tName\tDate\t\tDescription\r\n\t----\t----\t\t-----------\r\n\tTony\t2/89\t\tInitial version\r\n\tEric\t11/89\t\tMore doc, added ADD_DATA_TO\r\n\r\nDESCRIPTION:\r\n\tThis file contains routines to implement the GenActiveList class.\r\n\r\n\t$Id: genActive.asm,v 1.1 97/04/07 11:45:09 newdeal Exp $\r\n\r\n------------------------------------------------------------------------------@\r\n;GenActiveListClass is no more - brianc 6/19/92\r\n"} +{"text": "/**\n * @author Richard Davey <rich@photonstorm.com>\n * @copyright 2020 Photon Storm Ltd.\n * @license {@link https://opensource.org/licenses/MIT|MIT License}\n */\n\nvar Class = require('../../../utils/Class');\nvar Clamp = require('../../../math/Clamp');\nvar Components = require('../../components');\nvar GameObject = require('../../GameObject');\nvar GetBitmapTextSize = require('../GetBitmapTextSize');\nvar ParseFromAtlas = require('../ParseFromAtlas');\nvar ParseXMLBitmapFont = require('../ParseXMLBitmapFont');\nvar Rectangle = require('../../../geom/rectangle/Rectangle');\nvar Render = require('./BitmapTextRender');\n\n/**\n * @classdesc\n * BitmapText objects work by taking a texture file and an XML or JSON file that describes the font structure.\n *\n * During rendering for each letter of the text is rendered to the display, proportionally spaced out and aligned to\n * match the font structure.\n *\n * BitmapText objects are less flexible than Text objects, in that they have less features such as shadows, fills and the ability\n * to use Web Fonts, however you trade this flexibility for rendering speed. You can also create visually compelling BitmapTexts by\n * processing the font texture in an image editor, applying fills and any other effects required.\n *\n * To create multi-line text insert \\r, \\n or \\r\\n escape codes into the text string.\n *\n * To create a BitmapText data files you need a 3rd party app such as:\n *\n * BMFont (Windows, free): {@link http://www.angelcode.com/products/bmfont/|http://www.angelcode.com/products/bmfont/}\n * Glyph Designer (OS X, commercial): {@link http://www.71squared.com/en/glyphdesigner|http://www.71squared.com/en/glyphdesigner}\n * Littera (Web-based, free): {@link http://kvazars.com/littera/|http://kvazars.com/littera/}\n *\n * For most use cases it is recommended to use XML. If you wish to use JSON, the formatting should be equal to the result of\n * converting a valid XML file through the popular X2JS library. An online tool for conversion can be found here: {@link http://codebeautify.org/xmltojson|http://codebeautify.org/xmltojson}\n *\n * @class BitmapText\n * @extends Phaser.GameObjects.GameObject\n * @memberof Phaser.GameObjects\n * @constructor\n * @since 3.0.0\n *\n * @extends Phaser.GameObjects.Components.Alpha\n * @extends Phaser.GameObjects.Components.BlendMode\n * @extends Phaser.GameObjects.Components.Depth\n * @extends Phaser.GameObjects.Components.Mask\n * @extends Phaser.GameObjects.Components.Origin\n * @extends Phaser.GameObjects.Components.Pipeline\n * @extends Phaser.GameObjects.Components.ScrollFactor\n * @extends Phaser.GameObjects.Components.Texture\n * @extends Phaser.GameObjects.Components.Tint\n * @extends Phaser.GameObjects.Components.Transform\n * @extends Phaser.GameObjects.Components.Visible\n *\n * @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. It can only belong to one Scene at any given time.\n * @param {number} x - The x coordinate of this Game Object in world space.\n * @param {number} y - The y coordinate of this Game Object in world space.\n * @param {string} font - The key of the font to use from the Bitmap Font cache.\n * @param {(string|string[])} [text] - The string, or array of strings, to be set as the content of this Bitmap Text.\n * @param {number} [size] - The font size of this Bitmap Text.\n * @param {integer} [align=0] - The alignment of the text in a multi-line BitmapText object.\n */\nvar BitmapText = new Class({\n\n Extends: GameObject,\n\n Mixins: [\n Components.Alpha,\n Components.BlendMode,\n Components.Depth,\n Components.Mask,\n Components.Origin,\n Components.Pipeline,\n Components.ScrollFactor,\n Components.Texture,\n Components.Tint,\n Components.Transform,\n Components.Visible,\n Render\n ],\n\n initialize:\n\n function BitmapText (scene, x, y, font, text, size, align)\n {\n if (text === undefined) { text = ''; }\n if (align === undefined) { align = 0; }\n\n GameObject.call(this, scene, 'BitmapText');\n\n /**\n * The key of the Bitmap Font used by this Bitmap Text.\n * To change the font after creation please use `setFont`.\n *\n * @name Phaser.GameObjects.BitmapText#font\n * @type {string}\n * @readonly\n * @since 3.0.0\n */\n this.font = font;\n\n var entry = this.scene.sys.cache.bitmapFont.get(font);\n\n if (!entry)\n {\n console.warn('Invalid BitmapText key: ' + font);\n }\n\n /**\n * The data of the Bitmap Font used by this Bitmap Text.\n *\n * @name Phaser.GameObjects.BitmapText#fontData\n * @type {Phaser.Types.GameObjects.BitmapText.BitmapFontData}\n * @readonly\n * @since 3.0.0\n */\n this.fontData = entry.data;\n\n /**\n * The text that this Bitmap Text object displays.\n *\n * @name Phaser.GameObjects.BitmapText#_text\n * @type {string}\n * @private\n * @since 3.0.0\n */\n this._text = '';\n\n /**\n * The font size of this Bitmap Text.\n *\n * @name Phaser.GameObjects.BitmapText#_fontSize\n * @type {number}\n * @private\n * @since 3.0.0\n */\n this._fontSize = size || this.fontData.size;\n\n /**\n * Adds / Removes spacing between characters.\n *\n * Can be a negative or positive number.\n *\n * @name Phaser.GameObjects.BitmapText#_letterSpacing\n * @type {number}\n * @private\n * @since 3.4.0\n */\n this._letterSpacing = 0;\n\n /**\n * Controls the alignment of each line of text in this BitmapText object.\n * Only has any effect when this BitmapText contains multiple lines of text, split with carriage-returns.\n * Has no effect with single-lines of text.\n *\n * See the methods `setLeftAlign`, `setCenterAlign` and `setRightAlign`.\n *\n * 0 = Left aligned (default)\n * 1 = Middle aligned\n * 2 = Right aligned\n *\n * The alignment position is based on the longest line of text.\n *\n * @name Phaser.GameObjects.BitmapText#_align\n * @type {integer}\n * @private\n * @since 3.11.0\n */\n this._align = align;\n\n /**\n * An object that describes the size of this Bitmap Text.\n *\n * @name Phaser.GameObjects.BitmapText#_bounds\n * @type {Phaser.Types.GameObjects.BitmapText.BitmapTextSize}\n * @private\n * @since 3.0.0\n */\n this._bounds = GetBitmapTextSize();\n\n /**\n * An internal dirty flag for bounds calculation.\n *\n * @name Phaser.GameObjects.BitmapText#_dirty\n * @type {boolean}\n * @private\n * @since 3.11.0\n */\n this._dirty = true;\n\n /**\n * Internal cache var holding the maxWidth.\n *\n * @name Phaser.GameObjects.BitmapText#_maxWidth\n * @type {number}\n * @private\n * @since 3.21.0\n */\n this._maxWidth = 0;\n\n /**\n * The character code used to detect for word wrapping.\n * Defaults to 32 (a space character).\n *\n * @name Phaser.GameObjects.BitmapText#wordWrapCharCode\n * @type {number}\n * @since 3.21.0\n */\n this.wordWrapCharCode = 32;\n\n /**\n * Internal array holding the character tint color data.\n *\n * @name Phaser.GameObjects.BitmapText#charColors\n * @type {array}\n * @private\n * @since 3.50.0\n */\n this.charColors = [];\n\n /**\n * The horizontal offset of the drop shadow.\n *\n * You can set this directly, or use `Phaser.GameObjects.BitmapText#setDropShadow`.\n *\n * @name Phaser.GameObjects.BitmapText#dropShadowX\n * @type {number}\n * @since 3.50.0\n */\n this.dropShadowX = 0;\n\n /**\n * The vertical offset of the drop shadow.\n *\n * You can set this directly, or use `Phaser.GameObjects.BitmapText#setDropShadow`.\n *\n * @name Phaser.GameObjects.BitmapText#dropShadowY\n * @type {number}\n * @since 3.50.0\n */\n this.dropShadowY = 0;\n\n /**\n * The color of the drop shadow.\n *\n * You can set this directly, or use `Phaser.GameObjects.BitmapText#setDropShadow`.\n *\n * @name Phaser.GameObjects.BitmapText#dropShadowColor\n * @type {number}\n * @since 3.50.0\n */\n this.dropShadowColor = 0x000000;\n\n /**\n * The alpha value of the drop shadow.\n *\n * You can set this directly, or use `Phaser.GameObjects.BitmapText#setDropShadow`.\n *\n * @name Phaser.GameObjects.BitmapText#dropShadowAlpha\n * @type {number}\n * @since 3.50.0\n */\n this.dropShadowAlpha = 0.5;\n\n this.setTexture(entry.texture, entry.frame);\n this.setPosition(x, y);\n this.setOrigin(0, 0);\n this.initPipeline();\n\n this.setText(text);\n },\n\n /**\n * Set the lines of text in this BitmapText to be left-aligned.\n * This only has any effect if this BitmapText contains more than one line of text.\n *\n * @method Phaser.GameObjects.BitmapText#setLeftAlign\n * @since 3.11.0\n *\n * @return {this} This BitmapText Object.\n */\n setLeftAlign: function ()\n {\n this._align = BitmapText.ALIGN_LEFT;\n\n this._dirty = true;\n\n return this;\n },\n\n /**\n * Set the lines of text in this BitmapText to be center-aligned.\n * This only has any effect if this BitmapText contains more than one line of text.\n *\n * @method Phaser.GameObjects.BitmapText#setCenterAlign\n * @since 3.11.0\n *\n * @return {this} This BitmapText Object.\n */\n setCenterAlign: function ()\n {\n this._align = BitmapText.ALIGN_CENTER;\n\n this._dirty = true;\n\n return this;\n },\n\n /**\n * Set the lines of text in this BitmapText to be right-aligned.\n * This only has any effect if this BitmapText contains more than one line of text.\n *\n * @method Phaser.GameObjects.BitmapText#setRightAlign\n * @since 3.11.0\n *\n * @return {this} This BitmapText Object.\n */\n setRightAlign: function ()\n {\n this._align = BitmapText.ALIGN_RIGHT;\n\n this._dirty = true;\n\n return this;\n },\n\n /**\n * Set the font size of this Bitmap Text.\n *\n * @method Phaser.GameObjects.BitmapText#setFontSize\n * @since 3.0.0\n *\n * @param {number} size - The font size to set.\n *\n * @return {this} This BitmapText Object.\n */\n setFontSize: function (size)\n {\n this._fontSize = size;\n\n this._dirty = true;\n\n return this;\n },\n\n /**\n * Sets the letter spacing between each character of this Bitmap Text.\n * Can be a positive value to increase the space, or negative to reduce it.\n * Spacing is applied after the kerning values have been set.\n *\n * @method Phaser.GameObjects.BitmapText#setLetterSpacing\n * @since 3.4.0\n *\n * @param {number} [spacing=0] - The amount of horizontal space to add between each character.\n *\n * @return {this} This BitmapText Object.\n */\n setLetterSpacing: function (spacing)\n {\n if (spacing === undefined) { spacing = 0; }\n\n this._letterSpacing = spacing;\n\n this._dirty = true;\n\n return this;\n },\n\n /**\n * Set the textual content of this BitmapText.\n *\n * An array of strings will be converted into multi-line text. Use the align methods to change multi-line alignment.\n *\n * @method Phaser.GameObjects.BitmapText#setText\n * @since 3.0.0\n *\n * @param {(string|string[])} value - The string, or array of strings, to be set as the content of this BitmapText.\n *\n * @return {this} This BitmapText Object.\n */\n setText: function (value)\n {\n if (!value && value !== 0)\n {\n value = '';\n }\n\n if (Array.isArray(value))\n {\n value = value.join('\\n');\n }\n\n if (value !== this.text)\n {\n this._text = value.toString();\n\n this._dirty = true;\n\n this.updateDisplayOrigin();\n }\n\n return this;\n },\n\n /**\n * Sets a drop shadow effect on this Bitmap Text.\n *\n * This is a WebGL only feature and only works with Static Bitmap Text, not Dynamic.\n *\n * You can set the vertical and horizontal offset of the shadow, as well as the color and alpha.\n *\n * Once a shadow has been enabled you can modify the `dropShadowX` and `dropShadowY` properties of this\n * Bitmap Text directly to adjust the position of the shadow in real-time.\n *\n * If you wish to clear the shadow, call this method with no parameters specified.\n *\n * @method Phaser.GameObjects.BitmapText#setDropShadow\n * @webglOnly\n * @since 3.50.0\n *\n * @param {number} [x=0] - The horizontal offset of the drop shadow.\n * @param {number} [y=0] - The vertical offset of the drop shadow.\n * @param {number} [color=0xffffff] - The color of the drop shadow, given as a hex value, i.e. `0x000000` for black.\n * @param {number} [alpha=0.5] - The alpha of the drop shadow, given as a float between 0 and 1. This is combined with the Bitmap Text alpha as well.\n *\n * @return {this} This BitmapText Object.\n */\n setDropShadow: function (x, y, color, alpha)\n {\n if (x === undefined) { x = 0; }\n if (y === undefined) { y = 0; }\n if (color === undefined) { color = 0x000000; }\n if (alpha === undefined) { alpha = 0.5; }\n\n this.dropShadowX = x;\n this.dropShadowY = y;\n this.dropShadowAlpha = alpha;\n this.dropShadowColor = color;\n\n return this;\n },\n\n /**\n * Sets a tint on a range of characters in this Bitmap Text, starting from the `start` parameter index\n * and running for `length` quantity of characters.\n *\n * The `start` parameter can be negative. In this case, it starts at the end of the text and counts\n * backwards `start` places.\n *\n * You can also pass in -1 as the `length` and it will tint all characters from `start`\n * up until the end of the string.\n\n * Remember that spaces and punctuation count as characters.\n *\n * This is a WebGL only feature and only works with Static Bitmap Text, not Dynamic.\n *\n * The tint works by taking the pixel color values from the Bitmap Text texture, and then\n * multiplying it by the color value of the tint. You can provide either one color value,\n * in which case the whole character will be tinted in that color. Or you can provide a color\n * per corner. The colors are blended together across the extent of the character range.\n *\n * To swap this from being an additive tint to a fill based tint, set the `tintFill` parameter to `true`.\n *\n * To modify the tint color once set, call this method again with new color values.\n *\n * Using `setWordTint` can override tints set by this function, and vice versa.\n *\n * To remove a tint call this method with just the `start`, and optionally, the `length` parameters defined.\n *\n * @method Phaser.GameObjects.BitmapText#setCharacterTint\n * @webglOnly\n * @since 3.50.0\n *\n * @param {number} [start=0] - The starting character to begin the tint at. If negative, it counts back from the end of the text.\n * @param {number} [length=1] - The number of characters to tint. Remember that spaces count as a character too. Pass -1 to tint all characters from `start` onwards.\n * @param {boolean} [tintFill=false] - Use a fill-based tint (true), or an additive tint (false)\n * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the character. If not other values are given this value is applied evenly, tinting the whole character.\n * @param {integer} [topRight] - The tint being applied to the top-right of the character.\n * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the character.\n * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the character.\n *\n * @return {this} This BitmapText Object.\n */\n setCharacterTint: function (start, length, tintFill, topLeft, topRight, bottomLeft, bottomRight)\n {\n if (start === undefined) { start = 0; }\n if (length === undefined) { length = 1; }\n if (tintFill === undefined) { tintFill = false; }\n if (topLeft === undefined) { topLeft = -1; }\n\n if (topRight === undefined)\n {\n topRight = topLeft;\n bottomLeft = topLeft;\n bottomRight = topLeft;\n }\n\n var len = this.text.length;\n\n if (length === -1)\n {\n length = len;\n }\n\n if (start < 0)\n {\n start = len + start;\n }\n\n start = Clamp(start, 0, len - 1);\n\n var end = Clamp(start + length, start, len);\n\n var charColors = this.charColors;\n\n for (var i = start; i < end; i++)\n {\n var color = charColors[i];\n\n if (topLeft === -1)\n {\n charColors[i] = null;\n }\n else\n {\n var tintEffect = (tintFill) ? 1 : 0;\n\n if (color)\n {\n color.tintEffect = tintEffect;\n color.tintTL = topLeft;\n color.tintTR = topRight;\n color.tintBL = bottomLeft;\n color.tintBR = bottomRight;\n }\n else\n {\n charColors[i] = {\n tintEffect: tintEffect,\n tintTL: topLeft,\n tintTR: topRight,\n tintBL: bottomLeft,\n tintBR: bottomRight\n };\n }\n }\n }\n\n return this;\n },\n\n /**\n * Sets a tint on a matching word within this Bitmap Text.\n *\n * The `word` parameter can be either a string or a number.\n *\n * If a string, it will run a string comparison against the text contents, and if matching,\n * it will tint the whole word.\n *\n * If a number, if till that word, based on its offset within the text contents.\n *\n * The `count` parameter controls how many words are replaced. Pass in -1 to replace them all.\n *\n * This parameter is ignored if you pass a number as the `word` to be searched for.\n *\n * This is a WebGL only feature and only works with Static Bitmap Text, not Dynamic.\n *\n * The tint works by taking the pixel color values from the Bitmap Text texture, and then\n * multiplying it by the color value of the tint. You can provide either one color value,\n * in which case the whole character will be tinted in that color. Or you can provide a color\n * per corner. The colors are blended together across the extent of the character range.\n *\n * To swap this from being an additive tint to a fill based tint, set the `tintFill` parameter to `true`.\n *\n * To modify the tint color once set, call this method again with new color values.\n *\n * Using `setCharacterTint` can override tints set by this function, and vice versa.\n *\n * @method Phaser.GameObjects.BitmapText#setWordTint\n * @webglOnly\n * @since 3.50.0\n *\n * @param {(string|number)} word - The word to search for. Either a string, or an index of the word in the words array.\n * @param {number} [count=1] - The number of matching words to tint. Pass -1 to tint all matching words.\n * @param {boolean} [tintFill=false] - Use a fill-based tint (true), or an additive tint (false)\n * @param {integer} [topLeft=0xffffff] - The tint being applied to the top-left of the word. If not other values are given this value is applied evenly, tinting the whole word.\n * @param {integer} [topRight] - The tint being applied to the top-right of the word.\n * @param {integer} [bottomLeft] - The tint being applied to the bottom-left of the word.\n * @param {integer} [bottomRight] - The tint being applied to the bottom-right of the word.\n *\n * @return {this} This BitmapText Object.\n */\n setWordTint: function (word, count, tintFill, topLeft, topRight, bottomLeft, bottomRight)\n {\n if (count === undefined) { count = 1; }\n\n var bounds = this.getTextBounds();\n\n var words = bounds.words;\n\n var wordIsNumber = (typeof(word) === 'number');\n\n var total = 0;\n\n for (var i = 0; i < words.length; i++)\n {\n var lineword = words[i];\n\n if ((wordIsNumber && i === word) || (!wordIsNumber && lineword.word === word))\n {\n this.setCharacterTint(lineword.i, lineword.word.length, tintFill, topLeft, topRight, bottomLeft, bottomRight);\n\n total++;\n\n if (total === count)\n {\n return this;\n }\n }\n }\n\n return this;\n },\n\n /**\n * Calculate the bounds of this Bitmap Text.\n *\n * An object is returned that contains the position, width and height of the Bitmap Text in local and global\n * contexts.\n *\n * Local size is based on just the font size and a [0, 0] position.\n *\n * Global size takes into account the Game Object's scale, world position and display origin.\n *\n * Also in the object is data regarding the length of each line, should this be a multi-line BitmapText.\n *\n * @method Phaser.GameObjects.BitmapText#getTextBounds\n * @since 3.0.0\n *\n * @param {boolean} [round=false] - Whether to round the results up to the nearest integer.\n *\n * @return {Phaser.Types.GameObjects.BitmapText.BitmapTextSize} An object that describes the size of this Bitmap Text.\n */\n getTextBounds: function (round)\n {\n // local = The BitmapText based on fontSize and 0x0 coords\n // global = The BitmapText, taking into account scale and world position\n // lines = The BitmapText line data\n\n var bounds = this._bounds;\n\n if (this._dirty || round || this.scaleX !== bounds.scaleX || this.scaleY !== bounds.scaleY)\n {\n GetBitmapTextSize(this, round, true, bounds);\n\n this._dirty = false;\n }\n\n return bounds;\n },\n\n /**\n * Gets the character located at the given x/y coordinate within this Bitmap Text.\n *\n * The coordinates you pass in are translated into the local space of the\n * Bitmap Text, however, it is up to you to first translate the input coordinates to world space.\n *\n * If you wish to use this in combination with an input event, be sure\n * to pass in `Pointer.worldX` and `worldY` so they are in world space.\n *\n * In some cases, based on kerning, characters can overlap. When this happens,\n * the first character in the word is returned.\n *\n * Note that this does not work for DynamicBitmapText if you have changed the\n * character positions during render. It will only scan characters in their un-translated state.\n *\n * @method Phaser.GameObjects.BitmapText#getCharacterAt\n * @since 3.50.0\n *\n * @param {number} x - The x position to check.\n * @param {number} y - The y position to check.\n * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera which is being tested against. If not given will use the Scene default camera.\n *\n * @return {Phaser.Types.GameObjects.BitmapText.BitmapTextCharacter} The character object at the given position, or `null`.\n */\n getCharacterAt: function (x, y, camera)\n {\n var point = this.getLocalPoint(x, y, null, camera);\n\n var bounds = this.getTextBounds();\n\n var chars = bounds.characters;\n\n var tempRect = new Rectangle();\n\n for (var i = 0; i < chars.length; i++)\n {\n var char = chars[i];\n\n tempRect.setTo(char.x, char.t, char.r - char.x, char.b);\n\n if (tempRect.contains(point.x, point.y))\n {\n return char;\n }\n }\n\n return null;\n },\n\n /**\n * Updates the Display Origin cached values internally stored on this Game Object.\n * You don't usually call this directly, but it is exposed for edge-cases where you may.\n *\n * @method Phaser.GameObjects.BitmapText#updateDisplayOrigin\n * @since 3.0.0\n *\n * @return {this} This Game Object instance.\n */\n updateDisplayOrigin: function ()\n {\n this._dirty = true;\n\n this.getTextBounds(false);\n\n return this;\n },\n\n /**\n * Changes the font this BitmapText is using to render.\n *\n * The new texture is loaded and applied to the BitmapText. The existing test, size and alignment are preserved,\n * unless overridden via the arguments.\n *\n * @method Phaser.GameObjects.BitmapText#setFont\n * @since 3.11.0\n *\n * @param {string} font - The key of the font to use from the Bitmap Font cache.\n * @param {number} [size] - The font size of this Bitmap Text. If not specified the current size will be used.\n * @param {integer} [align=0] - The alignment of the text in a multi-line BitmapText object. If not specified the current alignment will be used.\n *\n * @return {this} This BitmapText Object.\n */\n setFont: function (key, size, align)\n {\n if (size === undefined) { size = this._fontSize; }\n if (align === undefined) { align = this._align; }\n\n if (key !== this.font)\n {\n var entry = this.scene.sys.cache.bitmapFont.get(key);\n\n if (entry)\n {\n this.font = key;\n this.fontData = entry.data;\n this._fontSize = size;\n this._align = align;\n\n this.setTexture(entry.texture, entry.frame);\n\n GetBitmapTextSize(this, false, true, this._bounds);\n }\n }\n\n return this;\n },\n\n /**\n * Sets the maximum display width of this BitmapText in pixels.\n *\n * If `BitmapText.text` is longer than `maxWidth` then the lines will be automatically wrapped\n * based on the previous whitespace character found in the line.\n *\n * If no whitespace was found then no wrapping will take place and consequently the `maxWidth` value will not be honored.\n *\n * Disable maxWidth by setting the value to 0.\n *\n * You can set the whitespace character to be searched for by setting the `wordWrapCharCode` parameter or property.\n *\n * @method Phaser.GameObjects.BitmapText#setMaxWidth\n * @since 3.21.0\n *\n * @param {number} value - The maximum display width of this BitmapText in pixels. Set to zero to disable.\n * @param {number} [wordWrapCharCode] - The character code to check for when word wrapping. Defaults to 32 (the space character).\n *\n * @return {this} This BitmapText Object.\n */\n setMaxWidth: function (value, wordWrapCharCode)\n {\n this._maxWidth = value;\n\n this._dirty = true;\n\n if (wordWrapCharCode !== undefined)\n {\n this.wordWrapCharCode = wordWrapCharCode;\n }\n\n return this;\n },\n\n /**\n * Controls the alignment of each line of text in this BitmapText object.\n *\n * Only has any effect when this BitmapText contains multiple lines of text, split with carriage-returns.\n * Has no effect with single-lines of text.\n *\n * See the methods `setLeftAlign`, `setCenterAlign` and `setRightAlign`.\n *\n * 0 = Left aligned (default)\n * 1 = Middle aligned\n * 2 = Right aligned\n *\n * The alignment position is based on the longest line of text.\n *\n * @name Phaser.GameObjects.BitmapText#align\n * @type {integer}\n * @since 3.11.0\n */\n align: {\n\n set: function (value)\n {\n this._align = value;\n this._dirty = true;\n },\n\n get: function ()\n {\n return this._align;\n }\n\n },\n\n /**\n * The text that this Bitmap Text object displays.\n *\n * You can also use the method `setText` if you want a chainable way to change the text content.\n *\n * @name Phaser.GameObjects.BitmapText#text\n * @type {string}\n * @since 3.0.0\n */\n text: {\n\n set: function (value)\n {\n this.setText(value);\n },\n\n get: function ()\n {\n return this._text;\n }\n\n },\n\n /**\n * The font size of this Bitmap Text.\n *\n * You can also use the method `setFontSize` if you want a chainable way to change the font size.\n *\n * @name Phaser.GameObjects.BitmapText#fontSize\n * @type {number}\n * @since 3.0.0\n */\n fontSize: {\n\n set: function (value)\n {\n this._fontSize = value;\n this._dirty = true;\n },\n\n get: function ()\n {\n return this._fontSize;\n }\n\n },\n\n /**\n * Adds / Removes spacing between characters.\n *\n * Can be a negative or positive number.\n *\n * You can also use the method `setLetterSpacing` if you want a chainable way to change the letter spacing.\n *\n * @name Phaser.GameObjects.BitmapText#letterSpacing\n * @type {number}\n * @since 3.0.0\n */\n letterSpacing: {\n\n set: function (value)\n {\n this._letterSpacing = value;\n this._dirty = true;\n },\n\n get: function ()\n {\n return this._letterSpacing;\n }\n\n },\n\n /**\n * The maximum display width of this BitmapText in pixels.\n *\n * If BitmapText.text is longer than maxWidth then the lines will be automatically wrapped\n * based on the last whitespace character found in the line.\n *\n * If no whitespace was found then no wrapping will take place and consequently the maxWidth value will not be honored.\n *\n * Disable maxWidth by setting the value to 0.\n *\n * @name Phaser.GameObjects.BitmapText#maxWidth\n * @type {number}\n * @since 3.21.0\n */\n maxWidth: {\n\n set: function (value)\n {\n this._maxWidth = value;\n this._dirty = true;\n },\n\n get: function ()\n {\n return this._maxWidth;\n }\n\n },\n\n /**\n * The width of this Bitmap Text.\n *\n * @name Phaser.GameObjects.BitmapText#width\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n width: {\n\n get: function ()\n {\n this.getTextBounds(false);\n\n return this._bounds.global.width;\n }\n\n },\n\n /**\n * The height of this bitmap text.\n *\n * @name Phaser.GameObjects.BitmapText#height\n * @type {number}\n * @readonly\n * @since 3.0.0\n */\n height: {\n\n get: function ()\n {\n this.getTextBounds(false);\n\n return this._bounds.global.height;\n }\n\n },\n\n /**\n * Build a JSON representation of this Bitmap Text.\n *\n * @method Phaser.GameObjects.BitmapText#toJSON\n * @since 3.0.0\n *\n * @return {Phaser.Types.GameObjects.BitmapText.JSONBitmapText} A JSON representation of this Bitmap Text.\n */\n toJSON: function ()\n {\n var out = Components.ToJSON(this);\n\n // Extra data is added here\n\n var data = {\n font: this.font,\n text: this.text,\n fontSize: this.fontSize,\n letterSpacing: this.letterSpacing,\n align: this.align\n };\n\n out.data = data;\n\n return out;\n },\n\n /**\n * Internal destroy handler, called as part of the destroy process.\n *\n * @method Phaser.GameObjects.BitmapText#preDestroy\n * @protected\n * @since 3.50.0\n */\n preDestroy: function ()\n {\n this.charColors.length = 0;\n this._bounds = null;\n this.fontData = null;\n }\n\n});\n\n/**\n * Left align the text characters in a multi-line BitmapText object.\n *\n * @name Phaser.GameObjects.BitmapText.ALIGN_LEFT\n * @type {integer}\n * @since 3.11.0\n */\nBitmapText.ALIGN_LEFT = 0;\n\n/**\n * Center align the text characters in a multi-line BitmapText object.\n *\n * @name Phaser.GameObjects.BitmapText.ALIGN_CENTER\n * @type {integer}\n * @since 3.11.0\n */\nBitmapText.ALIGN_CENTER = 1;\n\n/**\n * Right align the text characters in a multi-line BitmapText object.\n *\n * @name Phaser.GameObjects.BitmapText.ALIGN_RIGHT\n * @type {integer}\n * @since 3.11.0\n */\nBitmapText.ALIGN_RIGHT = 2;\n\n/**\n * Parse an XML Bitmap Font from an Atlas.\n *\n * Adds the parsed Bitmap Font data to the cache with the `fontName` key.\n *\n * @method Phaser.GameObjects.BitmapText.ParseFromAtlas\n * @since 3.0.0\n *\n * @param {Phaser.Scene} scene - The Scene to parse the Bitmap Font for.\n * @param {string} fontName - The key of the font to add to the Bitmap Font cache.\n * @param {string} textureKey - The key of the BitmapFont's texture.\n * @param {string} frameKey - The key of the BitmapFont texture's frame.\n * @param {string} xmlKey - The key of the XML data of the font to parse.\n * @param {integer} [xSpacing] - The x-axis spacing to add between each letter.\n * @param {integer} [ySpacing] - The y-axis spacing to add to the line height.\n *\n * @return {boolean} Whether the parsing was successful or not.\n */\nBitmapText.ParseFromAtlas = ParseFromAtlas;\n\n/**\n * Parse an XML font to Bitmap Font data for the Bitmap Font cache.\n *\n * @method Phaser.GameObjects.BitmapText.ParseXMLBitmapFont\n * @since 3.17.0\n *\n * @param {XMLDocument} xml - The XML Document to parse the font from.\n * @param {Phaser.Textures.Frame} frame - The texture frame to take into account when creating the uv data.\n * @param {integer} [xSpacing=0] - The x-axis spacing to add between each letter.\n * @param {integer} [ySpacing=0] - The y-axis spacing to add to the line height.\n *\n * @return {Phaser.Types.GameObjects.BitmapText.BitmapFontData} The parsed Bitmap Font data.\n */\nBitmapText.ParseXMLBitmapFont = ParseXMLBitmapFont;\n\nmodule.exports = BitmapText;\n"} +{"text": "\"lang\"\n{\n\"Language\"\t\"turkish\"\n\"Tokens\"\n{\n\"ServerBrowser_Filter\"\t\"Filtre\"\n\"[english]ServerBrowser_Filter\"\t\"Filter\"\n\"ServerBrowser_All\"\t\"<Tümü>\"\n\"[english]ServerBrowser_All\"\t\"<All>\"\n\"ServerBrowser_World\"\t\"Dünya\"\n\"[english]ServerBrowser_World\"\t\"World\"\n\"ServerBrowser_US_East\"\t\"Doğu ABD\"\n\"[english]ServerBrowser_US_East\"\t\"US - East\"\n\"ServerBrowser_US_West\"\t\"Batı ABD\"\n\"[english]ServerBrowser_US_West\"\t\"US - West\"\n\"ServerBrowser_SouthAmerica\"\t\"Güney Amerika\"\n\"[english]ServerBrowser_SouthAmerica\"\t\"South America\"\n\"ServerBrowser_Europe\"\t\"Avrupa\"\n\"[english]ServerBrowser_Europe\"\t\"Europe\"\n\"ServerBrowser_Asia\"\t\"Asya\"\n\"[english]ServerBrowser_Asia\"\t\"Asia\"\n\"ServerBrowser_Australia\"\t\"Avustralya\"\n\"[english]ServerBrowser_Australia\"\t\"Australia\"\n\"ServerBrowser_MiddleEast\"\t\"Orta Doğu\"\n\"[english]ServerBrowser_MiddleEast\"\t\"Middle East\"\n\"ServerBrowser_Africa\"\t\"Afrika\"\n\"[english]ServerBrowser_Africa\"\t\"Africa\"\n\"ServerBrowser_LessThan50\"\t\"< 50\"\n\"[english]ServerBrowser_LessThan50\"\t\"< 50\"\n\"ServerBrowser_LessThan100\"\t\"< 100\"\n\"[english]ServerBrowser_LessThan100\"\t\"< 100\"\n\"ServerBrowser_LessThan150\"\t\"< 150\"\n\"[english]ServerBrowser_LessThan150\"\t\"< 150\"\n\"ServerBrowser_LessThan250\"\t\"< 250\"\n\"[english]ServerBrowser_LessThan250\"\t\"< 250\"\n\"ServerBrowser_LessThan350\"\t\"< 350\"\n\"[english]ServerBrowser_LessThan350\"\t\"< 350\"\n\"ServerBrowser_LessThan600\"\t\"< 600\"\n\"[english]ServerBrowser_LessThan600\"\t\"< 600\"\n\"ServerBrowser_Connect\"\t\"Bağlan\"\n\"[english]ServerBrowser_Connect\"\t\"Connect\"\n\"ServerBrowser_Servers\"\t\"Sunucular\"\n\"[english]ServerBrowser_Servers\"\t\"Servers\"\n\"ServerBrowser_Game\"\t\"Oyun\"\n\"[english]ServerBrowser_Game\"\t\"Game\"\n\"ServerBrowser_Players\"\t\"Oyuncular\"\n\"[english]ServerBrowser_Players\"\t\"Players\"\n\"ServerBrowser_Map\"\t\"Harita\"\n\"[english]ServerBrowser_Map\"\t\"Map\"\n\"ServerBrowser_Latency\"\t\"Gecikme\"\n\"[english]ServerBrowser_Latency\"\t\"Latency\"\n\"ServerBrowser_ChangeFilters\"\t\"Filtreleri Değiştir\"\n\"[english]ServerBrowser_ChangeFilters\"\t\"Change filters\"\n\"ServerBrowser_HasUsersPlaying\"\t\"Oyuncu bulunan\"\n\"[english]ServerBrowser_HasUsersPlaying\"\t\"Has users playing\"\n\"ServerBrowser_ServerNotFull\"\t\"Dolu olmayan sunucu\"\n\"[english]ServerBrowser_ServerNotFull\"\t\"Server not full\"\n\"ServerBrowser_IsNotPasswordProtected\"\t\"Parola korumalı olmayan\"\n\"[english]ServerBrowser_IsNotPasswordProtected\"\t\"Is not password protected\"\n\"ServerBrowser_Location\"\t\"Bölge\"\n\"[english]ServerBrowser_Location\"\t\"Location\"\n\"ServerBrowser_PasswordRequired\"\t\"Bu sunucuya girebilmek için parola gerekmektedir.\"\n\"[english]ServerBrowser_PasswordRequired\"\t\"This server requires a password to join.\"\n\"ServerBrowser_ServerLabel\"\t\"Sunucu:\"\n\"[english]ServerBrowser_ServerLabel\"\t\"Server:\"\n\"ServerBrowser_PasswordLabel\"\t\"Parola\"\n\"[english]ServerBrowser_PasswordLabel\"\t\"Password\"\n\"ServerBrowser_Cancel\"\t\"İptal\"\n\"[english]ServerBrowser_Cancel\"\t\"Cancel\"\n\"ServerBrowser_JoinGame\"\t\"Oyuna Katıl\"\n\"[english]ServerBrowser_JoinGame\"\t\"Join Game\"\n\"ServerBrowser_Close\"\t\"Kapat\"\n\"[english]ServerBrowser_Close\"\t\"Close\"\n\"ServerBrowser_AutoRetry\"\t\"Tekrar Dene\"\n\"[english]ServerBrowser_AutoRetry\"\t\"Auto-Retry\"\n\"ServerBrowser_AlertMeWhenSlotOpens\"\t\"Sunucuda yer açılırsa beni uyar.\"\n\"[english]ServerBrowser_AlertMeWhenSlotOpens\"\t\"Alert me when a player slot is available on the server.\"\n\"ServerBrowser_JoinWhenSlotOpens\"\t\"Sunucuda yer açılırsa oyuna katıl.\"\n\"[english]ServerBrowser_JoinWhenSlotOpens\"\t\"Join the server as soon as a player slot is available.\"\n\"ServerBrowser_GameLabel\"\t\"Oyun:\"\n\"[english]ServerBrowser_GameLabel\"\t\"Game:\"\n\"ServerBrowser_IPAddressLabel\"\t\"IP Adresi:\"\n\"[english]ServerBrowser_IPAddressLabel\"\t\"IP Address:\"\n\"ServerBrowser_MapLabel\"\t\"Harita:\"\n\"[english]ServerBrowser_MapLabel\"\t\"Map:\"\n\"ServerBrowser_PlayersLabel\"\t\"Oyuncular:\"\n\"[english]ServerBrowser_PlayersLabel\"\t\"Players:\"\n\"ServerBrowser_LatencyLabel\"\t\"Gecikme:\"\n\"[english]ServerBrowser_LatencyLabel\"\t\"Latency:\"\n\"ServerBrowser_EnterIPofServerToAdd\"\t\"Eklemek istediğiniz sunucunun IP adresini girin.\"\n\"[english]ServerBrowser_EnterIPofServerToAdd\"\t\"Enter the IP address of the server you wish to add.\"\n\"ServerBrowser_OK\"\t\"Tamam\"\n\"[english]ServerBrowser_OK\"\t\"OK\"\n\"ServerBrowser_Examples\"\t\"Örnek:\\ntfc.valvesoftware.com\\ncounterstrike.speakeasy.net:27016\\n205.158.143.200:27015\"\n\"[english]ServerBrowser_Examples\"\t\"Examples:\\ntfc.valvesoftware.com\\ncounterstrike.speakeasy.net:27016\\n205.158.143.200:27015\"\n\"ServerBrowser_AddServersTitle\"\t\"Sunucu Ekle - Sunucular\"\n\"[english]ServerBrowser_AddServersTitle\"\t\"Add Server - Servers\"\n\"ServerBrowser_AddServerErrorTitle\"\t\"Sunucu Ekle - Hata\"\n\"[english]ServerBrowser_AddServerErrorTitle\"\t\"Add Server - Error\"\n\"ServerBrowser_AddServerError\"\t\"Girdiğiniz sunucu IP adresi geçersiz.\"\n\"[english]ServerBrowser_AddServerError\"\t\"The server IP address you entered is invalid.\"\n\"ServerBrowser_ServerRequiresPasswordTitle\"\t\"Sunucu Parola İstiyor\"\n\"[english]ServerBrowser_ServerRequiresPasswordTitle\"\t\"Server Requires Password\"\n\"ServerBrowser_ServerRequiresPassword\"\t\"Bu sunucuya girebilmek için parola gerekmektedir.\"\n\"[english]ServerBrowser_ServerRequiresPassword\"\t\"This server requires a password to join.\"\n\"ServerBrowser_RemoveServerFromFavorites\"\t\"Sunucuyu favorilerden sil\"\n\"[english]ServerBrowser_RemoveServerFromFavorites\"\t\"Remove server from favorites\"\n\"ServerBrowser_RemoveServerFromBlacklist\"\t\"Sunucuyu kara listeden kaldır\"\n\"[english]ServerBrowser_RemoveServerFromBlacklist\"\t\"Remove server from blacklist\"\n\"ServerBrowser_AddServerByIP\"\t\"Sunucuyu IP adresiyle ekle\"\n\"[english]ServerBrowser_AddServerByIP\"\t\"Add server by IP address\"\n\"ServerBrowser_UpdatingFavsTitle\"\t\"Favoriler Güncelleniyor\"\n\"[english]ServerBrowser_UpdatingFavsTitle\"\t\"Updating Favorites\"\n\"ServerBrowser_UpdatingFavs\"\t\"Favorileriniz aktarılıyor. Bu işlem bir dakika sürebilir...\"\n\"[english]ServerBrowser_UpdatingFavs\"\t\"Transferring your Favorites. This may take a minute...\"\n\"ServerBrowser_UnableToLoadFavsTitle\"\t\"Favoriler yüklenemiyor\"\n\"[english]ServerBrowser_UnableToLoadFavsTitle\"\t\"Unable to load favorites\"\n\"ServerBrowser_ErrorLoadingFile\"\t\"Dosya yükleme hatası.\"\n\"[english]ServerBrowser_ErrorLoadingFile\"\t\"Error loading file.\"\n\"ServerBrowser_ErrorLoadingFileCorrupt\"\t\"Yükleme hatası. Dosya bozuk.\"\n\"[english]ServerBrowser_ErrorLoadingFileCorrupt\"\t\"Error loading. File may be corrupt.\"\n\"ServerBrowser_UnableToOpenDataFile\"\t\"Veri dosyası açılamıyor.\"\n\"[english]ServerBrowser_UnableToOpenDataFile\"\t\"Unable to open datafile.\"\n\"ServerBrowser_GettingNewServerList\"\t\"Yeni sunucu listesi alınıyor...\"\n\"[english]ServerBrowser_GettingNewServerList\"\t\"Getting new server list...\"\n\"ServerBrowser_InternetTab\"\t\"İnternet\"\n\"[english]ServerBrowser_InternetTab\"\t\"Internet\"\n\"ServerBrowser_FavoritesTab\"\t\"Favoriler\"\n\"[english]ServerBrowser_FavoritesTab\"\t\"Favorites\"\n\"ServerBrowser_SpectateTab\"\t\"İzleyici\"\n\"[english]ServerBrowser_SpectateTab\"\t\"Spectate\"\n\"ServerBrowser_LanTab\"\t\"Yerel ağ\"\n\"[english]ServerBrowser_LanTab\"\t\"Lan\"\n\"ServerBrowser_FriendsTab\"\t\"Arkadaşlar\"\n\"[english]ServerBrowser_FriendsTab\"\t\"Friends\"\n\"ServerBrowser_HistoryTab\"\t\"Geçmiş\"\n\"[english]ServerBrowser_HistoryTab\"\t\"History\"\n\"ServerBrowser_BlacklistTab\"\t\"Kara Listedeki Sunucular\"\n\"[english]ServerBrowser_BlacklistTab\"\t\"Blacklisted Servers\"\n\"ServerBrowser_GameInfoTitle\"\t\"Oyun Bilgisi\"\n\"[english]ServerBrowser_GameInfoTitle\"\t\"Game Info\"\n\"ServerBrowser_AddToFavorites\"\t\"Favorilere Ekle\"\n\"[english]ServerBrowser_AddToFavorites\"\t\"Add To Favorites\"\n\"ServerBrowser_GameInfoWithNameTitle\"\t\"Oyun Bilgisi - %game%\"\n\"[english]ServerBrowser_GameInfoWithNameTitle\"\t\"Game Info - %game%\"\n\"ServerBrowser_PressJoinToConnect\"\t\"Sunucuya bağlanmak için 'Oyuna Katıl'a tıklayın.\"\n\"[english]ServerBrowser_PressJoinToConnect\"\t\"Press 'Join Game' to connect to the server.\"\n\"ServerBrowser_JoinWhenSlotIsFree\"\t\"Yer açıldığında sunucuya gireceksiniz.\"\n\"[english]ServerBrowser_JoinWhenSlotIsFree\"\t\"You will join the server as soon as a player slot is free.\"\n\"ServerBrowser_AlertWhenSlotIsFree\"\t\"Sunucuda yer açılınca uyarı alacaksınız.\"\n\"[english]ServerBrowser_AlertWhenSlotIsFree\"\t\"You will be alerted when a player slot is free on the server.\"\n\"ServerBrowser_CouldNotConnectServerFull\"\t\"Bağlanılamıyor - sunucu dolu.\"\n\"[english]ServerBrowser_CouldNotConnectServerFull\"\t\"Could not connect - server is full.\"\n\"ServerBrowser_ServerNotResponding\"\t\"Sunucu yanıt vermiyor.\"\n\"[english]ServerBrowser_ServerNotResponding\"\t\"Server is not responding.\"\n\"ServerBrowser_RefreshingPercentDone\"\t\"Sunucu listesi yenileniyor... % %s1 tamamlandı\"\n\"[english]ServerBrowser_RefreshingPercentDone\"\t\"Refreshing server list... %s1 % complete\"\n\"ServerBrowser_ServersResponding\"\t\"Oyun sunucuları %s1 adresinden yanıt veriyor\"\n\"[english]ServerBrowser_ServersResponding\"\t\"Game servers responding from %s1\"\n\"ServerBrowser_ServersRespondingLocal\"\t\"Oyun sunucuları yerel makineden yanıt veriyor\"\n\"[english]ServerBrowser_ServersRespondingLocal\"\t\"Game servers responding from local machine\"\n\"ServerBrowser_RefreshingServerList\"\t\"Sunucu listesi yenileniyor...\"\n\"[english]ServerBrowser_RefreshingServerList\"\t\"Refreshing server list...\"\n\"ServerBrowser_FilterDescLatency\"\t\"gecikme\"\n\"[english]ServerBrowser_FilterDescLatency\"\t\"latency\"\n\"ServerBrowser_FilterDescNotFull\"\t\"dolu olmayan\"\n\"[english]ServerBrowser_FilterDescNotFull\"\t\"is not full\"\n\"ServerBrowser_FilterDescNotEmpty\"\t\"boş olmayan\"\n\"[english]ServerBrowser_FilterDescNotEmpty\"\t\"is not empty\"\n\"ServerBrowser_FilterDescNoPassword\"\t\"parolalı olmayan\"\n\"[english]ServerBrowser_FilterDescNoPassword\"\t\"has no password\"\n\"ServerBrowser_NoLanServers\"\t\"Yerel ağınızda çalışan bir sunucunuz yok.\"\n\"[english]ServerBrowser_NoLanServers\"\t\"There are no servers running on your local network.\"\n\"ServerBrowser_NoFavoriteServers\"\t\"Henüz favori sunucularınızı seçmediniz.\"\n\"[english]ServerBrowser_NoFavoriteServers\"\t\"You currently have no favorite servers selected.\"\n\"ServerBrowser_NoBlacklistedServers\"\t\"Henüz hiçbir sunucuyu kara listeye eklemediniz.\"\n\"[english]ServerBrowser_NoBlacklistedServers\"\t\"You currently have no servers blacklisted.\"\n\"ServerBrowser_NoFriendsServers\"\t\"Şu anda hiçbir arkadaşınız oyun oynamıyor.\"\n\"[english]ServerBrowser_NoFriendsServers\"\t\"None of your friends are currently playing a game.\"\n\"ServerBrowser_NoInternetGames\"\t\"Seçtiğiniz filtre ayarlarında hiçbir internet oyunu görünmüyor.\"\n\"[english]ServerBrowser_NoInternetGames\"\t\"There are no internet games visible that pass your filter settings.\"\n\"ServerBrowser_NoInternetGamesResponded\"\t\"Hiçbir internet oyunu sorguya yanıt vermedi.\"\n\"[english]ServerBrowser_NoInternetGamesResponded\"\t\"No internet games responded to the query.\"\n\"ServerBrowser_MasterServerNotResponsive\"\t\"Ana oyun sunucusuna bağlanılamadığından sunucu listesi alınamadı.\"\n\"[english]ServerBrowser_MasterServerNotResponsive\"\t\"Could not contact master game server to retrieve server list.\"\n\"ServerBrowser_MasterServerHasNoServersListed\"\t\"Ana sunucuda filtreleme seçimlerinize uygun oyun bulunamadı.\"\n\"[english]ServerBrowser_MasterServerHasNoServersListed\"\t\"There are no internet games listed on the master server that pass your filter settings.\"\n\"ServerBrowser_Refresh\"\t\"Yenile\"\n\"[english]ServerBrowser_Refresh\"\t\"Refresh\"\n\"ServerBrowser_RefreshAll\"\t\"Tümünü yenile\"\n\"[english]ServerBrowser_RefreshAll\"\t\"Refresh all\"\n\"ServerBrowser_RefreshQuick\"\t\"Hızlı yenile\"\n\"[english]ServerBrowser_RefreshQuick\"\t\"Quick refresh\"\n\"ServerBrowser_StopRefreshingList\"\t\"Durdur\"\n\"[english]ServerBrowser_StopRefreshingList\"\t\"Stop refresh\"\n\"ServerBrowser_AddServer\"\t\"Sunucu Ekle\"\n\"[english]ServerBrowser_AddServer\"\t\"Add a Server\"\n\"ServerBrowser_AddCurrentServer\"\t\"Şu Anki Sunucuyu Ekle\"\n\"[english]ServerBrowser_AddCurrentServer\"\t\"Add Current Server\"\n\"ServerBrowser_ImportBlacklist\"\t\"Sunucuları Dosyadan Ekle\"\n\"[english]ServerBrowser_ImportBlacklist\"\t\"Import Servers From File\"\n\"ServerBrowser_ImportBlacklistTitle\"\t\"Sunucuları eklemek için bir dosya seçin:\"\n\"[english]ServerBrowser_ImportBlacklistTitle\"\t\"Select file to import servers from:\"\n\"ServerBrowser_BlacklistFiles\"\t\"Kara listedeki sunucular listesi dosyaları (*.txt)\"\n\"[english]ServerBrowser_BlacklistFiles\"\t\"Blacklist serverlist files (*.txt)\"\n\"ServerBrowser_PasswordColumn_Tooltip\"\t\"Sunucuya katılmak için parola gerekli\"\n\"[english]ServerBrowser_PasswordColumn_Tooltip\"\t\"Password required to join server\"\n\"ServerBrowser_BotColumn_Tooltip\"\t\"Bu sunucuda CPU oyuncuları bulunur\"\n\"[english]ServerBrowser_BotColumn_Tooltip\"\t\"CPU players are present on this server\"\n\"ServerBrowser_ServersCount\"\t\"Sunucular (%s1)\"\n\"[english]ServerBrowser_ServersCount\"\t\"Servers (%s1)\"\n\"ServerBrowser_ServersCountWithBlacklist\"\t\"Sunucular (%s1) (%s2 kara listede)\"\n\"[english]ServerBrowser_ServersCountWithBlacklist\"\t\"Servers (%s1) (%s2 blacklisted)\"\n\"ServerBrowser_BlacklistedServers\"\t\"Kara listedeki sunucular\"\n\"[english]ServerBrowser_BlacklistedServers\"\t\"Blacklisted servers\"\n\"ServerBrowser_BlacklistedServersCount\"\t\"Kara Listedeki Sunucular (%s1)\"\n\"[english]ServerBrowser_BlacklistedServersCount\"\t\"Blacklisted Servers (%s1)\"\n\"ServerBrowser_UnableToQueryMasters\"\t\"Ana Sunucu adresleri belirlenemedi. Sunucu Tarayıcısı düzgün çalışmayacak.\"\n\"[english]ServerBrowser_UnableToQueryMasters\"\t\"Unable to determine Master Server addresses. Server Browser will not function correctly.\"\n\"ServerBrowser_ESRBNotice\"\t\"ESRB Uyarısı: Oyun Deneyimi Çevrimiçi Oyun Boyunca Değişir\"\n\"[english]ServerBrowser_ESRBNotice\"\t\"ESRB Notice: Game Experience May Change During Online Play\"\n\"ServerBrowser_Password\"\t\"Parola\"\n\"[english]ServerBrowser_Password\"\t\"Password\"\n\"ServerBrowser_Bots\"\t\"Botlar\"\n\"[english]ServerBrowser_Bots\"\t\"Bots\"\n\"ServerBrowser_Secure\"\t\"Korumalı\"\n\"[english]ServerBrowser_Secure\"\t\"Secure\"\n\"ServerBrowser_IPAddress\"\t\"IP Adresi\"\n\"[english]ServerBrowser_IPAddress\"\t\"IP Address\"\n\"ServerBrowser_SecureColumn_Tooltip\"\t\"Valve Anti Hile teknolojisi tarafından korunan sunucu\"\n\"[english]ServerBrowser_SecureColumn_Tooltip\"\t\"Server protected by Valve Anti-Cheat technology\"\n\"ServerBrowser_AntiCheat\"\t\"Anti hile\"\n\"[english]ServerBrowser_AntiCheat\"\t\"Anti-cheat\"\n\"ServerBrowser_SecureOnly\"\t\"Korumalı\"\n\"[english]ServerBrowser_SecureOnly\"\t\"Secure\"\n\"ServerBrowser_InsecureOnly\"\t\"Korumasız\"\n\"[english]ServerBrowser_InsecureOnly\"\t\"Not secure\"\n\"ServerBrowser_FilterDescSecureOnly\"\t\"hile korumalı\"\n\"[english]ServerBrowser_FilterDescSecureOnly\"\t\"secure\"\n\"ServerBrowser_FilterDescInsecureOnly\"\t\"hile korumasız\"\n\"[english]ServerBrowser_FilterDescInsecureOnly\"\t\"not secure\"\n\"ServerBrowser_NoServersPlayed\"\t\"Son zamanlarda herhangi bir sunucuda oynamadınız.\"\n\"[english]ServerBrowser_NoServersPlayed\"\t\"No servers have been played recently.\"\n\"ServerBrowser_RemoveServerFromHistory\"\t\"Bu sunucuyu geçmişten kaldır\"\n\"[english]ServerBrowser_RemoveServerFromHistory\"\t\"Remove server from history\"\n\"ServerBrowser_LastPlayed\"\t\"Son oynama\"\n\"[english]ServerBrowser_LastPlayed\"\t\"Last played\"\n\"ServerBrowser_BlacklistedDate\"\t\"Kara listeye alınma tarihi\"\n\"[english]ServerBrowser_BlacklistedDate\"\t\"Blacklisted date\"\n\"ServerBrowser_OfflineMode\"\t\"Steam şu anda Çevrimdışı Modda. İnternete bağlanıp Steam'i yeniden başlatana kadar\\ninternet oyunlarına erişemezsiniz.\"\n\"[english]ServerBrowser_OfflineMode\"\t\"Steam is currently in Offline Mode. Internet games will not be available until you restart\\nsteam while connected to the Internet.\"\n\"ServerBrowser_ConnectToServer\"\t\"Sunucuya bağlan\"\n\"[english]ServerBrowser_ConnectToServer\"\t\"Connect to server\"\n\"ServerBrowser_ViewServerInfo\"\t\"Sunucu bilgisini göster\"\n\"[english]ServerBrowser_ViewServerInfo\"\t\"View server info\"\n\"ServerBrowser_RefreshServer\"\t\"Sunucuyu yenile\"\n\"[english]ServerBrowser_RefreshServer\"\t\"Refresh server\"\n\"ServerBrowser_AddServerToFavorites\"\t\"Sunucuyu favorilere ekle\"\n\"[english]ServerBrowser_AddServerToFavorites\"\t\"Add server to favorites\"\n\"ServerBrowser_AddServerToBlacklist\"\t\"Sunucuyu kara listeye ekle\"\n\"[english]ServerBrowser_AddServerToBlacklist\"\t\"Add server to blacklist\"\n\"ServerBrowser_NotResponding\"\t\"< yanıt vermiyor >\"\n\"[english]ServerBrowser_NotResponding\"\t\"< not responding >\"\n\"ServerBrowser_FiltersActive\"\t\"Etkin filtreler\"\n\"[english]ServerBrowser_FiltersActive\"\t\"Filters active\"\n\"ServerBrowser_ServerOutOfDate\"\t\"Sunucu güncel değil.\"\n\"[english]ServerBrowser_ServerOutOfDate\"\t\"Server is out of date..\"\n\"ServerBrowser_ClientOutOfDate\"\t\"Sürümünüz sunucularla uyuşmamaktadır.\\nLütfen oyunu yeniden başlatın.\"\n\"[english]ServerBrowser_ClientOutOfDate\"\t\"Your version does not match the servers.\\nPlease restart the game.\"\n\"ServerBrowser_PlayerName\"\t\"Oyuncu Adı\"\n\"[english]ServerBrowser_PlayerName\"\t\"Player Name\"\n\"ServerBrowser_Score\"\t\"Skor\"\n\"[english]ServerBrowser_Score\"\t\"Score\"\n\"ServerBrowser_Time\"\t\"Süre\"\n\"[english]ServerBrowser_Time\"\t\"Time\"\n\"ServerBrowser_ServerName\"\t\"İsim:\"\n\"[english]ServerBrowser_ServerName\"\t\"Name:\"\n\"ServerBrowser_ValveAntiCheat\"\t\"Valve Anti Hile:\"\n\"[english]ServerBrowser_ValveAntiCheat\"\t\"Valve Anti-Cheat:\"\n\"ServerBrowser_NotSecure\"\t\"Korumasız\"\n\"[english]ServerBrowser_NotSecure\"\t\"Not secure\"\n\"ServerBrowser_ServerHasNoPlayers\"\t\"Şu an bu sunucuda kimse oynamıyor.\"\n\"[english]ServerBrowser_ServerHasNoPlayers\"\t\"No users currently playing on this server.\"\n\"VAC_BanNotification\"\t\"Valve Anti Hile Bildirimi\"\n\"[english]VAC_BanNotification\"\t\"Valve Anti-Cheat Notification\"\n\"VAC_AccountBanned\"\t\"Steam hesabı yasaklandı\"\n\"[english]VAC_AccountBanned\"\t\"Steam account banned\"\n\"VAC_YourAccountBanned\"\t\"'%account%' isimli Steam hesabınız, hile kullanımınızın tespiti nedeniyle korumalı oyun sunucularından yasaklanmıştır.\"\n\"[english]VAC_YourAccountBanned\"\t\"Your Steam account '%account%' has been banned from secure game servers due to a cheating infraction.\"\n\"VAC_GamesAffected\"\t\"Bu durumdan etkilenen oyunlar:\"\n\"[english]VAC_GamesAffected\"\t\"The following games are affected:\"\n\"VAC_ForDetails\"\t\"Ayrıntılar için tıklayın\"\n\"[english]VAC_ForDetails\"\t\"Click here for details\"\n\"VAC_ConnectionRefusedTitle\"\t\"Bağlantı Reddedildi - VAC\"\n\"[english]VAC_ConnectionRefusedTitle\"\t\"Connection Refused - VAC\"\n\"VAC_ConnectionRefusedDetail\"\t\"Seçtiğiniz sunucuya bağlanamazsınız, çünkü bu sunucu Valve Anti Hile (VAC) korumalıdır.\\n\\nBu Steam hesabı, hile tespiti nedeniyle korumalı sunuculardan yasaklanmıştır.\"\n\"[english]VAC_ConnectionRefusedDetail\"\t\"You cannot connect to the selected server, because it is running in VAC (Valve Anti-Cheat) secure mode.\\n\\nThis Steam account has been banned from secure servers due to a cheating infraction.\"\n\"VAC_ConnectionRefusedByServer\"\t\"Sunucu, Valve Anti Hile (VAC) korumalı olduğundan bağlanma isteğinizi reddetti.\\n\\nBu Steam hesabı, hile tespiti nedeniyle korumalı sunuculardan yasaklanmıştır.\"\n\"[english]VAC_ConnectionRefusedByServer\"\t\"The server denied your connection because it is running in VAC (Valve Anti-Cheat) secure mode.\\n\\nThis Steam account has been banned from secure servers due to a cheating infraction.\"\n\"VAC_BanSupportURL\"\t\"http://support.steampowered.com/cgi-bin/steampowered.cfg/php/enduser/std_adp.php?p_faqid=370\"\n\"[english]VAC_BanSupportURL\"\t\"http://support.steampowered.com/cgi-bin/steampowered.cfg/php/enduser/std_adp.php?p_faqid=370\"\n\"VAC_SecureServerToolTip\"\t\"Valve Anti Hile - Koruma\"\n\"[english]VAC_SecureServerToolTip\"\t\"Valve Anti-Cheat - Secure\"\n\"VAC_BannedFromServerToolTip\"\t\"Bu korumalı sunucuya bağlanamazsınız\"\n\"[english]VAC_BannedFromServerToolTip\"\t\"You cannot connect to this secure server\"\n\"VAC_Secure\"\t\"Korumalı\"\n\"[english]VAC_Secure\"\t\"Secure\"\n\"VAC_ConnectingToSecureServer\"\t\"Not: Bu sunucu VAC korumalıdır.\\n\\nHile yapanlar kalıcı olarak yasaklanacaktır.\"\n\"[english]VAC_ConnectingToSecureServer\"\t\"Note: This server is VAC-secured.\\n\\nCheating will result in a permanent ban.\"\n\"VAC_BannedFromServers\"\t\"Hile tespiti nedeniyle bazı korumalı sunuculardan yasaklandınız.\"\n\"[english]VAC_BannedFromServers\"\t\"Banned from some secure servers because of a cheating infraction.\"\n\"VAC_NoBans\"\t\"Sicili temiz\"\n\"[english]VAC_NoBans\"\t\"In good standing\"\n\"VAC_Status\"\t\"VAC Durumu:\"\n\"[english]VAC_Status\"\t\"VAC Status:\"\n\"Steam_ValidLoginRequiredTitle\"\t\"Geçerli Steam Girişi Gerekli\"\n\"[english]Steam_ValidLoginRequiredTitle\"\t\"Valid Steam Login Required\"\n\"Steam_ValidLoginRequired\"\t\"Steam VAC sunucularına bağlanılamadı. Ağ sorunlarını tanımlamak için aşağıdaki bağlantıya tıklayın.\"\n\"[english]Steam_ValidLoginRequired\"\t\"A connection to the Steam VAC servers could not be made. For troubleshooting network issues, please click the link below.\"\n\"VAC_ConnectionIssuesSupport_Title\"\t\"Güvenli Bağlantı Başarısız\"\n\"[english]VAC_ConnectionIssuesSupport_Title\"\t\"Secure Connection Failed\"\n\"VAC_ConnectionIssuesSupportSite\"\t\"Steam Destek'i ziyaret etmek için buraya tıklayın.\"\n\"[english]VAC_ConnectionIssuesSupportSite\"\t\"Click here to visit Steam support\"\n\"VAC_ConnectionIssuesSupportURL\"\t\"http://support.steampowered.com/cgi-bin/steampowered.cfg/php/enduser/std_adp.php?p_faqid=374\"\n\"[english]VAC_ConnectionIssuesSupportURL\"\t\"http://support.steampowered.com/cgi-bin/steampowered.cfg/php/enduser/std_adp.php?p_faqid=374\"\n\"VAC_LoggedInElsewhere_Title\"\t\"Hesap Başka Yerde Kullanımda\"\n\"[english]VAC_LoggedInElsewhere_Title\"\t\"Account Used Elsewhere\"\n\"VAC_LoggedInElsewhereReason\"\t\"Bu Steam hesabının oturumu başka bilgisayarda açık durumda. Steam'i kullanmaya devam etmek için, tekrar giriş yapmalısınız.\"\n\"[english]VAC_LoggedInElsewhereReason\"\t\"This Steam account has been used to log in from another computer. To continue using Steam, you need to log in again.\"\n\"ServerBrowser_FriendNotInGameServer\"\t\"%friend% şu anda herhangi bir sunucuda oynamıyor.\"\n\"[english]ServerBrowser_FriendNotInGameServer\"\t\"%friend% is not currently playing on any game server.\"\n\"ServerBrowser_NotInGame\"\t\"[ yok ]\"\n\"[english]ServerBrowser_NotInGame\"\t\"[ none ]\"\n\"ServerBrowser_PendingPing\"\t\"<beklemede>\"\n\"[english]ServerBrowser_PendingPing\"\t\"< pending >\"\n\"ServerBrowser_AddSelectedToFavorites\"\t\"Seçilen oyun sunucusunu favorilere ekle\"\n\"[english]ServerBrowser_AddSelectedToFavorites\"\t\"Add selected game server to favorites\"\n\"ServerBrowser_AddSelectedToBlacklist\"\t\"Seçilen oyun sunucusunu kara listeye ekle\"\n\"[english]ServerBrowser_AddSelectedToBlacklist\"\t\"Add selected game server to blacklist\"\n\"ServerBrowser_AddAddressToFavorites\"\t\"Bu adresi favorilere ekle\"\n\"[english]ServerBrowser_AddAddressToFavorites\"\t\"Add this address to favorites\"\n\"ServerBrowser_AddAddressToBlacklist\"\t\"Bu adresi kara listeye ekle\"\n\"[english]ServerBrowser_AddAddressToBlacklist\"\t\"Add this address to blacklist\"\n\"ServerBrowser_FindGames\"\t\"Bu adresteki oyunları bul...\"\n\"[english]ServerBrowser_FindGames\"\t\"Find games at this address...\"\n\"ServerBrowser_SteamRunning\"\t\"Sunucuları Bul'dan faydalanabilmek için Steam Beta yürütülüyor olmalıdır\"\n\"[english]ServerBrowser_SteamRunning\"\t\"Steam Beta must be running to make use of Find Servers\"\n\"ServerBrowser_CustomTab\"\t\"Özel\"\n\"[english]ServerBrowser_CustomTab\"\t\"Custom\"\n\"ServerBrowser_Tags\"\t\"Etiket\"\n\"[english]ServerBrowser_Tags\"\t\"Tags\"\n\"ServerBrowser_AddCommonTags\"\t\"Yaygın etiketleri ekle...\"\n\"[english]ServerBrowser_AddCommonTags\"\t\"Add common tags...\"\n\"ServerBrowser_TagsInclude\"\t\"içersin\"\n\"[english]ServerBrowser_TagsInclude\"\t\"include\"\n\"ServerBrowser_TagsDoNotInclude\"\t\"içermesin\"\n\"[english]ServerBrowser_TagsDoNotInclude\"\t\"do not include\"\n\"ServerBrowser_TagsExplanation\"\t\"Not: 'Özel' sunucular stardart dışı oynanış veya diğer değişiklikler içeren oyun sunucularıdır.\"\n\"[english]ServerBrowser_TagsExplanation\"\t\"Note: 'Custom' servers are game servers running non-standard gameplay or other modifications.\"\n\"ServerBrowser_CustomServerInfo\"\t\"Özel sunucular hakkında daha fazla bilgi için tıklayın.\"\n\"[english]ServerBrowser_CustomServerInfo\"\t\"Click for more info on custom servers.\"\n\"ServerBrowser_NoCustomGames\"\t\"Filtre seçeneklerinize uygun özel internet oyunu bulunamadı.\"\n\"[english]ServerBrowser_NoCustomGames\"\t\"There are no custom internet games visible that pass your filter settings.\"\n\"ServerBrowser_MasterServerHasNoCustomServersListed\"\t\"Ana sunucuda filtre seçeneklerinize uygun özel internet oyunu bulunamadı.\"\n\"[english]ServerBrowser_MasterServerHasNoCustomServersListed\"\t\"There are no custom internet games listed on the master server that pass your filter settings.\"\n\"ServerBrowser_NoCustomGamesResponded\"\t\"Hiçbir özel internet oyunu sorguya yanıt vermedi.\"\n\"[english]ServerBrowser_NoCustomGamesResponded\"\t\"No custom internet games responded to the query.\"\n\"ServerBrowser_NoCommonTags\"\t\"Etiket bulunamadı.\"\n\"[english]ServerBrowser_NoCommonTags\"\t\"No tags found.\"\n\"ServerBrowser_CustomServerInfoTitle\"\t\"Özel Sunucular\"\n\"[english]ServerBrowser_CustomServerInfoTitle\"\t\"Custom Servers\"\n\"ServerBrowser_CustomServerURLWarning\"\t\"WEB TARAYICIYI BAŞLAT?\"\n\"[english]ServerBrowser_CustomServerURLWarning\"\t\"LAUNCH WEB BROWSER?\"\n\"ServerBrowser_CustomServerURLOpen\"\t\"Az önce tıkladığınız bağlantı varsayılan web tarayıcınızı açacaktır.\\nBu web sayfasını görüntülemek için oyundan ayrılmak istediğinize emin misiniz?\"\n\"[english]ServerBrowser_CustomServerURLOpen\"\t\"The link you just clicked will open your default web browser.\\nAre you sure you want to leave the game to view this web page?\"\n\"ServerBrowser_CustomServerURLButton\"\t\"Tamam, web tarayıcıyı aç\"\n\"[english]ServerBrowser_CustomServerURLButton\"\t\"Ok, open web browser\"\n\"ServerBrowser_QuickListRefreshing\"\t\"Yenileniyor...\"\n\"[english]ServerBrowser_QuickListRefreshing\"\t\"Refreshing...\"\n\"ServerBrowser_QuickListCheck\"\t\"Basit liste\"\n\"[english]ServerBrowser_QuickListCheck\"\t\"Show Map List\"\n\"ServerBrowser_Filters\"\t\"Filtreler\"\n\"[english]ServerBrowser_Filters\"\t\"Filters\"\n\"ServerBrowser_MaxPlayer\"\t\"Azami oyuncu sayısı\"\n\"[english]ServerBrowser_MaxPlayer\"\t\"Max player count\"\n\"ServerBrowser_FilterDescMaxPlayers\"\t\"oyuncu limiti\"\n\"[english]ServerBrowser_FilterDescMaxPlayers\"\t\"max players\"\n\"ServerBrowser_QuickListOtherServers\"\t\"(%s1 sunucu daha)\"\n\"[english]ServerBrowser_QuickListOtherServers\"\t\"(%s1 other servers)\"\n\"ServerBrowser_QuickListOtherServer\"\t\"(1 sunucu daha)\"\n\"[english]ServerBrowser_QuickListOtherServer\"\t\"(1 other server)\"\n\"ServerBrowser_QuickListExplanation\"\t\"Basit liste her harita için en uygun sunucuyu seçer. Tüm sunucuları görmek için bu kutucuktaki işareti kaldırın.\"\n\"[english]ServerBrowser_QuickListExplanation\"\t\"The simplified list chooses an optimal server for each map. Uncheck this box to see all servers.\"\n\"ServerBrowser_ServerWarningTitle\"\t\"Sunucu Deneyimi Uyarısı\"\n\"[english]ServerBrowser_ServerWarningTitle\"\t\"Server Experience Warning\"\n\"ServerBrowser_ServerWarning_MaxPlayers\"\t\"Bağlandığınız sunucu %s1 oyuncuya kadar izin vermektedir.\\n\\n%s2, en fazla %s3 oyuncu ile en uygun deneyimi sağlaması için tasarlanmıştır. %s4 oyuncudan fazla oyuncu içeren sunucularda uygun performansı veya dengeli oynanışı garanti edemeyiz.\\n\\n\\nİpucu: Aşağıdaki filtre paneli sayesinde sunucular için azami oyuncu sayısını filtreleyebilirsiniz.\"\n\"[english]ServerBrowser_ServerWarning_MaxPlayers\"\t\"The server you are connecting to allows up to %s1 players.\\n\\n%s2 was designed to have an optimal experience within a maximum of %s3 players. On servers with player counts higher than %s4, we cannot guarantee acceptable performance, or balanced gameplay.\\n\\n\\nTip: You can filter servers by maximum player count in the filter panel below.\"\n\"ServerBrowser_ServerWarningOk\"\t\"Tamam, Yine de katıl\"\n\"[english]ServerBrowser_ServerWarningOk\"\t\"Ok, Join anyway\"\n\"ServerBrowser_ServerWarningCheckButton\"\t\"Bunu bana bir daha gösterme\"\n\"[english]ServerBrowser_ServerWarningCheckButton\"\t\"Don't show me this again\"\n\"ServerBrowser_FilterDescReplays\"\t\"tekrar destekli\"\n\"[english]ServerBrowser_FilterDescReplays\"\t\"supports replays\"\n\"ServerBrowser_Replay\"\t\"Tekrar\"\n\"[english]ServerBrowser_Replay\"\t\"Replay\"\n\"ServerBrowser_ReplayColumn_Tooltip\"\t\"Sunucu tekrar kaydını destekliyor\"\n\"[english]ServerBrowser_ReplayColumn_Tooltip\"\t\"Server supports recording replays\"\n\"ServerBrowser_SupportsReplays\"\t\"Tekrar Destekli\"\n\"[english]ServerBrowser_SupportsReplays\"\t\"Supports replays\"\n\"ServerBrowser_Workshop\"\t\"Atölye\"\n\"[english]ServerBrowser_Workshop\"\t\"Workshop\"\n\"ServerBrowser_WorkshopLabel\"\t\"Atöyle:\"\n\"[english]ServerBrowser_WorkshopLabel\"\t\"Workshop:\"\n\"ServerBrowser_OpenWorkshop\"\t\"Gözat...\"\n\"[english]ServerBrowser_OpenWorkshop\"\t\"Browse...\"\n\"ServerBrowser_SubscribedOnly\"\t\"Abone Olunan\"\n\"[english]ServerBrowser_SubscribedOnly\"\t\"Subscribed\"\n\"ServerBrowser_FeaturedOnly\"\t\"Öne Çıkan\"\n\"[english]ServerBrowser_FeaturedOnly\"\t\"Featured\"\n\"ServerBrowser_FilterDescSubscribedOnly\"\t\"abone olunan\"\n\"[english]ServerBrowser_FilterDescSubscribedOnly\"\t\"subscribed\"\n\"ServerBrowser_FilterDescFeaturedOnly\"\t\"öne çıkan\"\n\"[english]ServerBrowser_FilterDescFeaturedOnly\"\t\"featured\"\n}\n}\n"} +{"text": "/**\n * Copyright 2018 SmartThings\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use this file except\n * in compliance with the License. You may obtain a copy of the License at:\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed\n * on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License\n * for the specific language governing permissions and limitations under the License.\n *\n * Aeon LED Bulb 6 Multi-White\n *\n * Author: SmartThings\n * Date: 2018-9-4\n */\n\nmetadata {\n\tdefinition (name: \"Aeon LED Bulb 6 Multi-White\", namespace: \"smartthings\", author: \"SmartThings\",\n\t\t\t\tocfDeviceType: \"oic.d.light\", mnmn: \"SmartThings\", vid: \"generic-rgbw-color-bulb\",\n\t\t\t\trunLocally: false, minHubCoreVersion: '000.017.0012', executeCommandsLocally: false) {\n\t\tcapability \"Switch Level\"\n\t\tcapability \"Color Temperature\"\n\t\tcapability \"Switch\"\n\t\tcapability \"Refresh\"\n\t\tcapability \"Actuator\"\n\t\tcapability \"Sensor\"\n\t\tcapability \"Health Check\"\n\n\t\tfingerprint mfr: \"0371\", prod: \"0103\", model: \"0001\", deviceJoinName: \"Aeon Light\" //US //Aeon LED Bulb 6 Multi-White\n\t\tfingerprint mfr: \"0371\", prod: \"0003\", model: \"0001\", deviceJoinName: \"Aeon Light\" //EU //Aeon LED Bulb 6 Multi-White\n\t\tfingerprint mfr: \"0300\", prod: \"0003\", model: \"0004\", deviceJoinName: \"ilumin Light\" //ilumin Tunable White\n\t}\n\n\tsimulator {\n\t}\n\n\ttiles(scale: 2) {\n\t\tmultiAttributeTile(name:\"switch\", type: \"lighting\", width: 1, height: 1, canChangeIcon: true) {\n\t\t\ttileAttribute(\"device.switch\", key: \"PRIMARY_CONTROL\") {\n\t\t\t\tattributeState(\"on\", label:'${name}', action:\"switch.off\", icon:\"st.lights.philips.hue-single\", backgroundColor:\"#00a0dc\", nextState:\"turningOff\")\n\t\t\t\tattributeState(\"off\", label:'${name}', action:\"switch.on\", icon:\"st.lights.philips.hue-single\", backgroundColor:\"#ffffff\", nextState:\"turningOn\")\n\t\t\t\tattributeState(\"turningOn\", label:'${name}', action:\"switch.off\", icon:\"st.lights.philips.hue-single\", backgroundColor:\"#00a0dc\", nextState:\"turningOff\")\n\t\t\t\tattributeState(\"turningOff\", label:'${name}', action:\"switch.on\", icon:\"st.lights.philips.hue-single\", backgroundColor:\"#ffffff\", nextState:\"turningOn\")\n\t\t\t}\n\n\t\t\ttileAttribute (\"device.level\", key: \"SLIDER_CONTROL\") {\n\t\t\t\tattributeState \"level\", action:\"switch level.setLevel\"\n\t\t\t}\n\t\t}\n\t}\n\n\tcontrolTile(\"colorTempSliderControl\", \"device.colorTemperature\", \"slider\", width: 4, height: 2, inactiveLabel: false, range:\"(2700..6500)\") {\n\t\tstate \"colorTemperature\", action:\"color temperature.setColorTemperature\"\n\t}\n\n\tmain([\"switch\"])\n\tdetails([\"switch\", \"levelSliderControl\", \"colorTempSliderControl\"])\n}\n\nprivate getWARM_WHITE_CONFIG() { 0x51 }\nprivate getCOLD_WHITE_CONFIG() { 0x52 }\nprivate getWARM_WHITE() { \"warmWhite\" }\nprivate getCOLD_WHITE() { \"coldWhite\" }\nprivate getWHITE_NAMES() { [WARM_WHITE, COLD_WHITE] }\n\ndef updated() {\n\tlog.debug \"updated()..\"\n\tresponse(refresh())\n}\n\ndef installed() {\n\tlog.debug \"installed()...\"\n\tsendEvent(name: \"checkInterval\", value: 1860, displayed: false, data: [protocol: \"zwave\", hubHardwareId: device.hub.hardwareID, offlinePingable: \"0\"])\n\tsendEvent(name: \"level\", value: 100, unit: \"%\")\n\tsendEvent(name: \"colorTemperature\", value: 2700)\n}\n\ndef parse(description) {\n\tdef result = null\n\tif (description != \"updated\") {\n\t\tdef cmd = zwave.parse(description)\n\t\tif (cmd) {\n\t\t\tresult = zwaveEvent(cmd)\n\t\t\tlog.debug(\"'$description' parsed to $result\")\n\t\t} else {\n\t\t\tlog.debug(\"Couldn't zwave.parse '$description'\")\n\t\t}\n\t}\n\tresult\n}\n\ndef zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicReport cmd) {\n\tdimmerEvents(cmd)\n}\n\ndef zwaveEvent(physicalgraph.zwave.commands.basicv1.BasicSet cmd) {\n\tdimmerEvents(cmd)\n}\n\ndef zwaveEvent(physicalgraph.zwave.commands.switchmultilevelv3.SwitchMultilevelReport cmd) {\n\tunschedule(offlinePing)\n\tdimmerEvents(cmd)\n}\n\ndef zwaveEvent(physicalgraph.zwave.commands.switchcolorv3.SwitchColorReport cmd) {\n\tlog.debug \"got SwitchColorReport: $cmd\"\n\tdef result = []\n\tif (cmd.value == 255) {\n\t\tdef parameterNumber = (cmd.colorComponent == WARM_WHITE) ? WARM_WHITE_CONFIG : COLD_WHITE_CONFIG\n\t\tresult << response(command(zwave.configurationV2.configurationGet([parameterNumber: parameterNumber])))\n\t}\n\tresult\n}\n\nprivate dimmerEvents(physicalgraph.zwave.Command cmd) {\n\tdef value = (cmd.value ? \"on\" : \"off\")\n\tdef result = [createEvent(name: \"switch\", value: value, descriptionText: \"$device.displayName was turned $value\")]\n\tif (cmd.value) {\n\t\tresult << createEvent(name: \"level\", value: cmd.value == 99 ? 100 : cmd.value , unit: \"%\")\n\t}\n\treturn result\n}\n\ndef zwaveEvent(physicalgraph.zwave.commands.securityv1.SecurityMessageEncapsulation cmd) {\n\tdef encapsulatedCommand = cmd.encapsulatedCommand()\n\tif (encapsulatedCommand) {\n\t\tzwaveEvent(encapsulatedCommand)\n\t} else {\n\t\tlog.warn \"Unable to extract encapsulated cmd from $cmd\"\n\t\tcreateEvent(descriptionText: cmd.toString())\n\t}\n}\n\ndef zwaveEvent(physicalgraph.zwave.commands.configurationv2.ConfigurationReport cmd) {\n\tlog.debug \"got ConfigurationReport: $cmd\"\n\tdef result = null\n\tif (cmd.parameterNumber == WARM_WHITE_CONFIG || cmd.parameterNumber == COLD_WHITE_CONFIG)\n\t\tresult = createEvent(name: \"colorTemperature\", value: cmd.scaledConfigurationValue)\n\tresult\n}\n\ndef zwaveEvent(physicalgraph.zwave.Command cmd) {\n\tdef linkText = device.label ?: device.name\n\t[linkText: linkText, descriptionText: \"$linkText: $cmd\", displayed: false]\n}\n\ndef buildOffOnEvent(cmd){\n\t[zwave.basicV1.basicSet(value: cmd), zwave.switchMultilevelV3.switchMultilevelGet()]\n}\n\ndef on() {\n\tcommands(buildOffOnEvent(0xFF), 5000)\n}\n\ndef off() {\n\tcommands(buildOffOnEvent(0x00), 5000)\n}\n\ndef refresh() {\n\tcommands([zwave.switchMultilevelV3.switchMultilevelGet()] + queryAllColors(), 500)\n}\n\ndef ping() {\n\tlog.debug \"ping()..\"\n\tunschedule(offlinePing)\n\trunEvery30Minutes(offlinePing)\n\tcommand(zwave.switchMultilevelV3.switchMultilevelGet())\n}\n\ndef offlinePing() {\n\tlog.debug \"offlinePing()...\"\n\tsendHubCommand(new physicalgraph.device.HubAction(command(zwave.switchMultilevelV3.switchMultilevelGet())))\n}\n\ndef setLevel(level) {\n\tsetLevel(level, 1)\n}\n\ndef setLevel(level, duration) {\n\tlog.debug \"setLevel($level, $duration)\"\n\tif(level > 99) level = 99\n\tcommands([\n\t\tzwave.switchMultilevelV3.switchMultilevelSet(value: level, dimmingDuration: duration),\n\t\tzwave.switchMultilevelV3.switchMultilevelGet(),\n\t], (duration && duration < 12) ? (duration * 1000 + 2000) : 3500)\n}\n\ndef setColorTemperature(temp) {\n\tlog.debug \"setColorTemperature($temp)\"\n\tdef warmValue = temp < 5000 ? 255 : 0\n\tdef coldValue = temp >= 5000 ? 255 : 0\n\tdef parameterNumber = temp < 5000 ? WARM_WHITE_CONFIG : COLD_WHITE_CONFIG\n\tdef results = []\n\tresults << zwave.configurationV1.configurationSet([parameterNumber: parameterNumber, size: 2, scaledConfigurationValue: temp])\n\tresults << zwave.switchColorV3.switchColorSet(warmWhite: warmValue, coldWhite: coldValue)\n\tif (device.currentValue(\"switch\") != \"on\") {\n\t\tresults << zwave.basicV1.basicSet(value: 0xFF)\n\t\tresults << zwave.switchMultilevelV3.switchMultilevelGet()\n\t}\n\tcommands(results) + \"delay 7000\" + commands(queryAllColors(), 500)\n}\n\nprivate queryAllColors() {\n\tWHITE_NAMES.collect { zwave.switchColorV3.switchColorGet(colorComponent: it) }\n}\n\nprivate secEncap(physicalgraph.zwave.Command cmd) {\n\tzwave.securityV1.securityMessageEncapsulation().encapsulate(cmd).format()\n}\n\nprivate crcEncap(physicalgraph.zwave.Command cmd) {\n\tzwave.crc16EncapV1.crc16Encap().encapsulate(cmd).format()\n}\n\nprivate command(physicalgraph.zwave.Command cmd) {\n\tif (zwaveInfo.zw.contains(\"s\")) {\n\t\tsecEncap(cmd)\n\t} else if (zwaveInfo?.cc?.contains(\"56\")){\n\t\tcrcEncap(cmd)\n\t} else {\n\t\tcmd.format()\n\t}\n}\n\nprivate commands(commands, delay=200) {\n\tdelayBetween(commands.collect{ command(it) }, delay)\n}\n"} +{"text": "\nmodule Jenkins\n module Model\n module Action\n include ::Jenkins::Model\n\n module InstanceMethods\n def icon\n self.class.icon\n end\n\n def url_path\n self.class.url_path\n end\n end\n\n module ClassMethods\n def icon(filename = nil)\n filename.nil? ? @icon : @icon = filename.to_s\n end\n\n def url_path(path = nil)\n path.nil? ? @url_path : @url_path = path.to_s\n end\n end\n end\n end\nend\n"} +{"text": "package server\n\nimport (\n\t\"context\"\n\t\"errors\"\n\t\"github.com/golang/protobuf/ptypes\"\n\t\"github.com/golang/protobuf/ptypes/empty\"\n\t\"github.com/google/uuid\"\n\tapiPb \"github.com/squzy/squzy_generated/generated/proto/v1\"\n\t\"go.mongodb.org/mongo-driver/bson/primitive\"\n\t\"squzy/apps/squzy_incident/database\"\n\t\"squzy/apps/squzy_incident/expression\"\n)\n\ntype server struct {\n\truleDb database.Database\n\tstorage apiPb.StorageClient\n\tnotificationClient apiPb.NotificationManagerClient\n\texpr expression.Expression\n}\n\nvar (\n\terrNotValidRule = errors.New(\"rule is not valid\")\n)\n\nfunc NewIncidentServer(notificationClient apiPb.NotificationManagerClient, storage apiPb.StorageClient, db database.Database) apiPb.IncidentServerServer {\n\treturn &server{\n\t\tnotificationClient: notificationClient,\n\t\truleDb: db,\n\t\tstorage: storage,\n\t\texpr: expression.NewExpression(storage),\n\t}\n}\n\nfunc dbRuleToProto(rule *database.Rule) *apiPb.Rule {\n\treturn &apiPb.Rule{\n\t\tId: rule.Id.Hex(),\n\t\tRule: rule.Rule,\n\t\tName: rule.Name,\n\t\tAutoClose: rule.AutoClose,\n\t\tOwnerType: rule.OwnerType,\n\t\tOwnerId: rule.OwnerId.Hex(),\n\t\tStatus: rule.Status,\n\t}\n}\n\nfunc (s *server) ActivateRule(ctx context.Context, request *apiPb.RuleIdRequest) (*apiPb.Rule, error) {\n\truleId, err := primitive.ObjectIDFromHex(request.RuleId)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\trule, err := s.ruleDb.ActivateRule(ctx, ruleId)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn dbRuleToProto(rule), nil\n}\n\nfunc (s *server) DeactivateRule(ctx context.Context, request *apiPb.RuleIdRequest) (*apiPb.Rule, error) {\n\truleId, err := primitive.ObjectIDFromHex(request.RuleId)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\trule, err := s.ruleDb.DeactivateRule(ctx, ruleId)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn dbRuleToProto(rule), nil\n}\n\nfunc (s *server) CreateRule(ctx context.Context, request *apiPb.CreateRuleRequest) (*apiPb.Rule, error) {\n\townerId, err := primitive.ObjectIDFromHex(request.GetOwnerId())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\t//\tres, _ := s.ValidateRule(ctx, &apiPb.ValidateRuleRequest{ never return error\n\tres, _ := s.ValidateRule(ctx, &apiPb.ValidateRuleRequest{\n\t\tOwnerType: request.GetOwnerType(),\n\t\tRule: request.GetRule(),\n\t})\n\tif !res.IsValid {\n\t\treturn nil, errNotValidRule\n\t}\n\trule := &database.Rule{\n\t\tId: primitive.NewObjectID(),\n\t\tRule: request.GetRule(),\n\t\tName: request.GetName(),\n\t\tAutoClose: request.GetAutoClose(),\n\t\tOwnerType: request.GetOwnerType(),\n\t\tOwnerId: ownerId,\n\t\tStatus: apiPb.RuleStatus_RULE_STATUS_ACTIVE,\n\t}\n\terr = s.ruleDb.SaveRule(ctx, rule)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn dbRuleToProto(rule), err\n}\n\nfunc (s *server) GetRuleById(ctx context.Context, request *apiPb.RuleIdRequest) (*apiPb.Rule, error) {\n\truleId, err := primitive.ObjectIDFromHex(request.RuleId)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\trule, err := s.ruleDb.FindRuleById(ctx, ruleId)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn dbRuleToProto(rule), nil\n}\n\nfunc (s *server) GetRulesByOwnerId(ctx context.Context, request *apiPb.GetRulesByOwnerIdRequest) (*apiPb.Rules, error) {\n\townerId, err := primitive.ObjectIDFromHex(request.GetOwnerId())\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tdbRules, err := s.ruleDb.FindRulesByOwnerId(ctx, request.OwnerType, ownerId)\n\trules := []*apiPb.Rule{}\n\tfor _, rule := range dbRules {\n\t\trules = append(rules, dbRuleToProto(rule))\n\t}\n\treturn &apiPb.Rules{\n\t\tRules: rules,\n\t}, err\n}\n\nfunc (s *server) RemoveRule(ctx context.Context, request *apiPb.RuleIdRequest) (*apiPb.Rule, error) {\n\truleId, err := primitive.ObjectIDFromHex(request.RuleId)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\trule, err := s.ruleDb.RemoveRule(ctx, ruleId)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\treturn dbRuleToProto(rule), nil\n}\n\nfunc (s *server) ValidateRule(ctx context.Context, request *apiPb.ValidateRuleRequest) (*apiPb.ValidateRuleResponse, error) {\n\t//Id the error handling will be added, add to the CreateRule\n\terr := s.expr.IsValid(request.OwnerType, request.Rule)\n\tif err != nil {\n\t\treturn &apiPb.ValidateRuleResponse{\n\t\t\tIsValid: false,\n\t\t\tError: &apiPb.ValidateRuleResponse_Error{\n\t\t\t\tMessage: err.Error(),\n\t\t\t},\n\t\t}, nil\n\t}\n\treturn &apiPb.ValidateRuleResponse{\n\t\tIsValid: true,\n\t}, nil\n}\n\nfunc (s *server) ProcessRecordFromStorage(ctx context.Context, request *apiPb.StorageRecord) (*empty.Empty, error) {\n\townerType, ownerId, err := getOwnerTypeAndId(request)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\trules, err := s.ruleDb.FindRulesByOwnerId(ctx, ownerType, ownerId)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\twasError := false\n\tfor _, rule := range rules {\n\t\tif rule.Status != apiPb.RuleStatus_RULE_STATUS_ACTIVE {\n\t\t\tcontinue\n\t\t}\n\n\t\twasIncident, err := s.expr.ProcessRule(ownerType, ownerId.Hex(), rule.Rule)\n\n\t\tif err != nil {\n\t\t\twasError = true\n\t\t\tcontinue\n\t\t}\n\n\t\tincident, err := s.storage.GetIncidentByRuleId(ctx, &apiPb.RuleIdRequest{\n\t\t\tRuleId: rule.Id.Hex(),\n\t\t})\n\n\t\tif err != nil {\n\t\t\twasError = true\n\t\t\tcontinue\n\t\t}\n\n\t\tif isIncidentExist(incident) && isIncidentOpened(incident) && !wasIncident {\n\t\t\tif err := s.tryCloseIncident(ctx, rule.AutoClose, incident); err != nil {\n\t\t\t\twasError = true\n\t\t\t\t// @TODO log error\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t_, _ = s.notificationClient.Notify(ctx, &apiPb.NotifyRequest{\n\t\t\t\tIncidentId: incident.Id,\n\t\t\t\tOwnerType: rule.OwnerType,\n\t\t\t\tOwnerId: rule.OwnerId.Hex(),\n\t\t\t})\n\t\t\tcontinue\n\t\t}\n\t\tif !isIncidentExist(incident) && wasIncident {\n\t\t\tincident = &apiPb.Incident{\n\t\t\t\tStatus: apiPb.IncidentStatus_INCIDENT_STATUS_OPENED,\n\t\t\t\tRuleId: rule.Id.Hex(),\n\t\t\t\tId: uuid.New().String(),\n\t\t\t\tHistories: []*apiPb.Incident_HistoryItem{\n\t\t\t\t\t{\n\t\t\t\t\t\tStatus: apiPb.IncidentStatus_INCIDENT_STATUS_OPENED,\n\t\t\t\t\t\tTimestamp: ptypes.TimestampNow(),\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t}\n\t\t\tif _, err := s.storage.SaveIncident(ctx, incident); err != nil {\n\t\t\t\twasError = true\n\t\t\t\t// @TODO log error\n\t\t\t\tcontinue\n\t\t\t}\n\t\t\t_, _ = s.notificationClient.Notify(ctx, &apiPb.NotifyRequest{\n\t\t\t\tIncidentId: incident.Id,\n\t\t\t\tOwnerType: rule.OwnerType,\n\t\t\t\tOwnerId: rule.OwnerId.Hex(),\n\t\t\t})\n\t\t\tcontinue\n\t\t}\n\t}\n\n\tif wasError {\n\t\treturn &empty.Empty{}, errors.New(\"WAS_ERROR_WHILE_RULE_PROCESSING\")\n\t}\n\treturn &empty.Empty{}, nil\n}\n\nfunc (s *server) CloseIncident(ctx context.Context, request *apiPb.IncidentIdRequest) (*apiPb.Incident, error) {\n\treturn s.setStatus(ctx, request.GetIncidentId(), apiPb.IncidentStatus_INCIDENT_STATUS_CLOSED)\n}\n\nfunc (s *server) StudyIncident(ctx context.Context, request *apiPb.IncidentIdRequest) (*apiPb.Incident, error) {\n\treturn s.setStatus(ctx, request.GetIncidentId(), apiPb.IncidentStatus_INCIDENT_STATUS_STUDIED)\n}\n\nfunc getOwnerTypeAndId(request *apiPb.StorageRecord) (apiPb.ComponentOwnerType, primitive.ObjectID, error) {\n\tif request.GetSnapshot() != nil {\n\t\townerId, err := primitive.ObjectIDFromHex(request.GetSnapshot().Id)\n\t\tif err != nil {\n\t\t\treturn 0, primitive.ObjectID{}, errors.New(\"ERROR_WRONG_ID\")\n\t\t}\n\t\treturn apiPb.ComponentOwnerType_COMPONENT_OWNER_TYPE_SCHEDULER, ownerId, nil\n\t}\n\tif request.GetAgentMetric() != nil {\n\t\townerId, err := primitive.ObjectIDFromHex(request.GetAgentMetric().AgentId)\n\t\tif err != nil {\n\t\t\treturn 0, primitive.ObjectID{}, errors.New(\"ERROR_WRONG_ID\")\n\t\t}\n\t\treturn apiPb.ComponentOwnerType_COMPONENT_OWNER_TYPE_AGENT, ownerId, nil\n\t}\n\tif request.GetTransaction() != nil {\n\t\townerId, err := primitive.ObjectIDFromHex(request.GetTransaction().ApplicationId)\n\t\tif err != nil {\n\t\t\treturn 0, primitive.ObjectID{}, errors.New(\"ERROR_WRONG_ID\")\n\t\t}\n\t\treturn apiPb.ComponentOwnerType_COMPONENT_OWNER_TYPE_APPLICATION, ownerId, nil\n\t}\n\treturn 0, primitive.ObjectID{}, errors.New(\"ERROR_NO_RECORD\")\n}\n\nfunc isIncidentExist(incident *apiPb.Incident) bool {\n\treturn incident != nil && incident.Id != \"\"\n}\n\nfunc isIncidentOpened(incident *apiPb.Incident) bool {\n\tif incident == nil || incident.Id == \"\" {\n\t\treturn false\n\t}\n\treturn incident.GetStatus() == apiPb.IncidentStatus_INCIDENT_STATUS_OPENED\n}\n\nfunc (s *server) tryCloseIncident(ctx context.Context, autoClose bool, incident *apiPb.Incident) error {\n\tif autoClose {\n\t\t_, err := s.setStatus(ctx, incident.GetId(), apiPb.IncidentStatus_INCIDENT_STATUS_CLOSED)\n\t\treturn err\n\t}\n\t_, err := s.setStatus(ctx, incident.GetId(), apiPb.IncidentStatus_INCIDENT_STATUS_CAN_BE_CLOSED)\n\treturn err\n}\n\nfunc (s *server) setStatus(ctx context.Context, id string, status apiPb.IncidentStatus) (*apiPb.Incident, error) {\n\treturn s.storage.UpdateIncidentStatus(ctx, &apiPb.UpdateIncidentStatusRequest{\n\t\tIncidentId: id,\n\t\tStatus: status,\n\t})\n}\n"} +{"text": "*Concepts you may want to Google beforehand: C, object code, linker, disassemble*\n\n**Goal: Learn to write the same low-level code as we did with assembler, but in C**\n\n\nCompile\n-------\n\nLet's see how the C compiler compiles our code and compare it to the machine code\ngenerated with the assembler.\n\nWe will start writing a simple program which contains a function, `function.c`.\nOpen the file and examine it.\n\nTo compile system-independent code, we need the flag `-ffreestanding`, so compile\n`function.c` in this fashion:\n\n`i386-elf-gcc -ffreestanding -c function.c -o function.o`\n\nLet's examine the machine code generated by the compiler:\n\n`i386-elf-objdump -d function.o`\n\nNow that is something we recognize, isn't it?\n\n\nLink\n----\n\nFinally, to produce a binary file, we will use the linker. An important part of this\nstep is to learn how high level languages call function labels. Which is the offset\nwhere our function will be placed in memory? We don't actually know. For this\nexample, we'll place the offset at `0x0` and use the `binary` format which\ngenerates machine code without any labels and/or metadata\n\n`i386-elf-ld -o function.bin -Ttext 0x0 --oformat binary function.o`\n\n*Note: a warning may appear when linking, disregard it*\n\nNow examine both \"binary\" files, `function.o` and `function.bin` using `xxd`. You\nwill see that the `.bin` file is machine code, while the `.o` file has a lot\nof debugging information, labels, etc.\n\n\nDecompile\n---------\n\nAs a curiosity, we will examine the machine code.\n\n`ndisasm -b 32 function.bin`\n\n\nMore\n----\n\nI encourage you to write more small programs, which feature:\n\n- Local variables `localvars.c`\n- Function calls `functioncalls.c`\n- Pointers `pointers.c`\n\nThen compile and disassemble them, and examine the resulting machine code. Follow\nthe os-guide.pdf for explanations. Try to answer this question: why does the\ndisassemblement of `pointers.c` not resemble what you would expect? Where is\nthe ASCII `0x48656c6c6f` for \"Hello\"?\n"} +{"text": "// Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef CONTENT_PUBLIC_COMMON_JAVASCRIPT_MESSAGE_TYPE_H_\n#define CONTENT_PUBLIC_COMMON_JAVASCRIPT_MESSAGE_TYPE_H_\n\nnamespace content {\n\nenum JavaScriptMessageType {\n JAVASCRIPT_MESSAGE_TYPE_ALERT,\n JAVASCRIPT_MESSAGE_TYPE_CONFIRM,\n JAVASCRIPT_MESSAGE_TYPE_PROMPT\n};\n\n} // namespace content\n\n#endif // CONTENT_PUBLIC_COMMON_JAVASCRIPT_MESSAGE_TYPE_H_\n"} +{"text": "path: \"tensorflow.nn.rnn_cell.GRUCell\"\ntf_class {\n is_instance: \"<class \\'tensorflow.python.ops.rnn_cell_impl.GRUCell\\'>\"\n is_instance: \"<class \\'tensorflow.python.ops.rnn_cell_impl.LayerRNNCell\\'>\"\n is_instance: \"<class \\'tensorflow.python.ops.rnn_cell_impl.RNNCell\\'>\"\n is_instance: \"<class \\'tensorflow.python.layers.base.Layer\\'>\"\n is_instance: \"<class \\'tensorflow.python.keras.engine.base_layer.Layer\\'>\"\n is_instance: \"<class \\'tensorflow.python.module.module.Module\\'>\"\n is_instance: \"<class \\'tensorflow.python.training.tracking.tracking.AutoTrackable\\'>\"\n is_instance: \"<class \\'tensorflow.python.training.tracking.base.Trackable\\'>\"\n is_instance: \"<type \\'object\\'>\"\n member {\n name: \"activity_regularizer\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"dtype\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"dynamic\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"graph\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"inbound_nodes\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"input\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"input_mask\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"input_shape\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"input_spec\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"losses\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"metrics\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"name\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"name_scope\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"non_trainable_variables\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"non_trainable_weights\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"outbound_nodes\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"output\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"output_mask\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"output_shape\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"output_size\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"scope_name\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"state_size\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"submodules\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"trainable\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"trainable_variables\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"trainable_weights\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"updates\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"variables\"\n mtype: \"<type \\'property\\'>\"\n }\n member {\n name: \"weights\"\n mtype: \"<type \\'property\\'>\"\n }\n member_method {\n name: \"__init__\"\n argspec: \"args=[\\'self\\', \\'num_units\\', \\'activation\\', \\'reuse\\', \\'kernel_initializer\\', \\'bias_initializer\\', \\'name\\', \\'dtype\\'], varargs=None, keywords=kwargs, defaults=[\\'None\\', \\'None\\', \\'None\\', \\'None\\', \\'None\\', \\'None\\'], \"\n }\n member_method {\n name: \"add_loss\"\n argspec: \"args=[\\'self\\', \\'losses\\', \\'inputs\\'], varargs=None, keywords=None, defaults=[\\'None\\'], \"\n }\n member_method {\n name: \"add_metric\"\n argspec: \"args=[\\'self\\', \\'value\\', \\'aggregation\\', \\'name\\'], varargs=None, keywords=None, defaults=[\\'None\\', \\'None\\'], \"\n }\n member_method {\n name: \"add_update\"\n argspec: \"args=[\\'self\\', \\'updates\\', \\'inputs\\'], varargs=None, keywords=None, defaults=[\\'None\\'], \"\n }\n member_method {\n name: \"add_variable\"\n argspec: \"args=[\\'self\\'], varargs=args, keywords=kwargs, defaults=None\"\n }\n member_method {\n name: \"add_weight\"\n argspec: \"args=[\\'self\\', \\'name\\', \\'shape\\', \\'dtype\\', \\'initializer\\', \\'regularizer\\', \\'trainable\\', \\'constraint\\', \\'use_resource\\', \\'synchronization\\', \\'aggregation\\', \\'partitioner\\'], varargs=None, keywords=kwargs, defaults=[\\'None\\', \\'None\\', \\'None\\', \\'None\\', \\'None\\', \\'None\\', \\'VariableSynchronization.AUTO\\', \\'VariableAggregation.NONE\\', \\'None\\'], \"\n }\n member_method {\n name: \"apply\"\n argspec: \"args=[\\'self\\', \\'inputs\\'], varargs=args, keywords=kwargs, defaults=None\"\n }\n member_method {\n name: \"build\"\n argspec: \"args=[\\'instance\\', \\'input_shape\\'], varargs=None, keywords=None, defaults=None\"\n }\n member_method {\n name: \"call\"\n argspec: \"args=[\\'self\\', \\'inputs\\', \\'state\\'], varargs=None, keywords=None, defaults=None\"\n }\n member_method {\n name: \"compute_mask\"\n argspec: \"args=[\\'self\\', \\'inputs\\', \\'mask\\'], varargs=None, keywords=None, defaults=[\\'None\\'], \"\n }\n member_method {\n name: \"compute_output_shape\"\n argspec: \"args=[\\'self\\', \\'input_shape\\'], varargs=None, keywords=None, defaults=None\"\n }\n member_method {\n name: \"compute_output_signature\"\n argspec: \"args=[\\'self\\', \\'input_signature\\'], varargs=None, keywords=None, defaults=None\"\n }\n member_method {\n name: \"count_params\"\n argspec: \"args=[\\'self\\'], varargs=None, keywords=None, defaults=None\"\n }\n member_method {\n name: \"from_config\"\n argspec: \"args=[\\'cls\\', \\'config\\'], varargs=None, keywords=None, defaults=None\"\n }\n member_method {\n name: \"get_config\"\n argspec: \"args=[\\'self\\'], varargs=None, keywords=None, defaults=None\"\n }\n member_method {\n name: \"get_initial_state\"\n argspec: \"args=[\\'self\\', \\'inputs\\', \\'batch_size\\', \\'dtype\\'], varargs=None, keywords=None, defaults=[\\'None\\', \\'None\\', \\'None\\'], \"\n }\n member_method {\n name: \"get_input_at\"\n argspec: \"args=[\\'self\\', \\'node_index\\'], varargs=None, keywords=None, defaults=None\"\n }\n member_method {\n name: \"get_input_mask_at\"\n argspec: \"args=[\\'self\\', \\'node_index\\'], varargs=None, keywords=None, defaults=None\"\n }\n member_method {\n name: \"get_input_shape_at\"\n argspec: \"args=[\\'self\\', \\'node_index\\'], varargs=None, keywords=None, defaults=None\"\n }\n member_method {\n name: \"get_losses_for\"\n argspec: \"args=[\\'self\\', \\'inputs\\'], varargs=None, keywords=None, defaults=None\"\n }\n member_method {\n name: \"get_output_at\"\n argspec: \"args=[\\'self\\', \\'node_index\\'], varargs=None, keywords=None, defaults=None\"\n }\n member_method {\n name: \"get_output_mask_at\"\n argspec: \"args=[\\'self\\', \\'node_index\\'], varargs=None, keywords=None, defaults=None\"\n }\n member_method {\n name: \"get_output_shape_at\"\n argspec: \"args=[\\'self\\', \\'node_index\\'], varargs=None, keywords=None, defaults=None\"\n }\n member_method {\n name: \"get_updates_for\"\n argspec: \"args=[\\'self\\', \\'inputs\\'], varargs=None, keywords=None, defaults=None\"\n }\n member_method {\n name: \"get_weights\"\n argspec: \"args=[\\'self\\'], varargs=None, keywords=None, defaults=None\"\n }\n member_method {\n name: \"set_weights\"\n argspec: \"args=[\\'self\\', \\'weights\\'], varargs=None, keywords=None, defaults=None\"\n }\n member_method {\n name: \"with_name_scope\"\n argspec: \"args=[\\'cls\\', \\'method\\'], varargs=None, keywords=None, defaults=None\"\n }\n member_method {\n name: \"zero_state\"\n argspec: \"args=[\\'self\\', \\'batch_size\\', \\'dtype\\'], varargs=None, keywords=None, defaults=None\"\n }\n}\n"} +{"text": "//\n// Prefix header for all source files of the 'Browser' target in the 'Browser' project\n//\n\n#ifdef __OBJC__\n#import <Foundation/Foundation.h>\n#import <UIKit/UIKit.h>\n\n/*\n * System Versioning Preprocessor Macros\n */\n\n#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)\n#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)\n#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)\n#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)\n#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)\n#endif\n\n#define ZIP_STD 1"} +{"text": "# Copyright 2013 The Flutter Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style license that can be\n# found in the LICENSE file.\n\nimport(\"//build/fuchsia/sdk.gni\")\n\nconfig(\"zircon_config\") {\n include_dirs = [ \".\" ]\n}\n\nsource_set(\"zircon\") {\n public_configs = [ \":zircon_config\" ]\n\n sources = [\n \"sdk_ext/handle.cc\",\n \"sdk_ext/handle.h\",\n \"sdk_ext/handle_waiter.cc\",\n \"sdk_ext/handle_waiter.h\",\n \"sdk_ext/natives.cc\",\n \"sdk_ext/natives.h\",\n \"sdk_ext/system.cc\",\n \"sdk_ext/system.h\",\n ]\n\n deps = [\n \"$fuchsia_sdk_root/pkg:async-cpp\",\n \"$fuchsia_sdk_root/pkg:async-default\",\n \"$fuchsia_sdk_root/pkg:async-loop-cpp\",\n \"$fuchsia_sdk_root/pkg:fdio\",\n \"$fuchsia_sdk_root/pkg:zx\",\n \"//flutter/fml\",\n \"//flutter/third_party/tonic\",\n ]\n}\n"} +{"text": "package apimanagement\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"time\"\n\n\t\"github.com/Azure/azure-sdk-for-go/services/apimanagement/mgmt/2019-12-01/apimanagement\"\n\t\"github.com/hashicorp/terraform-plugin-sdk/helper/schema\"\n\t\"github.com/hashicorp/terraform-plugin-sdk/helper/validation\"\n\t\"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/azure\"\n\t\"github.com/terraform-providers/terraform-provider-azurerm/azurerm/helpers/tf\"\n\t\"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/clients\"\n\t\"github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/timeouts\"\n\t\"github.com/terraform-providers/terraform-provider-azurerm/azurerm/utils\"\n)\n\nfunc resourceArmApiManagementLogger() *schema.Resource {\n\treturn &schema.Resource{\n\t\tCreate: resourceArmApiManagementLoggerCreate,\n\t\tRead: resourceArmApiManagementLoggerRead,\n\t\tUpdate: resourceArmApiManagementLoggerUpdate,\n\t\tDelete: resourceArmApiManagementLoggerDelete,\n\n\t\tImporter: &schema.ResourceImporter{\n\t\t\tState: schema.ImportStatePassthrough,\n\t\t},\n\n\t\tTimeouts: &schema.ResourceTimeout{\n\t\t\tCreate: schema.DefaultTimeout(30 * time.Minute),\n\t\t\tRead: schema.DefaultTimeout(5 * time.Minute),\n\t\t\tUpdate: schema.DefaultTimeout(30 * time.Minute),\n\t\t\tDelete: schema.DefaultTimeout(30 * time.Minute),\n\t\t},\n\n\t\tSchema: map[string]*schema.Schema{\n\t\t\t\"name\": azure.SchemaApiManagementChildName(),\n\n\t\t\t\"resource_group_name\": azure.SchemaResourceGroupName(),\n\n\t\t\t\"api_management_name\": azure.SchemaApiManagementName(),\n\n\t\t\t\"eventhub\": {\n\t\t\t\tType: schema.TypeList,\n\t\t\t\tMaxItems: 1,\n\t\t\t\tOptional: true,\n\t\t\t\tForceNew: true,\n\t\t\t\tConflictsWith: []string{\"application_insights\"},\n\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\tRequired: true,\n\t\t\t\t\t\t\tValidateFunc: azure.ValidateEventHubName(),\n\t\t\t\t\t\t},\n\n\t\t\t\t\t\t\"connection_string\": {\n\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\tRequired: true,\n\t\t\t\t\t\t\tSensitive: true,\n\t\t\t\t\t\t\tValidateFunc: validation.StringIsNotEmpty,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\n\t\t\t\"application_insights\": {\n\t\t\t\tType: schema.TypeList,\n\t\t\t\tMaxItems: 1,\n\t\t\t\tOptional: true,\n\t\t\t\tForceNew: true,\n\t\t\t\tConflictsWith: []string{\"eventhub\"},\n\t\t\t\tElem: &schema.Resource{\n\t\t\t\t\tSchema: map[string]*schema.Schema{\n\t\t\t\t\t\t\"instrumentation_key\": {\n\t\t\t\t\t\t\tType: schema.TypeString,\n\t\t\t\t\t\t\tRequired: true,\n\t\t\t\t\t\t\tSensitive: true,\n\t\t\t\t\t\t\tValidateFunc: validation.StringIsNotEmpty,\n\t\t\t\t\t\t},\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t},\n\n\t\t\t\"buffered\": {\n\t\t\t\tType: schema.TypeBool,\n\t\t\t\tOptional: true,\n\t\t\t\tDefault: true,\n\t\t\t},\n\n\t\t\t\"description\": {\n\t\t\t\tType: schema.TypeString,\n\t\t\t\tOptional: true,\n\t\t\t},\n\t\t},\n\t}\n}\n\nfunc resourceArmApiManagementLoggerCreate(d *schema.ResourceData, meta interface{}) error {\n\tclient := meta.(*clients.Client).ApiManagement.LoggerClient\n\tctx, cancel := timeouts.ForCreate(meta.(*clients.Client).StopContext, d)\n\tdefer cancel()\n\n\tname := d.Get(\"name\").(string)\n\tresourceGroup := d.Get(\"resource_group_name\").(string)\n\tserviceName := d.Get(\"api_management_name\").(string)\n\n\teventHubRaw := d.Get(\"eventhub\").([]interface{})\n\tappInsightsRaw := d.Get(\"application_insights\").([]interface{})\n\n\tif len(eventHubRaw) == 0 && len(appInsightsRaw) == 0 {\n\t\treturn fmt.Errorf(\"Either `eventhub` or `application_insights` is required\")\n\t}\n\n\tif d.IsNewResource() {\n\t\texisting, err := client.Get(ctx, resourceGroup, serviceName, name)\n\t\tif err != nil {\n\t\t\tif !utils.ResponseWasNotFound(existing.Response) {\n\t\t\t\treturn fmt.Errorf(\"checking for presence of existing Logger %q (API Management Service %q / Resource Group %q): %s\", name, serviceName, resourceGroup, err)\n\t\t\t}\n\t\t}\n\n\t\tif existing.ID != nil && *existing.ID != \"\" {\n\t\t\treturn tf.ImportAsExistsError(\"azurerm_api_management_logger\", *existing.ID)\n\t\t}\n\t}\n\n\tparameters := apimanagement.LoggerContract{\n\t\tLoggerContractProperties: &apimanagement.LoggerContractProperties{\n\t\t\tIsBuffered: utils.Bool(d.Get(\"buffered\").(bool)),\n\t\t\tDescription: utils.String(d.Get(\"description\").(string)),\n\t\t},\n\t}\n\n\tif len(eventHubRaw) > 0 {\n\t\tparameters.LoggerType = apimanagement.AzureEventHub\n\t\tparameters.Credentials = expandArmApiManagementLoggerEventHub(eventHubRaw)\n\t} else if len(appInsightsRaw) > 0 {\n\t\tparameters.LoggerType = apimanagement.ApplicationInsights\n\t\tparameters.Credentials = expandArmApiManagementLoggerApplicationInsights(appInsightsRaw)\n\t}\n\n\tif _, err := client.CreateOrUpdate(ctx, resourceGroup, serviceName, name, parameters, \"\"); err != nil {\n\t\treturn fmt.Errorf(\"creating Logger %q (Resource Group %q / API Management Service %q): %+v\", name, resourceGroup, serviceName, err)\n\t}\n\n\tresp, err := client.Get(ctx, resourceGroup, serviceName, name)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"retrieving Logger %q (Resource Group %q / API Management Service %q): %+v\", name, resourceGroup, serviceName, err)\n\t}\n\tif resp.ID == nil {\n\t\treturn fmt.Errorf(\"Cannot read Logger %q (Resource Group %q / API Management Service %q) ID\", name, resourceGroup, serviceName)\n\t}\n\td.SetId(*resp.ID)\n\n\treturn resourceArmApiManagementLoggerRead(d, meta)\n}\n\nfunc resourceArmApiManagementLoggerRead(d *schema.ResourceData, meta interface{}) error {\n\tclient := meta.(*clients.Client).ApiManagement.LoggerClient\n\tctx, cancel := timeouts.ForRead(meta.(*clients.Client).StopContext, d)\n\tdefer cancel()\n\n\tid, err := azure.ParseAzureResourceID(d.Id())\n\tif err != nil {\n\t\treturn err\n\t}\n\tresourceGroup := id.ResourceGroup\n\tserviceName := id.Path[\"service\"]\n\tname := id.Path[\"loggers\"]\n\n\tresp, err := client.Get(ctx, resourceGroup, serviceName, name)\n\tif err != nil {\n\t\tif utils.ResponseWasNotFound(resp.Response) {\n\t\t\tlog.Printf(\"[INFO] Logger %q (API Management Service %q / Resource Group %q) was not found - removing from state\", name, serviceName, resourceGroup)\n\t\t\td.SetId(\"\")\n\t\t\treturn nil\n\t\t}\n\t\treturn fmt.Errorf(\"reading Logger %q (API Management Service %q / Resource Group %q): %+v\", name, serviceName, resourceGroup, err)\n\t}\n\n\td.Set(\"name\", resp.Name)\n\td.Set(\"resource_group_name\", resourceGroup)\n\td.Set(\"api_management_name\", serviceName)\n\n\tif properties := resp.LoggerContractProperties; properties != nil {\n\t\td.Set(\"buffered\", properties.IsBuffered)\n\t\td.Set(\"description\", properties.Description)\n\t\tif err := d.Set(\"eventhub\", flattenArmApiManagementLoggerEventHub(d, properties)); err != nil {\n\t\t\treturn fmt.Errorf(\"setting `eventhub`: %s\", err)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc resourceArmApiManagementLoggerUpdate(d *schema.ResourceData, meta interface{}) error {\n\tclient := meta.(*clients.Client).ApiManagement.LoggerClient\n\tctx, cancel := timeouts.ForUpdate(meta.(*clients.Client).StopContext, d)\n\tdefer cancel()\n\n\tresourceGroup := d.Get(\"resource_group_name\").(string)\n\tserviceName := d.Get(\"api_management_name\").(string)\n\tname := d.Get(\"name\").(string)\n\n\teventHubRaw, hasEventHub := d.GetOk(\"eventhub\")\n\tappInsightsRaw, hasAppInsights := d.GetOk(\"application_insights\")\n\n\tparameters := apimanagement.LoggerUpdateContract{\n\t\tLoggerUpdateParameters: &apimanagement.LoggerUpdateParameters{\n\t\t\tIsBuffered: utils.Bool(d.Get(\"buffered\").(bool)),\n\t\t\tDescription: utils.String(d.Get(\"description\").(string)),\n\t\t},\n\t}\n\n\tif hasEventHub {\n\t\tparameters.LoggerType = apimanagement.AzureEventHub\n\t\tparameters.Credentials = expandArmApiManagementLoggerEventHub(eventHubRaw.([]interface{}))\n\t} else if hasAppInsights {\n\t\tparameters.LoggerType = apimanagement.ApplicationInsights\n\t\tparameters.Credentials = expandArmApiManagementLoggerApplicationInsights(appInsightsRaw.([]interface{}))\n\t}\n\n\tif _, err := client.Update(ctx, resourceGroup, serviceName, name, parameters, \"\"); err != nil {\n\t\treturn fmt.Errorf(\"updating Logger %q (Resource Group %q / API Management Service %q): %+v\", name, resourceGroup, serviceName, err)\n\t}\n\n\treturn resourceArmApiManagementLoggerRead(d, meta)\n}\n\nfunc resourceArmApiManagementLoggerDelete(d *schema.ResourceData, meta interface{}) error {\n\tclient := meta.(*clients.Client).ApiManagement.LoggerClient\n\tctx, cancel := timeouts.ForDelete(meta.(*clients.Client).StopContext, d)\n\tdefer cancel()\n\n\tid, err := azure.ParseAzureResourceID(d.Id())\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tresourceGroup := id.ResourceGroup\n\tserviceName := id.Path[\"service\"]\n\tname := id.Path[\"loggers\"]\n\n\tif resp, err := client.Delete(ctx, resourceGroup, serviceName, name, \"\", utils.Bool(false)); err != nil {\n\t\tif !utils.ResponseWasNotFound(resp) {\n\t\t\treturn fmt.Errorf(\"deleting Logger %q (Resource Group %q / API Management Service %q): %+v\", name, resourceGroup, serviceName, err)\n\t\t}\n\t}\n\n\treturn nil\n}\n\nfunc expandArmApiManagementLoggerEventHub(input []interface{}) map[string]*string {\n\tcredentials := make(map[string]*string)\n\teventHub := input[0].(map[string]interface{})\n\tcredentials[\"name\"] = utils.String(eventHub[\"name\"].(string))\n\tcredentials[\"connectionString\"] = utils.String(eventHub[\"connection_string\"].(string))\n\treturn credentials\n}\n\nfunc expandArmApiManagementLoggerApplicationInsights(input []interface{}) map[string]*string {\n\tcredentials := make(map[string]*string)\n\tai := input[0].(map[string]interface{})\n\tcredentials[\"instrumentationKey\"] = utils.String(ai[\"instrumentation_key\"].(string))\n\treturn credentials\n}\n\nfunc flattenArmApiManagementLoggerEventHub(d *schema.ResourceData, properties *apimanagement.LoggerContractProperties) []interface{} {\n\tresult := make([]interface{}, 0)\n\tif name := properties.Credentials[\"name\"]; name != nil {\n\t\teventHub := make(map[string]interface{})\n\t\teventHub[\"name\"] = *name\n\t\tif existing := d.Get(\"eventhub\").([]interface{}); len(existing) > 0 {\n\t\t\texistingEventHub := existing[0].(map[string]interface{})\n\t\t\tif conn, ok := existingEventHub[\"connection_string\"]; ok {\n\t\t\t\teventHub[\"connection_string\"] = conn.(string)\n\t\t\t}\n\t\t}\n\t\tresult = append(result, eventHub)\n\t}\n\treturn result\n}\n"} +{"text": "// @flow strict\nexport { default } from './Sidebar';\n"} +{"text": "/******************************************************************************\n * Copyright (c) 2004, 2008 IBM Corporation\n * All rights reserved.\n * This program and the accompanying materials\n * are made available under the terms of the BSD License\n * which accompanies this distribution, and is available at\n * http://www.opensource.org/licenses/bsd-license.php\n *\n * Contributors:\n * IBM Corporation - initial implementation\n *****************************************************************************/\n\n#include <string.h>\n\nchar *\nstrchr(const char *s, int c)\n{\n\tchar cb = c;\n\n\twhile (*s != 0) {\n\t\tif (*s == cb) {\n\t\t\treturn (char *)s;\n\t\t}\n\t\ts += 1;\n\t}\n\n\treturn NULL;\n}\n"} +{"text": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<definitions xmlns=\"http://ws.apache.org/ns/synapse\">\n <registry provider=\"org.wso2.carbon.mediation.registry.WSO2Registry\">\n <parameter name=\"cachableDuration\">15000</parameter>\n </registry>\n <proxy name=\"EchoProxy\"\n transports=\"https\"\n startOnLoad=\"true\"\n trace=\"disable\">\n <description/>\n <target inSequence=\"Insequence\" outSequence=\"Outsequence\"/>\n <publishWSDL uri=\"http://localhost:8282/services/echo?wsdl\"/>\n <policy key=\"conf:/repository/axis2/service-groups/EchoProxy/services/EchoProxy/policies/UTOverTransport\"/>\n <enableSec/>\n </proxy>\n <endpoint name=\"echo\">\n <address uri=\"http://localhost:8282/services/echo\"/>\n </endpoint>\n <sequence name=\"Outsequence\">\n <send/>\n <log/>\n </sequence>\n <sequence name=\"fault\">\n <log level=\"full\">\n <property name=\"MESSAGE\" value=\"Executing default 'fault' sequence\"/>\n <property name=\"ERROR_CODE\" expression=\"get-property('ERROR_CODE')\"/>\n <property name=\"ERROR_MESSAGE\" expression=\"get-property('ERROR_MESSAGE')\"/>\n </log>\n <drop/>\n </sequence>\n <sequence name=\"Insequence\">\n <log level=\"full\"/>\n <header xmlns:wsse=\"http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd\"\n name=\"wsse:Security\"\n action=\"remove\"/>\n <entitlementService remoteServiceUrl=\"https://localhost:9446/services/\"\n remoteServiceUserName=\"admin\"\n remoteServicePassword=\"admin\">\n <onReject>\n <makefault version=\"soap11\">\n <code xmlns:soap11Env=\"http://schemas.xmlsoap.org/soap/envelope/\"\n value=\"soap11Env:VersionMismatch\"/>\n <reason value=\"Test \"/>\n <role/>\n </makefault>\n <log>\n <property name=\"name\" value=\"inOnReject\"/>\n </log>\n </onReject>\n <onAccept>\n <log>\n <property name=\"name\" value=\"inOnAccept\"/>\n </log>\n <send>\n <endpoint key=\"echo\"/>\n </send>\n </onAccept>\n <obligations/>\n <advice/>\n </entitlementService>\n <drop/>\n </sequence>\n <sequence name=\"main\">\n <in>\n <log level=\"full\"/>\n <filter source=\"get-property('To')\" regex=\"http://localhost:9000.*\">\n <send/>\n </filter>\n </in>\n <out>\n <send/>\n </out>\n <description>The main sequence for the message mediation</description>\n </sequence>\n</definitions>\n"} +{"text": "---\nname: \"\\U0001F4A1 Feature request\"\nabout: Suggest an idea for this project.\ntitle: ''\nlabels: feature\nassignees: ''\n\n---\n\nDescribe in details your feature. If the feature is modifying or proposing a new API, make sure to provide a code sample. If your feature is UI related, please attach some images for preview.\n\n### Description\n"} +{"text": "const exec = require('child_process').execSync\n\nmodule.exports = () => {\n let name\n let email\n\n try {\n name = exec('git config --get user.name')\n email = exec('git config --get user.email')\n } catch (e) {}\n\n name = name && JSON.stringify(name.toString().trim()).slice(1, -1)\n email = email && (' <' + email.toString().trim() + '>')\n return (name || '') + (email || '')\n}\n"} +{"text": "var file = \"/models/project.js\"\n"} +{"text": "/*\n * Copyright (c) 2014-2018 Cesanta Software Limited\n * All rights reserved\n *\n * Licensed under the Apache License, Version 2.0 (the \"\"License\"\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"\"AS IS\"\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#include \"common/cs_time.h\"\n\n#ifndef _WIN32\n#include <stddef.h>\n/*\n * There is no sys/time.h on ARMCC.\n */\n#if !(defined(__ARMCC_VERSION) || defined(__ICCARM__)) && \\\n !defined(__TI_COMPILER_VERSION__) && \\\n (!defined(CS_PLATFORM) || CS_PLATFORM != CS_P_NXP_LPC)\n#include <sys/time.h>\n#endif\n#else\n#include <windows.h>\n#endif\n\ndouble cs_time(void) WEAK;\ndouble cs_time(void) {\n double now;\n#ifndef _WIN32\n struct timeval tv;\n if (gettimeofday(&tv, NULL /* tz */) != 0) return 0;\n now = (double) tv.tv_sec + (((double) tv.tv_usec) / 1000000.0);\n#else\n SYSTEMTIME sysnow;\n FILETIME ftime;\n GetLocalTime(&sysnow);\n SystemTimeToFileTime(&sysnow, &ftime);\n /*\n * 1. VC 6.0 doesn't support conversion uint64 -> double, so, using int64\n * This should not cause a problems in this (21th) century\n * 2. Windows FILETIME is a number of 100-nanosecond intervals since January\n * 1, 1601 while time_t is a number of _seconds_ since January 1, 1970 UTC,\n * thus, we need to convert to seconds and adjust amount (subtract 11644473600\n * seconds)\n */\n now = (double) (((int64_t) ftime.dwLowDateTime +\n ((int64_t) ftime.dwHighDateTime << 32)) /\n 10000000.0) -\n 11644473600;\n#endif /* _WIN32 */\n return now;\n}\n\ndouble cs_timegm(const struct tm *tm) {\n /* Month-to-day offset for non-leap-years. */\n static const int month_day[12] = {0, 31, 59, 90, 120, 151,\n 181, 212, 243, 273, 304, 334};\n\n /* Most of the calculation is easy; leap years are the main difficulty. */\n int month = tm->tm_mon % 12;\n int year = tm->tm_year + tm->tm_mon / 12;\n int year_for_leap;\n int64_t rt;\n\n if (month < 0) { /* Negative values % 12 are still negative. */\n month += 12;\n --year;\n }\n\n /* This is the number of Februaries since 1900. */\n year_for_leap = (month > 1) ? year + 1 : year;\n\n rt =\n tm->tm_sec /* Seconds */\n +\n 60 *\n (tm->tm_min /* Minute = 60 seconds */\n +\n 60 * (tm->tm_hour /* Hour = 60 minutes */\n +\n 24 * (month_day[month] + tm->tm_mday - 1 /* Day = 24 hours */\n + 365 * (year - 70) /* Year = 365 days */\n + (year_for_leap - 69) / 4 /* Every 4 years is leap... */\n - (year_for_leap - 1) / 100 /* Except centuries... */\n + (year_for_leap + 299) / 400))); /* Except 400s. */\n return rt < 0 ? -1 : (double) rt;\n}\n"} +{"text": "//===-- sanitizer_errno.h ---------------------------------------*- C++ -*-===//\n//\n// This file is distributed under the University of Illinois Open Source\n// License. See LICENSE.TXT for details.\n//\n//===----------------------------------------------------------------------===//\n//\n// This file is shared between sanitizers run-time libraries.\n//\n// Defines errno to avoid including errno.h and its dependencies into sensitive\n// files (e.g. interceptors are not supposed to include any system headers).\n// It's ok to use errno.h directly when your file already depend on other system\n// includes though.\n//\n//===----------------------------------------------------------------------===//\n\n#ifndef SANITIZER_ERRNO_H\n#define SANITIZER_ERRNO_H\n\n#include \"sanitizer_errno_codes.h\"\n#include \"sanitizer_platform.h\"\n\n#if SANITIZER_FREEBSD || SANITIZER_MAC\n# define __errno_location __error\n#elif SANITIZER_ANDROID || SANITIZER_NETBSD || SANITIZER_OPENBSD || \\\n SANITIZER_RTEMS\n# define __errno_location __errno\n#elif SANITIZER_SOLARIS\n# define __errno_location ___errno\n#elif SANITIZER_WINDOWS\n# define __errno_location _errno\n#endif\n\nextern \"C\" int *__errno_location();\n\n#define errno (*__errno_location())\n\n#endif // SANITIZER_ERRNO_H\n"} +{"text": "/*\n * /MathJax/jax/output/HTML-CSS/fonts/Gyre-Pagella/Shapes/Regular/Main.js\n *\n * Copyright (c) 2009-2018 The MathJax Consortium\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nMathJax.OutputJax[\"HTML-CSS\"].FONTDATA.FONTS.GyrePagellaMathJax_Shapes={directory:\"Shapes/Regular\",family:\"GyrePagellaMathJax_Shapes\",testString:\"\\u00A0\\u2422\\u2423\\u2500\\u2502\\u251C\\u2524\\u252C\\u2534\\u253C\\u2581\\u2588\\u2591\\u2592\\u2593\",32:[0,0,250,0,0],160:[0,0,250,0,0],9250:[726,12,553,-15,508],9251:[133,97,500,40,460],9472:[280,-220,600,0,600],9474:[650,150,600,270,330],9500:[650,150,600,270,600],9508:[650,150,600,0,330],9516:[280,150,600,0,600],9524:[650,-220,600,0,600],9532:[650,150,600,0,600],9601:[88,0,700,0,700],9608:[700,0,700,0,700],9617:[700,0,700,0,700],9618:[700,0,700,0,700],9619:[700,0,700,0,700],9642:[410,-90,480,80,400],9643:[410,-90,480,80,400],9644:[400,-100,760,80,680],9645:[400,-100,760,80,680],9655:[643,143,841,80,761],9665:[643,143,841,80,761],9675:[568,68,796,80,716],9679:[568,68,796,80,716],9702:[450,-50,560,80,480],9828:[668,0,800,80,720],9829:[666,0,760,80,680],9830:[670,0,746,80,666],9831:[668,0,842,80,762],9834:[692,20,600,56,561],9901:[475,-26,500,-116,616],9902:[699,199,500,-170,670],11012:[450,-50,1069,80,989],11013:[450,-50,995,80,915],11014:[673,162,560,80,480],11015:[662,173,560,80,480],11020:[450,-50,1005,80,925],11021:[673,172,560,80,480],11034:[660,160,940,60,880],11057:[740,240,920,80,840],11059:[400,-100,1370,80,1290]};MathJax.Callback.Queue([\"initFont\",MathJax.OutputJax[\"HTML-CSS\"],\"GyrePagellaMathJax_Shapes\"],[\"loadComplete\",MathJax.Ajax,MathJax.OutputJax[\"HTML-CSS\"].fontDir+\"/Shapes/Regular/Main.js\"]);\n"} +{"text": "/*\n * Platform-specific and custom entropy polling functions\n *\n * Copyright (C) 2006-2016, ARM Limited, All Rights Reserved\n * SPDX-License-Identifier: Apache-2.0\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\"); you may\n * not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * This file is part of mbed TLS (https://tls.mbed.org)\n */\n\n#if defined(__linux__)\n/* Ensure that syscall() is available even when compiling with -std=c99 */\n#define _GNU_SOURCE\n#endif\n\n#if !defined(MBEDTLS_CONFIG_FILE)\n#include \"mbedtls/config.h\"\n#else\n#include MBEDTLS_CONFIG_FILE\n#endif\n\n#include <string.h>\n\n#if defined(MBEDTLS_ENTROPY_C)\n\n#include \"mbedtls/entropy.h\"\n#include \"mbedtls/entropy_poll.h\"\n\n#if defined(MBEDTLS_TIMING_C)\n#include \"mbedtls/timing.h\"\n#endif\n#if defined(MBEDTLS_HAVEGE_C)\n#include \"mbedtls/havege.h\"\n#endif\n#if defined(MBEDTLS_ENTROPY_NV_SEED)\n#include \"mbedtls/platform.h\"\n#endif\n\n#if !defined(MBEDTLS_NO_PLATFORM_ENTROPY)\n\n#if !defined(unix) && !defined(__unix__) && !defined(__unix) && \\\n !defined(__APPLE__) && !defined(_WIN32) && !defined(__QNXNTO__) && \\\n !defined(__HAIKU__)\n#error \"Platform entropy sources only work on Unix and Windows, see MBEDTLS_NO_PLATFORM_ENTROPY in config.h\"\n#endif\n\n#if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)\n\n#if !defined(_WIN32_WINNT)\n#define _WIN32_WINNT 0x0400\n#endif\n#include <windows.h>\n#include <wincrypt.h>\n\n/*int mbedtls_platform_entropy_poll( void *data, unsigned char *output, size_t len,\n size_t *olen )\n{\n HCRYPTPROV provider;\n ((void) data);\n *olen = 0;\n\n if( CryptAcquireContext( &provider, NULL, NULL,\n PROV_RSA_FULL, CRYPT_VERIFYCONTEXT ) == FALSE )\n {\n return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED );\n }\n\n if( CryptGenRandom( provider, (DWORD) len, output ) == FALSE )\n {\n CryptReleaseContext( provider, 0 );\n return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED );\n }\n\n CryptReleaseContext( provider, 0 );\n *olen = len;\n\n return( 0 );\n}*/\n#else /* _WIN32 && !EFIX64 && !EFI32 */\n\n/*\n * Test for Linux getrandom() support.\n * Since there is no wrapper in the libc yet, use the generic syscall wrapper\n * available in GNU libc and compatible libc's (eg uClibc).\n */\n#if defined(__linux__) && defined(__GLIBC__)\n#include <unistd.h>\n#include <sys/syscall.h>\n#if defined(SYS_getrandom)\n#define HAVE_GETRANDOM\n\nstatic int getrandom_wrapper( void *buf, size_t buflen, unsigned int flags )\n{\n /* MemSan cannot understand that the syscall writes to the buffer */\n#if defined(__has_feature)\n#if __has_feature(memory_sanitizer)\n memset( buf, 0, buflen );\n#endif\n#endif\n\n return( syscall( SYS_getrandom, buf, buflen, flags ) );\n}\n\n#include <sys/utsname.h>\n/* Check if version is at least 3.17.0 */\nstatic int check_version_3_17_plus( void )\n{\n int minor;\n struct utsname un;\n const char *ver;\n\n /* Get version information */\n uname(&un);\n ver = un.release;\n\n /* Check major version; assume a single digit */\n if( ver[0] < '3' || ver[0] > '9' || ver [1] != '.' )\n return( -1 );\n\n if( ver[0] - '0' > 3 )\n return( 0 );\n\n /* Ok, so now we know major == 3, check minor.\n * Assume 1 or 2 digits. */\n if( ver[2] < '0' || ver[2] > '9' )\n return( -1 );\n\n minor = ver[2] - '0';\n\n if( ver[3] >= '0' && ver[3] <= '9' )\n minor = 10 * minor + ver[3] - '0';\n else if( ver [3] != '.' )\n return( -1 );\n\n if( minor < 17 )\n return( -1 );\n\n return( 0 );\n}\nstatic int has_getrandom = -1;\n#endif /* SYS_getrandom */\n#endif /* __linux__ */\n\n#include <stdio.h>\n\nint mbedtls_platform_entropy_poll( void *data,\n unsigned char *output, size_t len, size_t *olen )\n{\n FILE *file;\n size_t read_len;\n ((void) data);\n\n#if defined(HAVE_GETRANDOM)\n if( has_getrandom == -1 )\n has_getrandom = ( check_version_3_17_plus() == 0 );\n\n if( has_getrandom )\n {\n int ret;\n\n if( ( ret = getrandom_wrapper( output, len, 0 ) ) < 0 )\n return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED );\n\n *olen = ret;\n return( 0 );\n }\n#endif /* HAVE_GETRANDOM */\n\n *olen = 0;\n\n file = fopen( \"/dev/urandom\", \"rb\" );\n if( file == NULL )\n return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED );\n\n read_len = fread( output, 1, len, file );\n if( read_len != len )\n {\n fclose( file );\n return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED );\n }\n\n fclose( file );\n *olen = len;\n\n return( 0 );\n}\n#endif /* _WIN32 && !EFIX64 && !EFI32 */\n#endif /* !MBEDTLS_NO_PLATFORM_ENTROPY */\n\n#if defined(MBEDTLS_TEST_NULL_ENTROPY)\nint mbedtls_null_entropy_poll( void *data,\n unsigned char *output, size_t len, size_t *olen )\n{\n ((void) data);\n ((void) output);\n *olen = 0;\n\n if( len < sizeof(unsigned char) )\n return( 0 );\n\n *olen = sizeof(unsigned char);\n\n return( 0 );\n}\n#endif\n\n#if defined(MBEDTLS_TIMING_C)\nint mbedtls_hardclock_poll( void *data,\n unsigned char *output, size_t len, size_t *olen )\n{\n unsigned long timer = mbedtls_timing_hardclock();\n ((void) data);\n *olen = 0;\n\n if( len < sizeof(unsigned long) )\n return( 0 );\n\n memcpy( output, &timer, sizeof(unsigned long) );\n *olen = sizeof(unsigned long);\n\n return( 0 );\n}\n#endif /* MBEDTLS_TIMING_C */\n\n#if defined(MBEDTLS_HAVEGE_C)\nint mbedtls_havege_poll( void *data,\n unsigned char *output, size_t len, size_t *olen )\n{\n mbedtls_havege_state *hs = (mbedtls_havege_state *) data;\n *olen = 0;\n\n if( mbedtls_havege_random( hs, output, len ) != 0 )\n return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED );\n\n *olen = len;\n\n return( 0 );\n}\n#endif /* MBEDTLS_HAVEGE_C */\n\n#if defined(MBEDTLS_ENTROPY_NV_SEED)\nint mbedtls_nv_seed_poll( void *data,\n unsigned char *output, size_t len, size_t *olen )\n{\n unsigned char buf[MBEDTLS_ENTROPY_BLOCK_SIZE];\n size_t use_len = MBEDTLS_ENTROPY_BLOCK_SIZE;\n ((void) data);\n\n memset( buf, 0, MBEDTLS_ENTROPY_BLOCK_SIZE );\n\n if( mbedtls_nv_seed_read( buf, MBEDTLS_ENTROPY_BLOCK_SIZE ) < 0 )\n return( MBEDTLS_ERR_ENTROPY_SOURCE_FAILED );\n\n if( len < use_len )\n use_len = len;\n\n memcpy( output, buf, use_len );\n *olen = use_len;\n\n return( 0 );\n}\n#endif /* MBEDTLS_ENTROPY_NV_SEED */\n\n#endif /* MBEDTLS_ENTROPY_C */\n"} +{"text": "import 'package:countdown_timer/main_using_on_set_state_listener.dart';\nimport 'package:flutter/material.dart';\nimport 'package:flutter_test/flutter_test.dart';\n\nvoid main() {\n testWidgets('timer app', (tester) async {\n await tester.pumpWidget(MaterialApp(home: App()));\n //ready state\n expect(find.text('01:00'), findsOneWidget);\n expect(find.byIcon(Icons.play_arrow), findsOneWidget);\n\n //tap on start btn\n await tester.tap(find.byIcon(Icons.play_arrow));\n await tester.pump(Duration(seconds: 1));\n await tester.pump(Duration(seconds: 1));\n\n //running state\n expect(find.text('00:58'), findsOneWidget);\n expect(find.byIcon(Icons.pause), findsOneWidget);\n expect(find.byIcon(Icons.repeat), findsOneWidget);\n\n //tap on repeat btn\n await tester.tap(find.byIcon(Icons.repeat));\n await tester.pump();\n //running state\n expect(find.text('01:00'), findsOneWidget);\n expect(find.byIcon(Icons.pause), findsOneWidget);\n expect(find.byIcon(Icons.repeat), findsOneWidget);\n await tester.pump(Duration(seconds: 1));\n await tester.pump(Duration(seconds: 1));\n expect(find.text('00:58'), findsOneWidget);\n\n //tap on pause btn\n await tester.tap(find.byIcon(Icons.pause));\n await tester.pump();\n //pause state\n expect(find.text('00:58'), findsOneWidget);\n expect(find.byIcon(Icons.play_arrow), findsOneWidget);\n expect(find.byIcon(Icons.stop), findsOneWidget);\n await tester.pump(Duration(seconds: 1));\n await tester.pump(Duration(seconds: 1));\n expect(find.text('00:58'), findsOneWidget);\n\n //tap on replay btn\n await tester.tap(find.byIcon(Icons.play_arrow));\n await tester.pump();\n //running state\n expect(find.text('00:58'), findsOneWidget);\n expect(find.byIcon(Icons.pause), findsOneWidget);\n expect(find.byIcon(Icons.repeat), findsOneWidget);\n await tester.pump(Duration(seconds: 1));\n await tester.pump(Duration(seconds: 1));\n expect(find.text('00:56'), findsOneWidget);\n\n //tap on pause btn\n await tester.tap(find.byIcon(Icons.pause));\n await tester.pump();\n\n //tap on stop btn\n await tester.tap(find.byIcon(Icons.stop));\n await tester.pump();\n //ready state\n expect(find.text('01:00'), findsOneWidget);\n expect(find.byIcon(Icons.play_arrow), findsOneWidget);\n await tester.pump(Duration(seconds: 1));\n await tester.pump(Duration(seconds: 1));\n expect(find.text('01:00'), findsOneWidget);\n\n //tap on start btn\n await tester.tap(find.byIcon(Icons.play_arrow));\n await tester.pump(Duration(seconds: 1));\n await tester.pump(Duration(seconds: 1));\n expect(find.text('00:58'), findsOneWidget);\n\n await tester.pump(Duration(seconds: 55));\n await tester.pump(Duration(seconds: 1));\n await tester.pump(Duration(seconds: 1));\n\n //running state\n expect(find.text('00:01'), findsOneWidget);\n expect(find.byIcon(Icons.pause), findsOneWidget);\n expect(find.byIcon(Icons.repeat), findsOneWidget);\n\n await tester.pump(Duration(seconds: 1));\n\n //ready state\n expect(find.text('01:00'), findsOneWidget);\n expect(find.byIcon(Icons.play_arrow), findsOneWidget);\n await tester.pump(Duration(seconds: 1));\n await tester.pump(Duration(seconds: 1));\n expect(find.text('01:00'), findsOneWidget);\n });\n}\n"} +{"text": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Threading.Tasks;\nusing Microsoft.AspNetCore.Authorization;\nusing Microsoft.AspNetCore.Mvc;\n\n// For more information on enabling MVC for empty projects, visit http://go.microsoft.com/fwlink/?LinkID=397860\n\nnamespace AuthorizationLab.Controllers\n{\n public class HomeController : Controller\n {\n // GET: /<controller>/\n public IActionResult Index()\n {\n return View();\n }\n }\n}\n"} +{"text": "// ------------------------------------------------------------------------------\n// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.\n// ------------------------------------------------------------------------------\n\n// **NOTE** This file was generated by a tool and any changes will be overwritten.\n// <auto-generated/>\n\n// Template Source: Templates\\CSharp\\Requests\\IEntityCollectionPage.cs.tt\n\nnamespace Microsoft.Graph\n{\n using System;\n\n using Newtonsoft.Json;\n\n /// <summary>\n /// The interface ITeamMembersCollectionPage.\n /// </summary>\n [JsonConverter(typeof(InterfaceConverter<TeamMembersCollectionPage>))]\n public interface ITeamMembersCollectionPage : ICollectionPage<ConversationMember>\n {\n /// <summary>\n /// Gets the next page <see cref=\"ITeamMembersCollectionRequest\"/> instance.\n /// </summary>\n ITeamMembersCollectionRequest NextPageRequest { get; }\n\n /// <summary>\n /// Initializes the NextPageRequest property.\n /// </summary>\n void InitializeNextPageRequest(IBaseClient client, string nextPageLinkString);\n }\n}\n"} +{"text": "---\nlayout: post\ntitle: Mediator\ndate: 2014-08-31 18:03:00\nhomepage: https://github.com/dirkfabisch/mediator\ndownload: https://github.com/dirkfabisch/mediator/archive/master.zip\ndemo: http://blog.base68.com\nauthor: Dirk Fabisch\nthumbnail: mediator.png\nlicense: MIT License\nlicense_link: https://github.com/dirkfabisch/mediator/blob/master/LICENCE\n---\n\nA medium inspired Jekyll blog theme.\n\n* Fully Responsive layout\n* Use header images in articles\n* Minimal design\n* Featured article support\n* FontAwesome implemented for easy use of icons fonts\n* Free & Open Source Font usage\n"} +{"text": "#include <stdint.h>\n#include <stdlib.h> // rand()\n#include <time.h> // clock()\n#include <conio.h>\n\n#define MAX_ROWS 28\n#define MAX_COLS 28\n#define MAX_SQUARES\t(MAX_ROWS*MAX_COLS)\n\nuint8_t grid[MAX_SQUARES];\n\n#define GetRow(sq)\t(sq % MAX_ROWS)\n#define GetCol(sq)\t(sq / MAX_ROWS)\n\nenum\n{\n DIR_NORTH = 0,\n DIR_EAST,\n DIR_WEST,\n DIR_SOUTH,\n MAX_DIRS\n};\nconst int offset[MAX_DIRS] = {-1, MAX_ROWS, -MAX_ROWS, 1};\n\nuint8_t GetRandomDir()\n{\n return rand() % MAX_DIRS;\n}\n\nuint16_t GetRandomSquare()\n{\n return rand() % MAX_SQUARES;\n}\n\n\nvoid DrawPos(uint16_t sq)\n{\n const char wall = '#';\n uint8_t col = 1 + 2*GetCol(sq);\n uint8_t row = 1 + 2*GetRow(sq);\n uint8_t g = grid[sq];\n\n cputcxy(col+1, row+1, ' ');\n cputcxy(col, row, wall);\n cputcxy(col, row+2, wall);\n cputcxy(col+2, row+2, wall);\n cputcxy(col+2, row, wall);\n cputcxy(col+1, row, (g&(1<<DIR_NORTH)) ? ' ' : wall);\n cputcxy(col+2, row+1, (g&(1<<DIR_EAST)) ? ' ' : wall);\n cputcxy(col, row+1, (g&(1<<DIR_WEST)) ? ' ' : wall);\n cputcxy(col+1, row+2, (g&(1<<DIR_SOUTH)) ? ' ' : wall);\n} // end of DrawPos\n\n\nvoid InitMaze(void)\n{\n int sq;\n int count;\n uint16_t c;\n\n for(sq=0; sq<MAX_SQUARES; sq++)\n {\n grid[sq]=0;\n }\n\n sq = GetRandomSquare();\n count = MAX_SQUARES-1;\n while (count)\n {\n int dir = GetRandomDir();\n int newSq = sq + offset[dir];\n\n if ( ((GetRow(sq)==GetRow(newSq)) + (GetCol(sq)==GetCol(newSq)) == 1)\n && (newSq>=0) && (newSq<MAX_SQUARES) )\n {\n if (!grid[newSq])\n {\t/* We haven't been here before. */\n\n /* Make an opening */\n grid[sq] += 1 << (dir); DrawPos(sq);\n sq = newSq;\n grid[sq] += 1 << ((MAX_DIRS-1) - dir); DrawPos(sq);\n count--;\n gotoxy(70, 10); cprintf(\"%05d\", count);\n for (c=0; c<10000; ++c)\n {\n }\n }\n else if (abs(rand()) < abs(rand())/6)\n {\n do\n {\n sq = GetRandomSquare();\n }\n while (!grid[sq]);\n }\n }\n }\n} // end of InitMaze\n\n\nint main()\n{\n int curSq, printSq;\n\n srand(clock());\n\n InitMaze();\n\n clrscr();\n\n /* Get random start square */\n curSq = MAX_SQUARES - 1;\n\n while (curSq >= 0)\n {\n int dir;\n\n#define BEEN_HERE 1<<7\n\n if (!curSq)\n {\n cputsxy(1, 58, \"You escaped!\");\n }\n\n grid[curSq] |= BEEN_HERE;\n\n for (printSq=0; printSq<MAX_SQUARES; printSq++)\n {\n if (grid[printSq] & BEEN_HERE)\n {\n DrawPos(printSq);\n }\n }\n cputcxy(2+GetCol(curSq)*2, 2+GetRow(curSq)*2, curSq ? '@' : '*');\n gotoxy(2+GetCol(curSq)*2, 2+GetRow(curSq)*2);\n\n dir = MAX_DIRS;\n switch (cgetc())\n {\n case 'w': case 'k': dir = DIR_NORTH; break;\n case 's': case 'j': dir = DIR_SOUTH; break;\n case 'd': case 'l': dir = DIR_EAST; break;\n case 'a': case 'h': dir = DIR_WEST; break;\n case 'q': curSq = -1; break;\n }\n\n if (dir < MAX_DIRS)\n {\n if (grid[curSq] & (1<<dir))\n {\n curSq += offset[dir];\n }\n }\n } // end of while (curSq >= 0)\n\n return 0;\n} // end of main\n\n"} +{"text": "@import '../constants';\n\n.footer {\n background-color: #f0f2f4;\n padding: 20px 0;\n\n @media (min-width: 640px) {\n padding: 50px 0;\n }\n}\n\n.copyright {\n font-size: 14px;\n color: rgba(125, 136, 142, 255);\n padding-left: $inner-offset;\n padding-right: $inner-offset;\n a {\n color: rgba(125, 136, 142, 255);\n text-decoration: underline;\n }\n}\n\n.links {\n margin-bottom: 50px;\n padding-left: $inner-offset;\n padding-right: $inner-offset;\n a {\n margin: 0 10px;\n color: rgba(51, 51, 51, 255);\n &:first-child {\n margin-left: 0;\n }\n &:last-child {\n margin-right: 0;\n }\n }\n}\n"} +{"text": "/* *****************************************************************************\n * A.L.E (Arcade Learning Environment)\n * Copyright (c) 2009-2013 by Yavar Naddaf, Joel Veness, Marc G. Bellemare and \n * the Reinforcement Learning and Artificial Intelligence Laboratory\n * Released under the GNU General Public License; see License.txt for details. \n *\n * Based on: Stella -- \"An Atari 2600 VCS Emulator\"\n * Copyright (c) 1995-2007 by Bradford W. Mott and the Stella team\n *\n * *****************************************************************************\n */\n#include <cstdlib>\n#include <ctime>\n#include <sstream>\n#include <memory>\n\n#include \"emucore/m6502/src/bspf/src/bspf.hxx\"\n#include \"emucore/Console.hxx\"\n#include \"emucore/Event.hxx\"\n#include \"emucore/PropsSet.hxx\"\n#include \"emucore/Settings.hxx\"\n#include \"emucore/FSNode.hxx\"\n#include \"emucore/OSystem.hxx\"\n\n#if (defined(WIN32) || defined(__MINGW32__))\n# include \"os_dependent/SettingsWin32.hxx\"\n# include \"os_dependent/OSystemWin32.hxx\"\n#else\n# include \"os_dependent/SettingsUNIX.hxx\"\n# include \"os_dependent/OSystemUNIX.hxx\"\n#endif\n\n#include \"controllers/ale_controller.hpp\"\n#include \"controllers/fifo_controller.hpp\"\n#include \"controllers/rlglue_controller.hpp\"\n#include \"common/Constants.h\"\n#include \"ale_interface.hpp\"\n\n// TODO(mgbellemare): Why are these static? \nstatic std::unique_ptr<OSystem> theOSystem;\nstatic std::unique_ptr<Settings> theSettings;\n\nstatic ALEController* createController(OSystem* osystem, std::string type) {\n if(type.empty()){\n std::cerr << \"You must specify a controller type (via -game_controller).\" << std::endl;\n exit(1);\n }\n else if (type == \"fifo\") {\n std::cerr << \"Game will be controlled through FIFO pipes.\" << std::endl;\n return new FIFOController(osystem, false);\n } \n else if (type == \"fifo_named\") {\n std::cerr << \"Game will be controlled through named FIFO pipes.\" << std::endl;\n return new FIFOController(osystem, true);\n }\n else if (type == \"rlglue\") {\n std::cerr << \"Game will be controlled through RL-Glue.\" << std::endl;\n return new RLGlueController(osystem); \n } \n else {\n std::cerr << \"Invalid controller type: \" << type << \" \" << std::endl;\n exit(1);\n }\n}\n\n/* application entry point */\nint main(int argc, char* argv[]) {\n\n ALEInterface::disableBufferedIO();\n\n std::cerr << ALEInterface::welcomeMessage() << std::endl;\n\n ALEInterface::createOSystem(theOSystem, theSettings);\n // Process commandline arguments, which over-ride all possible\n // config file settings\n std::string romfile = theOSystem->settings().loadCommandLine(argc, argv);\n ALEInterface::loadSettings(romfile, theOSystem);\n\n // Create the game controller\n std::string controller_type = theOSystem->settings().getString(\"game_controller\");\n std::unique_ptr<ALEController> controller(createController(theOSystem.get(), controller_type));\n\n controller->run();\n\n // MUST delete theOSystem to avoid a segfault (theOSystem relies on Settings\n // still being a valid construct)\n theOSystem.reset(NULL);\n\n return 0;\n}\n"} +{"text": "{\n \"name\": \"lazy-cache\",\n \"description\": \"Cache requires to be lazy-loaded when needed.\",\n \"version\": \"1.0.4\",\n \"homepage\": \"https://github.com/jonschlinkert/lazy-cache\",\n \"author\": {\n \"name\": \"Jon Schlinkert\",\n \"url\": \"https://github.com/jonschlinkert\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/jonschlinkert/lazy-cache.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/jonschlinkert/lazy-cache/issues\"\n },\n \"license\": \"MIT\",\n \"files\": [\n \"index.js\"\n ],\n \"main\": \"index.js\",\n \"engines\": {\n \"node\": \">=0.10.0\"\n },\n \"scripts\": {\n \"test\": \"mocha\"\n },\n \"devDependencies\": {\n \"ansi-yellow\": \"^0.1.1\",\n \"glob\": \"^7.0.3\",\n \"gulp-format-md\": \"^0.1.8\",\n \"mocha\": \"^2.4.5\"\n },\n \"keywords\": [\n \"cache\",\n \"caching\",\n \"dependencies\",\n \"dependency\",\n \"lazy\",\n \"require\",\n \"requires\"\n ],\n \"verb\": {\n \"related\": {\n \"list\": [\n \"lint-deps\"\n ]\n },\n \"plugins\": [\n \"gulp-format-md\"\n ],\n \"toc\": false,\n \"layout\": \"default\",\n \"tasks\": [\n \"readme\"\n ],\n \"lint\": {\n \"reflinks\": true\n },\n \"reflinks\": [\n \"verb\"\n ]\n },\n \"gitHead\": \"d081ffbda147391083a6856fafb1c5d82308f80c\",\n \"_id\": \"lazy-cache@1.0.4\",\n \"_shasum\": \"a1d78fc3a50474cb80845d3b3b6e1da49a446e8e\",\n \"_from\": \"lazy-cache@>=1.0.3 <2.0.0\",\n \"_npmVersion\": \"3.6.0\",\n \"_nodeVersion\": \"5.5.0\",\n \"_npmUser\": {\n \"name\": \"jonschlinkert\",\n \"email\": \"github@sellside.com\"\n },\n \"maintainers\": [\n {\n \"name\": \"jonschlinkert\",\n \"email\": \"github@sellside.com\"\n },\n {\n \"name\": \"doowb\",\n \"email\": \"brian.woodward@gmail.com\"\n }\n ],\n \"dist\": {\n \"shasum\": \"a1d78fc3a50474cb80845d3b3b6e1da49a446e8e\",\n \"tarball\": \"https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz\"\n },\n \"_npmOperationalInternal\": {\n \"host\": \"packages-12-west.internal.npmjs.com\",\n \"tmp\": \"tmp/lazy-cache-1.0.4.tgz_1461378859142_0.0996799839194864\"\n },\n \"directories\": {},\n \"_resolved\": \"https://registry.npmjs.org/lazy-cache/-/lazy-cache-1.0.4.tgz\",\n \"readme\": \"ERROR: No README data found!\"\n}\n"} +{"text": "cmake_minimum_required (VERSION 2.8)\n\nset(PROJECT_NAME \"skypeweb\" C)\nset(VERSION_MAJOR \"1\")\nset(VERSION_MINOR \"7\")\nset(VERSION_PATCH \"0\")\n\nproject(${PROJECT_NAME})\n\nset(CMAKE_MODULE_PATH \n ${CMAKE_SOURCE_DIR}/cmake \n ${CMAKE_MODULE_PATH}\n )\n\nfind_package(PkgConfig REQUIRED)\n\npkg_check_modules(GLIB REQUIRED glib-2.0)\npkg_check_modules(JSON-GLIB REQUIRED json-glib-1.0)\npkg_check_modules(PURPLE REQUIRED purple)\n\nadd_definitions(-Wall)\n\ninclude_directories(\n ${PURPLE_INCLUDE_DIRS}\n ${GLIB2_INCLUDE_DIRS}\n ${JSON-GLIB_INCLUDE_DIRS}\n ${CMAKE_CURRENT_BINARY_DIR}\n ${CMAKE_CURRENT_SOURCE_DIR}\n ${CMAKE_CURRENT_SOURCE_DIR}/purple2compat\n )\n\nset(SRC_LIST\n skypeweb_connection.c\n skypeweb_contacts.c\n skypeweb_login.c\n skypeweb_messages.c\n skypeweb_util.c\n libskypeweb.c \n\tpurple2compat/http.c\n\tpurple2compat/purple-socket.c\n )\n\nadd_library(${PROJECT_NAME} SHARED ${SRC_LIST})\n\ntarget_link_libraries(${PROJECT_NAME}\n ${PURPLE_LIBRARIES}\n ${GLIB2_LIBRARIES}\n ${JSON-GLIB_LIBRARIES}\n )\n\nlink_directories(\n ${PURPLE_LIBRARY_DIRS}\n )\n\n\n#install(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR})\nexec_program(\"${PKG_CONFIG_EXECUTABLE} --variable=plugindir purple 2>/dev/null\"\n OUTPUT_VARIABLE LIB_INSTALL_DIR\n RETURN_VALUE PURPLE_PLUGINDIR_RET)\n\nif (NOT PURPLE_PLUGINDIR_RET EQUAL 0)\n\tmessage( FATAL_ERROR \"${PKG_CONFIG_EXECUTABLE} --variable=plugindir purple -- returned a non-null error code\")\nendif()\n\ninstall(TARGETS ${PROJECT_NAME} DESTINATION ${LIB_INSTALL_DIR})\n\nexec_program(\"${PKG_CONFIG_EXECUTABLE} --variable=datadir purple 2>/dev/null\"\n OUTPUT_VARIABLE PURPLE_DATADIR\n RETURN_VALUE PURPLE_DATADIR_RET)\n\nif (NOT PURPLE_DATADIR_RET EQUAL 0)\n\tmessage( FATAL_ERROR \"${PKG_CONFIG_EXECUTABLE} --variable=datadir purple -- returned a non-null error code\")\nendif()\n\ninstall(DIRECTORY \"icons/\"\n DESTINATION \"${PURPLE_DATADIR}/pixmaps/pidgin/protocols/\"\n )\n\ninstall(FILES \"theme\"\n DESTINATION \"${PURPLE_DATADIR}/pixmaps/pidgin/emotes/skype/\"\n )\n\n# package settings\nset(CPACK_PACKAGE_DESCRIPTION_SUMMARY \"Skype protocol plug-in for libpurple\")\nset(CPACK_PACKAGE_VENDOR \"Eion Robb\")\nset(CPACK_PACKAGE_DESCRIPTION \"libskypeweb is a Skype protocol plug-in for libpurple based on the Skype Web client\")\nset(CPACK_PACKAGE_CONTACT \"edhelas@movim.eu\")\nset(CPACK_PACKAGE_VERSION_MAJOR \"${VERSION_MAJOR}\")\nset(CPACK_PACKAGE_VERSION_MINOR \"${VERSION_MINOR}\")\nset(CPACK_PACKAGE_VERSION_PATCH \"${VERSION_PATCH}\")\nset(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) \nset(CPACK_SOURCE_PACKAGE_FILE_NAME \"${CMAKE_PROJECT_NAME}_${VERSION}\")\nset(ACK_PACKAGE_FILE_NAME \"${CMAKE_PROJECT_NAME}_${VERSION}\")\nSET(CPACK_DEBIAN_PACKAGE_DEPENDS \"libpurple0 (>= 2.10.0), libglib2.0-0 (>= 2.24), libjson-glib-1.0-0 (>= 0.8.0)\")\nset(CPACK_DEBIAN_PACKAGE_MAINTAINER \"Jaussoin Timothée\") #required\n\nset(PACK \"DEB\" CACHE STRING \"Generate a Package\")\nset(CPACK_GENERATOR ${PACK})\n\ninclude(CPack)\n"} +{"text": "/**\n * Copyright Soramitsu Co., Ltd. All Rights Reserved.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n#ifndef IROHA_SHARED_MODEL_PROTO_ACCOUNT_RESPONSE_HPP\n#define IROHA_SHARED_MODEL_PROTO_ACCOUNT_RESPONSE_HPP\n\n#include \"backend/protobuf/common_objects/account.hpp\"\n#include \"backend/protobuf/common_objects/trivial_proto.hpp\"\n#include \"interfaces/query_responses/account_response.hpp\"\n#include \"qry_responses.pb.h\"\n\nnamespace shared_model {\n namespace proto {\n class AccountResponse final\n : public CopyableProto<interface::AccountResponse,\n iroha::protocol::QueryResponse,\n AccountResponse> {\n public:\n template <typename QueryResponseType>\n explicit AccountResponse(QueryResponseType &&queryResponse);\n\n AccountResponse(const AccountResponse &o);\n\n AccountResponse(AccountResponse &&o);\n\n const interface::Account &account() const override;\n\n const AccountRolesIdType &roles() const override;\n\n private:\n const iroha::protocol::AccountResponse &account_response_;\n\n const AccountRolesIdType account_roles_;\n\n const shared_model::proto::Account account_;\n };\n } // namespace proto\n} // namespace shared_model\n\n#endif // IROHA_SHARED_MODEL_PROTO_ACCOUNT_RESPONSE_HPP\n"} +{"text": "<map id=\"Source/CPTPlotAreaFrame.h\" name=\"Source/CPTPlotAreaFrame.h\">\n<area shape=\"rect\" id=\"node2\" href=\"$_c_p_t_graph_8m.html\" title=\"Source/CPTGraph.m\" alt=\"\" coords=\"4,86,155,117\"/>\n<area shape=\"rect\" id=\"node3\" href=\"$_c_p_t_plot_8m.html\" title=\"Source/CPTPlot.m\" alt=\"\" coords=\"179,86,316,117\"/>\n<area shape=\"rect\" id=\"node4\" href=\"$_c_p_t_plot_area_frame_8m.html\" title=\"Source/CPTPlotAreaFrame.m\" alt=\"\" coords=\"341,86,547,117\"/>\n<area shape=\"rect\" id=\"node5\" href=\"$_c_p_t_plot_space_annotation_8m.html\" title=\"Source/CPTPlotSpaceAnnotation.m\" alt=\"\" coords=\"572,86,817,117\"/>\n<area shape=\"rect\" id=\"node6\" href=\"$_c_p_t_x_y_plot_space_8m.html\" title=\"Source/CPTXYPlotSpace.m\" alt=\"\" coords=\"842,86,1032,117\"/>\n</map>\n"} +{"text": "/*\n * /MathJax/jax/output/HTML-CSS/fonts/TeX/AMS/Regular/SpacingModLetters.js\n * \n * Copyright (c) 2012 Design Science, Inc.\n *\n * Part of the MathJax library.\n * See http://www.mathjax.org for details.\n * \n * Licensed under the Apache License, Version 2.0;\n * you may not use this file except in compliance with the License.\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n */\n\nMathJax.Hub.Insert(MathJax.OutputJax[\"HTML-CSS\"].FONTDATA.FONTS.MathJax_AMS,{710:[845,-561,2333,-14,2346],732:[899,-628,2333,1,2330]});MathJax.Ajax.loadComplete(MathJax.OutputJax[\"HTML-CSS\"].fontDir+\"/AMS/Regular/SpacingModLetters.js\");\n\n"} +{"text": "---\ntitle: \"Bitcask Capacity Calculator\"\ndescription: \"\"\nproject: \"riak_kv\"\nproject_version: \"2.0.6\"\nmenu:\n riak_kv-2.0.6:\n name: \"Bitcask Capacity Calculator\"\n identifier: \"planning_cluster_bitcask_capacity\"\n weight: 104\n parent: \"planning\"\ntoc: true\naliases:\n - /riak/2.0.6/ops/building/planning/bitcask\n - /riak/kv/2.0.6/ops/building/planning/bitcask\n---\n\n[plan backend bitcask]: /riak/kv/2.0.6/setup/planning/backend/bitcask\n\nThese calculators will assist you in sizing your cluster if you plan to\nuse the default [Bitcask][plan backend bitcask] storage back end.\n\nThis page is designed to give you a rough estimate when sizing your\ncluster. The calculations are a _best guess_, and they tend to be a bit\non the conservative side. It's important to include a bit of head room\nas well as room for unexpected growth so that if demand exceeds\nexpectations you'll be able to add more nodes to the cluster and stay\nahead of your requirements.\n\n<div id=\"node_info\" class=\"calc_info\"></div>\n<div class=\"calculator\">\n <ul>\n <li>\n <label for=\"n_total_keys\">Total Number of Keys:</label>\n <input id=\"n_total_keys\" type=\"text\" size=\"12\" name=\"n_total_keys\" value=\"\" class=\"calc_input\">\n <span class=\"error_span\" id=\"n_total_keys_error\"></span>\n </li>\n <li>\n <label for=\"n_bucket_size\">Average Bucket Size (Bytes):</label>\n <input id=\"n_bucket_size\"type=\"text\" size=\"7\" name=\"n_bucket_size\" value=\"\" class=\"calc_input\">\n <span class=\"error_span\"id=\"n_bucket_size_error\"></span>\n </li>\n <li>\n <label for=\"n_key_size\">Average Key Size (Bytes):</label>\n <input type=\"text\" size=\"2\" name=\"n_key_size\" id=\"n_key_size\" value=\"\" class=\"calc_input\">\n <span class=\"error_span\" id=\"n_key_size_error\"></span>\n </li>\n <li>\n <label for=\"n_record_size\">Average Value Size (Bytes):</label>\n <input id=\"n_record_size\"type=\"text\" size=\"7\" name=\"n_record_size\" value=\"\" class=\"calc_input\">\n <span class=\"error_span\"id=\"n_record_size_error\"></span>\n </li>\n <li>\n <label for=\"n_ram\">RAM Per Node (in GB):</label>\n <input type=\"text\" size=\"4\" name=\"n_ram\" id=\"n_ram\" value=\"\" class=\"calc_input\">\n <span class=\"error_span\" id=\"n_ram_error\"></span>\n </li>\n <li>\n <label for=\"n_nval\"><i>N</i> (Number of Write Copies):</label>\n <input type=\"text\" size=\"2\" name=\"n_nval\" id=\"n_nval\" value=\"\" class=\"calc_input\">\n <span class=\"error_span\" id=\"n_nval_error\"></span>\n </li>\n</ul>\n</div>\n\n## Recommendations\n\n<span id=\"recommend\"></span>\n\n## Details on Bitcask RAM Calculation\n\nWith the above information in mind, the following variables will factor\ninto your RAM calculation:\n\nVariable | Description\n:--------|:-----------\nStatic Bitcask per-key overhead | 44.5 bytes per key\nEstimated average bucket-plus-key length | The combined number of characters your bucket + keynames will require (on average). We'll assume 1 byte per character.\nEstimated total objects | The total number of key/value pairs your cluster will have when started\nReplication Value (`n_val`) | The number of times each key will be replicated when written to Riak (the default is 3)\n\n## The actual equation\n\nApproximate RAM Needed for Bitcask = (static bitcask per key overhead +\nestimated average bucket+key length in bytes) * estimate total number of\nkeys * `n_val`\n\nExample:\n\n* 50,000,000 keys in your cluster to start\n* approximately 30 bytes for each bucket+key name\n* default `n_val` of 3\n\nThe amount of RAM you would need for Bitcask is about **9.78 GBs across\nyour entire cluster.**\n\nAdditionally, Bitcask relies on your operating system's filesystem cache\nto deliver high performance reads. So when sizing your cluster, take\nthis into account and plan on having several more gigabytes of RAM\navailable for your filesystem cache.\n"} +{"text": "<?php\n\n/*\n * This file is part of the Symfony package.\n *\n * (c) Fabien Potencier <fabien@symfony.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\n\nnamespace Symfony\\Component\\HttpFoundation\\Tests\\Session\\Storage\\Proxy;\n\nuse PHPUnit\\Framework\\TestCase;\nuse Symfony\\Component\\HttpFoundation\\Session\\Storage\\Proxy\\NativeProxy;\n\n/**\n * Test class for NativeProxy.\n *\n * @group legacy\n *\n * @author Drak <drak@zikula.org>\n */\nclass NativeProxyTest extends TestCase\n{\n public function testIsWrapper()\n {\n $proxy = new NativeProxy();\n $this->assertFalse($proxy->isWrapper());\n }\n\n public function testGetSaveHandlerName()\n {\n $name = ini_get('session.save_handler');\n $proxy = new NativeProxy();\n $this->assertEquals($name, $proxy->getSaveHandlerName());\n }\n}\n"} +{"text": "/*\n This file is part of the clazy static checker.\n\n Copyright (C) 2015 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com\n Author: Sérgio Martins <sergio.martins@kdab.com>\n\n Copyright (C) 2015 Sergio Martins <smartins@kde.org>\n\n This library is free software; you can redistribute it and/or\n modify it under the terms of the GNU Library General Public\n License as published by the Free Software Foundation; either\n version 2 of the License, or (at your option) any later version.\n\n This library is distributed in the hope that it will be useful,\n but WITHOUT ANY WARRANTY; without even the implied warranty of\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n Library General Public License for more details.\n\n You should have received a copy of the GNU Library General Public License\n along with this library; see the file COPYING.LIB. If not, write to\n the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,\n Boston, MA 02110-1301, USA.\n*/\n\n#ifndef CLANG_LAZY_QGETENV_H\n#define CLANG_LAZY_QGETENV_H\n\n#include \"checkbase.h\"\n\n#include <string>\n\nclass ClazyContext;\n\nnamespace clang {\nclass Stmt;\n}\n\n/**\n * Finds inneficient usages of qgetenv\n *\n * See README-qgetenv for more information\n */\nclass QGetEnv\n : public CheckBase\n{\npublic:\n explicit QGetEnv(const std::string &name, ClazyContext *context);\n void VisitStmt(clang::Stmt *stmt) override;\n};\n\n#endif\n"} +{"text": "# language: ru\n\n@IgnoreOnCIMainBuild\n@SpecialTag\n\nФункционал: Загрузить фичу в vanessa-add\n\tКак Разработчик\n\tЯ Хочу чтобы чтобы у меня была возможность загрузить произвольную тестовую фичу в vanessa-add\n\nСценарий: Загрузка тестовой фичи проверка работы до брейкпоинта первый\n\tКогда Я увеличил значение \"Слу��ебныйПараметр\" в КонтекстСохраняемый на 1\n\nСценарий: Загрузка тестовой фичи проверка работы до брейкпоинта второй\n\n\tКогда Я увеличил значение \"СлужебныйПараметр\" в КонтекстСохраняемый на 1\n\tИ Я увеличил значение \"СлужебныйПараметр\" в КонтекстСохраняемый на 1\n\tИ Я увеличил значение \"СлужебныйПараметр\" в КонтекстСохраняемый на 1\n\tИ Я увеличил значение \"СлужебныйПараметр\" в КонтекстСохраняемый на 1\n\tИ Я увеличил значение \"СлужебныйПараметр\" в КонтекстСохраняемый на 1\n"} +{"text": "/*\n * Copyright 2012\n * Ubiquitous Knowledge Processing (UKP) Lab and FG Language Technology\n * Technische Universität Darmstadt\n * \n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n * \n * http://www.apache.org/licenses/LICENSE-2.0\n * \n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n/**\n * Provides Login skeleton\n */\npackage de.tudarmstadt.ukp.clarin.webanno.ui.core.login;\n"} +{"text": "# LeetCode 第 104 号问题:二叉树的最大深度 \n\n> 本文首发于公众号「图解面试算法」,是 [图解 LeetCode ](<https://github.com/MisterBooo/LeetCodeAnimation>) 系列文章之一。\n>\n> 同步博客:https://www.algomooc.com\n\n今天分享的题目来源于 LeetCode 上第 104 号问题:二叉树的最大深度。题目难度为 Easy 。\n\n### 题目描述\n\n给定一个二叉树,找出其最大深度。\n\n二叉树的深度为根节点到最远叶子节点的最长路径上的节点数。\n\n**说明:** 叶子节点是指没有子节点的节点。\n\n**示例 :**\n\n给定二叉树 `[3,9,20,null,null,15,7]`,\n\n```\n 3\n / \\\n 9 20\n / \\\n 15 7\n```\n\n返回它的最大深度 3 。\n\n### 题目解析 - DFS\n\n最直接的办法就是使用DFS ( 深度优先搜索 ) 策略计算树的高度. 具体算法流程如下:\n\n- **终止条件:**当前节点为空\n- **返回值:**\n - 节点为空时,所以返回 0\n - 节点不为空时, 返回左右子树高度的最大值 + 1\n\n### 动画描述\n\n![](../Animation/Animation1.gif)\n\n### 代码实现\n\n```javascript\n/**\n * JavaScript 描述\n * DFS\n */\nvar maxDepth = function(root) {\n if (root == null) {\n return 0;\n }\n let leftHeight = maxDepth(root.left);\n let rightHeight = maxDepth(root.right);\n return Math.max(leftHeight, rightHeight) + 1;\n};\n```\n\n**精简版**\n\n```javascript\nvar maxDepth = function(root) {\n return !root ? 0 : Math.max(maxDepth(root.left) + 1, maxDepth(root.right) + 1) ;\n};\n```\n\n### 复杂度分析\n\n- 时间复杂度:**O(n)**, 我们每个结点只访问一次,因此时间复杂度为 O(N)\n- 空间复杂度:\n - 最坏情况下,树是完全不平衡的,例如每个结点只剩下左子结点,递归将会被调用 N 次(树的高度),因此保持调用栈的存储将是 O(N)。\n - 最好情况下(树是完全平衡的),树的高度将是 log(N)。因此,在这种情况下的空间复杂度将是 O(log(N))\n\n\n\n### 题目解析 - BFS\n\n求二叉树的深度也就是求二叉树有几层了, 采用 BFS ( 广度优先搜索 ) 策略对二叉树按层遍历.\n\n实现 BFS 就要用到 '先进先出' 的队列了, 具体算法流程如下:\n\n- 遍历二叉树节点,依次将当前节点 和它的左右子节点入队\n- 依次出队, 出队子节点重复上一步操作\n\n### 动画描述\n\n![](../Animation/Animation2.gif)\n\n### 代码实现\n\n```javascript\n/**\n * JavaScript 描述\n * BFS\n */\nvar maxDepth = function(root) {\n let level = 0;\n if (root == null) {\n return level;\n }\n let queue = [root];\n while (queue.length) {\n let len = queue.length;\n while (len--) {\n let curNode = queue.pop();\n curNode.left && queue.unshift(curNode.left);\n curNode.right && queue.unshift(curNode.right);\n }\n level++;\n }\n return level;\n};\n```\n\n### 复杂度分析\n\n- 时间复杂度:**O(n)**\n- 空间复杂度:**O(N)** \n\n![](../../Pictures/qrcode.jpg)"} +{"text": "[package]\nname = \"solana-budget-program\"\nversion = \"1.4.0\"\ndescription = \"Solana Budget program\"\nauthors = [\"Solana Maintainers <maintainers@solana.foundation>\"]\nrepository = \"https://github.com/solana-labs/solana\"\nlicense = \"Apache-2.0\"\nhomepage = \"https://solana.com/\"\nedition = \"2018\"\n\n[dependencies]\nbincode = \"1.3.1\"\nchrono = { version = \"0.4.11\", features = [\"serde\"] }\nlog = \"0.4.8\"\nnum-derive = \"0.3\"\nnum-traits = \"0.2\"\nserde = \"1.0.112\"\nserde_derive = \"1.0.103\"\nsolana-sdk = { path = \"../../sdk\", version = \"1.4.0\" }\nthiserror = \"1.0\"\n\n[dev-dependencies]\nsolana-runtime = { path = \"../../runtime\", version = \"1.4.0\" }\n\n[lib]\ncrate-type = [\"lib\", \"cdylib\"]\nname = \"solana_budget_program\"\n\n[package.metadata.docs.rs]\ntargets = [\"x86_64-unknown-linux-gnu\"]\n"} +{"text": "//-----------------------------------------------------------------------------\r\n// Copyright (c) 2013 GarageGames, LLC\r\n//\r\n// Permission is hereby granted, free of charge, to any person obtaining a copy\r\n// of this software and associated documentation files (the \"Software\"), to\r\n// deal in the Software without restriction, including without limitation the\r\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\r\n// sell copies of the Software, and to permit persons to whom the Software is\r\n// furnished to do so, subject to the following conditions:\r\n//\r\n// The above copyright notice and this permission notice shall be included in\r\n// all copies or substantial portions of the Software.\r\n//\r\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\r\n// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\r\n// IN THE SOFTWARE.\r\n//-----------------------------------------------------------------------------\r\n\r\n#ifndef _PACKAGE_H\r\n#define _PACKAGE_H\r\n\r\n\r\n#ifdef PUAP_NAMESPACE_CHANGE\r\n\r\n#ifndef _STRINGTABLE_H_\r\n#include \"string/stringTable.h\"\r\n#endif\r\n#ifndef _TVECTOR_H_\r\n#include \"core/tVector.h\"\r\n#endif\r\n#ifndef _CONSOLETYPES_H_\r\n#include \"console/consoleTypes.h\"\r\n#endif\r\n\r\n#include \"tHashTable.h\"\r\n#include \"Namespace.h\"\r\n\r\n\r\nclass ExprEvalState;\r\nstruct FunctionDecl;\r\nclass CodeBlock;\r\nclass AbstractClassRep;\r\n\r\n\r\nclass Package\r\n{\r\n enum {\r\n MaxActivePackages = 512,\r\n };\r\n\r\npublic:\r\n StringTableEntry mName;\r\n\r\n Package *mParent;\r\n AbstractClassRep *mClassRep;\r\n U32 mRefCountToParent;\r\n const char* mUsage;\r\n // Script defined usage strings need to be cleaned up. This\r\n // field indicates whether or not the usage was set from script.\r\n bool mCleanUpUsage;\r\n\tint mActivePosition;\r\n\r\n\r\n Package();\r\n ~Package();\r\n\t\r\n\ttypedef tHashTable<StringTableEntry, Namespace*>::Iterator nameSpaceIterator;\r\n\ttypedef tHashTable<StringTableEntry, Package*>::Iterator packageIterator;\r\n\ttHashTable<StringTableEntry, Namespace*> *mChildNamespaceList;\r\n\ttHashTable<StringTableEntry, Package*> *mChildPackageList;\r\n\r\n\tNamespace *mDefaultNamespace;\r\n\r\n\t//-Mat, maybe put these into ExprEvalState\r\n\tstatic Package *smRootPackage;\r\n\tstatic Package *smMainPackage;\r\n\r\n\tstatic void init();\r\n\tstatic void shutdown();\r\n\r\n\tstatic Package *getRootPackage() { return smRootPackage; }\r\n\tstatic Package *getMainNamespacePackage() { return smMainPackage; }\r\n\t//this namespace be be the child of smMainPackage\r\n\tstatic Namespace *getMainNamespace() { return smMainPackage->getDefaultNamespace(); }\r\n\r\n\t//this will find the most recently activated package\r\n\tstatic Package *getCurrentPackage();\r\n\r\n\tstatic Package *findPackage(StringTableEntry);\r\n\tstatic Package *findAndCreatePackage(StringTableEntry name);\r\n\r\n static void activatePackage(StringTableEntry name);\r\n static void deactivatePackage(StringTableEntry name);\r\n static void dumpNamespaces( bool dumpScript = true, bool dumpEngine = true );\r\n static void unlinkPackages();\r\n static void relinkPackages();\r\n\r\n\t//Namespace::Entry *lookupEntryInActivePackages( StringTableEntry, StringTableEntry );\r\n\tstatic Namespace *lookupNamespaceInActivePackages( StringTableEntry);\r\n\t\r\n\tNamespace *getDefaultNamespace() { return mDefaultNamespace; }\r\n\t//-Mat functions to help with new Namespace organization\t\r\n\tNamespace *findNamespace(StringTableEntry name);\r\n\tNamespace *findAndCreateNamespace(StringTableEntry name);\r\n\r\n\tNamespace *addAndCreateNamespace( StringTableEntry );\r\n\tNamespace *addNamespace( Namespace* );\r\n\tNamespace *swapNamespace( Namespace* );\r\n\t\r\n\tPackage *addPackage(Package*);\r\n\r\n\tvoid activate(int activePosition) { mActivePosition = activePosition; }\r\n\tvoid deActivate() { mActivePosition = -1; }\r\n\tbool isActive() { return mActivePosition != -1; }\r\n\r\nprivate:\r\n\t//private so that we can make sure no Namespace has a NULL parent because of this\r\n\t//use SwapNamespace to \"remove\" a namespace (it will get moved to the MainPackage)\r\n\tNamespace *removeNamespace( Namespace* );\r\n};\r\n\r\n\r\n#else\r\n//normal TGB\r\n\r\n\r\n#endif //PUAP_NAMESPACE_CHANGE\r\n\r\n\r\n#endif// _PACKAGE_H\r\n"} +{"text": "/** Describes the bare minimum information we need about a list field */\nexport default interface IListField {\n\tInternalName: string;\n\tTitle:string;\n\tType:string;\n\tId:string;\n}"} +{"text": "package com.twitter.rowz\n\nimport net.lag.configgy.Config\nimport com.twitter.gizzard.scheduler.{PrioritizingJobScheduler, Priority}\nimport jobs.{Create, Destroy}\nimport com.twitter.xrayspecs.Time\nimport com.twitter.xrayspecs.TimeConversions._\nimport thrift.conversions.Row._\n\n\nclass RowzService(forwardingManager: ForwardingManager, scheduler: PrioritizingJobScheduler, makeId: () => Long) extends thrift.Rowz.Iface {\n def create(name: String, at: Int) = {\n val id = makeId()\n scheduler(Priority.High.id)(new Create(id, name, Time(at.seconds)))\n id\n }\n\n def destroy(row: thrift.Row, at: Int) {\n scheduler(Priority.Low.id)(new Destroy(row.fromThrift, Time(at.seconds)))\n }\n\n def read(id: Long) = {\n forwardingManager(id).read(id).get.toThrift\n }\n}"} +{"text": "// Copyright 2001-2019 Crytek GmbH / Crytek Group. All rights reserved.\n\n#pragma once\n\n#include <CryThreading/IThreadManager.h>\n#include <CryThreading/CryThread.h>\n\nnamespace CryAudio\n{\nclass CMainThread final : public ::IThread\n{\npublic:\n\n\tCMainThread() = default;\n\tCMainThread(CMainThread const&) = delete;\n\tCMainThread(CMainThread&&) = delete;\n\tCMainThread& operator=(CMainThread const&) = delete;\n\tCMainThread& operator=(CMainThread&&) = delete;\n\n\t// IThread\n\tvirtual void ThreadEntry() override;\n\t// ~IThread\n\n\t// Signals the thread that it should not accept anymore work and exit\n\tvoid SignalStopWork();\n\n\tbool IsActive();\n\tvoid Activate();\n\tvoid Deactivate();\n\nprivate:\n\n\tvolatile bool m_doWork = true;\n};\n} // namespace CryAudio\n"} +{"text": "// Copyright 2018 the V8 project authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n\n#ifndef V8_TORQUE_CONTEXTUAL_H_\n#define V8_TORQUE_CONTEXTUAL_H_\n\n#include <type_traits>\n\n#include \"src/base/macros.h\"\n#include \"src/base/platform/platform.h\"\n\nnamespace v8 {\nnamespace internal {\nnamespace torque {\n\ntemplate <class Variable>\nV8_EXPORT_PRIVATE typename Variable::Scope*& ContextualVariableTop();\n\n// {ContextualVariable} provides a clean alternative to a global variable.\n// The contextual variable is mutable, and supports managing the value of\n// a variable in a well-nested fashion via the {Scope} class.\n// {ContextualVariable} only stores a pointer to the current value, which\n// is stored in a {Scope} object. The most recent value can be retrieved\n// via Get(). Because only {Scope} has actual storage, there must be at\n// least one active {Scope} (i.e. in a surrounding C++ scope), whenever Get()\n// is called.\n// Note that contextual variables must only be used from the same thread,\n// i.e. {Scope} and Get() have to be in the same thread.\ntemplate <class Derived, class VarType>\nclass ContextualVariable {\n public:\n // A {Scope} contains a new object of type {VarType} and gives\n // ContextualVariable::Get() access to it. Upon destruction, the contextual\n // variable is restored to the state before the {Scope} was created. Scopes\n // have to follow a stack discipline: A {Scope} has to be destructed before\n // any older scope is destructed.\n class Scope {\n public:\n template <class... Args>\n explicit Scope(Args&&... args)\n : value_(std::forward<Args>(args)...), previous_(Top()) {\n Top() = this;\n }\n ~Scope() {\n // Ensure stack discipline.\n DCHECK_EQ(this, Top());\n Top() = previous_;\n }\n\n VarType& Value() { return value_; }\n\n private:\n VarType value_;\n Scope* previous_;\n\n static_assert(std::is_base_of<ContextualVariable, Derived>::value,\n \"Curiously Recurring Template Pattern\");\n\n DISALLOW_NEW_AND_DELETE()\n DISALLOW_COPY_AND_ASSIGN(Scope);\n };\n\n // Access the most recent active {Scope}. There has to be an active {Scope}\n // for this contextual variable.\n static VarType& Get() {\n DCHECK_NOT_NULL(Top());\n return Top()->Value();\n }\n\n private:\n template <class T>\n friend typename T::Scope*& ContextualVariableTop();\n static Scope*& Top() { return ContextualVariableTop<Derived>(); }\n\n static bool HasScope() { return Top() != nullptr; }\n friend class MessageBuilder;\n};\n\n// Usage: DECLARE_CONTEXTUAL_VARIABLE(VarName, VarType)\n#define DECLARE_CONTEXTUAL_VARIABLE(VarName, ...) \\\n struct VarName \\\n : v8::internal::torque::ContextualVariable<VarName, __VA_ARGS__> {}\n\n#define DEFINE_CONTEXTUAL_VARIABLE(VarName) \\\n template <> \\\n V8_EXPORT_PRIVATE VarName::Scope*& ContextualVariableTop<VarName>() { \\\n static thread_local VarName::Scope* top = nullptr; \\\n return top; \\\n }\n\n// By inheriting from {ContextualClass} a class can become a contextual variable\n// of itself, which is very similar to a singleton.\ntemplate <class T>\nusing ContextualClass = ContextualVariable<T, T>;\n\n} // namespace torque\n} // namespace internal\n} // namespace v8\n\n#endif // V8_TORQUE_CONTEXTUAL_H_\n"} +{"text": "{\n \"name\": \"cordova-plugin-file\",\n \"version\": \"4.3.3\",\n \"description\": \"Cordova File Plugin\",\n \"types\": \"./types/index.d.ts\",\n \"cordova\": {\n \"id\": \"cordova-plugin-file\",\n \"platforms\": [\n \"android\",\n \"amazon-fireos\",\n \"ubuntu\",\n \"ios\",\n \"osx\",\n \"wp7\",\n \"wp8\",\n \"blackberry10\",\n \"windows8\",\n \"windows\",\n \"firefoxos\"\n ]\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/apache/cordova-plugin-file\"\n },\n \"keywords\": [\n \"cordova\",\n \"file\",\n \"ecosystem:cordova\",\n \"cordova-android\",\n \"cordova-amazon-fireos\",\n \"cordova-ubuntu\",\n \"cordova-ios\",\n \"cordova-osx\",\n \"cordova-wp7\",\n \"cordova-wp8\",\n \"cordova-blackberry10\",\n \"cordova-windows8\",\n \"cordova-windows\",\n \"cordova-firefoxos\"\n ],\n \"scripts\": {\n \"test\": \"npm run jshint\",\n \"jshint\": \"node node_modules/jshint/bin/jshint www && node node_modules/jshint/bin/jshint src && node node_modules/jshint/bin/jshint tests\"\n },\n \"author\": \"Apache Software Foundation\",\n \"license\": \"Apache-2.0\",\n \"engines\": {\n \"cordovaDependencies\": {\n \"5.0.0\": {\n \"cordova\": \">100\"\n }\n }\n },\n \"devDependencies\": {\n \"jshint\": \"^2.6.0\"\n }\n}\n"} +{"text": "var identity = require('../utility/identity'),\n metaMap = require('./metaMap');\n\n/**\n * The base implementation of `setData` without support for hot loop detection.\n *\n * @private\n * @param {Function} func The function to associate metadata with.\n * @param {*} data The metadata.\n * @returns {Function} Returns `func`.\n */\nvar baseSetData = !metaMap ? identity : function(func, data) {\n metaMap.set(func, data);\n return func;\n};\n\nmodule.exports = baseSetData;\n"} +{"text": "package se.alexanderblom.delicious.util;\n\nimport android.text.Editable;\nimport android.text.TextWatcher;\n\npublic class AbstractTextWatcher implements TextWatcher {\n\t@Override\n\tpublic void afterTextChanged(Editable s) {}\n\n\t@Override\n\tpublic void beforeTextChanged(CharSequence s, int start, int count, int after) {}\n\n\t@Override\n\tpublic void onTextChanged(CharSequence s, int start, int before, int count) {}\n}\n"} +{"text": "// This file is part of CaesarIA.\n//\n// CaesarIA is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// CaesarIA is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with CaesarIA. If not, see <http://www.gnu.org/licenses/>.\n//\n// Copyright 2012-2013 Dalerank, dalerankn8@gmail.com\n\n#include \"locust.hpp\"\n#include \"core/variant_map.hpp\"\n#include \"core/gettext.hpp\"\n#include \"gfx/tilemap.hpp\"\n#include \"constants.hpp\"\n#include \"city/city.hpp\"\n#include \"game/gamedate.hpp\"\n#include \"objects/farm.hpp\"\n\nusing namespace gfx;\n\nclass Locust::Impl\n{\npublic:\n int counter;\n int time;\n bool loop;\n Picture picture;\n};\n\nLocust::Locust(PlayerCityPtr city, TilePos pos, int time)\n : Walker( city, walker::locust ), _d( new Impl )\n{\n _d->time = time;\n setPos( pos );\n\n setName( _(\"##locust##\") );\n _setHealth( 0 );\n\n setFlag( vividly, false );\n}\n\nLocust::~Locust() {}\n\nvoid Locust::timeStep(const unsigned long time)\n{\n _d->counter++;\n\n if( game::Date::isWeekChanged() )\n {\n auto farm = _map().overlay<Farm>( pos() );\n if( object::typeOrDefault( farm ) != object::meat_farm )\n {\n farm->updateProgress( -50 );\n }\n }\n\n if( _d->counter > _d->time )\n {\n deleteLater();\n }\n}\n\nvoid Locust::save( VariantMap& stream ) const\n{\n Walker::save( stream );\n\n VARIANT_SAVE_ANY_D( stream, _d, time )\n VARIANT_SAVE_ANY_D( stream, _d, counter )\n}\n\nvoid Locust::load( const VariantMap& stream )\n{\n Walker::load( stream );\n\n VARIANT_LOAD_ANY_D( _d, time, stream )\n VARIANT_LOAD_ANY_D( _d, counter, stream )\n}\n\nconst Picture& Locust::getMainPicture()\n{\n return _d->picture;\n}\n"} +{"text": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<!-- NewPage -->\n<html lang=\"en\">\n<head>\n<!-- Generated by javadoc (1.8.0_51) on Thu Apr 14 18:37:22 SGT 2016 -->\n<title>MultiList (Javadocs: controlP5)</title>\n<meta name=\"date\" content=\"2016-04-14\">\n<link rel=\"stylesheet\" type=\"text/css\" href=\"../stylesheet.css\" title=\"Style\">\n<script type=\"text/javascript\" src=\"../script.js\"></script>\n</head>\n<body>\n<script type=\"text/javascript\"><!--\n try {\n if (location.href.indexOf('is-external=true') == -1) {\n parent.document.title=\"MultiList (Javadocs: controlP5)\";\n }\n }\n catch(err) {\n }\n//-->\nvar methods = {\"i0\":10,\"i1\":10,\"i2\":10,\"i3\":10,\"i4\":10,\"i5\":10,\"i6\":10,\"i7\":10,\"i8\":10,\"i9\":10,\"i10\":10,\"i11\":10,\"i12\":10,\"i13\":10,\"i14\":10,\"i15\":10};\nvar tabs = {65535:[\"t0\",\"All Methods\"],2:[\"t2\",\"Instance Methods\"],8:[\"t4\",\"Concrete Methods\"]};\nvar altColor = \"altColor\";\nvar rowColor = \"rowColor\";\nvar tableTab = \"tableTab\";\nvar activeTableTab = \"activeTableTab\";\n</script>\n<noscript>\n<div>JavaScript is disabled on your browser.</div>\n</noscript>\n<!-- ========= START OF TOP NAVBAR ======= -->\n<div class=\"topNav\"><a name=\"navbar.top\">\n<!-- -->\n</a>\n<div class=\"skipNav\"><a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a></div>\n<a name=\"navbar.top.firstrow\">\n<!-- -->\n</a>\n<ul class=\"navList\" title=\"Navigation\">\n<li><a href=\"../controlP5/package-summary.html\">Package</a></li>\n<li class=\"navBarCell1Rev\">Class</li>\n<li><a href=\"package-tree.html\">Tree</a></li>\n<li><a href=\"../index-all.html\">Index</a></li>\n<li><a href=\"../help-doc.html\">Help</a></li>\n</ul>\n</div>\n<div class=\"subNav\">\n<ul class=\"navList\">\n<li><a href=\"../controlP5/Matrix.html\" title=\"class in controlP5\"><span class=\"typeNameLink\">Prev&nbsp;Class</span></a></li>\n<li><a href=\"../controlP5/MultiListButton.html\" title=\"class in controlP5\"><span class=\"typeNameLink\">Next&nbsp;Class</span></a></li>\n</ul>\n<ul class=\"navList\">\n<li><a href=\"../index.html?controlP5/MultiList.html\" target=\"_top\">Frames</a></li>\n<li><a href=\"MultiList.html\" target=\"_top\">No&nbsp;Frames</a></li>\n</ul>\n<ul class=\"navList\" id=\"allclasses_navbar_top\">\n<li><a href=\"../allclasses-noframe.html\">All&nbsp;Classes</a></li>\n</ul>\n<div>\n<script type=\"text/javascript\"><!--\n allClassesLink = document.getElementById(\"allclasses_navbar_top\");\n if(window==top) {\n allClassesLink.style.display = \"block\";\n }\n else {\n allClassesLink.style.display = \"none\";\n }\n //-->\n</script>\n</div>\n<div>\n<ul class=\"subNavList\">\n<li>Summary:&nbsp;</li>\n<li>Nested&nbsp;|&nbsp;</li>\n<li><a href=\"#field.summary\">Field</a>&nbsp;|&nbsp;</li>\n<li><a href=\"#constructor.summary\">Constr</a>&nbsp;|&nbsp;</li>\n<li><a href=\"#method.summary\">Method</a></li>\n</ul>\n<ul class=\"subNavList\">\n<li>Detail:&nbsp;</li>\n<li><a href=\"#field.detail\">Field</a>&nbsp;|&nbsp;</li>\n<li><a href=\"#constructor.detail\">Constr</a>&nbsp;|&nbsp;</li>\n<li><a href=\"#method.detail\">Method</a></li>\n</ul>\n</div>\n<a name=\"skip.navbar.top\">\n<!-- -->\n</a></div>\n<!-- ========= END OF TOP NAVBAR ========= -->\n<!-- ======== START OF CLASS DATA ======== -->\n<div class=\"header\">\n<div class=\"subTitle\">controlP5</div>\n<h2 title=\"Class MultiList\" class=\"title\">Class MultiList</h2>\n</div>\n<div class=\"contentContainer\">\n<ul class=\"inheritance\">\n<li>java.lang.Object</li>\n<li>\n<ul class=\"inheritance\">\n<li><a href=\"../controlP5/Controller.html\" title=\"class in controlP5\">controlP5.Controller</a>&lt;<a href=\"../controlP5/MultiList.html\" title=\"class in controlP5\">MultiList</a>&gt;</li>\n<li>\n<ul class=\"inheritance\">\n<li>controlP5.MultiList</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n<div class=\"description\">\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<dl>\n<dt>All Implemented Interfaces:</dt>\n<dd><a href=\"../controlP5/CDrawable.html\" title=\"interface in controlP5\">CDrawable</a>, <a href=\"../controlP5/ControllerInterface.html\" title=\"interface in controlP5\">ControllerInterface</a>&lt;<a href=\"../controlP5/MultiList.html\" title=\"class in controlP5\">MultiList</a>&gt;, <a href=\"../controlP5/ControlListener.html\" title=\"interface in controlP5\">ControlListener</a>, <a href=\"../controlP5/ControlP5Constants.html\" title=\"interface in controlP5\">ControlP5Constants</a></dd>\n</dl>\n<hr>\n<br>\n<pre>public class <span class=\"typeNameLabel\">MultiList</span>\nextends <a href=\"../controlP5/Controller.html\" title=\"class in controlP5\">Controller</a>&lt;<a href=\"../controlP5/MultiList.html\" title=\"class in controlP5\">MultiList</a>&gt;\nimplements <a href=\"../controlP5/ControlListener.html\" title=\"interface in controlP5\">ControlListener</a></pre>\n<div class=\"block\">A Multilist is a multi-menu-tree controller. see the example for more information and how to use.</div>\n</li>\n</ul>\n</div>\n<div class=\"summary\">\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<!-- =========== FIELD SUMMARY =========== -->\n<ul class=\"blockList\">\n<li class=\"blockList\"><a name=\"field.summary\">\n<!-- -->\n</a>\n<h3>Field Summary</h3>\n<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Field Summary table, listing fields, and an explanation\">\n<caption><span>Fields</span><span class=\"tabEnd\">&nbsp;</span></caption>\n<tr>\n<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n<th class=\"colLast\" scope=\"col\">Field and Description</th>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>int</code></td>\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../controlP5/MultiList.html#closeDelay\">closeDelay</a></span></code>&nbsp;</td>\n</tr>\n</table>\n<ul class=\"blockList\">\n<li class=\"blockList\"><a name=\"fields.inherited.from.class.controlP5.Controller\">\n<!-- -->\n</a>\n<h3>Fields inherited from class&nbsp;controlP5.<a href=\"../controlP5/Controller.html\" title=\"class in controlP5\">Controller</a></h3>\n<code><a href=\"../controlP5/Controller.html#autoHeight\">autoHeight</a>, <a href=\"../controlP5/Controller.html#autoSpacing\">autoSpacing</a>, <a href=\"../controlP5/Controller.html#autoWidth\">autoWidth</a></code></li>\n</ul>\n<ul class=\"blockList\">\n<li class=\"blockList\"><a name=\"fields.inherited.from.class.controlP5.ControlP5Constants\">\n<!-- -->\n</a>\n<h3>Fields inherited from interface&nbsp;controlP5.<a href=\"../controlP5/ControlP5Constants.html\" title=\"interface in controlP5\">ControlP5Constants</a></h3>\n<code><a href=\"../controlP5/ControlP5Constants.html#acceptClassList\">acceptClassList</a>, <a href=\"../controlP5/ControlP5Constants.html#ACTION_BROADCAST\">ACTION_BROADCAST</a>, <a href=\"../controlP5/ControlP5Constants.html#ACTION_CLICK\">ACTION_CLICK</a>, <a href=\"../controlP5/ControlP5Constants.html#ACTION_DOUBLE_PRESS\">ACTION_DOUBLE_PRESS</a>, <a href=\"../controlP5/ControlP5Constants.html#ACTION_DRAG\">ACTION_DRAG</a>, <a href=\"../controlP5/ControlP5Constants.html#ACTION_END_DRAG\">ACTION_END_DRAG</a>, <a href=\"../controlP5/ControlP5Constants.html#ACTION_ENTER\">ACTION_ENTER</a>, <a href=\"../controlP5/ControlP5Constants.html#ACTION_EXIT\">ACTION_EXIT</a>, <a href=\"../controlP5/ControlP5Constants.html#ACTION_LEAVE\">ACTION_LEAVE</a>, <a href=\"../controlP5/ControlP5Constants.html#ACTION_MOVE\">ACTION_MOVE</a>, <a href=\"../controlP5/ControlP5Constants.html#ACTION_PRESS\">ACTION_PRESS</a>, <a href=\"../controlP5/ControlP5Constants.html#ACTION_PRESSED\">ACTION_PRESSED</a>, <a href=\"../controlP5/ControlP5Constants.html#ACTION_RELEASE\">ACTION_RELEASE</a>, <a href=\"../controlP5/ControlP5Constants.html#ACTION_RELEASE_OUTSIDE\">ACTION_RELEASE_OUTSIDE</a>, <a href=\"../controlP5/ControlP5Constants.html#ACTION_RELEASED\">ACTION_RELEASED</a>, <a href=\"../controlP5/ControlP5Constants.html#ACTION_RELEASEDOUTSIDE\">ACTION_RELEASEDOUTSIDE</a>, <a href=\"../controlP5/ControlP5Constants.html#ACTION_START_DRAG\">ACTION_START_DRAG</a>, <a href=\"../controlP5/ControlP5Constants.html#ACTION_WHEEL\">ACTION_WHEEL</a>, <a href=\"../controlP5/ControlP5Constants.html#ACTIVE\">ACTIVE</a>, <a href=\"../controlP5/ControlP5Constants.html#ALL\">ALL</a>, <a href=\"../controlP5/ControlP5Constants.html#ALT\">ALT</a>, <a href=\"../controlP5/ControlP5Constants.html#AQUA\">AQUA</a>, <a href=\"../controlP5/ControlP5Constants.html#ARC\">ARC</a>, <a href=\"../controlP5/ControlP5Constants.html#ARRAY\">ARRAY</a>, <a href=\"../controlP5/ControlP5Constants.html#BACKSPACE\">BACKSPACE</a>, <a href=\"../controlP5/ControlP5Constants.html#BASELINE\">BASELINE</a>, <a href=\"../controlP5/ControlP5Constants.html#BITFONT\">BITFONT</a>, <a href=\"../controlP5/ControlP5Constants.html#BLACK\">BLACK</a>, <a href=\"../controlP5/ControlP5Constants.html#BLUE\">BLUE</a>, <a href=\"../controlP5/ControlP5Constants.html#BOOLEAN\">BOOLEAN</a>, <a href=\"../controlP5/ControlP5Constants.html#BOTTOM\">BOTTOM</a>, <a href=\"../controlP5/ControlP5Constants.html#BOTTOM_OUTSIDE\">BOTTOM_OUTSIDE</a>, <a href=\"../controlP5/ControlP5Constants.html#CAPTIONLABEL\">CAPTIONLABEL</a>, <a href=\"../controlP5/ControlP5Constants.html#CENTER\">CENTER</a>, <a href=\"../controlP5/ControlP5Constants.html#CHECKBOX\">CHECKBOX</a>, <a href=\"../controlP5/ControlP5Constants.html#COMMANDKEY\">COMMANDKEY</a>, <a href=\"../controlP5/ControlP5Constants.html#CONTROL\">CONTROL</a>, <a href=\"../controlP5/ControlP5Constants.html#controlEventClass\">controlEventClass</a>, <a href=\"../controlP5/ControlP5Constants.html#CUSTOM\">CUSTOM</a>, <a href=\"../controlP5/ControlP5Constants.html#DECREASE\">DECREASE</a>, <a href=\"../controlP5/ControlP5Constants.html#DEFAULT\">DEFAULT</a>, <a href=\"../controlP5/ControlP5Constants.html#DELETE\">DELETE</a>, <a href=\"../controlP5/ControlP5Constants.html#delimiter\">delimiter</a>, <a href=\"../controlP5/ControlP5Constants.html#DONE\">DONE</a>, <a href=\"../controlP5/ControlP5Constants.html#DOWN\">DOWN</a>, <a href=\"../controlP5/ControlP5Constants.html#DROPDOWN\">DROPDOWN</a>, <a href=\"../controlP5/ControlP5Constants.html#ELLIPSE\">ELLIPSE</a>, <a href=\"../controlP5/ControlP5Constants.html#ENTER\">ENTER</a>, <a href=\"../controlP5/ControlP5Constants.html#ESCAPE\">ESCAPE</a>, <a href=\"../controlP5/ControlP5Constants.html#EVENT\">EVENT</a>, <a href=\"../controlP5/ControlP5Constants.html#eventMethod\">eventMethod</a>, <a href=\"../controlP5/ControlP5Constants.html#FADEIN\">FADEIN</a>, <a href=\"../controlP5/ControlP5Constants.html#FADEOUT\">FADEOUT</a>, <a href=\"../controlP5/ControlP5Constants.html#FIELD\">FIELD</a>, <a href=\"../controlP5/ControlP5Constants.html#FLOAT\">FLOAT</a>, <a href=\"../controlP5/ControlP5Constants.html#FUCHSIA\">FUCHSIA</a>, <a href=\"../controlP5/ControlP5Constants.html#GRAY\">GRAY</a>, <a href=\"../controlP5/ControlP5Constants.html#GREEN\">GREEN</a>, <a href=\"../controlP5/ControlP5Constants.html#grixel\">grixel</a>, <a href=\"../controlP5/ControlP5Constants.html#HALF_PI\">HALF_PI</a>, <a href=\"../controlP5/ControlP5Constants.html#HIDE\">HIDE</a>, <a href=\"../controlP5/ControlP5Constants.html#HIGHLIGHT\">HIGHLIGHT</a>, <a href=\"../controlP5/ControlP5Constants.html#HORIZONTAL\">HORIZONTAL</a>, <a href=\"../controlP5/ControlP5Constants.html#IDLE\">IDLE</a>, <a href=\"../controlP5/ControlP5Constants.html#IMAGE\">IMAGE</a>, <a href=\"../controlP5/ControlP5Constants.html#INACTIVE\">INACTIVE</a>, <a href=\"../controlP5/ControlP5Constants.html#INCREASE\">INCREASE</a>, <a href=\"../controlP5/ControlP5Constants.html#INTEGER\">INTEGER</a>, <a href=\"../controlP5/ControlP5Constants.html#INVALID\">INVALID</a>, <a href=\"../controlP5/ControlP5Constants.html#J2D\">J2D</a>, <a href=\"../controlP5/ControlP5Constants.html#JSON\">JSON</a>, <a href=\"../controlP5/ControlP5Constants.html#KEYCONTROL\">KEYCONTROL</a>, <a href=\"../controlP5/ControlP5Constants.html#LEFT\">LEFT</a>, <a href=\"../controlP5/ControlP5Constants.html#LEFT_OUTSIDE\">LEFT_OUTSIDE</a>, <a href=\"../controlP5/ControlP5Constants.html#LIME\">LIME</a>, <a href=\"../controlP5/ControlP5Constants.html#LINE\">LINE</a>, <a href=\"../controlP5/ControlP5Constants.html#LIST\">LIST</a>, <a href=\"../controlP5/ControlP5Constants.html#LOAD\">LOAD</a>, <a href=\"../controlP5/ControlP5Constants.html#MAROON\">MAROON</a>, <a href=\"../controlP5/ControlP5Constants.html#MENU\">MENU</a>, <a href=\"../controlP5/ControlP5Constants.html#METHOD\">METHOD</a>, <a href=\"../controlP5/ControlP5Constants.html#MOVE\">MOVE</a>, <a href=\"../controlP5/ControlP5Constants.html#MULTI\">MULTI</a>, <a href=\"../controlP5/ControlP5Constants.html#MULTIPLES\">MULTIPLES</a>, <a href=\"../controlP5/ControlP5Constants.html#NAVY\">NAVY</a>, <a href=\"../controlP5/ControlP5Constants.html#OLIVE\">OLIVE</a>, <a href=\"../controlP5/ControlP5Constants.html#ORANGE\">ORANGE</a>, <a href=\"../controlP5/ControlP5Constants.html#OVER\">OVER</a>, <a href=\"../controlP5/ControlP5Constants.html#P2D\">P2D</a>, <a href=\"../controlP5/ControlP5Constants.html#P3D\">P3D</a>, <a href=\"../controlP5/ControlP5Constants.html#pathdelimiter\">pathdelimiter</a>, <a href=\"../controlP5/ControlP5Constants.html#PI\">PI</a>, <a href=\"../controlP5/ControlP5Constants.html#PRESS\">PRESS</a>, <a href=\"../controlP5/ControlP5Constants.html#PRESSED\">PRESSED</a>, <a href=\"../controlP5/ControlP5Constants.html#PRINT\">PRINT</a>, <a href=\"../controlP5/ControlP5Constants.html#PURPLE\">PURPLE</a>, <a href=\"../controlP5/ControlP5Constants.html#RED\">RED</a>, <a href=\"../controlP5/ControlP5Constants.html#RELEASE\">RELEASE</a>, <a href=\"../controlP5/ControlP5Constants.html#RELEASED\">RELEASED</a>, <a href=\"../controlP5/ControlP5Constants.html#RESET\">RESET</a>, <a href=\"../controlP5/ControlP5Constants.html#RIGHT\">RIGHT</a>, <a href=\"../controlP5/ControlP5Constants.html#RIGHT_OUTSIDE\">RIGHT_OUTSIDE</a>, <a href=\"../controlP5/ControlP5Constants.html#SAVE\">SAVE</a>, <a href=\"../controlP5/ControlP5Constants.html#SERIALIZED\">SERIALIZED</a>, <a href=\"../controlP5/ControlP5Constants.html#SHIFT\">SHIFT</a>, <a href=\"../controlP5/ControlP5Constants.html#SILVER\">SILVER</a>, <a href=\"../controlP5/ControlP5Constants.html#SINGLE\">SINGLE</a>, <a href=\"../controlP5/ControlP5Constants.html#SINGLE_COLUMN\">SINGLE_COLUMN</a>, <a href=\"../controlP5/ControlP5Constants.html#SINGLE_ROW\">SINGLE_ROW</a>, <a href=\"../controlP5/ControlP5Constants.html#SPRITE\">SPRITE</a>, <a href=\"../controlP5/ControlP5Constants.html#standard56\">standard56</a>, <a href=\"../controlP5/ControlP5Constants.html#standard58\">standard58</a>, <a href=\"../controlP5/ControlP5Constants.html#STRING\">STRING</a>, <a href=\"../controlP5/ControlP5Constants.html#SWITCH\">SWITCH</a>, <a href=\"../controlP5/ControlP5Constants.html#SWITCH_BACK\">SWITCH_BACK</a>, <a href=\"../controlP5/ControlP5Constants.html#SWITCH_FORE\">SWITCH_FORE</a>, <a href=\"../controlP5/ControlP5Constants.html#synt24\">synt24</a>, <a href=\"../controlP5/ControlP5Constants.html#TAB\">TAB</a>, <a href=\"../controlP5/ControlP5Constants.html#TEAL\">TEAL</a>, <a href=\"../controlP5/ControlP5Constants.html#THEME_A\">THEME_A</a>, <a href=\"../controlP5/ControlP5Constants.html#THEME_CP52014\">THEME_CP52014</a>, <a href=\"../controlP5/ControlP5Constants.html#THEME_CP5BLUE\">THEME_CP5BLUE</a>, <a href=\"../controlP5/ControlP5Constants.html#THEME_GREY\">THEME_GREY</a>, <a href=\"../controlP5/ControlP5Constants.html#THEME_RED\">THEME_RED</a>, <a href=\"../controlP5/ControlP5Constants.html#THEME_RETRO\">THEME_RETRO</a>, <a href=\"../controlP5/ControlP5Constants.html#TOP\">TOP</a>, <a href=\"../controlP5/ControlP5Constants.html#TOP_OUTSIDE\">TOP_OUTSIDE</a>, <a href=\"../controlP5/ControlP5Constants.html#TRANSITION_WAIT_FADEIN\">TRANSITION_WAIT_FADEIN</a>, <a href=\"../controlP5/ControlP5Constants.html#TREE\">TREE</a>, <a href=\"../controlP5/ControlP5Constants.html#TWO_PI\">TWO_PI</a>, <a href=\"../controlP5/ControlP5Constants.html#UP\">UP</a>, <a href=\"../controlP5/ControlP5Constants.html#VALUELABEL\">VALUELABEL</a>, <a href=\"../controlP5/ControlP5Constants.html#VERBOSE\">VERBOSE</a>, <a href=\"../controlP5/ControlP5Constants.html#VERTICAL\">VERTICAL</a>, <a href=\"../controlP5/ControlP5Constants.html#WAIT\">WAIT</a>, <a href=\"../controlP5/ControlP5Constants.html#WHITE\">WHITE</a>, <a href=\"../controlP5/ControlP5Constants.html#YELLOW\">YELLOW</a></code></li>\n</ul>\n</li>\n</ul>\n<!-- ======== CONSTRUCTOR SUMMARY ======== -->\n<ul class=\"blockList\">\n<li class=\"blockList\"><a name=\"constructor.summary\">\n<!-- -->\n</a>\n<h3>Constructor Summary</h3>\n<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Constructor Summary table, listing constructors, and an explanation\">\n<caption><span>Constructors</span><span class=\"tabEnd\">&nbsp;</span></caption>\n<tr>\n<th class=\"colOne\" scope=\"col\">Constructor and Description</th>\n</tr>\n<tr class=\"altColor\">\n<td class=\"colOne\"><code><span class=\"memberNameLink\"><a href=\"../controlP5/MultiList.html#MultiList-controlP5.ControlP5-java.lang.String-\">MultiList</a></span>(<a href=\"../controlP5/ControlP5.html\" title=\"class in controlP5\">ControlP5</a>&nbsp;theControlP5,\n java.lang.String&nbsp;theName)</code>\n<div class=\"block\">Convenience constructor to extend MultiList.</div>\n</td>\n</tr>\n<tr class=\"rowColor\">\n<td class=\"colOne\"><code><span class=\"memberNameLink\"><a href=\"../controlP5/MultiList.html#MultiList-controlP5.ControlP5-controlP5.Tab-java.lang.String-int-int-int-int-\">MultiList</a></span>(<a href=\"../controlP5/ControlP5.html\" title=\"class in controlP5\">ControlP5</a>&nbsp;theControlP5,\n <a href=\"../controlP5/Tab.html\" title=\"class in controlP5\">Tab</a>&nbsp;theParent,\n java.lang.String&nbsp;theName,\n int&nbsp;theX,\n int&nbsp;theY,\n int&nbsp;theWidth,\n int&nbsp;theHeight)</code>&nbsp;</td>\n</tr>\n</table>\n</li>\n</ul>\n<!-- ========== METHOD SUMMARY =========== -->\n<ul class=\"blockList\">\n<li class=\"blockList\"><a name=\"method.summary\">\n<!-- -->\n</a>\n<h3>Method Summary</h3>\n<table class=\"memberSummary\" border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Method Summary table, listing methods, and an explanation\">\n<caption><span id=\"t0\" class=\"activeTableTab\"><span>All Methods</span><span class=\"tabEnd\">&nbsp;</span></span><span id=\"t2\" class=\"tableTab\"><span><a href=\"javascript:show(2);\">Instance Methods</a></span><span class=\"tabEnd\">&nbsp;</span></span><span id=\"t4\" class=\"tableTab\"><span><a href=\"javascript:show(8);\">Concrete Methods</a></span><span class=\"tabEnd\">&nbsp;</span></span></caption>\n<tr>\n<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n<th class=\"colLast\" scope=\"col\">Method and Description</th>\n</tr>\n<tr id=\"i0\" class=\"altColor\">\n<td class=\"colFirst\"><code><a href=\"../controlP5/MultiListButton.html\" title=\"class in controlP5\">MultiListButton</a></code></td>\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../controlP5/MultiList.html#add-java.lang.String-int-\">add</a></span>(java.lang.String&nbsp;theName,\n int&nbsp;theValue)</code>\n<div class=\"block\">adds multilist buttons to the multilist.</div>\n</td>\n</tr>\n<tr id=\"i1\" class=\"rowColor\">\n<td class=\"colFirst\"><code>void</code></td>\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../controlP5/MultiList.html#close--\">close</a></span>()</code></td>\n</tr>\n<tr id=\"i2\" class=\"altColor\">\n<td class=\"colFirst\"><code>void</code></td>\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../controlP5/MultiList.html#close-controlP5.MultiListInterface-\">close</a></span>(controlP5.MultiListInterface&nbsp;theInterface)</code>&nbsp;</td>\n</tr>\n<tr id=\"i3\" class=\"rowColor\">\n<td class=\"colFirst\"><code>void</code></td>\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../controlP5/MultiList.html#controlEvent-controlP5.ControlEvent-\">controlEvent</a></span>(<a href=\"../controlP5/ControlEvent.html\" title=\"class in controlP5\">ControlEvent</a>&nbsp;theEvent)</code>\n<div class=\"block\">controlEvent is called by controlP5's ControlBroadcaster to inform available listeners about\n value changes.</div>\n</td>\n</tr>\n<tr id=\"i4\" class=\"altColor\">\n<td class=\"colFirst\"><code>void</code></td>\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../controlP5/MultiList.html#draw-processing.core.PGraphics-\">draw</a></span>(processing.core.PGraphics&nbsp;theGraphics)</code>\n<div class=\"block\">the default draw function for each controller extending superclass Controller.</div>\n</td>\n</tr>\n<tr id=\"i5\" class=\"rowColor\">\n<td class=\"colFirst\"><code>int</code></td>\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../controlP5/MultiList.html#getDirection--\">getDirection</a></span>()</code>&nbsp;</td>\n</tr>\n<tr id=\"i6\" class=\"altColor\">\n<td class=\"colFirst\"><code>boolean</code></td>\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../controlP5/MultiList.html#observe--\">observe</a></span>()</code>&nbsp;</td>\n</tr>\n<tr id=\"i7\" class=\"rowColor\">\n<td class=\"colFirst\"><code>void</code></td>\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../controlP5/MultiList.html#occupied-boolean-\">occupied</a></span>(boolean&nbsp;theFlag)</code>&nbsp;</td>\n</tr>\n<tr id=\"i8\" class=\"altColor\">\n<td class=\"colFirst\"><code>void</code></td>\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../controlP5/MultiList.html#open--\">open</a></span>()</code></td>\n</tr>\n<tr id=\"i9\" class=\"rowColor\">\n<td class=\"colFirst\"><code>void</code></td>\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../controlP5/MultiList.html#remove--\">remove</a></span>()</code>\n<div class=\"block\">removes the multilist.</div>\n</td>\n</tr>\n<tr id=\"i10\" class=\"altColor\">\n<td class=\"colFirst\"><code>void</code></td>\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../controlP5/MultiList.html#setup--\">setup</a></span>()</code>&nbsp;</td>\n</tr>\n<tr id=\"i11\" class=\"rowColor\">\n<td class=\"colFirst\"><code><a href=\"../controlP5/MultiList.html\" title=\"class in controlP5\">MultiList</a></code></td>\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../controlP5/MultiList.html#setValue-float-\">setValue</a></span>(float&nbsp;theValue)</code></td>\n</tr>\n<tr id=\"i12\" class=\"altColor\">\n<td class=\"colFirst\"><code><a href=\"../controlP5/MultiList.html\" title=\"class in controlP5\">MultiList</a></code></td>\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../controlP5/MultiList.html#toUpperCase-boolean-\">toUpperCase</a></span>(boolean&nbsp;theValue)</code>&nbsp;</td>\n</tr>\n<tr id=\"i13\" class=\"rowColor\">\n<td class=\"colFirst\"><code><a href=\"../controlP5/MultiList.html\" title=\"class in controlP5\">MultiList</a></code></td>\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../controlP5/MultiList.html#update--\">update</a></span>()</code>\n<div class=\"block\">updates the value of the controller without having to set the value explicitly.</div>\n</td>\n</tr>\n<tr id=\"i14\" class=\"altColor\">\n<td class=\"colFirst\"><code>boolean</code></td>\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../controlP5/MultiList.html#update-processing.core.PApplet-\">update</a></span>(processing.core.PApplet&nbsp;theApplet)</code>&nbsp;</td>\n</tr>\n<tr id=\"i15\" class=\"rowColor\">\n<td class=\"colFirst\"><code>void</code></td>\n<td class=\"colLast\"><code><span class=\"memberNameLink\"><a href=\"../controlP5/MultiList.html#updateLocation-float-float-\">updateLocation</a></span>(float&nbsp;theX,\n float&nbsp;theY)</code>&nbsp;</td>\n</tr>\n</table>\n<ul class=\"blockList\">\n<li class=\"blockList\"><a name=\"methods.inherited.from.class.controlP5.Controller\">\n<!-- -->\n</a>\n<h3>Methods inherited from class&nbsp;controlP5.<a href=\"../controlP5/Controller.html\" title=\"class in controlP5\">Controller</a></h3>\n<code><a href=\"../controlP5/Controller.html#add-controlP5.ControllerInterface-\">add</a>, <a href=\"../controlP5/Controller.html#addCallback-controlP5.CallbackListener-\">addCallback</a>, <a href=\"../controlP5/Controller.html#addListener-controlP5.ControlListener-\">addListener</a>, <a href=\"../controlP5/Controller.html#addListenerFor-int-controlP5.CallbackListener-\">addListenerFor</a>, <a href=\"../controlP5/Controller.html#align-int-int-int-int-\">align</a>, <a href=\"../controlP5/Controller.html#bringToFront--\">bringToFront</a>, <a href=\"../controlP5/Controller.html#bringToFront-controlP5.ControllerInterface-\">bringToFront</a>, <a href=\"../controlP5/Controller.html#changeValue-float-\">changeValue</a>, <a href=\"../controlP5/Controller.html#continuousUpdateEvents--\">continuousUpdateEvents</a>, <a href=\"../controlP5/Controller.html#getAbsolutePosition--\">getAbsolutePosition</a>, <a href=\"../controlP5/Controller.html#getAddress--\">getAddress</a>, <a href=\"../controlP5/Controller.html#getArrayValue--\">getArrayValue</a>, <a href=\"../controlP5/Controller.html#getArrayValue-int-\">getArrayValue</a>, <a href=\"../controlP5/Controller.html#getBehavior--\">getBehavior</a>, <a href=\"../controlP5/Controller.html#getCaptionLabel--\">getCaptionLabel</a>, <a href=\"../controlP5/Controller.html#getColor--\">getColor</a>, <a href=\"../controlP5/Controller.html#getControllerPlugList--\">getControllerPlugList</a>, <a href=\"../controlP5/Controller.html#getControlWindow--\">getControlWindow</a>, <a href=\"../controlP5/Controller.html#getDecimalPrecision--\">getDecimalPrecision</a>, <a href=\"../controlP5/Controller.html#getDefaultValue--\">getDefaultValue</a>, <a href=\"../controlP5/Controller.html#getHeight--\">getHeight</a>, <a href=\"../controlP5/Controller.html#getId--\">getId</a>, <a href=\"../controlP5/Controller.html#getInfo--\">getInfo</a>, <a href=\"../controlP5/Controller.html#getLabel--\">getLabel</a>, <a href=\"../controlP5/Controller.html#getMax--\">getMax</a>, <a href=\"../controlP5/Controller.html#getMin--\">getMin</a>, <a href=\"../controlP5/Controller.html#getName--\">getName</a>, <a href=\"../controlP5/Controller.html#getParent--\">getParent</a>, <a href=\"../controlP5/Controller.html#getPickingColor--\">getPickingColor</a>, <a href=\"../controlP5/Controller.html#getPointer--\">getPointer</a>, <a href=\"../controlP5/Controller.html#getPosition--\">getPosition</a>, <a href=\"../controlP5/Controller.html#getProperty-java.lang.String-\">getProperty</a>, <a href=\"../controlP5/Controller.html#getProperty-java.lang.String-java.lang.String-\">getProperty</a>, <a href=\"../controlP5/Controller.html#getStringValue--\">getStringValue</a>, <a href=\"../controlP5/Controller.html#getTab--\">getTab</a>, <a href=\"../controlP5/Controller.html#getValue--\">getValue</a>, <a href=\"../controlP5/Controller.html#getValueLabel--\">getValueLabel</a>, <a href=\"../controlP5/Controller.html#getView--\">getView</a>, <a href=\"../controlP5/Controller.html#getWidth--\">getWidth</a>, <a href=\"../controlP5/Controller.html#getWindow--\">getWindow</a>, <a href=\"../controlP5/Controller.html#hide--\">hide</a>, <a href=\"../controlP5/Controller.html#init--\">init</a>, <a href=\"../controlP5/Controller.html#isActive--\">isActive</a>, <a href=\"../controlP5/Controller.html#isBroadcast--\">isBroadcast</a>, <a href=\"../controlP5/Controller.html#isInside--\">isInside</a>, <a href=\"../controlP5/Controller.html#isLabelVisible--\">isLabelVisible</a>, <a href=\"../controlP5/Controller.html#isListening--\">isListening</a>, <a href=\"../controlP5/Controller.html#isLock--\">isLock</a>, <a href=\"../controlP5/Controller.html#isMouseOver--\">isMouseOver</a>, <a href=\"../controlP5/Controller.html#isMousePressed--\">isMousePressed</a>, <a href=\"../controlP5/Controller.html#isMoveable--\">isMoveable</a>, <a href=\"../controlP5/Controller.html#isUpdate--\">isUpdate</a>, <a href=\"../controlP5/Controller.html#isUserInteraction--\">isUserInteraction</a>, <a href=\"../controlP5/Controller.html#isVisible--\">isVisible</a>, <a href=\"../controlP5/Controller.html#keyEvent-processing.event.KeyEvent-\">keyEvent</a>, <a href=\"../controlP5/Controller.html#linebreak--\">linebreak</a>, <a href=\"../controlP5/Controller.html#listen-boolean-\">listen</a>, <a href=\"../controlP5/Controller.html#listenerSize--\">listenerSize</a>, <a href=\"../controlP5/Controller.html#lock--\">lock</a>, <a href=\"../controlP5/Controller.html#moveTo-controlP5.ControlGroup-\">moveTo</a>, <a href=\"../controlP5/Controller.html#moveTo-controlP5.ControllerGroup-\">moveTo</a>, <a href=\"../controlP5/Controller.html#moveTo-controlP5.ControllerGroup-controlP5.Tab-controlP5.ControlWindow-\">moveTo</a>, <a href=\"../controlP5/Controller.html#moveTo-controlP5.ControlWindow-\">moveTo</a>, <a href=\"../controlP5/Controller.html#moveTo-controlP5.ControlWindow-java.lang.String-\">moveTo</a>, <a href=\"../controlP5/Controller.html#moveTo-processing.core.PApplet-\">moveTo</a>, <a href=\"../controlP5/Controller.html#moveTo-processing.core.PApplet-java.lang.String-\">moveTo</a>, <a href=\"../controlP5/Controller.html#moveTo-java.lang.String-\">moveTo</a>, <a href=\"../controlP5/Controller.html#moveTo-controlP5.Tab-\">moveTo</a>, <a href=\"../controlP5/Controller.html#onChange-controlP5.CallbackListener-\">onChange</a>, <a href=\"../controlP5/Controller.html#onClick-controlP5.CallbackListener-\">onClick</a>, <a href=\"../controlP5/Controller.html#onDoublePress-controlP5.CallbackListener-\">onDoublePress</a>, <a href=\"../controlP5/Controller.html#onDrag-controlP5.CallbackListener-\">onDrag</a>, <a href=\"../controlP5/Controller.html#onDraw-controlP5.ControllerView-\">onDraw</a>, <a href=\"../controlP5/Controller.html#onEndDrag-controlP5.CallbackListener-\">onEndDrag</a>, <a href=\"../controlP5/Controller.html#onEnter-controlP5.CallbackListener-\">onEnter</a>, <a href=\"../controlP5/Controller.html#onLeave-controlP5.CallbackListener-\">onLeave</a>, <a href=\"../controlP5/Controller.html#onMove-controlP5.CallbackListener-\">onMove</a>, <a href=\"../controlP5/Controller.html#onPress-controlP5.CallbackListener-\">onPress</a>, <a href=\"../controlP5/Controller.html#onRelease-controlP5.CallbackListener-\">onRelease</a>, <a href=\"../controlP5/Controller.html#onReleaseOutside-controlP5.CallbackListener-\">onReleaseOutside</a>, <a href=\"../controlP5/Controller.html#onStartDrag-controlP5.CallbackListener-\">onStartDrag</a>, <a href=\"../controlP5/Controller.html#onWheel-controlP5.CallbackListener-\">onWheel</a>, <a href=\"../controlP5/Controller.html#plugTo-java.lang.Object-\">plugTo</a>, <a href=\"../controlP5/Controller.html#plugTo-java.lang.Object:A-\">plugTo</a>, <a href=\"../controlP5/Controller.html#plugTo-java.lang.Object:A-java.lang.String-\">plugTo</a>, <a href=\"../controlP5/Controller.html#plugTo-java.lang.Object-java.lang.String-\">plugTo</a>, <a href=\"../controlP5/Controller.html#registerProperty-java.lang.String-\">registerProperty</a>, <a href=\"../controlP5/Controller.html#registerProperty-java.lang.String-java.lang.String-\">registerProperty</a>, <a href=\"../controlP5/Controller.html#registerTooltip-java.lang.String-\">registerTooltip</a>, <a href=\"../controlP5/Controller.html#remove-controlP5.ControllerInterface-\">remove</a>, <a href=\"../controlP5/Controller.html#removeBehavior--\">removeBehavior</a>, <a href=\"../controlP5/Controller.html#removeCallback--\">removeCallback</a>, <a href=\"../controlP5/Controller.html#removeCallback-controlP5.CallbackListener-\">removeCallback</a>, <a href=\"../controlP5/Controller.html#removeListener-controlP5.ControlListener-\">removeListener</a>, <a href=\"../controlP5/Controller.html#removeListenerFor-int-controlP5.CallbackListener-\">removeListenerFor</a>, <a href=\"../controlP5/Controller.html#removeListenersFor-int-\">removeListenersFor</a>, <a href=\"../controlP5/Controller.html#removeProperty-java.lang.String-\">removeProperty</a>, <a href=\"../controlP5/Controller.html#removeProperty-java.lang.String-java.lang.String-\">removeProperty</a>, <a href=\"../controlP5/Controller.html#set-float:A-float...-\">set</a>, <a href=\"../controlP5/Controller.html#setAbsolutePosition-float:A-\">setAbsolutePosition</a>, <a href=\"../controlP5/Controller.html#setAddress-java.lang.String-\">setAddress</a>, <a href=\"../controlP5/Controller.html#setArrayValue-float:A-\">setArrayValue</a>, <a href=\"../controlP5/Controller.html#setArrayValue-int-float-\">setArrayValue</a>, <a href=\"../controlP5/Controller.html#setBehavior-controlP5.ControlBehavior-\">setBehavior</a>, <a href=\"../controlP5/Controller.html#setBroadcast-boolean-\">setBroadcast</a>, <a href=\"../controlP5/Controller.html#setCaptionLabel-java.lang.String-\">setCaptionLabel</a>, <a href=\"../controlP5/Controller.html#setColor-controlP5.CColor-\">setColor</a>, <a href=\"../controlP5/Controller.html#setColorActive-int-\">setColorActive</a>, <a href=\"../controlP5/Controller.html#setColorBackground-int-\">setColorBackground</a>, <a href=\"../controlP5/Controller.html#setColorCaptionLabel-int-\">setColorCaptionLabel</a>, <a href=\"../controlP5/Controller.html#setColorForeground-int-\">setColorForeground</a>, <a href=\"../controlP5/Controller.html#setColorLabel-int-\">setColorLabel</a>, <a href=\"../controlP5/Controller.html#setColorValue-int-\">setColorValue</a>, <a href=\"../controlP5/Controller.html#setColorValueLabel-int-\">setColorValueLabel</a>, <a href=\"../controlP5/Controller.html#setDecimalPrecision-int-\">setDecimalPrecision</a>, <a href=\"../controlP5/Controller.html#setDefaultValue-float-\">setDefaultValue</a>, <a href=\"../controlP5/Controller.html#setFont-controlP5.ControlFont-\">setFont</a>, <a href=\"../controlP5/Controller.html#setFont-processing.core.PFont-\">setFont</a>, <a href=\"../controlP5/Controller.html#setGroup-controlP5.ControllerGroup-\">setGroup</a>, <a href=\"../controlP5/Controller.html#setGroup-java.lang.String-\">setGroup</a>, <a href=\"../controlP5/Controller.html#setHeight-int-\">setHeight</a>, <a href=\"../controlP5/Controller.html#setId-int-\">setId</a>, <a href=\"../controlP5/Controller.html#setImage-processing.core.PImage-\">setImage</a>, <a href=\"../controlP5/Controller.html#setImage-processing.core.PImage-int-\">setImage</a>, <a href=\"../controlP5/Controller.html#setImages-processing.core.PImage...-\">setImages</a>, <a href=\"../controlP5/Controller.html#setImages-processing.core.PImage-processing.core.PImage-processing.core.PImage-\">setImages</a>, <a href=\"../controlP5/Controller.html#setImages-processing.core.PImage-processing.core.PImage-processing.core.PImage-processing.core.PImage-\">setImages</a>, <a href=\"../controlP5/Controller.html#setLabel-java.lang.String-\">setLabel</a>, <a href=\"../controlP5/Controller.html#setLabelVisible-boolean-\">setLabelVisible</a>, <a href=\"../controlP5/Controller.html#setLock-boolean-\">setLock</a>, <a href=\"../controlP5/Controller.html#setMax-float-\">setMax</a>, <a href=\"../controlP5/Controller.html#setMin-float-\">setMin</a>, <a href=\"../controlP5/Controller.html#setMouseOver-boolean-\">setMouseOver</a>, <a href=\"../controlP5/Controller.html#setMousePressed-boolean-\">setMousePressed</a>, <a href=\"../controlP5/Controller.html#setMoveable-boolean-\">setMoveable</a>, <a href=\"../controlP5/Controller.html#setParent-controlP5.ControllerInterface-\">setParent</a>, <a href=\"../controlP5/Controller.html#setPosition-float:A-\">setPosition</a>, <a href=\"../controlP5/Controller.html#setPosition-float-float-\">setPosition</a>, <a href=\"../controlP5/Controller.html#setSize-int-int-\">setSize</a>, <a href=\"../controlP5/Controller.html#setSize-processing.core.PImage-\">setSize</a>, <a href=\"../controlP5/Controller.html#setStringValue-java.lang.String-\">setStringValue</a>, <a href=\"../controlP5/Controller.html#setTab-controlP5.ControlWindow-java.lang.String-\">setTab</a>, <a href=\"../controlP5/Controller.html#setTab-java.lang.String-\">setTab</a>, <a href=\"../controlP5/Controller.html#setUpdate-boolean-\">setUpdate</a>, <a href=\"../controlP5/Controller.html#setUserInteraction-boolean-\">setUserInteraction</a>, <a href=\"../controlP5/Controller.html#setValueLabel-java.lang.String-\">setValueLabel</a>, <a href=\"../controlP5/Controller.html#setValueSelf-float-\">setValueSelf</a>, <a href=\"../controlP5/Controller.html#setView-controlP5.ControllerView-\">setView</a>, <a href=\"../controlP5/Controller.html#setView-controlP5.ControllerView-int-\">setView</a>, <a href=\"../controlP5/Controller.html#setVisible-boolean-\">setVisible</a>, <a href=\"../controlP5/Controller.html#setWidth-int-\">setWidth</a>, <a href=\"../controlP5/Controller.html#show--\">show</a>, <a href=\"../controlP5/Controller.html#toString--\">toString</a>, <a href=\"../controlP5/Controller.html#unlock--\">unlock</a>, <a href=\"../controlP5/Controller.html#unplugFrom-java.lang.Object-\">unplugFrom</a>, <a href=\"../controlP5/Controller.html#unplugFrom-java.lang.Object:A-\">unplugFrom</a>, <a href=\"../controlP5/Controller.html#unregisterTooltip--\">unregisterTooltip</a>, <a href=\"../controlP5/Controller.html#updateAbsolutePosition--\">updateAbsolutePosition</a>, <a href=\"../controlP5/Controller.html#updateEvents--\">updateEvents</a>, <a href=\"../controlP5/Controller.html#updateInternalEvents-processing.core.PApplet-\">updateInternalEvents</a>, <a href=\"../controlP5/Controller.html#updateSize--\">updateSize</a>, <a href=\"../controlP5/Controller.html#x-float:A-\">x</a>, <a href=\"../controlP5/Controller.html#y-float:A-\">y</a></code></li>\n</ul>\n<ul class=\"blockList\">\n<li class=\"blockList\"><a name=\"methods.inherited.from.class.java.lang.Object\">\n<!-- -->\n</a>\n<h3>Methods inherited from class&nbsp;java.lang.Object</h3>\n<code>equals, getClass, hashCode, notify, notifyAll, wait, wait, wait</code></li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</div>\n<div class=\"details\">\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<!-- ============ FIELD DETAIL =========== -->\n<ul class=\"blockList\">\n<li class=\"blockList\"><a name=\"field.detail\">\n<!-- -->\n</a>\n<h3>Field Detail</h3>\n<a name=\"closeDelay\">\n<!-- -->\n</a>\n<ul class=\"blockListLast\">\n<li class=\"blockList\">\n<h4>closeDelay</h4>\n<pre>public&nbsp;int closeDelay</pre>\n</li>\n</ul>\n</li>\n</ul>\n<!-- ========= CONSTRUCTOR DETAIL ======== -->\n<ul class=\"blockList\">\n<li class=\"blockList\"><a name=\"constructor.detail\">\n<!-- -->\n</a>\n<h3>Constructor Detail</h3>\n<a name=\"MultiList-controlP5.ControlP5-java.lang.String-\">\n<!-- -->\n</a>\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<h4>MultiList</h4>\n<pre>public&nbsp;MultiList(<a href=\"../controlP5/ControlP5.html\" title=\"class in controlP5\">ControlP5</a>&nbsp;theControlP5,\n java.lang.String&nbsp;theName)</pre>\n<div class=\"block\">Convenience constructor to extend MultiList.</div>\n<dl>\n<dt><span class=\"paramLabel\">Parameters:</span></dt>\n<dd><code>theControlP5</code> - </dd>\n<dd><code>theName</code> - </dd>\n<script type=\"text/javascript\">\n<!--\ndocument.getElementsByTagName('html')[0].className = 'isjs';function toggle(dt) { var display, dd=dt; do{ dd = dd.nextSibling } while(dd.tagName!='DD'); toOpen =!dd.style.display;dd.style.display = toOpen? 'block':''; dt.getElementsByTagName('span')[0].innerHTML = toOpen? '-':'+' ; }\n-->\n</script>\n<div id=\"test\" class=\"toggleList\"><dl><dt onclick=\"toggle(this);\"><span>+</span>Example</dt><dd><code><pre>/**\n * ControlP5 extending Controllers\n *\n * the following example shows how to extend the Controller class to \n * create customizable Controllers. You can either extend the Controller class itself,\n * or any class that extends Controller itself like the Slider, Button, DropdownList, etc. \n * \n * How to:\n *\n * 1) do a super call to the convenience constructor requiring \n * 2 parameter (ControlP5 instance, name) \n *\n * 2) the Controller class has a set of empty methods that allow you to capture\n * inputs from the mouse including \n * onEnter(), onLeave(), onPress(), onRelease(), onClick(), onScroll(int), onDrag()\n * These you can override and include functionality as needed.\n *\n * 3) use method getPointer() to return the local (relative) \n * xy-coordinates of the controller\n * \n * 4) after instantiation custom controllers are treated the same \n * as default controlP5 controllers.\n * \n * by Andreas Schlegel, 2012\n * www.sojamo.de/libraries/controlp5\n *\n */\n\nimport controlP5.*;\n\nControlP5 cp5;\nPApplet p;\n\nvoid setup() {\n size(400, 400);\n cp5 = new ControlP5(this);\n \n // create 2 groups to show nesting of custom controllers and\n // \n Group g1 = cp5.addGroup(\"a\").setPosition(0,100).setWidth(180);\n Group g2 = cp5.addGroup(\"b\").setPosition(0,10).setWidth(180);\n g2.moveTo(g1);\n \n // create 2 custom Controllers from class MyButton\n // MyButton extends Controller and inherits all methods accordingly.\n new MyButton(cp5, \"b1\").setPosition(0, 0).setSize(180, 200).moveTo(g2);\n new MyButton(cp5, \"b2\").setPosition(205, 15).setSize(180, 200);\n \n}\n\n\nvoid draw() {\n background(0);\n}\n\n// b1 will be called from Controller b1\npublic void b1(float theValue) {\n println(\"yay button \"+theValue);\n}\n\npublic void controlEvent(ControlEvent theEvent) {\n println(\"controlEvent : \"+theEvent);\n}\n\n\n// Create a custom Controller, please not that \n// MyButton extends Controller<MyButton>, <MyButton>\n// is an indicator for the super class about the type of \n// custom controller to be created.\n\nclass MyButton extends Controller<MyButton> {\n\n int current = 0xffff0000;\n\n float a = 128;\n \n float na;\n \n int y;\n \n // use the convenience constructor of super class Controller\n // MyButton will automatically registered and move to the \n // default controlP5 tab.\n \n MyButton(ControlP5 cp5, String theName) {\n super(cp5, theName);\n \n // replace the default view with a custom view.\n setView(new ControllerView() {\n public void display(PGraphics p, Object b) {\n // draw button background\n na += (a-na) * 0.1; \n p.fill(current,na);\n p.rect(0, 0, getWidth(), getHeight());\n \n // draw horizontal line which can be moved on the x-axis \n // using the scroll wheel. \n p.fill(0,255,0);\n p.rect(0,y,width,10);\n \n // draw the custom label \n p.fill(128);\n translate(0,getHeight()+14);\n p.text(getName(),0,0);\n p.text(getName(),0,0);\n \n }\n }\n );\n }\n\n // override various input methods for mouse input control\n void onEnter() {\n cursor(HAND);\n println(\"enter\");\n a = 255;\n }\n \n void onScroll(int n) {\n println(\"scrolling\");\n y -= n;\n y = constrain(y,0,getHeight()-10);\n }\n \n void onPress() {\n println(\"press\");\n current = 0xffffff00;\n }\n \n void onClick() {\n Pointer p1 = getPointer();\n println(\"clicked at \"+p1.x()+\", \"+p1.y());\n current = 0xffffff00;\n setValue(y);\n }\n\n void onRelease() {\n println(\"release\");\n current = 0xffffffff;\n }\n \n void onMove() {\n println(\"moving \"+this+\" \"+_myControlWindow.getMouseOverList());\n }\n\n void onDrag() {\n current = 0xff0000ff;\n Pointer p1 = getPointer();\n float dif = dist(p1.px(),p1.py(),p1.x(),p1.y());\n println(\"dragging at \"+p1.x()+\", \"+p1.y()+\" \"+dif);\n }\n \n void onReleaseOutside() {\n onLeave();\n }\n\n void onLeave() {\n println(\"leave\");\n cursor(ARROW);\n a = 128;\n }\n}\n\n</pre></code></dd></dl></div></dl>\n</li>\n</ul>\n<a name=\"MultiList-controlP5.ControlP5-controlP5.Tab-java.lang.String-int-int-int-int-\">\n<!-- -->\n</a>\n<ul class=\"blockListLast\">\n<li class=\"blockList\">\n<h4>MultiList</h4>\n<pre>public&nbsp;MultiList(<a href=\"../controlP5/ControlP5.html\" title=\"class in controlP5\">ControlP5</a>&nbsp;theControlP5,\n <a href=\"../controlP5/Tab.html\" title=\"class in controlP5\">Tab</a>&nbsp;theParent,\n java.lang.String&nbsp;theName,\n int&nbsp;theX,\n int&nbsp;theY,\n int&nbsp;theWidth,\n int&nbsp;theHeight)</pre>\n</li>\n</ul>\n</li>\n</ul>\n<!-- ============ METHOD DETAIL ========== -->\n<ul class=\"blockList\">\n<li class=\"blockList\"><a name=\"method.detail\">\n<!-- -->\n</a>\n<h3>Method Detail</h3>\n<a name=\"add-java.lang.String-int-\">\n<!-- -->\n</a>\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<h4>add</h4>\n<pre>public&nbsp;<a href=\"../controlP5/MultiListButton.html\" title=\"class in controlP5\">MultiListButton</a>&nbsp;add(java.lang.String&nbsp;theName,\n int&nbsp;theValue)</pre>\n<div class=\"block\">adds multilist buttons to the multilist.</div>\n<dl>\n<dt><span class=\"paramLabel\">Parameters:</span></dt>\n<dd><code>theName</code> - String</dd>\n<dd><code>theValue</code> - int</dd>\n<dt><span class=\"returnLabel\">Returns:</span></dt>\n<dd>MultiListButton</dd>\n</dl>\n</li>\n</ul>\n<a name=\"close--\">\n<!-- -->\n</a>\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<h4>close</h4>\n<pre>public&nbsp;void&nbsp;close()</pre>\n</li>\n</ul>\n<a name=\"close-controlP5.MultiListInterface-\">\n<!-- -->\n</a>\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<h4>close</h4>\n<pre>public&nbsp;void&nbsp;close(controlP5.MultiListInterface&nbsp;theInterface)</pre>\n<dl>\n<dt><span class=\"paramLabel\">Parameters:</span></dt>\n<dd><code>theInterface</code> - MultiListInterface</dd>\n</dl>\n</li>\n</ul>\n<a name=\"controlEvent-controlP5.ControlEvent-\">\n<!-- -->\n</a>\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<h4>controlEvent</h4>\n<pre>public&nbsp;void&nbsp;controlEvent(<a href=\"../controlP5/ControlEvent.html\" title=\"class in controlP5\">ControlEvent</a>&nbsp;theEvent)</pre>\n<div class=\"block\"><span class=\"descfrmTypeLabel\">Description copied from interface:&nbsp;<code><a href=\"../controlP5/ControlListener.html#controlEvent-controlP5.ControlEvent-\">ControlListener</a></code></span></div>\n<div class=\"block\">controlEvent is called by controlP5's ControlBroadcaster to inform available listeners about\n value changes. Use the CallbackListener to get informed when actions such as pressed,\n release, drag, etc are performed.</div>\n<dl>\n<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n<dd><code><a href=\"../controlP5/ControlListener.html#controlEvent-controlP5.ControlEvent-\">controlEvent</a></code>&nbsp;in interface&nbsp;<code><a href=\"../controlP5/ControlListener.html\" title=\"interface in controlP5\">ControlListener</a></code></dd>\n<dt><span class=\"paramLabel\">Parameters:</span></dt>\n<dd><code>theEvent</code> - </dd>\n<dt><span class=\"seeLabel\">See Also:</span></dt>\n<dd><a href=\"../controlP5/CallbackListener.html\" title=\"interface in controlP5\"><code>CallbackListener</code></a>, \n<a href=\"../controlP5/CallbackEvent.html\" title=\"class in controlP5\"><code>CallbackEvent</code></a></dd>\n</dl>\n</li>\n</ul>\n<a name=\"draw-processing.core.PGraphics-\">\n<!-- -->\n</a>\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<h4>draw</h4>\n<pre>public&nbsp;void&nbsp;draw(processing.core.PGraphics&nbsp;theGraphics)</pre>\n<div class=\"block\">the default draw function for each controller extending superclass Controller. This draw function will take care\n of default matrix operations and will call the display function of the current ControllerView object active for\n this particular controller.</div>\n<dl>\n<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n<dd><code><a href=\"../controlP5/CDrawable.html#draw-processing.core.PGraphics-\">draw</a></code>&nbsp;in interface&nbsp;<code><a href=\"../controlP5/CDrawable.html\" title=\"interface in controlP5\">CDrawable</a></code></dd>\n<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n<dd><code><a href=\"../controlP5/ControllerInterface.html#draw-processing.core.PGraphics-\">draw</a></code>&nbsp;in interface&nbsp;<code><a href=\"../controlP5/ControllerInterface.html\" title=\"interface in controlP5\">ControllerInterface</a>&lt;<a href=\"../controlP5/MultiList.html\" title=\"class in controlP5\">MultiList</a>&gt;</code></dd>\n<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n<dd><code><a href=\"../controlP5/Controller.html#draw-processing.core.PGraphics-\">draw</a></code>&nbsp;in class&nbsp;<code><a href=\"../controlP5/Controller.html\" title=\"class in controlP5\">Controller</a>&lt;<a href=\"../controlP5/MultiList.html\" title=\"class in controlP5\">MultiList</a>&gt;</code></dd>\n<dt><span class=\"seeLabel\">See Also:</span></dt>\n<dd><a href=\"../controlP5/ControllerView.html\" title=\"interface in controlP5\"><code>ControllerView</code></a></dd>\n</dl>\n</li>\n</ul>\n<a name=\"getDirection--\">\n<!-- -->\n</a>\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<h4>getDirection</h4>\n<pre>public&nbsp;int&nbsp;getDirection()</pre>\n</li>\n</ul>\n<a name=\"observe--\">\n<!-- -->\n</a>\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<h4>observe</h4>\n<pre>public&nbsp;boolean&nbsp;observe()</pre>\n<dl>\n<dt><span class=\"returnLabel\">Returns:</span></dt>\n<dd>boolean</dd>\n</dl>\n</li>\n</ul>\n<a name=\"occupied-boolean-\">\n<!-- -->\n</a>\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<h4>occupied</h4>\n<pre>public&nbsp;void&nbsp;occupied(boolean&nbsp;theFlag)</pre>\n<dl>\n<dt><span class=\"paramLabel\">Parameters:</span></dt>\n<dd><code>theFlag</code> - boolean</dd>\n</dl>\n</li>\n</ul>\n<a name=\"open--\">\n<!-- -->\n</a>\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<h4>open</h4>\n<pre>public&nbsp;void&nbsp;open()</pre>\n</li>\n</ul>\n<a name=\"remove--\">\n<!-- -->\n</a>\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<h4>remove</h4>\n<pre>public&nbsp;void&nbsp;remove()</pre>\n<div class=\"block\">removes the multilist.</div>\n<dl>\n<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n<dd><code><a href=\"../controlP5/ControllerInterface.html#remove--\">remove</a></code>&nbsp;in interface&nbsp;<code><a href=\"../controlP5/ControllerInterface.html\" title=\"interface in controlP5\">ControllerInterface</a>&lt;<a href=\"../controlP5/MultiList.html\" title=\"class in controlP5\">MultiList</a>&gt;</code></dd>\n<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n<dd><code><a href=\"../controlP5/Controller.html#remove--\">remove</a></code>&nbsp;in class&nbsp;<code><a href=\"../controlP5/Controller.html\" title=\"class in controlP5\">Controller</a>&lt;<a href=\"../controlP5/MultiList.html\" title=\"class in controlP5\">MultiList</a>&gt;</code></dd>\n</dl>\n</li>\n</ul>\n<a name=\"setup--\">\n<!-- -->\n</a>\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<h4>setup</h4>\n<pre>public&nbsp;void&nbsp;setup()</pre>\n</li>\n</ul>\n<a name=\"setValue-float-\">\n<!-- -->\n</a>\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<h4>setValue</h4>\n<pre>public&nbsp;<a href=\"../controlP5/MultiList.html\" title=\"class in controlP5\">MultiList</a>&nbsp;setValue(float&nbsp;theValue)</pre>\n<dl>\n<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n<dd><code><a href=\"../controlP5/ControllerInterface.html#setValue-float-\">setValue</a></code>&nbsp;in interface&nbsp;<code><a href=\"../controlP5/ControllerInterface.html\" title=\"interface in controlP5\">ControllerInterface</a>&lt;<a href=\"../controlP5/MultiList.html\" title=\"class in controlP5\">MultiList</a>&gt;</code></dd>\n<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n<dd><code><a href=\"../controlP5/Controller.html#setValue-float-\">setValue</a></code>&nbsp;in class&nbsp;<code><a href=\"../controlP5/Controller.html\" title=\"class in controlP5\">Controller</a>&lt;<a href=\"../controlP5/MultiList.html\" title=\"class in controlP5\">MultiList</a>&gt;</code></dd>\n<dt><span class=\"paramLabel\">Parameters:</span></dt>\n<dd><code>theValue</code> - float</dd>\n</dl>\n</li>\n</ul>\n<a name=\"toUpperCase-boolean-\">\n<!-- -->\n</a>\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<h4>toUpperCase</h4>\n<pre>public&nbsp;<a href=\"../controlP5/MultiList.html\" title=\"class in controlP5\">MultiList</a>&nbsp;toUpperCase(boolean&nbsp;theValue)</pre>\n</li>\n</ul>\n<a name=\"update--\">\n<!-- -->\n</a>\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<h4>update</h4>\n<pre>public&nbsp;<a href=\"../controlP5/MultiList.html\" title=\"class in controlP5\">MultiList</a>&nbsp;update()</pre>\n<div class=\"block\">updates the value of the controller without having to set the value explicitly. update does not visually update\n the controller. the updating status can be set with setUpdate(true/false) and checked with isUpdate().</div>\n<dl>\n<dt><span class=\"overrideSpecifyLabel\">Specified by:</span></dt>\n<dd><code><a href=\"../controlP5/ControllerInterface.html#update--\">update</a></code>&nbsp;in interface&nbsp;<code><a href=\"../controlP5/ControllerInterface.html\" title=\"interface in controlP5\">ControllerInterface</a>&lt;<a href=\"../controlP5/MultiList.html\" title=\"class in controlP5\">MultiList</a>&gt;</code></dd>\n<dt><span class=\"overrideSpecifyLabel\">Overrides:</span></dt>\n<dd><code><a href=\"../controlP5/Controller.html#update--\">update</a></code>&nbsp;in class&nbsp;<code><a href=\"../controlP5/Controller.html\" title=\"class in controlP5\">Controller</a>&lt;<a href=\"../controlP5/MultiList.html\" title=\"class in controlP5\">MultiList</a>&gt;</code></dd>\n<dt><span class=\"returnLabel\">Returns:</span></dt>\n<dd>Controller</dd>\n<dt><span class=\"seeLabel\">See Also:</span></dt>\n<dd><a href=\"../controlP5/Controller.html#setUpdate-boolean-\"><code>Controller.setUpdate(boolean)</code></a>, \n<a href=\"../controlP5/Controller.html#isUpdate--\"><code>Controller.isUpdate()</code></a></dd>\n</dl>\n</li>\n</ul>\n<a name=\"update-processing.core.PApplet-\">\n<!-- -->\n</a>\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<h4>update</h4>\n<pre>public&nbsp;boolean&nbsp;update(processing.core.PApplet&nbsp;theApplet)</pre>\n<dl>\n<dt><span class=\"paramLabel\">Parameters:</span></dt>\n<dd><code>theApplet</code> - </dd>\n<dt><span class=\"returnLabel\">Returns:</span></dt>\n<dd>boolean</dd>\n</dl>\n</li>\n</ul>\n<a name=\"updateLocation-float-float-\">\n<!-- -->\n</a>\n<ul class=\"blockListLast\">\n<li class=\"blockList\">\n<h4>updateLocation</h4>\n<pre>public&nbsp;void&nbsp;updateLocation(float&nbsp;theX,\n float&nbsp;theY)</pre>\n<dl>\n<dt><span class=\"paramLabel\">Parameters:</span></dt>\n<dd><code>theX</code> - float</dd>\n<dd><code>theY</code> - float</dd>\n</dl>\n</li>\n</ul>\n</li>\n</ul>\n</li>\n</ul>\n</div>\n</div>\n<!-- ========= END OF CLASS DATA ========= -->\n<!-- ======= START OF BOTTOM NAVBAR ====== -->\n<div class=\"bottomNav\"><a name=\"navbar.bottom\">\n<!-- -->\n</a>\n<div class=\"skipNav\"><a href=\"#skip.navbar.bottom\" title=\"Skip navigation links\">Skip navigation links</a></div>\n<a name=\"navbar.bottom.firstrow\">\n<!-- -->\n</a>\n<ul class=\"navList\" title=\"Navigation\">\n<li><a href=\"../controlP5/package-summary.html\">Package</a></li>\n<li class=\"navBarCell1Rev\">Class</li>\n<li><a href=\"package-tree.html\">Tree</a></li>\n<li><a href=\"../index-all.html\">Index</a></li>\n<li><a href=\"../help-doc.html\">Help</a></li>\n</ul>\n</div>\n<div class=\"subNav\">\n<ul class=\"navList\">\n<li><a href=\"../controlP5/Matrix.html\" title=\"class in controlP5\"><span class=\"typeNameLink\">Prev&nbsp;Class</span></a></li>\n<li><a href=\"../controlP5/MultiListButton.html\" title=\"class in controlP5\"><span class=\"typeNameLink\">Next&nbsp;Class</span></a></li>\n</ul>\n<ul class=\"navList\">\n<li><a href=\"../index.html?controlP5/MultiList.html\" target=\"_top\">Frames</a></li>\n<li><a href=\"MultiList.html\" target=\"_top\">No&nbsp;Frames</a></li>\n</ul>\n<ul class=\"navList\" id=\"allclasses_navbar_bottom\">\n<li><a href=\"../allclasses-noframe.html\">All&nbsp;Classes</a></li>\n</ul>\n<div>\n<script type=\"text/javascript\"><!--\n allClassesLink = document.getElementById(\"allclasses_navbar_bottom\");\n if(window==top) {\n allClassesLink.style.display = \"block\";\n }\n else {\n allClassesLink.style.display = \"none\";\n }\n //-->\n</script>\n</div>\n<div>\n<ul class=\"subNavList\">\n<li>Summary:&nbsp;</li>\n<li>Nested&nbsp;|&nbsp;</li>\n<li><a href=\"#field.summary\">Field</a>&nbsp;|&nbsp;</li>\n<li><a href=\"#constructor.summary\">Constr</a>&nbsp;|&nbsp;</li>\n<li><a href=\"#method.summary\">Method</a></li>\n</ul>\n<ul class=\"subNavList\">\n<li>Detail:&nbsp;</li>\n<li><a href=\"#field.detail\">Field</a>&nbsp;|&nbsp;</li>\n<li><a href=\"#constructor.detail\">Constr</a>&nbsp;|&nbsp;</li>\n<li><a href=\"#method.detail\">Method</a></li>\n</ul>\n</div>\n<a name=\"skip.navbar.bottom\">\n<!-- -->\n</a></div>\n<!-- ======== END OF BOTTOM NAVBAR ======= -->\n<p class=\"legalCopy\"><small>processing library controlP5 by Andreas Schlegel. (c) 2006-2016</small></p>\n</body>\n</html>\n"} +{"text": "<?xml version=\"1.0\"?>\n<!--\n ~ Copyright (c) 2006, Pentaho Corporation. All Rights Reserved.\n -->\n\n<sql-datasource\n xmlns=\"http://jfreereport.sourceforge.net/namespaces/datasources/sql\"\n xmlns:html=\"http://www.w3.org/1999/xhtml\">\n <connection>\n <driver>org.hsqldb.jdbcDriver</driver>\n <url>jdbc:hsqldb:mem:SampleData</url>\n <properties>\n <property name=\"user\">sa</property>\n <property name=\"pass\"></property>\n </properties>\n </connection>\n\n <query name=\"default\">\n select *from TRIAL_BALANCE\n </query>\n</sql-datasource>\n"} +{"text": "shaders = 4\nshader0 = ../../motionblur/shaders/response-time.slang\nshader1 = ../shaders/lcd-cgwg/lcd-grid-v2.slang\nshader2 = ../shaders/color/gba-color.slang\nshader3 = shader-files/gb-pass-5.slang\n\nscale_type0 = source\nscale0 = 1\n\nscale_type1 = source\nscale1 = 4\n\nscale_type2 = source\nscale2 = 1\n\nfilter_linear0 = false\nfilter_linear1 = false\nfilter_linear2 = false\nfilter_linear3 = true\n\ntextures = BORDER\n\nBORDER = resources/gba-border-square-4x.png\nBORDER_linear = true\n\nparameters = \"SCALE;OUT_X;OUT_Y;RSUBPIX_R;RSUBPIX_G;RSUBPIX_B;GSUBPIX_R;GSUBPIX_G;GSUBPIX_B;BSUBPIX_R;BSUBPIX_G;BSUBPIX_B;gain;gamma;blacklevel;ambient;BGR\"\nSCALE = \"1.0\"\nOUT_X = \"3200.0\"\nOUT_Y = \"1600.0\"\nRSUBPIX_R = \"0.750000\"\nRSUBPIX_G = \"0.000000\"\nRSUBPIX_B = \"0.000000\"\nGSUBPIX_R = \"0.000000\"\nGSUBPIX_G = \"0.750000\"\nGSUBPIX_B = \"0.000000\"\nBSUBPIX_R = \"0.000000\"\nBSUBPIX_G = \"0.000000\"\nBSUBPIX_B = \"0.750000\"\ngain = \"1.500000\"\ngamma = \"2.200000\"\nblacklevel = \"0.000000\"\nambient = \"0.000000\"\nBGR = \"1.000000\"\n"} +{"text": "package client\n\nimport (\n\t\"bytes\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"net/http\"\n\t\"strings\"\n\t\"testing\"\n\n\t\"golang.org/x/net/context\"\n)\n\nfunc TestPluginPushError(t *testing.T) {\n\tclient := &Client{\n\t\tclient: newMockClient(errorMock(http.StatusInternalServerError, \"Server error\")),\n\t}\n\n\terr := client.PluginPush(context.Background(), \"plugin_name\", \"\")\n\tif err == nil || err.Error() != \"Error response from daemon: Server error\" {\n\t\tt.Fatalf(\"expected a Server Error, got %v\", err)\n\t}\n}\n\nfunc TestPluginPush(t *testing.T) {\n\texpectedURL := \"/plugins/plugin_name\"\n\n\tclient := &Client{\n\t\tclient: newMockClient(func(req *http.Request) (*http.Response, error) {\n\t\t\tif !strings.HasPrefix(req.URL.Path, expectedURL) {\n\t\t\t\treturn nil, fmt.Errorf(\"Expected URL '%s', got '%s'\", expectedURL, req.URL)\n\t\t\t}\n\t\t\tif req.Method != \"POST\" {\n\t\t\t\treturn nil, fmt.Errorf(\"expected POST method, got %s\", req.Method)\n\t\t\t}\n\t\t\tauth := req.Header.Get(\"X-Registry-Auth\")\n\t\t\tif auth != \"authtoken\" {\n\t\t\t\treturn nil, fmt.Errorf(\"Invalid auth header : expected %s, got %s\", \"authtoken\", auth)\n\t\t\t}\n\t\t\treturn &http.Response{\n\t\t\t\tStatusCode: http.StatusOK,\n\t\t\t\tBody: ioutil.NopCloser(bytes.NewReader([]byte(\"\"))),\n\t\t\t}, nil\n\t\t}),\n\t}\n\n\terr := client.PluginPush(context.Background(), \"plugin_name\", \"authtoken\")\n\tif err != nil {\n\t\tt.Fatal(err)\n\t}\n}\n"} +{"text": "/*\n * Audacious - a cross-platform multimedia player\n * Copyright (c) 2007 Tomasz Moń\n * Copyright (c) 2008 William Pitcock\n * Copyright (c) 2009-2011 John Lindgren\n *\n * Based on:\n * BMP - Cross-platform multimedia player\n * Copyright (C) 2003-2004 BMP development team.\n *\n * XMMS:\n * Copyright (C) 1998-2003 XMMS development team.\n *\n * This program is free software; you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; under version 3 of the License.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses>.\n *\n * The Audacious team does not consider modular code linking to\n * Audacious or using our public API to be a derived work.\n */\n\n#include \"menus.h\"\n#include \"skins_cfg.h\"\n#include \"skin.h\"\n#include \"playlist-widget.h\"\n#include \"playlist-slider.h\"\n\n#include <libaudcore/audstrings.h>\n#include <libaudcore/drct.h>\n#include <libaudcore/hook.h>\n#include <libaudcore/i18n.h>\n#include <libaudcore/runtime.h>\n#include <libaudcore/playlist.h>\n#include <libaudqt/libaudqt.h>\n\n#include <QMimeData>\n\nenum {\n DRAG_SELECT = 1,\n DRAG_MOVE\n};\n\nvoid PlaylistWidget::update_title ()\n{\n if (Playlist::n_playlists () > 1)\n {\n String title = m_playlist.get_title ();\n m_title_text = String (str_printf (_(\"%s (%d of %d)\"),\n (const char *) title, 1 + m_playlist.index (), Playlist::n_playlists ()));\n }\n else\n m_title_text = String ();\n}\n\nvoid PlaylistWidget::calc_layout ()\n{\n m_rows = m_height / m_row_height;\n\n if (m_rows && m_title_text)\n {\n m_offset = m_row_height;\n m_rows --;\n }\n else\n m_offset = 0;\n\n if (m_first + m_rows > m_length)\n m_first = m_length - m_rows;\n if (m_first < 0)\n m_first = 0;\n}\n\nint PlaylistWidget::calc_position (int y) const\n{\n if (y < m_offset)\n return -1;\n\n int position = m_first + (y - m_offset) / m_row_height;\n if (position >= m_first + m_rows || position >= m_length)\n return m_length;\n\n return position;\n}\n\nint PlaylistWidget::adjust_position (bool relative, int position) const\n{\n if (m_length == 0)\n return -1;\n\n if (relative)\n {\n int focus = m_playlist.get_focus ();\n if (focus == -1)\n return 0;\n\n position += focus;\n }\n\n if (position < 0)\n return 0;\n if (position >= m_length)\n return m_length - 1;\n\n return position;\n}\n\nvoid PlaylistWidget::cancel_all ()\n{\n m_drag = false;\n\n if (m_scroll)\n {\n m_scroll = 0;\n scroll_timer.stop ();\n }\n\n if (m_hover != -1)\n {\n m_hover = -1;\n queue_draw ();\n }\n\n popup_hide ();\n}\n\nvoid PlaylistWidget::draw (QPainter & cr)\n{\n int active_entry = m_playlist.get_position ();\n int left = 3, right = 3;\n int width;\n QRect rect;\n\n cr.setFont (* m_font);\n\n /* background */\n\n cr.fillRect (cr.window (), QColor (skin.colors[SKIN_PLEDIT_NORMALBG]));\n\n /* playlist title */\n\n if (m_offset)\n {\n cr.setPen (QColor (skin.colors[SKIN_PLEDIT_NORMAL]));\n cr.drawText (left, 0, m_width - left - right, m_row_height,\n Qt::AlignCenter, (const char *) m_title_text);\n }\n\n /* selection highlight */\n\n for (int i = m_first; i < m_first + m_rows && i < m_length; i ++)\n {\n if (m_playlist.entry_selected (i))\n cr.fillRect (0, m_offset + m_row_height * (i - m_first), m_width,\n m_row_height, QColor (skin.colors[SKIN_PLEDIT_SELECTEDBG]));\n }\n\n /* entry numbers */\n\n if (aud_get_bool (\"show_numbers_in_pl\"))\n {\n width = 0;\n\n for (int i = m_first; i < m_first + m_rows && i < m_length; i ++)\n {\n char buf[16];\n snprintf (buf, sizeof buf, \"%d.\", 1 + i);\n\n cr.setPen (QColor (skin.colors[(i == active_entry) ?\n SKIN_PLEDIT_CURRENT : SKIN_PLEDIT_NORMAL]));\n cr.drawText (left, m_offset + m_row_height * (i - m_first),\n m_width - left - right, m_row_height,\n Qt::AlignLeft | Qt::AlignVCenter, buf, & rect);\n\n width = aud::max (width, rect.width ());\n }\n\n left += width + 4;\n }\n\n /* entry lengths */\n\n width = 0;\n\n for (int i = m_first; i < m_first + m_rows && i < m_length; i ++)\n {\n Tuple tuple = m_playlist.entry_tuple (i, Playlist::NoWait);\n int len = tuple.get_int (Tuple::Length);\n if (len < 0)\n continue;\n\n cr.setPen (QColor (skin.colors[(i == active_entry) ?\n SKIN_PLEDIT_CURRENT : SKIN_PLEDIT_NORMAL]));\n cr.drawText (left, m_offset + m_row_height * (i - m_first),\n m_width - left - right, m_row_height,\n Qt::AlignRight | Qt::AlignVCenter,\n (const char *) str_format_time (len), & rect);\n\n width = aud::max (width, rect.width ());\n }\n\n right += width + 6;\n\n /* queue positions */\n\n if (m_playlist.n_queued ())\n {\n width = 0;\n\n for (int i = m_first; i < m_first + m_rows && i < m_length; i ++)\n {\n int pos = m_playlist.queue_find_entry (i);\n if (pos < 0)\n continue;\n\n char buf[16];\n snprintf (buf, sizeof buf, \"(#%d)\", 1 + pos);\n\n cr.setPen (QColor (skin.colors[(i == active_entry) ?\n SKIN_PLEDIT_CURRENT : SKIN_PLEDIT_NORMAL]));\n cr.drawText (left, m_offset + m_row_height * (i - m_first),\n m_width - left - right, m_row_height,\n Qt::AlignRight | Qt::AlignVCenter, buf, & rect);\n\n width = aud::max (width, rect.width ());\n }\n\n right += width + 6;\n }\n\n /* titles */\n\n for (int i = m_first; i < m_first + m_rows && i < m_length; i ++)\n {\n Tuple tuple = m_playlist.entry_tuple (i, Playlist::NoWait);\n String title = tuple.get_str (Tuple::FormattedTitle);\n\n cr.setPen (QColor (skin.colors[(i == active_entry) ?\n SKIN_PLEDIT_CURRENT : SKIN_PLEDIT_NORMAL]));\n cr.drawText (left, m_offset + m_row_height * (i - m_first),\n m_width - left - right, m_row_height,\n Qt::AlignLeft | Qt::AlignVCenter, (const char *) title);\n }\n\n /* focus rectangle */\n\n int focus = m_playlist.get_focus ();\n\n /* don't show rectangle if this is the only selected entry */\n if (focus >= m_first && focus <= m_first + m_rows - 1 &&\n (! m_playlist.entry_selected (focus) || m_playlist.n_selected () > 1))\n {\n cr.setPen (QColor (skin.colors[SKIN_PLEDIT_NORMAL]));\n cr.drawRect (0, m_offset + m_row_height * (focus - m_first), m_width - 1, m_row_height - 1);\n }\n\n /* hover line */\n\n if (m_hover >= m_first && m_hover <= m_first + m_rows)\n {\n cr.fillRect (0, m_offset + m_row_height * (m_hover - m_first) - 1, m_width, 2,\n QColor (skin.colors[SKIN_PLEDIT_NORMAL]));\n }\n}\n\nPlaylistWidget::PlaylistWidget (int width, int height, const char * font) :\n m_width (width * config.scale),\n m_height (height * config.scale)\n{\n add_input (m_width, m_height, true, true);\n set_font (font); /* calls refresh() */\n\n setAcceptDrops(true);\n}\n\nvoid PlaylistWidget::resize (int width, int height)\n{\n m_width = width * config.scale;\n m_height = height * config.scale;\n\n Widget::resize (m_width, m_height);\n refresh ();\n}\n\nvoid PlaylistWidget::set_font (const char * font)\n{\n m_font.capture (new QFont (audqt::qfont_from_string (font)));\n m_metrics.capture (new QFontMetrics (* m_font, this));\n m_row_height = m_metrics->height ();\n refresh ();\n}\n\nvoid PlaylistWidget::refresh ()\n{\n auto prev_playlist = m_playlist;\n m_playlist = Playlist::active_playlist ();\n m_length = m_playlist.n_entries ();\n\n update_title ();\n calc_layout ();\n\n if (m_playlist != prev_playlist)\n {\n cancel_all ();\n m_first = 0;\n ensure_visible (m_playlist.get_focus ());\n }\n\n queue_draw ();\n\n if (m_slider)\n m_slider->refresh ();\n}\n\nvoid PlaylistWidget::ensure_visible (int position)\n{\n if (position < m_first || position >= m_first + m_rows)\n m_first = position - m_rows / 2;\n\n calc_layout ();\n}\n\nvoid PlaylistWidget::select_single (bool relative, int position)\n{\n position = adjust_position (relative, position);\n\n if (position == -1)\n return;\n\n m_playlist.select_all (false);\n m_playlist.select_entry (position, true);\n m_playlist.set_focus (position);\n ensure_visible (position);\n}\n\nvoid PlaylistWidget::select_extend (bool relative, int position)\n{\n position = adjust_position (relative, position);\n\n if (position == -1)\n return;\n\n int count = adjust_position (true, 0);\n int sign = (position > count) ? 1 : -1;\n\n for (; count != position; count += sign)\n m_playlist.select_entry (count, ! m_playlist.entry_selected (count + sign));\n\n m_playlist.select_entry (position, true);\n m_playlist.set_focus (position);\n ensure_visible (position);\n}\n\nvoid PlaylistWidget::select_slide (bool relative, int position)\n{\n position = adjust_position (relative, position);\n\n if (position == -1)\n return;\n\n m_playlist.set_focus (position);\n ensure_visible (position);\n}\n\nvoid PlaylistWidget::select_toggle (bool relative, int position)\n{\n position = adjust_position (relative, position);\n\n if (position == -1)\n return;\n\n m_playlist.select_entry (position, ! m_playlist.entry_selected (position));\n m_playlist.set_focus (position);\n ensure_visible (position);\n}\n\nvoid PlaylistWidget::select_move (bool relative, int position)\n{\n int focus = m_playlist.get_focus ();\n position = adjust_position (relative, position);\n\n if (focus == -1 || position == -1 || position == focus)\n return;\n\n focus += m_playlist.shift_entries (focus, position - focus);\n ensure_visible (focus);\n}\n\nvoid PlaylistWidget::delete_selected ()\n{\n m_playlist.remove_selected ();\n\n m_length = m_playlist.n_entries ();\n int focus = m_playlist.get_focus ();\n\n if (focus != -1)\n {\n m_playlist.select_entry (focus, true);\n ensure_visible (focus);\n }\n}\n\nbool PlaylistWidget::handle_keypress (QKeyEvent * event)\n{\n cancel_all ();\n\n auto CtrlShiftAlt = Qt::ShiftModifier | Qt::ControlModifier | Qt::AltModifier;\n switch (event->modifiers () & CtrlShiftAlt)\n {\n case Qt::NoModifier:\n switch (event->key ())\n {\n case Qt::Key_Up:\n select_single (true, -1);\n break;\n case Qt::Key_Down:\n select_single (true, 1);\n break;\n case Qt::Key_PageUp:\n select_single (true, -m_rows);\n break;\n case Qt::Key_PageDown:\n select_single (true, m_rows);\n break;\n case Qt::Key_Home:\n select_single (false, 0);\n break;\n case Qt::Key_End:\n select_single (false, m_length - 1);\n break;\n case Qt::Key_Return:\n select_single (true, 0);\n m_playlist.set_position (m_playlist.get_focus ());\n m_playlist.start_playback ();\n break;\n case Qt::Key_Escape:\n select_single (false, m_playlist.get_position ());\n break;\n case Qt::Key_Delete:\n delete_selected ();\n break;\n default:\n return false;\n }\n break;\n case Qt::ShiftModifier:\n switch (event->key ())\n {\n case Qt::Key_Up:\n select_extend (true, -1);\n break;\n case Qt::Key_Down:\n select_extend (true, 1);\n break;\n case Qt::Key_PageUp:\n select_extend (true, -m_rows);\n break;\n case Qt::Key_PageDown:\n select_extend (true, m_rows);\n break;\n case Qt::Key_Home:\n select_extend (false, 0);\n break;\n case Qt::Key_End:\n select_extend (false, m_length - 1);\n break;\n default:\n return false;\n }\n break;\n case Qt::ControlModifier:\n switch (event->key ())\n {\n case Qt::Key_Space:\n select_toggle (true, 0);\n break;\n case Qt::Key_Up:\n select_slide (true, -1);\n break;\n case Qt::Key_Down:\n select_slide (true, 1);\n break;\n case Qt::Key_PageUp:\n select_slide (true, -m_rows);\n break;\n case Qt::Key_PageDown:\n select_slide (true, m_rows);\n break;\n case Qt::Key_Home:\n select_slide (false, 0);\n break;\n case Qt::Key_End:\n select_slide (false, m_length - 1);\n break;\n default:\n return false;\n }\n break;\n case Qt::AltModifier:\n switch (event->key ())\n {\n case Qt::Key_Up:\n select_move (true, -1);\n break;\n case Qt::Key_Down:\n select_move (true, 1);\n break;\n case Qt::Key_PageUp:\n select_move (true, -m_rows);\n break;\n case Qt::Key_PageDown:\n select_move (true, m_rows);\n break;\n case Qt::Key_Home:\n select_move (false, 0);\n break;\n case Qt::Key_End:\n select_move (false, m_length - 1);\n break;\n default:\n return false;\n }\n break;\n default:\n return false;\n }\n\n refresh ();\n return true;\n}\n\nvoid PlaylistWidget::row_info (int * rows, int * first)\n{\n * rows = m_rows;\n * first = m_first;\n}\n\nvoid PlaylistWidget::scroll_to (int row)\n{\n cancel_all ();\n m_first = row;\n refresh ();\n}\n\nvoid PlaylistWidget::set_focused (int row)\n{\n cancel_all ();\n m_playlist.set_focus (row);\n ensure_visible (row);\n refresh ();\n}\n\nvoid PlaylistWidget::hover (int x, int y)\n{\n int row;\n\n if (y < m_offset)\n row = m_first;\n else if (y > m_offset + m_row_height * m_rows)\n row = m_first + m_rows;\n else\n row = m_first + (y - m_offset + m_row_height / 2) / m_row_height;\n\n if (row > m_length)\n row = m_length;\n\n if (row != m_hover)\n {\n m_hover = row;\n queue_draw ();\n }\n}\n\nint PlaylistWidget::hover_end ()\n{\n int temp = m_hover;\n m_hover = -1;\n\n queue_draw ();\n return temp;\n}\n\nbool PlaylistWidget::button_press (QMouseEvent * event)\n{\n int position = calc_position (event->y ());\n int state = event->modifiers () & (Qt::ShiftModifier | Qt::ControlModifier | Qt::AltModifier);\n\n cancel_all ();\n\n switch (event->type ())\n {\n case QEvent::MouseButtonPress:\n switch (event->button ())\n {\n case Qt::LeftButton:\n if (position == -1 || position == m_length)\n return true;\n\n switch (state)\n {\n case 0:\n if (m_playlist.entry_selected (position))\n select_slide (false, position);\n else\n select_single (false, position);\n\n m_drag = DRAG_MOVE;\n break;\n case Qt::ShiftModifier:\n select_extend (false, position);\n m_drag = DRAG_SELECT;\n break;\n case Qt::ControlModifier:\n select_toggle (false, position);\n m_drag = DRAG_SELECT;\n break;\n default:\n return true;\n }\n\n break;\n case Qt::RightButton:\n if (state)\n return true;\n\n if (position != -1 && position != m_length)\n {\n if (m_playlist.entry_selected (position))\n select_slide (false, position);\n else\n select_single (false, position);\n }\n\n menu_popup ((position == -1) ? UI_MENU_PLAYLIST :\n UI_MENU_PLAYLIST_CONTEXT, event->globalX (), event->globalY (),\n false, false);\n break;\n default:\n return false;\n }\n\n break;\n case QEvent::MouseButtonDblClick:\n if (event->button () != Qt::LeftButton || state || position == m_length)\n return true;\n\n if (position != -1)\n m_playlist.set_position (position);\n\n m_playlist.start_playback ();\n break;\n default:\n return true;\n }\n\n refresh ();\n return true;\n}\n\nbool PlaylistWidget::button_release (QMouseEvent * event)\n{\n cancel_all ();\n return true;\n}\n\nvoid PlaylistWidget::scroll_timeout ()\n{\n int position = adjust_position (true, m_scroll);\n if (position == -1)\n return;\n\n switch (m_drag)\n {\n case DRAG_SELECT:\n select_extend (false, position);\n break;\n case DRAG_MOVE:\n select_move (false, position);\n break;\n }\n\n refresh ();\n}\n\nbool PlaylistWidget::motion (QMouseEvent * event)\n{\n int position = calc_position (event->y ());\n\n if (m_drag)\n {\n if (position == -1 || position == m_length)\n {\n if (! m_scroll)\n scroll_timer.start ();\n\n m_scroll = (position == -1 ? -1 : 1);\n }\n else\n {\n if (m_scroll)\n {\n m_scroll = 0;\n scroll_timer.stop ();\n }\n\n switch (m_drag)\n {\n case DRAG_SELECT:\n select_extend (false, position);\n break;\n case DRAG_MOVE:\n select_move (false, position);\n break;\n }\n\n refresh ();\n }\n }\n else\n {\n if (position == -1 || position == m_length)\n cancel_all ();\n else if (aud_get_bool (\"show_filepopup_for_tuple\") && m_popup_pos != position)\n {\n cancel_all ();\n popup_trigger (position);\n }\n }\n\n return true;\n}\n\nvoid PlaylistWidget::dragEnterEvent (QDragEnterEvent * event)\n{\n dragMoveEvent (event);\n}\n\nvoid PlaylistWidget::dragMoveEvent (QDragMoveEvent * event)\n{\n const QMimeData * mimedata = event->mimeData();\n\n if (event->proposedAction () == Qt::CopyAction && mimedata->hasUrls ())\n {\n auto p = event->pos ();\n hover (p.x (), p.y ());\n event->acceptProposedAction ();\n }\n}\n\nvoid PlaylistWidget::dragLeaveEvent (QDragLeaveEvent *)\n{\n hover_end ();\n}\n\nvoid PlaylistWidget::dropEvent (QDropEvent * event)\n{\n const QMimeData * mimedata = event->mimeData();\n\n if (event->proposedAction () == Qt::CopyAction && mimedata->hasUrls ())\n {\n auto p = event->pos ();\n hover (p.x (), p.y ());\n\n Index<PlaylistAddItem> files;\n\n for (const auto &url: mimedata->urls())\n files.append (String (url.toEncoded ()));\n\n aud_drct_pl_add_list (std::move (files), hover_end ());\n event->acceptProposedAction ();\n }\n else\n {\n hover_end ();\n }\n}\n\nbool PlaylistWidget::leave ()\n{\n if (! m_drag)\n cancel_all ();\n\n return true;\n}\n\nvoid PlaylistWidget::popup_trigger (int pos)\n{\n audqt::infopopup_hide ();\n\n m_popup_pos = pos;\n m_popup_timer.queue (aud_get_int (\"filepopup_delay\") * 100,\n aud::obj_member<PlaylistWidget, & PlaylistWidget::popup_show>, this);\n}\n\nvoid PlaylistWidget::popup_show ()\n{\n audqt::infopopup_show (m_playlist, m_popup_pos);\n}\n\nvoid PlaylistWidget::popup_hide ()\n{\n audqt::infopopup_hide ();\n\n m_popup_pos = -1;\n m_popup_timer.stop ();\n}\n"} +{"text": "<?php\ndeclare(strict_types=1);\n\n/**\n * This file is part of the Carbon package.\n *\n * (c) Brian Nesbitt <brian@nesbot.com>\n *\n * For the full copyright and license information, please view the LICENSE\n * file that was distributed with this source code.\n */\nnamespace Tests\\Localization;\n\nclass SwTest extends LocalizationTestCase\n{\n const LOCALE = 'sw'; // Swahili\n\n const CASES = [\n // Carbon::parse('2018-01-04 00:00:00')->addDays(1)->calendar(Carbon::parse('2018-01-04 00:00:00'))\n 'kesho saa 00:00',\n // Carbon::parse('2018-01-04 00:00:00')->addDays(2)->calendar(Carbon::parse('2018-01-04 00:00:00'))\n 'wiki ijayo Jumamosi saat 00:00',\n // Carbon::parse('2018-01-04 00:00:00')->addDays(3)->calendar(Carbon::parse('2018-01-04 00:00:00'))\n 'wiki ijayo Jumapili saat 00:00',\n // Carbon::parse('2018-01-04 00:00:00')->addDays(4)->calendar(Carbon::parse('2018-01-04 00:00:00'))\n 'wiki ijayo Jumatatu saat 00:00',\n // Carbon::parse('2018-01-04 00:00:00')->addDays(5)->calendar(Carbon::parse('2018-01-04 00:00:00'))\n 'wiki ijayo Jumanne saat 00:00',\n // Carbon::parse('2018-01-04 00:00:00')->addDays(6)->calendar(Carbon::parse('2018-01-04 00:00:00'))\n 'wiki ijayo Jumatano saat 00:00',\n // Carbon::parse('2018-01-05 00:00:00')->addDays(6)->calendar(Carbon::parse('2018-01-05 00:00:00'))\n 'wiki ijayo Alhamisi saat 00:00',\n // Carbon::parse('2018-01-06 00:00:00')->addDays(6)->calendar(Carbon::parse('2018-01-06 00:00:00'))\n 'wiki ijayo Ijumaa saat 00:00',\n // Carbon::parse('2018-01-07 00:00:00')->addDays(2)->calendar(Carbon::parse('2018-01-07 00:00:00'))\n 'wiki ijayo Jumanne saat 00:00',\n // Carbon::parse('2018-01-07 00:00:00')->addDays(3)->calendar(Carbon::parse('2018-01-07 00:00:00'))\n 'wiki ijayo Jumatano saat 00:00',\n // Carbon::parse('2018-01-07 00:00:00')->addDays(4)->calendar(Carbon::parse('2018-01-07 00:00:00'))\n 'wiki ijayo Alhamisi saat 00:00',\n // Carbon::parse('2018-01-07 00:00:00')->addDays(5)->calendar(Carbon::parse('2018-01-07 00:00:00'))\n 'wiki ijayo Ijumaa saat 00:00',\n // Carbon::parse('2018-01-07 00:00:00')->addDays(6)->calendar(Carbon::parse('2018-01-07 00:00:00'))\n 'wiki ijayo Jumamosi saat 00:00',\n // Carbon::now()->subDays(2)->calendar()\n 'wiki iliyopita Jumapili saat 20:49',\n // Carbon::parse('2018-01-04 00:00:00')->subHours(2)->calendar(Carbon::parse('2018-01-04 00:00:00'))\n 'jana 22:00',\n // Carbon::parse('2018-01-04 12:00:00')->subHours(2)->calendar(Carbon::parse('2018-01-04 12:00:00'))\n 'leo saa 10:00',\n // Carbon::parse('2018-01-04 00:00:00')->addHours(2)->calendar(Carbon::parse('2018-01-04 00:00:00'))\n 'leo saa 02:00',\n // Carbon::parse('2018-01-04 23:00:00')->addHours(2)->calendar(Carbon::parse('2018-01-04 23:00:00'))\n 'kesho saa 01:00',\n // Carbon::parse('2018-01-07 00:00:00')->addDays(2)->calendar(Carbon::parse('2018-01-07 00:00:00'))\n 'wiki ijayo Jumanne saat 00:00',\n // Carbon::parse('2018-01-08 00:00:00')->subDay()->calendar(Carbon::parse('2018-01-08 00:00:00'))\n 'jana 00:00',\n // Carbon::parse('2018-01-04 00:00:00')->subDays(1)->calendar(Carbon::parse('2018-01-04 00:00:00'))\n 'jana 00:00',\n // Carbon::parse('2018-01-04 00:00:00')->subDays(2)->calendar(Carbon::parse('2018-01-04 00:00:00'))\n 'wiki iliyopita Jumanne saat 00:00',\n // Carbon::parse('2018-01-04 00:00:00')->subDays(3)->calendar(Carbon::parse('2018-01-04 00:00:00'))\n 'wiki iliyopita Jumatatu saat 00:00',\n // Carbon::parse('2018-01-04 00:00:00')->subDays(4)->calendar(Carbon::parse('2018-01-04 00:00:00'))\n 'wiki iliyopita Jumapili saat 00:00',\n // Carbon::parse('2018-01-04 00:00:00')->subDays(5)->calendar(Carbon::parse('2018-01-04 00:00:00'))\n 'wiki iliyopita Jumamosi saat 00:00',\n // Carbon::parse('2018-01-04 00:00:00')->subDays(6)->calendar(Carbon::parse('2018-01-04 00:00:00'))\n 'wiki iliyopita Ijumaa saat 00:00',\n // Carbon::parse('2018-01-03 00:00:00')->subDays(6)->calendar(Carbon::parse('2018-01-03 00:00:00'))\n 'wiki iliyopita Alhamisi saat 00:00',\n // Carbon::parse('2018-01-02 00:00:00')->subDays(6)->calendar(Carbon::parse('2018-01-02 00:00:00'))\n 'wiki iliyopita Jumatano saat 00:00',\n // Carbon::parse('2018-01-07 00:00:00')->subDays(2)->calendar(Carbon::parse('2018-01-07 00:00:00'))\n 'wiki iliyopita Ijumaa saat 00:00',\n // Carbon::parse('2018-01-01 00:00:00')->isoFormat('Qo Mo Do Wo wo')\n '1 1 1 1 1',\n // Carbon::parse('2018-01-02 00:00:00')->isoFormat('Do wo')\n '2 1',\n // Carbon::parse('2018-01-03 00:00:00')->isoFormat('Do wo')\n '3 1',\n // Carbon::parse('2018-01-04 00:00:00')->isoFormat('Do wo')\n '4 1',\n // Carbon::parse('2018-01-05 00:00:00')->isoFormat('Do wo')\n '5 1',\n // Carbon::parse('2018-01-06 00:00:00')->isoFormat('Do wo')\n '6 1',\n // Carbon::parse('2018-01-07 00:00:00')->isoFormat('Do wo')\n '7 1',\n // Carbon::parse('2018-01-11 00:00:00')->isoFormat('Do wo')\n '11 2',\n // Carbon::parse('2018-02-09 00:00:00')->isoFormat('DDDo')\n '40',\n // Carbon::parse('2018-02-10 00:00:00')->isoFormat('DDDo')\n '41',\n // Carbon::parse('2018-04-10 00:00:00')->isoFormat('DDDo')\n '100',\n // Carbon::parse('2018-02-10 00:00:00', 'Europe/Paris')->isoFormat('h:mm a z')\n '12:00 am CET',\n // Carbon::parse('2018-02-10 00:00:00')->isoFormat('h:mm A, h:mm a')\n '12:00 AM, 12:00 am',\n // Carbon::parse('2018-02-10 01:30:00')->isoFormat('h:mm A, h:mm a')\n '1:30 AM, 1:30 am',\n // Carbon::parse('2018-02-10 02:00:00')->isoFormat('h:mm A, h:mm a')\n '2:00 AM, 2:00 am',\n // Carbon::parse('2018-02-10 06:00:00')->isoFormat('h:mm A, h:mm a')\n '6:00 AM, 6:00 am',\n // Carbon::parse('2018-02-10 10:00:00')->isoFormat('h:mm A, h:mm a')\n '10:00 AM, 10:00 am',\n // Carbon::parse('2018-02-10 12:00:00')->isoFormat('h:mm A, h:mm a')\n '12:00 PM, 12:00 pm',\n // Carbon::parse('2018-02-10 17:00:00')->isoFormat('h:mm A, h:mm a')\n '5:00 PM, 5:00 pm',\n // Carbon::parse('2018-02-10 21:30:00')->isoFormat('h:mm A, h:mm a')\n '9:30 PM, 9:30 pm',\n // Carbon::parse('2018-02-10 23:00:00')->isoFormat('h:mm A, h:mm a')\n '11:00 PM, 11:00 pm',\n // Carbon::parse('2018-01-01 00:00:00')->ordinal('hour')\n '0',\n // Carbon::now()->subSeconds(1)->diffForHumans()\n 'tokea sekunde 1',\n // Carbon::now()->subSeconds(1)->diffForHumans(null, false, true)\n 'tokea se. 1',\n // Carbon::now()->subSeconds(2)->diffForHumans()\n 'tokea sekunde 2',\n // Carbon::now()->subSeconds(2)->diffForHumans(null, false, true)\n 'tokea se. 2',\n // Carbon::now()->subMinutes(1)->diffForHumans()\n 'tokea dakika 1',\n // Carbon::now()->subMinutes(1)->diffForHumans(null, false, true)\n 'tokea d. 1',\n // Carbon::now()->subMinutes(2)->diffForHumans()\n 'tokea dakika 2',\n // Carbon::now()->subMinutes(2)->diffForHumans(null, false, true)\n 'tokea d. 2',\n // Carbon::now()->subHours(1)->diffForHumans()\n 'tokea saa 1',\n // Carbon::now()->subHours(1)->diffForHumans(null, false, true)\n 'tokea saa 1',\n // Carbon::now()->subHours(2)->diffForHumans()\n 'tokea masaa 2',\n // Carbon::now()->subHours(2)->diffForHumans(null, false, true)\n 'tokea masaa 2',\n // Carbon::now()->subDays(1)->diffForHumans()\n 'tokea siku 1',\n // Carbon::now()->subDays(1)->diffForHumans(null, false, true)\n 'tokea si. 1',\n // Carbon::now()->subDays(2)->diffForHumans()\n 'tokea siku 2',\n // Carbon::now()->subDays(2)->diffForHumans(null, false, true)\n 'tokea si. 2',\n // Carbon::now()->subWeeks(1)->diffForHumans()\n 'tokea wiki 1',\n // Carbon::now()->subWeeks(1)->diffForHumans(null, false, true)\n 'tokea w. 1',\n // Carbon::now()->subWeeks(2)->diffForHumans()\n 'tokea wiki 2',\n // Carbon::now()->subWeeks(2)->diffForHumans(null, false, true)\n 'tokea w. 2',\n // Carbon::now()->subMonths(1)->diffForHumans()\n 'tokea mwezi 1',\n // Carbon::now()->subMonths(1)->diffForHumans(null, false, true)\n 'tokea mwezi 1',\n // Carbon::now()->subMonths(2)->diffForHumans()\n 'tokea miezi 2',\n // Carbon::now()->subMonths(2)->diffForHumans(null, false, true)\n 'tokea miezi 2',\n // Carbon::now()->subYears(1)->diffForHumans()\n 'tokea mwaka 1',\n // Carbon::now()->subYears(1)->diffForHumans(null, false, true)\n 'tokea mwaka 1',\n // Carbon::now()->subYears(2)->diffForHumans()\n 'tokea miaka 2',\n // Carbon::now()->subYears(2)->diffForHumans(null, false, true)\n 'tokea miaka 2',\n // Carbon::now()->addSecond()->diffForHumans()\n 'sekunde 1 baadaye',\n // Carbon::now()->addSecond()->diffForHumans(null, false, true)\n 'se. 1 baadaye',\n // Carbon::now()->addSecond()->diffForHumans(Carbon::now())\n 'sekunde 1 baada',\n // Carbon::now()->addSecond()->diffForHumans(Carbon::now(), false, true)\n 'se. 1 baada',\n // Carbon::now()->diffForHumans(Carbon::now()->addSecond())\n 'sekunde 1 kabla',\n // Carbon::now()->diffForHumans(Carbon::now()->addSecond(), false, true)\n 'se. 1 kabla',\n // Carbon::now()->addSecond()->diffForHumans(Carbon::now(), true)\n 'sekunde 1',\n // Carbon::now()->addSecond()->diffForHumans(Carbon::now(), true, true)\n 'se. 1',\n // Carbon::now()->diffForHumans(Carbon::now()->addSecond()->addSecond(), true)\n 'sekunde 2',\n // Carbon::now()->diffForHumans(Carbon::now()->addSecond()->addSecond(), true, true)\n 'se. 2',\n // Carbon::now()->addSecond()->diffForHumans(null, false, true, 1)\n 'se. 1 baadaye',\n // Carbon::now()->addMinute()->addSecond()->diffForHumans(null, true, false, 2)\n 'dakika 1 sekunde 1',\n // Carbon::now()->addYears(2)->addMonths(3)->addDay()->addSecond()->diffForHumans(null, true, true, 4)\n 'miaka 2 miezi 3 si. 1 se. 1',\n // Carbon::now()->addYears(3)->diffForHumans(null, null, false, 4)\n 'miaka 3 baadaye',\n // Carbon::now()->subMonths(5)->diffForHumans(null, null, true, 4)\n 'tokea miezi 5',\n // Carbon::now()->subYears(2)->subMonths(3)->subDay()->subSecond()->diffForHumans(null, null, true, 4)\n 'tokea miaka 2 miezi 3 si. 1 se. 1',\n // Carbon::now()->addWeek()->addHours(10)->diffForHumans(null, true, false, 2)\n 'wiki 1 masaa 10',\n // Carbon::now()->addWeek()->addDays(6)->diffForHumans(null, true, false, 2)\n 'wiki 1 siku 6',\n // Carbon::now()->addWeek()->addDays(6)->diffForHumans(null, true, false, 2)\n 'wiki 1 siku 6',\n // Carbon::now()->addWeek()->addDays(6)->diffForHumans([\"join\" => true, \"parts\" => 2])\n 'wiki 1 na siku 6 baadaye',\n // Carbon::now()->addWeeks(2)->addHour()->diffForHumans(null, true, false, 2)\n 'wiki 2 saa 1',\n // Carbon::now()->addHour()->diffForHumans([\"aUnit\" => true])\n 'saa limoja baadaye',\n // CarbonInterval::days(2)->forHumans()\n 'siku 2',\n // CarbonInterval::create('P1DT3H')->forHumans(true)\n 'si. 1 masaa 3',\n ];\n}\n"} +{"text": "# YAML support for the Go language\n\nIntroduction\n------------\n\nThe yaml package enables Go programs to comfortably encode and decode YAML\nvalues. It was developed within [Canonical](https://www.canonical.com) as\npart of the [juju](https://juju.ubuntu.com) project, and is based on a\npure Go port of the well-known [libyaml](http://pyyaml.org/wiki/LibYAML)\nC library to parse and generate YAML data quickly and reliably.\n\nCompatibility\n-------------\n\nThe yaml package supports most of YAML 1.1 and 1.2, including support for\nanchors, tags, map merging, etc. Multi-document unmarshalling is not yet\nimplemented, and base-60 floats from YAML 1.1 are purposefully not\nsupported since they're a poor design and are gone in YAML 1.2.\n\nInstallation and usage\n----------------------\n\nThe import path for the package is *gopkg.in/yaml.v2*.\n\nTo install it, run:\n\n go get gopkg.in/yaml.v2\n\nAPI documentation\n-----------------\n\nIf opened in a browser, the import path itself leads to the API documentation:\n\n * [https://gopkg.in/yaml.v2](https://gopkg.in/yaml.v2)\n\nAPI stability\n-------------\n\nThe package API for yaml v2 will remain stable as described in [gopkg.in](https://gopkg.in).\n\n\nLicense\n-------\n\nThe yaml package is licensed under the Apache License 2.0. Please see the LICENSE file for details.\n\n\nExample\n-------\n\n```Go\npackage main\n\nimport (\n \"fmt\"\n \"log\"\n\n \"gopkg.in/yaml.v2\"\n)\n\nvar data = `\na: Easy!\nb:\n c: 2\n d: [3, 4]\n`\n\n// Note: struct fields must be public in order for unmarshal to\n// correctly populate the data.\ntype T struct {\n A string\n B struct {\n RenamedC int `yaml:\"c\"`\n D []int `yaml:\",flow\"`\n }\n}\n\nfunc main() {\n t := T{}\n \n err := yaml.Unmarshal([]byte(data), &t)\n if err != nil {\n log.Fatalf(\"error: %v\", err)\n }\n fmt.Printf(\"--- t:\\n%v\\n\\n\", t)\n \n d, err := yaml.Marshal(&t)\n if err != nil {\n log.Fatalf(\"error: %v\", err)\n }\n fmt.Printf(\"--- t dump:\\n%s\\n\\n\", string(d))\n \n m := make(map[interface{}]interface{})\n \n err = yaml.Unmarshal([]byte(data), &m)\n if err != nil {\n log.Fatalf(\"error: %v\", err)\n }\n fmt.Printf(\"--- m:\\n%v\\n\\n\", m)\n \n d, err = yaml.Marshal(&m)\n if err != nil {\n log.Fatalf(\"error: %v\", err)\n }\n fmt.Printf(\"--- m dump:\\n%s\\n\\n\", string(d))\n}\n```\n\nThis example will generate the following output:\n\n```\n--- t:\n{Easy! {2 [3 4]}}\n\n--- t dump:\na: Easy!\nb:\n c: 2\n d: [3, 4]\n\n\n--- m:\nmap[a:Easy! b:map[c:2 d:[3 4]]]\n\n--- m dump:\na: Easy!\nb:\n c: 2\n d:\n - 3\n - 4\n```\n\n"} +{"text": "<?xml version='1.0' encoding='UTF-8'?>\n<resources>\n\t\n\t<string name=\"Pref_Export_Preference_Title\">إعدادات التصدير</string>\n\t<string name=\"Pref_Export_Preference_Summary\">اسم التصدير</string>\n\t\n\t<string name=\"Pref_Export_ExportName_Title\">نمط اسم الصورة</string>\n\t\n\t<string name=\"Pref_Export_ExportFormat_Title\">تنسيق اسم التصدير</string>\n\t\n\t<string name=\"Res_Export_SaveJPEG_Text\">حفظ التنسيق JPEG</string>\n\t<string name=\"Res_Export_SavePNG_Text\">حفظ التنسيق PNG</string>\n\t\n\t<string name=\"Res_Export_SaveAs_Text\">حفظ باسم</string>\n\t\n\t<string name=\"Pref_Export_SaveTo_Title\">تحديد موقع تخزين الصور</string>\n\t\n\t<string name=\"Pref_Export_UseGeoTagging_Title\">وضع علامات جغرافية</string>\n\t<string name=\"Pref_Export_UseGeoTagging_Summary\">إضافة علامات الموقع. تشغيل إعداد نظام \"موقع GPS\" للحصول على علامات جغرافية دقيقة</string>\n\t\n\t<string name=\"Pref_Export_SortByData_Title\">استخدام مجلدات مؤرخة</string>\n\t<string name=\"Pref_Export_SortByData_Summary\">حفظ الصور الناتجة في مجلد التاريخ الحالي</string>\n\n</resources>\n"} +{"text": "package com.merakianalytics.orianna.types.data.spectator;\n\nimport com.merakianalytics.orianna.types.data.CoreData;\n\npublic class Runes extends CoreData.ListProxy<Integer> {\n private static final long serialVersionUID = -3762685297780616690L;\n private int primaryPath, secondaryPath;\n\n public Runes() {\n super();\n }\n\n public Runes(final int initialCapacity) {\n super(initialCapacity);\n }\n\n @Override\n public boolean equals(final Object obj) {\n if(this == obj) {\n return true;\n }\n if(!super.equals(obj)) {\n return false;\n }\n if(getClass() != obj.getClass()) {\n return false;\n }\n final Runes other = (Runes)obj;\n if(primaryPath != other.primaryPath) {\n return false;\n }\n if(secondaryPath != other.secondaryPath) {\n return false;\n }\n return true;\n }\n\n /**\n * @return the primaryPath\n */\n public int getPrimaryPath() {\n return primaryPath;\n }\n\n /**\n * @return the secondaryPath\n */\n public int getSecondaryPath() {\n return secondaryPath;\n }\n\n @Override\n public int hashCode() {\n final int prime = 31;\n int result = super.hashCode();\n result = prime * result + primaryPath;\n result = prime * result + secondaryPath;\n return result;\n }\n\n /**\n * @param primaryPath\n * the primaryPath to set\n */\n public void setPrimaryPath(final int primaryPath) {\n this.primaryPath = primaryPath;\n }\n\n /**\n * @param secondaryPath\n * the secondaryPath to set\n */\n public void setSecondaryPath(final int secondaryPath) {\n this.secondaryPath = secondaryPath;\n }\n}\n"} +{"text": "# SOME DESCRIPTIVE TITLE.\n# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER\n# This file is distributed under the same license as the PACKAGE package.\n#\n# Translators:\n# Martin Persson <martin.jens.persson@gmail.com>, 2014\n# Olle Gustafsson <olle@dalnix.se>, 2013\n# Olle Gustafsson <olle@dalnix.se>, 2013,2015-2017\nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Modoboa\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2020-05-06 13:15+0200\\n\"\n\"PO-Revision-Date: 2017-07-07 09:30+0000\\n\"\n\"Last-Translator: Antoine Nguyen <tonio@ngyn.org>\\n\"\n\"Language-Team: Swedish (http://www.transifex.com/tonio/modoboa/language/\"\n\"sv/)\\n\"\n\"Language: sv\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: 8bit\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\n#: core/app_settings.py:26\nmsgid \"User profile\"\nmsgstr \"Användarprofil\"\n\n#: core/app_settings.py:39\nmsgid \"Authentication\"\nmsgstr \"Autentisering\"\n\n#: core/app_settings.py:42\nmsgid \"Authentication type\"\nmsgstr \"Autentiseringstyp\"\n\n#: core/app_settings.py:43\nmsgid \"Local\"\nmsgstr \"Lokal\"\n\n#: core/app_settings.py:46\nmsgid \"The backend used for authentication\"\nmsgstr \"Autentiserings backend\"\n\n#: core/app_settings.py:51\nmsgid \"Default password scheme\"\nmsgstr \"Standard lösenords schema\"\n\n#: core/app_settings.py:56\nmsgid \"Scheme used to crypt mailbox passwords\"\nmsgstr \"Krypteringsschema för brevlåde lösenord\"\n\n#: core/app_settings.py:60\nmsgid \"Rounds\"\nmsgstr \"Antal omgångar\"\n\n#: core/app_settings.py:63\nmsgid \"\"\n\"Number of rounds to use (only used by sha256crypt and sha512crypt). Must be \"\n\"between 1000 and 999999999, inclusive.\"\nmsgstr \"\"\n\"Antal omgångar att använda (används endast av sha256crypt och sha512crypt). \"\n\"Måste vara mellan 1000 och 999999999.\"\n\n#: core/app_settings.py:69\n#, fuzzy\n#| msgid \"Default password scheme\"\nmsgid \"Update password scheme at login\"\nmsgstr \"Standard lösenords schema\"\n\n#: core/app_settings.py:72\nmsgid \"Update user password at login to use the default password scheme\"\nmsgstr \"\"\n\n#: core/app_settings.py:77\nmsgid \"Default password\"\nmsgstr \"Standardlösenord\"\n\n#: core/app_settings.py:80\nmsgid \"Default password for automatically created accounts.\"\nmsgstr \"Standardlösenord för automatiskt skapade konton.\"\n\n#: core/app_settings.py:84\n#, fuzzy\n#| msgid \"Modoboa password reset\"\nmsgid \"Random password length\"\nmsgstr \"Modoboa lösenordsåterställning.\"\n\n#: core/app_settings.py:88\nmsgid \"Length of randomly generated passwords.\"\nmsgstr \"\"\n\n#: core/app_settings.py:92\n#, fuzzy\n#| msgid \"Default password scheme\"\nmsgid \"Update password service URL\"\nmsgstr \"Standard lösenords schema\"\n\n#: core/app_settings.py:96\nmsgid \"\"\n\"The URL of an external page where users will be able to update their \"\n\"password. It applies only to non local users, ie. those automatically \"\n\"created after a successful external authentication (LDAP, SMTP).\"\nmsgstr \"\"\n\n#: core/app_settings.py:104\nmsgid \"Password recovery announcement\"\nmsgstr \"\"\n\n#: core/app_settings.py:109\nmsgid \"A temporary message that will be displayed on the reset password page.\"\nmsgstr \"\"\n\n#: core/app_settings.py:115\nmsgid \"Enable password recovery by SMS\"\nmsgstr \"\"\n\n#: core/app_settings.py:118\nmsgid \"Enable password recovery by SMS for users who filled a phone number.\"\nmsgstr \"\"\n\n#: core/app_settings.py:124\nmsgid \"SMS provider\"\nmsgstr \"\"\n\n#: core/app_settings.py:127\nmsgid \"Choose a provider to send password recovery SMS\"\nmsgstr \"\"\n\n#: core/app_settings.py:133\nmsgid \"LDAP settings\"\nmsgstr \"LDAP inställningar\"\n\n#: core/app_settings.py:136\nmsgid \"Server address\"\nmsgstr \"Server adress\"\n\n#: core/app_settings.py:139\nmsgid \"The IP address or the DNS name of the LDAP server\"\nmsgstr \"IP adressen eller DNS namn för LDAP server\"\n\n#: core/app_settings.py:143\nmsgid \"Server port\"\nmsgstr \"Server port\"\n\n#: core/app_settings.py:145\nmsgid \"The TCP port number used by the LDAP server\"\nmsgstr \"TCP port som används av LDAP servern\"\n\n#: core/app_settings.py:149\nmsgid \"Enable secondary server (fallback)\"\nmsgstr \"\"\n\n#: core/app_settings.py:152\nmsgid \"\"\n\"Enable a secondary LDAP server which will be used if the primary one fails\"\nmsgstr \"\"\n\n#: core/app_settings.py:158\n#, fuzzy\n#| msgid \"Server address\"\nmsgid \"Secondary server address\"\nmsgstr \"Server adress\"\n\n#: core/app_settings.py:161\n#, fuzzy\n#| msgid \"The IP address or the DNS name of the LDAP server\"\nmsgid \"The IP address or the DNS name of the seondary LDAP server\"\nmsgstr \"IP adressen eller DNS namn för LDAP server\"\n\n#: core/app_settings.py:165\n#, fuzzy\n#| msgid \"Server port\"\nmsgid \"Secondary server port\"\nmsgstr \"Server port\"\n\n#: core/app_settings.py:168\n#, fuzzy\n#| msgid \"The TCP port number used by the LDAP server\"\nmsgid \"The TCP port number used by the LDAP secondary server\"\nmsgstr \"TCP port som används av LDAP servern\"\n\n#: core/app_settings.py:172\nmsgid \"Use a secured connection\"\nmsgstr \"Använd en säker anslutning\"\n\n#: core/app_settings.py:176\n#, fuzzy\n#| msgid \"Use an SSL/TLS connection to access the LDAP server\"\nmsgid \"Use an SSL/STARTTLS connection to access the LDAP server\"\nmsgstr \"Använd SSL/TLS anslutning för åtkomst till LDAP servern\"\n\n#: core/app_settings.py:180\nmsgid \"Active Directory\"\nmsgstr \"Active Directory\"\n\n#: core/app_settings.py:183\nmsgid \"Tell if the LDAP server is an Active Directory one\"\nmsgstr \"Berätta om LDAP-servern är en Active Directory\"\n\n#: core/app_settings.py:187\nmsgid \"Administrator groups\"\nmsgstr \"Administratörsgrupper\"\n\n#: core/app_settings.py:190\nmsgid \"\"\n\"Members of those LDAP Posix groups will be created as domain administrators. \"\n\"Use ';' characters to separate groups.\"\nmsgstr \"\"\n\"Användare av dessa LDAP Posix grupper kommer skapas som \"\n\"domänadministratörer. Använd ';' för att separera grupper.\"\n\n#: core/app_settings.py:197\nmsgid \"Group type\"\nmsgstr \"Grupptyp\"\n\n#: core/app_settings.py:201\nmsgid \"The LDAP group type to use with your directory.\"\nmsgstr \"Välj LDAP grupptyp att använda med din katalog\"\n\n#: core/app_settings.py:206\nmsgid \"Groups search base\"\nmsgstr \"Grupper sökbas\"\n\n#: core/app_settings.py:209\nmsgid \"The distinguished name of the search base used to find groups\"\nmsgstr \"Det unika namnet för sökbasen som används för att hitta grupper\"\n\n#: core/app_settings.py:215\nmsgid \"Password attribute\"\nmsgstr \"Lösenordsattribut\"\n\n#: core/app_settings.py:217\nmsgid \"The attribute used to store user passwords\"\nmsgstr \"Attribut som används för att lagra användarlösenord\"\n\n#: core/app_settings.py:222\n#, fuzzy\n#| msgid \"Authentication method\"\nmsgid \"LDAP authentication settings\"\nmsgstr \"Autentiseringsmetod\"\n\n#: core/app_settings.py:225\nmsgid \"Authentication method\"\nmsgstr \"Autentiseringsmetod\"\n\n#: core/app_settings.py:226\nmsgid \"Search and bind\"\nmsgstr \"Sök och bind\"\n\n#: core/app_settings.py:227\nmsgid \"Direct bind\"\nmsgstr \"Direkt bindning\"\n\n#: core/app_settings.py:229\nmsgid \"Choose the authentication method to use\"\nmsgstr \"Välj autentiseringsmetod att använda\"\n\n#: core/app_settings.py:233 core/app_settings.py:287\nmsgid \"Bind DN\"\nmsgstr \"Bind DN\"\n\n#: core/app_settings.py:236 core/app_settings.py:290\nmsgid \"\"\n\"The distinguished name to use when binding to the LDAP server. Leave empty \"\n\"for an anonymous bind\"\nmsgstr \"\"\n\"Det unika namnet för att använda vid bindningar till LDAP-servern. Lämna \"\n\"tomt för en anonym bindning\"\n\n#: core/app_settings.py:243 core/app_settings.py:297\nmsgid \"Bind password\"\nmsgstr \"Bind lösenord\"\n\n#: core/app_settings.py:246 core/app_settings.py:300\nmsgid \"The password to use when binding to the LDAP server (with 'Bind DN')\"\nmsgstr \"\"\n\"Lösenordet ska användas vid bindning till LDAP-servern (med \\\"Bind DN ')\"\n\n#: core/app_settings.py:254 core/app_settings.py:346\nmsgid \"Users search base\"\nmsgstr \"Användare sökbas\"\n\n#: core/app_settings.py:257 core/app_settings.py:349\nmsgid \"The distinguished name of the search base used to find users\"\nmsgstr \"Det unika namnet för sökbasen som används för att hitta användare\"\n\n#: core/app_settings.py:263 core/app_settings.py:355\nmsgid \"Search filter\"\nmsgstr \"Sökfilter\"\n\n#: core/app_settings.py:266 core/app_settings.py:358\nmsgid \"\"\n\"An optional filter string (e.g. '(objectClass=person)'). In order to be \"\n\"valid, it must be enclosed in parentheses.\"\nmsgstr \"\"\n\"En valfri filtersträng (t.ex. \\\"(objectClass = personer) '). För att vara \"\n\"giltigt måste det omges av parenteser.\"\n\n#: core/app_settings.py:273\nmsgid \"User DN template\"\nmsgstr \"Anvädar DN mall\"\n\n#: core/app_settings.py:276\n#, python-format\nmsgid \"\"\n\"The template used to construct a user's DN. It should contain one \"\n\"placeholder (ie. %(user)s)\"\nmsgstr \"\"\n\"Mallen som används för att konstruera en användares DN. Den bör innehålla en \"\n\"platshållare (dvs. %(user)s)\"\n\n#: core/app_settings.py:284\n#, fuzzy\n#| msgid \"LDAP settings\"\nmsgid \"LDAP synchronization settings\"\nmsgstr \"LDAP inställningar\"\n\n#: core/app_settings.py:308\nmsgid \"Enable export to LDAP\"\nmsgstr \"\"\n\n#: core/app_settings.py:311\nmsgid \"\"\n\"Enable automatic synchronization between local database and LDAP directory\"\nmsgstr \"\"\n\n#: core/app_settings.py:317\nmsgid \"Delete remote LDAP account when local account is deleted\"\nmsgstr \"\"\n\n#: core/app_settings.py:321\nmsgid \"\"\n\"Delete remote LDAP account when local account is deleted, otherwise it will \"\n\"be disabled.\"\nmsgstr \"\"\n\n#: core/app_settings.py:327\n#, fuzzy\n#| msgid \"User DN template\"\nmsgid \"Account DN template\"\nmsgstr \"Anvädar DN mall\"\n\n#: core/app_settings.py:330\n#, fuzzy, python-format\n#| msgid \"\"\n#| \"The template used to construct a user's DN. It should contain one \"\n#| \"placeholder (ie. %(user)s)\"\nmsgid \"\"\n\"The template used to construct an account's DN. It should contain one \"\n\"placeholder (ie. %(user)s)\"\nmsgstr \"\"\n\"Mallen som används för att konstruera en användares DN. Den bör innehålla en \"\n\"platshållare (dvs. %(user)s)\"\n\n#: core/app_settings.py:337\nmsgid \"Enable import from LDAP\"\nmsgstr \"\"\n\n#: core/app_settings.py:340\nmsgid \"Enable account synchronization from LDAP directory to local database\"\nmsgstr \"\"\n\n#: core/app_settings.py:365\n#, fuzzy\n#| msgid \"Password attribute\"\nmsgid \"Username attribute\"\nmsgstr \"Lösenordsattribut\"\n\n#: core/app_settings.py:368\nmsgid \"The name of the LDAP attribute where the username can be found.\"\nmsgstr \"\"\n\n#: core/app_settings.py:373\n#, fuzzy\n#| msgid \"Enable communication\"\nmsgid \"Enable Dovecot LDAP sync\"\nmsgstr \"Aktivera kommunikation\"\n\n#: core/app_settings.py:376\nmsgid \"LDAP authentication settings will be applied to Dovecot configuration.\"\nmsgstr \"\"\n\n#: core/app_settings.py:382\nmsgid \"Dovecot LDAP config file\"\nmsgstr \"\"\n\n#: core/app_settings.py:386\nmsgid \"\"\n\"Location of the configuration file which contains Dovecot LDAP settings.\"\nmsgstr \"\"\n\n#: core/app_settings.py:391 core/templates/core/dashboard.html:5\nmsgid \"Dashboard\"\nmsgstr \"Kontrollpanel\"\n\n#: core/app_settings.py:394\nmsgid \"Custom RSS feed\"\nmsgstr \"Användardefinierat RSS-flöde\"\n\n#: core/app_settings.py:397\nmsgid \"Display custom RSS feed to resellers and domain administrators\"\nmsgstr \"\"\n\"Visa användardefinierat RSS-flöde för återförsäljare och domänadministratörer\"\n\n#: core/app_settings.py:402\nmsgid \"Hide features widget\"\nmsgstr \"Dölj egenskaper widget\"\n\n#: core/app_settings.py:405\nmsgid \"Hide features widget for resellers and domain administrators\"\nmsgstr \"Dölj egenskaper widget för återförsäljare och domänadministratörer\"\n\n#: core/app_settings.py:409\nmsgid \"Notifications\"\nmsgstr \"Notifikationer\"\n\n#: core/app_settings.py:412\nmsgid \"Sender address\"\nmsgstr \"Avsändaradress\"\n\n#: core/app_settings.py:415\nmsgid \"Email address used to send notifications.\"\nmsgstr \"E-postadress som används till att skicka notifikationer.\"\n\n#: core/app_settings.py:419\nmsgid \"Public API\"\nmsgstr \"Publikt API\"\n\n#: core/app_settings.py:422\nmsgid \"Enable communication\"\nmsgstr \"Aktivera kommunikation\"\n\n#: core/app_settings.py:425\nmsgid \"Enable communication with Modoboa public API\"\nmsgstr \"Aktivera kommunikation med Modoboa publikt API\"\n\n#: core/app_settings.py:429\nmsgid \"Check new versions\"\nmsgstr \"Kontrollera nya versioner\"\n\n#: core/app_settings.py:432\nmsgid \"Automatically checks if a newer version is available\"\nmsgstr \"Kontrollera automatiskt om en nyare version finns\"\n\n#: core/app_settings.py:436\nmsgid \"Send an email when new versions are found\"\nmsgstr \"\"\n\n#: core/app_settings.py:439\nmsgid \"Send an email to notify admins about new versions\"\nmsgstr \"\"\n\n#: core/app_settings.py:443\nmsgid \"Recipient\"\nmsgstr \"\"\n\n#: core/app_settings.py:446\nmsgid \"Recipient of new versions notification emails.\"\nmsgstr \"\"\n\n#: core/app_settings.py:451\nmsgid \"Send statistics\"\nmsgstr \"Skicka statistik\"\n\n#: core/app_settings.py:454\nmsgid \"Send statistics to Modoboa public API (counters and used extensions)\"\nmsgstr \"\"\n\"Skicka statistik för Modoboas publika API (räknare och använda tillägg)\"\n\n#: core/app_settings.py:458\nmsgid \"Miscellaneous\"\nmsgstr \"Övrigt\"\n\n#: core/app_settings.py:461\nmsgid \"Inactive account threshold\"\nmsgstr \"\"\n\n#: core/app_settings.py:464\nmsgid \"\"\n\"An account with a last login date greater than this threshold (in days) will \"\n\"be considered as inactive\"\nmsgstr \"\"\n\n#: core/app_settings.py:470\nmsgid \"Top notifications check interval\"\nmsgstr \"Toppnotifikationer kontrollintervall\"\n\n#: core/app_settings.py:473\nmsgid \"Interval between two top notification checks (in seconds)\"\nmsgstr \"Intervall mellan två toppnotifikationskontroller (i sekunder)\"\n\n#: core/app_settings.py:478\nmsgid \"Maximum log record age\"\nmsgstr \"Maximal ålder för loggpost\"\n\n#: core/app_settings.py:480\nmsgid \"The maximum age in days of a log record\"\nmsgstr \"Maximal ålder i dagar för en logg post\"\n\n#: core/app_settings.py:484\nmsgid \"Items per page\"\nmsgstr \"Artiklar per sida\"\n\n#: core/app_settings.py:486\nmsgid \"Number of displayed items per page\"\nmsgstr \"Antal poster som visas per sida\"\n\n#: core/app_settings.py:490\nmsgid \"Default top redirection\"\nmsgstr \"Standard topp omdirigering\"\n\n#: core/app_settings.py:494\nmsgid \"The default redirection used when no application is specified\"\nmsgstr \"Standard omdirigering när ingen applikation angetts\"\n\n#: core/app_settings.py:548 core/app_settings.py:556 core/app_settings.py:564\nmsgid \"Invalid syntax\"\nmsgstr \"Ogiltig syntax\"\n\n#: core/app_settings.py:570\nmsgid \"Invalid rounds number\"\nmsgstr \"Ogiltigt antal omgångar\"\n\n#: core/app_settings.py:595 core/app_settings.py:597 core/app_settings.py:608\nmsgid \"This field is required\"\nmsgstr \"Detta fält är obligatoriskt\"\n\n#: core/apps.py:18\nmsgid \"General\"\nmsgstr \"Allmänt\"\n\n#: core/checks/settings_checks.py:6\nmsgid \"\"\n\"You have USE_TZ set to False, this may result in issues during transitions \"\n\"between summer/winter time (ie the same local time occuring twice due to \"\n\"clock change).\"\nmsgstr \"\"\n\n#: core/checks/settings_checks.py:9\nmsgid \"Set `USE_TZ = True` in settings.py\"\nmsgstr \"\"\n\n#: core/constants.py:6\nmsgid \"Simple user\"\nmsgstr \"Enkel användare\"\n\n#: core/constants.py:7\nmsgid \"Domain administrator\"\nmsgstr \"Domänadministratör\"\n\n#: core/constants.py:8\nmsgid \"Reseller\"\nmsgstr \"Återförsäljare\"\n\n#: core/constants.py:9\nmsgid \"Super administrator\"\nmsgstr \"Super administratör\"\n\n#: core/constants.py:52 lib/form_utils.py:389\nmsgid \"No\"\nmsgstr \"Nej\"\n\n#: core/constants.py:102\nmsgid \"Choose a provider\"\nmsgstr \"\"\n\n#: core/constants.py:107\nmsgid \"Dummy\"\nmsgstr \"\"\n\n#: core/forms.py:21\nmsgid \"Username\"\nmsgstr \"Användarnamn\"\n\n#: core/forms.py:25\nmsgid \"Password\"\nmsgstr \"Lösenord\"\n\n#: core/forms.py:38\nmsgid \"Old password\"\nmsgstr \"Gammalt lösenord\"\n\n#: core/forms.py:42\nmsgid \"New password\"\nmsgstr \"Nytt lösenord\"\n\n#: core/forms.py:46\nmsgid \"Confirmation\"\nmsgstr \"Bekräftelse\"\n\n#: core/forms.py:74\nmsgid \"Old password mismatchs\"\nmsgstr \"Gammalt lösenord matchar inte\"\n\n#: core/forms.py:83\nmsgid \"Passwords mismatch\"\nmsgstr \"Lösenord matchar inte\"\n\n#: core/forms.py:103\nmsgid \"Enable API access\"\nmsgstr \"Aktivera API access\"\n\n#: core/forms.py:137\n#, fuzzy\n#| msgid \"Notifications\"\nmsgid \"Verification code\"\nmsgstr \"Notifikationer\"\n\n#: core/forms.py:148\n#, fuzzy\n#| msgid \"Invalid line\"\nmsgid \"Invalid code\"\nmsgstr \"Ogiltig rad\"\n\n#: core/handlers.py:36\nmsgid \"added\"\nmsgstr \"tillagd\"\n\n#: core/handlers.py:39\nmsgid \"modified\"\nmsgstr \"ändrad\"\n\n#: core/handlers.py:41\n#, python-format\nmsgid \"%(object)s '%(name)s' %(action)s by user %(user)s\"\nmsgstr \"%(object)s '%(name)s' %(action)s av användare %(user)s\"\n\n#: core/handlers.py:63\n#, fuzzy, python-format\n#| msgid \"%(object)s '%(name)s' %(action)s by user %(user)s\"\nmsgid \"%(object)s '%(name)s' %(action)s by \"\nmsgstr \"%(object)s '%(name)s' %(action)s av användare %(user)s\"\n\n#: core/handlers.py:65\nmsgid \"deleted\"\nmsgstr \"raderad\"\n\n#: core/handlers.py:69\nmsgid \"user {}\"\nmsgstr \"\"\n\n#: core/handlers.py:71\nmsgid \"management command\"\nmsgstr \"\"\n\n#: core/handlers.py:95\nmsgid \"You can't delete your own account\"\nmsgstr \"Du kan inte radera ditt eget konto\"\n\n#: core/handlers.py:131\nmsgid \"One or more updates are available\"\nmsgstr \"En eller fler uppdateringar finns tillgängliga\"\n\n#: core/management/commands/communicate_with_public_api.py:44\n#, fuzzy\n#| msgid \"One or more updates are available\"\nmsgid \"[modoboa] Update(s) available\"\nmsgstr \"En eller fler uppdateringar finns tillgängliga\"\n\n#: core/models.py:55\nmsgid \"Allow mailboxes access\"\nmsgstr \"Tillåt åtkomst till brevlådor\"\n\n#: core/models.py:57\nmsgid \"Allow this administrator to access user mailboxes\"\nmsgstr \"Tillåt den här administratören att ändra användares brevlådor\"\n\n#: core/models.py:60\nmsgid \"password\"\nmsgstr \"lösenord\"\n\n#: core/models.py:63\nmsgid \"language\"\nmsgstr \"språk\"\n\n#: core/models.py:66\nmsgid \"Prefered language to display pages.\"\nmsgstr \"Önskat språk för att visa sidor.\"\n\n#: core/models.py:70\nmsgid \"Phone number\"\nmsgstr \"Telefonnummer\"\n\n#: core/models.py:72\nmsgid \"Secondary email\"\nmsgstr \"Sekundär e-post\"\n\n#: core/models.py:75\nmsgid \"An alternative e-mail address, can be used for recovery needs.\"\nmsgstr \"En alternativ e-post adress, kan användas för återställningsbehov.\"\n\n#: core/models.py:126\nmsgid \"Failed to update password: LDAP module not installed\"\nmsgstr \"Misslyckades med att uppdatera lösenord: LDAP modul ej installerad\"\n\n#: core/models.py:155\nmsgid \"account\"\nmsgstr \"konto\"\n\n#: core/models.py:282\nmsgid \"Unknown\"\nmsgstr \"Okänt\"\n\n#: core/models.py:316\nmsgid \"Invalid line\"\nmsgstr \"Ogiltig rad\"\n\n#: core/models.py:324\nmsgid \"You can't import an account with a role greater than yours\"\nmsgstr \"Du kan inte importera konto med en roll större än din\"\n\n#: core/models.py:339\n#, python-format\nmsgid \"The simple user '%s' must have a valid email address\"\nmsgstr \"Den enkla användaren '%s' måste ha en gällande e-postadress\"\n\n#: core/models.py:344\n#, python-format\nmsgid \"username and email fields must not differ for '%s'\"\nmsgstr \"användarnamn och e-post fält får inte avvika för '%s'\"\n\n#: core/password_validation.py:24\nmsgid \"Password must contain at least {} digit.\"\nmsgid_plural \"Password must contain at least {} digits.\"\nmsgstr[0] \"Lösenord måste hålla minst {} siffra.\"\nmsgstr[1] \"Lösenord måste hålla minst {} siffror.\"\n\n#: core/password_validation.py:34\nmsgid \"Password must contain at least {} lowercase letter.\"\nmsgid_plural \"Password must contain at least {} lowercase letters.\"\nmsgstr[0] \"Lösenord måste innehålla minst {} gemen.\"\nmsgstr[1] \"Lösenord måste innehålla minst {} gemener.\"\n\n#: core/password_validation.py:45\nmsgid \"Password must contain at least {} uppercase letter.\"\nmsgid_plural \"Password must contain at least {} uppercase letters.\"\nmsgstr[0] \"Lösenord måste innhåla minst {} versal.\"\nmsgstr[1] \"Lösenord måste innhåla minst {} versaler.\"\n\n#: core/password_validation.py:57\nmsgid \"Password must contain at least {} special character.\"\nmsgid_plural \"Password must contain at least {} special characters.\"\nmsgstr[0] \"Lösenord måste innehålla minst {} specialtecken.\"\nmsgstr[1] \"Lösenord måste innehålla minst {} specialtecken.\"\n\n#: core/password_validation.py:65\nmsgid \"Your password must contain a combination of different character types.\"\nmsgstr \"Ditt lösenord måste innehålla en kombination av olika typer av tecken.\"\n\n#: core/sms_backends/ovh.py:19\nmsgid \"API endpoint\"\nmsgstr \"\"\n\n#: core/sms_backends/ovh.py:22\nmsgid \"OVH Europe\"\nmsgstr \"\"\n\n#: core/sms_backends/ovh.py:23\nmsgid \"OVH US\"\nmsgstr \"\"\n\n#: core/sms_backends/ovh.py:24\nmsgid \"OVH North-America\"\nmsgstr \"\"\n\n#: core/sms_backends/ovh.py:25\nmsgid \"So you Start Europe\"\nmsgstr \"\"\n\n#: core/sms_backends/ovh.py:26\nmsgid \"So you Start North America\"\nmsgstr \"\"\n\n#: core/sms_backends/ovh.py:27\nmsgid \"Kimsufi Europe\"\nmsgstr \"\"\n\n#: core/sms_backends/ovh.py:28\nmsgid \"Kimsufi North America\"\nmsgstr \"\"\n\n#: core/sms_backends/ovh.py:35\n#, fuzzy\n#| msgid \"Applications\"\nmsgid \"Application key\"\nmsgstr \"Applikationer\"\n\n#: core/sms_backends/ovh.py:42\n#, fuzzy\n#| msgid \"Applications\"\nmsgid \"Application secret\"\nmsgstr \"Applikationer\"\n\n#: core/sms_backends/ovh.py:50\nmsgid \"Consumer key\"\nmsgstr \"\"\n\n#: core/templates/core/_current_features.html:6\nmsgid \"Features looking for sponsoring\"\nmsgstr \"Egenskaper som söker sponsring\"\n\n#: core/templates/core/_current_features.html:12\nmsgid \"Goal:\"\nmsgstr \"Mål:\"\n\n#: core/templates/core/_current_features.html:18\nmsgid \"More\"\nmsgstr \"Mer\"\n\n#: core/templates/core/_current_features.html:22\nmsgid \"Nothing to sponsor yet.\"\nmsgstr \"Inget at sponsra än.\"\n\n#: core/templates/core/_latest_news_widget.html:5\nmsgid \"Latest news\"\nmsgstr \"Senaste nytt\"\n\n#: core/templates/core/_latest_news_widget.html:19\nmsgid \"\"\n\"Visit the <a href=\\\"https://modoboa.org/blog/\\\" target=\\\"_blank\\\">official \"\n\"weblog</a> for more information.\"\nmsgstr \"\"\n\"Besök den <a href=\\\"https://modoboa.org/blog/\\\" target=\\\"_blank\\\">officiella \"\n\"bloggen</a> för mer information.\"\n\n#: core/templates/core/api_access.html:3\nmsgid \"API access\"\nmsgstr \"API åtkomst\"\n\n#: core/templates/core/api_access.html:3\nmsgid \"Control your access to Modoboa API\"\nmsgstr \"Kontrollera din åtskomst till Modoboa API\"\n\n#: core/templates/core/api_access.html:7\n#, python-format\nmsgid \"\"\n\"A documentation of the API is available <strong><a href=\\\"%(url)s\\\" target=\"\n\"\\\"_blank\\\">here</a></strong>.\"\nmsgstr \"\"\n\"Dokumentation över API:et finns <strong><a href=\\\"%(url)s\\\" target=\\\"_blank\"\n\"\\\">här</a></strong>.\"\n\n#: core/templates/core/api_access.html:14\nmsgid \"API access token\"\nmsgstr \"API åtkomst token\"\n\n#: core/templates/core/api_access.html:35\n#: core/templates/core/user_profile.html:19 lib/form_utils.py:354\nmsgid \"Update\"\nmsgstr \"Uppdatera\"\n\n#: core/templates/core/dashboard.html:11\n#, python-format\nmsgid \"Hello %(user)s.\"\nmsgstr \"Hej %(user)s.\"\n\n#: core/templates/core/information.html:2 core/templatetags/core_tags.py:62\nmsgid \"Information\"\nmsgstr \"Information\"\n\n#: core/templates/core/information.html:2\nmsgid \"Various information about Modoboa\"\nmsgstr \"Uppgifter om Modoboa\"\n\n#: core/templates/core/information.html:5\nmsgid \"One or more updates are available!\"\nmsgstr \"En eller flera uppdateringar finns tillgängliga!\"\n\n#: core/templates/core/information.html:6\nmsgid \"Check the following list to find the component(s) that can be updated.\"\nmsgstr \"\"\n\"Kontrollera följande lista för att se de komponenter som kan uppdateras.\"\n\n#: core/templates/core/information.html:10\nmsgid \"Applications\"\nmsgstr \"Applikationer\"\n\n#: core/templates/core/information.html:14\n#: core/templates/core/information.html:36\nmsgid \"Name\"\nmsgstr \"Namn\"\n\n#: core/templates/core/information.html:15\nmsgid \"Installed version\"\nmsgstr \"Installerad version\"\n\n#: core/templates/core/information.html:16\nmsgid \"Last version\"\nmsgstr \"Senaste version\"\n\n#: core/templates/core/information.html:17\nmsgid \"Description\"\nmsgstr \"Beskrivning\"\n\n#: core/templates/core/information.html:32\nmsgid \"Active users\"\nmsgstr \"Aktiva användare\"\n\n#: core/templates/core/information.html:37\nmsgid \"Role\"\nmsgstr \"Roll\"\n\n#: core/templates/core/information.html:38\nmsgid \"Last login\"\nmsgstr \"Senaste inloggad\"\n\n#: core/templates/core/logs.html:2 core/templatetags/core_tags.py:66\nmsgid \"Logs\"\nmsgstr \"Loggar\"\n\n#: core/templates/core/logs.html:2\nmsgid \"Previously on Modoboa...\"\nmsgstr \"Tidigare på Modoboa...\"\n\n#: core/templates/core/logs.html:6 lib/templatetags/lib_tags.py:106\nmsgid \"Date\"\nmsgstr \"Datum\"\n\n#: core/templates/core/logs.html:7\nmsgid \"Level\"\nmsgstr \"Nivå\"\n\n#: core/templates/core/logs.html:8\nmsgid \"Logger\"\nmsgstr \"Loggare\"\n\n#: core/templates/core/logs.html:9\nmsgid \"Message\"\nmsgstr \"Meddelande\"\n\n#: core/templates/core/notifications/update_available.html:3\n#, fuzzy\n#| msgid \"One or more updates are available\"\nmsgid \"\"\n\"\\n\"\n\" The following update is available:\\n\"\nmsgid_plural \"\"\n\"\\n\"\n\" The following updates are available:\\n\"\nmsgstr[0] \"En eller fler uppdateringar finns tillgängliga\"\nmsgstr[1] \"En eller fler uppdateringar finns tillgängliga\"\n\n#: core/templates/core/parameters.html:2 core/templatetags/core_tags.py:71\nmsgid \"Parameters\"\nmsgstr \"Parametrar\"\n\n#: core/templates/core/parameters.html:2\nmsgid \"Configure Modoboa\"\nmsgstr \"Konfigurera Modoboa\"\n\n#: core/templates/core/parameters.html:6\n#: core/templates/core/user_preferences.html:10\nmsgid \"Save\"\nmsgstr \"Spara\"\n\n#: core/templates/core/settings_header.html:5\nmsgid \"Modoboa settings\"\nmsgstr \"Modoboa inställningar\"\n\n#: core/templates/core/user_index.html:4 core/templatetags/core_tags.py:90\nmsgid \"Settings\"\nmsgstr \"Inställningar\"\n\n#: core/templates/core/user_preferences.html:2\n#: core/templatetags/core_tags.py:120\nmsgid \"Preferences\"\nmsgstr \"Inställningar\"\n\n#: core/templates/core/user_preferences.html:2\nmsgid \"Customize Modoboa\"\nmsgstr \"Anpassa Modoboa\"\n\n#: core/templates/core/user_preferences.html:14\nmsgid \"No preferences available.\"\nmsgstr \"Inga inställningar finns.\"\n\n#: core/templates/core/user_profile.html:3 core/templatetags/core_tags.py:116\nmsgid \"Profile\"\nmsgstr \"Profil\"\n\n#: core/templates/core/user_profile.html:3\nmsgid \"Update your personal information\"\nmsgstr \"Uppdatera personlig information\"\n\n#: core/templates/core/user_profile.html:13\n#, fuzzy\n#| msgid \"Failed to update password: {}\"\nmsgid \"Click here to update your password\"\nmsgstr \"Misslyckades med att uppdatera lösenord: {}\"\n\n#: core/templatetags/core_tags.py:34\nmsgid \"Modoboa\"\nmsgstr \"Modoboa\"\n\n#: core/templatetags/core_tags.py:102\nmsgid \"Logout\"\nmsgstr \"Logga ut\"\n\n#: core/templatetags/core_tags.py:127\nmsgid \"API\"\nmsgstr \"API\"\n\n#: core/utils.py:32\nmsgid \"The core part of Modoboa\"\nmsgstr \"Kärnan av Modoboa\"\n\n#: core/views/admin.py:43\nmsgid \"Parameters saved\"\nmsgstr \"Parametrar sparade\"\n\n#: core/views/auth.py:59\n#, python-format\nmsgid \"Password scheme mismatch. Updating %s password\"\nmsgstr \"\"\n\n#: core/views/auth.py:66\n#, python-format\nmsgid \"Password hash parameter missmatch. Updating %s password\"\nmsgstr \"\"\n\n#: core/views/auth.py:82\n#, python-format\nmsgid \"User '%s' successfully logged in\"\nmsgstr \"Användare '%s' har loggat in\"\n\n#: core/views/auth.py:90\nmsgid \"Your username and password didn't match. Please try again.\"\nmsgstr \"Ditt användarnamn och lösenord matchar inte. Var vänlig försök igen.\"\n\n#: core/views/auth.py:125\nmsgid \"User '{}' successfully logged out\"\nmsgstr \"Användare '{}' loggade ut framgångsrikt\"\n\n#: core/views/auth.py:170 core/views/auth.py:225\nmsgid \"Please use the following code to recover your Modoboa password: {}\"\nmsgstr \"\"\n\n#: core/views/user.py:53\nmsgid \"Profile updated\"\nmsgstr \"Profil uppdaterad\"\n\n#: core/views/user.py:81\nmsgid \"Preferences saved\"\nmsgstr \"Inställningar sparade\"\n\n#: core/views/user.py:103\nmsgid \"Access updated\"\nmsgstr \"Åtkomst uppdaterad\"\n\n#: lib/db_utils.py:23\n#, python-format\nmsgid \"Connection to database %s not configured\"\nmsgstr \"Anslutning till databasen %s är inte konfigurerad\"\n\n#: lib/email_utils.py:141 lib/email_utils.py:360\nmsgid \"unable to determine encoding of string\"\nmsgstr \"\"\n\n#: lib/exceptions.py:67\n#, python-format\nmsgid \"Permission denied: %s\"\nmsgstr \"Tillstånd nekas: %s\"\n\n#: lib/exceptions.py:68\nmsgid \"Permission denied\"\nmsgstr \"Tillstånd nekas\"\n\n#: lib/fields.py:15 lib/validators.py:14\nmsgid \"Enter a valid domain name\"\nmsgstr \"Skriv in ett giltigt domännamn\"\n\n#: lib/fields.py:44 lib/fields.py:58\nmsgid \"Enter a valid email address.\"\nmsgstr \"Ange en giltig e-postadress\"\n\n#: lib/form_utils.py:77 templates/registration/password_reset_confirm.html:12\n#: templates/registration/password_reset_confirm_code.html:25\n#: templates/registration/password_reset_form.html:29\nmsgid \"Submit\"\nmsgstr \"Skicka\"\n\n#: lib/form_utils.py:110 lib/form_utils.py:113\nmsgid \"Invalid request\"\nmsgstr \"Ogiltig förfrågan\"\n\n#: lib/form_utils.py:388\nmsgid \"Yes\"\nmsgstr \"Ja\"\n\n#: lib/ldap_utils.py:129\nmsgid \"Failed to update password: {}\"\nmsgstr \"Misslyckades med att uppdatera lösenord: {}\"\n\n#: lib/templatetags/lib_tags.py:104\nmsgid \"From\"\nmsgstr \"Från\"\n\n#: lib/templatetags/lib_tags.py:105\nmsgid \"To\"\nmsgstr \"Till\"\n\n#: lib/templatetags/lib_tags.py:107 templates/common/email_searchbar.html:17\nmsgid \"Subject\"\nmsgstr \"Ämne\"\n\n#: templates/404.html:4 templates/500.html:4\nmsgid \"Sorry\"\nmsgstr \"Ursäkta\"\n\n#: templates/404.html:5\nmsgid \"The requested page does not exist.\"\nmsgstr \"Den begärda sidan finns inte.\"\n\n#: templates/500.html:5\nmsgid \"An internal error occured.\"\nmsgstr \"Ett internt fel uppstod.\"\n\n#: templates/common/email_searchbar.html:5\nmsgid \"Search...\"\nmsgstr \"Sök...\"\n\n#: templates/common/email_searchbar.html:10\nmsgid \"From address\"\nmsgstr \"Från adress\"\n\n#: templates/common/email_searchbar.html:33\nmsgid \"Both\"\nmsgstr \"Båda\"\n\n#: templates/common/error.html:4\nmsgid \"Error:\"\nmsgstr \"Fel:\"\n\n#: templates/common/generic_field.html:11\n#: templates/common/generic_fields_group.html:8\nmsgid \"Help:\"\nmsgstr \"Hjälp:\"\n\n#: templates/common/generic_modal.html:6 templates/common/generic_modal.html:13\n#: templates/common/wizard_forms.html:6 templates/common/wizard_forms.html:27\nmsgid \"Close\"\nmsgstr \"Stäng\"\n\n#: templates/common/wizard_forms.html:31\nmsgid \"Previous\"\nmsgstr \"Föregående\"\n\n#: templates/common/wizard_forms.html:32\nmsgid \"Next\"\nmsgstr \"Nästa\"\n\n#: templates/registration/base.html:8\nmsgid \"Welcome to Modoboa\"\nmsgstr \"Välkommen till Modoboa\"\n\n#: templates/registration/login.html:21\nmsgid \"Remember me\"\nmsgstr \"Kom ihåg mig\"\n\n#: templates/registration/login.html:23\nmsgid \"Log in\"\nmsgstr \"Logga in\"\n\n#: templates/registration/login.html:24\n#: templates/registration/password_reset_form.html:17\nmsgid \"Forgot password?\"\nmsgstr \"Glömt ditt lösenord?\"\n\n#: templates/registration/password_reset_complete.html:8\n#, python-format\nmsgid \"\"\n\"Your password has been set. You may go ahead and <a href=\\\"%(url)s\\\">sign \"\n\"in</a> now.\"\nmsgstr \"\"\n\"Ditt lösenord har ändrats. Du kan fortsätta med att <a href=\\\"%(url)s\"\n\"\\\">logga in</a>.\"\n\n#: templates/registration/password_reset_confirm.html:7\nmsgid \"Change password\"\nmsgstr \"Ändra lösenord\"\n\n#: templates/registration/password_reset_confirm.html:17\nmsgid \"\"\n\"The password reset link was invalid, possibly because it has already been \"\n\"used. Please request a new password reset.\"\nmsgstr \"\"\n\"Lösenordets återställningslänk är ogiltig, förmodligen för att den redan \"\n\"använts. Var vänlig begär en ny återställning av lösenord.\"\n\n#: templates/registration/password_reset_confirm_code.html:20\nmsgid \"Enter the code you've just received by SMS\"\nmsgstr \"\"\n\n#: templates/registration/password_reset_confirm_code.html:27\nmsgid \"Resend code\"\nmsgstr \"\"\n\n#: templates/registration/password_reset_done.html:7\nmsgid \"\"\n\"<p>We've emailed you instructions for setting your password, if an account \"\n\"exists with the email you entered. You should receive them shortly.</p> \"\n\"<p>If you don't receive an email, please make sure you've entered your \"\n\"primary address, and check your spam folder.</p>\"\nmsgstr \"\"\n\"<p>Vi har e-postat dig instruktioner för att ändra ditt lösenord, om ett \"\n\"konto finns med den e-post adress du angav. Du borde få detta brev inom kort.\"\n\"</p> <p>Om du inte fått något brev, var vänlig kontrollera att du angav rätt \"\n\"e-post adress, och kolla din skräpkatalog.</p>\"\n\n#: templates/registration/password_reset_email.html:4\n#, python-format\nmsgid \"\"\n\"To initiate the password reset process for your %(username)s Modoboa \"\n\"account, click the link below:\"\nmsgstr \"\"\n\"För att starta processen för återställning av lösenord för ditt %(username)s \"\n\"Modoboa konto, klicka på länken nedanför:\"\n\n#: templates/registration/password_reset_email.html:10\nmsgid \"\"\n\"If clicking the link above doesn't work, please copy and paste the URL in a \"\n\"new browser window instead.\"\nmsgstr \"\"\n\"Om det ej går att klicka på länken, klipp och klistra länken i ett nytt \"\n\"webbläsarfönster istället.\"\n\n#: templates/registration/password_reset_email.html:14\nmsgid \"Sincerely, The Modoboa Team.\"\nmsgstr \"Vänligen, Modoboa teamet.\"\n\n#: templates/registration/password_reset_form.html:24\nmsgid \"Please fill-in your primary email address\"\nmsgstr \"\"\n\n#: templates/registration/password_reset_subject.txt:3\nmsgid \"Modoboa password reset\"\nmsgstr \"Modoboa lösenordsåterställning.\"\n\n#~ msgid \"md5crypt (weak)\"\n#~ msgstr \"md5crypt (svag)\"\n\n#~ msgid \"sha256 (weak)\"\n#~ msgstr \"sha256 (svag)\"\n\n#~ msgid \"md5 (weak)\"\n#~ msgstr \"md5 (svag)\"\n\n#~ msgid \"crypt (weak)\"\n#~ msgstr \"crypt (svag)\"\n\n#~ msgid \"plain (weak)\"\n#~ msgstr \"okrypterad (svag)\"\n\n#~ msgid \"Secret key\"\n#~ msgstr \"Hemlig nyckel\"\n\n#~ msgid \"Key used to encrypt/decrypt passwords\"\n#~ msgstr \"Nyckel som används för att kryptera / dekryptera lösenord\"\n\n#~ msgid \"Key must be either 16, 24, or 32 bytes long\"\n#~ msgstr \"Nyckel måste vara endera 16, 24 eller 32 bytes lång\"\n"} +{"text": "// Copyright 2009 the Sputnik authors. All rights reserved.\n// This code is governed by the BSD license found in the LICENSE file.\n\n/**\n * @name: S11.13.2_A4.10_T2.1;\n * @section: 11.13.2, 11.10.2;\n * @assertion: The production x ^= y is the same as x = x ^ y; \n * @description: Type(x) is different from Type(y) and both types vary between Number (primitive or object) and Boolean (primitive and object);\n */\n\n//CHECK#1\nx = true;\nx ^= 1;\nif (x !== 0) {\n $ERROR('#1: x = true; x ^= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#2\nx = 1;\nx ^= true;\nif (x !== 0) {\n $ERROR('#2: x = 1; x ^= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#3\nx = new Boolean(true);\nx ^= 1;\nif (x !== 0) {\n $ERROR('#3: x = new Boolean(true); x ^= 1; x === 0. Actual: ' + (x));\n}\n\n//CHECK#4\nx = 1;\nx ^= new Boolean(true);\nif (x !== 0) {\n $ERROR('#4: x = 1; x ^= new Boolean(true); x === 0. Actual: ' + (x));\n}\n\n//CHECK#5\nx = true;\nx ^= new Number(1);\nif (x !== 0) {\n $ERROR('#5: x = true; x ^= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#6\nx = new Number(1);\nx ^= true;\nif (x !== 0) {\n $ERROR('#6: x = new Number(1); x ^= true; x === 0. Actual: ' + (x));\n}\n\n//CHECK#7\nx = new Boolean(true);\nx ^= new Number(1);\nif (x !== 0) {\n $ERROR('#7: x = new Boolean(true); x ^= new Number(1); x === 0. Actual: ' + (x));\n}\n\n//CHECK#8\nx = new Number(1);\nx ^= new Boolean(true);\nif (x !== 0) {\n $ERROR('#8: x = new Number(1); x ^= new Boolean(true); x === 0. Actual: ' + (x));\n}\n"} +{"text": "AF: Afghanistan\nAX: 'Åland Islands'\nAL: Albania\nDZ: Algeria\nAS: 'American Samoa'\nAD: Andorra\nAO: Angola\nAI: Anguilla\nAQ: Antarctica\nAG: 'Antigua & Barbuda'\nAR: Argentina\nAM: Armenia\nAW: Aruba\nAU: Australia\nAT: Austria\nAZ: Azerbaijan\nBS: Bahamas\nBH: Bahrain\nBD: Bangladesh\nBB: Barbados\nBY: Belarus\nBE: Belgium\nBZ: Belize\nBJ: Benin\nBM: Bermuda\nBT: Bhutan\nBO: Bolivia\nBA: 'Bosnia & Herzegovina'\nBW: Botswana\nBV: 'Bouvet Island'\nBR: Brazil\nIO: 'British Indian Ocean Territory'\nVG: 'British Virgin Islands'\nBN: Brunei\nBG: Bulgaria\nBF: 'Burkina Faso'\nBI: Burundi\nKH: Cambodia\nCM: Cameroon\nCA: Canada\nCV: 'Cape Verde'\nBQ: 'Caribbean Netherlands'\nKY: 'Cayman Islands'\nCF: 'Central African Republic'\nTD: Chad\nCL: Chile\nCN: China\nCX: 'Christmas Island'\nCC: 'Cocos (Keeling) Islands'\nCO: Colombia\nKM: Comoros\nCG: 'Congo - Brazzaville'\nCD: 'Congo - Kinshasa'\nCK: 'Cook Islands'\nCR: 'Costa Rica'\nCI: 'Côte d’Ivoire'\nHR: Croatia\nCU: Cuba\nCW: Curaçao\nCY: Cyprus\nCZ: Czechia\nDK: Denmark\nDJ: Djibouti\nDM: Dominica\nDO: 'Dominican Republic'\nEC: Ecuador\nEG: Egypt\nSV: 'El Salvador'\nGQ: 'Equatorial Guinea'\nER: Eritrea\nEE: Estonia\nSZ: Eswatini\nET: Ethiopia\nFK: 'Falkland Islands'\nFO: 'Faroe Islands'\nFJ: Fiji\nFI: Finland\nFR: France\nGF: 'French Guiana'\nPF: 'French Polynesia'\nTF: 'French Southern Territories'\nGA: Gabon\nGM: Gambia\nGE: Georgia\nDE: Germany\nGH: Ghana\nGI: Gibraltar\nGR: Greece\nGL: Greenland\nGD: Grenada\nGP: Guadeloupe\nGU: Guam\nGT: Guatemala\nGG: Guernsey\nGN: Guinea\nGW: Guinea-Bissau\nGY: Guyana\nHT: Haiti\nHM: 'Heard & McDonald Islands'\nHN: Honduras\nHK: 'Hong Kong SAR China'\nHU: Hungary\nIS: Iceland\nIN: India\nID: Indonesia\nIR: Iran\nIQ: Iraq\nIE: Ireland\nIM: 'Isle of Man'\nIL: Israel\nIT: Italy\nJM: Jamaica\nJP: Japan\nJE: Jersey\nJO: Jordan\nKZ: Kazakhstan\nKE: Kenya\nKI: Kiribati\nKW: Kuwait\nKG: Kyrgyzstan\nLA: Laos\nLV: Latvia\nLB: Lebanon\nLS: Lesotho\nLR: Liberia\nLY: Libya\nLI: Liechtenstein\nLT: Lithuania\nLU: Luxembourg\nMO: 'Macao SAR China'\nMG: Madagascar\nMW: Malawi\nMY: Malaysia\nMV: Maldives\nML: Mali\nMT: Malta\nMH: 'Marshall Islands'\nMQ: Martinique\nMR: Mauritania\nMU: Mauritius\nYT: Mayotte\nMX: Mexico\nFM: Micronesia\nMD: Moldova\nMC: Monaco\nMN: Mongolia\nME: Montenegro\nMS: Montserrat\nMA: Morocco\nMZ: Mozambique\nMM: 'Myanmar (Burma)'\nNA: Namibia\nNR: Nauru\nNP: Nepal\nNL: Netherlands\nNC: 'New Caledonia'\nNZ: 'New Zealand'\nNI: Nicaragua\nNE: Niger\nNG: Nigeria\nNU: Niue\nNF: 'Norfolk Island'\nKP: 'North Korea'\nMK: 'North Macedonia'\nMP: 'Northern Mariana Islands'\n'NO': Norway\nOM: Oman\nPK: Pakistan\nPW: Palau\nPS: 'Palestinian Territories'\nPA: Panama\nPG: 'Papua New Guinea'\nPY: Paraguay\nPE: Peru\nPH: Philippines\nPN: 'Pitcairn Islands'\nPL: Poland\nPT: Portugal\nPR: 'Puerto Rico'\nQA: Qatar\nRE: Réunion\nRO: Romania\nRU: Russia\nRW: Rwanda\nWS: Samoa\nSM: 'San Marino'\nST: 'São Tomé & Príncipe'\nSA: 'Saudi Arabia'\nSN: Senegal\nRS: Serbia\nSC: Seychelles\nSL: 'Sierra Leone'\nSG: Singapore\nSX: 'Sint Maarten'\nSK: Slovakia\nSI: Slovenia\nSB: 'Solomon Islands'\nSO: Somalia\nZA: 'South Africa'\nGS: 'South Georgia & South Sandwich Islands'\nKR: 'South Korea'\nSS: 'South Sudan'\nES: Spain\nLK: 'Sri Lanka'\nBL: 'St. Barthélemy'\nSH: 'St. Helena'\nKN: 'St. Kitts & Nevis'\nLC: 'St. Lucia'\nMF: 'St. Martin'\nPM: 'St. Pierre & Miquelon'\nVC: 'St. Vincent & Grenadines'\nSD: Sudan\nSR: Suriname\nSJ: 'Svalbard & Jan Mayen'\nSE: Sweden\nCH: Switzerland\nSY: Syria\nTW: Taiwan\nTJ: Tajikistan\nTZ: Tanzania\nTH: Thailand\nTL: Timor-Leste\nTG: Togo\nTK: Tokelau\nTO: Tonga\nTT: 'Trinidad & Tobago'\nTN: Tunisia\nTR: Turkey\nTM: Turkmenistan\nTC: 'Turks & Caicos Islands'\nTV: Tuvalu\nUM: 'U.S. Outlying Islands'\nVI: 'U.S. Virgin Islands'\nUG: Uganda\nUA: Ukraine\nAE: 'United Arab Emirates'\nGB: 'United Kingdom'\nUS: 'United States'\nUY: Uruguay\nUZ: Uzbekistan\nVU: Vanuatu\nVA: 'Vatican City'\nVE: Venezuela\nVN: Vietnam\nWF: 'Wallis & Futuna'\nEH: 'Western Sahara'\nYE: Yemen\nZM: Zambia\nZW: Zimbabwe\n"} +{"text": "// Copyright 2014 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// +build !gccgo\n\n#include \"textflag.h\"\n\n//\n// System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go\n//\n\nTEXT ·sysvicall6(SB),NOSPLIT,$0-88\n\tJMP\tsyscall·sysvicall6(SB)\n\nTEXT ·rawSysvicall6(SB),NOSPLIT,$0-88\n\tJMP\tsyscall·rawSysvicall6(SB)\n"} +{"text": "/****************************************************************************\n *\n * pshglob.c\n *\n * PostScript hinter global hinting management (body).\n * Inspired by the new auto-hinter module.\n *\n * Copyright (C) 2001-2019 by\n * David Turner, Robert Wilhelm, and Werner Lemberg.\n *\n * This file is part of the FreeType project, and may only be used\n * modified and distributed under the terms of the FreeType project\n * license, LICENSE.TXT. By continuing to use, modify, or distribute\n * this file you indicate that you have read the license and\n * understand and accept it fully.\n *\n */\n\n\n#include <ft2build.h>\n#include FT_FREETYPE_H\n#include FT_INTERNAL_OBJECTS_H\n#include FT_INTERNAL_CALC_H\n#include \"pshglob.h\"\n\n#ifdef DEBUG_HINTER\n PSH_Globals ps_debug_globals = NULL;\n#endif\n\n\n /*************************************************************************/\n /*************************************************************************/\n /***** *****/\n /***** STANDARD WIDTHS *****/\n /***** *****/\n /*************************************************************************/\n /*************************************************************************/\n\n\n /* scale the widths/heights table */\n static void\n psh_globals_scale_widths( PSH_Globals globals,\n FT_UInt direction )\n {\n PSH_Dimension dim = &globals->dimension[direction];\n PSH_Widths stdw = &dim->stdw;\n FT_UInt count = stdw->count;\n PSH_Width width = stdw->widths;\n PSH_Width stand = width; /* standard width/height */\n FT_Fixed scale = dim->scale_mult;\n\n\n if ( count > 0 )\n {\n width->cur = FT_MulFix( width->org, scale );\n width->fit = FT_PIX_ROUND( width->cur );\n\n width++;\n count--;\n\n for ( ; count > 0; count--, width++ )\n {\n FT_Pos w, dist;\n\n\n w = FT_MulFix( width->org, scale );\n dist = w - stand->cur;\n\n if ( dist < 0 )\n dist = -dist;\n\n if ( dist < 128 )\n w = stand->cur;\n\n width->cur = w;\n width->fit = FT_PIX_ROUND( w );\n }\n }\n }\n\n\n#if 0\n\n /* org_width is in font units, result in device pixels, 26.6 format */\n FT_LOCAL_DEF( FT_Pos )\n psh_dimension_snap_width( PSH_Dimension dimension,\n FT_Int org_width )\n {\n FT_UInt n;\n FT_Pos width = FT_MulFix( org_width, dimension->scale_mult );\n FT_Pos best = 64 + 32 + 2;\n FT_Pos reference = width;\n\n\n for ( n = 0; n < dimension->stdw.count; n++ )\n {\n FT_Pos w;\n FT_Pos dist;\n\n\n w = dimension->stdw.widths[n].cur;\n dist = width - w;\n if ( dist < 0 )\n dist = -dist;\n if ( dist < best )\n {\n best = dist;\n reference = w;\n }\n }\n\n if ( width >= reference )\n {\n width -= 0x21;\n if ( width < reference )\n width = reference;\n }\n else\n {\n width += 0x21;\n if ( width > reference )\n width = reference;\n }\n\n return width;\n }\n\n#endif /* 0 */\n\n\n /*************************************************************************/\n /*************************************************************************/\n /***** *****/\n /***** BLUE ZONES *****/\n /***** *****/\n /*************************************************************************/\n /*************************************************************************/\n\n static void\n psh_blues_set_zones_0( PSH_Blues target,\n FT_Bool is_others,\n FT_UInt read_count,\n FT_Short* read,\n PSH_Blue_Table top_table,\n PSH_Blue_Table bot_table )\n {\n FT_UInt count_top = top_table->count;\n FT_UInt count_bot = bot_table->count;\n FT_Bool first = 1;\n\n FT_UNUSED( target );\n\n\n for ( ; read_count > 1; read_count -= 2 )\n {\n FT_Int reference, delta;\n FT_UInt count;\n PSH_Blue_Zone zones, zone;\n FT_Bool top;\n\n\n /* read blue zone entry, and select target top/bottom zone */\n top = 0;\n if ( first || is_others )\n {\n reference = read[1];\n delta = read[0] - reference;\n\n zones = bot_table->zones;\n count = count_bot;\n first = 0;\n }\n else\n {\n reference = read[0];\n delta = read[1] - reference;\n\n zones = top_table->zones;\n count = count_top;\n top = 1;\n }\n\n /* insert into sorted table */\n zone = zones;\n for ( ; count > 0; count--, zone++ )\n {\n if ( reference < zone->org_ref )\n break;\n\n if ( reference == zone->org_ref )\n {\n FT_Int delta0 = zone->org_delta;\n\n\n /* we have two zones on the same reference position -- */\n /* only keep the largest one */\n if ( delta < 0 )\n {\n if ( delta < delta0 )\n zone->org_delta = delta;\n }\n else\n {\n if ( delta > delta0 )\n zone->org_delta = delta;\n }\n goto Skip;\n }\n }\n\n for ( ; count > 0; count-- )\n zone[count] = zone[count-1];\n\n zone->org_ref = reference;\n zone->org_delta = delta;\n\n if ( top )\n count_top++;\n else\n count_bot++;\n\n Skip:\n read += 2;\n }\n\n top_table->count = count_top;\n bot_table->count = count_bot;\n }\n\n\n /* Re-read blue zones from the original fonts and store them into our */\n /* private structure. This function re-orders, sanitizes, and */\n /* fuzz-expands the zones as well. */\n static void\n psh_blues_set_zones( PSH_Blues target,\n FT_UInt count,\n FT_Short* blues,\n FT_UInt count_others,\n FT_Short* other_blues,\n FT_Int fuzz,\n FT_Int family )\n {\n PSH_Blue_Table top_table, bot_table;\n FT_UInt count_top, count_bot;\n\n\n if ( family )\n {\n top_table = &target->family_top;\n bot_table = &target->family_bottom;\n }\n else\n {\n top_table = &target->normal_top;\n bot_table = &target->normal_bottom;\n }\n\n /* read the input blue zones, and build two sorted tables */\n /* (one for the top zones, the other for the bottom zones) */\n top_table->count = 0;\n bot_table->count = 0;\n\n /* first, the blues */\n psh_blues_set_zones_0( target, 0,\n count, blues, top_table, bot_table );\n psh_blues_set_zones_0( target, 1,\n count_others, other_blues, top_table, bot_table );\n\n count_top = top_table->count;\n count_bot = bot_table->count;\n\n /* sanitize top table */\n if ( count_top > 0 )\n {\n PSH_Blue_Zone zone = top_table->zones;\n\n\n for ( count = count_top; count > 0; count--, zone++ )\n {\n FT_Int delta;\n\n\n if ( count > 1 )\n {\n delta = zone[1].org_ref - zone[0].org_ref;\n if ( zone->org_delta > delta )\n zone->org_delta = delta;\n }\n\n zone->org_bottom = zone->org_ref;\n zone->org_top = zone->org_delta + zone->org_ref;\n }\n }\n\n /* sanitize bottom table */\n if ( count_bot > 0 )\n {\n PSH_Blue_Zone zone = bot_table->zones;\n\n\n for ( count = count_bot; count > 0; count--, zone++ )\n {\n FT_Int delta;\n\n\n if ( count > 1 )\n {\n delta = zone[0].org_ref - zone[1].org_ref;\n if ( zone->org_delta < delta )\n zone->org_delta = delta;\n }\n\n zone->org_top = zone->org_ref;\n zone->org_bottom = zone->org_delta + zone->org_ref;\n }\n }\n\n /* expand top and bottom tables with blue fuzz */\n {\n FT_Int dim, top, bot, delta;\n PSH_Blue_Zone zone;\n\n\n zone = top_table->zones;\n count = count_top;\n\n for ( dim = 1; dim >= 0; dim-- )\n {\n if ( count > 0 )\n {\n /* expand the bottom of the lowest zone normally */\n zone->org_bottom -= fuzz;\n\n /* expand the top and bottom of intermediate zones; */\n /* checking that the interval is smaller than the fuzz */\n top = zone->org_top;\n\n for ( count--; count > 0; count-- )\n {\n bot = zone[1].org_bottom;\n delta = bot - top;\n\n if ( delta / 2 < fuzz )\n zone[0].org_top = zone[1].org_bottom = top + delta / 2;\n else\n {\n zone[0].org_top = top + fuzz;\n zone[1].org_bottom = bot - fuzz;\n }\n\n zone++;\n top = zone->org_top;\n }\n\n /* expand the top of the highest zone normally */\n zone->org_top = top + fuzz;\n }\n zone = bot_table->zones;\n count = count_bot;\n }\n }\n }\n\n\n /* reset the blues table when the device transform changes */\n static void\n psh_blues_scale_zones( PSH_Blues blues,\n FT_Fixed scale,\n FT_Pos delta )\n {\n FT_UInt count;\n FT_UInt num;\n PSH_Blue_Table table = NULL;\n\n /* */\n /* Determine whether we need to suppress overshoots or */\n /* not. We simply need to compare the vertical scale */\n /* parameter to the raw bluescale value. Here is why: */\n /* */\n /* We need to suppress overshoots for all pointsizes. */\n /* At 300dpi that satisfies: */\n /* */\n /* pointsize < 240*bluescale + 0.49 */\n /* */\n /* This corresponds to: */\n /* */\n /* pixelsize < 1000*bluescale + 49/24 */\n /* */\n /* scale*EM_Size < 1000*bluescale + 49/24 */\n /* */\n /* However, for normal Type 1 fonts, EM_Size is 1000! */\n /* We thus only check: */\n /* */\n /* scale < bluescale + 49/24000 */\n /* */\n /* which we shorten to */\n /* */\n /* \"scale < bluescale\" */\n /* */\n /* Note that `blue_scale' is stored 1000 times its real */\n /* value, and that `scale' converts from font units to */\n /* fractional pixels. */\n /* */\n\n /* 1000 / 64 = 125 / 8 */\n if ( scale >= 0x20C49BAL )\n blues->no_overshoots = FT_BOOL( scale < blues->blue_scale * 8 / 125 );\n else\n blues->no_overshoots = FT_BOOL( scale * 125 < blues->blue_scale * 8 );\n\n /* */\n /* The blue threshold is the font units distance under */\n /* which overshoots are suppressed due to the BlueShift */\n /* even if the scale is greater than BlueScale. */\n /* */\n /* It is the smallest distance such that */\n /* */\n /* dist <= BlueShift && dist*scale <= 0.5 pixels */\n /* */\n {\n FT_Int threshold = blues->blue_shift;\n\n\n while ( threshold > 0 && FT_MulFix( threshold, scale ) > 32 )\n threshold--;\n\n blues->blue_threshold = threshold;\n }\n\n for ( num = 0; num < 4; num++ )\n {\n PSH_Blue_Zone zone;\n\n\n switch ( num )\n {\n case 0:\n table = &blues->normal_top;\n break;\n case 1:\n table = &blues->normal_bottom;\n break;\n case 2:\n table = &blues->family_top;\n break;\n default:\n table = &blues->family_bottom;\n break;\n }\n\n zone = table->zones;\n count = table->count;\n for ( ; count > 0; count--, zone++ )\n {\n zone->cur_top = FT_MulFix( zone->org_top, scale ) + delta;\n zone->cur_bottom = FT_MulFix( zone->org_bottom, scale ) + delta;\n zone->cur_ref = FT_MulFix( zone->org_ref, scale ) + delta;\n zone->cur_delta = FT_MulFix( zone->org_delta, scale );\n\n /* round scaled reference position */\n zone->cur_ref = FT_PIX_ROUND( zone->cur_ref );\n\n#if 0\n if ( zone->cur_ref > zone->cur_top )\n zone->cur_ref -= 64;\n else if ( zone->cur_ref < zone->cur_bottom )\n zone->cur_ref += 64;\n#endif\n }\n }\n\n /* process the families now */\n\n for ( num = 0; num < 2; num++ )\n {\n PSH_Blue_Zone zone1, zone2;\n FT_UInt count1, count2;\n PSH_Blue_Table normal, family;\n\n\n switch ( num )\n {\n case 0:\n normal = &blues->normal_top;\n family = &blues->family_top;\n break;\n\n default:\n normal = &blues->normal_bottom;\n family = &blues->family_bottom;\n }\n\n zone1 = normal->zones;\n count1 = normal->count;\n\n for ( ; count1 > 0; count1--, zone1++ )\n {\n /* try to find a family zone whose reference position is less */\n /* than 1 pixel far from the current zone */\n zone2 = family->zones;\n count2 = family->count;\n\n for ( ; count2 > 0; count2--, zone2++ )\n {\n FT_Pos Delta;\n\n\n Delta = zone1->org_ref - zone2->org_ref;\n if ( Delta < 0 )\n Delta = -Delta;\n\n if ( FT_MulFix( Delta, scale ) < 64 )\n {\n zone1->cur_top = zone2->cur_top;\n zone1->cur_bottom = zone2->cur_bottom;\n zone1->cur_ref = zone2->cur_ref;\n zone1->cur_delta = zone2->cur_delta;\n break;\n }\n }\n }\n }\n }\n\n\n /* calculate the maximum height of given blue zones */\n static FT_Short\n psh_calc_max_height( FT_UInt num,\n const FT_Short* values,\n FT_Short cur_max )\n {\n FT_UInt count;\n\n\n for ( count = 0; count < num; count += 2 )\n {\n FT_Short cur_height = values[count + 1] - values[count];\n\n\n if ( cur_height > cur_max )\n cur_max = cur_height;\n }\n\n return cur_max;\n }\n\n\n FT_LOCAL_DEF( void )\n psh_blues_snap_stem( PSH_Blues blues,\n FT_Int stem_top,\n FT_Int stem_bot,\n PSH_Alignment alignment )\n {\n PSH_Blue_Table table;\n FT_UInt count;\n FT_Pos delta;\n PSH_Blue_Zone zone;\n FT_Int no_shoots;\n\n\n alignment->align = PSH_BLUE_ALIGN_NONE;\n\n no_shoots = blues->no_overshoots;\n\n /* look up stem top in top zones table */\n table = &blues->normal_top;\n count = table->count;\n zone = table->zones;\n\n for ( ; count > 0; count--, zone++ )\n {\n delta = SUB_LONG( stem_top, zone->org_bottom );\n if ( delta < -blues->blue_fuzz )\n break;\n\n if ( stem_top <= zone->org_top + blues->blue_fuzz )\n {\n if ( no_shoots || delta <= blues->blue_threshold )\n {\n alignment->align |= PSH_BLUE_ALIGN_TOP;\n alignment->align_top = zone->cur_ref;\n }\n break;\n }\n }\n\n /* look up stem bottom in bottom zones table */\n table = &blues->normal_bottom;\n count = table->count;\n zone = table->zones + count-1;\n\n for ( ; count > 0; count--, zone-- )\n {\n delta = SUB_LONG( zone->org_top, stem_bot );\n if ( delta < -blues->blue_fuzz )\n break;\n\n if ( stem_bot >= zone->org_bottom - blues->blue_fuzz )\n {\n if ( no_shoots || delta < blues->blue_threshold )\n {\n alignment->align |= PSH_BLUE_ALIGN_BOT;\n alignment->align_bot = zone->cur_ref;\n }\n break;\n }\n }\n }\n\n\n /*************************************************************************/\n /*************************************************************************/\n /***** *****/\n /***** GLOBAL HINTS *****/\n /***** *****/\n /*************************************************************************/\n /*************************************************************************/\n\n static void\n psh_globals_destroy( PSH_Globals globals )\n {\n if ( globals )\n {\n FT_Memory memory;\n\n\n memory = globals->memory;\n globals->dimension[0].stdw.count = 0;\n globals->dimension[1].stdw.count = 0;\n\n globals->blues.normal_top.count = 0;\n globals->blues.normal_bottom.count = 0;\n globals->blues.family_top.count = 0;\n globals->blues.family_bottom.count = 0;\n\n FT_FREE( globals );\n\n#ifdef DEBUG_HINTER\n ps_debug_globals = NULL;\n#endif\n }\n }\n\n\n static FT_Error\n psh_globals_new( FT_Memory memory,\n T1_Private* priv,\n PSH_Globals *aglobals )\n {\n PSH_Globals globals = NULL;\n FT_Error error;\n\n\n if ( !FT_NEW( globals ) )\n {\n FT_UInt count;\n FT_Short* read;\n\n\n globals->memory = memory;\n\n /* copy standard widths */\n {\n PSH_Dimension dim = &globals->dimension[1];\n PSH_Width write = dim->stdw.widths;\n\n\n write->org = priv->standard_width[0];\n write++;\n\n read = priv->snap_widths;\n for ( count = priv->num_snap_widths; count > 0; count-- )\n {\n write->org = *read;\n write++;\n read++;\n }\n\n dim->stdw.count = priv->num_snap_widths + 1;\n }\n\n /* copy standard heights */\n {\n PSH_Dimension dim = &globals->dimension[0];\n PSH_Width write = dim->stdw.widths;\n\n\n write->org = priv->standard_height[0];\n write++;\n read = priv->snap_heights;\n for ( count = priv->num_snap_heights; count > 0; count-- )\n {\n write->org = *read;\n write++;\n read++;\n }\n\n dim->stdw.count = priv->num_snap_heights + 1;\n }\n\n /* copy blue zones */\n psh_blues_set_zones( &globals->blues, priv->num_blue_values,\n priv->blue_values, priv->num_other_blues,\n priv->other_blues, priv->blue_fuzz, 0 );\n\n psh_blues_set_zones( &globals->blues, priv->num_family_blues,\n priv->family_blues, priv->num_family_other_blues,\n priv->family_other_blues, priv->blue_fuzz, 1 );\n\n /* limit the BlueScale value to `1 / max_of_blue_zone_heights' */\n {\n FT_Fixed max_scale;\n FT_Short max_height = 1;\n\n\n max_height = psh_calc_max_height( priv->num_blue_values,\n priv->blue_values,\n max_height );\n max_height = psh_calc_max_height( priv->num_other_blues,\n priv->other_blues,\n max_height );\n max_height = psh_calc_max_height( priv->num_family_blues,\n priv->family_blues,\n max_height );\n max_height = psh_calc_max_height( priv->num_family_other_blues,\n priv->family_other_blues,\n max_height );\n\n /* BlueScale is scaled 1000 times */\n max_scale = FT_DivFix( 1000, max_height );\n globals->blues.blue_scale = priv->blue_scale < max_scale\n ? priv->blue_scale\n : max_scale;\n }\n\n globals->blues.blue_shift = priv->blue_shift;\n globals->blues.blue_fuzz = priv->blue_fuzz;\n\n globals->dimension[0].scale_mult = 0;\n globals->dimension[0].scale_delta = 0;\n globals->dimension[1].scale_mult = 0;\n globals->dimension[1].scale_delta = 0;\n\n#ifdef DEBUG_HINTER\n ps_debug_globals = globals;\n#endif\n }\n\n *aglobals = globals;\n return error;\n }\n\n\n FT_LOCAL_DEF( void )\n psh_globals_set_scale( PSH_Globals globals,\n FT_Fixed x_scale,\n FT_Fixed y_scale,\n FT_Fixed x_delta,\n FT_Fixed y_delta )\n {\n PSH_Dimension dim;\n\n\n dim = &globals->dimension[0];\n if ( x_scale != dim->scale_mult ||\n x_delta != dim->scale_delta )\n {\n dim->scale_mult = x_scale;\n dim->scale_delta = x_delta;\n\n psh_globals_scale_widths( globals, 0 );\n }\n\n dim = &globals->dimension[1];\n if ( y_scale != dim->scale_mult ||\n y_delta != dim->scale_delta )\n {\n dim->scale_mult = y_scale;\n dim->scale_delta = y_delta;\n\n psh_globals_scale_widths( globals, 1 );\n psh_blues_scale_zones( &globals->blues, y_scale, y_delta );\n }\n }\n\n\n FT_LOCAL_DEF( void )\n psh_globals_funcs_init( PSH_Globals_FuncsRec* funcs )\n {\n funcs->create = psh_globals_new;\n funcs->set_scale = psh_globals_set_scale;\n funcs->destroy = psh_globals_destroy;\n }\n\n\n/* END */\n"} +{"text": "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n\n<Form version=\"1.5\" maxVersion=\"1.9\" type=\"org.netbeans.modules.form.forminfo.JPanelFormInfo\">\n <Properties>\n <Property name=\"border\" type=\"javax.swing.border.Border\" editor=\"org.netbeans.modules.form.editors2.BorderEditor\">\n <Border info=\"org.netbeans.modules.form.compat2.border.TitledBorderInfo\">\n <TitledBorder title=\"Convolutional Layer\">\n <ResourceString PropertyName=\"titleX\" bundle=\"org/neuroph/netbeans/wizards/Bundle.properties\" key=\"ConvolutionalLayerPanel.border.title\" replaceFormat=\"org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)\"/>\n </TitledBorder>\n </Border>\n </Property>\n <Property name=\"toolTipText\" type=\"java.lang.String\" editor=\"org.netbeans.modules.i18n.form.FormI18nStringEditor\">\n <ResourceString bundle=\"org/neuroph/netbeans/wizards/Bundle.properties\" key=\"ConvolutionalLayerPanel.toolTipText\" replaceFormat=\"org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)\"/>\n </Property>\n </Properties>\n <AuxValues>\n <AuxValue name=\"FormSettings_autoResourcing\" type=\"java.lang.Integer\" value=\"1\"/>\n <AuxValue name=\"FormSettings_autoSetComponentName\" type=\"java.lang.Boolean\" value=\"false\"/>\n <AuxValue name=\"FormSettings_generateFQN\" type=\"java.lang.Boolean\" value=\"true\"/>\n <AuxValue name=\"FormSettings_generateMnemonicsCode\" type=\"java.lang.Boolean\" value=\"true\"/>\n <AuxValue name=\"FormSettings_i18nAutoMode\" type=\"java.lang.Boolean\" value=\"true\"/>\n <AuxValue name=\"FormSettings_layoutCodeTarget\" type=\"java.lang.Integer\" value=\"1\"/>\n <AuxValue name=\"FormSettings_listenerGenerationStyle\" type=\"java.lang.Integer\" value=\"0\"/>\n <AuxValue name=\"FormSettings_variablesLocal\" type=\"java.lang.Boolean\" value=\"false\"/>\n <AuxValue name=\"FormSettings_variablesModifier\" type=\"java.lang.Integer\" value=\"2\"/>\n <AuxValue name=\"designerSize\" type=\"java.awt.Dimension\" value=\"-84,-19,0,5,115,114,0,18,106,97,118,97,46,97,119,116,46,68,105,109,101,110,115,105,111,110,65,-114,-39,-41,-84,95,68,20,2,0,2,73,0,6,104,101,105,103,104,116,73,0,5,119,105,100,116,104,120,112,0,0,0,73,0,0,1,-37\"/>\n </AuxValues>\n\n <Layout class=\"org.netbeans.modules.form.compat2.layouts.DesignFlowLayout\"/>\n <SubComponents>\n <Component class=\"javax.swing.JLabel\" name=\"jLabel1\">\n <Properties>\n <Property name=\"text\" type=\"java.lang.String\" editor=\"org.netbeans.modules.i18n.form.FormI18nStringEditor\">\n <ResourceString bundle=\"org/neuroph/netbeans/wizards/Bundle.properties\" key=\"ConvolutionalLayerPanel.jLabel1.text\" replaceFormat=\"org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)\"/>\n </Property>\n </Properties>\n </Component>\n <Component class=\"javax.swing.JTextField\" name=\"jtxtNumberOfMaps\">\n <Properties>\n <Property name=\"columns\" type=\"int\" value=\"3\"/>\n <Property name=\"text\" type=\"java.lang.String\" editor=\"org.netbeans.modules.i18n.form.FormI18nStringEditor\">\n <ResourceString bundle=\"org/neuroph/netbeans/wizards/Bundle.properties\" key=\"ConvolutionalLayerPanel.jtxtNumberOfMaps.text\" replaceFormat=\"org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)\"/>\n </Property>\n </Properties>\n </Component>\n <Component class=\"javax.swing.JLabel\" name=\"jLabel2\">\n <Properties>\n <Property name=\"text\" type=\"java.lang.String\" editor=\"org.netbeans.modules.i18n.form.FormI18nStringEditor\">\n <ResourceString bundle=\"org/neuroph/netbeans/wizards/Bundle.properties\" key=\"ConvolutionalLayerPanel.jLabel2.text\" replaceFormat=\"org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)\"/>\n </Property>\n </Properties>\n </Component>\n <Component class=\"javax.swing.JTextField\" name=\"jtxtKernelWidth\">\n <Properties>\n <Property name=\"columns\" type=\"int\" value=\"3\"/>\n <Property name=\"text\" type=\"java.lang.String\" editor=\"org.netbeans.modules.i18n.form.FormI18nStringEditor\">\n <ResourceString bundle=\"org/neuroph/netbeans/wizards/Bundle.properties\" key=\"ConvolutionalLayerPanel.jtxtKernelWidth.text\" replaceFormat=\"org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)\"/>\n </Property>\n </Properties>\n </Component>\n <Component class=\"javax.swing.JLabel\" name=\"jLabel3\">\n <Properties>\n <Property name=\"text\" type=\"java.lang.String\" editor=\"org.netbeans.modules.i18n.form.FormI18nStringEditor\">\n <ResourceString bundle=\"org/neuroph/netbeans/wizards/Bundle.properties\" key=\"ConvolutionalLayerPanel.jLabel3.text\" replaceFormat=\"org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)\"/>\n </Property>\n </Properties>\n </Component>\n <Component class=\"javax.swing.JTextField\" name=\"jtxtKernelheight\">\n <Properties>\n <Property name=\"columns\" type=\"int\" value=\"3\"/>\n <Property name=\"text\" type=\"java.lang.String\" editor=\"org.netbeans.modules.i18n.form.FormI18nStringEditor\">\n <ResourceString bundle=\"org/neuroph/netbeans/wizards/Bundle.properties\" key=\"ConvolutionalLayerPanel.jtxtKernelheight.text\" replaceFormat=\"org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)\"/>\n </Property>\n </Properties>\n <Events>\n <EventHandler event=\"actionPerformed\" listener=\"java.awt.event.ActionListener\" parameters=\"java.awt.event.ActionEvent\" handler=\"jtxtKernelheightActionPerformed\"/>\n </Events>\n </Component>\n <Component class=\"javax.swing.JButton\" name=\"jButton1\">\n <Properties>\n <Property name=\"text\" type=\"java.lang.String\" editor=\"org.netbeans.modules.i18n.form.FormI18nStringEditor\">\n <ResourceString bundle=\"org/neuroph/netbeans/wizards/Bundle.properties\" key=\"ConvolutionalLayerPanel.jButton1.text\" replaceFormat=\"org.openide.util.NbBundle.getMessage({sourceFileName}.class, &quot;{key}&quot;)\"/>\n </Property>\n </Properties>\n <Events>\n <EventHandler event=\"actionPerformed\" listener=\"java.awt.event.ActionListener\" parameters=\"java.awt.event.ActionEvent\" handler=\"jButton1ActionPerformed\"/>\n </Events>\n </Component>\n </SubComponents>\n</Form>\n"} +{"text": "var Ext = Ext || {};\nExt.manifest = Ext.manifest || \"bootstrap.json\";\n// @tag core\n// @define Ext.Boot\n\nvar Ext = Ext || {};\n\n//<editor-fold desc=\"Boot\">\n/**\n * @class Ext.Boot\n * @singleton\n * @private\n */\nExt.Boot = Ext.Boot || (function (emptyFn) {\n\n var doc = document,\n _emptyArray = [],\n _config = {\n /**\n * @cfg {Boolean} [disableCaching=true]\n * If `true` current timestamp is added to script URL's to prevent caching.\n * In debug builds, adding a \"cache\" or \"disableCacheBuster\" query parameter\n * to the page's URL will set this to `false`.\n */\n disableCaching: (/[?&](?:cache|disableCacheBuster)\\b/i.test(location.search) ||\n !(/http[s]?\\:/i.test(location.href)) ||\n /(^|[ ;])ext-cache=1/.test(doc.cookie)) ? false :\n true,\n\n /**\n * @cfg {String} [disableCachingParam=\"_dc\"]\n * The query parameter name for the cache buster's timestamp.\n */\n disableCachingParam: '_dc',\n\n /**\n * @cfg {Boolean} loadDelay\n * Millisecond delay between asynchronous script injection (prevents stack\n * overflow on some user agents) 'false' disables delay but potentially\n * increases stack load.\n */\n loadDelay: false,\n\n /**\n * @cfg {Boolean} preserveScripts\n * `false` to remove asynchronously loaded scripts, `true` to retain script\n * element for browser debugger compatibility and improved load performance.\n */\n preserveScripts: true,\n\n /**\n * @cfg {String} [charset=UTF-8]\n * Optional charset to specify encoding of dynamic content.\n */\n charset: 'UTF-8'\n },\n\n _assetConfig= {},\n\n cssRe = /\\.css(?:\\?|$)/i,\n resolverEl = doc.createElement('a'),\n isBrowser = typeof window !== 'undefined',\n _environment = {\n browser: isBrowser,\n node: !isBrowser && (typeof require === 'function'),\n phantom: (window && (window._phantom || window.callPhantom)) || /PhantomJS/.test(window.navigator.userAgent)\n },\n _tags = (Ext.platformTags = {}),\n\n _apply = function (object, config, defaults) {\n if (defaults) {\n _apply(object, defaults);\n }\n if (object && config && typeof config === 'object') {\n for (var i in config) {\n object[i] = config[i];\n }\n }\n return object;\n },\n _merge = function() {\n var lowerCase = false,\n obj = Array.prototype.shift.call(arguments),\n index, i, len, value;\n\n if (typeof arguments[arguments.length - 1] === 'boolean') {\n lowerCase = Array.prototype.pop.call(arguments);\n }\n\n len = arguments.length;\n for (index = 0; index < len; index++) {\n value = arguments[index];\n if (typeof value === 'object') {\n for (i in value) {\n obj[lowerCase ? i.toLowerCase() : i] = value[i];\n }\n }\n }\n\n return obj;\n },\n _getKeys = (typeof Object.keys == 'function') ?\n function(object){\n if (!object) {\n return [];\n }\n return Object.keys(object);\n } :\n function(object) {\n var keys = [],\n property;\n\n for (property in object) {\n if (object.hasOwnProperty(property)) {\n keys.push(property);\n }\n }\n\n return keys;\n },\n /*\n * The Boot loader class manages Request objects that contain one or\n * more individual urls that need to be loaded. Requests can be performed\n * synchronously or asynchronously, but will always evaluate urls in the\n * order specified on the request object.\n */\n Boot = {\n loading: 0,\n loaded: 0,\n apply: _apply,\n env: _environment,\n config: _config,\n\n /**\n * @cfg {Object} assetConfig\n * A map (url->assetConfig) that contains information about assets loaded by the Microlaoder.\n */\n assetConfig: _assetConfig,\n\n // Keyed by absolute URL this object holds \"true\" if that URL is already loaded\n // or an array of callbacks to call once it loads.\n scripts: {\n /*\n Entry objects\n\n 'http://foo.com/bar/baz/Thing.js': {\n done: true,\n el: scriptEl || linkEl,\n preserve: true,\n requests: [ request1, ... ]\n }\n */\n },\n\n /**\n * contains the current script name being loaded\n * (loadSync or sequential load only)\n */\n currentFile: null,\n suspendedQueue: [],\n currentRequest: null,\n\n // when loadSync is called, need to cause subsequent load requests to also be loadSync,\n // eg, when Ext.require(...) is called\n syncMode: false,\n\n /*\n * simple helper method for debugging\n */\n\n /**\n * enables / disables loading scripts via script / link elements rather\n * than using ajax / eval\n */\n useElements: true,\n\n listeners: [],\n\n Request: Request,\n\n Entry: Entry,\n\n allowMultipleBrowsers: false,\n\n browserNames: {\n ie: 'IE',\n firefox: 'Firefox',\n safari: 'Safari',\n chrome: 'Chrome',\n opera: 'Opera',\n dolfin: 'Dolfin',\n edge: 'Edge',\n webosbrowser: 'webOSBrowser',\n chromeMobile: 'ChromeMobile',\n chromeiOS: 'ChromeiOS',\n silk: 'Silk',\n other: 'Other'\n },\n\n osNames: {\n ios: 'iOS',\n android: 'Android',\n windowsPhone: 'WindowsPhone',\n webos: 'webOS',\n blackberry: 'BlackBerry',\n rimTablet: 'RIMTablet',\n mac: 'MacOS',\n win: 'Windows',\n tizen: 'Tizen',\n linux: 'Linux',\n bada: 'Bada',\n chromeOS: 'ChromeOS',\n other: 'Other'\n },\n\n browserPrefixes: {\n ie: 'MSIE ',\n edge: 'Edge/',\n firefox: 'Firefox/',\n chrome: 'Chrome/',\n safari: 'Version/',\n opera: 'OPR/',\n dolfin: 'Dolfin/',\n webosbrowser: 'wOSBrowser/',\n chromeMobile: 'CrMo/',\n chromeiOS: 'CriOS/',\n silk: 'Silk/'\n },\n\n // When a UA reports multiple browsers this list is used to prioritize the 'real' browser\n // lower index number will win\n browserPriority: [\n 'edge',\n 'opera',\n 'dolfin',\n 'webosbrowser',\n 'silk',\n 'chromeiOS',\n 'chromeMobile',\n 'ie',\n 'firefox',\n 'safari',\n 'chrome'\n ],\n\n osPrefixes: {\n tizen: '(Tizen )',\n ios: 'i(?:Pad|Phone|Pod)(?:.*)CPU(?: iPhone)? OS ',\n android: '(Android |HTC_|Silk/)', // Some HTC devices ship with an OSX userAgent by default,\n // so we need to add a direct check for HTC_\n windowsPhone: 'Windows Phone ',\n blackberry: '(?:BlackBerry|BB)(?:.*)Version\\/',\n rimTablet: 'RIM Tablet OS ',\n webos: '(?:webOS|hpwOS)\\/',\n bada: 'Bada\\/',\n chromeOS: 'CrOS '\n },\n\n fallbackOSPrefixes: {\n windows: 'win',\n mac: 'mac',\n linux: 'linux'\n },\n\n devicePrefixes: {\n iPhone: 'iPhone',\n iPod: 'iPod',\n iPad: 'iPad'\n },\n\n maxIEVersion: 12,\n\n\n /**\n * The default function that detects various platforms and sets tags\n * in the platform map accordingly. Examples are iOS, android, tablet, etc.\n * @param tags the set of tags to populate\n */\n detectPlatformTags: function () {\n var me = this,\n ua = navigator.userAgent,\n isMobile = /Mobile(\\/|\\s)/.test(ua),\n element = document.createElement('div'),\n isEventSupported = function (name, tag) {\n if (tag === undefined) {\n tag = window;\n }\n\n var eventName = 'on' + name.toLowerCase(),\n isSupported = (eventName in element);\n\n if (!isSupported) {\n if (element.setAttribute && element.removeAttribute) {\n element.setAttribute(eventName, '');\n isSupported = typeof element[eventName] === 'function';\n\n if (typeof element[eventName] !== 'undefined') {\n element[eventName] = undefined;\n }\n\n element.removeAttribute(eventName);\n }\n }\n\n return isSupported;\n },\n\n // Browser Detection\n getBrowsers = function () {\n var browsers = {},\n maxIEVersion, prefix,\n value, key, index, len, match, version, matched;\n\n // MS Edge browser (and possibly others) can report multiple browsers in the UserAgent\n // \"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.10240\"\n // we use this to prioritize the actual browser in this situation\n len = me.browserPriority.length;\n for (index = 0; index < len; index++) {\n key = me.browserPriority[index];\n if (!matched) {\n value = me.browserPrefixes[key];\n match = ua.match(new RegExp('(' + value + ')([\\\\w\\\\._]+)'));\n version = match && match.length > 1 ? parseInt(match[2]) : 0;\n if (version) {\n matched = true;\n }\n } else {\n version = 0;\n }\n browsers[key] = version;\n }\n\n //Deal with IE document mode\n if (browsers.ie) {\n var mode = document.documentMode;\n\n if (mode >= 8) {\n browsers.ie = mode;\n }\n }\n\n // Fancy IE greater than and less then quick tags\n version = browsers.ie || false;\n maxIEVersion = Math.max(version, me.maxIEVersion);\n\n for (index = 8; index <= maxIEVersion; ++index) {\n prefix = 'ie' + index;\n browsers[prefix + 'm'] = version ? version <= index : 0;\n browsers[prefix] = version ? version === index : 0;\n browsers[prefix + 'p'] = version ? version >= index : 0;\n }\n\n return browsers;\n },\n\n //OS Detection\n getOperatingSystems = function () {\n var systems = {},\n value, key, keys, index, len, match, matched, version, activeCount;\n\n keys = _getKeys(me.osPrefixes);\n len = keys.length;\n for (index = 0, activeCount = 0; index < len; index++) {\n key = keys[index];\n value = me.osPrefixes[key];\n match = ua.match(new RegExp('(' + value + ')([^\\\\s;]+)'));\n matched = match ? match[1] : null;\n\n // This is here because some HTC android devices show an OSX Snow Leopard userAgent by default.\n // And the Kindle Fire doesn't have any indicator of Android as the OS in its User Agent\n if (matched && (matched === 'HTC_' || matched === 'Silk/')) {\n version = 2.3;\n } else {\n version = match && match.length > 1 ? parseFloat(match[match.length - 1]) : 0;\n }\n\n if (version) {\n activeCount++;\n }\n systems[key] = version;\n }\n\n keys = _getKeys(me.fallbackOSPrefixes);\n\n // If no OS could be found we resort to the fallbacks, otherwise we just\n // falsify the fallbacks\n len = keys.length;\n for (index = 0; index < len; index++) {\n key = keys[index];\n\n // No OS was detected from osPrefixes\n if (activeCount === 0) {\n value = me.fallbackOSPrefixes[key];\n match = ua.toLowerCase().match(new RegExp(value));\n systems[key] = match ? true : 0;\n } else {\n systems[key] = 0;\n }\n }\n\n return systems;\n },\n\n // Device Detection\n getDevices = function () {\n var devices = {},\n value, key, keys, index, len, match;\n\n keys = _getKeys(me.devicePrefixes);\n len = keys.length;\n for (index = 0; index < len; index++) {\n key = keys[index];\n value = me.devicePrefixes[key];\n match = ua.match(new RegExp(value));\n devices[key] = match ? true : 0;\n }\n\n return devices;\n },\n browsers = getBrowsers(),\n systems = getOperatingSystems(),\n devices = getDevices(),\n platformParams = Boot.loadPlatformsParam();\n\n // We apply platformParams from the query here first to allow for forced user valued\n // to be used in calculation of generated tags\n _merge(_tags, browsers, systems, devices, platformParams, true);\n\n _tags.phone = !!((_tags.iphone || _tags.ipod) ||\n (!_tags.silk && (_tags.android && (_tags.android < 3 || isMobile))) ||\n (_tags.blackberry && isMobile) ||\n (_tags.windowsphone));\n\n _tags.tablet = !!(!_tags.phone && (\n _tags.ipad ||\n _tags.android ||\n _tags.silk ||\n _tags.rimtablet ||\n (_tags.ie10 && /; Touch/.test(ua))\n ));\n\n _tags.touch =\n // if the browser has touch events we can be reasonably sure the device has\n // a touch screen\n isEventSupported('touchend') ||\n // browsers that use pointer event have maxTouchPoints > 0 if the\n // device supports touch input\n // http://www.w3.org/TR/pointerevents/#widl-Navigator-maxTouchPoints\n navigator.maxTouchPoints ||\n // IE10 uses a vendor-prefixed maxTouchPoints property\n navigator.msMaxTouchPoints;\n\n _tags.desktop = !_tags.phone && !_tags.tablet;\n _tags.cordova = _tags.phonegap = !!(window.PhoneGap || window.Cordova || window.cordova);\n _tags.webview = /(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)(?!.*FBAN)/i.test(ua);\n _tags.androidstock = (_tags.android <= 4.3) && (_tags.safari || _tags.silk);\n\n // Re-apply any query params here to allow for user override of generated tags (desktop, touch, tablet, etc)\n _merge(_tags, platformParams, true);\n },\n\n /**\n * Extracts user supplied platform tags from the \"platformTags\" query parameter\n * of the form:\n *\n * ?platformTags=name:state,name:state,...\n *\n * (each tag defaults to true when state is unspecified)\n *\n * Example:\n *\n * ?platformTags=isTablet,isPhone:false,isDesktop:0,iOS:1,Safari:true, ...\n *\n * @returns {Object} the platform tags supplied by the query string\n */\n loadPlatformsParam: function () {\n // Check if the ?platform parameter is set in the URL\n var paramsString = window.location.search.substr(1),\n paramsArray = paramsString.split(\"&\"),\n params = {}, i,\n platforms = {},\n tmpArray, tmplen, platform, name, enabled;\n\n for (i = 0; i < paramsArray.length; i++) {\n tmpArray = paramsArray[i].split(\"=\");\n params[tmpArray[0]] = tmpArray[1];\n }\n\n if (params.platformTags) {\n tmpArray = params.platformTags.split(\",\");\n for (tmplen = tmpArray.length, i = 0; i < tmplen; i++) {\n platform = tmpArray[i].split(\":\");\n name = platform[0];\n enabled=true;\n if (platform.length > 1) {\n enabled = platform[1];\n if (enabled === 'false' || enabled === '0') {\n enabled = false;\n }\n }\n platforms[name] = enabled;\n }\n }\n return platforms;\n },\n\n filterPlatform: function (platform, excludes) {\n platform = _emptyArray.concat(platform || _emptyArray);\n excludes = _emptyArray.concat(excludes || _emptyArray);\n\n var plen = platform.length,\n elen = excludes.length,\n include = (!plen && elen), // default true if only excludes specified\n i, tag;\n\n for (i = 0; i < plen && !include; i++) {\n tag = platform[i];\n include = !!_tags[tag];\n }\n\n for (i = 0; i < elen && include; i++) {\n tag = excludes[i];\n include = !_tags[tag];\n }\n\n return include;\n },\n\n init: function () {\n var scriptEls = doc.getElementsByTagName('script'),\n script = scriptEls[0],\n len = scriptEls.length,\n re = /\\/ext(\\-[a-z\\-]+)?\\.js$/,\n entry, src, state, baseUrl, key, n, origin;\n\n // No check for script definedness because there always should be at least one\n Boot.hasReadyState = (\"readyState\" in script);\n Boot.hasAsync = (\"async\" in script);\n Boot.hasDefer = (\"defer\" in script);\n Boot.hasOnLoad = (\"onload\" in script);\n \n // Feature detecting IE\n Boot.isIE8 = Boot.hasReadyState && !Boot.hasAsync && Boot.hasDefer && !Boot.hasOnLoad;\n Boot.isIE9 = Boot.hasReadyState && !Boot.hasAsync && Boot.hasDefer && Boot.hasOnLoad;\n Boot.isIE10p = Boot.hasReadyState && Boot.hasAsync && Boot.hasDefer && Boot.hasOnLoad;\n\n Boot.isIE10 = (new Function('/*@cc_on return @_jscript_version @*/')()) === 10;\n Boot.isIE10m = Boot.isIE10 || Boot.isIE9 || Boot.isIE8;\n \n // IE11 does not support conditional compilation so we detect it by exclusion\n Boot.isIE11 = Boot.isIE10p && !Boot.isIE10;\n\n // Since we are loading after other scripts, and we needed to gather them\n // anyway, we track them in _scripts so we don't have to ask for them all\n // repeatedly.\n for (n = 0; n < len; n++) {\n src = (script = scriptEls[n]).src;\n if (!src) {\n continue;\n }\n state = script.readyState || null;\n\n // If we find a script file called \"ext-*.js\", then the base path is that file's base path.\n if (!baseUrl && re.test(src)) {\n baseUrl = src;\n }\n\n if (!Boot.scripts[key = Boot.canonicalUrl(src)]) {\n entry = new Entry({\n key: key,\n url: src,\n done: state === null || // non-IE\n state === 'loaded' || state === 'complete', // IE only\n el: script,\n prop: 'src'\n });\n }\n }\n\n if (!baseUrl) {\n script = scriptEls[scriptEls.length - 1];\n baseUrl = script.src;\n }\n\n Boot.baseUrl = baseUrl.substring(0, baseUrl.lastIndexOf('/') + 1);\n origin = window.location.origin ||\n window.location.protocol +\n \"//\" +\n window.location.hostname +\n (window.location.port ? ':' + window.location.port: '');\n Boot.origin = origin;\n\n Boot.detectPlatformTags();\n Ext.filterPlatform = Boot.filterPlatform;\n },\n\n /**\n * This method returns a canonical URL for the given URL.\n *\n * For example, the following all produce the same canonical URL (which is the\n * last one):\n *\n * http://foo.com/bar/baz/zoo/derp/../../goo/Thing.js?_dc=12345\n * http://foo.com/bar/baz/zoo/derp/../../goo/Thing.js\n * http://foo.com/bar/baz/zoo/derp/../jazz/../../goo/Thing.js\n * http://foo.com/bar/baz/zoo/../goo/Thing.js\n * http://foo.com/bar/baz/goo/Thing.js\n *\n * @private\n */\n canonicalUrl: function (url) {\n // *WARNING WARNING WARNING*\n // This method yields the most correct result we can get but it is EXPENSIVE!\n // In ALL browsers! When called multiple times in a sequence, as if when\n // we resolve dependencies for entries, it will cause garbage collection events\n // and overall painful slowness. This is why we try to avoid it as much as we can.\n // \n // @TODO - see if we need this fallback logic\n // http://stackoverflow.com/questions/470832/getting-an-absolute-url-from-a-relative-one-ie6-issue\n resolverEl.href = url;\n\n var ret = resolverEl.href,\n dc = _config.disableCachingParam,\n pos = dc ? ret.indexOf(dc + '=') : -1,\n c, end;\n\n // If we have a _dc query parameter we need to remove it from the canonical\n // URL.\n if (pos > 0 && ((c = ret.charAt(pos - 1)) === '?' || c === '&')) {\n end = ret.indexOf('&', pos);\n end = (end < 0) ? '' : ret.substring(end);\n if (end && c === '?') {\n ++pos; // keep the '?'\n end = end.substring(1); // remove the '&'\n }\n ret = ret.substring(0, pos - 1) + end;\n }\n\n return ret;\n },\n\n /**\n * Get the config value corresponding to the specified name. If no name is given, will return the config object\n * @param {String} name The config property name\n * @return {Object}\n */\n getConfig: function (name) {\n return name ? Boot.config[name] : Boot.config;\n },\n\n /**\n * Set the configuration.\n * @param {Object} config The config object to override the default values.\n * @return {Ext.Boot} this\n */\n setConfig: function (name, value) {\n if (typeof name === 'string') {\n Boot.config[name] = value;\n } else {\n for (var s in name) {\n Boot.setConfig(s, name[s]);\n }\n }\n return Boot;\n },\n\n getHead: function () {\n return Boot.docHead ||\n (Boot.docHead = doc.head ||\n doc.getElementsByTagName('head')[0]);\n },\n\n create: function (url, key, cfg) {\n var config = cfg || {};\n config.url = url;\n config.key = key;\n return Boot.scripts[key] = new Entry(config);\n },\n\n getEntry: function (url, cfg, canonicalPath) {\n var key, entry;\n \n // Canonicalizing URLs via anchor element href yields the most correct result\n // but is *extremely* resource heavy so we need to avoid it whenever possible\n key = canonicalPath ? url : Boot.canonicalUrl(url);\n entry = Boot.scripts[key];\n \n if (!entry) {\n entry = Boot.create(url, key, cfg);\n \n if (canonicalPath) {\n entry.canonicalPath = true;\n }\n }\n \n return entry;\n },\n\n registerContent: function (url, type, content) {\n var cfg = {\n content: content,\n loaded: true,\n css: type === 'css'\n };\n\n return Boot.getEntry(url, cfg);\n },\n\n processRequest: function(request, sync) {\n request.loadEntries(sync);\n },\n\n load: function (request) {\n var request = new Request(request);\n\n if (request.sync || Boot.syncMode) {\n return Boot.loadSync(request);\n }\n\n // If there is a request in progress, we must\n // queue this new request to be fired when the current request completes.\n if (Boot.currentRequest) {\n // trigger assignment of entries now to ensure that overlapping\n // entries with currently running requests will synchronize state\n // with this pending one as they complete\n request.getEntries();\n Boot.suspendedQueue.push(request);\n } else {\n Boot.currentRequest = request;\n Boot.processRequest(request, false);\n }\n return Boot;\n },\n\n loadSync: function (request) {\n var request = new Request(request);\n\n Boot.syncMode++;\n Boot.processRequest(request, true);\n Boot.syncMode--;\n return Boot;\n },\n\n loadBasePrefix: function(request) {\n request = new Request(request);\n request.prependBaseUrl = true;\n return Boot.load(request);\n },\n\n loadSyncBasePrefix: function(request) {\n request = new Request(request);\n request.prependBaseUrl = true;\n return Boot.loadSync(request);\n },\n\n requestComplete: function(request) {\n var next;\n\n if (Boot.currentRequest === request) {\n Boot.currentRequest = null;\n while(Boot.suspendedQueue.length > 0) {\n next = Boot.suspendedQueue.shift();\n if(!next.done) {\n Boot.load(next);\n break;\n }\n }\n }\n if (!Boot.currentRequest && Boot.suspendedQueue.length == 0) {\n Boot.fireListeners();\n }\n },\n\n isLoading: function () {\n return !Boot.currentRequest && Boot.suspendedQueue.length == 0;\n },\n\n fireListeners: function () {\n var listener;\n while (Boot.isLoading() && (listener = Boot.listeners.shift())) {\n listener();\n }\n },\n\n onBootReady: function (listener) {\n if (!Boot.isLoading()) {\n listener();\n } else {\n Boot.listeners.push(listener);\n }\n },\n\n /**\n * this is a helper function used by Ext.Loader to flush out\n * 'uses' arrays for classes in some Ext versions\n */\n getPathsFromIndexes: function (indexMap, loadOrder) {\n // In older versions indexMap was an object instead of a sparse array\n if (!('length' in indexMap)) {\n var indexArray = [],\n index;\n \n for (index in indexMap) {\n if (!isNaN(+index)) {\n indexArray[+index] = indexMap[index];\n }\n }\n \n indexMap = indexArray;\n }\n \n return Request.prototype.getPathsFromIndexes(indexMap, loadOrder);\n },\n\n createLoadOrderMap: function(loadOrder) {\n return Request.prototype.createLoadOrderMap(loadOrder);\n },\n\n fetch: function(url, complete, scope, async) {\n async = (async === undefined) ? !!complete : async;\n\n var xhr = new XMLHttpRequest(),\n result, status, content, exception = false,\n readyStateChange = function () {\n if (xhr && xhr.readyState == 4) {\n status = (xhr.status === 1223) ? 204 :\n (xhr.status === 0 && ((self.location || {}).protocol === 'file:' ||\n (self.location || {}).protocol === 'ionp:')) ? 200 : xhr.status;\n content = xhr.responseText;\n result = {\n content: content,\n status: status,\n exception: exception\n };\n if (complete) {\n complete.call(scope, result);\n }\n xhr.onreadystatechange = emptyFn;\n xhr = null;\n }\n };\n\n if (async) {\n xhr.onreadystatechange = readyStateChange;\n }\n\n try {\n xhr.open('GET', url, async);\n xhr.send(null);\n } catch (err) {\n exception = err;\n readyStateChange();\n return result;\n }\n\n if (!async) {\n readyStateChange();\n }\n\n return result;\n },\n\n notifyAll: function(entry) {\n entry.notifyRequests();\n }\n };\n\n function Request(cfg) {\n //The request class encapsulates a series of Entry objects\n //and provides notification around the completion of all Entries\n //in this request.\n\n if(cfg.$isRequest) {\n return cfg;\n }\n\n var cfg = cfg.url ? cfg : {url: cfg},\n url = cfg.url,\n urls = url.charAt ? [ url ] : url,\n charset = cfg.charset || Boot.config.charset;\n\n _apply(this, cfg);\n \n delete this.url;\n this.urls = urls;\n this.charset = charset;\n };\n \n Request.prototype = {\n $isRequest: true,\n\n createLoadOrderMap: function (loadOrder) {\n var len = loadOrder.length,\n loadOrderMap = {},\n i, element;\n\n for (i = 0; i < len; i++) {\n element = loadOrder[i];\n loadOrderMap[element.path] = element;\n }\n\n return loadOrderMap;\n },\n\n getLoadIndexes: function (item, indexMap, loadOrder, includeUses, skipLoaded) {\n var resolved = [],\n queue = [item],\n itemIndex = item.idx,\n queue, entry, dependencies, depIndex, i, len;\n \n if (indexMap[itemIndex]) {\n // prevent cycles\n return resolved;\n }\n \n // Both indexMap and resolved are sparse arrays keyed by indexes.\n // This gives us a naturally sorted sequence of indexes later on\n // when we need to convert them to paths.\n // indexMap is the map of all indexes we have visited at least once\n // per the current expandUrls() invocation, and resolved is the map\n // of all dependencies for the current item that are not included\n // in indexMap.\n indexMap[itemIndex] = resolved[itemIndex] = true;\n \n while (item = queue.shift()) {\n // Canonicalizing URLs is expensive, we try to avoid it\n if (item.canonicalPath) {\n entry = Boot.getEntry(item.path, null, true);\n }\n else {\n entry = Boot.getEntry(this.prepareUrl(item.path));\n }\n \n if (!(skipLoaded && entry.done)) {\n if (includeUses && item.uses && item.uses.length) {\n dependencies = item.requires.concat(item.uses);\n }\n else {\n dependencies = item.requires;\n }\n \n for (i = 0, len = dependencies.length; i < len; i++) {\n depIndex = dependencies[i];\n \n if (!indexMap[depIndex]) {\n indexMap[depIndex] = resolved[depIndex] = true;\n queue.push(loadOrder[depIndex]);\n }\n }\n }\n }\n \n return resolved;\n },\n\n getPathsFromIndexes: function (indexes, loadOrder) {\n var paths = [],\n index, len;\n \n // indexes is a sparse array with values being true for defined indexes\n for (index = 0, len = indexes.length; index < len; index++) {\n if (indexes[index]) {\n paths.push(loadOrder[index].path);\n }\n }\n \n return paths;\n },\n\n expandUrl: function (url, loadOrder, loadOrderMap, indexMap, includeUses, skipLoaded) {\n var item, resolved;\n \n if (loadOrder) {\n item = loadOrderMap[url];\n \n if (item) {\n resolved = this.getLoadIndexes(item, indexMap, loadOrder, includeUses, skipLoaded);\n \n if (resolved.length) {\n return this.getPathsFromIndexes(resolved, loadOrder);\n }\n }\n }\n \n return [url];\n },\n\n expandUrls: function (urls, includeUses) {\n var me = this,\n loadOrder = me.loadOrder,\n expanded = [],\n expandMap = {},\n indexMap = [],\n loadOrderMap, tmpExpanded, i, len, t, tlen, tUrl;\n \n if (typeof urls === \"string\") {\n urls = [urls];\n }\n \n if (loadOrder) {\n loadOrderMap = me.loadOrderMap;\n \n if (!loadOrderMap) {\n loadOrderMap = me.loadOrderMap = me.createLoadOrderMap(loadOrder);\n }\n }\n \n for (i = 0, len = urls.length; i < len; i++) {\n // We don't want to skip loaded entries (last argument === false).\n // There are some overrides that get loaded before their respective classes,\n // and when the class dependencies are processed we don't want to skip over\n // the overrides' dependencies just because they were loaded first.\n tmpExpanded = this.expandUrl(urls[i], loadOrder, loadOrderMap, indexMap, includeUses, false);\n \n for (t = 0, tlen = tmpExpanded.length; t < tlen; t++) {\n tUrl = tmpExpanded[t];\n \n if (!expandMap[tUrl]) {\n expandMap[tUrl] = true;\n expanded.push(tUrl);\n }\n }\n }\n \n if (expanded.length === 0) {\n expanded = urls;\n }\n \n return expanded;\n },\n\n expandLoadOrder: function () {\n var me = this,\n urls = me.urls,\n expanded;\n\n if (!me.expanded) {\n expanded = this.expandUrls(urls, true);\n me.expanded = true;\n } else {\n expanded = urls;\n }\n\n me.urls = expanded;\n\n // if we added some urls to the request to honor the indicated\n // load order, the request needs to be sequential\n if (urls.length != expanded.length) {\n me.sequential = true;\n }\n\n return me;\n },\n\n getUrls: function () {\n this.expandLoadOrder();\n return this.urls;\n },\n\n prepareUrl: function(url) {\n if(this.prependBaseUrl) {\n return Boot.baseUrl + url;\n }\n return url;\n },\n\n getEntries: function () {\n var me = this,\n entries = me.entries,\n loadOrderMap, item, i, entry, urls, url;\n \n if (!entries) {\n entries = [];\n urls = me.getUrls();\n \n // If we have loadOrder array then the map will be expanded by now\n if (me.loadOrder) {\n loadOrderMap = me.loadOrderMap;\n }\n \n for (i = 0; i < urls.length; i++) {\n url = me.prepareUrl(urls[i]);\n \n if (loadOrderMap) {\n item = loadOrderMap[url];\n }\n \n entry = Boot.getEntry(url, {\n buster: me.buster,\n charset: me.charset\n }, item && item.canonicalPath);\n \n entry.requests.push(me);\n entries.push(entry);\n }\n \n me.entries = entries;\n }\n \n return entries;\n },\n\n loadEntries: function(sync) {\n var me = this,\n entries = me.getEntries(),\n len = entries.length,\n start = me.loadStart || 0,\n continueLoad, entries, entry, i;\n\n if(sync !== undefined) {\n me.sync = sync;\n }\n\n me.loaded = me.loaded || 0;\n me.loading = me.loading || len;\n\n for(i = start; i < len; i++) {\n entry = entries[i];\n if(!entry.loaded) {\n continueLoad = entries[i].load(me.sync);\n } else {\n continueLoad = true;\n }\n if(!continueLoad) {\n me.loadStart = i;\n entry.onDone(function(){\n me.loadEntries(sync);\n });\n break;\n }\n }\n me.processLoadedEntries();\n },\n\n processLoadedEntries: function () {\n var me = this,\n entries = me.getEntries(),\n len = entries.length,\n start = me.startIndex || 0,\n i, entry;\n\n if (!me.done) {\n for (i = start; i < len; i++) {\n entry = entries[i];\n\n if (!entry.loaded) {\n me.startIndex = i;\n return;\n }\n\n if (!entry.evaluated) {\n entry.evaluate();\n }\n\n if (entry.error) {\n me.error = true;\n }\n }\n me.notify();\n }\n },\n\n notify: function () {\n var me = this;\n if (!me.done) {\n var error = me.error,\n fn = me[error ? 'failure' : 'success'],\n delay = ('delay' in me)\n ? me.delay\n : (error ? 1 : Boot.config.chainDelay),\n scope = me.scope || me;\n me.done = true;\n if (fn) {\n if (delay === 0 || delay > 0) {\n // Free the stack (and defer the next script)\n setTimeout(function () {\n fn.call(scope, me);\n }, delay);\n } else {\n fn.call(scope, me);\n }\n }\n me.fireListeners();\n Boot.requestComplete(me);\n }\n },\n\n onDone: function(listener) {\n var me = this,\n listeners = me.listeners || (me.listeners = []);\n if(me.done) {\n listener(me);\n } else {\n listeners.push(listener);\n }\n },\n\n fireListeners: function() {\n var listeners = this.listeners,\n listener;\n if(listeners) {\n while((listener = listeners.shift())) {\n listener(this);\n }\n }\n }\n };\n\n function Entry(cfg) {\n //The Entry class is a token to manage the load and evaluation\n //state of a particular url. It is used to notify all Requests\n //interested in this url that the content is available.\n\n if(cfg.$isEntry) {\n return cfg;\n }\n\n\n var charset = cfg.charset || Boot.config.charset,\n manifest = Ext.manifest,\n loader = manifest && manifest.loader,\n cache = (cfg.cache !== undefined) ? cfg.cache : (loader && loader.cache),\n buster, busterParam;\n\n if (Boot.config.disableCaching) {\n if (cache === undefined) {\n cache = !Boot.config.disableCaching;\n }\n\n if (cache === false) {\n buster = +new Date();\n } else if (cache !== true) {\n buster = cache;\n }\n\n if (buster) {\n busterParam = (loader && loader.cacheParam) || Boot.config.disableCachingParam;\n buster = busterParam + \"=\" + buster;\n }\n }\n\n _apply(this, cfg);\n \n this.charset = charset;\n this.buster = buster;\n this.requests = [];\n };\n \n Entry.prototype = {\n $isEntry: true,\n done: false,\n evaluated: false,\n loaded: false,\n\n isCrossDomain: function() {\n var me = this;\n if(me.crossDomain === undefined) {\n me.crossDomain = (me.getLoadUrl().indexOf(Boot.origin) !== 0);\n }\n return me.crossDomain;\n },\n\n isCss: function () {\n var me = this;\n if (me.css === undefined) {\n if (me.url) {\n var assetConfig = Boot.assetConfig[me.url];\n me.css = assetConfig ? assetConfig.type === \"css\" : cssRe.test(me.url);\n } else {\n me.css = false;\n }\n }\n return this.css;\n },\n\n getElement: function (tag) {\n var me = this,\n el = me.el;\n if (!el) {\n if (me.isCss()) {\n tag = tag || \"link\";\n el = doc.createElement(tag);\n if(tag == \"link\") {\n el.rel = 'stylesheet';\n me.prop = 'href';\n } else {\n me.prop=\"textContent\";\n }\n el.type = \"text/css\";\n } else {\n tag = tag || \"script\";\n el = doc.createElement(tag);\n el.type = 'text/javascript';\n me.prop = 'src';\n\n if (me.charset) {\n el.charset = me.charset;\n }\n\n if (Boot.hasAsync) {\n el.async = false;\n }\n }\n me.el = el;\n }\n return el;\n },\n\n getLoadUrl: function () {\n var me = this,\n url;\n \n url = me.canonicalPath ? me.url : Boot.canonicalUrl(me.url);\n \n if (!me.loadUrl) {\n me.loadUrl = !!me.buster\n ? (url + (url.indexOf('?') === -1 ? '?' : '&') + me.buster)\n : url;\n }\n return me.loadUrl;\n },\n\n fetch: function (req) {\n var url = this.getLoadUrl(),\n async = !!req.async,\n complete = req.complete;\n\n Boot.fetch(url, complete, this, async);\n },\n\n onContentLoaded: function (response) {\n var me = this,\n status = response.status,\n content = response.content,\n exception = response.exception,\n url = this.getLoadUrl();\n me.loaded = true;\n if ((exception || status === 0) && !_environment.phantom) {\n me.error =\n true;\n me.evaluated = true;\n }\n else if ((status >= 200 && status < 300) || status === 304\n || _environment.phantom\n || (status === 0 && content.length > 0)\n ) {\n me.content = content;\n }\n else {\n me.error =\n true;\n me.evaluated = true;\n }\n },\n\n createLoadElement: function(callback) {\n var me = this,\n el = me.getElement();\n \n me.preserve = true;\n \n el.onerror = function() {\n me.error = true;\n \n if (callback) {\n callback();\n callback = null;\n }\n };\n \n if (Boot.isIE10m) {\n el.onreadystatechange = function() {\n if (this.readyState === 'loaded' || this.readyState === 'complete') {\n if (callback) {\n callback();\n callback = this.onreadystatechange = this.onerror = null;\n }\n }\n };\n }\n else {\n el.onload = function() {\n callback();\n callback = this.onload = this.onerror = null;\n };\n }\n \n // IE starts loading here\n el[me.prop] = me.getLoadUrl();\n },\n\n onLoadElementReady: function() {\n Boot.getHead().appendChild(this.getElement());\n this.evaluated = true;\n },\n\n inject: function (content, asset) {\n var me = this,\n head = Boot.getHead(),\n url = me.url,\n key = me.key,\n base, el, ieMode, basePath;\n\n if (me.isCss()) {\n me.preserve = true;\n basePath = key.substring(0, key.lastIndexOf(\"/\") + 1);\n base = doc.createElement('base');\n base.href = basePath;\n if(head.firstChild) {\n head.insertBefore(base, head.firstChild);\n } else {\n head.appendChild(base);\n }\n // reset the href attribute to cuase IE to pick up the change\n base.href = base.href;\n\n if (url) {\n content += \"\\n/*# sourceURL=\" + key + \" */\";\n }\n\n // create element after setting base\n el = me.getElement(\"style\");\n\n ieMode = ('styleSheet' in el);\n\n head.appendChild(base);\n if(ieMode) {\n head.appendChild(el);\n el.styleSheet.cssText = content;\n } else {\n el.textContent = content;\n head.appendChild(el);\n }\n head.removeChild(base);\n\n } else {\n // Debugger friendly, file names are still shown even though they're\n // eval'ed code. Breakpoints work on both Firebug and Chrome's Web\n // Inspector.\n if (url) {\n content += \"\\n//# sourceURL=\" + key;\n }\n Ext.globalEval(content);\n }\n return me;\n },\n\n loadCrossDomain: function() {\n var me = this,\n complete = function(){\n me.el.onerror = me.el.onload = emptyFn;\n me.el = null;\n me.loaded = me.evaluated = me.done = true;\n me.notifyRequests();\n };\n me.createLoadElement(function(){\n complete();\n });\n me.evaluateLoadElement();\n // at this point, we need sequential evaluation,\n // which means we can't advance the load until\n // this entry has fully completed\n return false;\n },\n\n loadElement: function() {\n var me = this,\n complete = function(){\n me.el.onerror = me.el.onload = emptyFn;\n me.el = null;\n me.loaded = me.evaluated = me.done = true;\n me.notifyRequests();\n };\n me.createLoadElement(function(){\n complete();\n });\n me.evaluateLoadElement();\n return true;\n },\n\n loadSync: function() {\n var me = this;\n me.fetch({\n async: false,\n complete: function (response) {\n me.onContentLoaded(response);\n }\n });\n me.evaluate();\n me.notifyRequests();\n },\n\n load: function (sync) {\n var me = this;\n if (!me.loaded) {\n if(me.loading) {\n // if we're calling back through load and we're loading but haven't\n // yet loaded, then we should be in a sequential, cross domain\n // load scenario which means we can't continue the load on the\n // request until this entry has fully evaluated, which will mean\n // loaded = evaluated = done = true in one step. For css files, this\n // will happen immediately upon <link> element creation / insertion,\n // but <script> elements will set this upon load notification\n return false;\n }\n me.loading = true;\n\n // for async modes, we have some options\n if (!sync) {\n // if cross domain, just inject the script tag and let the onload\n // events drive the progression.\n // IE10 also needs sequential loading because of a bug that makes it\n // fire readystate event prematurely:\n // https://connect.microsoft.com/IE/feedback/details/729164/ie10-dynamic-script-element-fires-loaded-readystate-prematurely\n if (Boot.isIE10 || me.isCrossDomain()) {\n return me.loadCrossDomain();\n }\n // for IE, use the readyStateChange allows us to load scripts in parallel\n // but serialize the evaluation by appending the script node to the\n // document\n else if(!me.isCss() && Boot.hasReadyState) {\n me.createLoadElement(function () {\n me.loaded = true;\n me.notifyRequests();\n });\n }\n\n else if(Boot.useElements &&\n // older webkit, phantomjs included, won't fire load for link elements\n !(me.isCss() && _environment.phantom)) {\n return me.loadElement();\n }\n // for other browsers, just ajax the content down in parallel, and use\n // globalEval to serialize evaluation\n else {\n me.fetch({\n async: !sync,\n complete: function (response) {\n me.onContentLoaded(response);\n me.notifyRequests();\n }\n });\n }\n }\n\n // for sync mode in js, global eval FTW. IE won't honor the comment\n // paths in the debugger, so eventually we need a sync mode for IE that\n // uses the readyStateChange mechanism\n else {\n me.loadSync();\n }\n }\n // signal that the load process can continue\n return true;\n },\n\n evaluateContent: function () {\n this.inject(this.content);\n this.content = null;\n },\n\n evaluateLoadElement: function() {\n Boot.getHead().appendChild(this.getElement());\n },\n\n evaluate: function () {\n var me = this;\n if(!me.evaluated) {\n if(me.evaluating) {\n return;\n }\n me.evaluating = true;\n if(me.content !== undefined) {\n me.evaluateContent();\n } else if(!me.error) {\n me.evaluateLoadElement();\n }\n me.evaluated = me.done = true;\n me.cleanup();\n }\n },\n\n cleanup: function () {\n var me = this,\n el = me.el,\n prop;\n\n if (!el) {\n return;\n }\n\n if (!me.preserve) {\n me.el = null;\n\n el.parentNode.removeChild(el); // Remove, since its useless now\n\n for (prop in el) {\n try {\n if (prop !== me.prop) {\n // If we set the src property to null IE\n // will try and request a script at './null'\n el[prop] = null;\n }\n delete el[prop]; // and prepare for GC\n } catch (cleanEx) {\n //ignore\n }\n }\n }\n\n // Setting to null can cause exceptions if IE ever needs to call these\n // again (like onreadystatechange). This emptyFn has nothing locked in\n // closure scope so it is about as safe as null for memory leaks.\n el.onload = el.onerror = el.onreadystatechange = emptyFn;\n },\n\n notifyRequests: function () {\n var requests = this.requests,\n len = requests.length,\n i, request;\n for (i = 0; i < len; i++) {\n request = requests[i];\n request.processLoadedEntries();\n }\n if(this.done) {\n this.fireListeners();\n }\n },\n\n onDone: function(listener) {\n var me = this,\n listeners = me.listeners || (me.listeners = []);\n if(me.done) {\n listener(me);\n } else {\n listeners.push(listener);\n }\n },\n\n fireListeners: function() {\n var listeners = this.listeners,\n listener;\n if(listeners && listeners.length > 0) {\n while((listener = listeners.shift())) {\n listener(this);\n }\n }\n }\n };\n\n /**\n * Turns on or off the \"cache buster\" applied to dynamically loaded scripts. Normally\n * dynamically loaded scripts have an extra query parameter appended to avoid stale\n * cached scripts. This method can be used to disable this mechanism, and is primarily\n * useful for testing. This is done using a cookie.\n * @param {Boolean} disable True to disable the cache buster.\n * @param {String} [path=\"/\"] An optional path to scope the cookie.\n */\n Ext.disableCacheBuster = function (disable, path) {\n var date = new Date();\n date.setTime(date.getTime() + (disable ? 10 * 365 : -1) * 24 * 60 * 60 * 1000);\n date = date.toGMTString();\n doc.cookie = 'ext-cache=1; expires=' + date + '; path=' + (path || '/');\n };\n\n\n Boot.init();\n return Boot;\n\n// NOTE: We run the eval at global scope to protect the body of the function and allow\n// compressors to still process it.\n}(function () {\n}));//(eval(\"/*@cc_on!@*/!1\"));\n\n/**\n * This method evaluates the given code free of any local variable. This\n * will be at global scope, in others it will be in a function.\n * @param {String} code The code to evaluate.\n * @private\n * @method\n * @member Ext\n */\nExt.globalEval = Ext.globalEval || (this.execScript\n ? function (code) { execScript(code); }\n : function ($$code) { eval.call(window, $$code); });\n\n//<feature legacyBrowser>\n/*\n * Only IE8 & IE/Quirks lack Function.prototype.bind so we polyfill that here.\n */\nif (!Function.prototype.bind) {\n (function () {\n var slice = Array.prototype.slice,\n // To reduce overhead on call of the bound fn we have two flavors based on\n // whether we have args to prepend or not:\n bind = function (me) {\n var args = slice.call(arguments, 1),\n method = this;\n\n if (args.length) {\n return function () {\n var t = arguments;\n // avoid the slice/concat if the caller does not supply args\n return method.apply(me, t.length ? args.concat(slice.call(t)) : args);\n };\n }\n // this is the majority use case - just fn.bind(this) and no args\n\n args = null;\n return function () {\n return method.apply(me, arguments);\n };\n };\n Function.prototype.bind = bind;\n bind.$extjs = true; // to detect this polyfill if one want to improve it\n }());\n}\n//</feature>\n\n//</editor-fold>\n\nExt.setResourcePath = function (poolName, path) {\n var manifest = Ext.manifest || (Ext.manifest = {}),\n paths = manifest.resources || (manifest.resources = {});\n\n if (manifest) {\n if (typeof poolName !== 'string') {\n Ext.apply(paths, poolName);\n } else {\n paths[poolName] = path;\n }\n manifest.resources = paths;\n }\n};\n\nExt.getResourcePath = function (path, poolName, packageName) {\n if (typeof path !== 'string') {\n poolName = path.pool;\n packageName = path.packageName;\n path = path.path;\n }\n var manifest = Ext.manifest,\n paths = manifest && manifest.resources,\n poolPath = paths[poolName],\n output = [];\n\n if (poolPath == null) {\n poolPath = paths.path;\n if (poolPath == null) {\n poolPath = 'resources';\n }\n }\n\n if (poolPath) {\n output.push(poolPath);\n }\n\n if (packageName) {\n output.push(packageName);\n }\n\n output.push(path);\n return output.join('/');\n};\n// here, the extra check for window['Ext'] is needed for use with cmd-test\n// code injection. we need to make that this file will sync up with page global\n// scope to avoid duplicate Ext.Boot state. That check is after the initial Ext check\n// to allow the sandboxing template to inject an appropriate Ext var and prevent the\n// global detection.\nvar Ext = Ext || window['Ext'] || {};\n\n\n//<editor-fold desc=\"Microloader\">\n/**\n * @class Ext.Microloader\n * @private\n * @singleton\n */\nExt.Microloader = Ext.Microloader || (function () {\n var Boot = Ext.Boot,\n _warn = function (message) {\n console.log(\"[WARN] \" + message);\n },\n _privatePrefix = '_ext:' + location.pathname,\n\n /**\n * @method getStorageKey\n * The Following combination is used to create isolated local storage keys\n * '_ext' is used to scope all the local storage keys that we internally by Ext\n * 'location.pathname' is used to force each assets to cache by an absolute URL (/build/MyApp) (dev vs prod)\n * 'url' is used to force each asset to cache relative to the page (app.json vs resources/app.css)\n * 'profileId' is used to differentiate the builds of an application (neptune vs crisp)\n * 'Microloader.appId' is unique to the application and will differentiate apps on the same host (dev mode running app watch against multiple apps)\n */\n getStorageKey = function(url, profileId) {\n return _privatePrefix + url + '-' + (profileId ? profileId + '-' : '') + Microloader.appId;\n },\n postProcessor, _storage;\n\n try {\n _storage = window['localStorage'];\n } catch(ex) {\n // ignore\n }\n\n var _cache = window['applicationCache'],\n // Local Storage Controller\n LocalStorage = {\n clearAllPrivate: function(manifest) {\n if(_storage) {\n\n //Remove the entry for the manifest first\n _storage.removeItem(manifest.key);\n\n var i, key,\n removeKeys = [],\n suffix = manifest.profile + '-' + Microloader.appId,\n ln = _storage.length;\n for (i = 0; i < ln; i++) {\n key = _storage.key(i);\n // If key starts with the private key and the suffix is present we can clear this entry\n if (key.indexOf(_privatePrefix) === 0 && key.indexOf(suffix) !== -1) {\n removeKeys.push(key);\n }\n }\n\n for(i in removeKeys) {\n _storage.removeItem(removeKeys[i]);\n }\n }\n },\n /**\n * @private\n */\n retrieveAsset: function (key) {\n try {\n return _storage.getItem(key);\n }\n catch (e) {\n // Private browsing mode\n return null;\n }\n },\n\n setAsset: function(key, content) {\n try {\n if (content === null || content == '') {\n _storage.removeItem(key);\n } else {\n _storage.setItem(key, content);\n }\n }\n catch (e) {\n if (_storage && e.code == e.QUOTA_EXCEEDED_ERR) {\n }\n }\n }\n };\n\n var Asset = function (cfg) {\n if (typeof cfg.assetConfig === 'string') {\n this.assetConfig = {\n path: cfg.assetConfig\n };\n } else {\n this.assetConfig = cfg.assetConfig;\n }\n\n this.type = cfg.type;\n this.key = getStorageKey(this.assetConfig.path, cfg.manifest.profile);\n\n if (cfg.loadFromCache) {\n this.loadFromCache();\n }\n };\n\n Asset.prototype = {\n shouldCache: function() {\n return _storage && this.assetConfig.update && this.assetConfig.hash && !this.assetConfig.remote;\n },\n\n is: function (asset) {\n return (!!asset && this.assetConfig && asset.assetConfig && (this.assetConfig.hash === asset.assetConfig.hash))\n },\n\n cache: function(content) {\n if (this.shouldCache()) {\n LocalStorage.setAsset(this.key, content || this.content);\n }\n },\n\n uncache: function() {\n LocalStorage.setAsset(this.key, null);\n },\n\n updateContent: function (content) {\n this.content = content;\n },\n\n getSize: function () {\n return this.content ? this.content.length : 0;\n },\n\n loadFromCache: function() {\n if (this.shouldCache()) {\n this.content = LocalStorage.retrieveAsset(this.key);\n }\n }\n };\n\n var Manifest = function (cfg) {\n if (typeof cfg.content === \"string\") {\n this.content = JSON.parse(cfg.content);\n } else {\n this.content = cfg.content;\n }\n this.assetMap = {};\n\n this.url = cfg.url;\n this.fromCache = !!cfg.cached;\n this.assetCache = !(cfg.assetCache === false);\n this.key = getStorageKey(this.url);\n\n // Pull out select properties for repetitive use\n this.profile = this.content.profile;\n this.hash = this.content.hash;\n this.loadOrder = this.content.loadOrder;\n this.deltas = this.content.cache ? this.content.cache.deltas : null;\n this.cacheEnabled = this.content.cache ? this.content.cache.enable : false;\n\n this.loadOrderMap = (this.loadOrder) ? Boot.createLoadOrderMap(this.loadOrder) : null;\n\n var tags = this.content.tags,\n platformTags = Ext.platformTags;\n\n if (tags) {\n if (tags instanceof Array) {\n for (var i = 0; i < tags.length; i++) {\n platformTags[tags[i]] = true;\n }\n } else {\n Boot.apply(platformTags, tags);\n }\n\n // re-apply the query parameters, so that the params as specified\n // in the url always has highest priority\n Boot.apply(platformTags, Boot.loadPlatformsParam());\n }\n\n // Convert all assets into Assets\n this.js = this.processAssets(this.content.js, 'js');\n this.css = this.processAssets(this.content.css, 'css');\n };\n\n Manifest.prototype = {\n processAsset: function(assetConfig, type) {\n var processedAsset = new Asset({\n manifest: this,\n assetConfig: assetConfig,\n type: type,\n loadFromCache: this.assetCache\n });\n this.assetMap[assetConfig.path] = processedAsset;\n return processedAsset;\n },\n\n processAssets: function(assets, type) {\n var results = [],\n ln = assets.length,\n i, assetConfig;\n\n for (i = 0; i < ln; i++) {\n assetConfig = assets[i];\n results.push(this.processAsset(assetConfig, type));\n }\n\n return results;\n },\n\n useAppCache: function() {\n return true;\n },\n\n // Concatenate all assets for easy access\n getAssets: function () {\n return this.css.concat(this.js);\n },\n\n getAsset: function (path) {\n return this.assetMap[path];\n },\n\n shouldCache: function() {\n return this.hash && this.cacheEnabled;\n },\n\n cache: function(content) {\n if (this.shouldCache()) {\n LocalStorage.setAsset(this.key, JSON.stringify(content || this.content));\n }\n },\n\n is: function(manifest) {\n return this.hash === manifest.hash;\n },\n\n // Clear the manifest from local storage\n uncache: function() {\n LocalStorage.setAsset(this.key, null);\n },\n\n exportContent: function() {\n return Boot.apply({\n loadOrderMap: this.loadOrderMap\n }, this.content);\n }\n };\n\n /**\n * Microloader\n * @type {Array}\n * @private\n */\n var _listeners = [],\n _loaded = false,\n Microloader = {\n init: function () {\n Ext.microloaded = true;\n\n // data-app is in the dev template for an application and is also\n // injected into the app my CMD for production\n // We use this to prefix localStorage cache to prevent collisions\n var microloaderElement = document.getElementById('microloader');\n Microloader.appId = microloaderElement ? microloaderElement.getAttribute('data-app') : '';\n\n if (Ext.beforeLoad) {\n postProcessor = Ext.beforeLoad(Ext.platformTags);\n }\n\n var readyHandler = Ext._beforereadyhandler;\n\n Ext._beforereadyhandler = function () {\n if (Ext.Boot !== Boot) {\n Ext.apply(Ext.Boot, Boot);\n Ext.Boot = Boot;\n }\n if (readyHandler) {\n readyHandler();\n }\n };\n },\n\n applyCacheBuster: function(url) {\n var tstamp = new Date().getTime(),\n sep = url.indexOf('?') === -1 ? '?' : '&';\n url = url + sep + \"_dc=\" + tstamp;\n return url;\n },\n\n run: function() {\n Microloader.init();\n var manifest = Ext.manifest;\n\n if (typeof manifest === \"string\") {\n var extension = \".json\",\n url = manifest.indexOf(extension) === manifest.length - extension.length\n ? manifest\n : manifest + \".json\",\n key = getStorageKey(url),\n content = LocalStorage.retrieveAsset(key);\n\n // Manifest found in local storage, use this for immediate boot except in PhantomJS environments for building.\n if (content) {\n manifest = new Manifest({\n url: url,\n content: content,\n cached: true\n });\n if (postProcessor) {\n postProcessor(manifest);\n }\n Microloader.load(manifest);\n\n\n // Manifest is not in local storage. Fetch it from the server\n } else {\n\n if (location.href.indexOf('file:/') === 0) {\n Manifest.url = Microloader.applyCacheBuster(url + 'p');\n Boot.load(Manifest.url);\n }\n else {\n Boot.fetch(Microloader.applyCacheBuster(url), function(result) {\n Microloader.setManifest(result.content);\n });\n }\n }\n\n // Embedded Manifest into JS file\n } else {\n manifest = new Manifest({\n content: manifest\n });\n Microloader.load(manifest);\n }\n },\n\n /**\n *\n * @param cfg\n */\n setManifest: function(cfg) {\n var manifest = new Manifest({\n url: Manifest.url,\n content: cfg\n });\n manifest.cache();\n if (postProcessor) {\n postProcessor(manifest);\n }\n Microloader.load(manifest);\n },\n\n /**\n * @param {Manifest} manifest\n */\n load: function (manifest) {\n Microloader.urls = [];\n Microloader.manifest = manifest;\n Ext.manifest = Microloader.manifest.exportContent();\n\n var assets = manifest.getAssets(),\n cachedAssets = [],\n asset, i, len, include, entry;\n\n for (len = assets.length, i = 0; i < len; i++) {\n asset = assets[i];\n include = Microloader.filterAsset(asset);\n if (include) {\n // Asset is using the localStorage caching system\n if (manifest.shouldCache() && asset.shouldCache()) {\n // Asset already has content from localStorage, instantly seed that into boot\n if (asset.content) {\n entry = Boot.registerContent(asset.assetConfig.path, asset.type, asset.content);\n if (entry.evaluated) {\n _warn(\"Asset: \" + asset.assetConfig.path + \" was evaluated prior to local storage being consulted.\");\n }\n //load via AJAX and seed content into Boot\n } else {\n cachedAssets.push(asset);\n }\n }\n Microloader.urls.push(asset.assetConfig.path);\n Boot.assetConfig[asset.assetConfig.path] = Boot.apply({type: asset.type}, asset.assetConfig);\n }\n }\n\n // If any assets are using the caching system and do not have local versions load them first via AJAX\n if (cachedAssets.length > 0) {\n Microloader.remainingCachedAssets = cachedAssets.length;\n while (cachedAssets.length > 0) {\n asset = cachedAssets.pop();\n Boot.fetch(asset.assetConfig.path, (function(asset) {\n return function(result) {\n Microloader.onCachedAssetLoaded(asset, result);\n }\n })(asset));\n }\n } else {\n Microloader.onCachedAssetsReady();\n }\n },\n\n // Load the asset and seed its content into Boot to be evaluated in sequence\n onCachedAssetLoaded: function (asset, result) {\n var checksum;\n result = Microloader.parseResult(result);\n Microloader.remainingCachedAssets--;\n\n if (!result.error) {\n checksum = Microloader.checksum(result.content, asset.assetConfig.hash);\n if (!checksum) {\n _warn(\"Cached Asset '\" + asset.assetConfig.path + \"' has failed checksum. This asset will be uncached for future loading\");\n\n // Un cache this asset so it is loaded next time\n asset.uncache();\n }\n\n Boot.registerContent(asset.assetConfig.path, asset.type, result.content);\n asset.updateContent(result.content);\n asset.cache();\n } else {\n _warn(\"There was an error pre-loading the asset '\" + asset.assetConfig.path + \"'. This asset will be uncached for future loading\");\n\n // Un cache this asset so it is loaded next time\n asset.uncache();\n }\n\n if (Microloader.remainingCachedAssets === 0) {\n Microloader.onCachedAssetsReady();\n }\n },\n\n onCachedAssetsReady: function(){\n Boot.load({\n url: Microloader.urls,\n loadOrder: Microloader.manifest.loadOrder,\n loadOrderMap: Microloader.manifest.loadOrderMap,\n sequential: true,\n success: Microloader.onAllAssetsReady,\n failure: Microloader.onAllAssetsReady\n });\n },\n\n onAllAssetsReady: function() {\n _loaded = true;\n Microloader.notify();\n\n if (navigator.onLine !== false) {\n Microloader.checkAllUpdates();\n }\n else {\n if(window['addEventListener']) {\n window.addEventListener('online', Microloader.checkAllUpdates, false);\n }\n }\n },\n\n onMicroloaderReady: function (listener) {\n if (_loaded) {\n listener();\n } else {\n _listeners.push(listener);\n }\n },\n\n /**\n * @private\n */\n notify: function () {\n var listener;\n while((listener = _listeners.shift())) {\n listener();\n }\n },\n\n // Delta patches content\n patch: function (content, delta) {\n var output = [],\n chunk, i, ln;\n\n if (delta.length === 0) {\n return content;\n }\n\n for (i = 0,ln = delta.length; i < ln; i++) {\n chunk = delta[i];\n\n if (typeof chunk === 'number') {\n output.push(content.substring(chunk, chunk + delta[++i]));\n }\n else {\n output.push(chunk);\n }\n }\n\n return output.join('');\n },\n\n checkAllUpdates: function() {\n if(window['removeEventListener']) {\n window.removeEventListener('online', Microloader.checkAllUpdates, false);\n }\n\n if(_cache) {\n Microloader.checkForAppCacheUpdate();\n }\n\n // Manifest came from a cached instance, check for updates\n if (Microloader.manifest.fromCache) {\n Microloader.checkForUpdates();\n }\n },\n\n checkForAppCacheUpdate: function() {\n if (_cache.status === _cache.UPDATEREADY || _cache.status === _cache.OBSOLETE) {\n Microloader.appCacheState = 'updated';\n } else if (_cache.status !== _cache.IDLE && _cache.status !== _cache.UNCACHED) {\n Microloader.appCacheState = 'checking';\n _cache.addEventListener('error', Microloader.onAppCacheError);\n _cache.addEventListener('noupdate', Microloader.onAppCacheNotUpdated);\n _cache.addEventListener('cached', Microloader.onAppCacheNotUpdated);\n _cache.addEventListener('updateready', Microloader.onAppCacheReady);\n _cache.addEventListener('obsolete', Microloader.onAppCacheObsolete);\n } else {\n Microloader.appCacheState = 'current';\n }\n },\n\n checkForUpdates: function() {\n // Fetch the Latest Manifest from the server\n Boot.fetch(Microloader.applyCacheBuster(Microloader.manifest.url), Microloader.onUpdatedManifestLoaded);\n },\n\n onAppCacheError: function(e) {\n _warn(e.message);\n\n Microloader.appCacheState = 'error';\n Microloader.notifyUpdateReady();\n },\n\n onAppCacheReady: function() {\n _cache.swapCache();\n Microloader.appCacheUpdated();\n },\n\n onAppCacheObsolete: function() {\n Microloader.appCacheUpdated();\n },\n\n appCacheUpdated: function() {\n Microloader.appCacheState = 'updated';\n Microloader.notifyUpdateReady();\n },\n\n onAppCacheNotUpdated: function() {\n Microloader.appCacheState = 'current';\n Microloader.notifyUpdateReady();\n },\n\n\n filterAsset: function(asset) {\n var cfg = (asset && asset.assetConfig) || {};\n if(cfg.platform || cfg.exclude) {\n return Boot.filterPlatform(cfg.platform, cfg.exclude);\n }\n return true;\n },\n\n onUpdatedManifestLoaded: function (result) {\n result = Microloader.parseResult(result);\n\n if (!result.error) {\n var currentAssets, newAssets, currentAsset, newAsset, prop,\n assets, deltas, deltaPath, include,\n updatingAssets = [],\n manifest = new Manifest({\n url: Microloader.manifest.url,\n content: result.content,\n assetCache: false\n });\n\n Microloader.remainingUpdatingAssets = 0;\n Microloader.updatedAssets = [];\n Microloader.removedAssets = [];\n Microloader.updatedManifest = null;\n Microloader.updatedAssetsReady = false;\n\n // If the updated manifest has turned off caching we need to clear out all local storage\n // and trigger a appupdate as all content is now uncached\n if (!manifest.shouldCache()) {\n\n Microloader.updatedManifest = manifest;\n LocalStorage.clearAllPrivate(manifest);\n Microloader.onAllUpdatedAssetsReady();\n return;\n }\n\n // Manifest itself has changed\n if (!Microloader.manifest.is(manifest)) {\n Microloader.updatedManifest = manifest;\n\n currentAssets = Microloader.manifest.getAssets();\n newAssets = manifest.getAssets();\n\n // Look through new assets for assets that do not exist or assets that have different versions\n for (prop in newAssets) {\n newAsset = newAssets[prop];\n currentAsset = Microloader.manifest.getAsset(newAsset.assetConfig.path);\n include = Microloader.filterAsset(newAsset);\n\n if (include && (!currentAsset || (newAsset.shouldCache() && (!currentAsset.is(newAsset))))) {\n updatingAssets.push({_new: newAsset, _current: currentAsset});\n }\n }\n\n // Look through current assets for stale/old assets that have been removed\n for (prop in currentAssets) {\n currentAsset = currentAssets[prop];\n newAsset = manifest.getAsset(currentAsset.assetConfig.path);\n\n //New version of this asset has been filtered out\n include = !Microloader.filterAsset(newAsset);\n\n if (!include || !newAsset || (currentAsset.shouldCache() && !newAsset.shouldCache())) {\n Microloader.removedAssets.push(currentAsset);\n }\n }\n\n // Loop through all assets that need updating\n if (updatingAssets.length > 0) {\n Microloader.remainingUpdatingAssets = updatingAssets.length;\n while (updatingAssets.length > 0) {\n assets = updatingAssets.pop();\n newAsset = assets._new;\n currentAsset = assets._current;\n\n // Full Updates will simply download the file and replace its current content\n if (newAsset.assetConfig.update === \"full\" || !currentAsset) {\n\n\n // Load the asset and cache its its content into Boot to be evaluated in sequence\n Boot.fetch(newAsset.assetConfig.path, (function (asset) {\n return function (result) {\n Microloader.onFullAssetUpdateLoaded(asset, result)\n };\n }(newAsset))\n );\n\n // Delta updates will be given a delta patch\n } else if (newAsset.assetConfig.update === \"delta\") {\n deltas = manifest.deltas;\n deltaPath = deltas + \"/\" + newAsset.assetConfig.path + \"/\" + currentAsset.assetConfig.hash + \".json\";\n // Fetch the Delta Patch and update the contents of the asset\n Boot.fetch(deltaPath,\n (function (asset, oldAsset) {\n return function (result) {\n Microloader.onDeltaAssetUpdateLoaded(asset, oldAsset, result)\n };\n }(newAsset, currentAsset))\n );\n }\n }\n } else {\n Microloader.onAllUpdatedAssetsReady();\n }\n } else {\n Microloader.onAllUpdatedAssetsReady();\n }\n } else {\n _warn(\"Error loading manifest file to check for updates\");\n Microloader.onAllUpdatedAssetsReady();\n }\n },\n\n onFullAssetUpdateLoaded: function(asset, result) {\n var checksum;\n result = Microloader.parseResult(result);\n Microloader.remainingUpdatingAssets--;\n\n if (!result.error) {\n checksum = Microloader.checksum(result.content, asset.assetConfig.hash);\n if (!checksum) {\n\n // uncache this asset as there is a new version somewhere that has not been loaded.\n asset.uncache();\n } else {\n asset.updateContent(result.content);\n Microloader.updatedAssets.push(asset);\n }\n } else {\n\n // uncache this asset as there is a new version somewhere that has not been loaded.\n asset.uncache();\n }\n\n if (Microloader.remainingUpdatingAssets === 0) {\n Microloader.onAllUpdatedAssetsReady();\n }\n },\n\n onDeltaAssetUpdateLoaded: function(asset, oldAsset, result) {\n var json, checksum, content;\n result = Microloader.parseResult(result);\n Microloader.remainingUpdatingAssets--;\n\n if (!result.error) {\n try {\n json = JSON.parse(result.content);\n content = Microloader.patch(oldAsset.content, json);\n checksum = Microloader.checksum(content, asset.assetConfig.hash);\n if (!checksum) {\n\n // uncache this asset as there is a new version somewhere that has not been loaded.\n asset.uncache();\n } else {\n asset.updateContent(content);\n Microloader.updatedAssets.push(asset);\n }\n } catch (e) {\n _warn(\"Error parsing delta patch for \" + asset.assetConfig.path + \" with hash \" + oldAsset.assetConfig.hash + \" . This asset will be uncached for future loading\");\n // uncache this asset as there is a new version somewhere that has not been loaded.\n asset.uncache();\n }\n } else {\n _warn(\"Error loading delta patch for \" + asset.assetConfig.path + \" with hash \" + oldAsset.assetConfig.hash + \" . This asset will be uncached for future loading\");\n\n // uncache this asset as there is a new version somewhere that has not been loaded.\n asset.uncache();\n }\n if (Microloader.remainingUpdatingAssets === 0) {\n Microloader.onAllUpdatedAssetsReady();\n }\n },\n\n //TODO: Make this all transaction based to allow for reverting if quota is exceeded\n onAllUpdatedAssetsReady: function() {\n var asset;\n Microloader.updatedAssetsReady = true;\n\n if (Microloader.updatedManifest) {\n while (Microloader.removedAssets.length > 0) {\n asset = Microloader.removedAssets.pop();\n asset.uncache();\n }\n\n if (Microloader.updatedManifest) {\n Microloader.updatedManifest.cache();\n }\n\n while (Microloader.updatedAssets.length > 0) {\n asset = Microloader.updatedAssets.pop();\n asset.cache();\n }\n\n }\n\n Microloader.notifyUpdateReady();\n },\n\n notifyUpdateReady: function () {\n if (Microloader.appCacheState !== 'checking' && Microloader.updatedAssetsReady) {\n if (Microloader.appCacheState === 'updated' || Microloader.updatedManifest) {\n Microloader.appUpdate = {\n updated: true,\n app: Microloader.appCacheState === 'updated',\n manifest: Microloader.updatedManifest && Microloader.updatedManifest.exportContent()\n };\n\n Microloader.fireAppUpdate();\n }\n }\n },\n\n fireAppUpdate: function() {\n if (Ext.GlobalEvents) {\n // We defer dispatching this event slightly in order to let the application finish loading\n // as we are still very early in the lifecycle\n Ext.defer(function() {\n Ext.GlobalEvents.fireEvent('appupdate', Microloader.appUpdate);\n }, 1000);\n }\n },\n\n checksum: function(content, hash) {\n if(!content || !hash) {\n return false;\n }\n\n var passed = true,\n hashLn = hash.length,\n checksumType = content.substring(0, 1);\n\n if (checksumType == '/') {\n if (content.substring(2, hashLn + 2) !== hash) {\n passed = false;\n }\n } else if (checksumType == 'f') {\n if (content.substring(10, hashLn + 10) !== hash) {\n passed = false;\n }\n } else if (checksumType == '.') {\n if (content.substring(1, hashLn + 1) !== hash) {\n passed = false;\n }\n }\n return passed;\n },\n parseResult: function(result) {\n var rst = {};\n if ((result.exception || result.status === 0) && !Boot.env.phantom) {\n rst.error = true;\n } else if ((result.status >= 200 && result.status < 300) || result.status === 304\n || Boot.env.phantom\n || (result.status === 0 && result.content.length > 0)\n ) {\n rst.content = result.content;\n } else {\n rst.error = true;\n }\n return rst;\n }\n };\n\n return Microloader;\n}());\n\n/**\n * @type {String/Object}\n */\nExt.manifest = Ext.manifest || \"bootstrap\";\n\nExt.Microloader.run();\n"} +{"text": "/*\n * Copyright 2007-2008 Peter Hutterer\n *\n * Permission is hereby granted, free of charge, to any person obtaining a\n * copy of this software and associated documentation files (the \"Software\"),\n * to deal in the Software without restriction, including without limitation\n * the rights to use, copy, modify, merge, publish, distribute, sublicense,\n * and/or sell copies of the Software, and to permit persons to whom the\n * Software is furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice (including the next\n * paragraph) shall be included in all copies or substantial portions of the\n * Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL\n * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER\n * DEALINGS IN THE SOFTWARE.\n *\n * Author: Peter Hutterer, University of South Australia, NICTA\n */\n\n#ifdef HAVE_DIX_CONFIG_H\n#include <dix-config.h>\n#endif\n\n#ifndef CHDEVCUR_H\n#define CHDEVCUR_H 1\n\nint SProcXIChangeCursor(ClientPtr /* client */ );\nint ProcXIChangeCursor(ClientPtr /* client */ );\n\n#endif /* CHDEVCUR_H */\n"} +{"text": "import React from 'react';\nimport ReactDOM from 'react-dom';\n\nclass App extends React.Component {\n render(){\n return(\n <div>Hello General Assembly. Welcome to React</div>\n );\n }\n}\n\nReactDOM.render(<App />, document.getElementById('app'));"} +{"text": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<document type=\"com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB\" version=\"3.0\" toolsVersion=\"14113\" targetRuntime=\"iOS.CocoaTouch\" propertyAccessControl=\"none\" useAutolayout=\"YES\" useTraitCollections=\"YES\" useSafeAreas=\"YES\" colorMatched=\"YES\" initialViewController=\"BYZ-38-t0r\">\n <device id=\"retina4_7\" orientation=\"portrait\">\n <adaptation id=\"fullscreen\"/>\n </device>\n <dependencies>\n <deployment identifier=\"iOS\"/>\n <plugIn identifier=\"com.apple.InterfaceBuilder.IBCocoaTouchPlugin\" version=\"14088\"/>\n <capability name=\"Safe area layout guides\" minToolsVersion=\"9.0\"/>\n <capability name=\"documents saved in the Xcode 8 format\" minToolsVersion=\"8.0\"/>\n </dependencies>\n <scenes>\n <!--View Controller-->\n <scene sceneID=\"tne-QT-ifu\">\n <objects>\n <viewController id=\"BYZ-38-t0r\" customClass=\"ViewController\" sceneMemberID=\"viewController\">\n <view key=\"view\" contentMode=\"scaleToFill\" id=\"8bC-Xf-vdC\">\n <rect key=\"frame\" x=\"0.0\" y=\"0.0\" width=\"375\" height=\"667\"/>\n <autoresizingMask key=\"autoresizingMask\" widthSizable=\"YES\" heightSizable=\"YES\"/>\n <subviews>\n <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"lwe-G3-uak\">\n <rect key=\"frame\" x=\"0.0\" y=\"61\" width=\"375\" height=\"50\"/>\n <constraints>\n <constraint firstAttribute=\"height\" constant=\"50\" id=\"6M3-2q-tAt\"/>\n </constraints>\n <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n <nil key=\"textColor\"/>\n <nil key=\"highlightedColor\"/>\n </label>\n <textField opaque=\"NO\" contentMode=\"scaleToFill\" contentHorizontalAlignment=\"left\" contentVerticalAlignment=\"center\" borderStyle=\"bezel\" textAlignment=\"natural\" minimumFontSize=\"17\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"CQT-cN-Ahs\">\n <rect key=\"frame\" x=\"50\" y=\"322.5\" width=\"275\" height=\"22\"/>\n <nil key=\"textColor\"/>\n <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"14\"/>\n <textInputTraits key=\"textInputTraits\"/>\n </textField>\n <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"V9a-LM-47R\">\n <rect key=\"frame\" x=\"0.0\" y=\"132\" width=\"375\" height=\"50\"/>\n <constraints>\n <constraint firstAttribute=\"height\" constant=\"50\" id=\"qlG-h8-J11\"/>\n </constraints>\n <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n <nil key=\"textColor\"/>\n <nil key=\"highlightedColor\"/>\n </label>\n <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"emoji:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"zqd-uc-hf4\">\n <rect key=\"frame\" x=\"0.0\" y=\"40\" width=\"46\" height=\"21\"/>\n <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n <nil key=\"textColor\"/>\n <nil key=\"highlightedColor\"/>\n </label>\n <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"emoji编码:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"EqC-C2-o0I\">\n <rect key=\"frame\" x=\"0.0\" y=\"111\" width=\"81\" height=\"21\"/>\n <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n <nil key=\"textColor\"/>\n <nil key=\"highlightedColor\"/>\n </label>\n <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"emoji解码:\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"M5S-8c-oTW\">\n <rect key=\"frame\" x=\"0.0\" y=\"182\" width=\"81\" height=\"21\"/>\n <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n <nil key=\"textColor\"/>\n <nil key=\"highlightedColor\"/>\n </label>\n <label opaque=\"NO\" userInteractionEnabled=\"NO\" contentMode=\"left\" horizontalHuggingPriority=\"251\" verticalHuggingPriority=\"251\" text=\"\" textAlignment=\"natural\" lineBreakMode=\"tailTruncation\" baselineAdjustment=\"alignBaselines\" adjustsFontSizeToFit=\"NO\" translatesAutoresizingMaskIntoConstraints=\"NO\" id=\"bdu-Jg-VCs\">\n <rect key=\"frame\" x=\"0.0\" y=\"203\" width=\"375\" height=\"50\"/>\n <constraints>\n <constraint firstAttribute=\"height\" constant=\"50\" id=\"hdV-kE-DZZ\"/>\n </constraints>\n <fontDescription key=\"fontDescription\" type=\"system\" pointSize=\"17\"/>\n <nil key=\"textColor\"/>\n <nil key=\"highlightedColor\"/>\n </label>\n </subviews>\n <color key=\"backgroundColor\" red=\"1\" green=\"1\" blue=\"1\" alpha=\"1\" colorSpace=\"custom\" customColorSpace=\"sRGB\"/>\n <constraints>\n <constraint firstItem=\"M5S-8c-oTW\" firstAttribute=\"leading\" secondItem=\"6Tk-OE-BBY\" secondAttribute=\"leading\" id=\"1Dz-cb-ggD\"/>\n <constraint firstItem=\"bdu-Jg-VCs\" firstAttribute=\"top\" secondItem=\"M5S-8c-oTW\" secondAttribute=\"bottom\" id=\"57Q-US-CZY\"/>\n <constraint firstItem=\"zqd-uc-hf4\" firstAttribute=\"top\" secondItem=\"6Tk-OE-BBY\" secondAttribute=\"top\" constant=\"20\" id=\"8qy-vK-GYf\"/>\n <constraint firstItem=\"bdu-Jg-VCs\" firstAttribute=\"trailing\" secondItem=\"6Tk-OE-BBY\" secondAttribute=\"trailing\" id=\"ESc-0I-dhw\"/>\n <constraint firstItem=\"zqd-uc-hf4\" firstAttribute=\"leading\" secondItem=\"6Tk-OE-BBY\" secondAttribute=\"leading\" id=\"I6p-US-1zA\"/>\n <constraint firstItem=\"EqC-C2-o0I\" firstAttribute=\"leading\" secondItem=\"6Tk-OE-BBY\" secondAttribute=\"leading\" id=\"J8Y-po-fxY\"/>\n <constraint firstItem=\"V9a-LM-47R\" firstAttribute=\"leading\" secondItem=\"6Tk-OE-BBY\" secondAttribute=\"leading\" id=\"KZN-fl-jdU\"/>\n <constraint firstItem=\"M5S-8c-oTW\" firstAttribute=\"top\" secondItem=\"V9a-LM-47R\" secondAttribute=\"bottom\" id=\"LvZ-jq-fGJ\"/>\n <constraint firstItem=\"EqC-C2-o0I\" firstAttribute=\"top\" secondItem=\"lwe-G3-uak\" secondAttribute=\"bottom\" id=\"RL4-jz-1y7\"/>\n <constraint firstItem=\"6Tk-OE-BBY\" firstAttribute=\"trailing\" secondItem=\"CQT-cN-Ahs\" secondAttribute=\"trailing\" constant=\"50\" id=\"SFX-Ur-YfU\"/>\n <constraint firstItem=\"lwe-G3-uak\" firstAttribute=\"leading\" secondItem=\"8bC-Xf-vdC\" secondAttribute=\"leading\" id=\"T6h-Gh-plQ\"/>\n <constraint firstItem=\"V9a-LM-47R\" firstAttribute=\"trailing\" secondItem=\"6Tk-OE-BBY\" secondAttribute=\"trailing\" id=\"XI6-9p-SvL\"/>\n <constraint firstItem=\"CQT-cN-Ahs\" firstAttribute=\"leading\" secondItem=\"6Tk-OE-BBY\" secondAttribute=\"leading\" constant=\"50\" id=\"YEu-ZF-7dh\"/>\n <constraint firstItem=\"lwe-G3-uak\" firstAttribute=\"top\" secondItem=\"zqd-uc-hf4\" secondAttribute=\"bottom\" id=\"j06-yM-8xZ\"/>\n <constraint firstItem=\"CQT-cN-Ahs\" firstAttribute=\"centerY\" secondItem=\"8bC-Xf-vdC\" secondAttribute=\"centerY\" id=\"qOc-6W-wFf\"/>\n <constraint firstAttribute=\"trailing\" secondItem=\"lwe-G3-uak\" secondAttribute=\"trailing\" id=\"svD-Dc-R1E\"/>\n <constraint firstItem=\"V9a-LM-47R\" firstAttribute=\"top\" secondItem=\"EqC-C2-o0I\" secondAttribute=\"bottom\" id=\"vnf-Hi-twg\"/>\n <constraint firstItem=\"bdu-Jg-VCs\" firstAttribute=\"leading\" secondItem=\"6Tk-OE-BBY\" secondAttribute=\"leading\" id=\"xuO-6O-fJr\"/>\n </constraints>\n <viewLayoutGuide key=\"safeArea\" id=\"6Tk-OE-BBY\"/>\n </view>\n <connections>\n <outlet property=\"TextField\" destination=\"CQT-cN-Ahs\" id=\"j6B-fJ-Rwl\"/>\n <outlet property=\"emojiDecodeLabel\" destination=\"bdu-Jg-VCs\" id=\"lZF-Uc-w1l\"/>\n <outlet property=\"emojiEncodeLabel\" destination=\"V9a-LM-47R\" id=\"deV-YE-HTw\"/>\n <outlet property=\"textLabel\" destination=\"lwe-G3-uak\" id=\"Hxf-7c-I97\"/>\n </connections>\n </viewController>\n <placeholder placeholderIdentifier=\"IBFirstResponder\" id=\"dkx-z0-nzr\" sceneMemberID=\"firstResponder\"/>\n </objects>\n <point key=\"canvasLocation\" x=\"136.80000000000001\" y=\"133.5832083958021\"/>\n </scene>\n </scenes>\n</document>\n"} +{"text": "<?php\n/**\n * @package Joomla.Administrator\n * @subpackage com_users\n *\n * @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.\n * @license GNU General Public License version 2 or later; see LICENSE.txt\n */\n\ndefined('_JEXEC') or die;\n\nJHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html');\n\nJHtml::_('bootstrap.tooltip');\nJHtml::_('formbehavior.chosen', 'select');\nJHtml::_('behavior.multiselect');\n\n$input = JFactory::getApplication()->input;\n$field = $input->getCmd('field');\n$function = 'jSelectUser_' . $field;\n$listOrder = $this->escape($this->state->get('list.ordering'));\n$listDirn = $this->escape($this->state->get('list.direction'));\n?>\n<form action=\"<?php echo JRoute::_('index.php?option=com_users&view=users&layout=modal&tmpl=component&groups=' . $input->get('groups', '', 'BASE64') . '&excluded=' . $input->get('excluded', '', 'BASE64'));?>\" method=\"post\" name=\"adminForm\" id=\"adminForm\">\n\t<fieldset class=\"filter\">\n\t\t<div id=\"filter-bar\" class=\"btn-toolbar\">\n\t\t\t<div class=\"filter-search btn-group pull-left\">\n\t\t\t\t<label for=\"filter_search\" class=\"element-invisible\"><?php echo JText::_('JSEARCH_FILTER'); ?></label>\n\t\t\t\t<input type=\"text\" name=\"filter_search\" id=\"filter_search\" placeholder=\"<?php echo JText::_('JSEARCH_FILTER'); ?>\" value=\"<?php echo $this->escape($this->state->get('filter.search')); ?>\" class=\"hasTooltip\" title=\"<?php echo JHtml::tooltipText('COM_USERS_SEARCH_IN_NAME'); ?>\" data-placement=\"bottom\"/>\n\t\t\t</div>\n\t\t\t<div class=\"btn-group pull-left\">\n\t\t\t\t<button type=\"submit\" class=\"btn hasTooltip\" title=\"<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>\" data-placement=\"bottom\"><span class=\"icon-search\"></span></button>\n\t\t\t\t<button type=\"button\" class=\"btn hasTooltip\" title=\"<?php echo JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>\" data-placement=\"bottom\" onclick=\"document.getElementById('filter_search').value='';this.form.submit();\"><span class=\"icon-remove\"></span></button>\n\t\t\t\t<button type=\"button\" class=\"btn\" onclick=\"if (window.parent) window.parent.<?php echo $this->escape($function); ?>('', '<?php echo JText::_('JLIB_FORM_SELECT_USER'); ?>');\"><?php echo JText::_('JOPTION_NO_USER'); ?></button>\n\t\t\t</div>\n\t\t\t<div class=\"btn-group pull-right hidden-phone\">\n\t\t\t\t<label for=\"filter_group_id\" class=\"element-invisible\"><?php echo JText::_('COM_USERS_FILTER_USER_GROUP'); ?></label>\n\t\t\t\t<?php echo JHtml::_('access.usergroup', 'filter_group_id', $this->state->get('filter.group_id'), 'onchange=\"this.form.submit()\"'); ?>\n\t\t\t</div>\n\t\t</div>\n\t</fieldset>\n\t<?php if (empty($this->items)) : ?>\n\t\t<div class=\"alert alert-no-items\">\n\t\t\t<?php echo JText::_('JGLOBAL_NO_MATCHING_RESULTS'); ?>\n\t\t</div>\n\t<?php else : ?>\n\t\t<table class=\"table table-striped table-condensed\">\n\t\t\t<thead>\n\t\t\t\t<tr>\n\t\t\t\t\t<th class=\"left\">\n\t\t\t\t\t\t<?php echo JHtml::_('grid.sort', 'COM_USERS_HEADING_NAME', 'a.name', $listDirn, $listOrder); ?>\n\t\t\t\t\t</th>\n\t\t\t\t\t<th class=\"nowrap\" width=\"25%\">\n\t\t\t\t\t\t<?php echo JHtml::_('grid.sort', 'JGLOBAL_USERNAME', 'a.username', $listDirn, $listOrder); ?>\n\t\t\t\t\t</th>\n\t\t\t\t\t<th class=\"nowrap\" width=\"25%\">\n\t\t\t\t\t\t<?php echo JText::_('COM_USERS_HEADING_GROUPS'); ?>\n\t\t\t\t\t</th>\n\t\t\t\t</tr>\n\t\t\t</thead>\n\t\t\t<tfoot>\n\t\t\t\t<tr>\n\t\t\t\t\t<td colspan=\"15\">\n\t\t\t\t\t\t<?php echo $this->pagination->getListFooter(); ?>\n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</tfoot>\n\t\t\t<tbody>\n\t\t\t\t<?php\n\t\t\t\t$i = 0;\n\n\t\t\t\tforeach ($this->items as $item) : ?>\n\t\t\t\t\t<tr class=\"row<?php echo $i % 2; ?>\">\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<a class=\"pointer\" onclick=\"if (window.parent) window.parent.<?php echo $this->escape($function);?>('<?php echo $item->id; ?>', '<?php echo $this->escape(addslashes($item->name)); ?>');\">\n\t\t\t\t\t\t\t\t<?php echo $item->name; ?>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td align=\"center\">\n\t\t\t\t\t\t\t<?php echo $item->username; ?>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t\t<td align=\"left\">\n\t\t\t\t\t\t\t<?php echo nl2br($item->group_names); ?>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t</tbody>\n\t\t</table>\n\t<?php endif; ?>\n\t<div>\n\t\t<input type=\"hidden\" name=\"task\" value=\"\" />\n\t\t<input type=\"hidden\" name=\"field\" value=\"<?php echo $this->escape($field); ?>\" />\n\t\t<input type=\"hidden\" name=\"boxchecked\" value=\"0\" />\n\t\t<input type=\"hidden\" name=\"filter_order\" value=\"<?php echo $listOrder; ?>\" />\n\t\t<input type=\"hidden\" name=\"filter_order_Dir\" value=\"<?php echo $listDirn; ?>\" />\n\t\t<?php echo JHtml::_('form.token'); ?>\n\t</div>\n</form>\n"} +{"text": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<!-- NewPage -->\n<html lang=\"en\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html\" charset=\"UTF-8\">\n<title>Uses of Class org.apache.commons.math3.linear.IterativeLinearSolverEvent (Apache Commons Math 3.3 API)</title>\n<link rel=\"stylesheet\" type=\"text/css\" href=\"../../../../../../stylesheet.css\" title=\"Style\">\n</head>\n<body>\n<script type=\"text/javascript\"><!--\n if (location.href.indexOf('is-external=true') == -1) {\n parent.document.title=\"Uses of Class org.apache.commons.math3.linear.IterativeLinearSolverEvent (Apache Commons Math 3.3 API)\";\n }\n//-->\n</script>\n<noscript>\n<div>JavaScript is disabled on your browser.</div>\n</noscript>\n<!-- ========= START OF TOP NAVBAR ======= -->\n<div class=\"topNav\"><a name=\"navbar_top\">\n<!-- -->\n</a><a href=\"#skip-navbar_top\" title=\"Skip navigation links\"></a><a name=\"navbar_top_firstrow\">\n<!-- -->\n</a>\n<ul class=\"navList\" title=\"Navigation\">\n<li><a href=\"../../../../../../overview-summary.html\">Overview</a></li>\n<li><a href=\"../package-summary.html\">Package</a></li>\n<li><a href=\"../../../../../../org/apache/commons/math3/linear/IterativeLinearSolverEvent.html\" title=\"class in org.apache.commons.math3.linear\">Class</a></li>\n<li class=\"navBarCell1Rev\">Use</li>\n<li><a href=\"../package-tree.html\">Tree</a></li>\n<li><a href=\"../../../../../../deprecated-list.html\">Deprecated</a></li>\n<li><a href=\"../../../../../../index-all.html\">Index</a></li>\n<li><a href=\"../../../../../../help-doc.html\">Help</a></li>\n</ul>\n<div class=\"aboutLanguage\"><em><script type=\"text/javascript\" src=\"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"></script></em></div>\n</div>\n<div class=\"subNav\">\n<ul class=\"navList\">\n<li>Prev</li>\n<li>Next</li>\n</ul>\n<ul class=\"navList\">\n<li><a href=\"../../../../../../index.html?org/apache/commons/math3/linear/class-use/IterativeLinearSolverEvent.html\" target=\"_top\">Frames</a></li>\n<li><a href=\"IterativeLinearSolverEvent.html\" target=\"_top\">No Frames</a></li>\n</ul>\n<ul class=\"navList\" id=\"allclasses_navbar_top\">\n<li><a href=\"../../../../../../allclasses-noframe.html\">All Classes</a></li>\n</ul>\n<div>\n<script type=\"text/javascript\"><!--\n allClassesLink = document.getElementById(\"allclasses_navbar_top\");\n if(window==top) {\n allClassesLink.style.display = \"block\";\n }\n else {\n allClassesLink.style.display = \"none\";\n }\n //-->\n</script>\n</div>\n<a name=\"skip-navbar_top\">\n<!-- -->\n</a></div>\n<!-- ========= END OF TOP NAVBAR ========= -->\n<div class=\"header\">\n<h2 title=\"Uses of Class org.apache.commons.math3.linear.IterativeLinearSolverEvent\" class=\"title\">Uses of Class<br>org.apache.commons.math3.linear.IterativeLinearSolverEvent</h2>\n</div>\n<div class=\"classUseContainer\">\n<ul class=\"blockList\">\n<li class=\"blockList\">\n<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use table, listing packages, and an explanation\">\n<caption><span>Packages that use <a href=\"../../../../../../org/apache/commons/math3/linear/IterativeLinearSolverEvent.html\" title=\"class in org.apache.commons.math3.linear\">IterativeLinearSolverEvent</a></span><span class=\"tabEnd\">&nbsp;</span></caption>\n<tr>\n<th class=\"colFirst\" scope=\"col\">Package</th>\n<th class=\"colLast\" scope=\"col\">Description</th>\n</tr>\n<tbody>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><a href=\"#org.apache.commons.math3.linear\">org.apache.commons.math3.linear</a></td>\n<td class=\"colLast\">\n<div class=\"block\">Linear algebra support.</div>\n</td>\n</tr>\n</tbody>\n</table>\n</li>\n<li class=\"blockList\">\n<ul class=\"blockList\">\n<li class=\"blockList\"><a name=\"org.apache.commons.math3.linear\">\n<!-- -->\n</a>\n<h3>Uses of <a href=\"../../../../../../org/apache/commons/math3/linear/IterativeLinearSolverEvent.html\" title=\"class in org.apache.commons.math3.linear\">IterativeLinearSolverEvent</a> in <a href=\"../../../../../../org/apache/commons/math3/linear/package-summary.html\">org.apache.commons.math3.linear</a></h3>\n<table border=\"0\" cellpadding=\"3\" cellspacing=\"0\" summary=\"Use table, listing subclasses, and an explanation\">\n<caption><span>Subclasses of <a href=\"../../../../../../org/apache/commons/math3/linear/IterativeLinearSolverEvent.html\" title=\"class in org.apache.commons.math3.linear\">IterativeLinearSolverEvent</a> in <a href=\"../../../../../../org/apache/commons/math3/linear/package-summary.html\">org.apache.commons.math3.linear</a></span><span class=\"tabEnd\">&nbsp;</span></caption>\n<tr>\n<th class=\"colFirst\" scope=\"col\">Modifier and Type</th>\n<th class=\"colLast\" scope=\"col\">Class and Description</th>\n</tr>\n<tbody>\n<tr class=\"altColor\">\n<td class=\"colFirst\"><code>class&nbsp;</code></td>\n<td class=\"colLast\"><code><strong><a href=\"../../../../../../org/apache/commons/math3/linear/DefaultIterativeLinearSolverEvent.html\" title=\"class in org.apache.commons.math3.linear\">DefaultIterativeLinearSolverEvent</a></strong></code>\n<div class=\"block\">A default concrete implementation of the abstract class\n <a href=\"../../../../../../org/apache/commons/math3/linear/IterativeLinearSolverEvent.html\" title=\"class in org.apache.commons.math3.linear\"><code>IterativeLinearSolverEvent</code></a>.</div>\n</td>\n</tr>\n</tbody>\n</table>\n</li>\n</ul>\n</li>\n</ul>\n</div>\n<!-- ======= START OF BOTTOM NAVBAR ====== -->\n<div class=\"bottomNav\"><a name=\"navbar_bottom\">\n<!-- -->\n</a><a href=\"#skip-navbar_bottom\" title=\"Skip navigation links\"></a><a name=\"navbar_bottom_firstrow\">\n<!-- -->\n</a>\n<ul class=\"navList\" title=\"Navigation\">\n<li><a href=\"../../../../../../overview-summary.html\">Overview</a></li>\n<li><a href=\"../package-summary.html\">Package</a></li>\n<li><a href=\"../../../../../../org/apache/commons/math3/linear/IterativeLinearSolverEvent.html\" title=\"class in org.apache.commons.math3.linear\">Class</a></li>\n<li class=\"navBarCell1Rev\">Use</li>\n<li><a href=\"../package-tree.html\">Tree</a></li>\n<li><a href=\"../../../../../../deprecated-list.html\">Deprecated</a></li>\n<li><a href=\"../../../../../../index-all.html\">Index</a></li>\n<li><a href=\"../../../../../../help-doc.html\">Help</a></li>\n</ul>\n<div class=\"aboutLanguage\"><em><script type=\"text/javascript\" src=\"http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"></script></em></div>\n</div>\n<div class=\"subNav\">\n<ul class=\"navList\">\n<li>Prev</li>\n<li>Next</li>\n</ul>\n<ul class=\"navList\">\n<li><a href=\"../../../../../../index.html?org/apache/commons/math3/linear/class-use/IterativeLinearSolverEvent.html\" target=\"_top\">Frames</a></li>\n<li><a href=\"IterativeLinearSolverEvent.html\" target=\"_top\">No Frames</a></li>\n</ul>\n<ul class=\"navList\" id=\"allclasses_navbar_bottom\">\n<li><a href=\"../../../../../../allclasses-noframe.html\">All Classes</a></li>\n</ul>\n<div>\n<script type=\"text/javascript\"><!--\n allClassesLink = document.getElementById(\"allclasses_navbar_bottom\");\n if(window==top) {\n allClassesLink.style.display = \"block\";\n }\n else {\n allClassesLink.style.display = \"none\";\n }\n //-->\n</script>\n</div>\n<a name=\"skip-navbar_bottom\">\n<!-- -->\n</a></div>\n<!-- ======== END OF BOTTOM NAVBAR ======= -->\n<p class=\"legalCopy\"><small>Copyright &#169; 2003&#x2013;2014 <a href=\"http://www.apache.org/\">The Apache Software Foundation</a>. All rights reserved.</small></p>\n</body>\n</html>\n"} +{"text": "package com.ruoyi.common.exception;\r\n\r\npublic class ValidateCodeException extends Exception\r\n{\r\n //\r\n private static final long serialVersionUID = 3887472968823615091L;\r\n\r\n public ValidateCodeException()\r\n {\r\n }\r\n\r\n public ValidateCodeException(String msg)\r\n {\r\n super(msg);\r\n }\r\n}"} +{"text": "/*\nCopyright The Infusion copyright holders\nSee the AUTHORS.md file at the top-level directory of this distribution and at\nhttps://github.com/fluid-project/infusion/raw/master/AUTHORS.md.\n\nLicensed under the Educational Community License (ECL), Version 2.0 or the New\nBSD license. You may not use this file except in compliance with one these\nLicenses.\n\nYou may obtain a copy of the ECL 2.0 License and BSD License at\nhttps://github.com/fluid-project/infusion/raw/master/Infusion-LICENSE.txt\n*/\n\nvar fluid_3_0_0 = fluid_3_0_0 || {};\n\n(function ($, fluid) {\n \"use strict\";\n\n fluid.registerNamespace(\"fluid.debug\");\n\n fluid.debug.toggleClass = function (styles, element, openStyle, closedStyle, state) {\n if (openStyle) {\n element.toggleClass(styles[openStyle], state);\n }\n if (closedStyle) {\n element.toggleClass(styles[closedStyle], !state);\n }\n };\n\n fluid.debug.bindToggleClick = function (element, applier, path) {\n element.click(function () {\n var state = fluid.get(applier.holder.model, path);\n applier.change(path, !state);\n });\n };\n\n\n fluid.defaults(\"fluid.debug.highlighter\", {\n gradeNames: [\"fluid.viewComponent\"],\n selectors: {\n highlightRoot: \"#fluid-debug-highlightRoot\"\n },\n markup: {\n highlightRoot: \"<div id=\\\"fluid-debug-highlightRoot\\\" class=\\\"fluid-debug-highlightRoot\\\"></div>\",\n highlightElement: \"<div class=\\\"fl-debug-highlightElement\\\"></div>\"\n },\n events: {\n highlightClick: null\n },\n listeners: {\n onCreate: \"fluid.debug.highlighter.renderRoot\"\n },\n invokers: {\n clear: \"fluid.debug.highlighter.clear({that}.dom.highlightRoot)\",\n highlight: \"fluid.debug.highlighter.highlight({that}, {that}.dom.highlightRoot, {arguments}.0)\" // dispositions\n }\n });\n\n fluid.debug.highlighter.renderRoot = function (that) {\n var highlightRoot = $(that.options.markup.highlightRoot);\n that.container.append(highlightRoot);\n highlightRoot.click(that.events.highlightClick.fire);\n };\n\n fluid.debug.highlighter.clear = function (highlightRoot) {\n highlightRoot.empty();\n };\n\n fluid.debug.highlighter.positionProps = [\"width\",\"height\",\"marginLeft\",\"marginTop\",\"paddingLeft\",\"paddingTop\"];\n\n fluid.debug.highlighter.colours = {\n components: [\n [0, 0, 0], // black\n [255, 0, 0], // red\n [255, 255, 0] // yellow\n ],\n domBinder: [0, 255, 0], // green\n renderer: [0, 255, 255] // cyan\n };\n\n fluid.debug.arrayToRGBA = function (array) {\n return \"rgba(\" + array.join(\", \") + \")\";\n };\n\n fluid.debug.assignColour = function (colour, alpha) {\n return [colour[0], colour[1], colour[2], alpha];\n };\n\n fluid.debug.highlighter.indexToColour = function (i, isDomBind, isRenderer) {\n var a = fluid.debug.assignColour, c = fluid.debug.highlighter.colours.components;\n var base;\n if (isRenderer) {\n base = a(fluid.debug.highlighter.colours.renderer, 0.5);\n } else if (isDomBind) {\n base = a(fluid.debug.highlighter.colours.domBinder, 0.5);\n } else {\n base = a(c[i % c.length], i > c.length ? 0.2 : 0.5);\n }\n return base;\n };\n\n fluid.debug.isRendererSelector = function (component, selectorName) {\n var isRendererComponent = fluid.componentHasGrade(component, \"fluid.rendererComponent\");\n var ignoreContains = fluid.contains(component.options.selectorsToIgnore, selectorName);\n\n return isRendererComponent ? (!selectorName || ignoreContains ? false : true) : false;\n };\n\n fluid.debug.highlighter.disposeEntries = function (entries, domIds) {\n return fluid.transform(entries, function (entry, i) {\n var component = entry.component;\n var container = component.container;\n var element = fluid.jById(domIds[i], container[0].ownerDocument);\n var selectorName = entry.selectorName;\n var isRendererSelector = fluid.debug.isRendererSelector(component, selectorName);\n var noHighlight = container.is(\"body\");\n return {\n component: component,\n container: element,\n noHighlight: noHighlight,\n selectorName: selectorName,\n colour: fluid.debug.highlighter.indexToColour(i, selectorName, isRendererSelector)\n };\n });\n };\n\n fluid.debug.domIdtoHighlightId = function (domId) {\n return \"highlight-for:\" + domId;\n };\n\n fluid.debug.highlighter.construct = function (markup, highlightRoot, container) {\n var highlight = $(markup);\n highlight.prop(\"id\", fluid.debug.domIdtoHighlightId(container.prop(\"id\")));\n highlightRoot.append(highlight);\n return highlight;\n };\n\n fluid.debug.highlighter.position = function (highlight, disp, container) {\n var p = fluid.debug.highlighter.positionProps;\n for (var j = 0; j < p.length; ++j) {\n highlight.css(p[j], container.css(p[j] || \"\"));\n }\n var offset = container.offset();\n var containerBody = container[0].ownerDocument.body;\n if (containerBody !== document.body) { // TODO: This primitive algorithm will not account for nested iframes\n offset.left -= $(containerBody).scrollLeft();\n offset.top -= $(containerBody).scrollTop();\n }\n highlight.offset(offset);\n };\n\n fluid.debug.highlighter.highlight = function (that, highlightRoot, dispositions) {\n for (var i = 0; i < dispositions.length; ++i) {\n var disp = dispositions[i];\n if (disp.noHighlight) {\n continue;\n }\n var container = disp.container;\n var highlight = fluid.debug.highlighter.construct(that.options.markup.highlightElement, highlightRoot, container);\n highlight.css(\"background-color\", fluid.debug.arrayToRGBA(disp.colour));\n fluid.debug.highlighter.position(highlight, disp, container);\n }\n };\n\n fluid.debug.ignorableGrades = [\"fluid.debug.listeningView\", \"fluid.debug.listeningPanel\", \"fluid.debug.listeningRenderer\"];\n\n fluid.debug.frameworkGrades = fluid.frameworkGrades;\n\n fluid.debug.filterGrades = function (gradeNames) {\n var highestFrameworkIndex = -1;\n var output = [];\n fluid.each(gradeNames, function (gradeName) { // TODO: remove fluid.indexOf\n var findex = fluid.debug.frameworkGrades.indexOf(gradeName);\n if (findex > highestFrameworkIndex) {\n highestFrameworkIndex = findex;\n } else if (findex === -1 && fluid.debug.ignorableGrades.indexOf(gradeName) === -1 && gradeName.indexOf(\"{\") === -1) {\n output.push(gradeName);\n }\n });\n output.push(fluid.debug.frameworkGrades[highestFrameworkIndex]);\n return output;\n };\n\n fluid.debug.renderDefaults = function (defaultsTemplate, typeName, options) {\n return fluid.stringTemplate(defaultsTemplate, {\n typeName: typeName,\n options: JSON.stringify(options, null, 4)\n });\n };\n\n fluid.debug.renderSelectorUsageRecurse = function (source, segs, options) {\n if (fluid.isPrimitive(source)) {\n if (typeof(source) === \"string\" && source.indexOf(options.findString) !== -1) {\n var path = segs.slice(0, 2);\n var usage = fluid.copy(fluid.get(options.fullSource, path));\n fluid.set(options.target, path, usage);\n }\n } else if (fluid.isPlainObject(source)) {\n fluid.each(source, function (value, key) {\n segs.push(key);\n fluid.debug.renderSelectorUsageRecurse(source[key], segs, options);\n segs.pop(key);\n });\n }\n };\n\n fluid.debug.renderSelectorUsage = function (selectorUsageTemplate, selectorName, options) {\n var target = {}, segs = [], findString = \"}.dom.\" + selectorName;\n fluid.debug.renderSelectorUsageRecurse(options, segs, {\n findString: findString,\n target: target,\n fullSource: options\n });\n var markup = fluid.stringTemplate(selectorUsageTemplate, {selectorUsage: JSON.stringify(target, null, 4)});\n return markup;\n };\n\n fluid.debug.renderIndexElement = function (indexElTemplate, colour) {\n return fluid.stringTemplate(indexElTemplate, {colour: fluid.debug.arrayToRGBA(colour)});\n };\n\n fluid.debug.domIdtoRowId = function (domId) {\n return \"row-for:\" + domId;\n };\n\n fluid.debug.rowForDomId = function (row, indexElTemplate, disp, rowIdToDomId) {\n row.indexEl = fluid.debug.renderIndexElement(indexElTemplate, disp.colour);\n row.domId = disp.container.prop(\"id\");\n row.rowId = fluid.debug.domIdtoRowId(row.domId);\n rowIdToDomId[row.rowId] = row.domId;\n };\n\n fluid.debug.renderSelectorUsageRows = function (disp, markup, defaultsIdToContent) {\n var tooltipTriggerId = fluid.allocateGuid();\n var options = disp.component.options;\n defaultsIdToContent[tooltipTriggerId] = fluid.debug.renderSelectorUsage(markup.selectorUsage, disp.selectorName, options);\n var rows = [{\n componentId: \"\",\n extraTooltipClass: \"flc-debug-tooltip-trigger\",\n extraGradesClass: \"fl-debug-selector-cell\",\n grade: options.selectors[disp.selectorName],\n line: disp.selectorName,\n tooltipTriggerId: tooltipTriggerId\n }];\n return rows;\n };\n\n fluid.debug.renderDefaultsRows = function (oneGrade, markup, defaultsIdToContent) {\n var defaults = fluid.defaultsStore[oneGrade];\n var line = defaults && defaults.callerInfo ? defaults.callerInfo.filename + \":\" + defaults.callerInfo.index : \"\";\n // horrible mixture of semantic levels in this rendering function - don't we need a new renderer!\n var extraTooltipClass = \"\";\n var tooltipTriggerId = fluid.allocateGuid();\n if (line) {\n extraTooltipClass = \"flc-debug-tooltip-trigger\";\n defaultsIdToContent[tooltipTriggerId] = fluid.debug.renderDefaults(markup.defaults, oneGrade, defaults.options);\n }\n return {\n rowId: fluid.allocateGuid(),\n indexEl: \"\",\n domId: \"\",\n componentId: \"\",\n grade: oneGrade,\n line: line,\n extraGradesClass: \"\",\n extraTooltipClass: extraTooltipClass,\n tooltipTriggerId: tooltipTriggerId\n };\n };\n\n fluid.debug.renderOneDisposition = function (disp, markup, defaultsIdToContent, rowIdToDomId) {\n var rows;\n if (disp.selectorName) {\n rows = fluid.debug.renderSelectorUsageRows(disp, markup, defaultsIdToContent);\n } else {\n var filtered = fluid.debug.filterGrades(disp.component.options.gradeNames);\n rows = fluid.transform(filtered, function (oneGrade) {\n return fluid.debug.renderDefaultsRows(oneGrade, markup, defaultsIdToContent);\n });\n rows[0].componentId = disp.component.id;\n }\n fluid.debug.rowForDomId(rows[0], markup.indexElement, disp, rowIdToDomId);\n return rows;\n };\n\n fluid.debug.renderInspecting = function (that, paneBody, markup, inspecting) {\n if (!paneBody || !that.highlighter) { // stupid ginger world failure\n return;\n }\n var defaultsIdToContent = {}; // driver for tooltips showing defaults source\n paneBody.empty();\n that.highlighter.clear();\n\n var ids = fluid.keys(inspecting).reverse(); // TODO: more principled ordering\n var entries = fluid.transform(ids, function (inspectingId) {\n return that.viewMapper.domIdToEntry[inspectingId];\n });\n var dispositions = fluid.debug.highlighter.disposeEntries(entries, ids);\n var rowIdToDomId = {};\n var allRows = fluid.transform(dispositions, function (disp) {\n return fluid.debug.renderOneDisposition(disp, markup, defaultsIdToContent, rowIdToDomId);\n });\n var flatRows = fluid.flatten(allRows);\n\n var contents = fluid.transform(flatRows, function (row) {\n return fluid.stringTemplate(markup.paneRow, row);\n });\n paneBody.html(contents.join(\"\"));\n that.highlighter.highlight(dispositions);\n that.tooltips.applier.change(\"idToContent\", defaultsIdToContent);\n that.rowIdToDomId = rowIdToDomId;\n that.dispositions = dispositions; // currently for looking up colour\n var initSelection = fluid.arrayToHash(fluid.values(rowIdToDomId));\n that.applier.change(\"highlightSelected\", initSelection);\n };\n\n\n fluid.defaults(\"fluid.debug.browser\", {\n gradeNames: [\"fluid.viewComponent\"],\n model: {\n isOpen: false,\n isInspecting: false,\n isFrozen: false,\n inspecting: {},\n highlightSelected: {}\n },\n members: {\n rowIdToDomId: {}\n },\n modelListeners: {\n isOpen: {\n funcName: \"fluid.debug.toggleClass\",\n args: [\"{that}.options.styles\", \"{that}.dom.holder\", \"holderOpen\", \"holderClosed\", \"{change}.value\"]\n },\n isInspecting: [{\n funcName: \"fluid.debug.toggleClass\",\n args: [\"{that}.options.styles\", \"{that}.dom.inspectTrigger\", \"inspecting\", null, \"{change}.value\"]\n }, {\n funcName: \"fluid.debug.browser.finishInspecting\",\n args: [\"{that}\", \"{change}.value\"]\n }],\n inspecting: {\n funcName: \"fluid.debug.renderInspecting\",\n args: [\"{that}\", \"{that}.dom.paneBody\", \"{that}.options.markup\", \"{change}.value\"]\n },\n \"highlightSelected.*\": {\n funcName: \"fluid.debug.renderHighlightSelection\",\n args: [\"{that}\", \"{change}.value\", \"{change}.path\"]\n }\n },\n styles: {\n holderOpen: \"fl-debug-holder-open\",\n holderClosed: \"fl-debug-holder-closed\",\n inspecting: \"fl-debug-inspect-active\"\n },\n markup: {\n holder: \"<div class=\\\"flc-debug-holder fl-debug-holder\\\"><div class=\\\"flc-debug-open-pane-trigger fl-debug-open-pane-trigger\\\"></div><div class=\\\"flc-debug-pane fl-debug-pane\\\"><div class=\\\"flc-debug-inspect-trigger fl-debug-inspect-trigger\\\"></div></div></div>\",\n pane: \"<table><thead><tr><td class=\\\"fl-debug-pane-index\\\"></td><td class=\\\"fl-debug-pane-dom-id\\\">DOM ID</td><td class=\\\"fl-debug-pane-component-id\\\">Component ID</td><td class=\\\"fl-debug-pane-grades\\\">Grades / Selector</td><td class=\\\"fl-debug-pane-line\\\">Line / Selector name</td></tr></thead><tbody class=\\\"flc-debug-pane-body\\\"></tbody></table>\",\n paneRow: \"<tr class=\\\"flc-debug-pane-row\\\" id=\\\"%rowId\\\"><td class=\\\"fl-debug-pane-index\\\">%indexEl</td><td class=\\\"flc-debug-dom-id\\\">%domId</td><td class=\\\"flc-debug-component-id\\\">%componentId</td><td class=\\\"flc-debug-pane-grades %extraGradesClass\\\">%grade</td><td class=\\\"flc-debug-pane-line %extraTooltipClass\\\" id=\\\"%tooltipTriggerId\\\">%line</td></tr>\",\n indexElement: \"<div class=\\\"flc-debug-pane-indexel\\\" style=\\\"background-color: %colour\\\"></div>\",\n defaults: \"<pre>fluid.defaults(\\\"%typeName\\\", %options);\\n</pre>\",\n selectorUsage: \"<pre>%selectorUsage</pre>\"\n },\n selectors: {\n openPaneTrigger: \".flc-debug-open-pane-trigger\",\n inspectTrigger: \".flc-debug-inspect-trigger\",\n holder: \".fl-debug-holder\",\n pane: \".fl-debug-pane\",\n paneBody: \".flc-debug-pane-body\",\n indexEl: \".flc-debug-pane-indexel\",\n row: \".flc-debug-pane-row\"\n },\n events: {\n onNewDocument: null,\n onMarkupReady: null,\n highlightClick: null\n },\n listeners: {\n \"onCreate.render\": {\n priority: \"first\",\n funcName: \"fluid.debug.browser.renderMarkup\",\n args: [\"{that}\", \"{that}.options.markup.holder\", \"{that}.options.markup.pane\"]\n },\n \"onCreate.toggleTabClick\": {\n funcName: \"fluid.debug.bindToggleClick\",\n args: [\"{that}.dom.openPaneTrigger\", \"{that}.applier\", \"isOpen\"]\n },\n \"onCreate.toggleInspectClick\": {\n funcName: \"fluid.debug.bindToggleClick\",\n args: [\"{that}.dom.inspectTrigger\", \"{that}.applier\", \"isInspecting\"]\n },\n \"onCreate.bindHighlightSelection\": {\n funcName: \"fluid.debug.browser.bindHighlightSelection\",\n args: [\"{that}\", \"{that}.dom.pane\"]\n },\n \"onNewDocument.bindHover\": {\n funcName: \"fluid.debug.browser.bindHover\",\n args: [\"{that}\", \"{arguments}.0\"]\n },\n \"onNewDocument.bindHighlightClick\": {\n funcName: \"fluid.debug.browser.bindHighlightClick\",\n args: [\"{that}\", \"{arguments}.0\"]\n },\n highlightClick: {\n funcName: \"fluid.debug.browser.highlightClick\",\n args: \"{that}\"\n }\n },\n components: {\n tooltips: {\n createOnEvent: \"onMarkupReady\",\n type: \"fluid.tooltip\",\n container: \"{browser}.dom.pane\",\n options: {\n items: \".flc-debug-tooltip-trigger\",\n styles: {\n tooltip: \"fl-debug-tooltip\"\n },\n position: {\n my: \"right center\",\n at: \"left center\"\n },\n duration: 0,\n delay: 0\n }\n },\n viewMapper: {\n type: \"fluid.debug.viewMapper\",\n options: {\n events: {\n onNewDocument: \"{fluid.debug.browser}.events.onNewDocument\"\n }\n }\n },\n highlighter: {\n type: \"fluid.debug.highlighter\",\n container: \"{fluid.debug.browser}.container\",\n options: {\n events: {\n highlightClick: \"{browser}.events.highlightClick\"\n }\n }\n }\n }\n });\n\n fluid.debug.browser.finishInspecting = function (that, isInspecting) {\n if (!isInspecting) {\n var ation = that.applier.initiate();\n ation.change(\"inspecting\", null, \"DELETE\"); // TODO - reform this terrible API through FLUID-5373\n ation.change(\"\", {\n \"inspecting\": {}\n });\n ation.change(\"isFrozen\", false);\n ation.commit();\n }\n };\n\n // go into frozen state if we are not in it and are inspecting.\n // if we are already frozen, finish inspecting (which will also finish frozen)\n fluid.debug.browser.highlightClick = function (that) {\n if (that.model.isFrozen) {\n that.applier.change(\"isInspecting\", false);\n } else if (that.model.isInspecting) {\n that.applier.change(\"isFrozen\", true);\n }\n };\n\n fluid.debug.browser.renderMarkup = function (that, holderMarkup, paneMarkup) {\n that.container.append(holderMarkup);\n var debugPane = that.locate(\"pane\");\n debugPane.append(paneMarkup);\n that.events.onMarkupReady.fire();\n };\n\n fluid.debug.browser.domIdForElement = function (rowIdToDomId, rowSelector, element) {\n var row = $(element).closest(rowSelector);\n if (row.length > 0) {\n var rowId = row[0].id;\n return rowIdToDomId[rowId];\n }\n };\n\n fluid.debug.browser.bindHighlightSelection = function (that, pane) {\n pane.on(\"click\", that.options.selectors.indexEl, function (evt) {\n var domId = fluid.debug.browser.domIdForElement(that.rowIdToDomId, that.options.selectors.row, evt.target);\n var path = [\"highlightSelected\", domId];\n that.applier.change(path, !fluid.get(that.model, path));\n });\n };\n\n fluid.debug.renderHighlightSelection = function (that, newState, path) {\n var domId = path[1];\n var disposition = fluid.find_if(that.dispositions, function (disp) {\n return disp.container.prop(\"id\") === domId;\n });\n if (disposition.noHighlight) {\n return;\n }\n var outColour = fluid.copy(disposition.colour);\n outColour[3] = outColour[3] * (newState ? 1.0 : 0.1);\n var colourString = fluid.debug.arrayToRGBA(outColour);\n var row = fluid.jById(fluid.debug.domIdtoRowId(domId));\n $(that.options.selectors.indexEl, row).css(\"background-color\", colourString);\n fluid.jById(fluid.debug.domIdtoHighlightId(domId)).css(\"background-color\", colourString);\n };\n\n fluid.debug.browser.bindHighlightClick = function (that, dokkument) {\n // We have a global problem in that we can't accept pointer events on the highlight elements\n // themselves since this will cause their own mouseenter/mouseleave events to self-block.\n dokkument.on(\"mousedown\", \"*\", function (evt) {\n var target = $(evt.target);\n var holderParents = target.parents(that.options.selectors.holder);\n if (holderParents.length > 0) {\n return;\n }\n if (that.model.isInspecting) {\n that.events.highlightClick.fire();\n return false;\n }\n });\n };\n\n fluid.debug.browser.bindHover = function (that, dokkument) {\n var listener = function (event) {\n if (!that.model.isInspecting || that.model.isFrozen) {\n return;\n }\n var allParents = $(event.target).parents().addBack().get();\n for (var i = 0; i < allParents.length; ++i) {\n var id = allParents[i].id;\n var entry = that.viewMapper.domIdToEntry[id];\n if (entry) {\n if (event.type === \"mouseleave\") {\n that.applier.change([\"inspecting\", id], null, \"DELETE\");\n } else if (event.type === \"mouseenter\") {\n that.applier.change([\"inspecting\", id], true);\n }\n }\n }\n };\n dokkument.on(\"mouseenter mouseleave\", \"*\", listener);\n };\n\n fluid.defaults(\"fluid.debug.listeningView\", {\n listeners: {\n onCreate: {\n funcName: \"fluid.debug.viewMapper.registerView\",\n args: [\"{fluid.debug.viewMapper}\", \"{that}\", \"add\"]\n },\n onDestroy: {\n funcName: \"fluid.debug.viewMapper.registerView\",\n args: [\"{fluid.debug.viewMapper}\", \"{that}\", \"remove\"]\n }\n }\n });\n\n fluid.defaults(\"fluid.debug.listeningPanel\", {\n listeners: {\n onDomBind: {\n funcName: \"fluid.debug.viewMapper.registerView\",\n args: [\"{fluid.debug.viewMapper}\", \"{that}\", \"rebind\"]\n }\n }\n });\n\n fluid.defaults(\"fluid.debug.listeningRenderer\", {\n listeners: {\n afterRender: {\n funcName: \"fluid.debug.viewMapper.registerView\",\n args: [\"{fluid.debug.viewMapper}\", \"{that}\", \"rebind\"]\n }\n }\n });\n\n fluid.defaults(\"fluid.debug.viewMapper\", {\n gradeNames: [\"fluid.component\", \"fluid.resolveRoot\"],\n members: {\n seenDocuments: {},\n idToEntry: {},\n domIdToEntry: {}\n },\n distributeOptions: [{\n record: \"fluid.debug.listeningView\",\n target: \"{/ fluid.viewComponent}.options.gradeNames\"\n }, {\n record: \"fluid.debug.listeningPanel\",\n target: \"{/ fluid.prefs.panel}.options.gradeNames\"\n }, {\n record: \"fluid.debug.listeningRenderer\",\n target: \"{/ fluid.rendererComponent}.options.gradeNames\"\n }],\n events: {\n onNewDocument: null\n },\n listeners: {\n onCreate: {\n funcName: \"fluid.debug.viewMapper.scanInit\"\n }\n }\n });\n\n fluid.debug.viewMapper.registerComponent = function (that, component, containerId) {\n var domBound = fluid.transform(component.options.selectors, function (selector, selectorName) {\n return fluid.allocateSimpleId(component.locate(selectorName));\n });\n var entry = {\n component: component,\n containerId: containerId,\n domBound: domBound\n };\n that.idToEntry[component.id] = entry;\n if (containerId) {\n that.domIdToEntry[containerId] = entry;\n\n fluid.each(domBound, function (subId, selectorName) {\n var subEntry = $.extend({}, entry);\n subEntry.selectorName = selectorName;\n that.domIdToEntry[subId] = subEntry;\n });\n }\n };\n\n fluid.debug.viewMapper.deregisterComponent = function (that, id) {\n var entry = that.idToEntry[id];\n delete that.idToEntry[id];\n delete that.domIdToEntry[entry.containerId];\n fluid.each(entry.domBound, function (subId) {\n delete that.domIdToEntry[subId];\n });\n };\n\n fluid.debug.viewMapper.registerView = function (that, component, action) {\n var id = component.id;\n var containerId = fluid.allocateSimpleId(component.container);\n if (containerId) {\n var dokkument = $(component.container[0].ownerDocument);\n var dokkumentId = fluid.allocateSimpleId(dokkument);\n if (!that.seenDocuments[dokkumentId]) {\n that.seenDocuments[dokkumentId] = true;\n that.events.onNewDocument.fire(dokkument);\n }\n }\n if (action === \"add\") {\n fluid.debug.viewMapper.registerComponent(that, component, containerId);\n } else if (action === \"remove\") {\n fluid.debug.viewMapper.deregisterComponent(that, id);\n } else if (action === \"rebind\") {\n fluid.debug.viewMapper.deregisterComponent(that, id);\n fluid.debug.viewMapper.registerComponent(that, component, containerId);\n }\n };\n\n fluid.debug.viewMapper.scanInit = function (that) {\n var views = fluid.queryIoCSelector(fluid.rootComponent, \"fluid.viewComponent\");\n for (var i = 0; i < views.length; ++i) {\n fluid.debug.viewMapper.registerView(that, views[i], true);\n }\n };\n\n $(document).ready(function () {\n fluid.debug.browser(\"body\");\n });\n\n})(jQuery, fluid_3_0_0);\n"} +{"text": "{\n \"power\": 10,\n \"time\": 20,\n \"ingredients\": [\n {\n \"item\": \"techreborn:scrap_box\"\n }\n ],\n \"results\": [\n {\n \"item\": \"minecraft:shears\"\n }\n ],\n \"type\": \"techreborn:scrapbox\"\n}"} +{"text": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n\n<!--\n /******************************************************************************\n Copyright:: 2020- IBM, Inc\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n *****************************************************************************/\n-->\n\n<html lang=\"en\">\n\n<head>\n\t<title>RPT Test Suite</title>\n</head>\n\n<body>\n\n<a href=\"#navskip\">skip to main content</a>\n\n\n<h2>Test case: IFrame-hasEmptyTitle.html</h2>\n\n\n<!-- ------------------------------------------------------------------------------------ -->\n\n\n<h3>IFrame Element Tests</h3>\n\n\n<ul>\n\t<li>Test - Valid iframe with empty Title atribute</li>\n</ul>\n\n<iframe id=\"iframe1\" src=\"../support/frame_test1.html\" style=\"width:350px; height:100px;\" scrolling=\"yes\" frameborder=\"1\" title=\"\" name=\"first\">\n</iframe>\n\n\n<a name=\"navskip\"></a>\n\n\n<script type=\"text/javascript\">\n//<![CDATA[\n if (typeof(OpenAjax) == 'undefined') OpenAjax = {}\n if (typeof(OpenAjax.a11y) == 'undefined') OpenAjax.a11y = {}\n OpenAjax.a11y.ruleCoverage = [\n {\n ruleId: \"39\",\n passedXpaths: [\n ],\n failedXpaths: [\n \"/html/body/iframe\"\n ]\n }\n ];\n//]]>\n</script></body>\n\n</html>\n"} +{"text": "// Copyright 2017 The etcd Authors\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\npackage clientv3\n\nimport (\n\t\"math\"\n\t\"time\"\n\n\t\"google.golang.org/grpc\"\n)\n\nvar (\n\t// client-side handling retrying of request failures where data was not written to the wire or\n\t// where server indicates it did not process the data. gRPC default is default is \"FailFast(true)\"\n\t// but for etcd we default to \"FailFast(false)\" to minimize client request error responses due to\n\t// transient failures.\n\tdefaultFailFast = grpc.FailFast(false)\n\n\t// client-side request send limit, gRPC default is math.MaxInt32\n\t// Make sure that \"client-side send limit < server-side default send/recv limit\"\n\t// Same value as \"embed.DefaultMaxRequestBytes\" plus gRPC overhead bytes\n\tdefaultMaxCallSendMsgSize = grpc.MaxCallSendMsgSize(2 * 1024 * 1024)\n\n\t// client-side response receive limit, gRPC default is 4MB\n\t// Make sure that \"client-side receive limit >= server-side default send/recv limit\"\n\t// because range response can easily exceed request send limits\n\t// Default to math.MaxInt32; writes exceeding server-side send limit fails anyway\n\tdefaultMaxCallRecvMsgSize = grpc.MaxCallRecvMsgSize(math.MaxInt32)\n\n\t// client-side non-streaming retry limit, only applied to requests where server responds with\n\t// a error code clearly indicating it was unable to process the request such as codes.Unavailable.\n\t// If set to 0, retry is disabled.\n\tdefaultUnaryMaxRetries uint = 100\n\n\t// client-side streaming retry limit, only applied to requests where server responds with\n\t// a error code clearly indicating it was unable to process the request such as codes.Unavailable.\n\t// If set to 0, retry is disabled.\n\tdefaultStreamMaxRetries = ^uint(0) // max uint\n\n\t// client-side retry backoff wait between requests.\n\tdefaultBackoffWaitBetween = 25 * time.Millisecond\n\n\t// client-side retry backoff default jitter fraction.\n\tdefaultBackoffJitterFraction = 0.10\n)\n\n// defaultCallOpts defines a list of default \"gRPC.CallOption\".\n// Some options are exposed to \"clientv3.Config\".\n// Defaults will be overridden by the settings in \"clientv3.Config\".\nvar defaultCallOpts = []grpc.CallOption{defaultFailFast, defaultMaxCallSendMsgSize, defaultMaxCallRecvMsgSize}\n\n// MaxLeaseTTL is the maximum lease TTL value\nconst MaxLeaseTTL = 9000000000\n"} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n\n<chapter id=\"testing-practices\">\n <title>Práticas de Teste</title>\n\n <blockquote>\n <attribution>Erich Gamma</attribution>\n <para>\n Você sempre pode escrever mais testes. Porém, você vai descobrir rapidamente \n que apenas uma fração dos testes que você pode imaginar são realmente úteis. O que \n você quer é escrever testes que falham mesmo quando você acha que eles deveriam \n funcionar, ou testes que passam mesmo quando você acha que eles deveria falhar. \n Outra forma de pensar sobre isso é com relação ao custo/benefício. Você quer escrever \n testes que lhe darão retorno com informação.\n </para>\n </blockquote>\n\n <section id=\"testing-practices.during-development\">\n <title>Durante o Desenvolvimento</title>\n\n <para>\n <indexterm><primary>Refatorando</primary></indexterm>\n\n Quando você precisa fazer uma mudança na estrutura interna do programa \n em que está trabalhando para torná-lo mais fácil de entender e mais barato de modificar \n sem alterar seu comportamento visível, uma suíte de testes é inestimável na \n aplicação das assim chamadas <ulink url=\"http://martinfowler.com/bliki/DefinitionOfRefactoring.html\">refatorações</ulink> \n seguras. De outra forma, você poderia não notar o sistema quebrando enquanto você \n está cuidando da reestruturação.\n </para>\n\n <para>\n As seguintes condições vão ajudá-lo a melhorar o código e design \n do seu projeto, enquanto usa testes unitários para verificar que os passos de transformação \n da refatoração são, de fato, preservadores de comportamento e não \n introduzem erros:\n </para>\n\n <orderedlist>\n <listitem>\n <para>Todos os testes unitários são executados corretamente.</para>\n </listitem>\n\n <listitem>\n <para>O código comunica seus princípios de design.</para>\n </listitem>\n\n <listitem>\n <para>O código não contém redundâncias.</para>\n </listitem>\n\n <listitem>\n <para>O código contém o mínimo número de classes e métodos.</para>\n </listitem>\n </orderedlist>\n\n <para>\n Quando você precisar adicionar novas funcionalidades ao sistema, escreva os testes \n primeiro. Então, você terá terminado de desenvolver quando os testes executarem. Esta \n prática será discutida em detalhes no próximo capítulo.\n </para>\n </section>\n\n <section id=\"testing-practices.during-debugging\">\n <title>Durante a Depuração</title>\n\n <para>\n Quando você recebe um relatório de defeito, seu impulso pode ser consertar o defeito \n o mais rápido possível. A experiência mostra que esse impulso não vai lhe \n servir bem; parece que o conserto de um defeito acaba causando outro \n defeito.\n </para>\n\n <para>\n Você pode conter esses seus impulsos fazendo o seguinte:\n </para>\n\n <orderedlist>\n <listitem>\n <para>\n Verifique que você pode reproduzir o defeito.\n </para>\n </listitem>\n\n <listitem>\n <para>\n Encontre a demonstração em menor escala do defeito no código. \n Por exemplo, se um número aparece incorretamente em uma saída, encontre o \n objeto que está calculando esse número.\n </para>\n </listitem>\n\n <listitem>\n <para>\n Escreva um teste automatizado que falha agora, mas vai passar quando o \n defeito for consertado.\n </para>\n </listitem>\n\n <listitem>\n <para>\n Conserte o defeito.\n </para>\n </listitem>\n </orderedlist>\n\n <para>\n Encontrar a menor reprodução confiável do defeito vai te dar a \n oportunidade de examinar realmente a causa do defeito. O teste que você \n escreve vai melhorar as chances de que, quando você consertar o defeito, você realmente \n tê-lo consertado, porque o novo teste reduz a probabilidade de desfazer o conserto \n com futuras modificações no código. Todos os testes que você escreveu antes reduzem a \n probabilidade de causar diferentes problemas inadvertidamente.\n </para>\n\n <blockquote>\n <attribution>Benjamin Smedberg</attribution>\n <para>\n Testes unitários oferecem muitas vantagens:\n <itemizedlist>\n <listitem><para>Testar dá aos autores e revisores dos códigos confiança de que remendos produzem os resultados corretos.</para></listitem>\n <listitem><para>Criar casos de testes é um bom ímpeto para desenvolvedores descobrirem casos extremos.</para></listitem>\n <listitem><para>Testar fornece uma boa maneira de capturar regressões rapidamente, e ter certeza de que nenhuma regressão será repetida duas vezes.</para></listitem>\n <listitem><para>Testes unitários fornecem exemplos funcionais de como usar uma API e podem auxiliar significativamente os trabalhos de documentação.</para></listitem>\n </itemizedlist>\n No geral, testes unitários integrados reduzem o custo e o risco de qualquer \n mudança individual menor. Isso vai permitir o projeto realizar [...]\n maiores mudanças arquitetônicas [...] rápida e confiavelmente.\n </para>\n </blockquote>\n </section>\n</chapter>\n"} +{"text": "/*____________________________________________________________________________\r\n \r\n FreeAmp - The Free MP3 Player\r\n Portions Copyright (C) 1998-1999 EMusic.com\r\n\r\n This program is free software; you can redistribute it and/or modify\r\n it under the terms of the GNU General Public License as published by\r\n the Free Software Foundation; either version 2 of the License, or\r\n (at your option) any later version.\r\n\r\n This program is distributed in the hope that it will be useful,\r\n but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n GNU General Public License for more details.\r\n\r\n You should have received a copy of the GNU General Public License\r\n along with this program; if not, write to the Free Software\r\n Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.\r\n \r\n\r\n____________________________________________________________________________*/\r\n\r\n#ifndef INCLUDED_XINGLMC_H_\r\n#define INCLUDED_XINGLMC_H_\r\n\r\n/* system headers */\r\n#include <stdlib.h>\r\n#include <time.h>\r\n\r\n/* project headers */\r\n#include \"config.h\"\r\n\r\n#include \"pmi.h\"\r\n#include \"pmo.h\"\r\n#include \"mutex.h\"\r\n#include \"event.h\"\r\n#include \"lmc.h\"\r\n#include \"thread.h\"\r\n#include \"mutex.h\"\r\n#include \"queue.h\"\r\n#include \"semaphore.h\"\r\n\r\nextern \"C\"\r\n{\r\n#include \"mhead.h\"\r\n#include \"port.h\"\r\n}\r\n\r\n#define BS_BUFBYTES 60000U\r\n#define PCM_BUFBYTES 60000U\r\n\r\n#define FRAMES_FLAG 0x0001\r\n#define BYTES_FLAG 0x0002\r\n#define TOC_FLAG 0x0004\r\n#define VBR_SCALE_FLAG 0x0008\r\n\r\n#define FRAMES_AND_BYTES (FRAMES_FLAG | BYTES_FLAG)\r\n\r\n// structure to receive extracted header\r\n// toc may be NULL\r\ntypedef struct \r\n{\r\n int h_id; // from MPEG header, 0=MPEG2, 1=MPEG1\r\n int samprate; // determined from MPEG header\r\n int flags; // from Xing header data\r\n int frames; // total bit stream frames from Xing header data\r\n int bytes; // total bit stream bytes from Xing header data\r\n int vbr_scale; // encoded vbr scale from Xing header data\r\n unsigned char *toc; // pointer to unsigned char toc_buffer[100]\r\n // may be NULL if toc not desired\r\n} XHEADDATA;\r\n\r\nenum\r\n{\r\n lmcError_MinimumError = 1000,\r\n lmcError_DecodeFailed,\r\n lmcError_AudioDecodeInitFailed,\r\n lmcError_DecoderThreadFailed,\r\n lmcError_PMIError,\r\n lmcError_PMOError,\r\n lmcError_MaximumError\r\n};\r\n\r\nclass XingLMC:public LogicalMediaConverter\r\n{\r\n\r\n public:\r\n XingLMC(FAContext *context);\r\n virtual ~XingLMC();\r\n\r\n virtual uint32 CalculateSongLength(const char *url);\r\n\r\n virtual Error ChangePosition(int32 position);\r\n\r\n virtual Error CanDecode();\r\n virtual void Clear();\r\n virtual Error ExtractMediaInfo();\r\n\r\n virtual void SetPMI(PhysicalMediaInput *pmi) { m_pPmi = pmi; };\r\n virtual void SetPMO(PhysicalMediaOutput *pmo) { m_pPmo = pmo; };\r\n virtual Error Prepare(PullBuffer *pInputBuffer, PullBuffer *&pOutBuffer);\r\n virtual Error InitDecoder();\r\n\r\n virtual Error SetEQData(float *, float);\r\n virtual Error SetEQData(bool);\r\n\r\n virtual Error SetDecodeInfo(DecodeInfo &info);\r\n\r\n virtual vector<string> *GetExtensions(void);\r\n \r\n private:\r\n\r\n static void DecodeWorkerThreadFunc(void *);\r\n void DecodeWork();\r\n Error BeginRead(void *&pBuffer, unsigned int iBytesNeeded);\r\n Error EndRead(size_t iBytesUsed);\r\n Error AdvanceBufferToNextFrame();\r\n Error GetHeadInfo();\r\n Error GetBitstreamStats(float &fTotalSeconds, float &fMsPerFrame,\r\n int32 &iTotalFrames, int32 &iSampleRate, \r\n int32 &iLayer);\r\n\r\n int GetXingHeader(XHEADDATA *X, unsigned char *buf);\r\n int SeekPoint(unsigned char TOC[100], int file_bytes, float percent);\r\n int ExtractI4(unsigned char *buf);\r\n\r\n PhysicalMediaInput *m_pPmi;\r\n PhysicalMediaOutput *m_pPmo;\r\n\r\n int m_iMaxWriteSize;\r\n int32 m_frameBytes, m_iBufferUpInterval, m_iBufferSize;\r\n size_t m_lFileSize;\r\n MPEG_HEAD m_sMpegHead;\r\n int32 m_iBitRate, m_iTotalFrames;\r\n bool m_bBufferingUp;\r\n Thread *m_decoderThread;\r\n\r\n int32 m_frameCounter;\r\n time_t m_iBufferUpdate;\r\n char *m_szUrl;\r\n const char *m_szError;\r\n XHEADDATA *m_pXingHeader;\r\n \r\n // These vars are used for a nasty hack.\r\n FILE *m_fpFile;\r\n char *m_pLocalReadBuffer;\r\n MPEG m_sMPEG;\r\n};\r\n\r\n#endif /* _XINGLMC_H */\r\n\r\n\r\n\r\n\r\n"} +{"text": "/* THIS THEME WAS AUTOGENERATED BY Theme.tmpl.css (UUID: 467560D0-6ACE-4409-82FD-4791420837AC) */\n\n.ace-kuroir .ace_gutter {\n background: #e8e8e8;\n color: #333;\n}\n\n.ace-kuroir .ace_print-margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-kuroir {\n background-color: #E8E9E8;\n color: #363636;\n}\n\n.ace-kuroir .ace_cursor {\n color: #202020;\n}\n\n.ace-kuroir .ace_marker-layer .ace_selection {\n background: rgba(245, 170, 0, 0.57);\n}\n\n.ace-kuroir.ace_multiselect .ace_selection.ace_start {\n box-shadow: 0 0 3px 0px #E8E9E8;\n}\n\n.ace-kuroir .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-kuroir .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(0, 0, 0, 0.29);\n}\n\n.ace-kuroir .ace_marker-layer .ace_active-line {\n background: rgba(203, 220, 47, 0.22);\n}\n\n.ace-kuroir .ace_gutter-active-line {\n background-color: rgba(203, 220, 47, 0.22);\n}\n\n.ace-kuroir .ace_marker-layer .ace_selected-word {\n border: 1px solid rgba(245, 170, 0, 0.57);\n}\n\n.ace-kuroir .ace_invisible {\n color: #BFBFBF\n}\n\n.ace-kuroir .ace_fold {\n border-color: #363636;\n}\n\n\n\n\n\n.ace-kuroir .ace_constant{color:#CD6839;}.ace-kuroir .ace_constant.ace_numeric{color:#9A5925;}.ace-kuroir .ace_support{color:#104E8B;}.ace-kuroir .ace_support.ace_function{color:#005273;}.ace-kuroir .ace_support.ace_constant{color:#CF6A4C;}.ace-kuroir .ace_storage{color:#A52A2A;}.ace-kuroir .ace_invalid.ace_illegal{color:#FD1224;\nbackground-color:rgba(255, 6, 0, 0.15);}.ace-kuroir .ace_invalid.ace_deprecated{text-decoration:underline;\nfont-style:italic;\ncolor:#FD1732;\nbackground-color:#E8E9E8;}.ace-kuroir .ace_string{color:#639300;}.ace-kuroir .ace_string.ace_regexp{color:#417E00;\nbackground-color:#C9D4BE;}.ace-kuroir .ace_comment{color:rgba(148, 148, 148, 0.91);\nbackground-color:rgba(220, 220, 220, 0.56);}.ace-kuroir .ace_variable{color:#009ACD;}.ace-kuroir .ace_meta.ace_tag{color:#005273;}.ace-kuroir .ace_markup.ace_heading{color:#B8012D;\nbackground-color:rgba(191, 97, 51, 0.051);}.ace-kuroir .ace_markup.ace_list{color:#8F5B26;}\n"} +{"text": "'use strict';\nimport React,{Component} from 'react';\nimport {Link} from 'react-router-dom';\n\nimport Nav from '../view/nav.js';\nimport logo_en_black from '../dist/img/text_logo_black.png';\nimport tempImg1 from '../dist/img/temp.jpg';\nimport tempImg2 from '../dist/img/temp1.jpg';\n\nimport '../dist/css/reset.css';\nimport Home from '../dist/css/home.css';\n\n\nclass App extends Component {\n render() {\n return (\n <div>\n <Nav/>\n <div className={Home.banner}>\n <p className={Home.logo_en}><img width=\"233\" src={logo_en_black}/></p>\n <p className={Home.banner_text}>一起创造有趣的音频</p>\n <p>\n <Link to=\"/reg\">\n <button className={Home.upload_btn}>立 即 创 作</button>\n </Link>\n </p>\n </div>\n <div className={Home.content}>\n <h1>作品列表</h1>\n <h2>我们推荐了啊啊所大所多一些好的作品供您食用</h2>\n\n <ul className={Home.list}>\n <li>\n <img src={tempImg1}/>\n <p>测测你的忍耐力!</p>\n </li>\n <li>\n <img src={tempImg2}/>\n <p>测测你的忍耐力!</p>\n </li>\n <li>\n <img src={tempImg1}/>\n <p>测测你的忍耐力!</p>\n </li>\n <li>\n <img src={tempImg2}/>\n <p>测测你的忍耐力!</p>\n </li>\n <li>\n <img src={tempImg1}/>\n <p>测测你的忍耐力!</p>\n </li>\n <li>\n <img src={tempImg2}/>\n <p>测测你的忍耐力!</p>\n </li>\n </ul>\n <div className={Home.readmore}>\n <span>您不满意?</span>\n <a>换一批!</a>\n </div>\n </div>\n <div className={Home.footer}>\n ©2013-2017 TeamMoe@LittleMusic TeamMoe@ListenLite 2017\n </div>\n </div>\n );\n }\n}\n\nexport default App;\n"} +{"text": "%YAML 1.1\n%TAG !u! tag:unity3d.com,2011:\n--- !u!21 &2100000\nMaterial:\n serializedVersion: 6\n m_ObjectHideFlags: 0\n m_CorrespondingSourceObject: {fileID: 0}\n m_PrefabInstance: {fileID: 0}\n m_PrefabAsset: {fileID: 0}\n m_Name: DefaultMaterial\n m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0}\n m_ShaderKeywords: _SUNDISK_HIGH_QUALITY\n m_LightmapFlags: 4\n m_EnableInstancingVariants: 0\n m_DoubleSidedGI: 0\n m_CustomRenderQueue: -1\n stringTagMap: {}\n disabledShaderPasses: []\n m_SavedProperties:\n serializedVersion: 3\n m_TexEnvs:\n - _BackTex:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _BumpMap:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _DetailAlbedoMap:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _DetailMask:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _DetailNormalMap:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _DownTex:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _EmissionMap:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _FrontTex:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _LeftTex:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _MainTex:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _MetallicGlossMap:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _OcclusionMap:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _ParallaxMap:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _RightTex:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _SpecGlossMap:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n - _UpTex:\n m_Texture: {fileID: 0}\n m_Scale: {x: 1, y: 1}\n m_Offset: {x: 0, y: 0}\n m_Floats:\n - _AtmosphereThickness: 1\n - _BumpScale: 1\n - _ColorMask: 15\n - _Cutoff: 0.5\n - _DetailNormalMapScale: 1\n - _DstBlend: 0\n - _Exposure: 1.3\n - _GlossMapScale: 1\n - _Glossiness: 0\n - _GlossyReflections: 1\n - _Metallic: 0.711\n - _Mode: 0\n - _OcclusionStrength: 1\n - _Parallax: 0.02\n - _SmoothnessTextureChannel: 0\n - _SpecularHighlights: 1\n - _SrcBlend: 1\n - _Stencil: 0\n - _StencilComp: 8\n - _StencilOp: 0\n - _StencilReadMask: 255\n - _StencilWriteMask: 255\n - _SunDisk: 2\n - _SunSize: 0.04\n - _SunSizeConvergence: 5\n - _UVSec: 0\n - _UseUIAlphaClip: 0\n - _ZWrite: 1\n m_Colors:\n - _Color: {r: 1, g: 1, b: 1, a: 1}\n - _EmissionColor: {r: 1, g: 1, b: 1, a: 1}\n - _GroundColor: {r: 0.36899996, g: 0.34899998, b: 0.34099993, a: 1}\n - _SkyTint: {r: 0.5, g: 0.5, b: 0.5, a: 1}\n - _SpecColor: {r: 0, g: 0, b: 0, a: 1}\n"} +{"text": "/**\n * @brief Kernels for computing t-SNE attractive forces with nearest neighbor approximation.\n *\n * @file apply_forces.cu\n * @author Roshan Rao\n * @date 2018-05-08\n * Copyright (c) 2018, Regents of the University of California\n */\n#ifndef SRC_INCLUDE_KERNELS_ATTR_FORCES_H_\n#define SRC_INCLUDE_KERNELS_ATTR_FORCES_H_\n\n#include \"common.h\"\n#include \"options.h\"\n#include \"util/cuda_utils.h\"\n\nnamespace tsnecuda {\n\nvoid ComputeAttractiveForces(\n tsnecuda::GpuOptions &gpu_opt,\n cusparseHandle_t &handle,\n cusparseMatDescr_t &descr,\n thrust::device_vector<float> &attr_forces,\n thrust::device_vector<float> &sparse_pij,\n thrust::device_vector<int> &pij_row_ptr,\n thrust::device_vector<int> &pij_col_ind,\n thrust::device_vector<int> &coo_indices,\n thrust::device_vector<float> &points,\n thrust::device_vector<float> &ones,\n const int num_points,\n const int num_nonzero);\n}\n\n#endif\n"} +{"text": "module Workarea\n class Storefront::Users::PasswordsController < Storefront::ApplicationController\n before_action :require_login, only: [:change, :make_change]\n skip_before_action :require_password_changes\n\n def new\n end\n\n def edit\n reset = User::PasswordReset.find_by(token: params[:token]) rescue nil\n\n unless reset\n flash[:error] = t('workarea.storefront.flash_messages.password_reset_expired')\n redirect_to forgot_password_path\n end\n end\n\n def create\n password_reset = User::PasswordReset.setup!(params[:email])\n if password_reset.present?\n Storefront::AccountMailer.password_reset(password_reset.id.to_s).deliver_later\n end\n\n flash[:success] = t(\n 'workarea.storefront.flash_messages.password_reset_email_sent',\n email: params[:email]\n )\n redirect_to forgot_password_path\n end\n\n def update\n reset = User::PasswordReset.find_by(token: params[:token]) rescue nil\n\n if reset.blank?\n flash[:error] = t('workarea.storefront.flash_messages.password_reset_expired')\n render :edit\n elsif reset.complete(params[:password])\n flash[:success] = t('workarea.storefront.flash_messages.password_reset')\n redirect_to login_path\n else\n flash[:error] = reset.errors.full_messages.to_sentence\n redirect_to reset_password_path(token: reset.token)\n end\n end\n\n def change\n end\n\n def make_change\n unless current_user.authenticate(params[:old_password])\n flash[:error] = t('workarea.storefront.flash_messages.old_password_invalid')\n render :change and return\n end\n\n if params[:password].blank?\n flash[:error] = t('workarea.storefront.flash_messages.password_required')\n render :change and return\n end\n\n if current_user.update_attributes(password: params[:password])\n flash[:success] = t('workarea.storefront.flash_messages.password_reset')\n redirect_back_or users_account_path\n else\n flash[:error] = current_user.errors.full_messages\n render :change and return\n end\n end\n end\nend\n"} +{"text": "// Copyright 2009 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// +build 386,openbsd\n\npackage unix\n\nfunc setTimespec(sec, nsec int64) Timespec {\n\treturn Timespec{Sec: sec, Nsec: int32(nsec)}\n}\n\nfunc setTimeval(sec, usec int64) Timeval {\n\treturn Timeval{Sec: sec, Usec: int32(usec)}\n}\n\nfunc SetKevent(k *Kevent_t, fd, mode, flags int) {\n\tk.Ident = uint32(fd)\n\tk.Filter = int16(mode)\n\tk.Flags = uint16(flags)\n}\n\nfunc (iov *Iovec) SetLen(length int) {\n\tiov.Len = uint32(length)\n}\n\nfunc (msghdr *Msghdr) SetControllen(length int) {\n\tmsghdr.Controllen = uint32(length)\n}\n\nfunc (cmsg *Cmsghdr) SetLen(length int) {\n\tcmsg.Len = uint32(length)\n}\n\n// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions\n// of openbsd/386 the syscall is called sysctl instead of __sysctl.\nconst SYS___SYSCTL = SYS_SYSCTL\n"} +{"text": "// Upgrade NOTE: replaced 'mul(UNITY_MATRIX_MVP,*)' with 'UnityObjectToClipPos(*)'\n\nShader \"Effects/GlowAdditiveSimple\" {\n\tProperties {\n\t_TintColor (\"Tint Color\", Color) = (0.5,0.5,0.5,0.5)\n\t_CoreColor (\"Core Color\", Color) = (0.5,0.5,0.5,0.5)\n\t_MainTex (\"Particle Texture\", 2D) = \"white\" {}\n\t_TintStrength (\"Tint Color Strength\", Range(0, 5)) = 1\n\t_CoreStrength (\"Core Color Strength\", Range(0, 5)) = 1\n\t_CutOutLightCore (\"CutOut Light Core\", Range(0, 1)) = 0.5\n\t\n}\n\nCategory {\n\tTags { \"Queue\"=\"Transparent\" \"IgnoreProjector\"=\"True\" \"RenderType\"=\"Transparent\" }\n\tBlend SrcAlpha One\n\tAlphaTest Greater .01\n\tColorMask RGB\n\tCull Off \n\tLighting Off \n\tZWrite Off \n\tFog { Color (0,0,0,0) }\n\t\n\tSubShader {\n\t\tPass {\n\t\t\n\t\t\tCGPROGRAM\n\t\t\t#pragma vertex vert\n\t\t\t#pragma fragment frag\n\t\t\t\n\t\t\n\t\t\t#include \"UnityCG.cginc\"\n\n\t\t\tsampler2D _MainTex;\n\t\t\tfixed4 _TintColor;\n\t\t\tfixed4 _CoreColor;\n\t\t\tfloat _CutOutLightCore;\n\t\t\tfloat _TintStrength;\n\t\t\tfloat _CoreStrength;\n\t\t\t\n\t\t\tstruct appdata_t {\n\t\t\t\tfloat4 vertex : POSITION;\n\t\t\t\tfixed4 color : COLOR;\n\t\t\t\tfloat2 texcoord : TEXCOORD0;\n\t\t\t};\n\n\t\t\tstruct v2f {\n\t\t\t\tfloat4 vertex : POSITION;\n\t\t\t\tfixed4 color : COLOR;\n\t\t\t\tfloat2 texcoord : TEXCOORD0;\n\t\t\t\t\n\t\t\t};\n\t\t\t\n\t\t\tfloat4 _MainTex_ST;\n\n\t\t\tv2f vert (appdata_t v)\n\t\t\t{\n\t\t\t\tv2f o;\n\t\t\t\tUNITY_INITIALIZE_OUTPUT(v2f, o);\n\t\t\t\to.vertex = UnityObjectToClipPos(v.vertex);\n\t\t\t\t//o.color = v.color;\n\t\t\t\to.texcoord = TRANSFORM_TEX(v.texcoord,_MainTex);\n\t\t\t\treturn o;\n\t\t\t}\n\t\t\t\n\t\t\tfixed4 frag (v2f i) : COLOR\n\t\t\t{\n\t\t\t\tfixed4 tex = tex2D(_MainTex, i.texcoord);\n\t\t\t\tfixed4 col = (_TintColor * tex.g * _TintStrength + tex.r * _CoreColor * _CoreStrength - _CutOutLightCore); \n\t\t\t\treturn clamp(col, 0, 255);\n\t\t\t}\n\t\t\tENDCG \n\t\t}\n\t}\t\n}\n}\n"} +{"text": "// This is core/vgui/vgui_camera.h\n#ifndef vgui_camera_h_\n#define vgui_camera_h_\n//:\n// \\file\n// \\author Geoffrey Cross, Oxford RRG\n// \\date 03 Nov 99\n// \\brief Projects 3D models into a GL context given a camera projection matrix.\n//\n// \\verbatim\n// Modifications\n// 991103 Geoff Initial version.\n// 26-APR-2002 K.Y.McGaul - Converted to doxygen style comments.\n// \\endverbatim\n\n#include <vnl/vnl_matrix_fixed.h>\n\n//: Projects 3D models into a GL context given a camera projection matrix.\n//\n// vgui_camera is a utility class which allows 3D models to projected into\n// a GL context given a known camera projection matrix. Note comments in\n// code about clipping planes which is really rather important if you care\n// about such things. Use the class in conjunction with a vgui_load (if\n// you dare), or a vgui_mult to change the GL_PROJECTION_MATRIX\n// appropriately.\nclass vgui_camera\n{\n public:\n //: Constructor - create a camera with a default projection matrix.\n vgui_camera() {}\n\n //: Constructor - create a camera with the given projection matrix.\n vgui_camera(vnl_matrix_fixed<double,3,4> const& P) : pmatrix(P) {}\n\n //: Set the projection matrix to the given matrix.\n void set_pmatrix(vnl_matrix_fixed<double,3,4> const& m) { pmatrix= m; }\n\n //: Plug this matrix into a vgui_loader_tableau.\n // Note: this will return a GL_PROJECTION_MATRIX with the assumption that\n // you have a Euclidean reconstruction. The result is that the front and\n // back clipping planes will be PARALLEL (note: not projective frame!) to\n // the image plane.\n vnl_matrix_fixed<double,3,4> get_glprojmatrix( const int imagesizex= 720,\n const int imagesizey= 576) const;\n\n protected:\n //: The projection matrix.\n vnl_matrix_fixed<double,3,4> pmatrix;\n};\n\n#endif // vgui_camera_h_\n"} +{"text": "/*\n * Copyright (C) 2014 The Android Open Source Project\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n#ifndef ART_RUNTIME_DEX_INSTRUCTION_UTILS_H_\n#define ART_RUNTIME_DEX_INSTRUCTION_UTILS_H_\n\n#include \"dex_instruction.h\"\n\nnamespace art {\n\n// Dex invoke type corresponds to the ordering of INVOKE instructions;\n// this order is the same for range and non-range invokes.\nenum DexInvokeType : uint8_t {\n kDexInvokeVirtual = 0, // invoke-virtual, invoke-virtual-range\n kDexInvokeSuper, // invoke-super, invoke-super-range\n kDexInvokeDirect, // invoke-direct, invoke-direct-range\n kDexInvokeStatic, // invoke-static, invoke-static-range\n kDexInvokeInterface, // invoke-interface, invoke-interface-range\n kDexInvokeTypeCount\n};\n\n// Dex instruction memory access types correspond to the ordering of GET/PUT instructions;\n// this order is the same for IGET, IPUT, SGET, SPUT, AGET and APUT.\nenum DexMemAccessType : uint8_t {\n kDexMemAccessWord = 0, // op 0; int or float, the actual type is not encoded.\n kDexMemAccessWide, // op_WIDE 1; long or double, the actual type is not encoded.\n kDexMemAccessObject, // op_OBJECT 2; the actual reference type is not encoded.\n kDexMemAccessBoolean, // op_BOOLEAN 3\n kDexMemAccessByte, // op_BYTE 4\n kDexMemAccessChar, // op_CHAR 5\n kDexMemAccessShort, // op_SHORT 6\n kDexMemAccessTypeCount\n};\n\nstd::ostream& operator<<(std::ostream& os, const DexMemAccessType& type);\n\n// NOTE: The following functions disregard quickened instructions.\n\n// By \"direct\" const we mean to exclude const-string and const-class\n// which load data from somewhere else, i.e. indirectly.\nconstexpr bool IsInstructionDirectConst(Instruction::Code opcode) {\n return Instruction::CONST_4 <= opcode && opcode <= Instruction::CONST_WIDE_HIGH16;\n}\n\nconstexpr bool IsInstructionConstWide(Instruction::Code opcode) {\n return Instruction::CONST_WIDE_16 <= opcode && opcode <= Instruction::CONST_WIDE_HIGH16;\n}\n\nconstexpr bool IsInstructionReturn(Instruction::Code opcode) {\n return Instruction::RETURN_VOID <= opcode && opcode <= Instruction::RETURN_OBJECT;\n}\n\nconstexpr bool IsInstructionInvoke(Instruction::Code opcode) {\n return Instruction::INVOKE_VIRTUAL <= opcode && opcode <= Instruction::INVOKE_INTERFACE_RANGE &&\n opcode != Instruction::RETURN_VOID_NO_BARRIER;\n}\n\nconstexpr bool IsInstructionQuickInvoke(Instruction::Code opcode) {\n return opcode == Instruction::INVOKE_VIRTUAL_QUICK ||\n opcode == Instruction::INVOKE_VIRTUAL_RANGE_QUICK;\n}\n\nconstexpr bool IsInstructionInvokeStatic(Instruction::Code opcode) {\n return opcode == Instruction::INVOKE_STATIC || opcode == Instruction::INVOKE_STATIC_RANGE;\n}\n\nconstexpr bool IsInstructionGoto(Instruction::Code opcode) {\n return Instruction::GOTO <= opcode && opcode <= Instruction::GOTO_32;\n}\n\nconstexpr bool IsInstructionIfCc(Instruction::Code opcode) {\n return Instruction::IF_EQ <= opcode && opcode <= Instruction::IF_LE;\n}\n\nconstexpr bool IsInstructionIfCcZ(Instruction::Code opcode) {\n return Instruction::IF_EQZ <= opcode && opcode <= Instruction::IF_LEZ;\n}\n\nconstexpr bool IsInstructionIGet(Instruction::Code code) {\n return Instruction::IGET <= code && code <= Instruction::IGET_SHORT;\n}\n\nconstexpr bool IsInstructionIPut(Instruction::Code code) {\n return Instruction::IPUT <= code && code <= Instruction::IPUT_SHORT;\n}\n\nconstexpr bool IsInstructionSGet(Instruction::Code code) {\n return Instruction::SGET <= code && code <= Instruction::SGET_SHORT;\n}\n\nconstexpr bool IsInstructionSPut(Instruction::Code code) {\n return Instruction::SPUT <= code && code <= Instruction::SPUT_SHORT;\n}\n\nconstexpr bool IsInstructionAGet(Instruction::Code code) {\n return Instruction::AGET <= code && code <= Instruction::AGET_SHORT;\n}\n\nconstexpr bool IsInstructionAPut(Instruction::Code code) {\n return Instruction::APUT <= code && code <= Instruction::APUT_SHORT;\n}\n\nconstexpr bool IsInstructionIGetOrIPut(Instruction::Code code) {\n return Instruction::IGET <= code && code <= Instruction::IPUT_SHORT;\n}\n\nconstexpr bool IsInstructionIGetQuickOrIPutQuick(Instruction::Code code) {\n return (code >= Instruction::IGET_QUICK && code <= Instruction::IPUT_OBJECT_QUICK) ||\n (code >= Instruction::IPUT_BOOLEAN_QUICK && code <= Instruction::IGET_SHORT_QUICK);\n}\n\nconstexpr bool IsInstructionSGetOrSPut(Instruction::Code code) {\n return Instruction::SGET <= code && code <= Instruction::SPUT_SHORT;\n}\n\nconstexpr bool IsInstructionAGetOrAPut(Instruction::Code code) {\n return Instruction::AGET <= code && code <= Instruction::APUT_SHORT;\n}\n\nconstexpr bool IsInstructionBinOp2Addr(Instruction::Code code) {\n return Instruction::ADD_INT_2ADDR <= code && code <= Instruction::REM_DOUBLE_2ADDR;\n}\n\nconstexpr bool IsInvokeInstructionRange(Instruction::Code opcode) {\n DCHECK(IsInstructionInvoke(opcode));\n return opcode >= Instruction::INVOKE_VIRTUAL_RANGE;\n}\n\nconstexpr DexInvokeType InvokeInstructionType(Instruction::Code opcode) {\n DCHECK(IsInstructionInvoke(opcode));\n return static_cast<DexInvokeType>(IsInvokeInstructionRange(opcode)\n ? (opcode - Instruction::INVOKE_VIRTUAL_RANGE)\n : (opcode - Instruction::INVOKE_VIRTUAL));\n}\n\nconstexpr DexMemAccessType IGetMemAccessType(Instruction::Code code) {\n DCHECK(IsInstructionIGet(code));\n return static_cast<DexMemAccessType>(code - Instruction::IGET);\n}\n\nconstexpr DexMemAccessType IPutMemAccessType(Instruction::Code code) {\n DCHECK(IsInstructionIPut(code));\n return static_cast<DexMemAccessType>(code - Instruction::IPUT);\n}\n\nconstexpr DexMemAccessType SGetMemAccessType(Instruction::Code code) {\n DCHECK(IsInstructionSGet(code));\n return static_cast<DexMemAccessType>(code - Instruction::SGET);\n}\n\nconstexpr DexMemAccessType SPutMemAccessType(Instruction::Code code) {\n DCHECK(IsInstructionSPut(code));\n return static_cast<DexMemAccessType>(code - Instruction::SPUT);\n}\n\nconstexpr DexMemAccessType AGetMemAccessType(Instruction::Code code) {\n DCHECK(IsInstructionAGet(code));\n return static_cast<DexMemAccessType>(code - Instruction::AGET);\n}\n\nconstexpr DexMemAccessType APutMemAccessType(Instruction::Code code) {\n DCHECK(IsInstructionAPut(code));\n return static_cast<DexMemAccessType>(code - Instruction::APUT);\n}\n\nconstexpr DexMemAccessType IGetOrIPutMemAccessType(Instruction::Code code) {\n DCHECK(IsInstructionIGetOrIPut(code));\n return (code >= Instruction::IPUT) ? IPutMemAccessType(code) : IGetMemAccessType(code);\n}\n\ninline DexMemAccessType IGetQuickOrIPutQuickMemAccessType(Instruction::Code code) {\n DCHECK(IsInstructionIGetQuickOrIPutQuick(code));\n switch (code) {\n case Instruction::IGET_QUICK: case Instruction::IPUT_QUICK:\n return kDexMemAccessWord;\n case Instruction::IGET_WIDE_QUICK: case Instruction::IPUT_WIDE_QUICK:\n return kDexMemAccessWide;\n case Instruction::IGET_OBJECT_QUICK: case Instruction::IPUT_OBJECT_QUICK:\n return kDexMemAccessObject;\n case Instruction::IGET_BOOLEAN_QUICK: case Instruction::IPUT_BOOLEAN_QUICK:\n return kDexMemAccessBoolean;\n case Instruction::IGET_BYTE_QUICK: case Instruction::IPUT_BYTE_QUICK:\n return kDexMemAccessByte;\n case Instruction::IGET_CHAR_QUICK: case Instruction::IPUT_CHAR_QUICK:\n return kDexMemAccessChar;\n case Instruction::IGET_SHORT_QUICK: case Instruction::IPUT_SHORT_QUICK:\n return kDexMemAccessShort;\n default:\n LOG(FATAL) << code;\n UNREACHABLE();\n }\n}\n\nconstexpr DexMemAccessType SGetOrSPutMemAccessType(Instruction::Code code) {\n DCHECK(IsInstructionSGetOrSPut(code));\n return (code >= Instruction::SPUT) ? SPutMemAccessType(code) : SGetMemAccessType(code);\n}\n\nconstexpr DexMemAccessType AGetOrAPutMemAccessType(Instruction::Code code) {\n DCHECK(IsInstructionAGetOrAPut(code));\n return (code >= Instruction::APUT) ? APutMemAccessType(code) : AGetMemAccessType(code);\n}\n\n} // namespace art\n\n#endif // ART_RUNTIME_DEX_INSTRUCTION_UTILS_H_\n"} +{"text": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\"\n\"https://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n<title>FreeType-2.9.1 API Reference</title>\n<style type=\"text/css\">\n a:link { color: #0000EF; }\n a:visited { color: #51188E; }\n a:hover { color: #FF0000; }\n\n body { font-family: Verdana, Geneva, Arial, Helvetica, serif;\n color: #000000;\n background: #FFFFFF;\n width: 87%;\n margin: auto; }\n\n div.section { width: 75%;\n margin: auto; }\n div.section hr { margin: 4ex 0 1ex 0; }\n div.section h4 { background-color: #EEEEFF;\n font-size: medium;\n font-style: oblique;\n font-weight: bold;\n margin: 3ex 0 1.5ex 9%;\n padding: 0.3ex 0 0.3ex 1%; }\n div.section p { margin: 1.5ex 0 1.5ex 10%; }\n div.section pre { margin: 3ex 0 3ex 9%;\n background-color: #D6E8FF;\n padding: 2ex 0 2ex 1%; }\n div.section table.fields { width: 90%;\n margin: 1.5ex 0 1.5ex 10%; }\n div.section table.toc { width: 95%;\n margin: 1.5ex 0 1.5ex 5%; }\n div.timestamp { text-align: center;\n font-size: 69%;\n margin: 1.5ex 0 1.5ex 0; }\n\n h1 { text-align: center; }\n h3 { font-size: medium;\n margin: 4ex 0 1.5ex 0; }\n\n p { text-align: justify; }\n\n pre.colored { color: blue; }\n\n span.keyword { font-family: monospace;\n text-align: left;\n white-space: pre;\n color: darkblue; }\n\n table.fields td.val { font-weight: bold;\n text-align: right;\n width: 30%;\n vertical-align: baseline;\n padding: 1ex 1em 1ex 0; }\n table.fields td.desc { vertical-align: baseline;\n padding: 1ex 0 1ex 1em; }\n table.fields td.desc p:first-child { margin: 0; }\n table.fields td.desc p { margin: 1.5ex 0 0 0; }\n table.index { margin: 6ex auto 6ex auto;\n border: 0;\n border-collapse: separate;\n border-spacing: 1em 0.3ex; }\n table.index tr { padding: 0; }\n table.index td { padding: 0; }\n table.index-toc-link { width: 100%;\n border: 0;\n border-spacing: 0;\n margin: 1ex 0 1ex 0; }\n table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;\n font-size: 83%;\n text-align: left; }\n table.index-toc-link td.middle { padding: 0 0.5em 0 0.5em;\n font-size: 83%;\n text-align: center; }\n table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;\n font-size: 83%;\n text-align: right; }\n table.synopsis { margin: 6ex auto 6ex auto;\n border: 0;\n border-collapse: separate;\n border-spacing: 2em 0.6ex; }\n table.synopsis tr { padding: 0; }\n table.synopsis td { padding: 0; }\n table.toc td.link { width: 30%;\n text-align: right;\n vertical-align: baseline;\n padding: 1ex 1em 1ex 0; }\n table.toc td.desc { vertical-align: baseline;\n padding: 1ex 0 1ex 1em;\n text-align: left; }\n table.toc td.desc p:first-child { margin: 0;\n text-align: left; }\n table.toc td.desc p { margin: 1.5ex 0 0 0;\n text-align: left; }\n\n</style>\n</head>\n<body>\n\n<table class=\"index-toc-link\"><tr><td class=\"left\">[<a href=\"ft2-index.html\">Index</a>]</td><td class=\"right\">[<a href=\"ft2-toc.html\">TOC</a>]</td></tr></table>\n<h1>FreeType-2.9.1 API Reference</h1>\n\n<h1 id=\"pfr_fonts\">PFR Fonts</h1>\n<h2>Synopsis</h2>\n<table class=\"synopsis\">\n<tr><td><a href=\"#FT_Get_PFR_Metrics\">FT_Get_PFR_Metrics</a></td><td><a href=\"#FT_Get_PFR_Kerning\">FT_Get_PFR_Kerning</a></td><td><a href=\"#FT_Get_PFR_Advance\">FT_Get_PFR_Advance</a></td></tr>\n</table>\n\n\n<p>This section contains the declaration of PFR-specific functions.</p>\n\n<div class=\"section\">\n<h3 id=\"FT_Get_PFR_Metrics\">FT_Get_PFR_Metrics</h3>\n<p>Defined in FT_PFR_H (freetype/ftpfr.h).</p>\n<pre>\n FT_EXPORT( <a href=\"ft2-basic_types.html#FT_Error\">FT_Error</a> )\n <b>FT_Get_PFR_Metrics</b>( <a href=\"ft2-base_interface.html#FT_Face\">FT_Face</a> face,\n <a href=\"ft2-basic_types.html#FT_UInt\">FT_UInt</a> *aoutline_resolution,\n <a href=\"ft2-basic_types.html#FT_UInt\">FT_UInt</a> *ametrics_resolution,\n <a href=\"ft2-basic_types.html#FT_Fixed\">FT_Fixed</a> *ametrics_x_scale,\n <a href=\"ft2-basic_types.html#FT_Fixed\">FT_Fixed</a> *ametrics_y_scale );\n</pre>\n\n<p>Return the outline and metrics resolutions of a given PFR face.</p>\n\n<h4>input</h4>\n<table class=\"fields\">\n<tr><td class=\"val\" id=\"face\">face</td><td class=\"desc\">\n<p>Handle to the input face. It can be a non-PFR face.</p>\n</td></tr>\n</table>\n\n<h4>output</h4>\n<table class=\"fields\">\n<tr><td class=\"val\" id=\"aoutline_resolution\">aoutline_resolution</td><td class=\"desc\">\n<p>Outline resolution. This is equivalent to &lsquo;face-&gt;units_per_EM&rsquo; for non-PFR fonts. Optional (parameter can be NULL).</p>\n</td></tr>\n<tr><td class=\"val\" id=\"ametrics_resolution\">ametrics_resolution</td><td class=\"desc\">\n<p>Metrics resolution. This is equivalent to &lsquo;outline_resolution&rsquo; for non-PFR fonts. Optional (parameter can be NULL).</p>\n</td></tr>\n<tr><td class=\"val\" id=\"ametrics_x_scale\">ametrics_x_scale</td><td class=\"desc\">\n<p>A 16.16 fixed-point number used to scale distance expressed in metrics units to device subpixels. This is equivalent to &lsquo;face-&gt;size-&gt;x_scale&rsquo;, but for metrics only. Optional (parameter can be NULL).</p>\n</td></tr>\n<tr><td class=\"val\" id=\"ametrics_y_scale\">ametrics_y_scale</td><td class=\"desc\">\n<p>Same as &lsquo;ametrics_x_scale&rsquo; but for the vertical direction. optional (parameter can be NULL).</p>\n</td></tr>\n</table>\n\n<h4>return</h4>\n<p>FreeType error code. 0&nbsp;means success.</p>\n\n<h4>note</h4>\n<p>If the input face is not a PFR, this function will return an error. However, in all cases, it will return valid values.</p>\n\n<hr>\n<table class=\"index-toc-link\"><tr><td class=\"left\">[<a href=\"ft2-index.html\">Index</a>]</td><td class=\"middle\">[<a href=\"#\">Top</a>]</td><td class=\"right\">[<a href=\"ft2-toc.html\">TOC</a>]</td></tr></table></div>\n\n<div class=\"section\">\n<h3 id=\"FT_Get_PFR_Kerning\">FT_Get_PFR_Kerning</h3>\n<p>Defined in FT_PFR_H (freetype/ftpfr.h).</p>\n<pre>\n FT_EXPORT( <a href=\"ft2-basic_types.html#FT_Error\">FT_Error</a> )\n <b>FT_Get_PFR_Kerning</b>( <a href=\"ft2-base_interface.html#FT_Face\">FT_Face</a> face,\n <a href=\"ft2-basic_types.html#FT_UInt\">FT_UInt</a> left,\n <a href=\"ft2-basic_types.html#FT_UInt\">FT_UInt</a> right,\n <a href=\"ft2-basic_types.html#FT_Vector\">FT_Vector</a> *avector );\n</pre>\n\n<p>Return the kerning pair corresponding to two glyphs in a PFR face. The distance is expressed in metrics units, unlike the result of <a href=\"ft2-base_interface.html#FT_Get_Kerning\">FT_Get_Kerning</a>.</p>\n\n<h4>input</h4>\n<table class=\"fields\">\n<tr><td class=\"val\" id=\"face\">face</td><td class=\"desc\">\n<p>A handle to the input face.</p>\n</td></tr>\n<tr><td class=\"val\" id=\"left\">left</td><td class=\"desc\">\n<p>Index of the left glyph.</p>\n</td></tr>\n<tr><td class=\"val\" id=\"right\">right</td><td class=\"desc\">\n<p>Index of the right glyph.</p>\n</td></tr>\n</table>\n\n<h4>output</h4>\n<table class=\"fields\">\n<tr><td class=\"val\" id=\"avector\">avector</td><td class=\"desc\">\n<p>A kerning vector.</p>\n</td></tr>\n</table>\n\n<h4>return</h4>\n<p>FreeType error code. 0&nbsp;means success.</p>\n\n<h4>note</h4>\n<p>This function always return distances in original PFR metrics units. This is unlike <a href=\"ft2-base_interface.html#FT_Get_Kerning\">FT_Get_Kerning</a> with the <a href=\"ft2-base_interface.html#FT_Kerning_Mode\">FT_KERNING_UNSCALED</a> mode, which always returns distances converted to outline units.</p>\n<p>You can use the value of the &lsquo;x_scale&rsquo; and &lsquo;y_scale&rsquo; parameters returned by <a href=\"ft2-pfr_fonts.html#FT_Get_PFR_Metrics\">FT_Get_PFR_Metrics</a> to scale these to device subpixels.</p>\n\n<hr>\n<table class=\"index-toc-link\"><tr><td class=\"left\">[<a href=\"ft2-index.html\">Index</a>]</td><td class=\"middle\">[<a href=\"#\">Top</a>]</td><td class=\"right\">[<a href=\"ft2-toc.html\">TOC</a>]</td></tr></table></div>\n\n<div class=\"section\">\n<h3 id=\"FT_Get_PFR_Advance\">FT_Get_PFR_Advance</h3>\n<p>Defined in FT_PFR_H (freetype/ftpfr.h).</p>\n<pre>\n FT_EXPORT( <a href=\"ft2-basic_types.html#FT_Error\">FT_Error</a> )\n <b>FT_Get_PFR_Advance</b>( <a href=\"ft2-base_interface.html#FT_Face\">FT_Face</a> face,\n <a href=\"ft2-basic_types.html#FT_UInt\">FT_UInt</a> gindex,\n <a href=\"ft2-basic_types.html#FT_Pos\">FT_Pos</a> *aadvance );\n</pre>\n\n<p>Return a given glyph advance, expressed in original metrics units, from a PFR font.</p>\n\n<h4>input</h4>\n<table class=\"fields\">\n<tr><td class=\"val\" id=\"face\">face</td><td class=\"desc\">\n<p>A handle to the input face.</p>\n</td></tr>\n<tr><td class=\"val\" id=\"gindex\">gindex</td><td class=\"desc\">\n<p>The glyph index.</p>\n</td></tr>\n</table>\n\n<h4>output</h4>\n<table class=\"fields\">\n<tr><td class=\"val\" id=\"aadvance\">aadvance</td><td class=\"desc\">\n<p>The glyph advance in metrics units.</p>\n</td></tr>\n</table>\n\n<h4>return</h4>\n<p>FreeType error code. 0&nbsp;means success.</p>\n\n<h4>note</h4>\n<p>You can use the &lsquo;x_scale&rsquo; or &lsquo;y_scale&rsquo; results of <a href=\"ft2-pfr_fonts.html#FT_Get_PFR_Metrics\">FT_Get_PFR_Metrics</a> to convert the advance to device subpixels (i.e., 1/64th of pixels).</p>\n\n<hr>\n<table class=\"index-toc-link\"><tr><td class=\"left\">[<a href=\"ft2-index.html\">Index</a>]</td><td class=\"middle\">[<a href=\"#\">Top</a>]</td><td class=\"right\">[<a href=\"ft2-toc.html\">TOC</a>]</td></tr></table></div>\n\n</body>\n</html>\n"} +{"text": "\r\n/****************************************************************** \r\n * *\r\n * D3DVec.inl *\r\n * *\r\n * Float-valued 3D vector class for Direct3D. *\r\n * *\r\n * Copyright (c) Microsoft Corp. All rights reserved. *\r\n * *\r\n ******************************************************************/\r\n\r\n#include <math.h>\r\n\r\n// =====================================\r\n// Constructors\r\n// =====================================\r\n\r\ninline\r\n_D3DVECTOR::_D3DVECTOR(D3DVALUE f)\r\n{\r\n x = y = z = f;\r\n}\r\n\r\ninline\r\n_D3DVECTOR::_D3DVECTOR(D3DVALUE _x, D3DVALUE _y, D3DVALUE _z)\r\n{\r\n x = _x; y = _y; z = _z;\r\n}\r\n\r\ninline\r\n_D3DVECTOR::_D3DVECTOR(const D3DVALUE f[3])\r\n{\r\n x = f[0]; y = f[1]; z = f[2];\r\n}\r\n\r\n// =====================================\r\n// Access grants\r\n// =====================================\r\n\r\ninline const D3DVALUE&\r\n_D3DVECTOR::operator[](int i) const\r\n{\r\n return (&x)[i];\r\n}\r\n\r\ninline D3DVALUE&\r\n_D3DVECTOR::operator[](int i)\r\n{\r\n return (&x)[i];\r\n}\r\n\r\n\r\n// =====================================\r\n// Assignment operators\r\n// =====================================\r\n\r\ninline _D3DVECTOR&\r\n_D3DVECTOR::operator += (const _D3DVECTOR& v)\r\n{\r\n x += v.x; y += v.y; z += v.z;\r\n return *this;\r\n}\r\n\r\ninline _D3DVECTOR&\r\n_D3DVECTOR::operator -= (const _D3DVECTOR& v)\r\n{\r\n x -= v.x; y -= v.y; z -= v.z;\r\n return *this;\r\n}\r\n\r\ninline _D3DVECTOR&\r\n_D3DVECTOR::operator *= (const _D3DVECTOR& v)\r\n{\r\n x *= v.x; y *= v.y; z *= v.z;\r\n return *this;\r\n}\r\n\r\ninline _D3DVECTOR&\r\n_D3DVECTOR::operator /= (const _D3DVECTOR& v)\r\n{\r\n x /= v.x; y /= v.y; z /= v.z;\r\n return *this;\r\n}\r\n\r\ninline _D3DVECTOR&\r\n_D3DVECTOR::operator *= (D3DVALUE s)\r\n{\r\n x *= s; y *= s; z *= s;\r\n return *this;\r\n}\r\n\r\ninline _D3DVECTOR&\r\n_D3DVECTOR::operator /= (D3DVALUE s)\r\n{\r\n x /= s; y /= s; z /= s;\r\n return *this;\r\n}\r\n\r\ninline _D3DVECTOR\r\noperator + (const _D3DVECTOR& v)\r\n{\r\n return v;\r\n}\r\n\r\ninline _D3DVECTOR\r\noperator - (const _D3DVECTOR& v)\r\n{\r\n return _D3DVECTOR(-v.x, -v.y, -v.z);\r\n}\r\n\r\ninline _D3DVECTOR\r\noperator + (const _D3DVECTOR& v1, const _D3DVECTOR& v2)\r\n{\r\n return _D3DVECTOR(v1.x+v2.x, v1.y+v2.y, v1.z+v2.z);\r\n}\r\n\r\ninline _D3DVECTOR\r\noperator - (const _D3DVECTOR& v1, const _D3DVECTOR& v2)\r\n{\r\n return _D3DVECTOR(v1.x-v2.x, v1.y-v2.y, v1.z-v2.z);\r\n}\r\n\r\ninline _D3DVECTOR\r\noperator * (const _D3DVECTOR& v1, const _D3DVECTOR& v2)\r\n{\r\n return _D3DVECTOR(v1.x*v2.x, v1.y*v2.y, v1.z*v2.z);\r\n}\r\n\r\ninline _D3DVECTOR\r\noperator / (const _D3DVECTOR& v1, const _D3DVECTOR& v2)\r\n{\r\n return _D3DVECTOR(v1.x/v2.x, v1.y/v2.y, v1.z/v2.z);\r\n}\r\n\r\ninline int\r\noperator < (const _D3DVECTOR& v1, const _D3DVECTOR& v2)\r\n{\r\n return v1[0] < v2[0] && v1[1] < v2[1] && v1[2] < v2[2];\r\n}\r\n\r\ninline int\r\noperator <= (const _D3DVECTOR& v1, const _D3DVECTOR& v2)\r\n{\r\n return v1[0] <= v2[0] && v1[1] <= v2[1] && v1[2] <= v2[2];\r\n}\r\n\r\ninline _D3DVECTOR\r\noperator * (const _D3DVECTOR& v, D3DVALUE s)\r\n{\r\n return _D3DVECTOR(s*v.x, s*v.y, s*v.z);\r\n}\r\n\r\ninline _D3DVECTOR\r\noperator * (D3DVALUE s, const _D3DVECTOR& v)\r\n{\r\n return _D3DVECTOR(s*v.x, s*v.y, s*v.z);\r\n}\r\n\r\ninline _D3DVECTOR\r\noperator / (const _D3DVECTOR& v, D3DVALUE s)\r\n{\r\n return _D3DVECTOR(v.x/s, v.y/s, v.z/s);\r\n}\r\n\r\ninline int\r\noperator == (const _D3DVECTOR& v1, const _D3DVECTOR& v2)\r\n{\r\n return v1.x==v2.x && v1.y==v2.y && v1.z == v2.z;\r\n}\r\n\r\ninline D3DVALUE\r\nMagnitude (const _D3DVECTOR& v)\r\n{\r\n return (D3DVALUE) sqrt(SquareMagnitude(v));\r\n}\r\n\r\ninline D3DVALUE\r\nSquareMagnitude (const _D3DVECTOR& v)\r\n{\r\n return v.x*v.x + v.y*v.y + v.z*v.z;\r\n}\r\n\r\ninline _D3DVECTOR\r\nNormalize (const _D3DVECTOR& v)\r\n{\r\n return v / Magnitude(v);\r\n}\r\n\r\ninline D3DVALUE\r\nMin (const _D3DVECTOR& v)\r\n{\r\n D3DVALUE ret = v.x;\r\n if (v.y < ret) ret = v.y;\r\n if (v.z < ret) ret = v.z;\r\n return ret;\r\n}\r\n\r\ninline D3DVALUE\r\nMax (const _D3DVECTOR& v)\r\n{\r\n D3DVALUE ret = v.x;\r\n if (ret < v.y) ret = v.y;\r\n if (ret < v.z) ret = v.z;\r\n return ret;\r\n}\r\n\r\ninline _D3DVECTOR\r\nMinimize (const _D3DVECTOR& v1, const _D3DVECTOR& v2)\r\n{\r\n return _D3DVECTOR( v1[0] < v2[0] ? v1[0] : v2[0],\r\n v1[1] < v2[1] ? v1[1] : v2[1],\r\n v1[2] < v2[2] ? v1[2] : v2[2]);\r\n}\r\n\r\ninline _D3DVECTOR\r\nMaximize (const _D3DVECTOR& v1, const _D3DVECTOR& v2)\r\n{\r\n return _D3DVECTOR( v1[0] > v2[0] ? v1[0] : v2[0],\r\n v1[1] > v2[1] ? v1[1] : v2[1],\r\n v1[2] > v2[2] ? v1[2] : v2[2]);\r\n}\r\n\r\ninline D3DVALUE\r\nDotProduct (const _D3DVECTOR& v1, const _D3DVECTOR& v2)\r\n{\r\n return v1.x*v2.x + v1.y * v2.y + v1.z*v2.z;\r\n}\r\n\r\ninline _D3DVECTOR\r\nCrossProduct (const _D3DVECTOR& v1, const _D3DVECTOR& v2)\r\n{\r\n\t_D3DVECTOR result;\r\n\r\n\tresult[0] = v1[1] * v2[2] - v1[2] * v2[1];\r\n\tresult[1] = v1[2] * v2[0] - v1[0] * v2[2];\r\n\tresult[2] = v1[0] * v2[1] - v1[1] * v2[0];\r\n\r\n\treturn result;\r\n}\r\n\r\ninline _D3DMATRIX\r\noperator* (const _D3DMATRIX& a, const _D3DMATRIX& b)\r\n{\r\n _D3DMATRIX ret;\r\n for (int i=0; i<4; i++) {\r\n for (int j=0; j<4; j++) {\r\n ret(i, j) = 0.0f;\r\n for (int k=0; k<4; k++) {\r\n ret(i, j) += a(i, k) * b(k, j);\r\n }\r\n }\r\n }\r\n return ret;\r\n}\r\n\r\n"} +{"text": "Given /^a motherbrain configuration does not exist$/ do\n FileUtils.rm_f(mb_config_path)\nend\n\nGiven /^a valid motherbrain configuration$/ do\n generate_valid_config(mb_config_path)\nend\n\nGiven /^an invalid motherbrain configuration$/ do\n generate_invalid_config(mb_config_path)\nend\n\nThen /^a motherbrain config file should exist and contain:$/ do |table|\n config = MB::Config.from_file(mb_config_path)\n table.raw.each do |key, value|\n config.get_attribute(key).should eql(value)\n end\nend\n"} +{"text": "<?php\n\n/*\n * Textpattern Content Management System\n * https://textpattern.com/\n *\n * Copyright (C) 2020 The Textpattern Development Team\n *\n * This file is part of Textpattern.\n *\n * Textpattern is free software; you can redistribute it and/or\n * modify it under the terms of the GNU General Public License\n * as published by the Free Software Foundation, version 2.\n *\n * Textpattern is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with Textpattern. If not, see <https://www.gnu.org/licenses/>.\n */\n\n/**\n * Textpattern Wrapper Class for Textpattern 4.0.x.\n *\n * Main goal for this class is to be used as a textpattern data wrapper by\n * any code which needs to have access to the textpattern articles data,\n * like XML-RPC, Atom, Moblogging or other external implementations.\n *\n * This class requires including some Textpattern files in order to work\n * properly. See RPC Server implementation to view an example of the required\n * files and predefined variables.\n *\n * @link https://web.archive.org/web/20141201035729/http://txp.kusor.com/wrapper\n * @author Pedro Palazón\n * @copyright 2005-2008 The Textpattern Development Team\n */\n\nif (!defined('txpath')) {\n die('txpath is undefined.');\n}\n\ninclude_once txpath.'/include/txp_auth.php';\n\nif (!defined('LEAVE_TEXT_UNTOUCHED')) {\n /**\n * @ignore\n */\n\n define('LEAVE_TEXT_UNTOUCHED', 0);\n}\n\nif (!defined('USE_TEXTILE')) {\n /**\n * @ignore\n */\n\n define('USE_TEXTILE', 1);\n}\n\nif (!defined('CONVERT_LINEBREAKS')) {\n /**\n * @ignore\n */\n\n define('CONVERT_LINEBREAKS', 2);\n}\n\n/**\n * Wrapper for Textpattern.\n *\n * @package Wrapper\n */\n\nclass TXP_Wrapper\n{\n /**\n * The current user.\n *\n * Remember to always use $this->txp_user when checking\n * for permissions with this class.\n *\n * @var string\n */\n\n public $txp_user = null;\n\n /**\n * Authenticated connection.\n *\n * @var bool\n */\n\n public $loggedin = false;\n\n /**\n * Predefined Textpattern variables to be populated.\n *\n * @var array\n */\n\n public $vars = array(\n 'ID',\n 'Title',\n 'Title_html',\n 'Body',\n 'Body_html',\n 'Excerpt',\n 'Excerpt_html',\n 'textile_excerpt',\n 'Image',\n 'textile_body',\n 'Keywords',\n 'Status',\n 'Posted',\n 'Section',\n 'Category1',\n 'Category2',\n 'Annotate',\n 'AnnotateInvite',\n 'AuthorID',\n 'Posted',\n 'override_form',\n 'url_title',\n 'custom_1',\n 'custom_2',\n 'custom_3',\n 'custom_4',\n 'custom_5',\n 'custom_6',\n 'custom_7',\n 'custom_8',\n 'custom_9',\n 'custom_10',\n );\n\n /**\n * Constructor.\n *\n * This is used to pass user credentials\n * to the wrapper.\n *\n * @param string $txp_user The user login name\n * @param string $txpass User password\n * @example\n * $wrapper = new TXP_wrapper('username', 'password');\n */\n\n public function __construct($txp_user, $txpass = null)\n {\n if ($this->_validate($txp_user, $txpass)) {\n $this->txp_user = $txp_user;\n $this->loggedin = true;\n }\n }\n\n /**\n * Deletes an article with the given ID.\n *\n * @param int $article_id The article\n * @return bool TRUE on success\n */\n\n public function deleteArticleID($article_id)\n {\n $article_id = assert_int($article_id);\n\n if ($this->loggedin && has_privs('article.delete', $this->txp_user)) {\n return safe_delete('textpattern', \"ID = $article_id\");\n } elseif ($this->loggedin && has_privs('article.delete.own', $this->txp_user)) {\n $r = safe_field(\"ID\", 'textpattern', \"ID = $article_id AND AuthorID = '\".doSlash($this->txp_user).\"'\");\n\n if ($r || has_privs('article.delete', $this->txp_user)) {\n return safe_delete('textpattern', \"ID = $article_id\");\n }\n }\n\n return false;\n }\n\n /**\n * Retrieves a list of articles matching the given criteria.\n *\n * This method forms an SQL query from the given arguments and returns an\n * array of resulting articles.\n *\n * This method requires authentication and at least 'article.edit.own'\n * privileges. If the user doesn't have 'article.edit' privileges,\n * only the user's own articles can be accessed.\n *\n * @param string $what The select clause\n * @param string $where The where clause\n * @param int $offset The offset\n * @param int $limit The limit\n * @param bool $slash If TRUE, escapes $where and $what\n * @return array|bool Array of articles, or FALSE on failure\n */\n\n public function getArticleList($what = '*', $where = '1', $offset = 0, $limit = 10, $slash = true)\n {\n if ($this->loggedin && has_privs('article.edit.own', $this->txp_user)) {\n $offset = assert_int($offset);\n $limit = assert_int($limit);\n\n if ($slash) {\n $where = doSlash($where);\n $what = doSlash($what);\n }\n\n if (has_privs('article.edit', $this->txp_user)) {\n $rs = safe_rows_start($what, 'textpattern', $where.\" ORDER BY Posted DESC LIMIT $offset, $limit\");\n } else {\n $rs = safe_rows_start($what, 'textpattern', $where.\" AND AuthorID = '\".doSlash($this->txp_user).\"' ORDER BY Posted DESC LIMIT $offset, $limit\");\n }\n\n $out = array();\n\n if ($rs) {\n while ($a = nextRow($rs)) {\n $out[] = $a;\n }\n }\n\n return $out;\n }\n\n return false;\n }\n\n /**\n * Retrieves an article matching the given criteria.\n *\n * This method forms an SQL query from the given arguments and returns an\n * article as an associative array.\n *\n * This method requires authentication and at least 'article.edit.own'\n * privileges. If the user doesn't have 'article.edit' privileges,\n * only the user's own articles can be accessed.\n *\n * @param string $what Select clause\n * @param string $where Where clause\n * @param bool $slash If TRUE, escapes $where and $what\n * @return array|bool An article, or FALSE on failure\n * @see TXP_Wrapper::getArticleList()\n * @example\n * $wrapper = new TXP_wrapper('username', 'password');\n * if ($r = $wrapper->getArticle())\n * {\n * echo \"Returned an article by the title '{$r['Title']}'.\";\n * }\n */\n\n public function getArticle($what = '*', $where = '1', $slash = true)\n {\n if ($this->loggedin && has_privs('article.edit.own', $this->txp_user)) {\n if ($slash) {\n $what = doSlash($what);\n $where = doSlash($where);\n }\n\n // Higher user groups should be able to edit any article.\n if (has_privs('article.edit', $this->txp_user)) {\n return safe_row($what, 'textpattern', $where);\n } else {\n // While restricted users should be able to edit their own\n // articles only.\n return safe_row($what, 'textpattern', $where.\" AND AuthorID = '\".doSlash($this->txp_user).\"'\");\n }\n }\n\n return false;\n }\n\n /**\n * Gets an article with the given ID.\n *\n * This method is an shortcut for TXP_Wrapper::getArticle().\n *\n * @param int $article_id The article\n * @param string $what The SQL select clause\n * @return array|bool The article, or FALSE on failure\n * @see TXP_Wrapper::getArticle()\n * @example\n * $wrapper = new TXP_wrapper('username', 'password');\n * if ($r = $wrapper->getArticleID(11))\n * {\n * echo \"Returned an article by the ID of '{$r['ID']}'.\";\n * }\n */\n\n public function getArticleID($article_id, $what = '*')\n {\n if ($this->loggedin && has_privs('article.edit.own', $this->txp_user)) {\n $article_id = assert_int($article_id);\n\n if (has_privs('article.edit', $this->txp_user)) {\n return safe_row(doSlash($what), 'textpattern', \"ID = $article_id\");\n } else {\n return safe_row(doSlash($what), 'textpattern', \"ID = $article_id AND AuthorID = '\".doSlash($this->txp_user).\"'\");\n }\n }\n\n return false;\n }\n\n /**\n * Updates an existing article.\n *\n * This method takes an array of article fields, and updates an article with\n * the given ID. Supplied values are sanitised and prepared internally.\n *\n * @param int $article_id The article\n * @param array $params The article fields to update\n * @return int|bool The article id, or FALSE on failure\n * @example\n * $wrapper = new TXP_wrapper('username', 'password');\n * if (($id = $wrapper->updateArticleID(11, array(\n * 'Title' => 'New title',\n * 'Body' => 'Body text.',\n * )) !== false)\n * {\n * echo \"Updated article '{$id}'.\";\n * }\n */\n\n public function updateArticleID($article_id, $params)\n {\n $article_id = assert_int($article_id);\n $r = safe_field(\"ID\", 'textpattern', \"AuthorID = '\".doSlash($this->txp_user).\"' AND ID = $article_id\");\n\n if ($this->loggedin && $r && has_privs('article.edit.own', $this->txp_user)) {\n // Unprivileged user, check if they can edit published articles.\n $r = assert_int($r);\n $oldstatus = safe_field(\"Status\", 'textpattern', \"ID = $r\");\n\n if (($oldstatus == 4 || $oldstatus == 5) && !has_privs('article.edit.published', $this->txp_user)) {\n return false;\n }\n\n // If they can, let's go.\n return $this->_setArticle($params, $article_id);\n } elseif ($this->loggedin && has_privs('article.edit', $this->txp_user)) {\n // Admin editing. Desires are behest.\n return $this->_setArticle($params, $article_id);\n }\n\n return false;\n }\n\n /**\n * Creates a new article.\n *\n * @param array $params The article fields\n * @return int|bool Article ID, or FALSE on failure\n * @example\n * $wrapper = new TXP_wrapper('username', 'password');\n * if (($id = $wrapper->newArticle(array(\n * 'Title' => 'My article',\n * 'Body' => 'My body text',\n * )) !== false)\n * {\n * echo \"Created a new article with the ID of '{$id}'.\";\n * }\n */\n\n public function newArticle($params)\n {\n if ($this->loggedin && has_privs('article', $this->txp_user)) {\n if (($params['Status'] == 4 || $params['Status'] == 5) && !has_privs('article.publish', $this->txp_user)) {\n $params['Status'] = 3;\n }\n\n return $this->_setArticle($params);\n }\n\n return false;\n }\n\n /**\n * Gets a list of sections as an associative array.\n *\n * This method requires authentication and 'article' privileges.\n *\n * @return array|bool FALSE on failure\n * @example\n * $wrapper = new TXP_wrapper('username', 'password');\n * if ($sections = $wrapper->getSectionsList())\n * {\n * foreach ($sections as $section)\n * {\n * echo $section['title'];\n * }\n * }\n */\n\n public function getSectionsList()\n {\n if ($this->loggedin && has_privs('article', $this->txp_user)) {\n return safe_rows(\"*\", 'txp_section', \"name != 'default'\");\n }\n\n return false;\n }\n\n /**\n * Gets a section as an associative array.\n *\n * This method requires authentication and 'article' privileges.\n *\n * @param string $name The section name\n * @return array|bool FALSE on failure\n * @example\n * $wrapper = new TXP_wrapper('username', 'password');\n * if ($section = $wrapper->getSection('my-section'))\n * {\n * echo $section['title'];\n * }\n */\n\n public function getSection($name)\n {\n if ($this->loggedin && has_privs('article', $this->txp_user)) {\n $name = doSlash($name);\n\n return safe_row(\"*\", 'txp_section', \"name = '$name'\");\n }\n\n return false;\n }\n\n /**\n * Gets a list of categories as an associative array.\n *\n * This method requires authentication and 'article' privileges.\n *\n * @return array|bool FALSE on failure\n * @example\n * $wrapper = new TXP_wrapper('username', 'password');\n * if ($categories = $wrapper->getCategoryList())\n * {\n * foreach ($categories as $category)\n * {\n * echo $category['title'];\n * }\n * }\n */\n\n public function getCategoryList()\n {\n if ($this->loggedin && has_privs('article', $this->txp_user)) {\n return safe_rows(\"*\", 'txp_category', \"name != 'root' AND type = 'article'\");\n }\n\n return false;\n }\n\n /**\n * Gets a category as an associative array.\n *\n * This method requires authentication and 'article' privileges.\n *\n * @param string $name The category name\n * @return array|bool FALSE on failure\n * @example\n * $wrapper = new TXP_wrapper('username', 'password');\n * if ($category = $wrapper->getCategory('my-category'))\n * {\n * echo $category['title'];\n * }\n */\n\n public function getCategory($name)\n {\n if ($this->loggedin && has_privs('article', $this->txp_user)) {\n $name = doSlash($name);\n\n return safe_row(\"*\", 'txp_category', \"name = '$name' AND type = 'article'\");\n }\n\n return false;\n }\n\n /**\n * Gets a category as an associative array by ID.\n *\n * This method is an alternative to TXP_wrapper::getCategory().\n *\n * This method requires authentication and 'article' privileges.\n *\n * @param string $id The category ID\n * @return array|bool FALSE on failure\n */\n\n public function getCategoryID($id)\n {\n if ($this->loggedin && has_privs('article', $this->txp_user)) {\n $id = assert_int($id);\n\n return safe_row(\"*\", 'txp_category', \"id = $id\");\n }\n\n return false;\n }\n\n /**\n * Gets a category as an associative array by title.\n *\n * This method is an alternative to TXP_wrapper::getCategory().\n *\n * This method requires authentication and 'article' privileges.\n *\n * @param string $title The category title\n * @return array|bool FALSE on failure\n */\n\n public function getCategoryTitle($title)\n {\n if ($this->loggedin && has_privs('article', $this->txp_user)) {\n $title = doSlash($title);\n\n return safe_row(\"*\", 'txp_category', \"title = '$title' AND type = 'article'\");\n }\n\n return false;\n }\n\n /**\n * Gets an array of information about the current user.\n *\n * This method requires authentication. Resulting array contains all columns\n * from 'txp_users' database table.\n *\n * @return array|bool FALSE on failure\n * @example\n * $wrapper = new TXP_wrapper('username', 'password');\n * if ($user = $wrapper->getUser())\n * {\n * echo $user['RealName'] . ' ' . $user['email'];\n * }\n */\n\n public function getUser()\n {\n if ($this->loggedin) {\n return safe_row(\"*\", 'txp_users', \"name = '\".$this->txp_user.\"'\");\n }\n\n return false;\n }\n\n /**\n * Retrieves a page template contents with the given name.\n *\n * This method requires authentication and 'page' privileges.\n *\n * @param string $name The template\n * @return string|bool The template, or FALSE on failure\n */\n\n public function getTemplate($name)\n {\n if ($this->loggedin && has_privs('page', $this->txp_user)) {\n $name = doSlash($name);\n\n return safe_field(\"user_html\", 'txp_page', \"name = '$name'\");\n }\n\n return false;\n }\n\n /**\n * Updates a page template with the given name.\n *\n * This method requires authentication and 'page' privileges.\n *\n * @param string $name The template name\n * @param string $html The template contents\n * @return bool TRUE on success\n * @example\n * $wrapper = new TXP_wrapper('username', 'password');\n * if ($wrapper->setTemplate('default', '&lt;txp:site_name /&gt;'))\n * {\n * echo \"Page template updated.\";\n * }\n */\n\n public function setTemplate($name, $html)\n {\n if ($this->loggedin && has_privs('page', $this->txp_user)) {\n $name = doSlash($name);\n $html = doSlash($html);\n\n return safe_update('txp_page', \"user_html = '$html'\", \"name = '$name'\");\n }\n\n return false;\n }\n\n /**\n * Intended for updating an article's non-content fields, like categories,\n * sections or keywords.\n *\n * This method requires authentication and 'article.edit' privileges.\n *\n * @param int $article_id The article\n * @param string $field The field to update\n * @param mixed $value The new value\n * @return bool TRUE on success\n * @see TXP_wrapper::updateArticleID()\n * @example\n * $wrapper = new TXP_wrapper('username', 'password');\n * if ($wrapper->updateArticleField(11, 'Section', 'new-section'))\n * {\n * echo \"Section updated.\";\n * }\n */\n\n public function updateArticleField($article_id, $field, $value)\n {\n $disallow = array(\n 'Body',\n 'Body_html',\n 'Title',\n 'Title_html',\n 'Excerpt',\n 'Excerpt_html',\n 'textile_excerpt',\n 'textile_body',\n 'LastMod',\n 'LastModID',\n 'feed_time',\n 'uid',\n );\n\n if ($this->loggedin && has_privs('article.edit', $this->txp_user) && !in_array(doSlash($field), $disallow)) {\n $field = doSlash($field);\n $value = doSlash($value);\n\n if ($field == 'Posted') {\n $value = strtotime($value) - tz_offset();\n $value = \"FROM_UNIXTIME($value)\";\n $sql = \"Posted = $value\";\n } elseif ($field == 'Status') {\n $value = assert_int($value);\n if (!has_privs('article.publish', $this->txp_user) && $value >= 4) {\n $value = 3;\n }\n $sql = \"Status = $value\";\n } else {\n $sql = \"$field = '$value'\";\n }\n\n $sql .= \", LastMod = NOW(), LastModID = '\".$this->txp_user.\"'\";\n $article_id = assert_int($article_id);\n $rs = safe_update('textpattern', $sql, \"ID = $article_id\");\n\n return $rs;\n }\n\n return false;\n }\n\n /**\n * Creates and updates articles.\n *\n * @param array $incoming The article fields\n * @param int $article_id The ID of the article to update\n * @return int|bool The article ID on success, or FALSE on failure\n * @access private\n * @see TXP_wrapper::udpateArticleId()\n * @see TXP_wrapper::newArticle()\n */\n\n public function _setArticle($incoming, $article_id = null)\n {\n global $txpcfg;\n\n $prefs = get_prefs();\n\n extract($prefs);\n\n if (!empty($incoming['Section']) && !$this->getSection($incoming['Section'])) {\n return false;\n }\n\n if (!empty($incoming['Category1']) && !$this->getCategory($incoming['Category1'])) {\n return false;\n }\n\n if (!empty($incoming['Category2']) && !$this->getCategory($incoming['Category2'])) {\n return false;\n }\n\n if ($article_id !== null) {\n $article_id = assert_int($article_id);\n }\n\n // All validation rules assumed to be passed before this point.\n // Do content processing here.\n\n $incoming_with_markup = $this->textile_main_fields($incoming, $use_textile);\n\n $incoming['Title'] = $incoming_with_markup['Title'];\n\n if (empty($incoming['Body_html']) && !empty($incoming['Body'])) {\n $incoming['Body_html'] = $incoming_with_markup['Body_html'];\n }\n\n if (empty($incoming['Excerpt_html']) && !empty($incoming['Excerpt'])) {\n $incoming['Excerpt_html'] = $incoming_with_markup['Excerpt_html'];\n }\n\n unset($incoming_with_markup);\n\n if (empty($incoming['Posted'])) {\n if ($article_id === null) {\n $when = (!$article_id) ? 'NOW()' : '';\n $incoming['Posted'] = $when;\n } else {\n // Do not override post time for existing articles unless Posted\n // is present.\n unset($incoming['Posted']);\n }\n } else {\n $when = strtotime($incoming['Posted']) - tz_offset();\n $when = \"FROM_UNIXTIME($when)\";\n }\n\n if ($incoming['Title'] || $incoming['Body'] || $incoming['Excerpt']) {\n // Build SQL then and run query.\n // Prevent data erase if not defined on the update action but it\n // was on the database from a previous creation/edition time.\n if ($article_id) {\n $old = safe_row(\"*\", 'textpattern', \"ID = $article_id\");\n\n if (!has_privs('article.publish', $this->txp_user) && $incoming['Status'] == 4 && $old['Status'] != 4) {\n $incoming['Status'] = 3;\n }\n\n foreach ($old as $key => $val) {\n if (!isset($incoming[$key])) {\n $incoming[$key] = $val;\n }\n }\n } else {\n if (!has_privs('article.publish', $this->txp_user) && $incoming['Status'] == 4) {\n $incoming['Status'] = 3;\n }\n }\n\n if (empty($incoming['Section']) && $article_id) {\n $incoming['Section'] = safe_field(\"Section\", 'textpattern', \"ID = $article_id\");\n }\n\n $incoming = $this->_check_keys($incoming, array(\n 'AuthorID' => $this->txp_user,\n 'Annotate' => $comments_on_default,\n 'AnnotateInvite' => $comments_default_invite,\n 'textile_body' => $use_textile,\n 'textile_excerpt' => $use_textile,\n 'url_title' => stripSpace($incoming['Title']),\n ));\n\n // Build the SQL query.\n $sql = array();\n\n foreach ($incoming as $key => $val) {\n if ($key == 'Posted' && $val == 'NOW()') {\n $sql[] = \"$key = $val\";\n } elseif ($key != 'ID' && $key != 'uid' && $key != 'feed_time' && $key != 'LastMod' && $key != 'LastModID') {\n $sql[] = \"$key = '\".doSlash($val).\"'\";\n }\n }\n\n $sql[] = \"LastMod = NOW()\";\n $sql[] = \"LastModID = '\".doSlash($this->txp_user).\"'\";\n\n if (!$article_id) {\n $sql[] = \"uid = '\".doSlash(md5(uniqid(rand(), true))).\"'\";\n }\n\n if (!$article_id) {\n if (empty($incoming['Posted'])) {\n $sql[] = \"feed_time = CURDATE()\";\n } else {\n $when = strtotime($incoming['Posted']) - tz_offset();\n $when = strftime(\"%Y-%m-%d\", $when);\n $sql[] = \"feed_time = '\".doSlash($when).\"'\";\n }\n }\n\n $sql = join(', ', $sql);\n\n $rs = ($article_id) ? safe_update('textpattern', $sql, \"ID = $article_id\") : safe_insert('textpattern', $sql);\n\n $oldstatus = ($article_id) ? $old['Status'] : '';\n\n if (!$article_id && $rs) {\n $article_id = $rs;\n }\n\n if (($incoming['Status'] >= 4 && !$article_id) || ($oldstatus != 4 && $article_id)) {\n safe_update('txp_prefs', \"val = NOW()\", \"name = 'lastmod'\");\n }\n\n return $article_id;\n }\n\n return false;\n }\n\n /**\n * Validates the given user credentials.\n *\n * @param string $user The username\n * @param string $password The password\n * @return bool TRUE on success\n * @access private\n */\n\n public function _validate($user, $password = null)\n {\n if ($password !== null) {\n $r = txp_validate($user, $password);\n } else {\n $r = true;\n }\n\n if ($r) {\n // Update the last access time.\n $safe_user = doSlash($user);\n safe_update('txp_users', \"last_access = NOW()\", \"name = '$safe_user'\");\n\n return true;\n }\n\n return false;\n }\n\n /**\n * Validates and filters the given article fields.\n *\n * Checks if the given parameters are appropriate for the article.\n *\n * @param array $incoming The incoming associative array\n * @param array $default An associative array containing default values for the desired keys\n * @return array Filtered data array\n * @access private\n */\n\n public function _check_keys($incoming, $default = array())\n {\n $out = array();\n\n // Strip off unsuited keys.\n foreach ($incoming as $key => $val) {\n if (in_array($key, $this->vars)) {\n $out[$key] = $val;\n }\n }\n\n foreach ($this->vars as $def_key) {\n // Add those ones nonexistent in the incoming array.\n if (!array_key_exists($def_key, $out)) {\n $out[$def_key] = '';\n }\n\n // Setup the provided default value, if any, only when the incoming\n // value is empty.\n if (array_key_exists($def_key, $default) && empty($out[$def_key])) {\n $out[$def_key] = $default[$def_key];\n }\n }\n\n return $out;\n }\n\n /**\n * Apply Textile to the main article fields.\n *\n * This is duplicated from txp_article.php.\n *\n * @param array $incoming The incoming fields\n * @param bool $use_textile Use Textile or not\n * @return array The $incoming array formatted\n * @access private\n */\n\n public function textile_main_fields($incoming, $use_textile = 1)\n {\n global $txpcfg;\n\n $textile = new \\Textpattern\\Textile\\Parser();\n\n if (!empty($event) and $event == 'article') {\n $incoming['Title_plain'] = $incoming['Title'];\n }\n\n if ($incoming['textile_body'] == USE_TEXTILE) {\n $incoming['Title'] = $textile->textileEncode($incoming['Title']);\n }\n\n $incoming['url_title'] = preg_replace('|[\\x00-\\x1f#%+/?\\x7f]|', '', $incoming['url_title']);\n $incoming['Body_html'] = TXP_Wrapper::format_field($incoming['Body'], $incoming['textile_body'], $textile);\n $incoming['Excerpt_html'] = TXP_Wrapper::format_field($incoming['Excerpt'], $incoming['textile_excerpt'], $textile);\n\n return $incoming;\n }\n\n /**\n * Formats a article field according to the given options.\n *\n * @param string $field The field contents\n * @param int $format Either LEAVE_TEXT_UNTOUCHED, CONVERT_LINEBREAKS, USE_TEXTILE\n * @param Textile An instance of Textile\n * @return string HTML formatted field\n * @access private\n */\n\n public function format_field($field, $format, $textile)\n {\n switch ($format) {\n case LEAVE_TEXT_UNTOUCHED:\n $html = trim($field);\n break;\n case CONVERT_LINEBREAKS:\n $html = nl2br(trim($field));\n break;\n case USE_TEXTILE:\n $html = $textile->parse($field);\n break;\n }\n\n return $html;\n }\n}\n"} +{"text": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing SPMeta2.Definitions;\nusing SPMeta2.Definitions.ContentTypes;\nusing SPMeta2.Extensions;\nusing SPMeta2.ModelHosts;\nusing SPMeta2.Models;\nusing SPMeta2.Exceptions;\n\nnamespace SPMeta2.Services.Impl.Validation\n{\n public class DefaultContentTypeLinkValidationService : PreDeploymentValidationServiceBase\n {\n public DefaultContentTypeLinkValidationService()\n {\n this.Title = \"Default Content Type link validator\";\n this.Description = \"Ensures that list scoped content type operations such as adding, removing, hiding and reordering are done via ContentTypeName only.\";\n }\n\n public override void DeployModel(ModelHostBase modelHost, ModelNode model)\n {\r\n // added support recently\r\n // .HideContentTypeLink() should work with content type ID #1021\r\n // .AddUniqueContentTypeOrder() should work with content type ID #1022\r\n // .RemoveContentTypeLink() should work with content type ID #1020\r\n\r\n return;\n\n //Exceptions.Clear();\n\n //var exceptionMessage = \"List node:[{0}] has [{1}] with ContentTypeId value:[{2}]. ContentTypeId does not work on the list scoped content type operations. Use ContentTypeName for list scoped content type operations.\";\n\n //var allNodes = model.Flatten();\n\n ////var addContentTypes = GetParenChildNodes<ListDefinition, ContentTypeLinkDefinition>(allNodes);\n //var hideContentTypes = GetParenChildNodes<ListDefinition, HideContentTypeLinksDefinition>(allNodes);\n //var removeContentTypes = GetParenChildNodes<ListDefinition, RemoveContentTypeLinksDefinition>(allNodes);\n //var uniqueContentTypes = GetParenChildNodes<ListDefinition, UniqueContentTypeOrderDefinition>(allNodes);\n\n ////ValidateChildNodes<ContentTypeLinkDefinition>(addContentTypes, (node, child) =>\n ////{\n //// var typedDef = child.Value as ContentTypeLinkDefinition;\n\n //// if (!string.IsNullOrEmpty(typedDef.ContentTypeId))\n //// {\n //// Exceptions.Add(new SPMeta2ModelValidationException(\n //// string.Format(exceptionMessage,\n //// new object[]{ \n //// node,\n //// typedDef.GetType(),\n //// typedDef.ContentTypeName\n //// })));\n //// }\n ////});\n\n //ValidateChildNodes<HideContentTypeLinksDefinition>(hideContentTypes, (node, child) =>\n //{\n // var typedDef = child.Value as HideContentTypeLinksDefinition;\n\n // foreach (var ctLink in typedDef.ContentTypes)\n // {\n // if (!string.IsNullOrEmpty(ctLink.ContentTypeId))\n // {\n // Exceptions.Add(new SPMeta2ModelValidationException(\n // string.Format(exceptionMessage,\n // new object[]{ \n // node,\n // typedDef.GetType(),\n // ctLink.ContentTypeId\n // })));\n // }\n // }\n //});\n\n //ValidateChildNodes<RemoveContentTypeLinksDefinition>(removeContentTypes, (node, child) =>\n //{\n // var typedDef = child.Value as RemoveContentTypeLinksDefinition;\n\n // foreach (var ctLink in typedDef.ContentTypes)\n // {\n // if (!string.IsNullOrEmpty(ctLink.ContentTypeId))\n // {\n // Exceptions.Add(new SPMeta2ModelValidationException(\n // string.Format(exceptionMessage,\n // new object[]{ \n // node,\n // typedDef.GetType(),\n // ctLink.ContentTypeId\n // })));\n // }\n // }\n //});\n\n //ValidateChildNodes<UniqueContentTypeOrderDefinition>(uniqueContentTypes, (node, child) =>\n //{\n // var typedDef = child.Value as UniqueContentTypeOrderDefinition;\n\n // foreach (var ctLink in typedDef.ContentTypes)\n // {\n // if (!string.IsNullOrEmpty(ctLink.ContentTypeId))\n // {\n // Exceptions.Add(new SPMeta2ModelValidationException(\n // string.Format(exceptionMessage,\n // new object[]{ \n // node,\n // typedDef.GetType(),\n // ctLink.ContentTypeId\n // })));\n // }\n // }\n //});\n\n //if (Exceptions.Count > 0)\n //{\n // throw new SPMeta2ModelDeploymentException(\"Errors while validating the model\",\n // new SPMeta2AggregateException(Exceptions.OfType<Exception>()));\n //}\n }\n\n protected virtual void ValidateChildNodes<TChildDefinition>(IEnumerable<ModelNode> nodes,\n Action<ModelNode, ModelNode> validator)\n where TChildDefinition : DefinitionBase\n {\n foreach (var node in nodes)\n {\n foreach (var childNode in node.GetChildModels<TChildDefinition>())\n {\n if (childNode.Value is TChildDefinition)\n validator(node, childNode);\n }\n }\n }\n }\n}\n"} +{"text": "/************************************************************************************\n * arch/arm/src/str71x/str71x_bspi.h\n *\n * Copyright (C) 2008-2009 Gregory Nutt. All rights reserved.\n * Author: Gregory Nutt <gnutt@nuttx.org>\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions\n * are met:\n *\n * 1. Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * 2. Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in\n * the documentation and/or other materials provided with the\n * distribution.\n * 3. Neither the name NuttX nor the names of its contributors may be\n * used to endorse or promote products derived from this software\n * without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n * \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS\n * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED\n * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\n * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n * POSSIBILITY OF SUCH DAMAGE.\n *\n ************************************************************************************/\n\n#ifndef __ARCH_ARM_SRC_STR71X_STR71X_BSPI_H\n#define __ARCH_ARM_SRC_STR71X_STR71X_BSPI_H\n\n/************************************************************************************\n * Included Files\n ************************************************************************************/\n\n#include <nuttx/config.h>\n\n#include \"str71x_map.h\"\n\n/************************************************************************************\n * Pre-processor Definitions\n ************************************************************************************/\n\n/* Register Offsets *****************************************************************/\n\n#define STR71X_BSPI_RXR_OFFSET (0x0000) /* 16-bits wide */\n#define STR71X_BSPI_TXR_OFFSET (0x0004) /* 16-bits wide */\n#define STR71X_BSPI_CSR1_OFFSET (0x0008) /* 16-bits wide */\n#define STR71X_BSPI_CSR2_OFFSET (0x000c) /* 16-bits wide */\n#define STR71X_BSPI_CLK_OFFSET (0x0010) /* 16-bits wide */\n\n/* Registers ************************************************************************/\n\n#define STR71X_BSPI_RXR(b) ((b) + STR71X_BSPI_RXR_OFFSET)\n#define STR71X_BSPI_TXR(b) ((b) + STR71X_BSPI_TXR_OFFSET)\n#define STR71X_BSPI_CSR1(b) ((b) + STR71X_BSPI_CSR1_OFFSET)\n#define STR71X_BSPI_CSR2(b) ((b) + STR71X_BSPI_CSR2_OFFSET)\n#define STR71X_BSPI_CLK(b) ((b) + STR71X_BSPI_CLK_OFFSET)\n\n#define STR71X_BSPI0_RXR (STR71X_BSPI0_BASE + STR71X_BSPI_RXR_OFFSET)\n#define STR71X_BSPI0_TXR (STR71X_BSPI0_BASE + STR71X_BSPI_TXR_OFFSET)\n#define STR71X_BSPI0_CSR1 (STR71X_BSPI0_BASE + STR71X_BSPI_CSR1_OFFSET)\n#define STR71X_BSPI0_CSR2 (STR71X_BSPI0_BASE + STR71X_BSPI_CSR2_OFFSET)\n#define STR71X_BSPI0_CLK (STR71X_BSPI0_BASE + STR71X_BSPI_CLK_OFFSET)\n\n#define STR71X_BSPI1_RXR (STR71X_BSPI1_BASE + STR71X_BSPI_RXR_OFFSET)\n#define STR71X_BSPI1_TXR (STR71X_BSPI1_BASE + STR71X_BSPI_TXR_OFFSET)\n#define STR71X_BSPI1_CSR1 (STR71X_BSPI1_BASE + STR71X_BSPI_CSR1_OFFSET)\n#define STR71X_BSPI1_CSR2 (STR71X_BSPI1_BASE + STR71X_BSPI_CSR2_OFFSET)\n#define STR71X_BSPI1_CLK (STR71X_BSPI1_BASE + STR71X_BSPI_CLK_OFFSET)\n\n/* Register bit settings ***********************************************************/\n\n/* BSPI control/status register 1 */\n\n#define STR71X_BSPICSR1_BSPE (1 << 0) /* Bit 0: BSPI enable */\n#define STR71X_BSPICSR1_MSTR (1 << 1) /* Bit 1: Master/Slave select */\n#define STR71X_BSPICSR1_RIESHIFT 2 /* Bit 2-3: BSPI receive interrupt enable */\n#define STR71X_BSPICSR1_RIEMASK (3 << STR71X_BSPICSR1_RIESHIFT)\n#define STR71X_BSPICSR1_RIEDISABLED (0 << STR71X_BSPICSR1_RIESHIFT) /* Disabled */\n#define STR71X_BSPICSR1_RIERFNE (1 << STR71X_BSPICSR1_RIESHIFT) /* Receive FIFO not empty */\n#define STR71X_BSPICSR1_RIERFF (3 << STR71X_BSPICSR1_RIESHIFT) /* Receive FIFO full */\n#define STR71X_BSPICSR1_REIE (1 << 4) /* Bit 4: Receive error interrupt enable */\n#define STR71X_BSPICSR1_BEIE (1 << 7) /* Bit 7: Bus error interrupt enable */\n#define STR71X_BSPICSR1_CPOL (1 << 8) /* Bit 8: Clock polarity select */\n#define STR71X_BSPICSR1_CPHA (1 << 9) /* Bit 9: Clock phase select */\n#define STR71X_BSPICSR1_WLSHIFT 10 /* Bits 10-11: Word length */\n#define STR71X_BSPICSR1_WLMASK (3 << STR71X_BSPICSR1_WLSHIFT)\n#define STR71X_BSPICSR1_WL8BIT (0 << STR71X_BSPICSR1_WLSHIFT) /* 8-bits */\n#define STR71X_BSPICSR1_WL16BIT (1 << STR71X_BSPICSR1_WLSHIFT) /* 16-bits */\n#define STR71X_BSPICSR1_RFESHIFT 12 /* Bits 12-15: Receive FIFO enable */\n#define STR71X_BSPICSR1_RFEMASK (15 << STR71X_BSPICSR1_RFESHIFT)\n#define STR71X_BSPICSR1_RFE1 (0 << STR71X_BSPICSR1_RFESHIFT) /* Word 1 enabled */\n#define STR71X_BSPICSR1_RFE12 (1 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-2 enabled */\n#define STR71X_BSPICSR1_RFE13 (2 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-3 enabled */\n#define STR71X_BSPICSR1_RFE14 (3 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-4 enabled */\n#define STR71X_BSPICSR1_RFE15 (4 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-5 enabled */\n#define STR71X_BSPICSR1_RFE16 (5 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-6 enabled */\n#define STR71X_BSPICSR1_RFE17 (6 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-7 enabled */\n#define STR71X_BSPICSR1_RFE18 (7 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-8 enabled */\n#define STR71X_BSPICSR1_RFE19 (8 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-9 enabled */\n#define STR71X_BSPICSR1_RFE110 (9 << STR71X_BSPICSR1_RFESHIFT) /* Word 1-10 enabled */\n\n/* BSPI control/status register 2 */\n\n#define STR71X_BSPICSR2_DFIFO (1 << 0) /* Bit 0: FIFO disable */\n#define STR71X_BSPICSR2_BERR (1 << 2) /* Bit 2: Bus error */\n#define STR71X_BSPICSR2_RFNE (1 << 3) /* Bit 3: Receiver FIFO not empty */\n#define STR71X_BSPICSR2_RFF (1 << 4) /* Bit 4: Receiver FIFO full */\n#define STR71X_BSPICSR2_ROFL (1 << 5) /* Bit 5: Receiver overflow */\n#define STR71X_BSPICSR2_TFE (1 << 6) /* Bit 6: Transmit FIFO empty */\n#define STR71X_BSPICSR2_TUFL (1 << 7) /* Bit 7: Transmit FIFO underflow */\n#define STR71X_BSPICSR2_TFF (1 << 8) /* Bit 8: Transmit FIFO full */\n#define STR71X_BSPICSR2_TFNE (1 << 9) /* Bit 9: Transmit FIFO not empty */\n#define STR71X_BSPICSR2_TFESHIFT 10 /* Bits 10-13: Transmit FIFO enable*/\n#define STR71X_BSPICSR2_TFEMASK (15 << STR71X_BSPICSR2_TFESHIFT)\n#define STR71X_BSPICSR2_TFE1 (0 << STR71X_BSPICSR2_TFESHIFT) /* Word 1 enabled */\n#define STR71X_BSPICSR2_TFE12 (1 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-2 enabled */\n#define STR71X_BSPICSR2_TFE13 (2 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-3 enabled */\n#define STR71X_BSPICSR2_TFE14 (3 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-4 enabled */\n#define STR71X_BSPICSR2_TFE15 (4 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-5 enabled */\n#define STR71X_BSPICSR2_TFE16 (5 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-6 enabled */\n#define STR71X_BSPICSR2_TFE17 (6 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-7 enabled */\n#define STR71X_BSPICSR2_TFE18 (7 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-8 enabled */\n#define STR71X_BSPICSR2_TFE19 (8 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-9 enabled */\n#define STR71X_BSPICSR2_TFE110 (9 << STR71X_BSPICSR2_TFESHIFT) /* Word 1-10 enabled */\n#define STR71X_BSPICSR2_TIESHIFT 14 /* Bit 14-15: BSPI transmit interrupt enable */\n#define STR71X_BSPICSR2_TIEMASK (3 << STR71X_BSPICSR2_TIESHIFT)\n#define STR71X_BSPICSR2_TIEDISABLED (0 << STR71X_BSPICSR2_TIESHIFT) /* Disabled */\n#define STR71X_BSPICSR2_TIETFE (1 << STR71X_BSPICSR2_TIESHIFT) /* Interrupt on transmit FIFO empty */\n#define STR71X_BSPICSR2_TIETUFL (2 << STR71X_BSPICSR2_TIESHIFT) /* Interrupt on transmit underflow */\n#define STR71X_BSPICSR2_TIETFF (3 << STR71X_BSPICSR2_TIESHIFT) /* Interrupt on transmit FIFO full */\n\n#endif /* __ARCH_ARM_SRC_STR71X_STR71X_BSPI_H */\n"} +{"text": "---\nhttp_interactions:\n- request:\n method: put\n uri: http://backend:5352/source/home:tom/_meta?user=tom\n body:\n encoding: UTF-8\n string: |\n <project name=\"home:tom\">\n <title/>\n <description/>\n <person userid=\"tom\" role=\"maintainer\"/>\n </project>\n headers:\n Accept-Encoding:\n - gzip;q=1.0,deflate;q=0.6,identity;q=0.3\n Accept:\n - \"*/*\"\n User-Agent:\n - Ruby\n response:\n status:\n code: 200\n message: OK\n headers:\n Content-Type:\n - text/xml\n Cache-Control:\n - no-cache\n Connection:\n - close\n Content-Length:\n - '128'\n body:\n encoding: UTF-8\n string: |\n <project name=\"home:tom\">\n <title></title>\n <description></description>\n <person userid=\"tom\" role=\"maintainer\"/>\n </project>\n http_version: null\n recorded_at: Fri, 29 May 2020 11:07:17 GMT\nrecorded_with: VCR 5.1.0\n"} +{"text": "Strophe.addConnectionPlugin('receipts', {\n _conn: null,\n _msgQueue: {},\n _retries: {},\n _resendCount: 10,\n _resendTime: 9000,\n\n init: function(conn) {\n this._conn = conn;\n Strophe.addNamespace('RECEIPTS', 'urn:xmpp:receipts');\n },\n\t\n\t\n statusChanged: function (status) {\n\t\tif (status === Strophe.Status.CONNECTED || status === Strophe.Status.ATTACHED) {\n\t\t\t// set up handlers for receipts\n\t\t\t//this._conn.addHandler(this._onRequestReceived.bind(this), Strophe.NS.RECEIPTS, \"message\");\n\t\t\tvar that = this;\n\t\t\tsetTimeout(function(){that.resendQueue();},5000);\n\t\t}\n\t},\n\t\n\t/*\n\t_onRequestReceived: function(msg){\n\t\tthis._processReceipt(msg);\n\t\treturn true;\n\t},\n\t* */\n\n /* sendMessage\n ** sends a message with a receipt and stores the message in the queue\n ** in case a receipt is never received\n **\n ** msg should be a builder\n */\n sendMessage: function(msg) {\n var id = this._conn.getUniqueId();\n \n msg.tree().setAttribute('id', id);\n\n var request = Strophe.xmlElement('request', {'xmlns': Strophe.NS.RECEIPTS});\n msg.tree().appendChild(request);\n\n this._msgQueue[id] = msg;\n this._retries[id] = 0;\n\n this._conn.send(msg);\n \n this.resendMessage(id);\n \n return id;\n \n },\n \n /*\n ** resend queued message \n */\n resendMessage: function(id){\n\t\tvar that = this;\n\t\tsetTimeout(function(){\n\t\t\tif (that._msgQueue[id]){\n\t\t\t\t// if we are disconnected, dont increment retries count and retry later\n\t\t\t\tif (!that._conn.connected) {\n\t\t\t\t\tthat.resendMessage(id);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthat._retries[id]++;\n\t\t\t\tif (that._retries[id] > that._resendCount) {\n\t\t\t\t\t//TODO: use mod_rest to force injection of the message\n\t\t\t\t\t//console.debug('message could not be delivered after ' + that._resendCount + ' attempts');\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// FIX: use our actual jid in case we disconnected and changed jid\t\t\t\t\t\t\t\t\n\t\t\t\tthat._msgQueue[id].tree().setAttribute('from', that._conn.jid);\n\t\t\t\t\n\t\t\t\tthat._conn.send(that._msgQueue[id]);\n\t\t\t\tthat.resendMessage(id);\n\t\t\t}\n\t\t},this._resendTime);\n\t},\n\t\n\t/* addMessageHandler\n ** add a message handler that handles XEP-0184 message receipts\n */\n addReceiptHandler: function(handler, type, from, options) {\n var that = this;\n\n var proxyHandler = function(msg) {\n that._processReceipt(msg);\n \n // call original handler\n return handler(msg);\n };\n\n this._conn.addHandler(proxyHandler, Strophe.NS.RECEIPTS, 'message',\n type, null, from, options);\n },\n \n /*\n\t * process a XEP-0184 message receipts\n\t * send recept on request\n\t * remove msg from queue on received \n\t*/\n\t_processReceipt: function(msg){\n\t\tvar id = msg.getAttribute('id'),\n\t\t\tfrom = msg.getAttribute('from'),\n\t\t\treq = msg.getElementsByTagName('request'),\n\t\t\trec = msg.getElementsByTagName('received');\n\t\t\t\n\t\t\t// check for request in message\n if (req.length > 0) {\n\t\t\t\t// send receipt\n\t\t\t\tvar out = $msg({to: from, from: this._conn.jid, id: this._conn.getUniqueId()}),\n\t\t\t\t\trequest = Strophe.xmlElement('received', {'xmlns': Strophe.NS.RECEIPTS, 'id': id});\n\t\t\t\tout.tree().appendChild(request);\n\t\t\t\tthis._conn.send(out);\n\t\t\t}\n\t\t\t// check for received\n if (rec.length > 0) {\n var recv_id = rec[0].getAttribute('id');\n\t\t\t\tif (recv_id) { // delete msg from queue\n\t\t\t\t\tdelete this._msgQueue[recv_id];\n\t\t\t\t\tdelete this._retries[recv_id];\n\t\t\t\t}\n }\t\t\t\n\t},\n\t\n\tresendQueue: function(){\n\t\tif (!this._conn.connected) {\n\t\t\tvar that = this;\n\t\t\tsetTimeout(function(){that.resendQueue();},5000);\n\t\t\treturn;\n\t\t}\n\t\tfor (var id in this._msgQueue) {\n\t\t\tif (this._msgQueue.hasOwnProperty(id)) {\n\t\t\t this._conn.send(this._msgQueue[id]);\n\t\t\t}\n\t\t}\t\n\t},\n\n getUnreceivedMsgs: function() {\n var msgs = [];\n for (var id in this._msgQueue) {\n if (this._msgQueue.hasOwnProperty(id)) {\n msgs.push(this._msgQueue[id]);\n }\n }\n return msgs;\n },\n\n clearMessages: function() {\n this._msgQueue = {};\n }\n});"} +{"text": "/*[INCLUDE-IF Sidecar18-SE]*/\n/*******************************************************************************\n * Copyright (c) 1991, 2017 IBM Corp. and others\n *\n * This program and the accompanying materials are made available under\n * the terms of the Eclipse Public License 2.0 which accompanies this\n * distribution and is available at https://www.eclipse.org/legal/epl-2.0/\n * or the Apache License, Version 2.0 which accompanies this distribution and\n * is available at https://www.apache.org/licenses/LICENSE-2.0.\n *\n * This Source Code may also be made available under the following\n * Secondary Licenses when the conditions for such availability set\n * forth in the Eclipse Public License, v. 2.0 are satisfied: GNU\n * General Public License, version 2 with the GNU Classpath\n * Exception [1] and GNU General Public License, version 2 with the\n * OpenJDK Assembly Exception [2].\n *\n * [1] https://www.gnu.org/software/classpath/license.html\n * [2] http://openjdk.java.net/legal/assembly-exception.html\n *\n * SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception\n *******************************************************************************/\npackage com.ibm.dtfj.corereaders.j9;\n\nimport com.ibm.dtfj.corereaders.MemoryAccessException;\n\n/**\n * Represents the basic J9RAS structure found in all Java versions\n \tU_8 eyecatcher[8];\n\tU_32 bitpattern1;\n\tU_32 bitpattern2;\n\tI_32 version;\n\tI_32 length;\n * \n * @author Adam Pilkington\n *\n */\npublic class J9RAS implements J9RASFragment {\n\tpublic static final String J9RAS_EYECATCHER = \"J9VMRAS\\0\";\n\tpublic static final byte[] J9RAS_EYECATCHER_BYTES = J9RAS_EYECATCHER.getBytes();\n\tpublic static final long INTEGRITY_CHECK = 0xaa55aa55aa55aa55L;\n\tprivate long address = 0xDEADBEEFBAADF00DL;\n\tprivate long integrity = 0;\t\t//this is the combined bitpattern1 and bitpattern2 fields\n\tprivate int version = -1;\t\t//version of J9RAS structure\n\tprivate int length = -1;\t\t//length of the J9RAS structure\n\tprivate boolean valid = false;\t//flag to indicate if this structure is valid or not\n\tprivate J9RASFragment fragment = null;\t//the underlying fragment which is specific to the version of the VM in the core file\n\tprivate Memory memory = null;\t//reference to the enclosing address space - used for equality tests\n\t\n\tpublic J9RAS (Memory memory, long address) throws MemoryAccessException {\n\t\tthis.address = address;\n\t\tintegrity = memory.getLongAt(address + 8);\t//read the integrity bytes\n\t\tvalid = (integrity == INTEGRITY_CHECK);\t\t//check to see if this is actually a J9RAS structure\n\t\tif(valid) {\t\t\t\t\t\t\t\t\t//this is a valid J9RAS structure\n\t\t\tprocessStructure(memory);\t\t\t\t//decide which version of the structure is present\n\t\t\tthis.memory = memory;\n\t\t}\n\t}\n\t\n\t/**\n\t * Processes the core J9RAS information (length and version) to determine which \n\t * underlying J9RAS fragment to create.\n\t * \n\t * 32 bit\n\t * \tJava 5 < SR10 : length < 0x120, version = 0x10000\t\tNo TID, PID or DDR\n\t * \tJava 5 = SR10 : length = 0x120, version = 0x10000\t\tTID + PID, No DDR\n\t * \tJava 5 = SR12 : length = 0x128, version >= 0x20000\t\tTID+PID+DDR (there is a 4 byte padding field present as well as the DDR pointer)\n\t * \n\t * \tJava 6 < SR5 : length < 0x240, version = 0x10000\t\tNo TID, PID or DDR\n\t * Java 6 >=SR6 : length = 0x240, version = 0x10000\t\tPID+TID, No DDR\n\t * Java 6 >=SR9 : length = 0x248, version >= 0x20000\t\tPID+TID+DDR\n\t * Java 6 >=SR10 : length = 0x328, version >= 0x30000\t\tPID+TID+DDR, long hostname\n\t * Java 7 = GA : length = 0x328, version >= 0x30000\t\tPID+TID+DDR, long hostname\n\t * \n\t * 64 bit\n\t * \tJava 5 < SR10 : length < 0x158, version = 0x10000\t\tNo TID, PID or DDR\n\t * \tJava 5 = SR10 : length = 0x158, version = 0x10000\t\tTID + PID, No DDR\n\t * \tJava 5 = SR11 : length = 0x160, version >= 0x20000\t\tTID+PID+DDR\n\t * \n\t * Java 6 = GA : length < 0x278, version = 0x10000\t\tNo TID, PID or DDR\n\t * Java 6 >=SR6 : length = 0x278, version = 0x10000\t\tPID+TID, No DDR\n\t * Java 6 >=SR9 : length = 0x280, version >= 0x20000\t\tPID+TID+DDR\n\t * Java 6 >=SR10 : length = 0x360, version >= 0x30000\t\tPID+TID+DDR + long hostname\n\t * Java 7 = GA : length = 0x360, version >= 0x30000\t\tPID+TID+DDR + long hostname\n\t * \n\t * @param memory\n\t * @throws MemoryAccessException\n\t */\n\tprivate void processStructure(Memory memory) throws MemoryAccessException {\n\t\tversion = memory.getIntAt(address + 16);\t//get the J9RAS version\n\t\tlength = memory.getIntAt(address + 20);\t\t//get the length of the J9RAS structure\n\t\tif(memory.bytesPerPointer() == 4) {\t\t\t//32 bit VM\t(know this from the core file)\n\t\t\tprocess32bitStructure(memory);\n\t\t} else {\t\t\t\t\t\t\t\t\t//64 bit VM (know this from the core file)\n\t\t\tprocess64bitStructure(memory);\n\t\t}\n\t}\n\n\t/**\n\t * Determine the J9RAS fragment to use based on length of the J9RAS structure\n\t * @param memory memory to use\n\t * @throws MemoryAccessException re-thrown from the memory\n\t */\n\tprivate void process64bitStructure(Memory memory) throws MemoryAccessException {\n\t\t\n\t\tif(length < 0x260) {\t\t\t\t\t\t//Java 5\n\t\t\tif(version >= 0x20000) {\n\t\t\t\t//TID+PID+DDR\n\t\t\t\tfragment = new J9RASFragmentJ5v2(memory, address, true);\n\t\t\t} else {\n\t\t\t\tif(length == 0x158) {\t\t\t\t//supported, no DDR\n\t\t\t\t\tfragment = new J9RASFragmentJ5SR10(memory, address, true);\n\t\t\t\t} else {\t\t\t\t\t\t\t//not supported\n\t\t\t\t\tfragment = new J9RASFragmentJ5GA();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\t\t\t\t\t\t\t\t\t//Java 6 or later\n\t\t\tif (version >= 0x30000) {\n\t\t\t\t//TID+PID+DDR + long hostname\n\t\t\t\tfragment = new J9RASFragmentJ6v3(memory, address, true);\n\t\t\t} else if (version >= 0x20000) {\n\t\t\t\t//TID+PID+DDR\n\t\t\t\tfragment = new J9RASFragmentJ6v2(memory, address, true);\n\t\t\t} else {\n\t\t\t\tif(length == 0x278) {\t\t\t\t//supported, no DDR\n\t\t\t\t\tfragment = new J9RASFragmentJ6SR6(memory, address, true);\n\t\t\t\t} else {\t\t\t\t\t\t\t//not supported\n\t\t\t\t\tfragment = new J9RASFragmentJ6GA();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t/**\n\t * Determine the J9RAS fragment to use based on length of the J9RAS structure\n\t * @param memory memory to use\n\t * @throws MemoryAccessException re-thrown from the memory\n\t */\n\tprivate void process32bitStructure(Memory memory) throws MemoryAccessException {\n\t\tif(length < 0x238) {\t\t\t\t\t\t//Java 5\n\t\t\tif(version >= 0x20000) {\n\t\t\t\t//TID+PID+DDR\n\t\t\t\tfragment = new J9RASFragmentJ5v2(memory, address, false);\n\t\t\t} else {\n\t\t\t\tif(length == 0x120) {\t\t\t\t//supported, no DDR\n\t\t\t\t\t\tfragment = new J9RASFragmentJ5SR10(memory, address, false);\n\t\t\t\t} else {\t\t\t\t\t\t\t//not supported\n\t\t\t\t\tfragment = new J9RASFragmentJ5GA();\t\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\t\t\t\t\t\t\t\t\t//Java 6 or later\n\t\t\tif (version >= 0x30000) {\n\t\t\t\t//TID+PID+DDR + long hostname\n\t\t\t\tfragment = new J9RASFragmentJ6v3(memory, address, false);\n\t\t\t} else if (version >= 0x20000) {\n\t\t\t\t//TID+PID+DDR\n\t\t\t\tfragment = new J9RASFragmentJ6v2(memory, address, false);\n\t\t\t} else {\n\t\t\t\tif(length == 0x240) {\t\t\t\t//supported, no DDR\n\t\t\t\t\tfragment = new J9RASFragmentJ6SR6(memory, address, false);\n\t\t\t\t} else {\t\t\t\t\t\t\t//not supported\n\t\t\t\t\tfragment = new J9RASFragmentJ6GA();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t\n\t/**\n\t * Flag to indicate if this represents a valid J9RAS structure\n\t * @return true if this is a valid structure\n\t */\n\tpublic boolean isValid() {\n\t\treturn valid;\n\t}\n\t\n\t/**\n\t * Get the version of the J9RAS structure\n\t * @return version\n\t */\n\tpublic int getVersion() {\n\t\treturn version;\n\t}\n\n\t/**\n\t * Get the length of the J9RAS structure\n\t * @return length\n\t */\n\tpublic int getLength() {\n\t\treturn length;\n\t}\n\n\t/**\n\t * The address of this structure within the address space\n\t * @return address\n\t */\n\tpublic long getAddress() {\n\t\treturn address;\n\t}\n\t\n\t/* (non-Javadoc)\n\t * @see java.lang.Object#equals(java.lang.Object)\n\t * J9RAS structures are considered equal if they have the same address within the same address space\n\t */\n\tpublic boolean equals(Object obj) {\n\t\tif(obj instanceof J9RAS) {\n\t\t\tJ9RAS ras = (J9RAS) obj;\n\t\t\treturn (ras.address == address) && (ras.memory.equals(memory));\n\t\t}\n\t\treturn false;\n\t}\n\n\t/* (non-Javadoc)\n\t * @see java.lang.Object#hashCode()\n\t */\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}\n\n\t/* (non-Javadoc)\n\t * @see java.lang.Object#toString()\n\t */\n\tpublic String toString() {\n\t\treturn \"J9RAS @0x\" + Long.toHexString(address) + \" length \" + length + \" version \" + version;\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.ibm.dtfj.corereaders.j9.J9RASFragment#currentThreadSupported()\n\t */\n\tpublic boolean currentThreadSupported() {\n\t\tif(fragment == null) {\n\t\t\treturn false;\n\t\t}\n\t\treturn fragment.currentThreadSupported();\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.ibm.dtfj.corereaders.j9.J9RASFragment#getPID()\n\t */\n\tpublic long getPID() {\n\t\tif(valid && (fragment != null)) {\n\t\t\treturn fragment.getPID();\n\t\t}\n\t\tthrow new UnsupportedOperationException(\"Get PID() is not supported as this is not a valid J9RAS structure\");\n\t}\n\n\t/* (non-Javadoc)\n\t * @see com.ibm.dtfj.corereaders.j9.J9RASFragment#getTID()\n\t */\n\tpublic long getTID() {\n\t\tif(valid && (fragment != null)) {\n\t\t\treturn fragment.getTID();\n\t\t}\n\t\tthrow new UnsupportedOperationException(\"Get TID() is not supported as this is not a valid J9RAS structure\");\n\t}\n\t\n\t\n}\n"} +{"text": "/**\n * Copyright (c) 2000-present Liferay, Inc. All rights reserved.\n *\n * This library is free software; you can redistribute it and/or modify it under\n * the terms of the GNU Lesser General Public License as published by the Free\n * Software Foundation; either version 2.1 of the License, or (at your option)\n * any later version.\n *\n * This library is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS\n * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more\n * details.\n */\n\npackage com.liferay.ide.project.ui.modules;\n\nimport com.liferay.ide.core.util.CoreUtil;\nimport com.liferay.ide.core.util.ListUtil;\nimport com.liferay.ide.project.core.model.ProjectName;\nimport com.liferay.ide.project.core.modules.NewLiferayModuleProjectOp;\nimport com.liferay.ide.project.ui.BaseProjectWizard;\nimport com.liferay.ide.project.ui.ProjectUI;\nimport com.liferay.ide.project.ui.RequireLiferayWorkspaceProject;\n\nimport java.util.ArrayList;\nimport java.util.List;\n\nimport org.eclipse.core.resources.IProject;\nimport org.eclipse.jface.viewers.IStructuredSelection;\nimport org.eclipse.sapphire.ElementList;\nimport org.eclipse.sapphire.ui.def.DefinitionLoader;\nimport org.eclipse.ui.IWorkbench;\n\n/**\n * @author Simon Jiang\n * @author Seiphon Wang\n */\npublic class NewLiferayModuleProjectWizard\n\textends BaseProjectWizard<NewLiferayModuleProjectOp> implements RequireLiferayWorkspaceProject {\n\n\tpublic NewLiferayModuleProjectWizard() {\n\t\tsuper(_createDefaultOp(), DefinitionLoader.sdef(NewLiferayModuleProjectWizard.class).wizard());\n\t}\n\n\t@Override\n\tpublic void init(IWorkbench workbench, IStructuredSelection selection) {\n\t\tsuper.init(workbench, selection);\n\n\t\tpromptIfLiferayWorkspaceNotExists(\"Liferay Module Project\");\n\t}\n\n\t@Override\n\tprotected void performPostFinish() {\n\t\tsuper.performPostFinish();\n\n\t\tfinal List<IProject> projects = new ArrayList<>();\n\n\t\tfinal NewLiferayModuleProjectOp op = element().nearest(NewLiferayModuleProjectOp.class);\n\n\t\tElementList<ProjectName> projectNames = op.getProjectNames();\n\n\t\tfor (ProjectName projectName : projectNames) {\n\t\t\tfinal IProject newProject = CoreUtil.getProject(get(projectName.getName()));\n\n\t\t\tif (newProject != null) {\n\t\t\t\tprojects.add(newProject);\n\t\t\t}\n\t\t}\n\n\t\tfor (final IProject project : projects) {\n\t\t\ttry {\n\t\t\t\taddToWorkingSets(project);\n\t\t\t}\n\t\t\tcatch (Exception ex) {\n\t\t\t\tProjectUI.logError(\"Unable to add project to working set\", ex);\n\t\t\t}\n\t\t}\n\n\t\tif (ListUtil.isNotEmpty(projects)) {\n\t\t\tIProject finalProject = projects.get(0);\n\n\t\t\topenLiferayPerspective(finalProject);\n\t\t}\n\t}\n\n\tprivate static NewLiferayModuleProjectOp _createDefaultOp() {\n\t\treturn NewLiferayModuleProjectOp.TYPE.instantiate();\n\t}\n\n}"} +{"text": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage java.util;\n\nimport java.io.IOException;\nimport java.io.ObjectInputStream;\nimport java.io.ObjectOutputStream;\nimport java.io.Serializable;\nimport java.text.DateFormat;\nimport java.text.DateFormatSymbols;\nimport java.text.SimpleDateFormat;\nimport libcore.icu.LocaleData;\n\n/**\n * A specific moment in time, with millisecond precision. Values typically come\n * from {@link System#currentTimeMillis}, and are always UTC, regardless of the\n * system's time zone. This is often called \"Unix time\" or \"epoch time\".\n *\n * <p>Instances of this class are suitable for comparison, but little else.\n * Use {@link java.text.DateFormat} to format a {@code Date} for display to a human.\n * Use {@link Calendar} to break down a {@code Date} if you need to extract fields such\n * as the current month or day of week, or to construct a {@code Date} from a broken-down\n * time. That is: this class' deprecated display-related functionality is now provided\n * by {@code DateFormat}, and this class' deprecated computational functionality is\n * now provided by {@code Calendar}. Both of these other classes (and their subclasses)\n * allow you to interpret a {@code Date} in a given time zone.\n *\n * <p>Note that, surprisingly, instances of this class are mutable.\n */\npublic class Date implements Serializable, Cloneable, Comparable<Date> {\n\n private static final long serialVersionUID = 7523967970034938905L;\n\n // Used by parse()\n private static final int CREATION_YEAR = new Date().getYear();\n\n private transient long milliseconds;\n\n /**\n * Initializes this {@code Date} instance to the current time.\n */\n public Date() {\n this(System.currentTimeMillis());\n }\n\n /**\n * Constructs a new {@code Date} initialized to midnight in the default {@code TimeZone} on\n * the specified date.\n *\n * @param year\n * the year, 0 is 1900.\n * @param month\n * the month, 0 - 11.\n * @param day\n * the day of the month, 1 - 31.\n *\n * @deprecated Use {@link GregorianCalendar#GregorianCalendar(int, int, int)} instead.\n */\n @Deprecated\n public Date(int year, int month, int day) {\n GregorianCalendar cal = new GregorianCalendar(false);\n cal.set(1900 + year, month, day);\n milliseconds = cal.getTimeInMillis();\n }\n\n /**\n * Constructs a new {@code Date} initialized to the specified date and time in the\n * default {@code TimeZone}.\n *\n * @param year\n * the year, 0 is 1900.\n * @param month\n * the month, 0 - 11.\n * @param day\n * the day of the month, 1 - 31.\n * @param hour\n * the hour of day, 0 - 23.\n * @param minute\n * the minute of the hour, 0 - 59.\n *\n * @deprecated Use {@link GregorianCalendar#GregorianCalendar(int, int, int, int, int)} instead.\n */\n @Deprecated\n public Date(int year, int month, int day, int hour, int minute) {\n GregorianCalendar cal = new GregorianCalendar(false);\n cal.set(1900 + year, month, day, hour, minute);\n milliseconds = cal.getTimeInMillis();\n }\n\n /**\n * Constructs a new {@code Date} initialized to the specified date and time in the\n * default {@code TimeZone}.\n *\n * @param year\n * the year, 0 is 1900.\n * @param month\n * the month, 0 - 11.\n * @param day\n * the day of the month, 1 - 31.\n * @param hour\n * the hour of day, 0 - 23.\n * @param minute\n * the minute of the hour, 0 - 59.\n * @param second\n * the second of the minute, 0 - 59.\n *\n * @deprecated Use {@link GregorianCalendar#GregorianCalendar(int, int, int, int, int, int)}\n * instead.\n */\n @Deprecated\n public Date(int year, int month, int day, int hour, int minute, int second) {\n GregorianCalendar cal = new GregorianCalendar(false);\n cal.set(1900 + year, month, day, hour, minute, second);\n milliseconds = cal.getTimeInMillis();\n }\n\n /**\n * Initializes this {@code Date} instance using the specified millisecond value. The\n * value is the number of milliseconds since Jan. 1, 1970 GMT.\n *\n * @param milliseconds\n * the number of milliseconds since Jan. 1, 1970 GMT.\n */\n public Date(long milliseconds) {\n this.milliseconds = milliseconds;\n }\n\n /**\n * Constructs a new {@code Date} initialized to the date and time parsed from the\n * specified String.\n *\n * @param string\n * the String to parse.\n *\n * @deprecated Use {@link DateFormat} instead.\n */\n @Deprecated\n public Date(String string) {\n milliseconds = parse(string);\n }\n\n /**\n * Returns if this {@code Date} is after the specified Date.\n *\n * @param date\n * a Date instance to compare.\n * @return {@code true} if this {@code Date} is after the specified {@code Date},\n * {@code false} otherwise.\n */\n public boolean after(Date date) {\n return milliseconds > date.milliseconds;\n }\n\n /**\n * Returns if this {@code Date} is before the specified Date.\n *\n * @param date\n * a {@code Date} instance to compare.\n * @return {@code true} if this {@code Date} is before the specified {@code Date},\n * {@code false} otherwise.\n */\n public boolean before(Date date) {\n return milliseconds < date.milliseconds;\n }\n\n /**\n * Returns a new {@code Date} with the same millisecond value as this {@code Date}.\n *\n * @return a shallow copy of this {@code Date}.\n *\n * @see java.lang.Cloneable\n */\n @Override\n public Object clone() {\n try {\n return super.clone();\n } catch (CloneNotSupportedException e) {\n throw new AssertionError(e);\n }\n }\n\n /**\n * Compare the receiver to the specified {@code Date} to determine the relative\n * ordering.\n *\n * @param date\n * a {@code Date} to compare against.\n * @return an {@code int < 0} if this {@code Date} is less than the specified {@code Date}, {@code 0} if\n * they are equal, and an {@code int > 0} if this {@code Date} is greater.\n */\n public int compareTo(Date date) {\n if (milliseconds < date.milliseconds) {\n return -1;\n }\n if (milliseconds == date.milliseconds) {\n return 0;\n }\n return 1;\n }\n\n /**\n * Compares the specified object to this {@code Date} and returns if they are equal.\n * To be equal, the object must be an instance of {@code Date} and have the same millisecond\n * value.\n *\n * @param object\n * the object to compare with this object.\n * @return {@code true} if the specified object is equal to this {@code Date}, {@code false}\n * otherwise.\n *\n * @see #hashCode\n */\n @Override\n public boolean equals(Object object) {\n return (object == this) || (object instanceof Date)\n && (milliseconds == ((Date) object).milliseconds);\n }\n\n /**\n * Returns the gregorian calendar day of the month for this {@code Date} object.\n *\n * @return the day of the month.\n *\n * @deprecated Use {@code Calendar.get(Calendar.DATE)} instead.\n */\n @Deprecated\n public int getDate() {\n return new GregorianCalendar(milliseconds).get(Calendar.DATE);\n }\n\n /**\n * Returns the gregorian calendar day of the week for this {@code Date} object.\n *\n * @return the day of the week.\n *\n * @deprecated Use {@code Calendar.get(Calendar.DAY_OF_WEEK)} instead.\n */\n @Deprecated\n public int getDay() {\n return new GregorianCalendar(milliseconds).get(Calendar.DAY_OF_WEEK) - 1;\n }\n\n /**\n * Returns the gregorian calendar hour of the day for this {@code Date} object.\n *\n * @return the hour of the day.\n *\n * @deprecated Use {@code Calendar.get(Calendar.HOUR_OF_DAY)} instead.\n */\n @Deprecated\n public int getHours() {\n return new GregorianCalendar(milliseconds).get(Calendar.HOUR_OF_DAY);\n }\n\n /**\n * Returns the gregorian calendar minute of the hour for this {@code Date} object.\n *\n * @return the minutes.\n *\n * @deprecated Use {@code Calendar.get(Calendar.MINUTE)} instead.\n */\n @Deprecated\n public int getMinutes() {\n return new GregorianCalendar(milliseconds).get(Calendar.MINUTE);\n }\n\n /**\n * Returns the gregorian calendar month for this {@code Date} object.\n *\n * @return the month.\n *\n * @deprecated Use {@code Calendar.get(Calendar.MONTH)} instead.\n */\n @Deprecated\n public int getMonth() {\n return new GregorianCalendar(milliseconds).get(Calendar.MONTH);\n }\n\n /**\n * Returns the gregorian calendar second of the minute for this {@code Date} object.\n *\n * @return the seconds.\n *\n * @deprecated Use {@code Calendar.get(Calendar.SECOND)} instead.\n */\n @Deprecated\n public int getSeconds() {\n return new GregorianCalendar(milliseconds).get(Calendar.SECOND);\n }\n\n /**\n * Returns this {@code Date} as a millisecond value. The value is the number of\n * milliseconds since Jan. 1, 1970, midnight GMT.\n *\n * @return the number of milliseconds since Jan. 1, 1970, midnight GMT.\n */\n public long getTime() {\n return milliseconds;\n }\n\n /**\n * Returns the timezone offset in minutes of the default {@code TimeZone}.\n *\n * @return the timezone offset in minutes of the default {@code TimeZone}.\n *\n * @deprecated Use {@code (Calendar.get(Calendar.ZONE_OFFSET) + Calendar.get(Calendar.DST_OFFSET)) / 60000} instead.\n */\n @Deprecated\n public int getTimezoneOffset() {\n GregorianCalendar cal = new GregorianCalendar(milliseconds);\n return -(cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET)) / 60000;\n }\n\n /**\n * Returns the gregorian calendar year since 1900 for this {@code Date} object.\n *\n * @return the year - 1900.\n *\n * @deprecated Use {@code Calendar.get(Calendar.YEAR) - 1900} instead.\n */\n @Deprecated\n public int getYear() {\n return new GregorianCalendar(milliseconds).get(Calendar.YEAR) - 1900;\n }\n\n /**\n * Returns an integer hash code for the receiver. Objects which are equal\n * return the same value for this method.\n *\n * @return this {@code Date}'s hash.\n *\n * @see #equals\n */\n @Override\n public int hashCode() {\n return (int) (milliseconds >>> 32) ^ (int) milliseconds;\n }\n\n private static int parse(String string, String[] array) {\n for (int i = 0, alength = array.length, slength = string.length(); i < alength; i++) {\n if (string.regionMatches(true, 0, array[i], 0, slength)) {\n return i;\n }\n }\n return -1;\n }\n\n private static IllegalArgumentException parseError(String string) {\n throw new IllegalArgumentException(\"Parse error: \" + string);\n }\n\n /**\n * Returns the millisecond value of the date and time parsed from the\n * specified {@code String}. Many date/time formats are recognized, including IETF\n * standard syntax, i.e. Tue, 22 Jun 1999 12:16:00 GMT-0500\n *\n * @param string\n * the String to parse.\n * @return the millisecond value parsed from the String.\n *\n * @deprecated Use {@link DateFormat} instead.\n */\n @Deprecated\n public static long parse(String string) {\n if (string == null) {\n throw new IllegalArgumentException(\"The string argument is null\");\n }\n\n char sign = 0;\n int commentLevel = 0;\n int offset = 0, length = string.length(), state = 0;\n int year = -1, month = -1, date = -1;\n int hour = -1, minute = -1, second = -1, zoneOffset = 0, minutesOffset = 0;\n boolean zone = false;\n final int PAD = 0, LETTERS = 1, NUMBERS = 2;\n StringBuilder buffer = new StringBuilder();\n\n while (offset <= length) {\n char next = offset < length ? string.charAt(offset) : '\\r';\n offset++;\n\n if (next == '(') {\n commentLevel++;\n }\n if (commentLevel > 0) {\n if (next == ')') {\n commentLevel--;\n }\n if (commentLevel == 0) {\n next = ' ';\n } else {\n continue;\n }\n }\n\n int nextState = PAD;\n if ('a' <= next && next <= 'z' || 'A' <= next && next <= 'Z') {\n nextState = LETTERS;\n } else if ('0' <= next && next <= '9') {\n nextState = NUMBERS;\n } else if (!Character.isSpace(next) && \",+-:/\".indexOf(next) == -1) {\n throw parseError(string);\n }\n\n if (state == NUMBERS && nextState != NUMBERS) {\n int digit = Integer.parseInt(buffer.toString());\n buffer.setLength(0);\n if (sign == '+' || sign == '-') {\n if (zoneOffset == 0) {\n zone = true;\n if (next == ':') {\n minutesOffset = sign == '-' ? -Integer\n .parseInt(string.substring(offset,\n offset + 2)) : Integer\n .parseInt(string.substring(offset,\n offset + 2));\n offset += 2;\n }\n zoneOffset = sign == '-' ? -digit : digit;\n sign = 0;\n } else {\n throw parseError(string);\n }\n } else if (digit >= 70) {\n if (year == -1\n && (Character.isSpace(next) || next == ','\n || next == '/' || next == '\\r')) {\n year = digit;\n } else {\n throw parseError(string);\n }\n } else if (next == ':') {\n if (hour == -1) {\n hour = digit;\n } else if (minute == -1) {\n minute = digit;\n } else {\n throw parseError(string);\n }\n } else if (next == '/') {\n if (month == -1) {\n month = digit - 1;\n } else if (date == -1) {\n date = digit;\n } else {\n throw parseError(string);\n }\n } else if (Character.isSpace(next) || next == ','\n || next == '-' || next == '\\r') {\n if (hour != -1 && minute == -1) {\n minute = digit;\n } else if (minute != -1 && second == -1) {\n second = digit;\n } else if (date == -1) {\n date = digit;\n } else if (year == -1) {\n year = digit;\n } else {\n throw parseError(string);\n }\n } else if (year == -1 && month != -1 && date != -1) {\n year = digit;\n } else {\n throw parseError(string);\n }\n } else if (state == LETTERS && nextState != LETTERS) {\n String text = buffer.toString().toUpperCase(Locale.US);\n buffer.setLength(0);\n if (text.length() == 1) {\n throw parseError(string);\n }\n if (text.equals(\"AM\")) {\n if (hour == 12) {\n hour = 0;\n } else if (hour < 1 || hour > 12) {\n throw parseError(string);\n }\n } else if (text.equals(\"PM\")) {\n if (hour == 12) {\n hour = 0;\n } else if (hour < 1 || hour > 12) {\n throw parseError(string);\n }\n hour += 12;\n } else {\n DateFormatSymbols symbols = new DateFormatSymbols(Locale.US);\n String[] weekdays = symbols.getWeekdays(), months = symbols\n .getMonths();\n int value;\n if (parse(text, weekdays) != -1) {/* empty */\n } else if (month == -1 && (month = parse(text, months)) != -1) {/* empty */\n } else if (text.equals(\"GMT\") || text.equals(\"UT\") || text.equals(\"UTC\")) {\n zone = true;\n zoneOffset = 0;\n } else if ((value = zone(text)) != 0) {\n zone = true;\n zoneOffset = value;\n } else {\n throw parseError(string);\n }\n }\n }\n\n if (next == '+' || (year != -1 && next == '-')) {\n sign = next;\n } else if (!Character.isSpace(next) && next != ','\n && nextState != NUMBERS) {\n sign = 0;\n }\n\n if (nextState == LETTERS || nextState == NUMBERS) {\n buffer.append(next);\n }\n state = nextState;\n }\n\n if (year != -1 && month != -1 && date != -1) {\n if (hour == -1) {\n hour = 0;\n }\n if (minute == -1) {\n minute = 0;\n }\n if (second == -1) {\n second = 0;\n }\n if (year < (CREATION_YEAR - 80)) {\n year += 2000;\n } else if (year < 100) {\n year += 1900;\n }\n minute -= minutesOffset;\n if (zone) {\n if (zoneOffset >= 24 || zoneOffset <= -24) {\n hour -= zoneOffset / 100;\n minute -= zoneOffset % 100;\n } else {\n hour -= zoneOffset;\n }\n return UTC(year - 1900, month, date, hour, minute, second);\n }\n return new Date(year - 1900, month, date, hour, minute, second)\n .getTime();\n }\n throw parseError(string);\n }\n\n /**\n * Sets the gregorian calendar day of the month for this {@code Date} object.\n *\n * @param day\n * the day of the month.\n *\n * @deprecated Use {@code Calendar.set(Calendar.DATE, day)} instead.\n */\n @Deprecated\n public void setDate(int day) {\n GregorianCalendar cal = new GregorianCalendar(milliseconds);\n cal.set(Calendar.DATE, day);\n milliseconds = cal.getTimeInMillis();\n }\n\n /**\n * Sets the gregorian calendar hour of the day for this {@code Date} object.\n *\n * @param hour\n * the hour of the day.\n *\n * @deprecated Use {@code Calendar.set(Calendar.HOUR_OF_DAY, hour)} instead.\n */\n @Deprecated\n public void setHours(int hour) {\n GregorianCalendar cal = new GregorianCalendar(milliseconds);\n cal.set(Calendar.HOUR_OF_DAY, hour);\n milliseconds = cal.getTimeInMillis();\n }\n\n /**\n * Sets the gregorian calendar minute of the hour for this {@code Date} object.\n *\n * @param minute\n * the minutes.\n *\n * @deprecated Use {@code Calendar.set(Calendar.MINUTE, minute)} instead.\n */\n @Deprecated\n public void setMinutes(int minute) {\n GregorianCalendar cal = new GregorianCalendar(milliseconds);\n cal.set(Calendar.MINUTE, minute);\n milliseconds = cal.getTimeInMillis();\n }\n\n /**\n * Sets the gregorian calendar month for this {@code Date} object.\n *\n * @param month\n * the month.\n *\n * @deprecated Use {@code Calendar.set(Calendar.MONTH, month)} instead.\n */\n @Deprecated\n public void setMonth(int month) {\n GregorianCalendar cal = new GregorianCalendar(milliseconds);\n cal.set(Calendar.MONTH, month);\n milliseconds = cal.getTimeInMillis();\n }\n\n /**\n * Sets the gregorian calendar second of the minute for this {@code Date} object.\n *\n * @param second\n * the seconds.\n *\n * @deprecated Use {@code Calendar.set(Calendar.SECOND, second)} instead.\n */\n @Deprecated\n public void setSeconds(int second) {\n GregorianCalendar cal = new GregorianCalendar(milliseconds);\n cal.set(Calendar.SECOND, second);\n milliseconds = cal.getTimeInMillis();\n }\n\n /**\n * Sets this {@code Date} to the specified millisecond value. The value is the\n * number of milliseconds since Jan. 1, 1970 GMT.\n *\n * @param milliseconds\n * the number of milliseconds since Jan. 1, 1970 GMT.\n */\n public void setTime(long milliseconds) {\n this.milliseconds = milliseconds;\n }\n\n /**\n * Sets the gregorian calendar year since 1900 for this {@code Date} object.\n *\n * @param year\n * the year since 1900.\n *\n * @deprecated Use {@code Calendar.set(Calendar.YEAR, year + 1900)} instead.\n */\n @Deprecated\n public void setYear(int year) {\n GregorianCalendar cal = new GregorianCalendar(milliseconds);\n cal.set(Calendar.YEAR, year + 1900);\n milliseconds = cal.getTimeInMillis();\n }\n\n /**\n * Returns the string representation of this {@code Date} in GMT in the format\n * {@code \"22 Jun 1999 13:02:00 GMT\"}.\n *\n * @deprecated Use {@link DateFormat} instead.\n */\n @Deprecated\n public String toGMTString() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"d MMM y HH:mm:ss 'GMT'\", Locale.US);\n TimeZone gmtZone = TimeZone.getTimeZone(\"GMT\");\n sdf.setTimeZone(gmtZone);\n GregorianCalendar gc = new GregorianCalendar(gmtZone);\n gc.setTimeInMillis(milliseconds);\n return sdf.format(this);\n }\n\n /**\n * Returns the string representation of this {@code Date} for the default {@code Locale}.\n *\n * @deprecated Use {@link DateFormat} instead.\n */\n @Deprecated\n public String toLocaleString() {\n return DateFormat.getDateTimeInstance().format(this);\n }\n\n /**\n * Returns a string representation of this {@code Date}.\n * The formatting is equivalent to using a {@code SimpleDateFormat} with\n * the format string \"EEE MMM dd HH:mm:ss zzz yyyy\", which looks something\n * like \"Tue Jun 22 13:07:00 PDT 1999\". The current default time zone and\n * locale are used. If you need control over the time zone or locale,\n * use {@code SimpleDateFormat} instead.\n */\n @Override\n public String toString() {\n // TODO: equivalent to the following one-liner, though that's slower on stingray\n // at 476us versus 69us...\n // return new SimpleDateFormat(\"EEE MMM dd HH:mm:ss zzz yyyy\").format(d);\n LocaleData localeData = LocaleData.get(Locale.US);\n Calendar cal = new GregorianCalendar(milliseconds);\n TimeZone tz = cal.getTimeZone();\n StringBuilder result = new StringBuilder();\n result.append(localeData.shortWeekdayNames[cal.get(Calendar.DAY_OF_WEEK)]);\n result.append(' ');\n result.append(localeData.shortMonthNames[cal.get(Calendar.MONTH)]);\n result.append(' ');\n appendTwoDigits(result, cal.get(Calendar.DAY_OF_MONTH));\n result.append(' ');\n appendTwoDigits(result, cal.get(Calendar.HOUR_OF_DAY));\n result.append(':');\n appendTwoDigits(result, cal.get(Calendar.MINUTE));\n result.append(':');\n appendTwoDigits(result, cal.get(Calendar.SECOND));\n result.append(' ');\n result.append(tz.getDisplayName(tz.inDaylightTime(this), TimeZone.SHORT));\n result.append(' ');\n result.append(cal.get(Calendar.YEAR));\n return result.toString();\n }\n\n private static void appendTwoDigits(StringBuilder sb, int n) {\n if (n < 10) {\n sb.append('0');\n }\n sb.append(n);\n }\n\n /**\n * Returns the millisecond value of the specified date and time in GMT.\n *\n * @param year\n * the year, 0 is 1900.\n * @param month\n * the month, 0 - 11.\n * @param day\n * the day of the month, 1 - 31.\n * @param hour\n * the hour of day, 0 - 23.\n * @param minute\n * the minute of the hour, 0 - 59.\n * @param second\n * the second of the minute, 0 - 59.\n * @return the date and time in GMT in milliseconds.\n *\n * @deprecated Use code like this instead:<code>\n * Calendar cal = new GregorianCalendar(TimeZone.getTimeZone(\"GMT\"));\n * cal.set(year + 1900, month, day, hour, minute, second);\n * cal.getTime().getTime();</code>\n */\n @Deprecated\n public static long UTC(int year, int month, int day, int hour, int minute,\n int second) {\n GregorianCalendar cal = new GregorianCalendar(false);\n cal.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n cal.set(1900 + year, month, day, hour, minute, second);\n return cal.getTimeInMillis();\n }\n\n private static int zone(String text) {\n if (text.equals(\"EST\")) {\n return -5;\n }\n if (text.equals(\"EDT\")) {\n return -4;\n }\n if (text.equals(\"CST\")) {\n return -6;\n }\n if (text.equals(\"CDT\")) {\n return -5;\n }\n if (text.equals(\"MST\")) {\n return -7;\n }\n if (text.equals(\"MDT\")) {\n return -6;\n }\n if (text.equals(\"PST\")) {\n return -8;\n }\n if (text.equals(\"PDT\")) {\n return -7;\n }\n return 0;\n }\n\n private void writeObject(ObjectOutputStream stream) throws IOException {\n stream.defaultWriteObject();\n stream.writeLong(getTime());\n }\n\n private void readObject(ObjectInputStream stream) throws IOException,\n ClassNotFoundException {\n stream.defaultReadObject();\n setTime(stream.readLong());\n }\n}\n"} +{"text": "-# encoding: utf-8\n\ndoctype html\nhtml\n head\n meta(charset=\"utf-8\")\n title FromThePage Email Notification\n\n body(bgcolor=\"#F6EEE6\" style=\"margin:0; padding:0; background-color:#F6EEE6\")\n table(width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" bgcolor=\"#F6EEE6\" style=\"background-color:#F6EEE6; font-family: Georgia, 'Times New Roman', serif;\")\n tbody\n tr\n td(align=\"center\" style=\"padding:30px;\")\n =image_tag attachments[\"logo.png\"].url, alt: \"FromThePage logo\"\n tr\n td(align=\"center\")\n table(width=\"600\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\" style=\"color:#200;\")\n tbody\n tr\n td(style=\"padding:30px; font-size:16px;\")\n =yield\n tr\n td(align=\"center\" style=\"padding:30px; color:#8D7A75;\")\n span ==\"&copy; #{Time.now.year} #{link_to 'FromThePage', root_url, style: 'color: #8D7A75;'}. All rights reserved.\""} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\" ?>\n\n<chapter id=\"logging\">\n <title>ログ出力</title>\n\n <para>\n <indexterm><primary>Logging</primary></indexterm>\n\n PHPUnit は、いくつかの形式のログファイルを作成することができます。\n </para>\n\n <section id=\"logging.xml\">\n <title>テスト結果 (XML)</title>\n\n <para>\n PHPUnit が作成するテスト���果の XML のログファイルは、\n <ulink url=\"http://ant.apache.org/manual/Tasks/junit.html\">\n Apache Ant の JUnit タスク</ulink>\n が使用しているものを参考にしています。\n 以下の例は、<literal>ArrayTest</literal> のテストが生成した\n XML ログファイルです。\n </para>\n\n <screen><![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<testsuites>\n <testsuite name=\"ArrayTest\"\n file=\"/home/sb/ArrayTest.php\"\n tests=\"2\"\n assertions=\"2\"\n failures=\"0\"\n errors=\"0\"\n time=\"0.016030\">\n <testcase name=\"testNewArrayIsEmpty\"\n class=\"ArrayTest\"\n file=\"/home/sb/ArrayTest.php\"\n line=\"6\"\n assertions=\"1\"\n time=\"0.008044\"/>\n <testcase name=\"testArrayContainsAnElement\"\n class=\"ArrayTest\"\n file=\"/home/sb/ArrayTest.php\"\n line=\"15\"\n assertions=\"1\"\n time=\"0.007986\"/>\n </testsuite>\n</testsuites>]]></screen>\n\n <para>\n 次の XML ログファイルは、テストクラス\n <literal>FailureErrorTest</literal> にある 2 つのテスト\n <literal>testFailure</literal> および <literal>testError</literal>\n が出力したものです。失敗やエラーがどのように表示されるのかを確認しましょう。\n </para>\n\n <screen><![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<testsuites>\n <testsuite name=\"FailureErrorTest\"\n file=\"/home/sb/FailureErrorTest.php\"\n tests=\"2\"\n assertions=\"1\"\n failures=\"1\"\n errors=\"1\"\n time=\"0.019744\">\n <testcase name=\"testFailure\"\n class=\"FailureErrorTest\"\n file=\"/home/sb/FailureErrorTest.php\"\n line=\"6\"\n assertions=\"1\"\n time=\"0.011456\">\n <failure type=\"PHPUnit_Framework_ExpectationFailedException\">\ntestFailure(FailureErrorTest)\nFailed asserting that &lt;integer:2&gt; matches expected value &lt;integer:1&gt;.\n\n/home/sb/FailureErrorTest.php:8\n</failure>\n </testcase>\n <testcase name=\"testError\"\n class=\"FailureErrorTest\"\n file=\"/home/sb/FailureErrorTest.php\"\n line=\"11\"\n assertions=\"0\"\n time=\"0.008288\">\n <error type=\"Exception\">testError(FailureErrorTest)\nException:\n\n/home/sb/FailureErrorTest.php:13\n</error>\n </testcase>\n </testsuite>\n</testsuites>]]></screen>\n </section>\n\n <section id=\"logging.tap\">\n <title>テスト結果 (TAP)</title>\n\n <para>\n <ulink url=\"http://testanything.org/\">Test Anything Protocol (TAP)</ulink>\n は、Perl のモジュールをテストする際に使用する、\n シンプルなテキストベースのインターフェイスです。\n 以下の例は、<literal>ArrayTest</literal> のテストが生成した\n TAP ログファイルです。\n </para>\n\n <screen>TAP version 13\nok 1 - testNewArrayIsEmpty(ArrayTest)\nok 2 - testArrayContainsAnElement(ArrayTest)\n1..2</screen>\n\n <para>\n 次の TAP ログファイルは、テストクラス\n <literal>FailureErrorTest</literal> にあるメソッド\n <literal>testFailure</literal> および <literal>testError</literal>\n が出力したものです。失敗やエラーがどのように表示されるのかを確認しましょう。\n </para>\n\n <screen><![CDATA[TAP version 13\nnot ok 1 - Failure: testFailure(FailureErrorTest)\n ---\n message: 'Failed asserting that <integer:2> matches expected value <integer:1>.'\n severity: fail\n data:\n got: 2\n expected: 1\n ...\nnot ok 2 - Error: testError(FailureErrorTest)\n1..2]]></screen>\n </section>\n\n <section id=\"logging.json\">\n <title>テスト結果 (JSON)</title>\n\n <para>\n <ulink url=\"http://www.json.org/\">JavaScript Object Notation (JSON)</ulink>\n は、軽量なデータ交換用フォーマットです。次の例は、\n <literal>ArrayTest</literal> のテストが作成した JSON メッセージです。\n </para>\n\n <screen>{\"event\":\"suiteStart\",\"suite\":\"ArrayTest\",\"tests\":2}\n{\"event\":\"test\",\"suite\":\"ArrayTest\",\n \"test\":\"testNewArrayIsEmpty(ArrayTest)\",\"status\":\"pass\",\n \"time\":0.000460147858,\"trace\":[],\"message\":\"\"}\n{\"event\":\"test\",\"suite\":\"ArrayTest\",\n \"test\":\"testArrayContainsAnElement(ArrayTest)\",\"status\":\"pass\",\n \"time\":0.000422954559,\"trace\":[],\"message\":\"\"}</screen>\n\n <para>\n 次の JSON メッセージは、\n <literal>FailureErrorTest</literal> にある 2 つのテスト\n <literal>testFailure</literal> および <literal>testError</literal>\n が出力したものです。失敗やエラーがどのように表示されるのかを確認しましょう。\n </para>\n\n <screen><![CDATA[{\"event\":\"suiteStart\",\"suite\":\"FailureErrorTest\",\"tests\":2}\n{\"event\":\"test\",\"suite\":\"FailureErrorTest\",\n \"test\":\"testFailure(FailureErrorTest)\",\"status\":\"fail\",\n \"time\":0.0082459449768066,\"trace\":[],\n \"message\":\"Failed asserting that <integer:2> is equal to <integer:1>.\"}\n{\"event\":\"test\",\"suite\":\"FailureErrorTest\",\n \"test\":\"testError(FailureErrorTest)\",\"status\":\"error\",\n \"time\":0.0083680152893066,\"trace\":[],\"message\":\"\"}]]></screen>\n </section>\n\n <section id=\"logging.codecoverage.xml\">\n <title>コードカバレッジ (XML)</title>\n\n <para>\n PHPUnit がコードカバレッジ情報のログ出力の際に使用している XML のフォーマットは、\n <ulink url=\"http://www.atlassian.com/software/clover/\">Clover</ulink>\n のものを参考にしています。\n 以下の例は、<literal>BankAccountTest</literal> のテストが生成した\n XML ログファイルです。\n </para>\n\n <screen><![CDATA[<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<coverage generated=\"1184835473\" phpunit=\"4.8.0\">\n <project name=\"BankAccountTest\" timestamp=\"1184835473\">\n <file name=\"/home/sb/BankAccount.php\">\n <class name=\"BankAccountException\">\n <metrics methods=\"0\" coveredmethods=\"0\" statements=\"0\"\n coveredstatements=\"0\" elements=\"0\" coveredelements=\"0\"/>\n </class>\n <class name=\"BankAccount\">\n <metrics methods=\"4\" coveredmethods=\"4\" statements=\"13\"\n coveredstatements=\"5\" elements=\"17\" coveredelements=\"9\"/>\n </class>\n <line num=\"77\" type=\"method\" count=\"3\"/>\n <line num=\"79\" type=\"stmt\" count=\"3\"/>\n <line num=\"89\" type=\"method\" count=\"2\"/>\n <line num=\"91\" type=\"stmt\" count=\"2\"/>\n <line num=\"92\" type=\"stmt\" count=\"0\"/>\n <line num=\"93\" type=\"stmt\" count=\"0\"/>\n <line num=\"94\" type=\"stmt\" count=\"2\"/>\n <line num=\"96\" type=\"stmt\" count=\"0\"/>\n <line num=\"105\" type=\"method\" count=\"1\"/>\n <line num=\"107\" type=\"stmt\" count=\"1\"/>\n <line num=\"109\" type=\"stmt\" count=\"0\"/>\n <line num=\"119\" type=\"method\" count=\"1\"/>\n <line num=\"121\" type=\"stmt\" count=\"1\"/>\n <line num=\"123\" type=\"stmt\" count=\"0\"/>\n <metrics loc=\"126\" ncloc=\"37\" classes=\"2\" methods=\"4\" coveredmethods=\"4\"\n statements=\"13\" coveredstatements=\"5\" elements=\"17\"\n coveredelements=\"9\"/>\n </file>\n <metrics files=\"1\" loc=\"126\" ncloc=\"37\" classes=\"2\" methods=\"4\"\n coveredmethods=\"4\" statements=\"13\" coveredstatements=\"5\"\n elements=\"17\" coveredelements=\"9\"/>\n </project>\n</coverage>]]></screen>\n </section>\n\n <section id=\"logging.codecoverage.text\">\n <title>コードカバレッジ (テキスト)</title>\n\n <para>\n 人間が読める形式のコードカバレッジ情報を、コマンドラインあるいはテキストファイルに出力します。\n \n この出力フォーマットの狙いは、ちょっとしたクラス群のカバレッジの概要を手軽に把握することです。\n 大規模なプロジェクトでは、このフォーマットを使えばプロジェクト全体のカバレッジを大まかに把握しやすくなるでしょう。\n <literal>--filter</literal> と組み合わせて使うこともできます。\n\n コマンドラインから使う場合は <literal>php://stdout</literal> に書き込みます。\n この出力は <literal>--colors</literal> の設定を反映したものになります。\n\n コマンドラインから使った場合は、デフォルトの出力先は標準出力となります。\n\n デフォルトでは、テストで少なくとも一行はカバーしているファイルしか表示しません。\n この設定は、xml の <literal>showUncoveredFiles</literal> オプションでしか変更できません。\n <xref linkend=\"appendixes.configuration.logging\"/> を参照ください。\n\n デフォルトでは、すべてのファイルとそのカバレッジ情報が、詳細形式で表示されます。\n この設定は、xml のオプション <literal>showOnlySummary</literal> で変更できます。\n </para>\n \n </section>\n</chapter>\n"} +{"text": "# $Id$\n## @file\n# PartitionDxe.inf\n#\n\n#\n# Copyright (C) 2010-2012 Oracle Corporation\n#\n# This file is part of VirtualBox Open Source Edition (OSE), as\n# available from http://www.virtualbox.org. This file is free software;\n# you can redistribute it and/or modify it under the terms of the GNU\n# General Public License (GPL) as published by the Free Software\n# Foundation, in version 2 as it comes in the \"COPYING\" file of the\n# VirtualBox OSE distribution. VirtualBox OSE is distributed in the\n# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.\n#\n\n## @file\n# Modules that produces the logic Block I/O protocol for every partition\n# it discovers via the physical Block I/O.\n#\n# This module produces the logical Block I/O device that represents\n# the bytes from Start to End of the Parent Block I/O device.\n# The partition of physical BlockIo device supported is one of legacy MBR, GPT,\n# and \"El Torito\" partitions.\n# \n# Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>\n# This program and the accompanying materials\n# are licensed and made available under the terms and conditions of the BSD License\n# which accompanies this distribution. The full text of the license may be found at\n# http://opensource.org/licenses/bsd-license.php\n# \n# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN \"AS IS\" BASIS,\n# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\n# \n##\n\n[Defines]\n INF_VERSION = 0x00010005\n BASE_NAME = PartitionDxe\n FILE_GUID = 1FA1F39E-FEFF-4aae-BD7B-38A070A3B609\n MODULE_TYPE = UEFI_DRIVER\n VERSION_STRING = 1.0\n ENTRY_POINT = InitializePartition\n\n#\n# The following information is for reference only and not required by the build tools.\n#\n# VALID_ARCHITECTURES = IA32 X64 IPF EBC\n#\n# DRIVER_BINDING = gPartitionDriverBinding\n# COMPONENT_NAME = gPartitionComponentName\n# COMPONENT_NAME2 = gPartitionComponentName2\n#\n\n[Sources]\n ComponentName.c\n Mbr.c\n Gpt.c\n ElTorito.c\n Apple.c\n Partition.c\n Partition.h\n\n\n[Packages]\n MdePkg/MdePkg.dec\n\n\n[LibraryClasses]\n DevicePathLib\n UefiBootServicesTableLib\n MemoryAllocationLib\n BaseMemoryLib\n UefiLib\n BaseLib\n UefiDriverEntryPoint\n DebugLib\n\n\n[Guids]\n gEfiPartTypeUnusedGuid ## SOMETIMES_CONSUMES ## GUID\n gEfiPartTypeSystemPartGuid ## SOMETIMES_CONSUMES ## Protocol\n\n\n[Protocols]\n gEfiBlockIoProtocolGuid ## BY_START\n gEfiDevicePathProtocolGuid ## BY_START\n gEfiDiskIoProtocolGuid ## BY_START\n gEfiBlockIoProtocolGuid ## TO_START\n gEfiBlockIo2ProtocolGuid ## TO_START\n gEfiDevicePathProtocolGuid ## TO_START\n gEfiDiskIoProtocolGuid ## TO_START\n\n[BuildOptions.common]\n GCC:*_*_*_CC_FLAGS = -DEFI_LOG_ENABLED=1\n"} +{"text": "<?xml version=\"1.0\"?>\n<FWBuilderResources>\n <Target name=\"nxosacl\">\n <description>Cisco Router NX-OS ACL</description>\n <status>active</status>\n <group>Cisco</group>\n <compiler>fwb_nxosacl</compiler>\n <dialog>nxosacl</dialog>\n <installer>fwb_inst_nxosacl</installer>\n <diff>fwb_nxosacl_diff</diff>\n <supported_os>nxos</supported_os>\n\n <versions>4.2,5.0,5.1,5.2,6.0,6.1</versions>\n\n <options>\n <default>\n <nxosacl_include_comments>true</nxosacl_include_comments>\n <nxosacl_add_clear_statements>true</nxosacl_add_clear_statements>\n <nxosacl_assume_fw_part_of_any>true</nxosacl_assume_fw_part_of_any>\n </default>\n\n <version_12.1>\n <nxosacl_include_comments>true</nxosacl_include_comments>\n <nxosacl_add_clear_statements>true</nxosacl_add_clear_statements>\n <nxosacl_assume_fw_part_of_any>true</nxosacl_assume_fw_part_of_any>\n <supports_mixed_service_groups>False</supports_mixed_service_groups>\n <nxosacl_commands>\n <clear_acl>no access-list</clear_acl>\n <clear_ip_acl>no ip access-list</clear_ip_acl>\n <clear_ipv6_acl>no ipv6 access-list</clear_ipv6_acl>\n <ip_addr_static>\ninterface %in\n ip address %a %n\n </ip_addr_static>\n <ip_addr_dyn>\ninterface %in\n ip address dhcp \n </ip_addr_dyn>\n </nxosacl_commands>\n </version_12.1>\n\n <version_12.2>\n <nxosacl_include_comments>true</nxosacl_include_comments>\n <nxosacl_add_clear_statements>true</nxosacl_add_clear_statements>\n <nxosacl_assume_fw_part_of_any>true</nxosacl_assume_fw_part_of_any>\n <supports_mixed_service_groups>False</supports_mixed_service_groups>\n <nxosacl_commands>\n <clear_acl>no access-list</clear_acl>\n <clear_ip_acl>no ip access-list</clear_ip_acl>\n <clear_ipv6_acl>no ipv6 access-list</clear_ipv6_acl>\n <ip_addr_static>\ninterface %in\n ip address %a %n\n </ip_addr_static>\n <ip_addr_dyn>\ninterface %in\n ip address dhcp \n </ip_addr_dyn>\n </nxosacl_commands>\n </version_12.2>\n\n <version_12.3>\n <nxosacl_include_comments>true</nxosacl_include_comments>\n <nxosacl_add_clear_statements>true</nxosacl_add_clear_statements>\n <nxosacl_assume_fw_part_of_any>true</nxosacl_assume_fw_part_of_any>\n <supports_mixed_service_groups>False</supports_mixed_service_groups>\n <nxosacl_commands>\n <clear_acl>no access-list</clear_acl>\n <clear_ip_acl>no ip access-list</clear_ip_acl>\n <clear_ipv6_acl>no ipv6 access-list</clear_ipv6_acl>\n <ip_addr_static>\ninterface %in\n ip address %a %n\n </ip_addr_static>\n <ip_addr_dyn>\ninterface %in\n ip address dhcp \n </ip_addr_dyn>\n </nxosacl_commands>\n </version_12.3>\n\n <version_12.4>\n <nxosacl_include_comments>true</nxosacl_include_comments>\n <nxosacl_add_clear_statements>true</nxosacl_add_clear_statements>\n <nxosacl_assume_fw_part_of_any>true</nxosacl_assume_fw_part_of_any>\n <supports_mixed_service_groups>False</supports_mixed_service_groups>\n <nxosacl_commands>\n <clear_acl>no access-list</clear_acl>\n <clear_ip_acl>no ip access-list</clear_ip_acl>\n <clear_ipv6_acl>no ipv6 access-list</clear_ipv6_acl>\n <ip_addr_static>\ninterface %in\n ip address %a %n\n </ip_addr_static>\n <ip_addr_dyn>\ninterface %in\n ip address dhcp \n </ip_addr_dyn>\n </nxosacl_commands>\n </version_12.4>\n\n </options>\n\n <capabilities>\n <negation_in_interface_policy>False</negation_in_interface_policy>\n <negation_in_policy>False</negation_in_policy>\n <negation_in_nat>False</negation_in_nat>\n <logging_in_policy>True</logging_in_policy>\n <options_in_policy>True</options_in_policy>\n <supports_nat>False</supports_nat>\n <actions_in_nat>False</actions_in_nat>\n <inbound_interface_in_nat>False</inbound_interface_in_nat>\n <outbound_interface_in_nat>False</outbound_interface_in_nat>\n <supports_time>False</supports_time>\n <supports_accounting>False</supports_accounting>\n <security_levels>False</security_levels>\n <network_zones>False</network_zones>\n <unprotected_interfaces>True</unprotected_interfaces>\n <supports_prolog_epilog>True</supports_prolog_epilog>\n <supports_cluster>False</supports_cluster>\n <install_only_on_primary>False</install_only_on_primary>\n <actions>\n <Accept>\n <supported>True</supported>\n <description>Accept</description>\n <dialog_page>None</dialog_page>\n </Accept>\n <Deny>\n <supported>True</supported>\n <description>Deny</description>\n <dialog_page>None</dialog_page>\n </Deny>\n <Reject>\n <supported>False</supported>\n <description>Reject</description>\n <dialog_page>Reject</dialog_page>\n </Reject>\n <Accounting>\n <supported>False</supported>\n <description>Accounting</description>\n <dialog_page>None</dialog_page>\n </Accounting>\n <Tag>\n <supported>False</supported>\n <description>Tag</description>\n <dialog_page>None</dialog_page>\n </Tag>\n <Pipe>\n <supported>False</supported>\n <description>Pipe</description>\n <dialog_page>None</dialog_page>\n </Pipe>\n <Classify>\n <supported>False</supported>\n <description>Classify</description>\n <dialog_page>None</dialog_page>\n </Classify>\n <Custom>\n <supported>False</supported>\n <description>Custom</description>\n <dialog_page>None</dialog_page>\n </Custom>\n <Branch>\n <supported>False</supported>\n <description>Branch</description>\n <dialog_page>None</dialog_page>\n </Branch>\n <Route>\n <supported>False</supported>\n <description>Route</description>\n <dialog_page>None</dialog_page>\n </Route>\n <Translate>\n <supported>False</supported>\n <description>Translate</description>\n <dialog_page>None</dialog_page>\n </Translate>\n <NATBranch>\n <supported>False</supported>\n <description>Branch</description>\n <dialog_page>None</dialog_page>\n </NATBranch>\n </actions>\n </capabilities>\n\n </Target>\n\n</FWBuilderResources>\n"} +{"text": "package com.linbit.linstor.security;\n\nimport com.linbit.linstor.transaction.TransactionObjectFactory;\nimport com.linbit.linstor.transaction.manager.TransactionMgr;\n\nimport javax.inject.Inject;\nimport javax.inject.Provider;\n\npublic class SecurityTestUtils\n{\n private ObjectProtectionDatabaseDriver driver;\n private TransactionObjectFactory transObjFactory;\n private Provider<TransactionMgr> transMgrProvider;\n\n @Inject\n public SecurityTestUtils(\n ObjectProtectionDatabaseDriver driverRef,\n TransactionObjectFactory transObjFactoryRef,\n Provider<TransactionMgr> transMgrProviderRef\n )\n {\n driver = driverRef;\n transObjFactory = transObjFactoryRef;\n transMgrProvider = transMgrProviderRef;\n }\n\n public ObjectProtection createObjectProtection(\n AccessContext accCtx,\n String objPathRef\n )\n {\n return new ObjectProtection(\n accCtx,\n objPathRef,\n driver,\n transObjFactory,\n transMgrProvider\n );\n }\n\n}\n"} +{"text": "package com.thoughtworks.qdox.model;\n\n/*\n * Licensed to the Apache Software Foundation (ASF) under one\n * or more contributor license agreements. See the NOTICE file\n * distributed with this work for additional information\n * regarding copyright ownership. The ASF licenses this file\n * to you under the Apache License, Version 2.0 (the\n * \"License\"); you may not use this file except in compliance\n * with the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing,\n * software distributed under the License is distributed on an\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n * KIND, either express or implied. See the License for the\n * specific language governing permissions and limitations\n * under the License.\n */\n\nimport java.util.List;\n\n/**\n * JavaModel representation of a {@link java.lang.reflect.Member} including related methods of {@link java.lang.reflect.Modifier}\n * \n * @author Robert Scholte\n * @since 2.0\n */\npublic interface JavaMember\n{\n /**\n * Equivalent of {@link java.lang.reflect.Member#getModifiers()}\n * \n * <strong>This does not follow the java-api</strong>\n * With the Member-class, getModifiers returns an <code>int</code>, which should be decoded with the Modifier.\n * If this member was extracted from a source, it will keep its order. \n * Otherwise if will be in the preferred order of the java-api.\n * \n * @return all modifiers is this member\n */\n List<String> getModifiers();\n \n /**\n * Equivalent of {@link java.lang.reflect.Member#getDeclaringClass()}\n * \n * @return the declaring class\n */\n JavaClass getDeclaringClass(); \n \n /**\n * Equivalent of {@link java.lang.reflect.Member#getName()}\n * \n * @return the name of this member\n */\n String getName();\n \n /**\n * Equivalent of {@link java.lang.reflect.Modifier#isAbstract(int)}\n * \n * @return <code>true</code> if this member is <code>abstract</code>, otherwise <code>false</code>\n */\n boolean isAbstract();\n \n /**\n * Equivalent of {@link java.lang.reflect.Modifier#isFinal(int)}\n * \n * @return <code>true</code> is this member is <code>final</code>, otherwise <code>false</code>\n */\n boolean isFinal();\n \n /**\n * Equivalent of {@link java.lang.reflect.Modifier#isNative(int)}\n * \n * @return <code>true</code> if this member is <code>native</code>, otherwise <code>false</code>\n */\n boolean isNative();\n \n /**\n * Equivalent of {@link java.lang.reflect.Modifier#isPrivate(int)}\n * \n * @return <code>true</code> if this member is <code>private</code>, otherwise <code>false</code>\n */\n boolean isPrivate();\n \n /**\n * Equivalent of {@link java.lang.reflect.Modifier#isProtected(int)}\n * \n * @return <code>true</code> if this member is <code>protected</code>; otherwise <code>false</code>\n */\n boolean isProtected();\n\n /**\n * Equivalent of {@link java.lang.reflect.Modifier#isPublic(int)}\n * \n * @return <code>true</code> if this member is <code>public</code>, otherwise <code>false</code>\n */\n boolean isPublic();\n \n /**\n * Equivalent of {@link java.lang.reflect.Modifier#isStatic(int)}\n * \n * @return <code>true</code> if this member is <code>static</code>, otherwise <code>false</code>\n */\n boolean isStatic();\n \n /**\n * Equivalent of {@link java.lang.reflect.Modifier#isStrict(int)}\n * \n * @return <code>true</code> if this member is <code>strictfp</code>, otherwise <code>false</code>\n */\n boolean isStrictfp();\n \n /**\n * Equivalent of {@link java.lang.reflect.Modifier#isSynchronized(int)}\n * \n * @return <code>true</code> if this member is <code>synchronized</code>, otherwise <code>false</code>\n */\n boolean isSynchronized();\n \n /**\n * Equivalent of {@link java.lang.reflect.Modifier#isTransient(int)}\n * \n * @return <code>true</code> if this member is <code>transient</code>, otherwise <code>false</code>\n */\n boolean isTransient();\n \n /**\n * Equivalent of {@link java.lang.reflect.Modifier#isVolatile(int)}\n * \n * @return <code>true</code> if this member is <code>volatile</code>, otherwise <code>false</code>\n */\n boolean isVolatile();\n\n}"} +{"text": "package cn.hutool.dfa;\n\nimport java.util.Set;\n\nimport cn.hutool.core.collection.CollUtil;\n\n/**\n * 过滤词及一些简单处理\n * \n * @author Looly\n */\npublic class StopChar {\n\t/** 不需要处理的词,如标点符号、空格等 */\n\tpublic static final Set<Character> STOP_WORD = CollUtil.newHashSet(new Character[] { ' ', '\\'', '、', '。', //\n\t\t\t'·', 'ˉ', 'ˇ', '々', '—', '~', '‖', '…', '‘', '’', '“', '”', '〔', '〕', '〈', '〉', '《', '》', '「', '」', '『', //\n\t\t\t'』', '〖', '〗', '【', '】', '±', '+', '-', '×', '÷', '∧', '∨', '∑', '∏', '∪', '∩', '∈', '√', '⊥', '⊙', '∫', //\n\t\t\t'∮', '≡', '≌', '≈', '∽', '∝', '≠', '≮', '≯', '≤', '≥', '∞', '∶', '∵', '∴', '∷', '♂', '♀', '°', '′', '〃', //\n\t\t\t'℃', '$', '¤', '¢', '£', '‰', '§', '☆', '★', '〇', '○', '●', '◎', '◇', '◆', '□', '■', '△', '▽', '⊿', '▲', //\n\t\t\t'▼', '◣', '◤', '◢', '◥', '▁', '▂', '▃', '▄', '▅', '▆', '▇', '█', '▉', '▊', '▋', '▌', '▍', '▎', '▏', '▓', //\n\t\t\t'※', '→', '←', '↑', '↓', '↖', '↗', '↘', '↙', '〓', 'ⅰ', 'ⅱ', 'ⅲ', 'ⅳ', 'ⅴ', 'ⅵ', 'ⅶ', 'ⅷ', 'ⅸ', 'ⅹ', '①', //\n\t\t\t'②', '③', '④', '⑤', '⑥', '⑦', '⑧', '⑨', '⑩', '⒈', '⒉', '⒊', '⒋', '⒌', '⒍', '⒎', '⒏', '⒐', '⒑', '⒒', '⒓', //\n\t\t\t'⒔', '⒕', '⒖', '⒗', '⒘', '⒙', '⒚', '⒛', '⑴', '⑵', '⑶', '⑷', '⑸', '⑹', '⑺', '⑻', '⑼', '⑽', '⑾', '⑿', '⒀', //\n\t\t\t'⒁', '⒂', '⒃', '⒄', '⒅', '⒆', '⒇', 'Ⅰ', 'Ⅱ', 'Ⅲ', 'Ⅳ', 'Ⅴ', 'Ⅵ', 'Ⅶ', 'Ⅷ', 'Ⅸ', 'Ⅹ', 'Ⅺ', 'Ⅻ', '!', '”', //\n\t\t\t'#', '¥', '%', '&', '’', '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', //\n\t\t\t'8', '9', ':', ';', '<', '=', '>', '?', '@', '〔', '\', '〕', '^', '_', '‘', '{', '|', '}', '∏', 'Ρ', '∑', //\n\t\t\t'Υ', 'Φ', 'Χ', 'Ψ', 'Ω', 'α', 'β', 'γ', 'δ', 'ε', 'ζ', 'η', 'θ', 'ι', 'κ', 'λ', 'μ', 'ν', 'ξ', 'ο', 'π', //\n\t\t\t'ρ', 'σ', 'τ', 'υ', 'φ', 'χ', 'ψ', 'ω', '(', ')', '〔', '〕', '^', '﹊', '﹍', '╭', '╮', '╰', '╯', '', '_', //\n\t\t\t'', '^', '(', '^', ':', '!', '/', '\\\\', '\\\"', '<', '>', '`', '·', '。', '{', '}', '~', '~', '(', ')', '-', //\n\t\t\t'√', '$', '@', '*', '&', '#', '卐', '㎎', '㎏', '㎜', '㎝', '㎞', '㎡', '㏄', '㏎', '㏑', '㏒', '㏕' });\n\n\t/**\n\t * 判断指定的词是否是不处理的词。 如果参数为空,则返回true,因为空也属于不处理的字符。\n\t * \n\t * @param ch 指定的词\n\t * @return 是否是不处理的词\n\t */\n\tpublic static boolean isStopChar(char ch) {\n\t\treturn Character.isWhitespace(ch) || STOP_WORD.contains(ch);\n\t}\n\n\t/**\n\t * 是否为合法字符(待处理字符)\n\t * \n\t * @param ch 指定的词\n\t * @return 是否为合法字符(待处理字符)\n\t */\n\tpublic static boolean isNotStopChar(char ch) {\n\t\treturn false == isStopChar(ch);\n\t}\n}\n"} +{"text": "using System;\nusing System.Collections.Generic;\n\n#nullable enable\n\nnamespace Robust.Shared.Utility\n{\n public static class CommandParsing\n {\n /// <summary>\n /// Parses a full console command into a list of arguments.\n /// </summary>\n /// <param name=\"text\">Full input string.</param>\n /// <param name=\"args\">List of arguments to write into.</param>\n public static void ParseArguments(ReadOnlySpan<char> text, List<string> args)\n {\n var buf = \"\";\n var inQuotes = false;\n\n for (var i = 0; i < text.Length; i++)\n {\n var chr = text[i];\n if (chr == '\\\\')\n {\n i += 1;\n if (i == text.Length)\n {\n buf += \"\\\\\";\n break;\n }\n\n buf += text[i];\n continue;\n }\n\n if (chr == '\"')\n {\n if (inQuotes)\n {\n args.Add(buf);\n buf = \"\";\n }\n\n inQuotes = !inQuotes;\n continue;\n }\n\n if (chr == ' ' && !inQuotes)\n {\n if (buf != \"\")\n {\n args.Add(buf);\n buf = \"\";\n }\n continue;\n }\n\n buf += chr;\n }\n\n if (buf != \"\")\n {\n args.Add(buf);\n }\n }\n\n public static string Escape(string text)\n {\n return text.Replace(\"\\\\\", \"\\\\\\\\\").Replace(\"\\\"\", \"\\\\\\\"\");\n }\n }\n}\n"} +{"text": "using UnityEngine;\nusing System.Collections;\n\n\npublic class SimpleTween : BaseDemoGUI\n{\n\tpublic Transform cube;\n\t\n\t\n\tvoid Start()\n\t{\n\t\t// setup a position and color tween that loops indefinitely. this will let us play with the\n\t\t// different ease types\n\t\t_tween = Go.to( cube, 4, new GoTweenConfig()\n\t\t\t.position( new Vector3( 9, 4, 0 ) )\n\t\t\t.materialColor( Color.green )\n\t\t\t.setIterations( -1, GoLoopType.PingPong ) );\n\t}\n\n}\n"} +{"text": "#!/bin/bash\n\n# Enable turn\ncat>/etc/default/coturn<<EOF\nTURNSERVER_ENABLED=1\nEOF\n\n# Turn server configuration\ncat>/etc/turnserver.conf<<EOF\nexternal-ip=${TURN_PUBLIC_IP}\nlistening-port=${TURN_LISTEN_PORT}\nfingerprint\nlt-cred-mech\nmax-port=${MAX_PORT:-65535}\nmin-port=${MIN_PORT:-40000}\npidfile=\"/var/run/turnserver.pid\"\nrealm=openvidu\nsimple-log\nredis-userdb=\"ip=${REDIS_IP} dbname=${DB_NAME} password=${DB_PASSWORD} connect_timeout=30\"\nverbose\nEOF"} +{"text": "# V1DeleteTimecardRequest\n\n### Description\n\n\n**Note: This model is deprecated.**\n\n## Properties\nName | Getter | Setter | Type | Description | Notes\n------------ | ------------- | ------------- | ------------- | ------------- | -------------\n\nNote: All properties are protected and only accessed via getters and setters.\n\n[[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md)\n\n"} +{"text": "<html>\n<head>\n<title>Untitled Document</title>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">\n</head>\n\n<body bgcolor=\"#FFFFFF\">\n<h1 align=\"center\"><font size=\"+1\"><b><font size=\"+4\" color=\"#990033\"><br>\n MICROGRAPHIA:</font><font size=\"+4\"> </font></b></font></h1>\n<p align=\"center\"><b>OR SOME </b></p>\n<p align=\"center\"><font size=\"5\">Physiological Descriptions </font></p>\n<p align=\"center\"><b>O F</b></p>\n<p align=\"center\"> <font size=\"6\"><b><font color=\"#9F1040\">MINUTE BODIES</font></b></font></p>\n<p align=\"center\"> <b>MADE BY </b></p>\n<p align=\"center\"><font size=\"5\" color=\"#9F1040\">MAGNIFYING GLASSES. </font></p>\n<p align=\"center\"><b>WITH </b></p>\n<p align=\"center\"><b><font color=\"#990033\">OBSERVATIONS</font></b> and <b><font color=\"#9F1040\">INQUIRIES</font></b> \n thereupon.</p>\n<p align=\"center\"> By <font color=\"#990033\"><i><b>R. HOOKE</b></i></font><b><i> \n ,</i></b> Fellow of the <font color=\"#990033\">ROYAL SOCIETY</font> .</p>\n<p align=\"center\"><img src=\"images/Octavo/crest.jpg\" width=\"320\" height=\"342\"></p>\n<blockquote> \n <blockquote> \n <blockquote> \n <p align=\"center\"><i>LONDON</i>, Printed by <font color=\"#990033\"><i>Jo. \n Martyn</i>,</font> and <font color=\"#990033\"><i>Ja. Allestry,</i></font> \n Printers to the <font color=\"#990033\">ROYAL SOCIETY </font>, and are to \n be sold at their Shop at the Bell in S. Paul's Church-yard. <font color=\"#990000\">M \n D C L X V.</font></p>\n <p align=\"center\"><font color=\"#990000\"><br>\n </font></p>\n </blockquote>\n <p><a href=\"index.html\"><img src=\"images/htmldemo/back.jpg\" width=\"146\" height=\"40\" align=\"left\" border=\"0\"></a><a href=\"king.html\"><img src=\"images/htmldemo/forward.jpg\" width=\"196\" height=\"40\" align=\"right\" border=\"0\"></a></p>\n </blockquote>\n</blockquote>\n</body>\n</html>\n"} +{"text": "/**\n * Do not edit this file. Any changes will be overwritten by the gamedata\n * updater or by upgrading your AMX Mod X install.\n *\n * To override data in this file, create a subdirectory named \"custom\" and\n * place your own gamedata file(s) inside of it. Such files will be parsed\n * after AMXX's own.\n *\n * For more information, see http://wiki.alliedmods.net/Gamedata_Updating_(AMX_Mod_X)\n */\n\n\"Games\"\n{\n\t\"#default\"\n\t{\n\t\t\"Classes\"\n\t\t{\n\t\t\t\"CItemSpawnCTF\"\n\t\t\t{\n\t\t\t\t\"Offsets\"\n\t\t\t\t{\n\t\t\t\t\t\"team_no\" // int\n\t\t\t\t\t{\n\t\t\t\t\t\t\"type\" \"integer\"\n\n\t\t\t\t\t\t\"windows\" \"96\"\n\t\t\t\t\t\t\"linux\" \"112\"\n\t\t\t\t\t\t\"mac\" \"112\"\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n}\n\n\n/**\n * Class Hierarchy\n * -\n * CBaseEntity\n * CPointEntity\n * CItemSpawnCTF\n */\n"} +{"text": "exports.extract = require('./extract')\nexports.pack = require('./pack')\n"} +{"text": "#!/bin/bash\n\nLOG_FILES=$LOGS_DIR/*\n\nfor FILE in $LOG_FILES; do\n echo -e \"\\n\\n\\n\"\n echo \"==================================================================\"\n echo \" $FILE\"\n echo \"==================================================================\"\n cat $FILE\ndone\n"} +{"text": "/**********************************************************\r\n \r\n Mint schema\r\n\r\n**********************************************************/\r\n\r\n\r\nclass MSFT_Expression { \r\n string SourceInfo; /* defaults to empty string */\r\n string SourceLines[]; /* defaults to empty array,\r\n null values == empty string */\r\n};\r\nclass MSFT_ExpressionIdentifier : MSFT_Expression {\r\n string name;\r\n};\r\nclass MSFT_ExpressionKeywordParameter : MSFT_ExpressionIdentifier {\r\n string keywordalias; /* if set, this string is used for keyword binding instead of the name */\r\n /* restricted to [A-Za-z0-9_]+ */\r\n};\r\nclass MSFT_ExpressionKeywordValue : MSFT_Expression {\r\n string keyword; /* restricted to [A-Za-z0-9_]+ */\r\n};\r\n/* only valid as a base class, not as an instance */\r\nclass MSFT_ExpressionValue : MSFT_Expression { \r\n boolean hasValue;\r\n};\r\nclass MSFT_ExpressionCall : MSFT_Expression {\r\n [EmbeddedInstance(\"MSFT_Expression\")] string function;\r\n [EmbeddedInstance(\"MSFT_Expression\")] string pipeline; /* defaults to void value */\r\n [EmbeddedInstance(\"MSFT_Expression\")] string arguments[];\r\n};\r\nclass MSFT_ExpressionLambda : MSFT_Expression {\r\n [EmbeddedInstance(\"MSFT_ExpressionIdentifier\")] string pipeline; /* may be null - pipeline input cannot be passed when applying the lambda */\r\n [EmbeddedInstance(\"MSFT_ExpressionIdentifier\")] string parameters[];\r\n [EmbeddedInstance(\"MSFT_Expression\")] string body;\r\n};\r\nclass MSFT_ExpressionIf : MSFT_Expression {\r\n [EmbeddedInstance(\"MSFT_Expression\")] string condition;\r\n [EmbeddedInstance(\"MSFT_Expression\")] string truecase;\r\n [EmbeddedInstance(\"MSFT_Expression\")] string falsecase; /* may be null - implies void value */\r\n};\r\nclass MSFT_ExpressionLoop : MSFT_Expression {\r\n [EmbeddedInstance(\"MSFT_Expression\")] string condition;\r\n [EmbeddedInstance(\"MSFT_Expression\")] string body;\r\n [EmbeddedInstance(\"MSFT_Expression\")] string result; /* may be null - implies void value */\r\n};\r\nclass MSFT_ExpressionAssignment : MSFT_Expression {\r\n [EmbeddedInstance(\"MSFT_ExpressionIdentifier\")] string lvalue;\r\n [EmbeddedInstance(\"MSFT_Expression\")] string rvalue; /* may be null - implies void value */\r\n};\r\nclass MSFT_ExpressionLet : MSFT_Expression {\r\n [EmbeddedInstance(\"MSFT_ExpressionAssignment\")] string initializers[];\r\n [EmbeddedInstance(\"MSFT_Expression\")] string body;\r\n};\r\nclass MSFT_ExpressionBegin : MSFT_Expression {\r\n [EmbeddedInstance(\"MSFT_Expression\")] string body[];\r\n};\r\nclass MSFT_ExpressionValue_boolean : MSFT_ExpressionValue {\r\n boolean value;\r\n};\r\nclass MSFT_ExpressionValue_uint8 : MSFT_ExpressionValue {\r\n uint8 value;\r\n};\r\nclass MSFT_ExpressionValue_sint8 : MSFT_ExpressionValue {\r\n sint8 value;\r\n};\r\nclass MSFT_ExpressionValue_uint16 : MSFT_ExpressionValue {\r\n uint16 value;\r\n};\r\nclass MSFT_ExpressionValue_sint16 : MSFT_ExpressionValue {\r\n sint16 value;\r\n};\r\nclass MSFT_ExpressionValue_uint32 : MSFT_ExpressionValue {\r\n uint32 value;\r\n};\r\nclass MSFT_ExpressionValue_sint32 : MSFT_ExpressionValue {\r\n sint32 value;\r\n};\r\nclass MSFT_ExpressionValue_uint64 : MSFT_ExpressionValue {\r\n uint64 value;\r\n};\r\nclass MSFT_ExpressionValue_sint64 : MSFT_ExpressionValue {\r\n sint64 value;\r\n};\r\nclass MSFT_ExpressionValue_real32 : MSFT_ExpressionValue {\r\n real32 value;\r\n};\r\nclass MSFT_ExpressionValue_real64 : MSFT_ExpressionValue {\r\n real64 value;\r\n};\r\nclass MSFT_ExpressionValue_char16 : MSFT_ExpressionValue {\r\n char16 value;\r\n};\r\nclass MSFT_ExpressionValue_datetime : MSFT_ExpressionValue {\r\n datetime value;\r\n};\r\nclass MSFT_ExpressionValue_string : MSFT_ExpressionValue {\r\n string value;\r\n};\r\nclass MSFT_ExpressionValue_booleana : MSFT_ExpressionValue {\r\n boolean value[];\r\n};\r\nclass MSFT_ExpressionValue_uint8a : MSFT_ExpressionValue {\r\n uint8 value[];\r\n};\r\nclass MSFT_ExpressionValue_sint8a : MSFT_ExpressionValue {\r\n sint8 value[];\r\n};\r\nclass MSFT_ExpressionValue_uint16a : MSFT_ExpressionValue {\r\n uint16 value[];\r\n};\r\nclass MSFT_ExpressionValue_sint16a : MSFT_ExpressionValue {\r\n sint16 value[];\r\n};\r\nclass MSFT_ExpressionValue_uint32a : MSFT_ExpressionValue {\r\n uint32 value[];\r\n};\r\nclass MSFT_ExpressionValue_sint32a : MSFT_ExpressionValue {\r\n sint32 value[];\r\n};\r\nclass MSFT_ExpressionValue_uint64a : MSFT_ExpressionValue {\r\n uint64 value[];\r\n};\r\nclass MSFT_ExpressionValue_sint64a : MSFT_ExpressionValue {\r\n sint64 value[];\r\n};\r\nclass MSFT_ExpressionValue_real32a : MSFT_ExpressionValue {\r\n real32 value[];\r\n};\r\nclass MSFT_ExpressionValue_real64a : MSFT_ExpressionValue {\r\n real64 value[];\r\n};\r\nclass MSFT_ExpressionValue_char16a : MSFT_ExpressionValue {\r\n char16 value[];\r\n};\r\nclass MSFT_ExpressionValue_datetimea : MSFT_ExpressionValue {\r\n datetime value[];\r\n};\r\nclass MSFT_ExpressionValue_stringa : MSFT_ExpressionValue {\r\n string value[];\r\n};\r\n"} +{"text": "0\n"} +{"text": "/*\n * JFFS2 -- Journalling Flash File System, Version 2.\n *\n * Copyright © 2006 NEC Corporation\n *\n * Created by KaiGai Kohei <kaigai@ak.jp.nec.com>\n *\n * For licensing information, see the file 'LICENCE' in this directory.\n *\n */\n\n#include <linux/kernel.h>\n#include <linux/fs.h>\n#include <linux/jffs2.h>\n#include <linux/xattr.h>\n#include <linux/mtd/mtd.h>\n#include \"nodelist.h\"\n\nstatic int jffs2_user_getxattr(struct dentry *dentry, const char *name,\n\t\t\t void *buffer, size_t size, int type)\n{\n\tif (!strcmp(name, \"\"))\n\t\treturn -EINVAL;\n\treturn do_jffs2_getxattr(dentry->d_inode, JFFS2_XPREFIX_USER,\n\t\t\t\t name, buffer, size);\n}\n\nstatic int jffs2_user_setxattr(struct dentry *dentry, const char *name,\n\t\tconst void *buffer, size_t size, int flags, int type)\n{\n\tif (!strcmp(name, \"\"))\n\t\treturn -EINVAL;\n\treturn do_jffs2_setxattr(dentry->d_inode, JFFS2_XPREFIX_USER,\n\t\t\t\t name, buffer, size, flags);\n}\n\nstatic size_t jffs2_user_listxattr(struct dentry *dentry, char *list,\n\t\tsize_t list_size, const char *name, size_t name_len, int type)\n{\n\tsize_t retlen = XATTR_USER_PREFIX_LEN + name_len + 1;\n\n\tif (list && retlen <= list_size) {\n\t\tstrcpy(list, XATTR_USER_PREFIX);\n\t\tstrcpy(list + XATTR_USER_PREFIX_LEN, name);\n\t}\n\n\treturn retlen;\n}\n\nconst struct xattr_handler jffs2_user_xattr_handler = {\n\t.prefix = XATTR_USER_PREFIX,\n\t.list = jffs2_user_listxattr,\n\t.set = jffs2_user_setxattr,\n\t.get = jffs2_user_getxattr\n};\n"} +{"text": "@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n@prefix : <http://www.w3.org/2009/sparql/docs/tests/data-sparql11/basic-update/manifest#> .\n@prefix rdfs:\t<http://www.w3.org/2000/01/rdf-schema#> .\n@prefix mf: <http://www.w3.org/2001/sw/DataAccess/tests/test-manifest#> .\n@prefix ut: <http://www.w3.org/2009/sparql/tests/test-update#> .\n@prefix dawgt: <http://www.w3.org/2001/sw/DataAccess/tests/test-dawg#> .\n@prefix sd: <http://www.w3.org/ns/sparql-service-description#> .\n\n<> rdf:type mf:Manifest ;\n rdfs:label \"Basic SPARQL 1.1 Update test cases\" ;\n mf:entries\n ( \n :insert-data-spo1\n :insert-data-spo-named1\n :insert-data-spo-named2\n :insert-data-spo-named3\n :insert-where-01\n :insert-where-02\n :insert-where-03\n :insert-where-04\n :insert-using-01\n :insert-05a\n :insert-data-same-bnode\n :insert-where-same-bnode\n :insert-where-same-bnode2\n ) .\n\n:insert-data-spo1 rdf:type mf:UpdateEvaluationTest ;\n mf:name \"Simple insert data 1\" ;\n rdfs:comment \"This is a simple insert of a single triple to the unnamed graph of an empty graph store\" ;\n dawgt:approval dawgt:Approved;\n dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-02-07#resolution_3> ;\n mf:action [ ut:request <insert-data-spo1.ru> ; \n ] ;\n mf:result [ ut:result ut:success ; \n ut:data <spo.ttl>\n ] .\n\n\n:insert-data-spo-named1 rdf:type mf:UpdateEvaluationTest ;\n mf:name \"Simple insert data named 1\" ;\n rdfs:comment \"This is a simple insert of a single triple into the named graph <http://example.org/g1> of an empty graph store\" ;\n dawgt:approval dawgt:Approved;\n dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-02-07#resolution_3> ;\n mf:action [ ut:request <insert-data-named1.ru> ; \n ] ;\n mf:result [ ut:result ut:success ; \n ut:graphData [ ut:graph <spo.ttl> ;\n rdfs:label \"http://example.org/g1\" ] \n ] .\n\n:insert-data-spo-named2 rdf:type mf:UpdateEvaluationTest ;\n mf:name \"Simple insert data named 2\" ;\n rdfs:comment \"This is a simple insert of a single triple into the named graph <http://example.org/g1> of a graph store consisting of an empty unnamed graph and the named graph holds one (different) triple already\" ;\n dawgt:approval dawgt:Approved;\n dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-02-07#resolution_3> ;\n mf:action [ ut:request <insert-data-named2.ru> ; \n ut:graphData [ ut:graph <spo.ttl> ;\n rdfs:label \"http://example.org/g1\" ]\n ] ;\n mf:result [ ut:result ut:success ; \n ut:graphData [ ut:graph <spo2.ttl> ;\n rdfs:label \"http://example.org/g1\" ]\n ] .\n\n:insert-data-spo-named3 rdf:type mf:UpdateEvaluationTest ;\n mf:name \"Simple insert data named 3\" ;\n rdfs:comment \"This is a simple insert of a single triple into the named graph <http://example.org/g1> of a graph store consisting of an empty unnamed graph and the named holds the inserted triple already (using the same query as insert-data-named1)\" ;\n dawgt:approval dawgt:Approved;\n dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-02-07#resolution_3> ;\n mf:action [ ut:request <insert-data-named1.ru> ; \n ut:graphData [ ut:graph <spo.ttl> ;\n rdfs:label \"http://example.org/g1\" ]\n ] ;\n mf:result [ ut:result ut:success ; \n ut:graphData [ ut:graph <spo.ttl> ;\n rdfs:label \"http://example.org/g1\" ]\n ] .\n\n:insert-where-01 a mf:UpdateEvaluationTest ;\n mf:name \"INSERT 01\" ;\n rdfs:comment \"This is a INSERT over a dataset with a single triple in the default graph\" ;\n dawgt:approval dawgt:Approved;\n dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-02-07#resolution_3> ;\n mf:action [\n \t\t\tut:request <insert-01.ru> ; \n ut:data <insert-01-pre.ttl> ;\n ] ;\n mf:result [\n ut:data <insert-01-post.ttl> ;\n ] ;\n .\n\n:insert-where-02 a mf:UpdateEvaluationTest ;\n mf:name \"INSERT 02\" ;\n rdfs:comment \"This is a INSERT over a dataset with a single triple in the default graph, inserting into a named graph\" ;\n dawgt:approval dawgt:Approved;\n dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-02-07#resolution_3> ;\n mf:action [\n \t\t\tut:request <insert-02.ru> ; \n ut:data <insert-02-pre.ttl> ;\n ] ;\n mf:result [\n ut:data <insert-02-post.ttl> ;\n ut:graphData [ ut:graph <insert-02-g1-post.ttl> ;\n rdfs:label \"http://example.org/g1\" ] ;\n ] ;\n .\n\n:insert-where-03 a mf:UpdateEvaluationTest ;\n mf:name \"INSERT 03\" ;\n rdfs:comment \"This is a INSERT over a dataset with a single triple in a named graph, inserting into the named graph using the WITH keyword\" ;\n dawgt:approval dawgt:Approved;\n dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-02-07#resolution_3> ;\n mf:action [\n \t\t\tut:request <insert-03.ru> ; \n ut:data <insert-03-pre.ttl> ;\n ut:graphData [ ut:graph <insert-03-g1-pre.ttl> ;\n rdfs:label \"http://example.org/g1\" ] ;\n ] ;\n mf:result [\n ut:data <insert-03-post.ttl> ;\n ut:graphData [ ut:graph <insert-03-g1-post.ttl> ;\n rdfs:label \"http://example.org/g1\" ] ;\n ] ;\n .\n\n:insert-where-04 a mf:UpdateEvaluationTest ;\n mf:name \"INSERT 04\" ;\n rdfs:comment \"This is a INSERT of a triple over a dataset with data in named graphs, inserting into the default graph using the USING keyword\" ;\n dawgt:approval dawgt:Approved;\n dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-02-07#resolution_3> ;\n mf:action [\n \t\t\tut:request <insert-04.ru> ; \n ut:data <insert-04-pre.ttl> ;\n ut:graphData [ ut:graph <insert-04-g1-pre.ttl> ;\n rdfs:label \"http://example.org/g1\" ] ;\n ] ;\n mf:result [\n ut:data <insert-04-post.ttl> ;\n ut:graphData [ ut:graph <insert-04-g1-post.ttl> ;\n rdfs:label \"http://example.org/g1\" ] ;\n ] ;\n .\n\n:insert-using-01 a mf:UpdateEvaluationTest ;\n mf:name \"INSERT USING 01\" ;\n rdfs:comment \"This is an INSERT into the default graph of two triples constructed from the data in two named graphs that are treated as the default graph during matching with the USING keyword.\" ;\n dawgt:approval dawgt:Approved;\n dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-02-07#resolution_3> ;\n mf:action [\n \t\t\tut:request <insert-using-01.ru> ; \n ut:data <insert-using-01-pre.ttl> ;\n ut:graphData [ ut:graph <insert-using-01-g1-pre.ttl> ;\n rdfs:label \"http://example.org/g1\" ] ;\n ut:graphData [ ut:graph <insert-using-01-g2-pre.ttl> ;\n rdfs:label \"http://example.org/g2\" ] ;\n ] ;\n mf:result [\n ut:data <insert-using-01-post.ttl> ;\n ut:graphData [ ut:graph <insert-using-01-g1-post.ttl> ;\n rdfs:label \"http://example.org/g1\" ] ;\n ut:graphData [ ut:graph <insert-using-01-g2-post.ttl> ;\n rdfs:label \"http://example.org/g2\" ] ;\n ] ;\n .\n\n# 2012-07-10: :insert-05 was removed from the manifest list (in favor of :insert-05a) as mf:result isn't able to properly capture the situation of a bnode being shared across graphs in the expected resulting graph store state.\n:insert-05 a mf:UpdateEvaluationTest ;\n mf:name \"INSERT same bnode twice\" ; \n rdfs:comment \"As per http://lists.w3.org/Archives/Public/public-rdf-dawg/2012AprJun/0165.html. Tests whether inserting the same triples from the same source graph into the same target graph twice is idempotent, even in the presence of blank nodes. Note that this doesn't imply that blank nodes are actually shared across graphs, but only that the two graphs remain equivalent, cf. http://lists.w3.org/Archives/Public/public-rdf-dawg/2012JulSep/0009.html\" ; \n dawgt:approval dawgt:NotClassified ;\n mf:action [\n ut:request <insert-05.ru> ;\n ut:graphData [ ut:graph <insert-05-g1-pre.ttl> ;\n rdfs:label \"http://example.org/g1\" ] ;\n ] ;\n mf:result [\n ut:graphData [ ut:graph <insert-05-g1-pre.ttl> ;\n rdfs:label \"http://example.org/g1\" ] ;\n ut:graphData [ ut:graph <insert-05-g1-pre.ttl> ;\n rdfs:label \"http://example.org/g2\" ] ;\n ] ;\n . \n\n:insert-05a a mf:UpdateEvaluationTest ;\n mf:name \"INSERT same bnode twice\" ; \n rdfs:comment \"As per http://lists.w3.org/Archives/Public/public-rdf-dawg/2012AprJun/0165.html\" ; \n dawgt:approval dawgt:Approved ;\n dawgt:approvedBy <http://www.w3.org/2009/sparql/meeting/2012-08-07#resolution_3> ;\n mf:action [\n ut:request <insert-05a.ru> ;\n ut:graphData [ ut:graph <insert-05a-g1-pre.ttl> ;\n rdfs:label \"http://example.org/g1\" ] ;\n ] ;\n mf:result [\n ut:graphData [ ut:graph <insert-05a-g3-post.ttl> ;\n rdfs:label \"http://example.org/g3\" ] ;\n ] ;\n . \n\n:insert-data-same-bnode a mf:UpdateEvaluationTest ;\n mf:name \"INSERTing the same bnode with INSERT DATA into two different Graphs is the same bnode\" ; \n rdfs:comment \"http://lists.w3.org/Archives/Public/public-rdf-dawg/2012JulSep/0196.html, this can be viewed as a variation of :insert-05a\" ; \n dawgt:approval dawgt:NotClassified ;\n mf:action [\n ut:request <insert-data-same-bnode.ru> ;\n ] ;\n mf:result [\n ut:graphData [ ut:graph <insert-05a-g3-post.ttl> ;\n rdfs:label \"http://example.org/g3\" ] ;\n ] ;\n . \n\n:insert-where-same-bnode a mf:UpdateEvaluationTest ;\n mf:name \"INSERTing the same bnode with two INSERT WHERE statement within one request is NOT the same bnode\" ;\n rdfs:comment \"http://lists.w3.org/Archives/Public/public-rdf-dawg/2012OctDec/0001.html, this can be viewed as a further variation of :insert-05a\" ;\n dawgt:approval dawgt:NotClassified ;\n mf:action [\n ut:request <insert-where-same-bnode.ru> ;\n ut:data <insert-where-same-bnode-pre.ttl> ;\n\n ] ;\n mf:result [\n ut:data <insert-where-same-bnode-pre.ttl> ;\n ut:graphData [ ut:graph <insert-where-same-bnode-g3-post.ttl> ;\n rdfs:label \"http://example.org/g3\" ] ;\n ] ;\n .\n\n:insert-where-same-bnode2 a mf:UpdateEvaluationTest ;\n mf:name \"INSERTing the same bnode with two INSERT WHERE statement within one request is NOT the same bnode even if both WHERE clauses have the empty solution mapping as the only solution.\" ;\n rdfs:comment \"http://lists.w3.org/Archives/Public/public-rdf-dawg/2012OctDec/0001.html, this can be viewed as a further variation of :insert-05a\" ;\n dawgt:approval dawgt:NotClassified ;\n mf:action [\n ut:request <insert-where-same-bnode2.ru> ;\n ut:data <insert-where-same-bnode-pre.ttl> ;\n\n ] ;\n mf:result [\n ut:data <insert-where-same-bnode-pre.ttl> ;\n ut:graphData [ ut:graph <insert-where-same-bnode-g3-post.ttl> ;\n rdfs:label \"http://example.org/g3\" ] ;\n ] ;\n .\n\n"} +{"text": "{\n \"name\": \"js-yaml\",\n \"version\": \"2.0.5\",\n \"description\": \"YAML 1.2 parser and serializer\",\n \"keywords\": [\n \"yaml\",\n \"parser\",\n \"serializer\",\n \"pyyaml\"\n ],\n \"homepage\": \"https://github.com/nodeca/js-yaml\",\n \"author\": {\n \"name\": \"Dervus Grim\",\n \"email\": \"dervus@lavabit.com\"\n },\n \"contributors\": [\n {\n \"name\": \"Aleksey V Zapparov\",\n \"email\": \"ixti@member.fsf.org\",\n \"url\": \"http://www.ixti.net/\"\n },\n {\n \"name\": \"Martin Grenfell\",\n \"email\": \"martin.grenfell@gmail.com\",\n \"url\": \"http://got-ravings.blogspot.com\"\n }\n ],\n \"bugs\": {\n \"url\": \"https://github.com/nodeca/js-yaml/issues\"\n },\n \"license\": {\n \"type\": \"MIT\",\n \"url\": \"https://github.com/nodeca/js-yaml/blob/master/LICENSE\"\n },\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git://github.com/nodeca/js-yaml.git\"\n },\n \"main\": \"./index.js\",\n \"bin\": {\n \"js-yaml\": \"bin/js-yaml.js\"\n },\n \"scripts\": {\n \"test\": \"make test\"\n },\n \"dependencies\": {\n \"argparse\": \"~ 0.1.11\",\n \"esprima\": \"~ 1.0.2\"\n },\n \"devDependencies\": {\n \"mocha\": \"*\"\n },\n \"engines\": {\n \"node\": \">= 0.6.0\"\n },\n \"readme\": \"JS-YAML - YAML 1.2 parser and serializer for JavaScript\\n=======================================================\\n\\n[![Build Status](https://secure.travis-ci.org/nodeca/js-yaml.png)](http://travis-ci.org/nodeca/js-yaml)\\n\\n[Online Demo](http://nodeca.github.com/js-yaml/)\\n\\n\\nThis is an implementation of [YAML](http://yaml.org/), a human friendly data\\nserialization language. Started as [PyYAML](http://pyyaml.org/) port, it was\\ncompletely rewritten from scratch. Now it's very fast, and supports 1.2 spec.\\n\\n\\nBreaking changes in 1.x.x -> 2.0.x\\n----------------------------------\\n\\nIf your have not used __custom__ tags or loader classes - no changes needed. Just\\nupgrade library and enjoy high parse speed.\\n\\nIn other case, you should rewrite your tag constructors and custom loader\\nclasses, to conform new schema-based API. See\\n[examples](https://github.com/nodeca/js-yaml/tree/master/examples) and\\n[wiki](https://github.com/nodeca/js-yaml/wiki) for details.\\nNote, that parser internals were completely rewritten.\\n\\n\\nInstallation\\n------------\\n\\n### YAML module for node.js\\n\\n```\\nnpm install js-yaml\\n```\\n\\n\\n### CLI executable\\n\\nIf you want to inspect your YAML files from CLI, install js-yaml globally:\\n\\n```\\nnpm install js-yaml -g\\n```\\n\\n#### Usage\\n\\n```\\nusage: js-yaml [-h] [-v] [-c] [-j] [-t] file\\n\\nPositional arguments:\\n file File with YAML document(s)\\n\\nOptional arguments:\\n -h, --help Show this help message and exit.\\n -v, --version Show program's version number and exit.\\n -c, --compact Display errors in compact mode\\n -j, --to-json Output a non-funky boring JSON\\n -t, --trace Show stack trace on error\\n```\\n\\n\\n### Bundled YAML library for browsers\\n\\n``` html\\n<script src=\\\"js-yaml.min.js\\\"></script>\\n<script type=\\\"text/javascript\\\">\\nvar doc = jsyaml.load('greeting: hello\\\\nname: world');\\n</script>\\n```\\n\\nBrowser support was done mostly for online demo. If you find any errors - feel\\nfree to send pull requests with fixes. Also note, that IE and other old browsers\\nneeds [es5-shims](https://github.com/kriskowal/es5-shim) to operate.\\n\\n\\nAPI\\n---\\n\\nHere we cover the most 'useful' methods. If you need advanced details (creating\\nyour own tags), see [wiki](https://github.com/nodeca/js-yaml/wiki) and\\n[examples](https://github.com/nodeca/js-yaml/tree/master/examples) for more\\ninfo.\\n\\nIn node.js JS-YAML automatically registers handlers for `.yml` and `.yaml`\\nfiles. You can load them just with `require`. That's mostly equivalent to\\ncalling `load()` on fetched content of a file. Just with one string!\\n\\n``` javascript\\nrequire('js-yaml');\\n\\n// Get document, or throw exception on error\\ntry {\\n var doc = require('/home/ixti/example.yml');\\n console.log(doc);\\n} catch (e) {\\n console.log(e);\\n}\\n```\\n\\n\\n### load (string [ , options ])\\n\\nParses `string` as single YAML document. Returns a JavaScript object or throws\\n`YAMLException` on error.\\n\\nNOTE: This function **does not** understands multi-document sources, it throws\\nexception on those.\\n\\noptions:\\n\\n- `filename` _(default: null)_ - string to be used as a file path in\\n error/warning messages.\\n- `strict` _(default - false)_ makes the loader to throw errors instead of\\n warnings.\\n- `schema` _(default: `DEFAULT_SCHEMA`)_ - specifies a schema to use.\\n\\n\\n### loadAll (string, iterator [ , options ])\\n\\nSame as `load()`, but understands multi-document sources and apply `iterator` to\\neach document.\\n\\n``` javascript\\nvar yaml = require('js-yaml');\\n\\nyaml.loadAll(data, function (doc) {\\n console.log(doc);\\n});\\n```\\n\\n\\n### safeLoad (string [ , options ])\\n\\nSame as `load()` but uses `SAFE_SCHEMA` by default - only recommended tags of\\nYAML specification (no JavaScript-specific tags, e.g. `!!js/regexp`).\\n\\n\\n### safeLoadAll (string, iterator [ , options ])\\n\\nSame as `loadAll()` but uses `SAFE_SCHEMA` by default - only recommended tags of\\nYAML specification (no JavaScript-specific tags, e.g. `!!js/regexp`).\\n\\n\\n### dump (object [ , options ])\\n\\nSerializes `object` as YAML document.\\n\\noptions:\\n\\n- `indent` _(default: 2)_ - indentation width to use (in spaces).\\n- `flowLevel` (default: -1) - specifies level of nesting, when to switch from\\n block to flow style for collections. -1 means block style everwhere\\n- `styles` - \\\"tag\\\" => \\\"style\\\" map. Each tag may have own set of styles.\\n- `schema` _(default: `DEFAULT_SCHEMA`)_ specifies a schema to use.\\n\\nstyles:\\n\\n``` none\\n!!null\\n \\\"canonical\\\" => \\\"~\\\"\\n\\n!!int\\n \\\"binary\\\" => \\\"0b1\\\", \\\"0b101010\\\", \\\"0b1110001111010\\\"\\n \\\"octal\\\" => \\\"01\\\", \\\"052\\\", \\\"016172\\\"\\n \\\"decimal\\\" => \\\"1\\\", \\\"42\\\", \\\"7290\\\"\\n \\\"hexadecimal\\\" => \\\"0x1\\\", \\\"0x2A\\\", \\\"0x1C7A\\\"\\n\\n!!null, !!bool, !!float\\n \\\"lowercase\\\" => \\\"null\\\", \\\"true\\\", \\\"false\\\", \\\".nan\\\", '.inf'\\n \\\"uppercase\\\" => \\\"NULL\\\", \\\"TRUE\\\", \\\"FALSE\\\", \\\".NAN\\\", '.INF'\\n \\\"camelcase\\\" => \\\"Null\\\", \\\"True\\\", \\\"False\\\", \\\".NaN\\\", '.Inf'\\n```\\n\\nBy default, !!int uses `decimal`, and !!null, !!bool, !!float use `lowercase`.\\n\\n\\n### safeDump (object [ , options ])\\n\\nSame as `dump()` but uses `SAFE_SCHEMA` by default - only recommended tags of\\nYAML specification (no JavaScript-specific tags, e.g. `!!js/regexp`).\\n\\n\\nSupported YAML types\\n--------------------\\n\\nThe list of standard YAML tags and corresponding JavaScipt types. See also\\n[YAML tag discussion](http://pyyaml.org/wiki/YAMLTagDiscussion) and\\n[YAML types repository](http://yaml.org/type/).\\n\\n```\\n!!null '' # null\\n!!bool 'yes' # bool\\n!!int '3...' # number\\n!!float '3.14...' # number\\n!!binary '...base64...' # buffer\\n!!timestamp 'YYYY-...' # date\\n!!omap [ ... ] # array of key-value pairs\\n!!pairs [ ... ] # array or array pairs\\n!!set { ... } # array of objects with given keys and null values\\n!!str '...' # string\\n!!seq [ ... ] # array\\n!!map { ... } # object\\n```\\n\\n**JavaScript-specific tags**\\n\\n```\\n!!js/regexp /pattern/gim # RegExp\\n!!js/undefined '' # Undefined\\n!!js/function 'function () {...}' # Function\\n```\\n\\n\\n\\n\\n## Caveats\\n\\nNote, that you use arrays or objects as key in JS-YAML. JS do not allows objects\\nor array as keys, and stringifies (by calling .toString method) them at the\\nmoment of adding them.\\n\\n``` yaml\\n---\\n? [ foo, bar ]\\n: - baz\\n? { foo: bar }\\n: - baz\\n - baz\\n```\\n\\n``` javascript\\n{ \\\"foo,bar\\\": [\\\"baz\\\"], \\\"[object Object]\\\": [\\\"baz\\\", \\\"baz\\\"] }\\n```\\n\\nAlso, reading of properties on implicit block mapping keys is not supported yet.\\nSo, the following YAML document cannot be loaded.\\n\\n``` yaml\\n&anchor foo:\\n foo: bar\\n *anchor: duplicate key\\n baz: bat\\n *anchor: duplicate key\\n```\\n\\n## License\\n\\nView the [LICENSE](https://github.com/nodeca/js-yaml/blob/master/LICENSE) file\\n(MIT).\\n\",\n \"readmeFilename\": \"README.md\",\n \"_id\": \"js-yaml@2.0.5\",\n \"_from\": \"js-yaml@~2.0.5\"\n}\n"} +{"text": "/* Hello, Emacs, this is -*-C-*-\n * $Id: hp26.trm,v 1.19 2007/01/16 23:11:55 sfeam Exp $\n */\n\n/* GNUPLOT - HP26.trm */\n\n/*[\n * Copyright 1990 - 1993, 1998, 2004\n *\n * Permission to use, copy, and distribute this software and its\n * documentation for any purpose with or without fee is hereby granted,\n * provided that the above copyright notice appear in all copies and\n * that both that copyright notice and this permission notice appear\n * in supporting documentation.\n *\n * Permission to modify the software is granted, but not the right to\n * distribute the complete modified source code. Modifications are to\n * be distributed as patches to the released version. Permission to\n * distribute binaries produced by compiling modified sources is granted,\n * provided you\n * 1. distribute the corresponding source modifications from the\n * released version in the form of a patch file along with the binaries,\n * 2. add special version identification to distinguish your version\n * in addition to the base release version number,\n * 3. provide your name and address as the primary contact for the\n * support of your modified version, and\n * 4. retain our contact information in regard to use of the base\n * software.\n * Permission to distribute the released version of the source code along\n * with corresponding source modifications in the form of a patch file is\n * granted with same provisions 2 through 4 for binary distributions.\n *\n * This software is provided \"as is\" without express or implied warranty\n * to the extent permitted by applicable law.\n]*/\n\n/*\n * This file is included by ../term.c.\n *\n * This terminal driver supports:\n * HP2623A\n *\n * AUTHORS\n * luecken@udel.edu (Bruce Lueckenhoff)\n * hplvlch!ch (Chuck Heller)\n *\n * send your comments or suggestions to (gnuplot-info@lists.sourceforge.net).\n *\n */\n\n/*\n * adapted to the new terminal layout by Stefan Bodewig (Dec. 1995)\n */\n\n//#include \"driver.h\"\n\n#ifdef TERM_REGISTER\nregister_term(hp2623a)\n#endif\n\n#ifdef TERM_PROTO\nstatic void HP26_vector(uint x, uint y);\nstatic void HP26_move(uint x, uint y);\nstatic void HP26_init();\nstatic void HP26_graphics();\nstatic void HP26_text();\nstatic void HP26_reset();\nstatic int HP26_text_angle(int ang);\nstatic void HP26_put_text(uint x, uint y, const char * str);\nstatic void HP26_linetype(int linetype);\nstatic void HP26_line_and_point(uint x, uint y, int number);\n\n#define HP26_XMAX 512\n#define HP26_YMAX 390\n\n/* Use a size 1 character, or a 7 x 10 grid. */\n#define HP26_VCHAR\t10\n#define HP26_HCHAR\t7\n#define HP26_VTIC\t5\n#define HP26_HTIC\t5\n#endif /* TERM_PROTO */\n\n#ifndef TERM_PROTO_ONLY\n#ifdef TERM_BODY\n\n#define HP26_XLAST (HP26_XMAX - 1)\n#define HP26_YLAST (HP26_XMAX - 1)\n\nstatic void HP26_do_point(uint x, uint y, int number);\nstatic struct _HP26_Buffer_Node *BN_create __PROTO((int index, int size, int linetype));\nstatic void BN_delete __PROTO((struct _HP26_Buffer_Node * the_node));\nstatic int HP26_flush __PROTO((struct _HP26_Buffer_Node * the_buff));\nstatic void HP26_handle_overflow();\n\ntypedef struct _HP26_Buffer_Node {\n int index;\n int size;\n int next;\n int linetype;\n int *x;\n int *y;\n bool *isa_move;\n} HP26_Buffer_Node;\n\n/* constructor method */\nstatic HP26_Buffer_Node *\nBN_create(int index, int size, int linetype)\n{\n HP26_Buffer_Node *the_node;\n the_node = (HP26_Buffer_Node *) malloc(sizeof(HP26_Buffer_Node), \"HP26\");\n if(the_node) {\n\tthe_node->index = index;\n\tthe_node->linetype = linetype;\n\tthe_node->size = size;\n\tthe_node->next = 0;\n\tthe_node->x = (int *) malloc(size*sizeof(int), \"HP26\");\n\tthe_node->y = (int *) malloc(size*sizeof(int), \"HP26\");\n\tthe_node->isa_move = (bool *) malloc(size*sizeof(bool), \"HP26\");\n\tif(the_node->x == NULL || the_node->y == NULL || the_node->isa_move == NULL)\n\t return (NULL);\n }\n memzero(the_node->isa_move, size*sizeof(bool));\n return (the_node);\n}\n\n/* destructor method */\nstatic void\nBN_delete(HP26_Buffer_Node *the_node)\n{\n SAlloc::F(the_node->x);\n SAlloc::F(the_node->y);\n SAlloc::F(the_node->isa_move);\n SAlloc::F(the_node);\n}\n\n/* 2 for border and axes + 9 for plots + 1 for dots */\n#define HP26_gnu_map_size 12\nstatic HP26_Buffer_Node *HP26_gnu_map[HP26_gnu_map_size];\nstatic HP26_Buffer_Node *HP26_buff;\nstatic int HP26_pen_x;\nstatic int HP26_pen_y;\nstatic int HP26_angle;\nstatic int HP26_cursor_x;\nstatic int HP26_cursor_y;\nstatic bool HP26_in_text;\nstatic int HP26_linetype_current;\nstatic int HP26_reduction_int;\nstatic int HP26_reduction_slope;\nstatic int HP26_overflows;\nstatic int HP26_nop_move;\nstatic int HP26_nop_vect;\nstatic int HP26_nop_line;\n\n/* linetype stuff */\n#define\tSOLID\t1\n#define\tUSER\t2\n#define LINE3\t3\n#define LINE4\t4\n#define LINE5\t5\n#define LINE6\t6\n#define\tDOTS\t7\n#define LINE8\t8\n#define LINE9\t9\n#define LINE10\t10\n#define POINT\t11\n\n\n\n#define swap(a, b) a ^= b; b ^= a; a ^= b;\n\nstatic char HP26_bin_short_table[32] =\n{\n '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>',\n '?', ' ', '!', '\"', '#', '$', '%', '&', '\\'', '(', ')', '*', '+', ',', '-',\n '.', '/'\n};\n/* encodes an integer (assumed to be in range) into\n binary short incremental format (j)*/\n#define short_encode(n) (HP26_bin_short_table[n+16])\n\n/* tells whether a given delta_x,delta_y pair can be expressed in\n binary short incremental format */\n#define qualified(dx,dy) ((dx>-17)&&(dy>-17)&&(dx<16)&&(dy<16))\n\n\nstatic char HP26_bin_table[32] =\n{\n ' ', '!', '\"', '#', '$', '%', '&', '\\'', '(', ')', '*', '+', ',', '-',\n '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<',\n '=', '>', '?'\n};\n/* returns the high byte of integer n in binary absolute format (i) */\n#define bin_encode_hi(n) (HP26_bin_table[n>>5])\n/* returns the low byte of integer n in binary absolute format (i) */\n#define bin_encode_lo(n) (HP26_bin_table[n & 31])\n\n\n\n/* the guts of the program\n-- first checks if any work need be done and, failing that, returns\n\timmediately\n-- tries to compress the vector stream\n-- goes through the buffer, using binary short incremental (2 bytes/point)\n\tas much as possible, even if must output two pairs to express one vector\n\t(it's no more expensive, and will hopefully damp any excessive switching\n\tback and forth between the two formats)\n\tif can't use binary short incremental, use binary\n\tabsolute(4 bytes/point)\n-- finally, resets the HP26_next pointer to zero */\nstatic int\nHP26_flush(HP26_Buffer_Node *the_buff)\n{\n int i, delta_x, delta_y, half_dx, half_dy;\n int *buff_x, *buff_y;\n bool *isa_move;\n bool bin_short;\n\n if(the_buff->next == 0)\n\treturn (false);\n /* init pointers for easy access */\n buff_x = the_buff->x;\n buff_y = the_buff->y;\n isa_move = the_buff->isa_move;\n if(HP26_in_text) {\n\tfputs(\"\\033*dT\", gpoutfile);\n\tHP26_in_text = false;\n }\n if(HP26_linetype_current != the_buff->linetype\n\t&& (the_buff->next > 1 || !isa_move[0])) {\n\tfprintf(gpoutfile, \"\\033*m%dB\", the_buff->linetype);\n\tHP26_linetype_current = the_buff->linetype;\n }\n\n /* start escape sequence */\n fputs(\"\\033*p\", gpoutfile);\n /* initialize the state: binary short incremental or binary absolute */\n delta_x = buff_x[0] - HP26_pen_x;\n delta_y = buff_y[0] - HP26_pen_y;\n if(qualified(delta_x, delta_y)) {\n\tfputc('j', gpoutfile);\n\tbin_short = true;\n } else {\n\tfputc('i', gpoutfile);\n\tbin_short = false;\n }\n /* now work through the list */\n for (i = 0; i < the_buff->next; i++) {\n\tif(i > 0) {\n\t delta_x = buff_x[i] - buff_x[i - 1];\n\t delta_y = buff_y[i] - buff_y[i - 1];\n\t}\n\tif((delta_x == 0) && (delta_y == 0)) {\n\t if(i > 0 && !isa_move[i - 1] && !isa_move[i]) {\n\t\t/* allow null vectors only when drawing dots */\n\t\tHP26_nop_vect++;\n\t\tcontinue;\n\t } else if(isa_move[i]) {\n\t\t/* a null move */\n\t\tHP26_nop_move++;\n\t\tcontinue;\n\t }\n\t} else if(i > 0\n\t\t && i + 1 < the_buff->next\n\t\t && isa_move[i]\n\t\t && isa_move[i + 1]) {\n\t /* consecutive moves are condensed into one */\n\t HP26_nop_move++;\n\t continue;\n\t} else if(!qualified(delta_x, delta_y)\n\t\t && i > 0\n\t\t && i + 2 < the_buff->next\n\t\t && isa_move[i]\n\t\t && !isa_move[i + 1]\n\t\t && isa_move[i + 2]\n\t\t && qualified(buff_x[i + 1] - buff_x[i - 1], buff_y[i + 1] - buff_y[i - 1])) {\n\t swap(buff_x[i], buff_x[i + 1]);\n\t swap(buff_y[i], buff_y[i + 1]);\n\t /* set up new delta_x & delta_y */\n\t delta_x = buff_x[i] - buff_x[i - 1];\n\t delta_y = buff_y[i] - buff_y[i - 1];\n\t}\n\tif(qualified(delta_x, delta_y)) {\n\t if(!bin_short) {\n\t\tfputc('j', gpoutfile);\n\t\tbin_short = true;\n\t }\n\t if(isa_move[i])\n\t\tfputc('a', gpoutfile);\n\t fputc(short_encode(delta_x), gpoutfile);\n\t fputc(short_encode(delta_y), gpoutfile);\n\t} else {\n\t half_dx = (delta_x + (delta_x > 0 ? 1 : -1)) / 2;\n\t half_dy = (delta_y + (delta_y > 0 ? 1 : -1)) / 2;\n\t if(bin_short && qualified(half_dx, half_dy)) {\n\t\tif(isa_move[i])\n\t\t fputc('a', gpoutfile);\n\t\tfputc(short_encode(half_dx), gpoutfile);\n\t\tfputc(short_encode(half_dy), gpoutfile);\n\t\tif(isa_move[i])\n\t\t fputc('a', gpoutfile);\n\t\tfputc(short_encode(delta_x - half_dx), gpoutfile);\n\t\tfputc(short_encode(delta_y - half_dy), gpoutfile);\n\t } else {\n\t\tif(bin_short) {\n\t\t bin_short = false;\n\t\t fputc('i', gpoutfile);\n\t\t}\n\t\tif(isa_move[i])\n\t\t fputc('a', gpoutfile);\n\t\tfputc(bin_encode_hi(buff_x[i]), gpoutfile);\n\t\tfputc(bin_encode_lo(buff_x[i]), gpoutfile);\n\t\tfputc(bin_encode_hi(buff_y[i]), gpoutfile);\n\t\tfputc(bin_encode_lo(buff_y[i]), gpoutfile);\n\t }\n\t}\n }\t\t\t\t/* end for.. */\n /* the term doesn't seem to mind leaving this out */\n /* finish the escape sequence */\n fputc('Z', gpoutfile);\n /* set these for next time */\n HP26_pen_x = buff_x[the_buff->next - 1];\n HP26_pen_y = buff_y[the_buff->next - 1];\n the_buff->next = 0;\n return (true);\n}\n\nstatic void\nHP26_handle_overflow()\n{\n HP26_Buffer_Node *bigger, *old;\n int x, y;\n x = (HP26_buff->x)[HP26_buff->next - 1];\n y = (HP26_buff->y)[HP26_buff->next - 1];\n HP26_flush(HP26_buff);\n bigger = BN_create(HP26_buff->index, HP26_buff->size * 2,\n\t\t HP26_buff->linetype);\n if(bigger != NULL) {\n\told = HP26_buff;\n\tHP26_gnu_map[bigger->index] = bigger;\n\t/* special case since DOTS entry is shared 3 ways */\n\tif(bigger->index == 0) {\n\t HP26_gnu_map[1] = bigger;\n\t HP26_gnu_map[3] = bigger;\n\t}\n\tHP26_buff = bigger;\n\tBN_delete(old);\n }\n (HP26_buff->x)[0] = x;\n (HP26_buff->y)[0] = y;\n (HP26_buff->isa_move)[0] = true;\n HP26_buff->next = 1;\n HP26_overflows++;\n}\n\n/* checks for NOP, overcapacity condition, and then adds vector to the list */\nstatic void\nHP26_vector(uint x, uint y)\n{\n if(HP26_buff->next > 2\n\t&& x == (HP26_buff->x)[HP26_buff->next - 1]\n\t&& y == (HP26_buff->y)[HP26_buff->next - 1]\n\t&& !(HP26_buff->isa_move)[HP26_buff->next - 1]) {\n\tHP26_nop_vect++;\n\treturn;\n }\n if(HP26_buff->next == HP26_buff->size)\n\tHP26_handle_overflow();\n /* otherwise add to the list */\n (HP26_buff->x)[HP26_buff->next] = x;\n (HP26_buff->y)[HP26_buff->next] = y;\n (HP26_buff->isa_move)[HP26_buff->next] = false;\n HP26_buff->next++;\n}\n\n/* checks for NOP, checks for overcapacity, puts self on list */\nstatic void\nHP26_move(uint x, uint y)\n{\n if(HP26_buff->next > 0) {\n\tif(((HP26_buff->x)[HP26_buff->next - 1] == x)\n\t && ((HP26_buff->y)[HP26_buff->next - 1] == y)) {\n\t /* null moves are NOP's */\n\t HP26_nop_move++;\n\t return;\n\t} else if((HP26_buff->isa_move)[HP26_buff->next - 1]) {\n\t /* consecutive moves are NOP's */\n\t (HP26_buff->x)[HP26_buff->next - 1] = x;\n\t (HP26_buff->y)[HP26_buff->next - 1] = y;\n\t HP26_nop_move++;\n\t return;\n\t}\n }\n if(HP26_buff->next == HP26_buff->size)\n\tHP26_handle_overflow();\n (HP26_buff->x)[HP26_buff->next] = x;\n (HP26_buff->y)[HP26_buff->next] = y;\n (HP26_buff->isa_move)[HP26_buff->next] = true;\n HP26_buff->next++;\n return;\n}\n\nstatic void\nHP26_init()\n{\n HP26_gnu_map[-2 + 2] = BN_create(0, 2048, DOTS);\t/* border */\n HP26_gnu_map[-1 + 2] = HP26_gnu_map[-2 + 2];\t/* axes */\n HP26_gnu_map[0 + 2] = BN_create(2, 3072, SOLID);\t/* plot 0 */\n HP26_gnu_map[1 + 2] = HP26_gnu_map[-2 + 2];\t\t/* plot 1 */\n HP26_gnu_map[2 + 2] = BN_create(4, 1024, LINE5);\t/* plot 2 */\n HP26_gnu_map[3 + 2] = BN_create(5, 256, LINE6);\t/* plot 3 */\n HP26_gnu_map[4 + 2] = BN_create(6, 256, LINE8);\t/* plot 4 */\n HP26_gnu_map[5 + 2] = BN_create(7, 128, LINE9);\t/* plot 5 */\n HP26_gnu_map[6 + 2] = BN_create(8, 128, LINE10);\t/* plot 6 */\n HP26_gnu_map[7 + 2] = BN_create(9, 64, LINE6);\t/* plot 7 */\n HP26_gnu_map[8 + 2] = BN_create(10, 64, LINE4);\t/* plot 8 */\n HP26_gnu_map[9 + 2] = BN_create(11, 512, POINT);\t/* point plot */\n HP26_buff = HP26_gnu_map[10];\t/* set to an unlikely linetype */\n HP26_linetype_current = 0;\t/* set to force a linetype change */\n HP26_angle = 1;\t\t/* left to right, default */\n fputs(\"\\033*mp1m2a2Q\", gpoutfile);\n /* 1 2 3 4\n 1. make text upright\n 2. select text size 1\n 3. make SET the default drawing op\n 4. left justify text */\n fflush(gpoutfile);\n}\n\n\nstatic void\nHP26_graphics()\n{\n fputs(\"\\033*daflsC\", gpoutfile);\n /* 12345\n 1. clear graphics display\n 2. shut off the alphanumeric display\n 3. graphics cursor off\n 4. into graphics text mode\n 5. enable graphics display */\n /* set the pen & cursor positions to force an initial absolute move */\n HP26_pen_x = HP26_pen_y = -200;\n HP26_cursor_x = HP26_cursor_y = 800;\n HP26_in_text = true;\n /* initialize statistics */\n HP26_reduction_int = 0;\n HP26_reduction_slope = 0;\n HP26_nop_move = 0;\n HP26_nop_vect = 0;\n HP26_nop_line = 0;\n HP26_overflows = 0;\n}\n\n\nstatic void\nHP26_text()\n{\n int i, j, curr;\n\n /* always flush the current line first */\n for (i = 0; i < HP26_gnu_map_size; i++)\n\tif((HP26_gnu_map[i])->linetype == HP26_linetype_current)\n\t HP26_flush(HP26_gnu_map[i]);\n /* now flush the rest of the lines */\n for (i = 0; i < HP26_gnu_map_size; i++) {\n\tHP26_flush(HP26_gnu_map[i]);\n\tcurr = HP26_gnu_map[i]->linetype;\n\tfor (j = 0; j < HP26_gnu_map_size; j++)\n\t if((HP26_gnu_map[j])->linetype == curr)\n\t\tHP26_flush(HP26_gnu_map[j]);\n }\n fputs(\"\\033*deT\", gpoutfile);\n /* 12\n 1. turn on the alphanumeric display\n 2. back to text mode */\n fflush(gpoutfile);\n /* informational: tells how many points compressed, how\n many NOP's of each type, and how many times a buffer\n overflowed during this plot */\n /*\n if(HP26_reduction_int\n + HP26_reduction_slope\n + HP26_nop_move\n + HP26_nop_vect\n + HP26_overflows\n + HP26_nop_line > 0){\n if(HP26_reduction_int>0)\n printf(\"%d int-compress\",HP26_reduction_int);\n if(HP26_reduction_slope>0)\n printf(\"%d slope-compress\",HP26_reduction_slope);\n if(HP26_nop_move>0)\n printf(\" %d nop_move\",HP26_nop_move);\n if(HP26_nop_vect>0)\n printf(\" %d nop_vect\",HP26_nop_vect);\n if(HP26_nop_line>0)\n printf(\" %d nop_line\",HP26_nop_line);\n if(HP26_overflows>0)\n printf(\" %d buffer overflows\",HP26_overflows);\n printf(\"\\n\");\n }\n */\n}\n\nstatic void\nHP26_reset()\n{\n int i;\n for (i = 2; i < HP26_gnu_map_size; i++)\n\tBN_delete(HP26_gnu_map[i]);\n}\n\nstatic int\nHP26_text_angle(int ang)\n{\n HP26_angle = (ang ? 2 : 1);\n fprintf(gpoutfile, \"\\033*m%dN\", HP26_angle);\n return (true);\n}\n\n\nstatic void\nHP26_put_text(uint x, uint y, const char *str)\n{\n char abs_str[10], rel_str[10];\n\n if(!strlen(str))\n\treturn;\n else {\n\tfputs(\"\\033*d\", gpoutfile);\n\tif(!HP26_in_text) {\n\t fputc('s', gpoutfile);\n\t HP26_in_text = true;\n\t}\n\tsprintf(rel_str, \"%d,%dP\", x - HP26_cursor_x, y - HP26_cursor_y);\n\tsprintf(abs_str, \"%d,%dO\", x, y);\n\tif(strlen(rel_str) < strlen(abs_str))\n\t fputs(rel_str, gpoutfile);\n\telse\n\t fputs(abs_str, gpoutfile);\n\tfputs(str, gpoutfile);\n\tHP26_pen_x = HP26_cursor_x = x;\n\tHP26_pen_y = HP26_cursor_y = y;\n }\n /*\n tmp = &(HP26_all_buffers[HP26_linetype_current]);\n tmp->x[tmp->next] = x;\n tmp->y[tmp->next] = y;\n tmp->isa_move[tmp->next] = true;\n tmp->next++;\n HP26_flush(tmp);\n fprintf(gpoutfile,\"\\033*l%s\\r\",str);\n */\n return;\n}\n\n\n/* checks for NOP, sets HP26_buff to point to the right buffer */\nstatic void\nHP26_linetype(int linetype)\n{\n if(linetype < -2)\n\tlinetype = LT_BLACK;\n if(linetype > 8)\n\tlinetype %= 9;\n linetype += 2;\n if(HP26_gnu_map[linetype] == HP26_buff) {\n\tHP26_nop_line++;\n\treturn;\t\t\t/* gnuplot just sent us another NOP */\n }\n HP26_buff = HP26_gnu_map[linetype];\n}\n\n\n\n/* switches to a solid linetype and calls do_point, then switches back */\nstatic void\nHP26_line_and_point(uint x, uint y, int number)\n{\n int line_save, not_solid;\n\n /* shut up warnings with dummy initializer -SB */\n line_save = 0;\n not_solid = (HP26_buff->linetype != SOLID);\n if(not_solid) {\n\tline_save = HP26_buff->linetype;\n\tHP26_linetype(0);\t/*switch to a solid line */\n }\n HP26_do_point(x, y, number);\n if(not_solid)\n\tHP26_linetype(line_save);\n}\n\n\n/* provides 9 point types so they stay in sync with the linetypes\nputs simpler point types first on the assumption they are more\nfrequently used */\nstatic void\nHP26_do_point(uint x, uint y, int number)\n{\n int htic, vtic;\n HP26_Buffer_Node *tmp;\n\n vtic = HP26_VTIC / 2;\n htic = HP26_HTIC / 2;\n if(number < 0) {\n\t/* do a dot -- special case */\n\ttmp = HP26_buff;\n\tHP26_buff = HP26_gnu_map[11];\t/* point plot */\n\tHP26_vector(x, y);\n\tHP26_buff = tmp;\n }\n switch (number % 9) {\n case 0:\n\t/* do triangle */\n\tHP26_move(x - htic, y - vtic);\n\tHP26_vector(x, y + vtic);\n\tHP26_vector(x + htic, y - vtic);\n\tHP26_vector(x - htic, y - vtic);\n\tbreak;\n case 1:\n\t/* do nambla */\n\tHP26_move(x - htic, y + vtic);\n\tHP26_vector(x, y - vtic);\n\tHP26_vector(x + htic, y + vtic);\n\tHP26_vector(x - htic, y + vtic);\n\tbreak;\n case 2:\n\t/* do left triangle */\n\tHP26_move(x - htic, y);\n\tHP26_vector(x + htic, y + vtic);\n\tHP26_vector(x + htic, y - vtic);\n\tHP26_vector(x - htic, y);\n\tbreak;\n case 3:\n\t/* do right triangle */\n\tHP26_move(x + htic, y);\n\tHP26_vector(x - htic, y + vtic);\n\tHP26_vector(x - htic, y - vtic);\n\tHP26_vector(x + htic, y);\n\tbreak;\n case 4:\n\t/* do box */\n\tHP26_move(x - htic, y - vtic);\n\tHP26_vector(x - htic, y + vtic);\n\tHP26_vector(x + htic, y + vtic);\n\tHP26_vector(x + htic, y - vtic);\n\tHP26_vector(x - htic, y - vtic);\n\tbreak;\n case 5:\n\t/* do plus */\n\tHP26_move(x, y + vtic);\n\tHP26_vector(x, y - vtic);\n\tHP26_move(x - htic, y);\n\tHP26_vector(x + htic, y);\n\tbreak;\n case 6:\n\t/* do X */\n\tHP26_move(x + htic, y + vtic);\n\tHP26_vector(x - htic, y - vtic);\n\tHP26_move(x - htic, y + vtic);\n\tHP26_vector(x + htic, y - vtic);\n\tbreak;\n default:\n\t/* do diamond */\n\tHP26_move(x, y - vtic);\n\tHP26_vector(x - htic, y);\n\tHP26_vector(x, y + vtic);\n\tHP26_vector(x + htic, y);\n\tHP26_vector(x, y - vtic);\n\tbreak;\n }\n}\n\n#endif /* TERM_BODY */\n\n#ifdef TERM_TABLE\n\nTERM_TABLE_START(hp2623a_driver)\n \"hp2623A\", \"HP2623A and maybe others\",\n HP26_XMAX, HP26_YMAX, HP26_VCHAR, HP26_HCHAR,\n HP26_VTIC, HP26_HTIC, options_null, HP26_init, HP26_reset,\n HP26_text, null_scale, HP26_graphics, HP26_move, HP26_vector,\n HP26_linetype, HP26_put_text, HP26_text_angle,\n null_justify_text, HP26_line_and_point, do_arrow, set_font_null\nTERM_TABLE_END(hp2623a_driver)\n\n#undef LAST_TERM\n#define LAST_TERM hp2623a_driver\n\n#endif /* TERM_TABLE */\n#endif /* TERM_PROTO_ONLY */\n\n#ifdef TERM_HELP\nSTART_HELP(hp2623a)\n\"1 hp2623a\",\n\"?commands set terminal hp2623a\",\n\"?set terminal hp2623a\",\n\"?set term hp2623a\",\n\"?terminal hp2623a\",\n\"?term hp2623a\",\n\"?hp2623a\",\n\" The `hp2623a` terminal driver supports the Hewlett Packard HP2623A. It has\",\n\" no options.\"\nEND_HELP(hp2623a)\n#endif\n"} +{"text": "<?php\n\n/**\n * Represent a set of resources. The first resource is considered the main resource.\n *\n * @category Anahita\n *\n * @author Arash Sanieyan <ash@anahitapolis.com>\n * @author Rastin Mehr <rastin@anahitapolis.com>\n * @license GNU GPLv3 <http://www.gnu.org/licenses/gpl-3.0.html>\n *\n * @link http://www.GetAnahita.com\n */\nclass AnDomainResourceSet extends AnObject implements IteratorAggregate, Countable\n{\n /**\n * Resources.\n *\n * @var array\n */\n protected $_resources;\n\n /**\n * Space Store.\n *\n * @var AnDomainStoreInterface\n */\n protected $_store;\n\n /**\n * Links.\n *\n * @var array\n */\n protected $_links;\n\n /**\n * Constructor.\n *\n * @param \tobject \tAn optional AnConfig object with configuration options\n */\n public function __construct(AnConfig $config)\n {\n parent::__construct(null);\n\n $this->_store = $config->store;\n\n foreach ($config->resources as $resource) {\n $this->insert($resource);\n }\n }\n\n /**\n * Adds a resource to the set the set of resources.\n *\n * @param string|array $config\n */\n public function insert($config)\n {\n if (is_string($config)) {\n $config = array('name' => $config);\n }\n\n $config = new AnConfig($config);\n\n if (empty($config->link) && !empty($this->_resources)) {\n $name = AnInflector::singularize($this->main()->getName());\n $config->link = array('child' => $name.'_id','parent' => 'id');\n }\n\n $config->append(array(\n 'columns' => $this->_store->getColumns($config->name),\n ));\n\n $resource = new AnDomainResource($config);\n $this->_resources[$resource->getAlias()] = $resource;\n\n return $this;\n }\n\n /**\n * Return the resource with name.\n *\n * @param string $name The name of the resource\n *\n * @return AnDomainResource\n */\n public function getResource($name)\n {\n foreach ($this->_resources as $resource) {\n if ($resource->getName() == $name) {\n return $resource;\n }\n }\n }\n\n /**\n * Return the main resource.\n *\n * @return AnDomainResourceInterface\n */\n public function main()\n {\n $resources = array_values($this->_resources);\n\n return $resources[0];\n }\n\n /**\n * Return an array of key/value pair that connects two reosurcs\n * together.\n *\n * @return array\n */\n public function getLinks()\n {\n if (! isset($this->_links)) {\n $this->_links = array();\n\n foreach ($this->_resources as $resource) {\n $link = $resource->getLink();\n\n if ($link) {\n $this->_links[] = new AnConfig(array(\n 'child' => $resource->getColumn($link->child),\n 'parent' => $this->main()->getColumn($link->parent),\n 'resource' => $resource,\n ));\n }\n }\n }\n\n return $this->_links;\n }\n\n /**\n * Return a column in a resource using.\n *\n * @param string $name\n *\n * @return AnDomainResourceColumn\n */\n public function getColumn($name)\n {\n if ($name instanceof AnDomainResourceColumn) {\n return $name;\n }\n\n if (strpos($name, '.') !== false) {\n $parts = explode('.', $name, 2);\n $name = $parts[1];\n foreach ($this->_resources as $resource) {\n if ($resource->getAlias() == $parts[0]) {\n break;\n }\n }\n $resources = array($resource);\n } else {\n $resources = $this->_resources;\n }\n\n foreach ($resources as $resource) {\n if ($resource->hasColumn($name)) {\n return $resource->getColumn($name);\n }\n }\n\n //throw new AnException('Column '.$name.' doesn\\'t exists');\n }\n\n /**\n * Return the count of the resources.\n *\n * @return int\n */\n public function count()\n {\n return count($this->_resources);\n }\n\n /**\n * Return an iterator.\n *\n * @return Iterator\n */\n public function getIterator()\n {\n return new ArrayIterator($this->_resources);\n }\n}\n"} +{"text": "<UserControl x:Class=\"Samba.Modules.EntityModule.EntityCustomDataEditor\"\n xmlns=\"http://schemas.microsoft.com/winfx/2006/xaml/presentation\"\n xmlns:x=\"http://schemas.microsoft.com/winfx/2006/xaml\"\n xmlns:UIControls=\"clr-namespace:Samba.Presentation.Controls.UIControls;assembly=Samba.Presentation.Controls\"\n xmlns:entityModule=\"clr-namespace:Samba.Modules.EntityModule\" Loaded=\"EntityCustomDataEditor_OnLoaded\">\n <UserControl.Resources>\n <DataTemplate x:Key=\"textTemplate\">\n <Grid>\n <Grid.ColumnDefinitions>\n <ColumnDefinition SharedSizeGroup=\"EntityLabel\" Width=\"auto\"/>\n <ColumnDefinition Width=\"*\"/>\n </Grid.ColumnDefinitions>\n <Label Grid.Column=\"0\" Content=\"{Binding Name}\"/>\n <TextBox Margin=\"0,0,0,4\" Grid.Column=\"1\" MinWidth=\"150\" Text=\"{Binding Value,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}\"/>\n </Grid>\n </DataTemplate>\n\n <DataTemplate x:Key=\"numberTemplate\">\n <Grid>\n <Grid.ColumnDefinitions>\n <ColumnDefinition SharedSizeGroup=\"EntityLabel\" Width=\"auto\"/>\n <ColumnDefinition Width=\"*\"/>\n </Grid.ColumnDefinitions>\n <Label Grid.Column=\"0\" Content=\"{Binding Name}\"/>\n <UIControls:FilteredTextBox Margin=\"0,0,0,4\" Grid.Column=\"1\" Type=\"Number\" MinWidth=\"100\" Text=\"{Binding Value,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}\"/>\n </Grid>\n </DataTemplate>\n\n <DataTemplate x:Key=\"dateTemplate\">\n <Grid>\n <Grid.ColumnDefinitions>\n <ColumnDefinition SharedSizeGroup=\"EntityLabel\" Width=\"auto\"/>\n <ColumnDefinition Width=\"*\"/>\n </Grid.ColumnDefinitions>\n <Label Grid.Column=\"0\" Content=\"{Binding Name}\"/>\n <DatePicker Margin=\"0,0,0,4\" Grid.Column=\"1\" MinWidth=\"100\" Text=\"{Binding Value,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}\"/>\n </Grid>\n </DataTemplate>\n\n <DataTemplate x:Key=\"wideTextTemplate\">\n <Grid>\n <Grid.ColumnDefinitions>\n <ColumnDefinition SharedSizeGroup=\"EntityLabel\" Width=\"auto\"/>\n <ColumnDefinition Width=\"*\"/>\n </Grid.ColumnDefinitions>\n <Label Grid.Column=\"0\" Content=\"{Binding Name}\"/>\n <TextBox Margin=\"0,0,0,4\" Grid.Column=\"1\" MinWidth=\"200\" Text=\"{Binding Value,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}\" AcceptsReturn=\"True\" MinHeight=\"40\"/>\n </Grid>\n </DataTemplate>\n\n <DataTemplate x:Key=\"comboBoxTemplate\">\n <Grid>\n <Grid.ColumnDefinitions>\n <ColumnDefinition SharedSizeGroup=\"EntityLabel\" Width=\"auto\"/>\n <ColumnDefinition Width=\"*\"/>\n </Grid.ColumnDefinitions>\n <Label Grid.Column=\"0\" Content=\"{Binding Name}\"/>\n <ComboBox Margin=\"0,0,0,4\" Grid.Column=\"1\" MinWidth=\"150\" ItemsSource=\"{Binding CustomField.Values}\" SelectedItem=\"{Binding Value}\" />\n </Grid>\n </DataTemplate>\n\n <DataTemplate x:Key=\"maskedTemplate\">\n <Grid>\n <Grid.ColumnDefinitions>\n <ColumnDefinition SharedSizeGroup=\"EntityLabel\" Width=\"auto\"/>\n <ColumnDefinition Width=\"*\"/>\n </Grid.ColumnDefinitions>\n <Label Grid.Column=\"0\" Content=\"{Binding Name}\"/>\n <UIControls:MaskedTextBox Margin=\"0,0,0,4\" Grid.Column=\"1\" MinWidth=\"150\" \n PromptChar=\" \"\n UnmaskedText=\"{Binding Value, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}\" \n InputMask=\"{Binding CustomField.EditingFormat}\"/>\n </Grid>\n </DataTemplate>\n\n <entityModule:EntityCustomFieldTemplateSelector x:Key=\"customFieldTemplateSelector\" \n TextTemplate=\"{StaticResource textTemplate}\"\n WideTextTemplate=\"{StaticResource wideTextTemplate}\"\n MaskedTemplate=\"{StaticResource maskedTemplate}\"\n NumberTemplate=\"{StaticResource numberTemplate}\" \n ComboBoxTemplate=\"{StaticResource comboBoxTemplate}\" \n DateTemplate=\"{StaticResource dateTemplate}\"\n />\n </UserControl.Resources>\n <StackPanel>\n <Grid>\n <Grid.ColumnDefinitions>\n <ColumnDefinition SharedSizeGroup=\"EntityLabel\" Width=\"auto\"/>\n <ColumnDefinition Width=\"*\"/>\n </Grid.ColumnDefinitions>\n <Label Margin=\"0,0,2,2\" Grid.Column=\"0\" Content=\"{Binding PrimaryFieldName}\" />\n <UIControls:MaskedTextBox Name=\"EntityNameEdit\" Margin=\"0,0,0,4\" Grid.Column=\"1\" Visibility=\"{Binding IsMaskedTextBoxVisible,Converter={StaticResource VisibilityConverter}}\"\n PromptChar=\" \"\n UnmaskedText=\"{Binding Model.Name, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}\" \n InputMask=\"{Binding PrimaryFieldFormat}\"/>\n <TextBox Name=\"EntityNameEdit2\" Margin=\"0,0,0,4\" Grid.Column=\"1\" Visibility=\"{Binding IsTextBoxVisible,Converter={StaticResource VisibilityConverter}}\"\n Text=\"{Binding Model.Name, Mode=TwoWay, ValidatesOnDataErrors=True, ValidatesOnExceptions=True, UpdateSourceTrigger=PropertyChanged}\"/>\n </Grid>\n <ItemsControl Grid.Row=\"1\" Focusable=\"False\" ItemsSource=\"{Binding CustomData}\" ItemTemplateSelector=\"{StaticResource customFieldTemplateSelector}\"/>\n </StackPanel>\n</UserControl>\n"} +{"text": "import { loginReducer } from '../../src/reducers';\nimport { INIT_LOGIN, LOGIN_SUCCESS, LOGIN_FAIL } from '../../src/actions/types';\n\ndescribe('reducers/loginReducer', () => {\n test('checking initial state', () => {\n const action = { type: 'nonexistent' };\n expect(loginReducer(undefined, action)).toMatchSnapshot();\n });\n\n test('INIT_LOGIN', () => {\n const action = { type: INIT_LOGIN };\n expect(loginReducer(undefined, action)).toMatchSnapshot();\n });\n\n test('LOGIN_SUCCESS', () => {\n const action = { type: LOGIN_SUCCESS, payload: 'user' };\n expect(loginReducer(undefined, action)).toMatchSnapshot();\n });\n\n test('LOGIN_FAIL', () => {\n const action = { type: LOGIN_FAIL, payload: 'error' };\n expect(loginReducer(undefined, action)).toMatchSnapshot();\n });\n});\n"} +{"text": "F-Droid — 1.0!\n\nЦей випуск містить безліч значних змін:\n\n* Перероблено почерговість оновлення застосунків\n\n* Повний переклад опису застосунків\n\n* Розділ \"Що нового\" показує зміни у поточному випуску\n\n* Знімки екрану та графічне оформлення\n\n* Встановлення файлів даних, OTA, ZIP та ін.\n\n* Покращено захист від стеження (HTTP ETag, TLS, та ін.)\n\n* Оновлення у фоновому режимі за допомогою \"Привілейованого розширення\"\n\n* Підсвічування подяки для розробників\n\n* Пришвидшено оновлення індексів\n"} +{"text": "---\nlayout: \"svg_wrapper\"\ntitle: \"Inheritance Graph for _Incrementable\"\ntypename: \"_Incrementable\"\n---\n\n"} +{"text": "fileFormatVersion: 2\nguid: e5fa14f34c688404480a7f1153f88d23\nMonoImporter:\n serializedVersion: 2\n defaultReferences: []\n executionOrder: 0\n icon: {instanceID: 0}\n userData: \n"} +{"text": "{\n \"word\": \"Magisterial\",\n \"definitions\": [\n \"Having or showing great authority.\",\n \"Domineering; dictatorial.\",\n \"Relating to a magistrate.\",\n \"(of a person) holding the office of a magistrate.\"\n ],\n \"parts-of-speech\": \"Adjective\"\n}"} +{"text": "<?php\n\nnamespace Twig\\Extension;\n\nclass_exists('Twig_Extension_Optimizer');\n\nif (\\false) {\n class OptimizerExtension extends \\Twig_Extension_Optimizer\n {\n }\n}\n"} +{"text": "using Newtonsoft.Json;\nusing Newtonsoft.Json.Converters;\n\nnamespace PowerApps.Samples.Metadata\n{\n [JsonObject(ItemNullValueHandling = NullValueHandling.Ignore)]\n public class ComplexManagedPropertyAttributeMetadata : ComplexAttributeMetadata\n {\n public new AttributeTypeCode AttributeType { get; } = AttributeTypeCode.ManagedProperty;\n\n public new AttributeTypeDisplayName AttributeTypeName { get; } = new AttributeTypeDisplayName(AttributeTypeDisplayNameValues.ManagedPropertyType);\n\n public string ManagedPropertyLogicalName { get; set; }\n\n [JsonProperty(\"@odata.type\")]\n public string ODataType { get; } = \"Microsoft.Dynamics.CRM.ComplexManagedPropertyAttributeMetadata\";\n public string ParentAttributeName { get; set; }\n public int ParentComponentType { get; set; }\n public AttributeTypeCode ValueAttributeTypeCode { get; set; }\n }\n}"} +{"text": "// Package statefile deals with the file format used to serialize states for\n// persistent storage and then deserialize them into memory again later.\npackage statefile\n"} +{"text": "package de.metas.inventory;\n\nimport java.util.Objects;\n\nimport javax.annotation.Nullable;\n\nimport org.adempiere.exceptions.AdempiereException;\n\nimport com.google.common.collect.ImmutableMap;\n\nimport de.metas.util.lang.ReferenceListAwareEnum;\nimport de.metas.util.lang.ReferenceListAwareEnums;\nimport lombok.Getter;\nimport lombok.NonNull;\n\n/*\n * #%L\n * de.metas.business\n * %%\n * Copyright (C) 2019 metas GmbH\n * %%\n * This program is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as\n * published by the Free Software Foundation, either version 2 of the\n * License, or (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public\n * License along with this program. If not, see\n * <http://www.gnu.org/licenses/gpl-2.0.html>.\n * #L%\n */\n\n/**\n * NOTE to developers: Please keep in sync with list reference \"HUAggregationType\" {@code AD_Reference_ID=540976}\n */\n\npublic enum HUAggregationType implements ReferenceListAwareEnum\n{\n\tSINGLE_HU(\"S\"), //\n\tMULTI_HU(\"M\") //\n\t;\n\n\t@Getter\n\tprivate final String code;\n\n\tHUAggregationType(final String code)\n\t{\n\t\tthis.code = code;\n\t}\n\n\tpublic static HUAggregationType ofCode(@NonNull final String code)\n\t{\n\t\tfinal HUAggregationType type = typesByCode.get(code);\n\t\tif (type == null)\n\t\t{\n\t\t\tthrow new AdempiereException(\"No \" + HUAggregationType.class + \" found for code: \" + code);\n\t\t}\n\t\treturn type;\n\t}\n\n\tpublic static HUAggregationType ofNullableCode(@Nullable final String code)\n\t{\n\t\treturn code != null ? ofCode(code) : null;\n\t}\n\n\tpublic static String toCodeOrNull(@Nullable final HUAggregationType type)\n\t{\n\t\treturn type != null ? type.getCode() : null;\n\t}\n\n\tprivate static final ImmutableMap<String, HUAggregationType> typesByCode = ReferenceListAwareEnums.indexByCode(values());\n\n\tpublic static boolean equals(@Nullable final HUAggregationType o1, @Nullable final HUAggregationType o2)\n\t{\n\t\treturn Objects.equals(o1, o2);\n\t}\n\n}\n"} +{"text": "fileFormatVersion: 2\nguid: 3009622c9d888743c92749fb196583e9\nDefaultImporter:\n externalObjects: {}\n userData: \n assetBundleName: \n assetBundleVariant: \n"} +{"text": "'use strict';\nangular.module(\"ngLocale\", [], [\"$provide\", function($provide) {\nvar PLURAL_CATEGORY = {ZERO: \"zero\", ONE: \"one\", TWO: \"two\", FEW: \"few\", MANY: \"many\", OTHER: \"other\"};\nfunction getDecimals(n) {\n n = n + '';\n var i = n.indexOf('.');\n return (i == -1) ? 0 : n.length - i - 1;\n}\n\nfunction getVF(n, opt_precision) {\n var v = opt_precision;\n\n if (undefined === v) {\n v = Math.min(getDecimals(n), 3);\n }\n\n var base = Math.pow(10, v);\n var f = ((n * base) | 0) % base;\n return {v: v, f: f};\n}\n\n$provide.value(\"$locale\", {\n \"DATETIME_FORMATS\": {\n \"AMPMS\": [\n \"\\u063a.\\u0645.\",\n \"\\u063a.\\u0648.\"\n ],\n \"DAY\": [\n \"\\u06cc\\u06a9\\u0634\\u0646\\u0628\\u0647\",\n \"\\u062f\\u0648\\u0634\\u0646\\u0628\\u0647\",\n \"\\u0633\\u0647\\u200c\\u0634\\u0646\\u0628\\u0647\",\n \"\\u0686\\u0647\\u0627\\u0631\\u0634\\u0646\\u0628\\u0647\",\n \"\\u067e\\u0646\\u062c\\u0634\\u0646\\u0628\\u0647\",\n \"\\u062c\\u0645\\u0639\\u0647\",\n \"\\u0634\\u0646\\u0628\\u0647\"\n ],\n \"ERANAMES\": [\n \"\\u0642.\\u0645.\",\n \"\\u0645.\"\n ],\n \"ERAS\": [\n \"\\u0642.\\u0645.\",\n \"\\u0645.\"\n ],\n \"FIRSTDAYOFWEEK\": 5,\n \"MONTH\": [\n \"\\u062c\\u0646\\u0648\\u0631\\u064a\",\n \"\\u0641\\u0628\\u0631\\u0648\\u0631\\u064a\",\n \"\\u0645\\u0627\\u0631\\u0686\",\n \"\\u0627\\u067e\\u0631\\u06cc\\u0644\",\n \"\\u0645\\u06cc\",\n \"\\u062c\\u0648\\u0646\",\n \"\\u062c\\u0648\\u0644\\u0627\\u06cc\",\n \"\\u0627\\u06ab\\u0633\\u062a\",\n \"\\u0633\\u067e\\u062a\\u0645\\u0628\\u0631\",\n \"\\u0627\\u06a9\\u062a\\u0648\\u0628\\u0631\",\n \"\\u0646\\u0648\\u0645\\u0628\\u0631\",\n \"\\u062f\\u0633\\u0645\\u0628\\u0631\"\n ],\n \"SHORTDAY\": [\n \"\\u06cc\\u06a9\\u0634\\u0646\\u0628\\u0647\",\n \"\\u062f\\u0648\\u0634\\u0646\\u0628\\u0647\",\n \"\\u0633\\u0647\\u200c\\u0634\\u0646\\u0628\\u0647\",\n \"\\u0686\\u0647\\u0627\\u0631\\u0634\\u0646\\u0628\\u0647\",\n \"\\u067e\\u0646\\u062c\\u0634\\u0646\\u0628\\u0647\",\n \"\\u062c\\u0645\\u0639\\u0647\",\n \"\\u0634\\u0646\\u0628\\u0647\"\n ],\n \"SHORTMONTH\": [\n \"\\u062c\\u0646\\u0648\\u0631\\u064a\",\n \"\\u0641\\u0628\\u0631\\u0648\\u0631\\u064a\",\n \"\\u0645\\u0627\\u0631\\u0686\",\n \"\\u0627\\u067e\\u0631\\u06cc\\u0644\",\n \"\\u0645\\u06cc\",\n \"\\u062c\\u0648\\u0646\",\n \"\\u062c\\u0648\\u0644\\u0627\\u06cc\",\n \"\\u0627\\u06ab\\u0633\\u062a\",\n \"\\u0633\\u067e\\u062a\\u0645\\u0628\\u0631\",\n \"\\u0627\\u06a9\\u062a\\u0648\\u0628\\u0631\",\n \"\\u0646\\u0648\\u0645\\u0628\\u0631\",\n \"\\u062f\\u0633\\u0645\\u0628\\u0631\"\n ],\n \"WEEKENDRANGE\": [\n 3,\n 4\n ],\n \"fullDate\": \"EEEE \\u062f y \\u062f MMMM d\",\n \"longDate\": \"\\u062f y \\u062f MMMM d\",\n \"medium\": \"d MMM y H:mm:ss\",\n \"mediumDate\": \"d MMM y\",\n \"mediumTime\": \"H:mm:ss\",\n \"short\": \"y/M/d H:mm\",\n \"shortDate\": \"y/M/d\",\n \"shortTime\": \"H:mm\"\n },\n \"NUMBER_FORMATS\": {\n \"CURRENCY_SYM\": \"Af.\",\n \"DECIMAL_SEP\": \"\\u066b\",\n \"GROUP_SEP\": \"\\u066c\",\n \"PATTERNS\": [\n {\n \"gSize\": 3,\n \"lgSize\": 3,\n \"maxFrac\": 3,\n \"minFrac\": 0,\n \"minInt\": 1,\n \"negPre\": \"-\",\n \"negSuf\": \"\",\n \"posPre\": \"\",\n \"posSuf\": \"\"\n },\n {\n \"gSize\": 3,\n \"lgSize\": 3,\n \"maxFrac\": 2,\n \"minFrac\": 2,\n \"minInt\": 1,\n \"negPre\": \"-\",\n \"negSuf\": \"\\u00a0\\u00a4\",\n \"posPre\": \"\",\n \"posSuf\": \"\\u00a0\\u00a4\"\n }\n ]\n },\n \"id\": \"ps\",\n \"pluralCat\": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}\n});\n}]);\n"} +{"text": "{\n \"extends\": \"@pnpm/tsconfig\",\n \"compilerOptions\": {\n \"outDir\": \"lib\",\n \"rootDir\": \"src\"\n },\n \"include\": [\n \"src/**/*.ts\",\n \"../../typings/**/*.d.ts\"\n ],\n \"references\": [\n {\n \"path\": \"../types\"\n }\n ]\n}\n"} +{"text": "#import \"GPUImageTwoInputFilter.h\"\n\n@interface GPUImageAlphaBlendFilter : GPUImageTwoInputFilter\n{\n GLint mixUniform;\n}\n\n// Mix ranges from 0.0 (only image 1) to 1.0 (only image 2), with 1.0 as the normal level\n@property(readwrite, nonatomic) CGFloat mix; \n\n@end\n"} +{"text": "// CodeMirror, copyright (c) by Marijn Haverbeke and others\n// Distributed under an MIT license: http://codemirror.net/LICENSE\n\n(function(mod) {\n if (typeof exports == \"object\" && typeof module == \"object\") // CommonJS\n mod(require(\"../../lib/codemirror\"));\n else if (typeof define == \"function\" && define.amd) // AMD\n define([\"../../lib/codemirror\"], mod);\n else // Plain browser env\n mod(CodeMirror);\n})(function(CodeMirror) {\n\"use strict\";\n\nvar htmlConfig = {\n autoSelfClosers: {'area': true, 'base': true, 'br': true, 'col': true, 'command': true,\n 'embed': true, 'frame': true, 'hr': true, 'img': true, 'input': true,\n 'keygen': true, 'link': true, 'meta': true, 'param': true, 'source': true,\n 'track': true, 'wbr': true, 'menuitem': true},\n implicitlyClosed: {'dd': true, 'li': true, 'optgroup': true, 'option': true, 'p': true,\n 'rp': true, 'rt': true, 'tbody': true, 'td': true, 'tfoot': true,\n 'th': true, 'tr': true},\n contextGrabbers: {\n 'dd': {'dd': true, 'dt': true},\n 'dt': {'dd': true, 'dt': true},\n 'li': {'li': true},\n 'option': {'option': true, 'optgroup': true},\n 'optgroup': {'optgroup': true},\n 'p': {'address': true, 'article': true, 'aside': true, 'blockquote': true, 'dir': true,\n 'div': true, 'dl': true, 'fieldset': true, 'footer': true, 'form': true,\n 'h1': true, 'h2': true, 'h3': true, 'h4': true, 'h5': true, 'h6': true,\n 'header': true, 'hgroup': true, 'hr': true, 'menu': true, 'nav': true, 'ol': true,\n 'p': true, 'pre': true, 'section': true, 'table': true, 'ul': true},\n 'rp': {'rp': true, 'rt': true},\n 'rt': {'rp': true, 'rt': true},\n 'tbody': {'tbody': true, 'tfoot': true},\n 'td': {'td': true, 'th': true},\n 'tfoot': {'tbody': true},\n 'th': {'td': true, 'th': true},\n 'thead': {'tbody': true, 'tfoot': true},\n 'tr': {'tr': true}\n },\n doNotIndent: {\"pre\": true},\n allowUnquoted: true,\n allowMissing: true,\n caseFold: true\n}\n\nvar xmlConfig = {\n autoSelfClosers: {},\n implicitlyClosed: {},\n contextGrabbers: {},\n doNotIndent: {},\n allowUnquoted: false,\n allowMissing: false,\n allowMissingTagName: false,\n caseFold: false\n}\n\nCodeMirror.defineMode(\"xml\", function(editorConf, config_) {\n var indentUnit = editorConf.indentUnit\n var config = {}\n var defaults = config_.htmlMode ? htmlConfig : xmlConfig\n for (var prop in defaults) config[prop] = defaults[prop]\n for (var prop in config_) config[prop] = config_[prop]\n\n // Return variables for tokenizers\n var type, setStyle;\n\n function inText(stream, state) {\n function chain(parser) {\n state.tokenize = parser;\n return parser(stream, state);\n }\n\n var ch = stream.next();\n if (ch == \"<\") {\n if (stream.eat(\"!\")) {\n if (stream.eat(\"[\")) {\n if (stream.match(\"CDATA[\")) return chain(inBlock(\"atom\", \"]]>\"));\n else return null;\n } else if (stream.match(\"--\")) {\n return chain(inBlock(\"comment\", \"-->\"));\n } else if (stream.match(\"DOCTYPE\", true, true)) {\n stream.eatWhile(/[\\w\\._\\-]/);\n return chain(doctype(1));\n } else {\n return null;\n }\n } else if (stream.eat(\"?\")) {\n stream.eatWhile(/[\\w\\._\\-]/);\n state.tokenize = inBlock(\"meta\", \"?>\");\n return \"meta\";\n } else {\n type = stream.eat(\"/\") ? \"closeTag\" : \"openTag\";\n state.tokenize = inTag;\n return \"tag bracket\";\n }\n } else if (ch == \"&\") {\n var ok;\n if (stream.eat(\"#\")) {\n if (stream.eat(\"x\")) {\n ok = stream.eatWhile(/[a-fA-F\\d]/) && stream.eat(\";\");\n } else {\n ok = stream.eatWhile(/[\\d]/) && stream.eat(\";\");\n }\n } else {\n ok = stream.eatWhile(/[\\w\\.\\-:]/) && stream.eat(\";\");\n }\n return ok ? \"atom\" : \"error\";\n } else {\n stream.eatWhile(/[^&<]/);\n return null;\n }\n }\n inText.isInText = true;\n\n function inTag(stream, state) {\n var ch = stream.next();\n if (ch == \">\" || (ch == \"/\" && stream.eat(\">\"))) {\n state.tokenize = inText;\n type = ch == \">\" ? \"endTag\" : \"selfcloseTag\";\n return \"tag bracket\";\n } else if (ch == \"=\") {\n type = \"equals\";\n return null;\n } else if (ch == \"<\") {\n state.tokenize = inText;\n state.state = baseState;\n state.tagName = state.tagStart = null;\n var next = state.tokenize(stream, state);\n return next ? next + \" tag error\" : \"tag error\";\n } else if (/[\\'\\\"]/.test(ch)) {\n state.tokenize = inAttribute(ch);\n state.stringStartCol = stream.column();\n return state.tokenize(stream, state);\n } else {\n stream.match(/^[^\\s\\u00a0=<>\\\"\\']*[^\\s\\u00a0=<>\\\"\\'\\/]/);\n return \"word\";\n }\n }\n\n function inAttribute(quote) {\n var closure = function(stream, state) {\n while (!stream.eol()) {\n if (stream.next() == quote) {\n state.tokenize = inTag;\n break;\n }\n }\n return \"string\";\n };\n closure.isInAttribute = true;\n return closure;\n }\n\n function inBlock(style, terminator) {\n return function(stream, state) {\n while (!stream.eol()) {\n if (stream.match(terminator)) {\n state.tokenize = inText;\n break;\n }\n stream.next();\n }\n return style;\n };\n }\n function doctype(depth) {\n return function(stream, state) {\n var ch;\n while ((ch = stream.next()) != null) {\n if (ch == \"<\") {\n state.tokenize = doctype(depth + 1);\n return state.tokenize(stream, state);\n } else if (ch == \">\") {\n if (depth == 1) {\n state.tokenize = inText;\n break;\n } else {\n state.tokenize = doctype(depth - 1);\n return state.tokenize(stream, state);\n }\n }\n }\n return \"meta\";\n };\n }\n\n function Context(state, tagName, startOfLine) {\n this.prev = state.context;\n this.tagName = tagName;\n this.indent = state.indented;\n this.startOfLine = startOfLine;\n if (config.doNotIndent.hasOwnProperty(tagName) || (state.context && state.context.noIndent))\n this.noIndent = true;\n }\n function popContext(state) {\n if (state.context) state.context = state.context.prev;\n }\n function maybePopContext(state, nextTagName) {\n var parentTagName;\n while (true) {\n if (!state.context) {\n return;\n }\n parentTagName = state.context.tagName;\n if (!config.contextGrabbers.hasOwnProperty(parentTagName) ||\n !config.contextGrabbers[parentTagName].hasOwnProperty(nextTagName)) {\n return;\n }\n popContext(state);\n }\n }\n\n function baseState(type, stream, state) {\n if (type == \"openTag\") {\n state.tagStart = stream.column();\n return tagNameState;\n } else if (type == \"closeTag\") {\n return closeTagNameState;\n } else {\n return baseState;\n }\n }\n function tagNameState(type, stream, state) {\n if (type == \"word\") {\n state.tagName = stream.current();\n setStyle = \"tag\";\n return attrState;\n } else if (config.allowMissingTagName && type == \"endTag\") {\n setStyle = \"tag bracket\";\n return attrState(type, stream, state);\n } else {\n setStyle = \"error\";\n return tagNameState;\n }\n }\n function closeTagNameState(type, stream, state) {\n if (type == \"word\") {\n var tagName = stream.current();\n if (state.context && state.context.tagName != tagName &&\n config.implicitlyClosed.hasOwnProperty(state.context.tagName))\n popContext(state);\n if ((state.context && state.context.tagName == tagName) || config.matchClosing === false) {\n setStyle = \"tag\";\n return closeState;\n } else {\n setStyle = \"tag error\";\n return closeStateErr;\n }\n } else if (config.allowMissingTagName && type == \"endTag\") {\n setStyle = \"tag bracket\";\n return closeState(type, stream, state);\n } else {\n setStyle = \"error\";\n return closeStateErr;\n }\n }\n\n function closeState(type, _stream, state) {\n if (type != \"endTag\") {\n setStyle = \"error\";\n return closeState;\n }\n popContext(state);\n return baseState;\n }\n function closeStateErr(type, stream, state) {\n setStyle = \"error\";\n return closeState(type, stream, state);\n }\n\n function attrState(type, _stream, state) {\n if (type == \"word\") {\n setStyle = \"attribute\";\n return attrEqState;\n } else if (type == \"endTag\" || type == \"selfcloseTag\") {\n var tagName = state.tagName, tagStart = state.tagStart;\n state.tagName = state.tagStart = null;\n if (type == \"selfcloseTag\" ||\n config.autoSelfClosers.hasOwnProperty(tagName)) {\n maybePopContext(state, tagName);\n } else {\n maybePopContext(state, tagName);\n state.context = new Context(state, tagName, tagStart == state.indented);\n }\n return baseState;\n }\n setStyle = \"error\";\n return attrState;\n }\n function attrEqState(type, stream, state) {\n if (type == \"equals\") return attrValueState;\n if (!config.allowMissing) setStyle = \"error\";\n return attrState(type, stream, state);\n }\n function attrValueState(type, stream, state) {\n if (type == \"string\") return attrContinuedState;\n if (type == \"word\" && config.allowUnquoted) {setStyle = \"string\"; return attrState;}\n setStyle = \"error\";\n return attrState(type, stream, state);\n }\n function attrContinuedState(type, stream, state) {\n if (type == \"string\") return attrContinuedState;\n return attrState(type, stream, state);\n }\n\n return {\n startState: function(baseIndent) {\n var state = {tokenize: inText,\n state: baseState,\n indented: baseIndent || 0,\n tagName: null, tagStart: null,\n context: null}\n if (baseIndent != null) state.baseIndent = baseIndent\n return state\n },\n\n token: function(stream, state) {\n if (!state.tagName && stream.sol())\n state.indented = stream.indentation();\n\n if (stream.eatSpace()) return null;\n type = null;\n var style = state.tokenize(stream, state);\n if ((style || type) && style != \"comment\") {\n setStyle = null;\n state.state = state.state(type || style, stream, state);\n if (setStyle)\n style = setStyle == \"error\" ? style + \" error\" : setStyle;\n }\n return style;\n },\n\n indent: function(state, textAfter, fullLine) {\n var context = state.context;\n // Indent multi-line strings (e.g. css).\n if (state.tokenize.isInAttribute) {\n if (state.tagStart == state.indented)\n return state.stringStartCol + 1;\n else\n return state.indented + indentUnit;\n }\n if (context && context.noIndent) return CodeMirror.Pass;\n if (state.tokenize != inTag && state.tokenize != inText)\n return fullLine ? fullLine.match(/^(\\s*)/)[0].length : 0;\n // Indent the starts of attribute names.\n if (state.tagName) {\n if (config.multilineTagIndentPastTag !== false)\n return state.tagStart + state.tagName.length + 2;\n else\n return state.tagStart + indentUnit * (config.multilineTagIndentFactor || 1);\n }\n if (config.alignCDATA && /<!\\[CDATA\\[/.test(textAfter)) return 0;\n var tagAfter = textAfter && /^<(\\/)?([\\w_:\\.-]*)/.exec(textAfter);\n if (tagAfter && tagAfter[1]) { // Closing tag spotted\n while (context) {\n if (context.tagName == tagAfter[2]) {\n context = context.prev;\n break;\n } else if (config.implicitlyClosed.hasOwnProperty(context.tagName)) {\n context = context.prev;\n } else {\n break;\n }\n }\n } else if (tagAfter) { // Opening tag spotted\n while (context) {\n var grabbers = config.contextGrabbers[context.tagName];\n if (grabbers && grabbers.hasOwnProperty(tagAfter[2]))\n context = context.prev;\n else\n break;\n }\n }\n while (context && context.prev && !context.startOfLine)\n context = context.prev;\n if (context) return context.indent + indentUnit;\n else return state.baseIndent || 0;\n },\n\n electricInput: /<\\/[\\s\\w:]+>$/,\n blockCommentStart: \"<!--\",\n blockCommentEnd: \"-->\",\n\n configuration: config.htmlMode ? \"html\" : \"xml\",\n helperType: config.htmlMode ? \"html\" : \"xml\",\n\n skipAttribute: function(state) {\n if (state.state == attrValueState)\n state.state = attrState\n }\n };\n});\n\nCodeMirror.defineMIME(\"text/xml\", \"xml\");\nCodeMirror.defineMIME(\"application/xml\", \"xml\");\nif (!CodeMirror.mimeModes.hasOwnProperty(\"text/html\"))\n CodeMirror.defineMIME(\"text/html\", {name: \"xml\", htmlMode: true});\n\n});\n"} +{"text": "% Copyright 2018 by Till Tantau\n%\n% This file may be distributed and/or modified\n%\n% 1. under the LaTeX Project Public License and/or\n% 2. under the GNU Public License.\n%\n% See the file doc/generic/pgf/licenses/LICENSE for more details.\n\n\\ProvidesFileRCS{pgfcorepathusage.code.tex}\n\n\n% Stroke/fill/clip/etc. the current path. Depending on the options,\n% the current path will be stroked/filled/clipped/etc. If no options\n% are given, the path is stroked. If multiple options are given, all\n% of them are performed (in a sensible order).\n%\n% #1 = action(s) to be applied to the current path. Valid actions are:\n% stroke - strokes the path.\n% draw - strokes the path and adds arrow tips.\n% tips - adds arrow tips.\n% fill - fills the path.\n% clip - clip the path.\n% discard - Discards the path. Same effect as having an empty\n% options list.\n%\n% Example:\n%\n% % Draws an edge.\n% \\pgfpathmoveto{\\pgfxy(0,0)}\n% \\pgfpathlineto{\\pgfxy(0,1)}\n% \\pgfpathlineto{\\pgfxy(1,0)}\n% \\pgfusepath{stroke}\n\n\\pgfkeys{\n /pgf/stroke/.code=\\let\\pgf@up@stroke\\pgf@up@stroke@text\\pgf@up@path@neededtrue,\n /pgf/draw/.code=\\let\\pgf@up@stroke\\pgf@up@stroke@text\\pgf@up@path@neededtrue,\n /pgf/fill/.code=\\let\\pgf@up@fill\\pgf@up@fill@text\\pgf@up@path@neededtrue,\n /pgf/clip/.code=\\let\\pgf@up@clip\\pgf@up@clip@text\\pgf@up@path@neededtrue,\n /pgf/discard/.code=,\n /pgf/use as bounding box/.code=\\let\\pgf@up@bb\\pgf@do@up@bb,\n /pgf/arrow keys/flex/.code=\\pgferror{You need to say \\string\\usetikzlibrary{bending} for flexing and bending arrows},\n /pgf/arrow keys/flex'/.code=\\pgferror{You need to say \\string\\usetikzlibrary{bending} for flexing and bending arrows},\n /pgf/arrow keys/bend/.code=\\pgferror{You need to say \\string\\usetikzlibrary{bending} for flexing and bending arrows},\n /pgf/arrow keys/quick/.code=\\pgfarrowsaddtooptions{\\let\\pgf@arrow@flex@mode\\pgf@arrow@mode@is@quick},\n}\n\n\\pgfkeys{\n /pgf/.cd,\n tips/.is choice,\n tips/.default=true,\n tips/proper/.code=\\let\\pgf@tips@mode\\pgf@tips@mode@onproper,\n tips/on proper draw/.code=\\let\\pgf@tips@mode\\pgf@tips@mode@onproperdraw,\n tips/true/.code=\\let\\pgf@tips@mode\\pgf@tips@mode@true,\n tips/on draw/.code=\\let\\pgf@tips@mode\\pgf@tips@mode@ondraw,\n tips/never/.code=\\let\\pgf@tips@mode\\pgf@tips@mode@false,\n tips/false/.code=\\let\\pgf@tips@mode\\pgf@tips@mode@false,\n}\n\\def\\pgf@tips@mode@onproper{4}\n\\def\\pgf@tips@mode@onproperdraw{3}\n\\def\\pgf@tips@mode@true{2}\n\\def\\pgf@tips@mode@ondraw{1}\n\\def\\pgf@tips@mode@false{0}\n\\let\\pgf@tips@mode\\pgf@tips@mode@ondraw\n\n\n% The following can only be set to \"true\" using the options in the\n% module \"bending\"\n\\newif\\ifpgf@precise@shortening\n\\def\\pgf@arrow@mode@is@quick{0}\n\\let\\pgf@arrow@flex@mode\\pgf@arrow@mode@is@quick\n\n\\newif\\ifpgf@up@path@needed\n\\newif\\ifpgf@up@draw@arrows\n\\def\\pgf@up@stroke@text{stroke}\n\\def\\pgf@up@fill@text{fill}\n\\def\\pgf@up@clip@text{clip}\n\\def\\pgf@do@up@bb{\\pgf@relevantforpicturesizefalse}\n\n\\def\\pgfusepath#1{%\n \\pgf@up@path@neededfalse%\n \\pgf@up@draw@arrowsfalse%\n \\let\\pgf@up@stroke\\pgfutil@empty%\n \\let\\pgf@up@fill\\pgfutil@empty%\n \\let\\pgf@up@clip\\pgfutil@empty%\n \\let\\pgf@up@bb\\pgfutil@empty%\n \\pgfset{#1}%\n \\expandafter\\def\\expandafter\\pgf@up@action\\expandafter{\\csname pgfsys@\\pgf@up@fill\\pgf@up@stroke\\endcsname}%\n \\ifnum\\pgf@tips@mode=2\\relax%\n \\pgf@up@path@neededtrue%\n \\fi%\n \\ifnum\\pgf@tips@mode=4\\relax%\n \\pgf@up@path@neededtrue%\n \\fi%\n \\ifpgf@up@path@needed%\n \\else%\n \\pgfsyssoftpath@setcurrentpath\\pgfutil@empty%\n \\fi%\n \\ifx\\pgf@up@stroke\\pgfutil@empty%\n \\ifx\\pgf@up@fill\\pgfutil@empty%\n \\let\\pgf@up@action=\\pgfutil@empty%\n \\ifx\\pgf@up@clip\\pgfutil@empty%\n \\else%\n % only clipping\n \\let\\pgf@up@action=\\pgfsys@discardpath%\n \\fi%\n \\fi%\n \\fi%\n \\pgfsyssoftpath@getcurrentpath\\pgf@last@processed@path\n \\pgfprocessround{\\pgf@last@processed@path}{\\pgf@last@processed@path}% change the path\n \\pgfsyssoftpath@setcurrentpath\\pgf@last@processed@path%\n %\n % Check whether the path is stroked. If so, add half the line width\n % to the bounding box.\n %\n \\ifpgf@relevantforpicturesize%\n \\ifx\\pgf@up@stroke\\pgfutil@empty%\n \\else%\n \\ifdim\\pgf@picmaxx=-16000pt\\relax%\n \\else%\n \\pgf@x=\\pgf@pathminx\\advance\\pgf@x by-.5\\pgflinewidth%\n \\ifdim\\pgf@x<\\pgf@picminx\\global\\pgf@picminx\\pgf@x\\fi%\n \\pgf@y=\\pgf@pathminy\\advance\\pgf@y by-.5\\pgflinewidth%\n \\ifdim\\pgf@y<\\pgf@picminy\\global\\pgf@picminy\\pgf@y\\fi%\n \\pgf@x=\\pgf@pathmaxx\\advance\\pgf@x by.5\\pgflinewidth%\n \\ifdim\\pgf@x>\\pgf@picmaxx\\global\\pgf@picmaxx\\pgf@x\\fi%\n \\pgf@y=\\pgf@pathmaxy\\advance\\pgf@y by.5\\pgflinewidth%\n \\ifdim\\pgf@y>\\pgf@picmaxy\\global\\pgf@picmaxy\\pgf@y\\fi%\n \\fi%\n \\fi%\n \\fi%\n %\n \\ifx\\pgf@up@clip\\pgfutil@empty%\n \\ifx\\pgf@up@stroke\\pgfutil@empty%\n \\ifx\\pgf@up@action\\pgfutil@empty%\n \\ifnum\\pgf@tips@mode=2\\relax%\n \\pgf@up@draw@arrows@only%\n \\fi%\n \\ifnum\\pgf@tips@mode=4\\relax%\n \\pgf@up@draw@arrows@only%\n \\fi%\n \\else%\n \\pgfsyssoftpath@invokecurrentpath%\n \\pgf@up@action%\n \\fi%\n \\else%\n \\pgfgetpath\\pgf@arrowpath%\n \\pgf@path@setup@tempswa%\n \\pgfprocesscheckclosed{\\pgf@arrowpath}{\\pgfutil@tempswafalse}%\n \\pgf@path@check@proper%\n \\ifpgfutil@tempswa%\n \\pgf@check@for@arrow@and@animation%\n \\pgf@prepare@end@of@path%\n \\begingroup%\n \\pgf@prepare@start@of@path%\n \\fi%\n \\pgfsyssoftpath@invokecurrentpath%\n \\pgf@up@action%\n \\ifdim\\pgfinnerlinewidth>0pt\\relax%\n \\pgf@stroke@inner@line%\n \\fi%\n \\ifpgfutil@tempswa%\n \\pgf@add@arrow@at@start%\n \\endgroup%\n \\pgf@add@arrow@at@end%\n \\fi%\n \\fi%\n \\else%\n \\pgfsyssoftpath@invokecurrentpath%\n \\pgfsys@clipnext%\n \\pgf@up@action%\n \\pgf@relevantforpicturesizefalse%\n \\fi%\n \\pgf@up@bb%\n \\pgfsyssoftpath@setcurrentpath\\pgfutil@empty%\n \\pgf@resetpathsizes%\n \\ignorespaces%\n}\n\\def\\pgf@path@setup@tempswa{%\n \\ifnum\\pgf@tips@mode>0\\relax\n \\pgfutil@tempswatrue%\n \\else\n \\pgfutil@tempswafalse%\n \\fi%\n}\n\\def\\pgf@up@draw@arrows@only{%\n \\pgfgetpath\\pgf@arrowpath%\n \\pgfutil@tempswatrue%\n \\pgfprocesscheckclosed{\\pgf@arrowpath}{\\pgfutil@tempswafalse}%\n \\pgf@path@check@proper%\n \\ifpgfutil@tempswa%\n \\pgf@check@for@arrow@and@animation%\n \\pgf@prepare@end@of@path%\n \\begingroup%\n \\pgf@prepare@start@of@path%\n \\pgf@add@arrow@at@start%\n \\endgroup%\n \\pgf@add@arrow@at@end%\n \\fi%\n}\n\n\\def\\pgf@check@for@arrow@and@animation{\\pgfsys@if@fresh@currentid{\\pgf@check@for@arrow@and@animation@}{}}%\n\\def\\pgf@check@for@arrow@and@animation@{%\n \\expandafter\\ifx\\csname pgfsysanim@path@is@animated@\\pgf@sys@id@current@id @\\pgfsys@current@type\\endcsname\\pgfutil@empty%\n % Ok, an animation is here!\n \\ifx\\pgf@end@tip@sequence\\pgfutil@empty%\n \\ifx\\pgf@start@tip@sequence\\pgfutil@empty%\n \\else%\n \\pgf@check@for@arrow@and@animation@error%\n \\fi%\n \\else%\n \\pgf@check@for@arrow@and@animation@error%\n \\fi%\n \\fi%\n}\n\\def\\pgf@check@for@arrow@and@animation@error{\\pgferror{Animated path may not have normal arrow tips. Use a base path with arrow tips}}\n\n\\def\\pgf@path@check@proper{%\n \\ifpgfutil@tempswa%\n \\ifnum\\pgf@tips@mode>2\\relax%\n \\pgf@path@check@proper@%\n \\fi%\n \\fi%\n}\n\n\\def\\pgf@path@check@proper@{%\n {%\n \\pgf@x0pt\\pgf@y\\pgf@x%\n \\pgfutil@tempswatrue%\n \\let\\pgfsyssoftpath@movetotoken\\pgf@path@proper@init%\n \\let\\pgfsyssoftpath@linetotoken\\pgf@path@proper@test%%\n \\let\\pgfsyssoftpath@curvetosupportatoken\\pgf@path@proper@test%\n \\let\\pgfsyssoftpath@curvetosupportbtoken=\\pgf@path@proper@test%\n \\let\\pgfsyssoftpath@curvetotoken\\pgf@path@proper@test%\n \\let\\pgfsyssoftpath@rectcornertoken\\pgf@path@proper@test%\n \\let\\pgfsyssoftpath@rectsizetoken\\pgf@path@proper@zero@test%\n \\let\\pgfsyssoftpath@closepathtoken\\pgf@path@proper@test%\n % Execute the path:\n \\pgf@arrowpath%\n \\expandafter\n }%\n \\ifpgfutil@tempswa\\pgfutil@tempswafalse\\else\\pgfutil@tempswatrue\\fi%\n}\n\n\\def\\pgf@path@proper@init#1#2{\\pgfutil@tempswatrue\\pgf@x#1\\pgf@y#2}%\n\\def\\pgf@path@proper@test#1#2{%\n \\ifdim\\pgf@x=#1\\relax\\else\\pgfutil@tempswafalse\\fi%\n \\ifdim\\pgf@y=#2\\relax\\else\\pgfutil@tempswafalse\\fi}\n\\def\\pgf@path@proper@zero@test#1#2{%\n \\ifdim\\pgf@x=0pt\\relax\\else\\pgfutil@tempswafalse\\fi%\n \\ifdim\\pgf@y=0pt\\relax\\else\\pgfutil@tempswafalse\\fi}\n\n\n\n\n\\def\\pgf@stroke@inner@line{%\n \\let\\pgf@temp@save=\\pgf@strokecolor@global\n \\pgfsys@beginscope%\n {%\n \\pgfsys@setlinewidth{\\pgfinnerlinewidth}%\n \\pgfsetstrokecolor{\\pgfinnerstrokecolor}%\n \\pgfsyssoftpath@invokecurrentpath%\n \\pgfsys@stroke%\n }%\n \\pgfsys@endscope%\n \\global\\let\\pgf@strokecolor@global=\\pgf@temp@save\n}\n\n\\let\\pgf@prepare@start@of@path\\relax%\n\n\n\n\n% Shorten start/end of paths by a certain amount.\n%\n% #1 = amount by which paths should be shortened.\n%\n% Example:\n%\n% \\pgfpathmoveto{\\pgfpointorigin}\n% \\pgfpathlineto{\\pgfpoint{10pt}{0pt}\n%\n% % The following has the same effect:\n% \\pgfsetshortenstart{1pt}\n% \\pgfpathmoveto{\\pgfpointorigin}\n% \\pgfpathlineto{\\pgfpoint{11pt}{0pt}\n\n\\def\\pgfsetshortenstart#1{\\pgfmathsetlength\\pgf@shorten@start@additional{#1}}\n\\def\\pgfsetshortenend#1{\\pgfmathsetlength\\pgf@shorten@end@additional{#1}}\n\n\\newdimen\\pgf@shorten@end@additional\n\\newdimen\\pgf@shorten@start@additional\n\n\n\n%\n%\n% Handling the end of a path\n%\n%\n% The \"handling\" consists of first testing whether we need to do\n% anything at all, namely because either an arrow tip should be drawn\n% at the end or because the path should be shortened at the end. If\n% so, we shorten the path if needed and, later on, add the arrow tip.\n%\n\n\\newif\\ifpgf@worry\n\n\n% Prepare the end of the path: Test whether anything must be done\n% (step 0) and, if so, split the path (step 1), extract the interesting points from\n% the path (step 2), prepare further computations (step 3), shorten\n% the path (step 4) if necessary, and add the arrow tip (step 4 in\n% macro \\pgf@add@arrow@at@end, which is called later).\n\n\\def\\pgf@prepare@end@of@path{%\n \\let\\pgfprocessresultpathsuffix\\relax% flag that nothing has happened...\n \\let\\pgfprocessresultsubpathsuffix\\relax%\n \\pgfsyssoftpath@getcurrentpath\\pgf@arrowpath%\n %\n % Step 0 start:\n %\n % Do we need to worry about the end?\n %\n \\ifx\\pgf@arrowpath\\pgfutil@empty\\else%\n \\pgf@worryfalse%\n \\ifx\\pgf@end@tip@sequence\\pgfutil@empty%\n \\else%\n \\pgf@worrytrue% Yes, worry if we have to draw an arrow\n \\fi%\n \\pgf@precise@shorteningfalse%\n \\pgf@arrow@compute@shortening\\pgf@end@tip@sequence%\n \\advance\\pgf@xa by\\pgf@shorten@end@additional%\n \\advance\\pgf@xb by\\pgf@shorten@end@additional%\n \\ifdim\\pgf@xa=0pt\\relax\\else\\pgf@worrytrue\\fi% Also, worry if shortening is requested\n \\edef\\pgf@path@shortening@distance{\\the\\pgf@xa}%\n \\edef\\pgf@arrow@tip@total@length{\\the\\pgf@xb}%\n %\n % Step 0 done.\n %\n \\ifpgf@worry%\n % Ok, need to \"worry\" about the end, either because we need to\n % shorten it or to draw an arrow head.\n %\n % Step 1: Split\n %\n \\pgfprocesssplitpath{\\pgf@arrowpath}%\n \\pgfprocesssplitsubpath{\\pgfprocessresultpathsuffix}%\n %\n % Step 2: extract\n %\n \\expandafter\\pgf@parse@end\\pgfprocessresultsubpathsuffix\\pgf@stop\\pgf@stop\\pgf@stop%\n %\n % Step 3: prep\n %\n \\pgf@prep@end%\n %\n % Step 4: shorten\n %\n \\ifdim\\pgf@path@shortening@distance=0pt\\else\\pgf@do@shorten@end\\fi%\n \\expandafter\\expandafter\\expandafter\\def%\n \\expandafter\\expandafter\\expandafter\\pgf@arrowpath%\n \\expandafter\\expandafter\\expandafter{\\expandafter\\pgfprocessresultpathprefix\\pgfprocessresultpathsuffix}%\n \\pgfsyssoftpath@setcurrentpath\\pgf@arrowpath%\n \\fi%\n \\fi%\n}\n\n\\def\\pgf@parse@end#1#2#3#4#5#6{%\n \\ifx#4\\pgf@stop% Only a moveto! -> do nothing!\n \\def\\pgfpointlastonpath{\\pgfqpoint{#2}{#3}}%\n \\let\\pgf@next\\relax%\n \\let\\pgf@do@shorten@end\\relax%\n \\let\\pgf@do@draw@end\\pgf@do@draw@straightend%\n \\let\\pgf@prep@end\\pgf@prep@movetoend%\n \\else\\ifx#4\\pgfsyssoftpath@curvetosupportatoken% A curve -> this will get complicated...\n \\def\\pgfsubpathfourthlasttoken{#1}%\n \\def\\pgfpointfourthlastonpath{\\pgfqpoint{#2}{#3}}%\n \\def\\pgfpointthirdlastonpath{\\pgfqpoint{#5}{#6}}%\n \\ifpgf@precise@shortening%\n \\let\\pgf@do@shorten@end\\pgf@do@shorten@curvedend%\n \\let\\pgf@do@draw@end\\pgf@do@draw@curvedend%\n \\let\\pgf@prep@end\\pgf@prep@curveend%\n \\else%\n \\def\\pgfsubpathstart{\\noexpand#1{#2}{#3}\\noexpand#4{#5}{#6}}%\n \\let\\pgf@do@shorten@end\\pgf@do@shorten@straightend%\n \\let\\pgf@do@draw@end\\pgf@do@draw@straightend%\n \\let\\pgf@prep@end\\pgf@prep@straightend%\n \\fi%\n \\let\\pgf@next\\pgf@parse@end@curve@cont%\n \\else% A straight line -> great!\n \\def\\pgfsubpathstart{\\noexpand#1{#2}{#3}\\noexpand#4}%\n \\def\\pgfpointsecondlastonpath{\\pgfqpoint{#2}{#3}}%\n \\def\\pgfpointlastonpath{\\pgfqpoint{#5}{#6}}%\n \\let\\pgfpointfourthlastonpath\\relax%\n \\let\\pgfpointthirdlastonpath\\relax%\n \\let\\pgf@next\\pgf@parse@end@gobble@three%\n \\let\\pgf@do@shorten@end\\pgf@do@shorten@straightend%\n \\let\\pgf@do@draw@end\\pgf@do@draw@straightend%\n \\let\\pgf@prep@end\\pgf@prep@straightend%\n \\fi\\fi%\n \\pgf@next% Needed for reading rest of path...\n}\n\n\\def\\pgf@parse@end@gobble@three#1#2#3{}%\n\\def\\pgf@parse@end@curve@cont#1#2#3#4#5#6#7#8#9{%\n \\def\\pgfpointsecondlastonpath{\\pgfqpoint{#2}{#3}}%\n \\def\\pgfpointlastonpath{\\pgfqpoint{#5}{#6}}%\n \\ifpgf@precise@shortening%\n \\else%\n \\expandafter\\def\\expandafter\\pgfsubpathstart\\expandafter{\\pgfsubpathstart\\noexpand#1{#2}{#3}\\noexpand#4}%\n \\fi%\n}\n\n%\n% Preps\n%\n\\def\\pgf@prep@movetoend{%\n \\pgf@process{\\pgfpointlastonpath}%\n \\pgf@xb\\pgf@x\n \\pgf@yb\\pgf@y\n \\pgf@xc\\pgf@x\n \\pgf@yc\\pgf@y\n}\n\\def\\pgf@prep@straightend{%\n \\let\\pgf@ref\\pgfpointsecondlastonpath\n \\ifx\\pgfpointlastonpath\\pgfpointsecondlastonpath% degenerate!\n \\ifx\\pgfpointthirdlastonpath\\relax% cannot help it: really a zero-length path\n \\else%\n \\ifx\\pgfpointlastonpath\\pgfpointthirdlastonpath% double degenerate!\n \\let\\pgf@ref\\pgfpointfourthlastonpath% Use third point for reference.\n \\else\n \\let\\pgf@ref\\pgfpointthirdlastonpath% Use third point for reference.\n \\fi%\n \\fi%\n \\fi%\n \\pgfpointlineatdistance{\\pgf@path@shortening@distance}{\\pgfpointlastonpath}{\\pgf@ref}%\n \\pgf@xa\\pgf@x%\n \\pgf@ya\\pgf@y%\n}\n\n\n%\n% Line shortening for straight lines:\n%\n\\def\\pgf@do@shorten@straightend{%\n \\edef\\pgfprocessresultsubpathsuffix{\\pgfsubpathstart{\\the\\pgf@xa}{\\the\\pgf@ya}}%\n \\expandafter\\expandafter\\expandafter\\def%\n \\expandafter\\expandafter\\expandafter\\pgfprocessresultpathsuffix%\n \\expandafter\\expandafter\\expandafter{\\expandafter\\pgfprocessresultsubpathprefix\\pgfprocessresultsubpathsuffix}%\n}\n\n\n%\n% Draw an end arrow by calling an appropriate subfunction, if necessary\n%\n\n\\def\\pgf@add@arrow@at@end{%\n \\ifx\\pgf@arrowpath\\pgfutil@empty\\else%\n \\ifx\\pgf@end@tip@sequence\\pgfutil@empty\\else%\n \\pgf@do@draw@end%\n \\fi%\n \\fi%\n}\n\n%\n% Draw an end arrow at the end of a straight line\n%\n\\def\\pgf@do@draw@straightend{%\n {%\n \\pgftransformreset%\n \\pgftransformarrow{\\pgfqpoint{\\pgf@xc}{\\pgf@yc}}{\\pgfqpoint{\\pgf@xb}{\\pgf@yb}}%\n \\pgf@arrow@draw@arrow\\pgf@end@tip@sequence\\pgf@arrow@tip@total@length%\n }%\n}\n\n\n\n\n\n%\n%\n% Handling the start of a path\n%\n%\n% The \"handling\" is similar to the case for the start of the path. We\n% may be able to skip the splitting if that was done already for the\n% end. Otherwise, things are basically the same.\n%\n\n% Prepare the start of the path: Test whether anything must be done\n% (step 0) and, if so, split the path (step 1) if necessary, extract\n% the interesting points from the path (step 2), prepare computations\n% (step 3) needed for both shortening and tip adding, shorten the path\n% (step 4), and add the arrow tip (step 5 in macro\n% \\pgf@add@arrow@at@start, which is called later).\n\n\\def\\pgf@prepare@start@of@path{%\n %\n % Step 0 start:\n %\n % Do we need to worry about the start?\n %\n \\ifx\\pgf@arrowpath\\pgfutil@empty\\else%\n \\pgf@worryfalse%\n \\ifx\\pgf@start@tip@sequence\\pgfutil@empty\\else\\pgf@worrytrue\\fi% Yes, worry if we have to draw an arrow\n \\pgf@precise@shorteningfalse%\n \\pgf@arrow@compute@shortening\\pgf@start@tip@sequence%\n \\advance\\pgf@xa by\\pgf@shorten@start@additional%\n \\advance\\pgf@xb by\\pgf@shorten@start@additional%\n \\ifdim\\pgf@xa=0pt\\relax\\else\\pgf@worrytrue\\fi% Also, worry if shortening is requested\n \\edef\\pgf@path@shortening@distance{\\the\\pgf@xa}%\n \\edef\\pgf@arrow@tip@total@length{\\the\\pgf@xb}%\n %\n % Step 0 done.\n %\n \\ifpgf@worry%\n % Ok, need to \"worry\" about the start, either because we need to\n % shorten it or to draw an arrow head.\n %\n % Step 1: Split\n %\n \\ifx\\pgfprocessresultpathsuffix\\relax%\n % Ok, still need to compute the split:\n \\pgfprocesssplitpath{\\pgf@arrowpath}%\n \\fi%\n %\n % Step 2: extract\n %\n \\expandafter\\pgf@parse@start\\pgfprocessresultpathsuffix\\pgf@stop\\pgf@stop\\pgf@stop%\n %\n % Step 3: prep\n %\n \\pgf@prep@start%\n %\n % Step 4: shorten\n %\n \\ifdim\\pgf@path@shortening@distance=0pt\\else\\pgf@do@shorten@start\\fi%\n \\expandafter\\expandafter\\expandafter\\def%\n \\expandafter\\expandafter\\expandafter\\pgf@arrowpath%\n \\expandafter\\expandafter\\expandafter{\\expandafter\\pgfprocessresultpathprefix\\pgfprocessresultpathsuffix}%\n \\pgfsyssoftpath@setcurrentpath\\pgf@arrowpath%\n \\fi%\n \\fi%\n}\n\n\\def\\pgf@parse@start#1#2#3#4#5#6{%\n \\def\\pgfpointfirstonpath{\\pgfqpoint{#2}{#3}}%\n \\def\\pgfpointsecondonpath{\\pgfqpoint{#5}{#6}}%\n \\let\\pgfpointthirdonpath\\relax%\n \\let\\pgfpointfourthonpath\\relax%\n \\def\\pgfsubpathfirsttoken{\\noexpand#1}%\n \\def\\pgfsubpathsecondtoken{\\noexpand#4}%\n \\ifx#4\\pgf@stop% Only a moveto! -> do nothing!\n \\let\\pgf@next\\relax%\n \\let\\pgf@do@shorten@start\\relax%\n \\let\\pgf@prep@start\\pgf@prep@movetostart%\n \\let\\pgf@do@draw@start\\pgf@do@draw@straightstart%\n \\else\\ifx#4\\pgfsyssoftpath@curvetosupportatoken% A curve -> this will get complicated...\n \\ifpgf@precise@shortening%\n \\let\\pgf@next\\pgf@parse@start@curve@cont%\n \\let\\pgf@do@shorten@start\\pgf@do@shorten@curvedstart%\n \\let\\pgf@do@draw@start\\pgf@do@draw@curvedstart%\n \\let\\pgf@prep@start\\pgf@prep@curvedstart%\n \\else% can treat the end like a straight line...\n \\let\\pgf@next\\pgf@parse@start@curve@cont@straight%\n \\let\\pgf@do@shorten@start\\pgf@do@shorten@straightstart%\n \\let\\pgf@do@draw@start\\pgf@do@draw@straightstart%\n \\let\\pgf@prep@start\\pgf@prep@straightstart%\n \\fi%\n \\else% A straight line -> great!\n \\let\\pgf@next\\pgf@parse@start@till@stop%\n \\let\\pgf@do@shorten@start\\pgf@do@shorten@straightstart%\n \\let\\pgf@do@draw@start\\pgf@do@draw@straightstart%\n \\let\\pgf@prep@start\\pgf@prep@straightstart%\n \\fi\\fi%\n \\pgf@next% Needed for reading rest of path...\n}\n\n\\def\\pgf@parse@start@till@stop#1\\pgf@stop\\pgf@stop\\pgf@stop{\\def\\pgfsubpathend{#1}}%\n\n\\def\\pgf@parse@start@curve@cont#1#2#3#4#5#6#7\\pgf@stop\\pgf@stop\\pgf@stop{%\n \\def\\pgfpointthirdonpath{\\pgfqpoint{#2}{#3}}%\n \\def\\pgfpointfourthonpath{\\pgfqpoint{#5}{#6}}%\n \\def\\pgfsubpathend{#7}%\n}\n\n\\def\\pgf@parse@start@curve@cont@straight#1#2#3#4#5#6#7\\pgf@stop\\pgf@stop\\pgf@stop{%\n \\def\\pgfpointthirdonpath{\\pgfqpoint{#2}{#3}}%\n \\def\\pgfpointfourthonpath{\\pgfqpoint{#5}{#6}}%\n \\def\\pgfsubpathend{#1{#2}{#3}#4{#5}{#6}#7}%\n}\n\n%\n% Preps\n%\n\\def\\pgf@prep@movetostart{%\n \\pgf@process{\\pgfpointfirstonpath}%\n \\pgf@xb\\pgf@x\n \\pgf@yb\\pgf@y\n \\pgf@xc\\pgf@x\n \\pgf@yc\\pgf@y\n}\n\\def\\pgf@prep@straightstart{%\n \\let\\pgf@ref\\pgfpointsecondonpath\n \\ifx\\pgfpointfirstonpath\\pgfpointsecondonpath% degenerate!\n \\ifx\\pgfpointthirdonpath\\relax% cannot help it: really a zero-length path\n \\else%\n \\ifx\\pgfpointfirstonpath\\pgfpointthirdonpath% double degenerate!\n \\let\\pgf@ref\\pgfpointfourthonpath% Use third point for reference.\n \\else\n \\let\\pgf@ref\\pgfpointthirdonpath% Use third point for reference.\n \\fi%\n \\fi%\n \\fi%\n \\pgfpointlineatdistance{\\pgf@path@shortening@distance}{\\pgfpointfirstonpath}{\\pgf@ref}%\n \\pgf@xa\\pgf@x%\n \\pgf@ya\\pgf@y%\n}\n\n%\n% Line shortening for straight lines:\n%\n\\def\\pgf@do@shorten@straightstart{%\n \\edef\\pgfprocessresultpathsuffix{\\pgfsubpathfirsttoken{\\the\\pgf@xa}{\\the\\pgf@ya}\\pgfsubpathsecondtoken{\\the\\pgf@xc}{\\the\\pgf@yc}}%\n \\expandafter\\expandafter\\expandafter\\def%\n \\expandafter\\expandafter\\expandafter\\pgfprocessresultpathsuffix%\n \\expandafter\\expandafter\\expandafter{\\expandafter\\pgfprocessresultpathsuffix\\pgfsubpathend}%\n}\n\n\n%\n% Draw a start arrow by calling an appropriate subfunction, if necessary\n%\n\n\\def\\pgf@add@arrow@at@start{%\n \\ifx\\pgf@arrowpath\\pgfutil@empty\\else%\n \\ifx\\pgf@start@tip@sequence\\pgfutil@empty\\else%\n \\pgf@do@draw@start%\n \\fi%\n \\fi%\n}\n\n%\n% Draw an start arrow at the start of a straight line\n%\n\\def\\pgf@do@draw@straightstart{%\n {%\n \\pgftransformreset%\n \\pgftransformarrow{\\pgfqpoint{\\pgf@xc}{\\pgf@yc}}{\\pgfqpoint{\\pgf@xb}{\\pgf@yb}}%\n \\pgf@arrow@draw@arrow\\pgf@start@tip@sequence\\pgf@arrow@tip@total@length%\n }%\n}\n\n\n\n\\let\\pgf@shorten@end=\\pgfutil@empty\n\\let\\pgf@shorten@start=\\pgfutil@empty\n\n\n\\endinput%\n"} +{"text": "\n.hp-config {}\n\n.hp-config tbody th {text-align:right; padding-right:0.5em;}\n.hp-config thead, .hp-config .namespace {background:#3C578C; color:#FFF;}\n.hp-config .namespace th {text-align:center;}\n.hp-config .verbose {display:none;}\n.hp-config .controls {text-align:center;}\n\n/* vim: et sw=4 sts=4 */\n"} +{"text": "/**************************************************************************\n** This file is part of LiteIDE\n**\n** Copyright (c) 2011-2019 LiteIDE. All rights reserved.\n**\n** This library is free software; you can redistribute it and/or\n** modify it under the terms of the GNU Lesser General Public\n** License as published by the Free Software Foundation; either\n** version 2.1 of the License, or (at your option) any later version.\n**\n** This library is distributed in the hope that it will be useful,\n** but WITHOUT ANY WARRANTY; without even the implied warranty of\n** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n** Lesser General Public License for more details.\n**\n** In addition, as a special exception, that plugins developed for LiteIDE,\n** are allowed to remain closed sourced and can be distributed under any license .\n** These rights are included in the file LGPL_EXCEPTION.txt in this package.\n**\n**************************************************************************/\n// Module: golangfmtoptionfactory.h\n// Creator: visualfc <visualfc@gmail.com>\n\n#ifndef GOLANGFMTOPTIONFACTORY_H\n#define GOLANGFMTOPTIONFACTORY_H\n\n#include \"liteapi/liteapi.h\"\n\nclass GolangFmtOptionFactory : public LiteApi::IOptionFactory\n{\npublic:\n GolangFmtOptionFactory(LiteApi::IApplication *app, QObject *parent);\n virtual QStringList mimeTypes() const;\n virtual LiteApi::IOption *create(const QString &mimeType);\nprotected:\n LiteApi::IApplication *m_liteApp;\n};\n\n#endif // GOLANGFMTOPTIONFACTORY_H\n"} +{"text": "---\n organization: Codespeaks\n link: http://www.tobie.me/\n github: tobie\n name: Tobie Langel\n pull_request_number: 502\n---\n"} +{"text": "/******************************************************************************\r\n Copyright (c) 2007-2011, Intel Corp.\r\n All rights reserved.\r\n\r\n Redistribution and use in source and binary forms, with or without \r\n modification, are permitted provided that the following conditions are met:\r\n\r\n * Redistributions of source code must retain the above copyright notice, \r\n this list of conditions and the following disclaimer.\r\n * Redistributions in binary form must reproduce the above copyright \r\n notice, this list of conditions and the following disclaimer in the \r\n documentation and/or other materials provided with the distribution.\r\n * Neither the name of Intel Corporation nor the names of its contributors \r\n may be used to endorse or promote products derived from this software \r\n without specific prior written permission.\r\n\r\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\r\n AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\r\n IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\r\n ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE\r\n LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\r\n CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\r\n SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\r\n INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\r\n CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\r\n ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF\r\n THE POSSIBILITY OF SUCH DAMAGE.\r\n******************************************************************************/\r\n\r\n#define BID_128RES\r\n#define BID_FUNCTION_SETS_BINARY_FLAGS\r\n#include \"bid_div_macros.h\"\r\n\r\nBID_EXTERN_C const BID_UINT32 bid_convert_table[5][128][2];\r\nBID_EXTERN_C const BID_SINT8 bid_factors[][2];\r\nBID_EXTERN_C const BID_UINT8 bid_packed_10000_zeros[];\r\n\r\nBID128_FUNCTION_ARG2 (bid128_div, x, y)\r\n\r\n BID_UINT256 CA4, CA4r, P256;\r\n BID_UINT128 CX, CY, T128, CQ, CR, CA, TP128, Qh, Ql, res;\r\n BID_UINT64 sign_x, sign_y, T, carry64, D, Q_high, Q_low, QX, PD,\r\n valid_y;\r\n int_float fx, fy, f64;\r\n BID_UINT32 QX32, tdigit[3], digit, digit_h, digit_low;\r\n int exponent_x, exponent_y, bin_index, bin_expon, diff_expon, ed2,\r\n digits_q, amount;\r\n int nzeros, i, j, k, d5;\r\n unsigned rmode;\r\n\r\n BID_OPT_SAVE_BINARY_FLAGS()\r\n\r\nvalid_y = unpack_BID128_value (&sign_y, &exponent_y, &CY, y);\r\n\r\n // unpack arguments, check for NaN or Infinity\r\nif (!unpack_BID128_value (&sign_x, &exponent_x, &CX, x)) {\r\n // test if x is NaN\r\nif ((x.w[1] & 0x7c00000000000000ull) == 0x7c00000000000000ull) {\r\n#ifdef BID_SET_STATUS_FLAGS\r\n if ((x.w[1] & 0x7e00000000000000ull) == 0x7e00000000000000ull ||\t// sNaN\r\n (y.w[1] & 0x7e00000000000000ull) == 0x7e00000000000000ull)\r\n __set_status_flags (pfpsf, BID_INVALID_EXCEPTION);\r\n#endif\r\n res.w[1] = (CX.w[1]) & QUIET_MASK64;\r\n res.w[0] = CX.w[0];\r\n BID_RETURN (res);\r\n}\r\n // x is Infinity?\r\nif ((x.w[1] & 0x7800000000000000ull) == 0x7800000000000000ull) {\r\n // check if y is Inf. \r\n if (((y.w[1] & 0x7c00000000000000ull) == 0x7800000000000000ull))\r\n // return NaN \r\n {\r\n#ifdef BID_SET_STATUS_FLAGS\r\n __set_status_flags (pfpsf, BID_INVALID_EXCEPTION);\r\n#endif\r\n res.w[1] = 0x7c00000000000000ull;\r\n res.w[0] = 0;\r\n BID_RETURN (res);\r\n }\r\n // y is NaN?\r\n if (((y.w[1] & 0x7c00000000000000ull) != 0x7c00000000000000ull))\r\n // return NaN \r\n {\r\n // return +/-Inf\r\n res.w[1] = ((x.w[1] ^ y.w[1]) & 0x8000000000000000ull) |\r\n 0x7800000000000000ull;\r\n res.w[0] = 0;\r\n BID_RETURN (res);\r\n }\r\n}\r\n // x is 0\r\nif ((y.w[1] & 0x7800000000000000ull) < 0x7800000000000000ull) {\r\n if ((!CY.w[0]) && !(CY.w[1] & 0x0001ffffffffffffull)) {\r\n#ifdef BID_SET_STATUS_FLAGS\r\n __set_status_flags (pfpsf, BID_INVALID_EXCEPTION);\r\n#endif\r\n // x=y=0, return NaN\r\n res.w[1] = 0x7c00000000000000ull;\r\n res.w[0] = 0;\r\n BID_RETURN (res);\r\n }\r\n // return 0\r\n res.w[1] = (x.w[1] ^ y.w[1]) & 0x8000000000000000ull;\r\n exponent_x = exponent_x - exponent_y + DECIMAL_EXPONENT_BIAS_128;\r\n if (exponent_x > DECIMAL_MAX_EXPON_128)\r\n exponent_x = DECIMAL_MAX_EXPON_128;\r\n else if (exponent_x < 0)\r\n exponent_x = 0;\r\n res.w[1] |= (((BID_UINT64) exponent_x) << 49);\r\n res.w[0] = 0;\r\n BID_RETURN (res);\r\n}\r\n}\r\nif (!valid_y) {\r\n // y is Inf. or NaN\r\n\r\n // test if y is NaN\r\n if ((y.w[1] & 0x7c00000000000000ull) == 0x7c00000000000000ull) {\r\n#ifdef BID_SET_STATUS_FLAGS\r\n if ((y.w[1] & 0x7e00000000000000ull) == 0x7e00000000000000ull)\t// sNaN\r\n __set_status_flags (pfpsf, BID_INVALID_EXCEPTION);\r\n#endif\r\n res.w[1] = CY.w[1] & QUIET_MASK64;\r\n res.w[0] = CY.w[0];\r\n BID_RETURN (res);\r\n }\r\n // y is Infinity?\r\n if ((y.w[1] & 0x7800000000000000ull) == 0x7800000000000000ull) {\r\n // return +/-0\r\n res.w[1] = sign_x ^ sign_y;\r\n res.w[0] = 0;\r\n BID_RETURN (res);\r\n }\r\n // y is 0, return +/-Inf\r\n#ifdef BID_SET_STATUS_FLAGS\r\n __set_status_flags (pfpsf, BID_ZERO_DIVIDE_EXCEPTION);\r\n#endif\r\n res.w[1] =\r\n ((x.w[1] ^ y.w[1]) & 0x8000000000000000ull) | 0x7800000000000000ull;\r\n res.w[0] = 0;\r\n BID_RETURN (res);\r\n}\r\n#ifdef UNCHANGED_BINARY_STATUS_FLAGS\r\n// (void) fegetexceptflag (&binaryflags, BID_FE_ALL_FLAGS);\r\n#endif\r\ndiff_expon = exponent_x - exponent_y + DECIMAL_EXPONENT_BIAS_128;\r\n\r\nif (__unsigned_compare_gt_128 (CY, CX)) {\r\n // CX < CY\r\n\r\n // 2^64\r\n f64.i = 0x5f800000;\r\n\r\n // fx ~ CX, fy ~ CY\r\n fx.d = (float) CX.w[1] * f64.d + (float) CX.w[0];\r\n fy.d = (float) CY.w[1] * f64.d + (float) CY.w[0];\r\n // expon_cy - expon_cx\r\n bin_index = (fy.i - fx.i) >> 23;\r\n\r\n if (CX.w[1]) {\r\n T = bid_power10_index_binexp_128[bin_index].w[0];\r\n __mul_64x128_short (CA, T, CX);\r\n } else {\r\n T128 = bid_power10_index_binexp_128[bin_index];\r\n __mul_64x128_short (CA, CX.w[0], T128);\r\n }\r\n\r\n ed2 = 33;\r\n if (__unsigned_compare_gt_128 (CY, CA))\r\n ed2++;\r\n\r\n T128 = bid_power10_table_128[ed2];\r\n __mul_128x128_to_256 (CA4, CA, T128);\r\n\r\n ed2 += bid_estimate_decimal_digits[bin_index];\r\n CQ.w[0] = CQ.w[1] = 0;\r\n diff_expon = diff_expon - ed2;\r\n\r\n} else {\r\n // get CQ = CX/CY\r\n bid___div_128_by_128 (&CQ, &CR, CX, CY);\r\n\r\n if (!CR.w[1] && !CR.w[0]) {\r\n bid_get_BID128 (&res, sign_x ^ sign_y, diff_expon, CQ, &rnd_mode,\r\n\t\tpfpsf);\r\n#ifdef UNCHANGED_BINARY_STATUS_FLAGS\r\n // (void) fesetexceptflag (&binaryflags, BID_FE_ALL_FLAGS);\r\n#endif\r\n BID_RETURN (res);\r\n }\r\n // get number of decimal digits in CQ\r\n // 2^64\r\n f64.i = 0x5f800000;\r\n fx.d = (float) CQ.w[1] * f64.d + (float) CQ.w[0];\r\n // binary expon. of CQ\r\n bin_expon = (fx.i - 0x3f800000) >> 23;\r\n\r\n digits_q = bid_estimate_decimal_digits[bin_expon];\r\n TP128.w[0] = bid_power10_index_binexp_128[bin_expon].w[0];\r\n TP128.w[1] = bid_power10_index_binexp_128[bin_expon].w[1];\r\n if (__unsigned_compare_ge_128 (CQ, TP128))\r\n digits_q++;\r\n\r\n ed2 = 34 - digits_q;\r\n T128.w[0] = bid_power10_table_128[ed2].w[0];\r\n T128.w[1] = bid_power10_table_128[ed2].w[1];\r\n __mul_128x128_to_256 (CA4, CR, T128);\r\n diff_expon = diff_expon - ed2;\r\n __mul_128x128_low (CQ, CQ, T128);\r\n\r\n}\r\n\r\nbid___div_256_by_128 (&CQ, &CA4, CY);\r\n\r\n#ifdef BID_SET_STATUS_FLAGS\r\nif (CA4.w[0] || CA4.w[1]) {\r\n // set status flags\r\n __set_status_flags (pfpsf, BID_INEXACT_EXCEPTION);\r\n}\r\n#ifndef LEAVE_TRAILING_ZEROS\r\nelse\r\n#endif\r\n#else\r\n#ifndef LEAVE_TRAILING_ZEROS\r\nif (!CA4.w[0] && !CA4.w[1])\r\n#endif\r\n#endif\r\n#ifndef LEAVE_TRAILING_ZEROS\r\n // check whether result is exact\r\n{\r\n // check whether CX, CY are short\r\n if (!CX.w[1] && !CY.w[1] && (CX.w[0] <= 1024) && (CY.w[0] <= 1024)) {\r\n i = (int) CY.w[0] - 1;\r\n j = (int) CX.w[0] - 1;\r\n // difference in powers of 2 bid_factors for Y and X\r\n nzeros = ed2 - bid_factors[i][0] + bid_factors[j][0];\r\n // difference in powers of 5 bid_factors\r\n d5 = ed2 - bid_factors[i][1] + bid_factors[j][1];\r\n if (d5 < nzeros)\r\n nzeros = d5;\r\n // get P*(2^M[extra_digits])/10^extra_digits\r\n __mul_128x128_full (Qh, Ql, CQ, bid_reciprocals10_128[nzeros]);\r\n\r\n // now get P/10^extra_digits: shift Q_high right by M[extra_digits]-128\r\n amount = bid_recip_scale[nzeros];\r\n __shr_128_long (CQ, Qh, amount);\r\n\r\n diff_expon += nzeros;\r\n } else {\r\n // decompose Q as Qh*10^17 + Ql\r\n //T128 = bid_reciprocals10_128[17];\r\n T128.w[0] = 0x44909befeb9fad49ull;\r\n T128.w[1] = 0x000b877aa3236a4bull;\r\n __mul_128x128_to_256 (P256, CQ, T128);\r\n //amount = bid_recip_scale[17];\r\n Q_high = (P256.w[2] >> 44) | (P256.w[3] << (64 - 44));\r\n Q_low = CQ.w[0] - Q_high * 100000000000000000ull;\r\n\r\n if (!Q_low) {\r\n diff_expon += 17;\r\n\r\n tdigit[0] = Q_high & 0x3ffffff;\r\n tdigit[1] = 0;\r\n QX = Q_high >> 26;\r\n QX32 = QX;\r\n nzeros = 0;\r\n\r\n for (j = 0; QX32; j++, QX32 >>= 7) {\r\n\tk = (QX32 & 127);\r\n\ttdigit[0] += bid_convert_table[j][k][0];\r\n\ttdigit[1] += bid_convert_table[j][k][1];\r\n\tif (tdigit[0] >= 100000000) {\r\n\t tdigit[0] -= 100000000;\r\n\t tdigit[1]++;\r\n\t}\r\n }\r\n\r\n if (tdigit[1] >= 100000000) {\r\n\ttdigit[1] -= 100000000;\r\n\tif (tdigit[1] >= 100000000)\r\n\t tdigit[1] -= 100000000;\r\n }\r\n\r\n digit = tdigit[0];\r\n if (!digit && !tdigit[1])\r\n\tnzeros += 16;\r\n else {\r\n\tif (!digit) {\r\n\t nzeros += 8;\r\n\t digit = tdigit[1];\r\n\t}\r\n\t// decompose digit\r\n\tPD = (BID_UINT64) digit *0x068DB8BBull;\r\n\tdigit_h = (BID_UINT32) (PD >> 40);\r\n\tdigit_low = digit - digit_h * 10000;\r\n\r\n\tif (!digit_low)\r\n\t nzeros += 4;\r\n\telse\r\n\t digit_h = digit_low;\r\n\r\n\tif (!(digit_h & 1))\r\n\t nzeros +=\r\n\t 3 & (BID_UINT32) (bid_packed_10000_zeros[digit_h >> 3] >>\r\n\t\t\t (digit_h & 7));\r\n }\r\n\r\n if (nzeros) {\r\n\t__mul_64x64_to_128 (CQ, Q_high, bid_reciprocals10_64[nzeros]);\r\n\r\n\t// now get P/10^extra_digits: shift C64 right by M[extra_digits]-64\r\n\tamount = bid_short_recip_scale[nzeros];\r\n\tCQ.w[0] = CQ.w[1] >> amount;\r\n } else\r\n\tCQ.w[0] = Q_high;\r\n CQ.w[1] = 0;\r\n\r\n diff_expon += nzeros;\r\n } else {\r\n tdigit[0] = Q_low & 0x3ffffff;\r\n tdigit[1] = 0;\r\n QX = Q_low >> 26;\r\n QX32 = QX;\r\n nzeros = 0;\r\n\r\n for (j = 0; QX32; j++, QX32 >>= 7) {\r\n\tk = (QX32 & 127);\r\n\ttdigit[0] += bid_convert_table[j][k][0];\r\n\ttdigit[1] += bid_convert_table[j][k][1];\r\n\tif (tdigit[0] >= 100000000) {\r\n\t tdigit[0] -= 100000000;\r\n\t tdigit[1]++;\r\n\t}\r\n }\r\n\r\n if (tdigit[1] >= 100000000) {\r\n\ttdigit[1] -= 100000000;\r\n\tif (tdigit[1] >= 100000000)\r\n\t tdigit[1] -= 100000000;\r\n }\r\n\r\n digit = tdigit[0];\r\n if (!digit && !tdigit[1])\r\n\tnzeros += 16;\r\n else {\r\n\tif (!digit) {\r\n\t nzeros += 8;\r\n\t digit = tdigit[1];\r\n\t}\r\n\t// decompose digit\r\n\tPD = (BID_UINT64) digit *0x068DB8BBull;\r\n\tdigit_h = (BID_UINT32) (PD >> 40);\r\n\tdigit_low = digit - digit_h * 10000;\r\n\r\n\tif (!digit_low)\r\n\t nzeros += 4;\r\n\telse\r\n\t digit_h = digit_low;\r\n\r\n\tif (!(digit_h & 1))\r\n\t nzeros +=\r\n\t 3 & (BID_UINT32) (bid_packed_10000_zeros[digit_h >> 3] >>\r\n\t\t\t (digit_h & 7));\r\n }\r\n\r\n if (nzeros) {\r\n\t// get P*(2^M[extra_digits])/10^extra_digits\r\n\t__mul_128x128_full (Qh, Ql, CQ, bid_reciprocals10_128[nzeros]);\r\n\r\n\t//now get P/10^extra_digits: shift Q_high right by M[extra_digits]-128\r\n\tamount = bid_recip_scale[nzeros];\r\n\t__shr_128 (CQ, Qh, amount);\r\n }\r\n diff_expon += nzeros;\r\n\r\n }\r\n }\r\n bid_get_BID128 (&res, sign_x ^ sign_y, diff_expon, CQ, &rnd_mode, pfpsf);\r\n#ifdef UNCHANGED_BINARY_STATUS_FLAGS\r\n // (void) fesetexceptflag (&binaryflags, BID_FE_ALL_FLAGS);\r\n#endif\r\n BID_RETURN (res);\r\n}\r\n#endif\r\n\r\nif (diff_expon >= 0) {\r\n#ifdef IEEE_ROUND_NEAREST\r\n // rounding\r\n // 2*CA4 - CY\r\n CA4r.w[1] = (CA4.w[1] + CA4.w[1]) | (CA4.w[0] >> 63);\r\n CA4r.w[0] = CA4.w[0] + CA4.w[0];\r\n __sub_borrow_out (CA4r.w[0], carry64, CA4r.w[0], CY.w[0]);\r\n CA4r.w[1] = CA4r.w[1] - CY.w[1] - carry64;\r\n\r\n D = (CA4r.w[1] | CA4r.w[0]) ? 1 : 0;\r\n carry64 = (1 + (((BID_SINT64) CA4r.w[1]) >> 63)) & ((CQ.w[0]) | D);\r\n\r\n CQ.w[0] += carry64;\r\n if (CQ.w[0] < carry64)\r\n CQ.w[1]++;\r\n#else\r\n#ifdef IEEE_ROUND_NEAREST_TIES_AWAY\r\n // rounding\r\n // 2*CA4 - CY\r\n CA4r.w[1] = (CA4.w[1] + CA4.w[1]) | (CA4.w[0] >> 63);\r\n CA4r.w[0] = CA4.w[0] + CA4.w[0];\r\n __sub_borrow_out (CA4r.w[0], carry64, CA4r.w[0], CY.w[0]);\r\n CA4r.w[1] = CA4r.w[1] - CY.w[1] - carry64;\r\n\r\n D = (CA4r.w[1] | CA4r.w[0]) ? 0 : 1;\r\n carry64 = (1 + (((BID_SINT64) CA4r.w[1]) >> 63)) | D;\r\n\r\n CQ.w[0] += carry64;\r\n if (CQ.w[0] < carry64)\r\n CQ.w[1]++;\r\n#else\r\n rmode = rnd_mode;\r\n if (sign_x ^ sign_y && (unsigned) (rmode - 1) < 2)\r\n rmode = 3 - rmode;\r\n switch (rmode) {\r\n case BID_ROUNDING_TO_NEAREST:\t// round to nearest code\r\n // rounding\r\n // 2*CA4 - CY\r\n CA4r.w[1] = (CA4.w[1] + CA4.w[1]) | (CA4.w[0] >> 63);\r\n CA4r.w[0] = CA4.w[0] + CA4.w[0];\r\n __sub_borrow_out (CA4r.w[0], carry64, CA4r.w[0], CY.w[0]);\r\n CA4r.w[1] = CA4r.w[1] - CY.w[1] - carry64;\r\n D = (CA4r.w[1] | CA4r.w[0]) ? 1 : 0;\r\n carry64 = (1 + (((BID_SINT64) CA4r.w[1]) >> 63)) & ((CQ.w[0]) | D);\r\n CQ.w[0] += carry64;\r\n if (CQ.w[0] < carry64)\r\n CQ.w[1]++;\r\n break;\r\n case BID_ROUNDING_TIES_AWAY:\r\n // rounding\r\n // 2*CA4 - CY\r\n CA4r.w[1] = (CA4.w[1] + CA4.w[1]) | (CA4.w[0] >> 63);\r\n CA4r.w[0] = CA4.w[0] + CA4.w[0];\r\n __sub_borrow_out (CA4r.w[0], carry64, CA4r.w[0], CY.w[0]);\r\n CA4r.w[1] = CA4r.w[1] - CY.w[1] - carry64;\r\n D = (CA4r.w[1] | CA4r.w[0]) ? 0 : 1;\r\n carry64 = (1 + (((BID_SINT64) CA4r.w[1]) >> 63)) | D;\r\n CQ.w[0] += carry64;\r\n if (CQ.w[0] < carry64)\r\n CQ.w[1]++;\r\n break;\r\n case BID_ROUNDING_DOWN:\r\n case BID_ROUNDING_TO_ZERO:\r\n break;\r\n default:\t// rounding up\r\n CQ.w[0]++;\r\n if (!CQ.w[0])\r\n CQ.w[1]++;\r\n break;\r\n }\r\n#endif\r\n#endif\r\n\r\n} else {\r\n#ifdef BID_SET_STATUS_FLAGS\r\n if (CA4.w[0] || CA4.w[1]) {\r\n // set status flags\r\n __set_status_flags (pfpsf, BID_INEXACT_EXCEPTION);\r\n }\r\n#endif\r\n\r\n bid_handle_UF_128_rem (&res, sign_x ^ sign_y, diff_expon, CQ,\r\n\t\t CA4.w[1] | CA4.w[0], &rnd_mode, pfpsf);\r\n#ifdef UNCHANGED_BINARY_STATUS_FLAGS\r\n // (void) fesetexceptflag (&binaryflags, BID_FE_ALL_FLAGS);\r\n#endif\r\n BID_RETURN (res);\r\n\r\n}\r\n\r\nbid_get_BID128 (&res, sign_x ^ sign_y, diff_expon, CQ, &rnd_mode, pfpsf);\r\n#ifdef UNCHANGED_BINARY_STATUS_FLAGS\r\n// (void) fesetexceptflag (&binaryflags, BID_FE_ALL_FLAGS);\r\n#endif\r\nBID_RETURN (res);\r\n}\r\n\r\n\r\n//#define LEAVE_TRAILING_ZEROS\r\n\r\nBID_TYPE0_FUNCTION_ARGTYPE1_ARGTYPE2 (BID_UINT128, bid128dd_div, BID_UINT64, x,\r\n\t\t\t\t BID_UINT64, y)\r\n\r\n BID_UINT256 CA4, CA4r, P256;\r\n BID_UINT128 CX, CY, T128, CQ, CR, CA, TP128, Qh, Ql, res;\r\n BID_UINT64 sign_x, sign_y, carry64, D, Q_high, Q_low, QX, PD,\r\n valid_y;\r\n int_float fx, fy, f64;\r\n BID_UINT32 QX32, tdigit[3], digit, digit_h, digit_low;\r\n int exponent_x, exponent_y, bin_index, bin_expon, diff_expon, ed2,\r\n digits_q, amount;\r\n int nzeros, i, j, k, d5;\r\n unsigned rmode;\r\n\r\n BID_OPT_SAVE_BINARY_FLAGS()\r\n\r\nvalid_y = unpack_BID64 (&sign_y, &exponent_y, &CY.w[0], y);\r\n\r\n\t// unpack arguments, check for NaN or Infinity\r\nCX.w[1] = 0;\r\nif (!unpack_BID64 (&sign_x, &exponent_x, &CX.w[0], (x))) {\r\n#ifdef BID_SET_STATUS_FLAGS\r\nif ((y & SNAN_MASK64) == SNAN_MASK64)\t// y is sNaN\r\n __set_status_flags (pfpsf, BID_INVALID_EXCEPTION);\r\n#endif\r\n\r\n // test if x is NaN\r\nif ((x & NAN_MASK64) == NAN_MASK64) {\r\n#ifdef BID_SET_STATUS_FLAGS\r\n if ((x & SNAN_MASK64) == SNAN_MASK64)\t// sNaN\r\n __set_status_flags (pfpsf, BID_INVALID_EXCEPTION);\r\n#endif\r\n res.w[0] = (CX.w[0] & 0x0003ffffffffffffull);\r\n __mul_64x64_to_128 (res, res.w[0], bid_power10_table_128[18].w[0]);\r\n res.w[1] |= ((CX.w[0]) & 0xfc00000000000000ull);\r\n BID_RETURN (res);\r\n}\r\n\t // x is Infinity?\r\nif (((x) & 0x7800000000000000ull) == 0x7800000000000000ull) {\r\n // check if y is Inf.\r\n if ((((y) & 0x7c00000000000000ull) == 0x7800000000000000ull))\r\n // return NaN \r\n {\r\n#ifdef BID_SET_STATUS_FLAGS\r\n __set_status_flags (pfpsf, BID_INVALID_EXCEPTION);\r\n#endif\r\n res.w[1] = 0x7c00000000000000ull;\r\n res.w[0] = 0;\r\n BID_RETURN (res);\r\n }\r\n if ((((y) & 0x7c00000000000000ull) != 0x7c00000000000000ull)) {\r\n // otherwise return +/-Inf\r\n res.w[1] =\r\n (((x) ^ (y)) & 0x8000000000000000ull) | 0x7800000000000000ull;\r\n res.w[0] = 0;\r\n BID_RETURN (res);\r\n }\r\n}\r\n\t // x is 0\r\nif ((((y) & 0x7800000000000000ull) != 0x7800000000000000ull)) {\r\n if(!CY.w[0]) {\r\n#ifdef BID_SET_STATUS_FLAGS\r\n __set_status_flags (pfpsf, BID_INVALID_EXCEPTION);\r\n#endif\r\n // x=y=0, return NaN\r\n res.w[1] = 0x7c00000000000000ull;\r\n res.w[0] = 0;\r\n BID_RETURN (res);\r\n}\r\n\t // return 0\r\nres.w[1] = ((x) ^ (y)) & 0x8000000000000000ull;\r\nif (((y) & 0x6000000000000000ull) == 0x6000000000000000ull)\r\n exponent_y = ((BID_UINT32) ((y) >> 51)) & 0x3ff;\r\nelse\r\n exponent_y = ((BID_UINT32) ((y) >> 53)) & 0x3ff;\r\nexponent_x = exponent_x - exponent_y + DECIMAL_EXPONENT_BIAS_128;\r\nres.w[1] |= (((BID_UINT64) exponent_x) << 49);\r\nres.w[0] = 0;\r\nBID_RETURN (res);\r\n}\r\n}\r\n\r\nCY.w[1] = 0;\r\nif (!valid_y) {\r\n // y is Inf. or NaN\r\n\r\n // test if y is NaN\r\n if ((y & NAN_MASK64) == NAN_MASK64) {\r\n#ifdef BID_SET_STATUS_FLAGS\r\n if ((y & SNAN_MASK64) == SNAN_MASK64)\t// sNaN\r\n __set_status_flags (pfpsf, BID_INVALID_EXCEPTION);\r\n#endif\r\n res.w[0] = (CY.w[0] & 0x0003ffffffffffffull);\r\n __mul_64x64_to_128 (res, res.w[0], bid_power10_table_128[18].w[0]);\r\n res.w[1] |= ((CY.w[0]) & 0xfc00000000000000ull);\r\n BID_RETURN (res);\r\n }\r\n // y is Infinity?\r\n if (((y) & 0x7800000000000000ull) == 0x7800000000000000ull) {\r\n // return +/-0\r\n res.w[1] = sign_x ^ sign_y;\r\n res.w[0] = 0;\r\n BID_RETURN (res);\r\n }\r\n // y is 0, return +/-Inf\r\n res.w[1] =\r\n (((x) ^ (y)) & 0x8000000000000000ull) | 0x7800000000000000ull;\r\n res.w[0] = 0;\r\n#ifdef BID_SET_STATUS_FLAGS\r\n __set_status_flags (pfpsf, BID_ZERO_DIVIDE_EXCEPTION);\r\n#endif\r\n BID_RETURN (res);\r\n}\r\n#ifdef UNCHANGED_BINARY_STATUS_FLAGS\r\n// (void) fegetexceptflag (&binaryflags, BID_FE_ALL_FLAGS);\r\n#endif\r\ndiff_expon = exponent_x - exponent_y + DECIMAL_EXPONENT_BIAS_128;\r\n\r\nif (__unsigned_compare_gt_128 (CY, CX)) {\r\n // CX < CY\r\n\r\n // 2^64\r\n f64.i = 0x5f800000;\r\n\r\n // fx ~ CX, fy ~ CY\r\n fx.d = (float) CX.w[1] * f64.d + (float) CX.w[0];\r\n fy.d = (float) CY.w[1] * f64.d + (float) CY.w[0];\r\n // expon_cy - expon_cx\r\n bin_index = (fy.i - fx.i) >> 23;\r\n\r\n T128 = bid_power10_index_binexp_128[bin_index];\r\n __mul_64x128_short (CA, CX.w[0], T128);\r\n\r\n ed2 = 33;\r\n if (__unsigned_compare_gt_128 (CY, CA))\r\n ed2++;\r\n\r\n T128 = bid_power10_table_128[ed2];\r\n __mul_128x128_to_256 (CA4, CA, T128);\r\n\r\n ed2 += bid_estimate_decimal_digits[bin_index];\r\n CQ.w[0] = CQ.w[1] = 0;\r\n diff_expon = diff_expon - ed2;\r\n\r\n} else {\r\n // get CQ = CX/CY\r\n bid___div_128_by_128 (&CQ, &CR, CX, CY);\r\n\r\n if (!CR.w[1] && !CR.w[0]) {\r\n bid_get_BID128 (&res, sign_x ^ sign_y, diff_expon, CQ, &rnd_mode,\r\n\t\tpfpsf);\r\n#ifdef UNCHANGED_BINARY_STATUS_FLAGS\r\n // (void) fesetexceptflag (&binaryflags, BID_FE_ALL_FLAGS);\r\n#endif\r\n BID_RETURN (res);\r\n }\r\n // get number of decimal digits in CQ\r\n // 2^64\r\n f64.i = 0x5f800000;\r\n fx.d = (float) CQ.w[1] * f64.d + (float) CQ.w[0];\r\n // binary expon. of CQ\r\n bin_expon = (fx.i - 0x3f800000) >> 23;\r\n\r\n digits_q = bid_estimate_decimal_digits[bin_expon];\r\n TP128.w[0] = bid_power10_index_binexp_128[bin_expon].w[0];\r\n TP128.w[1] = bid_power10_index_binexp_128[bin_expon].w[1];\r\n if (__unsigned_compare_ge_128 (CQ, TP128))\r\n digits_q++;\r\n\r\n ed2 = 34 - digits_q;\r\n T128.w[0] = bid_power10_table_128[ed2].w[0];\r\n T128.w[1] = bid_power10_table_128[ed2].w[1];\r\n __mul_128x128_to_256 (CA4, CR, T128);\r\n diff_expon = diff_expon - ed2;\r\n __mul_128x128_low (CQ, CQ, T128);\r\n\r\n}\r\n\r\nbid___div_256_by_128 (&CQ, &CA4, CY);\r\n\r\n\r\n#ifdef BID_SET_STATUS_FLAGS\r\n if (CA4.w[0] || CA4.w[1]) {\r\n // set status flags\r\n __set_status_flags (pfpsf, BID_INEXACT_EXCEPTION);\r\n }\r\n#ifndef LEAVE_TRAILING_ZEROS\r\n else\r\n#endif\r\n#else\r\n#ifndef LEAVE_TRAILING_ZEROS\r\n if (!CA4.w[0] && !CA4.w[1])\r\n#endif\r\n#endif\r\n#ifndef LEAVE_TRAILING_ZEROS\r\n // check whether result is exact\r\n {\r\n // check whether CX, CY are short\r\n if (!CX.w[1] && !CY.w[1] && (CX.w[0] <= 1024) && (CY.w[0] <= 1024)) {\r\n i = (int) CY.w[0] - 1;\r\n j = (int) CX.w[0] - 1;\r\n // difference in powers of 2 bid_factors for Y and X\r\n nzeros = ed2 - bid_factors[i][0] + bid_factors[j][0];\r\n // difference in powers of 5 bid_factors\r\n d5 = ed2 - bid_factors[i][1] + bid_factors[j][1];\r\n if (d5 < nzeros)\r\n\tnzeros = d5;\r\n // get P*(2^M[extra_digits])/10^extra_digits\r\n __mul_128x128_full (Qh, Ql, CQ, bid_reciprocals10_128[nzeros]);\r\n //__mul_128x128_to_256(P256, CQ, bid_reciprocals10_128[nzeros]);Qh.w[1]=P256.w[3];Qh.w[0]=P256.w[2];\r\n\r\n // now get P/10^extra_digits: shift Q_high right by M[extra_digits]-128\r\n amount = bid_recip_scale[nzeros];\r\n __shr_128_long (CQ, Qh, amount);\r\n\r\n diff_expon += nzeros;\r\n } else {\r\n // decompose Q as Qh*10^17 + Ql\r\n //T128 = bid_reciprocals10_128[17];\r\n T128.w[0] = 0x44909befeb9fad49ull;\r\n T128.w[1] = 0x000b877aa3236a4bull;\r\n __mul_128x128_to_256 (P256, CQ, T128);\r\n //amount = bid_recip_scale[17];\r\n Q_high = (P256.w[2] >> 44) | (P256.w[3] << (64 - 44));\r\n Q_low = CQ.w[0] - Q_high * 100000000000000000ull;\r\n\r\n if (!Q_low) {\r\n\tdiff_expon += 17;\r\n\r\n\ttdigit[0] = Q_high & 0x3ffffff;\r\n\ttdigit[1] = 0;\r\n\tQX = Q_high >> 26;\r\n\tQX32 = QX;\r\n\tnzeros = 0;\r\n\r\n\tfor (j = 0; QX32; j++, QX32 >>= 7) {\r\n\t k = (QX32 & 127);\r\n\t tdigit[0] += bid_convert_table[j][k][0];\r\n\t tdigit[1] += bid_convert_table[j][k][1];\r\n\t if (tdigit[0] >= 100000000) {\r\n\t tdigit[0] -= 100000000;\r\n\t tdigit[1]++;\r\n\t }\r\n\t}\r\n\r\n\r\n\tif (tdigit[1] >= 100000000) {\r\n\t tdigit[1] -= 100000000;\r\n\t if (tdigit[1] >= 100000000)\r\n\t tdigit[1] -= 100000000;\r\n\t}\r\n\r\n\tdigit = tdigit[0];\r\n\tif (!digit && !tdigit[1])\r\n\t nzeros += 16;\r\n\telse {\r\n\t if (!digit) {\r\n\t nzeros += 8;\r\n\t digit = tdigit[1];\r\n\t }\r\n\t // decompose digit\r\n\t PD = (BID_UINT64) digit *0x068DB8BBull;\r\n\t digit_h = (BID_UINT32) (PD >> 40);\r\n\t digit_low = digit - digit_h * 10000;\r\n\r\n\t if (!digit_low)\r\n\t nzeros += 4;\r\n\t else\r\n\t digit_h = digit_low;\r\n\r\n\t if (!(digit_h & 1))\r\n\t nzeros +=\r\n\t 3 & (BID_UINT32) (bid_packed_10000_zeros[digit_h >> 3] >>\r\n\t\t\t (digit_h & 7));\r\n\t}\r\n\r\n\tif (nzeros) {\r\n\t __mul_64x64_to_128 (CQ, Q_high, bid_reciprocals10_64[nzeros]);\r\n\r\n\t // now get P/10^extra_digits: shift C64 right by M[extra_digits]-64\r\n\t amount = bid_short_recip_scale[nzeros];\r\n\t CQ.w[0] = CQ.w[1] >> amount;\r\n\t} else\r\n\t CQ.w[0] = Q_high;\r\n\tCQ.w[1] = 0;\r\n\r\n\tdiff_expon += nzeros;\r\n } else {\r\n\ttdigit[0] = Q_low & 0x3ffffff;\r\n\ttdigit[1] = 0;\r\n\tQX = Q_low >> 26;\r\n\tQX32 = QX;\r\n\tnzeros = 0;\r\n\r\n\tfor (j = 0; QX32; j++, QX32 >>= 7) {\r\n\t k = (QX32 & 127);\r\n\t tdigit[0] += bid_convert_table[j][k][0];\r\n\t tdigit[1] += bid_convert_table[j][k][1];\r\n\t if (tdigit[0] >= 100000000) {\r\n\t tdigit[0] -= 100000000;\r\n\t tdigit[1]++;\r\n\t }\r\n\t}\r\n\r\n\tif (tdigit[1] >= 100000000) {\r\n\t tdigit[1] -= 100000000;\r\n\t if (tdigit[1] >= 100000000)\r\n\t tdigit[1] -= 100000000;\r\n\t}\r\n\r\n\tdigit = tdigit[0];\r\n\tif (!digit && !tdigit[1])\r\n\t nzeros += 16;\r\n\telse {\r\n\t if (!digit) {\r\n\t nzeros += 8;\r\n\t digit = tdigit[1];\r\n\t }\r\n\t // decompose digit\r\n\t PD = (BID_UINT64) digit *0x068DB8BBull;\r\n\t digit_h = (BID_UINT32) (PD >> 40);\r\n\t digit_low = digit - digit_h * 10000;\r\n\r\n\t if (!digit_low)\r\n\t nzeros += 4;\r\n\t else\r\n\t digit_h = digit_low;\r\n\r\n\t if (!(digit_h & 1))\r\n\t nzeros +=\r\n\t 3 & (BID_UINT32) (bid_packed_10000_zeros[digit_h >> 3] >>\r\n\t\t\t (digit_h & 7));\r\n\t}\r\n\r\n\tif (nzeros) {\r\n\t // get P*(2^M[extra_digits])/10^extra_digits\r\n\t __mul_128x128_full (Qh, Ql, CQ, bid_reciprocals10_128[nzeros]);\r\n\r\n\t // now get P/10^extra_digits: shift Q_high right by M[extra_digits]-128\r\n\t amount = bid_recip_scale[nzeros];\r\n\t __shr_128 (CQ, Qh, amount);\r\n\t}\r\n\tdiff_expon += nzeros;\r\n\r\n }\r\n }\r\n bid_get_BID128(&res, sign_x ^ sign_y, diff_expon, CQ, &rnd_mode,pfpsf);\r\n#ifdef UNCHANGED_BINARY_STATUS_FLAGS\r\n // (void) fesetexceptflag (&binaryflags, BID_FE_ALL_FLAGS);\r\n#endif\r\n BID_RETURN (res);\r\n }\r\n#endif\r\n\r\nif (diff_expon >= 0) {\r\n#ifdef IEEE_ROUND_NEAREST\r\n // rounding\r\n // 2*CA4 - CY\r\n CA4r.w[1] = (CA4.w[1] + CA4.w[1]) | (CA4.w[0] >> 63);\r\n CA4r.w[0] = CA4.w[0] + CA4.w[0];\r\n __sub_borrow_out (CA4r.w[0], carry64, CA4r.w[0], CY.w[0]);\r\n CA4r.w[1] = CA4r.w[1] - CY.w[1] - carry64;\r\n\r\n D = (CA4r.w[1] | CA4r.w[0]) ? 1 : 0;\r\n carry64 = (1 + (((BID_SINT64) CA4r.w[1]) >> 63)) & ((CQ.w[0]) | D);\r\n\r\n CQ.w[0] += carry64;\r\n if (CQ.w[0] < carry64)\r\n CQ.w[1]++;\r\n#else\r\n#ifdef IEEE_ROUND_NEAREST_TIES_AWAY\r\n // rounding\r\n // 2*CA4 - CY\r\n CA4r.w[1] = (CA4.w[1] + CA4.w[1]) | (CA4.w[0] >> 63);\r\n CA4r.w[0] = CA4.w[0] + CA4.w[0];\r\n __sub_borrow_out (CA4r.w[0], carry64, CA4r.w[0], CY.w[0]);\r\n CA4r.w[1] = CA4r.w[1] - CY.w[1] - carry64;\r\n\r\n D = (CA4r.w[1] | CA4r.w[0]) ? 0 : 1;\r\n carry64 = (1 + (((BID_SINT64) CA4r.w[1]) >> 63)) | D;\r\n\r\n CQ.w[0] += carry64;\r\n if (CQ.w[0] < carry64)\r\n CQ.w[1]++;\r\n#else\r\n rmode = rnd_mode;\r\n if (sign_x ^ sign_y && (unsigned) (rmode - 1) < 2)\r\n rmode = 3 - rmode;\r\n switch (rmode) {\r\n case BID_ROUNDING_TO_NEAREST:\t// round to nearest code\r\n // rounding\r\n // 2*CA4 - CY\r\n CA4r.w[1] = (CA4.w[1] + CA4.w[1]) | (CA4.w[0] >> 63);\r\n CA4r.w[0] = CA4.w[0] + CA4.w[0];\r\n __sub_borrow_out (CA4r.w[0], carry64, CA4r.w[0], CY.w[0]);\r\n CA4r.w[1] = CA4r.w[1] - CY.w[1] - carry64;\r\n D = (CA4r.w[1] | CA4r.w[0]) ? 1 : 0;\r\n carry64 = (1 + (((BID_SINT64) CA4r.w[1]) >> 63)) & ((CQ.w[0]) | D);\r\n CQ.w[0] += carry64;\r\n if (CQ.w[0] < carry64)\r\n CQ.w[1]++;\r\n break;\r\n case BID_ROUNDING_TIES_AWAY:\r\n // rounding\r\n // 2*CA4 - CY\r\n CA4r.w[1] = (CA4.w[1] + CA4.w[1]) | (CA4.w[0] >> 63);\r\n CA4r.w[0] = CA4.w[0] + CA4.w[0];\r\n __sub_borrow_out (CA4r.w[0], carry64, CA4r.w[0], CY.w[0]);\r\n CA4r.w[1] = CA4r.w[1] - CY.w[1] - carry64;\r\n D = (CA4r.w[1] | CA4r.w[0]) ? 0 : 1;\r\n carry64 = (1 + (((BID_SINT64) CA4r.w[1]) >> 63)) | D;\r\n CQ.w[0] += carry64;\r\n if (CQ.w[0] < carry64)\r\n CQ.w[1]++;\r\n break;\r\n case BID_ROUNDING_DOWN:\r\n case BID_ROUNDING_TO_ZERO:\r\n break;\r\n default:\t// rounding up\r\n CQ.w[0]++;\r\n if (!CQ.w[0])\r\n CQ.w[1]++;\r\n break;\r\n }\r\n#endif\r\n#endif\r\n\r\n} else {\r\n#ifdef BID_SET_STATUS_FLAGS\r\n if (CA4.w[0] || CA4.w[1]) {\r\n // set status flags\r\n __set_status_flags (pfpsf, BID_INEXACT_EXCEPTION);\r\n }\r\n#endif\r\n bid_handle_UF_128_rem (&res, sign_x ^ sign_y, diff_expon, CQ,\r\n\t\t CA4.w[1] | CA4.w[0], &rnd_mode, pfpsf);\r\n#ifdef UNCHANGED_BINARY_STATUS_FLAGS\r\n // (void) fesetexceptflag (&binaryflags, BID_FE_ALL_FLAGS);\r\n#endif\r\n BID_RETURN (res);\r\n\r\n}\r\n\r\nbid_get_BID128 (&res, sign_x ^ sign_y, diff_expon, CQ, &rnd_mode, pfpsf);\r\n#ifdef UNCHANGED_BINARY_STATUS_FLAGS\r\n// (void) fesetexceptflag (&binaryflags, BID_FE_ALL_FLAGS);\r\n#endif\r\nBID_RETURN (res);\r\n}\r\n\r\n\r\nBID128_FUNCTION_ARGTYPE1_ARG128 (bid128dq_div, BID_UINT64, x, y)\r\n BID_UINT256 CA4, CA4r, P256;\r\n BID_UINT128 CX, CY, T128, CQ, CR, CA, TP128, Qh, Ql, res;\r\n BID_UINT64 sign_x, sign_y, carry64, D, Q_high, Q_low, QX, valid_y,\r\n PD;\r\n int_float fx, fy, f64;\r\n BID_UINT32 QX32, tdigit[3], digit, digit_h, digit_low;\r\n int exponent_x, exponent_y, bin_index, bin_expon, diff_expon, ed2,\r\n digits_q, amount;\r\n int nzeros, i, j, k, d5;\r\n unsigned rmode;\r\n\r\n BID_OPT_SAVE_BINARY_FLAGS()\r\n\r\nvalid_y = unpack_BID128_value (&sign_y, &exponent_y, &CY, y);\r\n\r\n\t// unpack arguments, check for NaN or Infinity\r\nCX.w[1] = 0;\r\nif (!unpack_BID64 (&sign_x, &exponent_x, &CX.w[0], x)) {\r\n#ifdef BID_SET_STATUS_FLAGS\r\nif ((y.w[1] & SNAN_MASK64) == SNAN_MASK64)\t// y is sNaN\r\n __set_status_flags (pfpsf, BID_INVALID_EXCEPTION);\r\n#endif\r\n\r\n // test if x is NaN\r\nif ((x & NAN_MASK64) == NAN_MASK64) {\r\n#ifdef BID_SET_STATUS_FLAGS\r\n if ((x & SNAN_MASK64) == SNAN_MASK64)\t// sNaN\r\n __set_status_flags (pfpsf, BID_INVALID_EXCEPTION);\r\n#endif\r\n res.w[0] = (CX.w[0] & 0x0003ffffffffffffull);\r\n __mul_64x64_to_128 (res, res.w[0], bid_power10_table_128[18].w[0]);\r\n res.w[1] |= ((CX.w[0]) & 0xfc00000000000000ull);\r\n BID_RETURN (res);\r\n}\r\n\t // x is Infinity?\r\nif ((x & 0x7800000000000000ull) == 0x7800000000000000ull) {\r\n // check if y is Inf.\r\n if (((y.w[1] & 0x7c00000000000000ull) == 0x7800000000000000ull))\r\n // return NaN \r\n {\r\n#ifdef BID_SET_STATUS_FLAGS\r\n __set_status_flags (pfpsf, BID_INVALID_EXCEPTION);\r\n#endif\r\n res.w[1] = 0x7c00000000000000ull;\r\n res.w[0] = 0;\r\n BID_RETURN (res);\r\n }\r\n if (((y.w[1] & 0x7c00000000000000ull) != 0x7c00000000000000ull)) {\r\n // otherwise return +/-Inf\r\n res.w[1] =\r\n ((x ^ y.w[1]) & 0x8000000000000000ull) | 0x7800000000000000ull;\r\n res.w[0] = 0;\r\n BID_RETURN (res);\r\n }\r\n}\r\n\t // x is 0\r\nif ((y.w[1] & INFINITY_MASK64) != INFINITY_MASK64) {\r\n if ((!CY.w[0]) && !(CY.w[1] & 0x0001ffffffffffffull)) {\r\n#ifdef BID_SET_STATUS_FLAGS\r\n __set_status_flags (pfpsf, BID_INVALID_EXCEPTION);\r\n#endif\r\n // x=y=0, return NaN\r\n res.w[1] = 0x7c00000000000000ull;\r\n res.w[0] = 0;\r\n BID_RETURN (res);\r\n }\r\n // return 0\r\n res.w[1] = (x ^ y.w[1]) & 0x8000000000000000ull;\r\n exponent_x = exponent_x - exponent_y + (DECIMAL_EXPONENT_BIAS_128<<1) - DECIMAL_EXPONENT_BIAS;\r\n if (exponent_x > DECIMAL_MAX_EXPON_128)\r\n exponent_x = DECIMAL_MAX_EXPON_128;\r\n else if (exponent_x < 0)\r\n exponent_x = 0;\r\n res.w[1] |= (((BID_UINT64) exponent_x) << 49);\r\n res.w[0] = 0;\r\n BID_RETURN (res);\r\n}\r\n}\r\nexponent_x += (DECIMAL_EXPONENT_BIAS_128 - DECIMAL_EXPONENT_BIAS);\r\n\r\nif (!valid_y) {\r\n // y is Inf. or NaN\r\n\r\n // test if y is NaN\r\n if ((y.w[1] & 0x7c00000000000000ull) == 0x7c00000000000000ull) {\r\n#ifdef BID_SET_STATUS_FLAGS\r\n if ((y.w[1] & 0x7e00000000000000ull) == 0x7e00000000000000ull)\t// sNaN\r\n __set_status_flags (pfpsf, BID_INVALID_EXCEPTION);\r\n#endif\r\n res.w[1] = CY.w[1] & QUIET_MASK64;\r\n res.w[0] = CY.w[0];\r\n BID_RETURN (res);\r\n }\r\n // y is Infinity?\r\n if ((y.w[1] & 0x7800000000000000ull) == 0x7800000000000000ull) {\r\n // return +/-0\r\n res.w[1] = sign_x ^ sign_y;\r\n res.w[0] = 0;\r\n BID_RETURN (res);\r\n }\r\n // y is 0, return +/-Inf\r\n res.w[1] =\r\n ((x ^ y.w[1]) & 0x8000000000000000ull) | 0x7800000000000000ull;\r\n res.w[0] = 0;\r\n#ifdef BID_SET_STATUS_FLAGS\r\n __set_status_flags (pfpsf, BID_ZERO_DIVIDE_EXCEPTION);\r\n#endif\r\n BID_RETURN (res);\r\n}\r\n#ifdef UNCHANGED_BINARY_STATUS_FLAGS\r\n// (void) fegetexceptflag (&binaryflags, BID_FE_ALL_FLAGS);\r\n#endif\r\ndiff_expon = exponent_x - exponent_y + DECIMAL_EXPONENT_BIAS_128;\r\n\r\nif (__unsigned_compare_gt_128 (CY, CX)) {\r\n // CX < CY\r\n\r\n // 2^64\r\n f64.i = 0x5f800000;\r\n\r\n // fx ~ CX, fy ~ CY\r\n fx.d = (float) CX.w[1] * f64.d + (float) CX.w[0];\r\n fy.d = (float) CY.w[1] * f64.d + (float) CY.w[0];\r\n // expon_cy - expon_cx\r\n bin_index = (fy.i - fx.i) >> 23;\r\n\r\n T128 = bid_power10_index_binexp_128[bin_index];\r\n __mul_64x128_short (CA, CX.w[0], T128);\r\n\r\n ed2 = 33;\r\n if (__unsigned_compare_gt_128 (CY, CA))\r\n ed2++;\r\n\r\n T128 = bid_power10_table_128[ed2];\r\n __mul_128x128_to_256 (CA4, CA, T128);\r\n\r\n ed2 += bid_estimate_decimal_digits[bin_index];\r\n CQ.w[0] = CQ.w[1] = 0;\r\n diff_expon = diff_expon - ed2;\r\n\r\n} else {\r\n // get CQ = CX/CY\r\n bid___div_128_by_128 (&CQ, &CR, CX, CY);\r\n\r\n if (!CR.w[1] && !CR.w[0]) {\r\n bid_get_BID128 (&res, sign_x ^ sign_y, diff_expon, CQ, &rnd_mode,\r\n\t\tpfpsf);\r\n#ifdef UNCHANGED_BINARY_STATUS_FLAGS\r\n // (void) fesetexceptflag (&binaryflags, BID_FE_ALL_FLAGS);\r\n#endif\r\n BID_RETURN (res);\r\n }\r\n // get number of decimal digits in CQ\r\n // 2^64\r\n f64.i = 0x5f800000;\r\n fx.d = (float) CQ.w[1] * f64.d + (float) CQ.w[0];\r\n // binary expon. of CQ\r\n bin_expon = (fx.i - 0x3f800000) >> 23;\r\n\r\n digits_q = bid_estimate_decimal_digits[bin_expon];\r\n TP128.w[0] = bid_power10_index_binexp_128[bin_expon].w[0];\r\n TP128.w[1] = bid_power10_index_binexp_128[bin_expon].w[1];\r\n if (__unsigned_compare_ge_128 (CQ, TP128))\r\n digits_q++;\r\n\r\n ed2 = 34 - digits_q;\r\n T128.w[0] = bid_power10_table_128[ed2].w[0];\r\n T128.w[1] = bid_power10_table_128[ed2].w[1];\r\n __mul_128x128_to_256 (CA4, CR, T128);\r\n diff_expon = diff_expon - ed2;\r\n __mul_128x128_low (CQ, CQ, T128);\r\n\r\n}\r\n\r\nbid___div_256_by_128 (&CQ, &CA4, CY);\r\n\r\n#ifdef BID_SET_STATUS_FLAGS\r\n if (CA4.w[0] || CA4.w[1]) {\r\n // set status flags\r\n __set_status_flags (pfpsf, BID_INEXACT_EXCEPTION);\r\n }\r\n#ifndef LEAVE_TRAILING_ZEROS\r\n else\r\n#endif\r\n#else\r\n#ifndef LEAVE_TRAILING_ZEROS\r\n if (!CA4.w[0] && !CA4.w[1])\r\n#endif\r\n#endif\r\n#ifndef LEAVE_TRAILING_ZEROS\r\n // check whether result is exact\r\n {\r\n //printf(\"ed2=%d,nz=%d,a=%d,CQ=\"BID_LX16\",\"BID_LX16\", RH=\"BID_LX16\", RL=\"BID_LX16\"\\n\",ed2,nzeros,amount,CQ.w[1],CQ.w[0],reciprocals10_128[nzeros].w[1],reciprocals10_128[nzeros].w[0]);fflush(stdout);\r\n // check whether CX, CY are short\r\n if (!CX.w[1] && !CY.w[1] && (CX.w[0] <= 1024) && (CY.w[0] <= 1024)) {\r\n i = (int) CY.w[0] - 1;\r\n j = (int) CX.w[0] - 1;\r\n // difference in powers of 2 bid_factors for Y and X\r\n nzeros = ed2 - bid_factors[i][0] + bid_factors[j][0];\r\n // difference in powers of 5 bid_factors\r\n d5 = ed2 - bid_factors[i][1] + bid_factors[j][1];\r\n if (d5 < nzeros)\r\n\tnzeros = d5;\r\n // get P*(2^M[extra_digits])/10^extra_digits\r\n __mul_128x128_full (Qh, Ql, CQ, bid_reciprocals10_128[nzeros]);\r\n //__mul_128x128_to_256(P256, CQ, bid_reciprocals10_128[nzeros]);Qh.w[1]=P256.w[3];Qh.w[0]=P256.w[2];\r\n\r\n // now get P/10^extra_digits: shift Q_high right by M[extra_digits]-128\r\n amount = bid_recip_scale[nzeros];\r\n __shr_128_long (CQ, Qh, amount);\r\n\r\n diff_expon += nzeros;\r\n } else {\r\n // decompose Q as Qh*10^17 + Ql\r\n //T128 = bid_reciprocals10_128[17];\r\n T128.w[0] = 0x44909befeb9fad49ull;\r\n T128.w[1] = 0x000b877aa3236a4bull;\r\n __mul_128x128_to_256 (P256, CQ, T128);\r\n //amount = bid_recip_scale[17];\r\n Q_high = (P256.w[2] >> 44) | (P256.w[3] << (64 - 44));\r\n Q_low = CQ.w[0] - Q_high * 100000000000000000ull;\r\n\r\n if (!Q_low) {\r\n\tdiff_expon += 17;\r\n\r\n\ttdigit[0] = Q_high & 0x3ffffff;\r\n\ttdigit[1] = 0;\r\n\tQX = Q_high >> 26;\r\n\tQX32 = QX;\r\n\tnzeros = 0;\r\n\r\n\tfor (j = 0; QX32; j++, QX32 >>= 7) {\r\n\t k = (QX32 & 127);\r\n\t tdigit[0] += bid_convert_table[j][k][0];\r\n\t tdigit[1] += bid_convert_table[j][k][1];\r\n\t if (tdigit[0] >= 100000000) {\r\n\t tdigit[0] -= 100000000;\r\n\t tdigit[1]++;\r\n\t }\r\n\t}\r\n\r\n\r\n\tif (tdigit[1] >= 100000000) {\r\n\t tdigit[1] -= 100000000;\r\n\t if (tdigit[1] >= 100000000)\r\n\t tdigit[1] -= 100000000;\r\n\t}\r\n\r\n\tdigit = tdigit[0];\r\n\tif (!digit && !tdigit[1])\r\n\t nzeros += 16;\r\n\telse {\r\n\t if (!digit) {\r\n\t nzeros += 8;\r\n\t digit = tdigit[1];\r\n\t }\r\n\t // decompose digit\r\n\t PD = (BID_UINT64) digit *0x068DB8BBull;\r\n\t digit_h = (BID_UINT32) (PD >> 40);\r\n\t //printf(\"i=%d, nz=%d, digit=%d (%d, %016I64x %016I64x)\\n\",i,nzeros,digit_h,digit,PD,digit_h);fflush(stdout);\r\n\t digit_low = digit - digit_h * 10000;\r\n\r\n\t if (!digit_low)\r\n\t nzeros += 4;\r\n\t else\r\n\t digit_h = digit_low;\r\n\r\n\t if (!(digit_h & 1))\r\n\t nzeros +=\r\n\t 3 & (BID_UINT32) (bid_packed_10000_zeros[digit_h >> 3] >>\r\n\t\t\t (digit_h & 7));\r\n\t}\r\n\r\n\tif (nzeros) {\r\n\t __mul_64x64_to_128 (CQ, Q_high, bid_reciprocals10_64[nzeros]);\r\n\r\n\t // now get P/10^extra_digits: shift C64 right by M[extra_digits]-64\r\n\t amount = bid_short_recip_scale[nzeros];\r\n\t CQ.w[0] = CQ.w[1] >> amount;\r\n\t} else\r\n\t CQ.w[0] = Q_high;\r\n\tCQ.w[1] = 0;\r\n\r\n\tdiff_expon += nzeros;\r\n } else {\r\n\ttdigit[0] = Q_low & 0x3ffffff;\r\n\ttdigit[1] = 0;\r\n\tQX = Q_low >> 26;\r\n\tQX32 = QX;\r\n\tnzeros = 0;\r\n\r\n\tfor (j = 0; QX32; j++, QX32 >>= 7) {\r\n\t k = (QX32 & 127);\r\n\t tdigit[0] += bid_convert_table[j][k][0];\r\n\t tdigit[1] += bid_convert_table[j][k][1];\r\n\t if (tdigit[0] >= 100000000) {\r\n\t tdigit[0] -= 100000000;\r\n\t tdigit[1]++;\r\n\t }\r\n\t}\r\n\r\n\tif (tdigit[1] >= 100000000) {\r\n\t tdigit[1] -= 100000000;\r\n\t if (tdigit[1] >= 100000000)\r\n\t tdigit[1] -= 100000000;\r\n\t}\r\n\r\n\tdigit = tdigit[0];\r\n\tif (!digit && !tdigit[1])\r\n\t nzeros += 16;\r\n\telse {\r\n\t if (!digit) {\r\n\t nzeros += 8;\r\n\t digit = tdigit[1];\r\n\t }\r\n\t // decompose digit\r\n\t PD = (BID_UINT64) digit *0x068DB8BBull;\r\n\t digit_h = (BID_UINT32) (PD >> 40);\r\n\t //printf(\"i=%d, nz=%d, digit=%d (%d, %016I64x %016I64x)\\n\",i,nzeros,digit_h,digit,PD,digit_h);fflush(stdout);\r\n\t digit_low = digit - digit_h * 10000;\r\n\r\n\t if (!digit_low)\r\n\t nzeros += 4;\r\n\t else\r\n\t digit_h = digit_low;\r\n\r\n\t if (!(digit_h & 1))\r\n\t nzeros +=\r\n\t 3 & (BID_UINT32) (bid_packed_10000_zeros[digit_h >> 3] >>\r\n\t\t\t (digit_h & 7));\r\n\t}\r\n\r\n\tif (nzeros) {\r\n\t // get P*(2^M[extra_digits])/10^extra_digits\r\n\t __mul_128x128_full (Qh, Ql, CQ, bid_reciprocals10_128[nzeros]);\r\n\r\n\t // now get P/10^extra_digits: shift Q_high right by M[extra_digits]-128\r\n\t amount = bid_recip_scale[nzeros];\r\n\t __shr_128 (CQ, Qh, amount);\r\n\t}\r\n\tdiff_expon += nzeros;\r\n\r\n }\r\n }\r\n bid_get_BID128 (&res, sign_x ^ sign_y, diff_expon, CQ, &rnd_mode,\r\n\t\tpfpsf);\r\n#ifdef UNCHANGED_BINARY_STATUS_FLAGS\r\n // (void) fesetexceptflag (&binaryflags, BID_FE_ALL_FLAGS);\r\n#endif\r\n BID_RETURN (res);\r\n }\r\n#endif\r\n\r\nif (diff_expon >= 0) {\r\n#ifdef IEEE_ROUND_NEAREST\r\n // rounding\r\n // 2*CA4 - CY\r\n CA4r.w[1] = (CA4.w[1] + CA4.w[1]) | (CA4.w[0] >> 63);\r\n CA4r.w[0] = CA4.w[0] + CA4.w[0];\r\n __sub_borrow_out (CA4r.w[0], carry64, CA4r.w[0], CY.w[0]);\r\n CA4r.w[1] = CA4r.w[1] - CY.w[1] - carry64;\r\n\r\n D = (CA4r.w[1] | CA4r.w[0]) ? 1 : 0;\r\n carry64 = (1 + (((BID_SINT64) CA4r.w[1]) >> 63)) & ((CQ.w[0]) | D);\r\n\r\n CQ.w[0] += carry64;\r\n if (CQ.w[0] < carry64)\r\n CQ.w[1]++;\r\n#else\r\n#ifdef IEEE_ROUND_NEAREST_TIES_AWAY\r\n // rounding\r\n // 2*CA4 - CY\r\n CA4r.w[1] = (CA4.w[1] + CA4.w[1]) | (CA4.w[0] >> 63);\r\n CA4r.w[0] = CA4.w[0] + CA4.w[0];\r\n __sub_borrow_out (CA4r.w[0], carry64, CA4r.w[0], CY.w[0]);\r\n CA4r.w[1] = CA4r.w[1] - CY.w[1] - carry64;\r\n\r\n D = (CA4r.w[1] | CA4r.w[0]) ? 0 : 1;\r\n carry64 = (1 + (((BID_SINT64) CA4r.w[1]) >> 63)) | D;\r\n\r\n CQ.w[0] += carry64;\r\n if (CQ.w[0] < carry64)\r\n CQ.w[1]++;\r\n#else\r\n rmode = rnd_mode;\r\n if (sign_x ^ sign_y && (unsigned) (rmode - 1) < 2)\r\n rmode = 3 - rmode;\r\n switch (rmode) {\r\n case BID_ROUNDING_TO_NEAREST:\t// round to nearest code\r\n // rounding\r\n // 2*CA4 - CY\r\n CA4r.w[1] = (CA4.w[1] + CA4.w[1]) | (CA4.w[0] >> 63);\r\n CA4r.w[0] = CA4.w[0] + CA4.w[0];\r\n __sub_borrow_out (CA4r.w[0], carry64, CA4r.w[0], CY.w[0]);\r\n CA4r.w[1] = CA4r.w[1] - CY.w[1] - carry64;\r\n D = (CA4r.w[1] | CA4r.w[0]) ? 1 : 0;\r\n carry64 = (1 + (((BID_SINT64) CA4r.w[1]) >> 63)) & ((CQ.w[0]) | D);\r\n CQ.w[0] += carry64;\r\n if (CQ.w[0] < carry64)\r\n CQ.w[1]++;\r\n break;\r\n case BID_ROUNDING_TIES_AWAY:\r\n // rounding\r\n // 2*CA4 - CY\r\n CA4r.w[1] = (CA4.w[1] + CA4.w[1]) | (CA4.w[0] >> 63);\r\n CA4r.w[0] = CA4.w[0] + CA4.w[0];\r\n __sub_borrow_out (CA4r.w[0], carry64, CA4r.w[0], CY.w[0]);\r\n CA4r.w[1] = CA4r.w[1] - CY.w[1] - carry64;\r\n D = (CA4r.w[1] | CA4r.w[0]) ? 0 : 1;\r\n carry64 = (1 + (((BID_SINT64) CA4r.w[1]) >> 63)) | D;\r\n CQ.w[0] += carry64;\r\n if (CQ.w[0] < carry64)\r\n CQ.w[1]++;\r\n break;\r\n case BID_ROUNDING_DOWN:\r\n case BID_ROUNDING_TO_ZERO:\r\n break;\r\n default:\t// rounding up\r\n CQ.w[0]++;\r\n if (!CQ.w[0])\r\n CQ.w[1]++;\r\n break;\r\n }\r\n#endif\r\n#endif\r\n\r\n} else {\r\n#ifdef BID_SET_STATUS_FLAGS\r\n if (CA4.w[0] || CA4.w[1]) {\r\n // set status flags\r\n __set_status_flags (pfpsf, BID_INEXACT_EXCEPTION);\r\n }\r\n#endif\r\n bid_handle_UF_128_rem (&res, sign_x ^ sign_y, diff_expon, CQ,\r\n\t\t CA4.w[1] | CA4.w[0], &rnd_mode, pfpsf);\r\n#ifdef UNCHANGED_BINARY_STATUS_FLAGS\r\n // (void) fesetexceptflag (&binaryflags, BID_FE_ALL_FLAGS);\r\n#endif\r\n BID_RETURN (res);\r\n}\r\n\r\nbid_get_BID128 (&res, sign_x ^ sign_y, diff_expon, CQ, &rnd_mode, pfpsf);\r\n#ifdef UNCHANGED_BINARY_STATUS_FLAGS\r\n// (void) fesetexceptflag (&binaryflags, BID_FE_ALL_FLAGS);\r\n#endif\r\nBID_RETURN (res);\r\n\r\n}\r\n\r\n\r\nBID128_FUNCTION_ARG128_ARGTYPE2 (bid128qd_div, x, BID_UINT64, y)\r\n BID_UINT256 CA4, CA4r, P256;\r\n BID_UINT128 CX, CY, T128, CQ, CR, CA, TP128, Qh, Ql, res;\r\n BID_UINT64 sign_x, sign_y, carry64, D, Q_high, Q_low, QX, PD,\r\n valid_y;\r\n int_float fx, fy, f64;\r\n BID_UINT32 QX32, tdigit[3], digit, digit_h, digit_low;\r\n int exponent_x, exponent_y, bin_index, bin_expon, diff_expon, ed2,\r\n digits_q, amount;\r\n int nzeros, i, j, k, d5, rmode;\r\n\r\n BID_OPT_SAVE_BINARY_FLAGS()\r\n\r\nvalid_y = unpack_BID64 (&sign_y, &exponent_y, &CY.w[0], y);\r\n\t// unpack arguments, check for NaN or Infinity\r\nif (!unpack_BID128_value (&sign_x, &exponent_x, &CX, x)) {\r\n // test if x is NaN\r\nif ((x.w[1] & 0x7c00000000000000ull) == 0x7c00000000000000ull) {\r\n#ifdef BID_SET_STATUS_FLAGS\r\n if ((x.w[1] & 0x7e00000000000000ull) == 0x7e00000000000000ull ||\t// sNaN\r\n (y & 0x7e00000000000000ull) == 0x7e00000000000000ull)\r\n __set_status_flags (pfpsf, BID_INVALID_EXCEPTION);\r\n#endif\r\n res.w[1] = (CX.w[1]) & QUIET_MASK64;\r\n res.w[0] = CX.w[0];\r\n BID_RETURN (res);\r\n}\r\n // x is Infinity?\r\nif ((x.w[1] & 0x7800000000000000ull) == 0x7800000000000000ull) {\r\n // check if y is Inf. \r\n if (((y & 0x7c00000000000000ull) == 0x7800000000000000ull))\r\n // return NaN \r\n {\r\n#ifdef BID_SET_STATUS_FLAGS\r\n __set_status_flags (pfpsf, BID_INVALID_EXCEPTION);\r\n#endif\r\n res.w[1] = 0x7c00000000000000ull;\r\n res.w[0] = 0;\r\n BID_RETURN (res);\r\n }\r\n // y is NaN?\r\n if (((y & 0x7c00000000000000ull) != 0x7c00000000000000ull))\r\n // return NaN \r\n {\r\n // return +/-Inf\r\n res.w[1] = ((x.w[1] ^ y) & 0x8000000000000000ull) |\r\n 0x7800000000000000ull;\r\n res.w[0] = 0;\r\n BID_RETURN (res);\r\n }\r\n}\r\n // x is 0\r\nif ((y & 0x7800000000000000ull) < 0x7800000000000000ull) {\r\n\tif (!CY.w[0]) {\r\n#ifdef BID_SET_STATUS_FLAGS\r\n __set_status_flags (pfpsf, BID_INVALID_EXCEPTION);\r\n#endif\r\n // x=y=0, return NaN\r\n res.w[1] = 0x7c00000000000000ull;\r\n res.w[0] = 0;\r\n BID_RETURN (res);\r\n }\r\n // return 0\r\n res.w[1] = (x.w[1] ^ y) & 0x8000000000000000ull;\r\n exponent_x = exponent_x - exponent_y + DECIMAL_EXPONENT_BIAS;\r\n if (exponent_x > DECIMAL_MAX_EXPON_128)\r\n exponent_x = DECIMAL_MAX_EXPON_128;\r\n else if (exponent_x < 0)\r\n exponent_x = 0;\r\n res.w[1] |= (((BID_UINT64) exponent_x) << 49);\r\n res.w[0] = 0;\r\n BID_RETURN (res);\r\n}\r\n}\r\nCY.w[1] = 0;\r\nif (!valid_y) {\r\n // y is Inf. or NaN\r\n\r\n // test if y is NaN\r\n if ((y & NAN_MASK64) == NAN_MASK64) {\r\n#ifdef BID_SET_STATUS_FLAGS\r\n if ((y & SNAN_MASK64) == SNAN_MASK64)\t// sNaN\r\n __set_status_flags (pfpsf, BID_INVALID_EXCEPTION);\r\n#endif\r\n res.w[0] = (CY.w[0] & 0x0003ffffffffffffull);\r\n __mul_64x64_to_128 (res, res.w[0], bid_power10_table_128[18].w[0]);\r\n res.w[1] |= ((CY.w[0]) & 0xfc00000000000000ull);\r\n BID_RETURN (res);\r\n }\r\n // y is Infinity?\r\n if ((y & INFINITY_MASK64) == INFINITY_MASK64) {\r\n // return +/-0\r\n res.w[1] = ((x.w[1] ^ y) & 0x8000000000000000ull);\r\n res.w[0] = 0;\r\n BID_RETURN (res);\r\n }\r\n // y is 0\r\n#ifdef BID_SET_STATUS_FLAGS\r\n __set_status_flags (pfpsf, BID_ZERO_DIVIDE_EXCEPTION);\r\n#endif\r\n res.w[1] = (sign_x ^ sign_y) | INFINITY_MASK64;\r\n res.w[0] = 0;\r\n BID_RETURN (res);\r\n}\r\n#ifdef UNCHANGED_BINARY_STATUS_FLAGS\r\n// (void) fegetexceptflag (&binaryflags, BID_FE_ALL_FLAGS);\r\n#endif\r\ndiff_expon = exponent_x - exponent_y + DECIMAL_EXPONENT_BIAS;\r\n\r\nif (__unsigned_compare_gt_128 (CY, CX)) {\r\n // CX < CY\r\n\r\n // 2^64\r\n f64.i = 0x5f800000;\r\n\r\n // fx ~ CX, fy ~ CY\r\n fx.d = (float) CX.w[1] * f64.d + (float) CX.w[0];\r\n fy.d = (float) CY.w[1] * f64.d + (float) CY.w[0];\r\n // expon_cy - expon_cx\r\n bin_index = (fy.i - fx.i) >> 23;\r\n\r\n T128 = bid_power10_index_binexp_128[bin_index];\r\n __mul_64x128_short (CA, CX.w[0], T128);\r\n\r\n ed2 = 33;\r\n if (__unsigned_compare_gt_128 (CY, CA))\r\n ed2++;\r\n\r\n T128 = bid_power10_table_128[ed2];\r\n __mul_128x128_to_256 (CA4, CA, T128);\r\n\r\n ed2 += bid_estimate_decimal_digits[bin_index];\r\n CQ.w[0] = CQ.w[1] = 0;\r\n diff_expon = diff_expon - ed2;\r\n\r\n} else {\r\n // get CQ = CX/CY\r\n bid___div_128_by_128 (&CQ, &CR, CX, CY);\r\n\r\n if (!CR.w[1] && !CR.w[0]) {\r\n bid_get_BID128 (&res, sign_x ^ sign_y, diff_expon, CQ, &rnd_mode,\r\n\t\tpfpsf);\r\n#ifdef UNCHANGED_BINARY_STATUS_FLAGS\r\n // (void) fesetexceptflag (&binaryflags, BID_FE_ALL_FLAGS);\r\n#endif\r\n BID_RETURN (res);\r\n }\r\n // get number of decimal digits in CQ\r\n // 2^64\r\n f64.i = 0x5f800000;\r\n fx.d = (float) CQ.w[1] * f64.d + (float) CQ.w[0];\r\n // binary expon. of CQ\r\n bin_expon = (fx.i - 0x3f800000) >> 23;\r\n\r\n digits_q = bid_estimate_decimal_digits[bin_expon];\r\n TP128.w[0] = bid_power10_index_binexp_128[bin_expon].w[0];\r\n TP128.w[1] = bid_power10_index_binexp_128[bin_expon].w[1];\r\n if (__unsigned_compare_ge_128 (CQ, TP128))\r\n digits_q++;\r\n\r\n ed2 = 34 - digits_q;\r\n T128.w[0] = bid_power10_table_128[ed2].w[0];\r\n T128.w[1] = bid_power10_table_128[ed2].w[1];\r\n __mul_128x128_to_256 (CA4, CR, T128);\r\n diff_expon = diff_expon - ed2;\r\n __mul_128x128_low (CQ, CQ, T128);\r\n\r\n}\r\n\r\nbid___div_256_by_128 (&CQ, &CA4, CY);\r\n\r\n\r\n#ifdef BID_SET_STATUS_FLAGS\r\n if (CA4.w[0] || CA4.w[1]) {\r\n // set status flags\r\n __set_status_flags (pfpsf, BID_INEXACT_EXCEPTION);\r\n }\r\n#ifndef LEAVE_TRAILING_ZEROS\r\n else\r\n#endif\r\n#else\r\n#ifndef LEAVE_TRAILING_ZEROS\r\n if (!CA4.w[0] && !CA4.w[1])\r\n#endif\r\n#endif\r\n#ifndef LEAVE_TRAILING_ZEROS\r\n // check whether result is exact\r\n {\r\n // check whether CX, CY are short\r\n if (!CX.w[1] && !CY.w[1] && (CX.w[0] <= 1024) && (CY.w[0] <= 1024)) {\r\n i = (int) CY.w[0] - 1;\r\n j = (int) CX.w[0] - 1;\r\n // difference in powers of 2 bid_factors for Y and X\r\n nzeros = ed2 - bid_factors[i][0] + bid_factors[j][0];\r\n // difference in powers of 5 bid_factors\r\n d5 = ed2 - bid_factors[i][1] + bid_factors[j][1];\r\n if (d5 < nzeros)\r\n\tnzeros = d5;\r\n // get P*(2^M[extra_digits])/10^extra_digits\r\n __mul_128x128_full (Qh, Ql, CQ, bid_reciprocals10_128[nzeros]);\r\n //__mul_128x128_to_256(P256, CQ, bid_reciprocals10_128[nzeros]);Qh.w[1]=P256.w[3];Qh.w[0]=P256.w[2];\r\n\r\n // now get P/10^extra_digits: shift Q_high right by M[extra_digits]-128\r\n amount = bid_recip_scale[nzeros];\r\n __shr_128_long (CQ, Qh, amount);\r\n\r\n diff_expon += nzeros;\r\n } else {\r\n // decompose Q as Qh*10^17 + Ql\r\n //T128 = bid_reciprocals10_128[17];\r\n T128.w[0] = 0x44909befeb9fad49ull;\r\n T128.w[1] = 0x000b877aa3236a4bull;\r\n __mul_128x128_to_256 (P256, CQ, T128);\r\n //amount = bid_recip_scale[17];\r\n Q_high = (P256.w[2] >> 44) | (P256.w[3] << (64 - 44));\r\n Q_low = CQ.w[0] - Q_high * 100000000000000000ull;\r\n\r\n if (!Q_low) {\r\n\tdiff_expon += 17;\r\n\r\n\ttdigit[0] = Q_high & 0x3ffffff;\r\n\ttdigit[1] = 0;\r\n\tQX = Q_high >> 26;\r\n\tQX32 = QX;\r\n\tnzeros = 0;\r\n\r\n\tfor (j = 0; QX32; j++, QX32 >>= 7) {\r\n\t k = (QX32 & 127);\r\n\t tdigit[0] += bid_convert_table[j][k][0];\r\n\t tdigit[1] += bid_convert_table[j][k][1];\r\n\t if (tdigit[0] >= 100000000) {\r\n\t tdigit[0] -= 100000000;\r\n\t tdigit[1]++;\r\n\t }\r\n\t}\r\n\r\n\r\n\tif (tdigit[1] >= 100000000) {\r\n\t tdigit[1] -= 100000000;\r\n\t if (tdigit[1] >= 100000000)\r\n\t tdigit[1] -= 100000000;\r\n\t}\r\n\r\n\tdigit = tdigit[0];\r\n\tif (!digit && !tdigit[1])\r\n\t nzeros += 16;\r\n\telse {\r\n\t if (!digit) {\r\n\t nzeros += 8;\r\n\t digit = tdigit[1];\r\n\t }\r\n\t // decompose digit\r\n\t PD = (BID_UINT64) digit *0x068DB8BBull;\r\n\t digit_h = (BID_UINT32) (PD >> 40);\r\n\t digit_low = digit - digit_h * 10000;\r\n\r\n\t if (!digit_low)\r\n\t nzeros += 4;\r\n\t else\r\n\t digit_h = digit_low;\r\n\r\n\t if (!(digit_h & 1))\r\n\t nzeros +=\r\n\t 3 & (BID_UINT32) (bid_packed_10000_zeros[digit_h >> 3] >>\r\n\t\t\t (digit_h & 7));\r\n\t}\r\n\r\n\tif (nzeros) {\r\n\t __mul_64x64_to_128 (CQ, Q_high, bid_reciprocals10_64[nzeros]);\r\n\r\n\t // now get P/10^extra_digits: shift C64 right by M[extra_digits]-64\r\n\t amount = bid_short_recip_scale[nzeros];\r\n\t CQ.w[0] = CQ.w[1] >> amount;\r\n\t} else\r\n\t CQ.w[0] = Q_high;\r\n\tCQ.w[1] = 0;\r\n\r\n\tdiff_expon += nzeros;\r\n } else {\r\n\ttdigit[0] = Q_low & 0x3ffffff;\r\n\ttdigit[1] = 0;\r\n\tQX = Q_low >> 26;\r\n\tQX32 = QX;\r\n\tnzeros = 0;\r\n\r\n\tfor (j = 0; QX32; j++, QX32 >>= 7) {\r\n\t k = (QX32 & 127);\r\n\t tdigit[0] += bid_convert_table[j][k][0];\r\n\t tdigit[1] += bid_convert_table[j][k][1];\r\n\t if (tdigit[0] >= 100000000) {\r\n\t tdigit[0] -= 100000000;\r\n\t tdigit[1]++;\r\n\t }\r\n\t}\r\n\r\n\tif (tdigit[1] >= 100000000) {\r\n\t tdigit[1] -= 100000000;\r\n\t if (tdigit[1] >= 100000000)\r\n\t tdigit[1] -= 100000000;\r\n\t}\r\n\r\n\tdigit = tdigit[0];\r\n\tif (!digit && !tdigit[1])\r\n\t nzeros += 16;\r\n\telse {\r\n\t if (!digit) {\r\n\t nzeros += 8;\r\n\t digit = tdigit[1];\r\n\t }\r\n\t // decompose digit\r\n\t PD = (BID_UINT64) digit *0x068DB8BBull;\r\n\t digit_h = (BID_UINT32) (PD >> 40);\r\n\t digit_low = digit - digit_h * 10000;\r\n\r\n\t if (!digit_low)\r\n\t nzeros += 4;\r\n\t else\r\n\t digit_h = digit_low;\r\n\r\n\t if (!(digit_h & 1))\r\n\t nzeros +=\r\n\t 3 & (BID_UINT32) (bid_packed_10000_zeros[digit_h >> 3] >>\r\n\t\t\t (digit_h & 7));\r\n\t}\r\n\r\n\tif (nzeros) {\r\n\t // get P*(2^M[extra_digits])/10^extra_digits\r\n\t __mul_128x128_full (Qh, Ql, CQ, bid_reciprocals10_128[nzeros]);\r\n\r\n\t // now get P/10^extra_digits: shift Q_high right by M[extra_digits]-128\r\n\t amount = bid_recip_scale[nzeros];\r\n\t __shr_128 (CQ, Qh, amount);\r\n\t}\r\n\tdiff_expon += nzeros;\r\n\r\n }\r\n }\r\n bid_get_BID128 (&res, sign_x ^ sign_y, diff_expon, CQ, &rnd_mode,pfpsf);\r\n#ifdef UNCHANGED_BINARY_STATUS_FLAGS\r\n // (void) fesetexceptflag (&binaryflags, BID_FE_ALL_FLAGS);\r\n#endif\r\n BID_RETURN (res);\r\n }\r\n#endif\r\n\r\nif (diff_expon >= 0) {\r\n#ifdef IEEE_ROUND_NEAREST\r\n // rounding\r\n // 2*CA4 - CY\r\n CA4r.w[1] = (CA4.w[1] + CA4.w[1]) | (CA4.w[0] >> 63);\r\n CA4r.w[0] = CA4.w[0] + CA4.w[0];\r\n __sub_borrow_out (CA4r.w[0], carry64, CA4r.w[0], CY.w[0]);\r\n CA4r.w[1] = CA4r.w[1] - CY.w[1] - carry64;\r\n\r\n D = (CA4r.w[1] | CA4r.w[0]) ? 1 : 0;\r\n carry64 = (1 + (((BID_SINT64) CA4r.w[1]) >> 63)) & ((CQ.w[0]) | D);\r\n\r\n CQ.w[0] += carry64;\r\n if (CQ.w[0] < carry64)\r\n CQ.w[1]++;\r\n#else\r\n#ifdef IEEE_ROUND_NEAREST_TIES_AWAY\r\n // rounding\r\n // 2*CA4 - CY\r\n CA4r.w[1] = (CA4.w[1] + CA4.w[1]) | (CA4.w[0] >> 63);\r\n CA4r.w[0] = CA4.w[0] + CA4.w[0];\r\n __sub_borrow_out (CA4r.w[0], carry64, CA4r.w[0], CY.w[0]);\r\n CA4r.w[1] = CA4r.w[1] - CY.w[1] - carry64;\r\n\r\n D = (CA4r.w[1] | CA4r.w[0]) ? 0 : 1;\r\n carry64 = (1 + (((BID_SINT64) CA4r.w[1]) >> 63)) | D;\r\n\r\n CQ.w[0] += carry64;\r\n if (CQ.w[0] < carry64)\r\n CQ.w[1]++;\r\n#else\r\n rmode = rnd_mode;\r\n if (sign_x ^ sign_y && (unsigned) (rmode - 1) < 2)\r\n rmode = 3 - rmode;\r\n switch (rmode) {\r\n case BID_ROUNDING_TO_NEAREST:\t// round to nearest code\r\n // rounding\r\n // 2*CA4 - CY\r\n CA4r.w[1] = (CA4.w[1] + CA4.w[1]) | (CA4.w[0] >> 63);\r\n CA4r.w[0] = CA4.w[0] + CA4.w[0];\r\n __sub_borrow_out (CA4r.w[0], carry64, CA4r.w[0], CY.w[0]);\r\n CA4r.w[1] = CA4r.w[1] - CY.w[1] - carry64;\r\n D = (CA4r.w[1] | CA4r.w[0]) ? 1 : 0;\r\n carry64 = (1 + (((BID_SINT64) CA4r.w[1]) >> 63)) & ((CQ.w[0]) | D);\r\n CQ.w[0] += carry64;\r\n if (CQ.w[0] < carry64)\r\n CQ.w[1]++;\r\n break;\r\n case BID_ROUNDING_TIES_AWAY:\r\n // rounding\r\n // 2*CA4 - CY\r\n CA4r.w[1] = (CA4.w[1] + CA4.w[1]) | (CA4.w[0] >> 63);\r\n CA4r.w[0] = CA4.w[0] + CA4.w[0];\r\n __sub_borrow_out (CA4r.w[0], carry64, CA4r.w[0], CY.w[0]);\r\n CA4r.w[1] = CA4r.w[1] - CY.w[1] - carry64;\r\n D = (CA4r.w[1] | CA4r.w[0]) ? 0 : 1;\r\n carry64 = (1 + (((BID_SINT64) CA4r.w[1]) >> 63)) | D;\r\n CQ.w[0] += carry64;\r\n if (CQ.w[0] < carry64)\r\n CQ.w[1]++;\r\n break;\r\n case BID_ROUNDING_DOWN:\r\n case BID_ROUNDING_TO_ZERO:\r\n break;\r\n default:\t// rounding up\r\n CQ.w[0]++;\r\n if (!CQ.w[0])\r\n CQ.w[1]++;\r\n break;\r\n }\r\n#endif\r\n#endif\r\n\r\n} else {\r\n#ifdef BID_SET_STATUS_FLAGS\r\n if (CA4.w[0] || CA4.w[1]) {\r\n // set status flags\r\n __set_status_flags (pfpsf, BID_INEXACT_EXCEPTION);\r\n }\r\n#endif\r\n bid_handle_UF_128_rem (&res, sign_x ^ sign_y, diff_expon, CQ,\r\n\t\t CA4.w[1] | CA4.w[0], &rnd_mode, pfpsf);\r\n#ifdef UNCHANGED_BINARY_STATUS_FLAGS\r\n // (void) fesetexceptflag (&binaryflags, BID_FE_ALL_FLAGS);\r\n#endif\r\n BID_RETURN (res);\r\n\r\n}\r\n\r\nbid_get_BID128 (&res, sign_x ^ sign_y, diff_expon, CQ, &rnd_mode, pfpsf);\r\n#ifdef UNCHANGED_BINARY_STATUS_FLAGS\r\n// (void) fesetexceptflag (&binaryflags, BID_FE_ALL_FLAGS);\r\n#endif\r\nBID_RETURN (res);\r\n\r\n}\r\n"} +{"text": "CMAKE_OBJC_STANDARD_REQUIRED\n----------------------------\n\n.. versionadded:: 3.16\n\nDefault value for :prop_tgt:`OBJC_STANDARD_REQUIRED` property of targets.\n\nThis variable is used to initialize the :prop_tgt:`OBJC_STANDARD_REQUIRED`\nproperty on all targets. See that target property for additional\ninformation.\n\nSee the :manual:`cmake-compile-features(7)` manual for information on\ncompile features and a list of supported compilers.\n"} +{"text": "// go run mksyscall.go -l32 -tags linux,386 syscall_linux.go syscall_linux_386.go\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n// +build linux,386\n\npackage unix\n\nimport (\n\t\"syscall\"\n\t\"unsafe\"\n)\n\nvar _ syscall.Errno\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc fanotifyMark(fd int, flags uint, mask uint64, dirFd int, pathname *byte) (err error) {\n\t_, _, e1 := Syscall6(SYS_FANOTIFY_MARK, uintptr(fd), uintptr(flags), uintptr(mask), uintptr(mask>>32), uintptr(dirFd), uintptr(unsafe.Pointer(pathname)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fallocate(fd int, mode uint32, off int64, len int64) (err error) {\n\t_, _, e1 := Syscall6(SYS_FALLOCATE, uintptr(fd), uintptr(mode), uintptr(off), uintptr(off>>32), uintptr(len), uintptr(len>>32))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Tee(rfd int, wfd int, len int, flags int) (n int64, err error) {\n\tr0, r1, e1 := Syscall6(SYS_TEE, uintptr(rfd), uintptr(wfd), uintptr(len), uintptr(flags), 0, 0)\n\tn = int64(int64(r1)<<32 | int64(r0))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc pipe(p *[2]_C_int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_PIPE, uintptr(unsafe.Pointer(p)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc dup2(oldfd int, newfd int) (err error) {\n\t_, _, e1 := Syscall(SYS_DUP2, uintptr(oldfd), uintptr(newfd), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc EpollCreate(size int) (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_EPOLL_CREATE, uintptr(size), 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc EpollWait(epfd int, events []EpollEvent, msec int) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(events) > 0 {\n\t\t_p0 = unsafe.Pointer(&events[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_EPOLL_WAIT, uintptr(epfd), uintptr(_p0), uintptr(len(events)), uintptr(msec), 0, 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fadvise(fd int, offset int64, length int64, advice int) (err error) {\n\t_, _, e1 := Syscall6(SYS_FADVISE64_64, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(length), uintptr(length>>32), uintptr(advice))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fchown(fd int, uid int, gid int) (err error) {\n\t_, _, e1 := Syscall(SYS_FCHOWN32, uintptr(fd), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstat(fd int, stat *Stat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_FSTAT64, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Fstatat(dirfd int, path string, stat *Stat_t, flags int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_FSTATAT64, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ftruncate(fd int, length int64) (err error) {\n\t_, _, e1 := Syscall(SYS_FTRUNCATE64, uintptr(fd), uintptr(length), uintptr(length>>32))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getegid() (egid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEGID32, 0, 0, 0)\n\tegid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Geteuid() (euid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETEUID32, 0, 0, 0)\n\teuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getgid() (gid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETGID32, 0, 0, 0)\n\tgid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Getuid() (uid int) {\n\tr0, _ := RawSyscallNoError(SYS_GETUID32, 0, 0, 0)\n\tuid = int(r0)\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc InotifyInit() (fd int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_INOTIFY_INIT, 0, 0, 0)\n\tfd = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ioperm(from int, num int, on int) (err error) {\n\t_, _, e1 := Syscall(SYS_IOPERM, uintptr(from), uintptr(num), uintptr(on))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Iopl(level int) (err error) {\n\t_, _, e1 := Syscall(SYS_IOPL, uintptr(level), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lchown(path string, uid int, gid int) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LCHOWN32, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Lstat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_LSTAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pread(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PREAD64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pwrite(fd int, p []byte, offset int64) (n int, err error) {\n\tvar _p0 unsafe.Pointer\n\tif len(p) > 0 {\n\t\t_p0 = unsafe.Pointer(&p[0])\n\t} else {\n\t\t_p0 = unsafe.Pointer(&_zero)\n\t}\n\tr0, _, e1 := Syscall6(SYS_PWRITE64, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Renameat(olddirfd int, oldpath string, newdirfd int, newpath string) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(oldpath)\n\tif err != nil {\n\t\treturn\n\t}\n\tvar _p1 *byte\n\t_p1, err = BytePtrFromString(newpath)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(olddirfd), uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SENDFILE64, uintptr(outfd), uintptr(infd), uintptr(unsafe.Pointer(offset)), uintptr(count), 0, 0)\n\twritten = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsgid(gid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSGID32, uintptr(gid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setfsuid(uid int) (prev int, err error) {\n\tr0, _, e1 := Syscall(SYS_SETFSUID32, uintptr(uid), 0, 0)\n\tprev = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setregid(rgid int, egid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresgid(rgid int, egid int, sgid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setresuid(ruid int, euid int, suid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Setreuid(ruid int, euid int) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Stat(path string, stat *Stat_t) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_STAT64, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc SyncFileRange(fd int, off int64, n int64, flags int) (err error) {\n\t_, _, e1 := Syscall6(SYS_SYNC_FILE_RANGE, uintptr(fd), uintptr(off), uintptr(off>>32), uintptr(n), uintptr(n>>32), uintptr(flags))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Truncate(path string, length int64) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_TRUNCATE64, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Ustat(dev int, ubuf *Ustat_t) (err error) {\n\t_, _, e1 := Syscall(SYS_USTAT, uintptr(dev), uintptr(unsafe.Pointer(ubuf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getgroups(n int, list *_Gid_t) (nn int, err error) {\n\tr0, _, e1 := RawSyscall(SYS_GETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tnn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setgroups(n int, list *_Gid_t) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETGROUPS32, uintptr(n), uintptr(unsafe.Pointer(list)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {\n\tr0, _, e1 := Syscall6(SYS__NEWSELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc mmap2(addr uintptr, length uintptr, prot int, flags int, fd int, pageOffset uintptr) (xaddr uintptr, err error) {\n\tr0, _, e1 := Syscall6(SYS_MMAP2, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flags), uintptr(fd), uintptr(pageOffset))\n\txaddr = uintptr(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Pause() (err error) {\n\t_, _, e1 := Syscall(SYS_PAUSE, 0, 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc getrlimit(resource int, rlim *rlimit32) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc setrlimit(resource int, rlim *rlimit32) (err error) {\n\t_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc futimesat(dirfd int, path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_FUTIMESAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)))\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Gettimeofday(tv *Timeval) (err error) {\n\t_, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Time(t *Time_t) (tt Time_t, err error) {\n\tr0, _, e1 := RawSyscall(SYS_TIME, uintptr(unsafe.Pointer(t)), 0, 0)\n\ttt = Time_t(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc Utime(path string, buf *Utimbuf) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(buf)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc utimes(path string, times *[2]Timeval) (err error) {\n\tvar _p0 *byte\n\t_p0, err = BytePtrFromString(path)\n\tif err != nil {\n\t\treturn\n\t}\n\t_, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), 0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n\n// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT\n\nfunc poll(fds *PollFd, nfds int, timeout int) (n int, err error) {\n\tr0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))\n\tn = int(r0)\n\tif e1 != 0 {\n\t\terr = errnoErr(e1)\n\t}\n\treturn\n}\n"} +{"text": "// Work.js\nimport React, { Component } from 'react'\nimport _ from 'lodash'\nimport config from '../../config'\n\n// Components\nimport Header from '../Partials/Header'\nimport WorkList from '../Partials/WorkList'\nimport WorkSingle from '../Partials/WorkSingle'\n\n// Dispatcher\nimport AppDispatcher from '../../dispatcher/AppDispatcher'\n\nexport default class Work extends Component {\n\n componentWillMount(){\n this.getPageData()\n }\n\n componentDidMount(){\n const data = this.props.data\n document.title = config.site.title + ' | ' + data.page.title\n }\n\n getPageData(){\n AppDispatcher.dispatch({\n action: 'get-page-data',\n page_slug: 'work',\n post_slug: this.props.params.slug\n })\n }\n\n getMoreWorkItems(){\n AppDispatcher.dispatch({\n action: 'get-more-items'\n })\n }\n\n render(){\n\n const data = this.props.data\n const globals = data.globals\n const pages = data.pages\n let main_content\n\n if(!this.props.params.slug){\n\n main_content = <WorkList getMoreWorkItems={ this.getMoreWorkItems } data={ data }/>\n\n } else {\n \n const work_items = data.work_items\n \n // Get current page slug\n const slug = this.props.params.slug\n const work_items_object = _.indexBy(work_items, 'slug')\n const work_item = work_items_object[slug]\n \n main_content = <WorkSingle data={ data } work_item={ work_item }/>\n\n }\n\n return (\n <div>\n <Header data={ data }/>\n <div id=\"main-content\" className=\"container\">\n <div className=\"row\">\n <div className=\"col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1\">\n { main_content }\n </div>\n </div>\n </div>\n </div>\n )\n }\n}"} +{"text": "<div class=\"resource-view team-view\" resources=\"[orgResource, membersResource]\"\n error-message=\"'No matching organization or team found'\">\n <div class=\"page-content\">\n <div class=\"cor-title\">\n <span class=\"cor-title-link\">\n <a class=\"back-link\" href=\"/organization/{{ organization.name }}?tab=teams\">\n <span class=\"avatar\" size=\"24\" data=\"organization.avatar\" style=\"margin-right: 4px\"></span>\n {{ organization.name }}\n </a>\n </span>\n <span class=\"cor-title-content\">\n <span class=\"team-title\">Team</span>\n <span class=\"avatar\" data=\"team.avatar\" size=\"32\"></span>\n <span class=\"team-name\">{{ teamname }}</span>\n </span>\n </div>\n\n <div class=\"co-main-content-panel\">\n <div class=\"feedback-bar\" feedback=\"feedback\"></div>\n\n <div class=\"team-sync-header\" ng-if=\"canSync && !syncInfo && !inReadOnlyMode\">\n <div class=\"section-header\">Directory Synchronization</div>\n <p>Directory synchronization allows this team's user membership to be backed by a group in {{ getServiceName(canSync.service) }}.</p>\n <button class=\"btn btn-primary\" ng-click=\"showEnableSyncing()\">Enable Directory Synchronization</button>\n </div>\n\n <!-- Sync Header -->\n <div ng-if=\"syncInfo\">\n <div class=\"co-alert co-alert-info\">\n This team is synchronized with a group in <strong>{{ getServiceName(syncInfo.service) }}</strong> and its user membership is therefore <strong>read-only</strong>.\n </div>\n\n <div class=\"team-sync-header\" ng-if=\"syncInfo.config\">\n <div class=\"section-header\">Directory Synchronization</div>\n <table class=\"team-sync-table\">\n <tr>\n <td>Bound to group:</td>\n <td>\n <div ng-if=\"syncInfo.service == 'ldap'\">\n <code>{{ syncInfo.config.group_dn }}</code>\n </div>\n <div ng-if=\"syncInfo.service == 'keystone'\">\n <code>{{ syncInfo.config.group_id }}</code>\n </div>\n </td>\n </tr>\n <tr>\n <td>Last Updated:</td>\n <td ng-if=\"syncInfo.last_updated\"><time-ago datetime=\"syncInfo.last_updated\"></time-ago></td>\n <td ng-if=\"!syncInfo.last_updated\" style=\"color: #aaa;\">Never</td>\n </tr>\n </table>\n\n <button class=\"btn btn-default\" ng-click=\"showDisableSyncing()\" ng-if=\"canSync && !inReadOnlyMode\">Remove Synchronization</button>\n <div ng-if=\"!canSync\" class=\"co-alert co-alert-warning co-alert-inline\">You must be an admin of this organization to disable team synchronization</div>\n </div>\n </div>\n\n <!-- Description -->\n <div class=\"section-header\">Team Description</div>\n <div class=\"team-view-header\">\n <div class=\"description\">\n <markdown-input content=\"team.description\"\n can-write=\"organization.is_admin && !inReadOnlyMode\"\n (content-changed)=\"updateForDescription($event.content)\"\n field-title=\"team description\"></markdown-input>\n </div>\n </div>\n\n <!-- Members -->\n <div ng-show=\"canEditMembers && !inReadOnlyMode\" style=\"float:right; margin-top: 10px;\">\n <div class=\"hidden-xs\">\n <div ng-include=\"'/static/directives/team-view-add.html'\" style=\"max-width: 500px;\"></div>\n </div>\n </div>\n <div class=\"section-header\" style=\"margin-bottom: 55px;\">Team Members</div>\n\n <div class=\"empty\" ng-if=\"!members.length\">\n <div class=\"empty-primary-msg\">This team has no members.</div>\n <div class=\"empty-secondary-msg\" ng-if=\"!syncInfo\">\n Enter a user or robot above to add or invite to the team.\n </div>\n <div class=\"empty-secondary-msg\" ng-if=\"syncInfo\">\n This team is synchronized with an external group defined in {{ getServiceName(syncInfo.service) }}. To add a user to this team, add them in the backing group. To add a robot account to this team, enter them above.\n </div>\n </div>\n\n <table class=\"co-table no-lines\" ng-if=\"members.length\">\n <!-- Team Members -->\n <tr class=\"co-table-header-row\"\n ng-if=\"(members | filter: filterFunction(false, false)).length\">\n <td colspan=\"3\"><i class=\"fa fa-user\"></i> Team Members <span ng-if=\"syncInfo\">(defined in {{ getServiceName(syncInfo.service) }})</span></td>\n </tr>\n\n <tr class=\"indented-row\"\n ng-repeat=\"member in members | filter: filterFunction(false, false) | orderBy: 'name'\">\n <td class=\"user entity\">\n <span class=\"entity-reference\" entity=\"member\" namespace=\"organization.name\"\n show-avatar=\"true\" avatar-size=\"24\"></span>\n </td>\n <td class=\"options-col\">\n <span class=\"cor-options-menu\" ng-if=\"canEditMembers && !syncInfo && !inReadOnlyMode\">\n <span class=\"cor-option\" option-click=\"removeMember(member.name)\">\n <i class=\"fa fa-times\"></i> Remove {{ member.name }}\n </span>\n </span>\n </td>\n </tr>\n\n <!-- Robot Accounts -->\n <tr class=\"co-table-header-row\"\n ng-if=\"(members | filter: filterFunction(false, true)).length\">\n <td colspan=\"3\"><i class=\"fa ci-robot\"></i> Robot Accounts</td>\n </tr>\n\n <tr class=\"indented-row\"\n ng-repeat=\"member in members | filter: filterFunction(false, true) | orderBy: 'name'\">\n <td class=\"user entity\">\n <span class=\"entity-reference\" entity=\"member\" namespace=\"organization.name\"></span>\n </td>\n <td class=\"options-col\">\n <span class=\"cor-options-menu\" ng-if=\"canEditMembers && !inReadOnlyMode\">\n <span class=\"cor-option\" option-click=\"removeMember(member.name)\">\n <i class=\"fa fa-times\"></i> Remove {{ member.name }}\n </span>\n </span>\n </td>\n </tr>\n\n <!-- Invitations -->\n <tr class=\"co-table-header-row\"\n ng-if=\"(members | filter: filterFunction(true, false)).length\">\n <td colspan=\"3\"><i class=\"fa ci-invite\"></i> Invited to Join</td>\n </tr>\n\n <tr class=\"indented-row\"\n ng-repeat=\"member in members | filter: filterFunction(true, false) | orderBy: 'name'\">\n <td class=\"user entity\">\n <span ng-if=\"member.kind != 'invite'\">\n <span class=\"entity-reference\" entity=\"member\" namespace=\"organization.name\" show-avatar=\"true\" avatar-size=\"24\"></span>\n </span>\n <span class=\"invite-listing\" ng-if=\"member.kind == 'invite'\">\n <span class=\"avatar\" size=\"24\" data=\"member.avatar\" style=\"margin-right: 6px;\"></span>\n {{ member.email }}\n </span>\n </td>\n <td class=\"options-col\">\n <span class=\"cor-options-menu\" ng-if=\"canEditMembers && !inReadOnlyMode\">\n <span class=\"cor-option\" option-click=\"revokeInvite(member)\">\n <i class=\"fa fa-times\"></i> Revoke invite\n </span>\n </span>\n </td>\n </tr>\n </table>\n\n <!-- Add team member (mobile) -->\n <div ng-show=\"canEditMembers && !inReadOnlyMode\">\n <div class=\"visible-xs\" style=\"margin-top: 20px; padding-top: 10px; border-top: 1px solid #eee;\">\n <div class=\"section-header\">Add team member</div>\n <div ng-include=\"'/static/directives/team-view-add.html'\" style=\"max-width: 500px;\"></div>\n </div>\n </div>\n </div>\n </div>\n</div>\n\n<!-- Directory binding dialog -->\n<div class=\"cor-confirm-dialog\"\n dialog-context=\"enableSyncingInfo\"\n dialog-action=\"enableSyncing(info.config, callback)\"\n dialog-title=\"Enable Directory Syncing\"\n dialog-action-title=\"Enable Group Sync\"\n dialog-form=\"context.syncform\">\n <div class=\"co-alert co-alert-warning\">Please note that once team syncing is enabled, the team's user membership from within <span class=\"registry-name\"></span> will be read-only.</div>\n <form name=\"context.syncform\" class=\"co-single-field-dialog\">\n <div ng-switch on=\"enableSyncingInfo.service_info.service\">\n <div ng-switch-when=\"ldap\">\n Enter the distinguished name of the group, relative to <code>{{ enableSyncingInfo.service_info.base_dn }}</code>:\n <input type=\"text\" class=\"form-control\" placeholder=\"Group DN\" ng-model=\"enableSyncingInfo.config.group_dn\" required>\n </div>\n <div ng-switch-when=\"keystone\">\n Enter the Keystone group ID:\n <input type=\"text\" class=\"form-control\" placeholder=\"Group ID\" ng-model=\"enableSyncingInfo.config.group_id\" required>\n </div>\n </div>\n </form>\n</div>\n\n\n<!-- Modal message dialog -->\n<div class=\"modal fade\" id=\"cannotChangeTeamModal\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">&times;</button>\n <h4 class=\"modal-title\">Cannot change team</h4>\n </div>\n <div class=\"modal-body\">\n You do not have permission to change properties of this team.\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Close</button>\n </div>\n </div><!-- /.modal-content -->\n </div><!-- /.modal-dialog -->\n</div><!-- /.modal -->\n\n<!-- Modal message dialog -->\n<div class=\"modal fade\" id=\"cannotChangeMembersModal\">\n <div class=\"modal-dialog\">\n <div class=\"modal-content\">\n <div class=\"modal-header\">\n <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">&times;</button>\n <h4 class=\"modal-title\">Cannot change members</h4>\n </div>\n <div class=\"modal-body\">\n You do not have permission to change the members of this team.\n </div>\n <div class=\"modal-footer\">\n <button type=\"button\" class=\"btn btn-default\" data-dismiss=\"modal\">Close</button>\n </div>\n </div><!-- /.modal-content -->\n </div><!-- /.modal-dialog -->\n</div><!-- /.modal -->\n"} +{"text": "/************************\n* HTML Editor styles *\n*************************/\n\n.ui-ightmleditor {\n background-color: white;\n border: 1px solid #cdcdcd;\n background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, #ffffff), color-stop(100%, #ffffff));\n background-image: -webkit-linear-gradient(#ffffff, #ffffff);\n background-image: -moz-linear-gradient(#ffffff, #ffffff);\n background-image: -o-linear-gradient(#ffffff, #ffffff);\n background-image: -ms-linear-gradient(#ffffff, #ffffff);\n background-image: linear-gradient(#ffffff, #ffffff);\n *zoom: 1;\n filter: progid:DXImageTransform.Microsoft.gradient(gradientType=0, startColorstr='#FFFFFFFF', endColorstr='#FFFFFFFF');\n}\n\n.ui-ightmleditor .ui-igtoolbar {\n background: transparent;\n}\n\n.ui-ightmleditor .ui-igtoolbar-wrap .ui-igbutton.ui-igbutton,\n.ui-ightmleditor .ui-igtoolbar .ui-igbutton {\n -moz-border-radius: 0;\n -webkit-border-radius: 0;\n -o-border-radius: 0;\n -ms-border-radius: 0;\n -khtml-border-radius: 0;\n border-radius: 0;\n}\n\n.ui-ightmleditor .ui-igtoolbar-wrap .ui-igbutton.ui-state-default,\n.ui-ightmleditor .ui-igtoolbar .ui-igbutton.ui-state-default {\n background-color: transparent;\n background-image: none;\n border-color: transparent;\n}\n\n.ui-ightmleditor .ui-igtoolbar-wrap .ui-igbutton.ui-state-hover,\n.ui-ightmleditor .ui-igtoolbar .ui-igbutton.ui-state-hover {\n background-color: #e2e2e2;\n background-image: none;\n background-repeat: no-repeat;\n border: 1px solid #858585;\n}\n\n.ui-ightmleditor .ui-igtoolbar-wrap .ui-igbutton.ui-state-focus,\n.ui-ightmleditor .ui-igtoolbar .ui-igbutton.ui-state-focus {\n background-color: #e2e2e2;\n background-image: none;\n background-repeat: no-repeat;\n border: 1px solid #b9b9b9;\n}\n\n.ui-ightmleditor .ui-igtoolbar-wrap .ui-igbutton.ui-state-active,\n.ui-ightmleditor .ui-igtoolbar .ui-igbutton.ui-state-active {\n border: 1px solid #00aade;\n background-color: #00aade;\n background-image: none;\n background-repeat: no-repeat;\n}\n\n.ui-ightmleditor .ui-igcombo-fieldholder {\n border-color: #cdcdcd;\n}\n\n.ui-ightmleditor-content iframe,\n.ui-ightmleditor-content textarea {\n border: 1px solid #cdcdcd;\n -moz-box-shadow: inset 2px 2px 3px rgba(0, 0, 0, 0.1);\n -webkit-box-shadow: inset 2px 2px 3px rgba(0, 0, 0, 0.1);\n -o-box-shadow: inset 2px 2px 3px rgba(0, 0, 0, 0.1);\n box-shadow: inset 2px 2px 3px rgba(0, 0, 0, 0.1);\n}\n/*breadcrumb styling*/\n\n.ui-igPathFinder .ui-button::after {\n border-top: 1px solid #B9B9B9;\n border-right: 1px solid #B9B9B9;\n background: #F9F9F9;\n}\n\n.ui-igPathFinder .ui-button.ui-state-hover::after {\n border-top: 1px solid #858585;\n border-right: 1px solid #858585;\n background: #E2E2E2;\n}\n\n.ui-igPathFinder .ui-button.ui-state-active::after {\n border-top: 1px solid #00AADE;\n border-right: 1px solid #00AADE;\n background: #00AADE;\n}\n\n.ui-igPathFinder .ui-state-active {\n border: 1px solid #00AADE;\n color: #fff;\n}\n/*toolbar buttons*/\n\n.ui-igtoolbarbutton.ui-button.ui-state-active .ui-icon {\n background-position-x: -32px;\n}\n\n.ui-igtoolbarbutton.ui-button.ui-state-active {\n border-width: 1px;\n}\n\n.ui-igtoolbarbutton.ui-button .ui-icon.ui-icon-triangle-1-s {\n background-position: -64px -16px;\n}\n\n.ui-splitbutton.ui-state-active div.ui-igtoolbarbutton.ui-button,\n.ui-ightmleditor .ui-splitbutton.ui-state-active div.ui-igtoolbarbutton.ui-button {\n background-color: #00AADE;\n}\n\n.ui-splitbutton.ui-state-active .ui-igtoolbarbutton .ui-icon {\n background-position-x: -32px;\n}\n\n\n/***********************\n\tEditors\n************************/\n\n.ui-igedit-spinlowerimagepressed,\n.ui-igedit-spinupperimagepressed,\n.ui-igedit-buttonimagepressed {\n background-image: url(images/ui-icons_ffffff_256x240.png) !important;\n}\n/*.ui-datepicker table {\n\tborder\t\t\t\t: 1px solid #D2D2D2;\n\tborder-top-width\t: 0;\n\tmargin\t\t\t\t: 0;\n}*/\n/***********************\n\tHTML Editor\n************************/\n\n.ui-ightmleditor {\n background-image: none;\n background-color: #FFF;\n}\n\n.ui-ightmleditor .ui-igPathFinder .ui-button-text {\n padding: 0px 7px !important;\n}\n\n.ui-igtoolbar .ui-button.ui-igtoolbarbutton .ui-icon {\n background-image: url(images/igHtmlEditor/html-editor-sprite.png) !important;\n}\n\n.ui-igtoolbar .ui-button .ui-icon.ui-icon-triangle-1-s {\n background-image: url(images/ui-icons_858585_256x240.png) !important;\n}\n\n.ui-ightmleditor .ui-button-icon-only .ui-button-text {\n padding: 0!important;\n}\n\n.ui-ightmleditor .ui-igtoolbar .ui-igbutton.ui-state-active {\n background-position: -16px 0 !important;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-expand {\n background-position: -16px -16px !important;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-redo {\n background-position: -16px -32px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-undo {\n background-position: -16px -48px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-increasefontsize {\n background-position: -16px -80px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-decreasefontsize {\n background-position: -16px -96px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-viewsource-icon {\n background-position: -16px -160px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-html {\n background-position: -16px -112px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-html-add {\n background-position: -16px -128px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-html-delete {\n background-position: -16px -144px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-html-valid {\n background-position: -16px -176px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-addimage {\n background-position: -16px -192px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-link {\n background-position: -16px -208px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-addlink {\n background-position: -16px -224px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-unlink {\n background-position: -16px -240px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-copy {\n background-position: -16px -256px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-cut {\n background-position: -16px -272px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-paste {\n background-position: -16px -288px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-table {\n background-position: -16px -304px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-addrow {\n background-position: -16px -320px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-addcolumn {\n background-position: -16px -336px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-removerow {\n background-position: -16px -352px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-removecolumn {\n background-position: -16px -368px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-justifyleft {\n background-position: -16px -384px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-justifycenter {\n background-position: -16px -400px !important;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-justifyright {\n background-position: -16px -416px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-justifyfull {\n background-position: -16px -432px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-forecolor {\n background-position: -16px -448px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-backcolor {\n background-position: -16px -464px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-bold {\n background-position: -16px -480px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-italic {\n background-position: -16px -496px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-underline {\n background-position: -16px -512px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-strikethrough {\n background-position: -16px -528px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-horizontalrule {\n background-position: -16px -544px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-indent {\n background-position: -16px -560px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-removeindent {\n background-position: -16px -576px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-unorderedlist {\n background-position: -16px -592px;\n}\n\n.ui-igtoolbar .ui-button.ui-state-active .ui-icon.ui-igbutton-orderedlist {\n background-position: -16px -608px;\n}"} +{"text": "26f886d3f9887c900b2a443f1aed8997a13fdb13\nr3gi7bMcWdc\n"} +{"text": "path: \"tensorflow.initializers.random_uniform\"\ntf_class {\n is_instance: \"<class \\'tensorflow.python.ops.init_ops.RandomUniform\\'>\"\n is_instance: \"<class \\'tensorflow.python.ops.init_ops.Initializer\\'>\"\n is_instance: \"<type \\'object\\'>\"\n member_method {\n name: \"__init__\"\n argspec: \"args=[\\'self\\', \\'minval\\', \\'maxval\\', \\'seed\\', \\'dtype\\'], varargs=None, keywords=None, defaults=[\\'0\\', \\'None\\', \\'None\\', \\\"<dtype: \\'float32\\'>\\\"], \"\n }\n member_method {\n name: \"from_config\"\n argspec: \"args=[\\'cls\\', \\'config\\'], varargs=None, keywords=None, defaults=None\"\n }\n member_method {\n name: \"get_config\"\n argspec: \"args=[\\'self\\'], varargs=None, keywords=None, defaults=None\"\n }\n}\n"} +{"text": "fileFormatVersion: 2\nguid: 546b0d6769627c0419b2fc06fabf385a\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n defaultReferences: []\n executionOrder: 0\n icon: {instanceID: 0}\n userData: \n assetBundleName: \n assetBundleVariant: \n"} +{"text": "/*\n * This file is part of the OregonCore Project. See AUTHORS file for Copyright information\n *\n * This program is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License as published by the\n * Free Software Foundation; either version 2 of the License, or (at your\n * option) any later version.\n *\n * This program is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for\n * more details.\n *\n * You should have received a copy of the GNU General Public License along\n * with this program. If not, see <https://www.gnu.org/licenses/>.\n */\n\n#include <vector>\n\n#include \"MapTree.h\"\n#include \"VMapManager2.h\"\n#include \"WorldModel.h\"\n#include \"ModelInstance.h\"\n\nusing namespace std;\n\nnamespace VMAP\n{\n// Need direct access to encapsulated VMAP data, so we add functions for MMAP generator\n// maybe add MapBuilder as friend to all of the below classes would be better?\n\n// declared in src/shared/vmap/MapTree.h\nvoid StaticMapTree::getModelInstances(ModelInstance*& models, uint32& count)\n{\n models = iTreeValues;\n count = iNTreeValues;\n}\n\n// declared in src/shared/vmap/VMapManager2.h\nvoid VMapManager2::getInstanceMapTree(InstanceTreeMap& instanceMapTree)\n{\n instanceMapTree = iInstanceMapTrees;\n}\n\n// declared in src/shared/vmap/WorldModel.h\nvoid WorldModel::getGroupModels(vector<GroupModel>& groupModels)\n{\n groupModels = this->groupModels;\n}\n\n// declared in src/shared/vmap/WorldModel.h\nvoid GroupModel::getMeshData(vector<Vector3>& vertices, vector<MeshTriangle>& triangles, WmoLiquid*& liquid)\n{\n vertices = this->vertices;\n triangles = this->triangles;\n liquid = iLiquid;\n}\n\n// declared in src/shared/vmap/ModelInstance.h\nWorldModel* ModelInstance::getWorldModel()\n{\n return iModel;\n}\n\n// declared in src/shared/vmap/WorldModel.h\nvoid WmoLiquid::getPosInfo(uint32& tilesX, uint32& tilesY, Vector3& corner) const\n{\n tilesX = iTilesX;\n tilesY = iTilesY;\n corner = iCorner;\n}\n}\n"} +{"text": "package com.gu.mediaservice.lib.aws\n\nimport com.amazonaws.services.dynamodbv2.document.utils.ValueMap\nimport com.gu.mediaservice.model.{ActionData, Collection}\nimport org.joda.time.DateTime\nimport org.scalatest.{FunSpec, Matchers}\nimport play.api.libs.json.{Format, JsObject, Json}\n\nclass DynamoDBTest extends FunSpec with Matchers {\n\n describe(\"jsonToValueMap\") {\n it (\"should convert a simple JsObject to a valueMap\") {\n val json = Json.toJson(SimpleDynamoDBObj(\"this is a string\", 100, true)).as[JsObject]\n val valueMap = DynamoDB.jsonToValueMap(json)\n\n\n // This is the only way to get stuff type safely out of the valueMap\n // It's not a problem as we shoulnd't be doing this anywhere else\n val s: String = valueMap.get(\"s\").asInstanceOf[String]\n val d: BigDecimal = valueMap.get(\"d\").asInstanceOf[java.math.BigDecimal]\n val b: Boolean = valueMap.get(\"b\").asInstanceOf[Boolean]\n\n\n s should be (\"this is a string\")\n d should be (100)\n b should equal(true)\n }\n\n it (\"should convert a nested JsObject to a valueMap\") {\n val nestedObj = NestedDynamoDBObj(\"string\", 100, false, SimpleDynamoDBObj(\"strang\", 500, true))\n val json = Json.toJson(nestedObj).as[JsObject]\n val valueMap = DynamoDB.jsonToValueMap(json)\n\n val ss: String = valueMap.get(\"ss\").asInstanceOf[String]\n val dd: BigDecimal = valueMap.get(\"dd\").asInstanceOf[java.math.BigDecimal]\n val bb: Boolean = valueMap.get(\"bb\").asInstanceOf[Boolean]\n\n val simpleMap = valueMap.get(\"simple\").asInstanceOf[ValueMap]\n\n val s: String = simpleMap.get(\"s\").asInstanceOf[String]\n val d: BigDecimal = simpleMap.get(\"d\").asInstanceOf[java.math.BigDecimal]\n val b: Boolean = simpleMap.get(\"b\").asInstanceOf[Boolean]\n\n\n ss should be (\"string\")\n dd should be (100)\n bb should equal(false)\n\n s should be (\"strang\")\n d should be (500)\n b should equal(true)\n }\n\n it (\"should convert a Collection to ValueMap\") {\n val collection = Collection.build(List(\"g2\", \"art\", \"batik\"), ActionData(\"mighty.mouse@guardian.co.uk\", DateTime.now))\n val json = Json.toJson(collection).as[JsObject]\n val valueMap = DynamoDB.jsonToValueMap(json)\n\n val path = List(valueMap.get(\"path\").asInstanceOf[java.util.ArrayList[String]].toArray: _*).asInstanceOf[List[String]]\n val pathId = valueMap.get(\"pathId\").asInstanceOf[String]\n val actionData = valueMap.get(\"actionData\").asInstanceOf[ValueMap]\n val author = actionData.get(\"author\").asInstanceOf[String]\n\n pathId should be (collection.pathId)\n author should be (collection.actionData.author)\n path should be (collection.path)\n }\n }\n\n}\n\ncase class SimpleDynamoDBObj(s: String, d: BigDecimal, b: Boolean)\nobject SimpleDynamoDBObj {\n implicit def formats: Format[SimpleDynamoDBObj] = Json.format[SimpleDynamoDBObj]\n}\n\ncase class NestedDynamoDBObj(ss: String, dd: BigDecimal, bb: Boolean, simple: SimpleDynamoDBObj)\nobject NestedDynamoDBObj {\n implicit def formats: Format[NestedDynamoDBObj] = Json.format[NestedDynamoDBObj]\n}\n"} +{"text": "#ifndef TABLEFLUX_DRIVER_H\n#define TABLEFLUX_DRIVER_H\n\nextern int tableflux_call( const char *tableflux, char **out_flux,\n\t\tchar **out_err, char **out_log );\n\n#endif\n\n"} +{"text": "# Translation of Odoo Server.\n# This file contains the translation of the following modules:\n# \t* payment_transfer\n# \nmsgid \"\"\nmsgstr \"\"\n\"Project-Id-Version: Odoo Server saas~12.5\\n\"\n\"Report-Msgid-Bugs-To: \\n\"\n\"POT-Creation-Date: 2019-08-26 08:16+0000\\n\"\n\"PO-Revision-Date: 2019-08-26 09:12+0000\\n\"\n\"Language-Team: Bengali (https://www.transifex.com/odoo/teams/41243/bn/)\\n\"\n\"MIME-Version: 1.0\\n\"\n\"Content-Type: text/plain; charset=UTF-8\\n\"\n\"Content-Transfer-Encoding: \\n\"\n\"Language: bn\\n\"\n\"Plural-Forms: nplurals=2; plural=(n != 1);\\n\"\n\n#. module: payment_transfer\n#: code:addons/payment_transfer/models/payment.py:0\n#, python-format\nmsgid \"; multiple order found\"\nmsgstr \"\"\n\n#. module: payment_transfer\n#: code:addons/payment_transfer/models/payment.py:0\n#, python-format\nmsgid \"; no order found\"\nmsgstr \"\"\n\n#. module: payment_transfer\n#: code:addons/payment_transfer/models/payment.py:0\n#, python-format\nmsgid \"\"\n\"<div>\\n\"\n\"<h3>Please use the following transfer details</h3>\\n\"\n\"<h4>%(bank_title)s</h4>\\n\"\n\"%(bank_accounts)s\\n\"\n\"<h4>Communication</h4>\\n\"\n\"<p>Please use the order name as communication reference.</p>\\n\"\n\"</div>\"\nmsgstr \"\"\n\n#. module: payment_transfer\n#: code:addons/payment_transfer/models/payment.py:0\n#, python-format\nmsgid \"Bank Account\"\nmsgstr \"\"\n\n#. module: payment_transfer\n#: code:addons/payment_transfer/models/payment.py:0\n#, python-format\nmsgid \"Bank Accounts\"\nmsgstr \"\"\n\n#. module: payment_transfer\n#: model:ir.model.fields.selection,name:payment_transfer.selection__payment_acquirer__provider__transfer\nmsgid \"Manual Payment\"\nmsgstr \"\"\n\n#. module: payment_transfer\n#: model:ir.model,name:payment_transfer.model_payment_acquirer\nmsgid \"Payment Acquirer\"\nmsgstr \"\"\n\n#. module: payment_transfer\n#: model:ir.model,name:payment_transfer.model_payment_transaction\nmsgid \"Payment Transaction\"\nmsgstr \"\"\n\n#. module: payment_transfer\n#: model:ir.model.fields,field_description:payment_transfer.field_payment_acquirer__provider\nmsgid \"Provider\"\nmsgstr \"\"\n\n#. module: payment_transfer\n#: code:addons/payment_transfer/models/payment.py:0\n#, python-format\nmsgid \"received data for reference %s\"\nmsgstr \"\"\n"} +{"text": "/*\n * Copyright (c) 2010-2011, NVIDIA Corporation\n * All rights reserved.\n *\n * Redistribution and use in source and binary forms, with or without\n * modification, are permitted provided that the following conditions are met:\n * * Redistributions of source code must retain the above copyright\n * notice, this list of conditions and the following disclaimer.\n * * Redistributions in binary form must reproduce the above copyright\n * notice, this list of conditions and the following disclaimer in the\n * documentation and/or other materials provided with the distribution.\n * * Neither the name of NVIDIA Corporation nor the\n * names of its contributors may be used to endorse or promote products\n * derived from this software without specific prior written permission.\n *\n * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND\n * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED\n * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n * DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY\n * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND\n * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#include <nih/bvh/cuda/binned_sah_builder.h>\n#include <nih/sampling/random.h>\n#include <nih/time/timer.h>\n#include <nih/basic/cuda_domains.h>\n\nstruct min_functor\n{\n __device__ float3 operator() (const float3 a, const float3 b) const\n {\n return make_float3(\n nih::min(a.x,b.x),\n nih::min(a.y,b.y),\n nih::min(a.z,b.z) );\n }\n};\n\nnamespace nih {\n\nvoid binned_sah_bvh_test()\n{\n fprintf(stderr, \"sah bvh test... started\\n\");\n\n const uint32 n_objs = 1024*1024;\n const uint32 n_tests = 10;\n\n thrust::host_vector<Bbox4f> h_bboxes( n_objs );\n\n Random random;\n for (uint32 i = 0; i < n_objs; ++i)\n h_bboxes[i] = Bbox4f( Vector4f( random.next(), random.next(), random.next(), 1.0f ) );\n\n thrust::device_vector<Bbox4f> d_bboxes( h_bboxes );\n\n thrust::device_vector<Bvh_node> bvh_nodes;\n thrust::device_vector<uint2> bvh_leaves;\n thrust::device_vector<uint32> bvh_index;\n\n cuda::Binned_sah_builder builder( bvh_nodes, bvh_leaves, bvh_index );\n\n cudaEvent_t start, stop;\n cudaEventCreate( &start );\n cudaEventCreate( &stop );\n\n float time = 0.0f;\n\n for (uint32 i = 0; i <= n_tests; ++i)\n {\n float dtime;\n cudaEventRecord( start, 0 );\n\n builder.build(\n 16u,\n Bbox3f( Vector3f(0.0f), Vector3f(1.0f) ),\n thrust::raw_pointer_cast( &d_bboxes.front() ),\n thrust::raw_pointer_cast( &d_bboxes.front() ) + n_objs,\n thrust::raw_pointer_cast( &h_bboxes.front() ),\n 8u,\n 1.8f );\n\n cudaEventRecord( stop, 0 );\n cudaEventSynchronize( stop );\n cudaEventElapsedTime( &dtime, start, stop );\n\n if (i) // skip the first run\n time += dtime;\n }\n time /= 1000.0f * float(n_tests);\n\n cudaEventDestroy( start );\n cudaEventDestroy( stop );\n\n fprintf(stderr, \"sah bvh test... done\\n\");\n fprintf(stderr, \" time : %f ms\\n\", time * 1000.0f );\n fprintf(stderr, \" objs/sec : %f M\\n\", (n_objs / time) / 1.0e6f );\n fprintf(stderr, \" nodes : %u\\n\", builder.m_node_count );\n fprintf(stderr, \" leaves : %u\\n\", builder.m_leaf_count );\n fprintf(stderr, \" levels : %u\\n\", builder.m_level_count );\n fprintf(stderr, \" init bins : %f ms\\n\", builder.m_init_bins_time / float(n_tests) );\n fprintf(stderr, \" update bins : %f ms\\n\", builder.m_update_bins_time / float(n_tests) );\n fprintf(stderr, \" sah split : %f ms\\n\", builder.m_sah_split_time / float(n_tests) );\n fprintf(stderr, \" distribute objects : %f ms\\n\", builder.m_distribute_objects_time / float(n_tests) );\n}\n\n} // namespace nih\n"} +{"text": "fileFormatVersion: 2\nguid: 9b96622ef66c8e9419e9ce7d783a3bb5\ntimeCreated: 1475746045\nlicenseType: Pro\nDefaultImporter:\n userData: \n assetBundleName: \n assetBundleVariant: \n"} +{"text": "#include <cstdio>\n\nint main(){\n\n int n, m; scanf(\"%d %d\\n\", &n, &m);\n\n int people(0), total(1);\n for(int p = 0; p < n; p++){\n int group(0); scanf(\"%d\", &group);\n if(people + group <= m){people += group;}\n else{++total; people = group;}\n }\n\n printf(\"%d\\n\", total); \n\n return 0;\n}\n"} +{"text": "// Copyright (c) 2015, Google Inc.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nsyntax = \"proto3\";\n\npackage google.api;\n\nimport \"google/api/label.proto\";\n\noption java_multiple_files = true;\noption java_outer_classname = \"MonitoredResourceProto\";\noption java_package = \"com.google.api\";\n\n\n// A descriptor that describes the schema of [MonitoredResource][google.api.MonitoredResource].\nmessage MonitoredResourceDescriptor {\n // The monitored resource type. For example, the type `\"cloudsql_database\"`\n // represents databases in Google Cloud SQL.\n string type = 1;\n\n // A concise name for the monitored resource type that can be displayed in\n // user interfaces. For example, `\"Google Cloud SQL Database\"`.\n string display_name = 2;\n\n // A detailed description of the monitored resource type that can be used in\n // documentation.\n string description = 3;\n\n // A set of labels that can be used to describe instances of this monitored\n // resource type. For example, Google Cloud SQL databases can be labeled with\n // their `\"database_id\"` and their `\"zone\"`.\n repeated LabelDescriptor labels = 4;\n}\n\n// A monitored resource describes a resource that can be used for monitoring\n// purpose. It can also be used for logging, billing, and other purposes. Each\n// resource has a `type` and a set of `labels`. The labels contain information\n// that identifies the resource and describes attributes of it. For example,\n// you can use monitored resource to describe a normal file, where the resource\n// has `type` as `\"file\"`, the label `path` identifies the file, and the label\n// `size` describes the file size. The monitoring system can use a set of\n// monitored resources of files to generate file size distribution.\nmessage MonitoredResource {\n // The monitored resource type. This field must match the corresponding\n // [MonitoredResourceDescriptor.type][google.api.MonitoredResourceDescriptor.type] to this resource.. For example,\n // `\"cloudsql_database\"` represents Cloud SQL databases.\n string type = 1;\n\n // Values for some or all of the labels listed in the associated monitored\n // resource descriptor. For example, you specify a specific Cloud SQL database\n // by supplying values for both the `\"database_id\"` and `\"zone\"` labels.\n map<string, string> labels = 2;\n}\n"} +{"text": "wget -q https://github.com/php/php-src/archive/PHP-7.4.tar.gz\nmkdir -p ./data/php-src\ntar -xzf ./PHP-7.4.tar.gz -C ./data/php-src --strip-components=1\nphp -n test_old/run.php --verbose --no-progress PHP7 ./data/php-src\n"} +{"text": "//\n// CLLocationManager+Rx.swift\n// RxExample\n//\n// Created by Carlos García on 8/7/15.\n// Copyright © 2015 Krunoslav Zaher. All rights reserved.\n//\nimport CoreLocation\n#if !RX_NO_MODULE\n import RxSwift\n import RxCocoa\n#endif\n\nextension Reactive where Base: CLLocationManager {\n \n /**\n Reactive wrapper for `delegate`.\n For more information take a look at `DelegateProxyType` protocol documentation.\n */\n public var delegate: DelegateProxy {\n return RxCLLocationManagerDelegateProxy.proxyForObject(base)\n }\n \n // MARK: Responding to Location Events\n /**\n Reactive wrapper for `delegate` message.\n */\n public var didUpdateLocations: Observable<[CLLocation]> {\n return (delegate as! RxCLLocationManagerDelegateProxy).didUpdateLocationsSubject.asObservable()\n }\n \n /**\n Reactive wrapper for `delegate` message.\n */\n public var didFailWithError: Observable<Error> {\n return (delegate as! RxCLLocationManagerDelegateProxy).didFailWithErrorSubject.asObservable()\n }\n \n #if os(iOS) || os(macOS)\n /**\n Reactive wrapper for `delegate` message.\n */\n public var didFinishDeferredUpdatesWithError: Observable<Error?> {\n return delegate.methodInvoked(#selector(CLLocationManagerDelegate.locationManager(_:didFinishDeferredUpdatesWithError:)))\n .map { a in\n return try castOptionalOrThrow(Error.self, a[1])\n }\n }\n #endif\n \n #if os(iOS)\n \n // MARK: Pausing Location Updates\n /**\n Reactive wrapper for `delegate` message.\n */\n public var didPauseLocationUpdates: Observable<Void> {\n return delegate.methodInvoked(#selector(CLLocationManagerDelegate.locationManagerDidPauseLocationUpdates(_:)))\n .map { _ in\n return ()\n }\n }\n \n /**\n Reactive wrapper for `delegate` message.\n */\n public var didResumeLocationUpdates: Observable<Void> {\n return delegate.methodInvoked( #selector(CLLocationManagerDelegate.locationManagerDidResumeLocationUpdates(_:)))\n .map { _ in\n return ()\n }\n }\n \n // MARK: Responding to Heading Events\n /**\n Reactive wrapper for `delegate` message.\n */\n public var didUpdateHeading: Observable<CLHeading> {\n return delegate.methodInvoked(#selector(CLLocationManagerDelegate.locationManager(_:didUpdateHeading:)))\n .map { a in\n return try castOrThrow(CLHeading.self, a[1])\n }\n }\n \n // MARK: Responding to Region Events\n /**\n Reactive wrapper for `delegate` message.\n */\n public var didEnterRegion: Observable<CLRegion> {\n return delegate.methodInvoked(#selector(CLLocationManagerDelegate.locationManager(_:didEnterRegion:)))\n .map { a in\n return try castOrThrow(CLRegion.self, a[1])\n }\n }\n \n /**\n Reactive wrapper for `delegate` message.\n */\n public var didExitRegion: Observable<CLRegion> {\n return delegate.methodInvoked(#selector(CLLocationManagerDelegate.locationManager(_:didExitRegion:)))\n .map { a in\n return try castOrThrow(CLRegion.self, a[1])\n }\n }\n \n #endif\n \n #if os(iOS) || os(macOS)\n \n /**\n Reactive wrapper for `delegate` message.\n */\n @available(OSX 10.10, *)\n public var didDetermineStateForRegion: Observable<(state: CLRegionState, region: CLRegion)> {\n return delegate.methodInvoked(#selector(CLLocationManagerDelegate.locationManager(_:didDetermineState:for:)))\n .map { a in\n let stateNumber = try castOrThrow(NSNumber.self, a[1])\n let state = CLRegionState(rawValue: stateNumber.intValue) ?? CLRegionState.unknown\n let region = try castOrThrow(CLRegion.self, a[2])\n return (state: state, region: region)\n }\n }\n \n /**\n Reactive wrapper for `delegate` message.\n */\n public var monitoringDidFailForRegionWithError: Observable<(region: CLRegion?, error: Error)> {\n return delegate.methodInvoked(#selector(CLLocationManagerDelegate.locationManager(_:monitoringDidFailFor:withError:)))\n .map { a in\n let region = try castOptionalOrThrow(CLRegion.self, a[1])\n let error = try castOrThrow(Error.self, a[2])\n return (region: region, error: error)\n }\n }\n \n /**\n Reactive wrapper for `delegate` message.\n */\n public var didStartMonitoringForRegion: Observable<CLRegion> {\n return delegate.methodInvoked(#selector(CLLocationManagerDelegate.locationManager(_:didStartMonitoringFor:)))\n .map { a in\n return try castOrThrow(CLRegion.self, a[1])\n }\n }\n \n #endif\n \n #if os(iOS)\n \n // MARK: Responding to Ranging Events\n /**\n Reactive wrapper for `delegate` message.\n */\n public var didRangeBeaconsInRegion: Observable<(beacons: [CLBeacon], region: CLBeaconRegion)> {\n return delegate.methodInvoked(#selector(CLLocationManagerDelegate.locationManager(_:didRangeBeacons:in:)))\n .map { a in\n let beacons = try castOrThrow([CLBeacon].self, a[1])\n let region = try castOrThrow(CLBeaconRegion.self, a[2])\n return (beacons: beacons, region: region)\n }\n }\n \n /**\n Reactive wrapper for `delegate` message.\n */\n public var rangingBeaconsDidFailForRegionWithError: Observable<(region: CLBeaconRegion, error: Error)> {\n return delegate.methodInvoked(#selector(CLLocationManagerDelegate.locationManager(_:rangingBeaconsDidFailFor:withError:)))\n .map { a in\n let region = try castOrThrow(CLBeaconRegion.self, a[1])\n let error = try castOrThrow(Error.self, a[2])\n return (region: region, error: error)\n }\n }\n \n // MARK: Responding to Visit Events\n /**\n Reactive wrapper for `delegate` message.\n */\n @available(iOS 8.0, *)\n public var didVisit: Observable<CLVisit> {\n return delegate.methodInvoked(#selector(CLLocationManagerDelegate.locationManager(_:didVisit:)))\n .map { a in\n return try castOrThrow(CLVisit.self, a[1])\n }\n }\n \n #endif\n \n // MARK: Responding to Authorization Changes\n /**\n Reactive wrapper for `delegate` message.\n */\n public var didChangeAuthorizationStatus: Observable<CLAuthorizationStatus> {\n return delegate.methodInvoked(#selector(CLLocationManagerDelegate.locationManager(_:didChangeAuthorization:)))\n .map { a in\n let number = try castOrThrow(NSNumber.self, a[1])\n return CLAuthorizationStatus(rawValue: Int32(number.intValue)) ?? .notDetermined\n }\n }\n}\n\n\nfileprivate func castOrThrow<T>(_ resultType: T.Type, _ object: Any) throws -> T {\n guard let returnValue = object as? T else {\n throw RxCocoaError.castingError(object: object, targetType: resultType)\n }\n \n return returnValue\n}\n\nfileprivate func castOptionalOrThrow<T>(_ resultType: T.Type, _ object: Any) throws -> T? {\n if NSNull().isEqual(object) {\n return nil\n }\n \n guard let returnValue = object as? T else {\n throw RxCocoaError.castingError(object: object, targetType: resultType)\n }\n \n return returnValue\n}\n"} +{"text": "/*\n * [origin: Linux kernel include/asm-arm/arch-at91/at91sam9263_matrix.h]\n *\n * Copyright (C) 2006 Atmel Corporation.\n *\n * Memory Controllers (MATRIX, EBI) - System peripherals registers.\n * Based on AT91SAM9263 datasheet revision B (Preliminary).\n *\n * SPDX-License-Identifier:\tGPL-2.0+\n */\n\n#ifndef AT91SAM9263_MATRIX_H\n#define AT91SAM9263_MATRIX_H\n\n#ifndef __ASSEMBLY__\n\n/*\n * This struct defines access to the matrix' maximum of\n * 16 masters and 16 slaves.\n * Note: not all masters/slaves are available\n */\nstruct at91_matrix {\n\tu32\tmcfg[16];\t/* Master Configuration Registers */\n\tu32\tscfg[16];\t/* Slave Configuration Registers */\n\tu32\tpras[16][2];\t/* Priority Assignment Slave Registers */\n\tu32\tmrcr;\t\t/* Master Remap Control Register */\n\tu32\tfiller[0x06];\n\tu32\tebicsa;\t\t/* EBI Chip Select Assignment Register */\n};\n\n#endif /* __ASSEMBLY__ */\n\n#define AT91_MATRIX_ULBT_INFINITE\t(0 << 0)\n#define AT91_MATRIX_ULBT_SINGLE\t\t(1 << 0)\n#define AT91_MATRIX_ULBT_FOUR\t\t(2 << 0)\n#define AT91_MATRIX_ULBT_EIGHT\t\t(3 << 0)\n#define AT91_MATRIX_ULBT_SIXTEEN\t(4 << 0)\n\n#define AT91_MATRIX_DEFMSTR_TYPE_NONE\t(0 << 16)\n#define AT91_MATRIX_DEFMSTR_TYPE_LAST\t(1 << 16)\n#define AT91_MATRIX_DEFMSTR_TYPE_FIXED\t(2 << 16)\n#define AT91_MATRIX_FIXED_DEFMSTR_SHIFT\t18\n#define AT91_MATRIX_ARBT_ROUND_ROBIN\t(0 << 24)\n#define AT91_MATRIX_ARBT_FIXED_PRIORITY\t(1 << 24)\n\n#define AT91_MATRIX_M0PR_SHIFT\t\t0\n#define AT91_MATRIX_M1PR_SHIFT\t\t4\n#define AT91_MATRIX_M2PR_SHIFT\t\t8\n#define AT91_MATRIX_M3PR_SHIFT\t\t12\n#define AT91_MATRIX_M4PR_SHIFT\t\t16\n#define AT91_MATRIX_M5PR_SHIFT\t\t20\n\n#define AT91_MATRIX_RCB0\t\t(1 << 0)\n#define AT91_MATRIX_RCB1\t\t(1 << 1)\n\n#define AT91_MATRIX_CS1A_SDRAMC\t\t(1 << 1)\n#define AT91_MATRIX_CS3A_SMC_SMARTMEDIA\t(1 << 3)\n#define AT91_MATRIX_CS4A_SMC_CF1\t(1 << 4)\n#define AT91_MATRIX_CS5A_SMC_CF2\t(1 << 5)\n#define AT91_MATRIX_DBPUC\t\t(1 << 8)\n#define AT91_MATRIX_VDDIOMSEL_1_8V\t(0 << 16)\n#define AT91_MATRIX_VDDIOMSEL_3_3V\t(1 << 16)\n\n#endif\n"} +{"text": "# 2005/08/19 (SL)\ngap> Inverse(0*Z(2));\nfail\ngap> Inverse(0*Z(3));\nfail\n"} +{"text": "module.exports = {\n\tdescription: 'method calls are assumed to mutate the owner'\n};\n"} +{"text": "fileFormatVersion: 2\nguid: 021f11100a5e08840a5975bc2bca5834\nNativeFormatImporter:\n externalObjects: {}\n mainObjectFileID: 11400000\n userData: \n assetBundleName: \n assetBundleVariant: \n"} +{"text": "/*\n * Copyright (C) 2013 salesforce.com, inc.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n({\n afterRender : function(component, helper) { \n \tthis.superAfterRender();\n \t\n \t// need to update attribute in afterRender lifecycle so that it can reference other components from it's valueProvider\n \thelper.updateAttribute(component); \t\n }\n})// eslint-disable-line semi\n"} +{"text": "<HTML>\r\n<!--\r\n Copyright (c) 2004, 2010 Trustees of Indiana University\r\n \r\n Distributed under the Boost Software License, Version 1.0.\r\n (See accompanying file LICENSE_1_0.txt or copy at\r\n http://www.boost.org/LICENSE_1_0.txt)\r\n -->\r\n<Head>\r\n<Title>Boost Graph Library: Topologies for Graph Drawing</Title>\r\n<script language=\"JavaScript\" type=\"text/JavaScript\">\r\n<!--\r\nfunction address(host, user) {\r\n var atchar = '@';\r\n var thingy = user+atchar+host;\r\n thingy = '<a hre' + 'f=' + \"mai\" + \"lto:\" + thingy + '>' + user+atchar+host + '</a>';\r\n document.write(thingy);\r\n}\r\n//-->\r\n</script>\r\n</head>\r\n\r\n\r\n<BODY BGCOLOR=\"#ffffff\" LINK=\"#0000ee\" TEXT=\"#000000\" VLINK=\"#551a8b\" \r\n ALINK=\"#ff0000\"> \r\n<IMG SRC=\"../../../boost.png\" \r\n ALT=\"C++ Boost\" width=\"277\" height=\"86\"> \r\n\r\n<BR Clear>\r\n\r\n<H1>\r\nTopologies for Graph Drawing\r\n</H1>\r\n\r\n<P>\r\n\r\n<h3>Synopsis</h3>\r\n\r\n<pre>\r\ntemplate&lt;std::size_t Dims&gt; class <a href=\"#convex_topology\">convex_topology</a>;\r\ntemplate&lt;std::size_t Dims, typename RandomNumberGenerator = minstd_rand&gt; class <a href=\"#hypercube_topology\">hypercube_topology</a>;\r\ntemplate&lt;typename RandomNumberGenerator = minstd_rand&gt; class <a href=\"#square_topology\">square_topology</a>;\r\ntemplate&lt;typename RandomNumberGenerator = minstd_rand&gt; class <a href=\"#cube_topology\">cube_topology</a>;\r\ntemplate&lt;std::size_t Dims, typename RandomNumberGenerator = minstd_rand&gt; class <a href=\"#ball_topology\">ball_topology</a>;\r\ntemplate&lt;typename RandomNumberGenerator = minstd_rand&gt; class <a href=\"#circle_topology\">circle_topology</a>;\r\ntemplate&lt;typename RandomNumberGenerator = minstd_rand&gt; class <a href=\"#sphere_topology\">sphere_topology</a>;\r\ntemplate&lt;typename RandomNumberGenerator = minstd_rand&gt; class <a href=\"#heart_topology\">heart_topology</a>;\r\n</pre>\r\n\r\n<h3>Summary</h3>\r\n\r\n<p> <a href=\"#topologies\">Various topologies</a> are provided that\r\nproduce different, interesting results for graph layout algorithms. The <a\r\nhref=\"#square_topology\">square topology</a> can be used for normal\r\ndisplay of graphs or distributing vertices for parallel computation on\r\na process array, for instance. Other topologies, such as the <a\r\nhref=\"#sphere_topology\">sphere topology</a> (or N-dimensional <a\r\nhref=\"#ball_topology\">ball topology</a>) make sense for different\r\nproblems, whereas the <a href=\"#heart_topology\">heart topology</a> is\r\njust plain fun. One can also <a href=\"#topology-concept\">define a\r\ntopology</a> to suit other particular needs. <br>\r\n\r\n<a name=\"topologies\"><h3>Topologies</h3></a>\r\nA topology is a description of a space on which layout can be\r\nperformed. Some common two, three, and multidimensional topologies\r\nare provided, or you may create your own so long as it meets the\r\nrequirements of the <a href=\"#topology-concept\">Topology concept</a>.\r\n\r\n<a name=\"topology-concept\"><h4>Topology Concept</h4></a> Let\r\n<tt>Topology</tt> be a model of the Topology concept and let\r\n<tt>space</tt> be an object of type <tt>Topology</tt>. <tt>p1</tt> and\r\n<tt>p2</tt> are objects of associated type <tt>point_type</tt> (see\r\nbelow). The following expressions must be valid:\r\n\r\n<table border=\"1\">\r\n <tr>\r\n <th>Expression</th>\r\n <th>Type</th>\r\n <th>Description</th>\r\n </tr>\r\n <tr>\r\n <td><tt>Topology::point_type</tt></td>\r\n <td>type</td>\r\n <td>The type of points in the space.</td>\r\n </tr>\r\n <tr>\r\n <td><tt>space.random_point()</tt></td>\r\n <td>point_type</td>\r\n <td>Returns a random point (usually uniformly distributed) within\r\n the space.</td>\r\n </tr>\r\n <tr>\r\n <td><tt>space.distance(p1, p2)</tt></td>\r\n <td>double</td>\r\n <td>Get a quantity representing the distance between <tt>p1</tt>\r\n and <tt>p2</tt> using a path going completely inside the space.\r\n This only needs to have the same &lt; relation as actual\r\n distances, and does not need to satisfy the other properties of a\r\n norm in a Banach space.</td>\r\n </tr>\r\n <tr>\r\n <td><tt>space.move_position_toward(p1, fraction, p2)</tt></td>\r\n <td>point_type</td>\r\n <td>Returns a point that is a fraction of the way from <tt>p1</tt>\r\n to <tt>p2</tt>, moving along a \"line\" in the space according to\r\n the distance measure. <tt>fraction</tt> is a <tt>double</tt>\r\n between 0 and 1, inclusive.</td>\r\n </tr>\r\n</table>\r\n\r\n<a name=\"convex_topology\"><h3>Class template <tt>convex_topology</tt></h3></a>\r\n\r\n<p>Class template <tt>convex_topology</tt> implements the basic\r\ndistance and point movement functions for any convex topology in\r\n<tt>Dims</tt> dimensions. It is not itself a topology, but is intended\r\nas a base class that any convex topology can derive from. The derived\r\ntopology need only provide a suitable <tt>random_point</tt> function\r\nthat returns a random point within the space.\r\n\r\n<pre>\r\ntemplate&lt;std::size_t Dims&gt;\r\nclass convex_topology \r\n{\r\n struct point \r\n {\r\n point() { }\r\n double&amp; operator[](std::size_t i) {return values[i];}\r\n const double&amp; operator[](std::size_t i) const {return values[i];}\r\n\r\n private:\r\n double values[Dims];\r\n };\r\n\r\n public:\r\n typedef point point_type;\r\n\r\n double distance(point a, point b) const;\r\n point move_position_toward(point a, double fraction, point b) const;\r\n};\r\n</pre>\r\n\r\n<a name=\"hypercube_topology\"><h3>Class template <tt>hypercube_topology</tt></h3></a>\r\n\r\n<p>Class template <tt>hypercube_topology</tt> implements a\r\n<tt>Dims</tt>-dimensional hypercube. It is a convex topology whose\r\npoints are drawn from a random number generator of type\r\n<tt>RandomNumberGenerator</tt>. The <tt>hypercube_topology</tt> can\r\nbe constructed with a given random number generator; if omitted, a\r\nnew, default-constructed random number generator will be used. The\r\nresulting layout will be contained within the hypercube, whose sides\r\nmeasure 2*<tt>scaling</tt> long (points will fall in the range\r\n[-<tt>scaling</tt>, <tt>scaling</tt>] in each dimension). \r\n\r\n<pre>\r\ntemplate&lt;std::size_t Dims, typename RandomNumberGenerator = minstd_rand&gt;\r\nclass hypercube_topology : public <a href=\"#convex_topology\">convex_topology</a>&lt;Dims&gt;\r\n{\r\npublic:\r\n explicit hypercube_topology(double scaling = 1.0);\r\n hypercube_topology(RandomNumberGenerator&amp; gen, double scaling = 1.0);\r\n point_type random_point() const;\r\n};\r\n</pre>\r\n\r\n<a name=\"square_topology\"><h3>Class template <tt>square_topology</tt></h3></a>\r\n\r\n<p>Class template <tt>square_topology</tt> is a two-dimensional\r\nhypercube topology.\r\n\r\n<pre>\r\ntemplate&lt;typename RandomNumberGenerator = minstd_rand&gt;\r\nclass square_topology : public <a href=\"#hypercube_topology\">hypercube_topology</a>&lt;2, RandomNumberGenerator&gt;\r\n{\r\n public:\r\n explicit square_topology(double scaling = 1.0);\r\n square_topology(RandomNumberGenerator&amp; gen, double scaling = 1.0);\r\n};\r\n</pre>\r\n\r\n<a name=\"cube_topology\"><h3>Class template <tt>cube_topology</tt></h3></a>\r\n\r\n<p>Class template <tt>cube_topology</tt> is a three-dimensional\r\nhypercube topology.\r\n\r\n<pre>\r\ntemplate&lt;typename RandomNumberGenerator = minstd_rand&gt;\r\nclass cube_topology : public <a href=\"#hypercube_topology\">hypercube_topology</a>&lt;3, RandomNumberGenerator&gt;\r\n{\r\n public:\r\n explicit cube_topology(double scaling = 1.0);\r\n cube_topology(RandomNumberGenerator&amp; gen, double scaling = 1.0);\r\n};\r\n</pre>\r\n\r\n<a name=\"ball_topology\"><h3>Class template <tt>ball_topology</tt></h3></a>\r\n\r\n<p>Class template <tt>ball_topology</tt> implements a\r\n<tt>Dims</tt>-dimensional ball. It is a convex topology whose points\r\nare drawn from a random number generator of type\r\n<tt>RandomNumberGenerator</tt> but reside inside the ball. The\r\n<tt>ball_topology</tt> can be constructed with a given random number\r\ngenerator; if omitted, a new, default-constructed random number\r\ngenerator will be used. The resulting layout will be contained within\r\nthe ball with the given <tt>radius</tt>.\r\n\r\n<pre>\r\ntemplate&lt;std::size_t Dims, typename RandomNumberGenerator = minstd_rand&gt;\r\nclass ball_topology : public <a href=\"#convex_topology\">convex_topology</a>&lt;Dims&gt;\r\n{\r\npublic:\r\n explicit ball_topology(double radius = 1.0);\r\n ball_topology(RandomNumberGenerator&amp; gen, double radius = 1.0); \r\n point_type random_point() const;\r\n};\r\n</pre>\r\n\r\n<a name=\"circle_topology\"><h3>Class template <tt>circle_topology</tt></h3></a>\r\n\r\n<p>Class template <tt>circle_topology</tt> is a two-dimensional\r\nball topology.\r\n\r\n<pre>\r\ntemplate&lt;typename RandomNumberGenerator = minstd_rand&gt;\r\nclass circle_topology : public <a href=\"#ball_topology\">ball_topology</a>&lt;2, RandomNumberGenerator&gt;\r\n{\r\n public:\r\n explicit circle_topology(double radius = 1.0);\r\n circle_topology(RandomNumberGenerator&amp; gen, double radius = 1.0);\r\n};\r\n</pre>\r\n\r\n<a name=\"sphere_topology\"><h3>Class template <tt>sphere_topology</tt></h3></a>\r\n\r\n<p>Class template <tt>sphere_topology</tt> is a three-dimensional\r\nball topology.\r\n\r\n<pre>\r\ntemplate&lt;typename RandomNumberGenerator = minstd_rand&gt;\r\nclass sphere_topology : public <a href=\"#ball_topology\">ball_topology</a>&lt;3, RandomNumberGenerator&gt;\r\n{\r\n public:\r\n explicit sphere_topology(double radius = 1.0);\r\n sphere_topology(RandomNumberGenerator&amp; gen, double radius = 1.0);\r\n};\r\n</pre>\r\n\r\n<a name=\"heart_topology\"><h3>Class template <tt>heart_topology</tt></h3></a>\r\n\r\n<p>Class template <tt>heart_topology</tt> is topology in the shape of\r\na heart. It serves as an example of a non-convex, nontrivial topology\r\nfor layout. \r\n\r\n<pre>\r\ntemplate&lt;typename RandomNumberGenerator = minstd_rand&gt;\r\nclass heart_topology \r\n{\r\n public:\r\n typedef <em>unspecified</em> point_type;\r\n\r\n heart_topology();\r\n heart_topology(RandomNumberGenerator&amp; gen);\r\n point_type random_point() const;\r\n double distance(point_type a, point_type b) const;\r\n point_type move_position_toward(point_type a, double fraction, point_type b) const;\r\n};\r\n</pre>\r\n\r\n<br>\r\n<HR>\r\n<TABLE>\r\n<TR valign=top>\r\n<TD nowrap>Copyright &copy; 2004, 2010 Trustees of Indiana University</TD><TD>\r\nJeremiah Willcock, Indiana University (<script language=\"Javascript\">address(\"osl.iu.edu\", \"jewillco\")</script>)<br>\r\n<A HREF=\"http://www.boost.org/people/doug_gregor.html\">Doug Gregor</A>, Indiana University (<script language=\"Javascript\">address(\"cs.indiana.edu\", \"dgregor\")</script>)<br>\r\n <A HREF=\"http://www.osl.iu.edu/~lums\">Andrew Lumsdaine</A>,\r\nIndiana University (<script language=\"Javascript\">address(\"osl.iu.edu\", \"lums\")</script>)\r\n</TD></TR></TABLE>\r\n\r\n</BODY>\r\n</HTML> \r\n"} +{"text": "/**\n * Copyright (c) 2020 Contributors to the Eclipse Foundation\n *\n * See the NOTICE file(s) distributed with this work for additional\n * information regarding copyright ownership.\n *\n * This program and the accompanying materials are made available under the\n * terms of the Eclipse Public License 2.0 which is available at\n * http://www.eclipse.org/legal/epl-2.0\n *\n * SPDX-License-Identifier: EPL-2.0\n */\n\npackage org.eclipse.hono.adapter.lora.providers;\n\nimport java.util.Objects;\n\nimport org.eclipse.hono.adapter.lora.LoraMessage;\nimport org.eclipse.hono.adapter.lora.LoraMessageType;\nimport org.eclipse.hono.adapter.lora.LoraMetaData;\nimport org.eclipse.hono.adapter.lora.UplinkLoraMessage;\n\nimport io.vertx.core.buffer.Buffer;\nimport io.vertx.core.http.HttpServerRequest;\nimport io.vertx.core.json.JsonObject;\nimport io.vertx.ext.web.RoutingContext;\n\n/**\n * A base class for implementing {@link LoraProvider}s\n * that are using JSON messages in their external API.\n *\n */\nabstract class JsonBasedLoraProvider implements LoraProvider {\n\n @Override\n public LoraMessage getMessage(final RoutingContext ctx) {\n Objects.requireNonNull(ctx);\n try {\n final Buffer requestBody = ctx.getBody();\n final JsonObject message = requestBody.toJsonObject();\n final LoraMessageType type = getMessageType(message);\n switch (type) {\n case UPLINK:\n return createUplinkMessage(ctx.request(), message);\n default:\n throw new LoraProviderMalformedPayloadException(String.format(\"unsupported message type [%s]\", type));\n }\n } catch (final RuntimeException e) {\n // catch generic exception in order to also cover any (runtime) exceptions\n // thrown by overridden methods\n throw new LoraProviderMalformedPayloadException(\"failed to decode request body\", e);\n }\n }\n\n /**\n * Gets the type of a Lora message.\n *\n * @param loraMessage The message.\n * @return The type.\n */\n protected abstract LoraMessageType getMessageType(JsonObject loraMessage);\n\n /**\n * Gets the device EUI from an uplink message.\n *\n * @param uplinkMessage The message.\n * @return The device EUI.\n * @throws RuntimeException if the EUI cannot be extracted.\n */\n protected abstract String getDevEui(JsonObject uplinkMessage);\n\n /**\n * Gets the payload from an uplink message.\n *\n * @param uplinkMessage The message.\n * @return The raw bytes sent by the device.\n * @throws RuntimeException if the EUI cannot be extracted.\n */\n protected abstract Buffer getPayload(JsonObject uplinkMessage);\n\n /**\n * Gets meta data contained in an uplink message.\n * <p>\n * This default implementation returns {@code null}.\n *\n * @param uplinkMessage The uplink message.\n * @return The meta data or {@code null} if no meta data is available.\n * @throws RuntimeException if the meta data cannot be parsed.\n */\n protected LoraMetaData getMetaData(final JsonObject uplinkMessage) {\n return null;\n };\n\n /**\n * Gets any data contained in an uplink message in addition to the device EUI,\n * payload and meta data.\n * <p>\n * This default implementation returns the message itself.\n *\n * @param uplinkMessage The uplink message.\n * @return The additional data or {@code null} if no additional data is available.\n * @throws RuntimeException if the additional data cannot be parsed.\n */\n protected JsonObject getAdditionalData(final JsonObject uplinkMessage) {\n return uplinkMessage;\n };\n\n /**\n * Creates an object representation of a Lora uplink message.\n * <p>\n * This method uses the {@link #getDevEui(JsonObject)}, {@link #getPayload(JsonObject)},\n * {@link #getMetaData(JsonObject)} and {@link #getAdditionalData(JsonObject)}\n * methods to extract relevant information from the request body to add\n * to the returned message.\n *\n * @param request The request sent by the provider's Network Server.\n * @param requestBody The JSON object contained in the request's body.\n * @return The message.\n * @throws RuntimeException if the message cannot be parsed.\n */\n protected UplinkLoraMessage createUplinkMessage(final HttpServerRequest request, final JsonObject requestBody) {\n\n Objects.requireNonNull(requestBody);\n\n final String devEui = getDevEui(requestBody);\n final UplinkLoraMessage message = new UplinkLoraMessage(devEui);\n message.setPayload(getPayload(requestBody));\n message.setMetaData(getMetaData(requestBody));\n message.setAdditionalData(getAdditionalData(requestBody));\n return message;\n }\n}\n"} +{"text": "#X-Generator: crowdin.net\n# localization strings for the authz-tool\n\ngen.alert=\\u091a\\u0947\\u0924\\u093e\\u0935\\u0928\\u0940\\:\ngen.can=\\u0930\\u0926\\u094d\\u0926 \\u0915\\u0930\\u0947\\u0902\ngen.sav=\\u0938\\u0941\\u0930\\u0915\\u094d\\u0937\\u093f\\u0924 \\u0915\\u0930\\u0947\\u0902\ngen.don=\\u0916\\u0924\\u094d\\u092e\ngen.show5=5 \\u0906\\u0907\\u091f\\u092e \\u0926\\u093f\\u0916\\u093e\\u090f\\u0901...\ngen.show10=10 \\u0906\\u0907\\u091f\\u092e \\u0926\\u093f\\u0916\\u093e\\u090f\\u0901...\ngen.show20=20 \\u0906\\u0907\\u091f\\u092e \\u0926\\u093f\\u0916\\u093e\\u090f\\u0901...\ngen.show50=50 \\u0906\\u0907\\u091f\\u092e \\u0926\\u093f\\u0916\\u093e\\u090f\\u0901...\ngen.show100=100 \\u0906\\u0907\\u091f\\u092e \\u0926\\u093f\\u0916\\u093e\\u090f\\u0901...\ngen.show200=200 \\u0906\\u0907\\u091f\\u092e \\u0926\\u093f\\u0916\\u093e\\u090f\\u0901...\ngen.listnavselect=\\u0915\\u0949\\u092e\\u094d\\u092c\\u094b \\u092c\\u0949\\u0915\\u094d\\u0938 \\u0907\\u0938\\u094d\\u0924\\u0947\\u092e\\u093e\\u0932 \\u0915\\u0930\\u0928\\u0947 \\u0915\\u0947 \\u0932\\u093f\\u090f,\\u0911\\u0932\\u094d\\u091f + \\u0921\\u093e\\u0909\\u0928 \\u0910\\u0930\\u094b \\u0926\\u092c\\u093e\\u090f\\u0901 \\u0924\\u093e\\u0915\\u093f \\u0935\\u0939 \\u0916\\u0941\\u0932 \\u0938\\u0915\\u0947 \\u0914\\u0930 \\u092b\\u093f\\u0930 \\u0905\\u092a \\u092f\\u093e \\u0921\\u093e\\u0909\\u0928 \\u0910\\u0930\\u094b \\u092c\\u091f\\u0928 \\u0926\\u092c\\u093e\\u090f\\u0901, \\u0935\\u093f\\u092d\\u093f\\u0928\\u094d\\u0928 \\u0935\\u093f\\u0915\\u0932\\u094d\\u092a \\u0926\\u0947\\u0916\\u0928\\u0947 \\u0915\\u0947 \\u0932\\u093f\\u090f\\u0964\ngen.first=\\u092a\\u0939\\u0932\\u093e\ngen.previous=\\u092a\\u093f\\u091b\\u0932\\u093e\ngen.next=\\u0905\\u0917\\u0932\\u093e\ngen.last=\\u0905\\u0902\\u0924\\u093f\\u092e\ngen.enable=\\u0938\\u0915\\u094d\\u0937\\u092e \\u0915\\u0930\\u0947\\u0902\ngen.back=\\u0935\\u093e\\u092a\\u0938 \\u091c\\u093e\\u090f\\u0902\n\ngen.yes=\\u0939\\u093e\\u0901\ngen.no=\\u0928\\u0939\\u0940\\u0902\n\nper.alrgra=\\u092a\\u0939\\u0932\\u0947 \\u0938\\u0947 \\u0939\\u0940 \\u0926\\u0940 \\u0917\\u0908\nper.lis.head=\\u0905\\u0928\\u0941\\u092e\\u0924\\u093f\nper.lis.head.title=\\u0938\\u092d\\u0940 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e\\u0913\\u0902 \\u0915\\u0947 \\u0932\\u093f\\u090f \\u0938\\u092d\\u0940 \\u0905\\u0928\\u0941\\u092e\\u0924\\u093f\\u092f\\u093e\\u0901 \\u091f\\u0949\\u0917\\u0932 \\u0915\\u0930\\u0947\\u0902\nper.lis.role.title=\\u0907\\u0938 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0915\\u0947 \\u0932\\u093f\\u090f \\u0938\\u092d\\u0940 \\u0905\\u0928\\u0941\\u092e\\u0924\\u093f\\u092f\\u093e\\u0901 \\u091f\\u0949\\u0917\\u0932 \\u0915\\u0930\\u0947\\u0902\nper.lis.perm.title=\\u0907\\u0938 \\u0905\\u0928\\u0941\\u092e\\u0924\\u093f \\u0915\\u0947 \\u0932\\u093f\\u090f \\u0938\\u092d\\u0940 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e\\u0913\\u0902 \\u0915\\u094b \\u091f\\u0949\\u0917\\u0932 \\u0915\\u0930\\u0947\\u0902\nper.lis.title=\\u0905\\u0928\\u0941\\u092e\\u0924\\u093f\\u092f\\u093e\\u0902\nper.lis=\\u0909\\u0928 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e\\u0913\\u0902 \\u0914\\u0930 \\u0905\\u0928\\u0941\\u092e\\u0924\\u093f\\u092f\\u094b\\u0902 \\u0915\\u0940 \\u0938\\u0942\\u091a\\u0940 \\u091c\\u093f\\u0928\\u094d\\u0939\\u0947\\u0902 \\u0907\\u0938 \\u092b\\u093c\\u094b\\u0932\\u094d\\u0921\\u0930 \\u092a\\u0930 \\u0932\\u093e\\u0917\\u0942 \\u0915\\u093f\\u092f\\u093e \\u091c\\u093e \\u0938\\u0915\\u0924\\u093e \\u0939\\u0948\\u0964 \\u0932\\u0947\\u0906\\u0909\\u091f\\: \\u092a\\u094d\\u0930\\u0924\\u094d\\u092f\\u0947\\u0915 \\u092a\\u0902\\u0915\\u094d\\u0924\\u093f \\u090f\\u0915 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0915\\u0940 \\u0905\\u0928\\u0941\\u092e\\u0924\\u093f\\u092f\\u094b\\u0902 \\u0915\\u094b \\u0938\\u0942\\u091a\\u0940\\u092c\\u0926\\u094d\\u0927 \\u0915\\u0930\\u0924\\u0940 \\u0939\\u0948\\u0964 \\u0932\\u0947\\u0906\\u0909\\u091f\\: \\u0915\\u0949\\u0932\\u092e 1 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e\\u0913\\u0902 \\u0915\\u094b \\u0938\\u0942\\u091a\\u0940\\u092c\\u0926\\u094d\\u0927 \\u0915\\u0930\\u0924\\u093e \\u0939\\u0948, \\u0905\\u0928\\u094d\\u092f \\u0915\\u0949\\u0932\\u092e \\u0905\\u0928\\u0941\\u092e\\u0924\\u093f\\u092f\\u094b\\u0902 \\u0915\\u094b \\u0938\\u0942\\u091a\\u0940\\u092c\\u0926\\u094d\\u0927 \\u0915\\u0930\\u0924\\u0947 \\u0939\\u0948 , \\u091a\\u0947\\u0915 \\u092c\\u0949\\u0915\\u094d\\u0938 \\u090f\\u0915 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0915\\u0947 \\u0932\\u093f\\u090f \\u0905\\u0928\\u0941\\u092e\\u0924\\u093f \\u0915\\u094b \\u0938\\u0915\\u094d\\u0937\\u092e \\u0915\\u0930\\u0928\\u0947 \\u0915\\u0940 \\u0905\\u0928\\u0941\\u092e\\u0924\\u093f \\u0926\\u0947\\u0924\\u0947 \\u0939\\u0948\\u0964 \nper.rol=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e\nper.alert=\\u091a\\u0947\\u0924\\u093e\\u0935\\u0928\\u0940\\: \\u0915\\u094b\\u0908 \\u092d\\u0940 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u092a\\u0930\\u093f\\u092d\\u093e\\u0937\\u093f\\u0924 \\u0928\\u0939\\u0940 \\u0939\\u0948\\u0902\\u0964 \nper.lis.clearall=\\u0938\\u092c \\u0939\\u091f\\u093e \\u0926\\u0947\\u0902\nper.lis.restoredef=\\u092a\\u0930\\u093f\\u0935\\u0930\\u094d\\u0924\\u0928 \\u092a\\u0942\\u0930\\u094d\\u0935\\u0935\\u0924 \\u0915\\u0930\\u0947\\u0902\nper.lis.selectgrp=\\u0905\\u0928\\u0941\\u092e\\u0924\\u093f\\u092f\\u093e\\u0902 \\u0938\\u0947\\u091f \\u0915\\u0930\\u0947\\u0902\nper.lis.site=\\u0938\\u093e\\u0907\\u091f\n\nalert.prbset=\\u0907\\u0938 \\u0938\\u092e\\u092f \\u0905\\u0928\\u0941\\u092e\\u0924\\u093f\\u092f\\u093e\\u0902 \\u0938\\u0947\\u091f \\u0928\\u0939\\u0940\\u0902 \\u0915\\u0940 \\u091c\\u093e \\u0938\\u0915\\u0924\\u0940 \\u0915\\u094d\\u092f\\u094b\\u0902\\u0915\\u093f \\u0938\\u093e\\u0907\\u091f \\u092a\\u0939\\u0932\\u0947 \\u0938\\u0947 \\u0939\\u0940 \\u0938\\u0902\\u092a\\u093e\\u0926\\u093f\\u0924 \\u0915\\u0940 \\u091c\\u093e \\u0930\\u0939\\u0940 \\u0939\\u0948\\u0964 \\u0906\\u0917\\u0947 \\u092c\\u0922\\u093c\\u0928\\u0947 \\u0938\\u0947 \\u092a\\u0939\\u0932\\u0947 \\u0905\\u0928\\u094d\\u092f \\u0909\\u092a\\u0915\\u0930\\u0923\\u094b\\u0902 \\u092e\\u0947\\u0902 \\u0926\\u0940 \\u0917\\u0908 \\u0905\\u0928\\u0941\\u092e\\u0924\\u093f\\u092f\\u093e\\u0901 \\u092c\\u0902\\u0926 \\u0915\\u0930\\u0947\\u0902\\u0964\n\nrealm.add=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u091c\\u094b\\u0921\\u093c\\u0947\\u0902\nrealm.confirm.alert=\\u091a\\u0947\\u0924\\u093e\\u0935\\u0928\\u0940\\:\nrealm.confirm.cancel=\\u0930\\u0926\\u094d\\u0926 \\u0915\\u0930\\u0947\\u0902\nrealm.confirm.please=\\u0907\\u0938 \\u0926\\u093e\\u092f\\u0930\\u0947 \\u0915\\u094b \\u0939\\u091f\\u093e\\u0928\\u0947 \\u0915\\u0940 \\u092a\\u0941\\u0937\\u094d\\u091f\\u093f \\u0915\\u0930\\u0947\\u0902\\:\nrealm.confirm.remove=\\u0928\\u093f\\u0915\\u093e\\u0932\\u0947\\u0902\nrealm.confirm.usedfor=\\u092a\\u094d\\u0930\\u092f\\u094b\\u0917 \\u0939\\u0941\\u0906\nrealm.confirm.removing=\\u0926\\u093e\\u092f\\u0930\\u093e \\u0939\\u091f\\u093e\\u092f\\u093e \\u091c\\u093e \\u0930\\u0939\\u093e \\u0939\\u0948...\nrealm.copyrol=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0915\\u0940 \\u092a\\u094d\\u0930\\u0924\\u093f\\u0932\\u093f\\u092a\\u093f \\u092c\\u0928\\u093e\\u090f\\u0901...\nrealm.defined=\\u0907\\u0938 \\u0906\\u0908\\u0921\\u0940 ({0}) \\u0915\\u0947 \\u0938\\u093e\\u0925 \\u090f\\u0915 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u092a\\u0939\\u0932\\u0947 \\u0938\\u0947 \\u0939\\u0940 \\u092a\\u0930\\u093f\\u092d\\u093e\\u0937\\u093f\\u0924 \\u0915\\u0940 \\u0917\\u0908 \\u0939\\u0948\\u0964\nrealm.edit.active=\\u0938\\u0915\\u094d\\u0930\\u093f\\u092f\nrealm.edit.inactive=\\u0928\\u093f\\u0937\\u094d\\u0915\\u094d\\u0930\\u093f\\u092f\nrealm.edit.summary=\\u0907\\u0938 \\u0926\\u093e\\u092f\\u0930\\u0947 \\u0915\\u0940 \\u091c\\u093e\\u0928\\u0915\\u093e\\u0930\\u0940 \\u0915\\u0940 \\u0938\\u092e\\u0940\\u0915\\u094d\\u0937\\u093e \\u0914\\u0930 \\u0938\\u0902\\u0936\\u094b\\u0927\\u0928 \\u0915\\u0930\\u0947\\u0902\\u0964\nrealm.edit.alert=\\u091a\\u0947\\u0924\\u093e\\u0935\\u0928\\u0940\\:\nrealm.edit.cancel=\\u0930\\u0926\\u094d\\u0926 \\u0915\\u0930\\u0947\\u0902\nrealm.edit.complete=\\u0926\\u093e\\u092f\\u0930\\u093e \\u0938\\u0902\\u092a\\u093e\\u0926\\u0928 \\u092a\\u0942\\u0930\\u093e \\u0915\\u0930\\u0947\\u0902\nrealm.edit.description=\\u0935\\u093f\\u0935\\u0930\\u0923\nrealm.edit.edit=\\u0938\\u0902\\u092a\\u093e\\u0926\\u093f\\u0924 \\u0915\\u0930\\u0947\\u0902\\: \\u0926\\u093e\\u092f\\u0930\\u093e\nrealm.edit.from=\\u092a\\u094d\\u0930\\u0926\\u093e\\u0924\\u093e \\u0938\\u0947\nrealm.edit.id=\\u0926\\u093e\\u092f\\u0930\\u093e \\u0906\\u0907\\u0921\\u0940\\:\nrealm.edit.maintain=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0915\\u094b \\u092c\\u0928\\u093e\\u090f \\u0930\\u0916\\u0947\\u0902\\:\nrealm.edit.noroles=\\u0915\\u093f\\u0938\\u0940 \\u092d\\u0940 \\u0909\\u092a\\u092f\\u094b\\u0917\\u0915\\u0930\\u094d\\u0924\\u093e\\u0913\\u0902 \\u0915\\u094b \\u0915\\u094b\\u0908 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u092a\\u094d\\u0930\\u0926\\u093e\\u0928 \\u0928\\u0939\\u0940\\u0902 \\u0915\\u0940 \\u0917\\u0908 \\u0939\\u0948\\u0964 \nrealm.edit.noroles1=\\u0915\\u094b\\u0908 \\u092d\\u0940 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u092a\\u0930\\u093f\\u092d\\u093e\\u0937\\u093f\\u0924 \\u0928\\u0939\\u0940 \\u0939\\u0948\\u0964\nrealm.edit.provided=\\u0909\\u092a\\u0932\\u092c\\u094d\\u0927\nrealm.edit.provider=\\u092a\\u094d\\u0930\\u0926\\u093e\\u0924\\u093e \\u0906\\u0908\\u0921\\u0940\\:\nrealm.edit.realm=\\u0926\\u093e\\u092f\\u0930\\u093e\nrealm.edit.review=\\u0907\\u0938 \\u0926\\u093e\\u092f\\u0930\\u0947 \\u0915\\u0940 \\u091c\\u093e\\u0928\\u0915\\u093e\\u0930\\u0940 \\u0915\\u0940 \\u0938\\u092e\\u0940\\u0915\\u094d\\u0937\\u093e \\u0914\\u0930 \\u0938\\u0902\\u0936\\u094b\\u0927\\u0928 \\u0915\\u0930\\u0947\\u0902\\u0964\nrealm.edit.role=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e\nrealm.edit.status=\\u0938\\u094d\\u0925\\u093f\\u0924\\u093f\nrealm.edit.roleid=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0906\\u0907\\u0921\\u0940\nrealm.edit.roles=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e\\u090f\\u0901\nrealm.edit.roles.list.summary=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e\\u0913\\u0902 \\u0915\\u0940 \\u0938\\u0942\\u091a\\u0940\\u0964 \\u092a\\u094d\\u0930\\u0925\\u092e \\u0915\\u093e\\u0932\\u092e \\u092e\\u0947\\u0902 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e\\u0913\\u0902 \\u0915\\u0940 \\u0906\\u0908\\u0921\\u0940\\u091c\\u093c, \\u0926\\u0942\\u0938\\u0930\\u0947 \\u0915\\u093e\\u0932\\u092e \\u092e\\u0947\\u0902 \\u0935\\u0930\\u094d\\u0923\\u0928\\u0964\nrealm.edit.save=\\u0938\\u0941\\u0930\\u0915\\u094d\\u0937\\u093f\\u0924 \\u0915\\u0930\\u0947\\u0902\nrealm.edit.these=\\u092f\\u0939 \\u0935\\u094b \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e\\u090f\\u0901\\u0901 \\u0939\\u0948\\u0902 \\u091c\\u094b \\u0915\\u093f \\u0905\\u0932\\u0917-\\u0905\\u0932\\u0917 \\u0909\\u092a\\u092f\\u094b\\u0917\\u0915\\u0930\\u094d\\u0924\\u093e\\u0913\\u0902 \\u0915\\u094b \\u0907\\u0938 \\u0926\\u093e\\u092f\\u0930\\u0947 \\u092e\\u0947\\u0902 \\u092a\\u094d\\u0930\\u0926\\u093e\\u0928 \\u0915\\u0940 \\u0917\\u0908 \\u0939\\u0948\\u0902\\u0964 \\u0938\\u0902\\u092a\\u093e\\u0926\\u093f\\u0924 \\u0915\\u0930\\u0928\\u0947 \\u0915\\u0947 \\u0932\\u093f\\u090f \\u090f\\u0915 \\u0906\\u0907\\u0921\\u0940 \\u092a\\u0930 \\u0915\\u094d\\u0932\\u093f\\u0915 \\u0915\\u0930\\u0947\\u0902\\u0964\nrealm.edit.these1=\\u0907\\u0938 \\u0926\\u093e\\u092f\\u0930\\u0947 \\u0915\\u0947 \\u092d\\u0940\\u0924\\u0930 \\u092f\\u0939 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e\\u090f\\u0901 \\u092a\\u0930\\u093f\\u092d\\u093e\\u0937\\u093f\\u0924 \\u0939\\u0948\\u0902\\u0964 \\u0938\\u0902\\u092a\\u093e\\u0926\\u093f\\u0924 \\u0915\\u0930\\u0928\\u0947 \\u0915\\u0947 \\u0932\\u093f\\u090f \\u090f\\u0915 \\u0906\\u0907\\u0921\\u0940 \\u092a\\u0930 \\u0915\\u094d\\u0932\\u093f\\u0915 \\u0915\\u0930\\u0947\\u0902\\u0964\nrealm.edit.used=\\u0915\\u0947 \\u0932\\u093f\\u090f \\u092a\\u094d\\u0930\\u092f\\u0941\\u0915\\u094d\\u0924\nrealm.edit.userid=\\u0909\\u092a\\u092f\\u094b\\u0917\\u0915\\u0930\\u094d\\u0924\\u093e \\u0906\\u0907\\u0921\\u0940\nrealm.edit.users=\\u0909\\u092a\\u092f\\u094b\\u0917\\u0915\\u0930\\u094d\\u0924\\u093e\nrealm.edit.users.list.summary=\\u0909\\u092a\\u092f\\u094b\\u0917\\u0915\\u0930\\u094d\\u0924\\u093e\\u0913\\u0902 \\u0915\\u0940 \\u0938\\u0942\\u091a\\u0940\\u0964 \\u092a\\u094d\\u0930\\u0925\\u092e \\u0915\\u093e\\u0932\\u092e \\u092e\\u0947\\u0902 \\u0909\\u092a\\u092f\\u094b\\u0917\\u0915\\u0930\\u094d\\u0924\\u093e \\u0906\\u0907\\u0921\\u0940\\u091c\\u093c \\u0939\\u0948\\u0902,\\u0926\\u0942\\u0938\\u0930\\u0947 \\u0915\\u093e\\u0932\\u092e \\u092e\\u0947\\u0902 \\u0935\\u0930\\u094d\\u0923\\u0928 \\u0939\\u0948\\u0902, \\u0924\\u0940\\u0938\\u0930\\u0947 \\u0915\\u093e\\u0932\\u092e \\u092e\\u0947\\u0902 \\u0938\\u094d\\u0925\\u093f\\u0924\\u093f \\u0939\\u0948\\u0902 \\u0914\\u0930 \\u091a\\u094c\\u0925\\u0947 \\u0915\\u093e\\u0932\\u092e \\u092e\\u0947\\u0902 \\u092a\\u094d\\u0930\\u0926\\u093e\\u0924\\u093e \\u0939\\u0948\\u0902\\u0964\nrealm.grant=\\u0905\\u0928\\u0941\\u0926\\u093e\\u0928 \\u0915\\u0940 \\u0915\\u094d\\u0937\\u092e\\u0924\\u093e\nrealm.idinvalid=\\u0926\\u093e\\u092f\\u0930\\u093e \\u0906\\u0907\\u0921\\u0940 \\u0905\\u092e\\u093e\\u0928\\u094d\\u092f \\u0939\\u0948\nrealm.iduse=\\u0926\\u093e\\u092f\\u0930\\u093e \\u0906\\u0907\\u0921\\u0940 \\u092a\\u0939\\u0932\\u0947 \\u0938\\u0947 \\u0939\\u0940 \\u0909\\u092a\\u092f\\u094b\\u0917 \\u092e\\u0947\\u0902 \\u0939\\u0948\nrealm.list.alert=\\u091a\\u0947\\u0924\\u093e\\u0935\\u0928\\u0940\\:\nrealm.list.summary=\\u0926\\u093e\\u092f\\u0930\\u094b \\u0915\\u0940 \\u0938\\u0942\\u091a\\u0940\\u0964 \\u092a\\u094d\\u0930\\u0925\\u092e \\u0915\\u093e\\u0932\\u092e \\u092e\\u0947\\u0902 \\u0926\\u093e\\u092f\\u0930\\u093e \\u0906\\u0907\\u0921\\u0940, \\u0926\\u0942\\u0938\\u0930\\u0947\\u0902 \\u092e\\u0947\\u0902 \\u092a\\u094d\\u0930\\u0926\\u093e\\u0924\\u093e \\u0906\\u0907\\u0921\\u0940, \\u0924\\u0940\\u0938\\u0930\\u0947 \\u0915\\u093e\\u0932\\u092e \\u092e\\u0947\\u0902 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0915\\u094b \\u092c\\u0928\\u093e\\u090f \\u0930\\u0916\\u0928\\u093e\\u0964\nrealm.list.maintain=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u092c\\u0928\\u093e\\u090f \\u0930\\u0916\\u0947\\u0902\nrealm.list.norealms=\\u0915\\u094b\\u0908 \\u092d\\u0940 \\u0926\\u093e\\u092f\\u0930\\u0947 \\u0928\\u093f\\u0930\\u094d\\u0927\\u093e\\u0930\\u093f\\u0924 \\u0928\\u0939\\u0940\\u0902 \\u0939\\u0948\\u0902 \\u091c\\u094b \\u0909\\u0938 \\u0916\\u094b\\u091c \\u092e\\u093e\\u092a\\u0926\\u0902\\u0921 \\u0938\\u0947 \\u092e\\u0947\\u0932 \\u0916\\u093e\\u0924\\u0947 \\u0939\\u094b\\u0964\nrealm.list.provide=\\u092a\\u094d\\u0930\\u0926\\u093e\\u0924\\u093e \\u0906\\u0908\\u0921\\u0940\nrealm.list.realmid=\\u0926\\u093e\\u092f\\u0930\\u093e \\u0906\\u0908\\u0921\\u0940\nrealm.list.these=\\u092f\\u0939 \\u0935\\u094b \\u0926\\u093e\\u092f\\u0930\\u0947 \\u0939\\u0948 \\u091c\\u094b \\u0915\\u093f \\u092a\\u094d\\u0930\\u0923\\u093e\\u0932\\u0940 \\u092e\\u0947\\u0902 \\u092a\\u0930\\u093f\\u092d\\u093e\\u0937\\u093f\\u0924 \\u0939\\u0948 \\u0914\\u0930 \\u0935\\u0939 \\u0916\\u094b\\u091c \\u092e\\u093e\\u092a\\u0926\\u0902\\u0921 \\u0938\\u0947 \\u092e\\u0947\\u0932 \\u0916\\u093e\\u0924\\u0947 \\u0939\\u0948\\u0964 \\u0938\\u0902\\u092a\\u093e\\u0926\\u093f\\u0924 \\u0915\\u0930\\u0928\\u0947 \\u0915\\u0947 \\u0932\\u093f\\u090f \\u090f\\u0915 \\u0906\\u0907\\u0921\\u0940 \\u092a\\u0930 \\u0915\\u094d\\u0932\\u093f\\u0915 \\u0915\\u0930\\u0947\\u0902\\u0964\nrealm.list.used=\\u0915\\u0947 \\u0932\\u093f\\u090f \\u092a\\u094d\\u0930\\u092f\\u0941\\u0915\\u094d\\u0924\nrealm.list.youare=\\u0906\\u092a \\u0926\\u0947\\u0916 \\u0930\\u0939\\u0947 \\u0939\\u0948\\u0902 \nrealm.list.of=\\u0915\\u0940\nrealm.list.results=\\u092a\\u0930\\u093f\\u0923\\u093e\\u092e\\u0964\nrealm.new=\\u0928\\u092f\\u093e \\u0926\\u093e\\u092f\\u0930\\u093e\nrealm.notfound=\\u0926\\u093e\\u092f\\u0930\\u093e {0} \\u0928\\u0939\\u0940\\u0902 \\u092e\\u093f\\u0932\\u093e\nrealm.notpermis=\\u0906\\u092a\\u0915\\u094b \\u0907\\u0938 \\u0926\\u093e\\u092f\\u0930\\u0947 \\u0915\\u094b \\u092c\\u0928\\u093e\\u0928\\u0947 \\u0915\\u0940 \\u0905\\u0928\\u0941\\u092e\\u0924\\u093f \\u0928\\u0939\\u0940\\u0902 \\u0939\\u0948\nrealm.notpermis1=\\u0906\\u092a\\u0915\\u094b \\u0907\\u0938 \\u0926\\u093e\\u092f\\u0930\\u0947 \\u0915\\u094b \\u0938\\u0902\\u092a\\u093e\\u0926\\u093f\\u0924 \\u0915\\u0930\\u0928\\u0947 \\u0915\\u0940 \\u0905\\u0928\\u0941\\u092e\\u0924\\u093f \\u0928\\u0939\\u0940\\u0902 \\u0939\\u0948\nrealm.notpermis2=\\u0906\\u092a\\u0915\\u094b \\u0926\\u093e\\u092f\\u0930\\u0947 {0} \\u0915\\u094b \\u0939\\u091f\\u093e\\u0928\\u0947 \\u0915\\u0940 \\u0905\\u0928\\u0941\\u092e\\u0924\\u093f \\u0928\\u0939\\u0940\\u0902 \\u0939\\u0948\nrealm.notpermis3=\\u0906\\u092a\\u0915\\u094b \\u0907\\u0938 \\u0926\\u093e\\u092f\\u0930\\u0947 \\u0915\\u094b \\u0938\\u0902\\u092a\\u093e\\u0926\\u093f\\u0924 \\u0915\\u0930\\u0928\\u0947 \\u0915\\u0940 \\u0905\\u0928\\u0941\\u092e\\u0924\\u093f \\u0928\\u0939\\u0940\\u0902 \\u0939\\u0948\nrealm.please=\\u0915\\u0943\\u092a\\u092f\\u093e \\u090f\\u0915 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0906\\u0908\\u0921\\u0940 \\u0926\\u0930\\u094d\\u091c \\u0915\\u0930\\u0947\\u0902\\u0964\nrealm.realm=\\u0926\\u093e\\u092f\\u0930\\u093e\nrealm.remove=\\u0926\\u093e\\u092f\\u0930\\u093e \\u0939\\u091f\\u093e\\u090f\\u0901\nrealm.removeall=\\u0938\\u092d\\u0940 \\u0939\\u091f\\u093e\\u090f\\u0901\nrealm.removerol=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0939\\u091f\\u093e\\u090f\\u0901\nrealm.role=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u091c\\u094b\\u0921\\u093c\\u0947\\u0902\nrealm.role.alert=\\u091a\\u0947\\u0924\\u093e\\u0935\\u0928\\u0940\\:\nrealm.role.cancel=\\u0930\\u0926\\u094d\\u0926 \\u0915\\u0930\\u0947\\u0902\nrealm.role.complete=\\u0926\\u093e\\u092f\\u0930\\u093e \\u0938\\u0902\\u092a\\u093e\\u0926\\u0928 \\u092a\\u0942\\u0930\\u093e \\u0915\\u0930\\u0947\\u0902\nrealm.role.continue=\\u0938\\u0902\\u092a\\u093e\\u0926\\u0928 \\u091c\\u093e\\u0930\\u0940 \\u0930\\u0916\\u0947\\u0902\nrealm.role.description=\\u0935\\u0930\\u094d\\u0923\\u0928\\:\nrealm.role.done=\\u0916\\u0924\\u094d\\u092e\nrealm.role.edit=\\u0938\\u0902\\u092a\\u093e\\u0926\\u093f\\u0924 \\u0915\\u0930\\u0947\\u0902\\: \\u0926\\u093e\\u092f\\u0930\\u0947\nrealm.role.functions=\\u0915\\u093e\\u0930\\u094d\\u092f\nrealm.role.functions2=\\u0915\\u093e\\u0930\\u094d\\u092f\\:\nrealm.role.id=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0906\\u0908\\u0921\\u0940\\:\nrealm.role.role=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e\nrealm.role.save=\\u0938\\u0939\\u0947\\u091c\\u0947\\u0902\nrealm.role.used=\\u0915\\u0947 \\u0932\\u093f\\u090f \\u092a\\u094d\\u0930\\u092f\\u0941\\u0915\\u094d\\u0924\nrealm.role.set=\\ \\u0907\\u0938 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0915\\u0947 \\u0932\\u093f\\u090f \\u092b\\u093c\\u0902\\u0915\\u094d\\u0936\\u0928 \\u0938\\u0947\\u091f \\u0915\\u0930\\u0947\\u0902\\u0964\nrealm.role.group=\\u092f\\u0939 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0915\\u0947\\u0935\\u0932 \\u0938\\u092e\\u0942\\u0939 \\u092a\\u094d\\u0930\\u0926\\u093e\\u0924\\u093e \\u0915\\u0947 \\u0932\\u093f\\u090f \\u0938\\u0940\\u092e\\u093f\\u0924 \\u0939\\u094b\\u0928\\u0940 \\u091a\\u093e\\u0939\\u093f\\u090f?\nrealm.save=\\u0907\\u0938 \\u0930\\u0942\\u092a \\u092e\\u0947\\u0902 \\u0938\\u0939\\u0947\\u091c\\u0947\\u0902\nrealm.saveas.alert=\\u091a\\u0947\\u0924\\u093e\\u0935\\u0928\\u0940\\:\nrealm.saveas.cancel=\\u0930\\u0926\\u094d\\u0926 \\u0915\\u0930\\u0947\\u0902\nrealm.saveas.copy=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0915\\u0940 \\u092a\\u094d\\u0930\\u0924\\u093f\\u0932\\u093f\\u092a\\u093f \\u092c\\u0928\\u093e\\u090f\\u0901\nrealm.saveas.enter=\\u090f\\u0915 \\u0928\\u0908 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u092c\\u0928\\u093e\\u0928\\u0947 \\u0915\\u0947 \\u0932\\u093f\\u090f \\u090f\\u0915 \\u0928\\u0908 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0906\\u0907\\u0921\\u0940 \\u0921\\u093e\\u0932\\u0947\\u0902 \\u0914\\u0930 \\u0935\\u0939 \\u091a\\u0941\\u0928\\u0940 \\u0939\\u0941\\u0908 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0915\\u0940 \\u0928\\u0915\\u0932 \\u0939\\u094b\\u0928\\u0940 \\u091a\\u093e\\u0939\\u093f\\u090f\\u0964\nrealm.saveas.enter1=\\u090f\\u0915 \\u0928\\u092f\\u093e \\u0926\\u093e\\u092f\\u0930\\u093e \\u092c\\u0928\\u093e\\u0928\\u0947 \\u0915\\u0947 \\u0932\\u093f\\u090f \\u090f\\u0915 \\u0928\\u0908 \\u0926\\u093e\\u092f\\u0930\\u093e \\u0906\\u0907\\u0921\\u0940 \\u0921\\u093e\\u0932\\u0947\\u0902, \\u0914\\u0930 \\u0935\\u0939 \\u091a\\u0941\\u0928\\u0947 \\u0939\\u0941\\u090f \\u0926\\u093e\\u092f\\u0930\\u0947 \\u0915\\u0940 \\u0928\\u0915\\u0932 \\u0939\\u094b\\u0928\\u0940 \\u091a\\u093e\\u0939\\u093f\\u090f\\u0964\nrealm.saveas.realm=\\u0926\\u093e\\u092f\\u0930\\u0947\nrealm.saveas.realmid=\\u0926\\u093e\\u092f\\u0930\\u0947 \\u0906\\u0908\\u0921\\u0940\\:\nrealm.saveas.role=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e\nrealm.saveas.roleid=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0906\\u0908\\u0921\\u0940\\:\nrealm.saveas.save=\\u0938\\u0939\\u0947\\u091c\\u0947\\u0902\nrealm.saveas.saveas=\\u0915\\u0947 \\u0930\\u0942\\u092a \\u092e\\u0947\\u0902 \\u0938\\u0939\\u0947\\u091c\\u0947\\u0902...\nrealm.someone=\\u0915\\u094b\\u0908 \\u0913\\u0930 \\u0935\\u0930\\u094d\\u0924\\u092e\\u093e\\u0928 \\u092e\\u0947\\u0902 \\u0907\\u0938 \\u0926\\u093e\\u092f\\u0930\\u0947 \\u0915\\u094b \\u0938\\u0902\\u092a\\u093e\\u0926\\u093f\\u0924 \\u0915\\u0930 \\u0930\\u0939\\u093e \\u0939\\u0948\\:\nrealm.user=\\u0909\\u092a\\u092f\\u094b\\u0917\\u0915\\u0930\\u094d\\u0924\\u093e \\u0906\\u0908\\u0921\\u0940 \\u0928\\u0939\\u0940\\u0902 \\u092e\\u093f\\u0932\\u0940\\u0964\nrealm.user.alert=\\u091a\\u0947\\u0924\\u093e\\u0935\\u0928\\u0940\\:\nrealm.user.cancel=\\u0930\\u0926\\u094d\\u0926 \\u0915\\u0930\\u0947\\u0902\nrealm.user.complete=\\u092a\\u0942\\u0930\\u094d\\u0923 \\u0926\\u093e\\u092f\\u0930\\u0947 \\u0938\\u0902\\u092a\\u093e\\u0926\\u093f\\u0924 \\u0915\\u0930\\u0947\\u0902\nrealm.user.continue=\\u0938\\u0902\\u092a\\u093e\\u0926\\u0928 \\u091c\\u093e\\u0930\\u0940 \\u0930\\u0916\\u0947\\u0902\nrealm.user.done=\\u0916\\u0924\\u094d\\u092e\nrealm.user.edit=\\u0938\\u0902\\u092a\\u093e\\u0926\\u093f\\u0924 \\u0915\\u0930\\u0947\\u0902\\: \\u0926\\u093e\\u092f\\u0930\\u0947\nrealm.user.id=\\u092a\\u094d\\u0930\\u092f\\u094b\\u0915\\u094d\\u0924\\u093e \\u0906\\u0908\\u0921\\u0940\\:\nrealm.user.role=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e\nrealm.user.role2=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e\\:\nrealm.user.save=\\u0938\\u0939\\u0947\\u091c\\u0947\\u0902\nrealm.user.set=\\ \\u0907\\u0938 \\u0909\\u092a\\u092f\\u094b\\u0917\\u0915\\u0930\\u094d\\u0924\\u093e \\u0915\\u0947 \\u0932\\u093f\\u090f \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0938\\u0947\\u091f \\u0915\\u0930\\u0947\\u0902\\u0964\nrealm.user.used=\\u0915\\u0947 \\u0932\\u093f\\u090f \\u092a\\u094d\\u0930\\u092f\\u0941\\u0915\\u094d\\u0924\nrealm.user.user=\\u0909\\u092a\\u092f\\u094b\\u0917\\u0915\\u0930\\u094d\\u0924\\u093e \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e\nrealm.user.notfound=\\u0906\\u0902\\u0924\\u0930\\u093f\\u0915 \\u0924\\u094d\\u0930\\u0941\\u091f\\u093f\\: \\u0909\\u092a\\u092f\\u094b\\u0917\\u0915\\u0930\\u094d\\u0924\\u093e \\u0928\\u0939\\u0940\\u0902 \\u092e\\u093f\\u0932\\u093e\\u0964\nrealm.noaccess=\\u0906\\u092a\\u0915\\u094b \\u0907\\u0938 \\u0909\\u092a\\u0915\\u0930\\u0923 \\u0915\\u093e \\u0909\\u092a\\u092f\\u094b\\u0917 \\u0915\\u0930\\u0928\\u0947 \\u0915\\u0940 \\u0905\\u0928\\u0941\\u092e\\u0924\\u093f \\u0928\\u0939\\u0940\\u0902 \\u0939\\u0948\\u0964\n\nrealm.view.active=\\u0938\\u0915\\u094d\\u0930\\u093f\\u092f\nrealm.view.description=\\u0935\\u0930\\u094d\\u0923\\u0928\nrealm.view.view=\\u0926\\u0947\\u0916\\u0947\\u0902\\: \\u0926\\u093e\\u092f\\u0930\\u0947\nrealm.view.realm=\\u0926\\u093e\\u092f\\u0930\\u0947\nrealm.view.review=\\u0907\\u0938 \\u0926\\u093e\\u092f\\u0930\\u0947 \\u091c\\u093e\\u0928\\u0915\\u093e\\u0930\\u0940 \\u0915\\u0940 \\u0938\\u092e\\u0940\\u0915\\u094d\\u0937\\u093e \\u0915\\u0930\\u0947\\u0902\\u0964\nrealm.view.from=\\u092a\\u094d\\u0930\\u0926\\u093e\\u0924\\u093e \\u0938\\u0947\nrealm.view.id=\\u0926\\u093e\\u092f\\u0930\\u0947 \\u0906\\u0908\\u0921\\u0940\\:\nrealm.view.maintain=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0915\\u094b \\u092c\\u0928\\u093e\\u090f \\u0930\\u0916\\u0947\\:\nrealm.view.used=\\u0915\\u0947 \\u0932\\u093f\\u090f \\u092a\\u094d\\u0930\\u092f\\u0941\\u0915\\u094d\\u0924\nrealm.view.these=\\u092f\\u0939 \\u0935\\u094b \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e\\u090f\\u0901\\u0901 \\u0939\\u0948\\u0902 \\u091c\\u094b \\u0915\\u093f \\u0905\\u0932\\u0917-\\u0905\\u0932\\u0917 \\u0909\\u092a\\u092f\\u094b\\u0917\\u0915\\u0930\\u094d\\u0924\\u093e\\u0913\\u0902 \\u0915\\u094b \\u0907\\u0938 \\u0926\\u093e\\u092f\\u0930\\u0947 \\u092e\\u0947\\u0902 \\u092a\\u094d\\u0930\\u0926\\u093e\\u0928 \\u0915\\u0940 \\u0917\\u0908 \\u0939\\u0948\\u0902\\u0964 \\u0926\\u0947\\u0916\\u0928\\u0947 \\u0915\\u0947 \\u0932\\u093f\\u090f \\u090f\\u0915 \\u0906\\u0907\\u0921\\u0940 \\u092a\\u0930 \\u0915\\u094d\\u0932\\u093f\\u0915 \\u0915\\u0930\\u0947\\u0902\\u0964.\nrealm.view.these1=\\u0907\\u0938 \\u0926\\u093e\\u092f\\u0930\\u0947 \\u0915\\u0947 \\u092d\\u0940\\u0924\\u0930 \\u092f\\u0939 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e\\u090f\\u0901 \\u092a\\u0930\\u093f\\u092d\\u093e\\u0937\\u093f\\u0924 \\u0939\\u0948\\u0902\\u0964 \\u0926\\u0947\\u0916\\u0928\\u0947 \\u0915\\u0947 \\u0932\\u093f\\u090f \\u090f\\u0915 \\u0906\\u0907\\u0921\\u0940 \\u092a\\u0930 \\u0915\\u094d\\u0932\\u093f\\u0915 \\u0915\\u0930\\u0947\\u0902\\u0964\nrealm.view.userid=\\u0909\\u092a\\u092f\\u094b\\u0917\\u0915\\u0930\\u094d\\u0924\\u093e \\u0906\\u0907\\u0921\\u0940\nrealm.view.users=\\u0909\\u092a\\u092f\\u094b\\u0917\\u0915\\u0930\\u094d\\u0924\\u093e\nrealm.view.users.list.summary=\\u0909\\u092a\\u092f\\u094b\\u0917\\u0915\\u0930\\u094d\\u0924\\u093e\\u0913\\u0902 \\u0915\\u0940 \\u0938\\u0942\\u091a\\u0940\\u0964 \\u092a\\u094d\\u0930\\u0925\\u092e \\u0915\\u093e\\u0932\\u092e \\u092e\\u0947\\u0902 \\u0909\\u092a\\u092f\\u094b\\u0917\\u0915\\u0930\\u094d\\u0924\\u093e \\u0906\\u0907\\u0921\\u0940\\u091c\\u093c \\u0939\\u0948\\u0902,\\u0926\\u0942\\u0938\\u0930\\u0947 \\u0915\\u093e\\u0932\\u092e \\u092e\\u0947\\u0902 \\u0935\\u0930\\u094d\\u0923\\u0928 \\u0939\\u0948\\u0902, \\u0924\\u0940\\u0938\\u0930\\u0947 \\u0915\\u093e\\u0932\\u092e \\u092e\\u0947\\u0902 \\u0938\\u094d\\u0925\\u093f\\u0924\\u093f \\u0939\\u0948\\u0902 \\u0914\\u0930 \\u091a\\u094c\\u0925\\u0947 \\u0915\\u093e\\u0932\\u092e \\u092e\\u0947\\u0902 \\u092a\\u094d\\u0930\\u0926\\u093e\\u0924\\u093e \\u0939\\u0948\\u0902\\u0964.\nrealm.view.status=\\u0938\\u094d\\u0925\\u093f\\u0924\\u093f\nrealm.view.roleid=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0906\\u0907\\u0921\\u0940\nrealm.view.roles=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e\\u090f\\u0901\nrealm.view.roles.list.summary=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e\\u0913\\u0902 \\u0915\\u0940 \\u0938\\u0942\\u091a\\u0940\\u0964 \\u092a\\u094d\\u0930\\u0925\\u092e \\u0915\\u093e\\u0932\\u092e \\u092e\\u0947\\u0902 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e\\u0913\\u0902 \\u0915\\u0940 \\u0906\\u0908\\u0921\\u0940\\u091c\\u093c, \\u0926\\u0942\\u0938\\u0930\\u0947 \\u0915\\u093e\\u0932\\u092e \\u092e\\u0947\\u0902 \\u0935\\u0930\\u094d\\u0923\\u0928\\u0964\nrealm.view.noroles=\\u0915\\u093f\\u0938\\u0940 \\u092d\\u0940 \\u0909\\u092a\\u092f\\u094b\\u0917\\u0915\\u0930\\u094d\\u0924\\u093e\\u0913\\u0902 \\u0915\\u094b \\u0915\\u094b\\u0908 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u092a\\u094d\\u0930\\u0926\\u093e\\u0928 \\u0928\\u0939\\u0940\\u0902 \\u0915\\u0940 \\u0917\\u0908 \\u0939\\u0948\\u0964\nrealm.view.noroles1=\\u0915\\u094b\\u0908 \\u092d\\u0940 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u092a\\u0930\\u093f\\u092d\\u093e\\u0937\\u093f\\u0924 \\u0928\\u0939\\u0940 \\u0939\\u0948\\u0964\nrealm.view.provided=\\u0909\\u092a\\u0932\\u092c\\u094d\\u0927\nrealm.view.provider=\\u092a\\u094d\\u0930\\u0926\\u093e\\u0924\\u093e \\u0906\\u0908\\u0921\\u0940\\:\nrealm.role.view=\\u0907\\u0938 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0915\\u0947 \\u0932\\u093f\\u090f \\u0915\\u093e\\u0930\\u094d\\u092f \\u0926\\u0947\\u0916\\u0947\\u0902\\u0964\nrealm.role.group.view=\\u0915\\u094d\\u092f\\u093e \\u092f\\u0939 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0915\\u0947\\u0935\\u0932 \\u0938\\u092e\\u0942\\u0939 \\u092a\\u094d\\u0930\\u0926\\u093e\\u0924\\u093e \\u0915\\u0947 \\u0932\\u093f\\u090f \\u0938\\u0940\\u092e\\u093f\\u0924 \\u0939\\u0948?\nrealm.view.back=\\u0930\\u0926\\u094d\\u0926 \\u0915\\u0930\\u0947\\u0902\n\n\nrealm.noProviderIdFound=\\u092a\\u094d\\u0930\\u0926\\u093e\\u0924\\u093e \\u0906\\u0907\\u0921\\u0940 \\: {0} \\u0915\\u0947 \\u0932\\u093f\\u0947\\u090f \\u0915\\u094b\\u0908 \\u092a\\u093e\\u0920\\u094d\\u092f\\u0915\\u094d\\u0930\\u092e \\u0905\\u0928\\u0941\\u092d\\u093e\\u0917 \\u0928\\u0939\\u0940\\u0902 \\u092e\\u093f\\u0932\\u093e\\u0964\n\nreasav.alert=\\u091a\\u0947\\u0924\\u093e\\u0935\\u0928\\u0940\\:\nreasav.can=\\u0930\\u0926\\u094d\\u0926 \\u0915\\u0930\\u0947\\u0902\nreasav.entanew2=\\u090f\\u0915 \\u0928\\u092f\\u093e \\u0926\\u093e\\u092f\\u0930\\u093e \\u0906\\u0908\\u0921\\u0940 \\u0926\\u0930\\u094d\\u091c \\u0915\\u0930\\u0947\\u0902\\u0964\nreasav.entnew=\\u090f\\u0915 \\u0928\\u0908 \\u0926\\u093e\\u092f\\u0930\\u093e \\u0906\\u0907\\u0921\\u0940 \\u0921\\u093e\\u0932\\u0947\\u0902, \\u0928\\u092f\\u093e \\u0926\\u093e\\u092f\\u0930\\u093e \\u092c\\u0928\\u093e\\u0928\\u0947 \\u0915\\u0947 \\u0932\\u093f\\u090f \\u0914\\u0930 \\u0935\\u0939 \\u091a\\u0941\\u0928\\u0947 \\u0939\\u0941\\u090f \\u0926\\u093e\\u092f\\u0930\\u0947 \\u0915\\u0940 \\u0928\\u0915\\u0932 \\u0939\\u094b\\u0928\\u0940 \\u091a\\u093e\\u0939\\u093f\\u090f\\u0964\nreasav.reaid=\\u0926\\u093e\\u092f\\u0930\\u093e \\u0906\\u0908\\u0921\\u0940\\:\nreasav.realm=\\u0926\\u093e\\u092f\\u0930\\u093e\nreasav.sav=\\u0938\\u0941\\u0930\\u0915\\u094d\\u0937\\u093f\\u0924 \\u0915\\u0930\\u0947\\u0902\nreasav.savas=\\u0907\\u0938 \\u0930\\u0942\\u092a \\u092e\\u0947\\u0902 \\u0938\\u0941\\u0930\\u0915\\u094d\\u0937\\u093f\\u0924 \\u0915\\u0930\\u0947\\u0902 ...\n\nreasavrol.alert=\\u091a\\u0947\\u0924\\u093e\\u0935\\u0928\\u0940\\:\nreasavrol.can=\\u0930\\u0926\\u094d\\u0926 \\u0915\\u0930\\u0947\\u0902\nreasavrol.coprol=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0915\\u093e\\u0945\\u092a\\u0940 \\u0915\\u0930\\u0947\\u0902\nreasavrol.entanew=\\u090f\\u0915 \\u0928\\u0908 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0906\\u0907\\u0921\\u0940 \\u0921\\u093e\\u0932\\u0947\\u0902, \\u0928\\u0908 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u092c\\u0928\\u093e\\u0928\\u0947 \\u0915\\u0947 \\u0932\\u093f\\u090f \\u0914\\u0930 \\u0935\\u0939 \\u091a\\u0941\\u0928\\u0940 \\u0939\\u0941\\u0908 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0915\\u0940 \\u0928\\u0915\\u0932 \\u0939\\u094b\\u0928\\u0940 \\u091a\\u093e\\u0939\\u093f\\u090f\\u0964\nreasavrol.entanew2=\\u090f\\u0915 \\u0928\\u0908 \\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0906\\u0907\\u0921\\u0940 \\u0921\\u093e\\u0932\\u0947\\u0902\\u0964\nreasavrol.rolid=\\u092d\\u0942\\u092e\\u093f\\u0915\\u093e \\u0906\\u0907\\u0921\\u0940\\:\nreasavrol.sav=\\u0938\\u0941\\u0930\\u0915\\u094d\\u0937\\u093f\\u0924 \\u0915\\u0930\\u0947\\u0902\n\n\n#### permissions\n\ndesc-annc.new=\\u0918\\u094b\\u0937\\u0923\\u093e\\u090f\\u0901 \\u092c\\u0928\\u093e\\u090f\\u0901\ndesc-annc.read=\\u0918\\u094b\\u0937\\u0923\\u093e\\u090f\\u0901 \\u092a\\u0922\\u093c\\u0947\\u0902\ndesc-annc.revise.any=\\u0938\\u092d\\u0940 \\u0918\\u094b\\u0937\\u0923\\u093e\\u0913\\u0902 \\u0915\\u094b \\u0938\\u0902\\u092a\\u093e\\u0926\\u093f\\u0924 \\u0915\\u0930\\u0947\\u0902\ndesc-annc.revise.own=\\u0905\\u092a\\u0928\\u0940 \\u0918\\u094b\\u0937\\u0923\\u093e\\u0913\\u0902 \\u0915\\u094b \\u0938\\u0902\\u092a\\u093e\\u0926\\u093f\\u0924 \\u0915\\u0930\\u0947\\u0902\ndesc-annc.delete.any=\\u0938\\u092d\\u0940 \\u0918\\u094b\\u0937\\u0923\\u093e\\u0913\\u0902 \\u0915\\u094b \\u0939\\u091f\\u093e\\u090f\\u0901\\u0964\ndesc-annc.delete.own=\\u0905\\u092a\\u0928\\u0940 \\u0918\\u094b\\u0937\\u0923\\u093e\\u0913\\u0902 \\u0915\\u094b \\u0939\\u091f\\u093e\\u090f\\u0901\\u0964\ndesc-annc.read.drafts=\\u0938\\u092d\\u0940 \\u0921\\u094d\\u0930\\u093e\\u092b\\u094d\\u091f \\u0918\\u094b\\u0937\\u0923\\u093e\\u090f\\u0901 \\u092a\\u0922\\u093c\\u0947\\u0902\ndesc-annc.all.groups=\\u0938\\u092d\\u0940 \\u0938\\u092e\\u0942\\u0939 \\u0918\\u094b\\u0937\\u0923\\u093e\\u0913\\u0902 \\u092a\\u0930 \\u092a\\u0939\\u0941\\u0901\\u091a\\u0947\n\nalert_sitegroupnotdefined=\\ \\u0938\\u0902\\u0926\\u0930\\u094d\\u092d ''{0}'' \\u0915\\u0947 \\u0938\\u093e\\u0925 \\u0915\\u094b\\u0908 \\u0938\\u093e\\u0907\\u091f/\\u0938\\u092e\\u0942\\u0939 \\u0928\\u0939\\u0940\\u0902 \\u092e\\u093f\\u0932 \\u0930\\u0939\\u093e \\u0964\nalert_permission=\\u0906\\u092a\\u0915\\u094b \\u0905\\u0928\\u0941\\u092e\\u0924\\u093f \\u0928\\u0939\\u0940\\u0902 \\u0939\\u0948 \\u0915\\u0940 \\u0906\\u092a ''{0}'' \\u0915\\u0940 \\u0905\\u0928\\u0941\\u092e\\u0924\\u093f \\u0938\\u0947\\u091f\\u093f\\u0902\\u0917\\u094d\\u0938 \\u092c\\u0926\\u0932 \\u0938\\u0915\\u0947\\u0902\\u0964\n\n\n"} +{"text": "/*\r\n * Advanced Simulation Library <http://asl.org.il>\r\n * \r\n * Copyright 2015 Avtech Scientific <http://avtechscientific.com>\r\n *\r\n *\r\n * This file is part of Advanced Simulation Library (ASL).\r\n *\r\n * ASL is free software: you can redistribute it and/or modify it\r\n * under the terms of the GNU Affero General Public License as\r\n * published by the Free Software Foundation, version 3 of the License.\r\n *\r\n * ASL is distributed in the hope that it will be useful,\r\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\r\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\r\n * GNU Affero General Public License for more details.\r\n *\r\n * You should have received a copy of the GNU Affero General Public License\r\n * along with ASL. If not, see <http://www.gnu.org/licenses/>.\r\n *\r\n */\r\n\r\n\r\n#ifndef ASLWRITER_H\r\n#define ASLWRITER_H\r\n\r\n//#include <acl/aclMath/aclVectorOfElementsDef.h>\r\n#include<string>\r\n#include<memory>\r\n#include<vector>\r\n\r\nnamespace acl\r\n{\r\n\tclass VectorOfElements;\r\n\tclass VectorOfElementsData;\r\n\tclass Kernel;\r\n}\r\n\r\nnamespace asl \r\n{\r\n\tclass AbstractData;\r\n\tclass Block;\r\n\r\n\tclass Writer\r\n\t{\r\n\t\tpublic:\r\n\t\t\tWriter(const std::string & file_);\r\n\t\t\t~Writer();\r\n\t\t\tvirtual void write() = 0;\r\n\t\t\tvoid enable();\r\n\t\t\tvoid addScalars(std::string name, AbstractData & data);\r\n\t\t\tvoid addVector(std::string name, AbstractData & data);\r\n\t\t\tvoid addScalars(std::string name, acl::VectorOfElementsData & data);\r\n\t\t\tvoid addVector(std::string name, acl::VectorOfElementsData & data);\r\n\t\t\tvoid addScalars(std::string name, \r\n\t\t\t const acl::VectorOfElements & data, \r\n\t\t\t acl::Kernel & kernel, \r\n\t\t\t unsigned int nGhost = 1);\r\n\t\t\tvoid addVector(std::string name,\r\n\t\t\t const acl::VectorOfElements & data, \r\n\t\t\t acl::Kernel & kernel,\r\n\t\t\t unsigned int nGhost = 1);\r\n\r\n\t\t\tstatic Writer * current;\r\n\r\n\t\tprotected:\r\n\t\t\tstd::shared_ptr<Block> block;\r\n\t\t\tstd::vector<std::pair<std::string, acl::VectorOfElementsData>> scalarFields;\r\n\t\t\tstd::vector<std::pair<std::string, acl::VectorOfElementsData>> vectorFields;\r\n\t\t\tstd::string file;\r\n\t\t\tunsigned int numOfWrites;\r\n\t};\r\n\r\n} // asl\r\n\r\n#endif // ASLWRITER_H\r\n"} +{"text": "/************************************************************\n\nCopyright 1996 by Thomas E. Dickey <dickey@clark.net>\n\n All Rights Reserved\n\nPermission to use, copy, modify, and distribute this software and its\ndocumentation for any purpose and without fee is hereby granted,\nprovided that the above copyright notice appear in all copies and that\nboth that copyright notice and this permission notice appear in\nsupporting documentation, and that the name of the above listed\ncopyright holder(s) not be used in advertising or publicity pertaining\nto distribution of the software without specific, written prior\npermission.\n\nTHE ABOVE LISTED COPYRIGHT HOLDER(S) DISCLAIM ALL WARRANTIES WITH REGARD\nTO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS, IN NO EVENT SHALL THE ABOVE LISTED COPYRIGHT HOLDER(S) BE\nLIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n********************************************************/\n\n#ifdef HAVE_DIX_CONFIG_H\n#include <dix-config.h>\n#endif\n\n#ifndef CLOSEDEV_H\n#define CLOSEDEV_H 1\n\nint SProcXCloseDevice(ClientPtr\t/* client */\n );\n\nint ProcXCloseDevice(ClientPtr\t/* client */\n );\n\n#endif /* CLOSEDEV_H */\n"} +{"text": "/*\n * Licensed to the Apache Software Foundation (ASF) under one or more\n * contributor license agreements. See the NOTICE file distributed with\n * this work for additional information regarding copyright ownership.\n * The ASF licenses this file to You under the Apache License, Version 2.0\n * (the \"License\"); you may not use this file except in compliance with\n * the License. You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\npackage org.apache.harmony.security.provider.crypto;\n\nimport java.math.BigInteger;\nimport java.security.InvalidKeyException;\nimport java.security.InvalidParameterException;\nimport java.security.MessageDigest;\nimport java.security.NoSuchAlgorithmException;\nimport java.security.PrivateKey;\nimport java.security.PublicKey;\nimport java.security.SecureRandom;\nimport java.security.Signature;\nimport java.security.SignatureException;\nimport java.security.interfaces.DSAKey;\nimport java.security.interfaces.DSAParams;\nimport java.security.interfaces.DSAPrivateKey;\nimport java.security.interfaces.DSAPublicKey;\n\npublic class SHA1withDSA_SignatureImpl extends Signature {\n\n private MessageDigest msgDigest;\n\n private DSAKey dsaKey;\n\n /**\n * The solo constructor.\n */\n public SHA1withDSA_SignatureImpl() throws NoSuchAlgorithmException {\n\n super(\"SHA1withDSA\");\n\n msgDigest = MessageDigest.getInstance(\"SHA1\");\n }\n\n /**\n * Deprecated method.\n *\n * @return\n * null\n */\n protected Object engineGetParameter(String param)\n throws InvalidParameterException {\n if (param == null) {\n throw new NullPointerException();\n }\n return null;\n }\n\n /**\n * Initializes this signature object with PrivateKey object\n * passed as argument to the method.\n *\n * @params\n * privateKey DSAPrivateKey object\n * @throws\n * InvalidKeyException if privateKey is not DSAPrivateKey object\n */\n protected void engineInitSign(PrivateKey privateKey)\n throws InvalidKeyException {\n\n DSAParams params;\n\n // parameters and private key\n BigInteger p, q, x;\n\n int n;\n\n if (privateKey == null || !(privateKey instanceof DSAPrivateKey)) {\n throw new InvalidKeyException();\n }\n\n params = ((DSAPrivateKey) privateKey).getParams();\n p = params.getP();\n q = params.getQ();\n x = ((DSAPrivateKey) privateKey).getX();\n\n // checks described in DSA standard\n n = p.bitLength();\n if (p.compareTo(BigInteger.valueOf(1)) != 1 || n < 512 || n > 1024 || (n & 077) != 0) {\n throw new InvalidKeyException(\"bad p\");\n }\n if (q.signum() != 1 && q.bitLength() != 160) {\n throw new InvalidKeyException(\"bad q\");\n }\n if (x.signum() != 1 || x.compareTo(q) != -1) {\n throw new InvalidKeyException(\"x <= 0 || x >= q\");\n }\n\n dsaKey = (DSAKey) privateKey;\n\n msgDigest.reset();\n }\n\n /**\n * Initializes this signature object with PublicKey object\n * passed as argument to the method.\n *\n * @params\n * publicKey DSAPublicKey object\n * @throws\n * InvalidKeyException if publicKey is not DSAPublicKey object\n */\n protected void engineInitVerify(PublicKey publicKey)\n throws InvalidKeyException {\n\n // parameters and public key\n BigInteger p, q, y;\n\n int n1;\n\n if (publicKey == null || !(publicKey instanceof DSAPublicKey)) {\n throw new InvalidKeyException(\"publicKey is not an instance of DSAPublicKey\");\n }\n\n DSAParams params = ((DSAPublicKey) publicKey).getParams();\n p = params.getP();\n q = params.getQ();\n y = ((DSAPublicKey) publicKey).getY();\n\n // checks described in DSA standard\n n1 = p.bitLength();\n if (p.compareTo(BigInteger.valueOf(1)) != 1 || n1 < 512 || n1 > 1024 || (n1 & 077) != 0) {\n throw new InvalidKeyException(\"bad p\");\n }\n if (q.signum() != 1 || q.bitLength() != 160) {\n throw new InvalidKeyException(\"bad q\");\n }\n if (y.signum() != 1) {\n throw new InvalidKeyException(\"y <= 0\");\n }\n\n dsaKey = (DSAKey) publicKey;\n\n msgDigest.reset();\n }\n\n /*\n * Deprecated method.\n *\n * @throws\n * InvalidParameterException\n */\n protected void engineSetParameter(String param, Object value) throws InvalidParameterException {\n if (param == null) {\n throw new NullPointerException(\"param == null\");\n }\n throw new InvalidParameterException(\"invalid parameter for this engine\");\n }\n\n /**\n * Returns signature bytes as byte array containing\n * ASN1 representation for two BigInteger objects\n * which is SEQUENCE of two INTEGERS.\n * Length of sequence varies from less than 46 to 48.\n *\n * Resets object to the state it was in\n * when previous call to either \"initSign\" method was called.\n *\n * @return\n * byte array containing signature in ASN1 representation\n * @throws\n * SignatureException if object's state is not SIGN or\n * signature algorithm cannot process data\n */\n\n protected byte[] engineSign() throws SignatureException {\n\n // names of below BigIntegers are the same as they are defined in DSA standard\n BigInteger r = null;\n BigInteger s = null;\n BigInteger k = null;\n\n // parameters and private key\n BigInteger p, q, g, x;\n\n // BigInteger for message digest\n BigInteger digestBI;\n\n // various byte array being used in computing signature\n byte[] randomBytes;\n byte[] rBytes;\n byte[] sBytes;\n byte[] signature;\n\n int n, n1, n2;\n\n DSAParams params;\n\n if (appRandom == null) {\n appRandom = new SecureRandom();\n }\n\n params = dsaKey.getParams();\n p = params.getP();\n q = params.getQ();\n g = params.getG();\n x = ((DSAPrivateKey) dsaKey).getX();\n\n // forming signature according algorithm described in chapter 5 of DSA standard\n\n digestBI = new BigInteger(1, msgDigest.digest());\n\n randomBytes = new byte[20];\n\n for (;;) {\n\n appRandom.nextBytes(randomBytes);\n\n k = new BigInteger(1, randomBytes);\n if (k.compareTo(q) != -1) {\n continue;\n }\n r = g.modPow(k, p).mod(q);\n if (r.signum() == 0) {\n continue;\n }\n\n s = k.modInverse(q).multiply(digestBI.add(x.multiply(r)).mod(q))\n .mod(q);\n\n if (s.signum() != 0) {\n break;\n }\n }\n\n // forming signature's ASN1 representation which is SEQUENCE of two INTEGERs\n //\n rBytes = r.toByteArray();\n n1 = rBytes.length;\n if ((rBytes[0] & 0x80) != 0) {\n n1++;\n }\n sBytes = s.toByteArray();\n n2 = sBytes.length;\n if ((sBytes[0] & 0x80) != 0) {\n n2++;\n }\n\n signature = new byte[6 + n1 + n2]; // 48 is max. possible length of signature\n signature[0] = (byte) 0x30; // ASN1 SEQUENCE tag\n signature[1] = (byte) (4 + n1 + n2); // total length of two INTEGERs\n signature[2] = (byte) 0x02; // ASN1 INTEGER tag\n signature[3] = (byte) n1; // length of r\n signature[4 + n1] = (byte) 0x02; // ASN1 INTEGER tag\n signature[5 + n1] = (byte) n2; // length of s\n\n if (n1 == rBytes.length) {\n n = 4;\n } else {\n n = 5;\n }\n System.arraycopy(rBytes, 0, signature, n, rBytes.length);\n\n if (n2 == sBytes.length) {\n n = 6 + n1;\n } else {\n n = 7 + n1;\n }\n System.arraycopy(sBytes, 0, signature, n, sBytes.length);\n\n return signature;\n }\n\n /**\n * Updates data to sign or to verify.\n *\n * @params\n * b byte to update\n * @throws\n * SignatureException if object was not initialized for signing or verifying\n */\n protected void engineUpdate(byte b) throws SignatureException {\n\n msgDigest.update(b);\n }\n\n /**\n * Updates data to sign or to verify.\n *\n * @params\n * b byte array containing bytes to update\n * @params\n * off offset in byte array to start from\n * @params\n * len number of bytes to use for updating\n * @throws\n * SignatureException if object was not initialized for signing or verifying\n */\n protected void engineUpdate(byte[] b, int off, int len)\n throws SignatureException {\n\n msgDigest.update(b, off, len);\n }\n\n private boolean checkSignature(byte[] sigBytes, int offset, int length)\n throws SignatureException {\n\n // names of below BigIntegers are the same as they are defined in DSA standard\n BigInteger r, s, w;\n BigInteger u1, u2, v;\n\n // parameters and public key\n BigInteger p, q, g, y;\n\n DSAParams params;\n\n int n1, n2;\n\n byte[] bytes;\n byte[] digest;\n\n // checking up on signature's ASN1\n try {\n byte dummy;\n n1 = sigBytes[offset + 3];\n n2 = sigBytes[offset + n1 + 5];\n\n if (sigBytes[offset + 0] != 0x30 || sigBytes[offset + 2] != 2\n || sigBytes[offset + n1 + 4] != 2\n || sigBytes[offset + 1] != (n1 + n2 + 4) || n1 > 21\n || n2 > 21\n || (length != 0 && (sigBytes[offset + 1] + 2) > length)) {\n throw new SignatureException(\"signature bytes have invalid encoding\");\n }\n\n dummy = sigBytes[5 + n1 + n2]; // to check length of sigBytes\n } catch (ArrayIndexOutOfBoundsException e) {\n throw new SignatureException(\"bad argument: byte[] is too small\");\n }\n\n digest = msgDigest.digest();\n\n bytes = new byte[n1];\n System.arraycopy(sigBytes, offset + 4, bytes, 0, n1);\n r = new BigInteger(bytes);\n\n bytes = new byte[n2];\n System.arraycopy(sigBytes, offset + 6 + n1, bytes, 0, n2);\n s = new BigInteger(bytes);\n\n params = dsaKey.getParams();\n p = params.getP();\n q = params.getQ();\n g = params.getG();\n y = ((DSAPublicKey) dsaKey).getY();\n\n // forming signature according algorithm described in chapter 6 of DSA standard\n\n if (r.signum() != 1 || r.compareTo(q) != -1 || s.signum() != 1\n || s.compareTo(q) != -1) {\n return false;\n }\n\n w = s.modInverse(q);\n\n u1 = (new BigInteger(1, digest)).multiply(w).mod(q);\n u2 = r.multiply(w).mod(q);\n\n v = g.modPow(u1, p).multiply(y.modPow(u2, p)).mod(p).mod(q);\n\n if (v.compareTo(r) != 0) {\n return false;\n }\n return true;\n }\n\n /**\n * Verifies the signature bytes.\n *\n * @params\n * sigBytes byte array with signature bytes to verify.\n * @return\n * true if signature bytes were verified, false otherwise\n * @throws\n * SignatureException if object's state is not VERIFY or\n * signature format is not ASN1 representation or\n * signature algorithm cannot process data\n */\n protected boolean engineVerify(byte[] sigBytes) throws SignatureException {\n if (sigBytes == null) {\n throw new NullPointerException(\"sigBytes == null\");\n }\n\n return checkSignature(sigBytes, 0, 0);\n }\n\n /**\n * Verifies the signature bytes.\n *\n * @params\n * sigBytes byte array with signature bytes to verify.\n * @params\n * offset index in sigBytes to start from\n * @params\n * length number of bytes allotted for signature\n * @return\n * true if signature bytes were verified, false otherwise\n * @throws\n * SignatureException if object's state is not VERIFY or\n * signature format is not ASN1 representation or\n * signature algorithm cannot process data\n */\n protected boolean engineVerify(byte[] sigBytes, int offset, int length)\n throws SignatureException {\n return checkSignature(sigBytes, offset, length);\n }\n}\n"} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<LinearLayout xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:layout_width=\"match_parent\"\n android:layout_height=\"match_parent\"\n android:orientation=\"vertical\"\n android:padding=\"10dp\">\n\n <TextView\n android:id=\"@+id/tv_name\"\n android:layout_width=\"wrap_content\"\n android:layout_height=\"wrap_content\"\n android:textSize=\"18sp\" />\n\n <TextView\n android:id=\"@+id/tv_desc\"\n android:layout_width=\"wrap_content\"\n android:layout_height=\"wrap_content\"\n android:textSize=\"16sp\" />\n</LinearLayout>"} +{"text": "//\n// AppDelegate.h\n// TestApp\n//\n// Created by Benjawan Tanarattanakorn on 10/21/13.\n// Copyright (c) 2013 __MyCompanyName__. All rights reserved.\n//\n\n#import <Cocoa/Cocoa.h>\n\n@interface AppDelegate : NSObject <NSApplicationDelegate>\n\n@property (assign) IBOutlet NSWindow *window;\n\n@end\n"} +{"text": "/*\n * Copyright © 2020 Lisk Foundation\n *\n * See the LICENSE file at the top-level directory of this distribution\n * for licensing information.\n *\n * Unless otherwise agreed in a custom licensing agreement with the Lisk Foundation,\n * no part of this software, including this file, may be copied, modified,\n * propagated, or distributed except according to the terms contained in the\n * LICENSE file.\n *\n * Removal or modification of this copyright notice is prohibited.\n */\n\nimport {\n\tErrorObject,\n\tLiskValidationError,\n\tvalidator,\n\tliskSchemaIdentifier,\n} from '@liskhq/lisk-validator';\nimport { objects as objectUtils } from '@liskhq/lisk-utils';\nimport { generateKey } from './utils';\nimport { readObject, writeObject } from './collection';\n\nimport {\n\tSchema,\n\tCompiledSchema,\n\tCompiledSchemas,\n\tCompiledSchemasArray,\n\tGenericObject,\n\tIteratableGenericObject,\n\tValidatedSchema,\n\tSchemaProps,\n} from './types';\n\nimport { iterator, recursiveTypeCast } from './json_wrapper';\n\nexport const validateSchema = (schema: {\n\t// eslint-disable-next-line\n\t[key: string]: any;\n\t$schema?: string;\n\t$id?: string;\n}): boolean => {\n\t// TODO: https://github.com/ajv-validator/ajv/issues/1221\n\t//\n\t// Ajv compiles schema and cache it when either \"validate\" or \"compile\" called\n\t//\n\t// Due to issue mentioned above we have to compile the schema\n\t// manually our self. That requires to clear the cache manually so\n\t// any subsequent request to validate or compile may not fail.\n\t//\n\t// We have to clear cache once on start and once at the end\n\t// to cover both cases in which order \"validate\" or \"compile\"\n\t// is called from main code.\n\n\tvalidator.removeSchema(schema.$id);\n\n\tconst schemaToValidate = {\n\t\t...schema,\n\t\t$schema: schema.$schema ?? liskSchemaIdentifier,\n\t};\n\n\tconst errors: ReadonlyArray<ErrorObject> = validator.validateSchema(schemaToValidate);\n\n\tif (errors.length) {\n\t\t// eslint-disable-next-line @typescript-eslint/no-unsafe-call\n\t\tthrow new LiskValidationError([...errors]);\n\t}\n\n\ttry {\n\t\t// To validate keyword schema we have to compile it\n\t\t// Ajv `validateSchema` does not validate keyword meta schema\n\t\t// https://github.com/ajv-validator/ajv/issues/1221\n\t\tvalidator.compile(schemaToValidate);\n\t} finally {\n\t\tvalidator.removeSchema(schema.$id);\n\t}\n\n\treturn true;\n};\n\nexport class Codec {\n\tprivate readonly _compileSchemas: CompiledSchemas = {};\n\n\tpublic addSchema(schema: Schema): boolean {\n\t\tvalidateSchema(schema);\n\n\t\tconst schemaName = schema.$id;\n\t\tthis._compileSchemas[schemaName] = this._compileSchema(schema as ValidatedSchema, [], []);\n\n\t\treturn true;\n\t}\n\n\tpublic encode(schema: Schema, message: object): Buffer {\n\t\tif (this._compileSchemas[schema.$id] === undefined) {\n\t\t\tthis.addSchema(schema);\n\t\t}\n\n\t\tconst compiledSchema = this._compileSchemas[schema.$id];\n\t\tconst res = writeObject(compiledSchema, message as GenericObject, []);\n\t\treturn Buffer.concat(res[0]);\n\t}\n\n\tpublic decode<T>(schema: Schema, message: Buffer): T {\n\t\tif (this._compileSchemas[schema.$id] === undefined) {\n\t\t\tthis.addSchema(schema);\n\t\t}\n\t\tconst compiledSchema = this._compileSchemas[schema.$id];\n\t\tconst [res] = readObject(message, 0, compiledSchema, message.length);\n\n\t\treturn (res as unknown) as T;\n\t}\n\n\t// For performance applications use decode() instead!\n\tpublic decodeJSON<T>(schema: Schema, message: Buffer): T {\n\t\tconst decodedMessage: IteratableGenericObject = this.decode(schema, message);\n\n\t\tconst jsonMessageAsObject = this.toJSON(schema, decodedMessage);\n\t\treturn (jsonMessageAsObject as unknown) as T;\n\t}\n\n\t// For performance applications use encode() instead!\n\tpublic encodeJSON(schema: Schema, message: object): Buffer {\n\t\tconst objectFromJson = this.fromJSON(schema, message);\n\t\treturn this.encode(schema, objectFromJson);\n\t}\n\n\t// eslint-disable-next-line class-methods-use-this\n\tpublic toJSON<T = object>(schema: Schema, message: object): T {\n\t\tconst messageCopy = objectUtils.cloneDeep(message);\n\t\t(messageCopy as IteratableGenericObject)[Symbol.iterator] = iterator;\n\n\t\trecursiveTypeCast(\n\t\t\t'toJSON',\n\t\t\tmessageCopy as IteratableGenericObject,\n\t\t\t(schema as unknown) as SchemaProps,\n\t\t\t[],\n\t\t);\n\t\treturn (messageCopy as unknown) as T;\n\t}\n\n\t// eslint-disable-next-line class-methods-use-this\n\tpublic fromJSON<T = object>(schema: Schema, message: object): T {\n\t\tconst messageCopy = objectUtils.cloneDeep(message);\n\t\t(messageCopy as IteratableGenericObject)[Symbol.iterator] = iterator;\n\n\t\trecursiveTypeCast(\n\t\t\t'fromJSON',\n\t\t\tmessageCopy as IteratableGenericObject,\n\t\t\t(schema as unknown) as SchemaProps,\n\t\t\t[],\n\t\t);\n\t\treturn (messageCopy as unknown) as T;\n\t}\n\n\tprivate _compileSchema(\n\t\tschema: ValidatedSchema | SchemaProps,\n\t\tcompiledSchema: CompiledSchemasArray,\n\t\tdataPath: string[],\n\t): CompiledSchemasArray {\n\t\tif (schema.type === 'object') {\n\t\t\tconst { properties } = schema;\n\t\t\tif (properties === undefined) {\n\t\t\t\tthrow new Error('Invalid schema. Missing \"properties\" property');\n\t\t\t}\n\t\t\tconst currentDepthSchema = Object.entries(properties).sort(\n\t\t\t\t(a, b) => a[1].fieldNumber - b[1].fieldNumber,\n\t\t\t);\n\n\t\t\tfor (let i = 0; i < currentDepthSchema.length; i += 1) {\n\t\t\t\tconst [schemaPropertyName, schemaPropertyValue] = currentDepthSchema[i];\n\t\t\t\tif (schemaPropertyValue.type === 'object') {\n\t\t\t\t\t// Object recursive case\n\t\t\t\t\tdataPath.push(schemaPropertyName);\n\t\t\t\t\tconst nestedSchema = [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tpropertyName: schemaPropertyName,\n\t\t\t\t\t\t\tschemaProp: {\n\t\t\t\t\t\t\t\ttype: schemaPropertyValue.type,\n\t\t\t\t\t\t\t\tfieldNumber: schemaPropertyValue.fieldNumber,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\tdataPath: [...dataPath],\n\t\t\t\t\t\t\tbinaryKey: generateKey(schemaPropertyValue),\n\t\t\t\t\t\t},\n\t\t\t\t\t];\n\t\t\t\t\tconst res = this._compileSchema(schemaPropertyValue, nestedSchema, dataPath);\n\t\t\t\t\tcompiledSchema.push(res as CompiledSchema[]);\n\t\t\t\t\tdataPath.pop();\n\t\t\t\t} else if (schemaPropertyValue.type === 'array') {\n\t\t\t\t\t// Array recursive case\n\t\t\t\t\tif (schemaPropertyValue.items === undefined) {\n\t\t\t\t\t\tthrow new Error('Invalid schema. Missing \"items\" property for Array schema');\n\t\t\t\t\t}\n\t\t\t\t\tdataPath.push(schemaPropertyName);\n\t\t\t\t\tif (schemaPropertyValue.items.type === 'object') {\n\t\t\t\t\t\tconst nestedSchema = [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpropertyName: schemaPropertyName,\n\t\t\t\t\t\t\t\tschemaProp: {\n\t\t\t\t\t\t\t\t\ttype: 'object',\n\t\t\t\t\t\t\t\t\tfieldNumber: schemaPropertyValue.fieldNumber,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdataPath: [...dataPath],\n\t\t\t\t\t\t\t\tbinaryKey: generateKey(schemaPropertyValue),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t];\n\t\t\t\t\t\tconst res = this._compileSchema(schemaPropertyValue.items, nestedSchema, dataPath);\n\t\t\t\t\t\tcompiledSchema.push([\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpropertyName: schemaPropertyName,\n\t\t\t\t\t\t\t\tschemaProp: {\n\t\t\t\t\t\t\t\t\ttype: schemaPropertyValue.type,\n\t\t\t\t\t\t\t\t\tfieldNumber: schemaPropertyValue.fieldNumber,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdataPath: [...dataPath],\n\t\t\t\t\t\t\t\tbinaryKey: generateKey(schemaPropertyValue),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t(res as unknown) as CompiledSchema,\n\t\t\t\t\t\t]);\n\t\t\t\t\t\tdataPath.pop();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcompiledSchema.push([\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpropertyName: schemaPropertyName,\n\t\t\t\t\t\t\t\tschemaProp: {\n\t\t\t\t\t\t\t\t\ttype: schemaPropertyValue.type,\n\t\t\t\t\t\t\t\t\tfieldNumber: schemaPropertyValue.fieldNumber,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdataPath: [...dataPath],\n\t\t\t\t\t\t\t\tbinaryKey: generateKey(schemaPropertyValue),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tpropertyName: schemaPropertyName,\n\t\t\t\t\t\t\t\tschemaProp: {\n\t\t\t\t\t\t\t\t\tdataType: schemaPropertyValue.items.dataType,\n\t\t\t\t\t\t\t\t\tfieldNumber: schemaPropertyValue.fieldNumber,\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\tdataPath: [...dataPath],\n\t\t\t\t\t\t\t\tbinaryKey: generateKey(schemaPropertyValue),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t]);\n\t\t\t\t\t\tdataPath.pop();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// Base case\n\t\t\t\t\tcompiledSchema.push({\n\t\t\t\t\t\tpropertyName: schemaPropertyName,\n\t\t\t\t\t\tschemaProp: schemaPropertyValue,\n\t\t\t\t\t\tdataPath: [...dataPath],\n\t\t\t\t\t\tbinaryKey: generateKey(schemaPropertyValue),\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn compiledSchema;\n\t}\n}\n\nexport const codec = new Codec();\n"} +{"text": "/* Yet Another Forum.NET\r\n * Copyright (C) 2003-2005 Bjørnar Henden\r\n * Copyright (C) 2006-2013 Jaben Cargman\r\n * Copyright (C) 2014-2020 Ingo Herbote\r\n * https://www.yetanotherforum.net/\r\n * \r\n * Licensed to the Apache Software Foundation (ASF) under one\r\n * or more contributor license agreements. See the NOTICE file\r\n * distributed with this work for additional information\r\n * regarding copyright ownership. The ASF licenses this file\r\n * to you under the Apache License, Version 2.0 (the\r\n * \"License\"); you may not use this file except in compliance\r\n * with the License. You may obtain a copy of the License at\r\n\r\n * https://www.apache.org/licenses/LICENSE-2.0\r\n\r\n * Unless required by applicable law or agreed to in writing,\r\n * software distributed under the License is distributed on an\r\n * \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n * KIND, either express or implied. See the License for the\r\n * specific language governing permissions and limitations\r\n * under the License.\r\n */\r\nnamespace YAF.Types.Interfaces\r\n{\r\n using System.Collections.Generic;\r\n using System.Threading.Tasks;\r\n\r\n using YAF.Types.Objects;\r\n\r\n /// <summary>\r\n /// The Search interface\r\n /// </summary>\r\n public interface ISearch\r\n {\r\n #region Public Methods\r\n\r\n /// <summary>\r\n /// Optimizes the Search Index\r\n /// </summary>\r\n void Optimize();\r\n\r\n /// <summary>\r\n /// Clears the search Index.\r\n /// </summary>\r\n /// <returns>Returns if clearing was successful</returns>\r\n bool ClearSearchIndex();\r\n\r\n /// <summary>\r\n /// Delete Search Index Record by Message Id.\r\n /// </summary>\r\n /// <param name=\"messageId\">\r\n /// The message id.\r\n /// </param>\r\n void DeleteSearchIndexRecordByMessageId(int messageId);\r\n\r\n /// <summary>\r\n /// Delete Search Index Record by Topic Id.\r\n /// </summary>\r\n /// <param name=\"topicId\">\r\n /// The topic Id.\r\n /// </param>\r\n void DeleteSearchIndexRecordByTopicId(int topicId);\r\n\r\n /// <summary>\r\n /// Adds the search index\r\n /// </summary>\r\n /// <param name=\"messageList\">\r\n /// The message list.\r\n /// </param>\r\n /// <returns>\r\n /// The <see cref=\"Task\"/>.\r\n /// </returns>\r\n Task AddSearchIndexAsync(IEnumerable<SearchMessage> messageList);\r\n\r\n /// <summary>\r\n /// The add search index item.\r\n /// </summary>\r\n /// <param name=\"message\">\r\n /// The message.\r\n /// </param>\r\n void AddSearchIndexItem(SearchMessage message);\r\n\r\n /// <summary>\r\n /// Updates the Search Index Item or if not found adds it.\r\n /// </summary>\r\n /// <param name=\"message\">\r\n /// The message.\r\n /// </param>\r\n /// <param name=\"dispose\">\r\n /// Dispose IndexWriter after updating?\r\n /// </param>\r\n void UpdateSearchIndexItem(SearchMessage message, bool dispose = false);\r\n\r\n /// <summary>\r\n /// Searches the specified user identifier.\r\n /// </summary>\r\n /// <param name=\"forumId\">The forum identifier.</param>\r\n /// <param name=\"userId\">The user identifier.</param>\r\n /// <param name=\"input\">The input.</param>\r\n /// <param name=\"fieldName\">Name of the field.</param>\r\n /// <returns>\r\n /// Returns the search results\r\n /// </returns>\r\n List<SearchMessage> DoSearch(int forumId, int userId, string input, string fieldName = \"\");\r\n\r\n /// <summary>\r\n /// Searches for similar words\r\n /// </summary>\r\n /// <param name=\"userId\">\r\n /// The user identifier.\r\n /// </param>\r\n /// <param name=\"filter\">\r\n /// The filter.\r\n /// </param>\r\n /// <param name=\"input\">\r\n /// The input.\r\n /// </param>\r\n /// <param name=\"fieldName\">\r\n /// Name of the field.\r\n /// </param>\r\n /// <returns>\r\n /// Returns the list of search results.\r\n /// </returns>\r\n List<SearchMessage> SearchSimilar(int userId, string filter, string input, string fieldName = \"\");\r\n\r\n /// <summary>\r\n /// Searches the paged.\r\n /// </summary>\r\n /// <param name=\"totalHits\">The total hits.</param>\r\n /// <param name=\"forumId\">The forum identifier.</param>\r\n /// <param name=\"userId\">The user identifier.</param>\r\n /// <param name=\"input\">The input.</param>\r\n /// <param name=\"pageIndex\">Index of the page.</param>\r\n /// <param name=\"pageSize\">Size of the page.</param>\r\n /// <param name=\"fieldName\">Name of the field.</param>\r\n /// <returns>\r\n /// Returns the search results\r\n /// </returns>\r\n List<SearchMessage> SearchPaged(out int totalHits, int forumId, int userId, string input, int pageIndex, int pageSize, string fieldName = \"\");\r\n\r\n /// <summary>\r\n /// Searches the default.\r\n /// </summary>\r\n /// <param name=\"forumId\">The forum identifier.</param>\r\n /// <param name=\"userId\">The user identifier.</param>\r\n /// <param name=\"input\">The input.</param>\r\n /// <param name=\"fieldName\">Name of the field.</param>\r\n /// <returns>\r\n /// Returns the search results\r\n /// </returns>\r\n List<SearchMessage> SearchDefault(int forumId, int userId, string input, string fieldName = \"\");\r\n\r\n #endregion\r\n }\r\n}"} +{"text": "// Boost.Signals library\n\n// Copyright Douglas Gregor 2001-2003. Use, modification and\n// distribution is subject to the Boost Software License, Version\n// 1.0. (See accompanying file LICENSE_1_0.txt or copy at\n// http://www.boost.org/LICENSE_1_0.txt)\n\n// For more information, see http://www.boost.org\n\n#ifndef BOOST_SIGNALS_SIGNAL4_HEADER\n#define BOOST_SIGNALS_SIGNAL4_HEADER\n\n#define BOOST_SIGNALS_NUM_ARGS 4\n#define BOOST_SIGNALS_TEMPLATE_PARMS typename T1, typename T2, typename T3, typename T4\n#define BOOST_SIGNALS_TEMPLATE_ARGS T1, T2, T3, T4\n#define BOOST_SIGNALS_PARMS T1 a1, T2 a2, T3 a3, T4 a4\n#define BOOST_SIGNALS_ARGS a1, a2, a3, a4\n#define BOOST_SIGNALS_BOUND_ARGS args->a1, args->a2, args->a3, args->a4\n#define BOOST_SIGNALS_ARGS_AS_MEMBERS T1 a1;T2 a2;T3 a3;T4 a4;\n#define BOOST_SIGNALS_COPY_PARMS T1 ia1, T2 ia2, T3 ia3, T4 ia4\n#define BOOST_SIGNALS_INIT_ARGS :a1(ia1), a2(ia2), a3(ia3), a4(ia4)\n#define BOOST_SIGNALS_ARG_TYPES typedef T1 arg1_type; typedef T2 arg2_type; typedef T3 arg3_type; typedef T4 arg4_type;\n\n#include <boost/signals/signal_template.hpp>\n\n#undef BOOST_SIGNALS_ARG_TYPES\n#undef BOOST_SIGNALS_INIT_ARGS\n#undef BOOST_SIGNALS_COPY_PARMS\n#undef BOOST_SIGNALS_ARGS_AS_MEMBERS\n#undef BOOST_SIGNALS_BOUND_ARGS\n#undef BOOST_SIGNALS_ARGS\n#undef BOOST_SIGNALS_PARMS\n#undef BOOST_SIGNALS_TEMPLATE_ARGS\n#undef BOOST_SIGNALS_TEMPLATE_PARMS\n#undef BOOST_SIGNALS_NUM_ARGS\n\n#endif // BOOST_SIGNALS_SIGNAL4_HEADER\n"} +{"text": "<!-- START mail-language.inc -->\n\n <div>\n <p>{{Please leave your comments using English, if possible.}}</p>\n </div>\n\n<!-- STOP mail-langauge.inc -->\n"} +{"text": "<?php\n\nnamespace SmoDav\\Mpesa\\C2B;\n\nuse Carbon\\Carbon;\nuse GuzzleHttp\\Exception\\RequestException;\nuse InvalidArgumentException;\nuse SmoDav\\Mpesa\\Repositories\\Endpoint;\nuse SmoDav\\Mpesa\\Traits\\UsesCore;\nuse SmoDav\\Mpesa\\Traits\\Validates;\n\nclass STK\n{\n use UsesCore, Validates;\n\n const CUSTOMER_BUYGOODS_ONLINE = 'CustomerBuyGoodsOnline';\n const CUSTOMER_PAYBILL_ONLINE = 'CustomerPayBillOnline';\n const VALID_COMMANDS = [\n self::CUSTOMER_BUYGOODS_ONLINE,\n self::CUSTOMER_PAYBILL_ONLINE,\n ];\n\n /**\n * The mobile number\n *\n * @var string\n */\n protected $number;\n\n /**\n * The amount to request\n *\n * @var int\n */\n protected $amount;\n\n /**\n * The transaction reference\n *\n * @var string\n */\n protected $reference;\n\n /**\n * The transaction description\n *\n * @var string\n */\n protected $description;\n\n /**\n * The MPesa account to be used.\n *\n * @var string\n */\n protected $account = null;\n\n /**\n * The transaction command to be used.\n *\n * @var string\n */\n protected $command = self::CUSTOMER_PAYBILL_ONLINE;\n\n /**\n * Set the account to be used.\n *\n * @param string $account\n *\n * @return self\n */\n public function usingAccount($account)\n {\n $this->account = $account;\n\n return $this;\n }\n\n /**\n * Set the request amount to be deducted.\n *\n * @param int $amount\n *\n * @return self\n *\n * @throws InvalidArgumentException\n */\n public function request($amount)\n {\n $this->validateAmount($amount);\n\n $this->amount = $amount;\n\n return $this;\n }\n\n /**\n * Set the Mobile Subscriber Number to deduct the amount from.\n * Must be in format 2547XXXXXXXX.\n *\n * @param int $number\n *\n * @return self\n *\n * @throws InvalidArgumentException\n */\n public function from($number)\n {\n $this->validateNumber($number);\n\n $this->number = $number;\n\n return $this;\n }\n\n /**\n * Set the product reference number to bill the account.\n *\n * @param int $reference\n * @param string $description\n *\n * @return self\n */\n public function usingReference($reference, $description)\n {\n $this->reference = $reference;\n $this->description = $description;\n\n return $this;\n }\n\n /**\n * Set the unique command for this transaction type.\n *\n * @param string $command\n *\n * @return self\n *\n * @throws InvalidArgumentException\n */\n public function setCommand($command)\n {\n if (! in_array($command, self::VALID_COMMANDS)) {\n throw new InvalidArgumentException('Invalid command sent');\n }\n\n $this->command = $command;\n\n return $this;\n }\n\n /**\n * Set the properties that require validation.\n *\n * @param string|null $amount\n * @param string|null $number\n * @param string|null $command\n *\n * @return void\n */\n private function set($amount, $number, $command)\n {\n $map = [\n 'amount' => 'request',\n 'number' => 'from',\n 'command' => 'setCommand',\n ];\n\n foreach ($map as $var => $method) {\n if ($$var) {\n call_user_func([$this, $method], $$var);\n }\n }\n }\n\n /**\n * Prepare the STK Push request\n *\n * @param int|null $amount\n * @param int|null $number\n * @param string|null $reference\n * @param string|null $description\n * @param string|null $account\n * @param string|null $command\n *\n * @return mixed\n */\n public function push($amount = null, $number = null, $reference = null, $description = null, $account = null, $command = null)\n {\n $this->set($amount, $number, $command);\n\n $this->core->useAccount($account ?: $this->account);\n $time = Carbon::now()->format('YmdHis');\n\n $paybill = $this->core->configRepository()->getAccountKey('lnmo.paybill');\n $shortCode = $this->core->configRepository()->getAccountKey('lnmo.shortcode');\n $passkey = $this->core->configRepository()->getAccountKey('lnmo.passkey');\n $callback = $this->core->configRepository()->getAccountKey('lnmo.callback');\n\n $partyB = $this->command == self::CUSTOMER_PAYBILL_ONLINE ? $shortCode : $paybill;\n\n $body = [\n 'BusinessShortCode' => $shortCode,\n 'Password' => $this->password($shortCode, $passkey, $time),\n 'Timestamp' => $time,\n 'TransactionType' => $this->command,\n 'Amount' => $this->amount,\n 'PartyA' => $this->number,\n 'PartyB' => $partyB,\n 'PhoneNumber' => $number ?: $this->number,\n 'CallBackURL' => $callback,\n 'AccountReference' => $reference ?: $this->reference,\n 'TransactionDesc' => $description ?: $this->description,\n ];\n\n try {\n $response = $this->clientRequest(\n $body,\n $this->core->configRepository()->url(Endpoint::MPESA_LNMO)\n );\n\n return json_decode($response->getBody());\n } catch (RequestException $exception) {\n return json_decode($exception->getResponse()->getBody());\n }\n }\n\n /**\n * Validate an initialized transaction.\n *\n * @param string $checkoutRequestID\n *\n * @return json\n */\n public function validate($checkoutRequestID, $account = null)\n {\n $this->core->useAccount($account ?: $this->account);\n $time = Carbon::now()->format('YmdHis');\n\n $shortCode = $this->core->configRepository()->getAccountKey('lnmo.shortcode');\n $passkey = $this->core->configRepository()->getAccountKey('lnmo.passkey');\n\n $body = [\n 'BusinessShortCode' => $shortCode,\n 'Password' => $this->password($shortCode, $passkey, $time),\n 'Timestamp' => $time,\n 'CheckoutRequestID' => $checkoutRequestID,\n ];\n\n try {\n $response = $this->clientRequest(\n $body,\n $this->core->configRepository()->url(Endpoint::MPESA_LNMO_VALIDATE)\n );\n\n return json_decode($response->getBody());\n } catch (RequestException $exception) {\n return json_decode($exception->getResponse()->getBody());\n }\n }\n}\n"} +{"text": "#pragma once\n#include \"BaseFunction.h\"\n#include <virtdisk.h>\n#pragma comment(lib,\"VirtDisk.lib\")\n#include <Sddl.h>\n\n_Check_return_ _Success_(return != INVALID_HANDLE_VALUE)\nstatic HANDLE AttachVirtualDisk(\n\t_In_z_ LPCWSTR VirtualDiskPath,\n\t_In_ bool ReadOnly\n\t)\n{\n\tOPEN_VIRTUAL_DISK_PARAMETERS openParameters = {};\n\tVIRTUAL_DISK_ACCESS_MASK accessMask;\n\n\tif (StrCmpI(PathFindExtension(VirtualDiskPath), L\".iso\") == 0)\n\t{\n\t\topenParameters.Version = OPEN_VIRTUAL_DISK_VERSION_1;\n\n\t\taccessMask = VIRTUAL_DISK_ACCESS_READ;\n\t}\n\telse\n\t{\n\t\topenParameters.Version = OPEN_VIRTUAL_DISK_VERSION_2;\n\n\t\topenParameters.Version2.GetInfoOnly = FALSE;\n\n\t\taccessMask = VIRTUAL_DISK_ACCESS_NONE;\n\t}\n\t\n\tHANDLE vhdHandle = INVALID_HANDLE_VALUE;\n\tVIRTUAL_STORAGE_TYPE storageType = { VIRTUAL_STORAGE_TYPE_DEVICE_UNKNOWN };\n\n\n\tauto opStatus = OpenVirtualDisk(\n\n\t\t&storageType,\n\n\t\tVirtualDiskPath,\n\n\t\taccessMask,\n\n\t\tOPEN_VIRTUAL_DISK_FLAG_NONE,\n\n\t\t&openParameters,\n\n\t\t&vhdHandle);\n\n\tif (opStatus)\n\t{\n\t\tSetLastError(opStatus);\n\t\treturn INVALID_HANDLE_VALUE;\n\t}\n\tPSECURITY_DESCRIPTOR sd = NULL;\n\n\tif (!::ConvertStringSecurityDescriptorToSecurityDescriptor(\n\n\t\tL\"O:BAG:BAD:(A;;GA;;;WD)\",\n\n\t\tSDDL_REVISION_1,\n\n\t\t&sd,\n\n\t\tNULL))\n\n\t{\n\n\t\topStatus = ::GetLastError_s();\n\n\t\tgoto Cleanup;\n\t}\n\n\n\tATTACH_VIRTUAL_DISK_PARAMETERS attachParameters = { ATTACH_VIRTUAL_DISK_VERSION_1 };\n\tATTACH_VIRTUAL_DISK_FLAG attachFlags= ReadOnly? (ATTACH_VIRTUAL_DISK_FLAG_NO_DRIVE_LETTER| ATTACH_VIRTUAL_DISK_FLAG_READ_ONLY) : ATTACH_VIRTUAL_DISK_FLAG_NO_DRIVE_LETTER;\n\n\t\n\topStatus = AttachVirtualDisk(\n\n\t\tvhdHandle,\n\n\t\tsd,\n\n\t\tattachFlags,\n\n\t\t0,\n\n\t\t&attachParameters,\n\n\t\tNULL);\n\n\n\n\tif (opStatus != ERROR_SUCCESS)\n\n\t{\n\t\tgoto Cleanup;\n\t}\n\telse\n\t{\n\t\treturn vhdHandle;\n\t}\n\n\nCleanup:\n\tCloseHandle(vhdHandle);\n\tLocalFree(sd);\n\tSetLastError(opStatus);\n\treturn INVALID_HANDLE_VALUE;\n}"} +{"text": "EXPORTS\ndlntest_ordinal @1 NONAME\n"} +{"text": "sha256:37ed686857fe5bfc1335386c7658ffb131cd51eb8569615f23b75c38b603db86\n"} +{"text": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n <PropertyGroup>\n <TargetFramework>netcoreapp2.1</TargetFramework>\n <OutputType>Exe</OutputType>\n <StartupObject>Google.Protobuf.Examples.AddressBook.Program</StartupObject>\n <IsPackable>False</IsPackable>\n </PropertyGroup>\n\n <ItemGroup>\n <ProjectReference Include=\"..\\Google.Protobuf\\Google.Protobuf.csproj\" />\n </ItemGroup>\n\n</Project>\n"} +{"text": "<!doctype html>\n<html class=\"default no-js\">\n<head>\n\t<meta charset=\"utf-8\">\n\t<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n\t<title>SchemaSettingsComponent | Prime CMS</title>\n\t<meta name=\"description\" content=\"\">\n\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\t<link rel=\"stylesheet\" href=\"../assets/css/main.css\">\n</head>\n<body>\n<header>\n\t<div class=\"tsd-page-toolbar\">\n\t\t<div class=\"container\">\n\t\t\t<div class=\"table-wrap\">\n\t\t\t\t<div class=\"table-cell\" id=\"tsd-search\" data-index=\"../assets/js/search.js\" data-base=\"..\">\n\t\t\t\t\t<div class=\"field\">\n\t\t\t\t\t\t<label for=\"tsd-search-field\" class=\"tsd-widget search no-caption\">Search</label>\n\t\t\t\t\t\t<input id=\"tsd-search-field\" type=\"text\" />\n\t\t\t\t\t</div>\n\t\t\t\t\t<ul class=\"results\">\n\t\t\t\t\t\t<li class=\"state loading\">Preparing search index...</li>\n\t\t\t\t\t\t<li class=\"state failure\">The search index is not available</li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t<a href=\"../index.html\" class=\"title\">Prime CMS</a>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"table-cell\" id=\"tsd-widgets\">\n\t\t\t\t\t<div id=\"tsd-filter\">\n\t\t\t\t\t\t<a href=\"#\" class=\"tsd-widget options no-caption\" data-toggle=\"options\">Options</a>\n\t\t\t\t\t\t<div class=\"tsd-filter-group\">\n\t\t\t\t\t\t\t<div class=\"tsd-select\" id=\"tsd-filter-visibility\">\n\t\t\t\t\t\t\t\t<span class=\"tsd-select-label\">All</span>\n\t\t\t\t\t\t\t\t<ul class=\"tsd-select-list\">\n\t\t\t\t\t\t\t\t\t<li data-value=\"public\">Public</li>\n\t\t\t\t\t\t\t\t\t<li data-value=\"protected\">Public/Protected</li>\n\t\t\t\t\t\t\t\t\t<li data-value=\"private\" class=\"selected\">All</li>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"tsd-filter-inherited\" checked />\n\t\t\t\t\t\t\t<label class=\"tsd-widget\" for=\"tsd-filter-inherited\">Inherited</label>\n\t\t\t\t\t\t\t<input type=\"checkbox\" id=\"tsd-filter-only-exported\" />\n\t\t\t\t\t\t\t<label class=\"tsd-widget\" for=\"tsd-filter-only-exported\">Only exported</label>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<a href=\"#\" class=\"tsd-widget menu no-caption\" data-toggle=\"menu\">Menu</a>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\t<div class=\"tsd-page-title\">\n\t\t<div class=\"container\">\n\t\t\t<ul class=\"tsd-breadcrumb\">\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"../index.html\">Globals</a>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"../modules/packages_prime_field_boolean.html\">packages/prime-field-boolean</a>\n\t\t\t\t</li>\n\t\t\t\t<li>\n\t\t\t\t\t<a href=\"packages_prime_field_boolean.schemasettingscomponent.html\">SchemaSettingsComponent</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t\t<h1>Class SchemaSettingsComponent</h1>\n\t\t</div>\n\t</div>\n</header>\n<div class=\"container container-main\">\n\t<div class=\"row\">\n\t\t<div class=\"col-8 col-content\">\n\t\t\t<section class=\"tsd-panel tsd-hierarchy\">\n\t\t\t\t<h3>Hierarchy</h3>\n\t\t\t\t<ul class=\"tsd-hierarchy\">\n\t\t\t\t\t<li>\n\t\t\t\t\t\t<span class=\"tsd-signature-type\">any</span>\n\t\t\t\t\t\t<ul class=\"tsd-hierarchy\">\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<span class=\"target\">SchemaSettingsComponent</span>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</section>\n\t\t\t<section class=\"tsd-panel-group tsd-index-group\">\n\t\t\t\t<h2>Index</h2>\n\t\t\t\t<section class=\"tsd-panel tsd-index-panel\">\n\t\t\t\t\t<div class=\"tsd-index-content\">\n\t\t\t\t\t\t<section class=\"tsd-index-section \">\n\t\t\t\t\t\t\t<h3>Methods</h3>\n\t\t\t\t\t\t\t<ul class=\"tsd-index-list\">\n\t\t\t\t\t\t\t\t<li class=\"tsd-kind-method tsd-parent-kind-class\"><a href=\"packages_prime_field_boolean.schemasettingscomponent.html#render\" class=\"tsd-kind-icon\">render</a></li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</section>\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\t\t\t</section>\n\t\t\t<section class=\"tsd-panel-group tsd-member-group \">\n\t\t\t\t<h2>Methods</h2>\n\t\t\t\t<section class=\"tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class\">\n\t\t\t\t\t<a name=\"render\" class=\"tsd-anchor\"></a>\n\t\t\t\t\t<h3>render</h3>\n\t\t\t\t\t<ul class=\"tsd-signatures tsd-kind-method tsd-parent-kind-class\">\n\t\t\t\t\t\t<li class=\"tsd-signature tsd-kind-icon\">render<span class=\"tsd-signature-symbol\">(</span><span class=\"tsd-signature-symbol\">)</span><span class=\"tsd-signature-symbol\">: </span><span class=\"tsd-signature-type\">any</span></li>\n\t\t\t\t\t</ul>\n\t\t\t\t\t<ul class=\"tsd-descriptions\">\n\t\t\t\t\t\t<li class=\"tsd-description\">\n\t\t\t\t\t\t\t<aside class=\"tsd-sources\">\n\t\t\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t\t\t<li>Defined in <a href=\"https://github.com/birkir/prime/blob/b9b9fc9/packages/prime-field-boolean/src/ui/SchemaSettingsComponent.tsx#L5\">prime-field-boolean/src/ui/SchemaSettingsComponent.tsx:5</a></li>\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t</aside>\n\t\t\t\t\t\t\t<h4 class=\"tsd-returns-title\">Returns <span class=\"tsd-signature-type\">any</span></h4>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t</ul>\n\t\t\t\t</section>\n\t\t\t</section>\n\t\t</div>\n\t\t<div class=\"col-4 col-menu menu-sticky-wrap menu-highlight\">\n\t\t\t<nav class=\"tsd-navigation primary\">\n\t\t\t\t<ul>\n\t\t\t\t\t<li class=\"globals \">\n\t\t\t\t\t\t<a href=\"../index.html\"><em>Globals</em></a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\" tsd-kind-external-module\">\n\t\t\t\t\t\t<a href=\"../modules/packages_prime_core.html\">packages/prime-<wbr>core</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\" tsd-kind-external-module\">\n\t\t\t\t\t\t<a href=\"../modules/packages_prime_field.html\">packages/prime-<wbr>field</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\" tsd-kind-external-module\">\n\t\t\t\t\t\t<a href=\"../modules/packages_prime_field_asset.html\">packages/prime-<wbr>field-<wbr>asset</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\"current tsd-kind-external-module\">\n\t\t\t\t\t\t<a href=\"../modules/packages_prime_field_boolean.html\">packages/prime-<wbr>field-<wbr>boolean</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\" tsd-kind-external-module\">\n\t\t\t\t\t\t<a href=\"../modules/packages_prime_field_datetime.html\">packages/prime-<wbr>field-<wbr>datetime</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\" tsd-kind-external-module\">\n\t\t\t\t\t\t<a href=\"../modules/packages_prime_field_document.html\">packages/prime-<wbr>field-<wbr>document</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\" tsd-kind-external-module\">\n\t\t\t\t\t\t<a href=\"../modules/packages_prime_field_group.html\">packages/prime-<wbr>field-<wbr>group</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\" tsd-kind-external-module\">\n\t\t\t\t\t\t<a href=\"../modules/packages_prime_field_number.html\">packages/prime-<wbr>field-<wbr>number</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\" tsd-kind-external-module\">\n\t\t\t\t\t\t<a href=\"../modules/packages_prime_field_select.html\">packages/prime-<wbr>field-<wbr>select</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\" tsd-kind-external-module\">\n\t\t\t\t\t\t<a href=\"../modules/packages_prime_field_slice.html\">packages/prime-<wbr>field-<wbr>slice</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\" tsd-kind-external-module\">\n\t\t\t\t\t\t<a href=\"../modules/packages_prime_field_string.html\">packages/prime-<wbr>field-<wbr>string</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\" tsd-kind-external-module\">\n\t\t\t\t\t\t<a href=\"../modules/packages_prime_ui.html\">packages/prime-<wbr>ui</a>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</nav>\n\t\t\t<nav class=\"tsd-navigation secondary menu-sticky\">\n\t\t\t\t<ul class=\"before-current\">\n\t\t\t\t\t<li class=\" tsd-kind-class tsd-parent-kind-external-module\">\n\t\t\t\t\t\t<a href=\"packages_prime_field_boolean.inputcomponent.html\" class=\"tsd-kind-icon\">Input<wbr>Component</a>\n\t\t\t\t\t</li>\n\t\t\t\t\t<li class=\" tsd-kind-class tsd-parent-kind-external-module\">\n\t\t\t\t\t\t<a href=\"packages_prime_field_boolean.primefieldboolean.html\" class=\"tsd-kind-icon\">Prime<wbr>Field<wbr>Boolean</a>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t\t<ul class=\"current\">\n\t\t\t\t\t<li class=\"current tsd-kind-class tsd-parent-kind-external-module\">\n\t\t\t\t\t\t<a href=\"packages_prime_field_boolean.schemasettingscomponent.html\" class=\"tsd-kind-icon\">Schema<wbr>Settings<wbr>Component</a>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<li class=\" tsd-kind-method tsd-parent-kind-class\">\n\t\t\t\t\t\t\t\t<a href=\"packages_prime_field_boolean.schemasettingscomponent.html#render\" class=\"tsd-kind-icon\">render</a>\n\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t\t<ul class=\"after-current\">\n\t\t\t\t\t<li class=\" tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported\">\n\t\t\t\t\t\t<a href=\"../interfaces/packages_prime_field_boolean.options.html\" class=\"tsd-kind-icon\">Options</a>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\n\t\t\t</nav>\n\t\t</div>\n\t</div>\n</div>\n<footer class=\"with-border-bottom\">\n\t<div class=\"container\">\n\t\t<h2>Legend</h2>\n\t\t<div class=\"tsd-legend-group\">\n\t\t\t<ul class=\"tsd-legend\">\n\t\t\t\t<li class=\"tsd-kind-module\"><span class=\"tsd-kind-icon\">Module</span></li>\n\t\t\t\t<li class=\"tsd-kind-object-literal\"><span class=\"tsd-kind-icon\">Object literal</span></li>\n\t\t\t\t<li class=\"tsd-kind-variable\"><span class=\"tsd-kind-icon\">Variable</span></li>\n\t\t\t\t<li class=\"tsd-kind-function\"><span class=\"tsd-kind-icon\">Function</span></li>\n\t\t\t\t<li class=\"tsd-kind-function tsd-has-type-parameter\"><span class=\"tsd-kind-icon\">Function with type parameter</span></li>\n\t\t\t\t<li class=\"tsd-kind-index-signature\"><span class=\"tsd-kind-icon\">Index signature</span></li>\n\t\t\t\t<li class=\"tsd-kind-type-alias\"><span class=\"tsd-kind-icon\">Type alias</span></li>\n\t\t\t</ul>\n\t\t\t<ul class=\"tsd-legend\">\n\t\t\t\t<li class=\"tsd-kind-enum\"><span class=\"tsd-kind-icon\">Enumeration</span></li>\n\t\t\t\t<li class=\"tsd-kind-enum-member\"><span class=\"tsd-kind-icon\">Enumeration member</span></li>\n\t\t\t\t<li class=\"tsd-kind-property tsd-parent-kind-enum\"><span class=\"tsd-kind-icon\">Property</span></li>\n\t\t\t\t<li class=\"tsd-kind-method tsd-parent-kind-enum\"><span class=\"tsd-kind-icon\">Method</span></li>\n\t\t\t</ul>\n\t\t\t<ul class=\"tsd-legend\">\n\t\t\t\t<li class=\"tsd-kind-interface\"><span class=\"tsd-kind-icon\">Interface</span></li>\n\t\t\t\t<li class=\"tsd-kind-interface tsd-has-type-parameter\"><span class=\"tsd-kind-icon\">Interface with type parameter</span></li>\n\t\t\t\t<li class=\"tsd-kind-constructor tsd-parent-kind-interface\"><span class=\"tsd-kind-icon\">Constructor</span></li>\n\t\t\t\t<li class=\"tsd-kind-property tsd-parent-kind-interface\"><span class=\"tsd-kind-icon\">Property</span></li>\n\t\t\t\t<li class=\"tsd-kind-method tsd-parent-kind-interface\"><span class=\"tsd-kind-icon\">Method</span></li>\n\t\t\t\t<li class=\"tsd-kind-index-signature tsd-parent-kind-interface\"><span class=\"tsd-kind-icon\">Index signature</span></li>\n\t\t\t</ul>\n\t\t\t<ul class=\"tsd-legend\">\n\t\t\t\t<li class=\"tsd-kind-class\"><span class=\"tsd-kind-icon\">Class</span></li>\n\t\t\t\t<li class=\"tsd-kind-class tsd-has-type-parameter\"><span class=\"tsd-kind-icon\">Class with type parameter</span></li>\n\t\t\t\t<li class=\"tsd-kind-constructor tsd-parent-kind-class\"><span class=\"tsd-kind-icon\">Constructor</span></li>\n\t\t\t\t<li class=\"tsd-kind-property tsd-parent-kind-class\"><span class=\"tsd-kind-icon\">Property</span></li>\n\t\t\t\t<li class=\"tsd-kind-method tsd-parent-kind-class\"><span class=\"tsd-kind-icon\">Method</span></li>\n\t\t\t\t<li class=\"tsd-kind-accessor tsd-parent-kind-class\"><span class=\"tsd-kind-icon\">Accessor</span></li>\n\t\t\t\t<li class=\"tsd-kind-index-signature tsd-parent-kind-class\"><span class=\"tsd-kind-icon\">Index signature</span></li>\n\t\t\t</ul>\n\t\t\t<ul class=\"tsd-legend\">\n\t\t\t\t<li class=\"tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited\"><span class=\"tsd-kind-icon\">Inherited constructor</span></li>\n\t\t\t\t<li class=\"tsd-kind-property tsd-parent-kind-class tsd-is-inherited\"><span class=\"tsd-kind-icon\">Inherited property</span></li>\n\t\t\t\t<li class=\"tsd-kind-method tsd-parent-kind-class tsd-is-inherited\"><span class=\"tsd-kind-icon\">Inherited method</span></li>\n\t\t\t\t<li class=\"tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited\"><span class=\"tsd-kind-icon\">Inherited accessor</span></li>\n\t\t\t</ul>\n\t\t\t<ul class=\"tsd-legend\">\n\t\t\t\t<li class=\"tsd-kind-property tsd-parent-kind-class tsd-is-protected\"><span class=\"tsd-kind-icon\">Protected property</span></li>\n\t\t\t\t<li class=\"tsd-kind-method tsd-parent-kind-class tsd-is-protected\"><span class=\"tsd-kind-icon\">Protected method</span></li>\n\t\t\t\t<li class=\"tsd-kind-accessor tsd-parent-kind-class tsd-is-protected\"><span class=\"tsd-kind-icon\">Protected accessor</span></li>\n\t\t\t</ul>\n\t\t\t<ul class=\"tsd-legend\">\n\t\t\t\t<li class=\"tsd-kind-property tsd-parent-kind-class tsd-is-private\"><span class=\"tsd-kind-icon\">Private property</span></li>\n\t\t\t\t<li class=\"tsd-kind-method tsd-parent-kind-class tsd-is-private\"><span class=\"tsd-kind-icon\">Private method</span></li>\n\t\t\t\t<li class=\"tsd-kind-accessor tsd-parent-kind-class tsd-is-private\"><span class=\"tsd-kind-icon\">Private accessor</span></li>\n\t\t\t</ul>\n\t\t\t<ul class=\"tsd-legend\">\n\t\t\t\t<li class=\"tsd-kind-property tsd-parent-kind-class tsd-is-static\"><span class=\"tsd-kind-icon\">Static property</span></li>\n\t\t\t\t<li class=\"tsd-kind-call-signature tsd-parent-kind-class tsd-is-static\"><span class=\"tsd-kind-icon\">Static method</span></li>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n</footer>\n<div class=\"container tsd-generator\">\n\t<p>Generated using <a href=\"http://typedoc.org/\" target=\"_blank\">TypeDoc</a></p>\n</div>\n<div class=\"overlay\"></div>\n<script src=\"../assets/js/main.js\"></script>\n<script>if (location.protocol == 'file:') document.write('<script src=\"../assets/js/search.js\"><' + '/script>');</script>\n</body>\n</html>"} +{"text": "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n%\n% This file is part of Logtalk <https://logtalk.org/>\n% Copyright 1998-2020 Paulo Moura <pmoura@logtalk.org>\n%\n% Licensed under the Apache License, Version 2.0 (the \"License\");\n% you may not use this file except in compliance with the License.\n% You may obtain a copy of the License at\n%\n% http://www.apache.org/licenses/LICENSE-2.0\n%\n% Unless required by applicable law or agreed to in writing, software\n% distributed under the License is distributed on an \"AS IS\" BASIS,\n% WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n% See the License for the specific language governing permissions and\n% limitations under the License.\n%\n%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n\n\n:- object(tests,\n\textends(lgtunit)).\n\n\t:- info([\n\t\tversion is 1:0:0,\n\t\tauthor is 'Paulo Moura',\n\t\tdate is 2020-07-14,\n\t\tcomment is 'Unit tests for the ISO Prolog standard float_integer_part/1 built-in predicate.'\n\t]).\n\n\t:- uses(lgtunit, [\n\t\top(700, xfx, '=~='), '=~='/2\n\t]).\n\n\t% tests from the Logtalk portability work\n\n\ttest(lgt_float_integer_part_1_01, true(X =~= 0.0)) :-\n\t\t{X is float_integer_part(0.9)}.\n\n\ttest(lgt_float_integer_part_1_02, true(X =~= 9.0)) :-\n\t\t{X is float_integer_part(9.9)}.\n\n\ttest(lgt_float_integer_part_1_03, error(instantiation_error)) :-\n\t\t% try to delay the error to runtime\n\t\tvariable(N),\n\t\t{_X is float_integer_part(N)}.\n\n\ttest(lgt_float_integer_part_1_04, error(type_error(float,9))) :-\n\t\t% try to delay the error to runtime\n\t\t{_X is float_integer_part(9)}.\n\n\ttest(lgt_float_integer_part_1_05, error(type_error(evaluable,foo/0))) :-\n\t\t% try to delay the error to runtime\n\t\tfoo(0, Foo),\n\t\t{_X is float_integer_part(Foo)}.\n\n\ttest(lgt_float_integer_part_1_06, error(type_error(evaluable,foo/1))) :-\n\t\t% try to delay the error to runtime\n\t\tfoo(1, Foo),\n\t\t{_X is float_integer_part(Foo)}.\n\n\t% auxiliary predicates used to delay errors to runtime\n\n\tvariable(_).\n\n\tfoo(0, foo).\n\tfoo(1, foo(1)).\n\n:- end_object.\n"} +{"text": "import * as semver from 'semver'\n\nimport {ActionBase} from './action/base'\n\nconst version = semver.parse(require('../package.json').version)!\n\nexport type Levels = 'fatal' | 'error' | 'warn' | 'info' | 'debug' | 'trace'\n\nexport interface ConfigMessage {\n type: 'config';\n prop: string;\n value: any;\n}\n\nconst g: any = global\nconst globals = g['cli-ux'] || (g['cli-ux'] = {})\n\nconst actionType = (\n Boolean(process.stderr.isTTY) &&\n !process.env.CI &&\n !['dumb', 'emacs-color'].includes(process.env.TERM!) &&\n 'spinner'\n) || 'simple'\n\n/* eslint-disable node/no-missing-require */\nconst Action = actionType === 'spinner' ? require('./action/spinner').default : require('./action/simple').default\nconst PrideAction = actionType === 'spinner' ? require('./action/pride-spinner').default : require('./action/simple').default\n/* eslint-enable node/no-missing-require */\n\nexport class Config {\n outputLevel: Levels = 'info'\n\n action: ActionBase = new Action()\n\n prideAction: ActionBase = new PrideAction()\n\n errorsHandled = false\n\n showStackTrace = true\n\n get debug(): boolean {\n return globals.debug || process.env.DEBUG === '*'\n }\n\n set debug(v: boolean) {\n globals.debug = v\n }\n\n get context(): any {\n return globals.context || {}\n }\n\n set context(v: any) {\n globals.context = v\n }\n}\n\nfunction fetch() {\n if (globals[version.major]) return globals[version.major]\n globals[version.major] = new Config()\n return globals[version.major]\n}\n\nexport const config: Config = fetch()\nexport default config\n"} +{"text": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"metadata\": {},\n \"outputs\": [\n {\n \"name\": \"stdout\",\n \"output_type\": \"stream\",\n \"text\": [\n \"0.7.0+10.gdcb0002.dirty\\n\"\n ]\n }\n ],\n \"source\": [\n \"import os\\n\",\n \"import folium\\n\",\n \"\\n\",\n \"print(folium.__version__)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"metadata\": {},\n \"outputs\": [\n {\n \"data\": {\n \"text/html\": [\n \"<div style=\\\"width:100%;\\\"><div style=\\\"position:relative;width:100%;height:0;padding-bottom:60%;\\\"><iframe src=\\\"data:text/html;charset=utf-8;base64,PCFET0NUWVBFIGh0bWw+CjxoZWFkPiAgICAKICAgIDxtZXRhIGh0dHAtZXF1aXY9ImNvbnRlbnQtdHlwZSIgY29udGVudD0idGV4dC9odG1sOyBjaGFyc2V0PVVURi04IiAvPgogICAgPHNjcmlwdD5MX1BSRUZFUl9DQU5WQVM9ZmFsc2U7IExfTk9fVE9VQ0g9ZmFsc2U7IExfRElTQUJMRV8zRD1mYWxzZTs8L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS4zLjQvZGlzdC9sZWFmbGV0LmpzIj48L3NjcmlwdD4KICAgIDxzY3JpcHQgc3JjPSJodHRwczovL2FqYXguZ29vZ2xlYXBpcy5jb20vYWpheC9saWJzL2pxdWVyeS8xLjExLjEvanF1ZXJ5Lm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3RyYXAvMy4yLjAvanMvYm9vdHN0cmFwLm1pbi5qcyI+PC9zY3JpcHQ+CiAgICA8c2NyaXB0IHNyYz0iaHR0cHM6Ly9jZG5qcy5jbG91ZGZsYXJlLmNvbS9hamF4L2xpYnMvTGVhZmxldC5hd2Vzb21lLW1hcmtlcnMvMi4wLjIvbGVhZmxldC5hd2Vzb21lLW1hcmtlcnMuanMiPjwvc2NyaXB0PgogICAgPGxpbmsgcmVsPSJzdHlsZXNoZWV0IiBocmVmPSJodHRwczovL2Nkbi5qc2RlbGl2ci5uZXQvbnBtL2xlYWZsZXRAMS4zLjQvZGlzdC9sZWFmbGV0LmNzcyIvPgogICAgPGxpbmsgcmVsPSJzdHlsZXNoZWV0IiBocmVmPSJodHRwczovL21heGNkbi5ib290c3RyYXBjZG4uY29tL2Jvb3RzdHJhcC8zLjIuMC9jc3MvYm9vdHN0cmFwLm1pbi5jc3MiLz4KICAgIDxsaW5rIHJlbD0ic3R5bGVzaGVldCIgaHJlZj0iaHR0cHM6Ly9tYXhjZG4uYm9vdHN0cmFwY2RuLmNvbS9ib290c3RyYXAvMy4yLjAvY3NzL2Jvb3RzdHJhcC10aGVtZS5taW4uY3NzIi8+CiAgICA8bGluayByZWw9InN0eWxlc2hlZXQiIGhyZWY9Imh0dHBzOi8vbWF4Y2RuLmJvb3RzdHJhcGNkbi5jb20vZm9udC1hd2Vzb21lLzQuNi4zL2Nzcy9mb250LWF3ZXNvbWUubWluLmNzcyIvPgogICAgPGxpbmsgcmVsPSJzdHlsZXNoZWV0IiBocmVmPSJodHRwczovL2NkbmpzLmNsb3VkZmxhcmUuY29tL2FqYXgvbGlicy9MZWFmbGV0LmF3ZXNvbWUtbWFya2Vycy8yLjAuMi9sZWFmbGV0LmF3ZXNvbWUtbWFya2Vycy5jc3MiLz4KICAgIDxsaW5rIHJlbD0ic3R5bGVzaGVldCIgaHJlZj0iaHR0cHM6Ly9yYXdjZG4uZ2l0aGFjay5jb20vcHl0aG9uLXZpc3VhbGl6YXRpb24vZm9saXVtL21hc3Rlci9mb2xpdW0vdGVtcGxhdGVzL2xlYWZsZXQuYXdlc29tZS5yb3RhdGUuY3NzIi8+CiAgICA8c3R5bGU+aHRtbCwgYm9keSB7d2lkdGg6IDEwMCU7aGVpZ2h0OiAxMDAlO21hcmdpbjogMDtwYWRkaW5nOiAwO308L3N0eWxlPgogICAgPHN0eWxlPiNtYXAge3Bvc2l0aW9uOmFic29sdXRlO3RvcDowO2JvdHRvbTowO3JpZ2h0OjA7bGVmdDowO308L3N0eWxlPgogICAgCiAgICA8bWV0YSBuYW1lPSJ2aWV3cG9ydCIgY29udGVudD0id2lkdGg9ZGV2aWNlLXdpZHRoLAogICAgICAgIGluaXRpYWwtc2NhbGU9MS4wLCBtYXhpbXVtLXNjYWxlPTEuMCwgdXNlci1zY2FsYWJsZT1ubyIgLz4KICAgIDxzdHlsZT4jbWFwXzVhNmRlOGFmYjU0YjQwOGFhMTljYmY2N2ZkODk1OTYyIHsKICAgICAgICBwb3NpdGlvbjogcmVsYXRpdmU7CiAgICAgICAgd2lkdGg6IDEwMC4wJTsKICAgICAgICBoZWlnaHQ6IDEwMC4wJTsKICAgICAgICBsZWZ0OiAwLjAlOwogICAgICAgIHRvcDogMC4wJTsKICAgICAgICB9CiAgICA8L3N0eWxlPgo8L2hlYWQ+Cjxib2R5PiAgICAKICAgIAogICAgPGRpdiBjbGFzcz0iZm9saXVtLW1hcCIgaWQ9Im1hcF81YTZkZThhZmI1NGI0MDhhYTE5Y2JmNjdmZDg5NTk2MiIgPjwvZGl2Pgo8L2JvZHk+CjxzY3JpcHQ+ICAgIAogICAgCiAgICAKICAgICAgICB2YXIgYm91bmRzID0gbnVsbDsKICAgIAoKICAgIHZhciBtYXBfNWE2ZGU4YWZiNTRiNDA4YWExOWNiZjY3ZmQ4OTU5NjIgPSBMLm1hcCgKICAgICAgICAnbWFwXzVhNmRlOGFmYjU0YjQwOGFhMTljYmY2N2ZkODk1OTYyJywgewogICAgICAgIGNlbnRlcjogWzIyLjUsIC0xMTVdLAogICAgICAgIHpvb206IDQsCiAgICAgICAgbWF4Qm91bmRzOiBib3VuZHMsCiAgICAgICAgbGF5ZXJzOiBbXSwKICAgICAgICB3b3JsZENvcHlKdW1wOiBmYWxzZSwKICAgICAgICBjcnM6IEwuQ1JTLkVQU0czODU3LAogICAgICAgIHpvb21Db250cm9sOiB0cnVlLAogICAgICAgIH0pOwoKCiAgICAKICAgIHZhciB0aWxlX2xheWVyX2M3OWQ1NDYzNmVhYTQ5NzhhNGNhMGViMmNjNTY5OWJkID0gTC50aWxlTGF5ZXIoCiAgICAgICAgJ2h0dHBzOi8ve3N9LnRpbGUub3BlbnN0cmVldG1hcC5vcmcve3p9L3t4fS97eX0ucG5nJywKICAgICAgICB7CiAgICAgICAgImF0dHJpYnV0aW9uIjogbnVsbCwKICAgICAgICAiZGV0ZWN0UmV0aW5hIjogZmFsc2UsCiAgICAgICAgIm1heE5hdGl2ZVpvb20iOiAxOCwKICAgICAgICAibWF4Wm9vbSI6IDE4LAogICAgICAgICJtaW5ab29tIjogMCwKICAgICAgICAibm9XcmFwIjogZmFsc2UsCiAgICAgICAgIm9wYWNpdHkiOiAxLAogICAgICAgICJzdWJkb21haW5zIjogImFiYyIsCiAgICAgICAgInRtcyI6IGZhbHNlCn0pLmFkZFRvKG1hcF81YTZkZThhZmI1NGI0MDhhYTE5Y2JmNjdmZDg5NTk2Mik7CiAgICAKICAgICAgICAgICAgICAgIHZhciB2aWRlb19vdmVybGF5X2Y4NjE4MjAyYTUzZDQ1MDJiNjZhY2I1Y2U4M2RiM2MzID0gTC52aWRlb092ZXJsYXkoCiAgICAgICAgICAgICAgICAgICAgJ2h0dHBzOi8vd3d3Lm1hcGJveC5jb20vYml0ZXMvMDAxODgvcGF0cmljaWFfbmFzYS53ZWJtJywKICAgICAgICAgICAgICAgICAgICBbWzMyLCAtMTMwXSwgWzEzLCAtMTAwXV0sCiAgICAgICAgICAgICAgICAgICAgeyJvcGFjaXR5IjogMC42NSwgImF0dHJpYnV0aW9uIjogIlZpZGVvIGZyb20gcGF0cmljaWFfbmFzYSIsICJsb29wIjogZmFsc2UsICJhdXRvcGxheSI6IHRydWV9CiAgICAgICAgICAgICAgICAgICAgKS5hZGRUbyhtYXBfNWE2ZGU4YWZiNTRiNDA4YWExOWNiZjY3ZmQ4OTU5NjIpOwogICAgICAgICAgICAKPC9zY3JpcHQ+\\\" style=\\\"position:absolute;width:100%;height:100%;left:0;top:0;border:none !important;\\\" allowfullscreen webkitallowfullscreen mozallowfullscreen></iframe></div></div>\"\n ],\n \"text/plain\": [\n \"<folium.folium.Map at 0x7fa5b734a1d0>\"\n ]\n },\n \"execution_count\": 2,\n \"metadata\": {},\n \"output_type\": \"execute_result\"\n }\n ],\n \"source\": [\n \"m = folium.Map(location=[22.5, -115], zoom_start=4)\\n\",\n \"\\n\",\n \"video = folium.raster_layers.VideoOverlay(\\n\",\n \" video_url='https://www.mapbox.com/bites/00188/patricia_nasa.webm',\\n\",\n \" bounds=[[32, -130], [13, -100]],\\n\",\n \" opacity=0.65,\\n\",\n \" attr='Video from patricia_nasa',\\n\",\n \" autoplay=True,\\n\",\n \" loop=False,\\n\",\n \")\\n\",\n \"\\n\",\n \"video.add_to(m)\\n\",\n \"\\n\",\n \"m.save(os.path.join('results', 'VideoOverlayLayer.html'))\\n\",\n \"\\n\",\n \"m\"\n ]\n }\n ],\n \"metadata\": {\n \"_draft\": {\n \"nbviewer_url\": \"https://gist.github.com/629da6f621481ed4d513258d2ec64589\"\n },\n \"gist\": {\n \"data\": {\n \"description\": \"folium video test\",\n \"public\": true\n },\n \"id\": \"629da6f621481ed4d513258d2ec64589\"\n },\n \"kernelspec\": {\n \"display_name\": \"Python 3\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.7.1\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 2\n}\n"} +{"text": "object HelloWorld extends App {\n println(\"Hello World\\n\")\n}\n"} +{"text": "fileFormatVersion: 2\nguid: 286e431bafbe42cf84715c6ac7aa6789\nMonoImporter:\n externalObjects: {}\n serializedVersion: 2\n defaultReferences: []\n executionOrder: 0\n icon: {fileID: 2800000, guid: 961230b29c294bb780054c5d02eb6180, type: 3}\n userData: \n assetBundleName: \n assetBundleVariant: \n"} +{"text": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <title>SnappySnippet</title>\n\n <meta charset=\"utf-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n\n <link href=\"css/bootstrap/css/bootstrap.css\" rel=\"stylesheet\">\n <link href=\"css/css/flat-ui.css\" rel=\"stylesheet\">\n <link href=\"css/panel.css\" rel=\"stylesheet\">\n</head>\n<body>\n\n<div class=\"container\">\n <div class=\"row\" id='main-button-row'>\n <div class=\"col-xs-12\">\n <div id='error-box'>\n <div class='alert alert-danger'><p><span class=\"fui-cross\"></span> <strong>Error!</strong> <span class='error-message'></span></p></div>\n </div>\n <button id='create' class='btn btn-primary'><span class='fui-gear'></span> Create a snippet from inspected element</button>\n </div>\n </div>\n\n <div class=\"row\" id='textareas-row'>\n <div class=\"col-xs-6\">\n <span class=\"label label-warning\">HTML</span>\n <textarea id='html' readonly class=\"form-control input-sm\"></textarea>\n </div>\n <div class=\"col-xs-6\">\n <span class=\"label label-warning\">CSS</span>\n <textarea id='css' readonly class=\"form-control input-sm\"></textarea>\n </div>\n </div>\n\n <div class=\"row\">\n <div class=\"panel-group col-xs-12\" id=\"accordion\">\n <div class=\"panel panel-default\">\n <div class=\"panel-heading\">\n <h4 class=\"panel-title\">\n <a class=\"accordion-toggle\" data-toggle=\"collapse\" data-parent=\"#accordion\" href=\"#settings\">\n <span class=\"fui-list\"></span> Settings\n </a>\n </h4>\n </div>\n <div id=\"settings\" class=\"panel-collapse collapse\">\n <div class=\"accordion-inner\">\n <ul>\n <li><label class=\"checkbox\">\n <input type='checkbox' checked=\"checked\" id='properties-clean-up'/> Keep only shorthand\n properties (e.g. keeps \"border\", but removes \"border-width\")\n </label></li>\n <li><label class=\"checkbox\">\n <input type='checkbox' checked=\"checked\" id='remove-default-values'/> Remove properties\n with default browser values\n </label></li>\n <li><label class=\"checkbox\">\n <input type='checkbox' checked=\"checked\" id='remove-webkit-properties'/> Remove\n properties prefixed with \"-webkit\"\n </label></li>\n <li><label class=\"checkbox\">\n <input type='checkbox' checked=\"checked\" id='combine-same-rules'/> Combine same rules\n together\n </label></li>\n <li><label class=\"checkbox\">\n <input type='checkbox' checked=\"checked\" id='fix-html-indentation'/> Format and clean up\n HTML\n </label></li>\n <li><label class=\"checkbox\">\n <input type='checkbox' id='include-ancestors'/> Include ancestor elements in the snippet\n </label></li>\n <li>\n <div class=\"form-group\">\n Prefix all CSS IDs with <input type='text' class=\"form-control\" id='id-prefix' placeholder=\"prefix_\"/>\n </div>\n </li>\n </ul>\n </div>\n </div>\n </div>\n <div class=\"panel panel-default\">\n <div class=\"panel-heading\">\n <h4 class=\"panel-title\">\n <a class=\"accordion-toggle\" data-toggle=\"collapse\" data-parent=\"#accordion\" href=\"#about\">\n <span class=\"fui-heart\"></span> Get help, give feedback &amp; about\n </a>\n </h4>\n </div>\n <div id=\"about\" class=\"panel-collapse collapse\">\n <ul>\n <li>You can report errors, request new features and fork the code on <a href=\"https://github.com/kdzwinel/SnappySnippet\" target=\"_blank\">GitHub</a>.</li>\n <li>Projects used:\n <a href=\"http://getbootstrap.com\" target=\"_blank\">Bootstrap</a>,\n <a href=\"http://designmodo.github.io/Flat-UI/\" target=\"_blank\">Flat-UI</a>,\n <a href=\"https://code.google.com/p/jquery-clean/\" target=\"_blank\">jquery-clean</a>\n </li>\n <li>Inspiration: <a href=\"http://stackoverflow.com/questions/4911338/tools-to-selectively-copy-htmlcssjs-from-existing-sites\" target=\"_blank\">StackOverflow question by qntmfred</a></li>\n <li>Author: Konrad Dzwinel (<a href=\"mailto:kdzwinel@gmail.com\" target=\"_blank\">mail me!</a>)</li>\n </ul>\n </div>\n </div>\n </div>\n </div>\n\n <div class=\"row\" id='export-buttons-row'>\n <div class=\"col-xs-4\">\n <form action=\"https://codepen.io/pen/define\" method=\"POST\" target=\"_blank\" id='codepen-form'>\n <input type=\"hidden\" name=\"data\" value=''/>\n <button type='submit' class='btn btn-primary'><span class=\"fui-mail\"></span> Send to CodePen</button>\n </form>\n </div>\n <div class=\"col-xs-4\">\n <form action=\"https://jsbin.com/?html,css,output\" method=\"POST\" target=\"_blank\" id='jsbin-form'>\n <input type=\"hidden\" name=\"html\" value=''/>\n <input type=\"hidden\" name=\"css\" value=''/>\n <button type='submit' class='btn btn-primary'><span class=\"fui-mail\"></span> Send to JS Bin</button>\n </form>\n </div>\n <div class=\"col-xs-4\">\n <form action=\"https://jsfiddle.net/api/post/library/pure/\" method=\"POST\" target=\"_blank\" id='jsfiddle-form'>\n <input type=\"hidden\" name=\"html\" value=''/>\n <input type=\"hidden\" name=\"css\" value=''/>\n <button type='submit' class='btn btn-primary'><span class=\"fui-mail\"></span> Send to jsFiddle</button>\n </form>\n </div>\n </div>\n</div>\n\n<div id=\"social-buttons\">\n <a href='http://www.facebook.com/plugins/like.php?href=https%3A%2F%2Fchrome.google.com%2Fwebstore%2Fdetail%2Fsnappysnippet%2Fblfngdefapoapkcdibbdkigpeaffgcil&amp;width=450&amp;height=80&amp;colorscheme=light&amp;layout=standard&amp;action=like&amp;show_faces=true&amp;send=true' target='_blank'>\n Like it on FB\n </a>\n <iframe src=\"http://ghbtns.com/github-btn.html?user=kdzwinel&amp;repo=SnappySnippet&amp;type=watch&amp;count=true&amp;size=small\"\n style=\"background-color: transparent; border: none; overflow:hidden\" width=\"90\" height=\"20\"></iframe>\n <a href=\"https://twitter.com/share\" class=\"twitter-share-button\"\n data-url=\"https://chrome.google.com/webstore/detail/snappysnippet/blfngdefapoapkcdibbdkigpeaffgcil\"\n data-text=\"SnappySnippet - Chrome extension for creating HTML+CSS snippets.\"\n data-count=\"horizontal\">&nbsp;</a>\n</div>\n\n<div id='loader'>\n <div class='alert alert-warning'><p><span class=\"fui-time\"></span> <strong>Please wait.</strong> Creating a snapshot...</p></div>\n <div class='alert alert-warning'><p><span class=\"fui-time\"></span> <strong>Please wait.</strong> Processing...</p></div>\n</div>\n\n<script src=\"css/js/jquery-1.8.3.min.js\"></script>\n<script src=\"css/js/bootstrap.min.js\"></script>\n<script src=\"css/js/flatui-checkbox.js\"></script>\n\n<script src='js/libs/jquery.htmlClean.js'></script>\n<script src='js/tools/CSSStringifier.js'></script>\n<script src='js/tools/SameRulesCombiner.js'></script>\n<script src='js/filters/DefaultValueFilter.js'></script>\n<script src='js/filters/ShorthandPropertyFilter.js'></script>\n<script src='js/filters/WebkitPropertiesFilter.js'></script>\n<script src='js/tools/Snapshooter.js'></script>\n<script src='js/tools/InspectedContext.js'></script>\n<script src='js/panel.js'></script>\n\n<script src=\"https://platform.twitter.com/widgets.js\"></script>\n\n</body>\n</html>\n"} +{"text": "'use strict';\nvar $export = require('./_export')\n , $filter = require('./_array-methods')(2);\n\n$export($export.P + $export.F * !require('./_strict-method')([].filter, true), 'Array', {\n // 22.1.3.7 / 15.4.4.20 Array.prototype.filter(callbackfn [, thisArg])\n filter: function filter(callbackfn /* , thisArg */){\n return $filter(this, callbackfn, arguments[1]);\n }\n});"} +{"text": ";;\n;; Copyright (c) 2011 The Chromium Authors. All rights reserved.\n;; Use of this source code is governed by a BSD-style license that can be\n;; found in the LICENSE file.\n;;\n; This is the Sandbox configuration file used for safeguarding the user's\n; untrusted code within Native Client.\n;\n\n; *** The contents of content/common/common.sb are implicitly included here. ***\n\n; Allow a Native Client application to use semaphores, specifically\n; sem_init(), et.al.\n(allow ipc-posix-sem)\n"} +{"text": "(defpackage :mal\n (:use :common-lisp\n :types\n :env\n :reader\n :printer\n :core)\n (:import-from :cl-readline\n :readline\n :register-function)\n (:import-from :genhash\n :hashref\n :hashmap)\n (:import-from :utils\n :listify\n :getenv\n :common-prefix)\n (:export :main))\n\n(in-package :mal)\n\n(defvar *repl-env* (env:create-mal-env))\n\n(dolist (binding core:ns)\n (env:set-env *repl-env* (car binding) (cdr binding)))\n\n(defvar mal-def! (make-mal-symbol \"def!\"))\n(defvar mal-let* (make-mal-symbol \"let*\"))\n(defvar mal-do (make-mal-symbol \"do\"))\n(defvar mal-if (make-mal-symbol \"if\"))\n(defvar mal-fn* (make-mal-symbol \"fn*\"))\n\n(defun eval-sequence (sequence env)\n (map 'list\n (lambda (ast) (mal-eval ast env))\n (mal-data-value sequence)))\n\n(defun eval-hash-map (hash-map env)\n (let ((hash-map-value (mal-data-value hash-map))\n (new-hash-table (make-mal-value-hash-table)))\n (genhash:hashmap (lambda (key value)\n (setf (genhash:hashref (mal-eval key env) new-hash-table)\n (mal-eval value env)))\n hash-map-value)\n (make-mal-hash-map new-hash-table)))\n\n(defun eval-ast (ast env)\n (switch-mal-type ast\n (types:symbol (env:get-env env ast))\n (types:list (eval-sequence ast env))\n (types:vector (make-mal-vector (apply 'vector (eval-sequence ast env))))\n (types:hash-map (eval-hash-map ast env))\n (types:any ast)))\n\n(defun mal-read (string)\n (reader:read-str string))\n\n(defun mal-eval (ast env)\n (loop\n do (cond\n ((null ast) (return mal-nil))\n ((not (mal-list-p ast)) (return (eval-ast ast env)))\n ((zerop (length (mal-data-value ast))) (return ast))\n (t (let ((forms (mal-data-value ast)))\n (cond\n ((mal-data-value= mal-def! (first forms))\n (return (env:set-env env (second forms) (mal-eval (third forms) env))))\n\n ((mal-data-value= mal-let* (first forms))\n (let ((new-env (env:create-mal-env :parent env))\n (bindings (utils:listify (mal-data-value (second forms)))))\n\n (mapcar (lambda (binding)\n (env:set-env new-env\n (car binding)\n (mal-eval (or (cdr binding)\n mal-nil)\n new-env)))\n (loop\n for (symbol value) on bindings\n by #'cddr\n collect (cons symbol value)))\n (setf ast (third forms)\n env new-env)))\n\n ((mal-data-value= mal-do (first forms))\n (mapc (lambda (form) (mal-eval form env))\n (butlast (cdr forms)))\n (setf ast (car (last forms))))\n\n ((mal-data-value= mal-if (first forms))\n (let ((predicate (mal-eval (second forms) env)))\n (setf ast (if (or (mal-data-value= predicate mal-nil)\n (mal-data-value= predicate mal-false))\n (fourth forms)\n (third forms)))))\n\n ((mal-data-value= mal-fn* (first forms))\n (return (let ((arglist (second forms))\n (body (third forms)))\n (make-mal-fn (lambda (&rest args)\n (mal-eval body (env:create-mal-env :parent env\n :binds (listify (mal-data-value arglist))\n :exprs args)))\n :attrs (list (cons :params arglist)\n (cons :ast body)\n (cons :env env))))))\n\n (t (let* ((evaluated-list (eval-ast ast env))\n (function (car evaluated-list)))\n ;; If first element is a mal function unwrap it\n (if (not (mal-fn-p function))\n (return (apply (mal-data-value function)\n (cdr evaluated-list)))\n (let* ((attrs (mal-data-attrs function)))\n (setf ast (cdr (assoc :ast attrs))\n env (env:create-mal-env :parent (cdr (assoc :env attrs))\n :binds (map 'list\n #'identity\n (mal-data-value (cdr (assoc :params attrs))))\n :exprs (cdr evaluated-list)))))))))))))\n\n(defun mal-print (expression)\n (printer:pr-str expression))\n\n(defun rep (string)\n (handler-case\n (mal-print (mal-eval (mal-read string) *repl-env*))\n (error (condition)\n (format nil \"~a\" condition))))\n\n(rep \"(def! not (fn* (a) (if a false true)))\")\n\n(defvar *use-readline-p* nil)\n\n(defun complete-toplevel-symbols (input &rest ignored)\n (declare (ignorable ignored))\n\n (let (candidates)\n (loop for key being the hash-keys of (env:mal-env-bindings *repl-env*)\n when (let ((pos (search input key))) (and pos (zerop pos)))\n do (push key candidates))\n\n (if (= 1 (length candidates))\n (cons (car candidates) candidates)\n (cons (apply #'utils:common-prefix candidates) candidates))))\n\n(defun raw-input (prompt)\n (format *standard-output* prompt)\n (force-output *standard-output*)\n (read-line *standard-input* nil))\n\n(defun mal-readline (prompt)\n (if *use-readline-p*\n (rl:readline :prompt prompt :add-history t :novelty-check #'string/=)\n (raw-input prompt)))\n\n(defun mal-writeline (string)\n (when string\n (write-line string)\n (force-output *standard-output*)))\n\n(defun main (&optional (argv nil argv-provided-p))\n (declare (ignorable argv argv-provided-p))\n\n (setf *use-readline-p* (not (or (string= (utils:getenv \"PERL_RL\") \"false\")\n (string= (utils:getenv \"TERM\") \"dumb\"))))\n\n ;; In GNU CLISP's batch mode the standard-input seems to be set to some sort\n ;; of input string-stream, this interacts wierdly with the PERL_RL enviroment\n ;; variable which the test runner sets causing `read-line' on *standard-input*\n ;; to fail with an empty stream error. The following reinitializes the\n ;; standard streams\n ;;\n ;; See http://www.gnu.org/software/clisp/impnotes/streams-interactive.html\n #+clisp (setf *standard-input* (ext:make-stream :input)\n *standard-output* (ext:make-stream :output :buffered t)\n *error-output* (ext:make-stream :error :buffered t))\n\n ;; CCL fails with a error while registering completion function\n ;; See also https://github.com/mrkkrp/cl-readline/issues/5\n #-ccl (rl:register-function :complete #'complete-toplevel-symbols)\n\n (loop do (let ((line (mal-readline \"user> \")))\n (if line (mal-writeline (rep line)) (return)))))\n\n;;; Workaround for CMUCL's printing of \"Reloaded library ... \" messages when an\n;;; image containing foreign libraries is restored. The extra messages cause the\n;;; MAL testcases to fail\n\n#+cmucl (progn\n (defvar *old-standard-output* *standard-output*\n \"Keep track of current value standard output, this is restored after image restore completes\")\n\n (defun muffle-output ()\n (setf *standard-output* (make-broadcast-stream)))\n\n (defun restore-output ()\n (setf *standard-output* *old-standard-output*))\n\n (pushnew #'muffle-output ext:*after-save-initializations*)\n (setf ext:*after-save-initializations*\n (append ext:*after-save-initializations* (list #'restore-output))))\n"} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<Project ToolsVersion=\"12.0\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\r\n <PropertyGroup />\r\n</Project>"} +{"text": "# Resource management\n\n* [Resource types](#resource-types)\n* [API summary](#api-summary)\n* [RobotPose](#robotpose)\n\nWhen building a large, complex robot system, you will typically encounter dozens or hundreds of robot configurations, transforms, inverse kinematics constraints, and paths. Klamp't has many functions to help make managing these elements easier.\n\n_Visual editing_ is a sort of what-you-see-is-what-you-get (WYSIWYG) editing approach for robotics, and Klamp't tries to make visual editing part of the robot hacking workflow in as painless a manner as possible.\n\nThis is made more convenient through the Klamp't resource management mechanism. When working on a large project, it is recommended that configurations, paths, holds, etc. be stored in dedicated sub-project folders to avoid polluting the main Klamp't folder. Resources are compatible with the RobotPose app, as well as the C++ and Python APIs.\n\n## Resource types\n\nCurrently supported types include:\n\n- Config (.config)\n- Configs (.configs): A configuration list\n- Trajectory (.path): A piecewise linear trajectory object\n- MultiPath (.xml): \n- Hold (.hold)\n- Stance (.stance)\n- Grasp (.xml)\n- GeometricPrimitive (.geom)\n- TriMesh (.off, .tri, etc.)\n- PointCloud (.pcd)\n- Robot (.rob)\n- RigidObject (.obj)\n- World (.xml)\n\nKlamp't also supports the following additional types which do not have a dedicated file extension:\n\n- Vector3\n- Matrix3\n- RigidTransform\n- Matrix\n- IKGoal\n\n\n## API summary\n\nThe Klampt/Modeling/Resources.h file lists all available resource types. Note that a sub-project folder can be loaded all at once through the ResourceLibrary class (KrisLibrary/utils/ResourceLibrary.h). After initializing a ResourceLibrary instance with the MakeRobotResourceLibrary function in (Klampt/Modeling/Resources.h) to make it Klamp't-aware, the LoadAll/SaveAll() methods can load an entire folder of resources. These resources can be accessed by name or type using the Get\\*() methods.\n\nAlternatively, resource libraries can be saved to XML files via the LoadXml/SaveXml() methods. This mechanism may be useful in the future, for example to send complex robot data across a network.\n\n\n## RobotPose\n\nThe RobotPose app can also browse and edit resources. TODO: describe in more detail.\n\n"} +{"text": "#include\t\"unp.h\"\n#include\t<ctype.h>\t\t/* isxdigit(), etc. */\n\n\t\t/* following internal flag cannot overlap with other AI_xxx flags */\n#define\tAI_CLONE\t 4\t/* clone this entry for other socket types */\n\nstruct search {\n const char\t*host;\t/* hostname or address string */\n int\t\t\tfamily;\t/* AF_xxx */\n};\n\n\t\t/* 4function prototypes for our own internal functions */\nint\t\tga_aistruct(struct addrinfo ***, const struct addrinfo *,\n\t\t\t\t\tconst void *, int);\nstruct addrinfo\t\t*ga_clone(struct addrinfo *);\nint\t\tga_echeck(const char *, const char *, int, int, int, int);\nint\t\tga_nsearch(const char *, const struct addrinfo *, struct search *);\nint\t\tga_port(struct addrinfo *, int , int);\nint\t\tga_serv(struct addrinfo *, const struct addrinfo *, const char *);\nint\t\tga_unix(const char *, struct addrinfo *, struct addrinfo **);\n\nint\t\tgn_ipv46(char *, size_t, char *, size_t, void *, size_t,\n\t\t\t\t int, int, int);\n"} +{"text": "package com.daasuu.mp4compose.source;\n\nimport androidx.annotation.NonNull;\n\nimport java.io.FileDescriptor;\n\npublic class FileDescriptorDataSource implements DataSource {\n\n private final FileDescriptor fileDescriptor;\n\n public FileDescriptorDataSource(FileDescriptor fileDescriptor) {\n this.fileDescriptor = fileDescriptor;\n }\n\n @NonNull\n @Override\n public FileDescriptor getFileDescriptor() {\n return fileDescriptor;\n }\n}\n"} +{"text": "/**\n * Copyright (c) 2008-2020 Bird Dog Games, Inc.\n *\n * This file is part of Ardor3D.\n *\n * Ardor3D is free software: you can redistribute it and/or modify it\n * under the terms of its license which may be found in the accompanying\n * LICENSE file or at <https://git.io/fjRmv>.\n */\n\npackage com.ardor3d.extension.effect.particle;\n\nimport java.io.IOException;\nimport java.nio.FloatBuffer;\nimport java.util.List;\nimport java.util.logging.Logger;\n\nimport com.ardor3d.extension.effect.particle.emitter.MeshEmitter;\nimport com.ardor3d.extension.effect.particle.emitter.SavableParticleEmitter;\nimport com.ardor3d.math.ColorRGBA;\nimport com.ardor3d.math.MathUtils;\nimport com.ardor3d.math.Matrix3;\nimport com.ardor3d.math.Transform;\nimport com.ardor3d.math.Triangle;\nimport com.ardor3d.math.Vector3;\nimport com.ardor3d.math.type.ReadOnlyColorRGBA;\nimport com.ardor3d.math.type.ReadOnlyMatrix3;\nimport com.ardor3d.math.type.ReadOnlyTransform;\nimport com.ardor3d.math.type.ReadOnlyVector3;\nimport com.ardor3d.renderer.Renderer;\nimport com.ardor3d.scenegraph.Mesh;\nimport com.ardor3d.scenegraph.MeshData;\nimport com.ardor3d.scenegraph.Node;\nimport com.ardor3d.scenegraph.Spatial;\nimport com.ardor3d.scenegraph.controller.ComplexSpatialController.RepeatType;\nimport com.ardor3d.scenegraph.controller.SpatialController;\nimport com.ardor3d.scenegraph.event.DirtyType;\nimport com.ardor3d.util.export.InputCapsule;\nimport com.ardor3d.util.export.OutputCapsule;\nimport com.ardor3d.util.geom.BufferUtils;\n\n/**\n * ParticleSystem is an abstract class representing a particle system. A ParticleController must be\n * attached for the effect to be complete.\n */\npublic abstract class ParticleSystem extends Node {\n private static final Logger logger = Logger.getLogger(ParticleSystem.class.getName());\n\n public enum ParticleType {\n Triangle, Point, Line, GeomMesh;\n }\n\n protected static final double DEFAULT_END_SIZE = 4;\n protected static final double DEFAULT_START_SIZE = 20;\n protected static final double DEFAULT_MAX_ANGLE = 0.7853982;\n protected static final double DEFAULT_MAX_LIFE = 3000;\n protected static final double DEFAULT_MIN_LIFE = 2000;\n\n protected static final ReadOnlyColorRGBA DEFAULT_START_COLOR = new ColorRGBA(1.0f, 0.0f, 0.0f, 1.0f);\n protected static final ReadOnlyColorRGBA DEFAULT_END_COLOR = new ColorRGBA(1.0f, 1.0f, 0.0f, 0.0f);\n\n protected ParticleType _particleType;\n protected SavableParticleEmitter _particleEmitter;\n protected boolean _cameraFacing = true;\n protected boolean _velocityAligned = false;\n protected boolean _particlesInWorldCoords = true;\n\n protected double _startSize, _endSize;\n protected final ColorRGBA _startColor = new ColorRGBA(DEFAULT_START_COLOR);\n protected final ColorRGBA _endColor = new ColorRGBA(DEFAULT_END_COLOR);\n protected ParticleAppearanceRamp _ramp = new ParticleAppearanceRamp();\n protected TexAnimation _texAnimation = new TexAnimation();\n protected double _initialVelocity;\n protected double _minimumLifeTime, _maximumLifeTime;\n protected double _minimumAngle, _maximumAngle;\n protected double _startSpin, _endSpin;\n protected double _startMass, _endMass;\n protected int _startTexIndex, _texQuantity;\n protected final Vector3 _emissionDirection = new Vector3(Vector3.UNIT_Y);\n protected final Transform _emitterTransform = new Transform();\n protected final Vector3 _worldEmit = new Vector3();\n protected int _numParticles;\n protected boolean _rotateWithScene = false;\n protected final Matrix3 _rotMatrix = new Matrix3();\n protected double _particleOrientation;\n\n protected FloatBuffer _geometryCoordinates;\n protected FloatBuffer _appearanceColors;\n\n // vectors to prevent repeated object creation:\n protected final Vector3 _upXemit = new Vector3(), _absUpVector = new Vector3(), _abUpMinUp = new Vector3();\n protected final Vector3 _upVector = new Vector3(Vector3.UNIT_Y);\n protected final Vector3 _leftVector = new Vector3(-1, 0, 0);\n protected final Vector3 _invScale = new Vector3();\n\n // These vectors are used for determining particle orientation if you turn off camera facing\n protected final Vector3 _facingUpVector = new Vector3(Vector3.UNIT_Y);\n protected final Vector3 _facingLeftVector = new Vector3(-1, 0, 0);\n\n protected Particle _particles[];\n\n // protected Vector3 particleSpeed;\n protected int _releaseRate; // particles per second\n protected final Vector3 _originOffset = new Vector3();\n protected final Vector3 _originCenter = new Vector3();\n\n protected Mesh _particleMesh;\n protected ParticleController _controller;\n\n protected Vector3 _oldEmit = new Vector3(Float.NaN, Float.NaN, Float.NaN);\n protected double _matData[] = new double[9];\n\n public ParticleSystem() {}\n\n public ParticleSystem(final String name, final int numParticles) {\n this(name, numParticles, ParticleType.Triangle);\n }\n\n public ParticleSystem(final String name, final int numParticles, final ParticleType particleType) {\n super(name);\n _numParticles = numParticles;\n _particleType = particleType;\n _minimumLifeTime = DEFAULT_MIN_LIFE;\n _maximumLifeTime = DEFAULT_MAX_LIFE;\n _maximumAngle = DEFAULT_MAX_ANGLE;\n _startSize = DEFAULT_START_SIZE;\n _endSize = DEFAULT_END_SIZE;\n _startSpin = 0;\n _endSpin = 0;\n _startMass = 1;\n _endMass = 1;\n _startTexIndex = 0;\n _texQuantity = 1;\n _releaseRate = numParticles;\n _initialVelocity = 1.0;\n\n initializeParticles(numParticles);\n }\n\n protected abstract void initializeParticles(int numParticles);\n\n public static int getVertsForParticleType(final ParticleType type) {\n if (type == null) {\n throw new NullPointerException(\"type is null\");\n }\n switch (type) {\n case Triangle:\n case GeomMesh:\n return 3;\n case Point:\n return 1;\n case Line:\n return 2;\n }\n throw new IllegalArgumentException(\"Invalid ParticleType: \" + type);\n }\n\n public void forceRespawn() {\n for (final Particle p : _particles) {\n p.recreateParticle(0);\n p.setStatus(Particle.Status.Alive);\n p.updateAndCheck(1);\n p.setStatus(Particle.Status.Available);\n }\n\n if (_controller != null) {\n _controller.setActive(true);\n _controller.resetFlowCount();\n }\n }\n\n /**\n * Setup the rotation matrix used to determine initial particle velocity based on emission angle and\n * emission direction. called automatically by the set* methods for those parameters.\n */\n public void updateRotationMatrix() {\n\n if (_oldEmit.equals(_worldEmit)) {\n return;\n }\n\n final double upDotEmit = _upVector.dot(_worldEmit);\n if (Math.abs(upDotEmit) > 1.0 - MathUtils.EPSILON) {\n _absUpVector.setX(_upVector.getX() <= 0.0 ? -_upVector.getX() : _upVector.getX());\n _absUpVector.setY(_upVector.getY() <= 0.0 ? -_upVector.getY() : _upVector.getY());\n _absUpVector.setZ(_upVector.getZ() <= 0.0 ? -_upVector.getZ() : _upVector.getZ());\n if (_absUpVector.getX() < _absUpVector.getY()) {\n if (_absUpVector.getX() < _absUpVector.getZ()) {\n _absUpVector.set(Vector3.UNIT_X);\n } else {\n _absUpVector.set(Vector3.UNIT_Z);\n }\n } else if (_absUpVector.getY() < _absUpVector.getZ()) {\n _absUpVector.set(Vector3.UNIT_Y);\n } else {\n _absUpVector.set(Vector3.UNIT_Z);\n }\n _absUpVector.subtract(_upVector, _abUpMinUp);\n _absUpVector.subtract(_worldEmit, _upXemit);\n final double f4 = 2.0 / _abUpMinUp.dot(_abUpMinUp);\n final double f6 = 2.0 / _upXemit.dot(_upXemit);\n final double f8 = f4 * f6 * _abUpMinUp.dot(_upXemit);\n final double af1[] = {_abUpMinUp.getX(), _abUpMinUp.getY(), _abUpMinUp.getZ()};\n final double af2[] = {_upXemit.getX(), _upXemit.getY(), _upXemit.getZ()};\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n _matData[(i * 3) + j] = (-f4 * af1[i] * af1[j] - f6 * af2[i] * af2[j]) + f8 * af2[i] * af1[j];\n\n }\n _matData[(i * 3) + i]++;\n }\n\n } else {\n _upVector.cross(_worldEmit, _upXemit);\n final double f2 = 1.0 / (1.0 + upDotEmit);\n final double f5 = f2 * _upXemit.getX();\n final double f7 = f2 * _upXemit.getZ();\n final double f9 = f5 * _upXemit.getY();\n final double f10 = f5 * _upXemit.getZ();\n final double f11 = f7 * _upXemit.getY();\n _matData[0] = upDotEmit + f5 * _upXemit.getX();\n _matData[1] = f9 - _upXemit.getZ();\n _matData[2] = f10 + _upXemit.getY();\n _matData[3] = f9 + _upXemit.getZ();\n _matData[4] = upDotEmit + f2 * _upXemit.getY() * _upXemit.getY();\n _matData[5] = f11 - _upXemit.getX();\n _matData[6] = f10 - _upXemit.getY();\n _matData[7] = f11 + _upXemit.getX();\n _matData[8] = upDotEmit + f7 * _upXemit.getZ();\n }\n _rotMatrix.fromArray(_matData);\n _oldEmit.set(_worldEmit);\n }\n\n public abstract Mesh getParticleGeometry();\n\n public ParticleController getParticleController() { return _controller; }\n\n @Override\n public void addController(final SpatialController<?> c) {\n super.addController(c);\n if (c instanceof ParticleController) {\n _controller = (ParticleController) c;\n }\n }\n\n public Vector3 getEmissionDirection() { return _emissionDirection; }\n\n public void setEmissionDirection(final ReadOnlyVector3 emissionDirection) {\n _emissionDirection.set(emissionDirection);\n _worldEmit.set(emissionDirection);\n }\n\n public double getEndSize() { return _endSize; }\n\n public void setEndSize(final double size) { _endSize = size >= 0.0 ? size : 0.0; }\n\n public double getStartSize() { return _startSize; }\n\n public void setStartSize(final double size) { _startSize = size >= 0.0 ? size : 0.0; }\n\n /**\n * Set the start color for particles.\n *\n * @param color\n * The new start color.\n */\n public void setStartColor(final ReadOnlyColorRGBA color) {\n _startColor.set(color);\n }\n\n /**\n * @return The start color.\n */\n public ReadOnlyColorRGBA getStartColor() { return _startColor; }\n\n /**\n * Set the end color for particles. The base color of the particle will linearly approach this color\n * from the start color over the lifetime of the particle.\n *\n * @param color\n * ColorRGBA The ending color.\n */\n public void setEndColor(final ReadOnlyColorRGBA color) {\n _endColor.set(color);\n }\n\n /**\n * getEndColor returns the ending color.\n *\n * @return The ending color\n */\n public ReadOnlyColorRGBA getEndColor() { return _endColor; }\n\n /**\n * Set the start and end spinSpeed of particles managed by this manager. Setting it to 0 means no\n * spin.\n *\n * @param speed\n * double\n */\n public void setParticleSpinSpeed(final double speed) {\n _startSpin = speed;\n _endSpin = speed;\n }\n\n public Vector3 getInvScale() { return _invScale; }\n\n public void setInvScale(final ReadOnlyVector3 invScale) {\n _invScale.set(invScale);\n }\n\n public void updateInvScale() {\n _invScale.set(1.0 / getWorldScale().getX(), 1.0 / getWorldScale().getY(), 1.0 / getWorldScale().getZ());\n }\n\n /**\n * Add an external influence to the particle controller for this mesh.\n *\n * @param influence\n * ParticleInfluence\n */\n public void addInfluence(final ParticleInfluence influence) {\n _controller.addInfluence(influence);\n }\n\n /**\n * Remove an influence from the particle controller for this mesh.\n *\n * @param influence\n * ParticleInfluence\n * @return true if found and removed.\n */\n public boolean removeInfluence(final ParticleInfluence influence) {\n return _controller.removeInfluence(influence);\n }\n\n /**\n * Returns the list of influences acting on this particle controller.\n *\n * @return ArrayList\n */\n public List<ParticleInfluence> getInfluences() { return _controller.getInfluences(); }\n\n public void clearInfluences() {\n _controller.clearInfluences();\n }\n\n public void setParticleMass(final double mass) { _startMass = _endMass = mass; }\n\n /**\n * Set the minimum angle (in radians) that particles can be emitted away from the emission\n * direction. Any angle less than 0 is trimmed to 0.\n *\n * @param f\n * The new emission minimum angle.\n */\n public void setMinimumAngle(final double f) { _minimumAngle = f >= 0.0 ? f : 0.0; }\n\n /**\n * getEmissionMinimumAngle returns the minimum emission angle.\n *\n * @return The minimum emission angle.\n */\n public double getMinimumAngle() { return _minimumAngle; }\n\n /**\n * Set the maximum angle (in radians) that particles can be emitted away from the emission\n * direction. Any angle less than 0 is trimmed to 0.\n *\n * @param f\n * The new emission maximum angle.\n */\n public void setMaximumAngle(final double f) { _maximumAngle = f >= 0.0 ? f : 0.0; }\n\n /**\n * getEmissionMaximumAngle returns the maximum emission angle.\n *\n * @return The maximum emission angle.\n */\n public double getMaximumAngle() { return _maximumAngle; }\n\n /**\n * Set the minimum lifespan of new particles (or recreated) managed by this manager. if a value less\n * than zero is given, 1.0 is used.\n *\n * @param lifeSpan\n * in ms\n */\n public void setMinimumLifeTime(final double lifeSpan) { _minimumLifeTime = lifeSpan >= 0.0 ? lifeSpan : 1.0; }\n\n /**\n * getParticlesMinimumLifeTime returns the minimum life time of a particle.\n *\n * @return The current minimum life time in ms.\n */\n public double getMinimumLifeTime() { return _minimumLifeTime; }\n\n /**\n * Set the maximum lifespan of new particles (or recreated) managed by this manager. if a value less\n * than zero is given, 1.0 is used.\n *\n * @param lifeSpan\n * in ms\n */\n public void setMaximumLifeTime(final double lifeSpan) { _maximumLifeTime = lifeSpan >= 0.0 ? lifeSpan : 1.0; }\n\n /**\n * getParticlesMaximumLifeTime returns the maximum life time of a particle.\n *\n * @return The current maximum life time in ms.\n */\n public double getMaximumLifeTime() { return _maximumLifeTime; }\n\n public ReadOnlyMatrix3 getRotMatrix() { return _rotMatrix; }\n\n public void setRotMatrix(final ReadOnlyMatrix3 rotMatrix) {\n _rotMatrix.set(rotMatrix);\n }\n\n public ReadOnlyTransform getEmitterTransform() { return _emitterTransform; }\n\n public void setEmitterTransform(final ReadOnlyTransform emitterTransform) {\n _emitterTransform.set(emitterTransform);\n }\n\n public double getParticleOrientation() { return _particleOrientation; }\n\n public void setParticleOrientation(final double orient) { _particleOrientation = orient; }\n\n /**\n * Set the acceleration for any new particles created (or recreated) by this manager.\n *\n * @param velocity\n * particle v0\n */\n public void setInitialVelocity(final double velocity) { _initialVelocity = velocity; }\n\n /**\n * Get the acceleration set in this manager.\n *\n * @return The initialVelocity\n */\n public double getInitialVelocity() { return _initialVelocity; }\n\n /**\n * Set the offset for any new particles created (or recreated) by this manager. This is applicable\n * only to managers generating from a point (not a line, rectangle, etc..)\n *\n * @param offset\n * new offset position\n */\n public void setOriginOffset(final ReadOnlyVector3 offset) {\n _originOffset.set(offset);\n }\n\n /**\n * Get the offset point set in this manager.\n *\n * @return origin\n */\n public ReadOnlyVector3 getOriginOffset() { return _originOffset; }\n\n public ReadOnlyVector3 getWorldEmit() { return _worldEmit; }\n\n public void setWorldEmit(final ReadOnlyVector3 worldEmit) {\n _worldEmit.set(worldEmit);\n }\n\n /**\n * Get the number of particles the manager should release per second.\n *\n * @return The number of particles that should be released per second.\n */\n public int getReleaseRate() { return _releaseRate; }\n\n /**\n * Set the number of particles the manager should release per second.\n *\n * @param particlesPerSecond\n * number of particles per second\n */\n public void setReleaseRate(final int particlesPerSecond) {\n final int oldRate = _releaseRate;\n _releaseRate = particlesPerSecond;\n if (_controller != null && !_controller.isActive() && _controller.isControlFlow() && oldRate == 0) {\n _controller.setActive(true);\n }\n }\n\n public double getEndMass() { return _endMass; }\n\n public void setEndMass(final double endMass) { _endMass = endMass; }\n\n public double getEndSpin() { return _endSpin; }\n\n public void setEndSpin(final double endSpin) { _endSpin = endSpin; }\n\n public double getStartMass() { return _startMass; }\n\n public void setStartMass(final double startMass) { _startMass = startMass; }\n\n public double getStartSpin() { return _startSpin; }\n\n public void setStartSpin(final double startSpin) { _startSpin = startSpin; }\n\n public int getTexQuantity() { return _texQuantity; }\n\n public void setTexQuantity(final int quantity) { _texQuantity = quantity; }\n\n public int getStartTexIndex() { return _startTexIndex; }\n\n public void setStartTexIndex(final int startTexIndex) { _startTexIndex = startTexIndex; }\n\n /**\n * Get which particle type is being used by the underlying system. One of ParticleType.Triangle,\n * ParticleType.Point, ParticleType.Line, ParticleType.GeomMesh\n *\n * @return An enum representing the type of particle we are emitting.\n */\n public ParticleType getParticleType() { return _particleType; }\n\n /**\n * Set what type of particle to emit from this system. Does not have an effect unless recreate is\n * called.\n *\n * @param type\n * particle type to use, should be one of ParticleType.Triangle, ParticleType.Point,\n * ParticleType.Line, ParticleType.GeomMesh\n */\n public void setParticleType(final ParticleType type) { _particleType = type; }\n\n /**\n * Set our particle emitter.\n *\n * @param emitter\n * New emitter or null for default point emitter.\n */\n public void setParticleEmitter(final SavableParticleEmitter emitter) { _particleEmitter = emitter; }\n\n /**\n * @return the set particle emitter, or null if none is set.\n */\n public SavableParticleEmitter getParticleEmitter() { return _particleEmitter; }\n\n public void initAllParticlesLocation() {\n for (int i = _particles.length; --i >= 0;) {\n initParticleLocation(i);\n _particles[i].updateVerts(null);\n }\n getParticleGeometry().updateModelBound();\n }\n\n @Override\n public void onDraw(final Renderer r) {\n // make sure our particle world bound is correct\n updateWorldBoundManually();\n\n super.onDraw(r);\n }\n\n public void initParticleLocation(final int index) {\n final Particle p = _particles[index];\n if (getParticleType() == ParticleType.GeomMesh && getParticleEmitter() instanceof MeshEmitter) {\n final MeshEmitter emitter = (MeshEmitter) getParticleEmitter();\n final Mesh mesh = emitter.getSource();\n\n // Update the triangle model on each new particle creation.\n final Vector3[] vertices = new Vector3[3];\n final MeshData mData = mesh.getMeshData();\n for (int x = 0; x < 3; x++) {\n vertices[x] = new Vector3();\n\n final int vertIndex = mData.getVertexIndex(index, x, 0);\n BufferUtils.populateFromBuffer(vertices[x], mData.getVertexBuffer(),\n mData.getIndices() != null ? mData.getIndices().get(vertIndex) : vertIndex);\n }\n Triangle t = p.getTriangleModel();\n if (t == null) {\n t = new Triangle(vertices[0], vertices[1], vertices[2]);\n } else {\n t.setA(vertices[0]);\n t.setB(vertices[1]);\n t.setC(vertices[2]);\n }\n // turn the triangle corners into vector offsets from center\n for (int x = 0; x < 3; x++) {\n vertices[x].subtract(t.getCenter(), vertices[x]);\n t.set(x, vertices[x]);\n }\n p.setTriangleModel(t);\n mesh.localToWorld(t.getCenter(), p.getPosition());\n p.getPosition().multiplyLocal(getInvScale());\n\n } else if (getParticleEmitter() instanceof MeshEmitter) {\n final MeshEmitter emitter = (MeshEmitter) getParticleEmitter();\n final Mesh mesh = emitter.getSource();\n mesh.getMeshData().randomPointOnPrimitives(p.getPosition());\n mesh.localToWorld(p.getPosition(), p.getPosition());\n p.getPosition().multiplyLocal(getInvScale());\n } else {\n if (getParticleEmitter() != null) {\n getParticleEmitter().randomEmissionPoint(p.getPosition());\n } else {\n p.getPosition().set(_originOffset);\n }\n\n _emitterTransform.applyForward(p.getPosition());\n p.getPosition().divideLocal(_emitterTransform.getScale());\n }\n }\n\n public boolean isCameraFacing() { return _cameraFacing; }\n\n public void setCameraFacing(final boolean cameraFacing) { _cameraFacing = cameraFacing; }\n\n public boolean isVelocityAligned() { return _velocityAligned; }\n\n public void setVelocityAligned(final boolean velocityAligned) { _velocityAligned = velocityAligned; }\n\n public Particle getParticle(final int i) {\n return _particles[i];\n }\n\n public boolean isActive() { return _controller.isActive(); }\n\n public void setSpeed(final double f) {\n _controller.setSpeed(f);\n }\n\n public void setRepeatType(final RepeatType type) {\n _controller.setRepeatType(type);\n }\n\n public void setControlFlow(final boolean b) {\n _controller.setControlFlow(b);\n }\n\n public ReadOnlyVector3 getOriginCenter() { return _originCenter; }\n\n public ReadOnlyVector3 getUpVector() { return _upVector; }\n\n public void setUpVector(final ReadOnlyVector3 vector) {\n _upVector.set(vector);\n }\n\n public ReadOnlyVector3 getLeftVector() { return _leftVector; }\n\n public void setLeftVector(final ReadOnlyVector3 vector) {\n _leftVector.set(vector);\n }\n\n public ReadOnlyVector3 getFacingUpVector() { return _facingUpVector; }\n\n /**\n * Used to determine particle orientation (only if cameraFacing is false.)\n *\n * @param vector\n */\n public void setFacingUpVector(final ReadOnlyVector3 vector) {\n _facingUpVector.set(vector);\n }\n\n public ReadOnlyVector3 getFacingLeftVector() { return _facingLeftVector; }\n\n /**\n * Used to determine particle orientation (only if cameraFacing is false.)\n *\n * @param vector\n */\n public void setFacingLeftVector(final ReadOnlyVector3 vector) {\n _facingLeftVector.set(vector);\n }\n\n public boolean isRotateWithScene() { return _rotateWithScene; }\n\n public void setRotateWithScene(final boolean rotate) { _rotateWithScene = rotate; }\n\n public void resetParticleVelocity(final int i) {\n getRandomVelocity(_particles[i].getVelocity());\n }\n\n /**\n * Returns a random angle between the min and max angles.\n *\n * @return the random angle.\n */\n public double getRandomAngle() {\n return getMinimumAngle() + MathUtils.nextRandomFloat() * (getMaximumAngle() - getMinimumAngle());\n }\n\n /**\n * generate a random lifespan between the min and max lifespan of the particle system.\n *\n * @return the generated lifespan value\n */\n public double getRandomLifeSpan() {\n return getMinimumLifeTime() + ((getMaximumLifeTime() - getMinimumLifeTime()) * MathUtils.nextRandomFloat());\n }\n\n /**\n * Generate a random velocity within the parameters of max angle and the rotation matrix.\n *\n * @param store\n * a vector to store the results in.\n */\n protected Vector3 getRandomVelocity(final Vector3 store) {\n final double randDir = MathUtils.TWO_PI * MathUtils.nextRandomFloat();\n final double randAngle = getRandomAngle();\n Vector3 result = store;\n if (result == null) {\n result = new Vector3();\n }\n result.setX(MathUtils.cos(randDir) * MathUtils.sin(randAngle));\n result.setY(MathUtils.cos(randAngle));\n result.setZ(MathUtils.sin(randDir) * MathUtils.sin(randAngle));\n rotateVectorSpeed(result);\n result.multiplyLocal(getInitialVelocity());\n return result;\n }\n\n /**\n * Apply the rotation matrix to a given vector representing a particle velocity.\n *\n * @param pSpeed\n * the velocity vector to be modified.\n */\n protected void rotateVectorSpeed(final Vector3 pSpeed) {\n\n final double x = pSpeed.getX(), y = pSpeed.getY(), z = pSpeed.getZ();\n\n pSpeed.setX(-1 * ((_rotMatrix.getM00() * x) + (_rotMatrix.getM10() * y) + (_rotMatrix.getM20() * z)));\n pSpeed.setY((_rotMatrix.getM01() * x) + (_rotMatrix.getM11() * y) + (_rotMatrix.getM21() * z));\n pSpeed.setZ(-1 * ((_rotMatrix.getM02() * x) + (_rotMatrix.getM12() * y) + (_rotMatrix.getM22() * z)));\n }\n\n public void warmUp(final int iterations) {\n if (_controller != null) {\n _controller.warmUp(iterations, this);\n }\n }\n\n public int getNumParticles() { return _numParticles; }\n\n public void setNumParticles(final int numParticles) { _numParticles = numParticles; }\n\n public double getReleaseVariance() {\n if (_controller != null) {\n return _controller.getReleaseVariance();\n }\n return 0;\n }\n\n public void setReleaseVariance(final double var) {\n if (_controller != null) {\n _controller.setReleaseVariance(var);\n }\n }\n\n public ParticleAppearanceRamp getRamp() { return _ramp; }\n\n public void setRamp(final ParticleAppearanceRamp ramp) {\n if (ramp == null) {\n logger.warning(\"Can not set a null ParticleAppearanceRamp.\");\n return;\n }\n _ramp = ramp;\n }\n\n public TexAnimation getTexAnimation() { return _texAnimation; }\n\n public void setTexAnimation(final TexAnimation texAnimation) {\n if (texAnimation == null) {\n logger.warning(\"Can not set a null TexAnimation.\");\n return;\n }\n _texAnimation = texAnimation;\n }\n\n /**\n * @return true if the particles are already in world coordinate space (default). When true,\n * scene-graph transforms will only affect the emission of particles, not particles that are\n * already living.\n */\n public boolean isParticlesInWorldCoords() { return _particlesInWorldCoords; }\n\n public void setParticlesInWorldCoords(final boolean particlesInWorldCoords) {\n _particlesInWorldCoords = particlesInWorldCoords;\n }\n\n /**\n * Changes the number of particles in this particle mesh.\n *\n * @param count\n * the desired number of particles to change to.\n */\n public void recreate(final int count) {\n _numParticles = count;\n initializeParticles(_numParticles);\n }\n\n @Override\n public void updateWorldBound(final boolean recurse) {\n // ignore this since we want it to happen only when we say it can\n // happen due to world vectors not being used\n }\n\n public void updateWorldBoundManually() {\n super.updateWorldBound(true);\n }\n\n @Override\n public void updateGeometricState(final double time, final boolean initiator) {\n super.updateGeometricState(time, initiator);\n if (isRotateWithScene()) {\n // XXX: Perhaps we can avoid this special case via an addition to the interface?\n if (getParticleEmitter() instanceof MeshEmitter) {\n ((MeshEmitter) getParticleEmitter()).getSource().getWorldRotation().applyPost(_emissionDirection, _worldEmit);\n } else {\n getWorldRotation().applyPost(_emissionDirection, _worldEmit);\n }\n } else {\n _worldEmit.set(_emissionDirection);\n }\n\n if (_particlesInWorldCoords) {\n final Transform t = Transform.fetchTempInstance();\n t.setIdentity();\n t.setTranslation(getWorldTranslation());\n t.setScale(getScale());\n if (getParent() != null) {\n t.setRotation(getParent().getWorldRotation());\n }\n _emitterTransform.set(t);\n Transform.releaseTempInstance(t);\n\n _originCenter.set(getWorldTranslation()).addLocal(_originOffset);\n\n setWorldTranslation(Vector3.ZERO);\n } else {\n _originCenter.set(_originOffset);\n }\n\n setWorldRotation(Matrix3.IDENTITY);\n setWorldScale(getScale());\n markDirty(DirtyType.Transform);\n }\n\n @Override\n public ParticleSystem makeCopy(final boolean shareGeometricData) {\n synchronized (this) {\n // Do not call make copy on the \"generated\" particle geometry.\n final Spatial geom = getParticleGeometry();\n detachChild(geom);\n final ParticleSystem copy = (ParticleSystem) super.makeCopy(shareGeometricData);\n // Reattach\n attachChild(geom);\n return copy;\n }\n }\n\n @Override\n public void write(final OutputCapsule capsule) throws IOException {\n synchronized (this) {\n // Do not save the \"generated\" particle geometry.\n final Spatial geom = getParticleGeometry();\n detachChild(geom);\n super.write(capsule);\n // Reattach\n attachChild(geom);\n }\n\n capsule.write(_particleType, \"particleType\", ParticleType.Triangle);\n capsule.write(_particleEmitter, \"particleEmitter\", null);\n capsule.write(_startSize, \"startSize\", DEFAULT_START_SIZE);\n capsule.write(_endSize, \"endSize\", DEFAULT_END_SIZE);\n capsule.write(_startColor, \"startColor\", (ColorRGBA) DEFAULT_START_COLOR);\n capsule.write(_endColor, \"endColor\", (ColorRGBA) DEFAULT_END_COLOR);\n capsule.write(_startSpin, \"startSpin\", 0);\n capsule.write(_endSpin, \"endSpin\", 0);\n capsule.write(_startMass, \"startMass\", 0);\n capsule.write(_endMass, \"endMass\", 0);\n capsule.write(_startTexIndex, \"startTexIndex\", 0);\n capsule.write(_texQuantity, \"texQuantity\", 1);\n capsule.write(_initialVelocity, \"initialVelocity\", 1);\n capsule.write(_minimumLifeTime, \"minimumLifeTime\", DEFAULT_MIN_LIFE);\n capsule.write(_maximumLifeTime, \"maximumLifeTime\", DEFAULT_MAX_LIFE);\n capsule.write(_minimumAngle, \"minimumAngle\", 0);\n capsule.write(_maximumAngle, \"maximumAngle\", DEFAULT_MAX_ANGLE);\n capsule.write(_emissionDirection, \"emissionDirection\", (Vector3) Vector3.UNIT_Y);\n capsule.write(_worldEmit, \"worldEmit\", (Vector3) Vector3.ZERO);\n capsule.write(_upVector, \"upVector\", (Vector3) Vector3.UNIT_Y);\n capsule.write(_leftVector, \"leftVector\", (Vector3) Vector3.NEG_UNIT_X);\n capsule.write(_facingUpVector, \"facingUpVector\", (Vector3) Vector3.UNIT_Y);\n capsule.write(_facingLeftVector, \"facingLeftVector\", (Vector3) Vector3.NEG_UNIT_X);\n capsule.write(_numParticles, \"numParticles\", 0);\n capsule.write(_particleOrientation, \"particleOrientation\", 0);\n capsule.write(_rotateWithScene, \"rotateWithScene\", false);\n capsule.write(_geometryCoordinates, \"geometryCoordinates\", null);\n capsule.write(_appearanceColors, \"appearanceColors\", null);\n capsule.write(_releaseRate, \"releaseRate\", _numParticles);\n capsule.write(_originCenter, \"originCenter\", (Vector3) Vector3.ZERO);\n capsule.write(_originOffset, \"originOffset\", (Vector3) Vector3.ZERO);\n capsule.write(_controller, \"controller\", null);\n capsule.write(_cameraFacing, \"cameraFacing\", true);\n capsule.write(_velocityAligned, \"velocityAligned\", false);\n capsule.write(_particlesInWorldCoords, \"particlesInWorldCoords\", true);\n capsule.write(_ramp, \"ramp\", new ParticleAppearanceRamp());\n capsule.write(_texAnimation, \"texAnimation\", new TexAnimation());\n }\n\n @Override\n public void read(final InputCapsule capsule) throws IOException {\n super.read(capsule);\n _particleType = capsule.readEnum(\"particleType\", ParticleType.class, ParticleType.Triangle);\n _particleEmitter = capsule.readSavable(\"particleEmitter\", null);\n _startSize = capsule.readDouble(\"startSize\", DEFAULT_START_SIZE);\n _endSize = capsule.readDouble(\"endSize\", DEFAULT_END_SIZE);\n _startColor.set(capsule.readSavable(\"startColor\", (ColorRGBA) DEFAULT_START_COLOR));\n _endColor.set(capsule.readSavable(\"endColor\", (ColorRGBA) DEFAULT_END_COLOR));\n _startSpin = capsule.readDouble(\"startSpin\", 0);\n _endSpin = capsule.readDouble(\"endSpin\", 0);\n _startMass = capsule.readDouble(\"startMass\", 0);\n _endMass = capsule.readDouble(\"endMass\", 0);\n _startTexIndex = capsule.readInt(\"startTexIndex\", 0);\n _texQuantity = capsule.readInt(\"texQuantity\", 1);\n _initialVelocity = capsule.readDouble(\"initialVelocity\", 1);\n _minimumLifeTime = capsule.readDouble(\"minimumLifeTime\", DEFAULT_MIN_LIFE);\n _maximumLifeTime = capsule.readDouble(\"maximumLifeTime\", DEFAULT_MAX_LIFE);\n _minimumAngle = capsule.readDouble(\"minimumAngle\", 0);\n _maximumAngle = capsule.readDouble(\"maximumAngle\", DEFAULT_MAX_ANGLE);\n _emissionDirection.set(capsule.readSavable(\"emissionDirection\", (Vector3) Vector3.UNIT_Y));\n _worldEmit.set(capsule.readSavable(\"worldEmit\", (Vector3) Vector3.ZERO));\n _upVector.set(capsule.readSavable(\"upVector\", (Vector3) Vector3.UNIT_Y));\n _leftVector.set(capsule.readSavable(\"leftVector\", (Vector3) Vector3.NEG_UNIT_X));\n _facingUpVector.set(capsule.readSavable(\"facingUpVector\", (Vector3) Vector3.UNIT_Y));\n _facingLeftVector.set(capsule.readSavable(\"facingLeftVector\", (Vector3) Vector3.NEG_UNIT_X));\n _numParticles = capsule.readInt(\"numParticles\", 0);\n _rotateWithScene = capsule.readBoolean(\"rotateWithScene\", false);\n _geometryCoordinates = capsule.readFloatBuffer(\"geometryCoordinates\", null);\n _appearanceColors = capsule.readFloatBuffer(\"appearanceColors\", null);\n\n _releaseRate = capsule.readInt(\"releaseRate\", _numParticles);\n _particleOrientation = capsule.readDouble(\"particleOrientation\", 0);\n _originCenter.set(capsule.readSavable(\"originCenter\", (Vector3) Vector3.ZERO));\n _originOffset.set(capsule.readSavable(\"originOffset\", (Vector3) Vector3.ZERO));\n _controller = (ParticleController) capsule.readSavable(\"controller\", null);\n _cameraFacing = capsule.readBoolean(\"cameraFacing\", true);\n _velocityAligned = capsule.readBoolean(\"velocityAligned\", false);\n _particlesInWorldCoords = capsule.readBoolean(\"particlesInWorldCoords\", true);\n _ramp = capsule.readSavable(\"ramp\", new ParticleAppearanceRamp());\n _texAnimation = capsule.readSavable(\"texAnimation\", new TexAnimation());\n\n _invScale.zero();\n _upXemit.zero();\n _absUpVector.zero();\n _abUpMinUp.zero();\n _rotMatrix.setIdentity();\n initializeParticles(_numParticles);\n }\n}\n"} +{"text": "################################################################################\n#\n# openvpn\n#\n################################################################################\n\nOPENVPN_VERSION = 2.3.7\nOPENVPN_SOURCE = openvpn-$(OPENVPN_VERSION).tar.xz\nOPENVPN_SITE = http://swupdate.openvpn.net/community/releases\nOPENVPN_DEPENDENCIES = host-pkgconf\nOPENVPN_LICENSE = GPLv2\nOPENVPN_LICENSE_FILES = COPYRIGHT.GPL\nOPENVPN_CONF_OPTS = \\\n\t--disable-plugin-auth-pam \\\n\t--enable-iproute2 \\\n\t$(if $(BR2_STATIC_LIBS),--disable-plugins)\nOPENVPN_CONF_ENV = IFCONFIG=/sbin/ifconfig \\\n\tNETSTAT=/bin/netstat \\\n\tROUTE=/sbin/route\n\nifeq ($(BR2_PACKAGE_OPENVPN_SMALL),y)\nOPENVPN_CONF_OPTS += \\\n\t--enable-small \\\n\t--disable-plugins \\\n\t--disable-eurephia\nendif\n\n# BusyBox 1.21+ places the ip applet in the \"correct\" place\n# but previous versions didn't.\nifeq ($(BR2_PACKAGE_IPROUTE2),y)\nOPENVPN_CONF_ENV += IPROUTE=/sbin/ip\nelse ifeq ($(BR2_BUSYBOX_VERSION_1_19_X)$(BR2_BUSYBOX_VERSION_1_20_X),y)\nOPENVPN_CONF_ENV += IPROUTE=/bin/ip\nelse\nOPENVPN_CONF_ENV += IPROUTE=/sbin/ip\nendif\n\nifeq ($(BR2_PACKAGE_OPENVPN_LZO),y)\nOPENVPN_DEPENDENCIES += lzo\nelse\nOPENVPN_CONF_OPTS += --disable-lzo\nendif\n\nifeq ($(BR2_PACKAGE_OPENVPN_CRYPTO_OPENSSL),y)\nOPENVPN_CONF_OPTS += --with-crypto-library=openssl\nOPENVPN_DEPENDENCIES += openssl\nendif\n\nifeq ($(BR2_PACKAGE_OPENVPN_CRYPTO_POLARSSL),y)\nOPENVPN_CONF_OPTS += --with-crypto-library=polarssl\nOPENVPN_DEPENDENCIES += polarssl\nendif\n\ndefine OPENVPN_INSTALL_TARGET_CMDS\n\t$(INSTALL) -m 755 $(@D)/src/openvpn/openvpn \\\n\t\t$(TARGET_DIR)/usr/sbin/openvpn\nendef\n\ndefine OPENVPN_INSTALL_INIT_SYSV\n\t$(INSTALL) -m 755 -D package/openvpn/S60openvpn \\\n\t\t$(TARGET_DIR)/etc/init.d/S60openvpn\nendef\n\n$(eval $(autotools-package))\n"} +{"text": "AWSTemplateFormatVersion: \"2010-09-09\"\nParameters:\n Users:\n Type: CommaDelimitedList\nRules:\n AtLeastOneUserSpecified:\n Assertions:\n - Assert: !And [!Contains [!Ref Users, \"\"], !Contains [!Ref Users, \"another\"]]\n AssertDescription: Must specify at least one user\nResources:\n Bucket:\n Type: \"AWS::S3::Bucket\"\n Properties:\n Tags:\n - Key: BucketUsers\n Value: !Join [\":\", !Ref Users]\n"} +{"text": "//\n// Generated by class-dump 3.5 (64 bit).\n//\n// class-dump is Copyright (C) 1997-1998, 2000-2001, 2004-2013 by Steve Nygard.\n//\n\n//#import \"NSObject.h\"\n\n//#import \"BSTransactionObserver.h\"\n//#import \"SBTouchTemplateGestureRecognizerDelegate.h\"\n//#import \"SBUIActiveOrientationObserver.h\"\n//#import \"SBWallpaperObserver.h\"\n//#import \"UIWindowDelegate.h\"\n//#import \"_UISettingsKeyObserver.h\"\n\n@class NSCountedSet, NSString, SBAppSwitcherSettings, SBDismissOnlyAlertItem, SBHomeScreenWindow, SBScrunchAppsSystemGestureWorkspaceTransaction, SBScrunchSystemGestureRecognizer, SBSwitchAppList, SBSwitchAppSystemGestureRecognizer, SBSwitchAppSystemGestureWorkspaceTransaction, SBSwitcherForcePressSystemGestureRecognizer, SBSwitcherSlideUpSystemGestureRecognizer, UIStatusBar, UIView;\n/*\n@interface SBUIController : NSObject <SBUIActiveOrientationObserver, SBWallpaperObserver, _UISettingsKeyObserver, SBTouchTemplateGestureRecognizerDelegate, BSTransactionObserver, UIWindowDelegate>\n{\n SBHomeScreenWindow *_window;\n UIView *_iconsView;\n UIView *_contentView;\n UIStatusBar *_fakeSpringBoardStatusBar;\n unsigned int _ignoringEvents:1;\n unsigned int _lastVolumeDownToControl:1;\n unsigned int _isBatteryCharging:1;\n unsigned int _isOnAC:1;\n unsigned int _isConnectedToExternalChargingAccessory:1;\n unsigned int _isConnectedToUnsupportedChargingAccessory:1;\n unsigned int _isConnectedToChargeIncapablePowerSource:1;\n id _volumeHandler;\n float _batteryCapacity;\n _Bool _supportsDetailedBatteryCapacity;\n int _batteryLoggingStartCapacity;\n SBDismissOnlyAlertItem *_unsupportedChargerAlert;\n SBAppSwitcherSettings *_switcherSettings;\n SBScrunchSystemGestureRecognizer *_scrunchSystemGestureRecognizer;\n SBScrunchAppsSystemGestureWorkspaceTransaction *_scrunchAppsTransaction;\n SBSwitcherSlideUpSystemGestureRecognizer *_switcherSlideUpGestureRecognizer;\n SBSwitcherForcePressSystemGestureRecognizer *_switcherForcePressRecognizer;\n SBSwitchAppSystemGestureWorkspaceTransaction *_switchAppTransaction;\n SBSwitchAppSystemGestureRecognizer *_switchAppSystemGestureRecognizer;\n SBSwitchAppList *_switchAppList;\n long long _ignoreSwitchAppListClearRequests;\n _Bool _handlingHomePress;\n NSCountedSet *_contentRequiringReasons;\n _Bool _wasTornDownWhenBeganRequiring;\n}*/\n@interface SBUIController (iOS9)\n+ (id)sharedInstanceIfExists;\n+ (id)sharedInstance;\n+ (struct CGAffineTransform)_transformAndFrame:(struct CGRect *)arg1 forLaunchImageContextHostViewWithOrientation:(long long)arg2 statusBarHeight:(double)arg3 inJailRect:(struct CGRect)arg4;\n+ (struct CGAffineTransform)_transformForStatusBarWithOrientation:(long long)arg1 scaleFactor:(double)arg2;\n+ (id)_effectiveStatusBarSettingsForSnapshot:(id)arg1 application:(id)arg2;\n+ (struct CGRect)_referenceBoundsForApp:(id)arg1;\n+ (void)addStatusBarToView:(id)arg1 withSize:(struct CGSize)arg2 destinationFrame:(struct CGRect)arg3 interfaceOrientation:(long long)arg4 scaleFactor:(double)arg5 styleRequest:(id)arg6 statusBarDescriptor:(id)arg7 hidden:(_Bool)arg8;\n+ (id)zoomViewWithIOSurfaceSnapshotOfApp:(id)arg1 sceneID:(id)arg2 screen:(id)arg3 statusBarDescriptor:(id)arg4;\n+ (id)zoomViewForApplication:(id)arg1 sceneID:(id)arg2 interfaceOrientation:(long long)arg3 statusBarDescriptor:(id)arg4 imageName:(id)arg5 decodeImage:(_Bool)arg6;\n+ (id)zoomViewForApplication:(id)arg1 sceneID:(id)arg2 interfaceOrientation:(long long)arg3 statusBarDescriptor:(id)arg4 decodeImage:(_Bool)arg5;\n+ (id)_splashboardLaunchImageForApplication:(id)arg1 sceneID:(id)arg2 display:(id)arg3 interfaceOrientation:(long long)arg4 referenceSize:(struct CGSize)arg5;\n+ (id)zoomViewForApplication:(id)arg1 screen:(id)arg2 interfaceOrientation:(long long)arg3 snapshot:(id)arg4 snapshotSize:(struct CGSize)arg5 statusBarDescriptor:(id)arg6 decodeImage:(_Bool)arg7;\n+ (id)zoomViewForContextHostView:(id)arg1 application:(id)arg2 sceneID:(id)arg3 statusBarDescriptor:(id)arg4;\n+ (struct CGRect)statusBarFrameForSnapshotFrame:(struct CGRect)arg1 remainderFrame:(struct CGRect *)arg2 orientation:(long long)arg3 statusBarStyleRequest:(id)arg4 hidden:(_Bool)arg5;\n+ (struct CGRect)statusBarFrameForSnapshotFrame:(struct CGRect)arg1 orientation:(long long)arg2 statusBarStyleRequest:(id)arg3 hidden:(_Bool)arg4;\n@property(nonatomic) _Bool wasTornDownWhenBeganRequiring; // @synthesize wasTornDownWhenBeganRequiring=_wasTornDownWhenBeganRequiring;\n- (void)settings:(id)arg1 changedValueForKey:(id)arg2;\n- (id)_legibilityPrototypeSettings;\n- (id)_currentFolderLegibilitySettings;\n- (id)_legibilitySettings;\n- (void)updateStatusBarLegibility;\n- (void)_updateLegibility;\n- (void)wallpaperDidChangeForVariant:(long long)arg1;\n- (void)wallpaperLegibilitySettingsDidChange:(id)arg1 forVariant:(long long)arg2;\n- (_Bool)gestureRecognizerShouldBegin:(id)arg1;\n- (id)viewForSystemGestureRecognizer:(id)arg1;\n- (void)transactionDidComplete:(id)arg1;\n- (void)programmaticSwitchAppGestureMoveToRight;\n- (void)programmaticSwitchAppGestureMoveToLeft;\n- (void)_programmaticSwitchAppToApp:(id)arg1 reverseAnimation:(_Bool)arg2;\n- (_Bool)_isIgnoringSwitchAppListClearRequests;\n- (void)_endIgnoringSwitchAppListClearRequests;\n- (void)_beginIgnoringSwitchAppListClearRequests;\n- (void)clearSwitchAppList;\n- (id)_switchAppList;\n- (void)_switchAppGestureBegan:(double)arg1;\n- (void)_handleSwitchAppGesture:(id)arg1;\n- (_Bool)_switchAppSystemGestureShouldBegin:(id)arg1;\n- (void)_handleSwitcherForcePressGesture:(id)arg1;\n- (_Bool)_appSwitcherForcePressSystemGestureShouldBegin:(id)arg1;\n- (void)_handleSwitcherSlideUpGesture:(id)arg1;\n- (_Bool)_appSwitcherSystemGestureShouldBegin:(id)arg1;\n- (void)_scrunchGestureBegan;\n- (void)_handleScrunchGesture:(id)arg1;\n- (_Bool)_scrunchSystemGestureShouldBegin:(id)arg1;\n- (_Bool)_canPresentCenterController:(id)arg1;\n- (unsigned char)headsetBatteryCapacity;\n- (_Bool)isHeadsetBatteryCharging;\n- (_Bool)isHeadsetDocked;\n- (void)activeInterfaceOrientationDidChangeToOrientation:(long long)arg1 willAnimateWithDuration:(double)arg2 fromOrientation:(long long)arg3;\n- (void)activeInterfaceOrientationWillChangeToOrientation:(long long)arg1;\n- (void)disableAnimationForNextIconRotation;\n- (void)setAllowIconRotation:(_Bool)arg1 forReason:(id)arg2;\n- (void)forceIconInterfaceOrientation:(long long)arg1 duration:(double)arg2;\n- (void)noteStatusBarHeightChanged:(id)arg1;\n- (_Bool)supportsDetailedBatteryCapacity;\n- (_Bool)isConnectedToUnsupportedChargingAccessory;\n- (void)setIsConnectedToUnsupportedChargingAccessory:(_Bool)arg1;\n- (void)externalChargingAccessoriesChanged;\n- (void)ACPowerChanged;\n- (void)_possiblyWakeForPowerStatusChangeWithUnlockSource:(int)arg1;\n- (_Bool)isConnectedToChargeIncapablePowerSource;\n- (_Bool)isConnectedToExternalChargingSource;\n- (_Bool)isOnAC;\n- (_Bool)isBatteryCharging;\n- (int)batteryCapacityAsPercentage;\n- (float)batteryCapacity;\n- (void)updateBatteryState:(id)arg1;\n- (void)cancelVolumeEvent;\n- (void)handleVolumeEvent:(struct __IOHIDEvent *)arg1;\n- (_Bool)_ignoringEvents;\n- (void)_resumeEventsIfNecessary;\n- (void)requestApplicationEventsEnabledIfNecessary;\n- (void)_ignoreEvents;\n- (_Bool)_allowSwitcherGesture;\n- (_Bool)isAppSwitcherShowing;\n- (void)returnIconsViewFromAppSwitcher:(id)arg1;\n- (id)lendIconsViewForAppSwitcher;\n- (void)_accessibilityWillBeginAppSwitcherRevealAnimation;\n- (_Bool)handleMenuDoubleTap;\n- (void)_backgroundContrastDidChange:(id)arg1;\n- (void)_awayControllerActivated:(id)arg1;\n- (_Bool)clickedMenuButton;\n- (_Bool)isHandlingHomeButtonPress;\n- (_Bool)_handleButtonEventToSuspendDisplays:(_Bool)arg1 displayWasSuspendedOut:(_Bool *)arg2;\n- (int)_dismissSheetsAndDetermineAlertStateForMenuClickOrSystemGesture;\n- (void)_switchToHomeScreenWallpaperAnimated:(_Bool)arg1;\n- (void)stopRestoringIconList;\n- (void)endRequiringContentForReason:(id)arg1;\n- (void)beginRequiringContentForReason:(id)arg1;\n- (_Bool)_isIconListAndBarTornDown;\n- (void)tearDownIconListAndBar;\n//- (void)restoreContentAndUnscatterIconsAnimated:(_Bool)arg1 afterDelay:(double)arg2 withCompletion:(CDUnknownBlockType)arg3;\n//- (void)restoreContentAndUnscatterIconsAnimated:(_Bool)arg1 withCompletion:(CDUnknownBlockType)arg2;\n- (void)restoreContentAndUnscatterIconsAnimated:(_Bool)arg1;\n- (void)restoreContentUpdatingStatusBar:(_Bool)arg1;\n- (void)restoreContent;\n- (void)_closeOpenFolderIfNecessary;\n- (void)_hideKeyboard;\n- (void)_deviceLockStateChanged:(id)arg1;\n- (void)activateApplication:(id)arg1 fromIcon:(id)arg2 location:(int)arg3;\n- (void)activateApplication:(id)arg1;\n- (void)launchIcon:(id)arg1 fromLocation:(int)arg2 context:(id)arg3;\n//- (void)getRotationContentSettings:(CDStruct_e950349b *)arg1 forWindow:(id)arg2;\n- (id)window;\n- (id)contentView;\n- (void)animateFakeStatusBarWithParameters:(id)arg1 transition:(id)arg2;\n- (void)setFakeSpringBoardStatusBarVisible:(_Bool)arg1;\n- (id)_fakeSpringBoardStatusBar;\n- (id)fakeStatusBarStyleRequestForStyle:(long long)arg1;\n- (void)configureFakeSpringBoardStatusBarWithStyleRequest:(id)arg1;\n- (_Bool)isFakeStatusBarStyleEffectivelyDoubleHeight:(long long)arg1;\n- (void)configureFakeSpringBoardStatusBarWithDefaultStyleRequestForStyle:(long long)arg1;\n- (void)removeFakeSpringBoardStatusBar;\n//- (_Bool)promptUnlockForAppActivation:(id)arg1 withCompletion:(CDUnknownBlockType)arg2;\n- (void)systemControllerRouteChanged:(id)arg1;\n- (void)finishLaunching;\n- (void)_setHidden:(_Bool)arg1;\n- (void)animateAppleDown:(_Bool)arg1;\n- (void)_insertIconsViewIntoContentViewAtIndex:(unsigned long long)arg1;\n- (void)_addRemoveSwitcherGesture;\n- (id)init;\n- (void)dealloc;\n\n// Remaining properties\n@property(readonly, copy) NSString *debugDescription;\n@property(readonly, copy) NSString *description;\n@property(readonly) unsigned long long hash;\n@property(readonly) Class superclass;\n\n@end\n\n"} +{"text": "--INI--\nHTML.Trusted = true\n--HTML--\n<ul><!-- Foo --></ul>\n--EXPECT--\n--# vim: et sw=4 sts=4\n"} +{"text": "<snippet>\n <content><![CDATA[protected ${1:String} ${2:str}${4: = ${3:value}};]]></content>\n <description>protected var</description>\n <scope>source.pde</scope>\n <tabTrigger>protected</tabTrigger>\n</snippet>\n"} +{"text": "\n\n<!DOCTYPE html>\n<!--[if IE 8]><html class=\"no-js lt-ie9\" lang=\"en\" > <![endif]-->\n<!--[if gt IE 8]><!--> <html class=\"no-js\" lang=\"en\" > <!--<![endif]-->\n<head>\n <meta charset=\"utf-8\">\n \n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n \n <title>Adding a New Environment &mdash; Reinforcement Learning Coach 0.12.0 documentation</title>\n \n\n \n \n \n \n\n \n <script type=\"text/javascript\" src=\"../_static/js/modernizr.min.js\"></script>\n \n \n <script type=\"text/javascript\" id=\"documentation_options\" data-url_root=\"../\" src=\"../_static/documentation_options.js\"></script>\n <script type=\"text/javascript\" src=\"../_static/jquery.js\"></script>\n <script type=\"text/javascript\" src=\"../_static/underscore.js\"></script>\n <script type=\"text/javascript\" src=\"../_static/doctools.js\"></script>\n <script type=\"text/javascript\" src=\"../_static/language_data.js\"></script>\n <script async=\"async\" type=\"text/javascript\" src=\"https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML\"></script>\n \n <script type=\"text/javascript\" src=\"../_static/js/theme.js\"></script>\n\n \n\n \n <link rel=\"stylesheet\" href=\"../_static/css/theme.css\" type=\"text/css\" />\n <link rel=\"stylesheet\" href=\"../_static/pygments.css\" type=\"text/css\" />\n <link rel=\"stylesheet\" href=\"../_static/css/custom.css\" type=\"text/css\" />\n <link rel=\"index\" title=\"Index\" href=\"../genindex.html\" />\n <link rel=\"search\" title=\"Search\" href=\"../search.html\" />\n <link rel=\"next\" title=\"Agents\" href=\"../components/agents/index.html\" />\n <link rel=\"prev\" title=\"Adding a New Agent\" href=\"add_agent.html\" />\n <link href=\"../_static/css/custom.css\" rel=\"stylesheet\" type=\"text/css\">\n\n</head>\n\n<body class=\"wy-body-for-nav\">\n\n \n <div class=\"wy-grid-for-nav\">\n \n <nav data-toggle=\"wy-nav-shift\" class=\"wy-nav-side\">\n <div class=\"wy-side-scroll\">\n <div class=\"wy-side-nav-search\" >\n \n\n \n <a href=\"../index.html\" class=\"icon icon-home\"> Reinforcement Learning Coach\n \n\n \n \n <img src=\"../_static/dark_logo.png\" class=\"logo\" alt=\"Logo\"/>\n \n </a>\n\n \n \n \n \n\n \n<div role=\"search\">\n <form id=\"rtd-search-form\" class=\"wy-form\" action=\"../search.html\" method=\"get\">\n <input type=\"text\" name=\"q\" placeholder=\"Search docs\" />\n <input type=\"hidden\" name=\"check_keywords\" value=\"yes\" />\n <input type=\"hidden\" name=\"area\" value=\"default\" />\n </form>\n</div>\n\n \n </div>\n\n <div class=\"wy-menu wy-menu-vertical\" data-spy=\"affix\" role=\"navigation\" aria-label=\"main navigation\">\n \n \n \n \n \n \n <p class=\"caption\"><span class=\"caption-text\">Intro</span></p>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../usage.html\">Usage</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../dist_usage.html\">Usage - Distributed Coach</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../features/index.html\">Features</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../selecting_an_algorithm.html\">Selecting an Algorithm</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../dashboard.html\">Coach Dashboard</a></li>\n</ul>\n<p class=\"caption\"><span class=\"caption-text\">Design</span></p>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../design/control_flow.html\">Control Flow</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../design/network.html\">Network Design</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../design/horizontal_scaling.html\">Distributed Coach - Horizontal Scale-Out</a></li>\n</ul>\n<p class=\"caption\"><span class=\"caption-text\">Contributing</span></p>\n<ul class=\"current\">\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"add_agent.html\">Adding a New Agent</a></li>\n<li class=\"toctree-l1 current\"><a class=\"current reference internal\" href=\"#\">Adding a New Environment</a><ul>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"#using-the-openai-gym-api\">Using the OpenAI Gym API</a></li>\n<li class=\"toctree-l2\"><a class=\"reference internal\" href=\"#using-the-coach-api\">Using the Coach API</a></li>\n</ul>\n</li>\n</ul>\n<p class=\"caption\"><span class=\"caption-text\">Components</span></p>\n<ul>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../components/agents/index.html\">Agents</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../components/architectures/index.html\">Architectures</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../components/data_stores/index.html\">Data Stores</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../components/environments/index.html\">Environments</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../components/exploration_policies/index.html\">Exploration Policies</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../components/filters/index.html\">Filters</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../components/memories/index.html\">Memories</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../components/memory_backends/index.html\">Memory Backends</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../components/orchestrators/index.html\">Orchestrators</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../components/core_types.html\">Core Types</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../components/spaces.html\">Spaces</a></li>\n<li class=\"toctree-l1\"><a class=\"reference internal\" href=\"../components/additional_parameters.html\">Additional Parameters</a></li>\n</ul>\n\n \n \n </div>\n </div>\n </nav>\n\n <section data-toggle=\"wy-nav-shift\" class=\"wy-nav-content-wrap\">\n\n \n <nav class=\"wy-nav-top\" aria-label=\"top navigation\">\n \n <i data-toggle=\"wy-nav-top\" class=\"fa fa-bars\"></i>\n <a href=\"../index.html\">Reinforcement Learning Coach</a>\n \n </nav>\n\n\n <div class=\"wy-nav-content\">\n \n <div class=\"rst-content\">\n \n \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<div role=\"navigation\" aria-label=\"breadcrumbs navigation\">\n\n <ul class=\"wy-breadcrumbs\">\n \n <li><a href=\"../index.html\">Docs</a> &raquo;</li>\n \n <li>Adding a New Environment</li>\n \n \n <li class=\"wy-breadcrumbs-aside\">\n \n \n <a href=\"../_sources/contributing/add_env.rst.txt\" rel=\"nofollow\"> View page source</a>\n \n \n </li>\n \n </ul>\n\n \n <hr/>\n</div>\n <div role=\"main\" class=\"document\" itemscope=\"itemscope\" itemtype=\"http://schema.org/Article\">\n <div itemprop=\"articleBody\">\n \n <div class=\"section\" id=\"adding-a-new-environment\">\n<h1>Adding a New Environment<a class=\"headerlink\" href=\"#adding-a-new-environment\" title=\"Permalink to this headline\">¶</a></h1>\n<p>Adding a new environment to Coach is as easy as solving CartPole.</p>\n<p>There are essentially two ways to integrate new environments to Coach:</p>\n<div class=\"section\" id=\"using-the-openai-gym-api\">\n<h2>Using the OpenAI Gym API<a class=\"headerlink\" href=\"#using-the-openai-gym-api\" title=\"Permalink to this headline\">¶</a></h2>\n<p>If your environment is already using the OpenAI Gym API, you are already good to go.\nWhen selecting the environment parameters in the preset, use <code class=\"code docutils literal notranslate\"><span class=\"pre\">GymEnvironmentParameters()</span></code>,\nand pass the path to your environment source code using the level parameter.\nYou can specify additional parameters for your environment using the additional_simulator_parameters parameter.\nTake for example the definition used in the <code class=\"code docutils literal notranslate\"><span class=\"pre\">Pendulum_HAC</span></code> preset:</p>\n<div class=\"highlight-python notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"n\">env_params</span> <span class=\"o\">=</span> <span class=\"n\">GymEnvironmentParameters</span><span class=\"p\">()</span>\n<span class=\"n\">env_params</span><span class=\"o\">.</span><span class=\"n\">level</span> <span class=\"o\">=</span> <span class=\"s2\">&quot;rl_coach.environments.mujoco.pendulum_with_goals:PendulumWithGoals&quot;</span>\n<span class=\"n\">env_params</span><span class=\"o\">.</span><span class=\"n\">additional_simulator_parameters</span> <span class=\"o\">=</span> <span class=\"p\">{</span><span class=\"s2\">&quot;time_limit&quot;</span><span class=\"p\">:</span> <span class=\"mi\">1000</span><span class=\"p\">}</span>\n</pre></div>\n</div>\n</div>\n<div class=\"section\" id=\"using-the-coach-api\">\n<h2>Using the Coach API<a class=\"headerlink\" href=\"#using-the-coach-api\" title=\"Permalink to this headline\">¶</a></h2>\n<p>There are a few simple steps to follow, and we will walk through them one by one.\nAs an alternative, we highly recommend following the corresponding\n<a class=\"reference external\" href=\"https://github.com/NervanaSystems/coach/blob/master/tutorials/2.%20Adding%20an%20Environment.ipynb\">tutorial</a>\nin the GitHub repo.</p>\n<ol class=\"arabic\">\n<li><p>Create a new class for your environment, and inherit the Environment class.</p></li>\n<li><p>Coach defines a simple API for implementing a new environment, which are defined in environment/environment.py.\nThere are several functions to implement, but only some of them are mandatory.</p>\n<p>Here are the important ones:</p>\n<div class=\"highlight-python notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"k\">def</span> <span class=\"nf\">_take_action</span><span class=\"p\">(</span><span class=\"bp\">self</span><span class=\"p\">,</span> <span class=\"n\">action_idx</span><span class=\"p\">:</span> <span class=\"n\">ActionType</span><span class=\"p\">)</span> <span class=\"o\">-&gt;</span> <span class=\"bp\">None</span><span class=\"p\">:</span>\n <span class=\"sd\">&quot;&quot;&quot;</span>\n<span class=\"sd\"> An environment dependent function that sends an action to the simulator.</span>\n<span class=\"sd\"> :param action_idx: the action to perform on the environment</span>\n<span class=\"sd\"> :return: None</span>\n<span class=\"sd\"> &quot;&quot;&quot;</span>\n\n<span class=\"k\">def</span> <span class=\"nf\">_update_state</span><span class=\"p\">(</span><span class=\"bp\">self</span><span class=\"p\">)</span> <span class=\"o\">-&gt;</span> <span class=\"bp\">None</span><span class=\"p\">:</span>\n <span class=\"sd\">&quot;&quot;&quot;</span>\n<span class=\"sd\"> Updates the state from the environment.</span>\n<span class=\"sd\"> Should update self.observation, self.reward, self.done, self.measurements and self.info</span>\n<span class=\"sd\"> :return: None</span>\n<span class=\"sd\"> &quot;&quot;&quot;</span>\n\n<span class=\"k\">def</span> <span class=\"nf\">_restart_environment_episode</span><span class=\"p\">(</span><span class=\"bp\">self</span><span class=\"p\">,</span> <span class=\"n\">force_environment_reset</span><span class=\"o\">=</span><span class=\"bp\">False</span><span class=\"p\">)</span> <span class=\"o\">-&gt;</span> <span class=\"bp\">None</span><span class=\"p\">:</span>\n <span class=\"sd\">&quot;&quot;&quot;</span>\n<span class=\"sd\"> Restarts the simulator episode</span>\n<span class=\"sd\"> :param force_environment_reset: Force the environment to reset even if the episode is not done yet.</span>\n<span class=\"sd\"> :return: None</span>\n<span class=\"sd\"> &quot;&quot;&quot;</span>\n\n<span class=\"k\">def</span> <span class=\"nf\">_render</span><span class=\"p\">(</span><span class=\"bp\">self</span><span class=\"p\">)</span> <span class=\"o\">-&gt;</span> <span class=\"bp\">None</span><span class=\"p\">:</span>\n <span class=\"sd\">&quot;&quot;&quot;</span>\n<span class=\"sd\"> Renders the environment using the native simulator renderer</span>\n<span class=\"sd\"> :return: None</span>\n<span class=\"sd\"> &quot;&quot;&quot;</span>\n\n<span class=\"k\">def</span> <span class=\"nf\">get_rendered_image</span><span class=\"p\">(</span><span class=\"bp\">self</span><span class=\"p\">)</span> <span class=\"o\">-&gt;</span> <span class=\"n\">np</span><span class=\"o\">.</span><span class=\"n\">ndarray</span><span class=\"p\">:</span>\n <span class=\"sd\">&quot;&quot;&quot;</span>\n<span class=\"sd\"> Return a numpy array containing the image that will be rendered to the screen.</span>\n<span class=\"sd\"> This can be different from the observation. For example, mujoco&#39;s observation is a measurements vector.</span>\n<span class=\"sd\"> :return: numpy array containing the image that will be rendered to the screen</span>\n<span class=\"sd\"> &quot;&quot;&quot;</span>\n</pre></div>\n</div>\n</li>\n<li><p>Create a new parameters class for your environment, which inherits the EnvironmentParameters class.\nIn the __init__ of your class, define all the parameters you used in your Environment class.\nAdditionally, fill the path property of the class with the path to your Environment class.\nFor example, take a look at the EnvironmentParameters class used for Doom:</p>\n<blockquote>\n<div><div class=\"highlight-python notranslate\"><div class=\"highlight\"><pre><span></span><span class=\"k\">class</span> <span class=\"nc\">DoomEnvironmentParameters</span><span class=\"p\">(</span><span class=\"n\">EnvironmentParameters</span><span class=\"p\">):</span>\n<span class=\"k\">def</span> <span class=\"fm\">__init__</span><span class=\"p\">(</span><span class=\"bp\">self</span><span class=\"p\">):</span>\n <span class=\"nb\">super</span><span class=\"p\">()</span><span class=\"o\">.</span><span class=\"fm\">__init__</span><span class=\"p\">()</span>\n <span class=\"bp\">self</span><span class=\"o\">.</span><span class=\"n\">default_input_filter</span> <span class=\"o\">=</span> <span class=\"n\">DoomInputFilter</span>\n <span class=\"bp\">self</span><span class=\"o\">.</span><span class=\"n\">default_output_filter</span> <span class=\"o\">=</span> <span class=\"n\">DoomOutputFilter</span>\n <span class=\"bp\">self</span><span class=\"o\">.</span><span class=\"n\">cameras</span> <span class=\"o\">=</span> <span class=\"p\">[</span><span class=\"n\">DoomEnvironment</span><span class=\"o\">.</span><span class=\"n\">CameraTypes</span><span class=\"o\">.</span><span class=\"n\">OBSERVATION</span><span class=\"p\">]</span>\n\n<span class=\"nd\">@property</span>\n<span class=\"k\">def</span> <span class=\"nf\">path</span><span class=\"p\">(</span><span class=\"bp\">self</span><span class=\"p\">):</span>\n <span class=\"k\">return</span> <span class=\"s1\">&#39;rl_coach.environments.doom_environment:DoomEnvironment&#39;</span>\n</pre></div>\n</div>\n</div></blockquote>\n</li>\n<li><p>And that’s it, you’re done. Now just add a new preset with your newly created environment, and start training an agent on top of it.</p></li>\n</ol>\n</div>\n</div>\n\n\n </div>\n \n </div>\n <footer>\n \n <div class=\"rst-footer-buttons\" role=\"navigation\" aria-label=\"footer navigation\">\n \n <a href=\"../components/agents/index.html\" class=\"btn btn-neutral float-right\" title=\"Agents\" accesskey=\"n\" rel=\"next\">Next <span class=\"fa fa-arrow-circle-right\"></span></a>\n \n \n <a href=\"add_agent.html\" class=\"btn btn-neutral float-left\" title=\"Adding a New Agent\" accesskey=\"p\" rel=\"prev\"><span class=\"fa fa-arrow-circle-left\"></span> Previous</a>\n \n </div>\n \n\n <hr/>\n\n <div role=\"contentinfo\">\n <p>\n &copy; Copyright 2018-2019, Intel AI Lab\n\n </p>\n </div>\n Built with <a href=\"http://sphinx-doc.org/\">Sphinx</a> using a <a href=\"https://github.com/rtfd/sphinx_rtd_theme\">theme</a> provided by <a href=\"https://readthedocs.org\">Read the Docs</a>. \n\n</footer>\n\n </div>\n </div>\n\n </section>\n\n </div>\n \n\n\n <script type=\"text/javascript\">\n jQuery(function () {\n SphinxRtdTheme.Navigation.enable(true);\n });\n </script>\n\n \n \n \n \n\n</body>\n</html>"} +{"text": "#!/usr/bin/env perl\n# Copyright 2009 The Go Authors. All rights reserved.\n# Use of this source code is governed by a BSD-style\n# license that can be found in the LICENSE file.\n#\n# Generate system call table for FreeBSD from master list\n# (for example, /usr/src/sys/kern/syscalls.master).\n\nuse strict;\n\nif($ENV{'GOARCH'} eq \"\" || $ENV{'GOOS'} eq \"\") {\n\tprint STDERR \"GOARCH or GOOS not defined in environment\\n\";\n\texit 1;\n}\n\nmy $command = \"mksysnum_freebsd.pl \" . join(' ', @ARGV);\n\nprint <<EOF;\n// $command\n// Code generated by the command above; see README.md. DO NOT EDIT.\n\n// +build $ENV{'GOARCH'},$ENV{'GOOS'}\n\npackage unix\n\nconst (\nEOF\n\nwhile(<>){\n\tif(/^([0-9]+)\\s+\\S+\\s+STD\\s+({ \\S+\\s+(\\w+).*)$/){\n\t\tmy $num = $1;\n\t\tmy $proto = $2;\n\t\tmy $name = \"SYS_$3\";\n\t\t$name =~ y/a-z/A-Z/;\n\n\t\t# There are multiple entries for enosys and nosys, so comment them out.\n\t\tif($name =~ /^SYS_E?NOSYS$/){\n\t\t\t$name = \"// $name\";\n\t\t}\n\t\tif($name eq 'SYS_SYS_EXIT'){\n\t\t\t$name = 'SYS_EXIT';\n\t\t}\n\n\t\tprint \"\t$name = $num; // $proto\\n\";\n\t}\n}\n\nprint <<EOF;\n)\nEOF\n"} +{"text": "# search\n\nSearch [Docker Hub](https://hub.docker.com) for images\n\n Usage: docker search [OPTIONS] TERM\n\n Search the Docker Hub for images\n\n -f, --filter Filter output based on conditions provided (default [])\n --limit Max number of search results (default 25)\n --no-trunc=false Don't truncate output\n -s, --stars=0 Only displays with at least x stars\n\nSee [*Find Public Images on Docker Hub*](\n/userguide/dockerrepos/#searching-for-images) for\nmore details on finding shared images from the command line.\n\n> **Note:**\n> Search queries will only return up to 25 results\n\n## Divergence\n\n- `-f`, `--filter` and `--limit` options are unsupported.\n\n## Related\n\n- [`docker pull`](../commands/pull.md)\n"} +{"text": "import { b2Vec2, b2Rot, XY } from \"../common/b2_math.js\";\nimport { b2Joint, b2JointDef, b2IJointDef } from \"./b2_joint.js\";\nimport { b2SolverData } from \"./b2_time_step.js\";\nexport interface b2IRopeJointDef extends b2IJointDef {\n localAnchorA?: XY;\n localAnchorB?: XY;\n maxLength?: number;\n}\nexport declare class b2RopeJointDef extends b2JointDef implements b2IRopeJointDef {\n readonly localAnchorA: b2Vec2;\n readonly localAnchorB: b2Vec2;\n maxLength: number;\n constructor();\n}\nexport declare class b2RopeJoint extends b2Joint {\n readonly m_localAnchorA: b2Vec2;\n readonly m_localAnchorB: b2Vec2;\n m_maxLength: number;\n m_length: number;\n m_impulse: number;\n m_indexA: number;\n m_indexB: number;\n readonly m_u: b2Vec2;\n readonly m_rA: b2Vec2;\n readonly m_rB: b2Vec2;\n readonly m_localCenterA: b2Vec2;\n readonly m_localCenterB: b2Vec2;\n m_invMassA: number;\n m_invMassB: number;\n m_invIA: number;\n m_invIB: number;\n m_mass: number;\n readonly m_qA: b2Rot;\n readonly m_qB: b2Rot;\n readonly m_lalcA: b2Vec2;\n readonly m_lalcB: b2Vec2;\n constructor(def: b2IRopeJointDef);\n private static InitVelocityConstraints_s_P;\n InitVelocityConstraints(data: b2SolverData): void;\n private static SolveVelocityConstraints_s_vpA;\n private static SolveVelocityConstraints_s_vpB;\n private static SolveVelocityConstraints_s_P;\n SolveVelocityConstraints(data: b2SolverData): void;\n private static SolvePositionConstraints_s_P;\n SolvePositionConstraints(data: b2SolverData): boolean;\n GetAnchorA<T extends XY>(out: T): T;\n GetAnchorB<T extends XY>(out: T): T;\n GetReactionForce<T extends XY>(inv_dt: number, out: T): T;\n GetReactionTorque(inv_dt: number): number;\n GetLocalAnchorA(): Readonly<b2Vec2>;\n GetLocalAnchorB(): Readonly<b2Vec2>;\n SetMaxLength(length: number): void;\n GetMaxLength(): number;\n GetLength(): number;\n Dump(log: (format: string, ...args: any[]) => void): void;\n}\n"} +{"text": "// Copyright (c) 2012 The Chromium Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style license that can be\n// found in the LICENSE file.\n//\n// Methods for sending the update stanza to notify peers via xmpp.\n\n#ifndef JINGLE_NOTIFIER_LISTENER_SEND_PING_TASK_H_\n#define JINGLE_NOTIFIER_LISTENER_SEND_PING_TASK_H_\n\n#include \"base/compiler_specific.h\"\n#include \"base/gtest_prod_util.h\"\n#include \"base/macros.h\"\n#include \"webrtc/libjingle/xmpp/xmpptask.h\"\n\nnamespace buzz {\nclass XmlElement;\n} // namespace\n\nnamespace notifier {\n\nclass SendPingTask : public buzz::XmppTask {\n public:\n class Delegate {\n public:\n virtual void OnPingResponseReceived() = 0;\n\n protected:\n virtual ~Delegate();\n };\n\n SendPingTask(buzz::XmppTaskParentInterface* parent, Delegate* delegate);\n ~SendPingTask() override;\n\n // Overridden from buzz::XmppTask.\n int ProcessStart() override;\n int ProcessResponse() override;\n bool HandleStanza(const buzz::XmlElement* stanza) override;\n\n private:\n static buzz::XmlElement* MakePingStanza(const std::string& task_id);\n\n FRIEND_TEST_ALL_PREFIXES(SendPingTaskTest, MakePingStanza);\n\n std::string ping_task_id_;\n Delegate* delegate_;\n\n DISALLOW_COPY_AND_ASSIGN(SendPingTask);\n};\n\ntypedef SendPingTask::Delegate SendPingTaskDelegate;\n\n} // namespace notifier\n\n#endif // JINGLE_NOTIFIER_LISTENER_SEND_PING_TASK_H_\n"} +{"text": "FROM php:7.3-alpine\n\nENV COMPOSER_HOME /tmp\nENV COMPOSER_ALLOW_SUPERUSER 1\n\nRUN apk --no-cache add bash curl git openssl graphviz\n\nCOPY . /app\nWORKDIR /app\n\nRUN ./bin/composer-install.sh && composer update\n"} +{"text": "#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n# Copyright (c) 2005-2010 ActiveState Software Inc.\n# Copyright (c) 2013 Eddy Petrișor\n\n\"\"\"Utilities for determining application-specific dirs.\n\nSee <http://github.com/ActiveState/appdirs> for details and usage.\n\"\"\"\n# Dev Notes:\n# - MSDN on where to store app data files:\n# http://support.microsoft.com/default.aspx?scid=kb;en-us;310294#XSLTH3194121123120121120120\n# - Mac OS X: http://developer.apple.com/documentation/MacOSX/Conceptual/BPFileSystem/index.html\n# - XDG spec for Un*x: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html\n\n__version_info__ = (1, 4, 0)\n__version__ = '.'.join(map(str, __version_info__))\n\n\nimport sys\nimport os\n\nPY3 = sys.version_info[0] == 3\n\nif PY3:\n unicode = str\n\nif sys.platform.startswith('java'):\n import platform\n os_name = platform.java_ver()[3][0]\n if os_name.startswith('Windows'): # \"Windows XP\", \"Windows 7\", etc.\n system = 'win32'\n elif os_name.startswith('Mac'): # \"Mac OS X\", etc.\n system = 'darwin'\n else: # \"Linux\", \"SunOS\", \"FreeBSD\", etc.\n # Setting this to \"linux2\" is not ideal, but only Windows or Mac\n # are actually checked for and the rest of the module expects\n # *sys.platform* style strings.\n system = 'linux2'\nelse:\n system = sys.platform\n\n\n\ndef user_data_dir(appname=None, appauthor=None, version=None, roaming=False):\n r\"\"\"Return full path to the user-specific data dir for this application.\n\n \"appname\" is the name of application.\n If None, just the system directory is returned.\n \"appauthor\" (only used on Windows) is the name of the\n appauthor or distributing body for this application. Typically\n it is the owning company name. This falls back to appname. You may\n pass False to disable it.\n \"version\" is an optional version path element to append to the\n path. You might want to use this if you want multiple versions\n of your app to be able to run independently. If used, this\n would typically be \"<major>.<minor>\".\n Only applied when appname is present.\n \"roaming\" (boolean, default False) can be set True to use the Windows\n roaming appdata directory. That means that for users on a Windows\n network setup for roaming profiles, this user data will be\n sync'd on login. See\n <http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx>\n for a discussion of issues.\n\n Typical user data directories are:\n Mac OS X: ~/Library/Application Support/<AppName>\n Unix: ~/.local/share/<AppName> # or in $XDG_DATA_HOME, if defined\n Win XP (not roaming): C:\\Documents and Settings\\<username>\\Application Data\\<AppAuthor>\\<AppName>\n Win XP (roaming): C:\\Documents and Settings\\<username>\\Local Settings\\Application Data\\<AppAuthor>\\<AppName>\n Win 7 (not roaming): C:\\Users\\<username>\\AppData\\Local\\<AppAuthor>\\<AppName>\n Win 7 (roaming): C:\\Users\\<username>\\AppData\\Roaming\\<AppAuthor>\\<AppName>\n\n For Unix, we follow the XDG spec and support $XDG_DATA_HOME.\n That means, by default \"~/.local/share/<AppName>\".\n \"\"\"\n if system == \"win32\":\n if appauthor is None:\n appauthor = appname\n const = roaming and \"CSIDL_APPDATA\" or \"CSIDL_LOCAL_APPDATA\"\n path = os.path.normpath(_get_win_folder(const))\n if appname:\n if appauthor is not False:\n path = os.path.join(path, appauthor, appname)\n else:\n path = os.path.join(path, appname)\n elif system == 'darwin':\n path = os.path.expanduser('~/Library/Application Support/')\n if appname:\n path = os.path.join(path, appname)\n else:\n path = os.getenv('XDG_DATA_HOME', os.path.expanduser(\"~/.local/share\"))\n if appname:\n path = os.path.join(path, appname)\n if appname and version:\n path = os.path.join(path, version)\n return path\n\n\ndef site_data_dir(appname=None, appauthor=None, version=None, multipath=False):\n \"\"\"Return full path to the user-shared data dir for this application.\n\n \"appname\" is the name of application.\n If None, just the system directory is returned.\n \"appauthor\" (only used on Windows) is the name of the\n appauthor or distributing body for this application. Typically\n it is the owning company name. This falls back to appname. You may\n pass False to disable it.\n \"version\" is an optional version path element to append to the\n path. You might want to use this if you want multiple versions\n of your app to be able to run independently. If used, this\n would typically be \"<major>.<minor>\".\n Only applied when appname is present.\n \"multipath\" is an optional parameter only applicable to *nix\n which indicates that the entire list of data dirs should be\n returned. By default, the first item from XDG_DATA_DIRS is\n returned, or '/usr/local/share/<AppName>',\n if XDG_DATA_DIRS is not set\n\n Typical user data directories are:\n Mac OS X: /Library/Application Support/<AppName>\n Unix: /usr/local/share/<AppName> or /usr/share/<AppName>\n Win XP: C:\\Documents and Settings\\All Users\\Application Data\\<AppAuthor>\\<AppName>\n Vista: (Fail! \"C:\\ProgramData\" is a hidden *system* directory on Vista.)\n Win 7: C:\\ProgramData\\<AppAuthor>\\<AppName> # Hidden, but writeable on Win 7.\n\n For Unix, this is using the $XDG_DATA_DIRS[0] default.\n\n WARNING: Do not use this on Windows. See the Vista-Fail note above for why.\n \"\"\"\n if system == \"win32\":\n if appauthor is None:\n appauthor = appname\n path = os.path.normpath(_get_win_folder(\"CSIDL_COMMON_APPDATA\"))\n if appname:\n if appauthor is not False:\n path = os.path.join(path, appauthor, appname)\n else:\n path = os.path.join(path, appname)\n elif system == 'darwin':\n path = os.path.expanduser('/Library/Application Support')\n if appname:\n path = os.path.join(path, appname)\n else:\n # XDG default for $XDG_DATA_DIRS\n # only first, if multipath is False\n path = os.getenv('XDG_DATA_DIRS',\n os.pathsep.join(['/usr/local/share', '/usr/share']))\n pathlist = [os.path.expanduser(x.rstrip(os.sep)) for x in path.split(os.pathsep)]\n if appname:\n if version:\n appname = os.path.join(appname, version)\n pathlist = [os.sep.join([x, appname]) for x in pathlist]\n\n if multipath:\n path = os.pathsep.join(pathlist)\n else:\n path = pathlist[0]\n return path\n\n if appname and version:\n path = os.path.join(path, version)\n return path\n\n\ndef user_config_dir(appname=None, appauthor=None, version=None, roaming=False):\n r\"\"\"Return full path to the user-specific config dir for this application.\n\n \"appname\" is the name of application.\n If None, just the system directory is returned.\n \"appauthor\" (only used on Windows) is the name of the\n appauthor or distributing body for this application. Typically\n it is the owning company name. This falls back to appname. You may\n pass False to disable it.\n \"version\" is an optional version path element to append to the\n path. You might want to use this if you want multiple versions\n of your app to be able to run independently. If used, this\n would typically be \"<major>.<minor>\".\n Only applied when appname is present.\n \"roaming\" (boolean, default False) can be set True to use the Windows\n roaming appdata directory. That means that for users on a Windows\n network setup for roaming profiles, this user data will be\n sync'd on login. See\n <http://technet.microsoft.com/en-us/library/cc766489(WS.10).aspx>\n for a discussion of issues.\n\n Typical user data directories are:\n Mac OS X: same as user_data_dir\n Unix: ~/.config/<AppName> # or in $XDG_CONFIG_HOME, if defined\n Win *: same as user_data_dir\n\n For Unix, we follow the XDG spec and support $XDG_CONFIG_HOME.\n That means, by deafult \"~/.config/<AppName>\".\n \"\"\"\n if system in [\"win32\", \"darwin\"]:\n path = user_data_dir(appname, appauthor, None, roaming)\n else:\n path = os.getenv('XDG_CONFIG_HOME', os.path.expanduser(\"~/.config\"))\n if appname:\n path = os.path.join(path, appname)\n if appname and version:\n path = os.path.join(path, version)\n return path\n\n\ndef site_config_dir(appname=None, appauthor=None, version=None, multipath=False):\n \"\"\"Return full path to the user-shared data dir for this application.\n\n \"appname\" is the name of application.\n If None, just the system directory is returned.\n \"appauthor\" (only used on Windows) is the name of the\n appauthor or distributing body for this application. Typically\n it is the owning company name. This falls back to appname. You may\n pass False to disable it.\n \"version\" is an optional version path element to append to the\n path. You might want to use this if you want multiple versions\n of your app to be able to run independently. If used, this\n would typically be \"<major>.<minor>\".\n Only applied when appname is present.\n \"multipath\" is an optional parameter only applicable to *nix\n which indicates that the entire list of config dirs should be\n returned. By default, the first item from XDG_CONFIG_DIRS is\n returned, or '/etc/xdg/<AppName>', if XDG_CONFIG_DIRS is not set\n\n Typical user data directories are:\n Mac OS X: same as site_data_dir\n Unix: /etc/xdg/<AppName> or $XDG_CONFIG_DIRS[i]/<AppName> for each value in\n $XDG_CONFIG_DIRS\n Win *: same as site_data_dir\n Vista: (Fail! \"C:\\ProgramData\" is a hidden *system* directory on Vista.)\n\n For Unix, this is using the $XDG_CONFIG_DIRS[0] default, if multipath=False\n\n WARNING: Do not use this on Windows. See the Vista-Fail note above for why.\n \"\"\"\n if system in [\"win32\", \"darwin\"]:\n path = site_data_dir(appname, appauthor)\n if appname and version:\n path = os.path.join(path, version)\n else:\n # XDG default for $XDG_CONFIG_DIRS\n # only first, if multipath is False\n path = os.getenv('XDG_CONFIG_DIRS', '/etc/xdg')\n pathlist = [os.path.expanduser(x.rstrip(os.sep)) for x in path.split(os.pathsep)]\n if appname:\n if version:\n appname = os.path.join(appname, version)\n pathlist = [os.sep.join([x, appname]) for x in pathlist]\n\n if multipath:\n path = os.pathsep.join(pathlist)\n else:\n path = pathlist[0]\n return path\n\n\ndef user_cache_dir(appname=None, appauthor=None, version=None, opinion=True):\n r\"\"\"Return full path to the user-specific cache dir for this application.\n\n \"appname\" is the name of application.\n If None, just the system directory is returned.\n \"appauthor\" (only used on Windows) is the name of the\n appauthor or distributing body for this application. Typically\n it is the owning company name. This falls back to appname. You may\n pass False to disable it.\n \"version\" is an optional version path element to append to the\n path. You might want to use this if you want multiple versions\n of your app to be able to run independently. If used, this\n would typically be \"<major>.<minor>\".\n Only applied when appname is present.\n \"opinion\" (boolean) can be False to disable the appending of\n \"Cache\" to the base app data dir for Windows. See\n discussion below.\n\n Typical user cache directories are:\n Mac OS X: ~/Library/Caches/<AppName>\n Unix: ~/.cache/<AppName> (XDG default)\n Win XP: C:\\Documents and Settings\\<username>\\Local Settings\\Application Data\\<AppAuthor>\\<AppName>\\Cache\n Vista: C:\\Users\\<username>\\AppData\\Local\\<AppAuthor>\\<AppName>\\Cache\n\n On Windows the only suggestion in the MSDN docs is that local settings go in\n the `CSIDL_LOCAL_APPDATA` directory. This is identical to the non-roaming\n app data dir (the default returned by `user_data_dir` above). Apps typically\n put cache data somewhere *under* the given dir here. Some examples:\n ...\\Mozilla\\Firefox\\Profiles\\<ProfileName>\\Cache\n ...\\Acme\\SuperApp\\Cache\\1.0\n OPINION: This function appends \"Cache\" to the `CSIDL_LOCAL_APPDATA` value.\n This can be disabled with the `opinion=False` option.\n \"\"\"\n if system == \"win32\":\n if appauthor is None:\n appauthor = appname\n path = os.path.normpath(_get_win_folder(\"CSIDL_LOCAL_APPDATA\"))\n if appname:\n if appauthor is not False:\n path = os.path.join(path, appauthor, appname)\n else:\n path = os.path.join(path, appname)\n if opinion:\n path = os.path.join(path, \"Cache\")\n elif system == 'darwin':\n path = os.path.expanduser('~/Library/Caches')\n if appname:\n path = os.path.join(path, appname)\n else:\n path = os.getenv('XDG_CACHE_HOME', os.path.expanduser('~/.cache'))\n if appname:\n path = os.path.join(path, appname)\n if appname and version:\n path = os.path.join(path, version)\n return path\n\n\ndef user_log_dir(appname=None, appauthor=None, version=None, opinion=True):\n r\"\"\"Return full path to the user-specific log dir for this application.\n\n \"appname\" is the name of application.\n If None, just the system directory is returned.\n \"appauthor\" (only used on Windows) is the name of the\n appauthor or distributing body for this application. Typically\n it is the owning company name. This falls back to appname. You may\n pass False to disable it.\n \"version\" is an optional version path element to append to the\n path. You might want to use this if you want multiple versions\n of your app to be able to run independently. If used, this\n would typically be \"<major>.<minor>\".\n Only applied when appname is present.\n \"opinion\" (boolean) can be False to disable the appending of\n \"Logs\" to the base app data dir for Windows, and \"log\" to the\n base cache dir for Unix. See discussion below.\n\n Typical user cache directories are:\n Mac OS X: ~/Library/Logs/<AppName>\n Unix: ~/.cache/<AppName>/log # or under $XDG_CACHE_HOME if defined\n Win XP: C:\\Documents and Settings\\<username>\\Local Settings\\Application Data\\<AppAuthor>\\<AppName>\\Logs\n Vista: C:\\Users\\<username>\\AppData\\Local\\<AppAuthor>\\<AppName>\\Logs\n\n On Windows the only suggestion in the MSDN docs is that local settings\n go in the `CSIDL_LOCAL_APPDATA` directory. (Note: I'm interested in\n examples of what some windows apps use for a logs dir.)\n\n OPINION: This function appends \"Logs\" to the `CSIDL_LOCAL_APPDATA`\n value for Windows and appends \"log\" to the user cache dir for Unix.\n This can be disabled with the `opinion=False` option.\n \"\"\"\n if system == \"darwin\":\n path = os.path.join(\n os.path.expanduser('~/Library/Logs'),\n appname)\n elif system == \"win32\":\n path = user_data_dir(appname, appauthor, version)\n version = False\n if opinion:\n path = os.path.join(path, \"Logs\")\n else:\n path = user_cache_dir(appname, appauthor, version)\n version = False\n if opinion:\n path = os.path.join(path, \"log\")\n if appname and version:\n path = os.path.join(path, version)\n return path\n\n\nclass AppDirs(object):\n \"\"\"Convenience wrapper for getting application dirs.\"\"\"\n def __init__(self, appname, appauthor=None, version=None, roaming=False,\n multipath=False):\n self.appname = appname\n self.appauthor = appauthor\n self.version = version\n self.roaming = roaming\n self.multipath = multipath\n\n @property\n def user_data_dir(self):\n return user_data_dir(self.appname, self.appauthor,\n version=self.version, roaming=self.roaming)\n\n @property\n def site_data_dir(self):\n return site_data_dir(self.appname, self.appauthor,\n version=self.version, multipath=self.multipath)\n\n @property\n def user_config_dir(self):\n return user_config_dir(self.appname, self.appauthor,\n version=self.version, roaming=self.roaming)\n\n @property\n def site_config_dir(self):\n return site_config_dir(self.appname, self.appauthor,\n version=self.version, multipath=self.multipath)\n\n @property\n def user_cache_dir(self):\n return user_cache_dir(self.appname, self.appauthor,\n version=self.version)\n\n @property\n def user_log_dir(self):\n return user_log_dir(self.appname, self.appauthor,\n version=self.version)\n\n\n#---- internal support stuff\n\ndef _get_win_folder_from_registry(csidl_name):\n \"\"\"This is a fallback technique at best. I'm not sure if using the\n registry for this guarantees us the correct answer for all CSIDL_*\n names.\n \"\"\"\n import _winreg\n\n shell_folder_name = {\n \"CSIDL_APPDATA\": \"AppData\",\n \"CSIDL_COMMON_APPDATA\": \"Common AppData\",\n \"CSIDL_LOCAL_APPDATA\": \"Local AppData\",\n }[csidl_name]\n\n key = _winreg.OpenKey(\n _winreg.HKEY_CURRENT_USER,\n r\"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders\"\n )\n dir, type = _winreg.QueryValueEx(key, shell_folder_name)\n return dir\n\n\ndef _get_win_folder_with_pywin32(csidl_name):\n from win32com.shell import shellcon, shell\n dir = shell.SHGetFolderPath(0, getattr(shellcon, csidl_name), 0, 0)\n # Try to make this a unicode path because SHGetFolderPath does\n # not return unicode strings when there is unicode data in the\n # path.\n try:\n dir = unicode(dir)\n\n # Downgrade to short path name if have highbit chars. See\n # <http://bugs.activestate.com/show_bug.cgi?id=85099>.\n has_high_char = False\n for c in dir:\n if ord(c) > 255:\n has_high_char = True\n break\n if has_high_char:\n try:\n import win32api\n dir = win32api.GetShortPathName(dir)\n except ImportError:\n pass\n except UnicodeError:\n pass\n return dir\n\n\ndef _get_win_folder_with_ctypes(csidl_name):\n import ctypes\n\n csidl_const = {\n \"CSIDL_APPDATA\": 26,\n \"CSIDL_COMMON_APPDATA\": 35,\n \"CSIDL_LOCAL_APPDATA\": 28,\n }[csidl_name]\n\n buf = ctypes.create_unicode_buffer(1024)\n ctypes.windll.shell32.SHGetFolderPathW(None, csidl_const, None, 0, buf)\n\n # Downgrade to short path name if have highbit chars. See\n # <http://bugs.activestate.com/show_bug.cgi?id=85099>.\n has_high_char = False\n for c in buf:\n if ord(c) > 255:\n has_high_char = True\n break\n if has_high_char:\n buf2 = ctypes.create_unicode_buffer(1024)\n if ctypes.windll.kernel32.GetShortPathNameW(buf.value, buf2, 1024):\n buf = buf2\n\n return buf.value\n\ndef _get_win_folder_with_jna(csidl_name):\n import array\n from com.sun import jna\n from com.sun.jna.platform import win32\n\n buf_size = win32.WinDef.MAX_PATH * 2\n buf = array.zeros('c', buf_size)\n shell = win32.Shell32.INSTANCE\n shell.SHGetFolderPath(None, getattr(win32.ShlObj, csidl_name), None, win32.ShlObj.SHGFP_TYPE_CURRENT, buf)\n dir = jna.Native.toString(buf.tostring()).rstrip(\"\\0\")\n\n # Downgrade to short path name if have highbit chars. See\n # <http://bugs.activestate.com/show_bug.cgi?id=85099>.\n has_high_char = False\n for c in dir:\n if ord(c) > 255:\n has_high_char = True\n break\n if has_high_char:\n buf = array.zeros('c', buf_size)\n kernel = win32.Kernel32.INSTANCE\n if kernel.GetShortPathName(dir, buf, buf_size):\n dir = jna.Native.toString(buf.tostring()).rstrip(\"\\0\")\n\n return dir\n\nif system == \"win32\":\n try:\n import win32com.shell\n _get_win_folder = _get_win_folder_with_pywin32\n except ImportError:\n try:\n from ctypes import windll\n _get_win_folder = _get_win_folder_with_ctypes\n except ImportError:\n try:\n import com.sun.jna\n _get_win_folder = _get_win_folder_with_jna\n except ImportError:\n _get_win_folder = _get_win_folder_from_registry\n\n\n#---- self test code\n\nif __name__ == \"__main__\":\n appname = \"MyApp\"\n appauthor = \"MyCompany\"\n\n props = (\"user_data_dir\", \"site_data_dir\",\n \"user_config_dir\", \"site_config_dir\",\n \"user_cache_dir\", \"user_log_dir\")\n\n print(\"-- app dirs (with optional 'version')\")\n dirs = AppDirs(appname, appauthor, version=\"1.0\")\n for prop in props:\n print(\"%s: %s\" % (prop, getattr(dirs, prop)))\n\n print(\"\\n-- app dirs (without optional 'version')\")\n dirs = AppDirs(appname, appauthor)\n for prop in props:\n print(\"%s: %s\" % (prop, getattr(dirs, prop)))\n\n print(\"\\n-- app dirs (without optional 'appauthor')\")\n dirs = AppDirs(appname)\n for prop in props:\n print(\"%s: %s\" % (prop, getattr(dirs, prop)))\n\n print(\"\\n-- app dirs (with disabled 'appauthor')\")\n dirs = AppDirs(appname, appauthor=False)\n for prop in props:\n print(\"%s: %s\" % (prop, getattr(dirs, prop)))\n"} +{"text": "# -*- coding: utf-8 -*-\n# Copyright 2017-2019 ControlScan, Inc.\n#\n# This file is part of Cyphon Engine.\n#\n# Cyphon Engine is free software: you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation, version 3 of the License.\n#\n# Cyphon Engine is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with Cyphon Engine. If not, see <http://www.gnu.org/licenses/>.\n\"\"\"\nDefines an Alarm base class.\n\"\"\"\n\n# third party\nfrom django.contrib.auth.models import Group\nfrom django.contrib.contenttypes.fields import GenericRelation\nfrom django.db import models\nfrom django.utils.translation import ugettext_lazy as _\n\n# local\nfrom alerts.models import Alert\nfrom cyphon.baseclass import BaseClass\nfrom cyphon.models import GetByNameManager, FindEnabledMixin\nfrom cyphon.transaction import close_old_connections\n\n\nclass AlarmManager(GetByNameManager, FindEnabledMixin, BaseClass):\n \"\"\"\n Adds methods to the default model manager.\n \"\"\"\n\n def find_relevant(self, distillery):\n \"\"\"Find appropriate Alarms to inspect a document.\n\n This method should be overridden in derived classes.\n\n Parameters\n ----------\n doc_obj : |Distillery|\n The |Distillery| associated with the document.\n\n Raises\n ------\n NotImplementedError\n\n \"\"\"\n self.raise_method_not_implemented()\n\n @close_old_connections\n def process(self, doc_obj):\n \"\"\"Inspect a document with Alarms.\n\n Parameters\n ----------\n doc_obj : |DocumentObj|\n The document that Alarms should inspect.\n\n Returns\n -------\n None\n\n \"\"\"\n alarms = self.find_relevant(doc_obj.distillery)\n for alarm in alarms:\n alarm.process(doc_obj)\n\n\nclass Alarm(models.Model, BaseClass):\n \"\"\"\n Defines a class for inspecting data produced by a Distillery. Used\n to create Alerts when appropriate.\n\n Attributes\n ----------\n name : str\n A |str| representing the name of the Watchdog.\n\n enabled : bool\n A |bool| indicating whether the Watchdog is active.\n\n groups : `QuerySet` of `Groups`\n |Groups| to which the generated Alerts should be visible.\n\n \"\"\"\n name = models.CharField(max_length=255, unique=True)\n enabled = models.BooleanField(default=True)\n groups = models.ManyToManyField(\n Group,\n blank=True,\n help_text=_('Only show Alerts to Users in these Groups. '\n 'If no Groups are selected, Alerts will be visible '\n 'to all Groups.')\n )\n alerts = GenericRelation(\n Alert,\n content_type_field='alarm_type',\n object_id_field='alarm_id',\n related_query_name='%(class)s'\n )\n\n class Meta(object):\n \"\"\"Metadata options.\"\"\"\n\n abstract = True\n ordering = ['name']\n\n def process(self, doc_obj):\n \"\"\"Inspect a document and generate an Alert if appropriate.\n\n This method should be overridden in derived classes.\n\n Parameters\n ----------\n doc_obj : |DocumentObj|\n The document that Alarms should inspect.\n\n Raises\n ------\n NotImplementedError\n\n \"\"\"\n self.raise_method_not_implemented()\n"} +{"text": "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n\n<set xmlns:android=\"http://schemas.android.com/apk/res/android\"\n android:ordering=\"together\">\n <objectAnimator\n android:duration=\"300\"\n android:interpolator=\"@android:interpolator/accelerate_cubic\"\n android:propertyName=\"scaleY\"\n android:valueFrom=\"1f\"\n android:valueTo=\"0f\"\n android:valueType=\"floatType\" />\n <objectAnimator\n android:duration=\"300\"\n android:interpolator=\"@android:interpolator/accelerate_cubic\"\n android:propertyName=\"scaleX\"\n android:valueFrom=\"1f\"\n android:valueTo=\"0f\"\n android:valueType=\"floatType\" />\n</set>"} +{"text": "<!DOCTYPE html>\n<body>\n <p style=\"color: blue\">First</p>\n <p style=\"color: green\">Second</p>\n <p style=\"color: blue\">Third</p>\n</body>\n"} +{"text": ".progressbar {\n border-width: 1px;\n border-style: solid;\n -moz-border-radius: 2px 2px 2px 2px;\n -webkit-border-radius: 2px 2px 2px 2px;\n border-radius: 2px 2px 2px 2px;\n overflow: hidden;\n position: relative;\n}\n.progressbar-text {\n text-align: center;\n position: absolute;\n}\n.progressbar-value {\n position: relative;\n overflow: hidden;\n width: 0;\n -moz-border-radius: 2px 0 0 2px;\n -webkit-border-radius: 2px 0 0 2px;\n border-radius: 2px 0 0 2px;\n}\n.progressbar {\n border-color: #dfdfdf;\n}\n.progressbar-text {\n color: #404040;\n font-size: 14px;\n}\n.progressbar-value,\n.progressbar-value .progressbar-text {\n background-color: #eee;\n color: #2196f3;\n}\n"} +{"text": "import csv\nimport io\nimport pandas as pd\nfrom datetime import datetime\nfrom django.contrib import messages\nfrom django.db.models import Q\nfrom django.http import JsonResponse, HttpResponseRedirect\nfrom django.shortcuts import render\nfrom django.urls import reverse\nfrom django.views.generic import CreateView, UpdateView, ListView\nfrom projeto.produto.actions.import_xlsx import import_xlsx as action_import_xlsx\nfrom projeto.produto.actions.export_xlsx import export_xlsx\nfrom .models import Produto\nfrom .forms import ProdutoForm\n\n\ndef produto_list(request):\n template_name = 'produto_list.html'\n objects = Produto.objects.all()\n search = request.GET.get('search')\n if search:\n objects = objects.filter(produto__icontains=search)\n context = {'object_list': objects}\n return render(request, template_name, context)\n\n\nclass ProdutoList(ListView):\n model = Produto\n template_name = 'produto_list.html'\n paginate_by = 10\n\n def get_queryset(self):\n queryset = super(ProdutoList, self).get_queryset()\n search = self.request.GET.get('search')\n if search:\n queryset = queryset.filter(\n Q(produto__icontains=search) |\n Q(ncm__icontains=search)\n )\n return queryset\n\n\ndef produto_detail(request, pk):\n template_name = 'produto_detail.html'\n obj = Produto.objects.get(pk=pk)\n context = {'object': obj}\n return render(request, template_name, context)\n\n\ndef produto_add(request):\n form = ProdutoForm(request.POST or None)\n template_name = 'produto_form2.html'\n\n if request.method == 'POST':\n if form.is_valid():\n form.save()\n return HttpResponseRedirect(reverse('produto:produto_list'))\n\n context = {'form': form}\n return render(request, template_name, context)\n\n\nclass ProdutoCreate(CreateView):\n model = Produto\n template_name = 'produto_form.html'\n form_class = ProdutoForm\n\n\nclass ProdutoUpdate(UpdateView):\n model = Produto\n template_name = 'produto_form.html'\n form_class = ProdutoForm\n\n\ndef produto_json(request, pk):\n ''' Retorna o produto, id e estoque. '''\n produto = Produto.objects.filter(pk=pk)\n data = [item.to_dict_json() for item in produto]\n return JsonResponse({'data': data})\n\n\ndef save_data(data):\n '''\n Salva os dados no banco.\n '''\n aux = []\n for item in data:\n produto = item.get('produto')\n ncm = str(item.get('ncm'))\n importado = True if item.get('importado') == 'True' else False\n preco = item.get('preco')\n estoque = item.get('estoque')\n estoque_minimo = item.get('estoque_minimo')\n obj = Produto(\n produto=produto,\n ncm=ncm,\n importado=importado,\n preco=preco,\n estoque=estoque,\n estoque_minimo=estoque_minimo,\n )\n aux.append(obj)\n Produto.objects.bulk_create(aux)\n\n\ndef import_csv(request):\n if request.method == 'POST' and request.FILES['myfile']:\n myfile = request.FILES['myfile']\n # Lendo arquivo InMemoryUploadedFile\n file = myfile.read().decode('utf-8')\n reader = csv.DictReader(io.StringIO(file))\n # Gerando uma list comprehension\n data = [line for line in reader]\n save_data(data)\n return HttpResponseRedirect(reverse('produto:produto_list'))\n\n template_name = 'produto_import.html'\n return render(request, template_name)\n\n\ndef export_csv(request):\n header = (\n 'importado', 'ncm', 'produto', 'preco', 'estoque', 'estoque_minimo',\n )\n produtos = Produto.objects.all().values_list(*header)\n with open('fix/produtos_exportados.csv', 'w') as csvfile:\n produto_writer = csv.writer(csvfile)\n produto_writer.writerow(header)\n for produto in produtos:\n produto_writer.writerow(produto)\n messages.success(request, 'Produtos exportados com sucesso.')\n return HttpResponseRedirect(reverse('produto:produto_list'))\n\n\ndef import_xlsx(request):\n filename = 'fix/produtos.xlsx'\n action_import_xlsx(filename)\n messages.success(request, 'Produtos importados com sucesso.')\n return HttpResponseRedirect(reverse('produto:produto_list'))\n\n\ndef exportar_produtos_xlsx(request):\n MDATA = datetime.now().strftime('%Y-%m-%d')\n model = 'Produto'\n filename = 'produtos_exportados.xlsx'\n _filename = filename.split('.')\n filename_final = f'{_filename[0]}_{MDATA}.{_filename[1]}'\n queryset = Produto.objects.all().values_list(\n 'importado',\n 'ncm',\n 'produto',\n 'preco',\n 'estoque',\n 'estoque_minimo',\n 'categoria__categoria',\n )\n columns = ('Importado', 'NCM', 'Produto', 'Preço',\n 'Estoque', 'Estoque mínimo', 'Categoria')\n response = export_xlsx(model, filename_final, queryset, columns)\n return response\n\n\ndef import_csv_with_pandas(request):\n filename = 'fix/produtos.csv'\n df = pd.read_csv(filename)\n aux = []\n for row in df.values:\n obj = Produto(\n produto=row[0],\n ncm=row[1],\n importado=row[2],\n preco=row[3],\n estoque=row[4],\n estoque_minimo=row[5],\n )\n aux.append(obj)\n Produto.objects.bulk_create(aux)\n messages.success(request, 'Produtos importados com sucesso.')\n return HttpResponseRedirect(reverse('produto:produto_list'))\n"} +{"text": "/* QLogic qed NIC Driver\n * Copyright (c) 2015-2017 QLogic Corporation\n *\n * This software is available to you under a choice of one of two\n * licenses. You may choose to be licensed under the terms of the GNU\n * General Public License (GPL) Version 2, available from the file\n * COPYING in the main directory of this source tree, or the\n * OpenIB.org BSD license below:\n *\n * Redistribution and use in source and binary forms, with or\n * without modification, are permitted provided that the following\n * conditions are met:\n *\n * - Redistributions of source code must retain the above\n * copyright notice, this list of conditions and the following\n * disclaimer.\n *\n * - Redistributions in binary form must reproduce the above\n * copyright notice, this list of conditions and the following\n * disclaimer in the documentation and /or other materials\n * provided with the distribution.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\n * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS\n * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\n * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\n\n#ifndef _QED_HW_H\n#define _QED_HW_H\n\n#include <linux/types.h>\n#include <linux/bitops.h>\n#include <linux/slab.h>\n#include <linux/string.h>\n#include \"qed.h\"\n#include \"qed_dev_api.h\"\n\n/* Forward decleration */\nstruct qed_ptt;\n\nenum reserved_ptts {\n\tRESERVED_PTT_EDIAG,\n\tRESERVED_PTT_USER_SPACE,\n\tRESERVED_PTT_MAIN,\n\tRESERVED_PTT_DPC,\n\tRESERVED_PTT_MAX\n};\n\nenum _dmae_cmd_dst_mask {\n\tDMAE_CMD_DST_MASK_NONE\t= 0,\n\tDMAE_CMD_DST_MASK_PCIE\t= 1,\n\tDMAE_CMD_DST_MASK_GRC\t= 2\n};\n\nenum _dmae_cmd_src_mask {\n\tDMAE_CMD_SRC_MASK_PCIE\t= 0,\n\tDMAE_CMD_SRC_MASK_GRC\t= 1\n};\n\nenum _dmae_cmd_crc_mask {\n\tDMAE_CMD_COMP_CRC_EN_MASK_NONE\t= 0,\n\tDMAE_CMD_COMP_CRC_EN_MASK_SET\t= 1\n};\n\n/* definitions for DMA constants */\n#define DMAE_GO_VALUE 0x1\n\n#define DMAE_COMPLETION_VAL 0xD1AE\n#define DMAE_CMD_ENDIANITY 0x2\n\n#define DMAE_CMD_SIZE 14\n#define DMAE_CMD_SIZE_TO_FILL (DMAE_CMD_SIZE - 5)\n#define DMAE_MIN_WAIT_TIME 0x2\n#define DMAE_MAX_CLIENTS 32\n\n/**\n * @brief qed_gtt_init - Initialize GTT windows\n *\n * @param p_hwfn\n */\nvoid qed_gtt_init(struct qed_hwfn *p_hwfn);\n\n/**\n * @brief qed_ptt_invalidate - Forces all ptt entries to be re-configured\n *\n * @param p_hwfn\n */\nvoid qed_ptt_invalidate(struct qed_hwfn *p_hwfn);\n\n/**\n * @brief qed_ptt_pool_alloc - Allocate and initialize PTT pool\n *\n * @param p_hwfn\n *\n * @return struct _qed_status - success (0), negative - error.\n */\nint qed_ptt_pool_alloc(struct qed_hwfn *p_hwfn);\n\n/**\n * @brief qed_ptt_pool_free -\n *\n * @param p_hwfn\n */\nvoid qed_ptt_pool_free(struct qed_hwfn *p_hwfn);\n\n/**\n * @brief qed_ptt_get_hw_addr - Get PTT's GRC/HW address\n *\n * @param p_hwfn\n * @param p_ptt\n *\n * @return u32\n */\nu32 qed_ptt_get_hw_addr(struct qed_hwfn *p_hwfn,\n\t\t\tstruct qed_ptt *p_ptt);\n\n/**\n * @brief qed_ptt_get_bar_addr - Get PPT's external BAR address\n *\n * @param p_hwfn\n * @param p_ptt\n *\n * @return u32\n */\nu32 qed_ptt_get_bar_addr(struct qed_ptt *p_ptt);\n\n/**\n * @brief qed_ptt_set_win - Set PTT Window's GRC BAR address\n *\n * @param p_hwfn\n * @param new_hw_addr\n * @param p_ptt\n */\nvoid qed_ptt_set_win(struct qed_hwfn *p_hwfn,\n\t\t struct qed_ptt *p_ptt,\n\t\t u32 new_hw_addr);\n\n/**\n * @brief qed_get_reserved_ptt - Get a specific reserved PTT\n *\n * @param p_hwfn\n * @param ptt_idx\n *\n * @return struct qed_ptt *\n */\nstruct qed_ptt *qed_get_reserved_ptt(struct qed_hwfn *p_hwfn,\n\t\t\t\t enum reserved_ptts ptt_idx);\n\n/**\n * @brief qed_wr - Write value to BAR using the given ptt\n *\n * @param p_hwfn\n * @param p_ptt\n * @param val\n * @param hw_addr\n */\nvoid qed_wr(struct qed_hwfn *p_hwfn,\n\t struct qed_ptt *p_ptt,\n\t u32 hw_addr,\n\t u32 val);\n\n/**\n * @brief qed_rd - Read value from BAR using the given ptt\n *\n * @param p_hwfn\n * @param p_ptt\n * @param val\n * @param hw_addr\n */\nu32 qed_rd(struct qed_hwfn *p_hwfn,\n\t struct qed_ptt *p_ptt,\n\t u32 hw_addr);\n\n/**\n * @brief qed_memcpy_from - copy n bytes from BAR using the given\n * ptt\n *\n * @param p_hwfn\n * @param p_ptt\n * @param dest\n * @param hw_addr\n * @param n\n */\nvoid qed_memcpy_from(struct qed_hwfn *p_hwfn,\n\t\t struct qed_ptt *p_ptt,\n\t\t void *dest,\n\t\t u32 hw_addr,\n\t\t size_t n);\n\n/**\n * @brief qed_memcpy_to - copy n bytes to BAR using the given\n * ptt\n *\n * @param p_hwfn\n * @param p_ptt\n * @param hw_addr\n * @param src\n * @param n\n */\nvoid qed_memcpy_to(struct qed_hwfn *p_hwfn,\n\t\t struct qed_ptt *p_ptt,\n\t\t u32 hw_addr,\n\t\t void *src,\n\t\t size_t n);\n/**\n * @brief qed_fid_pretend - pretend to another function when\n * accessing the ptt window. There is no way to unpretend\n * a function. The only way to cancel a pretend is to\n * pretend back to the original function.\n *\n * @param p_hwfn\n * @param p_ptt\n * @param fid - fid field of pxp_pretend structure. Can contain\n * either pf / vf, port/path fields are don't care.\n */\nvoid qed_fid_pretend(struct qed_hwfn *p_hwfn,\n\t\t struct qed_ptt *p_ptt,\n\t\t u16 fid);\n\n/**\n * @brief qed_port_pretend - pretend to another port when\n * accessing the ptt window\n *\n * @param p_hwfn\n * @param p_ptt\n * @param port_id - the port to pretend to\n */\nvoid qed_port_pretend(struct qed_hwfn *p_hwfn,\n\t\t struct qed_ptt *p_ptt,\n\t\t u8 port_id);\n\n/**\n * @brief qed_port_unpretend - cancel any previously set port\n * pretend\n *\n * @param p_hwfn\n * @param p_ptt\n */\nvoid qed_port_unpretend(struct qed_hwfn *p_hwfn,\n\t\t\tstruct qed_ptt *p_ptt);\n\n/**\n * @brief qed_port_fid_pretend - pretend to another port and another function\n * when accessing the ptt window\n *\n * @param p_hwfn\n * @param p_ptt\n * @param port_id - the port to pretend to\n * @param fid - fid field of pxp_pretend structure. Can contain either pf / vf.\n */\nvoid qed_port_fid_pretend(struct qed_hwfn *p_hwfn,\n\t\t\t struct qed_ptt *p_ptt, u8 port_id, u16 fid);\n\n/**\n * @brief qed_vfid_to_concrete - build a concrete FID for a\n * given VF ID\n *\n * @param p_hwfn\n * @param p_ptt\n * @param vfid\n */\nu32 qed_vfid_to_concrete(struct qed_hwfn *p_hwfn, u8 vfid);\n\n/**\n * @brief qed_dmae_idx_to_go_cmd - map the idx to dmae cmd\n * this is declared here since other files will require it.\n * @param idx\n */\nu32 qed_dmae_idx_to_go_cmd(u8 idx);\n\n/**\n * @brief qed_dmae_info_alloc - Init the dmae_info structure\n * which is part of p_hwfn.\n * @param p_hwfn\n */\nint qed_dmae_info_alloc(struct qed_hwfn *p_hwfn);\n\n/**\n * @brief qed_dmae_info_free - Free the dmae_info structure\n * which is part of p_hwfn\n *\n * @param p_hwfn\n */\nvoid qed_dmae_info_free(struct qed_hwfn *p_hwfn);\n\nunion qed_qm_pq_params {\n\tstruct {\n\t\tu8 q_idx;\n\t} iscsi;\n\n\tstruct {\n\t\tu8 tc;\n\t}\tcore;\n\n\tstruct {\n\t\tu8\tis_vf;\n\t\tu8\tvf_id;\n\t\tu8\ttc;\n\t}\teth;\n\n\tstruct {\n\t\tu8 dcqcn;\n\t\tu8 qpid;\t/* roce relative */\n\t} roce;\n};\n\nint qed_init_fw_data(struct qed_dev *cdev,\n\t\t const u8 *fw_data);\n\nint qed_dmae_sanity(struct qed_hwfn *p_hwfn,\n\t\t struct qed_ptt *p_ptt, const char *phase);\n\n#endif\n"} +{"text": "namespace HT.Framework\n{\n /// <summary>\n /// 热更新对象基类\n /// </summary>\n public abstract class HotfixObject\n {\n }\n}\n"} +{"text": "A,12,3.7\r\nB,17,2.8\r\nC,14,1.9\r\nD,23,2.7\r\nE\r\nF,18,3.4\r\n"} +{"text": "[\r\n [\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"Table 1\",\r\n \"r\": \"<t>Table 1</t>\",\r\n \"h\": \"Table 1\",\r\n \"w\": \"Table 1\"\r\n },\r\n null,\r\n null,\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"Table 2\",\r\n \"r\": \"<t>Table 2</t>\",\r\n \"h\": \"Table 2\",\r\n \"w\": \"Table 2\"\r\n },\r\n null,\r\n null\r\n ],\r\n [\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"id\",\r\n \"r\": \"<t>id</t>\",\r\n \"h\": \"id\",\r\n \"w\": \"id\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"name\",\r\n \"r\": \"<t>name</t>\",\r\n \"h\": \"name\",\r\n \"w\": \"name\"\r\n },\r\n null,\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"id\",\r\n \"r\": \"<t>id</t>\",\r\n \"h\": \"id\",\r\n \"w\": \"id\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"name\",\r\n \"r\": \"<t>name</t>\",\r\n \"h\": \"name\",\r\n \"w\": \"name\"\r\n },\r\n null\r\n ],\r\n [\r\n {\r\n \"t\": \"n\",\r\n \"v\": 1,\r\n \"w\": \"1\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"name 1\",\r\n \"r\": \"<t>name 1</t>\",\r\n \"h\": \"name 1\",\r\n \"w\": \"name 1\"\r\n },\r\n null,\r\n {\r\n \"t\": \"n\",\r\n \"v\": 1,\r\n \"w\": \"1\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"name 1\",\r\n \"r\": \"<t>name 1</t>\",\r\n \"h\": \"name 1\",\r\n \"w\": \"name 1\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"yes\",\r\n \"r\": \"<t>yes</t>\",\r\n \"h\": \"yes\",\r\n \"w\": \"yes\"\r\n }\r\n ],\r\n [\r\n {\r\n \"t\": \"n\",\r\n \"v\": 2,\r\n \"w\": \"2\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"name 2\",\r\n \"r\": \"<t>name 2</t>\",\r\n \"h\": \"name 2\",\r\n \"w\": \"name 2\"\r\n },\r\n null,\r\n {\r\n \"t\": \"n\",\r\n \"v\": 2,\r\n \"w\": \"2\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"name 2\",\r\n \"r\": \"<t>name 2</t>\",\r\n \"h\": \"name 2\",\r\n \"w\": \"name 2\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"no\",\r\n \"r\": \"<t>no</t>\",\r\n \"h\": \"no\",\r\n \"w\": \"no\"\r\n }\r\n ],\r\n [\r\n {\r\n \"t\": \"n\",\r\n \"v\": 3,\r\n \"w\": \"3\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"name 3\",\r\n \"r\": \"<t>name 3</t>\",\r\n \"h\": \"name 3\",\r\n \"w\": \"name 3\"\r\n },\r\n null,\r\n {\r\n \"t\": \"n\",\r\n \"v\": 3,\r\n \"w\": \"3\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"name 3\",\r\n \"r\": \"<t>name 3</t>\",\r\n \"h\": \"name 3\",\r\n \"w\": \"name 3\"\r\n },\r\n null\r\n ],\r\n [\r\n {\r\n \"t\": \"n\",\r\n \"v\": 4,\r\n \"w\": \"4\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"name 4\",\r\n \"r\": \"<t>name 4</t>\",\r\n \"h\": \"name 4\",\r\n \"w\": \"name 4\"\r\n },\r\n null,\r\n {\r\n \"t\": \"n\",\r\n \"v\": 4,\r\n \"w\": \"4\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"name 4\",\r\n \"r\": \"<t>name 4</t>\",\r\n \"h\": \"name 4\",\r\n \"w\": \"name 4\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"yes\",\r\n \"r\": \"<t>yes</t>\",\r\n \"h\": \"yes\",\r\n \"w\": \"yes\"\r\n }\r\n ],\r\n [\r\n {\r\n \"t\": \"n\",\r\n \"v\": 5,\r\n \"w\": \"5\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"name 5\",\r\n \"r\": \"<t>name 5</t>\",\r\n \"h\": \"name 5\",\r\n \"w\": \"name 5\"\r\n },\r\n null,\r\n {\r\n \"t\": \"n\",\r\n \"v\": 5,\r\n \"w\": \"5\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"name 5\",\r\n \"r\": \"<t>name 5</t>\",\r\n \"h\": \"name 5\",\r\n \"w\": \"name 5\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"no\",\r\n \"r\": \"<t>no</t>\",\r\n \"h\": \"no\",\r\n \"w\": \"no\"\r\n }\r\n ],\r\n [\r\n null,\r\n null,\r\n null,\r\n null,\r\n null,\r\n null\r\n ],\r\n [\r\n null,\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"Table 3\",\r\n \"r\": \"<t>Table 3</t>\",\r\n \"h\": \"Table 3\",\r\n \"w\": \"Table 3\"\r\n },\r\n null,\r\n null,\r\n null,\r\n null\r\n ],\r\n [\r\n null,\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"id\",\r\n \"r\": \"<t>id</t>\",\r\n \"h\": \"id\",\r\n \"w\": \"id\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"name\",\r\n \"r\": \"<t>name</t>\",\r\n \"h\": \"name\",\r\n \"w\": \"name\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"other\",\r\n \"r\": \"<t>other</t>\",\r\n \"h\": \"other\",\r\n \"w\": \"other\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"flag\",\r\n \"r\": \"<t>flag</t>\",\r\n \"h\": \"flag\",\r\n \"w\": \"flag\"\r\n },\r\n null\r\n ],\r\n [\r\n null,\r\n {\r\n \"t\": \"n\",\r\n \"v\": 1,\r\n \"w\": \"1\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"name 1\",\r\n \"r\": \"<t>name 1</t>\",\r\n \"h\": \"name 1\",\r\n \"w\": \"name 1\"\r\n },\r\n {\r\n \"t\": \"n\",\r\n \"v\": 11,\r\n \"w\": \"11\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"yes\",\r\n \"r\": \"<t>yes</t>\",\r\n \"h\": \"yes\",\r\n \"w\": \"yes\"\r\n },\r\n null\r\n ],\r\n [\r\n null,\r\n {\r\n \"t\": \"n\",\r\n \"v\": 2,\r\n \"w\": \"2\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"name 2\",\r\n \"r\": \"<t>name 2</t>\",\r\n \"h\": \"name 2\",\r\n \"w\": \"name 2\"\r\n },\r\n {\r\n \"t\": \"n\",\r\n \"v\": 12,\r\n \"w\": \"12\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"no\",\r\n \"r\": \"<t>no</t>\",\r\n \"h\": \"no\",\r\n \"w\": \"no\"\r\n },\r\n null\r\n ],\r\n [\r\n null,\r\n {\r\n \"t\": \"n\",\r\n \"v\": 3,\r\n \"w\": \"3\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"name 3\",\r\n \"r\": \"<t>name 3</t>\",\r\n \"h\": \"name 3\",\r\n \"w\": \"name 3\"\r\n },\r\n {\r\n \"t\": \"n\",\r\n \"v\": 13,\r\n \"w\": \"13\"\r\n },\r\n null,\r\n null\r\n ],\r\n [\r\n null,\r\n {\r\n \"t\": \"n\",\r\n \"v\": 4,\r\n \"w\": \"4\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"name 4\",\r\n \"r\": \"<t>name 4</t>\",\r\n \"h\": \"name 4\",\r\n \"w\": \"name 4\"\r\n },\r\n {\r\n \"t\": \"n\",\r\n \"v\": 14,\r\n \"w\": \"14\"\r\n },\r\n {\r\n \"t\": \"s\",\r\n \"v\": \"yes\",\r\n \"r\": \"<t>yes</t>\",\r\n \"h\": \"yes\",\r\n \"w\": \"yes\"\r\n },\r\n null\r\n ]\r\n]"} +{"text": "// errorcheck\n\n// Copyright 2015 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\n// Test that incorrect expressions involving wrong anonymous interface\n// do not generate panics in Type Stringer.\n// Does not compile.\n\npackage main\n\ntype I interface {\n\tint // ERROR \"interface contains embedded non-interface int\"\n}\n\nfunc n() {\n\t(I) // ERROR \"type I is not an expression\"\n}\n\nfunc m() {\n\t(interface{int}) // ERROR \"interface contains embedded non-interface int\" \"type interface { int } is not an expression\"\n}\n\nfunc main() {\n}\n"} +{"text": "/*\n * Copyright (C) 2019 - present Instructure, Inc.\n *\n * This file is part of Canvas.\n *\n * Canvas is free software: you can redistribute it and/or modify it under\n * the terms of the GNU Affero General Public License as published by the Free\n * Software Foundation, version 3 of the License.\n *\n * Canvas is distributed in the hope that it will be useful, but WITHOUT ANY\n * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\n * A PARTICULAR PURPOSE. See the GNU Affero General Public License for more\n * details.\n *\n * You should have received a copy of the GNU Affero General Public License along\n * with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport React from 'react'\nimport ReactDOM from 'react-dom'\n\nimport HideAssignmentGradesTray from '../../grading/HideAssignmentGradesTray'\nimport PostAssignmentGradesTray from '../../grading/PostAssignmentGradesTray'\nimport SpeedGraderHelpers from '../../../../public/javascripts/speed_grader_helpers'\n\nfunction submissionsPostedAtUpdater({submissionsMap, updateSubmission, afterUpdateSubmission}) {\n return function({postedAt, userIds}) {\n userIds.forEach(userId => {\n const submission = submissionsMap[userId]\n if (submission != null) {\n submission.posted_at = postedAt\n updateSubmission(submission)\n }\n })\n afterUpdateSubmission()\n }\n}\n\nexport default class PostPolicies {\n constructor({assignment, sections, updateSubmission, afterUpdateSubmission}) {\n this._assignment = assignment\n this._containerName = 'SPEED_GRADER'\n this._sections = sections\n this._updateSubmission = updateSubmission\n this._afterUpdateSubmission = afterUpdateSubmission\n\n const $hideContainer = document.getElementById('hide-assignment-grades-tray')\n const bindHideTray = ref => {\n this._hideAssignmentGradesTray = ref\n }\n ReactDOM.render(<HideAssignmentGradesTray ref={bindHideTray} />, $hideContainer)\n\n const $postContainer = document.getElementById('post-assignment-grades-tray')\n const bindPostTray = ref => {\n this._postAssignmentGradesTray = ref\n }\n ReactDOM.render(<PostAssignmentGradesTray ref={bindPostTray} />, $postContainer)\n }\n\n destroy() {\n const $hideContainer = document.getElementById('hide-assignment-grades-tray')\n const $postContainer = document.getElementById('post-assignment-grades-tray')\n\n if ($hideContainer) {\n ReactDOM.unmountComponentAtNode($hideContainer)\n }\n\n if ($postContainer) {\n ReactDOM.unmountComponentAtNode($postContainer)\n }\n }\n\n showHideAssignmentGradesTray({submissionsMap}) {\n let onHidden\n\n if (this._assignment.anonymousGrading) {\n onHidden = () => {\n SpeedGraderHelpers.reloadPage()\n }\n } else {\n onHidden = submissionsPostedAtUpdater({\n afterUpdateSubmission: this._afterUpdateSubmission,\n submissionsMap,\n updateSubmission: this._updateSubmission\n })\n }\n\n this._hideAssignmentGradesTray.show({\n assignment: this._assignment,\n containerName: this._containerName,\n onHidden,\n sections: this._sections\n })\n }\n\n showPostAssignmentGradesTray({submissionsMap, submissions = []}) {\n let onPosted\n\n if (this._assignment.anonymousGrading) {\n onPosted = () => {\n SpeedGraderHelpers.reloadPage()\n }\n } else {\n onPosted = submissionsPostedAtUpdater({\n afterUpdateSubmission: this._afterUpdateSubmission,\n submissionsMap,\n updateSubmission: this._updateSubmission\n })\n }\n\n this._postAssignmentGradesTray.show({\n assignment: this._assignment,\n containerName: this._containerName,\n onPosted,\n sections: this._sections,\n submissions: submissions.map(submission => ({\n hasPostableComments: !!submission.has_postable_comments,\n postedAt: submission.posted_at,\n score: submission.score,\n workflowState: submission.workflow_state\n }))\n })\n }\n}\n"} +{"text": "import { takeEvery, apply, put } from 'redux-saga/effects';\nimport {\n addNovelCommentSuccess,\n addNovelCommentFailure,\n} from '../actions/addNovelComment';\nimport { addError } from '../actions/error';\nimport pixiv from '../helpers/apiClient';\nimport { ADD_NOVEL_COMMENT } from '../constants/actionTypes';\n\nexport function* handleAddNovelComment(action) {\n const { novelId, comment, replyToCommentId } = action.payload;\n try {\n yield apply(pixiv, pixiv.novelAddComment, [\n novelId,\n comment,\n replyToCommentId,\n ]);\n yield put(addNovelCommentSuccess(novelId, replyToCommentId));\n } catch (err) {\n yield put(addNovelCommentFailure(novelId, replyToCommentId));\n yield put(addError(err));\n }\n}\n\nexport function* watchAddNovelComment() {\n yield takeEvery(ADD_NOVEL_COMMENT.ADD, handleAddNovelComment);\n}\n"} +{"text": "%% @doc: Elli example callback\n%%\n%% Your callback needs to implement two functions, handle/2 and\n%% handle_event/3. For every request, Elli will call your handle\n%% function with the request. When an event happens, like Elli\n%% completed a request, there was a parsing error or your handler\n%% threw an error, handle_event/3 is called.\n\n-module(elli_example_callback).\n-export([handle/2, handle_event/3]).\n-export([chunk_loop/1]).\n\n-include(\"elli.hrl\").\n-behaviour(elli_handler).\n\n-include_lib(\"kernel/include/file.hrl\").\n\n%%\n%% ELLI REQUEST CALLBACK\n%%\n\nhandle(Req, _Args) ->\n %% Delegate to our handler function\n handle(Req#req.method, elli_request:path(Req), Req).\n\n\n\n%% Route METHOD & PATH to the appropriate clause\nhandle('GET',[<<\"hello\">>, <<\"world\">>], _Req) ->\n %% Reply with a normal response. 'ok' can be used instead of '200'\n %% to signal success.\n {ok, [], <<\"Hello World!\">>};\n\nhandle('GET', [<<\"hello\">>], Req) ->\n %% Fetch a GET argument from the URL.\n Name = elli_request:get_arg(<<\"name\">>, Req, <<\"undefined\">>),\n {ok, [], <<\"Hello \", Name/binary>>};\n\nhandle('POST', [<<\"hello\">>], Req) ->\n %% Fetch a POST argument from the POST body.\n Name = elli_request:post_arg(<<\"name\">>, Req, <<\"undefined\">>),\n %% Fetch and decode\n City = elli_request:post_arg_decoded(<<\"city\">>, Req, <<\"undefined\">>),\n {ok, [], <<\"Hello \", Name/binary, \" of \", City/binary>>};\n\nhandle('GET', [<<\"hello\">>, <<\"iolist\">>], Req) ->\n %% Iolists will be kept as iolists all the way to the socket.\n Name = elli_request:get_arg(<<\"name\">>, Req),\n {ok, [], [<<\"Hello \">>, Name]};\n\nhandle('GET', [<<\"type\">>], Req) ->\n Name = elli_request:get_arg(<<\"name\">>, Req),\n %% Fetch a header.\n case elli_request:get_header(<<\"Accept\">>, Req, <<\"text/plain\">>) of\n <<\"text/plain\">> ->\n {ok, [{<<\"Content-type\">>, <<\"text/plain; charset=ISO-8859-1\">>}],\n <<\"name: \", Name/binary>>};\n <<\"application/json\">> ->\n {ok, [{<<\"Content-type\">>, <<\"application/json; charset=ISO-8859-1\">>}],\n <<\"{\\\"name\\\" : \\\"\", Name/binary, \"\\\"}\">>}\n end;\n\nhandle('GET',[<<\"headers.html\">>], _Req) ->\n %% Set custom headers, for example 'Content-Type'\n {ok, [{<<\"X-Custom\">>, <<\"foobar\">>}], <<\"see headers\">>};\n\nhandle('GET',[<<\"user\">>, <<\"defined\">>, <<\"behaviour\">>], _Req) ->\n %% If you return any of the following HTTP headers, you can\n %% override the default behaviour of Elli:\n %%\n %% * Connection: By default Elli will use keep-alive if the\n %% protocol supports it, setting \"close\" will close\n %% the connection immediately after Elli has sent\n %% the response. If the client has already sent\n %% pipelined requests, these will be discarded.\n %%\n %% * Content-Length: By default Elli looks at the size of the\n %% body you returned to determine the\n %% Content-Length header. Explicitly including\n %% your own Content-Length (with the value as\n %% int, binary or list) allows you to return an\n %% empty body. Useful for implementing the \"304\n %% Not Modified\" response.\n %%\n {304, [{<<\"Connection\">>, <<\"close\">>},\n {<<\"Content-Length\">>, <<\"123\">>}], <<\"ignored\">>};\n\nhandle('GET', [<<\"user\">>, <<\"content-length\">>], _Req) ->\n {200, [{<<\"Content-Length\">>, 123}], <<\"foobar\">>};\n\nhandle('GET', [<<\"crash\">>], _Req) ->\n %% Throwing an exception results in a 500 response and\n %% request_throw being called\n throw(foobar);\n\nhandle('GET', [<<\"decoded-hello\">>], Req) ->\n %% Fetch a URI decoded GET argument from the URL.\n Name = elli_request:get_arg_decoded(<<\"name\">>, Req, <<\"undefined\">>),\n {ok, [], <<\"Hello \", Name/binary>>};\n\nhandle('GET', [<<\"decoded-list\">>], Req) ->\n %% Fetch a URI decoded GET argument from the URL.\n [{<<\"name\">>, Name}, {<<\"foo\">>, true}] = elli_request:get_args_decoded(Req),\n {ok, [], <<\"Hello \", Name/binary>>};\n\n\nhandle('GET', [<<\"sendfile\">>], _Req) ->\n %% Returning {file, \"/path/to/file\"} instead of the body results\n %% in Elli using sendfile.\n %% All required headers should be added by the handler.\n F = \"../README.md\",\n Size = elli_util:file_size(F),\n {ok, [{<<\"Content-Length\">>, Size}], {file, F}};\n\nhandle('GET', [<<\"sendfile\">>, <<\"range\">>], Req) ->\n %% Read the Range header of the request and use the normalized\n %% range with sendfile, otherwise send the entire file when\n %% no range is present, or respond with a 416 if the range is invalid.\n F = \"../README.md\",\n Size = elli_util:file_size(F),\n Range = elli_util:normalize_range(elli_request:get_range(Req), Size),\n case Range of\n {_Offset, Length} ->\n {206, [{<<\"Content-Length\">>, Length},\n {<<\"Content-Range\">>, elli_util:encode_range(Range, Size)}],\n {file, F, Range}};\n undefined ->\n {200, [{<<\"Content-Length\">>, Size}], {file, F}};\n invalid_range ->\n {416, [{<<\"Content-Length\">>, 0},\n {<<\"Content-Range\">>, elli_util:encode_range(invalid_range, Size)}],\n []}\n end;\n\nhandle('GET', [<<\"compressed\">>], _Req) ->\n %% Body with a byte size over 1024 are automatically gzipped by\n %% elli_middleware_compress\n {ok, binary:copy(<<\"Hello World!\">>, 86)};\n\nhandle('GET', [<<\"compressed-io_list\">>], _Req) ->\n %% Body with a iolist size over 1024 are automatically gzipped by\n %% elli_middleware_compress\n {ok, lists:duplicate(86, [<<\"Hello World!\">>])};\n\n\nhandle('HEAD', [<<\"head\">>], _Req) ->\n {200, [], <<\"body must be ignored\">>};\n\nhandle('GET', [<<\"chunked\">>], Req) ->\n %% Start a chunked response for streaming real-time events to the\n %% browser.\n %%\n %% Calling elli_request:send_chunk(ChunkRef, Body) will send that\n %% part to the client. elli_request:close_chunk(ChunkRef) will\n %% close the response.\n %%\n %% Return immediately {chunk, Headers} to signal we want to chunk.\n Ref = elli_request:chunk_ref(Req),\n spawn(fun() -> ?MODULE:chunk_loop(Ref) end),\n {chunk, [{<<\"Content-Type\">>, <<\"text/event-stream\">>}]};\n\nhandle('GET', [<<\"shorthand\">>], _Req) ->\n {200, <<\"hello\">>};\n\nhandle('GET', [<<\"304\">>], _Req) ->\n %% A \"Not Modified\" response is exactly like a normal response (so\n %% Content-Length is included), but the body will not be sent.\n {304, [{<<\"Etag\">>, <<\"foobar\">>}], <<\"Ignored\">>};\n\nhandle('GET', [<<\"302\">>], _Req) ->\n {302, [{<<\"Location\">>, <<\"/hello/world\">>}], <<>>};\n\nhandle('GET', [<<\"403\">>], _Req) ->\n %% Exceptions formatted as return codes can be used to\n %% short-circuit a response, for example in case of\n %% authentication/authorization\n throw({403, [], <<\"Forbidden\">>});\n\nhandle('GET', [<<\"invalid_return\">>], _Req) ->\n {invalid_return};\n\nhandle(_, _, _Req) ->\n {404, [], <<\"Not Found\">>}.\n\n\n\n%% Send 10 separate chunks to the client.\nchunk_loop(Ref) ->\n chunk_loop(Ref, 10).\n\nchunk_loop(Ref, 0) ->\n elli_request:close_chunk(Ref);\nchunk_loop(Ref, N) ->\n timer:sleep(10),\n\n %% Send a chunk to the client, check for errors as the user might\n %% have disconnected\n case elli_request:send_chunk(Ref, [<<\"chunk\">>, integer_to_list(N)]) of\n ok -> ok;\n {error, Reason} ->\n io:format(\"error in sending chunk: ~p~n\", [Reason])\n end,\n\n chunk_loop(Ref, N-1).\n\n\n%%\n%% ELLI EVENT CALLBACKS\n%%\n\n\n%% elli_startup is sent when Elli is starting up. If you are\n%% implementing a middleware, you can use it to spawn processes,\n%% create ETS tables or start supervised processes in a supervisor\n%% tree.\nhandle_event(elli_startup, [], _) -> ok;\n\n%% request_complete fires *after* Elli has sent the response to the\n%% client. Timings contains timestamps of events like when the\n%% connection was accepted, when request parsing finished, when the\n%% user callback returns, etc. This allows you to collect performance\n%% statistics for monitoring your app.\nhandle_event(request_complete, [_Request,\n _ResponseCode, _ResponseHeaders, _ResponseBody,\n _Timings], _) -> ok;\n\n%% request_throw, request_error and request_exit events are sent if\n%% the user callback code throws an exception, has an error or\n%% exits. After triggering this event, a generated response is sent to\n%% the user.\nhandle_event(request_throw, [_Request, _Exception, _Stacktrace], _) -> ok;\nhandle_event(request_error, [_Request, _Exception, _Stacktrace], _) -> ok;\nhandle_event(request_exit, [_Request, _Exception, _Stacktrace], _) -> ok;\n\n%% invalid_return is sent if the user callback code returns a term not\n%% understood by elli, see elli_http:execute_callback/1.\n%% After triggering this event, a generated response is sent to the user.\nhandle_event(invalid_return, [_Request, _ReturnValue], _) -> ok;\n\n\n%% chunk_complete fires when a chunked response is completely\n%% sent. It's identical to the request_complete event, except instead\n%% of the response body you get the atom \"client\" or \"server\"\n%% depending on who closed the connection.\nhandle_event(chunk_complete, [_Request,\n _ResponseCode, _ResponseHeaders, _ClosingEnd,\n _Timings], _) -> ok;\n\n%% request_closed is sent if the client closes the connection when\n%% Elli is waiting for the next request on a keep alive connection.\nhandle_event(request_closed, [], _) -> ok;\n\n%% request_timeout is sent if the client times out when\n%% Elli is waiting for the request.\nhandle_event(request_timeout, [], _) -> ok;\n\n%% request_parse_error fires if the request is invalid and cannot be\n%% parsed by erlang:decode_packet/3 or it contains a path Elli cannot\n%% parse or does not support.\nhandle_event(request_parse_error, [_], _) -> ok;\n\n%% client_closed can be sent from multiple parts of the request\n%% handling. It's sent when the client closes the connection or if for\n%% any reason the socket is closed unexpectedly. The \"Where\" atom\n%% tells you in which part of the request processing the closed socket\n%% was detected: receiving_headers, receiving_body, before_response\nhandle_event(client_closed, [_Where], _) -> ok;\n\n%% client_timeout can as with client_closed be sent from multiple\n%% parts of the request handling. If Elli tries to receive data from\n%% the client socket and does not receive anything within a timeout,\n%% this event fires and the socket is closed.\nhandle_event(client_timeout, [_Where], _) -> ok;\n\n%% bad_request is sent when Elli detects a request is not well\n%% formatted or does not conform to the configured limits. Currently\n%% the Reason variable can be any of the following: {too_many_headers,\n%% Headers}, {body_size, ContentLength}\nhandle_event(bad_request, [_Reason], _) -> ok;\n\n%% file_error is sent when the user wants to return a file as a\n%% response, but for some reason it cannot be opened.\nhandle_event(file_error, [_ErrorReason], _) -> ok.\n"}